Add some missing gfx symbols to DynOS
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run

This commit is contained in:
Agent X 2025-04-08 17:30:00 -04:00
parent 0e1ab94894
commit e1c0d87ea8
2 changed files with 46 additions and 5 deletions

View file

@ -23,6 +23,14 @@ s64 DynOS_Gfx_ParseGfxConstants(const String& _Arg, bool* found) {
gfx_constant(NULL);
gfx_constant(G_ON);
gfx_constant(G_OFF);
gfx_constant(LIGHT_1);
gfx_constant(LIGHT_2);
gfx_constant(LIGHT_3);
gfx_constant(LIGHT_4);
gfx_constant(LIGHT_5);
gfx_constant(LIGHT_6);
gfx_constant(LIGHT_7);
gfx_constant(LIGHT_8);
// Combine modes
gfx_constant(G_CCMUX_COMBINED);
@ -1028,6 +1036,41 @@ static void ParseGfxSymbol(GfxData* aGfxData, DataNode<Gfx>* aNode, Gfx*& aHead,
gDPSetTileSize(aHead++, G_TX_RENDERTILE, 0, 0, (((u64)_Arg2) - 1) << G_TEXTURE_IMAGE_FRAC, (((u64)_Arg3) - 1) << G_TEXTURE_IMAGE_FRAC);
return;
}
if (_Symbol == "gsSPLightColor") {
s64 _Arg0 = ParseGfxSymbolArg(aGfxData, aNode, &aTokenIndex, "");
s64 _Arg1 = ParseGfxSymbolArg(aGfxData, aNode, &aTokenIndex, "");
// due to the function taking in the variable name instead of the actual value
// as a parameter, we need to do this. LIGHT_1 to LIGHT_8 go from actual 1-8
// where as G_MWO_a*/G_MWO_b* are hex numbers without a linear pattern of
// progression, meaning there isn't a simple one line solution for this afaik
switch(_Arg0) {
case LIGHT_1:
gSPLightColor(aHead++, LIGHT_1, _Arg1);
break;
case LIGHT_2:
gSPLightColor(aHead++, LIGHT_2, _Arg1);
break;
case LIGHT_3:
gSPLightColor(aHead++, LIGHT_3, _Arg1);
break;
case LIGHT_4:
gSPLightColor(aHead++, LIGHT_4, _Arg1);
break;
case LIGHT_5:
gSPLightColor(aHead++, LIGHT_5, _Arg1);
break;
case LIGHT_6:
gSPLightColor(aHead++, LIGHT_6, _Arg1);
break;
case LIGHT_7:
gSPLightColor(aHead++, LIGHT_7, _Arg1);
break;
case LIGHT_8:
gSPLightColor(aHead++, LIGHT_8, _Arg1);
break;
}
return;
}
// Unknown
PrintDataError(" ERROR: Unknown gfx symbol: %s", _Symbol.begin());

View file

@ -25,22 +25,20 @@ define_gfx_symbol(gsDPSetFogColor, 4); \
define_gfx_symbol(gsSPFogPosition, 2, false); \
define_gfx_symbol(gsDPSetAlphaCompare, 1, false); \
define_gfx_symbol(gsDPSetTextureFilter, 1, false); \
define_gfx_symbol(gsDPSetTexturePersp, 1, false); \
define_gfx_symbol(gsDPSetTextureLOD, 1, false); \
define_gfx_symbol(gsDPSetTextureConvert, 1, false); \
define_gfx_symbol(gsSPCullDisplayList, 2, false); \
define_gfx_symbol(gsDPSetAlphaDither, 1, false); \
define_gfx_symbol(gsDPSetCombineKey, 1, false); \
define_gfx_symbol(gsDPSetTextureConvert, 1, false); \
define_gfx_symbol(gsDPSetCombineKey, 1, false); \
define_gfx_symbol(gsDPSetTextureConvert, 1, false); \
define_gfx_symbol(gsDPPipelineMode, 1, false); \
define_gfx_symbol(gsSPSetOtherMode, 4); \
define_gfx_symbol(gsDPSetTextureDetail, 1, false); \
define_gfx_symbol(gsDPSetColorDither, 1, false); \
define_gfx_symbol(gsDPSetPrimDepth, 2, false); \
define_gfx_symbol(gsDPSetBlendColor, 4); \
\
define_gfx_symbol(gsSPCopyLightEXT, 2, false); \
define_gfx_symbol(gsSPCopyLightsPlayerPart, 1, false); \
define_gfx_symbol(gsSPFogFactor, 2, false); \
define_gfx_symbol(gsDPSetTextureLOD, 1, false); \
define_gfx_symbol(gsMoveWd, 3, false); \
define_gfx_symbol(gsSPVertexNonGlobal, 3, true);