Skip to content

Commit cb4c8d9

Browse files
...
1 parent d2e5057 commit cb4c8d9

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

‎README.MD‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,65 @@ syntaxia-structura/
158158

159159
---
160160

161+
```
162+
<structura version="1.0.4">
163+
<head>
164+
<@>math_utils.syn</@>
165+
166+
<style>
167+
#Global {
168+
Palette: Temple16;
169+
Grid: 80x25;
170+
Resolution: 640x480;
171+
Surface: BLUE; /* Classic Setup Blue */
172+
}
173+
174+
/* The Physics HUD style */
175+
#Field[name="distance"] {
176+
Surface: BLACK;
177+
Glyph: GREEN; /* Radar/Monitor Green */
178+
Border: DOUBLE;
179+
At: 10CH, 5CH; /* Absolute position on the 80x25 grid */
180+
}
181+
182+
/* Warning style if the object is moving too fast */
183+
[Condition: speed > 50.0] {
184+
Surface: RED;
185+
Glyph: WHITE;
186+
Signal: BLINK;
187+
}
188+
189+
<<style ResultText>>
190+
Font: "FixedSys";
191+
Plane: 2; /* Sits above the background */
192+
Shadow: DEEP;
193+
<>/style>>
194+
</style>
195+
</head>
196+
197+
<func name="physics_demo">
198+
<var name="speed" type="float">9.8</var>
199+
<var name="time" type="float">5</var>
200+
<var name="distance" type="float">speed * time + 0.5 * 9.8 * time * time</var>
201+
202+
<if condition="distance > 0 && speed > 0">
203+
<print style="ResultText">Distance traveled: distance</print>
204+
</if>
205+
206+
<print>Half of π: π / 2</print>
207+
<print>Square root of 49: √49</print>
208+
209+
<var name="distance_int" type="int"><~>int==distance<~></var>
210+
<print>Distance as integer: distance_int</print>
211+
</func>
212+
213+
<call method="physics_demo" lock="true" />
214+
</structura>
215+
216+
```
217+
218+
---
219+
161220
<div align="center">
162221
© Cursed Entertainment 2026
163222
</div>

0 commit comments

Comments
 (0)