Merge branch 'master' into 'document/lighting'

# Conflicts:
#   src/core2/code_AC520.c
This commit is contained in:
Banjo Kazooie
2024-10-20 04:58:04 +00:00
353 changed files with 3703 additions and 3666 deletions

View File

@@ -152,41 +152,41 @@ segments:
- [0xF3F680, c, code_1D00] # NONMATCHING - [0xF3F680, c, code_1D00] # NONMATCHING
- [0xF40490, c, pimanager] - [0xF40490, c, pimanager]
- [0xF40650, c, defragmanager] - [0xF40650, c, defragmanager]
- [0xF40850, c, code_2FA0] - [0xF40850, c, stub_2FA0]
- [0xF40A70, c, initthread] - [0xF40A70, c, initthread]
- [0xF40B00, c, code_3250] - [0xF40B00, c, code_3250]
- [0xF41320, c, code_3A70] - [0xF41320, c, stub_3A70]
- [0xF42F00, c, code_5650] - [0xF42F00, c, code_5650]
- [0xF44940, c, code_7090] - [0xF44940, c, code_7090]
- [0xF44b60, c, code_72B0] - [0xF44b60, c, code_72B0]
- [0xF45810, c, code_7F60] - [0xF45810, c, code_7F60]
- [0xF46500, c, code_8C50] - [0xF46500, c, code_8C50]
- [0xF475C0, c, code_ABB0] - [0xF475C0, c, framebufferdraw]
- [0xF49870, c, code_CE60] - [0xF49870, c, code_CE60]
- [0xF4AD70, c, code_E360] - [0xF4AD70, c, vimgr]
- [0xF4B4C0, c, code_EAF0] - [0xF4B4C0, c, viewport]
- [0xF4D3D0, c, code_10A00] - [0xF4D3D0, c, pfsmanager]
- [0xF4E490, c, code_11AC0] - [0xF4E490, c, code_11AC0]
- [0xF4F890, c, rumblemanager] - [0xF4F890, c, rumblemanager]
- [0xF50010, c, code_13640] - [0xF50010, c, stub_13640]
- [0xF50050, c, code_13680] - [0xF50050, c, sprite]
- [0xF500a0, c, overlaymanager] - [0xF500a0, c, overlaymanager]
- [0xF50360, c, code_13990] - [0xF50360, c, mlmtx]
- [0xF51FC0, hasm, code_155F0] - [0xF51FC0, hasm, code_155F0]
- [0xF52000, c, overlay] - [0xF52000, c, overlay]
- [0xF52140, c, code_15770] - [0xF52140, c, depthbuffer]
- [0xF52500, c, code_15B30] - [0xF52500, c, code_15B30]
- [0xF53420, c, memory] - [0xF53420, c, memory]
- [0xF54AE0, c, code_18110] - [0xF54AE0, c, eeprom]
- [0xF54BE0, c, code_18210] - [0xF54BE0, c, ucode]
- [0xF54CE0, c, code_18310] - [0xF54CE0, c, lookup]
- [0xF54D20, c, code_18350] - [0xF54D20, c, ml]
- [0xF58860, c, code_1BE90] - [0xF58860, c, code_1BE90]
- [0xF59F60, c, code_1D590] - [0xF59F60, c, stub_1D590]
- [0xF59F90, hasm, code_1D5C0] - [0xF59F90, hasm, code_1D5C0]
- [0xF59FA0, c, code_1D5D0] - [0xF59FA0, c, code_1D5D0]
- [0xF5AD30, c, code_1E360] - [0xF5AD30, c, sns]
- [0xF5B0B0, c, code_1E6E0] - [0xF5B0B0, c, crccalc]
- [0xF5B1F0, hasm, code_1E820] - [0xF5B1F0, hasm, code_1E820]
- [0xF5B290, c, audio/n_sl] - [0xF5B290, c, audio/n_sl]
- [0xF5B320, c, audio/n_synthesizer] - [0xF5B320, c, audio/n_synthesizer]
@@ -365,29 +365,29 @@ segments:
- [0xF74830, .data, code_660] - [0xF74830, .data, code_660]
- [0xF74930, .data, code_1D00] - [0xF74930, .data, code_1D00]
- [0xF74A10, bin, data_37E30] #unreferenced - [0xF74A10, bin, data_37E30] #unreferenced
- [0xF74A20, .data, code_2FA0] - [0xF74A20, .data, stub_2FA0]
- [0xF74A30, .data, code_3250] - [0xF74A30, .data, code_3250]
- [0xF74A40, .data, code_3A70] - [0xF74A40, .data, stub_3A70]
- [0xF74A80, .data, code_5650] - [0xF74A80, .data, code_5650]
- [0xF74AA0, .data, code_7090] - [0xF74AA0, .data, code_7090]
- [0xF74AB0, bin, data_37ED0] #unreferenced - [0xF74AB0, bin, data_37ED0] #unreferenced
- [0xF74AC0, .data, code_7F60] - [0xF74AC0, .data, code_7F60]
- [0xF74AD0, .data, code_8C50] - [0xF74AD0, .data, code_8C50]
- [0xF74C60, .data, code_ABB0] - [0xF74C60, .data, framebufferdraw]
- [0xF74C70, .data, code_CE60] - [0xF74C70, .data, code_CE60]
- [0xF74CE0, .data, code_E360] - [0xF74CE0, .data, vimgr]
- [0xF74DD0, .data, code_EAF0] - [0xF74DD0, .data, viewport]
- [0xF74DE0, .data, code_10A00] - [0xF74DE0, .data, pfsmanager]
- [0xF74DF0, .data, code_11AC0] - [0xF74DF0, .data, code_11AC0]
- [0xF75380, .data, overlaymanager] - [0xF75380, .data, overlaymanager]
- [0xF75620, .data, code_13990] - [0xF75620, .data, mlmtx]
- [0xF75630, .data, code_15B30] - [0xF75630, .data, code_15B30]
- [0xF75640, .data, memory] - [0xF75640, .data, memory]
- [0xF75670, .data, code_18310] - [0xF75670, .data, lookup]
- [0xF75D60, .data, code_18350] - [0xF75D60, .data, ml]
- [0xF75EE0, .data, code_1BE90] - [0xF75EE0, .data, code_1BE90]
- [0xF75EF0, .data, code_1D5D0] - [0xF75EF0, .data, code_1D5D0]
- [0xF75F10, .data, code_1E360] - [0xF75F10, .data, sns]
- [0xF75F20, .data, data_1E820] - [0xF75F20, .data, data_1E820]
- [0xF75F30, .data, audio/n_sl] - [0xF75F30, .data, audio/n_sl]
- [0xF75F40, .data, audio/n_drvrNew] - [0xF75F40, .data, audio/n_drvrNew]
@@ -411,18 +411,18 @@ segments:
- [0xF76680, .data, io/vimodentsclan1] - [0xF76680, .data, io/vimodentsclan1]
- [0xF766D0, .rodata, code_1D00] - [0xF766D0, .rodata, code_1D00]
- [0xF766F0, .rodata, code_3250] - [0xF766F0, .rodata, code_3250]
- [0xF76700, .rodata, code_3A70] - [0xF76700, .rodata, stub_3A70]
- [0xF76710, .rodata, code_5650] - [0xF76710, .rodata, code_5650]
- [0xF76770, .rodata, code_72B0] - [0xF76770, .rodata, code_72B0]
- [0xF76790, .rodata, code_7F60] - [0xF76790, .rodata, code_7F60]
- [0xF767B0, .rodata, code_CE60] - [0xF767B0, .rodata, code_CE60]
- [0xF76A80, .rodata, code_EAF0] - [0xF76A80, .rodata, viewport]
- [0xF76B00, .rodata, code_10A00] - [0xF76B00, .rodata, pfsmanager]
- [0xF77210, .rodata, code_11AC0] - [0xF77210, .rodata, code_11AC0]
- [0xF77220, .rodata, rumblemanager] - [0xF77220, .rodata, rumblemanager]
- [0xF77230, .rodata, overlaymanager] - [0xF77230, .rodata, overlaymanager]
- [0xF772B0, .rodata, code_13990] - [0xF772B0, .rodata, mlmtx]
- [0xF772D0, .rodata, code_18350] - [0xF772D0, .rodata, ml]
- [0xF773D0, .rodata, code_1BE90] - [0xF773D0, .rodata, code_1BE90]
- [0xF77400, .rodata, code_1D5D0] - [0xF77400, .rodata, code_1D5D0]
- [0xF77460, .rodata, audio/n_synthesizer] - [0xF77460, .rodata, audio/n_synthesizer]
@@ -463,22 +463,22 @@ segments:
- [0xF791D0, .bss, code_7090] - [0xF791D0, .bss, code_7090]
- [0xF791D0, .bss, code_72B0] - [0xF791D0, .bss, code_72B0]
- [0xF791D0, .bss, code_8C50] - [0xF791D0, .bss, code_8C50]
- [0xF791D0, .bss, code_ABB0] - [0xF791D0, .bss, framebufferdraw]
- [0xF791D0, .bss, code_CE60] - [0xF791D0, .bss, code_CE60]
- [0xF791D0, .bss, code_E360] - [0xF791D0, .bss, vimgr]
- [0xF791D0, .bss, code_EAF0] - [0xF791D0, .bss, viewport]
- [0xF791D0, .bss, code_10A00] - [0xF791D0, .bss, pfsmanager]
- [0xF791D0, .bss, code_11AC0] - [0xF791D0, .bss, code_11AC0]
- [0xF791D0, .bss, rumblemanager] - [0xF791D0, .bss, rumblemanager]
- [0xF791D0, .bss, code_13640] - [0xF791D0, .bss, stub_13640]
- [0xF791D0, .bss, overlaymanager] - [0xF791D0, .bss, overlaymanager]
- [0xF791D0, .bss, code_13990] - [0xF791D0, .bss, mlmtx]
- [0xF791D0, .bss, code_15770] - [0xF791D0, .bss, depthbuffer]
- [0xF791D0, .bss, code_15B30] - [0xF791D0, .bss, code_15B30]
- [0xF791D0, .bss, memory] - [0xF791D0, .bss, memory]
- [0xF791D0, .bss, code_18210] - [0xF791D0, .bss, ucode]
- [0xF791D0, .bss, code_1D5D0] - [0xF791D0, .bss, code_1D5D0]
- [0xF791D0, .bss, code_1E360] - [0xF791D0, .bss, sns]
- [0xF791D0, .bss, os/initialize] - [0xF791D0, .bss, os/initialize]
- [0xF791D0, .bss, io/pimgr] - [0xF791D0, .bss, io/pimgr]
- [0xF791D0, .bss, io/sptask] - [0xF791D0, .bss, io/sptask]

View File

@@ -152,42 +152,42 @@ segments:
- [0xF1AF50, c, code_1D00] #DONE - [0xF1AF50, c, code_1D00] #DONE
- [0xF1BE20, c, pimanager] - [0xF1BE20, c, pimanager]
- [0xF1BFF0, c, defragmanager] #DONE - [0xF1BFF0, c, defragmanager] #DONE
- [0xF1C1F0, c, code_2FA0] #DONE - [0xF1C1F0, c, stub_2FA0] #DONE
- [0xF1C410, c, initthread] #DONE - [0xF1C410, c, initthread] #DONE
- [0xF1C4A0, c, code_3250] #DONE - [0xF1C4A0, c, code_3250] #DONE
- [0xF1CCC0, c, code_3A70] #DONE - [0xF1CCC0, c, stub_3A70] #DONE
- [0xF1E8A0, c, code_5650] - [0xF1E8A0, c, code_5650]
- [0xF202E0, c, code_7090] #DONE - [0xF202E0, c, code_7090] #DONE
- [0xF20500, c, code_72B0] #DONE - [0xF20500, c, code_72B0] #DONE
- [0xF211B0, c, code_7F60] #DONE - [0xF211B0, c, code_7F60] #DONE
- [0xF21EA0, c, code_8C50] #DONE - [0xF21EA0, c, code_8C50] #DONE
- [0xF22F80, c, code_9D30] #DONE - [0xF22F80, c, code_9D30] #DONE
- [0xF23E00, c, code_ABB0] #DONE - [0xF23E00, c, framebufferdraw] #DONE
- [0xF260B0, c, code_CE60] #DONE - [0xF260B0, c, code_CE60] #DONE
- [0xF275B0, c, code_E360] #DONE - [0xF275B0, c, vimgr] #DONE
- [0xF27D40, c, code_EAF0] #DONE - [0xF27D40, c, viewport] #DONE
- [0xF29C50, c,code_10A00] - [0xF29C50, c,pfsmanager]
- [0xF2AD10, c, code_11AC0] #DONE - [0xF2AD10, c, code_11AC0] #DONE
- [0xF2C160, c, rumblemanager] #DONE - [0xF2C160, c, rumblemanager] #DONE
- [0xF2C890, c, code_13640] #DONE - [0xF2C890, c, stub_13640] #DONE
- [0xF2C8D0, c, code_13680] #DONE - [0xF2C8D0, c, sprite] #DONE
- [0xF2C920, c, overlaymanager] #DONE - [0xF2C920, c, overlaymanager] #DONE
- [0xF2CBE0, c, code_13990] - [0xF2CBE0, c, mlmtx]
- [0xF2E840, hasm, code_155F0] #DONE - [0xF2E840, hasm, code_155F0] #DONE
- [0xF2E880, c, overlay] #DONE - [0xF2E880, c, overlay] #DONE
- [0xF2E9C0, c, code_15770] #DONE - [0xF2E9C0, c, depthbuffer] #DONE
- [0xF2ED80, c, code_15B30] #DONE - [0xF2ED80, c, code_15B30] #DONE
- [0xF2FCA0, c, memory] #DONE - [0xF2FCA0, c, memory] #DONE
- [0xF31360, c, code_18110] #DONE - [0xF31360, c, eeprom] #DONE
- [0xF31460, c, code_18210] #DONE - [0xF31460, c, ucode] #DONE
- [0xF31560, c, code_18310] #DONE - [0xF31560, c, lookup] #DONE
- [0xF315A0, c, code_18350] #DONE - [0xF315A0, c, ml] #DONE
- [0xF350E0, c, code_1BE90] #DONE - [0xF350E0, c, code_1BE90] #DONE
- [0xF367E0, c, code_1D590] #DONE - [0xF367E0, c, stub_1D590] #DONE
- [0xF36810, hasm, code_1D5C0] #DONE - [0xF36810, hasm, code_1D5C0] #DONE
- [0xF36820, c, code_1D5D0] #DONE - [0xF36820, c, code_1D5D0] #DONE
- [0xF375B0, c, code_1E360] #DONE - [0xF375B0, c, sns] #DONE
- [0xF37930, c, code_1E6E0] #DONE - [0xF37930, c, crccalc] #DONE
- [0xF37A70, hasm, code_1E820] #DONE - [0xF37A70, hasm, code_1E820] #DONE
- [0xF37B10, c, audio/n_sl] #DONE - [0xF37B10, c, audio/n_sl] #DONE
- [0xF37BA0, c, audio/n_synthesizer] #DONE - [0xF37BA0, c, audio/n_synthesizer] #DONE
@@ -365,30 +365,30 @@ segments:
- [0xF50EA0, .data, code_660] - [0xF50EA0, .data, code_660]
- [0xF50FA0, .data, code_1D00] - [0xF50FA0, .data, code_1D00]
- [0xF51080, bin, data_37E30] #unreferenced - [0xF51080, bin, data_37E30] #unreferenced
- [0xF51090, .data, code_2FA0] - [0xF51090, .data, stub_2FA0]
- [0xF510A0, .data, code_3250] - [0xF510A0, .data, code_3250]
- [0xF510B0, .data, code_3A70] - [0xF510B0, .data, stub_3A70]
- [0xF510F0, .data, code_5650] - [0xF510F0, .data, code_5650]
- [0xF51110, .data, code_7090] - [0xF51110, .data, code_7090]
- [0xF51120, bin, data_37ED0] #unreferenced - [0xF51120, bin, data_37ED0] #unreferenced
- [0xF51130, .data, code_7F60] - [0xF51130, .data, code_7F60]
- [0xF51140, .data, code_8C50] - [0xF51140, .data, code_8C50]
- [0xF51280, .data, code_9D30] - [0xF51280, .data, code_9D30]
- [0xF51430, .data, code_ABB0] - [0xF51430, .data, framebufferdraw]
- [0xF51440, .data, code_CE60] - [0xF51440, .data, code_CE60]
- [0xF514B0, .data, code_E360] - [0xF514B0, .data, vimgr]
- [0xF51550, .data, code_EAF0] - [0xF51550, .data, viewport]
- [0xF51560, .data, code_10A00] - [0xF51560, .data, pfsmanager]
- [0xF51570, .data, code_11AC0] - [0xF51570, .data, code_11AC0]
- [0xF51B00, .data, overlaymanager] - [0xF51B00, .data, overlaymanager]
- [0xF51DA0, .data, code_13990] - [0xF51DA0, .data, mlmtx]
- [0xF51DB0, .data, code_15B30] - [0xF51DB0, .data, code_15B30]
- [0xF51DC0, .data, memory] - [0xF51DC0, .data, memory]
- [0xF51DF0, .data, code_18310] - [0xF51DF0, .data, lookup]
- [0xF524E0, .data, code_18350] - [0xF524E0, .data, ml]
- [0xF52660, .data, code_1BE90] - [0xF52660, .data, code_1BE90]
- [0xF52670, .data, code_1D5D0] - [0xF52670, .data, code_1D5D0]
- [0xF52690, .data, code_1E360] - [0xF52690, .data, sns]
- [0xF526A0, .data, data_1E820] - [0xF526A0, .data, data_1E820]
- [0xF526B0, .data, audio/n_sl] - [0xF526B0, .data, audio/n_sl]
- [0xF526C0, .data, audio/n_drvrNew] - [0xF526C0, .data, audio/n_drvrNew]
@@ -412,19 +412,19 @@ segments:
- [0xF52DB0, .data, io/vimodentsclan1] - [0xF52DB0, .data, io/vimodentsclan1]
- [0xF52E50, .rodata, code_1D00] - [0xF52E50, .rodata, code_1D00]
- [0xF52E70, .rodata, code_3250] - [0xF52E70, .rodata, code_3250]
- [0xF52E80, .rodata, code_3A70] - [0xF52E80, .rodata, stub_3A70]
- [0xF52E90, .rodata, code_5650] - [0xF52E90, .rodata, code_5650]
- [0xF52EF0, .rodata, code_72B0] - [0xF52EF0, .rodata, code_72B0]
- [0xF52F10, .rodata, code_7F60] - [0xF52F10, .rodata, code_7F60]
- [0xF52F30, .rodata, code_9D30] - [0xF52F30, .rodata, code_9D30]
- [0xF52F50, .rodata, code_CE60] - [0xF52F50, .rodata, code_CE60]
- [0xF53220, .rodata, code_EAF0] - [0xF53220, .rodata, viewport]
- [0xF532A0, .rodata, code_10A00] - [0xF532A0, .rodata, pfsmanager]
- [0xF539B0, .rodata, code_11AC0] - [0xF539B0, .rodata, code_11AC0]
- [0xF539C0, .rodata, rumblemanager] - [0xF539C0, .rodata, rumblemanager]
- [0xF539D0, .rodata, overlaymanager] - [0xF539D0, .rodata, overlaymanager]
- [0xF53A50, .rodata, code_13990] - [0xF53A50, .rodata, mlmtx]
- [0xF53A70, .rodata, code_18350] - [0xF53A70, .rodata, ml]
- [0xF53B70, .rodata, code_1BE90] - [0xF53B70, .rodata, code_1BE90]
- [0xF53BA0, .rodata, code_1D5D0] - [0xF53BA0, .rodata, code_1D5D0]
- [0xF53C00, .rodata, audio/n_synthesizer] - [0xF53C00, .rodata, audio/n_synthesizer]
@@ -464,22 +464,22 @@ segments:
- [0xF55960, .bss, code_7090] - [0xF55960, .bss, code_7090]
- [0xF55960, .bss, code_72B0] - [0xF55960, .bss, code_72B0]
- [0xF55960, .bss, code_8C50] - [0xF55960, .bss, code_8C50]
- [0xF55960, .bss, code_ABB0] - [0xF55960, .bss, framebufferdraw]
- [0xF55960, .bss, code_CE60] - [0xF55960, .bss, code_CE60]
- [0xF55960, .bss, code_E360] - [0xF55960, .bss, vimgr]
- [0xF55960, .bss, code_EAF0] - [0xF55960, .bss, viewport]
- [0xF55960, .bss, code_10A00] - [0xF55960, .bss, pfsmanager]
- [0xF55960, .bss, code_11AC0] - [0xF55960, .bss, code_11AC0]
- [0xF55960, .bss, rumblemanager] - [0xF55960, .bss, rumblemanager]
- [0xF55960, .bss, code_13640] - [0xF55960, .bss, stub_13640]
- [0xF55960, .bss, overlaymanager] - [0xF55960, .bss, overlaymanager]
- [0xF55960, .bss, code_13990] - [0xF55960, .bss, mlmtx]
- [0xF55960, .bss, code_15770] - [0xF55960, .bss, depthbuffer]
- [0xF55960, .bss, code_15B30] - [0xF55960, .bss, code_15B30]
- [0xF55960, .bss, memory] - [0xF55960, .bss, memory]
- [0xF55960, .bss, code_18210] - [0xF55960, .bss, ucode]
- [0xF55960, .bss, code_1D5D0] - [0xF55960, .bss, code_1D5D0]
- [0xF55960, .bss, code_1E360] - [0xF55960, .bss, sns]
- [0xF55960, .bss, os/initialize] - [0xF55960, .bss, os/initialize]
- [0xF55960, .bss, io/pimgr] - [0xF55960, .bss, io/pimgr]
- [0xF55960, .bss, io/sptask] - [0xF55960, .bss, io/sptask]

View File

@@ -1,9 +1,130 @@
#ifndef __CORE_1_H__ #ifndef BANJO_KAZOOIE_CORE1_CORE1_H
#define __CORE_1_H__ #define BANJO_KAZOOIE_CORE1_CORE1_H
#include <ultra64.h>
#include "bool.h"
#include "enums.h"
#include "structs.h"
#include "prop.h"
#include "core1/eeprom.h"
#include "core1/framebufferdraw.h"
#include "core1/lookup.h"
#include "core1/main.h"
#include "core1/mem.h" #include "core1/mem.h"
#include "core1/ml.h"
#include "core1/mlmtx.h"
#include "core1/pfsmanager.h"
#include "core1/rarezip.h"
#include "core1/sns.h"
#include "core1/sprite.h"
#include "core1/ucode.h"
#include "core1/viewport.h"
#include "core1/vimgr.h"
void mlMtx_apply_vec3f(f32[3], f32[3]);
void func_80252C08(f32 arg0[3], f32 arg1[3], f32 scale, f32 arg3[3]); /* need to sort out in individual header files */
void glcrc_calc_checksum(void *start, void *end, u32 checksum[2]);
void func_80250530(s32 arg0, u16 chan_mask, f32 arg2);
void func_8025A104(enum comusic_e arg0, s32 arg1);
void func_8025A55C(s32 arg0, s32 arg1, s32 arg2);
s32 func_8025A864(enum comusic_e track_id);
void func_8025ABB8(enum comusic_e comusic_id, s32 arg1, s32 arg2, s32 arg3);
int func_8025AD7C(enum comusic_e arg0);
int func_8025ADBC(enum comusic_e arg0);
/* src/core1/code_7090.c */
void core1_7090_alloc(void);
void core1_7090_release(void);
void core1_7090_initSfxSource(s32 idx, s32 lookup_idx, s32 sample_rate, f32 volume);
void core1_7090_freeSfxSource(int idx);
/* src/core1/code_CE60.c */
void core1_ce60_setChanMask(s32 chan_mask);
void core1_ce60_setChanMaskWithValue(s32 chan_mask, f32 arg1);
bool core1_ce60_isPlayerInRange(s32 x, s32 z, s32 distance);
f32 core1_ce60_getPlayerDistance(f32 x, f32 z);
bool core1_ce60_isPlayerInsideBoundingBox(s32 box_idx);
void core1_ce60_func_8024A9EC(s32 arg0);
void core1_ce60_func_8024AAB0(void);
void core1_ce60_func_8024ADF0(bool arg0);
void core1_ce60_func_8024AE74(void);
void core1_ce60_resetState(void);
void core1_ce60_setChanMaskFromWaterState(s32 chan_mask_underwater, s32 chan_mask_surface);
void core1_ce60_func_8024AF48(void);
void core1_ce60_incOrDecCounter(bool increment);
void core1_ce60_func_8024BD40(s32 arg0, s32 arg1);
/* src/core1/depthbuffer.c */
extern u8 D_8000E800;
void func_80253190(Gfx **gfx);
void func_80253208(Gfx **gfx, s32 x, s32 y, s32 w, s32 h, void *color_buffer);
bool func_80253400(void);
bool depthBuffer_isPointerSet(void);
void depthBuffer_stub(void);
void func_80253428(int arg0);
void func_802534A8(int arg0);
void zBuffer_set(Gfx **gfx);
void *zBuffer_get(void);
/* src/core1/code_15B30.c */
typedef struct {
s32 unk0;
s32 unk4;
Gfx *unk8;
Gfx *unkC;
s32 unk10;
s32 unk14;
}Struct_Core1_15B30;
#define DEFAULT_FRAMEBUFFER_WIDTH 292
#define DEFAULT_FRAMEBUFFER_HEIGHT 216
extern s32 gFramebufferWidth;
extern s32 gFramebufferHeight;
extern u16 gFramebuffers[2][DEFAULT_FRAMEBUFFER_WIDTH * DEFAULT_FRAMEBUFFER_HEIGHT];
void func_80253550(void);
void func_8025357C(void);
void func_802535A8(Gfx **arg0, Gfx **arg1, UNK_TYPE(s32) arg2, UNK_TYPE(s32) arg3);
void func_80253640(Gfx ** gdl, void *arg1);
void scissorBox_SetForGameMode(Gfx **gdl, s32 framebuffer_idx);
void setupScissorBoxAndFramebuffer(Gfx **gfx, s32 framebuffer_address);
void setupDefaultScissorBoxAndFramebuffer(Gfx **gfx, s32 framebuffer_idx);
void func_80253DC0(Gfx **gfx);
void finishFrame(Gfx **gdl);
void func_80253E14(Gfx *arg0, Gfx *arg1, s32 arg2);
void func_80253EA4(Gfx *arg0, Gfx *arg1);
void func_80253EC4(Gfx *arg0, Gfx *arg1);
void func_80253EE4(Gfx **arg0, Gfx **arg1, s32 arg2);
void func_80253F74(Gfx **arg0, Gfx **arg1);
void func_80253F94(Gfx **arg0, Gfx **arg1);
void scissorBox_get(u32 *left, u32 *top, u32 *right, u32 *bottom);
void func_80253FE8(void);
void func_80254008(void);
void func_80254028(void);
void drawRectangle2D(Gfx **gfx, s32 x, s32 y, s32 w, s32 h, s32 r, s32 g, s32 b);
void graphicsCache_release(void);
void graphicsCache_init(void);
void scissorBox_set(s32 left, s32 top, s32 right, s32 bottom);
void scissorBox_setDefault(void);
void func_80254374(s32 arg0);
void toggleTextureFilterPoint(void);
void getGraphicsStacks(Gfx **gfx, Mtx **mtx, Vtx **vtx);
void dummy_func_80254464(void);
#endif #endif

7
include/core1/eeprom.h Normal file
View File

@@ -0,0 +1,7 @@
#ifndef BANJO_KAZOOIE_CORE1_EEPROM_H
#define BANJO_KAZOOIE_CORE1_EEPROM_H
s32 eeprom_writeBlocks(s32 file, s32 offset, void *buffer, s32 count);
s32 eeprom_readBlocks(s32 file, s32 offset, void *buffer, s32 count);
#endif

View File

@@ -0,0 +1,28 @@
#ifndef BANJO_KAZOOIE_CORE1_FRAMEBUFFERDRAW_H
#define BANJO_KAZOOIE_CORE1_FRAMEBUFFERDRAW_H
void framebufferdraw_drawSpriteCI4(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
void framebufferdraw_drawSpriteCI8(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
void framebufferdraw_drawSpriteRGBA16(s32 x, s32 y, BKSprite *sprite, s32 frame, bool alpha_enabled);
void framebufferdraw_drawSpriteI4(s32 x, s32 y, BKSprite *sprite, s32 frame, bool aplha_enabled);
void framebufferdraw_drawSpriteIA4(s32 x, s32 y, BKSprite *sprite, s32 frame, bool aplha_enabled);
void framebufferdraw_drawSpriteI8(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
void framebufferdraw_drawSpriteIA8(s32 x, s32 y, BKSprite *sprite, s32 frame, bool alpha_enabled);
void framebufferdraw_drawSpriteRGBA32(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
void framebufferdraw_stub1(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
void framebufferdraw_stub2(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
void framebufferdraw_drawTexture_CI4(s32 x, s32 y, void *tmem, s32 w, s32 h, bool alpha_enabled);
void framebufferdraw_draw(s32 x, s32 y, BKSprite *sprite, s32 frame, s32 alpha_enabled);
void framebufferdraw_func_80249DE0(s32 x, s32 y, s16 *arg2, s32 arg3, s32 arg4);
void framebufferdraw_func_80249F34(s32 x, s32 y, Struct84s* maskList, s32 maskIndex, s32 mX, s32 mY, s32 mW, s32 mH, s32 maskColor, s32 mStride, bool dim, s32 replacementColor);
void framebufferdraw_drawGrid(s32 x, s32 y, s32 arg2, s32 arg3, s32 horz_spacing, s32 vert_spacing);
void framebufferdraw_setPixel(s32 x, s32 y);
void framebufferdraw_drawOutline(s32 x, s32 y, s32 w, s32 h);
void framebufferdraw_func_8024A564(s32 x, s32 y, u16 *arg2, s32 arg3, s32 arg4, f32 arg5, f32 arg6);
void framebufferdraw_drawRect(s32 x, s32 y, s32 w, s32 h);
void framebufferdraw_resetPrimColorAndBuffer(void);
void framebufferdraw_setPrimColor(s32 r, s32 g, s32 b);
void framebufferdraw_setBufferIndex(s32 buffer_indx);
s32 framebufferdraw_getBufferIndex(void);
#endif

8
include/core1/lookup.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef BANJO_KAZOOIE_CORE1_LOOKUP_H
#define BANJO_KAZOOIE_CORE1_LOOKUP_H
enum comusic_e lookup_getCoMusicId(s32 idx);
enum sfx_e lookup_getSfxId(s32 idx);
enum asset_e lookup_getAnimAssetId(s32 idx);
#endif

26
include/core1/main.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef BANJO_KAZOOIE_CORE1_MAIN_H
#define BANJO_KAZOOIE_CORE1_MAIN_H
void func_8023DA20(s32 arg0);
void func_8023DA74(void);
void func_8023DA9C(s32 arg0);
u32 globalTimer_getTimeMasked(u32 mask);
//s32 globalTimer_getTime(void);
void globalTimer_reset(void);
enum map_e getSpecialBootMap(void);
enum map_e getDefaultBootMap(void);
void func_8023DBAC(void);
void func_8023DBDC(void);
void core1_init(void);
void globalTimer_incTimer(void);
void globalTimer_decTimer(void);
void mainLoop(void);
void mainThread_entry(void *arg);
void func_8023DFF0(s32 arg0);
s32 func_8023E000(void);
void setBootMap(enum map_e map_id);
void mainThread_create(void);
OSThread *mainThread_get(void);
void disableInput_set(void);
#endif

View File

@@ -1,5 +1,5 @@
#ifndef __MEM_H__ #ifndef BANJO_KAZOOIE_CORE1_MEMORY_H
#define __MEM_H__ #define BANJO_KAZOOIE_CORE1_MEMORY_H
/** /**
* copy memory area * copy memory area

122
include/core1/ml.h Normal file
View File

@@ -0,0 +1,122 @@
#ifndef BANJO_KAZOOIE_CORE1_ML_H
#define BANJO_KAZOOIE_CORE1_ML_H
f32 ml_acosf_deg(f32 x);
void ml_vec3f_sub_and_rotate(f32 vec1[3], f32 rotation[3], f32 vec2[3], f32 dst[3]);
f32 ml_vec3f_cos_between(f32 vec1[3], f32 vec2[3]);
void ml_vec3f_cross_product(f32 dst[3], f32 vec1[3], f32 vec2[3]);
void ml_vec3f_interpolate_fast(f32 dst[3], f32 start[3], f32 end[3], f32 t);
f32 ml_vec3f_dot_product(f32 vec1[3], f32 vec2[3]);
f32 ml_vec3f_distance(f32 vec1[3], f32 vec2[3]);
f32 ml_func_802560D0(f32 arg0[3], f32 arg1[3], f32 arg2[3]);
f32 ml_distanceSquared_vec3f(f32 vec1[3], f32 vec2[3]);
void func_802562DC(f32 vec1[3], f32 vec2[3], f32 vec3[3]);
f32 ml_vec3f_length_unused(f32 vec[3]);
void ml_vec3f_normalize_copy(f32 arg0[3], f32 arg1[3]);
void ml_vec3f_normalize(f32 vec[3]);
void ml_vec2f_normalize(f32 vec[2]);
void ml_3f_normalize(f32 *x, f32 *y, f32 *z);
void ml_vec3f_set_length_copy(f32 dst[3], f32 src[3], f32 len);
void func_80256664(f32 ptr[3]);
void func_80256740(f32 vec[3]);
void ml_vec3f_pitch_rotate_copy(f32 dst[3], f32 src[3], f32 pitch);
void ml_vec3f_yaw_rotate_copy(f32 dst[3], f32 src[3], f32 yaw);
void ml_vec3f_roll_rotate_copy(f32 dst[3], f32 src[3], f32 roll);
void ml_vec3f_set_length(f32 vec[3], f32 length);
f32 func_80256AB4(f32 x1, f32 y1, f32 x2, f32 y2);
f32 func_80256B54(f32 vec1[3], f32 vec2[3]);
f32 func_80256C60(f32 vec[3], s32 val);
void func_80256D0C(f32 val1, f32 val2, f32 x, f32 y, f32 z, f32 *dstX, f32 *dstY, f32 *dstZ);
void func_80256E24(f32 dst[3], f32 theta, f32 phi, f32 x, f32 y, f32 z);
void func_80256F44(f32 vec1[3], f32 vec2[3], f32 vec3[3], f32 dst[3]);
f32 ml_acosf(f32 x);
f32 func_8025715C(f32 val1, f32 val2);
f32 func_80257204(f32 val1, f32 val2, f32 val3, f32 val4);
f32 func_80257248(f32 vec1[3], f32 vec2[3]);
void func_8025727C(f32 x1, f32 y1, f32 z1, f32 x2, f32 y2, f32 z2, f32 *o1, f32 *o2);
void ml_init(void);
void ml_free(void);
f32 func_802575BC(f32 val);
f32 func_80257618(f32 val);
f32 func_80257658(f32 val);
f32 func_80257680(f32 val1, f32 val2, f32 val3);
void ml_defrag(void);
bool ml_timer_update(f32 *timer, f32 delta);
void func_8025778C(f32 dst[3], f32 arg1[3], f32 arg2[3][3]);
void func_802578A4(f32 dst[3], f32 vec1[3], f32 vec2[3]);
void func_80257918(f32 arg0[3], f32 arg1[3], f32 arg2[3], f32 arg3[3]);
bool func_802579B0(f32 vec[3], f32 x1, f32 z1, f32 x2, f32 z2);
f32 func_80257A44(f32 val1, f32 val2);
f32 func_80257A6C(f32 val1, f32 val2);
f32 func_80257AD4(f32 val1, f32 val2);
f32 ml_map_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max);
f32 ml_mapRange_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max);
f32 ml_interpolate_f(f32 arg0, f32 arg1, f32 arg2);
f32 ml_mapFunction_f(f32 a, f32 b, f32 c, f32 d, f32 e, f32 (*func)(f32));
f32 func_80257CC0(f32 a, f32 b, f32 c, f32 d, f32 e);
f32 func_80257CF8(f32 a, f32 b, f32 c, f32 d, f32 e);
f32 ml_mapAbsRange_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max);
void func_80257DB0(f32 arg0[3], f32 arg1[3], f32 arg2[3]);
void ml_setLength_vec3f(f32 v[3], f32 a);
s32 ml_clamp_w(s32 val, s32 min, s32 max);
f32 ml_clamp_f(f32 val, f32 min, f32 max);
int func_80257F18(f32 src[3], f32 target[3], f32 *yaw);
int func_8025801C(f32 target[3], f32 *yaw);
int func_80258108(f32 vec[3], f32 *arg1, f32 *arg2);
int func_80258210(f32 x, f32 y, f32 *dst);
bool ml_isZero_vec3f(f32 vec[3]);
bool ml_isNonzero_vec3f(f32 vec[3]);
bool ml_vec3f_not_on_vertical_axis(f32 vec[3]);
bool ml_vec3f_inside_box_f(f32 vec[3], f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, f32 maxZ);
bool ml_vec3f_inside_box_vec3f(f32 vec[3], f32 min[3], f32 max[3]);
bool ml_vec3w_inside_box_w(s32 vec[3], s32 minX, s32 minY, s32 minZ, s32 maxX, s32 maxY, s32 maxZ);
f32 ml_vec3f_horizontal_distance_zero_likely(f32 vec1[3], f32 vec2[3]);
f32 ml_vec3f_horizontal_distance_squared_zero_likely(f32 vec1[3], f32 vec2[3]);
f32 ml_vec3f_length(f32 vec1[3], f32 vec2[3]);
f32 ml_vec3f_length_sq(f32 vec1[3], f32 vec2[3]);
f32 ml_sin_deg(f32 angle_deg);
f32 ml_cos_deg(f32 angle_deg);
f32 mlNormalizeAngle(f32 angle);
f32 ml_remainder_f(f32 arg0, f32 arg1);
f32 ml_max_f(f32 arg0, f32 arg1);
f32 ml_min_f(f32 arg0, f32 arg1);
int ml_max_w(int arg0, int arg1);
int ml_min_w(int arg0, int arg1);
f32 mlAbsF(f32 arg0);
f32 func_80258994(f32 arg0[3]);
int ml_abs_w(int arg0);
void func_802589E4(f32 dst[3], f32 yaw, f32 length);
void func_80258A4C(f32 vec1[3], f32 arg1, f32 vec2[3], f32 *arg3, f32 *arg4, f32 *arg5);
void ml_vec3f_clear(f32 dst[3]);
void ml_vec3f_copy(f32 dst[3], f32 src[3]);
void ml_vec3f_diff_copy(f32 dst[3], f32 src1[3], f32 src2[3]);
void ml_vec3f_diff(f32 dst[3], f32 src[3]);
void ml_vec3f_assign(f32 dst[3], f32 x, f32 y, f32 z);
void ml_vec3f_add(f32 dst[3], f32 src1[3], f32 src2[3]);
void ml_vec3f_scale(f32 vec[3], f32 scale);
void ml_vec3f_scale_copy(f32 dst[3], f32 src[3], f32 scale);
void func_80258CDC(f32 vec1[3], f32 vec2[3]);
void ml_vec3w_to_vec3f(f32 dst[3], s32 src[3]);
void ml_vec3h_to_vec3f(f32 dst[3], s16 src[3]);
void ml_vec3f_to_vec3w(s32 dst[3], f32 src[3]);
void ml_vec3f_to_vec3h(s16 dst[3], f32 src[3]);
void ml_translate_y_local(f32 position[3], f32 rotation[3], f32 dy);
void ml_translate_z_local(f32 dst[3], f32 src[3], f32 dz);
void ml_translate_x_local(f32 dst[3], f32 src[3], f32 dx);
void func_8025901C(f32 arg0, f32 arg1[3], f32 arg2[3], f32 arg3);
f32 func_80259198(f32 arg0, f32 arg1);
f32 mlDiffDegF(f32 arg0, f32 arg1);
bool ml_vec3f_point_within_horizontal_distance(f32 vec[3], f32 x, f32 z, f32 distance);
bool ml_vec3f_within_horizontal_distance(f32 vec1[3], f32 vec2[3], f32 distance);
bool ml_vec3w_within_horizontal_distance(s32 vec1[3], s32 vec2[3], s32 distance);
bool ml_vec3f_within_distance(f32 vec1[3], f32 vec2[3], f32 distance);
bool ml_stub_80259400(f32 x);
void ml_sub_delta_time(f32 *x);
void func_8025947C(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]);
f32 func_80259554(f32 dst[3], f32 vec1[3], f32 vec2[3], f32 vec3[3]);
void func_802596AC(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]);
s32 ml_getViewportYawWithOffset(f32 x);
bool ml_isViewportYawWithOffsetNormalized(f32 x);
void ml_vec3f_interpolate(f32 dst[3], f32 start[3], f32 end[3], f32 t);
#endif

45
include/core1/mlmtx.h Normal file
View File

@@ -0,0 +1,45 @@
#ifndef BANJO_KAZOOIE_CORE1_MLMTX_H
#define BANJO_KAZOOIE_CORE1_MLMTX_H
void mlMtxGet(MtxF *dst);
MtxF *mlMtx_get_stack_pointer(void);
void mlMtxApply(Mtx *mPtr);
void mlMtxPop(void);
void mlMtx_push_duplicate(void);
void mlMtx_push_identity(void);
void mlMtx_push_translation(f32 x, f32 y, f32 z);
void mlMtx_push_mtx(f32* mtx);
void mlMtx_push_multiplied(f32* l_mtx);
void mlMtx_push_multiplied_2(MtxF * l_mtx, MtxF * r_mtx);
void mlMtxIdent(void);
void func_80251B5C(f32 x, f32 y, f32 z);
void mlMtxSet(MtxF* arg0);
void mlMtxRotate(f32 a, f32 x, f32 y, f32 z);
void mlMtxRotPitch(f32 arg0);
void mlMtxRotYaw(f32 arg0);
void mlMtxRotRoll(f32 arg0);
void mlMtx_rotate_pitch_deg(f32 arg0);
void mlMtx_rotate_yaw_deg(f32 arg0);
void mlMtxRotatePYR(f32 pitch, f32 yaw, f32 roll);
void mlMtxScale_xyz(f32 x, f32 y, f32 z);
void mlMtxScale(f32 scale);
void func_80252330(f32 x, f32 y, f32 z);
void mlMtx_apply_vec3f(f32 dst[3], f32 src[3]);
void mlMtx_apply_vec3f_restricted(f32 dst[3], f32 src[3]);
void mlMtx_apply_f3(f32 dst[3], f32 x, f32 y, f32 z);
void mlMtx_apply_vec3s(s16 dst[3], s16 src[3]);
void func_8025276C(s32 arg0[3], s32 arg1[3], s32 arg2[3], s32 arg3[3]);
void mlMtxTranslate(f32 x, f32 y, f32 z);
void func_80252A38(f32 x, f32 y, f32 z);
void func_80252AF0(f32 arg0[3], f32 arg1[3], f32 rotation[3], f32 scale, f32 arg4[3]);
void func_80252C08(f32 arg0[3], f32 rotation[3], f32 scale, f32 arg3[3]);
void func_80252CC4(f32 position[3], f32 rotation[3], f32 scale, f32 arg3[3]);
void func_80252D8C(f32 position[3], f32 rotation[3]);
void func_80252DDC(f32 position[3], f32 rotation[3]);
void func_80252E4C(f32 position[3], f32 rotation[3]);
void func_80252EC8(f32 position[3], f32 rotation[3]);
void func_80252F50(f32 rotation[3]);
void func_80252F8C(f32 rotation[3]);
void func_80252FC8(f32 rotation[3]);
#endif

View File

@@ -0,0 +1,68 @@
#ifndef BANJO_KAZOOIE_CORE1_PFSMANAGER_H
#define BANJO_KAZOOIE_CORE1_PFSMANAGER_H
typedef struct pfs_manager_face_buttons_s {
bool button_a;
bool button_b;
bool button_c_left;
bool button_c_up;
bool button_c_down;
bool button_c_right;
} PfsManagerFaceButtons;
typedef struct pfs_manager_side_buttons_s {
bool button_z;
bool button_l;
bool button_r;
} PfsManagerSideButtons;
typedef struct pfs_manager_controller_data {
union { s32 face_button[6]; PfsManagerFaceButtons face_button2; };
union { s32 side_button[3]; PfsManagerSideButtons side_button2; };
s32 unk24[4];
s32 start_button;
} PfsManagerControllerData;
typedef struct {
s16 unk0;
s16 unk2;
u16 unk4;
u16 unk6;
f32 unk8[2];
f32 joystick[2];
}Struct_core1_10A00_1;
f32 func_8024E420(s32 arg0, s32 arg1, s32 arg2);
void controller_copyFaceButtons(s32 controller_index, s32 dst[6]);
void pfsManager_getFirstControllerFaceButtonState(s32 controller_index, s32 dst[6]);
s32 func_8024E5E8(s32 arg0, s32 arg1);
s32 func_8024E60C(s32 controller_index, s32 dst[3]);
s32 func_8024E640(s32 controller_index, s32 dst[3]);
f32 func_8024E668(s32 controller_index);
s32 controller_getStartButton(s32 controller_index);
s32 func_8024E698(s32 controller_index);
void func_8024E6E0(s32 controller_index, s32 *dst[4]);
void controller_getJoystick(s32 controller_index, f32 dst[2]);
void pfsManager_update(void);
void pfsManager_readData();
void pfsManager_entry(void *arg);
void pfsManager_init(void);
bool pfsManager_contErr(void);
void func_8024F150(void);
void func_8024F180(void);
void pfsManager_getStartReadData(void);
void func_8024F1F0(void);
void func_8024F224(void);
void func_8024F2E4(s32 arg0, Struct_core1_10A00_1 *arg1);
void func_8024F328(s32 controller_index, s32 arg1);
OSMesgQueue * pfsManager_getFrameReplyQ(void);
OSMesgQueue *pfsManager_getFrameMesgQ(void);
void func_8024F35C(s32 arg0);
bool pfsManager_isBusy(void);
int func_8024F3C4(int arg0);
OSContPad *func_8024F3F4(void);
void func_8024F400(void);
void func_8024F450(void);
void func_8024F4AC(void);
#endif

View File

@@ -1,7 +1,5 @@
#ifndef RAREZIP_H #ifndef BANJO_KAZOOIE_CORE1_RAREZIP_H
#define RAREZIP_H #define BANJO_KAZOOIE_CORE1_RAREZIP_H
#include <ultra64.h>
extern u8 D_80275670[]; extern u8 D_80275670[];
//border[]= { /* Order of the bit length code lengths */ //border[]= { /* Order of the bit length code lengths */

View File

@@ -1,6 +1,5 @@
#ifndef __SNS_H__ #ifndef BANJO_KAZOOIE_CORE1_SNS_H
#define __SNS_H__ #define BANJO_KAZOOIE_CORE1_SNS_H
#include <ultra64.h>
/** /**
* sns sets * sns sets

11
include/core1/sprite.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef BANJO_KAZOOIE_CORE1_SPRITE_H
#define BANJO_KAZOOIE_CORE1_SPRITE_H
u32 sprite_getUnk8(BKSprite *this);
u32 sprite_getUnkA(BKSprite *this);
u32 sprite_getUnk6(BKSprite *this);
u32 sprite_getUnk4(BKSprite *this);
s32 sprite_getFrameCount(BKSprite *this);
BKSpriteFrame *sprite_getFramePtr(BKSprite *this, u32 frame_id);
#endif

10
include/core1/ucode.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef BANJO_KAZOOIE_CORE1_UCODE_H
#define BANJO_KAZOOIE_CORE1_UCODE_H
void ucode_load(void);
void ucode_stub1(void); // does nothing
void ucode_stub2(void); // performs dummy read on PI
s32 ucode_stub3(void); // returns always 0
void ucode_getPtrAndSize(void **ptr, u32 *size);
#endif

View File

@@ -1,10 +1,5 @@
#ifndef BANJO_KAZOOIE_VIEWPORT_H #ifndef BANJO_KAZOOIE_CORE1_VIEWPORT_H
#define BANJO_KAZOOIE_VIEWPORT_H #define BANJO_KAZOOIE_CORE1_VIEWPORT_H
#include <ultra64.h>
#include <prop.h> // for Cube
#include "ml/mtx.h" // for MtxF
void viewport_moveAlongZAxis(f32 offset); void viewport_moveAlongZAxis(f32 offset);
f32 viewport_getDistance(f32 arg0[3]); f32 viewport_getDistance(f32 arg0[3]);

28
include/core1/vimgr.h Normal file
View File

@@ -0,0 +1,28 @@
#ifndef BANJO_KAZOOIE_CORE1_VIMGR_H
#define BANJO_KAZOOIE_CORE1_VIMGR_H
typedef struct struct_1_s{
OSMesgQueue *messageQueue;
OSMesg message;
} struct1;
u32 getOtherFramebuffer(void);
s32 viMgr_func_8024BD94(void);
s32 getActiveFramebuffer(void);
void viMgr_func_8024BDAC(OSMesgQueue *mq, OSMesg msg);
void viMgr_init(void);
void viMgr_func_8024BF94(s32 arg0);
s32 viMgr_func_8024BFA0(void);
void viMgr_func_8024BFAC(void);
void viMgr_func_8024BFD8(s32 arg0);
void viMgr_func_8024C1B4(void);
void viMgr_func_8024C1DC(void);
void viMgr_func_8024C1FC(OSMesgQueue *mq, OSMesg msg);
void viMgr_setActiveFramebuffer(s32 arg0);
void viMgr_entry(void *arg0);
void viMgr_setScreenBlack(s32 active);
void viMgr_clearFramebuffers(void);
s32 viMgr_func_8024C4E8(void);
void viMgr_func_8024C4F8(s32 arg0);
#endif

View File

@@ -3,7 +3,6 @@
#include <ultra64.h> #include <ultra64.h>
#include "generic.h" #include "generic.h"
#include "ml/mtx.h"
#ifndef NONMATCHING #ifndef NONMATCHING
#define animctrl_start(this, file, line) _animctrl_start(this, file, line) #define animctrl_start(this, file, line) _animctrl_start(this, file, line)

73
include/core2/camera.h Normal file
View File

@@ -0,0 +1,73 @@
#ifndef _CAMERA_H_
#define _CAMERA_H_
#include <ultratypes.h>
#include <core2/file.h>
typedef struct {
s32 type: 24;
s32 valid: 8;
s32 data_ptr;
} CameraNode;
typedef struct {
f32 position[3];
f32 horizontalSpeed;
f32 verticalSpeed;
f32 rotation;
f32 accelaration;
f32 pitchYawRoll[3]; // 0 = pitch, 1 = yaw, 2 = roll
s32 unknownFlag; // unknown, some sort of flag value, is &'ed with 1, 2 and 4
} CameraNodeType1;
CameraNodeType1 *cameraNodeType1_init();
void cameraNodeType1_free(CameraNodeType1 *this);
void cameraNodeType1_fromFile(File *file_ptr, CameraNodeType1 *this);
void cameraNodeType1_getPosition(CameraNodeType1 *this, f32 position[3]);
void cameraNodeType1_getHorizontalAndVerticalSpeed(CameraNodeType1 *this, f32 *horizontal_speed, f32 *vertical_speed);
void cameraNodeType1_getRotationAndAccelaration(CameraNodeType1 *this, f32 *rotation, f32 *accelaration);
typedef struct {
f32 position[3];
f32 pitchYawRoll[3]; // 0 = pitch, 1 = yaw, 2 = roll
} CameraNodeType2;
CameraNodeType2 *cameraNodeType2_init();
void cameraNodeType2_free(CameraNodeType2 *this);
void cameraNodeType2_fromFile(File *file_ptr, CameraNodeType2 *this);
void cameraNodeType2_getPosition(CameraNodeType2 *this, f32 position[3]);
/*
* Sets 0 to pitch, 1 to yaw and 2 to roll
*/
void cameraNodeType2_getPitchYawRoll(CameraNodeType2 *this, f32 pitch_yaw_roll[3]);
typedef struct {
f32 position[3];
f32 horizontalSpeed;
f32 verticalSpeed;
f32 rotation;
f32 accelaration;
f32 closeDistance;
f32 farDistance;
f32 pitchYawRoll[3]; // 0 = pitch, 1 = yaw, 2 = roll
s32 unknownFlag;
} CameraNodeType3;
CameraNodeType3 *cameraNodeType3_init();
void cameraNodeType3_free(CameraNodeType3 *this);
void cameraNodeType3_fromFile(File *file_ptr, CameraNodeType3 *this);
void cameraNodeType3_getPosition(CameraNodeType3 *this, f32 position[3]);
void cameraNodeType3_getHorizontalAndVerticalSpeed(CameraNodeType3 *this, f32 *horizontal_speed, f32 *vertical_speed);
void cameraNodeType3_getRotationAndAccelaration(CameraNodeType3 *this, f32 *rotation, f32 *accelaration);
/*
* Sets 0 to pitch, 1 to yaw and 2 to roll
*/
void cameraNodeType3_getPositionWithPitchYawRoll(CameraNodeType3 *this, f32 pitch_yaw_roll[3]);
f32 cameraNodeType3_getCloseDistance(CameraNodeType3 *this);
f32 cameraNodeType3_getFarDistance(CameraNodeType3 *this);
typedef struct {
s32 unknownFlag;
} CameraNodeType4;
CameraNodeType4 *cameraNodeType4_init();
void cameraNodeType4_free(CameraNodeType4 *this);
void cameraNodeType4_fromFile(File *file_ptr, CameraNodeType4 *this);
#endif

View File

@@ -12,4 +12,7 @@ void func_8035179C_copyPosition(Struct68s* arg0, f32 arg1[3]);
void func_80351814(Struct68s *arg0, f32 arg1[3]); void func_80351814(Struct68s *arg0, f32 arg1[3]);
f32 func_80351830(Struct68s *arg0); f32 func_80351830(Struct68s *arg0);
extern void sfxsource_setSampleRate(u8, s32);
#endif #endif

View File

@@ -328,7 +328,7 @@ enum volatile_flags_e {
VOLATILE_FLAG_74_SANDCASTLE_INFINITE_EGGS, VOLATILE_FLAG_74_SANDCASTLE_INFINITE_EGGS,
VOLATILE_FLAG_75_SANDCASTLE_INFINITE_RED_FEATHERS, VOLATILE_FLAG_75_SANDCASTLE_INFINITE_RED_FEATHERS,
VOLATILE_FLAG_76_SANDCASTLE_INFINITE_GOLD_FEATHERS, VOLATILE_FLAG_76_SANDCASTLE_INFINITE_GOLD_FEATHERS,
VOLATILE_FLAG_77_SANDCASTLE_SET_HEALTH_TO_MAX, VOLATILE_FLAG_77_SANDCASTLE_SET_HEALTH_TO_MAX, // unused
VOLATILE_FLAG_78_SANDCASTLE_NO_BONUS, VOLATILE_FLAG_78_SANDCASTLE_NO_BONUS,
VOLATILE_FLAG_79, // unused VOLATILE_FLAG_79, // unused
VOLATILE_FLAG_7A, // unused VOLATILE_FLAG_7A, // unused
@@ -1633,7 +1633,7 @@ enum honeycomb_e
HONEYCOMB_14_SM_WATERFALL, HONEYCOMB_14_SM_WATERFALL,
HONEYCOMB_15_SM_UNDERWATER, HONEYCOMB_15_SM_UNDERWATER,
HONEYCOMB_16_SM_TREE, HONEYCOMB_16_SM_TREE,
HONEYCOMB_17_SM_COLIWOBBLE, HONEYCOMB_17_SM_COLLIWOBBLE,
HONEYCOMB_18_SM_QUARRIES HONEYCOMB_18_SM_QUARRIES
}; };
@@ -1964,8 +1964,11 @@ enum actor_e
ACTOR_151_LOCKUP_SLOW = 0x151, ACTOR_151_LOCKUP_SLOW = 0x151,
ACTOR_152_LOCKUP_MEDIUM, ACTOR_152_LOCKUP_MEDIUM,
ACTOR_153_LOCKUP_FAST, ACTOR_153_LOCKUP_FAST,
ACTOR_154_UNKNOWN,
ACTOR_158_UNKNOWN = 0x158, ACTOR_155_UNKNOWN,
ACTOR_156_UNKNOWN,
ACTOR_157_UNKNOWN,
ACTOR_158_UNKNOWN,
ACTOR_15A_UNKNOWN = 0x15A, ACTOR_15A_UNKNOWN = 0x15A,
@@ -1975,9 +1978,9 @@ enum actor_e
ACTOR_160_BOGGY_1, ACTOR_160_BOGGY_1,
ACTOR_163_BAT = 0x163, ACTOR_163_BAT = 0x163,
ACTOR_164_COLLYWOBBLE_A, ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A,
ACTOR_165_BAWL_A, ACTOR_165_BAWL_THE_ONION_A,
ACTOR_166_TOPPER_A, ACTOR_166_TOPPER_THE_CARROT_A,
ACTOR_167_ATTACK_TUTORIAL, ACTOR_167_ATTACK_TUTORIAL,
ACTOR_16E_UNKNOWN = 0x16E, ACTOR_16E_UNKNOWN = 0x16E,
@@ -2134,6 +2137,9 @@ enum actor_e
ACTOR_32B_UNKNOWN = 0x32B, //something with Tanktup ACTOR_32B_UNKNOWN = 0x32B, //something with Tanktup
ACTOR_32F_UNKNOWN = 0x32F,
ACTOR_330_UNKNOWN,
ACTOR_332_TWINKLY_BLUE = 0x332, ACTOR_332_TWINKLY_BLUE = 0x332,
ACTOR_333_TWINKLY_GREEN, ACTOR_333_TWINKLY_GREEN,
ACTOR_334_TWINKLY_ORANGE, ACTOR_334_TWINKLY_ORANGE,
@@ -2167,8 +2173,8 @@ enum actor_e
ACTOR_36C_25_MUMBO_TOKEN_SIGN, ACTOR_36C_25_MUMBO_TOKEN_SIGN,
ACTOR_COLLYWOBBLE_B = 0x36D, ACTOR_COLLYWOBBLE_B = 0x36D,
ACTOR_BAWL_B = 0x36E, ACTOR_BAWL_THE_ONION_B = 0x36E,
ACTOR_TOPPER_B = 0x36F, ACTOR_TOPPER_THE_CARROT_B = 0x36F,
ACTOR_370_GOLD_FEATHER = 0x370, ACTOR_370_GOLD_FEATHER = 0x370,
ACTOR_374_VACATION_TEXT_TRIGGER = 0x374, ACTOR_374_VACATION_TEXT_TRIGGER = 0x374,
@@ -2213,10 +2219,11 @@ enum actor_e
ACTOR_3AF_GRUNTY_SHADOW = 0x3AF, ACTOR_3AF_GRUNTY_SHADOW = 0x3AF,
ACTOR_3B9_JUMP_TUTORIAL = 0x3B9, ACTOR_3BA_UNKNOWN = 0x3BA,
ACTOR_3BA_UNKNOWN,
ACTOR_3BF_GRUNTLING_BLUE = 0x3bf, ACTOR_3B9_JUMP_TUTORIAL = 0x3B9,
ACTOR_3BF_GRUNTLING_BLUE = 0x3BF,
ACTOR_3C0_GRUNTLING_BLACK, ACTOR_3C0_GRUNTLING_BLACK,
ACTOR_3C1_PURPLE_TEEHEE, ACTOR_3C1_PURPLE_TEEHEE,
ACTOR_3C2_GIANT_GRAVESTONE, ACTOR_3C2_GIANT_GRAVESTONE,
@@ -2226,7 +2233,8 @@ enum actor_e
ACTOR_3C7_FF_PRIZE_GRUNTY_DOLL = 0x3C7, ACTOR_3C7_FF_PRIZE_GRUNTY_DOLL = 0x3C7,
ACTOR_3C8_FF_PRIZE_TOOTY = 0x3C8, ACTOR_3C8_FF_PRIZE_TOOTY = 0x3C8,
ACTOR_3CA_ROCK_TRAPPING_GRUNTY = 0x3CA ACTOR_3CA_ROCK_TRAPPING_GRUNTY = 0x3CA,
ACTOR_3CB_UNKNOWN
}; };
enum bundle_e { enum bundle_e {
@@ -2447,15 +2455,15 @@ enum sm_specific_flags {
SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES = 0x1, SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES = 0x1,
SM_SPECIFIC_FLAG_2, SM_SPECIFIC_FLAG_2,
SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED,
SM_SPECIFIC_FLAG_4, SM_SPECIFIC_FLAG_4, // if true the claw swipe can be leared
SM_SPECIFIC_FLAG_5, SM_SPECIFIC_FLAG_5, // learned all attack moves
SM_SPECIFIC_FLAG_7 = 0x7, SM_SPECIFIC_FLAG_7 = 0x7, // cauliflower dead?
SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED, SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED,
SM_SPECIFIC_FLAG_9_ABILITY_FEATHERY_UNLOCKED, SM_SPECIFIC_FLAG_9_ABILITY_FEATHERY_UNLOCKED,
SM_SPECIFIC_FLAG_A, SM_SPECIFIC_FLAG_A,
SM_SPECIFIC_FLAG_C = 0xC, SM_SPECIFIC_FLAG_C = 0xC, // learned all attack moves
SM_SPECIFIC_FLAG_E = 0xE, SM_SPECIFIC_FLAG_E = 0xE,
SM_SPECIFIC_FLAG_F, SM_SPECIFIC_FLAG_F,
@@ -2476,7 +2484,6 @@ enum mm_specific_flags {
MM_SPECIFIC_FLAG_A_UNKNOWN MM_SPECIFIC_FLAG_A_UNKNOWN
}; };
enum ttc_specific_flags { enum ttc_specific_flags {
TTC_SPECIFIC_FLAG_0_BLUBBER_UNKNOWN, TTC_SPECIFIC_FLAG_0_BLUBBER_UNKNOWN,
TTC_SPECIFIC_FLAG_1_UNKNOWN, // something related to the sand castle TTC_SPECIFIC_FLAG_1_UNKNOWN, // something related to the sand castle
@@ -2510,10 +2517,11 @@ enum item_e
ITEM_6_HOURGLASS, ITEM_6_HOURGLASS,
ITEM_7_SKULL_HOURGLASS, ITEM_7_SKULL_HOURGLASS,
ITEM_9_PROPELLOR = 0x9, ITEM_9_PROPELLOR = 0x9,
ITEM_B_XMAS_TREE = 0xb, ITEM_B_XMAS_TREE = 0xb,
ITEM_C_NOTE, ITEM_C_NOTE = 0xC,
ITEM_D_EGGS, ITEM_D_EGGS,
ITEM_E_JIGGY, ITEM_E_JIGGY,
ITEM_F_RED_FEATHER, ITEM_F_RED_FEATHER,
@@ -2948,7 +2956,7 @@ enum asset_e
ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN, ASSET_225_ANIM_COLLYWOBBLE_UNKNOWN,
ASSET_226_ANIM_BAWL_UNKNOWN, ASSET_226_ANIM_BAWL_UNKNOWN,
ASSET_227_ANIM_BAWL_UNKNOWN, ASSET_227_ANIM_BAWL_UNKNOWN,
ASSET_228_ANIM_BANJO_SLED = 0x228, ASSET_228_ANIM_BANJO_SLED,
ASSET_229_ANIM_WHIPCRACK_ATTACK, ASSET_229_ANIM_WHIPCRACK_ATTACK,
ASSET_22A_ANIM_WHIPCRACK_IDLE, ASSET_22A_ANIM_WHIPCRACK_IDLE,
ASSET_22B_ANIM_NABNUT_FAT, ASSET_22B_ANIM_NABNUT_FAT,
@@ -3334,7 +3342,7 @@ enum asset_e
// 427 (Wooden Plank) // 427 (Wooden Plank)
ASSET_428_MODEL_BOSS_BOOM_BOX = 0x428, ASSET_428_MODEL_BOSS_BOOM_BOX = 0x428,
ASSET_429_MODEL_CC_KEY, ASSET_429_MODEL_CC_KEY,
// 42a (Smoke 2D?) ASSET_42A_UNKNOWN, // 42a (Smoke 2D?)
// 42b (Orange Triangle?) // 42b (Orange Triangle?)
ASSET_42C_MODEL_BURIED_TREASURE = 0x42C, ASSET_42C_MODEL_BURIED_TREASURE = 0x42C,
ASSET_42D_MODEL_QUARRIE = 0x42D, ASSET_42D_MODEL_QUARRIE = 0x42D,
@@ -3411,14 +3419,14 @@ enum asset_e
// 472 Blank Picture // 472 Blank Picture
// 473 Mumbo The BBQ King! He Bares Coconuts! // 473 Mumbo The BBQ King! He Bares Coconuts!
// 474 Roysten The Grill Master! // 474 Roysten The Grill Master!
// 475 (Heart 2D?) ASSET_475_UNKNOWN = 0x475,// 475 (Heart 2D?)
ASSET_476_SPRITE_BLUE_GLOW = 0x476, ASSET_476_SPRITE_BLUE_GLOW,
ASSET_477_SPRITE_YELLOW_GLOW, ASSET_477_SPRITE_YELLOW_GLOW,
// 478 (Yellow Glow?) // 478 (Yellow Glow?)
// 479 Bikini Girl // 479 Bikini Girl
// 47a (Brown Ball?) // 47a (Brown Ball?)
ASSET_47B_MODEL_ROCK = 0x47b, ASSET_47B_MODEL_ROCK = 0x47b,
// 47c (Snoring Z 2D?) ASSET_47C_UNKNOWN,// 47c (Snoring Z 2D?)
// Unused // Unused
// Unused // Unused
ASSET_47F_MODEL_XMAS_GIFT_BLUE = 0x47F, ASSET_47F_MODEL_XMAS_GIFT_BLUE = 0x47F,
@@ -3531,14 +3539,14 @@ enum asset_e
// 4ea FP Finish Banner // 4ea FP Finish Banner
// 4eb FP Start Banner // 4eb FP Start Banner
// 4ec FP Race Rostrum // 4ec FP Race Rostrum
ASSET_4ED_MODEL_TOPPER = 0x4ed, ASSET_4ED_MODEL_TOPPER = 0x4ED,
ASSET_4EE_MODEL_COLLYWOBBLE, ASSET_4EE_MODEL_COLLYWOBBLE,
ASSET_4EF_MODEL_BAWL, ASSET_4EF_MODEL_BAWL,
ASSET_4F0_MODEL_UNKNOWN, // 4f0 Colliwobble Large Stem (Upon Death) ASSET_4F0_MODEL_TOPPER_UNKNOWN,
ASSET_4F1_MODEL_UNKNOWN, // 4f1 Colliwobble Small Stem (Upon Death) ASSET_4F1_MODEL_BAWL_OR_COLLIWOBBLE_UNKNOWN,
ASSET_4F2_MODEL_UNKNOWN, // 4f2 Colliwobble Large Leaf (Upon Death) ASSET_4F2_MODEL_COLLIWOBBLE_LARGE_DEATH,
ASSET_4F3_MODEL_UNKNOWN, // 4f3 Colliwobble Small Leaf (Upon Death) ASSET_4F3_MODEL_COLLIWOBBLE_SMALL_DEATH,
ASSET_4F4_MODEL_UNKNOWN, // 4f4 Colliwobble Stem (Upon Death) ASSET_4F4_MODEL_COLLIWOBBLE_STEM_DEATH,
// 4f5 CCW Spring Switch // 4f5 CCW Spring Switch
// 4f6 CCW Summer Switch // 4f6 CCW Summer Switch
// 4f7 CCW Autumn Switch // 4f7 CCW Autumn Switch
@@ -3811,7 +3819,7 @@ enum asset_e
// Unused // Unused
// 606 Red Mushroom // 606 Red Mushroom
// 607 Green Mushroom // 607 Green Mushroom
// 608 White Circle ASSET_608_UNKNOWN = 0x608, // 608 White Circle
// 609 Mushroom (2D) // 609 Mushroom (2D)
// Unused // Unused
// Unused // Unused
@@ -4014,6 +4022,7 @@ enum asset_e
ASSET_6DA_SPRITE_HOURGLASS, ASSET_6DA_SPRITE_HOURGLASS,
ASSET_6DB_SPRITE_SKULL_HOURGLASS, ASSET_6DB_SPRITE_SKULL_HOURGLASS,
ASSET_6DC_SPRITE_XMAS_TREE_TIMER, ASSET_6DC_SPRITE_XMAS_TREE_TIMER,
ASSET_6DD_UNKNOWN,
SPRITE_DIALOG_FONT_ALPHAMASK = 0x6eb, SPRITE_DIALOG_FONT_ALPHAMASK = 0x6eb,
SPRITE_BOLD_FONT_LETTERS_ALPHAMASK, SPRITE_BOLD_FONT_LETTERS_ALPHAMASK,
@@ -4037,8 +4046,8 @@ enum asset_e
ASSET_711_SPRITE_SPARKLE_DARK_BLUE, ASSET_711_SPRITE_SPARKLE_DARK_BLUE,
ASSET_712_SPRITE_SPARKLE_GREEN, ASSET_712_SPRITE_SPARKLE_GREEN,
ASSET_713_SPRITE_SPARKLE_YELLOW, ASSET_713_SPRITE_SPARKLE_YELLOW,
ASSET_714_SPRITE_UNKNOWN,
ASSET_715_SPRITE_SPARKLE_RED = 0x715, ASSET_715_SPRITE_SPARKLE_RED,
ASSET_716_SPRITE_SPARKLE_WHITE, ASSET_716_SPRITE_SPARKLE_WHITE,
ASSET_717_SPRITE_SPARKLE_YELLOW_2, ASSET_717_SPRITE_SPARKLE_YELLOW_2,
ASSET_718_SPRITE_SPARKLE_WHITE_2, ASSET_718_SPRITE_SPARKLE_WHITE_2,
@@ -4190,20 +4199,20 @@ enum asset_e
ASSET_8A0_SPRITE_WATER_DROP = 0x8A0, ASSET_8A0_SPRITE_WATER_DROP = 0x8A0,
ASSET_A0B_TEXT_BLUBBER_FIRST_MEET = 0xA0B, ASSET_A0B_DIALOG_BLUBBER_FIRST_MEET = 0xA0B,
ASSET_A0C_TEXT_BLUBBER_HALF_GOLD, ASSET_A0C_DIALOG_BLUBBER_HALF_GOLD,
ASSET_A0D_TEXT_BLUBBER_COMPLETE, ASSET_A0D_DIALOG_BLUBBER_COMPLETE,
ASSET_A0E_TEXT_NIPPER_SPAWNED, ASSET_A0E_DIALOG_NIPPER_SPAWNED,
ASSET_A10_TEXT_TTC_NIPPER_HURT = 0xa10, ASSET_A10_DIALOG_TTC_NIPPER_HURT = 0xa10,
ASSET_A14_TEXT_CLAM_TAUNT = 0xA14, ASSET_A14_DIALOG_CLAM_TAUNT = 0xA14,
ASSET_A15_TEXT_TTC_LOCKUP_SPAWNED, ASSET_A15_DIALOG_TTC_LOCKUP_SPAWNED,
ASSET_A17_TEXT_BURIED_TREASURE_SPAWNED = 0xA17, ASSET_A17_DIALOG_BURIED_TREASURE_SPAWNED = 0xA17,
ASSET_A18_TEXT_TREASUREHUNT_FOLLOW_CLUES, ASSET_A18_DIALOG_TREASUREHUNT_FOLLOW_CLUES,
ASSET_A19_TEXT_TREASUREHUNT_SECOND_STEP, ASSET_A19_DIALOG_TREASUREHUNT_SECOND_STEP,
ASSET_A1A_TEXT_LEAKY_FIRST_MEET, ASSET_A1A_DIALOG_LEAKY_FIRST_MEET,
ASSET_A1F_DIALOG_SHOCKJUMP_LEARN = VER_SELECT(0xa1f, 0x91f, 0, 0), ASSET_A1F_DIALOG_SHOCKJUMP_LEARN = VER_SELECT(0xa1f, 0x91f, 0, 0),
ASSET_A20_DIALOG_FLY_LEARN, ASSET_A20_DIALOG_FLY_LEARN,
@@ -4213,63 +4222,63 @@ enum asset_e
ASSET_A24_DIALOG_JUMP_PAD_DISCOVERED, ASSET_A24_DIALOG_JUMP_PAD_DISCOVERED,
ASSET_A25_DIALOG_FLY_DISC_DISCOVERED, ASSET_A25_DIALOG_FLY_DISC_DISCOVERED,
ASSET_A26_DIALOG_NEED_RED_FEATHERS_TO_FLY, ASSET_A26_DIALOG_NEED_RED_FEATHERS_TO_FLY,
ASSET_A27_TEXT_BOTTLES_ALL_TTC_MOVES_LEARNED, ASSET_A27_DIALOG_BOTTLES_ALL_TTC_MOVES_LEARNED,
ASSET_A28_TEXT_LEAKY_DONE, ASSET_A28_DIALOG_LEAKY_DONE,
ASSET_A2A_BLUBBER_COMPLETE_JIGGY_COLLECTED = 0xA2A, ASSET_A2A_BLUBBER_COMPLETE_JIGGY_COLLECTED = 0xA2A,
ASSET_A6F_TEXT_CHARMER_MEET = 0xA6F, ASSET_A6F_DIALOG_CHARMER_MEET = 0xA6F,
ASSET_A70_TEXT_CHARMER_HELPED, ASSET_A70_DIALOG_CHARMER_HELPED,
ASSET_A71_TEXT_TRUNKER_MEET, ASSET_A71_DIALOG_TRUNKER_MEET,
ASSET_A72_TEXT_TRUNKER_HELPED, ASSET_A72_DIALOG_TRUNKER_HELPED,
ASSET_A73_TEXT_GOBI_MEET, ASSET_A73_DIALOG_GOBI_MEET,
ASSET_A74_TEXT_GOBI_HELPED, ASSET_A74_DIALOG_GOBI_HELPED,
ASSET_A75_TEXT_GOBI2_MEET, ASSET_A75_DIALOG_GOBI2_MEET,
ASSET_A76_TEXT_GOBI2_DONE, ASSET_A76_DIALOG_GOBI2_DONE,
ASSET_A77_TEXT_GOBI3_DONE, ASSET_A77_DIALOG_GOBI3_DONE,
ASSET_A78_TEXT_GRABBA_MEET, ASSET_A78_DIALOG_GRABBA_MEET,
ASSET_A79_TEXT_GRABBA_DEFEAT, ASSET_A79_DIALOG_GRABBA_DEFEAT,
ASSET_A7A_TEXT_GRABBA_TOO_FAST, ASSET_A7A_DIALOG_GRABBA_TOO_FAST,
ASSET_A7B_TEXT_JINXY_MEET, ASSET_A7B_DIALOG_JINXY_MEET,
ASSET_A7C_TEXT_JINXY_ONE_EGG, ASSET_A7C_DIALOG_JINXY_ONE_EGG,
ASSET_A7D_TEXT_JINXY_HELPED, ASSET_A7D_DIALOG_JINXY_HELPED,
ASSET_A7E_TEXT_SAND_EELS_MEET, ASSET_A7E_DIALOG_SAND_EELS_MEET,
ASSET_A7F_TEXT_ANICIENT_ONES_MEET, ASSET_A7F_DIALOG_ANICIENT_ONES_MEET,
ASSET_A80_TEXT_ANICIENT_ONES_DONE, ASSET_A80_DIALOG_ANICIENT_ONES_DONE,
ASSET_A81_TEXT_SANDYBUTT_ENTER, ASSET_A81_DIALOG_SANDYBUTT_ENTER,
ASSET_A82_TEXT_SANDYBUTT_START_MAZE, ASSET_A82_DIALOG_SANDYBUTT_START_MAZE,
ASSET_A83_TEXT_SANDYBUTT_DONE, ASSET_A83_DIALOG_SANDYBUTT_DONE,
ASSET_A84_DIALOG_TURBOTRAINERS_LEARN, ASSET_A84_DIALOG_TURBOTRAINERS_LEARN,
ASSET_A85_DIALOG_TURBOTRAINERS_REFRESHER, ASSET_A85_DIALOG_TURBOTRAINERS_REFRESHER,
ASSET_AD3_TEXT_UNKNOWN = 0xad3, ASSET_AD3_DIALOG_UNKNOWN = 0xad3,
ASSET_AD4_TEXT_UNKNOWN, ASSET_AD4_DIALOG_UNKNOWN,
ASSET_AD5_TEXT_UNKNOWN, ASSET_AD5_DIALOG_UNKNOWN,
ASSET_AD6_TEXT_UNKNOWN, ASSET_AD6_DIALOG_UNKNOWN,
ASSET_ADA_TEXT_UNKNOWN = 0xada, ASSET_ADA_DIALOG_UNKNOWN = 0xada,
ASSET_ADB_TEXT_UNKNOWN, ASSET_ADB_DIALOG_UNKNOWN,
ASSET_ADC_DIALOG_UNKNOWN, ASSET_ADC_DIALOG_UNKNOWN,
ASSET_ADD_TEXT_UNKNOWN, ASSET_ADD_DIALOG_UNKNOWN,
ASSET_ADE_TEXT_LOGGO_AS_BEAR, ASSET_ADE_DIALOG_LOGGO_AS_BEAR,
ASSET_ADF_TEXT_ENTER_LOGGO, ASSET_ADF_DIALOG_ENTER_LOGGO,
ASSET_AE0_TEXT_EXIT_LOGGO, ASSET_AE0_DIALOG_EXIT_LOGGO,
ASSET_B37_TEXT_CONGA_SAFE_UP_HERE = 0xb37, ASSET_B37_DIALOG_CONGA_SAFE_UP_HERE = 0xb37,
ASSET_B38_TEXT_CONGA_DEFEAT, ASSET_B38_DIALOG_CONGA_DEFEAT,
ASSET_B39_TEXT_CONGA_HIT_BY_EGG, ASSET_B39_DIALOG_CONGA_HIT_BY_EGG,
ASSET_B3A_TEXT_CONGA_HITS_PLAYER, ASSET_B3A_DIALOG_CONGA_HITS_PLAYER,
ASSET_B3B_TEXT_CONGA_ORANGE_PAD_JIGGY, ASSET_B3B_DIALOG_CONGA_ORANGE_PAD_JIGGY,
ASSET_B3C_TEXT_CONGA_MEET, ASSET_B3C_DIALOG_CONGA_MEET,
ASSET_B3E_TEXT_CONGA_MEET_AS_TERMITE = VER_SELECT(0xb3e, 0x95c, 0, 0), ASSET_B3E_DIALOG_CONGA_MEET_AS_TERMITE = VER_SELECT(0xb3e, 0x95c, 0, 0),
ASSET_B3F_DIALOG_CHIMPY_MEET, ASSET_B3F_DIALOG_CHIMPY_MEET,
ASSET_B40_DIALOG_CHIMPY_COMPLETE, ASSET_B40_DIALOG_CHIMPY_COMPLETE,
ASSET_B41_DIALOG_TERMITE_COOL_SHORTS, ASSET_B41_DIALOG_TERMITE_COOL_SHORTS,
ASSET_B42_DIALOG_TERMITE_COOL_BACKPACK, ASSET_B42_DIALOG_TERMITE_COOL_BACKPACK,
ASSET_B43_DIALOG_TERMITE_MEET_AS_BEAR, ASSET_B43_DIALOG_TERMITE_MEET_AS_BEAR,
ASSET_B44_TEXT_JUJU_MEET, ASSET_B44_DIALOG_JUJU_MEET,
ASSET_B45_TEXT_JIGGY_COLLECT_10, ASSET_B45_DIALOG_JIGGY_COLLECT_10,
ASSET_B47_DIALOG_EGGS_LEARN = 0xb47, ASSET_B47_DIALOG_EGGS_LEARN = 0xb47,
ASSET_B48_DIALOG_BEAKBUSTER_LEARN, ASSET_B48_DIALOG_BEAKBUSTER_LEARN,
@@ -4277,34 +4286,34 @@ enum asset_e
ASSET_B4A_DIALOG_TALON_TROT_REFRESHER, ASSET_B4A_DIALOG_TALON_TROT_REFRESHER,
ASSET_B4B_DIALOG_EGGS_REFRESHER, ASSET_B4B_DIALOG_EGGS_REFRESHER,
ASSET_B4C_DIALOG_BEAKBUSTER_REFRESHER, ASSET_B4C_DIALOG_BEAKBUSTER_REFRESHER,
ASSET_B4D_TEXT_UNKNOWN, ASSET_B4D_DIALOG_UNKNOWN,
ASSET_B4E_TEXT_BOTTLES_ALL_MM_MOVES_LEARNED = 0xB4E, ASSET_B4E_DIALOG_BOTTLES_ALL_MM_MOVES_LEARNED = 0xB4E,
ASSET_B51_TEXT_BOTTLES_HOW_TO_EXIT_LEVEL = 0xb51, ASSET_B51_DIALOG_BOTTLES_HOW_TO_EXIT_LEVEL = 0xb51,
ASSET_B9F_TEXT_UNKNOWN = 0xb9f, ASSET_B9F_DIALOG_UNKNOWN = 0xb9f,
ASSET_BFF_TEXT_UNKNOWN = 0xbff, ASSET_BFF_DIALOG_UNKNOWN = 0xbff,
ASSET_C01_TEXT_UNKNOWN = 0xc01, ASSET_C01_DIALOG_UNKNOWN = 0xc01,
ASSET_C02_TEXT_UNKNOWN, ASSET_C02_DIALOG_UNKNOWN,
ASSET_C05_TEXT_UNKNOWN = 0xc05, ASSET_C05_DIALOG_UNKNOWN = 0xc05,
ASSET_C08_TEXT_UNKNOWN = 0xc08, ASSET_C08_DIALOG_UNKNOWN = 0xc08,
ASSET_C09_TEXT_UNKNOWN, ASSET_C09_DIALOG_UNKNOWN,
ASSET_C0A_TEXT_UNKNOWN, ASSET_C0A_DIALOG_UNKNOWN,
ASSET_C15_TEXT_TWINKLIE_MINIGAME_LOST = 0xc15, ASSET_C15_DIALOG_TWINKLIE_MINIGAME_LOST = 0xc15,
ASSET_C17_TEXT_UNKNOWN = 0xC17, ASSET_C17_DIALOG_UNKNOWN = 0xC17,
ASSET_C18_TEXT_UNKNOWN, ASSET_C18_DIALOG_UNKNOWN,
ASSET_C19_TEXT_UNKNOWN, ASSET_C19_DIALOG_UNKNOWN,
ASSET_C1A_TEXT_UNKNOWN, ASSET_C1A_DIALOG_UNKNOWN,
ASSET_C1E_TEXT_UNKNOWN = 0xc1e, ASSET_C1E_DIALOG_UNKNOWN = 0xc1e,
ASSET_C1F_TEXT_UNKNOWN, ASSET_C1F_DIALOG_UNKNOWN,
ASSET_C20_DIALOG_PRESENT_COLLECTIBLE_MEET_BLUE = 0xC20, ASSET_C20_DIALOG_PRESENT_COLLECTIBLE_MEET_BLUE = 0xC20,
ASSET_C21_DIALOG_PRESENT_COLLECTIBLE_MEET_GREEN, ASSET_C21_DIALOG_PRESENT_COLLECTIBLE_MEET_GREEN,
@@ -4312,68 +4321,68 @@ enum asset_e
ASSET_C23_DIALOG_BEAKBOMB_LEARN, ASSET_C23_DIALOG_BEAKBOMB_LEARN,
ASSET_C24_DIALOG_BEAKBOMB_REFRESHER, ASSET_C24_DIALOG_BEAKBOMB_REFRESHER,
ASSET_C26_TEXT_UNKNOWN = 0xc26, ASSET_C26_DIALOG_UNKNOWN = 0xc26,
ASSET_C27_TEXT_UNKNOWN, ASSET_C27_DIALOG_UNKNOWN,
ASSET_C2A_TEXT_BOTTLES_ALL_FP_GV_MOVES_LEARNED = 0xC2A, ASSET_C2A_DIALOG_BOTTLES_ALL_FP_GV_MOVES_LEARNED = 0xC2A,
ASSET_C2B_TEXT_UNKNOWN, ASSET_C2B_DIALOG_UNKNOWN,
ASSET_C63_TEXT_MR_VILE_INTRO = 0xC63, ASSET_C63_DIALOG_MR_VILE_INTRO = 0xC63,
ASSET_C64_TEXT_MR_VILE_ROUND_1_START, ASSET_C64_DIALOG_MR_VILE_ROUND_1_START,
ASSET_C65_TEXT_MR_VILE_PLAYER_DECLINES, ASSET_C65_DIALOG_MR_VILE_PLAYER_DECLINES,
ASSET_C66_TEXT_MR_VILE_WINS_ROUND_1, ASSET_C66_DIALOG_MR_VILE_WINS_ROUND_1,
ASSET_C67_TEXT_MR_VILE_ROUND_2_START, ASSET_C67_DIALOG_MR_VILE_ROUND_2_START,
ASSET_C68_TEXT_MR_VILE_WINS_ROUND_2, ASSET_C68_DIALOG_MR_VILE_WINS_ROUND_2,
ASSET_C69_TEXT_MR_VILE_ROUND_3_START, ASSET_C69_DIALOG_MR_VILE_ROUND_3_START,
ASSET_C6A_TEXT_MR_VILE_WINS_ROUND_3, ASSET_C6A_DIALOG_MR_VILE_WINS_ROUND_3,
ASSET_C6B_TEXT_MR_VILE_PLAYER_WINS, ASSET_C6B_DIALOG_MR_VILE_PLAYER_WINS,
ASSET_C6C_TEXT_MR_VILE_TRY_AGAIN, ASSET_C6C_DIALOG_MR_VILE_TRY_AGAIN,
ASSET_C6D_TEXT_MR_VILE_LOSE_ROUND_1_REMATCH, ASSET_C6D_DIALOG_MR_VILE_LOSE_ROUND_1_REMATCH,
ASSET_C6E_TEXT_MR_VILE_LOSE_ROUND_2_REMATCH, ASSET_C6E_DIALOG_MR_VILE_LOSE_ROUND_2_REMATCH,
ASSET_C6F_TEXT_MR_VILE_LOSE_ROUND_3_REMATCH, ASSET_C6F_DIALOG_MR_VILE_LOSE_ROUND_3_REMATCH,
ASSET_C70_TEXT_MR_VILE_WIN_ROUND_2_REMATCH, ASSET_C70_DIALOG_MR_VILE_WIN_ROUND_2_REMATCH,
ASSET_C71_TEXT_MR_VILE_WIN_ROUND_3_REMATCH, ASSET_C71_DIALOG_MR_VILE_WIN_ROUND_3_REMATCH,
ASSET_C72_TEXT_UNKNOWN, ASSET_C72_DIALOG_UNKNOWN,
ASSET_C74_TEXT_UNKNOWN = 0xc74, ASSET_C74_DIALOG_UNKNOWN = 0xc74,
ASSET_C76_TEXT_UNKNOWN = 0xc76, ASSET_C76_DIALOG_UNKNOWN = 0xc76,
text_flibbits_meet = 0xc81, text_flibbits_meet = 0xc81,
text_flibbits_defeat = 0xc82, text_flibbits_defeat = 0xc82,
text_flibbits_return = 0xc83, text_flibbits_return = 0xc83,
ASSET_C86_TEXT_UNKNOWN = 0xc86, ASSET_C86_DIALOG_UNKNOWN = 0xc86,
ASSET_C88_DIALOG_LONGLEG_LEARN = 0xC88, ASSET_C88_DIALOG_LONGLEG_LEARN = 0xC88,
ASSET_C89_DIALOG_LONGLEG_REFRESHER, ASSET_C89_DIALOG_LONGLEG_REFRESHER,
ASSET_C8A_TEXT_BOTTLES_ALL_BGS_MOVES_LEARNED, ASSET_C8A_DIALOG_BOTTLES_ALL_BGS_MOVES_LEARNED,
ASSET_C8D_TEXT_MR_VILE_EXTRA_CHALLENGE_INTRO = 0xC8D, ASSET_C8D_DIALOG_MR_VILE_EXTRA_CHALLENGE_INTRO = 0xC8D,
ASSET_C8E_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_1, ASSET_C8E_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_1,
ASSET_C8F_TEXT_MR_VILE_PLAYER_DECLINES_EXTRA_CHALLENGE, ASSET_C8F_DIALOG_MR_VILE_PLAYER_DECLINES_EXTRA_CHALLENGE,
ASSET_C90_TEXT_MR_VILE_EXTRA_CHALLENGE_REMATCH_1, ASSET_C90_DIALOG_MR_VILE_EXTRA_CHALLENGE_REMATCH_1,
ASSET_C91_TEXT_MR_VILE_EXTRA_CHALLENGE_REMATCH_2, ASSET_C91_DIALOG_MR_VILE_EXTRA_CHALLENGE_REMATCH_2,
ASSET_C92_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_2, ASSET_C92_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_2,
ASSET_C93_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_3, ASSET_C93_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_3,
ASSET_C94_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_4, ASSET_C94_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_4,
ASSET_C95_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_1, ASSET_C95_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_1,
ASSET_C96_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_2, ASSET_C96_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_2,
ASSET_C97_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_3, ASSET_C97_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_3,
ASSET_C98_TEXT_MR_VILE_GIVES_PRIZE, ASSET_C98_DIALOG_MR_VILE_GIVES_PRIZE,
ASSET_CC7_TEXT_UNKNOWN = 0xcc7, ASSET_CC7_DIALOG_UNKNOWN = 0xcc7,
ASSET_D2B_TEXT_UNKNOWN = 0xd2b, ASSET_D2B_DIALOG_UNKNOWN = 0xd2b,
ASSET_D32_DIALOG_MUTANT_CRAB_MEET = 0xD32, ASSET_D32_DIALOG_MUTANT_CRAB_MEET = 0xD32,
ASSET_D33_DIALOG_MUTANT_CRAB_DEFEAT, ASSET_D33_DIALOG_MUTANT_CRAB_DEFEAT,
ASSET_D34_TEXT_GLOOP_MEET, ASSET_D34_DIALOG_GLOOP_MEET,
ASSET_D35_DIALOG_WONDERWING_LEARN, ASSET_D35_DIALOG_WONDERWING_LEARN,
ASSET_D36_DIALOG_WONDERWING_REFRESHER, ASSET_D36_DIALOG_WONDERWING_REFRESHER,
ASSET_D37_TEXT_BOTTLES_ALL_CC_MOVES_LEARNED, ASSET_D37_DIALOG_BOTTLES_ALL_CC_MOVES_LEARNED,
ASSET_D38_TEXT_BOTTLES_ALL_MOVES_LEARNED, ASSET_D38_DIALOG_BOTTLES_ALL_MOVES_LEARNED,
ASSET_D39_TEXT_BOTTLES_REFILL_HEALTH, ASSET_D39_DIALOG_BOTTLES_REFILL_HEALTH,
ASSET_D8F_DIALOG_MUMBO_MEET = 0xD8F, ASSET_D8F_DIALOG_MUMBO_MEET = 0xD8F,
ASSET_D90_DIALOG_MUMBO_MAGIC_PAID_FOR, ASSET_D90_DIALOG_MUMBO_MAGIC_PAID_FOR,
@@ -4390,7 +4399,7 @@ enum asset_e
ASSET_D9B_DIALOG_JINJO_MEET_ORANGE, ASSET_D9B_DIALOG_JINJO_MEET_ORANGE,
ASSET_DA5_DIALOG_WADINGBOOTS_MEET = 0xDA5, ASSET_DA5_DIALOG_WADINGBOOTS_MEET = 0xDA5,
ASSET_DA6_TEXT_BEEHIVE_WITH_BEES, ASSET_DA6_DIALOG_BEEHIVE_WITH_BEES,
ASSET_DA7_DIALOG_MUMBO_CCW_SUMMER, ASSET_DA7_DIALOG_MUMBO_CCW_SUMMER,
ASSET_DA8_DIALOG_MUMBO_CCW_AUTUMN, ASSET_DA8_DIALOG_MUMBO_CCW_AUTUMN,
@@ -4407,59 +4416,59 @@ enum asset_e
ASSET_DB4_DIALOG_SNS_EGG_2_TEXT, ASSET_DB4_DIALOG_SNS_EGG_2_TEXT,
ASSET_DB5_DIALOG_ICE_KEY_TEXT, ASSET_DB5_DIALOG_ICE_KEY_TEXT,
ASSET_DF3_TEXT_BOTTLES_INTRODUCTION = 0xDF3, ASSET_DF3_DIALOG_BOTTLES_INTRODUCTION = 0xDF3,
ASSET_DF4_TEXT_BOTTLES_CAMERA_CONTROL_LEARN, ASSET_DF4_DIALOG_BOTTLES_CAMERA_CONTROL_LEARN,
ASSET_DF5_TEXT_BOTTLES_CAMERA_CONTROL_REFRESHER, ASSET_DF5_DIALOG_BOTTLES_CAMERA_CONTROL_REFRESHER,
ASSET_DF6_TEXT_BOTTLES_HIGH_JUMP_LEARN, ASSET_DF6_DIALOG_BOTTLES_HIGH_JUMP_LEARN,
ASSET_DF7_TEXT_BOTTLES_FEATHERY_FLAP_LEARN, ASSET_DF7_DIALOG_BOTTLES_FEATHERY_FLAP_LEARN,
ASSET_DF8_TEXT_BOTTLES_FLAP_FLIP_LEARN, ASSET_DF8_DIALOG_BOTTLES_FLAP_FLIP_LEARN,
ASSET_DF9_TEXT_BOTTLES_UNKNOWN, ASSET_DF9_DIALOG_BOTTLES_UNKNOWN,
ASSET_DFA_TEXT_BOTTLES_JUMP_REFRESHER, ASSET_DFA_DIALOG_BOTTLES_JUMP_REFRESHER,
ASSET_DFB_TEXT_BOTTLES_DIVE_LEARN, ASSET_DFB_DIALOG_BOTTLES_DIVE_LEARN,
ASSET_DFC_TEXT_UNKNOWN, ASSET_DFC_DIALOG_UNKNOWN,
ASSET_DFD_TEXT_BOTTLES_SWIM_LEARN, ASSET_DFD_DIALOG_BOTTLES_SWIM_LEARN,
ASSET_DFE_TEXT_BOTTLES_DIVE_REFRESHER, ASSET_DFE_DIALOG_BOTTLES_DIVE_REFRESHER,
ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN, ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN,
ASSET_E00_TEXT_BOTTLES_ATTACK_REFRESHER = 0xE00, ASSET_E00_DIALOG_BOTTLES_ATTACK_REFRESHER = 0xE00,
ASSET_E01_TEXT_BOTTLES_CLIMB_LEARN, ASSET_E01_DIALOG_BOTTLES_CLIMB_LEARN,
ASSET_E02_TEXT_UNKNOWN, ASSET_E02_DIALOG_UNKNOWN,
ASSET_E03_TEXT_BOTTLES_CLIMB_REFRESHER, ASSET_E03_DIALOG_BOTTLES_CLIMB_REFRESHER,
ASSET_E04_TEXT_BOTTLES_BEAK_BARGE_LEARN, ASSET_E04_DIALOG_BOTTLES_BEAK_BARGE_LEARN,
ASSET_E05_TEXT_UNKNOWN, ASSET_E05_DIALOG_UNKNOWN,
ASSET_E06_TEXT_BOTTLES_BEAK_BARGE_REFRESHER, ASSET_E06_DIALOG_BOTTLES_BEAK_BARGE_REFRESHER,
ASSET_E07_TEXT_BOTTLES_UNKNOWN, ASSET_E07_DIALOG_BOTTLES_UNKNOWN,
ASSET_E08_TEXT_BOTTLES_FIND_ANOTHER_MOLEHILL, ASSET_E08_DIALOG_BOTTLES_FIND_ANOTHER_MOLEHILL,
ASSET_E09_TEXT_BOTTLES_SKIPPED_TUTORIAL, ASSET_E09_DIALOG_BOTTLES_SKIPPED_TUTORIAL,
ASSET_E0A_TEXT_BOTTLES_REFUSE_HELP_1, ASSET_E0A_DIALOG_BOTTLES_REFUSE_HELP_1,
ASSET_E0B_TEXT_BOTTLES_REFUSE_HELP_2, ASSET_E0B_DIALOG_BOTTLES_REFUSE_HELP_2,
ASSET_E0C_TEXT_BOTTLES_REFUSE_HELP_3, ASSET_E0C_DIALOG_BOTTLES_REFUSE_HELP_3,
ASSET_E0D_TEXT_BOTTLES_REFUSE_HELP_4, ASSET_E0D_DIALOG_BOTTLES_REFUSE_HELP_4,
ASSET_E0E_TEXT_BOTTLES_REFUSE_HELP_5, ASSET_E0E_DIALOG_BOTTLES_REFUSE_HELP_5,
ASSET_E0F_TEXT_BOTTLES_STOP_WASTING_TIME_BEFORE_FURNACE_FUN, // Skip tutorial, bother bottles, gives help, retalk to bottles ASSET_E0F_DIALOG_BOTTLES_STOP_WASTING_TIME_BEFORE_FURNACE_FUN, // Skip tutorial, bother bottles, gives help, retalk to bottles
ASSET_E10_TEXT_BOTTLES_BRIDGE_BROKEN, ASSET_E10_DIALOG_BOTTLES_BRIDGE_BROKEN,
ASSET_E11_TEXT_BOTTLES_BRIDGE_STILL_BROKEN, ASSET_E11_DIALOG_BOTTLES_BRIDGE_STILL_BROKEN,
ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES, ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES,
ASSET_E14_TEXT_UNKNOWN = 0xE14, ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL = 0xE14,
ASSET_E15_TEXT_UNKNOWN, ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL,
ASSET_E16_TEXT_UNKNOWN, ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL,
ASSET_E17_TEXT_UNKNOWN, ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP,
ASSET_E18_TEXT_UNKNOWN, ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL,
ASSET_E19_TEXT_UNKNOWN, ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES,
ASSET_E1A_TEXT_BOTTLES_UNKNOWN, ASSET_E1A_DIALOG_BOTTLES_UNKNOWN,
ASSET_E1B_TEXT_BOTTLES_UNKNOWN, ASSET_E1B_DIALOG_BOTTLES_UNKNOWN,
ASSET_E1C_TEXT_BOTTLES_UNKNOWN, ASSET_E1C_DIALOG_BOTTLES_UNKNOWN,
ASSET_E1D_TEXT_BOTTLES_TUTORIAL_OFFER_WAIT, ASSET_E1D_DIALOG_BOTTLES_TUTORIAL_OFFER_WAIT,
ASSET_E1F_TEXT_BOTTLES_TUTORIAL_OFFER = VER_SELECT(0xE1F, 0xa61, 0, 0), ASSET_E1F_DIALOG_BOTTLES_TUTORIAL_OFFER = VER_SELECT(0xE1F, 0xa61, 0, 0),
ASSET_E20_DIALOG_BOTTLES_BONUS_NOT_READY, ASSET_E20_DIALOG_BOTTLES_BONUS_NOT_READY,
ASSET_E21_DIALOG_BOTTLES_BONUS_DISCOVERED, ASSET_E21_DIALOG_BOTTLES_BONUS_DISCOVERED,
ASSET_E24_TEXT_UNKNOWN = 0xE24, ASSET_E24_DIALOG_UNKNOWN = 0xE24,
ASSET_E35_DIALOG_BOTTLES_BONUS_REMINDER = VER_SELECT(0xE35, 0xa77, 0, 0), ASSET_E35_DIALOG_BOTTLES_BONUS_REMINDER = VER_SELECT(0xE35, 0xa77, 0, 0),
ASSET_E37_TEXT_BOTTLES_STOP_WASTING_TIME_AFTER_FURNACE_FUN = 0xE37, // Talk to bottles after beating furnace fun ASSET_E37_DIALOG_BOTTLES_STOP_WASTING_TIME_AFTER_FURNACE_FUN = 0xE37, // Talk to bottles after beating furnace fun
ASSET_E38_DIALOG_CHEATING_ERASE_SAVE_CONFIRMATION, ASSET_E38_DIALOG_CHEATING_ERASE_SAVE_CONFIRMATION,
ASSET_E57_DIALOG_FIRST_JIGGY = VER_SELECT(0xF57, 0xabd, 0, 0), ASSET_E57_DIALOG_FIRST_JIGGY = VER_SELECT(0xF57, 0xabd, 0, 0),
@@ -4474,60 +4483,60 @@ enum asset_e
ASSET_F66_DIALOG_UNKNOWN, ASSET_F66_DIALOG_UNKNOWN,
ASSET_F67_DIALOG_UNKNOWN, ASSET_F67_DIALOG_UNKNOWN,
ASSET_F79_TEXT_UNKNOWN = 0xf79, ASSET_F79_DIALOG_UNKNOWN = 0xf79,
ASSET_F7A_TEXT_UNKNOWN, ASSET_F7A_DIALOG_UNKNOWN,
ASSET_FAD_TEXT_UNKNOWN = 0xfad, ASSET_FAD_DIALOG_UNKNOWN = 0xfad,
ASSET_FBE_DIALOG_CHEATING_ERASE_SAVE_WARNING = 0xfbe, ASSET_FBE_DIALOG_CHEATING_ERASE_SAVE_WARNING = 0xFBE,
ASSET_FBF_DIALOG_ERASED_SAVE, ASSET_FBF_DIALOG_ERASED_SAVE,
ASSET_10A1_DIALOG_BRENTILDA_MEET = 0x10A1, ASSET_10A1_DIALOG_BRENTILDA_MEET = 0x10A1,
ASSET_10A2_TEXT_UNKNOWN, ASSET_10A2_DIALOG_UNKNOWN,
ASSET_10E7_TEXT_UNKNOWN = 0x10E7, ASSET_10E7_DIALOG_UNKNOWN = 0x10E7,
ASSET_10ED_TEXT_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_1 = 0x10ED, ASSET_10ED_DIALOG_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_1 = 0x10ED,
ASSET_10EE_TEXT_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_2, ASSET_10EE_DIALOG_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_2,
ASSET_10EF_TEXT_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_3, ASSET_10EF_DIALOG_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_3,
ASSET_10F0_TEXT_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_4, ASSET_10F0_DIALOG_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_4,
ASSET_10F1_TEXT_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_5, ASSET_10F1_DIALOG_FINALBOSS_PHASE_1_HIT_PLAYER_OPTION_5,
ASSET_10F2_TEXT_FINALBOSS_PHASE_1_OPTION_1 = 0x10F2, ASSET_10F2_DIALOG_FINALBOSS_PHASE_1_OPTION_1 = 0x10F2,
ASSET_10F3_TEXT_FINALBOSS_PHASE_1_OPTION_2, ASSET_10F3_DIALOG_FINALBOSS_PHASE_1_OPTION_2,
ASSET_10F4_TEXT_FINALBOSS_PHASE_1_OPTION_3, ASSET_10F4_DIALOG_FINALBOSS_PHASE_1_OPTION_3,
ASSET_10F5_TEXT_FINALBOSS_PHASE_1_OPTION_4, ASSET_10F5_DIALOG_FINALBOSS_PHASE_1_OPTION_4,
ASSET_10F6_TEXT_FINALBOSS_PHASE_1_OPTION_5, ASSET_10F6_DIALOG_FINALBOSS_PHASE_1_OPTION_5,
ASSET_110B_TEXT_FINALBOSS_PHASE_2_OPTION_1 = 0x110B, ASSET_110B_DIALOG_FINALBOSS_PHASE_2_OPTION_1 = 0x110B,
ASSET_110C_TEXT_FINALBOSS_PHASE_2_OPTION_2, ASSET_110C_DIALOG_FINALBOSS_PHASE_2_OPTION_2,
ASSET_110D_TEXT_FINALBOSS_PHASE_2_OPTION_3, ASSET_110D_DIALOG_FINALBOSS_PHASE_2_OPTION_3,
ASSET_110E_TEXT_FINALBOSS_PHASE_2_OPTION_4, ASSET_110E_DIALOG_FINALBOSS_PHASE_2_OPTION_4,
ASSET_110F_TEXT_FINALBOSS_PHASE_2_OPTION_5, ASSET_110F_DIALOG_FINALBOSS_PHASE_2_OPTION_5,
ASSET_111D_TEXT_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_1 = 0x111D, ASSET_111D_DIALOG_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_1 = 0x111D,
ASSET_111E_TEXT_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_2, ASSET_111E_DIALOG_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_2,
ASSET_111F_TEXT_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_3, ASSET_111F_DIALOG_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_3,
ASSET_1120_TEXT_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_4, ASSET_1120_DIALOG_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_4,
ASSET_1121_TEXT_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_5, ASSET_1121_DIALOG_FINALBOSS_PHASE_2_HIT_PLAYER_OPTION_5,
ASSET_1122_TEXT_FINALBOSS_PHASE_3_OPTION_1 = 0x1122, ASSET_1122_DIALOG_FINALBOSS_PHASE_3_OPTION_1 = 0x1122,
ASSET_1123_TEXT_FINALBOSS_PHASE_3_OPTION_2, ASSET_1123_DIALOG_FINALBOSS_PHASE_3_OPTION_2,
ASSET_1124_TEXT_FINALBOSS_PHASE_3_OPTION_3, ASSET_1124_DIALOG_FINALBOSS_PHASE_3_OPTION_3,
ASSET_1125_TEXT_FINALBOSS_PHASE_3_OPTION_4, ASSET_1125_DIALOG_FINALBOSS_PHASE_3_OPTION_4,
ASSET_1126_TEXT_FINALBOSS_PHASE_3_OPTION_5, ASSET_1126_DIALOG_FINALBOSS_PHASE_3_OPTION_5,
ASSET_113B_TEXT_FINALBOSS_PHASE_4_OPTION_1 = 0x113B, ASSET_113B_DIALOG_FINALBOSS_PHASE_4_OPTION_1 = 0x113B,
ASSET_113C_TEXT_FINALBOSS_PHASE_4_OPTION_2, ASSET_113C_DIALOG_FINALBOSS_PHASE_4_OPTION_2,
ASSET_113D_TEXT_FINALBOSS_PHASE_4_OPTION_3, ASSET_113D_DIALOG_FINALBOSS_PHASE_4_OPTION_3,
ASSET_113E_TEXT_FINALBOSS_PHASE_4_OPTION_4, ASSET_113E_DIALOG_FINALBOSS_PHASE_4_OPTION_4,
ASSET_113F_TEXT_FINALBOSS_PHASE_4_OPTION_5, ASSET_113F_DIALOG_FINALBOSS_PHASE_4_OPTION_5,
ASSET_1154_TEXT_FINALBOSS_PHASE_5_OPTION_1 = 0x1154, ASSET_1154_DIALOG_FINALBOSS_PHASE_5_OPTION_1 = 0x1154,
ASSET_1155_TEXT_FINALBOSS_PHASE_5_OPTION_2, ASSET_1155_DIALOG_FINALBOSS_PHASE_5_OPTION_2,
ASSET_1156_TEXT_FINALBOSS_PHASE_5_OPTION_3, ASSET_1156_DIALOG_FINALBOSS_PHASE_5_OPTION_3,
ASSET_1157_TEXT_FINALBOSS_PHASE_5_OPTION_4, ASSET_1157_DIALOG_FINALBOSS_PHASE_5_OPTION_4,
ASSET_1158_TEXT_FINALBOSS_PHASE_5_OPTION_5, ASSET_1158_DIALOG_FINALBOSS_PHASE_5_OPTION_5,
ASSET_1213_FF_QUIZ_QUESTION = 0x1213, ASSET_1213_FF_QUIZ_QUESTION = 0x1213,
ASSET_1214_FF_QUIZ_QUESTION, ASSET_1214_FF_QUIZ_QUESTION,
@@ -5088,11 +5097,10 @@ enum marker_e{
MARKER_124_BOGGY_1 = 0x124, MARKER_124_BOGGY_1 = 0x124,
MARKER_126_UNKNOWN = 0x126,
MARKER_127_BAT = 0x127, MARKER_127_BAT = 0x127,
MARKER_128_COLLYWOBBLE_A, MARKER_128_COLLYWOBBLE_THE_CAULIFLOWER_A,
MARKER_129_BAWL_A, MARKER_129_BAWL_THE_ONION_A,
MARKER_12A_TOPPER_A, MARKER_12A_TOPPER_THE_CARROT_A,
MARKER_12B_ATTACK_TUTORIAL, MARKER_12B_ATTACK_TUTORIAL,
MARKER_134_UNKNOWN = 0x134, MARKER_134_UNKNOWN = 0x134,
@@ -5166,14 +5174,13 @@ enum marker_e{
MARKER_1E5_GOLD_FEATHER_COLLECTIBLE = 0x1E5, MARKER_1E5_GOLD_FEATHER_COLLECTIBLE = 0x1E5,
MARKER_1E6_TOPPER_B, MARKER_1E6_TOPPER_THE_CARROT_B,
MARKER_1E7_BAWL_B, MARKER_1E7_BAWL_THE_ONION_B,
MARKER_1E8_COLLYWOBBLE_B, MARKER_1E8_COLLYWOBBLE_THE_CAULIFLOWER_B,
MARKER_1E9_MUMBO_COST_SIGN, MARKER_1E9_MUMBO_COST_SIGN,
MARKER_1EA_GRUNTLING_RED, MARKER_1EA_GRUNTLING_RED,
MARKER_1ED_JUMP_TUTORIAL = 0x1ED, MARKER_1ED_JUMP_TUTORIAL = 0x1ED,
MARKER_1F1_GRUNTLING_BLACK = 0x1F1, MARKER_1F1_GRUNTLING_BLACK = 0x1F1,
MARKER_1F4_TOOTS = 0x1F4, MARKER_1F4_TOOTS = 0x1F4,
@@ -5378,5 +5385,4 @@ enum vegetable_e {
VEGETABLE_3_COLLY_WOBBLE VEGETABLE_3_COLLY_WOBBLE
}; };
#endif #endif

View File

@@ -14,8 +14,6 @@
#include "core2/core2.h" #include "core2/core2.h"
#include "math.h" // ToDo: sort out actual dependencies #include "math.h" // ToDo: sort out actual dependencies
#include "ml.h"
#include "ml/mtx.h"
#include "bs_funcs.h" #include "bs_funcs.h"
#include "bsint.h" #include "bsint.h"
@@ -45,20 +43,8 @@ void * malloc(s32 size);
void free(void*); void free(void*);
void *realloc(void* ptr, s32 size); void *realloc(void* ptr, s32 size);
f32 ml_map_f(f32 val, f32 in_min, f32 in_max, f32 out_min, f32 out_max);
float mlNormalizeAngle(float);
f32 ml_max_f(f32, f32);
f32 ml_min_f(f32, f32);
void ml_vec3f_copy(f32 dst[3], f32 src[3]);
void ml_vec3f_add(f32 dst[3], f32 src1[3], f32 src2[3]);
void ml_vec3f_scale(f32 vec[3], f32 scale);
void ml_vec3f_scale_copy(f32 dst[3], f32 src[3], f32 scale);
float gu_sqrtf(float val); float gu_sqrtf(float val);
BKSpriteFrame *spriteGetFramePtr(BKSprite *, u32);
bool baanim_isAt(f32); bool baanim_isAt(f32);
void baanim_playForDuration_once(enum asset_e anim_id, f32 duration); void baanim_playForDuration_once(enum asset_e anim_id, f32 duration);
void baanim_setEnd(f32); void baanim_setEnd(f32);
@@ -198,7 +184,7 @@ ParticleEmitter *partEmitMgr_newEmitter(u32);
void func_802BB3DC(s32, f32, f32); void func_802BB3DC(s32, f32, f32);
void __spawnQueue_add_4(GenFunction_4, s32, s32, s32, s32); void __spawnQueue_add_4(GenFunction_4, s32, s32, s32, s32);
Actor *spawnQueue_actor_f32(enum actor_e actor_id, s32 x, s32 y, s32 z); Actor *spawnQueue_actor_f32(enum actor_e actor_id, s32 x, s32 y, s32 z);
void func_8030DA44(u8); void sfxsource_freeSfxsourceByIndex(u8);
void particleEmitter_emitInVolume(ParticleEmitter *, f32[3], f32[3], s32); void particleEmitter_emitInVolume(ParticleEmitter *, f32[3], f32[3], s32);
@@ -226,22 +212,7 @@ void particleEmitter_setSpawnInterval(ParticleEmitter *, f32);
OSContPad *func_8024F3F4(void); OSContPad *func_8024F3F4(void);
OSMesgQueue *pfsManager_getFrameReplyQ(void); OSMesgQueue *pfsManager_getFrameReplyQ(void);
void ml_vec3f_clear(f32 dst[3]);
void ml_vec3f_roll_rotate_copy(f32[3], f32[3], f32);
void rumbleManager_80250D94(f32, f32, f32); void rumbleManager_80250D94(f32, f32, f32);
void func_80256E24(f32[3], f32, f32, f32, f32, f32);
void func_8025727C(f32 x1, f32 y1, f32 z1, f32 x2, f32 y2, f32 z2, f32 *o1, f32 *o2);
f32 func_80257A44(f32, f32);
f32 ml_interpolate_f(f32, f32, f32);
f32 ml_mapAbsRange_f(f32, f32, f32, f32, f32);
int func_80257F18(f32 src[3], f32 target[3], f32 *yaw);
bool func_8025801C(f32[3], f32*);
f32 mlAbsF(f32);
f32 ml_clamp_f(f32, f32, f32);
f32 ml_remainder_f(f32, f32);
void func_802589E4(f32 dst[3], f32 yaw, f32 length);
f32 mlDiffDegF(f32, f32);
void func_8025A6EC(enum comusic_e, s32); void func_8025A6EC(enum comusic_e, s32);
void comusic_playTrack(enum comusic_e); void comusic_playTrack(enum comusic_e);
@@ -450,23 +421,20 @@ void func_80352CF4(f32 *, f32 *, f32, f32);
AnimCtrl *baanim_getAnimCtrlPtr(void); AnimCtrl *baanim_getAnimCtrlPtr(void);
void player_setYPosition(f32); void player_setYPosition(f32);
NodeProp *nodeprop_findByActorIdAndActorPosition(enum actor_e arg0, Actor *arg1); NodeProp *nodeprop_findByActorIdAndActorPosition(enum actor_e actor_id, Actor *actor_ptr);
NodeProp *func_80304CAC(s32 arg0, f32 position[3]); NodeProp *nodeprop_findByActorIdAndPosition_f32(enum actor_e actor_id, f32 position[3]);
Actor *actorArray_findClosestActorFromActorId(f32 position[3], enum actor_e actor_id, s32 arg2, f32 *min_distance_ptr); Actor *actorArray_findClosestActorFromActorId(f32 position[3], enum actor_e actor_id, s32 arg2, f32 *min_distance_ptr);
Actor *subaddie_getLinkedActor(Actor *); Actor *subaddie_getLinkedActor(Actor *);
/* used in RBB */ /* used in RBB */
void ml_vec3f_pitch_rotate_copy(f32 dst[3], f32 src[3], f32 pitch);
int ml_timer_update(f32 *arg0, f32 arg1);
Actor *actor_draw(ActorMarker *, Gfx**, Mtx**, Vtx **); Actor *actor_draw(ActorMarker *, Gfx**, Mtx**, Vtx **);
Actor *func_80325340(ActorMarker *, Gfx **, Mtx **, Vtx **); Actor *func_80325340(ActorMarker *, Gfx **, Mtx **, Vtx **);
void func_8032AA58(Actor *, f32); void func_8032AA58(Actor *, f32);
void func_80324E38(f32, s32); void func_80324E38(f32, s32);
void timed_playSfx(f32, enum sfx_e, f32, s32); void timed_playSfx(f32, enum sfx_e, f32, s32);
f32 ml_distance_vec3f(f32 [3], f32 [3]);
void timed_setStaticCameraToNode(f32, s32); void timed_setStaticCameraToNode(f32, s32);
void timed_exitStaticCamera(f32); void timed_exitStaticCamera(f32 time);
int actor_animationIsAt(Actor*, f32); int actor_animationIsAt(Actor*, f32);
void rumbleManager_80250E94(f32, f32, f32, f32, f32, f32); void rumbleManager_80250E94(f32, f32, f32, f32, f32, f32);
@@ -479,10 +447,8 @@ void func_802FA060(s32, s32, s32, f32);
Actor *actorArray_findActorFromActorId(enum actor_e); Actor *actorArray_findActorFromActorId(enum actor_e);
f32 func_8038A6B8(ActorMarker *); f32 func_8038A6B8(ActorMarker *);
void *defrag_asset(void *); void *defrag_asset(void *);
void ml_interpolate_vec3f(f32 [3], f32 [3], f32 [3], f32);
void sfxsource_set_fade_distances(u8, f32, f32); void sfxsource_set_fade_distances(u8, f32, f32);
void func_8030DB04(u8, s32, f32 position[3], f32, f32); void func_8030DB04(u8, s32, f32 position[3], f32, f32);
void func_80258A4C(f32 [3], f32, f32 [3], f32 *, f32 *, f32 *);
void func_802E4078(enum map_e map, s32 exit, s32 transition); void func_802E4078(enum map_e map, s32 exit, s32 transition);
@@ -494,7 +460,6 @@ void mapSpecificFlags_set(s32, s32);
struct0 *func_8031B9D8(void); struct0 *func_8031B9D8(void);
extern int func_80259808(f32);
void actor_playAnimationOnce(Actor *); void actor_playAnimationOnce(Actor *);
void actor_loopAnimation(Actor *); void actor_loopAnimation(Actor *);
@@ -504,7 +469,6 @@ void actor_update_func_80326224(Actor *this);
void func_802F9FD0(s32, f32, f32, f32); void func_802F9FD0(s32, f32, f32, f32);
void func_80324D54(f32, enum sfx_e, f32, s32, f32 [3], f32, f32); void func_80324D54(f32, enum sfx_e, f32, s32, f32 [3], f32, f32);
void glcrc_calc_checksum(void *start, void *end, u32 *checksum);
f32 climbGetBottomY(void); f32 climbGetBottomY(void);
f32 climbGetTopY(void); f32 climbGetTopY(void);
void func_802596AC(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]); void func_802596AC(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]);

View File

@@ -1,10 +0,0 @@
#ifndef __MATH_LIBRARY_H__
#define __MATH_LIBRARY_H__
void ml_vec3f_normalize_copy(f32 arg0[3], f32 arg1[3]);
void ml_vec3f_yaw_rotate_copy(f32 arg0[3], f32 arg1[3], f32 arg2);
void ml_vec3f_diff_copy(f32 dst[3], f32 src1[3], f32 src2[3]);
void ml_vec3f_set_length_copy(f32 dst[3], f32 src[3], f32 len);
void ml_vec3f_set_length(f32 arg0[3], f32 arg2);
#endif

View File

@@ -1,35 +0,0 @@
#ifndef __ML_MTX__
#define __ML_MTX__
typedef struct {
f32 m[4][4];
} MtxF;
void mlMtxGet(MtxF *dst);
MtxF *mlMtx_get_stack_pointer(void);
void mlMtxApply(Mtx *mPtr);
void mlMtxPop(void);
void mlMtx_push_duplicate(void);
void mlMtx_push_identity(void);
void mlMtx_push_translation(f32 x, f32 y, f32 z);
void mlMtx_push_mtx(f32* mtx);
void mlMtx_push_multiplied(f32* l_mtx);
void mlMtx_push_multiplied_2(MtxF * l_mtx, MtxF * r_mtx);
void mlMtxIdent(void);
void mlMtxSet(MtxF* arg0);
void mlMtxRotPitch(f32 arg0);
void mlMtxRotYaw(f32 arg0);
void mlMtxRotRoll(f32 arg0);
void mlMtx_rotate_pitch_deg(f32 arg0);
void mlMtx_rotate_yaw_deg(f32 arg0);
void mlMtxRotatePYR(f32 pitch, f32 yaw, f32 roll);
void mlMtxScale_xyz(f32 x, f32 y, f32 z);
void mlMtxScale(f32 scale);
void mlMtx_apply_f3(f32 dst[3], f32 x, f32 y, f32 z);
void mlMtx_apply_vec3s(s16 dst[3], s16 src[3]);
void mlMtxTranslate(f32 x, f32 y, f32 z);
MtxF *func_8024DD90(void);
MtxF *func_8024DD9C(void);
#endif

View File

@@ -155,7 +155,7 @@ typedef struct actor_s{
u32 state:6; /* unk10_31*/ u32 state:6; /* unk10_31*/
u32 unk10_25:7; u32 unk10_25:7;
u32 unk10_18:6; u32 unk10_18:6;
u32 unk10_12:4; u32 unk10_12:4; // number of defeated enemies in SM attack tutorial
u32 unk10_8:1; u32 unk10_8:1;
u32 unk10_7:1; u32 unk10_7:1;
u32 unk10_6:2; u32 unk10_6:2;
@@ -186,7 +186,7 @@ typedef struct actor_s{
f32 unk4C; f32 unk4C;
/* 0x50 */ f32 yaw; //0x50 /* 0x50 */ f32 yaw; //0x50
f32 unk54; //0x54 f32 unk54; //0x54
u32 unk58_31: 15; u32 animctrl_asset_id: 15; // animation asset id (enum asset_id)
u32 stored_animctrl_index: 14; //animctrlAnimIndex; u32 stored_animctrl_index: 14; //animctrlAnimIndex;
u32 unk58_2: 1; u32 unk58_2: 1;
u32 unk58_1: 1; u32 unk58_1: 1;

View File

@@ -47,6 +47,10 @@ typedef struct freelist_s{
#define FREE_LIST(T) struct freelist_s #define FREE_LIST(T) struct freelist_s
//^defined to keep element type with sla //^defined to keep element type with sla
typedef struct {
f32 m[4][4];
} MtxF;
typedef struct bk_sprite_s{ typedef struct bk_sprite_s{
s16 frameCnt; s16 frameCnt;
s16 type; s16 type;

View File

@@ -14,9 +14,6 @@ struct Overlay {
extern struct Overlay gOverlayTable[]; extern struct Overlay gOverlayTable[];
extern s32 framebuffer_width;
extern s32 framebuffer_height;
extern f32 climbPoleBottom[3]; extern f32 climbPoleBottom[3];
extern f32 climbPoleTop[3]; extern f32 climbPoleTop[3];
#endif #endif

View File

@@ -21,7 +21,7 @@ D_803FBE00 = 0x803FBE00;
D_803FFE00 = 0x803FFE00; D_803FFE00 = 0x803FFE00;
D_803FFE10 = 0x803FFE10; D_803FFE10 = 0x803FFE10;
gOverlayTable = 0x803FFE10; gOverlayTable = 0x803FFE10;
D_803A5D00 = 0x803A5D00; /* framebuffers */ gFramebuffers = 0x803A5D00; /* framebuffers */
/* Renames for the boot segment */ /* Renames for the boot segment */
boot_D_8002D500 = D_8002D500; boot_D_8002D500 = D_8002D500;
@@ -259,9 +259,9 @@ func_802F9F80 = 0x802fa160;
func_802F9FD0 = 0x802fa1b0; func_802F9FD0 = 0x802fa1b0;
func_802FA060 = 0x802fa240; func_802FA060 = 0x802fa240;
func_802FADD4 = 0x802fafb4; func_802FADD4 = 0x802fafb4;
cubeList_findNodePropByActorId = 0x80304b6c; cubeList_findNodePropByActorIdAndPosition_s32 = 0x80304b6c;
nodeprop_findByActorIdAndActorPosition = 0x80304dd8; nodeprop_findByActorIdAndActorPosition = 0x80304dd8;
func_80304CAC = 0x80304e4c; nodeprop_findByActorIdAndPosition_f32 = 0x80304e4c;
nodeprop_getPosition_s32 = 0x80304eec; nodeprop_getPosition_s32 = 0x80304eec;
nodeprop_getPosition = 0x80304f08; nodeprop_getPosition = 0x80304f08;
_nodeProp_findPositionFromActorId = 0x80304f70; _nodeProp_findPositionFromActorId = 0x80304f70;
@@ -278,7 +278,7 @@ func_8030C704 = 0x8030c8a4;
scissorBox_setSmall = 0x8030c8b0; scissorBox_setSmall = 0x8030c8b0;
func_8030C77C = 0x8030c91c; func_8030C77C = 0x8030c91c;
sfxsource_createSfxsourceAndReturnIndex = 0x8030daac; sfxsource_createSfxsourceAndReturnIndex = 0x8030daac;
func_8030DA44 = 0x8030dbe4; sfxsource_freeSfxsourceByIndex = 0x8030dbe4;
sfxsource_setSfxId = 0x8030dc20; sfxsource_setSfxId = 0x8030dc20;
sfxsource_setSampleRate = 0x8030dc5c; sfxsource_setSampleRate = 0x8030dc5c;
sfxsource_playSfxAtVolume = 0x8030dd54; sfxsource_playSfxAtVolume = 0x8030dd54;

View File

@@ -20,7 +20,7 @@ D_803FBE00 = 0x803FBE00;
D_803FFE00 = 0x803FFE00; D_803FFE00 = 0x803FFE00;
D_803FFE10 = 0x803FFE10; D_803FFE10 = 0x803FFE10;
gOverlayTable = 0x803FFE10; gOverlayTable = 0x803FFE10;
D_803A5D00 = 0x803A5D00; /* framebuffers */ gFramebuffers = 0x803A5D00; /* framebuffers */
/* Renames for the boot segment */ /* Renames for the boot segment */
boot_D_8002D500 = D_8002D500; boot_D_8002D500 = D_8002D500;

View File

@@ -147,10 +147,10 @@ void chTiptup_setState(Actor *this, s32 arg1){
this->has_met_before = TRUE; this->has_met_before = TRUE;
if (unqPtr->unkA == 0) { if (unqPtr->unkA == 0) {
gcdialog_showText(ASSET_C72_TEXT_UNKNOWN, 0xe, this->position, this->marker, chTiptup_textEvent, 0); gcdialog_showText(ASSET_C72_DIALOG_UNKNOWN, 0xe, this->position, this->marker, chTiptup_textEvent, 0);
} }
else { else {
gcdialog_showText(ASSET_C74_TEXT_UNKNOWN, 0xf, this->position, this->marker, chTiptup_textEvent, 0); gcdialog_showText(ASSET_C74_DIALOG_UNKNOWN, 0xf, this->position, this->marker, chTiptup_textEvent, 0);
} }
} }
else { else {
@@ -235,7 +235,7 @@ void chTiptup_choirHitReaction(ActorMarker *this, s32 arg1){
thisActor = marker_getActor(this); thisActor = marker_getActor(this);
unqPtr = (ActorLocal_Tiptup *)&thisActor->local; unqPtr = (ActorLocal_Tiptup *)&thisActor->local;
if((s32)unqPtr->unk0 >= (s32) vector_size(unqPtr->unk4)){ if((s32)unqPtr->unk0 >= (s32) vector_size(unqPtr->unk4)){
if(!mapSpecificFlags_get(0) && gcdialog_showText(ASSET_C76_TEXT_UNKNOWN, 0, 0, 0, 0, 0)) if(!mapSpecificFlags_get(0) && gcdialog_showText(ASSET_C76_DIALOG_UNKNOWN, 0, 0, 0, 0, 0))
mapSpecificFlags_set(0,1); mapSpecificFlags_set(0,1);
}else{ }else{
tmp = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4, unqPtr->unk0); tmp = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4, unqPtr->unk0);
@@ -321,7 +321,7 @@ void chTiptup_update(Actor *this){
} }
} }
else{ else{
if(ml_distance_vec3f(this->position, player_position) < 300.0f && player_getTransformation() == TRANSFORM_1_BANJO && !jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP)){ if(ml_vec3f_distance(this->position, player_position) < 300.0f && player_getTransformation() == TRANSFORM_1_BANJO && !jiggyscore_isSpawned(JIGGY_27_BGS_TIPTUP)){
chTiptup_setState(this, 2); chTiptup_setState(this, 2);
} }
} }
@@ -335,12 +335,12 @@ void chTiptup_update(Actor *this){
} }
} //L80389370 } //L80389370
else{ else{
if(ml_distance_vec3f(this->position, player_position) >= 300.0f) if(ml_vec3f_distance(this->position, player_position) >= 300.0f)
chTiptup_setState(this, 1); chTiptup_setState(this, 1);
} }
}//L803893A0 }//L803893A0
if(this->state == 6){ if(this->state == 6){
if(ml_distance_vec3f(this->position, player_position) < 300.0f && !unqPtr->unk8){ if(ml_vec3f_distance(this->position, player_position) < 300.0f && !unqPtr->unk8){
unqPtr->unk8 = 1; unqPtr->unk8 = 1;
gcdialog_showText(0xc7d, 4, 0, 0, 0, 0); gcdialog_showText(0xc7d, 4, 0, 0, 0, 0);
} }

View File

@@ -143,7 +143,7 @@ void func_80387FD4(Actor *this){
func_8025A6EC(COMUSIC_2B_DING_B, 28000); //TODO ISSUE HERE func_8025A6EC(COMUSIC_2B_DING_B, 28000); //TODO ISSUE HERE
if (this->unkF4_8 == 1) { if (this->unkF4_8 == 1) {
func_8028F94C(2, this->position); func_8028F94C(2, this->position);
gcdialog_showText(ASSET_C86_TEXT_UNKNOWN, 0xE, this->position, this->marker, func_80387E68, NULL); gcdialog_showText(ASSET_C86_DIALOG_UNKNOWN, 0xE, this->position, this->marker, func_80387E68, NULL);
subaddie_set_state_with_direction(this, 6, 0.79f, 1); subaddie_set_state_with_direction(this, 6, 0.79f, 1);
} else { } else {
timed_playSfx(0.4f, SFX_C9_PAUSEMENU_ENTER, 1.0f, 32000); //0.4f timed_playSfx(0.4f, SFX_C9_PAUSEMENU_ENTER, 1.0f, 32000); //0.4f

View File

@@ -17,7 +17,6 @@ typedef struct{
extern f32 mapModel_getFloorY(f32 *); extern f32 mapModel_getFloorY(f32 *);
extern void func_80256E24(f32 [3], f32, f32, f32, f32, f32);
void chflibbit_update(Actor *this); void chflibbit_update(Actor *this);
Actor *chflibbit_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); Actor *chflibbit_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
@@ -373,7 +372,7 @@ void chflibbit_update(Actor *this){
sp84[0] = (f32)local->unkE[0]; sp84[0] = (f32)local->unkE[0];
sp84[1] = (f32)local->unkE[1]; sp84[1] = (f32)local->unkE[1];
sp84[2] = (f32)local->unkE[2]; sp84[2] = (f32)local->unkE[2];
if(ml_distance_vec3f(this->position, sp84) < 30.0f){ if(ml_vec3f_distance(this->position, sp84) < 30.0f){
func_80386AEC(this, 1); func_80386AEC(this, 1);
} }
else{ else{

View File

@@ -260,7 +260,7 @@ bool func_8038C2A8(ActorMarker *marker) {
local = (ActorLocal_MrVile *)&this->local; local = (ActorLocal_MrVile *)&this->local;
player_getPosition(player_position); player_getPosition(player_position);
if (this->state == 6) { if (this->state == 6) {
return ml_distance_vec3f(this->position, player_position) < 150.0f; return ml_vec3f_distance(this->position, player_position) < 150.0f;
} }
return local->unk0 == 1; return local->unk0 == 1;
} }
@@ -351,7 +351,7 @@ void chvile_update(Actor *this) {
local->game_marker = actorArray_findClosestActorFromActorId(this->position, 0x138, -1, &sp90)->marker; local->game_marker = actorArray_findClosestActorFromActorId(this->position, 0x138, -1, &sp90)->marker;
} }
player_getPosition(player_position); player_getPosition(player_position);
sp90 = ml_distance_vec3f(this->position, player_position); sp90 = ml_vec3f_distance(this->position, player_position);
if (sp90 <= 300.0f) { if (sp90 <= 300.0f) {
local->unk0 = (local->unk0 == 0) ? 1 : 2; local->unk0 = (local->unk0 == 0) ? 1 : 2;
} else if (sp90 > 300.0f) { } else if (sp90 > 300.0f) {
@@ -411,7 +411,7 @@ void chvile_update(Actor *this) {
if (this->state == 4) { if (this->state == 4) {
player_getPosition(local->target_position); player_getPosition(local->target_position);
local->unk10 = 500.0f; local->unk10 = 500.0f;
if ((local->unkC == 102) && (ml_distance_vec3f(this->position, local->target_position) < 200.0f)) { if ((local->unkC == 102) && (ml_vec3f_distance(this->position, local->target_position) < 200.0f)) {
BGS_func_8038BBA0(this, 103); BGS_func_8038BBA0(this, 103);
} }
if ((local->unkC == 103) && (skeletalAnim_getLoopCount(this->unk148) >= 2)) { if ((local->unkC == 103) && (skeletalAnim_getLoopCount(this->unk148) >= 2)) {
@@ -420,7 +420,7 @@ void chvile_update(Actor *this) {
} }
if (this->state == 5) { if (this->state == 5) {
local->unk10 = 200.0f; local->unk10 = 200.0f;
if (ml_distance_vec3f(this->position, local->target_position) < 100.0f) { if (ml_vec3f_distance(this->position, local->target_position) < 100.0f) {
local->target_position[0] = randf2(-500.0f, 500.0f); local->target_position[0] = randf2(-500.0f, 500.0f);
local->target_position[1] = 0.0f; local->target_position[1] = 0.0f;
local->target_position[2] = randf2(-500.0f, 500.0f); local->target_position[2] = randf2(-500.0f, 500.0f);
@@ -428,12 +428,12 @@ void chvile_update(Actor *this) {
} }
if ((this->state == 6)){ if ((this->state == 6)){
local->unk10 = 400.0f; local->unk10 = 400.0f;
if((ml_distance_vec3f(this->position, local->target_position) < 100.0f) || (ml_distance_vec3f(player_position, local->target_position) < 300.0f)) { if((ml_vec3f_distance(this->position, local->target_position) < 100.0f) || (ml_vec3f_distance(player_position, local->target_position) < 300.0f)) {
for(i = 0; i < 10; i++){ for(i = 0; i < 10; i++){
random_position[0] = randf2(-500.0f, 500.0f); random_position[0] = randf2(-500.0f, 500.0f);
random_position[1] = 0.0f; random_position[1] = 0.0f;
random_position[2] = randf2(-500.0f, 500.0f); random_position[2] = randf2(-500.0f, 500.0f);
if ((i == 0) || (ml_distance_vec3f(player_position, random_position) > ml_distance_vec3f(player_position, local->target_position))) { if ((i == 0) || (ml_vec3f_distance(player_position, random_position) > ml_vec3f_distance(player_position, local->target_position))) {
local->target_position[0] = random_position[0]; local->target_position[0] = random_position[0];
local->target_position[1] = random_position[1]; local->target_position[1] = random_position[1];
local->target_position[2] = random_position[2]; local->target_position[2] = random_position[2];

View File

@@ -140,7 +140,7 @@ void func_8038F6A4(Actor *this)
player_getPosition(sp48); player_getPosition(sp48);
if (!this->has_met_before) if (!this->has_met_before)
{ {
if ((((ml_distance_vec3f(local->unk18, sp48) < 250.0f) && (ml_distance_vec3f(local->unk18, sp48) > 80.0f)) && (!func_8028ECAC())) && (player_getTransformation() == TRANSFORM_1_BANJO)) if ((((ml_vec3f_distance(local->unk18, sp48) < 250.0f) && (ml_vec3f_distance(local->unk18, sp48) > 80.0f)) && (!func_8028ECAC())) && (player_getTransformation() == TRANSFORM_1_BANJO))
{ {
gcdialog_showText(0xC7E, 0, 0, 0, 0, 0); gcdialog_showText(0xC7E, 0, 0, 0, 0, 0);
this->has_met_before = TRUE; this->has_met_before = TRUE;

View File

@@ -423,7 +423,7 @@ void BGS_func_8038E034(Actor *this) {
sp7C[0] = (f32) local->unk10[0]; sp7C[0] = (f32) local->unk10[0];
sp7C[1] = (f32) local->unk10[1]; sp7C[1] = (f32) local->unk10[1];
sp7C[2] = (f32) local->unk10[2]; sp7C[2] = (f32) local->unk10[2];
if (ml_distance_vec3f(this->position, sp7C) < 30.0f) { if (ml_vec3f_distance(this->position, sp7C) < 30.0f) {
func_8038D9D0(this, 1); func_8038D9D0(this, 1);
} else { } else {
func_8038D9D0(this, 5); func_8038D9D0(this, 5);

View File

@@ -3,8 +3,6 @@
#include "math.h" #include "math.h"
#include "variables.h" #include "variables.h"
extern f32 func_80256AB4(f32, f32, f32, f32);
extern f32 func_8025715C(f32, f32);
extern f32 *chVile_getPostion(ActorMarker *); extern f32 *chVile_getPostion(ActorMarker *);
extern void bundle_setRandomVelocity(f32); extern void bundle_setRandomVelocity(f32);
extern void func_802FDCB8(s32); extern void func_802FDCB8(s32);
@@ -47,43 +45,43 @@ ActorInfo D_80390960 = {
// Vile Wins // Vile Wins
enum asset_e D_80390984[] = { enum asset_e D_80390984[] = {
0, 0,
ASSET_C66_TEXT_MR_VILE_WINS_ROUND_1, ASSET_C66_DIALOG_MR_VILE_WINS_ROUND_1,
ASSET_C68_TEXT_MR_VILE_WINS_ROUND_2, ASSET_C68_DIALOG_MR_VILE_WINS_ROUND_2,
ASSET_C6A_TEXT_MR_VILE_WINS_ROUND_3, ASSET_C6A_DIALOG_MR_VILE_WINS_ROUND_3,
ASSET_C92_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_2, ASSET_C92_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_2,
ASSET_C93_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_3, ASSET_C93_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_3,
ASSET_C94_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_4, ASSET_C94_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_4,
0 0
}; };
// Player Wins // Player Wins
enum asset_e D_803909A4[] = { enum asset_e D_803909A4[] = {
0, 0,
ASSET_C67_TEXT_MR_VILE_ROUND_2_START, ASSET_C67_DIALOG_MR_VILE_ROUND_2_START,
ASSET_C69_TEXT_MR_VILE_ROUND_3_START, ASSET_C69_DIALOG_MR_VILE_ROUND_3_START,
0, 0,
ASSET_C95_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_1, ASSET_C95_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_1,
ASSET_C96_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_2, ASSET_C96_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_2,
ASSET_C97_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_3 ASSET_C97_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_3
}; };
// Player Wins Rematch // Player Wins Rematch
enum asset_e D_803909C0[] = { enum asset_e D_803909C0[] = {
0, 0,
ASSET_C6E_TEXT_MR_VILE_LOSE_ROUND_2_REMATCH, ASSET_C6E_DIALOG_MR_VILE_LOSE_ROUND_2_REMATCH,
ASSET_C6F_TEXT_MR_VILE_LOSE_ROUND_3_REMATCH, ASSET_C6F_DIALOG_MR_VILE_LOSE_ROUND_3_REMATCH,
0, 0,
ASSET_C95_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_1, ASSET_C95_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_1,
ASSET_C96_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_2, ASSET_C96_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_2,
ASSET_C97_TEXT_MR_VILE_LOSES_EXTRA_CHALLENGE_3 ASSET_C97_DIALOG_MR_VILE_LOSES_EXTRA_CHALLENGE_3
}; };
// Player Declines // Player Declines
enum asset_e D_803909DC[] = { enum asset_e D_803909DC[] = {
ASSET_C65_TEXT_MR_VILE_PLAYER_DECLINES, ASSET_C65_DIALOG_MR_VILE_PLAYER_DECLINES,
ASSET_C65_TEXT_MR_VILE_PLAYER_DECLINES, ASSET_C65_DIALOG_MR_VILE_PLAYER_DECLINES,
ASSET_C65_TEXT_MR_VILE_PLAYER_DECLINES, ASSET_C65_DIALOG_MR_VILE_PLAYER_DECLINES,
ASSET_C8F_TEXT_MR_VILE_PLAYER_DECLINES_EXTRA_CHALLENGE, ASSET_C8F_DIALOG_MR_VILE_PLAYER_DECLINES_EXTRA_CHALLENGE,
0, 0,
0, 0,
0 0
@@ -91,10 +89,10 @@ enum asset_e D_803909DC[] = {
// Round 1 Regular & Extra Challenge // Round 1 Regular & Extra Challenge
enum asset_e BGS_D_803909F8[] = { enum asset_e BGS_D_803909F8[] = {
ASSET_C64_TEXT_MR_VILE_ROUND_1_START, ASSET_C64_DIALOG_MR_VILE_ROUND_1_START,
0, 0,
0, 0,
ASSET_C8E_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_1, ASSET_C8E_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_1,
0, 0,
0, 0,
0, 0,
@@ -102,10 +100,10 @@ enum asset_e BGS_D_803909F8[] = {
}; };
enum asset_e D_80390A18[] = { enum asset_e D_80390A18[] = {
ASSET_C6D_TEXT_MR_VILE_LOSE_ROUND_1_REMATCH, ASSET_C6D_DIALOG_MR_VILE_LOSE_ROUND_1_REMATCH,
ASSET_C70_TEXT_MR_VILE_WIN_ROUND_2_REMATCH, ASSET_C70_DIALOG_MR_VILE_WIN_ROUND_2_REMATCH,
ASSET_C71_TEXT_MR_VILE_WIN_ROUND_3_REMATCH, ASSET_C71_DIALOG_MR_VILE_WIN_ROUND_3_REMATCH,
ASSET_C8E_TEXT_MR_VILE_WINS_EXTRA_CHALLENGE_1, ASSET_C8E_DIALOG_MR_VILE_WINS_EXTRA_CHALLENGE_1,
0, 0,
0, 0,
0, 0,
@@ -171,7 +169,7 @@ void BGS_func_80389850(Actor *this, s32 arg1) {
sp7C[2] = 0.0f; sp7C[2] = 0.0f;
sp7C[1] = sp94[1]; sp7C[1] = sp94[1];
sp7C[0] = 0.0f; sp7C[0] = 0.0f;
if(ml_distance_vec3f(sp94, sp7C) <= 1000.0f){ if(ml_vec3f_distance(sp94, sp7C) <= 1000.0f){
break; break;
} }
} }
@@ -430,7 +428,7 @@ void chvilegame_player_consume_piece(Actor *this) {
if ((end != begin) && BGS_func_80389810(sp44)){ if ((end != begin) && BGS_func_80389810(sp44)){
sp44[1] = 0.0f; sp44[1] = 0.0f;
for(i_ptr = begin; i_ptr < end; i_ptr++){ for(i_ptr = begin; i_ptr < end; i_ptr++){
if ((ml_distance_vec3f(i_ptr->position, sp44) < 65.25) && chyumblie_is_edible(i_ptr->marker)) { if ((ml_vec3f_distance(i_ptr->position, sp44) < 65.25) && chyumblie_is_edible(i_ptr->marker)) {
is_correct_type = ((local->current_type != YUMBLIE) && (i_ptr->type != YUMBLIE)) || (((local->current_type == YUMBLIE) && i_ptr->type == YUMBLIE)); is_correct_type = ((local->current_type != YUMBLIE) && (i_ptr->type != YUMBLIE)) || (((local->current_type == YUMBLIE) && i_ptr->type == YUMBLIE));
if (is_correct_type) { if (is_correct_type) {
local->player_score++; local->player_score++;
@@ -468,7 +466,7 @@ bool chvilegame_cpu_consume_piece(ActorMarker *marker, f32 position[3]) {
begin = vector_getBegin(local->game_pieces); begin = vector_getBegin(local->game_pieces);
end = vector_getEnd(local->game_pieces); end = vector_getEnd(local->game_pieces);
for(i_ptr = begin; i_ptr < end; i_ptr++){ for(i_ptr = begin; i_ptr < end; i_ptr++){
if ((ml_distance_vec3f(i_ptr->position, position) < 50.0f) && func_8038B684(i_ptr->marker)) { if ((ml_vec3f_distance(i_ptr->position, position) < 50.0f) && func_8038B684(i_ptr->marker)) {
local->vile_score++; local->vile_score++;
timedFunc_set_1(0.0f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); timedFunc_set_1(0.0f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE);
timedFunc_set_1(0.5f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); timedFunc_set_1(0.5f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE);
@@ -547,12 +545,12 @@ bool chvilegame_find_closest_piece(ActorMarker *marker, f32 position[0], f32 yaw
piece_direction[0] = i_ptr->position[0] - position[0]; piece_direction[0] = i_ptr->position[0] - position[0];
piece_direction[1] = i_ptr->position[1] - position[1]; piece_direction[1] = i_ptr->position[1] - position[1];
piece_direction[2] = i_ptr->position[2] - position[2]; piece_direction[2] = i_ptr->position[2] - position[2];
distance = ml_distance_vec3f(i_ptr->position, position); distance = ml_vec3f_distance(i_ptr->position, position);
angle_diff = func_80256AB4(target_direction[0], target_direction[2], piece_direction[0], piece_direction[2]); angle_diff = func_80256AB4(target_direction[0], target_direction[2], piece_direction[0], piece_direction[2]);
if( (distance > 300.0f) if( (distance > 300.0f)
|| ((-0.8 < angle_diff) && (angle_diff < 0.8) && ((piece_direction[0]*target_direction[0] + piece_direction[1]*target_direction[1] + piece_direction[2]*target_direction[2]) >= 0.0f)) || ((-0.8 < angle_diff) && (angle_diff < 0.8) && ((piece_direction[0]*target_direction[0] + piece_direction[1]*target_direction[1] + piece_direction[2]*target_direction[2]) >= 0.0f))
) { ) {
if ((closest_piece == NULL) || (distance < ml_distance_vec3f(position, closest_piece->position))){ if ((closest_piece == NULL) || (distance < ml_vec3f_distance(position, closest_piece->position))){
closest_piece = i_ptr; closest_piece = i_ptr;
} }
} }

View File

@@ -1,9 +1,9 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include "CC.h" #include "CC.h"
#include <core1/viewport.h>
#include "core2/modelRender.h" #include "core2/modelRender.h"
typedef struct{ typedef struct{

View File

@@ -1,8 +1,8 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include <core1/viewport.h>
#include "core2/modelRender.h" #include "core2/modelRender.h"
extern BKCollisionTri *func_8028EF48(void); extern BKCollisionTri *func_8028EF48(void);
@@ -19,7 +19,6 @@ extern int func_80340020(s32, f32[3], s32, f32, s32, BKVertexList *, f32[3], f32
extern void boneTransformList_getBoneScale(s32, s32, f32[3]); extern void boneTransformList_getBoneScale(s32, s32, f32[3]);
extern void boneTransformList_setBoneScale(s32, s32, f32[3]); extern void boneTransformList_setBoneScale(s32, s32, f32[3]);
extern void func_8033A9A8(s32, s32, f32[3]); extern void func_8033A9A8(s32, s32, f32[3]);
extern void ml_vec3f_normalize(f32[3]);
extern void func_8033A45C(s32, s32); extern void func_8033A45C(s32, s32);
extern void modelRender_setBoneTransformList(s32); extern void modelRender_setBoneTransformList(s32);
extern void func_8028FAB0(f32[3]); extern void func_8028FAB0(f32[3]);
@@ -249,7 +248,7 @@ int CC_func_80388CA0(void){
void func_80388CB4(void){ void func_80388CB4(void){
if(D_80389FA0.unk21){ if(D_80389FA0.unk21){
skeletalAnim_free(D_80389FA0.unk0); skeletalAnim_free(D_80389FA0.unk0);
func_8030DA44(D_80389FA0.sfxsourceIdx); sfxsource_freeSfxsourceByIndex(D_80389FA0.sfxsourceIdx);
func_80340690(D_80389FA0.unk18); func_80340690(D_80389FA0.unk18);
func_8034A2A8(D_80389FA0.unk34); func_8034A2A8(D_80389FA0.unk34);
if(model_getVtxList(D_80389FA0.unk24) != D_80389FA0.unk40) if(model_getVtxList(D_80389FA0.unk24) != D_80389FA0.unk40)
@@ -331,7 +330,7 @@ void CC_func_80388F4C(void){
CC_func_80387D4C(); CC_func_80387D4C();
if(D_80389FA0.unk21 != 0 && func_80334904() == 2){ if(D_80389FA0.unk21 != 0 && func_80334904() == 2){
player_getPosition(sp6C); player_getPosition(sp6C);
D_80389FA0.unk20 = (ml_distance_vec3f(sp6C, D_80389FA0.unkC) < 200.0f); D_80389FA0.unk20 = (ml_vec3f_distance(sp6C, D_80389FA0.unkC) < 200.0f);
D_80389FA0.unk38 += sp68; D_80389FA0.unk38 += sp68;
sp64 = skeletalAnim_getProgress(D_80389FA0.unk0); sp64 = skeletalAnim_getProgress(D_80389FA0.unk0);
@@ -362,7 +361,7 @@ void CC_func_80388F4C(void){
if(D_80389FA0.unk20 && skeletalAnim_getAnimId(D_80389FA0.unk0) != ASSET_C4_ANIM_CLANKER_BITE){ if(D_80389FA0.unk20 && skeletalAnim_getAnimId(D_80389FA0.unk0) != ASSET_C4_ANIM_CLANKER_BITE){
skeletalAnim_set(D_80389FA0.unk0, ASSET_C4_ANIM_CLANKER_BITE, 1.0f, 10.0f); skeletalAnim_set(D_80389FA0.unk0, ASSET_C4_ANIM_CLANKER_BITE, 1.0f, 10.0f);
if(!D_80389FA0.unk48){ if(!D_80389FA0.unk48){
gcdialog_showText(ASSET_D2B_TEXT_UNKNOWN, 0xE, D_80389FA0.unk28, NULL, NULL, NULL); gcdialog_showText(ASSET_D2B_DIALOG_UNKNOWN, 0xE, D_80389FA0.unk28, NULL, NULL, NULL);
D_80389FA0.unk48 = TRUE; D_80389FA0.unk48 = TRUE;
} }
}//L8038918C }//L8038918C
@@ -381,7 +380,7 @@ void CC_func_80388F4C(void){
if(D_80389FA0.unk21 == 3){ if(D_80389FA0.unk21 == 3){
func_8034A174(D_80389FA0.unk34, 6, sp48); func_8034A174(D_80389FA0.unk34, 6, sp48);
if(ml_distance_vec3f(sp48, sp6C) <= 130.0f && sp6C[1] - sp48[1] < 50.0f){ if(ml_vec3f_distance(sp48, sp6C) <= 130.0f && sp6C[1] - sp48[1] < 50.0f){
func_8031D04C(MAP_21_CC_WITCH_SWITCH_ROOM, 1); func_8031D04C(MAP_21_CC_WITCH_SWITCH_ROOM, 1);
} }
}//L80389260 }//L80389260

View File

@@ -77,7 +77,7 @@ void func_80386AD0(ActorMarker *arg0, s32 arg1) {
void func_80386AF8(Actor *arg0) { void func_80386AF8(Actor *arg0) {
ActorLocal_CC_530 *local = (ActorLocal_CC_530 *)&arg0->local; ActorLocal_CC_530 *local = (ActorLocal_CC_530 *)&arg0->local;
CC_func_80386920(arg0, 0); CC_func_80386920(arg0, 0);
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
} }
void func_80386B28(Actor *this){ void func_80386B28(Actor *this){

View File

@@ -136,7 +136,7 @@ void func_803870F8(Actor *this){
sp3C[0] = this->position_x; sp3C[0] = this->position_x;
sp3C[1] = this->position_y + 100; sp3C[1] = this->position_y + 100;
sp3C[2] = this->position_z; sp3C[2] = this->position_z;
if(ml_distance_vec3f(&sp3C, &sp70) < 120.0f){ if(ml_vec3f_distance(&sp3C, &sp70) < 120.0f){
func_8031D04C(MAP_22_CC_INSIDE_CLANKER, (local->unk0 == 1)? 7 : 6); func_8031D04C(MAP_22_CC_INSIDE_CLANKER, (local->unk0 == 1)? 7 : 6);
} }
}//L80387500 }//L80387500

View File

@@ -45,7 +45,7 @@ void func_803878A0(Actor *this, s32 next_state) {
local->unkC[0] = randf2(-500.0f, 500.0f); local->unkC[0] = randf2(-500.0f, 500.0f);
local->unkC[1] = randf2(400.0f, 900.0f); local->unkC[1] = randf2(400.0f, 900.0f);
local->unkC[2] = randf2(-400.0f, 700.0f); local->unkC[2] = randf2(-400.0f, 700.0f);
if(ml_distance_vec3f(this->position, local->unkC) > 800.0f) if(ml_vec3f_distance(this->position, local->unkC) > 800.0f)
break; break;
} }
local->unk8 = randf2(500.0f, 1000.0f); local->unk8 = randf2(500.0f, 1000.0f);
@@ -55,7 +55,7 @@ void func_803878A0(Actor *this, s32 next_state) {
void CCW_func_80387A20(Actor *this){ void CCW_func_80387A20(Actor *this){
ActorLocal_CCW_14B0 *local = (ActorLocal_CCW_14B0 *)&this->local; ActorLocal_CCW_14B0 *local = (ActorLocal_CCW_14B0 *)&this->local;
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
} }
void CCW_func_80387A40(Actor *this) { void CCW_func_80387A40(Actor *this) {
@@ -90,7 +90,7 @@ void CCW_func_80387A40(Actor *this) {
sp5C[0] = local->unkC[0] - this->position[0]; sp5C[0] = local->unkC[0] - this->position[0];
sp5C[1] = local->unkC[1] - this->position[1]; sp5C[1] = local->unkC[1] - this->position[1];
sp5C[2] = local->unkC[2] - this->position[2]; sp5C[2] = local->unkC[2] - this->position[2];
if (ml_distance_vec3f(this->position, local->unkC) < 500.0f) { if (ml_vec3f_distance(this->position, local->unkC) < 500.0f) {
ml_vec3f_set_length(sp5C, local->unk8 * 8.0f); ml_vec3f_set_length(sp5C, local->unk8 * 8.0f);
} else { } else {
ml_vec3f_set_length(sp5C, local->unk8 * 2); ml_vec3f_set_length(sp5C, local->unk8 * 2);
@@ -106,7 +106,7 @@ void CCW_func_80387A40(Actor *this) {
} }
func_80258A4C(this->position, this->yaw - 90.0f, local->unkC, &sp58, &sp54, &sp50); func_80258A4C(this->position, this->yaw - 90.0f, local->unkC, &sp58, &sp54, &sp50);
this->yaw += 140.0f * sp50 * sp68; this->yaw += 140.0f * sp50 * sp68;
if (ml_distance_vec3f(this->position, local->unkC) < 100.0f) { if (ml_vec3f_distance(this->position, local->unkC) < 100.0f) {
func_803878A0(this, 1); func_803878A0(this, 1);
} }
} }

View File

@@ -1,8 +1,8 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include <core1/viewport.h>
typedef struct{ typedef struct{
@@ -183,10 +183,10 @@ void func_8038687C(Actor *this) {
sp4C[1] = -100.0f; sp4C[1] = -100.0f;
sp4C[2] = randf2(-500.0f, 900.0f); sp4C[2] = randf2(-500.0f, 900.0f);
if(ml_distance_vec3f(this->position, sp4C) < 400.0f) if(ml_vec3f_distance(this->position, sp4C) < 400.0f)
continue; continue;
tmp = ml_distance_vec3f(sp5C, sp4C); tmp = ml_vec3f_distance(sp5C, sp4C);
phi_v0 = (phi_s0 < 0xA) ? 500 : 200; phi_v0 = (phi_s0 < 0xA) ? 500 : 200;
if(tmp < (f32) phi_v0) if(tmp < (f32) phi_v0)
continue; continue;
@@ -207,7 +207,7 @@ void func_8038687C(Actor *this) {
func_803865F4(this, 3); func_803865F4(this, 3);
} else if ((local->unk0 != NULL) && (map_get() == MAP_5A_CCW_SUMMER_ZUBBA_HIVE)) { } else if ((local->unk0 != NULL) && (map_get() == MAP_5A_CCW_SUMMER_ZUBBA_HIVE)) {
player_getPosition(sp40); player_getPosition(sp40);
if ((ml_distance_vec3f(this->position, sp40) < 300.0f) && (player_getTransformation() == TRANSFORM_1_BANJO)) { if ((ml_vec3f_distance(this->position, sp40) < 300.0f) && (player_getTransformation() == TRANSFORM_1_BANJO)) {
func_803865F4(this, 2); func_803865F4(this, 2);
} }
} }

View File

@@ -161,7 +161,7 @@ void chGobiCCW_update(Actor *this) {
if(this->state == 1){ if(this->state == 1){
if (!this->has_met_before) { if (!this->has_met_before) {
player_getPosition(sp48); player_getPosition(sp48);
if (ml_distance_vec3f(this->position, sp48) < 600.0f) { if (ml_vec3f_distance(this->position, sp48) < 600.0f) {
if (local->unk0->unk2 != 0) { if (local->unk0->unk2 != 0) {
gcdialog_showText((s32) local->unk0->unk2, 4, NULL, NULL, NULL, NULL); gcdialog_showText((s32) local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
} }

View File

@@ -118,7 +118,7 @@ void func_803891B0(void* marker) {
void func_8038921C(void* marker) { void func_8038921C(void* marker) {
Actor* actor = marker_getActor(reinterpret_cast(ActorMarker*, marker)); Actor* actor = marker_getActor(reinterpret_cast(ActorMarker*, marker));
func_8030E394(actor->unk44_31); func_8030E394(actor->unk44_31);
func_8030DA44(actor->unk44_31); sfxsource_freeSfxsourceByIndex(actor->unk44_31);
actor->unk44_31 = 0U; actor->unk44_31 = 0U;
FUNC_8030E624(SFX_6C_LOCKUP_CLOSING, 1.0f, 25000); FUNC_8030E624(SFX_6C_LOCKUP_CLOSING, 1.0f, 25000);
} }

View File

@@ -271,7 +271,7 @@ void CCW_func_80389BFC(Actor *this) {
} }
if ((local->unk0->map_id != MAP_43_CCW_SPRING) && ((this->position[0] + 500.0f) < sp4C[0])) { if ((local->unk0->map_id != MAP_43_CCW_SPRING) && ((this->position[0] + 500.0f) < sp4C[0])) {
player_setCarryObjectPoseInCylinder(this->position, 1110.0f, 200.0f, ACTOR_2A2_CATERPILLAR, &this); player_setCarryObjectPoseInCylinder(this->position, 1110.0f, 200.0f, ACTOR_2A2_CATERPILLAR, &this);
if ((local->unk0->unkE != 0) && (carriedObj_getActorId() == ACTOR_2A2_CATERPILLAR) && (ml_distance_vec3f(this->position, sp4C) < 1010.0f) && (player_throwCarriedObject() != 0)) { if ((local->unk0->unkE != 0) && (carriedObj_getActorId() == ACTOR_2A2_CATERPILLAR) && (ml_vec3f_distance(this->position, sp4C) < 1010.0f) && (player_throwCarriedObject() != 0)) {
player_setThrowTargetPosition(D_8038FDE0); player_setThrowTargetPosition(D_8038FDE0);
if ((local->unk0->map_id == MAP_44_CCW_SUMMER) && (local->unk4 == 0)) { if ((local->unk0->map_id == MAP_44_CCW_SUMMER) && (local->unk4 == 0)) {
gcdialog_showText(0xCD8, 4, NULL, NULL, NULL, NULL); gcdialog_showText(0xCD8, 4, NULL, NULL, NULL, NULL);

View File

@@ -111,13 +111,13 @@ void chcaterpillar_update(Actor *this){
if(this->state == 1){ if(this->state == 1){
skeletalAnim_getProgressRange(this->unk148, &sp64, &sp60); skeletalAnim_getProgressRange(this->unk148, &sp64, &sp60);
player_getPosition(sp74); player_getPosition(sp74);
if(ml_distance_vec3f(this->position, local->unk0) < 10.0f){ if(ml_vec3f_distance(this->position, local->unk0) < 10.0f){
for(i = 0; i < 10; i++){ for(i = 0; i < 10; i++){
local->unk0[0] = randf2(-300.0f, 300.0f) + this->position_x; local->unk0[0] = randf2(-300.0f, 300.0f) + this->position_x;
local->unk0[1] = this->position_y; local->unk0[1] = this->position_y;
local->unk0[2] = randf2(-300.0f, 300.0f) + this->position_z; local->unk0[2] = randf2(-300.0f, 300.0f) + this->position_z;
if( !(ml_distance_vec3f(local->unk0, this->position) < 50.0f) && func_80329210(this, local->unk0)) if( !(ml_vec3f_distance(local->unk0, this->position) < 50.0f) && func_80329210(this, local->unk0))
break; break;
}//L8038A544 }//L8038A544
if(i == 10){ if(i == 10){
@@ -150,10 +150,10 @@ void chcaterpillar_update(Actor *this){
} }
}//L8038A714 }//L8038A714
if(ml_distance_vec3f(this->position, sp74) < 50.0f){ if(ml_vec3f_distance(this->position, sp74) < 50.0f){
func_8028F030(ACTOR_2A2_CATERPILLAR); func_8028F030(ACTOR_2A2_CATERPILLAR);
if(!volatileFlag_get(VOLATILE_FLAG_B2)){ if(!volatileFlag_get(VOLATILE_FLAG_B2)){
gcdialog_showText(ASSET_CC7_TEXT_UNKNOWN, 4, NULL, NULL, NULL, NULL); gcdialog_showText(ASSET_CC7_DIALOG_UNKNOWN, 4, NULL, NULL, NULL, NULL);
volatileFlag_set(VOLATILE_FLAG_B2, TRUE); volatileFlag_set(VOLATILE_FLAG_B2, TRUE);
} }
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 25000, this->position, 0x1f4, 0x9c4); FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 25000, this->position, 0x1f4, 0x9c4);
@@ -177,7 +177,7 @@ void chcaterpillar_update(Actor *this){
local->unk24 += 3.3333333333333335*sp84; local->unk24 += 3.3333333333333335*sp84;
local->unk24 = (1.0 < local->unk24) ? 1.0 : local->unk24; local->unk24 = (1.0 < local->unk24) ? 1.0 : local->unk24;
ml_interpolate_vec3f(this->position, local->unkC, local->unk18, local->unk24); ml_vec3f_interpolate_fast(this->position, local->unkC, local->unk18, local->unk24);
this->position[1] += 50.0f*sinf(local->unk24*3.141592654); this->position[1] += 50.0f*sinf(local->unk24*3.141592654);
if(1.0 == local->unk24){ if(1.0 == local->unk24){

View File

@@ -101,7 +101,7 @@ void func_8038AA8C(Actor *this) {
} }
player_getPosition(sp54); player_getPosition(sp54);
if (ml_distance_vec3f(this->position, sp54) < 850.0f) { if (ml_vec3f_distance(this->position, sp54) < 850.0f) {
func_8038A950(this, 2); func_8038A950(this, 2);
} }
} }

View File

@@ -133,7 +133,7 @@ void chnabnut_update(Actor *this) {
if (this->state == NABNUT_STATE_1_SAD) { if (this->state == NABNUT_STATE_1_SAD) {
player_getPosition(sp30); player_getPosition(sp30);
if (!this->has_met_before && (ml_distance_vec3f(this->position, sp30) < 400.0f)) { if (!this->has_met_before && (ml_vec3f_distance(this->position, sp30) < 400.0f)) {
this->has_met_before = TRUE; this->has_met_before = TRUE;
gcdialog_showText(0xCCA, 0xE, this->position, NULL, NULL, NULL); gcdialog_showText(0xCCA, 0xE, this->position, NULL, NULL, NULL);
} }
@@ -143,7 +143,7 @@ void chnabnut_update(Actor *this) {
} }
if (this->has_met_before && !func_803114B0()) { if (this->has_met_before && !func_803114B0()) {
player_setCarryObjectPoseInCylinder(this->position, 500.0f, 200.0f, ACTOR_2A9_ACORN, &this); player_setCarryObjectPoseInCylinder(this->position, 500.0f, 200.0f, ACTOR_2A9_ACORN, &this);
if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_distance_vec3f(this->position, sp30) < 300.0f) && player_throwCarriedObject()) { if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_vec3f_distance(this->position, sp30) < 300.0f) && player_throwCarriedObject()) {
player_setThrowTargetPosition(D_8038F350); player_setThrowTargetPosition(D_8038F350);
local->returned_acorn_count++; local->returned_acorn_count++;
if (local->returned_acorn_count == 6) { if (local->returned_acorn_count == 6) {

View File

@@ -114,7 +114,7 @@ void func_8038C41C(Actor *this) {
if ((this->marker->id == 0x1CB) && (this->state == 2)) { if ((this->marker->id == 0x1CB) && (this->state == 2)) {
player_getPosition(sp2C); player_getPosition(sp2C);
if (!this->has_met_before && (ml_distance_vec3f(this->position, sp2C) < 400.0f)) { if (!this->has_met_before && (ml_vec3f_distance(this->position, sp2C) < 400.0f)) {
this->has_met_before = TRUE; this->has_met_before = TRUE;
gcdialog_showText(0xCCD, 0, NULL, NULL, NULL, NULL); gcdialog_showText(0xCCD, 0, NULL, NULL, NULL, NULL);
} }

View File

@@ -73,7 +73,7 @@ void func_8038C7A8(Actor *this) {
if (this->state == 1) { if (this->state == 1) {
player_getPosition(sp38); player_getPosition(sp38);
if (ml_distance_vec3f(this->position, sp38) < 50.0f) { if (ml_vec3f_distance(this->position, sp38) < 50.0f) {
func_8028F030(0x2A9); func_8028F030(0x2A9);
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 25000, this->position, 500, 2500); FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 25000, this->position, 500, 2500);
CCW_func_8038C6A0(this, 5); CCW_func_8038C6A0(this, 5);
@@ -91,7 +91,7 @@ void func_8038C7A8(Actor *this) {
if (this->state == 3) { if (this->state == 3) {
local->unk18 += 3.3333333333333333 * sp44; local->unk18 += 3.3333333333333333 * sp44;
local->unk18 = (local->unk18 > 1.0) ? 1.0 : local->unk18; local->unk18 = (local->unk18 > 1.0) ? 1.0 : local->unk18;
ml_interpolate_vec3f(this->position, local->unk0, local->unkC, local->unk18); ml_vec3f_interpolate_fast(this->position, local->unk0, local->unkC, local->unk18);
this->position[1] += 50.0f * sinf(local->unk18 * BAD_PI); this->position[1] += 50.0f * sinf(local->unk18 * BAD_PI);
if (local->unk18 == 1.0) { if (local->unk18 == 1.0) {
CCW_func_8038C6A0(this, 4); CCW_func_8038C6A0(this, 4);

View File

@@ -118,7 +118,7 @@ void func_8038CC4C(Actor *this) {
} }
if (!this->has_met_before) { if (!this->has_met_before) {
player_getPosition(sp38); player_getPosition(sp38);
if (ml_distance_vec3f(this->position, sp38) < 900.0f) { if (ml_vec3f_distance(this->position, sp38) < 900.0f) {
if (local->unk0->map_id != MAP_46_CCW_WINTER || func_8028F2FC()) { if (local->unk0->map_id != MAP_46_CCW_WINTER || func_8028F2FC()) {
gcdialog_showText(local->unk0->unk4, 4, NULL, NULL, NULL, NULL); gcdialog_showText(local->unk0->unk4, 4, NULL, NULL, NULL, NULL);
this->has_met_before = TRUE; this->has_met_before = TRUE;

View File

@@ -116,7 +116,7 @@ void func_8038CFB4(Actor *this) {
if (this->state == 1) { if (this->state == 1) {
if (!this->has_met_before) { if (!this->has_met_before) {
player_getPosition(sp60); player_getPosition(sp60);
if (ml_distance_vec3f(this->position, sp60) < 900.0f) { if (ml_vec3f_distance(this->position, sp60) < 900.0f) {
gcdialog_showText(0xCCF, 4, NULL, NULL, NULL, NULL); gcdialog_showText(0xCCF, 4, NULL, NULL, NULL, NULL);
this->has_met_before = TRUE; this->has_met_before = TRUE;
} }

View File

@@ -69,7 +69,7 @@ void func_8038D368(Actor *this) {
if(!this->has_met_before){ if(!this->has_met_before){
player_getPosition(plyr_pos); player_getPosition(plyr_pos);
if (ml_distance_vec3f(this->position, plyr_pos) < 600.0f) { if (ml_vec3f_distance(this->position, plyr_pos) < 600.0f) {
if (!jiggyscore_isCollected(JIGGY_4B_CCW_GNAWTY)) { if (!jiggyscore_isCollected(JIGGY_4B_CCW_GNAWTY)) {
gcdialog_showText(local->unk0->unk2, 4, NULL, NULL, NULL, NULL); gcdialog_showText(local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
} else { } else {

View File

@@ -91,7 +91,7 @@ void func_8038717C(Actor *this){
ActorLocal_CCW_950 *local; ActorLocal_CCW_950 *local;
local = (ActorLocal_CCW_950 *)&this->local; local = (ActorLocal_CCW_950 *)&this->local;
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
} }
void chwasp_update(Actor *this) { void chwasp_update(Actor *this) {

View File

@@ -84,7 +84,7 @@ void func_8038A318(ActorMarker *caller, enum asset_e text_id, s32 arg1){
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 32000); func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 32000);
func_8025A6EC(COMUSIC_5B_FP_IGLOO_HAPPY, 25000); func_8025A6EC(COMUSIC_5B_FP_IGLOO_HAPPY, 25000);
func_8025A58C(0, 4000); func_8025A58C(0, 4000);
func_8024BD08(0); core1_ce60_incOrDecCounter(FALSE);
} }
} }
@@ -124,9 +124,9 @@ void func_8038A384(Actor *this){
}//L8038A4E4 }//L8038A4E4
sp34 = levelSpecificFlags_get(LEVEL_FLAG_11_FP_UNKNOWN) + levelSpecificFlags_get(LEVEL_FLAG_12_FP_UNKNOWN) + levelSpecificFlags_get(LEVEL_FLAG_13_FP_UNKNOWN); sp34 = levelSpecificFlags_get(LEVEL_FLAG_11_FP_UNKNOWN) + levelSpecificFlags_get(LEVEL_FLAG_12_FP_UNKNOWN) + levelSpecificFlags_get(LEVEL_FLAG_13_FP_UNKNOWN);
sp38 = (sp34 == 1) ? ASSET_C17_TEXT_UNKNOWN sp38 = (sp34 == 1) ? ASSET_C17_DIALOG_UNKNOWN
: (sp34 == 2) ? ASSET_C18_TEXT_UNKNOWN : (sp34 == 2) ? ASSET_C18_DIALOG_UNKNOWN
: ASSET_C19_TEXT_UNKNOWN; : ASSET_C19_DIALOG_UNKNOWN;
this->yaw_ideal = (f32)func_80329784(this); this->yaw_ideal = (f32)func_80329784(this);
func_80328FB0(this, 2.0f); func_80328FB0(this, 2.0f);
@@ -140,7 +140,7 @@ void func_8038A384(Actor *this){
&& !jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3) && !jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3)
&& !jiggyscore_isSpawned(JIGGY_2C_FP_BOGGY_3) && !jiggyscore_isSpawned(JIGGY_2C_FP_BOGGY_3)
){ ){
if (gcdialog_showText(ASSET_C1A_TEXT_UNKNOWN, 0x2a, NULL, NULL, NULL, NULL)) { if (gcdialog_showText(ASSET_C1A_DIALOG_UNKNOWN, 0x2a, NULL, NULL, NULL, NULL)) {
levelSpecificFlags_set(LEVEL_FLAG_19_FP_UNKNOWN, TRUE); levelSpecificFlags_set(LEVEL_FLAG_19_FP_UNKNOWN, TRUE);
} }
} }
@@ -163,7 +163,7 @@ void func_8038A384(Actor *this){
} }
if(levelSpecificFlags_get(D_80391E80[sp3C].unk0)){ if(levelSpecificFlags_get(D_80391E80[sp3C].unk0)){
subaddie_set_state_with_direction(this, 2, 0.001f, 1); subaddie_set_state_with_direction(this, 2, 0.001f, 1);
if (sp38 == ASSET_C19_TEXT_UNKNOWN) { if (sp38 == ASSET_C19_DIALOG_UNKNOWN) {
gcdialog_showText(sp38, 0x2f, this->position, this->marker, func_8038A318, NULL); gcdialog_showText(sp38, 0x2f, this->position, this->marker, func_8038A318, NULL);
} }
else { else {

View File

@@ -86,7 +86,7 @@ void func_80387828(ActorMarker *caller, enum asset_e text_id, s32 arg2){
Actor *this = marker_getActor(caller); Actor *this = marker_getActor(caller);
if (text_id == 0xc00) { if (text_id == 0xc00) {
gcdialog_showText(ASSET_C2B_TEXT_UNKNOWN, 0xf, NULL, this->marker, NULL, func_803877A8); gcdialog_showText(ASSET_C2B_DIALOG_UNKNOWN, 0xf, NULL, this->marker, NULL, func_803877A8);
} }
} }
@@ -149,7 +149,7 @@ void func_8038794C(Actor *this){
if(!this->has_met_before && func_80329530(this, 0x1f4)){ if(!this->has_met_before && func_80329530(this, 0x1f4)){
if(!func_8028ECAC() || func_8028ECAC() == BSGROUP_8_TROT){ if(!func_8028ECAC() || func_8028ECAC() == BSGROUP_8_TROT){
if (gcdialog_showText(ASSET_BFF_TEXT_UNKNOWN, 0x2a, this->position, NULL, NULL, NULL)) { if (gcdialog_showText(ASSET_BFF_DIALOG_UNKNOWN, 0x2a, this->position, NULL, NULL, NULL)) {
for (i = 0; i < 5; i++) { for (i = 0; i < 5; i++) {
timedFunc_set_1(D_80391BEC[i], (GenFunction_1) func_8038787C, (s32) this->marker); timedFunc_set_1(D_80391BEC[i], (GenFunction_1) func_8038787C, (s32) this->marker);
} }

View File

@@ -4,7 +4,7 @@
extern void func_8028E668(f32[3], f32, f32, f32); extern void func_8028E668(f32[3], f32, f32, f32);
extern Actor *func_80328230(enum actor_e id, f32 pos[3], f32 rot[3]); extern Actor *func_80328230(enum actor_e id, f32 pos[3], f32 rot[3]);
extern NodeProp *cubeList_findNodePropByActorId(enum actor_e, s32[3]); extern NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e, s32[3]);
extern f32 func_8038BE20(f32 arg0[3]); extern f32 func_8038BE20(f32 arg0[3]);
typedef struct { typedef struct {
@@ -124,10 +124,10 @@ void func_80388A50(Actor *this){
void func_80388A94(Actor *this){ void func_80388A94(Actor *this){
func_80388A50(this); func_80388A50(this);
if(mapSpecificFlags_get(6)){ if(mapSpecificFlags_get(6)){
gcdialog_showText(ASSET_C0A_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL); gcdialog_showText(ASSET_C0A_DIALOG_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL);
} }
else{ else{
gcdialog_showText(ASSET_C09_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL); gcdialog_showText(ASSET_C09_DIALOG_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL);
} }
} }
@@ -136,15 +136,15 @@ void func_80388B18(Actor *this, u8 arg1){
if(player_getTransformation() == TRANSFORM_4_WALRUS){ if(player_getTransformation() == TRANSFORM_4_WALRUS){
func_80388A50(this); func_80388A50(this);
if(mapSpecificFlags_get(5)){ if(mapSpecificFlags_get(5)){
gcdialog_showText(ASSET_C05_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL); gcdialog_showText(ASSET_C05_DIALOG_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
} }
else{ else{
gcdialog_showText(ASSET_C02_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL); gcdialog_showText(ASSET_C02_DIALOG_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
} }
} }
else{//L80388BB8 else{//L80388BB8
if(!volatileFlag_get(VOLATILE_FLAG_B3)){ if(!volatileFlag_get(VOLATILE_FLAG_B3)){
if(gcdialog_showText(ASSET_C01_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){ if(gcdialog_showText(ASSET_C01_DIALOG_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){
volatileFlag_set(VOLATILE_FLAG_B3, TRUE); volatileFlag_set(VOLATILE_FLAG_B3, TRUE);
func_80388A50(this); func_80388A50(this);
} }
@@ -154,7 +154,7 @@ void func_80388B18(Actor *this, u8 arg1){
else{//L80388C08 else{//L80388C08
if(player_getTransformation() == TRANSFORM_4_WALRUS){ if(player_getTransformation() == TRANSFORM_4_WALRUS){
if(!volatileFlag_get(VOLATILE_FLAG_B4)){ if(!volatileFlag_get(VOLATILE_FLAG_B4)){
if(gcdialog_showText(ASSET_C08_TEXT_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){ if(gcdialog_showText(ASSET_C08_DIALOG_UNKNOWN, 0xe, this->position, this->marker, func_80388D70, NULL)){
volatileFlag_set(VOLATILE_FLAG_B4, TRUE); volatileFlag_set(VOLATILE_FLAG_B4, TRUE);
func_80388A50(this); func_80388A50(this);
} }
@@ -201,7 +201,7 @@ void func_80388D70(ActorMarker *caller, enum asset_e text_id, s32 arg2){
case 0xc29://L80388DC4 case 0xc29://L80388DC4
func_8025A6EC(COMUSIC_3A_FP_BOGGY_RACE, 25000); func_8025A6EC(COMUSIC_3A_FP_BOGGY_RACE, 25000);
func_8025A58C(0, 4000); func_8025A58C(0, 4000);
func_8024BD08(0); core1_ce60_incOrDecCounter(FALSE);
func_802BE720(); func_802BE720();
local->unk0 = partEmitMgr_newEmitter(16); local->unk0 = partEmitMgr_newEmitter(16);
local->unk4 = partEmitMgr_newEmitter(16); local->unk4 = partEmitMgr_newEmitter(16);
@@ -383,8 +383,8 @@ void func_803895E0(void){
for (i = 0; i< 7; i++){ for (i = 0; i< 7; i++){
s0 = (i < 3) s0 = (i < 3)
? cubeList_findNodePropByActorId(D_80391DB8[i].unk0, D_80391DA0) ? cubeList_findNodePropByActorIdAndPosition_s32(D_80391DB8[i].unk0, D_80391DA0)
: cubeList_findNodePropByActorId(D_80391DB8[i].unk0, D_80391DAC); : cubeList_findNodePropByActorIdAndPosition_s32(D_80391DB8[i].unk0, D_80391DAC);
nodeprop_getPosition(s0, sp64); nodeprop_getPosition(s0, sp64);
f20 = (f32)func_80304DA8(s0); f20 = (f32)func_80304DA8(s0);
@@ -478,13 +478,13 @@ void func_803896FC(Actor *this){
&& player_getTransformation() != TRANSFORM_4_WALRUS && player_getTransformation() != TRANSFORM_4_WALRUS
&& volatileFlag_get(VOLATILE_FLAG_B3) && volatileFlag_get(VOLATILE_FLAG_B3)
){ ){
gcdialog_showText(ASSET_C01_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL); gcdialog_showText(ASSET_C01_DIALOG_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
} }
else if( local->unk19 == 2){ else if( local->unk19 == 2){
if( player_getTransformation() == TRANSFORM_4_WALRUS if( player_getTransformation() == TRANSFORM_4_WALRUS
&& volatileFlag_get(VOLATILE_FLAG_B4) && volatileFlag_get(VOLATILE_FLAG_B4)
){ ){
gcdialog_showText(ASSET_C08_TEXT_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL); gcdialog_showText(ASSET_C08_DIALOG_UNKNOWN, 0xf, this->position, this->marker, func_80388D70, NULL);
} }
else if( player_getTransformation() != TRANSFORM_4_WALRUS){ else if( player_getTransformation() != TRANSFORM_4_WALRUS){
func_80388A94(this); func_80388A94(this);

View File

@@ -77,14 +77,14 @@ void func_80390388(Actor *this){
&& (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT) && (func_8028ECAC() == 0 || func_8028ECAC() == BSGROUP_8_TROT)
){ ){
if(0.0f == this->unk1C[0] && func_80390334()){ if(0.0f == this->unk1C[0] && func_80390334()){
if(gcdialog_showText(ASSET_C1F_TEXT_UNKNOWN, 0xb, this->position, NULL, NULL, NULL)){ if(gcdialog_showText(ASSET_C1F_DIALOG_UNKNOWN, 0xb, this->position, NULL, NULL, NULL)){
this->has_met_before = TRUE; this->has_met_before = TRUE;
this->unk1C[0] = 1.0f; this->unk1C[0] = 1.0f;
} }
} }
else{ else{
if( !this->has_met_before ){ if( !this->has_met_before ){
if(gcdialog_showText(ASSET_C1E_TEXT_UNKNOWN, 0x2b, this->position, NULL, NULL, NULL)){ if(gcdialog_showText(ASSET_C1E_DIALOG_UNKNOWN, 0x2b, this->position, NULL, NULL, NULL)){
this->has_met_before = TRUE; this->has_met_before = TRUE;
} }
} }

View File

@@ -69,14 +69,14 @@ void func_80390630(Actor *this){
if (func_80329530(this, 350)) { if (func_80329530(this, 350)) {
if (player_getTransformation() == TRANSFORM_4_WALRUS) { if (player_getTransformation() == TRANSFORM_4_WALRUS) {
if (!levelSpecificFlags_get(LEVEL_FLAG_31_FP_UNKNOWN)) { if (!levelSpecificFlags_get(LEVEL_FLAG_31_FP_UNKNOWN)) {
if (gcdialog_showText(ASSET_C27_TEXT_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)) { if (gcdialog_showText(ASSET_C27_DIALOG_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)) {
levelSpecificFlags_set(LEVEL_FLAG_31_FP_UNKNOWN, TRUE); levelSpecificFlags_set(LEVEL_FLAG_31_FP_UNKNOWN, TRUE);
} }
} }
} }
else { else {
if (!levelSpecificFlags_get(LEVEL_FLAG_32_FP_UNKNOWN)) { if (!levelSpecificFlags_get(LEVEL_FLAG_32_FP_UNKNOWN)) {
if (gcdialog_showText(ASSET_C26_TEXT_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)) { if (gcdialog_showText(ASSET_C26_DIALOG_UNKNOWN, 0x23, NULL, NULL, NULL, NULL)) {
levelSpecificFlags_set(LEVEL_FLAG_32_FP_UNKNOWN, TRUE); levelSpecificFlags_set(LEVEL_FLAG_32_FP_UNKNOWN, TRUE);
} }
} }

View File

@@ -1,7 +1,6 @@
#include <ultra64.h> #include <ultra64.h>
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include "ml/mtx.h"
void chScarfSled_update(Actor *this); void chScarfSled_update(Actor *this);

View File

@@ -199,7 +199,7 @@ void func_8038D3D8(void){
comusic_8025AB44(COMUSIC_68_TWINKLY_MINIGAME, 0, 4000); comusic_8025AB44(COMUSIC_68_TWINKLY_MINIGAME, 0, 4000);
func_8025AABC(COMUSIC_68_TWINKLY_MINIGAME); func_8025AABC(COMUSIC_68_TWINKLY_MINIGAME);
func_8025A58C(-1, 4000); func_8025A58C(-1, 4000);
func_8024BD08(1); core1_ce60_incOrDecCounter(TRUE);
} }
void func_8038D41C(ActorMarker *marker){ void func_8038D41C(ActorMarker *marker){
@@ -265,7 +265,7 @@ void func_8038D5C8(ActorMarker *this_marker, ActorMarker *other_marker){
this->unk1C[1] = 0.0f; this->unk1C[1] = 0.0f;
func_8025A6EC(COMUSIC_68_TWINKLY_MINIGAME, 25000); func_8025A6EC(COMUSIC_68_TWINKLY_MINIGAME, 25000);
func_8025A58C(0, 4000); func_8025A58C(0, 4000);
func_8024BD08(0); core1_ce60_incOrDecCounter(FALSE);
this->unk1C[2] = 428571.0f; this->unk1C[2] = 428571.0f;
func_8025AEA0(0x68, (s32)this->unk1C[2]); func_8025AEA0(0x68, (s32)this->unk1C[2]);
subaddie_set_state_with_direction(this, 3, 0.001f, 1); subaddie_set_state_with_direction(this, 3, 0.001f, 1);

View File

@@ -127,7 +127,7 @@ void func_8038E094(Actor *this){
if(this->unkF4_8 == 1 && !fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)){ if(this->unkF4_8 == 1 && !fileProgressFlag_get(FILEPROG_13_COMPLETED_TWINKLIES_MINIGAME)){
if(this->state != 6 && this->state != 7 && 0.0f == this->velocity[0]){ if(this->state != 6 && this->state != 7 && 0.0f == this->velocity[0]){
timed_setStaticCameraToNode(0.5f, 0xd); timed_setStaticCameraToNode(0.5f, 0xd);
gcdialog_showText(ASSET_C15_TEXT_TWINKLIE_MINIGAME_LOST, 0x2b, this->position, this->marker, func_8038E040, NULL); gcdialog_showText(ASSET_C15_DIALOG_TWINKLIE_MINIGAME_LOST, 0x2b, this->position, this->marker, func_8038E040, NULL);
this->velocity[0] = 1.0f; this->velocity[0] = 1.0f;
subaddie_set_state_with_direction(this, 6, 0.03f, 1); subaddie_set_state_with_direction(this, 6, 0.03f, 1);
actor_loopAnimation(this); actor_loopAnimation(this);

View File

@@ -140,7 +140,7 @@ bool func_8038F5D4(Actor *this, f32 arg1[3], f32 arg2, f32 arg3, s32 arg4){
} }
this->actor_specific_1_f = (1.0f- sp24)*arg2; this->actor_specific_1_f = (1.0f- sp24)*arg2;
func_80329054(this, 2); func_80329054(this, 2);
if(ml_distance_vec3f(this->position, arg1) <= arg4) if(ml_vec3f_distance(this->position, arg1) <= arg4)
return TRUE; return TRUE;
return FALSE; return FALSE;

View File

@@ -28,7 +28,7 @@ void __chXmasTree_free(Actor *this){
item_set(ITEM_6_HOURGLASS, FALSE); item_set(ITEM_6_HOURGLASS, FALSE);
tmp_a0 = this->unk44_31; tmp_a0 = this->unk44_31;
if(tmp_a0){ if(tmp_a0){
func_8030DA44(tmp_a0); sfxsource_freeSfxsourceByIndex(tmp_a0);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
} }
@@ -165,7 +165,7 @@ void chXmasTree_update(Actor *this){
item_set(ITEM_6_HOURGLASS, FALSE); item_set(ITEM_6_HOURGLASS, FALSE);
tmp_a0 = this->unk44_31; tmp_a0 = this->unk44_31;
if(tmp_a0){ if(tmp_a0){
func_8030DA44(tmp_a0); sfxsource_freeSfxsourceByIndex(tmp_a0);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
func_80324E38(0.0f, 3); func_80324E38(0.0f, 3);

View File

@@ -1,7 +1,7 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include <core1/viewport.h>
void func_80390EB0(Actor *this); void func_80390EB0(Actor *this);

View File

@@ -1,8 +1,8 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include "prop.h" #include "prop.h"
#include "SnS.h"
#include "actor.h" #include "actor.h"
extern ActorInfo D_80367FE0; extern ActorInfo D_80367FE0;

View File

@@ -27,7 +27,7 @@ void func_803918C0(void){
void func_8039195C(void){ void func_8039195C(void){
if(D_803935E0.sfxsourceIdx){ if(D_803935E0.sfxsourceIdx){
func_8030DA44(D_803935E0.sfxsourceIdx); sfxsource_freeSfxsourceByIndex(D_803935E0.sfxsourceIdx);
D_803935E0.sfxsourceIdx = 0; D_803935E0.sfxsourceIdx = 0;
} }
} }

View File

@@ -69,7 +69,7 @@ void func_8038ABDC(void){
comusic_8025AB44(COMUSIC_3A_FP_BOGGY_RACE, 0, 4000); comusic_8025AB44(COMUSIC_3A_FP_BOGGY_RACE, 0, 4000);
func_8025AABC(COMUSIC_3A_FP_BOGGY_RACE); func_8025AABC(COMUSIC_3A_FP_BOGGY_RACE);
func_8025A58C(-1, 4000); func_8025A58C(-1, 4000);
func_8024BD08(1); core1_ce60_incOrDecCounter(TRUE);
} }
void func_8038AC20(s32 gate_indx, s32 arg1){ void func_8038AC20(s32 gate_indx, s32 arg1){

View File

@@ -2,7 +2,7 @@
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
extern void func_80244BB0(s32, s32, s32, f32); extern void core1_7090_initSfxSource(s32, s32, s32, f32);
typedef struct { typedef struct {
f32 unk0[3]; f32 unk0[3];
@@ -75,13 +75,13 @@ void func_80386620(Actor *this){
} }
void func_8038678C(void){ void func_8038678C(void){
func_80244BB0(3, 0x85, 0x7ff8, 1.0f); core1_7090_initSfxSource(3, 0x85, 0x7ff8, 1.0f);
func_80244BB0(4, 0x85, 0x7ff8, 1.0f); core1_7090_initSfxSource(4, 0x85, 0x7ff8, 1.0f);
} }
void func_803867CC(void){ void func_803867CC(void){
func_80244C78(3); core1_7090_freeSfxSource(3);
func_80244C78(4); core1_7090_freeSfxSource(4);
} }
void func_803867F4(void){ void func_803867F4(void){
@@ -149,7 +149,7 @@ void chAncientOne_update(Actor *this){
mapSpecificFlags_set(sp38, TRUE); mapSpecificFlags_set(sp38, TRUE);
if(sp38== 0xB){ if(sp38== 0xB){
if(!jiggyscore_isCollected(JIGGY_46_GV_ANCIENT_ONES)){ if(!jiggyscore_isCollected(JIGGY_46_GV_ANCIENT_ONES)){
gcdialog_showText(ASSET_A80_TEXT_ANICIENT_ONES_DONE, 0xE, NULL, this->marker, func_80386850, NULL); gcdialog_showText(ASSET_A80_DIALOG_ANICIENT_ONES_DONE, 0xE, NULL, this->marker, func_80386850, NULL);
} }
else{ else{
func_80386850(this->marker, 0xA80, -1); func_80386850(this->marker, 0xA80, -1);
@@ -158,7 +158,7 @@ void chAncientOne_update(Actor *this){
else { else {
if(sp38== 7){ if(sp38== 7){
if(!jiggyscore_isCollected(JIGGY_46_GV_ANCIENT_ONES)){ if(!jiggyscore_isCollected(JIGGY_46_GV_ANCIENT_ONES)){
gcdialog_showText(ASSET_A7F_TEXT_ANICIENT_ONES_MEET, 0x4, NULL, NULL, NULL, NULL); gcdialog_showText(ASSET_A7F_DIALOG_ANICIENT_ONES_MEET, 0x4, NULL, NULL, NULL, NULL);
} }
} }
@@ -167,7 +167,7 @@ void chAncientOne_update(Actor *this){
if(this->unkF4_8 < 5){ if(this->unkF4_8 < 5){
D_80390C28[this->unkF4_8]->propPtr->unk8_4 = TRUE; D_80390C28[this->unkF4_8]->propPtr->unk8_4 = TRUE;
func_802BAFE4(GV_D_80390C20[this->unkF4_8 - 1]); func_802BAFE4(GV_D_80390C20[this->unkF4_8 - 1]);
func_80244BB0(2, 0x86, 0x7ff8, 0.3f); core1_7090_initSfxSource(2, 0x86, 0x7ff8, 0.3f);
timedFunc_set_0(0.45f, func_8038678C); timedFunc_set_0(0.45f, func_8038678C);
}//L80386DB0 }//L80386DB0
@@ -190,7 +190,7 @@ void chAncientOne_update(Actor *this){
}//L80386D80 }//L80386D80
} }
if(LOCAL_CH_ANCIENT_ONE(this)->unk1C <= this->position_y){ if(LOCAL_CH_ANCIENT_ONE(this)->unk1C <= this->position_y){
func_80244C78(2); core1_7090_freeSfxSource(2);
timedFunc_set_0(0.5f, func_803867CC); timedFunc_set_0(0.5f, func_803867CC);
} }
}//L80386DB0 }//L80386DB0

View File

@@ -89,8 +89,8 @@ s32 func_80387360(void){
void func_8038736C(Actor *this){ void func_8038736C(Actor *this){
ActorLocal_chGobi1 *local = (ActorLocal_chGobi1 *)&this->local; ActorLocal_chGobi1 *local = (ActorLocal_chGobi1 *)&this->local;
chGobi1_setState(this, 0); chGobi1_setState(this, 0);
func_8030DA44(local->unk0[0]); sfxsource_freeSfxsourceByIndex(local->unk0[0]);
func_8030DA44(local->unk0[1]); sfxsource_freeSfxsourceByIndex(local->unk0[1]);
} }
void func_803873B0(ActorMarker *this_marker, ActorMarker *other_marker){ void func_803873B0(ActorMarker *this_marker, ActorMarker *other_marker){
@@ -158,7 +158,7 @@ void chGobi1_update(Actor *this){
timed_playSfx(1.0f, SFX_84_GOBI_CRYING, 1.1f, 30000); timed_playSfx(1.0f, SFX_84_GOBI_CRYING, 1.1f, 30000);
timed_playSfx(2.0f, SFX_84_GOBI_CRYING, 1.3f, 30000); timed_playSfx(2.0f, SFX_84_GOBI_CRYING, 1.3f, 30000);
timed_playSfx(2.5f, SFX_74_WALKING_NOISE_5, 0.5f, 30000); timed_playSfx(2.5f, SFX_74_WALKING_NOISE_5, 0.5f, 30000);
func_80324DBC(3.0f, ASSET_A74_TEXT_GOBI_HELPED, 0x2a, this->position, NULL, NULL, NULL); func_80324DBC(3.0f, ASSET_A74_DIALOG_GOBI_HELPED, 0x2a, this->position, NULL, NULL, NULL);
timed_playSfx(5.0f, SFX_2E_BIGBUTT_RUNNING, 1.0f, 20000); timed_playSfx(5.0f, SFX_2E_BIGBUTT_RUNNING, 1.0f, 20000);
timed_playSfx(5.6f, SFX_2E_BIGBUTT_RUNNING, 1.0f, 20000); timed_playSfx(5.6f, SFX_2E_BIGBUTT_RUNNING, 1.0f, 20000);
timed_playSfx(6.5f, SFX_2E_BIGBUTT_RUNNING, 1.0f, 20000); timed_playSfx(6.5f, SFX_2E_BIGBUTT_RUNNING, 1.0f, 20000);

View File

@@ -85,7 +85,7 @@ void chGobi2_setState(Actor *this, s32 next_state){
timed_playSfx(0.8f, SFX_4B_GULPING, 0.8f, 28000); timed_playSfx(0.8f, SFX_4B_GULPING, 0.8f, 28000);
timed_playSfx(1.4f, SFX_4B_GULPING, 0.8f, 28000); timed_playSfx(1.4f, SFX_4B_GULPING, 0.8f, 28000);
timed_playSfx(2.0f, SFX_4B_GULPING, 0.8f, 28000); timed_playSfx(2.0f, SFX_4B_GULPING, 0.8f, 28000);
func_80324DBC(3.0f, ASSET_A72_TEXT_TRUNKER_HELPED, 0x2A, D_80390CEC, this->marker, func_80387A2C, NULL); func_80324DBC(3.0f, ASSET_A72_DIALOG_TRUNKER_HELPED, 0x2A, D_80390CEC, this->marker, func_80387A2C, NULL);
}//L80387C94 }//L80387C94
if(next_state == 4){ if(next_state == 4){
@@ -203,7 +203,7 @@ void chGobi2_update(Actor *this){
if(!this->has_met_before){ if(!this->has_met_before){
if(func_80329530(this, 0xFA) && !func_80329530(this, 0x50)){ if(func_80329530(this, 0xFA) && !func_80329530(this, 0x50)){
if(func_8028F2A0()){ if(func_8028F2A0()){
if(gcdialog_showText(ASSET_A75_TEXT_GOBI2_MEET, 0, this->position, NULL, NULL, NULL)) if(gcdialog_showText(ASSET_A75_DIALOG_GOBI2_MEET, 0, this->position, NULL, NULL, NULL))
this->has_met_before = TRUE; this->has_met_before = TRUE;
} }
} }

View File

@@ -72,7 +72,7 @@ void chGobi3_setState(Actor *this, s32 next_state){
if(next_state == 5){ if(next_state == 5){
skeletalAnim_set(this->unk148, 0xd9, 0.5f, 4.0f); skeletalAnim_set(this->unk148, 0xd9, 0.5f, 4.0f);
gcdialog_showText(ASSET_A77_TEXT_GOBI3_DONE, 0xe, this->position, this->marker, __chGobi3_runaway, NULL); gcdialog_showText(ASSET_A77_DIALOG_GOBI3_DONE, 0xe, this->position, this->marker, __chGobi3_runaway, NULL);
} }
if(next_state == 4){ if(next_state == 4){

View File

@@ -98,7 +98,7 @@ void func_8038DB88(Actor *this){
if(func_8030E3FC(tmp)){ if(func_8030E3FC(tmp)){
func_8030E394(this->unk44_31); func_8030E394(this->unk44_31);
} }
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
} }

View File

@@ -85,7 +85,7 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){
} }
if (!levelSpecificFlags_get(LEVEL_FLAG_16_GV_UNKNOWN)) { if (!levelSpecificFlags_get(LEVEL_FLAG_16_GV_UNKNOWN)) {
gcdialog_showText(ASSET_A82_TEXT_SANDYBUTT_START_MAZE, 4, NULL, NULL, NULL, NULL); gcdialog_showText(ASSET_A82_DIALOG_SANDYBUTT_START_MAZE, 4, NULL, NULL, NULL, NULL);
levelSpecificFlags_set(LEVEL_FLAG_16_GV_UNKNOWN, TRUE); levelSpecificFlags_set(LEVEL_FLAG_16_GV_UNKNOWN, TRUE);
} }
}//L8038F794 }//L8038F794
@@ -135,7 +135,7 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){
func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7fff); func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7fff);
if(!levelSpecificFlags_get(LEVEL_FLAG_17_GV_UNKNOWN)){ if(!levelSpecificFlags_get(LEVEL_FLAG_17_GV_UNKNOWN)){
gcdialog_showText(ASSET_A83_TEXT_SANDYBUTT_DONE, 4, NULL, NULL, NULL, NULL); gcdialog_showText(ASSET_A83_DIALOG_SANDYBUTT_DONE, 4, NULL, NULL, NULL, NULL);
levelSpecificFlags_set(LEVEL_FLAG_17_GV_UNKNOWN, TRUE); levelSpecificFlags_set(LEVEL_FLAG_17_GV_UNKNOWN, TRUE);
} }
} }
@@ -178,7 +178,7 @@ void chMazeCtrl_update(Actor *this){
if (!levelSpecificFlags_get(LEVEL_FLAG_15_GV_UNKNOWN) if (!levelSpecificFlags_get(LEVEL_FLAG_15_GV_UNKNOWN)
&& ml_timer_update(&local->unk8, sp34) && ml_timer_update(&local->unk8, sp34)
&& gcdialog_showText(ASSET_A81_TEXT_SANDYBUTT_ENTER, 0, NULL, NULL, NULL, NULL) && gcdialog_showText(ASSET_A81_DIALOG_SANDYBUTT_ENTER, 0, NULL, NULL, NULL, NULL)
) { ) {
levelSpecificFlags_set(LEVEL_FLAG_15_GV_UNKNOWN, TRUE); levelSpecificFlags_set(LEVEL_FLAG_15_GV_UNKNOWN, TRUE);
} }

View File

@@ -74,7 +74,7 @@ void chTrucker_update(Actor *this){
&& !func_80329530(this, 80) && !func_80329530(this, 80)
&& func_8028F2A0() && func_8028F2A0()
){ ){
gcdialog_showText(ASSET_A71_TEXT_TRUNKER_MEET, 0xe, this->position, NULL, NULL, NULL); gcdialog_showText(ASSET_A71_DIALOG_TRUNKER_MEET, 0xe, this->position, NULL, NULL, NULL);
this->has_met_before = TRUE; this->has_met_before = TRUE;
}//L80389254 }//L80389254

View File

@@ -29,14 +29,14 @@ void func_80389A20(ActorMarker *caller, enum asset_e text_id, s32 arg2){
} }
void func_80389A60(Actor *this){ void func_80389A60(Actor *this){
gcdialog_showText(ASSET_A70_TEXT_CHARMER_HELPED, 4, NULL, this->marker, func_80389A20, NULL); gcdialog_showText(ASSET_A70_DIALOG_CHARMER_HELPED, 4, NULL, this->marker, func_80389A20, NULL);
this->has_met_before = TRUE; this->has_met_before = TRUE;
subaddie_set_state(this, 5); subaddie_set_state(this, 5);
} }
void func_80389ABC(Actor *this){ void func_80389ABC(Actor *this){
if(this->unk138_23){ if(this->unk138_23){
func_80389A20(this->marker, ASSET_A70_TEXT_CHARMER_HELPED, -1); func_80389A20(this->marker, ASSET_A70_DIALOG_CHARMER_HELPED, -1);
} }
else{ else{
this->unk138_23 = TRUE; this->unk138_23 = TRUE;
@@ -63,7 +63,7 @@ void func_80389B1C(Actor *this){
if(this->state == 1 || this->state == 2){ if(this->state == 1 || this->state == 2){
if(! this->has_met_before && func_80329530(this, 250) && !func_80329530(this, 0x50)){ if(! this->has_met_before && func_80329530(this, 250) && !func_80329530(this, 0x50)){
gcdialog_showText(ASSET_A6F_TEXT_CHARMER_MEET, 0xe, this->position, NULL, NULL, NULL); gcdialog_showText(ASSET_A6F_DIALOG_CHARMER_MEET, 0xe, this->position, NULL, NULL, NULL);
this->has_met_before = TRUE; this->has_met_before = TRUE;
mapSpecificFlags_set(0, TRUE); mapSpecificFlags_set(0, TRUE);
} }

View File

@@ -1,7 +1,7 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include <core1/viewport.h>
void GV_func_8038A084(Actor *this); void GV_func_8038A084(Actor *this);

View File

@@ -2,7 +2,6 @@
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
f32 func_80257204(f32, f32, f32, f32);
void func_8038B124(Actor *this); void func_8038B124(Actor *this);
/* .data */ /* .data */

View File

@@ -63,7 +63,7 @@ void func_8038BA08(Actor *this){
if(func_8028ECAC() == BSGROUP_6_TURBO_TALON_TRAINERS) if(func_8028ECAC() == BSGROUP_6_TURBO_TALON_TRAINERS)
player_stateTimer_set(STATE_TIMER_3_TURBO_TALON, 0.0f); player_stateTimer_set(STATE_TIMER_3_TURBO_TALON, 0.0f);
gcdialog_showText(ASSET_A79_TEXT_GRABBA_DEFEAT, 0xf, this->position, this->marker, func_8038B988, NULL); gcdialog_showText(ASSET_A79_DIALOG_GRABBA_DEFEAT, 0xf, this->position, this->marker, func_8038B988, NULL);
comusic_8025AB44(COMUSIC_57_TURBO_TRAINERS, 7000, 700); comusic_8025AB44(COMUSIC_57_TURBO_TRAINERS, 7000, 700);
} }
@@ -245,7 +245,7 @@ void GV_func_8038BEA0(Actor *this){
} }
else{ else{
if(!this->has_met_before){ if(!this->has_met_before){
if(gcdialog_showText(ASSET_A78_TEXT_GRABBA_MEET, 0, NULL, NULL, NULL, NULL)){ if(gcdialog_showText(ASSET_A78_DIALOG_GRABBA_MEET, 0, NULL, NULL, NULL, NULL)){
this->has_met_before = TRUE; this->has_met_before = TRUE;
} }
} }
@@ -276,7 +276,7 @@ void GV_func_8038BEA0(Actor *this){
} }
if(!this->unk138_23){ if(!this->unk138_23){
if(gcdialog_showText(ASSET_A7A_TEXT_GRABBA_TOO_FAST, 0, NULL, NULL, NULL, NULL)){ if(gcdialog_showText(ASSET_A7A_DIALOG_GRABBA_TOO_FAST, 0, NULL, NULL, NULL, NULL)){
this->unk138_23 = TRUE; this->unk138_23 = TRUE;
} }
} }

View File

@@ -74,7 +74,7 @@ void func_8038C8A0(Actor *this, s32 next_state){
this->marker->propPtr->unk8_3 = (next_state == 1) ? FALSE : TRUE; this->marker->propPtr->unk8_3 = (next_state == 1) ? FALSE : TRUE;
this->marker->collidable = (next_state == 1) ? FALSE : TRUE; this->marker->collidable = (next_state == 1) ? FALSE : TRUE;
if(this->state == 4 || this->state == 5) if(this->state == 4 || this->state == 5)
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
if(next_state == 4 || next_state == 5){ if(next_state == 4 || next_state == 5){
local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex(); local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex();

View File

@@ -38,7 +38,7 @@ void func_8038D47C(Actor *this){
this->spawn_position_y = 2997.0f; this->spawn_position_y = 2997.0f;
this->spawn_position_z = 5884.0f; this->spawn_position_z = 5884.0f;
}//L8038D4FC }//L8038D4FC
tmp_v0 = func_80304CAC(0x32f, this->spawn_position); tmp_v0 = nodeprop_findByActorIdAndPosition_f32(ACTOR_32F_UNKNOWN, this->spawn_position);
if(!tmp_v0){ if(!tmp_v0){
this->unk1C_x = -1394.0f; this->unk1C_x = -1394.0f;
this->unk1C_y = 2811.0f; this->unk1C_y = 2811.0f;
@@ -48,7 +48,7 @@ void func_8038D47C(Actor *this){
nodeprop_getPosition(tmp_v0, this->unk1C); nodeprop_getPosition(tmp_v0, this->unk1C);
} }
tmp_v0 = func_80304CAC(0x330, this->spawn_position); tmp_v0 = nodeprop_findByActorIdAndPosition_f32(ACTOR_330_UNKNOWN, this->spawn_position);
if(!tmp_v0){ if(!tmp_v0){
this->velocity_x = -1424.0f; this->velocity_x = -1424.0f;
this->velocity_y = 2811.0f; this->velocity_y = 2811.0f;
@@ -72,8 +72,8 @@ void func_8038D47C(Actor *this){
if(!mapSpecificFlags_get(0x14)){ if(!mapSpecificFlags_get(0x14)){
player_getPosition(sp3C); player_getPosition(sp3C);
if(func_8028ECAC() == 0){ if(func_8028ECAC() == 0){
if( ml_distance_vec3f(sp3C, this->unk1C) < 100.0f || ml_distance_vec3f(sp3C, this->velocity) < 100.0f){ if( ml_vec3f_distance(sp3C, this->unk1C) < 100.0f || ml_vec3f_distance(sp3C, this->velocity) < 100.0f){
if(gcdialog_showText(ASSET_A7B_TEXT_JINXY_MEET, 0, NULL, NULL, NULL, NULL)){ if(gcdialog_showText(ASSET_A7B_DIALOG_JINXY_MEET, 0, NULL, NULL, NULL, NULL)){
mapSpecificFlags_set(0x14, 1); mapSpecificFlags_set(0x14, 1);
} }
} }
@@ -102,7 +102,7 @@ void func_8038D47C(Actor *this){
} }
if( actor_animationIsAt(this, 0.99f) ){ if( actor_animationIsAt(this, 0.99f) ){
if(--this->unk38_31 == 0){ if(--this->unk38_31 == 0){
gcdialog_showText(ASSET_A7C_TEXT_JINXY_ONE_EGG, 4, NULL, NULL, NULL, NULL); gcdialog_showText(ASSET_A7C_DIALOG_JINXY_ONE_EGG, 4, NULL, NULL, NULL, NULL);
mapSpecificFlags_set(0x14, TRUE); mapSpecificFlags_set(0x14, TRUE);
subaddie_set_state_forward(this, 1); subaddie_set_state_forward(this, 1);
} }

View File

@@ -1,10 +1,10 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include "SnS.h"
#include "actor.h" #include "actor.h"
extern void func_80244BB0(s32, s32, s32, f32); extern void core1_7090_initSfxSource(s32, s32, s32, f32);
extern void func_802D3D54(Actor *this); extern void func_802D3D54(Actor *this);
extern void func_802D3D74(Actor *this); extern void func_802D3D74(Actor *this);
extern Actor *func_80325F2C(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); extern Actor *func_80325F2C(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
@@ -177,7 +177,7 @@ void func_8038E460(Actor *this){//banjo_door
if(!mapSpecificFlags_get(2)){ if(!mapSpecificFlags_get(2)){
mapSpecificFlags_set(2, TRUE); mapSpecificFlags_set(2, TRUE);
func_8028F918(0); func_8028F918(0);
func_80324DBC(4.0f, ASSET_A7D_TEXT_JINXY_HELPED, 4, NULL, NULL, NULL, NULL); func_80324DBC(4.0f, ASSET_A7D_DIALOG_JINXY_HELPED, 4, NULL, NULL, NULL, NULL);
} }
} }
} }
@@ -231,7 +231,7 @@ void func_8038E648(Actor *this){
func_802BAFE4(2); func_802BAFE4(2);
subaddie_set_state(this, 6); subaddie_set_state(this, 6);
this->unk38_31 = 600; this->unk38_31 = 600;
func_80244BB0(0, 0x6A, 0x7ff8, 0.3f); core1_7090_initSfxSource(0, 0x6A, 0x7ff8, 0.3f);
func_802D68F0(25); func_802D68F0(25);
item_set(ITEM_6_HOURGLASS, 1); item_set(ITEM_6_HOURGLASS, 1);
} }
@@ -243,7 +243,7 @@ void func_8038E648(Actor *this){
subaddie_set_state(this, 7); subaddie_set_state(this, 7);
this->pitch = 90.0f; this->pitch = 90.0f;
func_8030E540(SFX_7F_HEAVYDOOR_SLAM); func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
func_80244C78(0); core1_7090_freeSfxSource(0);
} }
break; break;
@@ -251,7 +251,7 @@ void func_8038E648(Actor *this){
this->unk38_31 -= time_getDelta(); this->unk38_31 -= time_getDelta();
if(this->unk38_31 == 0){ if(this->unk38_31 == 0){
subaddie_set_state(this, 8); subaddie_set_state(this, 8);
func_80244BB0(0, 0x6A, 0x7ff8, 0.3f); core1_7090_initSfxSource(0, 0x6A, 0x7ff8, 0.3f);
} }
break; break;
@@ -262,7 +262,7 @@ void func_8038E648(Actor *this){
this->pitch = 0.0f; this->pitch = 0.0f;
func_8030E540(SFX_7F_HEAVYDOOR_SLAM); func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
mapSpecificFlags_set(5, FALSE); mapSpecificFlags_set(5, FALSE);
func_80244C78(0); core1_7090_freeSfxSource(0);
volatileFlag_setAndTriggerDialog_0(VOLATILE_FLAG_AC_GV_TRAPDOOR_MISSED); volatileFlag_setAndTriggerDialog_0(VOLATILE_FLAG_AC_GV_TRAPDOOR_MISSED);
} }
break; break;
@@ -296,7 +296,7 @@ void func_8038E97C(Actor *this){
this->position_y += 130.0; this->position_y += 130.0;
this->unk38_31 = 30; this->unk38_31 = 30;
subaddie_set_state(this, 8); subaddie_set_state(this, 8);
func_80244BB0(1, 0x6A, 0x7ff8, 0.3f); core1_7090_initSfxSource(1, 0x6A, 0x7ff8, 0.3f);
} }
}//L8038EA6C }//L8038EA6C
@@ -314,7 +314,7 @@ void func_8038E97C(Actor *this){
this->unk38_31 -= 1; this->unk38_31 -= 1;
if(this->unk38_31 == 0){ if(this->unk38_31 == 0){
subaddie_set_state(this, 1); subaddie_set_state(this, 1);
func_80244C78(1); core1_7090_freeSfxSource(1);
func_8030E540(SFX_7F_HEAVYDOOR_SLAM); func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
} }
@@ -330,7 +330,7 @@ void chKazooieDoor_update(Actor *this){
func_8025A6EC(COMUSIC_2B_DING_B, -1); func_8025A6EC(COMUSIC_2B_DING_B, -1);
func_802BAFE4(3); func_802BAFE4(3);
subaddie_set_state(this, 6); subaddie_set_state(this, 6);
func_80244BB0(1, 0x6a, 0x7ff8, 0.3f); core1_7090_initSfxSource(1, 0x6a, 0x7ff8, 0.3f);
this->unk1C[1] = this->position_y + 210.0f; this->unk1C[1] = this->position_y + 210.0f;
this->unk1C[0] = this->position_y; this->unk1C[0] = this->position_y;
} }
@@ -342,7 +342,7 @@ void chKazooieDoor_update(Actor *this){
if(this->unk1C[1] <= this->position_y){ if(this->unk1C[1] <= this->position_y){
subaddie_set_state(this, 7); subaddie_set_state(this, 7);
func_8030E540(SFX_7F_HEAVYDOOR_SLAM); func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
func_80244C78(1); core1_7090_freeSfxSource(1);
this->unk38_31 = 450; this->unk38_31 = 450;
} }
break; break;
@@ -351,7 +351,7 @@ void chKazooieDoor_update(Actor *this){
this->unk38_31--; this->unk38_31--;
if(this->unk38_31 == 0){ if(this->unk38_31 == 0){
subaddie_set_state(this, 8); subaddie_set_state(this, 8);
func_80244BB0(1, 0x6a, 0x7ff8, 0.3f); core1_7090_initSfxSource(1, 0x6a, 0x7ff8, 0.3f);
} }
break; break;
@@ -362,7 +362,7 @@ void chKazooieDoor_update(Actor *this){
this->position_y = this->unk1C[0]; this->position_y = this->unk1C[0];
subaddie_set_state(this, 1); subaddie_set_state(this, 1);
func_8030E540(SFX_7F_HEAVYDOOR_SLAM); func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
func_80244C78(1); core1_7090_freeSfxSource(1);
mapSpecificFlags_set(6, FALSE); mapSpecificFlags_set(6, FALSE);
} }
break; break;

View File

@@ -8,7 +8,7 @@
/* external function declarations */ /* external function declarations */
void func_80353064(f32 *, f32); void func_80353064(f32 *, f32);
void func_802BB3DC(s32, f32, f32); void func_802BB3DC(s32, f32, f32);
void func_80244BB0(s32, s32, s32, f32); void core1_7090_initSfxSource(s32, s32, s32, f32);
/* public function declarations */ /* public function declarations */
void chchimpystump_update(Actor *this); void chchimpystump_update(Actor *this);
@@ -33,7 +33,7 @@ void __chchimpystump_updateShaking(Actor *this) {
if (this->unk10_12 == 0) { if (this->unk10_12 == 0) {
this->unk10_12 = 1; this->unk10_12 = 1;
func_802BB3DC(1, 3.0f, 1.0f); func_802BB3DC(1, 3.0f, 1.0f);
func_80244BB0(0, 0x6A, 0x7FF8, 0.2f); core1_7090_initSfxSource(0, 0x6A, 0x7FF8, 0.2f);
}//L80386D0C }//L80386D0C
this->position_x = ((globalTimer_getTime() & 1) * 2) ^ (s32) this->position_x; this->position_x = ((globalTimer_getTime() & 1) * 2) ^ (s32) this->position_x;
@@ -67,7 +67,7 @@ void chchimpystump_update(Actor *this) {
this->position_y = this->actor_specific_1_f; this->position_y = this->actor_specific_1_f;
subaddie_set_state(this, CHIMPY_STUMP_STATE_3_RAISED); subaddie_set_state(this, CHIMPY_STUMP_STATE_3_RAISED);
func_802BB41C(1); func_802BB41C(1);
func_80244C78(0); core1_7090_freeSfxSource(0);
} }
if ((globalTimer_getTime() & 3) == 2) { if ((globalTimer_getTime() & 3) == 2) {

View File

@@ -140,7 +140,7 @@ void func_80387168(ActorMarker *marker, ActorMarker *other_marker){
){ ){
func_8038708C(actorPtr, 2); func_8038708C(actorPtr, 2);
if(actorPtr->unk38_31 == 1){ if(actorPtr->unk38_31 == 1){
gcdialog_showText(ASSET_B39_TEXT_CONGA_HIT_BY_EGG, 4, actorPtr->position, 0, 0, 0); gcdialog_showText(ASSET_B39_DIALOG_CONGA_HIT_BY_EGG, 4, actorPtr->position, 0, 0, 0);
} }
} }
} }
@@ -150,12 +150,12 @@ void func_80387168(ActorMarker *marker, ActorMarker *other_marker){
int func_803872EC(void){ int func_803872EC(void){
s32 text_id = func_803114C4(); s32 text_id = func_803114C4();
return text_id == ASSET_B37_TEXT_CONGA_SAFE_UP_HERE return text_id == ASSET_B37_DIALOG_CONGA_SAFE_UP_HERE
|| text_id == ASSET_B38_TEXT_CONGA_DEFEAT || text_id == ASSET_B38_DIALOG_CONGA_DEFEAT
|| volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE) || volatileFlag_get(VOLATILE_FLAG_1F_IN_CHARACTER_PARADE)
|| text_id == ASSET_B3B_TEXT_CONGA_ORANGE_PAD_JIGGY || text_id == ASSET_B3B_DIALOG_CONGA_ORANGE_PAD_JIGGY
|| text_id == ASSET_B45_TEXT_JIGGY_COLLECT_10 || text_id == ASSET_B45_DIALOG_JIGGY_COLLECT_10
|| text_id == ASSET_B51_TEXT_BOTTLES_HOW_TO_EXIT_LEVEL; || text_id == ASSET_B51_DIALOG_BOTTLES_HOW_TO_EXIT_LEVEL;
} }
void func_80387370(ActorMarker *this, enum asset_e text_id, s32 arg2){ void func_80387370(ActorMarker *this, enum asset_e text_id, s32 arg2){
@@ -249,14 +249,14 @@ void func_803876D0(Actor *this){
sp3C = func_80329530(this, 1000); sp3C = func_80329530(this, 1000);
if( func_8032A9E4(((ActorLocal_Conga *)&this->local)->unk10, ((ActorLocal_Conga *)&this->local)->unk18, ((ActorLocal_Conga *)&this->local)->unk1C) if( func_8032A9E4(((ActorLocal_Conga *)&this->local)->unk10, ((ActorLocal_Conga *)&this->local)->unk18, ((ActorLocal_Conga *)&this->local)->unk1C)
&& !this->unk138_23 && !this->unk138_23
&& gcdialog_showText(ASSET_B37_TEXT_CONGA_SAFE_UP_HERE, 0, 0, 0, 0, 0) && gcdialog_showText(ASSET_B37_DIALOG_CONGA_SAFE_UP_HERE, 0, 0, 0, 0, 0)
){ ){
this->unk138_23 = 1; this->unk138_23 = 1;
mapSpecificFlags_set(MM_SPECIFIC_FLAG_A_UNKNOWN, TRUE); mapSpecificFlags_set(MM_SPECIFIC_FLAG_A_UNKNOWN, TRUE);
}//L803878F8 }//L803878F8
if( sp3C && !this->has_met_before){ if( sp3C && !this->has_met_before){
if(gcdialog_showText((player_getTransformation()== TRANSFORM_2_TERMITE) ? ASSET_B3E_TEXT_CONGA_MEET_AS_TERMITE : ASSET_B3C_TEXT_CONGA_MEET, 0, this->position, 0,0,0)){ if(gcdialog_showText((player_getTransformation()== TRANSFORM_2_TERMITE) ? ASSET_B3E_DIALOG_CONGA_MEET_AS_TERMITE : ASSET_B3C_DIALOG_CONGA_MEET, 0, this->position, 0,0,0)){
this->has_met_before = TRUE; this->has_met_before = TRUE;
} }
} //L80387968 } //L80387968
@@ -348,7 +348,7 @@ void func_803876D0(Actor *this){
actor_playAnimationOnce(this); actor_playAnimationOnce(this);
if(actor_animationIsAt(this, 0.99f)){ if(actor_animationIsAt(this, 0.99f)){
subaddie_set_state_with_direction(this, 3, 0.0f, 1); subaddie_set_state_with_direction(this, 3, 0.0f, 1);
gcdialog_showText(ASSET_B38_TEXT_CONGA_DEFEAT, 0xe, this->position, this->marker, func_80387370, NULL); gcdialog_showText(ASSET_B38_DIALOG_CONGA_DEFEAT, 0xe, this->position, this->marker, func_80387370, NULL);
} }
break; break;

View File

@@ -138,7 +138,7 @@ void chjujuhitbox_update(Actor *this) {
} }
if (func_80329530(this, 0xfa) && !func_80329530(this, 0x50) && !func_8028ECAC()) { if (func_80329530(this, 0xfa) && !func_80329530(this, 0x50) && !func_8028ECAC()) {
if (!this->has_met_before && gcdialog_showText(ASSET_B44_TEXT_JUJU_MEET, 0, 0, 0, NULL, NULL)) { if (!this->has_met_before && gcdialog_showText(ASSET_B44_DIALOG_JUJU_MEET, 0, 0, 0, NULL, NULL)) {
this->has_met_before = TRUE; this->has_met_before = TRUE;
} }
} }

View File

@@ -30,7 +30,7 @@ f32 D_80389A00[3] = {0.0f, 0.0f, 0.0f};
void __chorange_collisionCallback(ActorMarker *marker, ActorMarker *other_marker) { void __chorange_collisionCallback(ActorMarker *marker, ActorMarker *other_marker) {
if (!player_isDead() && if (!player_isDead() &&
!mapSpecificFlags_get(MM_SPECIFIC_FLAG_8_HIT_WITH_ORANGE) && !mapSpecificFlags_get(MM_SPECIFIC_FLAG_8_HIT_WITH_ORANGE) &&
gcdialog_showText(ASSET_B3A_TEXT_CONGA_HITS_PLAYER, 0, 0, 0, NULL, NULL)) { gcdialog_showText(ASSET_B3A_DIALOG_CONGA_HITS_PLAYER, 0, 0, 0, NULL, NULL)) {
mapSpecificFlags_set(MM_SPECIFIC_FLAG_8_HIT_WITH_ORANGE, TRUE); mapSpecificFlags_set(MM_SPECIFIC_FLAG_8_HIT_WITH_ORANGE, TRUE);
} }

View File

@@ -2,9 +2,6 @@
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
/* extern functions */
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
/* public functions */ /* public functions */
void chLoggo_update(Actor *this); void chLoggo_update(Actor *this);
@@ -44,7 +41,7 @@ void __chLoggo_collide(ActorMarker *this_marker, ActorMarker *other_marker) {
Actor *this = marker_getActor(this_marker); Actor *this = marker_getActor(this_marker);
if ((player_getTransformation() == TRANSFORM_3_PUMPKIN) && !fileProgressFlag_get(FILEPROG_89_ENTERED_LOGGO_AS_PUMPKIN)) { if ((player_getTransformation() == TRANSFORM_3_PUMPKIN) && !fileProgressFlag_get(FILEPROG_89_ENTERED_LOGGO_AS_PUMPKIN)) {
if (gcdialog_showText(ASSET_ADF_TEXT_ENTER_LOGGO, 0x2B, this->position, this->marker, &__chLoggo_textCallback, 0) != 0) { if (gcdialog_showText(ASSET_ADF_DIALOG_ENTER_LOGGO, 0x2B, this->position, this->marker, &__chLoggo_textCallback, 0) != 0) {
actor_collisionOff(this); actor_collisionOff(this);
fileProgressFlag_set(FILEPROG_89_ENTERED_LOGGO_AS_PUMPKIN, TRUE); fileProgressFlag_set(FILEPROG_89_ENTERED_LOGGO_AS_PUMPKIN, TRUE);
} }
@@ -58,7 +55,7 @@ void __chLoggo_collide(ActorMarker *this_marker, ActorMarker *other_marker) {
} }
if ((player_getTransformation() == TRANSFORM_1_BANJO) && !fileProgressFlag_get(FILEPROG_88_TRIED_LOGGO_AS_BEAR)) { if ((player_getTransformation() == TRANSFORM_1_BANJO) && !fileProgressFlag_get(FILEPROG_88_TRIED_LOGGO_AS_BEAR)) {
if (gcdialog_showText(ASSET_ADE_TEXT_LOGGO_AS_BEAR, 0x2A, this->position, NULL, NULL, NULL)) { if (gcdialog_showText(ASSET_ADE_DIALOG_LOGGO_AS_BEAR, 0x2A, this->position, NULL, NULL, NULL)) {
fileProgressFlag_set(FILEPROG_88_TRIED_LOGGO_AS_BEAR, TRUE); fileProgressFlag_set(FILEPROG_88_TRIED_LOGGO_AS_BEAR, TRUE);
} }
} }
@@ -84,7 +81,7 @@ void chLoggo_update(Actor *this) {
this->lifetime_value = 0.0f; this->lifetime_value = 0.0f;
if (!fileProgressFlag_get(FILEPROG_8A_EXITED_LOGGO) && levelSpecificFlags_get(LEVEL_FLAG_33_MMM_UNKNOWN)) { if (!fileProgressFlag_get(FILEPROG_8A_EXITED_LOGGO) && levelSpecificFlags_get(LEVEL_FLAG_33_MMM_UNKNOWN)) {
if (gcdialog_showText(ASSET_AE0_TEXT_EXIT_LOGGO, 4, NULL, NULL, NULL, NULL)) { if (gcdialog_showText(ASSET_AE0_DIALOG_EXIT_LOGGO, 4, NULL, NULL, NULL, NULL)) {
fileProgressFlag_set(FILEPROG_8A_EXITED_LOGGO, TRUE); fileProgressFlag_set(FILEPROG_8A_EXITED_LOGGO, TRUE);
} }
} }

View File

@@ -1,7 +1,7 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include <core1/viewport.h>
typedef struct{ typedef struct{
ActorMarker *jiggy_marker; ActorMarker *jiggy_marker;

View File

@@ -210,7 +210,7 @@ void chChompa_update(Actor *this) {
}//L803880B4 }//L803880B4
player_getPosition(plyr_position); player_getPosition(plyr_position);
plyr_dist = ml_distance_vec3f(this->position, plyr_position); plyr_dist = ml_vec3f_distance(this->position, plyr_position);
if (this->state == CHOMPA_STATE_4_BITING) { if (this->state == CHOMPA_STATE_4_BITING) {
actor_collisionOn(this); actor_collisionOn(this);

View File

@@ -1,7 +1,7 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include "SnS.h"
#include "actor.h" #include "actor.h"
extern ActorInfo D_8038BC28; extern ActorInfo D_8038BC28;
@@ -33,7 +33,7 @@ extern ActorInfo D_8038BEFC;
extern ActorInfo D_80367E70; extern ActorInfo D_80367E70;
extern ActorInfo D_80372C3C; extern ActorInfo D_80372C3C;
extern void func_80244BB0(s32, s32, s32, f32); extern void core1_7090_initSfxSource(s32, s32, s32, f32);
extern void func_8025AE0C(s32, f32); extern void func_8025AE0C(s32, f32);
extern void func_802EE6CC(f32[3], f32[3], s32[4], s32, f32, f32, s32, s32, s32); extern void func_802EE6CC(f32[3], f32[3], s32[4], s32, f32, f32, s32, s32, s32);
extern void *func_80309B48(f32[3], f32[3], f32[3], u32); extern void *func_80309B48(f32[3], f32[3], f32[3], u32);
@@ -307,7 +307,7 @@ void func_80388BDC(Actor *this) {
if(mapSpecificFlags_get(MMM_SPECIFIC_FLAG_0_UNKNOWN)) { if(mapSpecificFlags_get(MMM_SPECIFIC_FLAG_0_UNKNOWN)) {
func_802BAFE4(0x21); func_802BAFE4(0x21);
subaddie_set_state(this, 6); subaddie_set_state(this, 6);
func_80244BB0(0, 0x6A, 0x7FF8, 0.3f); core1_7090_initSfxSource(0, 0x6A, 0x7FF8, 0.3f);
mapSpecificFlags_set(MMM_SPECIFIC_FLAG_2_UNKNOWN, FALSE); mapSpecificFlags_set(MMM_SPECIFIC_FLAG_2_UNKNOWN, FALSE);
func_8025A6EC(COMUSIC_4_MMM_CLOCK_VERSION, -1); func_8025A6EC(COMUSIC_4_MMM_CLOCK_VERSION, -1);
func_8025AE0C(2000, 3.0f); func_8025AE0C(2000, 3.0f);
@@ -320,7 +320,7 @@ void func_80388BDC(Actor *this) {
subaddie_set_state(this, 7U); subaddie_set_state(this, 7U);
this->yaw = 270.0f; this->yaw = 270.0f;
func_8030E540(0x7F); func_8030E540(0x7F);
func_80244C78(0); core1_7090_freeSfxSource(0);
func_802D68F0(0xE); func_802D68F0(0xE);
item_set(6, 1); item_set(6, 1);
} }
@@ -341,7 +341,7 @@ void func_80388BDC(Actor *this) {
func_802BAFE4(0x23); func_802BAFE4(0x23);
} }
subaddie_set_state(this, 8); subaddie_set_state(this, 8);
func_80244BB0(0, 0x6A, 0x7FF8, 0.3f); core1_7090_initSfxSource(0, 0x6A, 0x7FF8, 0.3f);
} }
break; break;
case 8: case 8:
@@ -351,7 +351,7 @@ void func_80388BDC(Actor *this) {
this->yaw = 0.0f; this->yaw = 0.0f;
func_8030E540(SFX_7F_HEAVYDOOR_SLAM); func_8030E540(SFX_7F_HEAVYDOOR_SLAM);
mapSpecificFlags_set(MMM_SPECIFIC_FLAG_0_UNKNOWN, FALSE); mapSpecificFlags_set(MMM_SPECIFIC_FLAG_0_UNKNOWN, FALSE);
func_80244C78(0); core1_7090_freeSfxSource(0);
if (!this->unk38_31) { if (!this->unk38_31) {
func_8025A6EC(COMUSIC_3C_MINIGAME_LOSS, 0x7FF8); func_8025A6EC(COMUSIC_3C_MINIGAME_LOSS, 0x7FF8);
func_8025AE0C(0x7D0, 2.5f); func_8025AE0C(0x7D0, 2.5f);

View File

@@ -177,7 +177,7 @@ void func_803898EC() {
} }
void func_80389910() { void func_80389910() {
gcdialog_showText(ASSET_AD5_TEXT_UNKNOWN, 0xE, NULL, NULL, MMM_func_80389810, NULL); gcdialog_showText(ASSET_AD5_DIALOG_UNKNOWN, 0xE, NULL, NULL, MMM_func_80389810, NULL);
timedFunc_set_2(0.0f, func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF); timedFunc_set_2(0.0f, func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF);
timed_setStaticCameraToNode(2.0f, 0); timed_setStaticCameraToNode(2.0f, 0);
timedFunc_set_0(2.1f, MMM_func_803898A0); timedFunc_set_0(2.1f, MMM_func_803898A0);
@@ -198,10 +198,10 @@ void organMinigame_setState(s32 next_state){
if (next_state == 2) { if (next_state == 2) {
if (D_8038C4F0.pattern == 0) { if (D_8038C4F0.pattern == 0) {
D_8038C4F0.pattern = 1; D_8038C4F0.pattern = 1;
gcdialog_showText(ASSET_AD3_TEXT_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL); gcdialog_showText(ASSET_AD3_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
} }
else {//L80389A84 else {//L80389A84
gcdialog_showText(ASSET_AD6_TEXT_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL); gcdialog_showText(ASSET_AD6_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
} }
}//L80389A9C }//L80389A9C
@@ -218,13 +218,13 @@ void organMinigame_setState(s32 next_state){
}//L80389AF4 }//L80389AF4
if(next_state == 4){ if(next_state == 4){
gcdialog_showText(ASSET_ADD_TEXT_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL); gcdialog_showText(ASSET_ADD_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
func_80387720(D_8038C4F0.motzhand_marker); func_80387720(D_8038C4F0.motzhand_marker);
} }
if(next_state == 5){ if(next_state == 5){
D_8038C4F0.pattern++; D_8038C4F0.pattern++;
gcdialog_showText(ASSET_AD4_TEXT_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL); gcdialog_showText(ASSET_AD4_DIALOG_UNKNOWN, 4, NULL, NULL, MMM_func_80389810, NULL);
func_80387720(D_8038C4F0.motzhand_marker); func_80387720(D_8038C4F0.motzhand_marker);
} }
@@ -385,7 +385,7 @@ void organMinigame_update(void){
if(func_8038769C(D_8038C4F0.motzhand_marker)){ if(func_8038769C(D_8038C4F0.motzhand_marker)){
player_getPosition(plyr_pos); player_getPosition(plyr_pos);
motzhand_2 = marker_getActor(D_8038C4F0.motzhand_marker); motzhand_2 = marker_getActor(D_8038C4F0.motzhand_marker);
if( ml_distance_vec3f(motzhand_2->position, plyr_pos) < 400.0f if( ml_vec3f_distance(motzhand_2->position, plyr_pos) < 400.0f
&& motzhand_2->position_y - 50.0f <= plyr_pos[1] && motzhand_2->position_y - 50.0f <= plyr_pos[1]
){ ){
organMinigame_setState(2); organMinigame_setState(2);

View File

@@ -1,11 +1,10 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include <core1/viewport.h>
/* extern functions */ /* extern functions */
extern void sfxsource_setSampleRate(u8, s32); extern void sfxsource_setSampleRate(u8, s32);
extern f32 ml_vec3f_horizontal_distance_zero_likely(f32[3], f32[3]);
/* data */ /* data */
enum chTumblar_state_e { enum chTumblar_state_e {
@@ -120,7 +119,7 @@ void __chTumblar_congratulationTextCallback(ActorMarker *marker, enum asset_e te
} }
void chTumblar_congratulate(Struct_MMM_47D0_0 *arg0, s32 arg1) { void chTumblar_congratulate(Struct_MMM_47D0_0 *arg0, s32 arg1) {
gcdialog_showText(ASSET_ADB_TEXT_UNKNOWN, 4, NULL, arg0->jiggy_marker, __chTumblar_congratulationTextCallback, NULL); gcdialog_showText(ASSET_ADB_DIALOG_UNKNOWN, 4, NULL, arg0->jiggy_marker, __chTumblar_congratulationTextCallback, NULL);
arg0->state = TUMBLAR_STATE_1_CONGRATULATING; arg0->state = TUMBLAR_STATE_1_CONGRATULATING;
} }
@@ -213,7 +212,7 @@ void chTumblar_update(Struct_MMM_47D0_0 *arg0, Struct68s *arg1, f32 tick) {
func_8035179C_copyPosition(arg1, position); func_8035179C_copyPosition(arg1, position);
if (!mapSpecificFlags_get(MMM_SPECIFIC_FLAG_0_UNKNOWN) && arg0->state == TUMBLAR_STATE_0_IDLE && ml_vec3f_horizontal_distance_zero_likely(position, plyr_pos) < 250.0f) { if (!mapSpecificFlags_get(MMM_SPECIFIC_FLAG_0_UNKNOWN) && arg0->state == TUMBLAR_STATE_0_IDLE && ml_vec3f_horizontal_distance_zero_likely(position, plyr_pos) < 250.0f) {
if (gcdialog_showText(ASSET_ADA_TEXT_UNKNOWN, 0, NULL, NULL, NULL, NULL)) { if (gcdialog_showText(ASSET_ADA_DIALOG_UNKNOWN, 0, NULL, NULL, NULL, NULL)) {
mapSpecificFlags_set(0, TRUE); mapSpecificFlags_set(0, TRUE);
} }
} }

View File

@@ -119,7 +119,7 @@ void func_803890BC(Actor *this){
local->unk1C += 0.25 * sp38; local->unk1C += 0.25 * sp38;
if(1.0f < local->unk1C) if(1.0f < local->unk1C)
local->unk1C = 1.0f; local->unk1C = 1.0f;
ml_interpolate_vec3f(sp2C, local->unk4, local->unk10, local->unk1C); ml_vec3f_interpolate_fast(sp2C, local->unk4, local->unk10, local->unk1C);
this->pitch = sp2C[0]; this->pitch = sp2C[0];
this->yaw = sp2C[1]; this->yaw = sp2C[1];
this->roll = sp2C[2]; this->roll = sp2C[2];

View File

@@ -4,7 +4,6 @@
#include "core2/particle.h" #include "core2/particle.h"
extern void ml_interpolate_vec3f(f32 [3], f32 [3], f32 [3], f32);
extern void bundle_setYaw(f32); extern void bundle_setYaw(f32);
extern int func_80309EB0(f32(*)[3], f32, f32 (*)[3], s32); extern int func_80309EB0(f32(*)[3], f32, f32 (*)[3], s32);
extern int func_803342AC(f32(*)[3], f32(*)[3],f32); extern int func_803342AC(f32(*)[3], f32(*)[3],f32);
@@ -276,7 +275,7 @@ void func_8038F430(ActorMarker *marker, s32 arg1){
if(actor->state < 3){ if(actor->state < 3){
player_getPosition(&sp18); player_getPosition(&sp18);
if(ml_distance_vec3f(&actor->position, &sp18) < 300.0f) if(ml_vec3f_distance(&actor->position, &sp18) < 300.0f)
func_8028F55C(5, actor->marker); func_8028F55C(5, actor->marker);
func_8038F190(actor, 3); func_8038F190(actor, 3);
}//L8038F4A4 }//L8038F4A4
@@ -353,7 +352,7 @@ void func_8038F618(Actor *this){
} }
func_8038E92C(this); func_8038E92C(this);
if(this->state == 1){ if(this->state == 1){
if(sp78 && ml_distance_vec3f(&this->position, &sp7C) < 500.0f){ if(sp78 && ml_vec3f_distance(&this->position, &sp7C) < 500.0f){
func_8038F190(this, 2); func_8038F190(this, 2);
} }
}//L8038F7A0 }//L8038F7A0
@@ -372,7 +371,7 @@ void func_8038F618(Actor *this){
skeletalAnim_getProgressRange(this->unk148, &sp6C, &sp68); skeletalAnim_getProgressRange(this->unk148, &sp6C, &sp68);
if(0.1 <= sp68 && sp68 <= 0.6) if(0.1 <= sp68 && sp68 <= 0.6)
ml_interpolate_vec3f(this->position, &local->unk14, &local->unk20, (sp68 - 0.1) /0.5 ); ml_vec3f_interpolate_fast(this->position, &local->unk14, &local->unk20, (sp68 - 0.1) /0.5 );
if(sp6C < 0.6 && 0.6 <= sp68) if(sp6C < 0.6 && 0.6 <= sp68)
func_8030E878(SFX_6C_LOCKUP_CLOSING, 1.1 + randf2(-0.05f, 0.05f), 20000, this->position, 500.0f, 1000.0f); func_8030E878(SFX_6C_LOCKUP_CLOSING, 1.1 + randf2(-0.05f, 0.05f), 20000, this->position, 500.0f, 1000.0f);
@@ -387,7 +386,7 @@ void func_8038F618(Actor *this){
this->yaw += (sp44*400.0f)*sp70; this->yaw += (sp44*400.0f)*sp70;
if(skeletalAnim_getLoopCount(this->unk148) > 0){ if(skeletalAnim_getLoopCount(this->unk148) > 0){
if(ml_distance_vec3f(&this->position, &local->unk8) < 10.0f){ if(ml_vec3f_distance(&this->position, &local->unk8) < 10.0f){
func_8038F190(this, 1); func_8038F190(this, 1);
}else{ }else{
func_8038F190(this, 2); func_8038F190(this, 2);

View File

@@ -367,7 +367,7 @@ void RBB_func_8038CC9C(Actor *this, s32 new_state){
} }
else{//L8038D220 else{//L8038D220
timedFunc_set_3(0.0f, (GenFunction_3)chbossboombox_respawnJiggy, (s32)this->position_x, (s32)this->position_y, (s32)this->position_z); timedFunc_set_3(0.0f, (GenFunction_3)chbossboombox_respawnJiggy, (s32)this->position_x, (s32)this->position_y, (s32)this->position_z);
gcdialog_showText(ASSET_B9F_TEXT_UNKNOWN, 4, 0, 0, 0, 0); gcdialog_showText(ASSET_B9F_DIALOG_UNKNOWN, 4, 0, 0, 0, 0);
} }
}//L8038D278 }//L8038D278
} }
@@ -546,7 +546,7 @@ void func_8038D8BC(Actor *this){
} }
} }
else{//L8038DAA8 else{//L8038DAA8
if(ml_distance_vec3f(this->position, player_position) < 1200.0f){ if(ml_vec3f_distance(this->position, player_position) < 1200.0f){
RBB_func_8038CC9C(this, 2); RBB_func_8038CC9C(this, 2);
} }
} }
@@ -582,7 +582,7 @@ void func_8038D8BC(Actor *this){
skeletalAnim_getProgressRange(this->unk148, &sp54, &sp50); skeletalAnim_getProgressRange(this->unk148, &sp54, &sp50);
if(0.1 <= sp50 && sp50 <= 0.6){ if(0.1 <= sp50 && sp50 <= 0.6){
sp4C = (sp50 - 0.1)/0.5; sp4C = (sp50 - 0.1)/0.5;
ml_interpolate_vec3f(this->position, local->unk8, local->unk14, sp4C); ml_vec3f_interpolate_fast(this->position, local->unk8, local->unk14, sp4C);
this->yaw = local->unk24 + sp4C*(local->unk28 - local->unk24); this->yaw = local->unk24 + sp4C*(local->unk28 - local->unk24);
} }
@@ -600,7 +600,7 @@ void func_8038D8BC(Actor *this){
tmp_f2 = tmp_f2/0.3; tmp_f2 = tmp_f2/0.3;
else else
tmp_f2 = 1.0f; tmp_f2 = 1.0f;
ml_interpolate_vec3f(this->position, local->unk8, local->unk14, tmp_f2); ml_vec3f_interpolate_fast(this->position, local->unk8, local->unk14, tmp_f2);
} }
}//L8038DE10 }//L8038DE10

View File

@@ -38,7 +38,7 @@ void func_80388BD0(Actor *this, s32 arg1){
void func_80388BE8(Actor *actor){ void func_80388BE8(Actor *actor){
ActorLocal_RBB_27E0 *local = (ActorLocal_RBB_27E0 *)&actor->local; ActorLocal_RBB_27E0 *local = (ActorLocal_RBB_27E0 *)&actor->local;
if(actor->modelCacheIndex == 0x17b){ if(actor->modelCacheIndex == 0x17b){
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
} }
} }

View File

@@ -1,9 +1,9 @@
#include <ultra64.h> #include <ultra64.h>
#include "core1/core1.h"
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#include "prop.h" #include "prop.h"
#include "actor.h" #include "actor.h"
#include <core1/viewport.h>
extern ActorInfo D_80390D20; extern ActorInfo D_80390D20;

View File

@@ -101,7 +101,7 @@ void func_80387488(ActorMarker *marker){
player_getPosition(&sp1C); player_getPosition(&sp1C);
if(-50.0f < sp1C[1] && sp1C[1] < 600.0f){ if(-50.0f < sp1C[1] && sp1C[1] < 600.0f){
sp1C[1] = 0; sp1C[1] = 0;
if(ml_distance_vec3f(&sp1C, &D_80390264) < 500.0f){ if(ml_vec3f_distance(&sp1C, &D_80390264) < 500.0f){
timedFunc_set_1(1.0f, (GenFunction_1) func_80387488, (s32)actor->marker); timedFunc_set_1(1.0f, (GenFunction_1) func_80387488, (s32)actor->marker);
return; return;
} }

View File

@@ -2,249 +2,252 @@
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
/* extern functions */ /* chAttackTutorial - controls bottle teaching moves in spiral */
void timed_exitStaticCamera(f32);
void func_8028F918(s32);
/* public functions */ extern void timed_exitStaticCamera(f32 time);
void chAttackTutorial_talk(ActorMarker *); extern void func_8028F918(s32);
void chAttackTutorial_setState(Actor *this, s32 state);
void chAttackTutorial_update(Actor *);
/* .data */ enum ch_attack_tutorial_states {
enum chAttackTutorial_state_e { CH_ATTACK_TUTORIAL_STATE_1_UNKNOWN = 0x1, // L80387610
ATTACK_TUTORIAL_STATE_1_UNKNOWN = 1, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE, // L803873E0
ATTACK_TUTORIAL_STATE_2_UNKNOWN, CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES, // L8038742C
ATTACK_TUTORIAL_STATE_3_UNKNOWN, CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED, // L80387454
ATTACK_TUTORIAL_STATE_4_UNKNOWN, CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG // L80387680
ATTACK_TUTORIAL_STATE_5_UNKNOWN
}; };
ActorInfo D_8038AC20 = { static void __chAttackTutorial_showDialogText(ActorMarker *);
static void __chAttackTutorial_setState(Actor* this, enum ch_attack_tutorial_states state);
static void __chAttackTutorial_update(Actor *);
/* .data */
ActorInfo gChAttackTutorial = {
MARKER_12B_ATTACK_TUTORIAL, ACTOR_167_ATTACK_TUTORIAL, NULL, MARKER_12B_ATTACK_TUTORIAL, ACTOR_167_ATTACK_TUTORIAL, NULL,
1, NULL, 1, NULL,
chAttackTutorial_update, actor_update_func_80326224, func_80325340, __chAttackTutorial_update, actor_update_func_80326224, func_80325340,
0, 0, 0.0f, 0 0, 0, 0.0f, 0
}; };
/* .code */ /* .code */
void __chAttackTutorial_enemy(ActorMarker *marker, enum actor_e enemy_id) { static void __chAttackTutorial_spawnEnemyActorForMarker(ActorMarker* marker, enum actor_e enemy_id) {
Actor* actor = marker_getActor(marker); Actor* actor = marker_getActor(marker);
s32 pad; s32 pad;
Actor *enemy = spawn_child_actor(enemy_id, &actor); Actor *other = spawn_child_actor(enemy_id, &actor);
actor->unk100 = enemy->marker; actor->unk100 = other->marker;
enemy->unk100 = actor->marker; other->unk100 = actor->marker;
if (actor->unk10_12 == 3 && actor->unk38_31 == 1) {
if (actor->unk10_12 == VEGETABLE_3_COLLY_WOBBLE && actor->unk38_31 == 1) { other->unk38_31 = 1;
enemy->unk38_31 = 1; } else {
} other->unk38_31 = 0;
else {//L803871D4
enemy->unk38_31 = 0;
} }
enemy->unk10_12 = VEGETABLE_1_TOPPER; other->unk10_12 = 1;
if (marker); if (marker);
} }
s32 __chAttackTutorial_spawnEnemy(Actor *this, enum vegetable_e vegetable_id) { // spawn topper, bawl or collywobble based on already_killed_enemies (actor->unk10_12)
volatile enum actor_e enemy_id; static s32 __chAttackTutorial_spawnEnemyActor(Actor *this, s32 already_killed_enemies) {
volatile enum actor_e sp1C;
s32 tmp_v0;
enemy_id = vegetable_id == VEGETABLE_1_TOPPER ? ACTOR_166_TOPPER_A : if (already_killed_enemies == 1) {
vegetable_id == VEGETABLE_2_BAWL ? ACTOR_165_BAWL_A : ACTOR_164_COLLYWOBBLE_A; sp1C = ACTOR_166_TOPPER_THE_CARROT_A;
} else {
__spawnQueue_add_2(__chAttackTutorial_enemy, this->marker, enemy_id); sp1C = tmp_v0 = (already_killed_enemies == 2)
? ACTOR_165_BAWL_THE_ONION_A
: ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A;
} }
void __chAttackTutorial_learnedTextActions(ActorMarker *marker, enum asset_e text_id, s32 arg2) { __spawnQueue_add_2(__chAttackTutorial_spawnEnemyActorForMarker, this->marker, sp1C);
chAttackTutorial_setState(marker_getActor(marker), ATTACK_TUTORIAL_STATE_2_UNKNOWN);
} }
void __chAttackTutorial_learnedTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) { static void __chAttackTutorial_advanceMarkToState2(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
__chAttackTutorial_setState(marker_getActor(marker), CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
}
static void __chAttackTutorial_learnAbilityBasedOnDialog(ActorMarker *marker, enum asset_e dialog_id, s32 arg2) {
Actor* actor = marker_getActor(marker); Actor* actor = marker_getActor(marker);
func_8028F918(0); func_8028F918(0);
switch(dialog_id) {
switch (text_id) { case ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL:
case ASSET_E15_TEXT_UNKNOWN://L803872C8
ability_unlock(ABILITY_C_ROLL); ability_unlock(ABILITY_C_ROLL);
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN); __chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
break; break;
case ASSET_E17_TEXT_UNKNOWN://L803872E4 case ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP:
ability_unlock(ABILITY_B_RATATAT_RAP); ability_unlock(ABILITY_B_RATATAT_RAP);
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN); __chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
break; break;
}//L803872FC }
timed_exitStaticCamera(0.0f); timed_exitStaticCamera(0.0f);
} }
void chAttackTutorial_setState(Actor *this, s32 state) { static void __chAttackTutorial_setState(Actor* this, enum ch_attack_tutorial_states state) {
switch (state) { switch (state)
case ATTACK_TUTORIAL_STATE_5_UNKNOWN: {
if (this->unk10_12 == NULL) { case CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG:
if (this->unk10_12 == 0) {
ability_unlock(ABILITY_4_CLAW_SWIPE); ability_unlock(ABILITY_4_CLAW_SWIPE);
gcdialog_showText(ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnedTextCallback, __chAttackTutorial_learnedTextActions); gcdialog_showText(ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnAbilityBasedOnDialog, __chAttackTutorial_advanceMarkToState2);
} }
else{ else{
gcdialog_showText(this->unk10_12 == VEGETABLE_1_TOPPER ? ASSET_E15_TEXT_UNKNOWN : ASSET_E17_TEXT_UNKNOWN, 0xE, this->unk1C, this->marker, __chAttackTutorial_learnedTextCallback, NULL); gcdialog_showText(
(this->unk10_12 == VEGETABLE_1_TOPPER) ? ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL : ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP,
0xE, this->unk1C, this->marker, __chAttackTutorial_learnAbilityBasedOnDialog, NULL
);
} }
break; break;
case ATTACK_TUTORIAL_STATE_2_UNKNOWN://L803873E0 case CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE:
this->unk38_31 = 0; this->unk38_31 = 0;
__chAttackTutorial_spawnEnemy(this, ++this->unk10_12); __chAttackTutorial_spawnEnemyActor(this, ++this->unk10_12);
break; break;
case ATTACK_TUTORIAL_STATE_3_UNKNOWN://L8038742C case CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES:
mapSpecificFlags_set(SM_SPECIFIC_FLAG_5, TRUE); mapSpecificFlags_set(SM_SPECIFIC_FLAG_5, 1);
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, TRUE); mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, 1);
marker_despawn(this->marker); marker_despawn(this->marker);
break; break;
case ATTACK_TUTORIAL_STATE_4_UNKNOWN://L80387454 case CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED:
mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, TRUE); mapSpecificFlags_set(SM_SPECIFIC_FLAG_C, 1);
if (!honeycombscore_get(HONEYCOMB_17_SM_COLLIWOBBLE)) {
if (!honeycombscore_get(HONEYCOMB_17_SM_COLIWOBBLE)) { this->unk10_12 = 3;
this->unk10_12 = VEGETABLE_3_COLLY_WOBBLE;
this->unk38_31 = 1; this->unk38_31 = 1;
__chAttackTutorial_spawnEnemy(this, this->unk10_12); __chAttackTutorial_spawnEnemyActor(this, this->unk10_12);
} }
break; break;
}//L803874A8 }
subaddie_set_state(this, state); subaddie_set_state(this, state);
} }
int __chAttackTutorial_isEveryAbilitiesUnlocked(void) { static bool __chAttackTutorial_areLearnableAbilitiesUnlocked() {
return ability_isUnlocked(ABILITY_4_CLAW_SWIPE) && return ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
ability_isUnlocked(ABILITY_C_ROLL) && && ability_isUnlocked(ABILITY_C_ROLL)
ability_isUnlocked(ABILITY_B_RATATAT_RAP); && ability_isUnlocked(ABILITY_B_RATATAT_RAP);
} }
void chAttackTutorial_update(Actor *this) { static void __chAttackTutorial_update(Actor *this) {
f32 distance_to_bottles; f32 minimum_distance;
Actor *bottles_ptr; Actor *bottles;
if (!this->initialized) { if (!this->initialized) {
bottles_ptr = actorArray_findClosestActorFromActorId(this->position, ACTOR_12B_TUTORIAL_BOTTLES, -1, &distance_to_bottles); bottles = actorArray_findClosestActorFromActorId(this->position, ACTOR_12B_TUTORIAL_BOTTLES, -1, &minimum_distance);
if (bottles != NULL) {
if (bottles_ptr != NULL) { this->unk1C_x = bottles->position_x;
this->unk1C_x = bottles_ptr->position_x; this->unk1C_y = bottles->position_y;
this->unk1C_y = bottles_ptr->position_y; this->unk1C_z = bottles->position_z;
this->unk1C_z = bottles_ptr->position_z; } else {
}
else {
this->unk1C_x = this->position_x; this->unk1C_x = this->position_x;
this->unk1C_y = this->position_y; this->unk1C_y = this->position_y;
this->unk1C_z = this->position_z; this->unk1C_z = this->position_z;
} }
this->unk10_12 = ability_isUnlocked(ABILITY_C_ROLL)
this->unk10_12 = ability_isUnlocked(ABILITY_C_ROLL) ? VEGETABLE_2_BAWL : ? 2
ability_isUnlocked(ABILITY_4_CLAW_SWIPE) ? VEGETABLE_1_TOPPER : NULL; : ability_isUnlocked(ABILITY_4_CLAW_SWIPE)
? 1
: 0;
this->initialized = TRUE; this->initialized = TRUE;
} }
switch(this->state) { switch(this->state) {
case ATTACK_TUTORIAL_STATE_1_UNKNOWN://L80387610 case CH_ATTACK_TUTORIAL_STATE_1_UNKNOWN:
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_4)) { if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_4))
chAttackTutorial_setState(this, ATTACK_TUTORIAL_STATE_5_UNKNOWN); __chAttackTutorial_setState(this, CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG);
}
if (__chAttackTutorial_isEveryAbilitiesUnlocked() || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) { if (__chAttackTutorial_areLearnableAbilitiesUnlocked() || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE))
chAttackTutorial_setState(this, ATTACK_TUTORIAL_STATE_4_UNKNOWN); __chAttackTutorial_setState(this, CH_ATTACK_TUTORIAL_STATE_4_TUTORIAL_COMPLETED);
}
break; break;
case ATTACK_TUTORIAL_STATE_2_UNKNOWN://L80387658 case CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE:
if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_7)) { if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_7)) {
chAttackTutorial_talk(this->marker); __chAttackTutorial_showDialogText(this->marker);
mapSpecificFlags_set(SM_SPECIFIC_FLAG_7, FALSE); mapSpecificFlags_set(SM_SPECIFIC_FLAG_7, FALSE);
} }
break; break;
case ATTACK_TUTORIAL_STATE_5_UNKNOWN://L80387680 case CH_ATTACK_TUTORIAL_STATE_5_SHOW_LEARN_MOVE_DIALOG:
break; break;
}////L80387680 }
} }
void __chAttackTutorial_attackTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) { static void __chAttackTutorial_handleDialog(ActorMarker *marker, enum asset_e text_id, s32 arg2) {
Actor *actor = marker_getActor(marker); Actor *actor = marker_getActor(marker);
switch (text_id) { switch (text_id) {
case ASSET_DFF_TEXT_BOTTLES_CLAW_SWIPE_LEARN: case ASSET_DFF_DIALOG_BOTTLES_CLAW_SWIPE_LEARN:
func_8028F918(0); func_8028F918(0);
break; break;
case ASSET_E14_TEXT_UNKNOWN: case ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // WOW...NICE ONE! TRY ANOTHER!
case ASSET_E16_TEXT_UNKNOWN: case ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // BULLS-EYE! ONE MORE...
case ASSET_E18_TEXT_UNKNOWN: case ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL: // MMMM...NOT BAD, FEATHER FACE!
__chAttackTutorial_spawnEnemy(actor, actor->unk10_12); __chAttackTutorial_spawnEnemyActor(actor, actor->unk10_12);
break; break;
case ASSET_E15_TEXT_UNKNOWN: case ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL:
ability_unlock(ABILITY_C_ROLL); ability_unlock(ABILITY_C_ROLL);
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN); __chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
break; break;
case ASSET_E17_TEXT_UNKNOWN: case ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP:
ability_unlock(ABILITY_B_RATATAT_RAP); ability_unlock(ABILITY_B_RATATAT_RAP);
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_2_UNKNOWN); __chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_2_APPLY_LEARNED_MOVE);
break; break;
case ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES: case ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES:
case ASSET_E19_TEXT_UNKNOWN: case ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES:
chAttackTutorial_setState(actor, ATTACK_TUTORIAL_STATE_3_UNKNOWN); __chAttackTutorial_setState(actor, CH_ATTACK_TUTORIAL_STATE_3_LEARNED_ALL_MOVES);
break; break;
} }
timed_exitStaticCamera(0.0f); timed_exitStaticCamera(0.0f);
} }
void chAttackTutorial_talk(ActorMarker *marker) { static void __chAttackTutorial_showDialogText(ActorMarker* marker) {
s32 text_id; s32 dialog_text;
int try_count; bool has_killed_enemy;
s32 text_flags = 4; s32 dialog_flag = 0x4;
Actor* actor = marker_getActor(marker); Actor* actor = marker_getActor(marker);
try_count = BOOL(actor->unk38_31);
if (try_count) { has_killed_enemy = actor->unk38_31 ? TRUE : FALSE;
text_flags = 0xE; if (has_killed_enemy) {
dialog_flag = 0xE;
} }
switch (actor->unk10_12) { switch (actor->unk10_12) {
case VEGETABLE_1_TOPPER: //L803877D8 case VEGETABLE_1_TOPPER:
text_id = try_count ? ASSET_E15_TEXT_UNKNOWN : ASSET_E14_TEXT_UNKNOWN; dialog_text = has_killed_enemy ? ASSET_E15_DIALOG_ATTACK_TUTORIAL_FORWARD_ROLL : ASSET_E14_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
break; break;
case VEGETABLE_2_BAWL: //L803877F4 case VEGETABLE_2_BAWL:
text_id = try_count ? ASSET_E17_TEXT_UNKNOWN : ASSET_E16_TEXT_UNKNOWN; dialog_text = has_killed_enemy ? ASSET_E17_DIALOG_ATTACK_TUTORIAL_RATATAT_RAP : ASSET_E16_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
break; break;
case VEGETABLE_3_COLLY_WOBBLE: //L80387810 case VEGETABLE_3_COLLY_WOBBLE:
text_id = try_count ? ASSET_E19_TEXT_UNKNOWN : ASSET_E18_TEXT_UNKNOWN; dialog_text = has_killed_enemy ? ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES : ASSET_E18_DIALOG_ATTACK_TUTORIAL_SUCCESSFUL_KILL;
break; break;
default: default:
//sp34 = actor->unk38_31;
break; break;
}//L8038782C }
if (text_id == ASSET_E19_TEXT_UNKNOWN) { if (dialog_text == ASSET_E19_DIALOG_ATTACK_TUTORIAL_LEARNED_ALL_MOVES) {
func_8028F94C(2, actor->unk1C); func_8028F94C(2, actor->unk1C);
}//L80387848 }
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities() && try_count) { if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities() && has_killed_enemy) {
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE); mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
text_id = ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES; dialog_text = ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES;
}//L80387898 }
if (try_count) { if (has_killed_enemy) {
timed_setStaticCameraToNode(0.0f, 6); timed_setStaticCameraToNode(0.0f, 6);
}//L803878B0 }
gcdialog_showText(text_id, text_flags, actor->unk1C, actor->marker, __chAttackTutorial_attackTextCallback, NULL); gcdialog_showText(dialog_text, dialog_flag, actor->unk1C, actor->marker, __chAttackTutorial_handleDialog, NULL);
actor->unk38_31++; actor->unk38_31++;
} }

View File

@@ -17,7 +17,7 @@ enum chJumpTutorial_state_e {
JUMP_TUTORIAL_STATE_3_DISAPPEARED JUMP_TUTORIAL_STATE_3_DISAPPEARED
}; };
ActorInfo D_8038B0B0 = { ActorInfo gChJumpTutorial = {
MARKER_1ED_JUMP_TUTORIAL, ACTOR_3B9_JUMP_TUTORIAL, NULL, MARKER_1ED_JUMP_TUTORIAL, ACTOR_3B9_JUMP_TUTORIAL, NULL,
1, NULL, 1, NULL,
chJumpTutorial_update, actor_update_func_80326224, func_80325340, chJumpTutorial_update, actor_update_func_80326224, func_80325340,
@@ -32,7 +32,7 @@ void __chJumpTutorial_setStaticCameraToNode4(Actor *this) {
void __chJumpTutorial_textCallback(ActorMarker *caller, enum asset_e text_id, s32 arg2) { void __chJumpTutorial_textCallback(ActorMarker *caller, enum asset_e text_id, s32 arg2) {
Actor *actor = marker_getActor(caller); Actor *actor = marker_getActor(caller);
if (text_id == ASSET_DF9_TEXT_BOTTLES_UNKNOWN || text_id == ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES) { if (text_id == ASSET_DF9_DIALOG_BOTTLES_UNKNOWN || text_id == ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES) {
chJumpTutorial_setState(actor, JUMP_TUTORIAL_STATE_3_DISAPPEARED); chJumpTutorial_setState(actor, JUMP_TUTORIAL_STATE_3_DISAPPEARED);
} }
@@ -56,8 +56,8 @@ void chJumpTutorial_setState(Actor *this, s32 state) {
__chJumpTutorial_setStaticCameraToNode4(this); __chJumpTutorial_setStaticCameraToNode4(this);
ability_unlock(ABILITY_A_HOLD_A_JUMP_HIGHER); ability_unlock(ABILITY_A_HOLD_A_JUMP_HIGHER);
gcdialog_showText(ASSET_DF6_TEXT_BOTTLES_HIGH_JUMP_LEARN, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL); gcdialog_showText(ASSET_DF6_DIALOG_BOTTLES_HIGH_JUMP_LEARN, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
this->sm_4070.dialog_id = ASSET_E1A_TEXT_BOTTLES_UNKNOWN; this->sm_4070.dialog_id = ASSET_E1A_DIALOG_BOTTLES_UNKNOWN;
mapSpecificFlags_set(SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED, FALSE); mapSpecificFlags_set(SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED, FALSE);
} }
break; break;
@@ -112,8 +112,8 @@ void chJumpTutorial_update(Actor *this) {
__chJumpTutorial_setStaticCameraToNode4(this); __chJumpTutorial_setStaticCameraToNode4(this);
ability_unlock(ABILITY_7_FEATHERY_FLAP); ability_unlock(ABILITY_7_FEATHERY_FLAP);
gcdialog_showText(ASSET_DF7_TEXT_BOTTLES_FEATHERY_FLAP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL); gcdialog_showText(ASSET_DF7_DIALOG_BOTTLES_FEATHERY_FLAP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
this->sm_4070.dialog_id = ASSET_E1B_TEXT_BOTTLES_UNKNOWN; this->sm_4070.dialog_id = ASSET_E1B_DIALOG_BOTTLES_UNKNOWN;
mapSpecificFlags_set(SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED, FALSE); mapSpecificFlags_set(SM_SPECIFIC_FLAG_8_ABILITY_HOLD_A_JUMP_HIGHER_UNLOCKED, FALSE);
}//L8038A730 }//L8038A730
@@ -121,8 +121,8 @@ void chJumpTutorial_update(Actor *this) {
__chJumpTutorial_setStaticCameraToNode4(this); __chJumpTutorial_setStaticCameraToNode4(this);
ability_unlock(ABILITY_8_FLAP_FLIP); ability_unlock(ABILITY_8_FLAP_FLIP);
gcdialog_showText(ASSET_DF8_TEXT_BOTTLES_FLAP_FLIP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL); gcdialog_showText(ASSET_DF8_DIALOG_BOTTLES_FLAP_FLIP_LEARN, 0xa, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);
this->sm_4070.dialog_id = ASSET_E1C_TEXT_BOTTLES_UNKNOWN; this->sm_4070.dialog_id = ASSET_E1C_DIALOG_BOTTLES_UNKNOWN;
mapSpecificFlags_set(SM_SPECIFIC_FLAG_9_ABILITY_FEATHERY_UNLOCKED, FALSE); mapSpecificFlags_set(SM_SPECIFIC_FLAG_9_ABILITY_FEATHERY_UNLOCKED, FALSE);
}//L8038A794 }//L8038A794
@@ -132,10 +132,10 @@ void chJumpTutorial_update(Actor *this) {
if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities()) { if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities()) {
mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE); mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, TRUE);
dialog_id = ASSET_E12_TEXT_BOTTLES_LEARNED_TUTORIAL_MOVES; dialog_id = ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES;
} }
else { else {
dialog_id = ASSET_DF9_TEXT_BOTTLES_UNKNOWN; dialog_id = ASSET_DF9_DIALOG_BOTTLES_UNKNOWN;
} }
gcdialog_showText(dialog_id, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL); gcdialog_showText(dialog_id, 0xe, this->unk1C, this->marker, __chJumpTutorial_textCallback, NULL);

Some files were not shown because too many files have changed in this diff Show More