diff options
author | Ben Bridle <ben@derelict.engineering> | 2024-11-22 16:04:20 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2024-11-22 16:15:11 +1300 |
commit | 4f8805869c469cb1b3685e03c3ea34d7654b5cb7 (patch) | |
tree | efe555c1064b7a69738e3cf7fd107af7bdc0155f /arm9/source/bang.h | |
parent | fcbc3968bd95e4d19b37d9fa4bca51b1db8596ff (diff) | |
download | bedrock-nds-4f8805869c469cb1b3685e03c3ea34d7654b5cb7.zip |
Implement file device
There is still a small amount of work to be done on the file device:
- Read file size only when requested
- Hide '.' and '..' directories
- Resize files
Diffstat (limited to 'arm9/source/bang.h')
-rw-r--r-- | arm9/source/bang.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/arm9/source/bang.h b/arm9/source/bang.h index 1e13f9f..110e243 100644 --- a/arm9/source/bang.h +++ b/arm9/source/bang.h @@ -1,15 +1,19 @@ #ifndef BANG_H_ #define BANG_H_ - #define SET_HIGH(v,high) v = high << 8 | (v & 0x00ff) - #define SET_LOW(v,low) v = (v & 0xff00) | low - #define HIGH(v) (u8)((v) >> 8) - #define LOW(v) (u8)((v) ) + #define SET_HIGH(v,high) v = high << 8 | (v & 0x00ff) + #define SET_LOW(v,low) v = (v & 0xff00) | low + #define HIGH(v) (u8)((v) >> 8) + #define LOW(v) (u8)((v) ) - #define H_HIGH(v) (u8)((v) >> 24) - #define H_LOW(v) (u8)((v) >> 16) - #define L_HIGH(v) (u8)((v) >> 8) - #define L_LOW(v) (u8)((v) ) + #define SET_H_HIGH(v,high) v = high << 24 | (v & 0x00ffffff) + #define SET_H_LOW(v,low) v = low << 16 | (v & 0xff00ffff) + #define SET_L_HIGH(v,high) v = high << 8 | (v & 0xffff00ff) + #define SET_L_LOW(v,low) v = low | (v & 0xffffff00) + #define H_HIGH(v) (u8)((v) >> 24) + #define H_LOW(v) (u8)((v) >> 16) + #define L_HIGH(v) (u8)((v) >> 8) + #define L_LOW(v) (u8)((v) ) #define LEFT(x) ((x) >> 4) #define RIGHT(x) ((x) & 0xf) |