mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Prevent generating extra geos for player models, allow referencing mario textures
This commit is contained in:
parent
250e97aed2
commit
93beb2001e
4 changed files with 70 additions and 22 deletions
|
@ -37,99 +37,99 @@ static const Lights1 mario_brown2_lights_group = gdSPDefLights1(
|
|||
);
|
||||
|
||||
// 0x04000090
|
||||
ALIGNED8 static const u8 mario_texture_metal[] = {
|
||||
ALIGNED8 const u8 mario_texture_metal[] = {
|
||||
#include "actors/mario/mario_metal.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04001090
|
||||
ALIGNED8 static const u8 mario_texture_yellow_button[] = {
|
||||
ALIGNED8 const u8 mario_texture_yellow_button[] = {
|
||||
#include "actors/mario/mario_overalls_button.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04001890
|
||||
ALIGNED8 static const u8 mario_texture_m_logo[] = {
|
||||
ALIGNED8 const u8 mario_texture_m_logo[] = {
|
||||
#include "actors/mario/custom_mario_logo.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04002090
|
||||
ALIGNED8 static const u8 mario_texture_hair_sideburn[] = {
|
||||
ALIGNED8 const u8 mario_texture_hair_sideburn[] = {
|
||||
#include "actors/mario/mario_sideburn.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04002890
|
||||
ALIGNED8 static const u8 mario_texture_mustache[] = {
|
||||
ALIGNED8 const u8 mario_texture_mustache[] = {
|
||||
#include "actors/mario/mario_mustache.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04003090
|
||||
ALIGNED8 static const u8 mario_texture_eyes_front[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_front[] = {
|
||||
#include "actors/mario/mario_eyes_center.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04003890
|
||||
ALIGNED8 static const u8 mario_texture_eyes_half_closed[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_half_closed[] = {
|
||||
#include "actors/mario/mario_eyes_half_closed.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04004090
|
||||
ALIGNED8 static const u8 mario_texture_eyes_closed[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_closed[] = {
|
||||
#include "actors/mario/mario_eyes_closed.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// Unreferenced
|
||||
// 0x04004890
|
||||
ALIGNED8 static const u8 mario_texture_eyes_closed_unused1[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_closed_unused1[] = {
|
||||
#include "actors/mario/mario_eyes_closed_unused_0.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// Unreferenced
|
||||
// 0x04005090
|
||||
ALIGNED8 static const u8 mario_texture_eyes_closed_unused2[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_closed_unused2[] = {
|
||||
#include "actors/mario/mario_eyes_closed_unused_1.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04005890
|
||||
ALIGNED8 static const u8 mario_texture_eyes_right[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_right[] = {
|
||||
#include "actors/mario/mario_eyes_left_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04006090
|
||||
ALIGNED8 static const u8 mario_texture_eyes_left[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_left[] = {
|
||||
#include "actors/mario/mario_eyes_right_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04006890
|
||||
ALIGNED8 static const u8 mario_texture_eyes_up[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_up[] = {
|
||||
#include "actors/mario/mario_eyes_up_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04007090
|
||||
ALIGNED8 static const u8 mario_texture_eyes_down[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_down[] = {
|
||||
#include "actors/mario/mario_eyes_down_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04007890
|
||||
ALIGNED8 static const u8 mario_texture_eyes_dead[] = {
|
||||
ALIGNED8 const u8 mario_texture_eyes_dead[] = {
|
||||
#include "actors/mario/mario_eyes_dead.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04008090
|
||||
ALIGNED8 static const u8 mario_texture_wings_half_1[] = {
|
||||
ALIGNED8 const u8 mario_texture_wings_half_1[] = {
|
||||
#include "actors/mario/mario_wing.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x04009090
|
||||
ALIGNED8 static const u8 mario_texture_wings_half_2[] = {
|
||||
ALIGNED8 const u8 mario_texture_wings_half_2[] = {
|
||||
#include "actors/mario/mario_wing_tip.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x0400A090
|
||||
ALIGNED8 static const u8 mario_texture_metal_wings_half_1[] = {
|
||||
ALIGNED8 const u8 mario_texture_metal_wings_half_1[] = {
|
||||
#include "actors/mario/mario_metal_wing_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x0400B090
|
||||
ALIGNED8 static const u8 mario_texture_metal_wings_half_2[] = {
|
||||
ALIGNED8 const u8 mario_texture_metal_wings_half_2[] = {
|
||||
#include "actors/mario/mario_metal_wing_tip_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
|
|
@ -146,6 +146,18 @@ static String GetActorFolder(const Array<Pair<u64, String>> &aActorsFolders, u64
|
|||
}
|
||||
|
||||
static void DynOS_Actor_Generate(const SysPath &aPackFolder, Array<Pair<u64, String>> _ActorsFolders, GfxData *_GfxData) {
|
||||
// do not regen this folder if we find any existing bins
|
||||
for (s32 geoIndex = _GfxData->mGeoLayouts.Count() - 1; geoIndex >= 0; geoIndex--) {
|
||||
auto &_GeoNode = _GfxData->mGeoLayouts[geoIndex];
|
||||
String _GeoRootName = _GeoNode->mName;
|
||||
|
||||
// If there is an existing binary file for this layout, skip and go to the next actor
|
||||
SysPath _BinFilename = fstring("%s/%s.bin", aPackFolder.c_str(), _GeoRootName.begin());
|
||||
if (fs_sys_file_exists(_BinFilename.c_str())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// generate in reverse order to detect children
|
||||
for (s32 geoIndex = _GfxData->mGeoLayouts.Count() - 1; geoIndex >= 0; geoIndex--) {
|
||||
auto &_GeoNode = _GfxData->mGeoLayouts[geoIndex];
|
||||
|
@ -159,9 +171,6 @@ static void DynOS_Actor_Generate(const SysPath &aPackFolder, Array<Pair<u64, Str
|
|||
|
||||
// If there is an existing binary file for this layout, skip and go to the next actor
|
||||
SysPath _BinFilename = fstring("%s/%s.bin", aPackFolder.c_str(), _GeoRootName.begin());
|
||||
if (fs_sys_file_exists(_BinFilename.c_str())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Init
|
||||
_GfxData->mLoadIndex = 0;
|
||||
|
|
|
@ -1744,6 +1744,26 @@ static const void* sDynosBuiltinTexs[] = {
|
|||
define_builtin(bobomb_seg8_texture_08020A60),
|
||||
define_builtin(bobomb_seg8_texture_08021A60),
|
||||
define_builtin(bobomb_seg8_texture_08022260),
|
||||
// mario
|
||||
define_builtin(mario_texture_metal),
|
||||
define_builtin(mario_texture_yellow_button),
|
||||
define_builtin(mario_texture_m_logo),
|
||||
define_builtin(mario_texture_hair_sideburn),
|
||||
define_builtin(mario_texture_mustache),
|
||||
define_builtin(mario_texture_eyes_front),
|
||||
define_builtin(mario_texture_eyes_half_closed),
|
||||
define_builtin(mario_texture_eyes_closed),
|
||||
define_builtin(mario_texture_eyes_closed_unused1),
|
||||
define_builtin(mario_texture_eyes_closed_unused2),
|
||||
define_builtin(mario_texture_eyes_right),
|
||||
define_builtin(mario_texture_eyes_left),
|
||||
define_builtin(mario_texture_eyes_up),
|
||||
define_builtin(mario_texture_eyes_down),
|
||||
define_builtin(mario_texture_eyes_dead),
|
||||
define_builtin(mario_texture_wings_half_1),
|
||||
define_builtin(mario_texture_wings_half_2),
|
||||
define_builtin(mario_texture_metal_wings_half_1),
|
||||
define_builtin(mario_texture_metal_wings_half_2),
|
||||
};
|
||||
|
||||
const Texture* DynOS_Builtin_Tex_GetFromName(const char* aDataName) {
|
||||
|
|
|
@ -439,3 +439,22 @@ extern ALIGNED8 const Texture bobomb_seg8_texture_0801FA60[];
|
|||
extern ALIGNED8 const Texture bobomb_seg8_texture_08020A60[];
|
||||
extern ALIGNED8 const Texture bobomb_seg8_texture_08021A60[];
|
||||
extern ALIGNED8 const Texture bobomb_seg8_texture_08022260[];
|
||||
extern ALIGNED8 const u8 mario_texture_metal[];
|
||||
extern ALIGNED8 const u8 mario_texture_yellow_button[];
|
||||
extern ALIGNED8 const u8 mario_texture_m_logo[];
|
||||
extern ALIGNED8 const u8 mario_texture_hair_sideburn[];
|
||||
extern ALIGNED8 const u8 mario_texture_mustache[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_front[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_half_closed[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_closed[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_closed_unused1[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_closed_unused2[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_right[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_left[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_up[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_down[];
|
||||
extern ALIGNED8 const u8 mario_texture_eyes_dead[];
|
||||
extern ALIGNED8 const u8 mario_texture_wings_half_1[];
|
||||
extern ALIGNED8 const u8 mario_texture_wings_half_2[];
|
||||
extern ALIGNED8 const u8 mario_texture_metal_wings_half_1[];
|
||||
extern ALIGNED8 const u8 mario_texture_metal_wings_half_2[];
|
||||
|
|
Loading…
Reference in a new issue