EnMag OK and documented (#547)

* Name textures in object_mag

* Corrections

* tabs -> spaces

* OK, data imported

* Remove obsolete comment

* Start documentation

* Defines for most texture sizes

* Name most static variables, add state enum

* Macros, name all the statics

* Couple of minor tweaks to other files

* Name some more effect stuff

* Fix kanfont data

* Name everything else, move macros

* Format

* Review
This commit is contained in:
EllipticEllipsis
2022-01-16 17:55:03 +00:00
committed by GitHub
parent b47941968d
commit 924fa9aadf
12 changed files with 1045 additions and 67 deletions
+1 -1
View File
@@ -3768,7 +3768,7 @@ void func_801A3CD8(s8 param_1);
// void func_801A3D98(void);
// void func_801A3E38(void);
// void func_801A3EC0(void);
void func_801A3F54(s32 arg0);
void func_801A3F54(u8 flag);
// void func_801A3F6C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_801A3FB4(void);
// void func_801A3FFC(UNK_TYPE1 param_1);
+15
View File
@@ -127,6 +127,21 @@ extern GraphicsContext* __gfxCtx;
#define GRAPH_ALLOC(gfxCtx, size) ((void*)((gfxCtx)->polyOpa.d = (Gfx*)((u8*)(gfxCtx)->polyOpa.d - (size))))
// Custom gbi macro
#define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \
{ \
gDPPipeSync(pkt); \
gDPTileSync(pkt); \
gDPSetTile(pkt, fmt, siz, (((width)*siz##_TILE_BYTES) + 7) >> 3, 0, G_TX_LOADTILE, 0, cmt, maskt, shiftt, cms, \
masks, shifts); \
gDPTileSync(pkt); \
gDPSetTile(pkt, fmt, siz, (((width)*siz##_TILE_BYTES) + 7) >> 3, 0, G_TX_RENDERTILE, pal, cmt, maskt, shiftt, \
cms, masks, shifts); \
gDPSetTileSize(pkt, G_TX_RENDERTILE, 0, 0, ((width)-1) << G_TEXTURE_IMAGE_FRAC, \
((height)-1) << G_TEXTURE_IMAGE_FRAC); \
} \
(void)0
#define ALIGN8(val) (((val) + 7) & ~7)
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
+3 -1
View File
@@ -167,8 +167,10 @@ typedef struct {
/* 0x5 */ Color_RGB8 envColor;
} FireObjLightParams; // size = 0x8
#define FONT_CHAR_TEX_WIDTH 16
#define FONT_CHAR_TEX_HEIGHT 16
//! @TODO: Make this use `sizeof(AnyFontTextureSymbol)`
#define FONT_CHAR_TEX_SIZE ((16 * 16) / 2)
#define FONT_CHAR_TEX_SIZE ((16 * 16) / 2) // 16x16 I4 texture
// Font textures are loaded into here
typedef struct {