Skip to content

Commit

Permalink
Replace bool with u8 in bitfields
Browse files Browse the repository at this point in the history
  • Loading branch information
phcoder authored and phcoder committed May 31, 2022
1 parent a0a1791 commit 1eebf3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions include/tic80.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ typedef union
{
struct
{
bool up:1;
bool down:1;
bool left:1;
bool right:1;
bool a:1;
bool b:1;
bool x:1;
bool y:1;
u8 up:1;
u8 down:1;
u8 left:1;
u8 right:1;
u8 a:1;
u8 b:1;
u8 x:1;
u8 y:1;
};

u8 data;
Expand Down
2 changes: 1 addition & 1 deletion src/tic.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ typedef union
struct
{
u8 sprite:7;
bool system:1;
u8 system:1;
} cursor;
} vars;

Expand Down

0 comments on commit 1eebf3a

Please sign in to comment.