diff --git a/grogs/test.grnd b/grogs/test.grnd index 0fd2be8..eb1b034 100644 --- a/grogs/test.grnd +++ b/grogs/test.grnd @@ -137,8 +137,8 @@ add $player.xpos 10 &player.xpos @endMovement -pusharg $player.xpos $player.ypos 20 20 0 255 255 -!grogs:drawRect &out +pusharg $player.xpos $player.ypos 20 0 255 255 +!grogs:drawCircle &out !grogs:renderFrame &out !grogs:clearRenderer &out diff --git a/math/math.cpp b/math/math.cpp index df5ab68..7175265 100644 --- a/math/math.cpp +++ b/math/math.cpp @@ -30,17 +30,17 @@ GroundValue modVal(GroundValue* args, int arg_count) { GroundValue floorVal(GroundValue* args, int arg_count) { VALIDATE_ARGS_1(GROUND_DOUBLE); - return GROUND_DOUBLE_VAL(floor(GET_DOUBLE(args[0]))); + return GROUND_INT_VAL(int(floor(GET_DOUBLE(args[0])))); } GroundValue ceilVal(GroundValue* args, int arg_count) { VALIDATE_ARGS_1(GROUND_DOUBLE); - return GROUND_DOUBLE_VAL(ceil(GET_DOUBLE(args[0]))); + return GROUND_INT_VAL(int(ceil(GET_DOUBLE(args[0])))); } GroundValue roundVal(GroundValue* args, int arg_count) { VALIDATE_ARGS_1(GROUND_DOUBLE); - return GROUND_DOUBLE_VAL(round(GET_DOUBLE(args[0]))); + return GROUND_INT_VAL(int(round(GET_DOUBLE(args[0])))); } GroundValue randomInt(GroundValue* args, int arg_count) { diff --git a/math/math.so b/math/math.so new file mode 100755 index 0000000..c5b3a6a Binary files /dev/null and b/math/math.so differ