You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
make model count a define so it's easier to change in case you need memory
This commit is contained in:
@@ -9,7 +9,7 @@ index af9d0156..c68a7f6e 100644
|
||||
+#include "debug_box.h"
|
||||
|
||||
struct SpawnInfo gPlayerSpawnInfos[1];
|
||||
struct GraphNode *D_8033A160[0x100];
|
||||
struct GraphNode *gGraphNodePointers[0x100];
|
||||
@@ -363,6 +364,8 @@ void render_game(void) {
|
||||
if (gCurrentArea != NULL && !gWarpTransition.pauseRendering) {
|
||||
geo_process_root(gCurrentArea->unk04, D_8032CE74, D_8032CE78, gFBSetColor);
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
//#define SKIP_TITLE_SCREEN
|
||||
// Uncomment this if you want to keep the mario head and not skip it
|
||||
//#define KEEP_MARIO_HEAD
|
||||
// Number of possible unique model ID's (keep it higher than 256)
|
||||
#define MODEL_ID_COUNT 0x10000
|
||||
|
||||
/* Coordinate overflow fix setting:
|
||||
* Scales the world down by this factor, increasing how far you can render on
|
||||
|
||||
@@ -379,7 +379,7 @@ static void level_cmd_load_model_from_dl(void) {
|
||||
s16 layer = CMD_GET(u16, 0x8);
|
||||
void *dl_ptr = CMD_GET(void *, 4);
|
||||
|
||||
if (model < ARRAY_COUNT(gLoadedGraphNodes)) {
|
||||
if (model < ARRAY_COUNT(gGraphNodePointers)) {
|
||||
gLoadedGraphNodes[model] =
|
||||
(struct GraphNode *) init_graph_node_display_list(sLevelPool, 0, layer, dl_ptr);
|
||||
}
|
||||
@@ -391,7 +391,7 @@ static void level_cmd_load_model_from_geo(void) {
|
||||
ModelID model = CMD_GET(ModelID, 8);
|
||||
void *geo = CMD_GET(void *, 4);
|
||||
|
||||
if (model < ARRAY_COUNT(gLoadedGraphNodes)) {
|
||||
if (model < ARRAY_COUNT(gGraphNodePointers)) {
|
||||
gLoadedGraphNodes[model] = process_geo_layout(sLevelPool, geo);
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ static void level_cmd_23(void) {
|
||||
// load an f32, but using an integer load instruction for some reason (hence the union)
|
||||
arg2.i = CMD_GET(s32, 8);
|
||||
|
||||
if (model < ARRAY_COUNT(gLoadedGraphNodes)) {
|
||||
if (model < ARRAY_COUNT(gGraphNodePointers)) {
|
||||
// GraphNodeScale has a GraphNode at the top. This
|
||||
// is being stored to the array, so cast the pointer.
|
||||
gLoadedGraphNodes[model] =
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "area.h"
|
||||
#include "sm64.h"
|
||||
@@ -23,7 +24,7 @@
|
||||
#include "level_table.h"
|
||||
|
||||
struct SpawnInfo gPlayerSpawnInfos[1];
|
||||
struct GraphNode *D_8033A160[0x10000];
|
||||
struct GraphNode *gGraphNodePointers[MODEL_ID_COUNT];
|
||||
struct Area gAreaData[8];
|
||||
|
||||
struct WarpTransition gWarpTransition;
|
||||
@@ -36,7 +37,7 @@ s16 gPauseScreenMode;
|
||||
s16 gSaveOptSelectIndex;
|
||||
|
||||
struct SpawnInfo *gMarioSpawnInfo = &gPlayerSpawnInfos[0];
|
||||
struct GraphNode **gLoadedGraphNodes = D_8033A160;
|
||||
struct GraphNode **gLoadedGraphNodes = gGraphNodePointers;
|
||||
struct Area *gAreas = gAreaData;
|
||||
struct Area *gCurrentArea = NULL;
|
||||
struct CreditsEntry *gCurrCreditsEntry = NULL;
|
||||
|
||||
@@ -120,7 +120,7 @@ struct WarpTransition
|
||||
|
||||
extern struct GraphNode **gLoadedGraphNodes;
|
||||
extern struct SpawnInfo gPlayerSpawnInfos[];
|
||||
extern struct GraphNode *D_8033A160[];
|
||||
extern struct GraphNode *gGraphNodePointers[MODEL_ID_COUNT];
|
||||
extern struct Area gAreaData[];
|
||||
extern struct WarpTransition gWarpTransition;
|
||||
extern s16 gCurrCourseNum;
|
||||
|
||||
Reference in New Issue
Block a user