aboutsummaryrefslogtreecommitdiff
path: root/examples/game
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-11 13:18:30 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-11 13:18:30 -0400
commit294b712e6dabc722772f86aaa9d0faaa08c14717 (patch)
treef24ab45434d5bf2d5ebd64b0d533d4d361e9daff /examples/game
parentd254b440f8359b42a097edfeb2db1585fd20c695 (diff)
Don't use '$' prefix for field names
Diffstat (limited to 'examples/game')
-rw-r--r--examples/game/color.tm10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/game/color.tm b/examples/game/color.tm
index f8702570..fef12e60 100644
--- a/examples/game/color.tm
+++ b/examples/game/color.tm
@@ -12,12 +12,12 @@ struct Color(r,g,b:Num,a=1.0):
func draw_rectangle(c:Color, pos:Vec2, size:Vec2):
inline C {
DrawRectangle(
- (int)(_$pos.$x), (int)(_$pos.$y), (int)(_$size.$x), (int)(_$size.$y),
+ (int)(_$pos.x), (int)(_$pos.y), (int)(_$size.x), (int)(_$size.y),
((Color){
- (int8_t)(uint8_t)(255.*_$c.$r),
- (int8_t)(uint8_t)(255.*_$c.$g),
- (int8_t)(uint8_t)(255.*_$c.$b),
- (int8_t)(uint8_t)(255.*_$c.$a),
+ (int8_t)(uint8_t)(255.*_$c.r),
+ (int8_t)(uint8_t)(255.*_$c.g),
+ (int8_t)(uint8_t)(255.*_$c.b),
+ (int8_t)(uint8_t)(255.*_$c.a),
})
);
}