mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-17 20:43:07 -04:00
Switch to Aurora headers for GX/VI
Replace GXSetArray() with GXSETARRAY() taking in size everywhere Fix a ton of structs/enums being referred to with underscore name.
This commit is contained in:
@@ -373,8 +373,8 @@ static void e_nz_damage(e_nz_class* i_this) {
|
||||
}
|
||||
}
|
||||
|
||||
static BOOL getPolyColor(cBgS_PolyInfo& param_1, int param_2, _GXColor* param_3,
|
||||
_GXColor* param_4, u8* param_5, f32* param_6) {
|
||||
static BOOL getPolyColor(cBgS_PolyInfo& param_1, int param_2, GXColor* param_3,
|
||||
GXColor* param_4, u8* param_5, f32* param_6) {
|
||||
if (!dComIfG_Bgsp().ChkPolySafe(param_1)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -252,8 +252,8 @@ static void e_rdb_fight(e_rdb_class* i_this) {
|
||||
i_this->field_0x6c8 = 1;
|
||||
}
|
||||
|
||||
static int getPolyColor(cBgS_PolyInfo& i_polyInfo, int param_2, _GXColor* p_effPrim,
|
||||
_GXColor* p_effEnv, u8* p_alpha, f32* p_ratio) {
|
||||
static int getPolyColor(cBgS_PolyInfo& i_polyInfo, int param_2, GXColor* p_effPrim,
|
||||
GXColor* p_effEnv, u8* p_alpha, f32* p_ratio) {
|
||||
if (dComIfG_Bgsp().ChkPolySafe(i_polyInfo) == 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -301,7 +301,7 @@ static void e_rdb_attack(e_rdb_class* i_this) {
|
||||
if (frame == 68) {
|
||||
u8 i_alpha;
|
||||
f32 i_ratio;
|
||||
_GXColor i_effPrim, i_effEnv;
|
||||
GXColor i_effPrim, i_effEnv;
|
||||
if (getPolyColor(i_this->mAcch.m_gnd, 0, &i_effPrim, &i_effEnv, &i_alpha, &i_ratio) !=
|
||||
0)
|
||||
{
|
||||
@@ -395,7 +395,7 @@ static void e_rdb_spin_attack(e_rdb_class* i_this) {
|
||||
cLib_addCalc0(&i_this->enemy.speedF, 1.0f, 3.0f);
|
||||
u8 i_alpha;
|
||||
f32 i_ratio;
|
||||
_GXColor i_effPrim, i_effEnv;
|
||||
GXColor i_effPrim, i_effEnv;
|
||||
if (iVar1 != 0 &&
|
||||
getPolyColor(i_this->mAcch.m_gnd, 0, &i_effPrim, &i_effEnv, &i_alpha, &i_ratio) != 0)
|
||||
{
|
||||
|
||||
@@ -1048,7 +1048,7 @@ int daE_SB_c::Draw() {
|
||||
mpMorf->entryDL();
|
||||
cXyz my_vec;
|
||||
my_vec.set(current.pos.x, 100.0f + current.pos.y, current.pos.z);
|
||||
_GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
mShadowKey = dComIfGd_setShadow(mShadowKey, 1, model, &my_vec, 1000.0f, 300.0f,
|
||||
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd,
|
||||
&tevStr, 0, 1.0f, tex_obj);
|
||||
|
||||
@@ -93,7 +93,7 @@ static int daE_SG_Draw(e_sg_class* i_this) {
|
||||
cXyz shadow_pos(i_this->current.pos.x, i_this->current.pos.y + 100.0f,
|
||||
i_this->current.pos.z);
|
||||
|
||||
_GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
|
||||
i_this->mShadowKey =
|
||||
dComIfGd_setShadow(i_this->mShadowKey, 1, i_this->mpModel, &shadow_pos, 400.0f, 0.0f,
|
||||
|
||||
@@ -352,7 +352,7 @@ static int e_wb_lr_wall_check(e_wb_class* i_this) {
|
||||
}
|
||||
|
||||
static int daE_WB_Draw(e_wb_class* i_this) {
|
||||
static _GXColor l_color = {
|
||||
static GXColor l_color = {
|
||||
0x14,
|
||||
0x0F,
|
||||
0x00,
|
||||
|
||||
@@ -268,9 +268,9 @@ void daMant_packet_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
|
||||
GXSetArray(GX_VA_POS, this->getPos(), 12);
|
||||
GXSetArray(GX_VA_NRM, this->getNrm(), 12);
|
||||
GXSetArray(GX_VA_TEX0, &l_texCoord, 8);
|
||||
GXSETARRAY(GX_VA_POS, this->getPos(), sizeof(mPos[0]), 12);
|
||||
GXSETARRAY(GX_VA_NRM, this->getNrm(), sizeof(mNrm[0]), 12);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_texCoord, sizeof(l_texCoord), 8);
|
||||
|
||||
GXSetZCompLoc(0);
|
||||
GXSetZMode(GX_ENABLE, GX_LEQUAL, GX_ENABLE);
|
||||
|
||||
@@ -678,7 +678,7 @@ s32 daMg_Fish_Draw(mg_fish_class* i_this) {
|
||||
&i_this->actor.tevStr, 0, 1.0f, &dDlst_shadowControl_c::mSimpleTexObj);
|
||||
}
|
||||
if (i_this->mKind2 == 3) {
|
||||
_GXColor color;
|
||||
GXColor color;
|
||||
color.r = 0x32;
|
||||
color.g = 0x2d;
|
||||
color.b = 0x14;
|
||||
|
||||
@@ -614,7 +614,7 @@ BOOL daNpcF_c::execute() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int daNpcF_c::draw(BOOL i_isTest, BOOL param_1, f32 i_shadowDepth, _GXColorS10* i_fogColor,
|
||||
int daNpcF_c::draw(BOOL i_isTest, BOOL param_1, f32 i_shadowDepth, GXColorS10* i_fogColor,
|
||||
BOOL i_hideDamage) {
|
||||
f32 damage_ratio, frame;
|
||||
J3DModel* model = mAnm_p->getModel();
|
||||
|
||||
@@ -2809,7 +2809,7 @@ int daNpcChat_c::Draw() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daNpcChat_c::draw(int param_1, int param_2, f32 param_3, _GXColorS10* i_color, int param_5) {
|
||||
int daNpcChat_c::draw(int param_1, int param_2, f32 param_3, GXColorS10* i_color, int param_5) {
|
||||
J3DModel* model = mAnm_p->getModel();
|
||||
J3DModelData* a_mdlData_p = model->getModelData();
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ int daNpc_GWolf_c::Draw() {
|
||||
);
|
||||
}
|
||||
|
||||
int daNpc_GWolf_c::draw(int param_1, int param_2, f32 param_3, _GXColorS10* i_color, int param_5) {
|
||||
int daNpc_GWolf_c::draw(int param_1, int param_2, f32 param_3, GXColorS10* i_color, int param_5) {
|
||||
J3DModel* model = mAnm_p->getModel();
|
||||
J3DModelData* mdlData_p = model->getModelData();
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ int daNpc_zrZ_c::Draw() {
|
||||
}
|
||||
}
|
||||
|
||||
int daNpc_zrZ_c::draw(int i_isTest, int param_1, f32 i_shadowDepth, _GXColorS10* i_fogColor,
|
||||
int daNpc_zrZ_c::draw(int i_isTest, int param_1, f32 i_shadowDepth, GXColorS10* i_fogColor,
|
||||
int i_hideDamage) {
|
||||
f32 damage_ratio, frame;
|
||||
J3DModel* model = mAnm_p->getModel();
|
||||
|
||||
@@ -274,9 +274,9 @@ void FlagCloth_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetArray(GX_VA_POS, getPos(), sizeof(cXyz));
|
||||
GXSetArray(GX_VA_NRM, getNormal(), sizeof(cXyz));
|
||||
GXSetArray(GX_VA_TEX0, mpTexCoord, 8);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_TEX0, mpTexCoord, sizeof(mpTexCoord), 8);
|
||||
GXSetZCompLoc(GX_FALSE);
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
GXLoadTexObj(&mTexObj, GX_TEXMAP0);
|
||||
@@ -304,7 +304,7 @@ void FlagCloth_c::draw() {
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
GXSetCullMode(GX_CULL_BACK);
|
||||
GXCallDisplayList(l_pennant_flagDL, 0x80);
|
||||
GXSetArray(GX_VA_NRM, getNormalBack(), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz));
|
||||
GXSetCullMode(GX_CULL_FRONT);
|
||||
GXCallDisplayList(l_pennant_flagDL, 0x80);
|
||||
J3DShape::resetVcdVatCache();
|
||||
|
||||
@@ -233,9 +233,9 @@ inline void FlagCloth2_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetArray(GX_VA_POS, getPos(), sizeof(cXyz));
|
||||
GXSetArray(GX_VA_NRM, getNormal(), sizeof(cXyz));
|
||||
GXSetArray(GX_VA_TEX0, mTexCoord, 8);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_TEX0, mTexCoord, sizeof(mTexCoord), 8);
|
||||
GXSetZCompLoc(GX_FALSE);
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
GXLoadTexObj(&mTexObj, GX_TEXMAP0);
|
||||
@@ -276,7 +276,7 @@ inline void FlagCloth2_c::draw() {
|
||||
GXEnd();
|
||||
}
|
||||
|
||||
GXSetArray(GX_VA_NRM, getNormalBack(), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz));
|
||||
GXSetCullMode(GX_CULL_FRONT);
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
||||
@@ -530,7 +530,7 @@ int daObj_KBacket_c::Draw() {
|
||||
} else {
|
||||
cM3dGPla plane;
|
||||
if (dComIfG_Bgsp().GetTriPla(mGndChk, &plane) != 0) {
|
||||
_GXTexObj* p_Var4 = dDlst_shadowControl_c::getSimpleTex();
|
||||
GXTexObj* p_Var4 = dDlst_shadowControl_c::getSimpleTex();
|
||||
dComIfGd_setSimpleShadow(¤t.pos, field_0xa00, 50.0f,
|
||||
&plane.mNormal, 0, 1.0f, p_Var4);
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ static int createSolidHeap(fopAc_ac_c* i_this) {
|
||||
}
|
||||
|
||||
int daObjLndRope_c::draw() {
|
||||
static _GXColor l_color = {20, 15, 0, 255};
|
||||
static GXColor l_color = {20, 15, 0, 255};
|
||||
g_env_light.settingTevStruct(16, ¤t.pos, &tevStr);
|
||||
mRopeMat.update(15, l_color, &tevStr);
|
||||
dComIfGd_set3DlineMat(&mRopeMat);
|
||||
|
||||
@@ -18,7 +18,7 @@ static int daObj_Lp_Draw(obj_lp_class* i_this) {
|
||||
fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor;
|
||||
wd_ss* mWdSs = i_this->mWdSs;
|
||||
int roomNo = fopAcM_GetRoomNo(a_this);
|
||||
static _GXColor l_color = {
|
||||
static GXColor l_color = {
|
||||
0x14,
|
||||
0x0A,
|
||||
0x0A,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
|
||||
static int daObj_Sw_Draw(obj_sw_class* i_this) {
|
||||
static _GXColor l_color = {
|
||||
static GXColor l_color = {
|
||||
0x14,
|
||||
0x0F,
|
||||
0x00,
|
||||
|
||||
@@ -527,10 +527,10 @@ void dFlower_packet_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSetArray(GX_VA_POS, &l_flowerPos, 0xC);
|
||||
GXSetArray(GX_VA_NRM, &l_flowerNormal, 0xC);
|
||||
GXSetArray(GX_VA_CLR0, &l_flowerColor, 4);
|
||||
GXSetArray(GX_VA_TEX0, &l_flowerTexCoord, 8);
|
||||
GXSETARRAY(GX_VA_POS, &l_flowerPos, sizeof(l_flowerPos), 0xC);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal, sizeof(l_flowerNormal), 0xC);
|
||||
GXSETARRAY(GX_VA_CLR0, &l_flowerColor, sizeof(l_flowerColor), 4);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_flowerTexCoord, sizeof(l_flowerTexCoord), 8);
|
||||
|
||||
GXColor sp64;
|
||||
dFlower_room_c* sp5C = m_room;
|
||||
@@ -622,10 +622,10 @@ void dFlower_packet_c::draw() {
|
||||
sp5C++;
|
||||
}
|
||||
|
||||
GXSetArray(GX_VA_POS, mp_pos, 0xC);
|
||||
GXSetArray(GX_VA_NRM, &l_flowerNormal2, 0xC);
|
||||
GXSetArray(GX_VA_CLR0, mp_colors, 4);
|
||||
GXSetArray(GX_VA_TEX0, mp_texCoords, 8);
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_flowerPos2), 0xC);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal2, sizeof(l_flowerNormal2), 0xC);
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_flowerColor2), 4);
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_flowerTexCoord2), 8);
|
||||
|
||||
sp5C = m_room;
|
||||
|
||||
|
||||
@@ -511,10 +511,10 @@ void dGrass_packet_c::draw() {
|
||||
|
||||
GXSetVtxDescv(l_vtxDescList);
|
||||
GXSetVtxAttrFmtv(GX_VTXFMT0, l_vtxAttrFmtList);
|
||||
GXSetArray(GX_VA_POS, mp_pos, sizeof(Vec));
|
||||
GXSetArray(GX_VA_NRM, mp_normal, sizeof(Vec));
|
||||
GXSetArray(GX_VA_CLR0, mp_colors, sizeof(GXColor));
|
||||
GXSetArray(GX_VA_TEX0, mp_texCoords, 8);
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_pos), sizeof(Vec));
|
||||
GXSETARRAY(GX_VA_NRM, mp_normal, sizeof(l_normal), sizeof(Vec));
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_color), sizeof(GXColor));
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_texCoord), 8);
|
||||
|
||||
GXColorS10 spA0 = {0, 0, 0, 0};
|
||||
GXColorS10 sp98 = {0, 0, 0, 0};
|
||||
|
||||
Reference in New Issue
Block a user