Color_RGBAu32 (#253)

* Renamed deprecated RGB5A1 to RGBA16

* Cleanup shopkeeper structs with Color_RGBAu32 and Vec3f

* Rename functions with RGB5A1 in them

* BSS fix
This commit is contained in:
Derek Hensley
2021-08-15 07:56:20 -07:00
committed by GitHub
parent 5dc98392e0
commit f90e3ee739
18 changed files with 349 additions and 245 deletions
+5 -1
View File
@@ -28,6 +28,10 @@ typedef struct {
f32 r, g, b, a;
} Color_RGBAf;
typedef struct {
u32 r, g, b, a;
} Color_RGBAu32;
typedef union {
struct {
u16 r : 5;
@@ -36,6 +40,6 @@ typedef union {
u16 a : 1;
};
u16 rgba;
} Color_RGB5A1;
} Color_RGBA16;
#endif
+2 -2
View File
@@ -3409,10 +3409,10 @@ s32 func_80178A94(s32 param_1, s32 param_2);
// void func_80178DAC(void);
// void func_80178E3C(void);
// void func_80178E7C(void);
void Check_WriteRGB5A1Pixel(u16* buffer, u32 x, u32 y, u16 value);
void Check_WriteRGBA16Pixel(u16* buffer, u32 x, u32 y, u16 value);
void Check_WriteI4Pixel(u16* buffer, u32 x, u32 y, u32 value);
void Check_DrawI4Texture(u16* buffer, u32 x, u32 y, u32 width, u32 height, u8* texture);
void Check_ClearRGB5A1(s16* buffer);
void Check_ClearRGBA16(s16* buffer);
// void Check_DrawExpansionPakErrorMessage(void);
// void Check_DrawRegionLockErrorMessage(void);
// void Check_ExpansionPak(void);
+83
View File
@@ -0,0 +1,83 @@
#ifndef PREVENT_BSS_REORDERING_H
#define PREVENT_BSS_REORDERING_H
/**
* To determine variable order for .bss, the compiler sorts variables by their
* "name index" mod 256, where name index is something that, with -g, gets
* incremented by struct and variable declarations, typedefs, and file markers,
* among else. (Without -g, only variable declarations affects the index.)
* This file contains enough dummy declarations to bump the index by 128.
* Including it, or removing the include, should fix bss reordering problems
* for a file, assuming the name index distance between its first and last bss
* variable is at most 128.
* Note that if a variable is declared "extern" within a header file, the name
* index is taken at that point of the extern declaration. Thus, this include
* must come before any such header.
*/
struct Dummy0 { int x; };
struct Dummy1 { int x; };
struct Dummy2 { int x; };
struct Dummy3 { int x; };
struct Dummy4 { int x; };
struct Dummy5 { int x; };
struct Dummy6 { int x; };
struct Dummy7 { int x; };
struct Dummy8 { int x; };
struct Dummy9 { int x; };
struct Dummy10 { int x; };
struct Dummy11 { int x; };
struct Dummy12 { int x; };
struct Dummy13 { int x; };
struct Dummy14 { int x; };
struct Dummy15 { int x; };
struct Dummy16 { int x; };
struct Dummy17 { int x; };
struct Dummy18 { int x; };
struct Dummy19 { int x; };
struct Dummy20 { int x; };
struct Dummy21 { int x; };
struct Dummy22 { int x; };
struct Dummy23 { int x; };
struct Dummy24 { int x; };
struct Dummy25 { int x; };
struct Dummy26 { int x; };
struct Dummy27 { int x; };
struct Dummy28 { int x; };
struct Dummy29 { int x; };
struct Dummy30 { int x; };
struct Dummy31 { int x; };
struct Dummy32 { int x; };
struct Dummy33 { int x; };
struct Dummy34 { int x; };
struct Dummy35 { int x; };
struct Dummy36 { int x; };
struct Dummy37 { int x; };
struct Dummy38 { int x; };
struct Dummy39 { int x; };
struct Dummy40 { int x; };
struct Dummy41 { int x; };
struct Dummy42 { int x; };
struct Dummy43 { int x; };
struct Dummy44 { int x; };
struct Dummy45 { int x; };
struct Dummy46 { int x; };
struct Dummy47 { int x; };
struct Dummy48 { int x; };
struct Dummy49 { int x; };
struct Dummy50 { int x; };
struct Dummy51 { int x; };
struct Dummy52 { int x; };
struct Dummy53 { int x; };
struct Dummy54 { int x; };
struct Dummy55 { int x; };
struct Dummy56 { int x; };
struct Dummy57 { int x; };
struct Dummy58 { int x; };
struct Dummy59 { int x; };
struct Dummy60 { int x; };
struct Dummy61 { int x; };
struct Dummy62 { int x; };
typedef int Dummy63;
#endif