@@ -417,9 +417,9 @@ extern "C" void motion_pointtowards(ExecutionContext *ctx, const StringPtr *towa
417417
418418 Sprite *sprite = static_cast <Sprite *>(ctx->thread ()->target ());
419419
420- if (string_compare_case_sensitive (towards, &MOUSE_STR) == 0 )
420+ if (strings_equal_case_sensitive (towards, &MOUSE_STR))
421421 motion_point_towards_mouse (sprite);
422- else if (string_compare_case_sensitive (towards, &RANDOM_STR) == 0 )
422+ else if (strings_equal_case_sensitive (towards, &RANDOM_STR))
423423 motion_point_towards_random_direction (ctx);
424424 else {
425425 // TODO: Use UTF-16 in engine
@@ -467,9 +467,9 @@ extern "C" void motion_goto(ExecutionContext *ctx, const StringPtr *towards)
467467
468468 Sprite *sprite = static_cast <Sprite *>(ctx->thread ()->target ());
469469
470- if (string_compare_case_sensitive (towards, &MOUSE_STR) == 0 )
470+ if (strings_equal_case_sensitive (towards, &MOUSE_STR))
471471 motion_go_to_mouse (sprite);
472- else if (string_compare_case_sensitive (towards, &RANDOM_STR) == 0 )
472+ else if (strings_equal_case_sensitive (towards, &RANDOM_STR))
473473 motion_go_to_random_pos (ctx);
474474 else {
475475 // TODO: Use UTF-16 in engine
@@ -552,9 +552,9 @@ extern "C" double motion_get_target_x(ExecutionContext *ctx, const StringPtr *na
552552 static const StringPtr MOUSE_STR (" _mouse_" );
553553 static const StringPtr RANDOM_STR (" _random_" );
554554
555- if (string_compare_case_sensitive (name, &MOUSE_STR) == 0 )
555+ if (strings_equal_case_sensitive (name, &MOUSE_STR))
556556 return ctx->engine ()->mouseX ();
557- else if (string_compare_case_sensitive (name, &RANDOM_STR) == 0 )
557+ else if (strings_equal_case_sensitive (name, &RANDOM_STR))
558558 return motion_get_random_x (ctx);
559559 else {
560560 // TODO: Use UTF-16 in engine
@@ -575,9 +575,9 @@ extern "C" double motion_get_target_y(ExecutionContext *ctx, const StringPtr *na
575575 static const StringPtr MOUSE_STR (" _mouse_" );
576576 static const StringPtr RANDOM_STR (" _random_" );
577577
578- if (string_compare_case_sensitive (name, &MOUSE_STR) == 0 )
578+ if (strings_equal_case_sensitive (name, &MOUSE_STR))
579579 return ctx->engine ()->mouseY ();
580- else if (string_compare_case_sensitive (name, &RANDOM_STR) == 0 )
580+ else if (strings_equal_case_sensitive (name, &RANDOM_STR))
581581 return motion_get_random_y (ctx);
582582 else {
583583 // TODO: Use UTF-16 in engine
@@ -598,7 +598,7 @@ extern "C" bool motion_is_target_valid(ExecutionContext *ctx, const StringPtr *n
598598 static const StringPtr MOUSE_STR (" _mouse_" );
599599 static const StringPtr RANDOM_STR (" _random_" );
600600
601- if (string_compare_case_sensitive (name, &MOUSE_STR) == 0 || string_compare_case_sensitive (name, &RANDOM_STR) == 0 )
601+ if (strings_equal_case_sensitive (name, &MOUSE_STR) || strings_equal_case_sensitive (name, &RANDOM_STR))
602602 return true ;
603603 else {
604604 // TODO: Use UTF-16 in engine
0 commit comments