1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-18 13:54:46 +00:00

Use defines for actor flags (#873)

* Add ACTOR_FLAG_ defines

* Add ACTOR_FLAGS_ALL macro and use ACTOR_FLAG_* constants everywhere

* Remove unused ACTOR_FLAG_* constants

* actor flags in bigokuta & ko

* actor flags in obj_mure

* actor flags in stalfos, twinrova & ganon2

* actor flags in morpha & barinade

* name some previously missed actor flags

* found some comments using hex for actor flags

* Actor flags in ovl_En_Ganon_Mant

* Actor flags in EnWf

* Flags in en_zf

* Actor flags in BossGanon (FeelsOKMan)

* Remove `ACTOR_FLAG_NONE`

* Wrap expansion of `FLAGS` in parentheses

* `ACTOR_FLAGS_ALL` -> `CHECK_FLAG_ALL`

* Move `CHECK_FLAG_ALL` to `macros.h`

* Run formatter
This commit is contained in:
Dragorn421 2021-12-06 01:11:38 +01:00 committed by GitHub
parent 79220ba58a
commit a9284494f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
439 changed files with 1342 additions and 1304 deletions

View file

@ -710,11 +710,10 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) {
Gfillrect setscissor = ptr->fillrect;
const char* modeStr;
modeStr = (setscissor.pad == G_SC_NON_INTERLACE)
? "G_SC_NON_INTERLACE"
: (setscissor.pad == G_SC_ODD_INTERLACE)
? "G_SC_ODD_INTERLACE"
: (setscissor.pad == G_SC_EVEN_INTERLACE) ? "G_SC_EVEN_INTERLACE" : "???";
modeStr = (setscissor.pad == G_SC_NON_INTERLACE) ? "G_SC_NON_INTERLACE"
: (setscissor.pad == G_SC_ODD_INTERLACE) ? "G_SC_ODD_INTERLACE"
: (setscissor.pad == G_SC_EVEN_INTERLACE) ? "G_SC_EVEN_INTERLACE"
: "???";
if ((setscissor.x0frac | setscissor.y0frac | setscissor.x1frac | setscissor.y1frac)) {
if (1) {}
@ -740,12 +739,15 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) {
u32 siz = ((curGfx->words.w0 & 0x180000) >> 0x13) & 0xFF;
DISAS_LOG("gsDPSetColorImage(G_IM_FMT_%s, G_IM_SIZ_%s, %d, 0x%08x(0x%08x) ),",
(fmt == G_IM_FMT_RGBA)
? "RGBA"
: (fmt == G_IM_FMT_YUV) ? "YUV"
: (fmt == G_IM_FMT_CI) ? "CI" : (fmt == G_IM_FMT_IA) ? "IA" : "I",
(siz == G_IM_SIZ_4b) ? "4b"
: (siz == G_IM_SIZ_8b) ? "8b" : (siz == G_IM_SIZ_16b) ? "16b" : "32b",
(fmt == G_IM_FMT_RGBA) ? "RGBA"
: (fmt == G_IM_FMT_YUV) ? "YUV"
: (fmt == G_IM_FMT_CI) ? "CI"
: (fmt == G_IM_FMT_IA) ? "IA"
: "I",
(siz == G_IM_SIZ_4b) ? "4b"
: (siz == G_IM_SIZ_8b) ? "8b"
: (siz == G_IM_SIZ_16b) ? "16b"
: "32b",
(curGfx->dma.len & 0xFFF) + 1, curGfx->setimg.dram, addr);
if (this->pipeSyncRequired) {
@ -768,12 +770,15 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) {
u32 siz = ((curGfx->words.w0 & 0x180000) >> 0x13) & 0xFF;
DISAS_LOG("gsDPSetTextureImage(G_IM_FMT_%s, G_IM_SIZ_%s, %d, 0x%08x(0x%08x)),",
(fmt == G_IM_FMT_RGBA)
? "RGBA"
: (fmt == G_IM_FMT_YUV) ? "YUV"
: (fmt == G_IM_FMT_CI) ? "CI" : (fmt == G_IM_FMT_IA) ? "IA" : "I",
(siz == G_IM_SIZ_4b) ? "4b"
: (siz == G_IM_SIZ_8b) ? "8b" : (siz == G_IM_SIZ_16b) ? "16b" : "32b",
(fmt == G_IM_FMT_RGBA) ? "RGBA"
: (fmt == G_IM_FMT_YUV) ? "YUV"
: (fmt == G_IM_FMT_CI) ? "CI"
: (fmt == G_IM_FMT_IA) ? "IA"
: "I",
(siz == G_IM_SIZ_4b) ? "4b"
: (siz == G_IM_SIZ_8b) ? "8b"
: (siz == G_IM_SIZ_16b) ? "16b"
: "32b",
(curGfx->dma.len & 0xFFF) + 1, curGfx->setimg.dram, addr);
} break;
@ -989,15 +994,11 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) {
case G_MODIFYVTX: {
DISAS_LOG("gsSPModifyVertex(%d, %s, %08x),", curGfx->dma.par,
(curGfx->dma.len == G_MWO_POINT_RGBA)
? "G_MWO_POINT_RGBA"
: (curGfx->dma.len == G_MWO_POINT_ST)
? "G_MWO_POINT_ST"
: (curGfx->dma.len == G_MWO_POINT_XYSCREEN)
? "G_MWO_POINT_XYSCREEN"
: (curGfx->dma.len == G_MWO_POINT_ZSCREEN)
? "G_MWO_POINT_ZSCREEN"
: "G_MWO_POINT_????",
(curGfx->dma.len == G_MWO_POINT_RGBA) ? "G_MWO_POINT_RGBA"
: (curGfx->dma.len == G_MWO_POINT_ST) ? "G_MWO_POINT_ST"
: (curGfx->dma.len == G_MWO_POINT_XYSCREEN) ? "G_MWO_POINT_XYSCREEN"
: (curGfx->dma.len == G_MWO_POINT_ZSCREEN) ? "G_MWO_POINT_ZSCREEN"
: "G_MWO_POINT_????",
curGfx->dma.addr);
this->vtxCnt += curGfx->dma.par;
this->spvtxCnt++;