mirror of
https://github.com/izzy2lost/Ghostship.git
synced 2026-06-19 01:17:03 -07:00
Fixed some flags not getting reset
This commit is contained in:
@@ -592,9 +592,6 @@ static void level_cmd_set_gamma(void) {
|
||||
|
||||
static void level_cmd_set_terrain_data(void) {
|
||||
if (sCurrAreaIndex != -1) {
|
||||
#ifndef NO_SEGMENTED_MEMORY
|
||||
gAreas[sCurrAreaIndex].terrainData = segmented_to_virtual(CMD_GET(void *, 4));
|
||||
#else
|
||||
Collision *data;
|
||||
u32 size;
|
||||
|
||||
@@ -603,7 +600,6 @@ static void level_cmd_set_terrain_data(void) {
|
||||
size = get_area_terrain_size(data) * sizeof(Collision);
|
||||
gAreas[sCurrAreaIndex].terrainData = alloc_only_pool_alloc(sLevelPool, size);
|
||||
memcpy(gAreas[sCurrAreaIndex].terrainData, data, size);
|
||||
#endif
|
||||
}
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
@@ -617,9 +613,6 @@ static void level_cmd_set_rooms(void) {
|
||||
|
||||
static void level_cmd_set_macro_objects(void) {
|
||||
if (sCurrAreaIndex != -1) {
|
||||
#ifndef NO_SEGMENTED_MEMORY
|
||||
gAreas[sCurrAreaIndex].macroObjects = segmented_to_virtual(CMD_GET(void *, 4));
|
||||
#else
|
||||
// The game modifies the macro object data (for example marking coins as taken),
|
||||
// so it must be reset when the level reloads.
|
||||
MacroObject *data = segmented_to_virtual(CMD_GET(void *, 4));
|
||||
@@ -629,7 +622,6 @@ static void level_cmd_set_macro_objects(void) {
|
||||
}
|
||||
gAreas[sCurrAreaIndex].macroObjects = alloc_only_pool_alloc(sLevelPool, len * sizeof(MacroObject));
|
||||
memcpy(gAreas[sCurrAreaIndex].macroObjects, data, len * sizeof(MacroObject));
|
||||
#endif
|
||||
}
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ Gfx *geo_movtex_draw_water_regions(s32 callContext, struct GraphNode *node, UNUS
|
||||
} else if (asGenerated->parameter == SSL_MOVTEX_TOXBOX_QUICKSAND_MIST) {
|
||||
gMovtexVtxColor = MOVTEX_VTX_COLOR_RED;
|
||||
}
|
||||
quadCollection = get_quad_collection_from_id(asGenerated->parameter);
|
||||
quadCollection = segmented_to_virtual(get_quad_collection_from_id(asGenerated->parameter));
|
||||
if (quadCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -824,7 +824,7 @@ Gfx *movtex_gen_list(s16 *movtexVerts, struct MovtexObject *movtexList, s8 attrL
|
||||
}
|
||||
|
||||
gSPDisplayList(gfx++, movtexList->beginDl);
|
||||
gLoadBlockTexture(gfx++, 32, 32, G_IM_FMT_RGBA, gMovtexIdToTexture[movtexList->textureId]);
|
||||
gLoadBlockTexture(gfx++, 32, 32, G_IM_FMT_RGBA, segmented_to_virtual(gMovtexIdToTexture[movtexList->textureId]));
|
||||
gSPVertex(gfx++, VIRTUAL_TO_PHYSICAL2(verts), movtexList->vtx_count, 0);
|
||||
gSPDisplayList(gfx++, movtexList->triDl);
|
||||
gSPDisplayList(gfx++, movtexList->endDl);
|
||||
|
||||
@@ -398,6 +398,8 @@ s32 lvl_init_act_selector_values_and_stars(UNUSED s32 arg, UNUSED s32 unused) {
|
||||
sInitSelectedActNum = 0;
|
||||
sVisibleStars = 0;
|
||||
sActSelectorMenuTimer = 0;
|
||||
sSelectedActIndex = 0;
|
||||
sSelectableStarIndex = 0;
|
||||
sObtainedStars =
|
||||
save_file_get_course_star_count(gCurrSaveFileNum - 1, COURSE_NUM_TO_INDEX(gCurrCourseNum));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user