mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-08 13:26:14 -04:00
Format gbi.h, move ucode defines to makefile (#1650)
* Format gbi.h, move ucode defines to makefile, correct usage of gDPSetDither * UCODE_DEFS -> GBI_DEFINES, add GBI_DOWHILE toggle * Define GBI_DOWHILE for bss calculations * Makefile thing
This commit is contained in:
+19
-2
@@ -1,6 +1,6 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "prevent_bss_reordering2.h" // bumps the bss index by 65
|
||||
// clang-format off
|
||||
// Partial structs taken from "prevent_bss_reordering.h"
|
||||
// Partial structs taken from "prevent_bss_reordering.h", bumps the bss index by 56
|
||||
struct Dummy200 { int x; };
|
||||
struct Dummy201 { int x; };
|
||||
struct Dummy202 { int x; };
|
||||
@@ -14,12 +14,29 @@ struct Dummy209 { int x; };
|
||||
struct Dummy210 { int x; };
|
||||
struct Dummy211 { int x; };
|
||||
struct Dummy212 { int x; };
|
||||
struct Dummy213 { int x; };
|
||||
struct Dummy214 { int x; };
|
||||
struct Dummy215 { int x; };
|
||||
struct Dummy216 { int x; };
|
||||
struct Dummy217 { int x; };
|
||||
struct Dummy218 { int x; };
|
||||
struct Dummy219 { int x; };
|
||||
struct Dummy220 { int x; };
|
||||
struct Dummy221 { int x; };
|
||||
struct Dummy222 { int x; };
|
||||
struct Dummy223 { int x; };
|
||||
struct Dummy224 { int x; };
|
||||
struct Dummy225 { int x; };
|
||||
struct Dummy226 { int x; };
|
||||
struct Dummy227 { int x; };
|
||||
// clang-format on
|
||||
|
||||
// Headers are currently valued at 63 mod 256 (./tools/calc_bss.sh <headers>)
|
||||
#include "z64math.h"
|
||||
|
||||
#include "libc/stdbool.h"
|
||||
#include "PR/gu.h"
|
||||
// The bss index at this point should be 184
|
||||
|
||||
Vec3f gZeroVec3f = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3s gZeroVec3s = { 0, 0, 0 };
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z64bgcheck.h"
|
||||
|
||||
#include "libc64/fixed_point.h"
|
||||
|
||||
+1
-1
@@ -428,7 +428,7 @@ void Lights_DrawGlow(PlayState* play) {
|
||||
|
||||
gfx = Gfx_SetupDL65_NoCD(POLY_XLU_DISP);
|
||||
|
||||
gDPSetDither(gfx++, G_CD_NOISE);
|
||||
gDPSetDither(gfx++, G_AD_PATTERN | G_CD_NOISE);
|
||||
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
|
||||
0);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "gfx.h"
|
||||
#include "sys_cmpdma.h"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z64message.h"
|
||||
#include "global.h"
|
||||
|
||||
|
||||
@@ -1083,7 +1083,7 @@ void DmChar00_Draw(Actor* thisx, PlayState* play2) {
|
||||
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, (u8)(s8)this->unk_250.r, (u8)(s8)this->unk_250.g, (u8)(s8)this->unk_250.b,
|
||||
(u8)(s8)((f32)phi_a0 * 1));
|
||||
gDPSetDither(POLY_XLU_DISP++, G_CD_BAYER);
|
||||
gDPSetDither(POLY_XLU_DISP++, G_AD_PATTERN | G_CD_BAYER);
|
||||
|
||||
POLY_XLU_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
DmChar00_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
|
||||
|
||||
@@ -156,7 +156,7 @@ void DmChar04_Draw(Actor* thisx, PlayState* play) {
|
||||
gSPEndDisplayList(gfx);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, (u8)(s8)this->envColors.r, (u8)(s8)this->envColors.g, (u8)(s8)this->envColors.b,
|
||||
(u8)(s8)((f32)alpha * 1));
|
||||
gDPSetDither(POLY_XLU_DISP++, G_CD_BAYER);
|
||||
gDPSetDither(POLY_XLU_DISP++, G_AD_PATTERN | G_CD_BAYER);
|
||||
POLY_XLU_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
DmChar04_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
|
||||
|
||||
|
||||
@@ -5267,7 +5267,7 @@ void EnInvadepoh_Alien_Draw(Actor* thisx, PlayState* play2) {
|
||||
gfx = POLY_XLU_DISP;
|
||||
gfx = Gfx_SetupDL20_NoCD(gfx);
|
||||
|
||||
gDPSetDither(gfx++, G_CD_NOISE);
|
||||
gDPSetDither(gfx++, G_AD_PATTERN | G_CD_NOISE);
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
|
||||
0);
|
||||
|
||||
|
||||
@@ -671,7 +671,7 @@ void EnInvadepohDemo_Alien_Draw(EnInvadepohDemo* this, PlayState* play) {
|
||||
gfx = POLY_XLU_DISP;
|
||||
gfx = Gfx_SetupDL20_NoCD(gfx);
|
||||
|
||||
gDPSetDither(gfx++, G_CD_NOISE);
|
||||
gDPSetDither(gfx++, G_AD_PATTERN | G_CD_NOISE);
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
|
||||
0);
|
||||
Matrix_Mult(&play->billboardMtxF, MTXMODE_NEW);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* Description: Keaton grass
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_kusa2.h"
|
||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
@@ -630,7 +630,7 @@ void EnOsk_Draw(Actor* thisx, PlayState* play) {
|
||||
gfx = POLY_XLU_DISP;
|
||||
gfx = Gfx_SetupDL20_NoCD(gfx);
|
||||
|
||||
gDPSetDither(gfx++, G_CD_NOISE);
|
||||
gDPSetDither(gfx++, G_AD_PATTERN | G_CD_NOISE);
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
|
||||
gSPDisplayList(gfx++, gameplay_keep_DL_029CB0);
|
||||
gDPSetPrimColor(gfx++, 0, 0, 130, 0, 255, 100);
|
||||
|
||||
@@ -1086,7 +1086,7 @@ void EnOt_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
gfx = Gfx_SetupDL65_NoCD(POLY_XLU_DISP);
|
||||
|
||||
gDPSetDither(&gfx[0], G_CD_NOISE);
|
||||
gDPSetDither(&gfx[0], G_AD_PATTERN | G_CD_NOISE);
|
||||
gDPSetCombineLERP(&gfx[1], 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
|
||||
0);
|
||||
gSPDisplayList(&gfx[2], gameplay_keep_DL_029CB0);
|
||||
|
||||
@@ -701,7 +701,7 @@ void func_80B32F04(Actor* thisx, PlayState* play) {
|
||||
gfx = POLY_XLU_DISP;
|
||||
gfx = Gfx_SetupDL20_NoCD(gfx);
|
||||
|
||||
gDPSetDither(gfx++, G_CD_NOISE);
|
||||
gDPSetDither(gfx++, G_AD_PATTERN | G_CD_NOISE);
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
|
||||
gSPDisplayList(gfx++, gameplay_keep_DL_029CB0);
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* Overlay: ovl_Obj_Flowerpot
|
||||
* Description: Breakable Pot With Grass
|
||||
*/
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_obj_flowerpot.h"
|
||||
#include "objects/object_flowerpot/object_flowerpot.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user