Renaming cleanup

This commit is contained in:
MysterD 2022-04-08 01:52:12 -07:00
parent 5baf650dd2
commit 5d479165fb
8 changed files with 1211 additions and 1227 deletions

View file

@ -743,17 +743,17 @@ Collision* DynOS_Col_Get(const char* collisionName);
// Managers
//
const void* DynOS_Mgr_VanillaScriptPtr_GetFromName(const char* aDataName);
const char* DynOS_Mgr_VanillaScriptPtr_GetFromData(const void* aData);
const GeoLayout* DynOS_Mgr_VanillaLvlGeo_GetFromName(const char* aDataName);
const char* DynOS_Mgr_VanillaLvlGeo_GetFromData(const GeoLayout* aData);
const Collision* DynOS_Mgr_VanillaLvlCol_GetFromName(const char* aDataName);
const char* DynOS_Mgr_VanillaLvlCol_GetFromData(const Collision* aData);
const Texture* DynOS_Mgr_VanillaTex_GetFromName(const char* aDataName);
const char* DynOS_Mgr_VanillaTex_GetFromData(const Texture* aData);
const void* DynOS_Mgr_VanillaFunc_GetFromName(const char* aDataName);
const void* DynOS_Mgr_VanillaFunc_GetFromIndex(s32 aIndex);
s32 DynOS_Mgr_VanillaFunc_GetIndexFromData(const void* aData);
const void* DynOS_Builtin_ScriptPtr_GetFromName(const char* aDataName);
const char* DynOS_Builtin_ScriptPtr_GetFromData(const void* aData);
const GeoLayout* DynOS_Builtin_LvlGeo_GetFromName(const char* aDataName);
const char* DynOS_Builtin_LvlGeo_GetFromData(const GeoLayout* aData);
const Collision* DynOS_Builtin_LvlCol_GetFromName(const char* aDataName);
const char* DynOS_Builtin_LvlCol_GetFromData(const Collision* aData);
const Texture* DynOS_Builtin_Tex_GetFromName(const char* aDataName);
const char* DynOS_Builtin_Tex_GetFromData(const Texture* aData);
const void* DynOS_Builtin_Func_GetFromName(const char* aDataName);
const void* DynOS_Builtin_Func_GetFromIndex(s32 aIndex);
s32 DynOS_Builtin_Func_GetIndexFromData(const void* aData);
//
// Bin

View file

@ -28,7 +28,7 @@ static s64 ParseGeoSymbolArg(GfxData* aGfxData, DataNode<GeoLayout>* aNode, u64&
}
// Built-in functions
const void *_FunctionPtr = DynOS_Mgr_VanillaFunc_GetFromName(_Arg.begin());
const void *_FunctionPtr = DynOS_Builtin_Func_GetFromName(_Arg.begin());
if (_FunctionPtr != NULL) {
return (s64) _FunctionPtr;
}

View file

@ -453,10 +453,10 @@ static s64 ParseGfxSymbolArg(GfxData* aGfxData, DataNode<Gfx>* aNode, u64* pToke
}
}
// Vanilla textures
auto vanillaTex = DynOS_Mgr_VanillaTex_GetFromName(_Arg.begin());
if (vanillaTex != NULL) {
return (s64)vanillaTex;
// Built-in textures
auto builtinTex = DynOS_Builtin_Tex_GetFromName(_Arg.begin());
if (builtinTex != NULL) {
return (s64)builtinTex;
}
// Recursive descent parsing
@ -688,7 +688,7 @@ static Array<s64> ParseGfxSetCombineMode(GfxData* aGfxData, DataNode<Gfx>* aNode
static void UpdateTextureInfo(GfxData* aGfxData, s64 *aTexPtr, s32 aFormat, s32 aSize, s32 aWidth, s32 aHeight) {
// Update current texture pointers
if (aTexPtr && (*aTexPtr)) {
if (DynOS_Mgr_VanillaTex_GetFromData(*(const Texture**)aTexPtr)) {
if (DynOS_Builtin_Tex_GetFromData(*(const Texture**)aTexPtr)) {
return;
}

View file

@ -1386,7 +1386,7 @@ static LevelScript ParseLevelScriptSymbolArgInternal(GfxData* aGfxData, DataNode
}
// Built-in functions
const void *_FunctionPtr = DynOS_Mgr_VanillaFunc_GetFromName(_Arg.begin());
const void *_FunctionPtr = DynOS_Builtin_Func_GetFromName(_Arg.begin());
if (_FunctionPtr != NULL) {
return (s64) _FunctionPtr;
}
@ -1458,7 +1458,7 @@ static LevelScript ParseLevelScriptSymbolArgInternal(GfxData* aGfxData, DataNode
}
}
// vanilla actors
// Built-in actors
s32 actorCount = DynOS_Geo_GetActorCount();
for (s32 i = 0; i < actorCount; i++) {
if (DynOS_Geo_IsCustomActor(i)) { break; }
@ -1467,16 +1467,16 @@ static LevelScript ParseLevelScriptSymbolArgInternal(GfxData* aGfxData, DataNode
}
}
// Vanilla Lvl Geos
auto vanillaGeo = DynOS_Mgr_VanillaLvlGeo_GetFromName(_Arg.begin());
if (vanillaGeo != NULL) {
return (LevelScript)vanillaGeo;
// Built-in Lvl Geos
auto builtinGeo = DynOS_Builtin_LvlGeo_GetFromName(_Arg.begin());
if (builtinGeo != NULL) {
return (LevelScript)builtinGeo;
}
// Vanilla Lvl Cols
auto vanillaCol = DynOS_Mgr_VanillaLvlCol_GetFromName(_Arg.begin());
if (vanillaCol != NULL) {
return (LevelScript)vanillaCol;
// Built-in Lvl Cols
auto builtinCol = DynOS_Builtin_LvlCol_GetFromName(_Arg.begin());
if (builtinCol != NULL) {
return (LevelScript)builtinCol;
}
// Recursive descent parsing

View file

@ -119,7 +119,7 @@ static PointerData GetDataFromPointer(const void* aPtr, GfxData* aGfxData) {
return { get_behavior_name_from_id(id), 0 };
}
// Vanilla Actors
// Built-in Actors
s32 actorCount = DynOS_Geo_GetActorCount();
for (s32 i = 0; i < actorCount; i++) {
if (DynOS_Geo_IsCustomActor(i)) { break; }
@ -128,28 +128,28 @@ static PointerData GetDataFromPointer(const void* aPtr, GfxData* aGfxData) {
}
}
// Vanilla Lvl Geos
auto vanillaGeo = DynOS_Mgr_VanillaLvlGeo_GetFromData((const GeoLayout*)aPtr);
if (vanillaGeo != NULL) {
return { vanillaGeo, 0 };
// Built-in Lvl Geos
auto builtinGeo = DynOS_Builtin_LvlGeo_GetFromData((const GeoLayout*)aPtr);
if (builtinGeo != NULL) {
return { builtinGeo, 0 };
}
// Vanilla Lvl Cols
auto vanillaCol = DynOS_Mgr_VanillaLvlCol_GetFromData((const Collision*)aPtr);
if (vanillaCol != NULL) {
return { vanillaCol, 0 };
// Built-in Lvl Cols
auto builtinCol = DynOS_Builtin_LvlCol_GetFromData((const Collision*)aPtr);
if (builtinCol != NULL) {
return { builtinCol, 0 };
}
// Vanilla Script Pointers
auto vanillaScriptPtr = DynOS_Mgr_VanillaScriptPtr_GetFromData(aPtr);
if (vanillaScriptPtr != NULL) {
return { vanillaScriptPtr, 0 };
// Built-in Script Pointers
auto builtinScriptPtr = DynOS_Builtin_ScriptPtr_GetFromData(aPtr);
if (builtinScriptPtr != NULL) {
return { builtinScriptPtr, 0 };
}
// Vanilla Textures
auto vanillaTex = DynOS_Mgr_VanillaTex_GetFromData((const Texture*)aPtr);
if (vanillaTex != NULL) {
return { vanillaTex, 0 };
// Built-in Textures
auto builtinTex = DynOS_Builtin_Tex_GetFromData((const Texture*)aPtr);
if (builtinTex != NULL) {
return { builtinTex, 0 };
}
// the ones below use a saved offset
@ -209,7 +209,7 @@ void DynOS_Pointer_Write(FILE* aFile, const void* aPtr, GfxData* aGfxData) {
}
// Built-in functions
s32 _GeoFunctionIndex = DynOS_Mgr_VanillaFunc_GetIndexFromData(aPtr);
s32 _GeoFunctionIndex = DynOS_Builtin_Func_GetIndexFromData(aPtr);
if (_GeoFunctionIndex != -1) {
WriteBytes<u32>(aFile, FUNCTION_CODE);
WriteBytes<s32>(aFile, _GeoFunctionIndex);
@ -361,7 +361,7 @@ static void *GetPointerFromData(GfxData *aGfxData, const String &aPtrName, u32 a
return (void*)get_behavior_from_id(id);
}
// Vanilla Actors
// Built-in Actors
s32 actorCount = DynOS_Geo_GetActorCount();
for (s32 i = 0; i < actorCount; i++) {
if (DynOS_Geo_IsCustomActor(i)) { break; }
@ -370,28 +370,28 @@ static void *GetPointerFromData(GfxData *aGfxData, const String &aPtrName, u32 a
}
}
// Vanilla Lvl Geos
auto vanillaGeo = DynOS_Mgr_VanillaLvlGeo_GetFromName(aPtrName.begin());
if (vanillaGeo != NULL) {
return (void*)vanillaGeo;
// Built-in Lvl Geos
auto builtinGeo = DynOS_Builtin_LvlGeo_GetFromName(aPtrName.begin());
if (builtinGeo != NULL) {
return (void*)builtinGeo;
}
// Vanilla Lvl Cols
auto vanillaCol = DynOS_Mgr_VanillaLvlCol_GetFromName(aPtrName.begin());
if (vanillaCol != NULL) {
return (void*)vanillaCol;
// Built-in Lvl Cols
auto builtinCol = DynOS_Builtin_LvlCol_GetFromName(aPtrName.begin());
if (builtinCol != NULL) {
return (void*)builtinCol;
}
// Vanilla Script Pointers
auto vanillaScriptPtr = DynOS_Mgr_VanillaScriptPtr_GetFromName(aPtrName.begin());
if (vanillaScriptPtr != NULL) {
return (void*)vanillaScriptPtr;
// Built-in Script Pointers
auto builtinScriptPtr = DynOS_Builtin_ScriptPtr_GetFromName(aPtrName.begin());
if (builtinScriptPtr != NULL) {
return (void*)builtinScriptPtr;
}
// Vanilla Textures
auto vanillaTex = DynOS_Mgr_VanillaTex_GetFromName(aPtrName.begin());
if (vanillaTex != NULL) {
return (void*)vanillaTex;
// Built-in Textures
auto builtinTex = DynOS_Builtin_Tex_GetFromName(aPtrName.begin());
if (builtinTex != NULL) {
return (void*)builtinTex;
}
// Error
@ -417,7 +417,7 @@ void *DynOS_Pointer_Load(FILE *aFile, GfxData *aGfxData, u32 aValue) {
// FUNC
if (aValue == FUNCTION_CODE) {
s32 _FunctionIndex = ReadBytes<s32>(aFile);
return (void*) DynOS_Mgr_VanillaFunc_GetFromIndex(_FunctionIndex);
return (void*) DynOS_Builtin_Func_GetFromIndex(_FunctionIndex);
}
// PNTR

1148
data/dynos_mgr_builtin.cpp Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -137,22 +137,6 @@ s32 DynOS_String_Width(const u8 *aStr64) {
return _Width;
}
//
// Geo
//
static void *geo_rotate_3d_coin(s32 callContext, void *node, UNUSED void *c) {
if (callContext == GEO_CONTEXT_RENDER) {
struct Object *obj = (struct Object *) gCurGraphNodeObject;
struct GraphNodeRotation *rotNode = (struct GraphNodeRotation *) ((struct GraphNode *) node)->next;
rotNode->rotation[0] = 0;
rotNode->rotation[1] = obj->oAnimState;
rotNode->rotation[2] = 0;
obj->oAnimState += 0x0800;
}
return NULL;
}
//
// Actors
//