diff --git a/Makefile b/Makefile index 203774e3..c99ad599 100644 --- a/Makefile +++ b/Makefile @@ -267,17 +267,17 @@ $(GLOBAL_ASM_C_OBJS) : $(BUILD_DIR)/%.c.o : %.c | $(C_BUILD_DIRS) $(BOOT_C_OBJS) : $(BUILD_DIR)/%.c.o : %.c | $(C_BUILD_DIRS) $(call print2,Compiling:,$<,$@) @$(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_CFLAGS) $(OPT_FLAGS) $(MIPSBIT) -o $@ $< - mips-linux-gnu-strip $@ -N asdasdasasdasd - $(OBJCOPY) --prefix-symbols=boot_ $@ - $(OBJCOPY) --strip-unneeded $@ + @mips-linux-gnu-strip $@ -N asdasdasasdasd + @$(OBJCOPY) --prefix-symbols=boot_ $@ + @$(OBJCOPY) --strip-unneeded $@ # .c -> .o (mips3, boot) $(BOOT_MIPS3_OBJS) : $(BUILD_DIR)/%.c.o : %.c | $(C_BUILD_DIRS) $(call print2,Compiling:,$<,$@) @$(CC) -c -32 $(CFLAGS) $(CPPFLAGS) $(INCLUDE_CFLAGS) $(OPT_FLAGS) $(LOOP_UNROLL) $(MIPSBIT) -o $@ $< @tools/set_o32abi_bit.py $@ - $(OBJCOPY) --prefix-symbols=boot_ $@ - $(OBJCOPY) --strip-unneeded $@ + @$(OBJCOPY) --prefix-symbols=boot_ $@ + @$(OBJCOPY) --strip-unneeded $@ # Split baserom $(BUILD_DIR)/SPLAT_TIMESTAMP: decompressed.$(VERSION).yaml $(SYMBOL_ADDRS) $(DECOMPRESSED_BASEROM) | $(BUILD_DIR) diff --git a/decompressed.pal.yaml b/decompressed.pal.yaml index a1ee7fe5..d0a83ab2 100644 --- a/decompressed.pal.yaml +++ b/decompressed.pal.yaml @@ -538,7 +538,7 @@ segments: - [0xF875E0, c, bakey] - [0xF87870, c, abilityprogress] - [0xF87B00, c, code_E910] - - [0xF88030, c, code_EE40] + - [0xF88030, c, babounds] - [0xF88140, c, code_EF50] - [0xF88F50, c, ba/physics] - [0xF89EC0, c, ba/iFrame] @@ -548,7 +548,7 @@ segments: - [0xF8A650, c, code_11460] - [0xF8A850, c, code_11660] - [0xF8A9C0, c, code_117D0] - - [0xF8AA60, c, code_11870] + - [0xF8AA60, c, balookat] - [0xF8AD30, c, roll] - [0xF8AFD0, c, yaw] - [0xF8B550, c, code_12360] @@ -599,21 +599,21 @@ segments: - [0xFA4440, c, bs/pumpkin] - [0xFA5840, c, bs/rebound] - [0xFA5CC0, c, bs/rest] - - [0xFA6190, textbin, core2_untouched] - # - [0xF828F0, c, bs/sled] #DONE - # - [0xF82AA0, c, bs/slide] #DONE - # - [0xF82F40, c, bs/splat] #DONE - # - [0xF83240, c, bs/stand] #DONE - # - [0xF83E50, c, bs/swim] #DONE - # - [0xF849A0, c, bs/surf] #DONE - # - [0xF84B00, c, bs/talk] #DONE - # - [0xF84C40, c, bs/timeout] #DONE - # - [0xF84F10, c, bs/throw] #DONE - # - [0xF85130, c, bs/turn] #DONE - # - [0xF85410, c, bs/twirl] #DONE - # - [0xF856D0, c, bs/walk] #DONE - # - [0xF867D0, c, bs/walrus] #DONE - # - [0xF88350, c, bs/washy] #DONE + - [0xFA6190, c, bs/sled] + - [0xFA6360, c, bs/slide] + - [0xFA6800, c, bs/splat] + - [0xFA6B00, c, bs/stand] + - [0xFA7710, c, bs/swim] + - [0xFA8260, c, bs/surf] + - [0xFA83C0, c, bs/talk] + - [0xFA8500, c, bs/timeout] + - [0xFA87D0, c, bs/throw] + - [0xFA89F0, c, bs/turn] + - [0xFA8CD0, c, bs/twirl] + - [0xFA8F90, c, bs/walk] + - [0xFAA090, c, bs/walrus] + - [0xFABC10, c, bs/washy] + - [0xFABFD0, textbin, core2_untouched] # - [0xF88710, c, nc/cameranodelist] #DONE # - [0xF88BB0, c, code_33250] #DONE # - [0xF88BB0, c, code_33310] #DONE @@ -630,11 +630,11 @@ segments: # - [0xF8D630, c, nc/randomCamera] #DONE # - [0xF8D7B0, c, code_37E50] #DONE # - [0xF8DAB0, c, nc/dynamicCam10] #DONE - # - [0xF8DC40, c, nc/dynamicCamD] #DONE + # - [0xF8DC40, c, nc/ba/die] #DONE # - [0xF8DDC0, c, nc/dynamicCam5] #DONE # - [0xF8DF90, c, nc/dynamicCam11] #DONE # - [0xF8E240, c, nc/dynamicCam8] #DONE - # - [0xF8E430, c, nc/dynamicCam4] #DONE + # - [0xF8E430, c, nc/ba/fly] #DONE # - [0xF8E8A0, c, nc/dynamicCamC] #DONE # - [0xF8EAF0, c, code_F8EAF0] #DONE # - [0xF8ED40, c, nc/dynamicCamB] #DONE @@ -646,7 +646,7 @@ segments: # - [0xF90770, c, nc/dynamicCamA] #DONE # - [0xF90C20, c, code_3B2C0] #DONE # - [0xF90E30, c, nc/dynamicCamF] #DONE - # - [0xF90F20, c, nc/firstpersoncamera] #DONE + # - [0xF90F20, c, nc/ba/1p] #DONE # - [0xF914E0, c, spawnqueue] #DONE # - [0xF92D30, c, ch/gameSelect] #DONE # - [0xF94430, c, code_3EAD0] #DONE @@ -766,7 +766,7 @@ segments: # - [0xFCF190, c, fx/common3score] #DONE # - [0xFCF5E0, c, fx/healthscore] #DONE # - [0xFD00C0, c, fx/airscore] #DONE - # - [0xFD08E0, c, code_7AF80] + # - [0xFD08E0, c, gccube] # - [0xFD7960, c, mapModel] #DONE # - [0xFD8CA0, c, propModelList] #DONE # - [0xFD96D0, c, gc/section] #DONE @@ -806,9 +806,9 @@ segments: # - [0xFFA660, c, code_A4D00] #DONE # - [0xFFB520, c, code_A5BC0] # - [0x1001560, c, code_ABC00] #DONE - # - [0x1001E80, c, code_AC520] #DONE + # - [0x1001E80, c, gclights] #DONE # - [0x1002A70, c, code_AD110] #DONE - # - [0x1002F10, c, code_AD5B0] #DONE + # - [0x1002F10, c, gsworld] #DONE # - [0x1003BF0, c, code_AE290] #DONE # - [0x1003F30, c, skeletalanim] #DONE # - [0x1004700, c, code_AEDA0] @@ -933,18 +933,18 @@ segments: - [0x1057440, .data, bs/dronexform] - [0x1057560, .data, bs/jump] - [0x1057580, .data, bs/pumpkin] - - [0x10575B0, bin, core2_untouched_data] - # - [0x10336F0, .data, bs/stand] - # - [0x1033710, .data, bs/swim] - # - [0x1033740, .data, bs/walk] - # - [0x1033790, .data, bs/walrus] + - [0x10575B0, .data, bs/stand] + - [0x10575D0, .data, bs/swim] + - [0x1057600, .data, bs/walk] + - [0x1057650, .data, bs/walrus] + - [0x1057690, bin, core2_untouched_data] # - [0x10337D0, .data, code_33F90] # - [0x1034160, .data, code_34310] # - [0x10341B0, .data, code_34790] # - [0x1034200, .data, code_35520] # - [0x10346A0, .data, nc/dynamicCamera] # - [0x1034730, .data, code_37E50] - # - [0x1034760, .data, nc/dynamicCamD] + # - [0x1034760, .data, nc/ba/die] # - [0x1034770, .data, nc/dynamicCamA] # - [0x1034790, .data, spawnqueue] # - [0x10347A0, .data, ch/gameSelect] @@ -1042,7 +1042,7 @@ segments: # - [0x1038C80, .data, fx/common3score] # - [0x10392E0, .data, fx/healthscore] # - [0x1039330, .data, fx/airscore] - # - [0x1039380, .data, code_7AF80] + # - [0x1039380, .data, gccube] # - [0x10395B0, .data, mapModel] # - [0x103A1D0, .data, propModelList] # - [0x103A1E0, .data, gc/section] @@ -1068,9 +1068,9 @@ segments: # - [0x103D180, .data, code_A5BC0] #(file needs to be broken?) # - [0x103D1D0, .data, code_A5BC0] # - [0x103D200, .data, code_ABC00] - # - [0x103E340, .data, code_AC520] + # - [0x103E340, .data, gclights] # - [0x103E350, .data, code_AD110] - # - [0x103EC20, .data, code_AD5B0] + # - [0x103EC20, .data, gsworld] # - [0x103EC30, .data, code_AEDA0] # - [0x103ED10, .data, modelRender] # - [0x103F3B0, .data, code_B3A80] @@ -1147,7 +1147,7 @@ segments: - [0x10673C0, .rodata, code_11040] - [0x10673D0, .rodata, climb] - [0x10673E0, .rodata, code_11660] - - [0x10675A0, .rodata, code_11870] + - [0x10675A0, .rodata, balookat] - [0x10675B0, .rodata, roll] - [0x10675D0, .rodata, yaw] - [0x1067630, .rodata, code_12360] @@ -1190,19 +1190,19 @@ segments: - [0x1068360, .rodata, bs/pumpkin] - [0x10683E0, .rodata, bs/rebound] - [0x10683F0, .rodata, bs/rest] - - [0x1068400, rodatabin, core2_untouched] - # - [0x1044430, .rodata, bs/slide] - # - [0x1044440, .rodata, bs/stand] - # - [0x1044470, .rodata, bs/swim] - # - [0x10444C0, .rodata, bs/surf] - # - [0x10444D0, .rodata, bs/talk] - # - [0x10444E0, .rodata, bs/timeout] - # - [0x10444F0, .rodata, bs/throw] - # - [0x1044500, .rodata, bs/turn] - # - [0x1044520, .rodata, bs/twirl] - # - [0x1044540, .rodata, bs/walk] - # - [0x10445D0, .rodata, bs/walrus] - # - [0x1044630, .rodata, bs/washy] + - [0x1068400, .rodata, bs/slide] + - [0x1068410, .rodata, bs/stand] + - [0x1068440, .rodata, bs/swim] + - [0x1068490, .rodata, bs/surf] + - [0x10684A0, .rodata, bs/talk] + - [0x10684B0, .rodata, bs/timeout] + - [0x10684C0, .rodata, bs/throw] + - [0x10684D0, .rodata, bs/turn] + - [0x10684F0, .rodata, bs/twirl] + - [0x1068510, .rodata, bs/walk] + - [0x10685A0, .rodata, bs/walrus] + - [0x1068600, .rodata, bs/washy] + - [0x1068660, rodatabin, core2_untouched] # - [0x1044690, .rodata, nc/cameranodelist] # - [0x10446E0, .rodata, code_33F90] # - [0x1044700, .rodata, code_34310] @@ -1210,9 +1210,9 @@ segments: # - [0x1044740, .rodata, nc/dynamicCamera] # - [0x1044890, .rodata, code_37E50] # - [0x10448B0, .rodata, nc/dynamicCam10] - # - [0x10448C0, .rodata, nc/dynamicCamD] + # - [0x10448C0, .rodata, nc/ba/die] # - [0x10448D0, .rodata, nc/dynamicCam5] - # - [0x10448E0, .rodata, nc/dynamicCam4] + # - [0x10448E0, .rodata, nc/ba/fly] # - [0x10448F0, .rodata, nc/dynamicCamC] # - [0x1044900, .rodata, code_F8EAF0] # - [0x1044910, .rodata, nc/dynamicCamB] @@ -1290,7 +1290,7 @@ segments: # - [0x1045E30, .rodata, fx/common3score] # - [0x1045E50, .rodata, fx/healthscore] # - [0x1045E60, .rodata, fx/airscore] - # - [0x1045E80, .rodata, code_7AF80] + # - [0x1045E80, .rodata, gccube] # - [0x1045F40, .rodata, mapModel] # - [0x1046100, .rodata, propModelList] # - [0x1046110, .rodata, gc/section] @@ -1403,7 +1403,7 @@ segments: - [0x0106C980, .bss, bakey] - [0x0106C980, .bss, abilityprogress] - [0x0106C980, .bss, code_E910] - - [0x0106C980, .bss, code_EE40] + - [0x0106C980, .bss, babounds] - [0x0106C980, .bss, code_EF50] - [0x0106C980, .bss, ba/physics] - [0x0106C980, .bss, ba/iFrame] @@ -1413,7 +1413,7 @@ segments: - [0x0106C980, .bss, code_11460] - [0x0106C980, .bss, code_11660] - [0x0106C980, .bss, code_117D0] - - [0x0106C980, .bss, code_11870] + - [0x0106C980, .bss, balookat] - [0x0106C980, .bss, roll] - [0x0106C980, .bss, yaw] - [0x0106C980, .bss, code_12360] @@ -1459,19 +1459,19 @@ segments: - [0x0106C980, .bss, bs/ow] - [0x0106C980, .bss, bs/pumpkin] - [0x0106C980, .bss, bs/rebound] - # - [0x0106C980, .bss, bs/sled] - # - [0x0106C980, .bss, bs/slide] - # - [0x0106C980, .bss, bs/splat] - # - [0x0106C980, .bss, bs/stand] - # - [0x0106C980, .bss, bs/swim] - # - [0x0106C980, .bss, bs/surf] - # - [0x0106C980, .bss, bs/talk] - # - [0x0106C980, .bss, bs/throw] - # - [0x0106C980, .bss, bs/turn] - # - [0x0106C980, .bss, bs/twirl] - # - [0x0106C980, .bss, bs/walk] - # - [0x0106C980, .bss, bs/walrus] - # - [0x0106C980, .bss, bs/washy] + - [0x0106C980, .bss, bs/sled] + - [0x0106C980, .bss, bs/slide] + - [0x0106C980, .bss, bs/splat] + - [0x0106C980, .bss, bs/stand] + - [0x0106C980, .bss, bs/swim] + - [0x0106C980, .bss, bs/surf] + - [0x0106C980, .bss, bs/talk] + - [0x0106C980, .bss, bs/throw] + - [0x0106C980, .bss, bs/turn] + - [0x0106C980, .bss, bs/twirl] + - [0x0106C980, .bss, bs/walk] + - [0x0106C980, .bss, bs/walrus] + - [0x0106C980, .bss, bs/washy] # - [0x0106C980, .bss, nc/cameranodelist] # - [0x0106C980, .bss, code_33C30] # - [0x0106C980, .bss, nc/staticCamera] @@ -1486,7 +1486,7 @@ segments: # - [0x0106C980, .bss, nc/dynamicCam5] # - [0x0106C980, .bss, nc/dynamicCam11] # - [0x0106C980, .bss, nc/dynamicCam8] - # - [0x0106C980, .bss, nc/dynamicCam4] + # - [0x0106C980, .bss, nc/ba/fly] # - [0x0106C980, .bss, nc/dynamicCamC] # - [0x0106C980, .bss, code_F8EAF0] # - [0x0106C980, .bss, nc/dynamicCamB] @@ -1496,7 +1496,7 @@ segments: # - [0x0106C980, .bss, nc/dynamicCam3] # - [0x0106C980, .bss, code_3B2C0] # - [0x0106C980, .bss, nc/dynamicCamF] - # - [0x0106C980, .bss, nc/firstpersoncamera] + # - [0x0106C980, .bss, nc/ba/1p] # - [0x0106C980, .bss, ch/gameSelect] # - [0x0106C980, .bss, code_41460] # - [0x0106C980, .bss, code_41FB0] @@ -1557,7 +1557,7 @@ segments: # - [0x0106C980, .bss, fx/lifescore] # - [0x0106C980, .bss, fx/healthscore] # - [0x0106C980, .bss, fx/airscore] - # - [0x0106C980, .bss, code_7AF80] + # - [0x0106C980, .bss, gccube] # - [0x0106C980, .bss, mapModel] # - [0x0106C980, .bss, propModelList] # - [0x0106C980, .bss, gc/section] @@ -1593,9 +1593,9 @@ segments: # - [0x0106C980, .bss, code_A4D00] # - [0x0106C980, .bss, code_A5BC0] # - [0x0106C980, .bss, code_ABC00] - # - [0x0106C980, .bss, code_AC520] + # - [0x0106C980, .bss, gclights] # - [0x0106C980, .bss, code_AD110] - # - [0x0106C980, .bss, code_AD5B0] + # - [0x0106C980, .bss, gsworld] # - [0x0106C980, .bss, code_AE290] # - [0x0106C980, .bss, code_AEDA0] # - [0x0106C980, .bss, modelRender] diff --git a/decompressed.us.v10.yaml b/decompressed.us.v10.yaml index facdfaa8..63cf028c 100644 --- a/decompressed.us.v10.yaml +++ b/decompressed.us.v10.yaml @@ -539,7 +539,7 @@ segments: - [0xF63D70, c, bakey] - [0xF63FE0, c, abilityprogress] #baknow - [0xF64270, c, code_E910] - - [0xF647A0, c, code_EE40] + - [0xF647A0, c, babounds] - [0xF648B0, c, code_EF50] - [0xF656C0, c, ba/physics] - [0xF66630, c, ba/iFrame] @@ -549,7 +549,7 @@ segments: - [0xF66DC0, c, code_11460] - [0xF66FC0, c, code_11660] - [0xF67130, c, code_117D0] - - [0xF671D0, c, code_11870] # barest + - [0xF671D0, c, balookat] # barest - [0xF674A0, c, roll] - [0xF67740, c, yaw] - [0xF67CC0, c, code_12360] @@ -630,11 +630,11 @@ segments: - [0xF8D630, c, nc/randomCamera] - [0xF8D7B0, c, code_37E50] - [0xF8DAB0, c, nc/dynamicCam10] - - [0xF8DC40, c, nc/dynamicCamD] + - [0xF8DC40, c, nc/ba/die] - [0xF8DDC0, c, nc/dynamicCam5] - [0xF8DF90, c, nc/dynamicCam11] - [0xF8E240, c, nc/dynamicCam8] - - [0xF8E430, c, nc/dynamicCam4] + - [0xF8E430, c, nc/ba/fly] - [0xF8E8A0, c, nc/dynamicCamC] - [0xF8EAF0, c, code_F8EAF0] - [0xF8ED40, c, nc/dynamicCamB] @@ -646,7 +646,7 @@ segments: - [0xF90770, c, nc/dynamicCamA] - [0xF90C20, c, code_3B2C0] - [0xF90E30, c, nc/dynamicCamF] - - [0xF90F20, c, nc/firstpersoncamera] + - [0xF90F20, c, nc/ba/1p] - [0xF914E0, c, spawnqueue] - [0xF92D30, c, ch/gameSelect] - [0xF94430, c, code_3EAD0] @@ -766,7 +766,7 @@ segments: - [0xFCF190, c, fx/common3score] - [0xFCF5E0, c, fx/healthscore] - [0xFD00C0, c, fx/airscore] - - [0xFD08E0, c, code_7AF80] + - [0xFD08E0, c, gccube] - [0xFD7960, c, mapModel] - [0xFD8CA0, c, propModelList] - [0xFD96D0, c, gc/section] @@ -780,7 +780,7 @@ segments: - [0xFE3580, c, code_8DC20] - [0xFE3BD0, c, gc/zoombox] - [0xFE7770, c, code_91E10] - - [0xFE8F50, c, code_935F0]#chminigmae + - [0xFE8F50, c, code_935F0] #gcminigame - [0xFE9570, c, gc/parade] - [0xFE9F80, c, code_94620] - [0xFEA0E0, c, code_94780] @@ -806,9 +806,9 @@ segments: - [0xFFA660, c, code_A4D00] - [0xFFB520, c, code_A5BC0] - [0x1001560, c, code_ABC00] - - [0x1001E80, c, code_AC520] + - [0x1001E80, c, gclights] - [0x1002A70, c, code_AD110] - - [0x1002F10, c, code_AD5B0] + - [0x1002F10, c, gsworld] - [0x1003BF0, c, code_AE290] - [0x1003F30, c, skeletalanim] - [0x1004700, c, code_AEDA0] @@ -843,7 +843,7 @@ segments: - [0x1018B00, c, code_C31A0] - [0x1018D60, c, rand] - [0x10193A0, c, code_C3A40] - - [0x1019480, c, file] + - [0x1019480, c, file] #gsmaker - [0x1019C80, c, code_C4320] - [0x101A8A0, c, code_C4F40] - [0x101ADA0, c, code_C5440] @@ -943,7 +943,7 @@ segments: - [0x1034200, .data, code_35520] - [0x10346A0, .data, nc/dynamicCamera] - [0x1034730, .data, code_37E50] - - [0x1034760, .data, nc/dynamicCamD] + - [0x1034760, .data, nc/ba/die] - [0x1034770, .data, nc/dynamicCamA] - [0x1034790, .data, spawnqueue] - [0x10347A0, .data, ch/gameSelect] @@ -1041,7 +1041,7 @@ segments: - [0x1038C80, .data, fx/common3score] - [0x10392E0, .data, fx/healthscore] - [0x1039330, .data, fx/airscore] - - [0x1039380, .data, code_7AF80] + - [0x1039380, .data, gccube] - [0x10395B0, .data, mapModel] - [0x103A1D0, .data, propModelList] - [0x103A1E0, .data, gc/section] @@ -1067,9 +1067,9 @@ segments: - [0x103D180, .data, code_A5BC0] #(file needs to be broken?) - [0x103D1D0, .data, code_A5BC0] - [0x103D200, .data, code_ABC00] - - [0x103E340, .data, code_AC520] + - [0x103E340, .data, gclights] - [0x103E350, .data, code_AD110] - - [0x103EC20, .data, code_AD5B0] + - [0x103EC20, .data, gsworld] - [0x103EC30, .data, code_AEDA0] - [0x103ED10, .data, modelRender] - [0x103F3B0, .data, code_B3A80] @@ -1146,7 +1146,7 @@ segments: - [0x10433F0, .rodata, code_11040] - [0x1043400, .rodata, climb] - [0x1043410, .rodata, code_11660] - - [0x10435D0, .rodata, code_11870] + - [0x10435D0, .rodata, balookat] - [0x10435E0, .rodata, roll] - [0x1043600, .rodata, yaw] - [0x1043660, .rodata, code_12360] @@ -1208,9 +1208,9 @@ segments: - [0x1044740, .rodata, nc/dynamicCamera] - [0x1044890, .rodata, code_37E50] - [0x10448B0, .rodata, nc/dynamicCam10] - - [0x10448C0, .rodata, nc/dynamicCamD] + - [0x10448C0, .rodata, nc/ba/die] - [0x10448D0, .rodata, nc/dynamicCam5] - - [0x10448E0, .rodata, nc/dynamicCam4] + - [0x10448E0, .rodata, nc/ba/fly] - [0x10448F0, .rodata, nc/dynamicCamC] - [0x1044900, .rodata, code_F8EAF0] - [0x1044910, .rodata, nc/dynamicCamB] @@ -1288,7 +1288,7 @@ segments: - [0x1045E30, .rodata, fx/common3score] - [0x1045E50, .rodata, fx/healthscore] - [0x1045E60, .rodata, fx/airscore] - - [0x1045E80, .rodata, code_7AF80] + - [0x1045E80, .rodata, gccube] - [0x1045F40, .rodata, mapModel] - [0x1046100, .rodata, propModelList] - [0x1046110, .rodata, gc/section] @@ -1401,7 +1401,7 @@ segments: - [0x1048560, .bss, bakey] - [0x1048560, .bss, abilityprogress] - [0x1048560, .bss, code_E910] - - [0x1048560, .bss, code_EE40] + - [0x1048560, .bss, babounds] - [0x1048560, .bss, code_EF50] - [0x1048560, .bss, ba/physics] - [0x1048560, .bss, ba/iFrame] @@ -1411,7 +1411,7 @@ segments: - [0x1048560, .bss, code_11460] - [0x1048560, .bss, code_11660] - [0x1048560, .bss, code_117D0] - - [0x1048560, .bss, code_11870] + - [0x1048560, .bss, balookat] - [0x1048560, .bss, roll] - [0x1048560, .bss, yaw] - [0x1048560, .bss, code_12360] @@ -1484,7 +1484,7 @@ segments: - [0x1048560, .bss, nc/dynamicCam5] - [0x1048560, .bss, nc/dynamicCam11] - [0x1048560, .bss, nc/dynamicCam8] - - [0x1048560, .bss, nc/dynamicCam4] + - [0x1048560, .bss, nc/ba/fly] - [0x1048560, .bss, nc/dynamicCamC] - [0x1048560, .bss, code_F8EAF0] - [0x1048560, .bss, nc/dynamicCamB] @@ -1494,7 +1494,7 @@ segments: - [0x1048560, .bss, nc/dynamicCam3] - [0x1048560, .bss, code_3B2C0] - [0x1048560, .bss, nc/dynamicCamF] - - [0x1048560, .bss, nc/firstpersoncamera] + - [0x1048560, .bss, nc/ba/1p] - [0x1048560, .bss, ch/gameSelect] - [0x1048560, .bss, code_41460] - [0x1048560, .bss, code_41FB0] @@ -1555,7 +1555,7 @@ segments: - [0x1048560, .bss, fx/lifescore] - [0x1048560, .bss, fx/healthscore] - [0x1048560, .bss, fx/airscore] - - [0x1048560, .bss, code_7AF80] + - [0x1048560, .bss, gccube] - [0x1048560, .bss, mapModel] - [0x1048560, .bss, propModelList] - [0x1048560, .bss, gc/section] @@ -1591,9 +1591,9 @@ segments: - [0x1048560, .bss, code_A4D00] - [0x1048560, .bss, code_A5BC0] - [0x1048560, .bss, code_ABC00] - - [0x1048560, .bss, code_AC520] + - [0x1048560, .bss, gclights] - [0x1048560, .bss, code_AD110] - - [0x1048560, .bss, code_AD5B0] + - [0x1048560, .bss, gsworld] - [0x1048560, .bss, code_AE290] - [0x1048560, .bss, code_AEDA0] - [0x1048560, .bss, modelRender] diff --git a/include/bs_funcs.h b/include/bs_funcs.h index fb369957..717d3099 100644 --- a/include/bs_funcs.h +++ b/include/bs_funcs.h @@ -173,13 +173,13 @@ void func_802A7738(void); void func_802A7838(void); void func_802A7A2C(void); //BS_2D_SWIM_IDLE, -void func_802B5774(void); -void func_802B5950(void); -void func_802B5AF8(void); +void bsswim_idle_init(void); +void bsswim_idle_update(void); +void bsswim_idle_end(void); //BS_2E_SWIM(void); -void func_802B5B18(void); -void func_802B5C40(void); -void func_802B5E10(void); +void bsswim_swim_init(void); +void bsswim_swim_update(void); +void bsswim_swim_end(void); //BS_2F_FALL(void); void bsjump_fall_init(void); void bsjump_fall_update(void); @@ -479,14 +479,14 @@ void func_802A4FC8(void); void func_802A503C(void); //0x00000077 -void func_802B5E8C(void); -void func_802B5EFC(void); -void func_802B5F38(void); +void bsswim_lookat_init(void); +void bsswim_lookat_update(void); +void bsswim_lookat_end(void); //0x00000078 -void func_802A83C0(void); -void func_802A8410(void); -void func_802A844C(void); +void bsbswim_lookat_init(void); +void bsbswim_lookat_update(void); +void bsbswim_lookat_end(void); //0x00000079 void bsbtrot_unk79_init(void); @@ -617,14 +617,14 @@ void bswalrus_drone_update(void); void bswalrus_drone_end(void); void bsdrone_interrupt(void); //0x00000096 -void func_802B5F58(void); -void func_802B5F80(void); -void func_802B5FA0(void); +void bsswim_drone_init(void); +void bsswim_drone_update(void); +void bsswim_drone_end(void); void bsdrone_interrupt(void); //0x00000097 -void func_802A874C(void); -void func_802A8774(void); -void func_802A8794(void); +void bsbswim_drone_init(void); +void bsbswim_drone_update(void); +void bsbswim_drone_end(void); void bsdrone_interrupt(void); //0x00000098 void bswalk_drone_init(void); diff --git a/include/core2/lighting.h b/include/core2/lighting.h index dfbe9a4b..f1a13303 100644 --- a/include/core2/lighting.h +++ b/include/core2/lighting.h @@ -5,12 +5,12 @@ typedef struct { f32 position[3]; f32 positionCopy[3]; - f32 unk18; // unk - f32 unk1C; // unk - f32 unk20; // result of unk18 / actor scale, some sort of distance - f32 unk24; // result of unk1C / actor scale, some sort of distance (determines whether to modify rgb of vertex) + f32 fade_radius_min_unscaled; // unk + f32 fade_radius_max_unscaled; // unk + f32 fade_radius_min; // result of unk18 / actor scale, some sort of distance + f32 fade_radius_max; // result of unk1C / actor scale, some sort of distance (determines whether to modify rgb of vertex) s32 rgb[3]; // rgb - u8 unk34; // some sort of flag + u8 active; // some sort of flag u8 pad35[0x3]; } Lighting; //size 0x38 diff --git a/include/enums.h b/include/enums.h index a95d7fb7..82664e19 100644 --- a/include/enums.h +++ b/include/enums.h @@ -2411,8 +2411,8 @@ enum bs_e { BS_74_UNKNOWN = 0x74, // locked jiggypad, xform, bottles BS_75_UNKNOWN = 0x75, // locked bottles BS_76_BFLY_LOCKED = 0x76, - BS_77_SWIM_LOCKED = 0x77, - BS_78_DIVE_LOCKED = 0x78, + BS_77_SWIM_LOOKAT_DRONE = 0x77, + BS_78_DIVE_LOOKAT_DRONE = 0x78, BS_79_BTROT_LOCKED = 0x79, BS_WALK_MUD = 0x7A, BS_BTROT_OW = 0x7B, @@ -2442,8 +2442,8 @@ enum bs_e { BS_93_PUMPKIN_DRONE = 0x93, BS_94_CROC_DRONE = 0x94, BS_95_WALRUS_DRONE = 0x95, - BS_96_SWIM_LOCKED = 0x96, - BS_97_DIVE_LOCKED = 0x97, + BS_96_SWIM_DRONE = 0x96, + BS_97_DIVE_DRONE = 0x97, BS_98_WALK_DRONE = 0x98, BS_99_BFLY_DRONE = 0x99, BS_9A_BTROT_DRONE = 0x9A, @@ -5485,4 +5485,24 @@ enum ba_timer_id { BA_TIMER_HAZARDS = 4 }; +enum ba_rebound_id{ + BA_REBOUND_0_NONE, + BA_REBOUND_1_UNK, + BA_REBOUND_2_UNK, + BA_REBOUND_3_UNK, + BA_REBOUND_4_UNK, + BA_REBOUND_5_UNK, + BA_REBOUND_6_UNK, + BA_REBOUND_7_UNK, + BA_REBOUND_8_UNK, + BA_REBOUND_9_UNK, + BA_REBOUND_A_UNK, + BA_REBOUND_B_UNK, + BA_REBOUND_C_UNK, + BA_REBOUND_D_UNK, + BA_REBOUND_E_UNK, + BA_REBOUND_F_UNK, + BA_REBOUND_10_UNK +}; + #endif diff --git a/include/functions.h b/include/functions.h index c3a82848..f744fd4f 100644 --- a/include/functions.h +++ b/include/functions.h @@ -261,9 +261,9 @@ void baiFrame_startWithValue(f32); f32 pitch_getIdeal(void); void pitch_setAngVel(f32, f32); void func_80298528(f32); -f32 func_802987C4(void); -f32 func_802987D4(void); -f32 func_802987E4(void); +f32 barebound_get_vertical_velocity(void); +f32 barebound_get_horizontal_velocity(void); +f32 barebound_get_gravity(void); void roll_setIdeal(f32); void roll_setAngularVelocity(f32, f32); void yaw_set(f32); @@ -303,7 +303,7 @@ void func_802BD8A4(f32, f32, f32); f32 func_802BD8D4(void); void func_802BE244(f32, f32); void func_802BE230(f32, f32); -void ncDynamicCamD_func_802BF2C0(f32); +void ncbadie_func_802BF2C0(f32); f32 func_802B6F9C(void); void func_802C1B20(f32); diff --git a/include/model.h b/include/model.h index 1f6f77f8..459719d5 100644 --- a/include/model.h +++ b/include/model.h @@ -200,5 +200,5 @@ typedef struct{ BKVertexList *model_getVtxList(BKModelBin *arg0); Vtx *vtxList_getVertices(BKVertexList *vtxList); -void codeAC520_func_80333D48(BKVertexList *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], BKVertexList *arg5); +void gclights_recolor_vertices(BKVertexList *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], BKVertexList *arg5); #endif diff --git a/include/structs.h b/include/structs.h index a9199bf8..743e36d1 100644 --- a/include/structs.h +++ b/include/structs.h @@ -472,11 +472,6 @@ typedef struct{ u8 unk3F; }struct4Es; -typedef struct{ - u8 unk0; - u8 unk1; - f32 unk4[3]; -}struct50s; typedef struct{ s16 unk0; diff --git a/manual_syms.pal.txt b/manual_syms.pal.txt index 21bcb641..24d5d8d9 100644 --- a/manual_syms.pal.txt +++ b/manual_syms.pal.txt @@ -33,23 +33,16 @@ boot_func_8023DA20 = func_8023DA20; /* Temporary*/ - /* Temporary Correct*/ -func_802B0CD8 = 0x80000000 | (0xac2c6 << 2); -func_802B35DC = 0x80000000 | (0xacd0b << 2); -func_802B360C = 0x80000000 | (0xacd17 << 2); -func_802B37DC = 0x80000000 | (0xacd8b << 2); -func_802B3A50 = 0x80000000 | (0xace28 << 2); -func_802B6FA8 = 0x80000000 | (0xadb86 << 2); func_802BC434 = 0x80000000 | (0xaf0a9 << 2); ncDynamicCamera_enterFirstPerson = 0x80000000 | (0xaf9d5 << 2); ncDynamicCamera_exitFirstPerson = 0x80000000 | (0xaf9e6 << 2); -ncDynamicCamD_func_802BF2C0 = 0x80000000 | (0xafc50 << 2); +ncbadie_func_802BF2C0 = 0x80000000 | (0xafc50 << 2); ncDynamicCam5_func_802BF590 = 0x80000000 | (0xafd04 << 2); -ncDynamicCam4_func_802BFE50 = 0x80000000 | (0xaff34 << 2); -ncDynamicCam4_func_802BFE74 = 0x80000000 | (0xaff3d << 2); -ncFirstPersonCamera_setZoomedOutPosition = 0x80000000 | (0xb0a39 << 2); -ncFirstPersonCamera_setZoomedOutRotation = 0x80000000 | (0xb0a43 << 2); +ncbafly_func_802BFE50 = 0x80000000 | (0xaff34 << 2); +ncbafly_func_802BFE74 = 0x80000000 | (0xaff3d << 2); +ncba1p_setZoomedOutPosition = 0x80000000 | (0xb0a39 << 2); +ncba1p_setZoomedOutRotation = 0x80000000 | (0xb0a43 << 2); __spawnQueue_add_0 = 0x80000000 | (0xb0e9e << 2); chJigsawDance_setState = 0x80000000 | (0xb2120 << 2); func_802D8BE4 = 0x80000000 | (0xb6371 << 2); @@ -71,6 +64,7 @@ func_802EFF50 = 0x80000000 | (0xbc04c << 2); particleEmitter_manualFree = 0x80000000 | (0xbc3cd << 2); partEmitMgr_freeEmitter = 0x80000000 | (0xbc396 << 2); partEmitMgr_newEmitter = 0x80000000 | (0xbc36c << 2); +func_802F1EC8 = 0x80000000 | (0xbc82a << 2); fxRipple_802F3554 = 0x80000000 | (0xbcdcd << 2); fxRipple_802F3584 = 0x80000000 | (0xbcdd9 << 2); func_802F4094 = 0x80000000 | (0xbd09d << 2); @@ -88,6 +82,7 @@ func_802F4924 = 0x80000000 | (0xbd2c1 << 2); func_802F494C = 0x80000000 | (0xbd2cb << 2); func_802F4978 = 0x80000000 | (0xbd2d6 << 2); func_802F499C = 0x80000000 | (0xbd2df << 2); +func_802F9DB8 = 0x80000000 | (0xbe7e6 << 2); mapModel_getBounds = 0x80000000 | (0xc26ce << 2); level_get_main_map = 0x80000000 | (0xc2bde << 2); level_get_main_exit = 0x80000000 | (0xc2bf1 << 2); @@ -104,6 +99,7 @@ func_8030EAAC = 0x80000000 | (0xc3b13 << 2); func_8030EB00 = 0x80000000 | (0xc3b28 << 2); func_8030EBC8 = 0x80000000 | (0xc3b5a << 2); func_8030EB88 = 0x80000000 | (0xc3b4a << 2); +func_8030EC20 = 0x80000000 | (0xc3b70 << 2); func_803114D0 = 0x80000000 | (0xc45c7 << 2); gcpausemenu_returnToLair = 0x80000000 | (0xc53a1 << 2); func_8031B990 = 0x80000000 | (0xc6f5c << 2); @@ -129,154 +125,6 @@ func_80356074 = 0x80000000 | (0xd5935 << 2); -bsslide_init = 0x802b40c0; -bsslide_update = 0x802b4230; -bsslide_end = 0x802b439c; -bsstand_init = 0x802b4808; -bsstand_update = 0x802b4b90; -bsstand_end = 0x802b50b8; -bsstand_landing_init = 0x802b50e8; -bsstand_landing_update = 0x802b5120; -func_802B5350 = 0x802b51c0; -func_802B5774 = 0x802b55e4; -func_802B5950 = 0x802b57c0; -func_802B5AF8 = 0x802b5968; -func_802B5B18 = 0x802b5988; -func_802B5C40 = 0x802b5ab0; -func_802B5E10 = 0x802b5c80; -bstalk_init = 0x802B5FA0; -bstalk_update = 0x802B6050; -bstalk_end = 0x802B6088; -bstalk_interrupt = 0x802B6090; -func_802B63F8 = 0x802b6268; -func_802B64D0 = 0x802b6340; -func_802B6500 = 0x802b6370; -bsturn_init = 0x802b65d0; -bsturn_update = 0x802b66c0; -bsturn_end = 0x802b6860; -bstwirl_init = 0x802b68bc; -bstwirl_update = 0x802b69e0; -bstwirl_end = 0x802b6b44; -bswalk_creep_init = 0x802b6e38; -bswalk_creep_update = 0x802b6f34; -bswalk_slow_init = 0x802b70d0; -bswalk_slow_upate = 0x802b71cc; -bswalk_init = 0x802b7368; -bswalk_update = 0x802b7484; -bswalk_fast_init = 0x802b7628; -bswalk_fast_update = 0x802b77dc; -bswalk_fast_end = 0x802b79f8; -func_802B9ACC = 0x802b993c; -func_802B9B14 = 0x802b9984; -func_802B9AAC = 0x802b991c; -func_802B9D00 = 0x802b9b70; - -func_802B5FD0 = 0x802B5E40; -func_802B6064 = 0x802B5ED4; -func_802B60D0 = 0x802B5F40; -func_802B60D8 = 0x802B5F48; -func_802B6270 = 0x802B60E0; -func_802B6314 = 0x802B6184; -func_802B63C8 = 0x802B6238; -func_802B3868 = 0x802B36B8; -func_802B3954 = 0x802B37A4; -func_802B3A20 = 0x802B3870; -bsthrow_init = 0x802B63B0; -bsthrow_update = 0x802B6450; -bsthrow_end = 0x802B651C; -bsthrow_interrupt = 0x802B6568; -bswalrus_idle_init = 0x802B80F4; -bswalrus_idle_update = 0x802B81A0; -bswalrus_idle_end = 0x802B822C; -bswalrus_walk_init = 0x802B8254; -bswalrus_walk_update = 0x802B82C4; -bswalrus_walk_end = 0x802B8360; -bswalrus_jump_init = 0x802B8388; -bswalrus_jump_update = 0x802B84C4; -bswalrus_jump_end = 0x802B86F8; -bswalrus_fall_init = 0x8802B8720; -bswalrus_fall_update = 0x8802B87BC; -bswalrus_fall_end = 0x8802B8924; -func_802A1F6C = 0x8802A1DAC; -func_802A1FC8 = 0x8802A1E08; -func_802A2014 = 0x8802A1E54; -bswalrus_ow_init = 0x8802B8AF4; -bswalrus_ow_update = 0x8802B8B14; -bswalrus_ow_end = 0x8802B8B34; -bswalrus_die_init = 0x8802B8BB4; -bswalrus_die_update = 0x8802B8D74; -bswalrus_die_end = 0x8802B8E80; -bsbtrot_fall_init = 0x8802A9A78; -bsbtrot_fall_update = 0x8802A9B48; -bsbtrot_fall_end = 0x8802A9EA8; -bssplat_init = 0x8802B4460; -bssplat_update = 0x8802B4578; -bssplat_end = 0x8802B46B4; -func_802B3CEC = 0x8802B3B3C; -func_802B3D1C = 0x8802B3B6C; -func_802B3D6C = 0x8802B3BBC; -func_802B3E2C = 0x802B3C7C; -func_802B3E64 = 0x802B3CB4; -func_802B3EF4 = 0x802B3D44; -func_802B3D8C = 0x802B3BDC; -func_802B3DBC = 0x802B3C0C; -func_802B3E0C = 0x802B3C5C; -func_802B5E8C = 0x802B5CFC; -func_802B5EFC = 0x802B5D6C; -func_802B5F38 = 0x802B5DA8; -bswalk_mud_init = 0x802b7a28; -bswalk_mud_update = 0x802b7aa0; -bssled_init = 0x802B3DF4; -bssled_update = 0x802B3E60; -bssled_end = 0x802B3E94; -bssled_interrupt = 0x802B3EE8; -bswalrus_sled_init = 0x802B9014; -bswalrus_sled_update = 0x802B9084; -bswalrus_sled_end = 0x802B914C; -func_802B98C0 = 0x802B9730; -bswalrus_sled_jump_init = 0x802B9174; -bswalrus_sled_jump_update = 0x802B92B0; -bswalrus_sled_jump_end = 0x802B93E8; -func_802B98C0 = 0x802B9730; -bswalrus_timeout_init = 0x802B95FC; -func_802B9830 = 0x802B96A0; -func_802B9880 = 0x802B96F0; -func_802B90D0 = 0x802B8F40; -func_802B9130 = 0x802B8FA0; -func_802B917C = 0x802B8FEC; -func_802B98C0 = 0x802B9730; -func_802B95A0 = 0x802B9410; -func_802B963C = 0x802B94AC; -func_802B976C = 0x802B95DC; -func_802B98C0 = 0x802B9730; -func_802B34A0 = 0x802B32F0; -func_802B34F8 = 0x802B3348; -func_802B353C = 0x802B338C; -bswalrus_drone_init = 0x8802B8ED0; -bswalrus_drone_update = 0x8802B8EF8; -bswalrus_drone_end = 0x8802B8F18; -func_802B5F58 = 0x8802B5DC8; -func_802B5F80 = 0x8802B5DF0; -func_802B5FA0 = 0x8802B5E10; -func_802A874C = 0x8802A858C; -func_802A8774 = 0x8802A85B4; -func_802A8794 = 0x8802A85D4; -bswalk_drone_init = 0x8802B7BBC; -bswalk_drone_update = 0x8802B7C30; -bswalk_drone_end = 0x8802B7C50; -func_802A50B0 = 0x8802A4EF0; -func_802A50D8 = 0x8802A4F18; -func_802A50F8 = 0x8802A4F38; -bswalrus_sled_drone_init = 0x802B977C; -bswalrus_sled_drone_update = 0x802B97A4; -bswalrus_sled_drone_end = 0x802B97C4; -bswalrus_bounce_init = 0x802B8B54; -bswalrus_bounce_update = 0x802B8B74; -bswalrus_bounce_end = 0x802B8B94; -bsswim_inset = 0x802b5594; -bstwirl_hitboxActive = 0x802b68b0; -func_802B6F9C = 0x802b6e0c; -bswalrus_inSledSet = 0x802b8000; ncCameraNodeList_getCameraNodeType4 = 0x802b9ca4; ncCameraNodeList_getCameraNodeType3 = 0x802b9cb8; ncCameraNodeList_getCameraNodeType1 = 0x802b9ccc; @@ -306,8 +154,8 @@ func_802C1B20 = 0x802c19a0; ncDynamicCamA_func_802C1DB0 = 0x802c1c30; ncDynamicCamA_func_802C1EE0 = 0x802c1d60; -ncFirstPersonCamera_getZoomedInRotation = 0x802c295c; -ncFirstPersonCamera_getState = 0x802c2980; +ncba1p_getZoomedInRotation = 0x802c295c; +ncba1p_getState = 0x802c2980; spawnQueue_func_802C3A18 = 0x802C3898; spawnQueue_flush = 0x802c38b8; @@ -515,8 +363,8 @@ func_803300B8 = 0x80330508; func_803306C8 = 0x80330b18; func_80332790 = 0x80332be0; func_8033452C = 0x8033497c; -map_get = 0x80334d10; -exit_get = 0x80334d1c; +gsworld_get_map = 0x80334d10; +gsworld_get_exit = 0x80334d1c; func_80334904 = 0x80334d54; func_80335134 = 0x80335584; sfxInstruments_init = 0x80335670; diff --git a/src/CC/ch/sawblade.c b/src/CC/ch/sawblade.c index ae42fb2f..8b831739 100644 --- a/src/CC/ch/sawblade.c +++ b/src/CC/ch/sawblade.c @@ -142,7 +142,7 @@ void chSawblade_update(Actor *this){ local->unk0 = &D_80389C30[(this->modelCacheIndex < 0x43) ? this->modelCacheIndex - 0x3D : this->modelCacheIndex - 0x28A]; local->unk4 = 0; func_80256C60(this->position, 100); - if(map_get() == MAP_21_CC_WITCH_SWITCH_ROOM){ + if(gsworld_get_map() == MAP_21_CC_WITCH_SWITCH_ROOM){ this->position_z += 64.0f; } }//L80389660 diff --git a/src/CC/code_1B90.c b/src/CC/code_1B90.c index aaa1c25f..5488978e 100644 --- a/src/CC/code_1B90.c +++ b/src/CC/code_1B90.c @@ -62,7 +62,7 @@ void func_803880D4(void){ void func_80388104(void){ D_80389F90.unk0 = 0; - if(map_get() == MAP_22_CC_INSIDE_CLANKER){ + if(gsworld_get_map() == MAP_22_CC_INSIDE_CLANKER){ if(jiggyscore_isSpawned(JIGGY_1C_CC_RINGS)){ timedFunc_set_0(0.0f, func_80387F80); } diff --git a/src/CC/code_1F70.c b/src/CC/code_1F70.c index 168ef897..0873c768 100644 --- a/src/CC/code_1F70.c +++ b/src/CC/code_1F70.c @@ -263,7 +263,7 @@ void func_80388CB4(void){ void func_80388D54(void){ D_80389FA0.unk21 = 0; - if(map_get() == MAP_B_CC_CLANKERS_CAVERN){ + if(gsworld_get_map() == MAP_B_CC_CLANKERS_CAVERN){ D_80389FA0.unk0 = skeletalAnim_new(); D_80389FA0.sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex(); D_80389FA0.unk8 = 1.0f; diff --git a/src/CCW/ch/grublinhood.c b/src/CCW/ch/grublinhood.c index dcac6acf..d726154e 100644 --- a/src/CCW/ch/grublinhood.c +++ b/src/CCW/ch/grublinhood.c @@ -133,7 +133,7 @@ void __chgrublinhood_initialize(Actor *this){ } enum ccw_season_e __get_current_season(Actor *this){ - switch(map_get()){ + switch(gsworld_get_map()){ case MAP_43_CCW_SPRING: //// 8038E930 case MAP_4A_CCW_SPRING_MUMBOS_SKULL:// 8038E930 case MAP_5B_CCW_SPRING_ZUBBA_HIVE:// 8038E930 diff --git a/src/CCW/code_0.c b/src/CCW/code_0.c index d33c704d..48e2c3a9 100644 --- a/src/CCW/code_0.c +++ b/src/CCW/code_0.c @@ -19,7 +19,7 @@ void CCW_func_803863F0(Actor *this, s32 next_state){ void func_80386468(ActorMarker* marker, ActorMarker *arg1) { Actor* actor = marker_getActor(marker); - if (actor->state == 1 && map_get() == MAP_44_CCW_SUMMER) { + if (actor->state == 1 && gsworld_get_map() == MAP_44_CCW_SUMMER) { CCW_func_803863F0(actor, 2); } } diff --git a/src/CCW/code_14B0.c b/src/CCW/code_14B0.c index fffd1472..54521b26 100644 --- a/src/CCW/code_14B0.c +++ b/src/CCW/code_14B0.c @@ -73,7 +73,7 @@ void CCW_func_80387A40(Actor *this) { this->volatile_initialized = TRUE; this->marker->actorFreeFunc = CCW_func_80387A20; local->unk4 = &D_8038EC00[0]; - while((local->unk4->unk0 != 0) && (map_get() != local->unk4->unk0)) { + while((local->unk4->unk0 != 0) && (gsworld_get_map() != local->unk4->unk0)) { local->unk4++; } local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex(); diff --git a/src/CCW/code_160.c b/src/CCW/code_160.c index 62dc19c6..97d961f1 100644 --- a/src/CCW/code_160.c +++ b/src/CCW/code_160.c @@ -205,7 +205,7 @@ void func_8038687C(Actor *this) { item_set(ITEM_6_HOURGLASS, 1); item_set(ITEM_0_HOURGLASS_TIMER, 1800 - 1); func_803865F4(this, 3); - } else if ((local->unk0 != NULL) && (map_get() == MAP_5A_CCW_SUMMER_ZUBBA_HIVE)) { + } else if ((local->unk0 != NULL) && (gsworld_get_map() == MAP_5A_CCW_SUMMER_ZUBBA_HIVE)) { player_getPosition(sp40); if ((ml_vec3f_distance(this->position, sp40) < 300.0f) && (player_getTransformation() == TRANSFORM_1_BANJO)) { func_803865F4(this, 2); diff --git a/src/CCW/code_1B20.c b/src/CCW/code_1B20.c index a5b6da78..9765553d 100644 --- a/src/CCW/code_1B20.c +++ b/src/CCW/code_1B20.c @@ -52,13 +52,13 @@ void func_80387F64(Actor *this, s32 next_state){ skeletalAnim_setBehavior(this->unk148, local->unk0->unk2); } if (next_state == 2) { - if (map_get() == MAP_43_CCW_SPRING) { + if (gsworld_get_map() == MAP_43_CCW_SPRING) { coMusicPlayer_playMusic(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); } fileProgressFlag_set(local->unk0->unk8, TRUE); skeletalAnim_set(this->unk148, local->unk0->unk4, 0.0f, 6.0f); skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); - if (map_get() == MAP_43_CCW_SPRING) { + if (gsworld_get_map() == MAP_43_CCW_SPRING) { func_80324E38(0.0f, 3); } timed_setStaticCameraToNode(0.0f, 0); @@ -70,7 +70,7 @@ void func_80387F64(Actor *this, s32 next_state){ timedFunc_set_0(6.1f, func_80387F10); timedFunc_set_2(8.0f, (GenFunction_2)func_80387F38, (s32) this->marker, 3); } else { - if (map_get() == MAP_43_CCW_SPRING) { + if (gsworld_get_map() == MAP_43_CCW_SPRING) { timed_exitStaticCamera(7.0f); func_80324E38(7.0f, 0); } @@ -97,7 +97,7 @@ void CCW_func_80388278(ActorMarker *marker, ActorMarker *other_marker) { void func_803882A4(ActorMarker* marker, ActorMarker *other_marker) { Actor* actor = marker_getActor(marker); - if (map_get() == MAP_43_CCW_SPRING && actor->state == 1) { + if (gsworld_get_map() == MAP_43_CCW_SPRING && actor->state == 1) { func_80387F64(actor, 2); } } @@ -156,7 +156,7 @@ void func_80388478(Actor *this) { } } - if (!fileProgressFlag_get(FILEPROG_E3_CCW_FLOWER_SPRING) && (map_get() != MAP_43_CCW_SPRING)) { + if (!fileProgressFlag_get(FILEPROG_E3_CCW_FLOWER_SPRING) && (gsworld_get_map() != MAP_43_CCW_SPRING)) { marker_despawn(this->marker); } else{ diff --git a/src/CCW/code_2270.c b/src/CCW/code_2270.c index e1d82999..e87b1db9 100644 --- a/src/CCW/code_2270.c +++ b/src/CCW/code_2270.c @@ -55,7 +55,7 @@ void CCW_func_8038868C(Actor *this, s32 next_state) { skeletalAnim_set(local->unk4, ASSET_100_ANIM_GOBI_SPIT, 0.0f, 3.0f); skeletalAnim_setBehavior(local->unk4, 2); func_80324E38(0.0f, 3); - timed_setStaticCameraToNode(0.0f, (map_get() == MAP_44_CCW_SUMMER) ? 1 : 2); + timed_setStaticCameraToNode(0.0f, (gsworld_get_map() == MAP_44_CCW_SUMMER) ? 1 : 2); timed_playSfx(0.05f, SFX_84_GOBI_CRYING, 1.1f, 32000); timed_playSfx(0.8f, SFX_4B_GULPING, 0.8f, 28000); timed_playSfx(1.4f, SFX_4B_GULPING, 0.8f, 28000); @@ -145,13 +145,13 @@ void chGobiCCW_update(Actor *this) { fileProgressFlag_set(FILEPROG_E5_CCW_FLOWER_AUTUMN, FALSE); } local->unk0 = &D_8038ECD0[0]; - while((local->unk0->map_id != 0) && (map_get() != local->unk0->map_id)) { + while((local->unk0->map_id != 0) && (gsworld_get_map() != local->unk0->map_id)) { local->unk0++; } - if( (map_get() == MAP_44_CCW_SUMMER) && fileProgressFlag_get(FILEPROG_E3_CCW_FLOWER_SPRING) && !fileProgressFlag_get(FILEPROG_E4_CCW_FLOWER_SUMMER)) { + if( (gsworld_get_map() == MAP_44_CCW_SUMMER) && fileProgressFlag_get(FILEPROG_E3_CCW_FLOWER_SPRING) && !fileProgressFlag_get(FILEPROG_E4_CCW_FLOWER_SUMMER)) { CCW_func_8038868C(this, 1); - } else if( (map_get() == MAP_45_CCW_AUTUMN) && fileProgressFlag_get(FILEPROG_E4_CCW_FLOWER_SUMMER) && !fileProgressFlag_get(FILEPROG_E5_CCW_FLOWER_AUTUMN) ) { + } else if( (gsworld_get_map() == MAP_45_CCW_AUTUMN) && fileProgressFlag_get(FILEPROG_E4_CCW_FLOWER_SUMMER) && !fileProgressFlag_get(FILEPROG_E5_CCW_FLOWER_AUTUMN) ) { CCW_func_8038868C(this, 1); } else{ marker_despawn(this->marker); @@ -176,7 +176,7 @@ void chGobiCCW_update(Actor *this) { if(this->state == 3){ if (!func_80388438()) { - if (map_get() == MAP_44_CCW_SUMMER) { + if (gsworld_get_map() == MAP_44_CCW_SUMMER) { CCW_func_8038868C(this, 4); } else { CCW_func_8038868C(this, 5); diff --git a/src/CCW/code_3310.c b/src/CCW/code_3310.c index b7c2a4d3..c27b9db0 100644 --- a/src/CCW/code_3310.c +++ b/src/CCW/code_3310.c @@ -225,7 +225,7 @@ void CCW_func_80389BFC(Actor *this) { local->unk4 = 0U; } local->unk0 = &D_8038F080[0]; - while(local->unk0->map_id != 0 && map_get() != local->unk0->map_id){ + while(local->unk0->map_id != 0 && gsworld_get_map() != local->unk0->map_id){ local->unk0++; } diff --git a/src/CCW/code_3DA0.c b/src/CCW/code_3DA0.c index b3cb9fe2..78d33539 100644 --- a/src/CCW/code_3DA0.c +++ b/src/CCW/code_3DA0.c @@ -97,7 +97,7 @@ void chcaterpillar_update(Actor *this){ chcaterpillar_setState(this, 2); } else{//L8038A408 - map_id = map_get(); + map_id = gsworld_get_map(); if ( !fileProgressFlag_get(FILEPROG_E6_SPRING_EYRIE_HATCHED) || ( map_id == MAP_45_CCW_AUTUMN && !fileProgressFlag_get(FILEPROG_E7_SUMMER_EYRIE_FED)) ) { diff --git a/src/CCW/code_5BF0.c b/src/CCW/code_5BF0.c index d065ad6c..430bfdc6 100644 --- a/src/CCW/code_5BF0.c +++ b/src/CCW/code_5BF0.c @@ -98,7 +98,7 @@ void func_8038C41C(Actor *this) { } if (this->state == 0) { - if( map_get() == MAP_60_CCW_AUTUMN_NABNUTS_HOUSE + if( gsworld_get_map() == MAP_60_CCW_AUTUMN_NABNUTS_HOUSE && !jiggyscore_isSpawned(JIGGY_4A_CCW_NABNUT) && (this->marker->id == 0x1C6 || this->marker->id == 0x1CA) ){ diff --git a/src/CCW/code_6620.c b/src/CCW/code_6620.c index ff3d4775..9e90eba8 100644 --- a/src/CCW/code_6620.c +++ b/src/CCW/code_6620.c @@ -93,7 +93,7 @@ void func_8038CC4C(Actor *this) { this->volatile_initialized = TRUE; this->has_met_before = FALSE; local->unk0 = &D_8038F490[0]; - while(local->unk0->map_id != 0 && map_get() != local->unk0->map_id){ + while(local->unk0->map_id != 0 && gsworld_get_map() != local->unk0->map_id){ local->unk0++; } func_8038CB40(this, 1); diff --git a/src/CCW/code_6EC0.c b/src/CCW/code_6EC0.c index 6e5ef1e7..7f937c97 100644 --- a/src/CCW/code_6EC0.c +++ b/src/CCW/code_6EC0.c @@ -56,7 +56,7 @@ void func_8038D368(Actor *this) { this->volatile_initialized = TRUE; this->has_met_before = FALSE; local->unk0 = D_8038F600; - while (local->unk0->map != 0 && map_get() != local->unk0->map) { + while (local->unk0->map != 0 && gsworld_get_map() != local->unk0->map) { local->unk0++; } diff --git a/src/CCW/code_7120.c b/src/CCW/code_7120.c index 962f2dde..ce018c04 100644 --- a/src/CCW/code_7120.c +++ b/src/CCW/code_7120.c @@ -112,7 +112,7 @@ void func_8038D85C(Actor *this) { levelSpecificFlags_set(LEVEL_FLAG_25_CCW_UNKNOWN, TRUE); } - if ((levelSpecificFlags_get(LEVEL_FLAG_25_CCW_UNKNOWN) != FALSE) && (map_get() != MAP_43_CCW_SPRING)) { + if ((levelSpecificFlags_get(LEVEL_FLAG_25_CCW_UNKNOWN) != FALSE) && (gsworld_get_map() != MAP_43_CCW_SPRING)) { marker_despawn(this->marker); } return; diff --git a/src/FP/code_B4D0.c b/src/FP/code_B4D0.c index 51bb2786..56e9ff83 100644 --- a/src/FP/code_B4D0.c +++ b/src/FP/code_B4D0.c @@ -10,7 +10,7 @@ static struct { /* .code */ void func_803918C0(void){ Actor *pntWozza; - if(map_get() == MAP_7F_FP_WOZZAS_CAVE){ + if(gsworld_get_map() == MAP_7F_FP_WOZZAS_CAVE){ Me.sound = func_8030ED2C(SFX_128_FIRE_CRACKING, 2); sfxsource_playSfxAtVolume(Me.sound, 1.0f); pntWozza = actorArray_findActorFromActorId(0x353); @@ -33,7 +33,7 @@ void func_8039195C(void){ } void func_80391994(void){ - if(map_get() == MAP_7F_FP_WOZZAS_CAVE){ + if(gsworld_get_map() == MAP_7F_FP_WOZZAS_CAVE){ func_8030DB04(Me.sound, 22000, Me.position, 400.0f, 1200.0f); sfxSource_func_8030E2C4(Me.sound); } diff --git a/src/FP/ma/slalom.c b/src/FP/ma/slalom.c index 62f81783..7782fedc 100644 --- a/src/FP/ma/slalom.c +++ b/src/FP/ma/slalom.c @@ -238,7 +238,7 @@ void __maSlalom_loseDialogCallback(void){ timed_exitStaticCamera(0.0f); timedFunc_set_0(0.0f, __maSlalom_despawnAllGates); timedFunc_set_0(0.0f, __maSlalom_despawnAllBridges); - func_8028FA14(map_get(), 0x11); + func_8028FA14(gsworld_get_map(), 0x11); func_8028F66C(BS_INTR_2A); } @@ -267,7 +267,7 @@ void maSlalom_dialogCallback(ActorMarker *caller, enum asset_e text_id, s32 arg2 case 0xc10: //8038B358 func_8038ABDC(); - func_8028FA14(map_get(), 0x11); + func_8028FA14(gsworld_get_map(), 0x11); func_8028F66C(BS_INTR_2A); timedFunc_set_0(0.0f, __maSlalom_clearState); break; @@ -373,7 +373,7 @@ void maSlalom_init(void){ FP_func_8038AB60(0); - if(map_get() != MAP_27_FP_FREEZEEZY_PEAK || jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)){ + if(gsworld_get_map() != MAP_27_FP_FREEZEEZY_PEAK || jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)){ Me.state = MA_SLALOM_STATE_0_NONE; return; } diff --git a/src/FP/ma/snowbutton.c b/src/FP/ma/snowbutton.c index 3d1d5023..5724b449 100644 --- a/src/FP/ma/snowbutton.c +++ b/src/FP/ma/snowbutton.c @@ -24,7 +24,7 @@ static struct { /* .code */ void maSnowButton_init(void){ - if( map_get() != MAP_27_FP_FREEZEEZY_PEAK + if( gsworld_get_map() != MAP_27_FP_FREEZEEZY_PEAK || jiggyscore_isCollected(JIGGY_2D_FP_SNOWMAN_BUTTONS) || jiggyscore_isSpawned(JIGGY_2D_FP_SNOWMAN_BUTTONS) ){ diff --git a/src/FP/ma/snowy.c b/src/FP/ma/snowy.c index 2e636ea5..682cd039 100644 --- a/src/FP/ma/snowy.c +++ b/src/FP/ma/snowy.c @@ -23,7 +23,7 @@ static struct { /* .code */ void maSnowy_init(void){ - if( map_get() != MAP_27_FP_FREEZEEZY_PEAK + if( gsworld_get_map() != MAP_27_FP_FREEZEEZY_PEAK || jiggyscore_isCollected(JIGGY_31_FP_SIR_SLUSH) || jiggyscore_isSpawned(JIGGY_31_FP_SIR_SLUSH) ){ diff --git a/src/GV/code_4740.c b/src/GV/code_4740.c index 94fbc178..5a4ebef0 100644 --- a/src/GV/code_4740.c +++ b/src/GV/code_4740.c @@ -37,7 +37,7 @@ f32 GV_D_80391A70[3]; /* .code */ void func_8038AB30(ParticleEmitter *pCtrl, f32 position[3], s32 cnt){ - if(map_get() != MAP_1A_GV_INSIDE_JINXY) + if(gsworld_get_map() != MAP_1A_GV_INSIDE_JINXY) particleEmitter_setRGB(pCtrl, D_803910BC); else particleEmitter_setRGB(pCtrl, D_803910C8); diff --git a/src/GV/code_5570.c b/src/GV/code_5570.c index f254e661..0800ddcc 100644 --- a/src/GV/code_5570.c +++ b/src/GV/code_5570.c @@ -71,7 +71,7 @@ s32 func_8038BAA4(Actor *jiggy){ s32 tmp_v0; s32 sp18[3]; - map_get(); + gsworld_get_map(); sp18[0] = (s32)jiggy->position_x; sp18[1] = (s32)jiggy->position_y; sp18[2] = (s32)jiggy->position_z; diff --git a/src/GV/code_7FF0.c b/src/GV/code_7FF0.c index 82258485..46f52014 100644 --- a/src/GV/code_7FF0.c +++ b/src/GV/code_7FF0.c @@ -191,7 +191,7 @@ void func_8038E4DC(Actor *this){ } if(!this->volatile_initialized){ this->volatile_initialized = TRUE; - if(exit_get() == 3){ + if(gsworld_get_exit() == 3){ if(0.65 < this->unk48 && this->unk48 < 0.95){ func_80343E20(0x6a, 0x7ff8, 0.32842f, 0x34); } @@ -291,7 +291,7 @@ void func_8038E97C(Actor *this){ if(!this->volatile_initialized){ this->volatile_initialized = TRUE; - if(exit_get() == 7){ + if(gsworld_get_exit() == 7){ this->position_z += 117.0; this->position_y += 130.0; this->unk38_31 = 30; diff --git a/src/GV/code_9B70.c b/src/GV/code_9B70.c index ea985be9..684c9f1e 100644 --- a/src/GV/code_9B70.c +++ b/src/GV/code_9B70.c @@ -7,7 +7,7 @@ void func_8038FF60(void){} void func_8038FF68(void){ - if(map_get() != MAP_12_GV_GOBIS_VALLEY) return; + if(gsworld_get_map() != MAP_12_GV_GOBIS_VALLEY) return; if(jiggyscore_isCollected(JIGGY_42_GV_WATER_PYRAMID)){ func_8034DE60(&func_8034C528(0x190)->type_6D, 0.0f, 270.0f, 0.0f, 1); diff --git a/src/GV/matchinggame.c b/src/GV/matchinggame.c index 6ee0f7d9..9b992098 100644 --- a/src/GV/matchinggame.c +++ b/src/GV/matchinggame.c @@ -118,7 +118,7 @@ void gv_matchingGame_reset(void){ void gv_matchingGame_init(void){ Actor *actor; matchingGame.state = 0; - if(map_get() == MAP_13_GV_MEMORY_GAME){ + if(gsworld_get_map() == MAP_13_GV_MEMORY_GAME){ if( !jiggyscore_isSpawned(JIGGY_40_GV_MATCHING_GAME) //jiggy is collected || volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) //in FF minigame ){ diff --git a/src/GV/waterctrl.c b/src/GV/waterctrl.c index 1234a62e..efe55a8c 100644 --- a/src/GV/waterctrl.c +++ b/src/GV/waterctrl.c @@ -52,7 +52,7 @@ void gv_waterCtrl_init(void){ GV_D_80391B00.state = 0; - if(map_get() != MAP_15_GV_WATER_PYRAMID) return; + if(gsworld_get_map() != MAP_15_GV_WATER_PYRAMID) return; if(jiggyscore_isCollected(JIGGY_42_GV_WATER_PYRAMID)){ tmp_v0 = func_8034C528(400); diff --git a/src/MM/ch/conga.c b/src/MM/ch/conga.c index adb5918d..a832e466 100644 --- a/src/MM/ch/conga.c +++ b/src/MM/ch/conga.c @@ -59,7 +59,7 @@ bool __chConga_isPlayerNearCongaTree(Actor * this){ f32 plyr_pos[3]; f32 unused_tmpz; - if (map_get() != MAP_2_MM_MUMBOS_MOUNTAIN) { + if (gsworld_get_map() != MAP_2_MM_MUMBOS_MOUNTAIN) { return FALSE; } diff --git a/src/MM/ch/lmonkey.c b/src/MM/ch/lmonkey.c index f08be030..99d1bdc6 100644 --- a/src/MM/ch/lmonkey.c +++ b/src/MM/ch/lmonkey.c @@ -94,7 +94,7 @@ void chlmonkey_update(Actor *this) { actor_collisionOff(this); this->marker->propPtr->unk8_3 = 1; - if (map_get() != MAP_2_MM_MUMBOS_MOUNTAIN) { + if (gsworld_get_map() != MAP_2_MM_MUMBOS_MOUNTAIN) { func_80343DEC(this); } else {//L80388630 diff --git a/src/MMM/code_3120.c b/src/MMM/code_3120.c index 4a6f8989..f61e6f9c 100644 --- a/src/MMM/code_3120.c +++ b/src/MMM/code_3120.c @@ -31,7 +31,7 @@ void func_8038953C() { void func_80389544(void){ MMM_D_8038C4E0.unk0 = 0; MMM_D_8038C4E0.unk2 = 0; - if(map_get() == MAP_26_MMM_NAPPERS_ROOM){ + if(gsworld_get_map() == MAP_26_MMM_NAPPERS_ROOM){ if(jiggyscore_isCollected(JIGGY_5D_MMM_NAPPER)){ MMM_D_8038C4E0.unk1 = 2; } diff --git a/src/MMM/code_3420.c b/src/MMM/code_3420.c index 37d9aa41..455f07cf 100644 --- a/src/MMM/code_3420.c +++ b/src/MMM/code_3420.c @@ -319,7 +319,7 @@ void code3420_handleOrganGame(s32 arg0, s32 arg1) { func_80250170(0, 0x6A, 0); Me.state = 0; - if ((map_get() == MAP_1C_MMM_CHURCH) && (arg1 == 2)) { + if ((gsworld_get_map() == MAP_1C_MMM_CHURCH) && (arg1 == 2)) { Me.motzhand_marker = NULL; Me.pattern = 0; diff --git a/src/MMM/code_3D50.c b/src/MMM/code_3D50.c index beee9c56..8f369b8d 100644 --- a/src/MMM/code_3D50.c +++ b/src/MMM/code_3D50.c @@ -219,7 +219,7 @@ void func_8038A9B4(void){ MMM_D_8038C510.unk8 = 0; - if(map_get() == MAP_24_MMM_TUMBLARS_SHED){ + if(gsworld_get_map() == MAP_24_MMM_TUMBLARS_SHED){ MMM_D_8038C510.unkC = NULL; MMM_D_8038C510.unk0 = mapModel_getModel(0); MMM_D_8038C510.unk4 = NULL; diff --git a/src/TTC/ma/castle.c b/src/TTC/ma/castle.c index 00f72b63..f7829673 100644 --- a/src/TTC/ma/castle.c +++ b/src/TTC/ma/castle.c @@ -516,7 +516,7 @@ void maCastle_init(void) void *sp2C; void *sp28; - if( map_get() == MAP_7_TTC_TREASURE_TROVE_COVE + if( gsworld_get_map() == MAP_7_TTC_TREASURE_TROVE_COVE && levelSpecificFlags_get(LEVEL_FLAG_2_TTC_UNKNOWN) ){ sp2C = func_8034C5AC(0x12C); @@ -526,7 +526,7 @@ void maCastle_init(void) } } sMapState.model1 = 0; - if (map_get() != MAP_A_TTC_SANDCASTLE) + if (gsworld_get_map() != MAP_A_TTC_SANDCASTLE) { __maCastle_setsecretCheatCodeRelatedValue(); } diff --git a/src/core1/code_CE60.c b/src/core1/code_CE60.c index 12d6216b..970b9f8e 100644 --- a/src/core1/code_CE60.c +++ b/src/core1/code_CE60.c @@ -85,7 +85,7 @@ void core1_ce60_func_8024AAB0(void) { if (0 <= sTrackId[1]) sTrackId[3] = gcMusic_getDefaultVolumeForTrack(sTrackId[1]); - switch (map_get()) { + switch (gsworld_get_map()) { case MAP_7_TTC_TREASURE_TROVE_COVE: sTrackId[2] = ml_map_f(4700 - sPlayerPosition[1], 0.0f, 900.0f, 0.0f, sTrackId[2]); sTrackId[3] = ml_map_f(4700 - sPlayerPosition[1], 0.0f, 900.0f, sTrackId[3], 0.0f); @@ -200,7 +200,7 @@ void core1_ce60_func_8024AF48(void) { player_getPosition_s32(sPlayerPosition); core1_ce60_func_8024AAB0(); - switch(map_get()){ + switch(gsworld_get_map()){ case MAP_2_MM_MUMBOS_MOUNTAIN: if (core1_ce60_isPlayerInRange(-4450, 4550, 1900) || core1_ce60_isPlayerInRange(-6007, 6176, 620)) { core1_ce60_setChanMask(0x1cc0); diff --git a/src/core1/musicplayer.c b/src/core1/musicplayer.c index 33940f7b..3a8286cb 100644 --- a/src/core1/musicplayer.c +++ b/src/core1/musicplayer.c @@ -433,7 +433,7 @@ void playMusic(enum comusic_e comusic_id, s32 volume, s32 forceReInit) { if (track->track_id < 0 || forceReInit) { switch (comusic_id) { case COMUSIC_15_EXTRA_LIFE_COLLECTED: - if (map_get() == MAP_10_BGS_MR_VILE) { + if (gsworld_get_map() == MAP_10_BGS_MR_VILE) { break; } case COMUSIC_3B_MINIGAME_VICTORY: diff --git a/src/core2/abilityprogress.c b/src/core2/abilityprogress.c index e6eb89e4..0bc33b26 100644 --- a/src/core2/abilityprogress.c +++ b/src/core2/abilityprogress.c @@ -38,19 +38,19 @@ void ability_use(enum ability_used ability) { break; case ABILITY_USED_SWIM: - if (map_get() == MAP_1_SM_SPIRAL_MOUNTAIN) { + if (gsworld_get_map() == MAP_1_SM_SPIRAL_MOUNTAIN) { dialog_id = ASSET_DFC_BOTTLES_UNDERWATER_TUTORIAL; } break; case ABILITY_USED_CLIMB: - if (map_get() == MAP_1_SM_SPIRAL_MOUNTAIN) { + if (gsworld_get_map() == MAP_1_SM_SPIRAL_MOUNTAIN) { dialog_id = ASSET_E02_DIALOG_BOTTLES_CLIMB_OTHER; } break; case ABILITY_USED_BEAK_BARGE: - if (map_get() == MAP_1_SM_SPIRAL_MOUNTAIN) { + if (gsworld_get_map() == MAP_1_SM_SPIRAL_MOUNTAIN) { dialog_id = ASSET_E05_DIALOG_BOTTLES_KAZOOIE_BARGE; } break; @@ -58,7 +58,7 @@ void ability_use(enum ability_used ability) { case ABILITY_USED_SLIDE: play_ding = FALSE; if (!ability_isUnlocked(ABILITY_10_TALON_TROT)) { - if (map_get() == MAP_2_MM_MUMBOS_MOUNTAIN) { + if (gsworld_get_map() == MAP_2_MM_MUMBOS_MOUNTAIN) { dialog_id = ASSET_B4D_DIALOG_BOTTLES_SLIPPERY; } else { return; diff --git a/src/core2/anctrl.c b/src/core2/anctrl.c index f2d9beb4..ae54b16e 100644 --- a/src/core2/anctrl.c +++ b/src/core2/anctrl.c @@ -296,7 +296,7 @@ s32 anctrl_8028780C(f32 position[3], s32 arg1){ void anctrl_drawSetup(AnimCtrl *this, f32 *position, s32 arg2){ s32 map; - map = map_get(); + map = gsworld_get_map(); if( map != MAP_1E_CS_START_NINTENDO && map != MAP_1F_CS_START_RAREWARE && map != MAP_20_CS_END_NOT_100 diff --git a/src/core2/anseq.c b/src/core2/anseq.c index f6b15703..f7477eb8 100644 --- a/src/core2/anseq.c +++ b/src/core2/anseq.c @@ -54,8 +54,8 @@ void __anSeq_func_80289F4(s32 arg0) { s32 phi_a3; phi_a3 = arg0 >> 0x10; - if( !(phi_a3 == 0xF2 && map_get() == MAP_91_FILE_SELECT && gameSelect_getGameNumber() != 0) - && !((phi_a3 == 0x21 || phi_a3 == 0x3ED) && map_get() == MAP_91_FILE_SELECT && (gameSelect_getGameNumber() == 1)) + if( !(phi_a3 == 0xF2 && gsworld_get_map() == MAP_91_FILE_SELECT && gameSelect_getGameNumber() != 0) + && !((phi_a3 == 0x21 || phi_a3 == 0x3ED) && gsworld_get_map() == MAP_91_FILE_SELECT && (gameSelect_getGameNumber() == 1)) ){ gcsfx_playWithPitch(phi_a3, (f32) ((f64) ((arg0 >> 8) & 0xFF) * 0.0078125), (s32) ((f64) (arg0 & 0xFF) * 128.0)); } diff --git a/src/core2/ba/anim.c b/src/core2/ba/anim.c index 7a7313d4..d26c0d7e 100644 --- a/src/core2/ba/anim.c +++ b/src/core2/ba/anim.c @@ -121,7 +121,7 @@ void __baanim_applyBottlesBonus(s32 arg0, s32 arg1) { boneTransformList_setBoneScale(arg0, 0x64, scale); boneTransformList_setBoneScale(arg0, 0x67, scale); } - if (map_get() == MAP_A_TTC_SANDCASTLE) { + if (gsworld_get_map() == MAP_A_TTC_SANDCASTLE) { if ((D_8037BF4C & BAANIM_WISHYWASHY) && (player_getTransformation() != TRANSFORM_7_WISHWASHY)) { func_8028FB88(TRANSFORM_7_WISHWASHY); } diff --git a/src/core2/ba/marker.c b/src/core2/ba/marker.c index 61e0c6c9..e954b600 100644 --- a/src/core2/ba/marker.c +++ b/src/core2/ba/marker.c @@ -111,10 +111,10 @@ void __baMarker_8028B7F4(void){ void __baMarker_8028B848(void){ s32 s0 = 0; - if(map_get() == MAP_69_GL_MM_LOBBY){ + if(gsworld_get_map() == MAP_69_GL_MM_LOBBY){ s0 = ASSET_E57_DIALOG_FIRST_JIGGY; } - else if(map_get() == MAP_2_MM_MUMBOS_MOUNTAIN){ + else if(gsworld_get_map() == MAP_2_MM_MUMBOS_MOUNTAIN){ s0 = ASSET_B45_DIALOG_JIGGY_COLLECT_10; } @@ -596,7 +596,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ if(__baMarker_8028BC20(marker)) return; - if( map_get() == MAP_8E_GL_FURNACE_FUN + if( gsworld_get_map() == MAP_8E_GL_FURNACE_FUN && volatileFlag_get(VOLATILE_FLAG_0_IN_FURNACE_FUN_QUIZ) && !fileProgressFlag_get(FILEPROG_A6_FURNACE_FUN_COMPLETE) ){ @@ -613,7 +613,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ case MARKER_169_SNS_EGG: //L8028C908 { //ONLY THIS CASE DOESN'T MATCH - switch (map_get()) + switch (gsworld_get_map()) { case MAP_1D_MMM_CELLAR: //L8028C95C sns_set_item_and_update_payload(SNS_ITEM_EGG_CYAN, 0, 1); @@ -708,7 +708,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ case MARKER_61_EXTRA_LIFE: //L8028CD50 if(__baMarker_8028BC20(marker)) return; - if( map_get() == MAP_8E_GL_FURNACE_FUN + if( gsworld_get_map() == MAP_8E_GL_FURNACE_FUN && volatileFlag_get(VOLATILE_FLAG_0_IN_FURNACE_FUN_QUIZ) && !fileProgressFlag_get(FILEPROG_A6_FURNACE_FUN_COMPLETE) ){ diff --git a/src/core2/babounds.c b/src/core2/babounds.c new file mode 100644 index 00000000..6e2fcb50 --- /dev/null +++ b/src/core2/babounds.c @@ -0,0 +1,42 @@ +#include +#include "functions.h" +#include "variables.h" +#include "core2/ba/physics.h" + +/* .bss */ +struct{ + f32 max[3]; + f32 min[3]; + u8 attempted_return; +} D_8037C3C0; + +/* .code */ +void babounds_init(void){ + s32 max[3]; + s32 min[3]; + + mapModel_getBounds(min, max); + ml_vec3w_to_vec3f(D_8037C3C0.min, min); + ml_vec3w_to_vec3f(D_8037C3C0.max, max); + D_8037C3C0.min[0] -= 400.0f; + D_8037C3C0.min[1] = -8000.0f; + D_8037C3C0.min[2] -= 400.0f; + D_8037C3C0.max[0] += 400.0f; + D_8037C3C0.max[1] += 1000.0f; + D_8037C3C0.max[2] += 400.0f; + D_8037C3C0.attempted_return = 0; +} + +void babounds_update(void){ + f32 sp1C[3]; + _player_getPosition(sp1C); + if(!ml_vec3f_inside_box_vec3f(sp1C, D_8037C3C0.min, D_8037C3C0.max)){ + if(D_8037C3C0.attempted_return == 0){ + D_8037C3C0.attempted_return = 1; + func_8029B6F0(); + } + else{ + baphysics_set_type(BA_PHYSICS_FREEZE); + } + } +} diff --git a/src/core2/balookat.c b/src/core2/balookat.c new file mode 100644 index 00000000..cacbfae1 --- /dev/null +++ b/src/core2/balookat.c @@ -0,0 +1,107 @@ +#include +#include "functions.h" +#include "variables.h" + +typedef enum { + BA_LOOKAT_STATE_0_NONE, + BA_LOOKAT_STATE_1_UNKNOWN, + BA_LOOKAT_STATE_2_UNKNOWN, + BA_LOOKAT_STATE_3_UNKNOWN, + BA_LOOKAT_STATE_4_UNKNOWN, +} BaLookAtState; + +typedef struct{ + u8 state; + u8 lookat; + f32 position[3]; // position +}BaLookAt; + +/* .bss */ +BaLookAt s_lookat_stack[8]; +u8 s_length; +u8 s_lookat_state; + +/* .code */ +int balookat_try_get_position(f32 arg0[3]){ + if(!s_lookat_stack[s_length - 1].lookat) + return 0; + + ml_vec3f_copy(arg0, s_lookat_stack[s_length - 1].position); + return 1; +} + +BaLookAtState balookat_getState(void){ + if(!s_length){ + return 0; + } + return s_lookat_stack[s_length - 1].state; +} + +void balookat_init(void){ + s_lookat_state = 0; + s_length = 0; +} + +void balookat_pop(void){ + if(s_length){ + s_length--; + if(s_length == 0){ + baiFrame_startWithValue(1.2f); + s_lookat_state = 0; + } + } +} + +void balookat_push(BaLookAtState state){ + s_lookat_stack[s_length].state = state; + s_lookat_stack[s_length].lookat = FALSE; + ml_vec3f_clear(s_lookat_stack[s_length].position); + s_length++; +} + +void balookat_set_position(f32 position[3]){ + s_lookat_stack[s_length-1].lookat = TRUE; + ml_vec3f_copy(s_lookat_stack[s_length-1].position, position); +} + +void balookat_update_state(BaLookAtState state){ + int val = 0; + switch(state){ + case 1: + if(bs_checkInterrupt(BS_INTR_1E) == 2) + val = 1; + break; + case 2: + if(bs_checkInterrupt(BS_INTR_1C) == 2) + val = 1; + break; + case 3: + if(bs_checkInterrupt(BS_INTR_1D) == 2) + val = 1; + break; + case 4: + if(bs_checkInterrupt(BS_INTR_25) == 2) + val = 1; + break; + default: + val = 1; + break; + } + if(val) + s_lookat_state = state; +} + +void balookat_end(void){ + if(s_length != 0) + s_lookat_state = 0; +} + +void balookat_update(void){ + s32 tmp; + if(s_length){ + tmp = s_lookat_stack[s_length-1].state; + if(s_lookat_state != tmp){ + balookat_update_state(tmp); + } + } +} diff --git a/src/core2/bs/ant.c b/src/core2/bs/ant.c index d172e1ca..c3581989 100644 --- a/src/core2/bs/ant.c +++ b/src/core2/bs/ant.c @@ -397,7 +397,7 @@ void bsant_die_init(void){ baphysics_set_gravity(-1200.0f); pitch_setAngVel(1000.0f, 12.0f); func_802914CC(0xd); - ncDynamicCamD_func_802BF2C0(30.0f); + ncbadie_func_802BF2C0(30.0f); func_8029C984(); bsant_substate = 0; baMarker_collisionOff(); @@ -463,7 +463,7 @@ void func_8029F3F4(void){ func_802B3A50(); func_80299628(0); func_8029C6D0(); - if(!func_80298850()) + if(!balookat_getState()) sp1C = BS_35_ANT_IDLE; bs_setState(sp1C); diff --git a/src/core2/bs/bFly.c b/src/core2/bs/bFly.c index 3474c76b..e3e59f83 100644 --- a/src/core2/bs/bFly.c +++ b/src/core2/bs/bFly.c @@ -11,7 +11,7 @@ extern void baModel_setYDisplacement(f32); extern f32 bastick_getX(void); -extern void ncDynamicCam4_func_802BFE50(f32, f32, f32); +extern void ncbafly_func_802BFE50(f32, f32, f32); extern void func_80354030(f32[3], f32); extern BKCollisionTri *func_8029463C(void); @@ -336,7 +336,7 @@ void func_802A3F9C(void){ pitch_setIdeal(sp1C[0]); func_8029E070(1); func_802914CC(4); - ncDynamicCam4_func_802BFE74(1); + ncbafly_func_802BFE74(1); func_802A3430(); FUNC_8030E624(SFX_52_BANJO_YAH_OH, 1.0f, 28000); D_8037D345 = 0; @@ -579,7 +579,7 @@ void func_802A48B4(void) { if (item_getCount(ITEM_14_HEALTH) == 0) { func_8029C984(); func_8029151C(0xD); - ncDynamicCamD_func_802BF2C0(30.0f); + ncbadie_func_802BF2C0(30.0f); func_8029B930(); batimer_set(0, 2.5f); D_8037D344 = 2; @@ -648,7 +648,7 @@ void func_802A4A78(s32 arg0) { baphysics_set_target_horizontal_velocity(velocity); baphysics_set_target_yaw(sp28); baphysics_set_horizontal_velocity(sp28, baphysics_get_target_horizontal_velocity()); - if ((arg0 == 1) && (map_get() == MAP_90_GL_BATTLEMENTS)) { + if ((arg0 == 1) && (gsworld_get_map() == MAP_90_GL_BATTLEMENTS)) { yaw_setIdeal(mlNormalizeAngle(sp28)); yaw_applyIdeal(); } @@ -658,7 +658,7 @@ void func_802A4A78(s32 arg0) { baphysics_set_terminal_velocity(-4000.0f); func_8029E070(1); func_802914CC(4); - ncDynamicCam4_func_802BFE50(12.0f, 10000.0f, 800.0f); + ncbafly_func_802BFE50(12.0f, 10000.0f, 800.0f); baMarker_collisionOff(); func_802A3430(); } @@ -725,7 +725,7 @@ void func_802A4D90(void) { baphysics_set_target_horizontal_velocity(1300.0f); baphysics_set_target_yaw(sp34); baphysics_set_horizontal_velocity(sp34, baphysics_get_target_horizontal_velocity()); - if (map_get() == MAP_90_GL_BATTLEMENTS) { + if (gsworld_get_map() == MAP_90_GL_BATTLEMENTS) { yaw_setIdeal(mlNormalizeAngle(sp34)); yaw_applyIdeal(); } @@ -734,7 +734,7 @@ void func_802A4D90(void) { baphysics_set_gravity(-1800.0f); baMarker_collisionOff(); func_802914CC(4); - ncDynamicCam4_func_802BFE50(12.0f, 10000.0f, 800.0f); + ncbafly_func_802BFE50(12.0f, 10000.0f, 800.0f); } void func_802A4EC8(void) { @@ -774,7 +774,7 @@ void func_802A4FC8(void) { if (anctrl_isAt(baanim_getAnimCtrlPtr(), 0.1358f) != 0) { func_8030EBC8(SFX_2_CLAW_SWIPE, 0.6f, 0.7f, 10000, 12000); } - if (func_80298850() == 0) { + if (balookat_getState() == 0) { next_state = BS_24_FLY; } bs_setState(next_state); diff --git a/src/core2/bs/bLongLeg.c b/src/core2/bs/bLongLeg.c index 8d3e2deb..7972e277 100644 --- a/src/core2/bs/bLongLeg.c +++ b/src/core2/bs/bLongLeg.c @@ -478,7 +478,7 @@ void func_802A63F0(void){ func_8029C6D0(); func_80299628(1); - if(func_80298850() == 0) + if(balookat_getState() == 0) next_state = BS_26_LONGLEG_IDLE; if(func_802A51D0()) diff --git a/src/core2/bs/bSwim.c b/src/core2/bs/bSwim.c index 6b3b5892..89ced65f 100644 --- a/src/core2/bs/bSwim.c +++ b/src/core2/bs/bSwim.c @@ -65,7 +65,7 @@ void func_802A7304() { bool func_802A73BC(void) { f32 sp1C; - sp1C = (map_get() == MAP_46_CCW_WINTER) ? 90.0f : 130.0f; + sp1C = (gsworld_get_map() == MAP_46_CCW_WINTER) ? 90.0f : 130.0f; return floor_isCurrentFloorunk59() && player_getYPosition() > (floor_getCurrentFloorYPosition() - sp1C); } @@ -90,10 +90,10 @@ bool bsbswim_inSet(enum bs_e move_id){ || move_id == BS_2C_DIVE_B || move_id == BS_39_DIVE_A || move_id == BS_30_DIVE_ENTER - || move_id == BS_78_DIVE_LOCKED + || move_id == BS_78_DIVE_LOOKAT_DRONE || move_id == BS_7F_DIVE_OW || move_id == BS_54_SWIM_DIE - || move_id == BS_97_DIVE_LOCKED + || move_id == BS_97_DIVE_DRONE ; } @@ -286,7 +286,7 @@ void func_802A7BD0(void) { f32 sp30[3]; f32 sp24[3]; - func_80298760(func_80296560()); + barebound_set_active(func_80296560()); baanim_playForDuration_onceSmooth(0x1A0, 1.4f); basfx_playOwSfx(1.0f); _player_getPosition(sp30); @@ -294,7 +294,7 @@ void func_802A7BD0(void) { func_80257F18(sp24, sp30, &sp3C); yaw_setIdeal(mlNormalizeAngle(sp3C)); yaw_applyIdeal(); - baphysics_set_target_horizontal_velocity(func_802987D4()); + baphysics_set_target_horizontal_velocity(barebound_get_horizontal_velocity()); baphysics_set_target_yaw(sp3C); baphysics_set_horizontal_velocity(sp3C, baphysics_get_target_horizontal_velocity()); func_8029C7F4(1, 1, 2, BA_PHYSICS_LOCKED_ROTATION); @@ -387,7 +387,7 @@ void func_802A7F4C(void){ void func_802A7F6C(void) { D_8037D394 = BOOL(bs_getPrevState() == BS_41_DIE); - if (D_8037D394 || level_get() == LEVEL_9_RUSTY_BUCKET_BAY || map_get() == MAP_46_CCW_WINTER) { + if (D_8037D394 || level_get() == LEVEL_9_RUSTY_BUCKET_BAY || gsworld_get_map() == MAP_46_CCW_WINTER) { D_8037D395 = 0; } else { D_8037D395 = 1; @@ -444,7 +444,7 @@ void func_802A8098(void) { } if (batimer_isAt(1, 1.9f)) { func_802914CC(0xD); - ncDynamicCamD_func_802BF2C0(80.0f); + ncbadie_func_802BF2C0(80.0f); if (D_8037D394) { batimer_set(0, 0.5f); } else { @@ -473,12 +473,12 @@ void func_802A82D4(void) { func_802A75B0(); } -void func_802A8330(void) { +void __bsbswim_update_rotation(void) { f32 sp44[3]; f32 sp38[3]; f32 sp2C[3]; - if (func_80298850() && func_80298800(sp2C)) { + if (balookat_getState() && balookat_try_get_position(sp2C)) { _player_getPosition(sp44); func_8025727C(sp44[0], sp44[1], sp44[2], sp2C[0], sp2C[1], sp2C[2], &sp38[0], &sp38[1]); pitch_setIdeal(sp38[0]); @@ -487,28 +487,27 @@ void func_802A8330(void) { } } -void func_802A83C0(void) { +void bsbswim_lookat_init(void) { baanim_playForDuration_loopSmooth(0x70, 2.0f); func_802A7140(); baphysics_set_target_velocity(0); baphysics_set_acceleration(0.4f); func_802A744C(); - func_802A8330(); + __bsbswim_update_rotation(); } -void func_802A8410(void) { +void bsbswim_lookat_update(void) { s32 next_state; next_state = 0; - if (func_80298850() == 0) { + if (balookat_getState() == 0) { next_state = BS_2B_DIVE_IDLE; } - func_802A8330(); + __bsbswim_update_rotation(); bs_setState(next_state); } - -void func_802A844C(void){ +void bsbswim_lookat_end(void){ func_802A75B0(); } @@ -575,16 +574,16 @@ void func_802A872C(void){ func_802A75B0(); } -void func_802A874C(void){ +void bsbswim_drone_init(void){ func_802A744C(); bsdrone_init(); } -void func_802A8774(void){ +void bsbswim_drone_update(void){ bsdrone_update(); } -void func_802A8794(void){ +void bsbswim_drone_end(void){ bsdrone_end(); func_802A75B0(); } diff --git a/src/core2/bs/bTrot.c b/src/core2/bs/bTrot.c index 463d30f7..3e85a1ba 100644 --- a/src/core2/bs/bTrot.c +++ b/src/core2/bs/bTrot.c @@ -692,7 +692,7 @@ void bsbtrot_unk79_update(void){ func_8029C6D0(); func_802A8AD8(); func_80299628(1); - if(!func_80298850()) + if(!balookat_getState()) sp1C = BS_15_BTROT_IDLE; bs_setState(sp1C); } @@ -708,7 +708,7 @@ void bsbtrot_ow_init(void){ f32 sp24[3]; func_802A8A40(); - func_80298760(func_80296560()); + barebound_set_active(func_80296560()); baanim_playForDuration_onceSmooth(ASSET_66_ANIM_BSBTROT_OW, 1.1f); basfx_playOwSfx(1.0f); _player_getPosition(sp30); @@ -716,21 +716,21 @@ void bsbtrot_ow_init(void){ func_80257F18(sp24, sp30, &sp3C); yaw_setIdeal(mlNormalizeAngle(sp3C + 180.0f));\ yaw_applyIdeal(); - baphysics_set_target_horizontal_velocity(func_802987D4()); + baphysics_set_target_horizontal_velocity(barebound_get_horizontal_velocity()); baphysics_set_target_yaw(sp3C); baphysics_set_horizontal_velocity(sp3C, baphysics_get_target_horizontal_velocity()); func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION); - if(func_802987B4() == 2) + if(barebound_802987B4() == 2) baphysics_set_type(BA_PHYSICS_AIRBORN); - baphysics_set_vertical_velocity(func_802987C4()); - baphysics_set_gravity(func_802987E4()); + baphysics_set_vertical_velocity(barebound_get_vertical_velocity()); + baphysics_set_gravity(barebound_get_gravity()); baMarker_collisionOff(); baeyes_close(); } void bsbtrot_ow_update(void){ enum bs_e sp1C = 0; - if(func_802987B4() == 2) + if(barebound_802987B4() == 2) func_802B6FA8(); if(baanim_isAt(0.3f)) diff --git a/src/core2/bs/bWhirl.c b/src/core2/bs/bWhirl.c index e2e11908..74c74961 100644 --- a/src/core2/bs/bWhirl.c +++ b/src/core2/bs/bWhirl.c @@ -294,7 +294,7 @@ void func_802AAE08(void){ enum bs_e sp1C =0; __bsbwhirl_spawnSparkle(); func_8029C6D0(); - if(!func_80298850()) + if(!balookat_getState()) sp1C = BS_1B_WONDERWING_IDLE; bs_setState(sp1C); diff --git a/src/core2/bs/beeFly.c b/src/core2/bs/beeFly.c index f8100596..d9c425f1 100644 --- a/src/core2/bs/beeFly.c +++ b/src/core2/bs/beeFly.c @@ -11,7 +11,7 @@ f32 bastick_distance(void); f32 bastick_getAngleRelativeToBanjo(void); void baModel_setYDisplacement(f32); -void ncDynamicCam4_func_802BFE50(f32, f32, f32); +void ncbafly_func_802BFE50(f32, f32, f32); void yaw_setVelocityBounded(f32, f32); f32 bastick_getX(void); f32 bastick_getY(void); @@ -121,7 +121,7 @@ void _bsBeeFly_updateYaw(void){ f32 sp30; f32 stickX; stickX = bastick_getX(); - ncDynamicCam4_func_802BFE50(2.0f, 2000.0f, 350.0f); + ncbafly_func_802BFE50(2.0f, 2000.0f, 350.0f); if(bakey_held(BUTTON_R)){ yaw_setVelocityBounded(500.0f, 30.0f); sp34 = 6.0f; diff --git a/src/core2/bs/beeMain.c b/src/core2/bs/beeMain.c index 5dcd1b3b..b6200d21 100644 --- a/src/core2/bs/beeMain.c +++ b/src/core2/bs/beeMain.c @@ -8,7 +8,7 @@ f32 func_8029B41C(void); void func_80299628(s32); void yaw_applyIdeal(void); -void ncDynamicCamD_func_802BF2C0(f32); +void ncbadie_func_802BF2C0(f32); f32 baanim_getTimer(void); void baanim_setEndAndDuration(f32, f32); @@ -423,7 +423,7 @@ void bsbeemain_die_init(void){ baMarker_collisionOff(); baeyes_close(); func_802914CC(0xd); - ncDynamicCamD_func_802BF2C0(30.0f); + ncbadie_func_802BF2C0(30.0f); func_8029C984(); func_8030E58C(SFX_36_BANJO_DOH, 1.8f); batimer_set(0, 2.9f); @@ -491,7 +491,7 @@ void func_802A1FC8(void){ func_802B3A50(); func_80299628(0); func_8029C6D0(); - if(!func_80298850()){ + if(!balookat_getState()){ sp1C = BS_85_BEE_IDLE; } bs_setState(sp1C); @@ -509,7 +509,7 @@ void func_802A2054(void){ func_8025A2FC(-1, 0xFA0); core1_ce60_incOrDecCounter(TRUE); func_80291548(); - func_80298A64(); + balookat_end(); } void func_802A2098(void){ diff --git a/src/core2/bs/climb.c b/src/core2/bs/climb.c index 19e647e8..54be8aeb 100644 --- a/src/core2/bs/climb.c +++ b/src/core2/bs/climb.c @@ -144,7 +144,7 @@ void bsclimb_move_update(void){ bafalldamage_start(); func_802AB5C0(); - map = map_get(); + map = gsworld_get_map(); if( map == MAP_B_CC_CLANKERS_CAVERN || map == MAP_1B_MMM_MAD_MONSTER_MANSION @@ -204,7 +204,7 @@ void func_802ABCCC(void){ //bsclimb_unknown_9E_update void func_802ABD0C(void){ s32 next_state = 0; - if(!func_80298850()) + if(!balookat_getState()) next_state = BS_4F_CLIMB_IDLE; bs_setState(next_state); diff --git a/src/core2/bs/croc.c b/src/core2/bs/croc.c index 791680f7..bce9294b 100644 --- a/src/core2/bs/croc.c +++ b/src/core2/bs/croc.c @@ -445,7 +445,7 @@ void bscroc_die_init(void){ baMarker_collisionOff(); baeyes_close(); func_802914CC(0xd); - ncDynamicCamD_func_802BF2C0(30.0f); + ncbadie_func_802BF2C0(30.0f); func_8029C984(); func_8030E58C(SFX_36_BANJO_DOH, 1.8f); batimer_set(0, 2.9f); @@ -682,7 +682,7 @@ void bscroc_locked_update(void){ func_802B3A50(); func_80299628(0); func_8029C6D0(); - if(!func_80298850()){ + if(!balookat_getState()){ next_state = BS_5E_CROC_IDLE; } diff --git a/src/core2/bs/die.c b/src/core2/bs/die.c index ee253017..859a0678 100644 --- a/src/core2/bs/die.c +++ b/src/core2/bs/die.c @@ -55,7 +55,7 @@ void bsdie_init(void){ pitch_setAngVel(1000.0f, 12.0f); func_8029E070(1); func_8029151C(0xd); - ncDynamicCamD_func_802BF2C0(30.0f); + ncbadie_func_802BF2C0(30.0f); func_8029C984(); batimer_set(0,2.9f); D_8037D414 = 0; diff --git a/src/core2/bs/dronelook.c b/src/core2/bs/dronelook.c index 4f67350f..8abbff65 100644 --- a/src/core2/bs/dronelook.c +++ b/src/core2/bs/dronelook.c @@ -24,12 +24,12 @@ void bsDroneLook_init(void) { baphysics_set_velocity(0); ncDynamicCamera_enterFirstPerson(); __bsDroneLook_getEyePos(eye_position); - ncFirstPersonCamera_setZoomedOutPosition(eye_position); + ncba1p_setZoomedOutPosition(eye_position); player_getRotation(eye_rotation); eye_rotation[0] = 0.0f; eye_rotation[1] += 180.0f; eye_rotation[2] = 0.0f; - ncFirstPersonCamera_setZoomedOutRotation(eye_rotation); + ncba1p_setZoomedOutRotation(eye_rotation); baflag_set(BA_FLAG_17_FIRST_PERSON_VIEW); } @@ -42,14 +42,14 @@ void bsDroneLook_update(void) { next_state = 0; dt = time_getDelta(); - if (ncFirstPersonCamera_getState() == FIRSTPERSON_STATE_2_IDLE) { + if (ncba1p_getState() == FIRSTPERSON_STATE_2_IDLE) { //camera is in "idle" state - ncFirstPersonCamera_getZoomedInRotation(eye_rotation); + ncba1p_getZoomedInRotation(eye_rotation); eye_rotation[0] -= bastick_getY() * 90.0f * dt; eye_rotation[1] -= bastick_getX() * 90.0f * dt; eye_rotation[2] = 0.0f; eye_rotation[0] = (eye_rotation[0] > 180.0f) ? ml_max_f(305.0f, eye_rotation[0]) : ml_min_f(70.0f, eye_rotation[0]); - ncFirstPersonCamera_setZoomedOutRotation(eye_rotation); + ncba1p_setZoomedOutRotation(eye_rotation); yaw_setIdeal(eye_rotation[1] + 180.0f); exit_first_person = FALSE; @@ -70,12 +70,12 @@ void bsDroneLook_update(void) { } } __bsDroneLook_getEyePos(eye_position); - ncFirstPersonCamera_setZoomedOutPosition(eye_position); + ncba1p_setZoomedOutPosition(eye_position); bs_setState(next_state); } void bsDroneLook_end(void) { - if (func_80298850() == 0) { + if (balookat_getState() == 0) { basfx_80299D2C(SFX_12E_CAMERA_ZOOM_MEDIUM, 1.2f, 12000); } ncDynamicCamera_exitFirstPerson(); diff --git a/src/core2/bs/dronexform.c b/src/core2/bs/dronexform.c index c23d87f0..a2371538 100644 --- a/src/core2/bs/dronexform.c +++ b/src/core2/bs/dronexform.c @@ -442,7 +442,7 @@ void bsdronexform_end(void){ func_8031B990(0xff,0xff,0xff); func_802AFADC(); func_802B014C(); - func_80298A64(); + balookat_end(); baflag_clear(BA_FLAG_1B_TRANSFORMING); } diff --git a/src/core2/bs/jig.c b/src/core2/bs/jig.c index 0cd28448..eb336915 100644 --- a/src/core2/bs/jig.c +++ b/src/core2/bs/jig.c @@ -117,7 +117,7 @@ void bsjig_jiggy_end(void){ transitionToMap(MAP_95_CS_END_ALL_100, 0, 1); } else {//L802B0DFC if( jiggyscore_total() == 2 - && map_get() == MAP_2_MM_MUMBOS_MOUNTAIN + && gsworld_get_map() == MAP_2_MM_MUMBOS_MOUNTAIN ){ sp2C = VER_SELECT(0xb51, 0x96f, 0, 0); sp28 = 0xe; @@ -137,7 +137,7 @@ void bsjig_jiggy_end(void){ gcdialog_showDialog(sp2C, sp28, 0, 0, 0, 0); } }//L802B0EA4 - func_80298A64(); + balookat_end(); } void bsjig_jiggy_interrupt(void){ @@ -164,7 +164,7 @@ void bsjig_notedoor_end(void){ func_8028F918(2); transitionToMap(MAP_95_CS_END_ALL_100, 0, 1); } - func_80298A64(); + balookat_end(); } void bsjig_notedoor_init(void){ diff --git a/src/core2/bs/pumpkin.c b/src/core2/bs/pumpkin.c index bfed4961..9c8cd45b 100644 --- a/src/core2/bs/pumpkin.c +++ b/src/core2/bs/pumpkin.c @@ -455,7 +455,7 @@ void bspumpkin_die_init(void) { baphysics_set_gravity(-1200.0f); pitch_setAngVel(1000.0f, 12.0f); func_802914CC(0xD); - ncDynamicCamD_func_802BF2C0(30.0f); + ncbadie_func_802BF2C0(30.0f); func_8029C984(); baMarker_collisionOff(); baeyes_close(); @@ -546,7 +546,7 @@ void func_802B34F8(void) { next_state = 0; func_802B3A50(); func_8029C6D0(); - if (func_80298850() == 0) { + if (balookat_getState() == 0) { next_state = BS_48_PUMPKIN_IDLE; } bs_setState(next_state); diff --git a/src/core2/bs/rebound.c b/src/core2/bs/rebound.c index f3552b17..593992cc 100644 --- a/src/core2/bs/rebound.c +++ b/src/core2/bs/rebound.c @@ -54,15 +54,15 @@ void func_802B360C(void) { batimer_set(6, sp24); } else { func_802B35D0(0); - func_80298760(sp1C); + barebound_set_active(sp1C); yaw_setIdeal(mlNormalizeAngle(sp28 + 180.0f)); - baphysics_set_target_horizontal_velocity(func_802987D4()); + baphysics_set_target_horizontal_velocity(barebound_get_horizontal_velocity()); baphysics_set_target_yaw(sp28); baphysics_set_horizontal_velocity(sp28, baphysics_get_target_horizontal_velocity()); - baphysics_set_vertical_velocity(func_802987C4()); - baphysics_set_gravity(func_802987E4()); + baphysics_set_vertical_velocity(barebound_get_vertical_velocity()); + baphysics_set_gravity(barebound_get_gravity()); func_8029C7F4(1, 1, 2, BA_PHYSICS_LOCKED_ROTATION); - if (func_802987B4() == 2) { + if (barebound_802987B4() == 2) { baphysics_set_type(BA_PHYSICS_AIRBORN); } } @@ -80,7 +80,7 @@ void func_802B37DC(void) { baphysics_set_velocity(velocity); baphysics_set_target_horizontal_velocity(0.0f); } - } else if (func_802987B4() == 2) { + } else if (barebound_802987B4() == 2) { func_802B6FA8(); } } @@ -115,7 +115,7 @@ void func_802B3954(void) { next_state = 0; anim_ctrl = baanim_getAnimCtrlPtr(); - if (batimer_decrement(0) && map_get() == MAP_93_GL_DINGPOT) { + if (batimer_decrement(0) && gsworld_get_map() == MAP_93_GL_DINGPOT) { baMarker_collisionOn(); } func_802B37DC(); diff --git a/src/core2/bs/rest.c b/src/core2/bs/rest.c index 72c3a89a..03c64441 100644 --- a/src/core2/bs/rest.c +++ b/src/core2/bs/rest.c @@ -9,9 +9,9 @@ void func_802B3A50(void) { f32 plyr_pos[3]; f32 sp1C[3]; - if (func_80298850()) { + if (balookat_getState()) { _player_getPosition(plyr_pos); - if (func_80298800(sp1C) && func_80257F18(plyr_pos, sp1C, &sp34)) { + if (balookat_try_get_position(sp1C) && func_80257F18(plyr_pos, sp1C, &sp34)) { yaw_setIdeal(sp34); } } @@ -59,13 +59,13 @@ bool func_802B3BB0(void) { if (baanim_isStopped() != 0) { if (anctrl_isPlayedForwards(anim_ctrl) != 0) { baanim_playForDuration_loopSmooth(ASSET_14A_ANIM_BSREST_LISTEN, 11.4f); - } else if (func_80298850() == 0) { + } else if (balookat_getState() == 0) { sp20 = TRUE; } } break; case ASSET_14A_ANIM_BSREST_LISTEN: - if (func_80298850() == 0) { + if (balookat_getState() == 0) { anctrl_reset(anim_ctrl); anctrl_setDirection(anim_ctrl, 0); anctrl_setIndex(anim_ctrl, 0x167); @@ -76,7 +76,7 @@ bool func_802B3BB0(void) { } break; default: - if (func_80298850() == 0) { + if (balookat_getState() == 0) { sp20 = TRUE; } break; @@ -101,7 +101,7 @@ void func_802B3D1C(void) { next_state = 0; if (player_inWater() != 0) { - next_state = BS_77_SWIM_LOCKED; + next_state = BS_77_SWIM_LOOKAT_DRONE; } if (func_802B3BB0() != 0) { next_state = bs_getIdleState(); @@ -127,7 +127,7 @@ void func_802B3DBC(void) { next_state = 0; if (player_inWater() != 0) { - next_state = BS_77_SWIM_LOCKED; + next_state = BS_77_SWIM_LOOKAT_DRONE; } if (func_802B3BB0() != 0) { next_state = bs_getIdleState(); @@ -155,12 +155,12 @@ void func_802B3E64(void) { next_state = 0; func_8029C6D0(); if (player_inWater()) { - next_state = BS_77_SWIM_LOCKED; + next_state = BS_77_SWIM_LOOKAT_DRONE; } if (func_802B3BB0()) { next_state = bs_getIdleState(); } - if (map_get() == MAP_27_FP_FREEZEEZY_PEAK && baflag_isTrue(BA_FLAG_14_LOSE_BOGGY_RACE)) { + if (gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK && baflag_isTrue(BA_FLAG_14_LOSE_BOGGY_RACE)) { next_state = func_8029CA94(next_state); } bs_setState(next_state); diff --git a/src/core2/bs/sled.c b/src/core2/bs/sled.c index ceb13f0b..9324c3d8 100644 --- a/src/core2/bs/sled.c +++ b/src/core2/bs/sled.c @@ -7,7 +7,7 @@ ActorMarker *bssled_gSledMarker; /* .code */ -void func_802B3F20(void){ +void __bssled_linkSledMarker(void){ Actor *sled; bssled_gSledMarker = func_80296554(); @@ -15,7 +15,7 @@ void func_802B3F20(void){ sled->unk138_20 = TRUE; } -void func_802B3F60(void){ +void __bssled_unlinkSledMarker(void){ Actor *sled; if(bssled_gSledMarker != NULL){ sled = marker_getActor(bssled_gSledMarker); @@ -25,12 +25,16 @@ void func_802B3F60(void){ } void bssled_init(void){ - func_802B3F20(); + __bssled_linkSledMarker(); baanim_playForDuration_loopSmooth(ASSET_228_ANIM_BANJO_SLED, 1.8f); func_8029C7F4(1, 1, 3, BA_PHYSICS_FREEZE); baphysics_set_target_horizontal_velocity(0.0f); func_80294A8C(0); func_80294378(6); + +#if VERSION != VERSION_USA_1_0 + baMarker_8028D638(0x34, 0x30); +#endif } void bssled_update(void){ @@ -43,14 +47,17 @@ void bssled_update(void){ void bssled_end(void){ func_80294A8C(1); func_80294378(1); - func_802B3F60(); + __bssled_unlinkSledMarker(); roll_setIdeal(0.0f); pitch_setIdeal(0.0f); +#if VERSION != VERSION_USA_1_0 + baMarker_8028D638(0, 0); +#endif } void bssled_interrupt(void){ if(bs_getInterruptType() == BS_INTR_28){ - func_802B3F60(); + __bssled_unlinkSledMarker(); bs_setInterruptResponse(2); } else{ diff --git a/src/core2/bs/stand.c b/src/core2/bs/stand.c index 1b09baee..3166b099 100644 --- a/src/core2/bs/stand.c +++ b/src/core2/bs/stand.c @@ -51,16 +51,16 @@ u32 func_802B4870(u32 arg0){ s32 func_802B488C(s32 arg0){ s32 retVal = arg0; switch(bastick_getZone()){ - case 1: //L802B48CC + case 1: retVal = BS_WALK_CREEP; break; - case 2: //L802B48D4 + case 2: retVal = BS_2_WALK_SLOW; break; - case 3: //L802B48D4 + case 3: retVal = BS_WALK; break; - case 4: //L802B48D4 + case 4: retVal = BS_4_WALK_FAST; break; } @@ -278,13 +278,11 @@ void bsstand_end(void){ baeyes_open(); } -//bsStand_Land_init void bsstand_landing_init(void){ func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL); baphysics_set_target_horizontal_velocity(0.0f); } -//bsStand_Land_update void bsstand_landing_update(void){ s32 sp1C = 0; AnimCtrl * sp18 = baanim_getAnimCtrlPtr(); diff --git a/src/core2/bs/swim.c b/src/core2/bs/swim.c index 518b4ad0..2641d201 100644 --- a/src/core2/bs/swim.c +++ b/src/core2/bs/swim.c @@ -31,7 +31,7 @@ s16 bsSwimAnimations[10] = { u32 bsSwimCurrentAnimation; /* .code */ -void func_802B5480(void) { +void __bsswim_createBubble(void) { f32 bubble_spawn_position[3]; ParticleEmitter *bubble_emitter; @@ -47,7 +47,7 @@ void func_802B5480(void) { } } -void func_802B5538(AnimCtrl *arg0) { +void __bsswim_updateIdleAnimation(AnimCtrl *arg0) { enum asset_e sp24; sp24 = bsSwimAnimations[bsSwimCurrentAnimation]; @@ -62,7 +62,7 @@ void func_802B5538(AnimCtrl *arg0) { } } -void func_802B55DC(void) { +void __bsswim_updateVelocity(void) { f32 sp1C; sp1C = bastick_getZonePosition(); @@ -73,10 +73,10 @@ void func_802B55DC(void) { baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp1C, bsSwimHorzVelocityMin, bsSwimHorzVelocityMax)); } -void swim_enteredWater(void) { +void __bsswim_enteredWater(void) { if (level_get() == LEVEL_9_RUSTY_BUCKET_BAY) { progressDialog_showDialogMaskZero(FILEPROG_AB_SWIM_OILY_WATER); - } else if (map_get() == MAP_46_CCW_WINTER) { + } else if (gsworld_get_map() == MAP_46_CCW_WINTER) { progressDialog_showDialogMaskZero(FILEPROG_DD_HAS_TOUCHED_CCW_ICY_WATER); } baphysics_set_gravity(100.0f); @@ -87,7 +87,7 @@ void swim_enteredWater(void) { } -void func_802B56D4(void) { +void __bsswim_end(void) { if (!bsswim_inset(bs_getNextState())) { baphysics_reset_terminal_velocity(); baphysics_reset_gravity(); @@ -100,12 +100,12 @@ bool bsswim_inset(enum bs_e state_id){ return state_id == BS_2D_SWIM_IDLE || state_id == BS_2E_SWIM || state_id == BS_4C_LANDING_IN_WATER - || state_id == BS_77_SWIM_LOCKED - || state_id == BS_96_SWIM_LOCKED + || state_id == BS_77_SWIM_LOOKAT_DRONE + || state_id == BS_96_SWIM_DRONE ; } -void func_802B5774(void) { +void bsswim_idle_init(void) { AnimCtrl *anim_ctrl; s32 prev_state; f32 transition_duration; @@ -121,7 +121,7 @@ void func_802B5774(void) { if (prev_state == BS_54_SWIM_DIE) { basfx_80299CF4(SFX_AF_BANJO_CATCHING_BREATH, 1.0f, 30000); } else { - basfx_80299CF4(SFX_AF_BANJO_CATCHING_BREATH, 1.0f, (s32) ml_map_f(item_getCount(ITEM_17_AIR), 3600.0f, 0.0f, 8000.0f, 30000.0f)); + basfx_80299CF4(SFX_AF_BANJO_CATCHING_BREATH, 1.0f, (s32) ml_map_f(item_getCount(ITEM_17_AIR), (60.0f * FRAMERATE), 0.0f, 8000.0f, 30000.0f)); } bainput_setDiveCooldown(4, 0.7f); } @@ -142,11 +142,12 @@ void func_802B5774(void) { func_8029C7F4(1, 3, 3, BA_PHYSICS_NORMAL); yaw_setVelocityBounded(500.0f, 5.0f); baphysics_set_target_horizontal_velocity(0.0f); - swim_enteredWater(); + __bsswim_enteredWater(); bsSwimCurrentAnimation = 0; } +// #endif -void func_802B5950(void) { +void bsswim_idle_update(void) { s32 next_state; AnimCtrl *anim_ctrl; @@ -156,13 +157,13 @@ void func_802B5950(void) { func_8029C304(1); } if ((globalTimer_getTimeMasked(7) == 0) && ((f64) randf() < 0.5)) { - func_802B5480(); + __bsswim_createBubble(); } if (anctrl_isAt(anim_ctrl, 0.01f) != 0) { func_8030EC20(SFX_DC_IDLE_PADDLING, 0.85f, 1.15f, 16000, 16000); } if (anctrl_isAt(anim_ctrl, 0.4348f) != 0) { - func_802B5538(anim_ctrl); + __bsswim_updateIdleAnimation(anim_ctrl); } if (bastick_getZone() == 1) { next_state = BS_2E_SWIM; @@ -185,11 +186,11 @@ void func_802B5950(void) { bs_setState(next_state); } -void func_802B5AF8(void){ - func_802B56D4(); +void bsswim_idle_end(void){ + __bsswim_end(); } -void func_802B5B18(void) { +void bsswim_swim_init(void) { AnimCtrl *anim_ctrl; f32 anim_duration; @@ -216,7 +217,7 @@ void func_802B5B18(void) { baphysics_set_type(BA_PHYSICS_NORMAL); } -void func_802B5C40(void) { +void bsswim_swim_update(void) { s32 next_state; AnimCtrl *anim_ctrl; f32 sp1C[3]; @@ -235,7 +236,7 @@ void func_802B5C40(void) { if (anctrl_isAt(anim_ctrl, 0.7f)) { func_8030EB88(SFX_12_WATER_PADDLING_1, 0.9f, 1.1f); } - func_802B55DC(); + __bsswim_updateVelocity(); if (bastick_getZone() == 0) { next_state = BS_2D_SWIM_IDLE; } @@ -262,57 +263,57 @@ void func_802B5C40(void) { bs_setState(next_state); } -void func_802B5E10(void){ - func_802B56D4(); +void bsswim_swim_end(void){ + __bsswim_end(); } -void func_802B5E30(void) { - f32 sp34; +void __bsswim_update_rotation(void) { + f32 rotation; f32 plyr_pos[3]; - f32 sp1C[3]; + f32 target_pos[3]; - if (func_80298850() != 0) { + if (balookat_getState() != 0) { _player_getPosition(plyr_pos); - if (func_80298800(sp1C) && func_80257F18(plyr_pos, sp1C, &sp34)) { - yaw_setIdeal(sp34); + if (balookat_try_get_position(target_pos) && func_80257F18(plyr_pos, target_pos, &rotation)) { + yaw_setIdeal(rotation); } } } -void func_802B5E8C(void) { - baanim_playForDuration_loopSmooth(0x57, 1.2f); +void bsswim_lookat_init(void) { + baanim_playForDuration_loopSmooth(ASSET_57_ANIM_BSSWIM_IDLE, 1.2f); func_8029C7F4(1, 3, 3, BA_PHYSICS_NORMAL); yaw_setVelocityBounded(500.0f, 5.0f); baphysics_set_target_horizontal_velocity(0.0f); - swim_enteredWater(); - func_802B5E30(); + __bsswim_enteredWater(); + __bsswim_update_rotation(); } -void func_802B5EFC(void) { +void bsswim_lookat_update(void) { enum bs_e next_state; next_state = 0; - if (func_80298850() == 0) { + if (balookat_getState() == 0) { next_state = BS_2D_SWIM_IDLE; } - func_802B5E30(); + __bsswim_update_rotation(); bs_setState(next_state); } -void func_802B5F38(void){ - func_802B56D4(); +void bsswim_lookat_end(void){ + __bsswim_end(); } -void func_802B5F58(void){ - swim_enteredWater(); +void bsswim_drone_init(void){ + __bsswim_enteredWater(); bsdrone_init(); } -void func_802B5F80(void){ +void bsswim_drone_update(void){ bsdrone_update(); } -void func_802B5FA0(void){ +void bsswim_drone_end(void){ bsdrone_end(); - func_802B56D4(); + __bsswim_end(); } diff --git a/src/core2/bs/timeout.c b/src/core2/bs/timeout.c index 6a9bffc4..9a0fb89d 100644 --- a/src/core2/bs/timeout.c +++ b/src/core2/bs/timeout.c @@ -7,7 +7,7 @@ void baeyes_openSingleEye(s32, f32); f32 func_8029B41C(void); -void ncDynamicCamD_func_802BF2C0(f32); +void ncbadie_func_802BF2C0(f32); void func_802B6270(void){ baanim_playForDuration_once(ASSET_77_ANIM_BSTIMEOUT, 3.2f); @@ -15,7 +15,7 @@ void func_802B6270(void){ baphysics_set_target_horizontal_velocity(0.0f); func_802914CC(0xd); yaw_setIdeal(func_8029B41C() + 35.0f); - ncDynamicCamD_func_802BF2C0(80.0f); + ncbadie_func_802BF2C0(80.0f); func_8025A58C(0,0xfa0); comusic_playTrack(COMUSIC_3C_MINIGAME_LOSS); core1_ce60_incOrDecCounter(FALSE); @@ -56,7 +56,7 @@ void func_802B63F8(void){ baphysics_set_target_horizontal_velocity(0.0f); func_802914CC(0xd); yaw_setIdeal(func_8029B41C() + 35.0f); - ncDynamicCamD_func_802BF2C0(80.0f); + ncbadie_func_802BF2C0(80.0f); func_8025A58C(0,0xfa0); comusic_playTrack(COMUSIC_3C_MINIGAME_LOSS); core1_ce60_incOrDecCounter(FALSE); diff --git a/src/core2/bs/walrus.c b/src/core2/bs/walrus.c index 5b60c169..1aba60b8 100644 --- a/src/core2/bs/walrus.c +++ b/src/core2/bs/walrus.c @@ -6,6 +6,7 @@ #include "core2/ba/timer.h" extern void func_8029AD68(f32, s32); +extern ParticleEmitter *func_802F1EC8(f32 *); int bswalrus_inSet(enum bs_e state); @@ -371,7 +372,7 @@ static void __bswalrus_recoil_init(s32 damage){ f32 sp30[3]; f32 sp24[3]; - func_80298760(func_80296560()); + barebound_set_active(func_80296560()); baanim_playForDuration_onceSmooth(0x19c, 1.0f); if(damage == 1) func_8030E58C(SFX_38_BANJO_AYE_1, 1.8f); @@ -383,12 +384,12 @@ static void __bswalrus_recoil_init(s32 damage){ func_80257F18(sp24, sp30, &sp3C); yaw_setIdeal(mlNormalizeAngle(sp3C + 180.0f)); yaw_applyIdeal(); - baphysics_set_target_horizontal_velocity(func_802987D4()); + baphysics_set_target_horizontal_velocity(barebound_get_horizontal_velocity()); baphysics_set_target_yaw(sp3C); baphysics_set_horizontal_velocity(sp3C, baphysics_get_target_horizontal_velocity()); func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION); - baphysics_set_vertical_velocity(func_802987C4()); - baphysics_set_gravity(func_802987E4()); + baphysics_set_vertical_velocity(barebound_get_vertical_velocity()); + baphysics_set_gravity(barebound_get_gravity()); baMarker_collisionOff(); baeyes_close(); func_802B8110(); @@ -465,7 +466,7 @@ void bswalrus_die_init(void){ baphysics_set_gravity(-1200.0f); pitch_setAngVel(1000.0f, 12.0f); func_802914CC(0xd); - ncDynamicCamD_func_802BF2C0(30.0f); + ncbadie_func_802BF2C0(30.0f); func_8025AB00(); func_8025A2FC(0, 0xfa0); comusic_playTrack(0x1A); @@ -544,7 +545,7 @@ void func_802B9130(void){ func_802B3A50(); func_80299628(0); func_8029C6D0(); - if(!func_80298850()) + if(!balookat_getState()) next_state = BS_7D_WALRUS_SLED; bs_setState(next_state); @@ -729,7 +730,7 @@ void bswalrus_timeout_init(void) { func_8029C7F4(1, 1, 3, BA_PHYSICS_FREEZE); baphysics_set_target_horizontal_velocity(0.0f); func_802914CC(0xD); - ncDynamicCamD_func_802BF2C0(60.0f); + ncbadie_func_802BF2C0(60.0f); func_8025A58C(0, 4000); comusic_playTrack(COMUSIC_3C_MINIGAME_LOSS); core1_ce60_incOrDecCounter(FALSE); diff --git a/src/core2/ch/beehive.c b/src/core2/ch/beehive.c index 2e03d602..baca2101 100644 --- a/src/core2/ch/beehive.c +++ b/src/core2/ch/beehive.c @@ -46,7 +46,7 @@ void chBeehive_update(Actor *this){ this->volatile_initialized = TRUE; this->unk38_0 = volatileFlag_get(VOLATILE_FLAG_1)| volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE); }//L802CE960 - if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){ + if(gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK){ if(maSlalom_isActive()){ this->unk58_0 = 0; return; diff --git a/src/core2/ch/code_468E0.c b/src/core2/ch/code_468E0.c index 50183bb2..66b8a15f 100644 --- a/src/core2/ch/code_468E0.c +++ b/src/core2/ch/code_468E0.c @@ -45,7 +45,7 @@ void func_802CD8C0(Actor *this){ marker_despawn(this->marker); return; } - if(map_get() == MAP_26_MMM_NAPPERS_ROOM){ + if(gsworld_get_map() == MAP_26_MMM_NAPPERS_ROOM){ if(fileProgressFlag_get(FILEPROG_1D_MMM_DINNING_ROOM_CUTSCENE)){ marker_despawn(this->marker); return; @@ -56,7 +56,7 @@ void func_802CD8C0(Actor *this){ } } //L802CD9C4 - if(map_get() == MAP_8E_GL_FURNACE_FUN){ + if(gsworld_get_map() == MAP_8E_GL_FURNACE_FUN){ if(fileProgressFlag_get(FILEPROG_F4_ENTER_FF_CUTSCENE)){ marker_despawn(this->marker); return; @@ -73,7 +73,7 @@ void func_802CD8C0(Actor *this){ this->marker->unk2C_2 = 0; if(*(s32*)this->unkBC) func_8028F918(0); - if(map_get() == MAP_8E_GL_FURNACE_FUN){ + if(gsworld_get_map() == MAP_8E_GL_FURNACE_FUN){ mapSpecificFlags_set(4, TRUE); } else{ diff --git a/src/core2/ch/code_CFA60.c b/src/core2/ch/code_CFA60.c index 6c34dcec..d73e860e 100644 --- a/src/core2/ch/code_CFA60.c +++ b/src/core2/ch/code_CFA60.c @@ -99,7 +99,7 @@ void func_80356CCC(Actor *this){ sp58 = ml_vec3f_distance(this->position, sp5C); if( this->state == 1){ if( sp58 < this->scale*400.0f - && (map_get() != MAP_3C_RBB_KITCHEN || this->position_z < sp5C[2]) + && (gsworld_get_map() != MAP_3C_RBB_KITCHEN || this->position_z < sp5C[2]) ){ func_803569F0(this, 2); } diff --git a/src/core2/ch/collectible.c b/src/core2/ch/collectible.c index 9cb4d101..16a4dbf4 100644 --- a/src/core2/ch/collectible.c +++ b/src/core2/ch/collectible.c @@ -147,7 +147,7 @@ void chCollectible_update(Actor *this) { func_8032AA58(this, 0.56f); } this->unk10_12 = -1; - this->unk38_0 = (map_get() == MAP_90_GL_BATTLEMENTS); + this->unk38_0 = (gsworld_get_map() == MAP_90_GL_BATTLEMENTS); this->actor_specific_1_f = this->unk38_0 ? 0.0f : 255.0f; this->initialized = TRUE; } diff --git a/src/core2/ch/crab.c b/src/core2/ch/crab.c index 0534106d..d85137f5 100644 --- a/src/core2/ch/crab.c +++ b/src/core2/ch/crab.c @@ -182,7 +182,7 @@ void __chCrab_die(ActorMarker *marker, ActorMarker *other){ marker->collidable = FALSE; this->unk138_27 = 1; marker_despawn(marker); - if( map_get() == MAP_B_CC_CLANKERS_CAVERN + if( gsworld_get_map() == MAP_B_CC_CLANKERS_CAVERN && ml_vec3f_point_within_horizontal_distance(this->position, 13778.0f, 0.0f, 3000.0f) ) { this->depth_mode = MODEL_RENDER_DEPTH_COMPARE; @@ -240,7 +240,7 @@ void chCrab_update(Actor *this) { this->has_met_before = FALSE; this->volatile_initialized = TRUE; anctrl_setTransitionDuration(this->anctrl, 0.25f); - if (map_get() == MAP_A_TTC_SANDCASTLE) { + if (gsworld_get_map() == MAP_A_TTC_SANDCASTLE) { if (!jiggyscore_isCollected(JIGGY_10_TTC_SANDCASTLE)) { mapSpecificFlags_set(1, 0); } @@ -260,7 +260,7 @@ void chCrab_update(Actor *this) { func_80328FB0(this, 4.0f); return; } - if( (map_get() == MAP_B_CC_CLANKERS_CAVERN) + if( (gsworld_get_map() == MAP_B_CC_CLANKERS_CAVERN) && !mapSpecificFlags_get(0) && is_mutant_snippet && !jiggyscore_isCollected(JIGGY_16_CC_SNIPPETS) @@ -274,7 +274,7 @@ void chCrab_update(Actor *this) { this->has_met_before = TRUE; } } - if (map_get() == MAP_A_TTC_SANDCASTLE) { + if (gsworld_get_map() == MAP_A_TTC_SANDCASTLE) { if( !mapSpecificFlags_get(0) && levelSpecificFlags_get(LEVEL_FLAG_2_TTC_UNKNOWN) && !volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) diff --git a/src/core2/ch/gameSelect.c b/src/core2/ch/gameSelect.c index 6c9a28dd..55d83376 100644 --- a/src/core2/ch/gameSelect.c +++ b/src/core2/ch/gameSelect.c @@ -690,13 +690,13 @@ void gameSelect_initAndUpdate(Actor * this){ void gameSelect_saveAndExit(void) { s32 level_id = level_get(); - s32 is_map_game_over = map_get() == MAP_83_CS_GAME_OVER_MACHINE_ROOM; + s32 is_map_game_over = gsworld_get_map() == MAP_83_CS_GAME_OVER_MACHINE_ROOM; // Within bounds of levels. 0xD is 1 more than the amount of levels in the game. s32 is_level_id_valid = (0 < level_id && level_id < 0xD); if ((is_level_id_valid || is_map_game_over) - && (gameNumber != -1 && !func_802E4A08() && map_get() != MAP_91_FILE_SELECT)) { + && (gameNumber != -1 && !func_802E4A08() && gsworld_get_map() != MAP_91_FILE_SELECT)) { gameFile_save(gameNumber); gameFile_8033CFD4(gameNumber); diff --git a/src/core2/ch/ghost.c b/src/core2/ch/ghost.c index d270fcdb..38865dd8 100644 --- a/src/core2/ch/ghost.c +++ b/src/core2/ch/ghost.c @@ -305,7 +305,7 @@ void func_8035BD48(Actor *this){ marker_setCollisionScripts(this->marker, NULL, func_8035B3B4, func_8035B2C4); mapSpecificFlags_set(3, FALSE); mapSpecificFlags_set(4, FALSE); - if(map_get() == MAP_24_MMM_TUMBLARS_SHED){ + if(gsworld_get_map() == MAP_24_MMM_TUMBLARS_SHED){ if( jiggyscore_isSpawned(JIGGY_62_MMM_TUMBLAR) || jiggyscore_isCollected(JIGGY_62_MMM_TUMBLAR) ){ diff --git a/src/core2/ch/icecube.c b/src/core2/ch/icecube.c index b3e9c514..d68ee975 100644 --- a/src/core2/ch/icecube.c +++ b/src/core2/ch/icecube.c @@ -253,7 +253,7 @@ void chicecube_update(Actor *this){ f32 sp3C = time_getDelta(); f32 sp30[3]; - if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){ + if(gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK){ if(maSlalom_isActive()){ actor_collisionOff(this); this->unk58_0 = FALSE; diff --git a/src/core2/ch/jiggy.c b/src/core2/ch/jiggy.c index 9d61c4c8..2a131e3c 100644 --- a/src/core2/ch/jiggy.c +++ b/src/core2/ch/jiggy.c @@ -29,7 +29,7 @@ enum jiggy_e getJiggyId(Actor *this) { s32 id; s32 position[3]; - id = map_get(); + id = gsworld_get_map(); position[0] = (s32)this->position[0]; position[1] = (s32)this->position[1]; diff --git a/src/core2/ch/snowman.c b/src/core2/ch/snowman.c index 3b84cbdb..f3d34edb 100644 --- a/src/core2/ch/snowman.c +++ b/src/core2/ch/snowman.c @@ -186,7 +186,7 @@ void __chSnowman_deathCallback(ActorMarker *marker, ActorMarker *other_marker){ sfx_playFadeShorthandDefault(SFX_2F_ORANGE_SPLAT, 1.0f, 30000, actor->position, 1500, 4500); __spawnQueue_add_1((GenFunction_1)__chSnowman_spawnHat, (s32)actor->marker); - if(map_get() == MAP_27_FP_FREEZEEZY_PEAK) + if(gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK) maSnowy_decRemaining(); __chSnowman_spawnSnowballParticles(actor->position, 0xC); marker_despawn(actor->marker); @@ -195,7 +195,7 @@ void __chSnowman_deathCallback(ActorMarker *marker, ActorMarker *other_marker){ int __chSnowman_CCW_playerInProtectedZone(void){ static f32 ccw_no_attack_zone[3] = {350.0f, 600.0f, 65.0f}; f32 player_position[3]; - if(map_get() == MAP_46_CCW_WINTER){ + if(gsworld_get_map() == MAP_46_CCW_WINTER){ player_getPosition(player_position); if(ml_vec3f_within_horizontal_distance(player_position, ccw_no_attack_zone, 900.0f)) return 1; @@ -222,12 +222,12 @@ void chSnowman_update(Actor *this){ anctrl_setTransitionDuration(this->anctrl, 0.8f); anctrl_setAnimTimer(this->anctrl, randf()); func_8032BC18(this); - if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){ + if(gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK){ local->unk0 = actorArray_findActorFromActorId(0x336)->marker; maSnowy_incTotal(); } }//L802E21D8 - if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){ + if(gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK){ if(maSlalom_isActive() || func_8038DD14()){ actor_collisionOff(this); this->unk58_0 = 0; @@ -254,7 +254,7 @@ void chSnowman_update(Actor *this){ __chSnowman_enterDeath(this); } else if( - map_get() != MAP_27_FP_FREEZEEZY_PEAK + gsworld_get_map() != MAP_27_FP_FREEZEEZY_PEAK || func_8038DD34(local->unk0) == 0 || fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME) ){//L802E2318 diff --git a/src/core2/ch/termite.c b/src/core2/ch/termite.c index 055df049..552a8ff7 100644 --- a/src/core2/ch/termite.c +++ b/src/core2/ch/termite.c @@ -164,7 +164,7 @@ void chTermite_update(Actor *this) { this->unk16C_0 = TRUE; this->volatile_initialized = TRUE; } - if( map_get() == MAP_C_MM_TICKERS_TOWER + if( gsworld_get_map() == MAP_C_MM_TICKERS_TOWER && !mapSpecificFlags_get(0) && subaddie_playerIsWithinSphereAndActive(this, 700) && !subaddie_playerIsWithinSphereAndActive(this, 150) diff --git a/src/core2/code_11660.c b/src/core2/code_11660.c index 1cea69ca..2ec09789 100644 --- a/src/core2/code_11660.c +++ b/src/core2/code_11660.c @@ -24,7 +24,7 @@ s32 func_802985F0(void){ case TRANSFORM_1_BANJO: //80298654 default: { - switch (map_get()) + switch (gsworld_get_map()) { case MAP_20_CS_END_NOT_100: case MAP_7B_CS_INTRO_GL_DINGPOT_1: diff --git a/src/core2/code_117D0.c b/src/core2/code_117D0.c index 9650e9d5..8c913f47 100644 --- a/src/core2/code_117D0.c +++ b/src/core2/code_117D0.c @@ -2,57 +2,61 @@ #include "functions.h" #include "variables.h" +typedef struct{ + u8 id; + u8 unk1; + f32 vertical_velocity; + f32 gravity; + f32 horizontal_velocity; +}BaRebound; + /* .data */ -struct50s D_80364450[] = -{ - {0x01, 0x01, 510.0f, -1200.0f, 200.0f}, - {0x02, 0x01, 600.0f, -1500.0f, 300.0f}, - {0x03, 0x01, 510.0f, -1200.0f, 100.0f}, - {0x04, 0x01, 510.0f, -1200.0f, 200.0f}, - {0x05, 0x01, 510.0f, -1200.0f, 300.0f}, - {0x06, 0x01, 510.0f, -1200.0f, 400.0f}, - {0x07, 0x01, 510.0f, -1200.0f, 500.0f}, - {0x08, 0x01, 600.0f, -1500.0f, 100.0f}, - {0x09, 0x01, 600.0f, -1500.0f, 200.0f}, - {0x0A, 0x01, 600.0f, -1500.0f, 300.0f}, - {0x0B, 0x01, 600.0f, -1500.0f, 400.0f}, - {0x0C, 0x01, 600.0f, -1500.0f, 500.0f}, - {0x0D, 0x02, 300.0f, -1200.0f, 0.0f}, - {0x0F, 0x01, 300.0f, -1200.0f, 0.0f}, - {0x0E, 0x03, 300.0f, -1200.0f, 0.0f}, - {0x10, 0x03, 300.0f, -1200.0f, 0.0f}, +BaRebound s_rebound_list[] = { + {BA_REBOUND_1_UNK, 0x01, 510.0f, -1200.0f, 200.0f}, + {BA_REBOUND_2_UNK, 0x01, 600.0f, -1500.0f, 300.0f}, + {BA_REBOUND_3_UNK, 0x01, 510.0f, -1200.0f, 100.0f}, + {BA_REBOUND_4_UNK, 0x01, 510.0f, -1200.0f, 200.0f}, + {BA_REBOUND_5_UNK, 0x01, 510.0f, -1200.0f, 300.0f}, + {BA_REBOUND_6_UNK, 0x01, 510.0f, -1200.0f, 400.0f}, + {BA_REBOUND_7_UNK, 0x01, 510.0f, -1200.0f, 500.0f}, + {BA_REBOUND_8_UNK, 0x01, 600.0f, -1500.0f, 100.0f}, + {BA_REBOUND_9_UNK, 0x01, 600.0f, -1500.0f, 200.0f}, + {BA_REBOUND_A_UNK, 0x01, 600.0f, -1500.0f, 300.0f}, + {BA_REBOUND_B_UNK, 0x01, 600.0f, -1500.0f, 400.0f}, + {BA_REBOUND_C_UNK, 0x01, 600.0f, -1500.0f, 500.0f}, + {BA_REBOUND_D_UNK, 0x02, 300.0f, -1200.0f, 0.0f}, + {BA_REBOUND_F_UNK, 0x01, 300.0f, -1200.0f, 0.0f}, + {BA_REBOUND_E_UNK, 0x03, 300.0f, -1200.0f, 0.0f}, + {BA_REBOUND_10_UNK, 0x03, 300.0f, -1200.0f, 0.0f}, {00} }; /*.bss*/ -struct{ - struct50s *unk0; - f32 unk4[3]; -}D_8037C5E0; +BaRebound *s_active_rebound; /*.code*/ -int func_80298760(s32 arg0){ +int barebound_set_active(enum ba_rebound_id id){ int i; - for(i = 0; D_80364450[i].unk0; i++){ - if(arg0 == D_80364450[i].unk0){ - D_8037C5E0.unk0 = D_80364450 + i; + for(i = 0; s_rebound_list[i].id; i++){ + if(id == s_rebound_list[i].id){ + s_active_rebound = &s_rebound_list[i]; break; } } } -s32 func_802987B4(void){ - return D_8037C5E0.unk0->unk1; +s32 barebound_802987B4(void){ + return s_active_rebound->unk1; } -f32 func_802987C4(void){ - return D_8037C5E0.unk0->unk4[0]; +f32 barebound_get_vertical_velocity(void){ + return s_active_rebound->vertical_velocity; } -f32 func_802987D4(void){ - return D_8037C5E0.unk0->unk4[2]; +f32 barebound_get_horizontal_velocity(void){ + return s_active_rebound->horizontal_velocity; } -f32 func_802987E4(void){ - return D_8037C5E0.unk0->unk4[1]; +f32 barebound_get_gravity(void){ + return s_active_rebound->gravity; } diff --git a/src/core2/code_11870.c b/src/core2/code_11870.c deleted file mode 100644 index 26f14d68..00000000 --- a/src/core2/code_11870.c +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include "functions.h" -#include "variables.h" - -/* .bss */ -struct50s D_8037C5F0[8]; -u8 D_8037C670; -u8 D_8037C671; - -/* .code */ -int func_80298800(f32 arg0[3]){ - if(!D_8037C5F0[D_8037C670 - 1].unk1) - return 0; - - ml_vec3f_copy(arg0, D_8037C5F0[D_8037C670 - 1].unk4); - return 1; -} - -s32 func_80298850(void){ - if(!D_8037C670){ - return 0; - } - return D_8037C5F0[D_8037C670 - 1].unk0; -} - -void func_8029887C(void){ - D_8037C671 = 0; - D_8037C670 = 0; -} - -void func_80298890(void){ - if(D_8037C670){ - D_8037C670--; - if(D_8037C670 == 0){ - baiFrame_startWithValue(1.2f); - D_8037C671 = 0; - } - } -} - -void func_802988DC(s32 arg0){ - D_8037C5F0[D_8037C670].unk0 = arg0; - D_8037C5F0[D_8037C670].unk1 = 0; - ml_vec3f_clear(D_8037C5F0[D_8037C670].unk4); - D_8037C670++; -} - -void func_8029892C(f32 arg0[3]){ - D_8037C5F0[D_8037C670-1].unk1 = 1; - ml_vec3f_copy(D_8037C5F0[D_8037C670-1].unk4, arg0); -} - -void func_80298970(s32 arg0){ - int val = 0; - switch(arg0){ - case 1: - if(bs_checkInterrupt(BS_INTR_1E) == 2) - val = 1; - break; - case 2: - if(bs_checkInterrupt(BS_INTR_1C) == 2) - val = 1; - break; - case 3: - if(bs_checkInterrupt(BS_INTR_1D) == 2) - val = 1; - break; - case 4: - if(bs_checkInterrupt(BS_INTR_25) == 2) - val = 1; - break; - default: - val = 1; - break; - } - if(val) - D_8037C671 = arg0; -} - -void func_80298A64(void){ - if(D_8037C670) - D_8037C671 = 0; -} - -void func_80298A84(void){ - s32 tmp; - if(D_8037C670){ - tmp = D_8037C5F0[D_8037C670-1].unk0; - if(D_8037C671 != tmp){ - func_80298970(tmp); - } - } -} diff --git a/src/core2/code_12F30.c b/src/core2/code_12F30.c index f2d54625..b254f36e 100644 --- a/src/core2/code_12F30.c +++ b/src/core2/code_12F30.c @@ -225,7 +225,7 @@ void func_8029A47C(s32 arg0[3]){ void func_8029A4D0(void){ int i; - s32 map_id = map_get(); + s32 map_id = gsworld_get_map(); D_8037C6F0.unk0 = 0; D_8037C6F0.unk4[0] = 255.0f; D_8037C6F0.unk4[1] = 255.0f; diff --git a/src/core2/code_13A00.c b/src/core2/code_13A00.c index 259615d5..55cac910 100644 --- a/src/core2/code_13A00.c +++ b/src/core2/code_13A00.c @@ -21,7 +21,7 @@ void func_8029A990(void){ f32 plyr_pos[3]; ParticleEmitter *pCtrl; - if(map_get() == MAP_2C_MMM_BATHROOM) + if(gsworld_get_map() == MAP_2C_MMM_BATHROOM) func_8029C304(0); else func_8029C304(1); @@ -40,7 +40,7 @@ void func_8029AA3C(void){ f32 sp34[3]; f32 sp30; ParticleEmitter *pCtrl; - if(map_get() == MAP_2C_MMM_BATHROOM) + if(gsworld_get_map() == MAP_2C_MMM_BATHROOM) func_8029C304(0); else func_8029C304(2); diff --git a/src/core2/code_14420.c b/src/core2/code_14420.c index 20a2b39c..072536f1 100644 --- a/src/core2/code_14420.c +++ b/src/core2/code_14420.c @@ -64,8 +64,8 @@ Struct_core2_13FC0 D_80364650[14] = { {BS_93_PUMPKIN_DRONE, ASSET_A0_ANIM_BSPUMPKIN_WALK, 0.4f}, {BS_94_CROC_DRONE, ASSET_E0_ANIM_BSCROC_WALK, 0.6f}, {BS_95_WALRUS_DRONE, ASSET_120_ANIM_BSWALRUS_WALK, 0.7f}, - {BS_96_SWIM_LOCKED, ASSET_39_ANIM_BSSWIM_MOVE, 0.8f}, - {BS_97_DIVE_LOCKED, ASSET_71_ANIM_BSSWIM_DIVE_SLOW, 0.75f}, + {BS_96_SWIM_DRONE, ASSET_39_ANIM_BSSWIM_MOVE, 0.8f}, + {BS_97_DIVE_DRONE, ASSET_71_ANIM_BSSWIM_DIVE_SLOW, 0.75f}, {BS_98_WALK_DRONE, ASSET_3_ANIM_BSWALK, 0.43f}, {BS_99_BFLY_DRONE, ASSET_38_ANIM_BSBFLY, 0.62f}, {BS_9A_BTROT_DRONE, ASSET_15_ANIM_BSBTROT_WALK, 0.53f}, @@ -81,8 +81,8 @@ Struct_core2_13FC0 D_803646C0[14] = { {BS_93_PUMPKIN_DRONE, ASSET_A0_ANIM_BSPUMPKIN_WALK, 0.8f}, {BS_94_CROC_DRONE, ASSET_E1_ANIM_BSCROC_IDLE, 1.0f}, {BS_95_WALRUS_DRONE, ASSET_11F_ANIM_BSWALRUS_IDLE, 4.0f}, - {BS_96_SWIM_LOCKED, ASSET_57_ANIM_BSSWIM_IDLE, 1.2f}, - {BS_97_DIVE_LOCKED, ASSET_70_ANIM_BSSWIM_DIVE_IDLE, 2.0f}, + {BS_96_SWIM_DRONE, ASSET_57_ANIM_BSSWIM_IDLE, 1.2f}, + {BS_97_DIVE_DRONE, ASSET_70_ANIM_BSSWIM_DIVE_IDLE, 2.0f}, {BS_98_WALK_DRONE, ASSET_19B_ANIM_UNKNOWN, 4.5f}, {BS_99_BFLY_DRONE, ASSET_38_ANIM_BSBFLY, 0.62f}, {BS_9A_BTROT_DRONE, ASSET_26_ANIM_BSBTROT_IDLE, 1.2f}, @@ -98,8 +98,8 @@ Struct_core2_13FC0 D_80364730[14] = { {BS_93_PUMPKIN_DRONE, ASSET_A0_ANIM_BSPUMPKIN_WALK, 0.8f}, {BS_94_CROC_DRONE, ASSET_E1_ANIM_BSCROC_IDLE, 1.0f}, {BS_95_WALRUS_DRONE, ASSET_11F_ANIM_BSWALRUS_IDLE, 4.0f}, - {BS_96_SWIM_LOCKED, ASSET_57_ANIM_BSSWIM_IDLE, 1.2f}, - {BS_97_DIVE_LOCKED, ASSET_70_ANIM_BSSWIM_DIVE_IDLE, 2.0f}, + {BS_96_SWIM_DRONE, ASSET_57_ANIM_BSSWIM_IDLE, 1.2f}, + {BS_97_DIVE_DRONE, ASSET_70_ANIM_BSSWIM_DIVE_IDLE, 2.0f}, {BS_98_WALK_DRONE, ASSET_19B_ANIM_UNKNOWN, 4.5f}, {BS_99_BFLY_DRONE, ASSET_38_ANIM_BSBFLY, 0.62f}, {BS_9A_BTROT_DRONE, ASSET_26_ANIM_BSBTROT_IDLE, 1.2f}, @@ -115,8 +115,8 @@ Struct_core2_13FC0 D_803647A0[14] = { {BS_93_PUMPKIN_DRONE, ASSET_A0_ANIM_BSPUMPKIN_WALK, 0.8f}, {BS_94_CROC_DRONE, ASSET_E1_ANIM_BSCROC_IDLE, 1.0f}, {BS_95_WALRUS_DRONE, ASSET_11F_ANIM_BSWALRUS_IDLE, 4.0f}, - {BS_96_SWIM_LOCKED, ASSET_57_ANIM_BSSWIM_IDLE, 1.2f}, - {BS_97_DIVE_LOCKED, ASSET_70_ANIM_BSSWIM_DIVE_IDLE, 2.0f}, + {BS_96_SWIM_DRONE, ASSET_57_ANIM_BSSWIM_IDLE, 1.2f}, + {BS_97_DIVE_DRONE, ASSET_70_ANIM_BSSWIM_DIVE_IDLE, 2.0f}, {BS_98_WALK_DRONE, ASSET_6F_ANIM_BSSTAND_IDLE, 5.5f}, {BS_99_BFLY_DRONE, ASSET_38_ANIM_BSBFLY, 0.62f}, {BS_9A_BTROT_DRONE, ASSET_26_ANIM_BSBTROT_IDLE, 1.2f}, @@ -132,8 +132,8 @@ Struct_core2_13FC0 D_80364810[14] = { {BS_8F_PUMPKIN_LOCKED, 0, 0.0f}, {BS_8D_CROC_LOCKED, 0, 0.0f}, {BS_73_UNKNOWN, ASSET_11F_ANIM_BSWALRUS_IDLE, 4.0f}, - {BS_77_SWIM_LOCKED, 0, 0.0f}, - {BS_78_DIVE_LOCKED, 0, 0.0f}, + {BS_77_SWIM_LOOKAT_DRONE, 0, 0.0f}, + {BS_78_DIVE_LOOKAT_DRONE, 0, 0.0f}, {BS_73_UNKNOWN, ASSET_14A_ANIM_BSREST_LISTEN, 11.4f}, {BS_76_BFLY_LOCKED, 0, 0.0f}, {BS_79_BTROT_LOCKED, 0, 0.0f}, @@ -149,8 +149,8 @@ Struct_core2_13FC0 D_80364880[14] = { {BS_8F_PUMPKIN_LOCKED, 0, 0.0f}, {BS_8D_CROC_LOCKED, 0, 0.0f}, {BS_74_UNKNOWN, ASSET_11F_ANIM_BSWALRUS_IDLE, 4.0f}, - {BS_77_SWIM_LOCKED, 0, 0.0f}, - {BS_78_DIVE_LOCKED, 0, 0.0f}, + {BS_77_SWIM_LOOKAT_DRONE, 0, 0.0f}, + {BS_78_DIVE_LOOKAT_DRONE, 0, 0.0f}, {BS_74_UNKNOWN, ASSET_6F_ANIM_BSSTAND_IDLE, 5.5f}, {BS_76_BFLY_LOCKED, 0, 0.0f}, {BS_79_BTROT_LOCKED, 0, 0.0f}, @@ -165,8 +165,8 @@ Struct_core2_13FC0 D_803648F0[14] = { {BS_8F_PUMPKIN_LOCKED, 0, 0.0f}, {BS_8D_CROC_LOCKED, 0, 0.0f}, {BS_75_UNKNOWN, ASSET_11F_ANIM_BSWALRUS_IDLE, 4.0f}, - {BS_77_SWIM_LOCKED, 0, 0.0f}, - {BS_78_DIVE_LOCKED, 0, 0.0f}, + {BS_77_SWIM_LOOKAT_DRONE, 0, 0.0f}, + {BS_78_DIVE_LOOKAT_DRONE, 0, 0.0f}, {BS_75_UNKNOWN, ASSET_14A_ANIM_BSREST_LISTEN, 11.4f}, {BS_76_BFLY_LOCKED, 0, 0.0f}, {BS_79_BTROT_LOCKED, 0, 0.0f}, @@ -706,8 +706,8 @@ void update_void_return_Location(void) { level_id = level_get(); if ((level_id == 0) || (level_id == LEVEL_6_LAIR)) { - map_id = map_get(); - exit_id = exit_get(); + map_id = gsworld_get_map(); + exit_id = gsworld_get_exit(); } else { map_id = level_get_main_map(level_id); exit_id = level_get_main_exit(level_id); @@ -720,12 +720,12 @@ void func_8029C674(void) { f32 sp1C[3]; D_8037D1E8 = FALSE; - if (func_80298850() == BSGROUP_4_LOOK) { + if (balookat_getState() == BSGROUP_4_LOOK) { D_8037D1E8 = TRUE; baflag_set(BA_FLAG_17_FIRST_PERSON_VIEW); ncDynamicCamera_enterFirstPerson(); func_8028E9C4(5, sp1C); - ncFirstPersonCamera_setZoomedOutPosition(sp1C); + ncba1p_setZoomedOutPosition(sp1C); } } @@ -735,13 +735,13 @@ void func_8029C6D0(void) { f32 sp24[3]; f32 sp18[3]; - if (func_80298850() == 4 && D_8037D1E8) { + if (balookat_getState() == 4 && D_8037D1E8) { func_8028E9C4(5, sp18); - ncFirstPersonCamera_setZoomedOutPosition(sp18); + ncba1p_setZoomedOutPosition(sp18); func_8028E9C4(5, sp30); - func_80298800(sp24); + balookat_try_get_position(sp24); func_802BC434(sp3C, sp24, sp30); - ncFirstPersonCamera_setZoomedOutRotation(sp3C); + ncba1p_setZoomedOutRotation(sp3C); } } diff --git a/src/core2/code_34790.c b/src/core2/code_34790.c index 1d972302..30770aae 100644 --- a/src/core2/code_34790.c +++ b/src/core2/code_34790.c @@ -137,7 +137,7 @@ void func_802BBA84(void) { D_8037D8C8 = D_8037D8CC * 0.0078125; return; } - if (map_get() == MAP_91_FILE_SELECT) { + if (gsworld_get_map() == MAP_91_FILE_SELECT) { D_8037D8C8 = D_8037D8CC * 0.0078125; return; } @@ -245,7 +245,7 @@ f32 func_802BBEA4(f32 arg0[3], f32 arg1[3], f32 arg2, s32 arg3, s32 arg4) { return func_802BBD48(); } -void func_802BC044(void) { +void nccamera_init(void) { s32 i; D_8037D8C4 = 0; diff --git a/src/core2/code_35520.c b/src/core2/code_35520.c index cddfc5a1..3869aaaa 100644 --- a/src/core2/code_35520.c +++ b/src/core2/code_35520.c @@ -133,7 +133,7 @@ struct_core2_35520_1 *func_802BC4B0(s32 arg0) { s32 map_id; s32 i; - map_id = map_get(); + map_id = gsworld_get_map(); for( i = 0; D_8037D930[i].map_id != 0; i++){ if(map_id == D_8037D930[i].map_id && (arg0 == D_8037D930[i].unk2)){ return &D_8037D930[i]; diff --git a/src/core2/code_37E50.c b/src/core2/code_37E50.c index 07ecbb2c..d51cffc9 100644 --- a/src/core2/code_37E50.c +++ b/src/core2/code_37E50.c @@ -78,7 +78,7 @@ bool func_802BEF64(void){ void func_802BEF70(void){} void func_802BEF78(void){ - D_8037DA80.unk0 = func_802BEDE0(map_get()); + D_8037DA80.unk0 = func_802BEDE0(gsworld_get_map()); D_8037DA80.unk8 = 0; D_8037DA80.unkC = 0; } diff --git a/src/core2/code_42CB0.c b/src/core2/code_42CB0.c index 0fcc14e7..fd980a90 100644 --- a/src/core2/code_42CB0.c +++ b/src/core2/code_42CB0.c @@ -36,7 +36,7 @@ enum honeycomb_e func_802C9C40(Actor *this){ s32 tmp_a0; s32 sp18[3]; - if(map_get() == MAP_2_MM_MUMBOS_MOUNTAIN){ + if(gsworld_get_map() == MAP_2_MM_MUMBOS_MOUNTAIN){ if (2500.0f < this->position_y) return HONEYCOMB_2_MM_JUJU; else @@ -134,7 +134,7 @@ void chHoneycomb_update(Actor *this){ } }//L802CA098 - if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){ + if(gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK){ if(maSlalom_isActive()){ this->unk58_0 = FALSE; actor_collisionOff(this); diff --git a/src/core2/code_43A40.c b/src/core2/code_43A40.c index 5777c4fe..fbcd83c2 100644 --- a/src/core2/code_43A40.c +++ b/src/core2/code_43A40.c @@ -72,7 +72,7 @@ void chFlightPad_update(Actor *this){ actor_setOpacity(this, 0x5a); } - if(map_get() == MAP_12_GV_GOBIS_VALLEY){ + if(gsworld_get_map() == MAP_12_GV_GOBIS_VALLEY){ this->unk6C = 352.0f; this->pitch = 352.0f; this->yaw_ideal = 90.0f; diff --git a/src/core2/code_47BD0.c b/src/core2/code_47BD0.c index c37c82d3..2e677b66 100644 --- a/src/core2/code_47BD0.c +++ b/src/core2/code_47BD0.c @@ -389,7 +389,7 @@ void chBeeSwarm_update(Actor *this) { D_8037DCBC = 0; } } - if (map_get() == MAP_27_FP_FREEZEEZY_PEAK) { + if (gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK) { if (maSlalom_isActive()) { this->unk58_0 = FALSE; return; @@ -419,7 +419,7 @@ void chBeeSwarm_update(Actor *this) { } chBeeSwarm_802CF1C8(this->unk1C, this->position, this->velocity, this->actor_specific_1_f, 100.0f, 0, &spA0); } - if (map_get() == MAP_78_GL_RBB_AND_MMM_PUZZLE) { + if (gsworld_get_map() == MAP_78_GL_RBB_AND_MMM_PUZZLE) { if (this->unk38_31++ == 0x1E) { this->unk38_31 = 0; next_position[0] = this->position[0]; diff --git a/src/core2/code_4A6F0.c b/src/core2/code_4A6F0.c index f4a931c8..865b2843 100644 --- a/src/core2/code_4A6F0.c +++ b/src/core2/code_4A6F0.c @@ -118,7 +118,7 @@ void chMumbo_func_802D186C(Actor *this) { void chMumbo_func_802D18B4(Actor *this) { bool player_is_within_range; - if (map_get() == MAP_7A_GL_CRYPT) { + if (gsworld_get_map() == MAP_7A_GL_CRYPT) { player_is_within_range = chMumbo_withinHorzDistToPlayer(1107, 0, 188); } else { player_is_within_range = chMumbo_withinHorzDistToPlayer(0, -107, 188); @@ -200,7 +200,7 @@ void chMumbo_func_802D1B8C(Actor *this, enum transformation_e transform_id) { gcdialog_showDialog(transform_id + ASSET_D8F_DIALOG_MUMBO_MEET, 6, this->position, this->marker, __chMumbo_textCallback, NULL); return; } - if (map_get() == MAP_7A_GL_CRYPT && transform_id == TRANSFORM_3_PUMPKIN && !fileProgressFlag_get(FILEPROG_F7_HAS_TRANSFORMED_IN_CRYPT)) { + if (gsworld_get_map() == MAP_7A_GL_CRYPT && transform_id == TRANSFORM_3_PUMPKIN && !fileProgressFlag_get(FILEPROG_F7_HAS_TRANSFORMED_IN_CRYPT)) { gcdialog_showDialog(ASSET_DAD_DIALOG_MUMBO_XFORM_IN_CRYPT, 6, this->position, this->marker, __chMumbo_textCallback, NULL); fileProgressFlag_set(FILEPROG_F7_HAS_TRANSFORMED_IN_CRYPT, TRUE); return; @@ -223,7 +223,7 @@ void chMumbo_update(Actor *this) { this->unk130 = func_803255FC; if( !volatileFlag_get(VOLATILE_FLAG_1) && !volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE) - && map_get() != MAP_7A_GL_CRYPT) { + && gsworld_get_map() != MAP_7A_GL_CRYPT) { item_adjustByDiffWithHud(ITEM_1C_MUMBO_TOKEN, 0); } if(!this->initialized){ @@ -243,7 +243,7 @@ void chMumbo_update(Actor *this) { this->unk38_31 = 0; if( player_getTransformation() == TRANSFORM_1_BANJO && !fileProgressFlag_get(__bkProgId_from_transformationId(D_8037DDF0)) - && (map_get() != MAP_7A_GL_CRYPT) + && (gsworld_get_map() != MAP_7A_GL_CRYPT) ){ this->unk38_31 = __transformation_getCost(D_8037DDF0); } @@ -308,7 +308,7 @@ void chMumbo_update(Actor *this) { case 4: //L802D20E4 actor_loopAnimation(this); - sp48 = (map_get() == MAP_7A_GL_CRYPT) ? chMumbo_withinHorzDistToPlayer(0x442, 0, 0x3C) : chMumbo_withinHorzDistToPlayer(0, -0x5A, 0x3C); + sp48 = (gsworld_get_map() == MAP_7A_GL_CRYPT) ? chMumbo_withinHorzDistToPlayer(0x442, 0, 0x3C) : chMumbo_withinHorzDistToPlayer(0, -0x5A, 0x3C); if( sp48 && player_movementGroup() == BSGROUP_0_NONE && func_8028F20C() @@ -318,15 +318,15 @@ void chMumbo_update(Actor *this) { if(face_buttons[FACE_BUTTON(BUTTON_B)] == 1){ if (D_8037DDF0 == TRANSFORM_7_WISHWASHY) { this->unk38_31 = 0; - } else if (player_getTransformation() == TRANSFORM_1_BANJO && !fileProgressFlag_get(__bkProgId_from_transformationId(D_8037DDF0)) && map_get() != MAP_7A_GL_CRYPT){ + } else if (player_getTransformation() == TRANSFORM_1_BANJO && !fileProgressFlag_get(__bkProgId_from_transformationId(D_8037DDF0)) && gsworld_get_map() != MAP_7A_GL_CRYPT){ this->unk38_31 = __transformation_getCost(D_8037DDF0); } this->unk38_0 = (D_8037DDF0 == TRANSFORM_7_WISHWASHY) || (item_getCount(ITEM_1C_MUMBO_TOKEN) >= this->unk38_31); if (this->unk38_0) { - sp48 = map_get() != MAP_E_MM_MUMBOS_SKULL; + sp48 = gsworld_get_map() != MAP_E_MM_MUMBOS_SKULL; sp44 = player_getTransformation() == TRANSFORM_1_BANJO; func_8028F94C(2, this->position); - if ( sp44 && map_get() != MAP_7A_GL_CRYPT + if ( sp44 && gsworld_get_map() != MAP_7A_GL_CRYPT && !fileProgressFlag_get(FILEPROG_BA_HAS_SEEN_TREX_TEXT) && randf() < 0.01 && sp48 @@ -337,7 +337,7 @@ void chMumbo_update(Actor *this) { subaddie_set_state(this, 3); } else if ( sp44 - && map_get() != MAP_7A_GL_CRYPT + && gsworld_get_map() != MAP_7A_GL_CRYPT && !this->unk138_23 && (sp40 = fileProgressFlag_getN(FILEPROG_BB_MUMBO_MISTAKE_INDEX, 2), sp40 < 3) && randf() < 0.05 @@ -429,7 +429,7 @@ void chMumbo_update(Actor *this) { case 7: //L802D2704 chMumbo_func_802D186C(this); if (volatileFlag_get(VOLATILE_FLAG_11) == 0) { - if (map_get() == MAP_7A_GL_CRYPT) { + if (gsworld_get_map() == MAP_7A_GL_CRYPT) { sp48 = chMumbo_withinHorzDistToPlayer(0x453, 0, 0xBC); } else { sp48 = chMumbo_withinHorzDistToPlayer(0, -0x6B, 0xBC); @@ -445,7 +445,7 @@ void chMumbo_update(Actor *this) { case 8: //L802D2790 chMumbo_func_802D186C(this); if (volatileFlag_get(VOLATILE_FLAG_12) == 0) { - if (map_get() == MAP_7A_GL_CRYPT) { + if (gsworld_get_map() == MAP_7A_GL_CRYPT) { sp48 = chMumbo_withinHorzDistToPlayer(0x453, 0, 0xBC); } else { sp48 = chMumbo_withinHorzDistToPlayer(0, -0x6B, 0xBC); diff --git a/src/core2/code_4C020.c b/src/core2/code_4C020.c index cdb855ac..10999bb7 100644 --- a/src/core2/code_4C020.c +++ b/src/core2/code_4C020.c @@ -422,7 +422,7 @@ void func_802D3FD4(Actor *this){ if(!this->initialized){ this->initialized = TRUE; func_802D3CE8(this); - switch(map_get()){ + switch(gsworld_get_map()){ case MAP_1D_MMM_CELLAR: //L802D4058 if(sns_get_item_state(SNS_ITEM_EGG_CYAN, 1) && !sns_get_item_state(SNS_ITEM_EGG_CYAN, 0)){ return; @@ -518,7 +518,7 @@ bool func_802D42F8(Actor *this) { void func_802D4388(Actor *this){ func_802D3CE8(this); - this->unk38_0 = BOOL(map_get() == MAP_7A_GL_CRYPT || item_getCount(ITEM_1C_MUMBO_TOKEN) >= this->actorTypeSpecificField || func_802D42F8(this)); + this->unk38_0 = BOOL(gsworld_get_map() == MAP_7A_GL_CRYPT || item_getCount(ITEM_1C_MUMBO_TOKEN) >= this->actorTypeSpecificField || func_802D42F8(this)); mapSpecificFlags_set(0x1F, (func_8028F20C() && func_8028FB48(0x78000000)) || player_movementGroup() == BSGROUP_D_TRANSFORMING); switch(this->state){ case 0x12: //L802D4468 @@ -586,7 +586,7 @@ void func_802D4680(Actor *this){ case 1: if(ml_vec3f_horizontal_distance_zero_likely(this->position, sp1C) < 150.0f && func_8028F20C()){ if(player_movementGroup() == BSGROUP_0_NONE || player_movementGroup() == BSGROUP_8_TROT){ - if(map_get() == MAP_8E_GL_FURNACE_FUN){ + if(gsworld_get_map() == MAP_8E_GL_FURNACE_FUN){ volatileFlag_set(VOLATILE_FLAG_0_IN_FURNACE_FUN_QUIZ, 0); func_802D4614(MAP_80_GL_FF_ENTRANCE); } @@ -712,7 +712,7 @@ void func_802D4CAC(Actor *this){ } void func_802D4CD4(Actor *this){ - if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){ + if(gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK){ if(maSlalom_isActive()){ this->unk58_0 = FALSE; return; @@ -785,7 +785,7 @@ void func_802D5058(enum map_e map_id, s32 arg1, bool arg2) { D_8036768C = 0x15; } D_80367690 = 0; - D_80367694 = map_get(); + D_80367694 = gsworld_get_map(); D_80367698 = 1; D_8036769C = 0; D_803676A0 = 0; @@ -813,7 +813,7 @@ void func_802D5178(s32 arg0, enum file_progress_e arg1, s32 arg2, enum map_e arg } void func_802D520C(Gfx **gfx, Mtx **mtx, Vtx **vtx){ - if(volatileFlag_get(VOLATILE_FLAG_1) && map_get() != MAP_8E_GL_FURNACE_FUN){ + if(volatileFlag_get(VOLATILE_FLAG_1) && gsworld_get_map() != MAP_8E_GL_FURNACE_FUN){ gcquiz_draw(gfx, mtx, vtx); } } @@ -824,9 +824,9 @@ void func_802D5260(void) { f32 sp34; f32 sp28[3]; - sp3C = (map_get() == MAP_76_GL_640_NOTE_DOOR) ? 0 - : (map_get() == MAP_77_GL_RBB_LOBBY) ? 1 - : (map_get() == MAP_78_GL_RBB_AND_MMM_PUZZLE) ? 2 + sp3C = (gsworld_get_map() == MAP_76_GL_640_NOTE_DOOR) ? 0 + : (gsworld_get_map() == MAP_77_GL_RBB_LOBBY) ? 1 + : (gsworld_get_map() == MAP_78_GL_RBB_AND_MMM_PUZZLE) ? 2 : -1; if (sp3C == -1) { @@ -901,8 +901,8 @@ void func_802D5628(void){ static s32 D_803679EC = 0; static f32 D_803679F0 = 0.0f; - if( map_get() != MAP_8E_GL_FURNACE_FUN - && map_get() != MAP_80_GL_FF_ENTRANCE + if( gsworld_get_map() != MAP_8E_GL_FURNACE_FUN + && gsworld_get_map() != MAP_80_GL_FF_ENTRANCE ){ D_803676AC = 0; } @@ -928,7 +928,7 @@ void func_802D5628(void){ D_803679E8 = 0; } }//L802D5774 - if(D_80367684 && map_get() == D_80367684){ + if(D_80367684 && gsworld_get_map() == D_80367684){ switch(D_8036768C){ case 0x1: // L802D57C8 if(!D_80367690){ @@ -1007,7 +1007,7 @@ void func_802D5628(void){ case 0x15:// L802D5AB4 case 0x2d:// L802D5AB4 - if(D_80367684 && D_80367684 == map_get()){ + if(D_80367684 && D_80367684 == gsworld_get_map()){ gcquiz_func_80319EA4(); if(0.0f < D_8037DE08){ D_8037DE08 -= time_getDelta(); @@ -1056,8 +1056,8 @@ void func_802D5628(void){ if( getGameMode() == GAME_MODE_3_NORMAL || func_802E4A08() ){ - if( map_get() != MAP_8E_GL_FURNACE_FUN - && map_get() != MAP_90_GL_BATTLEMENTS + if( gsworld_get_map() != MAP_8E_GL_FURNACE_FUN + && gsworld_get_map() != MAP_90_GL_BATTLEMENTS && !fileProgressFlag_get(FILEPROG_FC_DEFEAT_GRUNTY) ){ D_8037DE04 += time_getDelta(); @@ -1124,8 +1124,8 @@ void func_802D6114(void){ if(D_8036769C) fileProgressFlag_set(D_8036769C, TRUE); func_802D6344(); - if(map_get() != sp24){ - if(map_getLevel(sp24) != map_getLevel(map_get())){ + if(gsworld_get_map() != sp24){ + if(map_getLevel(sp24) != map_getLevel(gsworld_get_map())){ func_802E4A70(); }//L802D6194 volatileFlag_set(VOLATILE_FLAG_21, 1); @@ -1141,7 +1141,7 @@ void func_802D6114(void){ } void func_802D61FC(enum map_e arg0){ - if( map_getLevel(arg0) != map_getLevel(map_get())) + if( map_getLevel(arg0) != map_getLevel(gsworld_get_map())) func_802E4A70(); func_803228D8(); transitionToMap(D_80367684, 0, 0); @@ -1154,7 +1154,7 @@ void func_802D6264(f32 delay, enum map_e map_id, s32 arg2, s32 arg3, s32 arg4, e D_8036768C = arg3; D_80367690 = 0; - D_80367694 = map_get(); + D_80367694 = gsworld_get_map(); D_80367698 = arg4; D_8036769C = arg5; D_803676A0 = 0; @@ -1197,7 +1197,7 @@ void func_802D63D4(void){ if(D_80367684 == 0) return; - if(map_get() != D_80367684) + if(gsworld_get_map() != D_80367684) return; func_80347A14(0); @@ -1221,7 +1221,7 @@ void func_802D63D4(void){ void func_802D6494(void){ - if( (!D_80367684 || (D_80367684 && (map_get() == D_80367684))) + if( (!D_80367684 || (D_80367684 && (gsworld_get_map() == D_80367684))) ){ switch(D_803676A0){ case ACTOR_2E5_DOOR_OF_GRUNTY: @@ -1235,13 +1235,13 @@ void func_802D6494(void){ coMusicPlayer_playMusicWeak(COMUSIC_64_WORLD_OPENING_A, 32000); break; case ACTOR_212_CC_ENTRANCE_BARS:// L802D6550 - if(map_get() == MAP_70_GL_CC_LOBBY && !volatileFlag_get(VOLATILE_FLAG_7F_SANDCASTLE_OPEN_CC)){ + if(gsworld_get_map() == MAP_70_GL_CC_LOBBY && !volatileFlag_get(VOLATILE_FLAG_7F_SANDCASTLE_OPEN_CC)){ func_802D4830(actorArray_findActorFromActorId(ACTOR_212_CC_ENTRANCE_BARS), SFX_9A_MECHANICAL_CLOSING, 0.5f); coMusicPlayer_playMusicWeak(COMUSIC_64_WORLD_OPENING_A, 32000); } break; case ACTOR_234_CCW_ENTRANCE_DOOR:// L802D65A0 - if(map_get() == MAP_79_GL_CCW_LOBBY && !volatileFlag_get(VOLATILE_FLAG_93_SANDCASTLE_OPEN_CCW)){ + if(gsworld_get_map() == MAP_79_GL_CCW_LOBBY && !volatileFlag_get(VOLATILE_FLAG_93_SANDCASTLE_OPEN_CCW)){ func_802D485C(actorArray_findActorFromActorId(ACTOR_234_CCW_ENTRANCE_DOOR), SFX_3EC_CCW_DOOR_OPENING, 0.8f, 15000); coMusicPlayer_playMusicWeak(COMUSIC_64_WORLD_OPENING_A, 32000); } @@ -1253,13 +1253,13 @@ void func_802D6494(void){ } break; case ACTOR_235_FP_ENTANCE_DOOR:// L802D6624 - if(map_get() == MAP_6F_GL_FP_LOBBY && !volatileFlag_get(VOLATILE_FLAG_8B_SANDCASTLE_OPEN_FP)){ + if(gsworld_get_map() == MAP_6F_GL_FP_LOBBY && !volatileFlag_get(VOLATILE_FLAG_8B_SANDCASTLE_OPEN_FP)){ func_802D4830(actorArray_findActorFromActorId(ACTOR_235_FP_ENTANCE_DOOR), SFX_18_BIGBUTT_SLIDE, 0.5f); coMusicPlayer_playMusicWeak(COMUSIC_64_WORLD_OPENING_A, 32000); } break; case ACTOR_226_GV_ENTRANCE:// L802D6674 - if(map_get() == MAP_6E_GL_GV_LOBBY && !volatileFlag_get(VOLATILE_FLAG_87_SANDCASTLE_OPEN_GV)){ + if(gsworld_get_map() == MAP_6E_GL_GV_LOBBY && !volatileFlag_get(VOLATILE_FLAG_87_SANDCASTLE_OPEN_GV)){ func_802D485C(actorArray_findActorFromActorId(ACTOR_226_GV_ENTRANCE), SFX_3EC_CCW_DOOR_OPENING, 0.8f, 15000); coMusicPlayer_playMusicWeak(COMUSIC_64_WORLD_OPENING_A, 32000); } @@ -1271,7 +1271,7 @@ void func_802D6494(void){ } break; case ACTOR_20F_RBB_ENTRANCE_DOOR:// L802D66F8 - if(map_get() == MAP_77_GL_RBB_LOBBY && !volatileFlag_get(VOLATILE_FLAG_90_SANDCASTLE_OPEN_RBB)){ + if(gsworld_get_map() == MAP_77_GL_RBB_LOBBY && !volatileFlag_get(VOLATILE_FLAG_90_SANDCASTLE_OPEN_RBB)){ func_802D4830(actorArray_findActorFromActorId(ACTOR_20F_RBB_ENTRANCE_DOOR), SFX_9A_MECHANICAL_CLOSING, 0.5f); coMusicPlayer_playMusicWeak(COMUSIC_64_WORLD_OPENING_A, 32000); } @@ -1333,7 +1333,7 @@ int func_802D686C(void){ if(volatileFlag_get(VOLATILE_FLAG_1E)){ return FALSE; } - return map_get() == D_80367684; + return gsworld_get_map() == D_80367684; } int func_802D68B4(void){ @@ -1354,7 +1354,7 @@ void func_802D6924(void){ //update_has_entered_level_flags void func_802D6948(void){ - switch(map_get()){ + switch(gsworld_get_map()){ case MAP_2_MM_MUMBOS_MOUNTAIN: fileProgressFlag_set(FILEPROG_B0_HAS_ENTERED_MM, TRUE); break; diff --git a/src/core2/code_509D0.c b/src/core2/code_509D0.c index dfc32d4f..59808fbd 100644 --- a/src/core2/code_509D0.c +++ b/src/core2/code_509D0.c @@ -365,7 +365,7 @@ void chLevelCollectible_update(Actor *this){ func_802D83EC(this); break; case MARKER_36_ORANGE_COLLECTIBLE: //L802D86DC - if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED) && map_get() == MAP_2_MM_MUMBOS_MOUNTAIN) { + if (mapSpecificFlags_get(MM_SPECIFIC_FLAG_3_CHIMPY_HAS_LEAVED) && gsworld_get_map() == MAP_2_MM_MUMBOS_MOUNTAIN) { marker_despawn(this->marker); } break; diff --git a/src/core2/code_53A10.c b/src/core2/code_53A10.c index 10c06508..aa2ea0a1 100644 --- a/src/core2/code_53A10.c +++ b/src/core2/code_53A10.c @@ -21,7 +21,7 @@ void func_802DA9A0(ActorMarker *caller, enum asset_e text_id, s32 arg2){ flag = FILEPROG_15_ENTER_MMM_TEXT; } else{ - if(map_get() == MAP_69_GL_MM_LOBBY) + if(gsworld_get_map() == MAP_69_GL_MM_LOBBY) tmp = FILEPROG_97_ENTERED_LAIR_TEXT; else tmp = FILEPROG_98_EXITED_LEVEL_TEXT; @@ -45,7 +45,7 @@ void func_802DAA14(Actor *this){ flag = FILEPROG_15_ENTER_MMM_TEXT; } else{ - if(map_get() == MAP_69_GL_MM_LOBBY) + if(gsworld_get_map() == MAP_69_GL_MM_LOBBY) tmp = FILEPROG_97_ENTERED_LAIR_TEXT; else tmp = FILEPROG_98_EXITED_LEVEL_TEXT; @@ -72,7 +72,7 @@ void func_802DAA14(Actor *this){ text_id = ASSET_ADC_DIALOG_UNKNOWN; } else{ - if(map_get() == MAP_69_GL_MM_LOBBY) + if(gsworld_get_map() == MAP_69_GL_MM_LOBBY) tmp = ASSET_F66_DIALOG_UNKNOWN; else tmp = ASSET_F67_DIALOG_UNKNOWN; diff --git a/src/core2/code_57C70.c b/src/core2/code_57C70.c index 93ca4e45..7fd753aa 100644 --- a/src/core2/code_57C70.c +++ b/src/core2/code_57C70.c @@ -97,7 +97,7 @@ void func_802DEE1C(Actor *this) { if (D_8037DFE8 == NULL) { D_8037DFE8 = assetcache_get(0x56E); } - sp4C = map_getLevel(map_get()); + sp4C = map_getLevel(gsworld_get_map()); sp44 = sp4C == D_8037DFE4; if (sp44) { subaddie_set_state_with_direction(this, 2, 0.0f, 1); diff --git a/src/core2/code_59A80.c b/src/core2/code_59A80.c index 36e7bcb5..c4341aca 100644 --- a/src/core2/code_59A80.c +++ b/src/core2/code_59A80.c @@ -40,7 +40,7 @@ enum mumbotoken_e func_802E0A90(Actor *this){ s32 id; s32 pos[3]; - map_get(); + gsworld_get_map(); pos[0] = (s32)this->position[0]; pos[1] = (s32)this->position[1]; pos[2] = (s32)this->position[2]; diff --git a/src/core2/code_5C870.c b/src/core2/code_5C870.c index 18c37225..5cba6ce0 100644 --- a/src/core2/code_5C870.c +++ b/src/core2/code_5C870.c @@ -98,13 +98,13 @@ void func_802E38E8(enum map_e map, s32 exit, s32 reset_on_load){ func_8030AFA0(map); } func_802FA508(); - func_80334B20(map, exit, 0); + gsworld_set(map, exit, 0); func_802E3800(); func_8033DC10(); } void func_802E398C(s32 arg0) { - func_80334910(); + gsworld_free(); func_8030ED0C(); coMusicPlayer_update(); if (arg0 != 0) { @@ -118,7 +118,7 @@ void func_802E39D0(Gfx **gdl, Mtx **mptr, Vtx **vptr, s32 framebuffer_idx, s32 a scissorBox_SetForGameMode(gdl, framebuffer_idx); D_8037E8E0.unkC = FALSE; - func_80334540(gdl, mptr, vptr); + gsworld_draw(gdl, mptr, vptr); if(!arg4){ func_802E67AC(); func_802E3BD0(getActiveFramebuffer()); @@ -262,9 +262,9 @@ void func_802E3E7C(enum game_mode_e mode){ sp28 = D_8037E8E0.exit; prev_mode = D_8037E8E0.unk0; game_setMode(GAME_MODE_2_UNKNOWN, 0); - if(!volatileFlag_getAndSet(VOLATILE_FLAG_21, 0) || map_getLevel(map_get()) == map_getLevel(D_8037E8E0.map)){ + if(!volatileFlag_getAndSet(VOLATILE_FLAG_21, 0) || map_getLevel(gsworld_get_map()) == map_getLevel(D_8037E8E0.map)){ if(!volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE)) - mapSavestate_save(map_get()); + mapSavestate_save(gsworld_get_map()); } func_802E398C(1); func_802E38E8(map, sp28, sp34); @@ -515,7 +515,7 @@ bool func_802E4424(void) { game_setMode(D_8037E8E0.unk1A - 1, D_8037E8E0.unk1B); D_8037E8E0.unk1A = 0; } - sp1C = func_80334ECC(); + sp1C = gsworld_update(); func_80321C34(); func_8030ED0C(); coMusicPlayer_update(); diff --git a/src/core2/code_6D490.c b/src/core2/code_6D490.c index 1cb5377b..bdc168f4 100644 --- a/src/core2/code_6D490.c +++ b/src/core2/code_6D490.c @@ -74,7 +74,7 @@ s32 func_802F4420(Struct5Ds *this){ return 4; } - return func_803246B4(map_get(), this->unk0); + return func_803246B4(gsworld_get_map(), this->unk0); } void func_802F44AC(Struct5Ds *this, enum sfx_e sfx_id, f32 arg2, f32 arg3, s32 arg4){ diff --git a/src/core2/code_6DA30.c b/src/core2/code_6DA30.c index ecf8e7de..f37e6bbc 100644 --- a/src/core2/code_6DA30.c +++ b/src/core2/code_6DA30.c @@ -226,7 +226,7 @@ void func_802F7A2C(s32 arg0); enum asset_e func_802F49C0(void){ s32 i; for(i = 0; D_8036907C[i].mapID != 0 ; i++){ - if(map_get() == D_8036907C[i].mapID){ + if(gsworld_get_map() == D_8036907C[i].mapID){ return D_8036907C[i].assetId; } } diff --git a/src/core2/code_7060.c b/src/core2/code_7060.c index 4b4dae94..5e639a39 100644 --- a/src/core2/code_7060.c +++ b/src/core2/code_7060.c @@ -115,7 +115,7 @@ void func_8028E0F0(s32 arg0, s32 arg1[3]) { } D_80363690 = 0; - switch (map_get()) { + switch (gsworld_get_map()) { case MAP_27_FP_FREEZEEZY_PEAK: if (arg0 == 0xD) { baflag_set(BA_FLAG_16_FLYING); @@ -185,7 +185,7 @@ void func_8028E4B0(void) { D_8037BFBA = TRUE; D_8037BFB9 = FALSE; func_80295914(); - sp20 = exit_get(); + sp20 = gsworld_get_exit(); D_8037BFB8 = 0; player_setPosition(D_803636C0); if (volatileFlag_get(VOLATILE_FLAG_E) || func_802D686C() || (sp20 == 0x65)){ @@ -357,7 +357,7 @@ void func_8028E9C4(s32 arg0, f32 arg1[3]) { _player_getPosition(arg1); switch(bsStoredState_getTransformation()){ case TRANSFORM_3_PUMPKIN: //L8028EA68 - if(map_get() == MAP_1B_MMM_MAD_MONSTER_MANSION){ + if(gsworld_get_map() == MAP_1B_MMM_MAD_MONSTER_MANSION){ arg1[1] += 100.0f; } else{ @@ -417,7 +417,7 @@ f32 player_getPitch(void){ } int func_8028EC04(void){ - return func_80298850(); + return balookat_getState(); } void player_getRotation(f32 *dst){ @@ -839,16 +839,16 @@ void func_8028F8F8(s32 arg0, bool arg1){ void func_8028F918(s32 arg0){ if(arg0 == 0){ - func_80298890(); + balookat_pop(); } else{ - func_802988DC(arg0); + balookat_push(arg0); } } void func_8028F94C(s32 arg0, f32 arg1[3]){ - func_802988DC(arg0); - func_8029892C(arg1); + balookat_push(arg0); + balookat_set_position(arg1); } void func_8028F974(void){ @@ -858,7 +858,7 @@ void func_8028F974(void){ void func_8028F994(void){ D_803636B0 = 1; player_getPosition(D_803636B4); - transitionToMap(map_get(), 0, 0); + transitionToMap(gsworld_get_map(), 0, 0); } void func_8028F9DC(s32 arg0){ @@ -942,7 +942,7 @@ bool player_throwCarriedObject(void){ } void func_8028FC8C(f32 arg0[3]){ - func_8029892C(arg0); + balookat_set_position(arg0); } void func_8028FCAC(void){ diff --git a/src/core2/code_8DC20.c b/src/core2/code_8DC20.c index f09152e0..4087d256 100644 --- a/src/core2/code_8DC20.c +++ b/src/core2/code_8DC20.c @@ -64,7 +64,7 @@ void func_80315084(Gfx **gfx, Mtx **mtx, Vtx **vtx){ void func_80315110(Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(!D_803830A0){ - if(map_get() != MAP_90_GL_BATTLEMENTS){ + if(gsworld_get_map() != MAP_90_GL_BATTLEMENTS){ func_803306C8(2); func_8032AD7C(2); } diff --git a/src/core2/code_935F0.c b/src/core2/code_935F0.c index 6570cc31..f7730687 100644 --- a/src/core2/code_935F0.c +++ b/src/core2/code_935F0.c @@ -32,7 +32,7 @@ ActorInfo chMinigame = { /* .code */ enum minigame_e __chminigame_getCurrentMapId(void){ - switch(map_get()){ + switch(gsworld_get_map()){ case MAP_3A_RBB_BOSS_BOOM_BOX: return MINIGAME_0_BOSS_BOOM_BOX; case MAP_10_BGS_MR_VILE: @@ -77,7 +77,7 @@ void func_8031A678(Actor *this){ return; case MINIGAME_3_ZUBBAS: - if (map_get() != MAP_5B_CCW_SPRING_ZUBBA_HIVE) { + if (gsworld_get_map() != MAP_5B_CCW_SPRING_ZUBBA_HIVE) { sp20[0] = 0.0f; sp20[1] = 0.0f; sp20[2] = -1000.0f; diff --git a/src/core2/code_956B0.c b/src/core2/code_956B0.c index 3734f3b5..af7f48af 100644 --- a/src/core2/code_956B0.c +++ b/src/core2/code_956B0.c @@ -76,7 +76,7 @@ bool cutscene_skipBeachCutsceneCheck(void){ //checks is a cutscene can be inturrupted and performs take me there void cutscenetrigger_check(s32 cs_map, s32 arg1, s32 return_map, s32 return_exit, bool (* condFunc)(void)){ - if(map_get() != cs_map) + if(gsworld_get_map() != cs_map) return; if((condFunc && condFunc()) || mapSpecificFlags_get(arg1)){ @@ -111,7 +111,7 @@ s32 cutscenetrigger_update(void){ cutscenetrigger_check(MAP_7C_CS_INTRO_BANJOS_HOUSE_1, 0xC, MAP_1_SM_SPIRAL_MOUNTAIN, 0x12, cutscene_skipIntroCutsceneCheck); cutscenetrigger_check(MAP_86_CS_SPIRAL_MOUNTAIN_4, 0xC, MAP_1_SM_SPIRAL_MOUNTAIN, 0x12, cutscene_skipIntroCutsceneCheck); cutscenetrigger_check(MAP_89_CS_INTRO_BANJOS_HOUSE_2, 0xC, MAP_1_SM_SPIRAL_MOUNTAIN, 0x12, cutscene_skipIntroCutsceneCheck); - if(map_get() == MAP_95_CS_END_ALL_100 && mapSpecificFlags_get(1)){ + if(gsworld_get_map() == MAP_95_CS_END_ALL_100 && mapSpecificFlags_get(1)){ func_8034B9E4(); mapSpecificFlags_set(1, 0); } @@ -122,7 +122,7 @@ void func_8031CB50(enum map_e map_id, s32 exit_id, s32 arg2) { s32 sp1C; if ((D_80383190 == 0) && (getGameMode() != GAME_MODE_8_BOTTLES_BONUS) && (getGameMode() != GAME_MODE_7_ATTRACT_DEMO)) { - sp1C = func_803226E8(map_get()); + sp1C = func_803226E8(gsworld_get_map()); if ((func_803226E8(map_id) != sp1C) && (func_80322914() == 0)) { func_8025A388(0, 0x4E2); func_8025AB00(); diff --git a/src/core2/code_9A9D0.c b/src/core2/code_9A9D0.c index d7fc093d..832a55bd 100644 --- a/src/core2/code_9A9D0.c +++ b/src/core2/code_9A9D0.c @@ -66,7 +66,7 @@ void func_803219F4(s32 arg0){ func_8025A8B8(COMUSIC_58_WADING_BOOTS, 1); break; case 4: //L80321B60 - if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){ + if(gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK){ D_80383314 = COMUSIC_8A_GETTING_TURBO_TRAINERS; } else{ diff --git a/src/core2/code_9B650.c b/src/core2/code_9B650.c index 11d194bd..833277a8 100644 --- a/src/core2/code_9B650.c +++ b/src/core2/code_9B650.c @@ -221,9 +221,9 @@ void func_8032278C(s32 arg0, s32 arg1) { static s32 D_8036E2B4 = 1; - D_80383340.unk4 = func_803226BC(map_get()); - D_80383340.unk0 = func_803226E8(map_get()); - D_80383340.unk2 = func_80322714(map_get()); + D_80383340.unk4 = func_803226BC(gsworld_get_map()); + D_80383340.unk0 = func_803226E8(gsworld_get_map()); + D_80383340.unk2 = func_80322714(gsworld_get_map()); if (arg1 == 3) { D_8036E2B4 = 1; return; diff --git a/src/core2/code_9B990.c b/src/core2/code_9B990.c index aa122359..69121844 100644 --- a/src/core2/code_9B990.c +++ b/src/core2/code_9B990.c @@ -285,7 +285,7 @@ void __overlay_bgs_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){ return; } void __overlay_bgs_release(void){ return; } void overlay_bgs_init(void){ - if( map_get() == MAP_10_BGS_MR_VILE + if( gsworld_get_map() == MAP_10_BGS_MR_VILE && volatileFlag_get(VOLATILE_FLAG_2_FF_IN_MINIGAME) && volatileFlag_get(VOLATILE_FLAG_7_HAS_SEEN_VILE_FF_MINIGAME) ){ diff --git a/src/core2/code_9BD0.c b/src/core2/code_9BD0.c index 75ab5264..8fa6ec3f 100644 --- a/src/core2/code_9BD0.c +++ b/src/core2/code_9BD0.c @@ -109,7 +109,7 @@ int func_80290E8C(void){ ncDynamicCamera_setState(3); func_80291488(0xB); - if( map_get() == MAP_B_CC_CLANKERS_CAVERN + if( gsworld_get_map() == MAP_B_CC_CLANKERS_CAVERN && player_getYPosition() < 1201.0f ){ func_802C1B20(1100.0f); @@ -118,7 +118,7 @@ int func_80290E8C(void){ } void func_80290F14(void){ - if( !func_80298850() + if( !balookat_getState() && player_movementGroup() != BSGROUP_4_LOOK && batimer_get(7) == 0.0f && bainput_should_zoom_out_camera() @@ -152,7 +152,7 @@ void func_8029103C(void){ } int func_8029105C(s32 arg0){ - if(func_80298850()) + if(balookat_getState()) return FALSE; if(bainput_should_rotate_camera_left() && ncDynamicCamA_func_802C1DB0(-45.0f)){ diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index 596efd53..eb929a10 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -133,7 +133,7 @@ void actor_predrawMethod(Actor *this){ sp34[0] = this->pitch; sp34[1] = this->yaw; sp34[2] = this->roll; - codeAC520_func_80333D48(sp40, this->position, sp34, this->scale, 0, model_getVtxList(sp48)); + gclights_recolor_vertices(sp40, this->position, sp34, this->scale, 0, model_getVtxList(sp48)); }//L80325560 modelRender_setVertexList(sp40); this->unkF4_29 = NOT(this->unkF4_29); diff --git a/src/core2/code_ABC00.c b/src/core2/code_ABC00.c index 9c2203ea..3595fe56 100644 --- a/src/core2/code_ABC00.c +++ b/src/core2/code_ABC00.c @@ -186,7 +186,7 @@ void jiggylist_map_actors(void) { void func_80332D98(enum map_e map_id, enum jiggy_e jiggy_id, enum file_progress_e flag_id, s32 arg3) { f32 sp1C[3]; - if ((map_get() == map_id) + if ((gsworld_get_map() == map_id) && fileProgressFlag_get(flag_id) && !jiggyscore_isSpawned(jiggy_id) && nodeProp_findPositionFromActorId(arg3, sp1C) diff --git a/src/core2/code_BEF20.c b/src/core2/code_BEF20.c index 6de47c4a..00b4fca7 100644 --- a/src/core2/code_BEF20.c +++ b/src/core2/code_BEF20.c @@ -242,8 +242,8 @@ void func_803465E4(void){ if(D_80385FE8){ if( ncCamera_getType() != 3 // CAMERA_TYPE_3_STATIC && func_8028F070() - && map_get() != MAP_33_UNUSED - && map_get() != MAP_91_FILE_SELECT + && gsworld_get_map() != MAP_33_UNUSED + && gsworld_get_map() != MAP_91_FILE_SELECT ){ D_80385FE0 = TRUE; }//L80346674 @@ -282,7 +282,7 @@ void func_803465E4(void){ if(level_get() != LEVEL_2_TREASURE_TROVE_COVE || !levelSpecificFlags_get(LEVEL_FLAG_5_TTC_UNKNOWN)){ is_underwater = (player_getWaterState() == BSWATERGROUP_2_UNDERWATER); is_on_water_surface = (player_getWaterState() == BSWATERGROUP_1_SURFACE); - is_in_polluted_or_winter_water = ((level_get() == LEVEL_9_RUSTY_BUCKET_BAY) || (map_get() == MAP_46_CCW_WINTER)); + is_in_polluted_or_winter_water = ((level_get() == LEVEL_9_RUSTY_BUCKET_BAY) || (gsworld_get_map() == MAP_46_CCW_WINTER)); if( is_in_polluted_or_winter_water && (is_underwater || is_on_water_surface)){ //L803467EC D_80385FEC = 2.0f; } @@ -319,7 +319,7 @@ void func_803465E4(void){ ){ if(sp4C == LEVEL_C_BOSS) sp4C = LEVEL_6_LAIR; - if(sp4C > 0 && sp4C < 0xC && map_get() != MAP_91_FILE_SELECT){ + if(sp4C > 0 && sp4C < 0xC && gsworld_get_map() != MAP_91_FILE_SELECT){ D_80386000[sp4C] = MAX(1.0, MIN(65535.0, D_80386000[sp4C] + time_getDelta())); } }//L80346B6C diff --git a/src/core2/code_C2F30.c b/src/core2/code_C2F30.c index 23be4f2c..645005b2 100644 --- a/src/core2/code_C2F30.c +++ b/src/core2/code_C2F30.c @@ -75,8 +75,8 @@ void func_80349FB0(DemoInput *input_ptr, u32 size, int arg2){ func_80321854(); debugScoreStates(); clearScoreStates(); - func_803216D0(map_get()); - func_8030AFA0(map_get()); + func_803216D0(gsworld_get_map()); + func_8030AFA0(gsworld_get_map()); volatileFlag_set(VOLATILE_FLAG_C4_WOZZA_HIDE_IN_SNS_PARADE, 1); func_8024F224(); rand_reset(); diff --git a/src/core2/code_C4B0.c b/src/core2/code_C4B0.c index ec0fefbb..e67d87d1 100644 --- a/src/core2/code_C4B0.c +++ b/src/core2/code_C4B0.c @@ -298,7 +298,7 @@ void func_80293F0C(void){ f32 sp2C[3]; _player_getPosition(sp44); - if(map_get() == MAP_34_RBB_ENGINE_ROOM && ml_vec3f_inside_box_f(sp44, -900.0f, -940.0f, 200.0f, 900.0f, 940.0f, 800.0f)){ + if(gsworld_get_map() == MAP_34_RBB_ENGINE_ROOM && ml_vec3f_inside_box_f(sp44, -900.0f, -940.0f, 200.0f, 900.0f, 940.0f, 800.0f)){ func_8031C5FC(D_8037C200, 150.0f); } else{ func_8031C608(D_8037C200); @@ -400,7 +400,7 @@ void func_80294390(void) { sp1C = (void *)func_8029463C(); if (sp1C != 0) { - if (func_803246B4(map_get(), ((s32*)sp1C)[2]) == 3) { + if (func_803246B4(gsworld_get_map(), ((s32*)sp1C)[2]) == 3) { func_80294384(4); } else{ diff --git a/src/core2/code_C97F0.c b/src/core2/code_C97F0.c index e497386e..76558fc6 100644 --- a/src/core2/code_C97F0.c +++ b/src/core2/code_C97F0.c @@ -177,7 +177,7 @@ void func_80350BC8(void){ } void func_80350BFC(void) { - D_80386170.unk4 = func_803507CC(map_get()); + D_80386170.unk4 = func_803507CC(gsworld_get_map()); if (D_80386170.unk4 != NULL) { D_80386170.unk0 = func_80350780(D_80386170.unk4->unk10); D_80386170.unk8 = assetcache_get(0x882); diff --git a/src/core2/code_C9F00.c b/src/core2/code_C9F00.c index 098433d3..ce6036e6 100644 --- a/src/core2/code_C9F00.c +++ b/src/core2/code_C9F00.c @@ -247,7 +247,7 @@ bool func_803515EC(NodeProp *arg0) { } else { for(phi_s0 = D_803725C0; phi_s0->unk0 != 0; phi_s0++){ if( (arg0->unk8 == phi_s0->unk0) - && ((phi_s0->unk3 == 0) || (map_get() == phi_s0->unk3)) + && ((phi_s0->unk3 == 0) || (gsworld_get_map() == phi_s0->unk3)) ){ sp48[0] = (s32) arg0->x; sp48[1] = (s32) arg0->y; diff --git a/src/core2/code_CB050.c b/src/core2/code_CB050.c index 0caf4bd3..4cad9eef 100644 --- a/src/core2/code_CB050.c +++ b/src/core2/code_CB050.c @@ -34,7 +34,7 @@ void func_80351FE0(Struct_core2_CB050_0 *arg0, Struct68s *arg1) { func_80351814(arg1, arg0->unk58); arg0->unk64 = 0.0f; arg0->unk6C = 0; - if (map_get() == MAP_22_CC_INSIDE_CLANKER) { + if (gsworld_get_map() == MAP_22_CC_INSIDE_CLANKER) { sp3C[0] = arg0->unk4C[0]; sp3C[1] = arg0->unk4C[1] + 1000.0f; sp3C[2] = arg0->unk4C[2]; @@ -96,7 +96,7 @@ void func_80352114(Struct_core2_CB050_0 *arg0, s32 arg1, f32 arg2) { arg0->unk28[1] = sinf(((arg0->unk64 * arg0->unk0) / 180.0) * BAD_PI) * 10.0f; arg0->unk4[0] = cosf(((arg0->unk64 * arg0->unk0) / 180.0) * BAD_PI) * 4.5; arg0->unk4[1] = sinf(((arg0->unk64 * arg0->unk0) / 180.0) * BAD_PI) * 2; - if (map_get() == MAP_22_CC_INSIDE_CLANKER) { + if (gsworld_get_map() == MAP_22_CC_INSIDE_CLANKER) { sp40[0] = arg0->unk4C[0]; sp40[1] = arg0->unk4C[1] + 1000.0f; sp40[2] = arg0->unk4C[2]; diff --git a/src/core2/code_D6180.c b/src/core2/code_D6180.c index 2273c13d..7087b023 100644 --- a/src/core2/code_D6180.c +++ b/src/core2/code_D6180.c @@ -130,7 +130,7 @@ void func_8035D3D8(Actor *this) { void func_8035D490(ActorMarker *marker){ Actor *sp1C; - if (map_get() == MAP_13_GV_MEMORY_GAME) { + if (gsworld_get_map() == MAP_13_GV_MEMORY_GAME) { sp1C = marker_getActor(marker); if (subaddie_playerIsWithinSphereAndActive(sp1C, 250) != 0) { @@ -143,7 +143,7 @@ void func_8035D490(ActorMarker *marker){ void func_8035D4F0(ActorMarker *marker, s32 arg1){ s32 pad; Actor *actor; - if(map_get() == MAP_13_GV_MEMORY_GAME){ + if(gsworld_get_map() == MAP_13_GV_MEMORY_GAME){ actor = marker_getActor(marker); if(actor->state != 9){ if (func_8033F3E8(mapModel_getModel(0), actor->position, 0x190, 0x1A0) == arg1) { diff --git a/src/core2/code_D6600.c b/src/core2/code_D6600.c index e223aca7..160fb734 100644 --- a/src/core2/code_D6600.c +++ b/src/core2/code_D6600.c @@ -129,7 +129,7 @@ void func_8035DA1C(Actor *this) { this->initialized = TRUE; this->unk138_25 = TRUE; this->actor_specific_1_f = 4.0f; - LOCAL_D6600(this)->unk4 =(map_get() == MAP_71_GL_STATUE_ROOM) ? 8 : 0xf; + LOCAL_D6600(this)->unk4 =(gsworld_get_map() == MAP_71_GL_STATUE_ROOM) ? 8 : 0xf; if (volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) { this->actor_specific_1_f = 0.0f; subaddie_set_state_with_direction(this, 1, 0.0f, 1); diff --git a/src/core2/code_D9B0.c b/src/core2/code_D9B0.c index 53a78d45..6d3aa4ba 100644 --- a/src/core2/code_D9B0.c +++ b/src/core2/code_D9B0.c @@ -130,7 +130,7 @@ void func_80294BDC(void) { sp28 = time_getDelta(); sp2C = func_802944A8(); sp24 = func_80294660(); - if ((map_get() == MAP_34_RBB_ENGINE_ROOM) && ((sp24 * 0x10) < 0)) { + if ((gsworld_get_map() == MAP_34_RBB_ENGINE_ROOM) && ((sp24 * 0x10) < 0)) { D_8037C2ED = 1; } if (D_8037C2ED != 0) { @@ -145,7 +145,7 @@ void func_80294BDC(void) { } } } - if (map_get() == MAP_C_MM_TICKERS_TOWER) { + if (gsworld_get_map() == MAP_C_MM_TICKERS_TOWER) { sp28 *= 2.0; } if ((sp24 & 0x50) && !player_inWater()) { diff --git a/src/core2/code_E910.c b/src/core2/code_E910.c index a595c610..b36753a8 100644 --- a/src/core2/code_E910.c +++ b/src/core2/code_E910.c @@ -51,8 +51,8 @@ bsMap D_80363824[] ={ {BS_BOMB, func_802A3F9C, func_802A411C, func_802A4404, func_802A505C}, {BS_2B_DIVE_IDLE, func_802A762C, func_802A7674, func_802A7718, func_80296608}, {BS_2C_DIVE_B, func_802A7738, func_802A7838, func_802A7A2C, func_80296608}, - {BS_2D_SWIM_IDLE, func_802B5774, func_802B5950, func_802B5AF8, func_80296608}, - {BS_2E_SWIM, func_802B5B18, func_802B5C40, func_802B5E10, func_80296608}, + {BS_2D_SWIM_IDLE, bsswim_idle_init, bsswim_idle_update, bsswim_idle_end, func_80296608}, + {BS_2E_SWIM, bsswim_swim_init, bsswim_swim_update, bsswim_swim_end, func_80296608}, {BS_2F_FALL, bsjump_fall_init, bsjump_fall_update, bsjump_fall_end, func_80296608}, {BS_30_DIVE_ENTER, bsSwim_dive_init, func_802A7E2C, func_802A7F4C, func_80296608}, {BS_ROLL, bstwirl_init, bstwirl_update, bstwirl_end, func_802B5350}, @@ -119,8 +119,8 @@ bsMap D_80363824[] ={ {0x00000074, func_802B3E2C, func_802B3E64, func_802B3EF4, func_80296608}, {0x00000075, func_802B3D8C, func_802B3DBC, func_802B3E0C, func_80296608}, {0x00000076, func_802A4F74, func_802A4FC8, func_802A503C, func_80296608}, - {0x00000077, func_802B5E8C, func_802B5EFC, func_802B5F38, func_80296608}, - {0x00000078, func_802A83C0, func_802A8410, func_802A844C, func_80296608}, + {BS_77_SWIM_LOOKAT_DRONE, bsswim_lookat_init, bsswim_lookat_update, bsswim_lookat_end, func_80296608}, + {BS_78_DIVE_LOOKAT_DRONE, bsbswim_lookat_init, bsbswim_lookat_update, bsbswim_lookat_end, func_80296608}, {0x00000079, bsbtrot_unk79_init, bsbtrot_unk79_update, bsbtrot_unk79_end, func_80296608}, {BS_WALK_MUD, bswalk_mud_init, bswalk_mud_update, NULL, func_80296608}, {BS_BTROT_OW, bsbtrot_ow_init, bsbtrot_ow_update, bsbtrot_ow_end, func_80296590}, @@ -147,8 +147,8 @@ bsMap D_80363824[] ={ {BS_93_PUMPKIN_DRONE, bspumpkin_drone_init, bspumpkin_drone_update, bspumpkin_drone_end, bsdrone_interrupt}, {BS_94_CROC_DRONE, bscroc_drone_init, bscroc_drone_update, bscroc_drone_end, bsdrone_interrupt}, {BS_95_WALRUS_DRONE, bswalrus_drone_init, bswalrus_drone_update, bswalrus_drone_end, bsdrone_interrupt}, - {BS_96_SWIM_LOCKED, func_802B5F58, func_802B5F80, func_802B5FA0, bsdrone_interrupt}, - {BS_97_DIVE_LOCKED, func_802A874C, func_802A8774, func_802A8794, bsdrone_interrupt}, + {BS_96_SWIM_DRONE, bsswim_drone_init, bsswim_drone_update, bsswim_drone_end, bsdrone_interrupt}, + {BS_97_DIVE_DRONE, bsbswim_drone_init, bsbswim_drone_update, bsbswim_drone_end, bsdrone_interrupt}, {BS_98_WALK_DRONE, bswalk_drone_init, bswalk_drone_update, bswalk_drone_end, bsdrone_interrupt}, {0x00000099, func_802A50B0, func_802A50D8, func_802A50F8, bsdrone_interrupt}, {BS_9A_BTROT_DRONE, bsbtrot_drone_init, bsbtrot_drone_update, bsbtrot_drone_end, bsdrone_interrupt}, @@ -199,13 +199,13 @@ void func_80295914(void){ bainput_reset(); bsList_clearAll(); bs_clearState(); - func_80295DD0(); + babounds_init(); func_80296C30(); baphysics_init(); baiFrame_reset(); pitch_reset(); climbClear(); - func_8029887C(); + balookat_init(); roll_reset(); func_802992F0(); func_80294DD8(); @@ -279,7 +279,7 @@ void func_80295C08(void (* arg0)(void)){ void func_80295C14(void){ func_802964B8(); - func_80298A84(); + balookat_update(); stateTimer_update(); func_8029E100(); pfsManager_update();//controller_update @@ -318,7 +318,7 @@ void func_80295C14(void){ D_8037C3B0 = NULL; } basfx_update(); - func_80295E74();//voidOut_update + babounds_update();//voidOut_update } void func_80295D74(void){ diff --git a/src/core2/code_EE40.c b/src/core2/code_EE40.c deleted file mode 100644 index 4f37173b..00000000 --- a/src/core2/code_EE40.c +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include "functions.h" -#include "variables.h" -#include "core2/ba/physics.h" - -/* .bss */ -struct{ - f32 unk0[3]; - f32 unkC[3]; - u8 unk18; - u8 pad19[3]; -} D_8037C3C0; - -/* .code */ -void func_80295DD0(void){ - s32 sp24[3]; - s32 sp18[3]; - - mapModel_getBounds(sp18, sp24); - ml_vec3w_to_vec3f(D_8037C3C0.unkC, sp18); - ml_vec3w_to_vec3f(D_8037C3C0.unk0, sp24); - D_8037C3C0.unkC[0] -= 400.0f; - D_8037C3C0.unkC[1] = -8000.0f; - D_8037C3C0.unkC[2] -= 400.0f; - D_8037C3C0.unk0[0] += 400.0f; - D_8037C3C0.unk0[1] += 1000.0f; - D_8037C3C0.unk0[2] += 400.0f; - D_8037C3C0.unk18 = 0; -} - -void func_80295E74(void){ - f32 sp1C[3]; - _player_getPosition(sp1C); - if(!ml_vec3f_inside_box_vec3f(sp1C, D_8037C3C0.unkC, D_8037C3C0.unk0)){ - if(D_8037C3C0.unk18 == 0){ - D_8037C3C0.unk18 = 1; - func_8029B6F0(); - } - else{ - baphysics_set_type(BA_PHYSICS_FREEZE); - } - } -} diff --git a/src/core2/code_EF50.c b/src/core2/code_EF50.c index 5b8f2e6a..1cf5b4cf 100644 --- a/src/core2/code_EF50.c +++ b/src/core2/code_EF50.c @@ -8,6 +8,8 @@ extern f32 player_getYaw(void); extern void chJigsawDance_setState(Actor *, s32); extern void bsjig_setJiggyMarkerPtr(ActorMarker *); + + typedef struct{ f32 unk0; f32 unk4; @@ -251,7 +253,7 @@ ActorMarker *func_80296554(void){ return D_8037C3E0.unk14; } -s32 func_80296560(void){ +enum ba_rebound_id func_80296560(void){ return D_8037C3E0.unk18; } @@ -444,7 +446,7 @@ void func_80296608(void){ sp1C = player_getTransformation(); sp1C = !((sp1C == TRANSFORM_1_BANJO) || (sp1C == TRANSFORM_7_WISHWASHY)); if( - !func_80298850() + !balookat_getState() && !sp1C && !baflag_isTrue(BA_FLAG_F) && !player_isStable() diff --git a/src/core2/gc/dialog.c b/src/core2/gc/dialog.c index b6e3854b..35b1d410 100644 --- a/src/core2/gc/dialog.c +++ b/src/core2/gc/dialog.c @@ -753,7 +753,7 @@ void func_80310B1C(s32 text_id, s32 arg1, ActorMarker *marker, void(*callback)(A loadAndCreateDialogs(text_id, arg1, marker, callback, arg4, arg5); // Is the player at the final boss and is the text not an entering quote? - if (map_get() == MAP_90_GL_BATTLEMENTS && ASSET_10EC_DIALOG_FINALBOSS_ENTERING_6 < text_id) { + if (gsworld_get_map() == MAP_90_GL_BATTLEMENTS && ASSET_10EC_DIALOG_FINALBOSS_ENTERING_6 < text_id) { func_80310A5C(3, 4, 0x1e, arg1 & 2, arg1 & 0x80); return; } diff --git a/src/core2/gc/parade.c b/src/core2/gc/parade.c index 5cb39f20..c44cf692 100644 --- a/src/core2/gc/parade.c +++ b/src/core2/gc/parade.c @@ -280,7 +280,7 @@ void gcparade_print(s32 index){ void gcparade_update(void) { s32 sp34; - if ((map_get() == MAP_96_CS_END_BEACH_1) && mapSpecificFlags_get(4)) { + if ((gsworld_get_map() == MAP_96_CS_END_BEACH_1) && mapSpecificFlags_get(4)) { mapSpecificFlags_set(4, FALSE); gcparade_beginFinalParade(); return; @@ -290,7 +290,7 @@ void gcparade_update(void) { switch (D_803830F0.state) { case PARADE_STATE_3_WARP: if (D_803830F0.unk5 == 0) { - if (map_get() == D_803830F0.parade_element->map) { + if (gsworld_get_map() == D_803830F0.parade_element->map) { if (D_803830F0.parade_id == 0) { sp34 = 0xA0; if (D_803830F0.parade_element->exit >= 0) diff --git a/src/core2/gc/pauseMenu.c b/src/core2/gc/pauseMenu.c index 3b85cfd0..aab535b2 100644 --- a/src/core2/gc/pauseMenu.c +++ b/src/core2/gc/pauseMenu.c @@ -36,7 +36,7 @@ void func_802DC5B8(void); void func_802DC560(s32, s32); s32 controller_getStartButton(s32 controller_index); bool fileProgressFlag_get(enum file_progress_e); -enum map_e map_get(void); +enum map_e gsworld_get_map(void); bool func_802FD2D4(void); bool func_802FC3C4(void); extern void func_8025A2B0(void); @@ -1063,7 +1063,7 @@ s32 gcPauseMenu_update(void) { case PAUSE_SELECTION_1_EXIT_TO_WITCH_S_LAIR://L80313908 //return to lair volatileFlag_set(VOLATILE_FLAG_16, 1); - if (map_get() == MAP_8E_GL_FURNACE_FUN) { + if (gsworld_get_map() == MAP_8E_GL_FURNACE_FUN) { volatileFlag_set(VOLATILE_FLAG_0_IN_FURNACE_FUN_QUIZ, 0); transitionToMap(MAP_80_GL_FF_ENTRANCE, 2, 1); } diff --git a/src/core2/gc/sky.c b/src/core2/gc/sky.c index 9dea25a6..d72e297d 100644 --- a/src/core2/gc/sky.c +++ b/src/core2/gc/sky.c @@ -110,7 +110,7 @@ void sky_free(void){ void sky_reset(void){ int i; - gcSky.sky_info = sky_getMapSkyInfo(map_get()); + gcSky.sky_info = sky_getMapSkyInfo(gsworld_get_map()); for(i = 0; i< 3; i++){ gcSky.model[i] = NULL; gcSky.model_bins[i] = NULL; diff --git a/src/core2/gc/transition.c b/src/core2/gc/transition.c index 4d173578..a75998b4 100644 --- a/src/core2/gc/transition.c +++ b/src/core2/gc/transition.c @@ -373,7 +373,7 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){ void gctransition_8030BD4C(void){ MapTransitionInfo *tmp_10s; TransitionInfo *tmp_a1; - tmp_10s = _gctranstion_get_map_transition_info(map_get()); + tmp_10s = _gctranstion_get_map_transition_info(gsworld_get_map()); tmp_a1 = _gctranstion_8030B400(tmp_10s->in_index); _gctranstion_changeState(tmp_a1->state, tmp_a1); } @@ -404,7 +404,7 @@ void gctransition_8030BE3C(void){ void gctransition_8030BE60(void){ TransitionInfo *tmp_a1; - tmp_a1 = _gctranstion_8030B400(_gctranstion_get_map_transition_info(map_get())->out_index); + tmp_a1 = _gctranstion_8030B400(_gctranstion_get_map_transition_info(gsworld_get_map())->out_index); func_8030C180(); _gctranstion_changeState(tmp_a1->state, tmp_a1); } @@ -491,7 +491,7 @@ void gctransition_update(void){ func_8030C180(); if(s_current_transition.anctrl != NULL) - func_80334ECC(); + gsworld_update(); } s_current_transition.substate++; } diff --git a/src/core2/code_7AF80.c b/src/core2/gccube.c similarity index 99% rename from src/core2/code_7AF80.c rename to src/core2/gccube.c index 5a1c9775..0a121aeb 100644 --- a/src/core2/code_7AF80.c +++ b/src/core2/gccube.c @@ -847,31 +847,31 @@ void cubeList_init(){ sSpawnableActorSize = 0; sSpawnableActorList = NULL; - if(map_get() == MAP_21_CC_WITCH_SWITCH_ROOM){ + if(gsworld_get_map() == MAP_21_CC_WITCH_SWITCH_ROOM){ sCubeList.margin = 500.0f; } - else if(map_get() == MAP_12_GV_GOBIS_VALLEY){ + else if(gsworld_get_map() == MAP_12_GV_GOBIS_VALLEY){ sCubeList.margin = 500.0f; } - else if(map_get() == MAP_7F_FP_WOZZAS_CAVE){ + else if(gsworld_get_map() == MAP_7F_FP_WOZZAS_CAVE){ sCubeList.margin = 500.0f; } - else if(map_get() == MAP_D_BGS_BUBBLEGLOOP_SWAMP){ + else if(gsworld_get_map() == MAP_D_BGS_BUBBLEGLOOP_SWAMP){ sCubeList.margin = 700.0f; } - else if(map_get() == MAP_7_TTC_TREASURE_TROVE_COVE){ + else if(gsworld_get_map() == MAP_7_TTC_TREASURE_TROVE_COVE){ sCubeList.margin = 400.0f; } - else if(map_get() == MAP_16_GV_RUBEES_CHAMBER){ + else if(gsworld_get_map() == MAP_16_GV_RUBEES_CHAMBER){ sCubeList.margin = 400.0f; } - else if(map_get() == MAP_2_MM_MUMBOS_MOUNTAIN){ + else if(gsworld_get_map() == MAP_2_MM_MUMBOS_MOUNTAIN){ sCubeList.margin = 250.0f; } - else if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){ + else if(gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK){ sCubeList.margin = 250.0f; } - else if(map_get() == MAP_92_GV_SNS_CHAMBER){ + else if(gsworld_get_map() == MAP_92_GV_SNS_CHAMBER){ sCubeList.margin = 300.0f; } else{ diff --git a/src/core2/code_AC520.c b/src/core2/gclights.c similarity index 69% rename from src/core2/code_AC520.c rename to src/core2/gclights.c index 6ffa4411..136c3e64 100644 --- a/src/core2/code_AC520.c +++ b/src/core2/gclights.c @@ -15,9 +15,9 @@ void lighting_init(); /* .bss */ struct { vector(Lighting) *vector_ptr; - Lighting *unk4[NUM_LIGHTING_ELEM]; - Lighting **unk44; - Lighting **unk48; // copy of unk44 + Lighting *reference[NUM_LIGHTING_ELEM]; + Lighting **end_ptr; + Lighting **capacity_ptr; // copy of end_ptr } sLightingVectorList; //.code @@ -30,15 +30,15 @@ static void __lighting_init(f32 position[3], f32 rotation[3], f32 scale, f32 arg end_ptr = (Lighting *)vector_getEnd(sLightingVectorList.vector_ptr); mlMtxIdent(); func_80252CC4(position, rotation, scale, arg3); - sLightingVectorList.unk44 = sLightingVectorList.unk4; + sLightingVectorList.end_ptr = sLightingVectorList.reference; iPtr = start_ptr; - for(; iPtr < end_ptr && sLightingVectorList.unk44 < sLightingVectorList.unk48; iPtr++) { - if(iPtr->unk34 && ml_vec3f_distance(position, iPtr->position) < iPtr->unk1C + global_norm) { + for(; iPtr < end_ptr && sLightingVectorList.end_ptr < sLightingVectorList.capacity_ptr; iPtr++) { + if(iPtr->active && ml_vec3f_distance(position, iPtr->position) < iPtr->fade_radius_max_unscaled + global_norm) { mlMtx_apply_vec3f(iPtr->positionCopy, iPtr->position); - iPtr->unk20 = iPtr->unk18/scale; - iPtr->unk24 = iPtr->unk1C/scale; - *sLightingVectorList.unk44 = iPtr; - sLightingVectorList.unk44++; + iPtr->fade_radius_min = iPtr->fade_radius_min_unscaled/scale; + iPtr->fade_radius_max = iPtr->fade_radius_max_unscaled/scale; + *sLightingVectorList.end_ptr = iPtr; + sLightingVectorList.end_ptr++; } } } @@ -55,7 +55,7 @@ s32 __codeAC520_pad_func_8033361C() { Lighting *iPtr; for(iPtr = startPtr; iPtr < endPtr; iPtr++) { - if(iPtr->unk34) { + if(iPtr->active) { return (iPtr-startPtr) + 1; } } @@ -69,7 +69,7 @@ s32 __codeAC520_pad_func_80333698(s32 index) { Lighting *endPtr = vector_getEnd(sLightingVectorList.vector_ptr); for(++iPtr; iPtr < endPtr; iPtr++) { - if(iPtr->unk34) { + if(iPtr->active) { return (iPtr-startPtr) + 1; } } @@ -77,20 +77,20 @@ s32 __codeAC520_pad_func_80333698(s32 index) { return NULL; } -void __codeAC520_pad_func_80333734(s32 index, f32 *arg1) { +void gclights_getPosition(s32 index, f32 position[3]) { Lighting *v0 = vector_at(sLightingVectorList.vector_ptr, index-1); - TUPLE_COPY(arg1, v0->position) + TUPLE_COPY(position, v0->position) } -void __codeAC520_pad_func_80333784(s32 index, f32 *arg1) { +void gclights_getRadii(s32 index, f32 *arg1) { Lighting *v0 = vector_at(sLightingVectorList.vector_ptr, index-1); - arg1[0] = v0->unk18; - arg1[1] = v0->unk1C; + arg1[0] = v0->fade_radius_min_unscaled; + arg1[1] = v0->fade_radius_max_unscaled; } -void __codeAC520_pad_func_803337C8(s32 index, s32 *arg1) { +void gclights_getRgb(s32 index, s32 pRgb[3]) { Lighting *v0 = vector_at(sLightingVectorList.vector_ptr, index-1); - TUPLE_COPY(arg1, v0->rgb) + TUPLE_COPY(pRgb, v0->rgb) } s32 __codeAC520_pad_func_80333818() { @@ -103,21 +103,21 @@ static s32 __lighting_create() { Lighting *iPtr; for(iPtr = beginPtr; iPtr < endPtr; iPtr++) { - if(!iPtr->unk34) + if(!iPtr->active) break; } if(iPtr == endPtr) iPtr = vector_pushBackNew(&sLightingVectorList.vector_ptr); - iPtr->unk34 = 1; + iPtr->active = 1; iPtr->rgb[0] = 0xff; iPtr->rgb[1] = 0xff; iPtr->rgb[2] = 0xff; iPtr->position[2] = 0.0f; iPtr->position[1] = 0.0f; iPtr->position[0] = 0.0f; - iPtr->unk18 = 150.0f; - iPtr->unk1C = 300.0f; + iPtr->fade_radius_min_unscaled = 150.0f; + iPtr->fade_radius_max_unscaled = 300.0f; return (iPtr - (Lighting *)vector_getBegin(sLightingVectorList.vector_ptr)) + 1; } @@ -127,13 +127,13 @@ void lighting_free() { } void lighting_init() { - sLightingVectorList.vector_ptr = vector_new(sizeof(Lighting), 0x10); - sLightingVectorList.unk48 = &sLightingVectorList.unk4[NUM_LIGHTING_ELEM]; + sLightingVectorList.vector_ptr = vector_new(sizeof(Lighting), NUM_LIGHTING_ELEM); + sLightingVectorList.capacity_ptr = &sLightingVectorList.reference[NUM_LIGHTING_ELEM]; } void func_80333974(s32 index) { Lighting *v0 = vector_at(sLightingVectorList.vector_ptr, index-1); - v0->unk34 = 0; + v0->active = 0; } s32 __codeAC520_pad_func_803339A4(f32 arg0[3]) { @@ -143,7 +143,7 @@ s32 __codeAC520_pad_func_803339A4(f32 arg0[3]) { Lighting *tmp_s0 = NULL; for(iPtr = beginPtr; iPtr < endPtr; iPtr++) { - if(iPtr->unk34) { + if(iPtr->active) { if(tmp_s0 == NULL || ml_vec3f_distance(arg0, iPtr->position) < ml_vec3f_distance(arg0, tmp_s0->position)) { tmp_s0 = iPtr; } @@ -158,10 +158,10 @@ static void __lighting_setPosition(s32 index , f32 *position) { TUPLE_COPY(v0->position, position) } -static void __lighting_setUnk18AndUnk1C(s32 index , f32 *unk18_and_unk1c) { +static void __lighting_setFadeRadii(s32 index , f32 *fade_radii) { Lighting *v0 = vector_at(sLightingVectorList.vector_ptr, index-1); - v0->unk18 = unk18_and_unk1c[0]; - v0->unk1C = unk18_and_unk1c[1]; + v0->fade_radius_min_unscaled = fade_radii[0]; + v0->fade_radius_max_unscaled = fade_radii[1]; } static void __lighting_setRgb(s32 index , s32 *rgb) { @@ -171,19 +171,19 @@ static void __lighting_setRgb(s32 index , s32 *rgb) { void lightingVectorList_fromFile(File *file_ptr) { f32 position[3]; - f32 unk18_and_unk1c[2]; + f32 fade_radii[2]; s32 rgb[3]; s32 lighting_ptr; __lighting_freeAndInit(); while(!file_isNextByteExpected(file_ptr, 0)) { if( file_isNextByteExpected(file_ptr, 1) && file_getNFloats_ifExpected(file_ptr, 2, position, 3) - && file_getNFloats_ifExpected(file_ptr, 3, unk18_and_unk1c, 2) + && file_getNFloats_ifExpected(file_ptr, 3, fade_radii, 2) && file_getNWords_ifExpected(file_ptr, 4, rgb, 3) ) { lighting_ptr = __lighting_create(); __lighting_setPosition(lighting_ptr, position); - __lighting_setUnk18AndUnk1C(lighting_ptr, unk18_and_unk1c); + __lighting_setFadeRadii(lighting_ptr, fade_radii); __lighting_setRgb(lighting_ptr, rgb); } } @@ -195,10 +195,10 @@ s32 __codeAC520_pad_func_80333C78(File *arg0) { Lighting *iPtr; for(iPtr = beginPtr; iPtr < endPtr; iPtr++) { - if(iPtr->unk34) { + if(iPtr->active) { file_isNextByteExpected(arg0, 1); file_getNFloats_ifExpected(arg0, 2, iPtr->position, 3); - file_getNFloats_ifExpected(arg0, 3, &iPtr->unk18, 2); + file_getNFloats_ifExpected(arg0, 3, &iPtr->fade_radius_min_unscaled, 2); file_getNWords_ifExpected(arg0, 4, iPtr->rgb, 3); } } @@ -206,19 +206,19 @@ s32 __codeAC520_pad_func_80333C78(File *arg0) { return file_isNextByteExpected(arg0, 0); } -void codeAC520_func_80333D48(BKVertexList *vertex_list, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], BKVertexList *ref_vertex_list) { +void gclights_recolor_vertices(BKVertexList *vertex_list, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], BKVertexList *ref_vertex_list) { static s32 sBlackRgb[3] = {0, 0, 0}; Vtx *i_ptr; Vtx *end_ptr; Vtx *ref_ptr; - Lighting **struct_ptr_ptr; + Lighting **pp_light; f32 vtx_position[3]; f32 rgb_modifier[3]; - Lighting *struct_ptr; + Lighting *p_light; f32 distance_between_vtx_and_lighting_node; __lighting_init(position, rotation, scale, arg4, vtxList_getGlobalNorm(vertex_list)); - if (sLightingVectorList.unk44 == (&sLightingVectorList.unk4[0])) { + if (sLightingVectorList.end_ptr == (&sLightingVectorList.reference[0])) { vtxList_recolor(vertex_list, &sBlackRgb); return; } @@ -229,19 +229,19 @@ void codeAC520_func_80333D48(BKVertexList *vertex_list, f32 position[3], f32 rot rgb_modifier[0] = rgb_modifier[1] = rgb_modifier[2] = 0.0f; TUPLE_COPY(vtx_position, ref_ptr->v.ob); - for(struct_ptr_ptr = &sLightingVectorList.unk4[0]; struct_ptr_ptr < sLightingVectorList.unk44;struct_ptr_ptr++) { - struct_ptr = *struct_ptr_ptr; - distance_between_vtx_and_lighting_node = ml_vec3f_distance(struct_ptr->positionCopy, vtx_position); - if (!(struct_ptr->unk24 <= distance_between_vtx_and_lighting_node)) { - if (distance_between_vtx_and_lighting_node <= struct_ptr->unk20) { - rgb_modifier[0] = rgb_modifier[0] + struct_ptr->rgb[0]; - rgb_modifier[1] = rgb_modifier[1] + struct_ptr->rgb[1]; - rgb_modifier[2] = rgb_modifier[2] + struct_ptr->rgb[2]; + for(pp_light = &sLightingVectorList.reference[0]; pp_light < sLightingVectorList.end_ptr;pp_light++) { + p_light = *pp_light; + distance_between_vtx_and_lighting_node = ml_vec3f_distance(p_light->positionCopy, vtx_position); + if (!(p_light->fade_radius_max <= distance_between_vtx_and_lighting_node)) { + if (distance_between_vtx_and_lighting_node <= p_light->fade_radius_min) { + rgb_modifier[0] = rgb_modifier[0] + p_light->rgb[0]; + rgb_modifier[1] = rgb_modifier[1] + p_light->rgb[1]; + rgb_modifier[2] = rgb_modifier[2] + p_light->rgb[2]; } else { - distance_between_vtx_and_lighting_node = 1.0f - ((distance_between_vtx_and_lighting_node - struct_ptr->unk20) / (struct_ptr->unk24 - struct_ptr->unk20)); - rgb_modifier[0] += distance_between_vtx_and_lighting_node * struct_ptr->rgb[0]; - rgb_modifier[1] += distance_between_vtx_and_lighting_node * struct_ptr->rgb[1]; - rgb_modifier[2] += distance_between_vtx_and_lighting_node * struct_ptr->rgb[2]; + distance_between_vtx_and_lighting_node = 1.0f - ((distance_between_vtx_and_lighting_node - p_light->fade_radius_min) / (p_light->fade_radius_max - p_light->fade_radius_min)); + rgb_modifier[0] += distance_between_vtx_and_lighting_node * p_light->rgb[0]; + rgb_modifier[1] += distance_between_vtx_and_lighting_node * p_light->rgb[1]; + rgb_modifier[2] += distance_between_vtx_and_lighting_node * p_light->rgb[2]; } } } diff --git a/src/core2/code_AD5B0.c b/src/core2/gsworld.c similarity index 90% rename from src/core2/code_AD5B0.c rename to src/core2/gsworld.c index d60899eb..3458a292 100644 --- a/src/core2/code_AD5B0.c +++ b/src/core2/gsworld.c @@ -13,8 +13,8 @@ extern u8 D_80370250 = 0; /* .bss */ struct { s32 unk0; - s32 map_4; - s32 unk8; + s32 map; + s32 exit; }D_803835D0; s32 D_803835DC; u32 D_803835E0; @@ -22,11 +22,11 @@ u32 D_803835E0; /* public */ void func_80335110(s32); void func_80335128(s32); -void func_80335140(enum map_e); +void gsworld_load(enum map_e); void func_8033520C(s32); /* .code */ -void func_80334540(Gfx** gdl, Mtx **mptr, Vtx **vptr) { +void gsworld_draw(Gfx** gdl, Mtx **mptr, Vtx **vptr) { f32 sp44; f32 sp40; @@ -106,16 +106,16 @@ void func_80334540(Gfx** gdl, Mtx **mptr, Vtx **vptr) { void func_803348B0(s32 arg0, s32 arg1, s32 arg2){ } -enum map_e map_get(void){ - return D_803835D0.map_4; +enum map_e gsworld_get_map(void){ + return D_803835D0.map; } -s32 exit_get(){ - return D_803835D0.unk8; +s32 gsworld_get_exit(){ + return D_803835D0.exit; } void func_803348D8(s32 arg0) { - transitionToMap(D_803835D0.map_4, arg0, 1); + transitionToMap(D_803835D0.map, arg0, 1); } s32 func_80334904(){ @@ -124,7 +124,7 @@ s32 func_80334904(){ void func_80334E1C(s32); -void func_80334910(void) { +void gsworld_free(void) { func_80255A14(); func_80334E1C(3); func_8034F734(); @@ -179,7 +179,7 @@ void func_80334910(void) { dialogBin_terminate(); func_802986D0(); if (func_80322914() == 0) { - func_8024F7C4(func_803226E8(D_803835D0.map_4)); + func_8024F7C4(func_803226E8(D_803835D0.map)); } core1_7090_release(); AnimTextureListCache_free(); @@ -189,20 +189,21 @@ void func_80334910(void) { animCache_flushAll(); } -void func_80334B20(enum map_e map, s32 arg1, s32 arg2) { +//gsworldDll_entrypoint2 +void gsworld_set(enum map_e map, s32 arg1, s32 arg2) { D_803835D0.unk0 = 3; - D_803835D0.map_4 = map; - D_803835D0.unk8 = arg1; + D_803835D0.map = map; + D_803835D0.exit = arg1; overlay_init(); func_80335110(1); func_80335128(1); func_802D2CB8(); core1_7090_alloc(); - if (map_get() == MAP_8E_GL_FURNACE_FUN) { + if (gsworld_get_map() == MAP_8E_GL_FURNACE_FUN) { func_8038E7C4(); } if (func_80322914() == 0) { - func_8024F764(func_803226E8(D_803835D0.map_4)); + func_8024F764(func_803226E8(D_803835D0.map)); } func_80320B84(); AnimTextureListCache_init(); @@ -228,7 +229,7 @@ void func_80334B20(enum map_e map, s32 arg1, s32 arg2) { func_80344C50(); func_8033F9C0(); ncCameraNodeList_init(); - func_802BC044(); + nccamera_init(); partEmitMgr_init(); pem_setAllInactive(); pem_initDependencies(); @@ -241,7 +242,7 @@ void func_80334B20(enum map_e map, s32 arg1, s32 arg2) { func_802FA69C(); commonParticle_init(); if (arg2 == 0) { - func_80335140(map); + gsworld_load(map); } func_80305990(0); func_8030C740(); @@ -259,7 +260,7 @@ void func_80334B20(enum map_e map, s32 arg1, s32 arg2) { func_80350174(); gcparade_init(); func_80351998(); - func_802BC2CC(D_803835D0.unk8); + func_802BC2CC(D_803835D0.exit); func_802D63D4(); func_80255A04(); func_802D6948(); @@ -272,12 +273,12 @@ void func_80334B20(enum map_e map, s32 arg1, s32 arg2) { } void func_80334DC0(void) { - func_80334910(); - func_80334B20(D_803835D0.map_4, D_803835D0.unk8, 1); + gsworld_free(); + gsworld_set(D_803835D0.map, D_803835D0.exit, 1); } void func_80334DF8(void) { - func_8033520C(D_803835D0.map_4); + func_8033520C(D_803835D0.map); } void func_80334E1C(s32 arg0) { @@ -295,7 +296,7 @@ void func_80334E1C(s32 arg0) { D_803835D0.unk0 = arg0; } -s32 func_80334ECC(void) { +s32 gsworld_update(void) { s32 phi_v1; s32 phi_v0; @@ -358,7 +359,7 @@ s32 func_80334ECC(void) { func_803306C8(1); func_8032AD7C(1); func_80322490(); - if (map_getLevel(D_803835D0.map_4) == LEVEL_D_CUTSCENE) { + if (map_getLevel(D_803835D0.map) == LEVEL_D_CUTSCENE) { func_802C79C4(); } func_8032AABC(); @@ -383,7 +384,8 @@ s32 func_80335134(){ return D_803835E0; } -void func_80335140(enum map_e map_id) { +//gsworldDll_entrypoint0 +void gsworld_load(enum map_e map_id) { File *fp; func_80254008(); diff --git a/src/core2/hazards.c b/src/core2/hazards.c index d36059de..09673b2b 100644 --- a/src/core2/hazards.c +++ b/src/core2/hazards.c @@ -75,7 +75,7 @@ void triggerSwampHazardEffects(void) { } void triggerHazardEffects(void) { - switch (map_get()) { + switch (gsworld_get_map()) { case MAP_12_GV_GOBIS_VALLEY: case MAP_31_RBB_RUSTY_BUCKET_BAY: case MAP_3C_RBB_KITCHEN: @@ -166,7 +166,7 @@ void updateSwampEffects(void) { } void updateHazardEffects(void) { - switch (map_get()) { + switch (gsworld_get_map()) { case MAP_12_GV_GOBIS_VALLEY: case MAP_31_RBB_RUSTY_BUCKET_BAY: case MAP_3C_RBB_KITCHEN: @@ -190,7 +190,7 @@ void updateHazardEffects(void) { bool isPlayerInHazard(void) { f32 player_position[3]; - switch (map_get()) { + switch (gsworld_get_map()) { case MAP_D_BGS_BUBBLEGLOOP_SWAMP: case MAP_12_GV_GOBIS_VALLEY: case MAP_1B_MMM_MAD_MONSTER_MANSION: @@ -221,7 +221,7 @@ bool canTakeGroundDamage(void) { bs_state = bs_getState(); - switch (map_get()) { + switch (gsworld_get_map()) { case MAP_D_BGS_BUBBLEGLOOP_SWAMP: case MAP_12_GV_GOBIS_VALLEY: case MAP_1B_MMM_MAD_MONSTER_MANSION: @@ -261,7 +261,7 @@ void hazards_update(void) { updateHazardEffects(); - if (map_get() == MAP_12_GV_GOBIS_VALLEY) { + if (gsworld_get_map() == MAP_12_GV_GOBIS_VALLEY) { sp18 = 0; sp1C = 0; @@ -287,7 +287,7 @@ void hazards_update(void) { batimer_decrement(BA_TIMER_HAZARDS); if (can_take_ground_damage) { - if (map_get() == MAP_8E_GL_FURNACE_FUN) { + if (gsworld_get_map() == MAP_8E_GL_FURNACE_FUN) { if (bs_checkInterrupt(BS_INTR_13_FF_DEATH_SQUARE)) { triggerHazardEffects(); } @@ -306,7 +306,7 @@ void hazards_update(void) { } } - switch (map_get()) { // Show dialog associated with touching a hazard for the first time + switch (gsworld_get_map()) { // Show dialog associated with touching a hazard for the first time case MAP_43_CCW_SPRING: case MAP_44_CCW_SUMMER: case MAP_45_CCW_AUTUMN: diff --git a/src/core2/mapModel.c b/src/core2/mapModel.c index 060f02a9..6c0d37ec 100644 --- a/src/core2/mapModel.c +++ b/src/core2/mapModel.c @@ -243,7 +243,7 @@ void mapModel_opa_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) { func_8033A45C(1, 0); func_8033A45C(2, 1); } - switch (map_get()) { /* irregular */ + switch (gsworld_get_map()) { /* irregular */ case MAP_88_CS_SPIRAL_MOUNTAIN_6: if (mapSpecificFlags_get(0) != 0) { func_8033A45C(1, 1); @@ -354,7 +354,7 @@ void mapModel_xlu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) { s32 temp_a0; if (mapModel.model_bin_xlu != NULL) { - if (map_get() == MAP_1D_MMM_CELLAR) { + if (gsworld_get_map() == MAP_1D_MMM_CELLAR) { func_8033A45C(1, (actorArray_findActorFromActorId(0x191) != NULL) ? 0 : 1); } modelRender_setDepthMode(MODEL_RENDER_DEPTH_COMPARE); @@ -588,7 +588,7 @@ void func_8030A078(void) { mapModel.env_green = 0xFF; mapModel.env_red = 0xFF; - description = _mapModel_mapIdToDescription(map_get());; + description = _mapModel_mapIdToDescription(gsworld_get_map());; mapModel.description = description; mapModel.scale = (f32) description->scale; mapModel.model_bin_opa = (BKModelBin *)assetcache_get(mapModel.description->opa_model_id); diff --git a/src/core2/nc/firstpersoncamera.c b/src/core2/nc/ba/1p.c similarity index 74% rename from src/core2/nc/firstpersoncamera.c rename to src/core2/nc/ba/1p.c index 1c1af001..e250ebf3 100644 --- a/src/core2/nc/firstpersoncamera.c +++ b/src/core2/nc/ba/1p.c @@ -5,7 +5,7 @@ extern void func_802BD780(f32[3], f32[3], f32, f32, f32, f32); -void ncFirstPersonCamera_setState(enum nc_first_person_state state); +void ncba1p_setState(enum nc_first_person_state state); /* .bss */ struct{ @@ -20,11 +20,11 @@ struct{ } D_8037DC60; /* .code */ -bool __ncFirstPersonCamera_fullyZoomedIn(void) { +bool __ncba1p_fullyZoomedIn(void) { return (ml_vec3f_distance(D_8037DC60.position, D_8037DC60.zoomed_in_position) < 40.0f); } -void __ncFirstPersonCamera_getPositionAndRotation_entering(f32 arg0[3], f32 arg1[3]) { +void __ncba1p_getPositionAndRotation_entering(f32 arg0[3], f32 arg1[3]) { s32 i; ml_sub_delta_time(&D_8037DC60.transistion_timer); @@ -33,9 +33,9 @@ void __ncFirstPersonCamera_getPositionAndRotation_entering(f32 arg0[3], f32 arg1 D_8037DC60.rotation[i] = mlNormalizeAngle(D_8037DC60.zoomed_out_rotation[i] + func_80257CF8(D_8037DC60.transistion_timer, 0.5f, 0.0f, 0.0f, mlDiffDegF(D_8037DC60.zoomed_in_rotation[i], D_8037DC60.zoomed_out_rotation[i]))); } if (D_8037DC60.transistion_timer == 0.0f) { - ncFirstPersonCamera_setState(FIRSTPERSON_STATE_2_IDLE); + ncba1p_setState(FIRSTPERSON_STATE_2_IDLE); } - if (__ncFirstPersonCamera_fullyZoomedIn() && func_8028F150()) { + if (__ncba1p_fullyZoomedIn() && func_8028F150()) { player_setModelVisible(0); } ml_vec3f_copy(arg0, D_8037DC60.position); @@ -43,7 +43,7 @@ void __ncFirstPersonCamera_getPositionAndRotation_entering(f32 arg0[3], f32 arg1 } -void __ncFirstPersonCamera_getPositionAndRotation_exiting(f32 arg0[3], f32 arg1[3]) { +void __ncba1p_getPositionAndRotation_exiting(f32 arg0[3], f32 arg1[3]) { s32 i; ml_sub_delta_time(&D_8037DC60.transistion_timer); @@ -52,9 +52,9 @@ void __ncFirstPersonCamera_getPositionAndRotation_exiting(f32 arg0[3], f32 arg1[ D_8037DC60.rotation[i] = mlNormalizeAngle(D_8037DC60.zoomed_in_rotation[i] + func_80257CF8(D_8037DC60.transistion_timer, 1.0f, 0.5f, 0.0f, mlDiffDegF(arg1[i], D_8037DC60.zoomed_in_rotation[i]))); } if (D_8037DC60.transistion_timer == 0.0f) { - ncFirstPersonCamera_setState(FIRSTPERSON_STATE_4_DONE); + ncba1p_setState(FIRSTPERSON_STATE_4_DONE); } - if (!__ncFirstPersonCamera_fullyZoomedIn() && !func_8028F150()) { + if (!__ncba1p_fullyZoomedIn() && !func_8028F150()) { player_setModelVisible(1); } ml_vec3f_copy(arg0, D_8037DC60.position); @@ -62,7 +62,7 @@ void __ncFirstPersonCamera_getPositionAndRotation_exiting(f32 arg0[3], f32 arg1[ } -void __ncFirstPersonCamera_getPositionAndRotation_idle(f32 arg0[3], f32 arg1[3]) { +void __ncba1p_getPositionAndRotation_idle(f32 arg0[3], f32 arg1[3]) { ml_vec3f_copy(D_8037DC60.position, D_8037DC60.zoomed_in_position); func_802BD780(D_8037DC60.zoomed_in_rotation, D_8037DC60.rotation, 10.0f, 20.0f, 120.0f, 200.0f); D_8037DC60.rotation[2] = 0.0f; @@ -70,7 +70,7 @@ void __ncFirstPersonCamera_getPositionAndRotation_idle(f32 arg0[3], f32 arg1[3]) ml_vec3f_copy(arg1, D_8037DC60.rotation); } -void ncFirstPersonCamera_reset(void){ +void ncba1p_reset(void){ ml_vec3f_clear(D_8037DC60.position); ml_vec3f_clear(D_8037DC60.rotation); ml_vec3f_clear(D_8037DC60.zoomed_in_position); @@ -80,23 +80,23 @@ void ncFirstPersonCamera_reset(void){ D_8037DC60.state = 0; } -void ncFirstPersonCamera_getPositionAndRotation(f32 position[3], f32 rotation[3]) { +void ncba1p_getPositionAndRotation(f32 position[3], f32 rotation[3]) { switch (D_8037DC60.state) { case FIRSTPERSON_STATE_1_ENTER: - __ncFirstPersonCamera_getPositionAndRotation_entering(position, rotation); + __ncba1p_getPositionAndRotation_entering(position, rotation); break; case FIRSTPERSON_STATE_2_IDLE: - __ncFirstPersonCamera_getPositionAndRotation_idle(position, rotation); + __ncba1p_getPositionAndRotation_idle(position, rotation); break; case FIRSTPERSON_STATE_3_EXIT: - __ncFirstPersonCamera_getPositionAndRotation_exiting(position, rotation); + __ncba1p_getPositionAndRotation_exiting(position, rotation); /* fallthrough */ case FIRSTPERSON_STATE_4_DONE: break; } } -void ncFirstPersonCamera_setState(enum nc_first_person_state next_state) { +void ncba1p_setState(enum nc_first_person_state next_state) { if (next_state == FIRSTPERSON_STATE_1_ENTER) { if (D_8037DC60.state == FIRSTPERSON_STATE_3_EXIT) { ml_vec3f_copy(D_8037DC60.zoomed_out_position, D_8037DC60.position); @@ -115,20 +115,20 @@ void ncFirstPersonCamera_setState(enum nc_first_person_state next_state) { D_8037DC60.state = next_state; } -void ncFirstPersonCamera_setZoomedOutPosition(f32 src[3]){ +void ncba1p_setZoomedOutPosition(f32 src[3]){ ml_vec3f_copy(D_8037DC60.zoomed_in_position, src); } -void ncFirstPersonCamera_setZoomedOutRotation(f32 src[3]){ +void ncba1p_setZoomedOutRotation(f32 src[3]){ D_8037DC60.zoomed_in_rotation[0] = mlNormalizeAngle(src[0]); D_8037DC60.zoomed_in_rotation[1] = mlNormalizeAngle(src[1]); D_8037DC60.zoomed_in_rotation[2] = mlNormalizeAngle(src[2]); } -void ncFirstPersonCamera_getZoomedInRotation(f32 dst[3]){ +void ncba1p_getZoomedInRotation(f32 dst[3]){ ml_vec3f_copy(dst, D_8037DC60.zoomed_in_rotation); } -s32 ncFirstPersonCamera_getState(void){ +s32 ncba1p_getState(void){ return D_8037DC60.state; } diff --git a/src/core2/nc/dynamicCamD.c b/src/core2/nc/ba/die.c similarity index 78% rename from src/core2/nc/dynamicCamD.c rename to src/core2/nc/ba/die.c index 61f3413c..396bc80c 100644 --- a/src/core2/nc/dynamicCamD.c +++ b/src/core2/nc/ba/die.c @@ -6,18 +6,18 @@ f32 D_80365D90 = 30.0f; /* .code */ -void ncDynamicCamD_init(void){ +void ncbadie_init(void){ func_802BE244(4.0f, 16.0f); func_802BE230(1.4f, 14.0f); } -void ncDynamicCamD_end(void){} +void ncbadie_end(void){} -void ncDynamicCamD_func_802BF2C0(f32 arg0){ +void ncbadie_func_802BF2C0(f32 arg0){ D_80365D90 = arg0; } -void ncDynamicCamD_update(void) { +void ncbadie_update(void) { f32 sp54[3]; f32 sp48[3]; f32 sp3C[3]; @@ -32,11 +32,11 @@ void ncDynamicCamD_update(void) { sp3C[0] += sp30[0]; sp3C[1] += sp30[1]; sp3C[2] += sp30[2]; - func_802BE190(sp3C); + func_802BE190(sp3C); //update camera position ncDynamicCamera_getPosition(sp54); player_getPosition(sp3C); sp3C[1] += D_80365D90; func_8025727C(sp3C[0], sp3C[1], sp3C[2], sp54[0], sp54[1], sp54[2], &sp48[0], &sp48[1]); sp48[0] = mlNormalizeAngle(-sp48[0]); - func_802BD904(sp48); + func_802BD904(sp48); //update camera rotation } diff --git a/src/core2/nc/dynamicCam4.c b/src/core2/nc/ba/fly.c similarity index 82% rename from src/core2/nc/dynamicCam4.c rename to src/core2/nc/ba/fly.c index b7b5a662..cade9b5c 100644 --- a/src/core2/nc/dynamicCam4.c +++ b/src/core2/nc/ba/fly.c @@ -6,8 +6,8 @@ extern f32 player_getYaw(void); extern f32 player_getPitch(void); extern void func_802BD870(f32, f32, f32, f32); -void ncDynamicCam4_func_802BFE50(f32 arg0, f32 arg1, f32 arg2); -void ncDynamicCam4_func_802BFE74(bool); +void ncbafly_func_802BFE50(f32 arg0, f32 arg1, f32 arg2); +void ncbafly_func_802BFE74(bool); /* .bss */ f32 D_8037DB10; @@ -17,19 +17,19 @@ f32 D_8037DB1C; f32 D_8037DB20; /* .code */ -void ncDynamicCam4_init(void) { +void ncbafly_init(void) { func_802BD870(10.0f, 20.0f, 120.0f, 200.0f); - if (map_get() == MAP_90_GL_BATTLEMENTS) { - ncDynamicCam4_func_802BFE50(10.0f, 800.0f, 1350.0f); + if (gsworld_get_map() == MAP_90_GL_BATTLEMENTS) { + ncbafly_func_802BFE50(10.0f, 800.0f, 1350.0f); } else { - ncDynamicCam4_func_802BFE50(2.0f, 800.0f, 350.0f); + ncbafly_func_802BFE50(2.0f, 800.0f, 350.0f); } - ncDynamicCam4_func_802BFE74(0); + ncbafly_func_802BFE74(0); } -void ncDynamicCam4_end(void){} +void ncbafly_end(void){} -void ncDynamicCam4_update(void) { +void ncbafly_update(void) { f32 sp84[3]; f32 sp78[3]; f32 sp6C[3]; @@ -81,13 +81,13 @@ void ncDynamicCam4_update(void) { func_802BD720(sp54); } -void ncDynamicCam4_func_802BFE50(f32 arg0, f32 arg1, f32 arg2){ +void ncbafly_func_802BFE50(f32 arg0, f32 arg1, f32 arg2){ D_8037DB10 = arg0; D_8037DB14 = arg1; D_8037DB18 = arg2; } -void ncDynamicCam4_func_802BFE74(bool arg0) { +void ncbafly_func_802BFE74(bool arg0) { if (arg0) { D_8037DB1C = 6.0f; D_8037DB20 = 270.0f; diff --git a/src/core2/nc/dynamicCam12.c b/src/core2/nc/dynamicCam12.c index 11f7d78e..bceaf0ee 100644 --- a/src/core2/nc/dynamicCam12.c +++ b/src/core2/nc/dynamicCam12.c @@ -36,7 +36,7 @@ struct { /* .code */ bool __is_flying_in_FP(void){ - return (map_get() == MAP_27_FP_FREEZEEZY_PEAK) && (player_movementGroup() == BSGROUP_A_FLYING); + return (gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK) && (player_movementGroup() == BSGROUP_A_FLYING); } struct56s *func_802C0EC0(void){ diff --git a/src/core2/nc/dynamicCamC.c b/src/core2/nc/dynamicCamC.c index 75b9eb2f..9a717b12 100644 --- a/src/core2/nc/dynamicCamC.c +++ b/src/core2/nc/dynamicCamC.c @@ -50,7 +50,7 @@ void ncDynamicCamC_update(void) { sp3C[1] += sp30[1]; sp3C[2] += sp30[2]; func_802BE190(sp3C); - switch(map_get()){ + switch(gsworld_get_map()){ case MAP_B_CC_CLANKERS_CAVERN: case MAP_14_GV_SANDYBUTTS_MAZE: case MAP_27_FP_FREEZEEZY_PEAK: diff --git a/src/core2/nc/dynamicCamera.c b/src/core2/nc/dynamicCamera.c index a623886e..25299a3f 100644 --- a/src/core2/nc/dynamicCamera.c +++ b/src/core2/nc/dynamicCamera.c @@ -205,7 +205,7 @@ void func_802BCBD4(void) { func_802BD870(10.0f, 10.0f, 120.0f, 120.0f); func_802BE230(1.4f, 14.0f); func_802BD840(); - ncFirstPersonCamera_reset(); + ncba1p_reset(); func_802C0120(); func_802C2258(); func_802C0F4C(); @@ -297,7 +297,7 @@ void ncDynamicCamera_update(void){ break; case 4:// L802BCF64 - ncDynamicCam4_update(); + ncbafly_update(); func_802BCE94(); break; @@ -333,7 +333,7 @@ void ncDynamicCamera_update(void){ break; case 0xD:// L802BD004 - ncDynamicCamD_update(); + ncbadie_update(); func_802BCE94(); break; @@ -361,7 +361,7 @@ void ncDynamicCamera_update(void){ ml_vec3f_copy(sp18, cameraRotation); func_802C22C0(sp24, sp18); if(dynamicCameraInFirstPerson){ - ncFirstPersonCamera_getPositionAndRotation(sp24, sp18); + ncba1p_getPositionAndRotation(sp24, sp18); } viewport_setPosition_vec3f(sp24); viewport_setRotation_vec3f(sp18); @@ -385,7 +385,7 @@ void ncDynamicCamera_setState(s32 state){ break; case 0x4://L802BD134 - ncDynamicCam4_end(); + ncbafly_end(); break; case 0x5://L802BD144 @@ -413,7 +413,7 @@ void ncDynamicCamera_setState(s32 state){ break; case 0xd://L802BD1A4 - ncDynamicCamD_end(); + ncbadie_end(); break; case 0xf://L802BD1B4 @@ -448,7 +448,7 @@ void ncDynamicCamera_setState(s32 state){ break; case 0x4: //L802BD244 - ncDynamicCam4_init(); + ncbafly_init(); break; case 0x5: //L802BD254 @@ -476,7 +476,7 @@ void ncDynamicCamera_setState(s32 state){ break; case 0xd: //L802BD2B4 - ncDynamicCamD_init(); + ncbadie_init(); break; case 0xf: //L802BD2C4 @@ -648,7 +648,7 @@ f32 func_802BD8F8(void){ void func_802BD904(f32 target_rotation[3]) { f32 camera_rotation[3]; - f32 sp50[3]; + f32 d_rotation[3]; f32 sp44[3]; f32 sp38[3]; f32 dt; @@ -662,11 +662,11 @@ void func_802BD904(f32 target_rotation[3]) { dt = time_getDelta(); ncDynamicCamera_getRotation(camera_rotation); - sp50[0] = mlDiffDegF(target_rotation[0], camera_rotation[0]); - sp50[1] = mlDiffDegF(target_rotation[1], camera_rotation[1]); - sp50[2] = 0.0f; - sp44[0] = sp50[0] * dt * D_8037D9D4; - sp44[1] = sp50[1] * dt * D_8037D9D4; + d_rotation[0] = mlDiffDegF(target_rotation[0], camera_rotation[0]); + d_rotation[1] = mlDiffDegF(target_rotation[1], camera_rotation[1]); + d_rotation[2] = 0.0f; + sp44[0] = d_rotation[0] * dt * D_8037D9D4; + sp44[1] = d_rotation[1] * dt * D_8037D9D4; sp44[2] = 0.0f; sp38[0] = sp44[0] - D_8037D9C8[0]; sp38[1] = sp44[1] - D_8037D9C8[1]; @@ -676,12 +676,12 @@ void func_802BD904(f32 target_rotation[3]) { D_8037D9C8[1] += sp38[1]; sp30 = mlAbsF(D_8037D9C8[0]); - if ((mlAbsF(sp50[0]) < sp30) && (D_8037D9C8[0]*sp50[0] > 0.0f)) { + if ((mlAbsF(d_rotation[0]) < sp30) && (D_8037D9C8[0]*d_rotation[0] > 0.0f)) { D_8037D9C8[0] = 0.0f; camera_rotation[0] = target_rotation[0]; } sp30 = mlAbsF(D_8037D9C8[1]); - if ((mlAbsF(sp50[1]) < sp30) && (D_8037D9C8[1]*sp50[1] > 0.0f)) { + if ((mlAbsF(d_rotation[1]) < sp30) && (D_8037D9C8[1]*d_rotation[1] > 0.0f)) { D_8037D9C8[1] = 0.0f; camera_rotation[1] = target_rotation[1]; } @@ -920,7 +920,7 @@ int func_802BE60C(void){ if(func_802BC428()) return 0; - if(map_get() == MAP_91_FILE_SELECT) + if(gsworld_get_map() == MAP_91_FILE_SELECT) return 0; ml_vec3f_copy(sp1C, cameraPosition); @@ -947,7 +947,7 @@ void func_802BE720(void){ ncDynamicCamera_setState(sp34); ml_vec3f_clear(D_8037D9C8); ml_vec3f_clear(D_8037D9E0); - ncFirstPersonCamera_reset(); + ncba1p_reset(); } void func_802BE794(void){ @@ -989,11 +989,11 @@ void func_802BE894(f32 position[3], f32 rotation[3]){ void ncDynamicCamera_enterFirstPerson(void){ dynamicCameraInFirstPerson = TRUE; - ncFirstPersonCamera_setState(FIRSTPERSON_STATE_1_ENTER); - ncFirstPersonCamera_setZoomedOutPosition(cameraPosition); - ncFirstPersonCamera_setZoomedOutRotation(cameraRotation); + ncba1p_setState(FIRSTPERSON_STATE_1_ENTER); + ncba1p_setZoomedOutPosition(cameraPosition); + ncba1p_setZoomedOutRotation(cameraRotation); } void ncDynamicCamera_exitFirstPerson(void){ - ncFirstPersonCamera_setState(FIRSTPERSON_STATE_3_EXIT); + ncba1p_setState(FIRSTPERSON_STATE_3_EXIT); } diff --git a/src/core2/playerutils.c b/src/core2/playerutils.c index fa17005e..6c411619 100644 --- a/src/core2/playerutils.c +++ b/src/core2/playerutils.c @@ -107,11 +107,11 @@ s32 can_wonderwing(void){ } int can_view_first_person(void){ - if( map_get() == MAP_27_FP_FREEZEEZY_PEAK && mapSpecificFlags_get(0xd)){ + if( gsworld_get_map() == MAP_27_FP_FREEZEEZY_PEAK && mapSpecificFlags_get(0xd)){ return 0; } - if(ncFirstPersonCamera_getState() == FIRSTPERSON_STATE_3_EXIT) + if(ncba1p_getState() == FIRSTPERSON_STATE_3_EXIT) return 0; if(!player_isStable() && !player_inWater()) @@ -128,7 +128,7 @@ int dummy_player_is_pumpkin(void){ } int func_8028ADB4(void){ - return func_8032190C() && map_get() != MAP_1_SM_SPIRAL_MOUNTAIN; + return func_8032190C() && gsworld_get_map() != MAP_1_SM_SPIRAL_MOUNTAIN; } int wishyWashyFlag_get(void){ @@ -294,7 +294,7 @@ void func_8028B59C(void) { } else { D_8037BF61 = (func_80294554() && player_getYPosition() < ((floor_getCurrentFloorYPosition() - 50.0f) - 2.0f)); } - if (map_get() == MAP_6_TTC_NIPPERS_SHELL) { + if (gsworld_get_map() == MAP_6_TTC_NIPPERS_SHELL) { D_8037BF61 = FALSE; } if (!sp24 && D_8037BF61 && (baphysics_get_vertical_velocity() < -40.0)) { diff --git a/src/core2/snackerctl.c b/src/core2/snackerctl.c index 0c45c86f..cc0c9b45 100644 --- a/src/core2/snackerctl.c +++ b/src/core2/snackerctl.c @@ -11,7 +11,7 @@ #define SNACKER_BB_DIALOG_0 VER_SELECT(0xe26, 0xa68, 0, 0) #define SNACKER_BB_DIALOG_1 VER_SELECT(0xe33, 0xa75, 0, 0) -void ncFirstPersonCamera_getZoomedInRotation(f32 *); +void ncba1p_getZoomedInRotation(f32 *); extern u8 D_8037DCCA; extern u8 D_8037DCCB; @@ -101,7 +101,7 @@ static SnackerCtlState _snackerctl_update_bottles_bonus(void){ D_8037DCCC = 1; }//L8028A764 else if(jiggyscore_isCollected(0x10)){ - ncFirstPersonCamera_getZoomedInRotation(sp30); + ncba1p_getZoomedInRotation(sp30); if( (((D_8036361C[0] <= sp30[0])? (sp30[0] - D_8036361C[0]) : -(sp30[0] - D_8036361C[0])) < 4.0f) && (((D_8036361C[1] <= sp30[1])? (sp30[1] - D_8036361C[1]) : -(sp30[1] - D_8036361C[1])) < 20.0f) ){ @@ -127,7 +127,7 @@ static SnackerCtlState _snackerctl_update_bottles_bonus(void){ } void snackerctl_update(void){ - switch(map_get()){ + switch(gsworld_get_map()){ case MAP_7_TTC_TREASURE_TROVE_COVE: s_snackerctl_state = __snackerctl_update_ttc(); break; diff --git a/src/core2/spawnqueue.c b/src/core2/spawnqueue.c index d5730c3b..34370760 100644 --- a/src/core2/spawnqueue.c +++ b/src/core2/spawnqueue.c @@ -185,7 +185,7 @@ FunctionQueue *spawnQueue = NULL; /* .code */ void spawnQueue_malloc(void){ - u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 50: 15; + u32 tmp = (gsworld_get_map() == MAP_90_GL_BATTLEMENTS)? 50: 15; spawnQueue = (FunctionQueue *) malloc(tmp * sizeof(FunctionQueue)); } @@ -473,7 +473,7 @@ void spawnQueue_lock(void){ } void __spawnQueue_add_0(void (* arg0)(void)){ - u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; + u32 tmp = (gsworld_get_map() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; if(tmp != spawnQueueLength){ spawnQueue[spawnQueueLength].func0 = arg0; spawnQueue[spawnQueueLength].arg_cnt = 0; @@ -482,7 +482,7 @@ void __spawnQueue_add_0(void (* arg0)(void)){ } void __spawnQueue_add_1(GenFunction_1 arg0, s32 arg1){ - u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; + u32 tmp = (gsworld_get_map() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; if(tmp != spawnQueueLength){ spawnQueue[spawnQueueLength].func0 = (void (*)(void))arg0; spawnQueue[spawnQueueLength].arg[0] = arg1; @@ -492,7 +492,7 @@ void __spawnQueue_add_1(GenFunction_1 arg0, s32 arg1){ } void __spawnQueue_add_2(void (* arg0)(void), s32 arg1, s32 arg2){ - u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; + u32 tmp = (gsworld_get_map() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; if(tmp != spawnQueueLength){ spawnQueue[spawnQueueLength].func0 = arg0; spawnQueue[spawnQueueLength].arg[0] = arg1; @@ -503,7 +503,7 @@ void __spawnQueue_add_2(void (* arg0)(void), s32 arg1, s32 arg2){ } void __spawnQueue_add_3(void (* arg0)(void), s32 arg1, s32 arg2, s32 arg3){ - u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; + u32 tmp = (gsworld_get_map() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; if(tmp != spawnQueueLength){ spawnQueue[spawnQueueLength].func0 = arg0; spawnQueue[spawnQueueLength].arg[0] = arg1; @@ -515,7 +515,7 @@ void __spawnQueue_add_3(void (* arg0)(void), s32 arg1, s32 arg2, s32 arg3){ } void __spawnQueue_add_4(GenFunction_4 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4){ - u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; + u32 tmp = (gsworld_get_map() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; if(tmp != spawnQueueLength){ spawnQueue[spawnQueueLength].func0 = (void (*)(void))arg0; spawnQueue[spawnQueueLength].arg[0] = arg1; @@ -528,7 +528,7 @@ void __spawnQueue_add_4(GenFunction_4 arg0, s32 arg1, s32 arg2, s32 arg3, s32 ar } void __spawnQueue_add_5(void (* arg0)(void), s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5){ - u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; + u32 tmp = (gsworld_get_map() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; if(tmp != spawnQueueLength){ spawnQueue[spawnQueueLength].func0 = arg0; spawnQueue[spawnQueueLength].arg[0] = arg1; diff --git a/src/lair/ch/cauldron.c b/src/lair/ch/cauldron.c index f54160d4..02993c31 100644 --- a/src/lair/ch/cauldron.c +++ b/src/lair/ch/cauldron.c @@ -248,14 +248,14 @@ void chWarpCauldron_update(Actor *this) { && (func_802D67AC(-1) == MAP_16_GV_RUBEES_CHAMBER) && (func_802D680C(-1) == this->actorTypeSpecificField) ) - || (exit_get() == D_80393620[this->actorTypeSpecificField - 1].unk2) + || (gsworld_get_exit() == D_80393620[this->actorTypeSpecificField - 1].unk2) ) { func_8028F85C(this->position); this->unk10_12 = 1; func_8038AB90(this, 5, 1, 0, 0.0f); } if (!fileProgressFlag_get(FILEPROG_F5_COMPLETED_A_WARP_CAULDRON_SET) && fileProgressFlag_get(chWarpCauldron_getPairedFileProgressFlagIndex(this))) { - if (func_802D677C(-1) != map_get()) { + if (func_802D677C(-1) != gsworld_get_map()) { gcdialog_showDialog(ASSET_F7A_DIALOG_UNKNOWN, 4, NULL, NULL, NULL, NULL); fileProgressFlag_set(FILEPROG_F5_COMPLETED_A_WARP_CAULDRON_SET, 1); } diff --git a/src/lair/code_0.c b/src/lair/code_0.c index 2cab0e62..eab212a3 100644 --- a/src/lair/code_0.c +++ b/src/lair/code_0.c @@ -1005,7 +1005,7 @@ void func_80388524(Actor *this) { Actor *sp28; sp34 = func_802D677C(-1) - && (func_802D677C(-1) == map_get()) + && (func_802D677C(-1) == gsworld_get_map()) && (func_802D67AC(-1) >= 8) && (func_802D67AC(-1) < 0x12) && (func_802D67DC(-1) == this->modelCacheIndex) diff --git a/src/lair/code_5ED0.c b/src/lair/code_5ED0.c index 5aa8cb8b..eb7fb7fc 100644 --- a/src/lair/code_5ED0.c +++ b/src/lair/code_5ED0.c @@ -618,7 +618,7 @@ void lair_func_8038CF18(void) struct FF_StorageStruct_48_sub *ptr; - if (map_get() != MAP_8E_GL_FURNACE_FUN) + if (gsworld_get_map() != MAP_8E_GL_FURNACE_FUN) return; D_8037DCB8->unk0 = mapModel_getModel(0); @@ -1150,7 +1150,7 @@ void lair_func_8038E0B0(void) { s32 sp38; s32 sp28; - if( (map_get() == MAP_8E_GL_FURNACE_FUN) + if( (gsworld_get_map() == MAP_8E_GL_FURNACE_FUN) && (D_8037DCB8 != NULL) && (D_8037DCB8->unk0 != NULL) ){ @@ -1322,7 +1322,7 @@ void lair_func_8038E0B0(void) { void lair_func_8038E768(Gfx **dl, Mtx **m, Vtx **v) { - if (map_get() != MAP_8E_GL_FURNACE_FUN) + if (gsworld_get_map() != MAP_8E_GL_FURNACE_FUN) return; gcquiz_draw(dl, m, v);