Last active
October 22, 2018 20:34
-
-
Save leoetlino/c3e625367affc6a2dadffb9c92d73f6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void genStageUpdateMapTypeFlags(sead::SafeString *newTypeName, sead::SafeString *newMapName, sead::SafeString *a3) | |
{ | |
setCurrentMapTypeAndName(newTypeName, newMapName); | |
const sead::SafeString currentMapType = getCurrentMapType(); | |
const sead::SafeString currentMapName = getCurrentMapName(); | |
const bool isCDungeon = (currentMapType == "CDungeon"); | |
const bool isGameTestDungeon = (currentMapType == "GameTestDungeon"); | |
const bool isActorViewer = (currentMapName == "ActorViewer"); | |
// stuff involving qword_71025CE6D8 (which is never initialised in release versions?) | |
const bool debugMaybe = false; | |
const bool isViewer = (currentMapType == "Viewer"); | |
const bool isMarioClubTestDungeon = (currentMapType == "MarioClubTestDungeon"); | |
const bool isMainFieldDungeon = (currentMapType == "MainFieldDungeon"); | |
sIsDebugOrDevMap = false; | |
sIsViewerMapType = false; | |
bool isRemainsElectric, isRemainsFire, isRemainsWater, isRemainsWind, isFinalTrial = false; | |
if ( !isMarioClubTestDungeon && !isCDungeon && !isMainFieldDungeon && | |
(!isGameTestDungeon || isActorViewer || debugMaybe)) | |
{ | |
sIsDungeon = false; | |
sIsCDungeon = false; | |
sIsTestDungeon = false; | |
sIsMainFieldDungeon = false; | |
if ( isActorViewer ) | |
{ | |
sIsActorViewer = true; | |
sIsDebugOrDevMap = true; | |
} | |
else | |
{ | |
sIsActorViewer = false; | |
} | |
if ( debugMaybe ) | |
{ | |
sStageDebug = true; | |
sIsDebugOrDevMap = true; | |
} | |
else | |
{ | |
sStageDebug = false; | |
} | |
if ( isViewer ) | |
{ | |
sIsDebugOrDevMap = true; | |
sIsViewerMapType = true; | |
} | |
} | |
else | |
{ | |
sIsDungeon = true; | |
sIsCDungeon = isCDungeon; | |
sIsTestDungeon = !isCDungeon && (isGameTestDungeon || isMarioClubTestDungeon); | |
sIsMainFieldDungeon = !isCDungeon && !(isGameTestDungeon || isMarioClubTestDungeon); | |
sIsActorViewer = false; | |
sStageDebug = false; | |
if ( sIsTestDungeon ) | |
sIsDebugOrDevMap = true; | |
if ( sIsMainFieldDungeon ) | |
{ | |
isRemainsElectric = (currentMapName == "RemainsElectric"); | |
isRemainsFire = (currentMapName == "RemainsFire"); | |
isRemainsWater = (currentMapName == "RemainsWater"); | |
isRemainsWind = (currentMapName == "RemainsWind"); | |
isFinalTrial = (currentMapName == "FinalTrial"); | |
} | |
} | |
sIsRemainsElectric = isRemainsElectric; | |
sIsRemainsFire = isRemainsFire; | |
sIsRemainsWater = isRemainsWater; | |
sIsRemainsWind = isRemainsWind; | |
sIsFinalTrial = isFinalTrial; | |
sIsAocField = currentMapType.findIndex("AocField") != -1; | |
const bool isMainField = (currentMapType == "MainField"); | |
sIsMainField = isMainField; | |
sNotStageDebugOrActorViewerOrDungeon = !sStageDebug && !sIsActorViewer && !sIsDungeon; | |
// copy flags... example: | |
sIsDebugOrDevMap2 = sIsDebugOrDevMap; | |
str_qword_71025CC138 = a3; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment