You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this definitions: typedef uint8_t bool; extern bool collide_check_u16(uint16_t x, uint16_t y, Rectangle_u16 *collision) __smallc __z88dk_callee;
The returning values is like:
collide_return_false:
ld l, 0
ret
collide_return_true:
ld l, 1
ret
When doing something like: collide_draw_set(collide_check_u16(100, 90, &rect2) ? 8 : 7);
It uses also the value at register H, so getting incorrect behavior, if instead I do: collide_draw_set((bool)collide_check_u16(100, 90, &rect2) ? 8 : 7);
Works normally, using only register L.
If I set returning values like:
collide_return_false:
ld hl, 0
ret
collide_return_true:
ld hl, 1
ret
Then works with the 1st calling method, but is supposed to be an 8-bit returning value.
The text was updated successfully, but these errors were encountered:
I have this definitions:
typedef uint8_t bool;
extern bool collide_check_u16(uint16_t x, uint16_t y, Rectangle_u16 *collision) __smallc __z88dk_callee;
The returning values is like:
When doing something like:
collide_draw_set(collide_check_u16(100, 90, &rect2) ? 8 : 7);
It uses also the value at register H, so getting incorrect behavior, if instead I do:
collide_draw_set((bool)collide_check_u16(100, 90, &rect2) ? 8 : 7);
Works normally, using only register L.
If I set returning values like:
Then works with the 1st calling method, but is supposed to be an 8-bit returning value.
The text was updated successfully, but these errors were encountered: