Browse Source

refresh 5

master
n64 1 year ago
parent
commit
9273f38df1
100 changed files with 3251 additions and 3457 deletions
  1. +15
    -0
      CHANGES
  2. +2
    -5
      Makefile
  3. +5
    -9
      assets.json
  4. +0
    -5
      bin/cave.c
  5. +0
    -5
      bin/inside.c
  6. +0
    -10
      bin/mountain.c
  7. +4
    -4
      bin/segment2.c
  8. +51
    -2
      charmap.txt
  9. +1
    -1
      charmap_menu.txt
  10. +2524
    -3003
      data/behavior_data.c
  11. +23
    -0
      enhancements/debug_box.h
  12. +248
    -0
      enhancements/debug_box.inc.c
  13. +52
    -44
      enhancements/mem_error_screen.inc.c
  14. +7
    -1
      extract_assets.py
  15. +1
    -1
      include/behavior_data.h
  16. +2
    -3
      include/course_table.h
  17. +6
    -6
      include/geo_commands.h
  18. +1
    -1
      include/surface_terrains.h
  19. +1
    -1
      include/text_menu_strings.h.in
  20. +39
    -39
      include/text_strings.h.in
  21. +0
    -4
      include/textures.h
  22. +1
    -1
      include/types.h
  23. +1
    -1
      levels/bbh/areas/1/geo.inc.c
  24. +1
    -1
      levels/bitdw/areas/1/geo.inc.c
  25. +1
    -1
      levels/bitfs/areas/1/geo.inc.c
  26. +1
    -1
      levels/bits/areas/1/geo.inc.c
  27. +1
    -1
      levels/bob/areas/1/geo.inc.c
  28. +1
    -1
      levels/bowser_1/areas/1/geo.inc.c
  29. +1
    -1
      levels/bowser_2/areas/1/geo.inc.c
  30. +1
    -1
      levels/bowser_3/areas/1/geo.inc.c
  31. +1
    -1
      levels/castle_courtyard/areas/1/geo.inc.c
  32. +1
    -1
      levels/castle_grounds/areas/1/geo.inc.c
  33. +1
    -1
      levels/castle_inside/areas/1/geo.inc.c
  34. +1
    -1
      levels/castle_inside/areas/2/geo.inc.c
  35. +1
    -1
      levels/castle_inside/areas/3/geo.inc.c
  36. +1
    -1
      levels/ccm/areas/1/geo.inc.c
  37. +1
    -1
      levels/ccm/areas/2/geo.inc.c
  38. +1
    -1
      levels/cotmc/areas/1/geo.inc.c
  39. +38
    -28
      levels/course_defines.h
  40. +1
    -1
      levels/ddd/areas/1/geo.inc.c
  41. +1
    -1
      levels/ddd/areas/2/geo.inc.c
  42. +1
    -1
      levels/ending/geo.c
  43. +1
    -1
      levels/hmc/areas/1/geo.inc.c
  44. +1
    -1
      levels/jrb/areas/1/geo.inc.c
  45. +1
    -1
      levels/jrb/areas/2/geo.inc.c
  46. +11
    -15
      levels/level_defines.h
  47. +1
    -1
      levels/lll/areas/1/geo.inc.c
  48. +1
    -1
      levels/lll/areas/2/geo.inc.c
  49. +1
    -1
      levels/pss/areas/1/geo.inc.c
  50. +1
    -1
      levels/rr/areas/1/geo.inc.c
  51. +1
    -1
      levels/sa/areas/1/geo.inc.c
  52. +1
    -1
      levels/sl/areas/1/geo.inc.c
  53. +1
    -1
      levels/sl/areas/2/geo.inc.c
  54. +1
    -1
      levels/ssl/areas/1/geo.inc.c
  55. +1
    -1
      levels/ssl/areas/2/geo.inc.c
  56. +1
    -1
      levels/ssl/areas/3/geo.inc.c
  57. +1
    -1
      levels/thi/areas/1/collision.inc.c
  58. +1
    -1
      levels/thi/areas/1/geo.inc.c
  59. +1
    -1
      levels/thi/areas/2/collision.inc.c
  60. +1
    -1
      levels/thi/areas/2/geo.inc.c
  61. +1
    -1
      levels/thi/areas/3/geo.inc.c
  62. +1
    -1
      levels/totwc/areas/1/geo.inc.c
  63. +1
    -1
      levels/ttc/areas/1/geo.inc.c
  64. +1
    -1
      levels/ttm/areas/1/geo.inc.c
  65. +1
    -1
      levels/ttm/areas/2/geo.inc.c
  66. +1
    -1
      levels/ttm/areas/3/geo.inc.c
  67. +1
    -1
      levels/ttm/areas/4/geo.inc.c
  68. +1
    -1
      levels/vcutm/areas/1/geo.inc.c
  69. +1
    -1
      levels/wdw/areas/1/geo.inc.c
  70. +1
    -1
      levels/wdw/areas/2/geo.inc.c
  71. +1
    -1
      levels/wf/areas/1/geo.inc.c
  72. +1
    -1
      levels/wmotr/areas/1/geo.inc.c
  73. +89
    -89
      src/engine/behavior_script.c
  74. +14
    -14
      src/engine/geo_layout.c
  75. +5
    -5
      src/engine/graph_node.c
  76. +7
    -7
      src/engine/graph_node.h
  77. +1
    -1
      src/engine/level_script.c
  78. +1
    -0
      src/engine/math_util.c
  79. +4
    -3
      src/engine/math_util.h
  80. +1
    -53
      src/game/area.h
  81. +2
    -2
      src/game/behavior_actions.c
  82. +3
    -3
      src/game/behavior_actions.h
  83. +3
    -3
      src/game/behaviors/amp.inc.c
  84. +3
    -3
      src/game/behaviors/bobomb.inc.c
  85. +3
    -3
      src/game/behaviors/bowling_ball.inc.c
  86. +4
    -4
      src/game/behaviors/bowser.inc.c
  87. +1
    -1
      src/game/behaviors/bowser_bomb.inc.c
  88. +1
    -1
      src/game/behaviors/bullet_bill.inc.c
  89. +1
    -1
      src/game/behaviors/bully.inc.c
  90. +9
    -9
      src/game/behaviors/camera_lakitu.inc.c
  91. +1
    -1
      src/game/behaviors/capswitch.inc.c
  92. +2
    -2
      src/game/behaviors/chain_chomp.inc.c
  93. +3
    -3
      src/game/behaviors/door.inc.c
  94. +3
    -3
      src/game/behaviors/elevator.inc.c
  95. +1
    -1
      src/game/behaviors/end_birds_1.inc.c
  96. +3
    -3
      src/game/behaviors/end_birds_2.inc.c
  97. +1
    -1
      src/game/behaviors/explosion.inc.c
  98. +3
    -3
      src/game/behaviors/eyerok.inc.c
  99. +1
    -1
      src/game/behaviors/falling_pillar.inc.c
  100. +1
    -1
      src/game/behaviors/grand_star.inc.c

+ 15
- 0
CHANGES View File

@@ -1,3 +1,18 @@
Refresh #5
1.) mem_error_screen.inc.c updated for C (#775)
2.) updated patch_libultra_math to work directly on libultra.a (#781)
3.) Enhancement: Debug boxes (#783)
4.) Label effects MemoryPool (#784)
5.) Use full-width characters for JP text and rename mislabeled stuff (#772)
6.) Small asset extraction fixes (#785)
7.) Fix incremental asset extraction after the last PR (#790)
8.) Labelled behavior script commands, tidied up behavior scripts and ren…
9.) Document camera.c (#741)
10.) Fix a HMC texture asset (#795)
11.) Fix UB in angle conversion for paintings. Needed for pc-port. (#796)
12.) Fix PSS texture assets (#801)
13.) Fix some camera typos (#802)

Refresh #4
1.) Label screen_transition.c (#737)
2.) Revamp macros (#738)


+ 2
- 5
Makefile View File

@@ -441,6 +441,7 @@ $(BUILD_DIR)/assets/mario_anim_data.c: $(wildcard assets/anims/*.inc.c)
$(BUILD_DIR)/assets/demo_data.c: assets/demo_data.json $(wildcard assets/demos/*.bin)
$(PYTHON) tools/demo_data_converter.py assets/demo_data.json $(VERSION_CFLAGS) > $@


# Source code
$(BUILD_DIR)/src/goddard/%.o: OPT_FLAGS := -g
$(BUILD_DIR)/src/goddard/%.o: MIPSISET := -mips1
@@ -471,11 +472,6 @@ $(GLOBAL_ASM_DEP).$(NON_MATCHING):
@rm -f $(GLOBAL_ASM_DEP).*
touch $@

$(BUILD_DIR)/lib/src/math/%.o: lib/src/math/%.c
@$(CC_CHECK) -MMD -MP -MT $@ -MF $(BUILD_DIR)/lib/src/math/$*.d $<
$(CC) -c $(CFLAGS) -o $@ $<
tools/patch_libultra_math $@

$(BUILD_DIR)/%.o: %.c
@$(CC_CHECK) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
$(CC) -c $(CFLAGS) -o $@ $<
@@ -493,6 +489,7 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)

$(BUILD_DIR)/libultra.a: $(ULTRA_O_FILES)
$(AR) rcs -o $@ $(ULTRA_O_FILES)
tools/patch_libultra_math $@

$(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)
$(AR) rcs -o $@ $(GODDARD_O_FILES)


+ 5
- 9
assets.json View File

@@ -188,7 +188,7 @@
"actors/haunted_cage/bbh_cage_floor.rgba16.png": [32,32,2048,{"jp":[1462368,49800],"us":[1469536,49800],"eu":[1341504,49800]}],
"actors/haunted_cage/bbh_cage_ornament.rgba16.png": [32,16,1024,{"jp":[1462368,53896],"us":[1469536,53896],"eu":[1341504,53896]}],
"actors/haunted_cage/bbh_cage_wooden_base.rgba16.png": [32,16,1024,{"jp":[1462368,54920],"us":[1469536,54920],"eu":[1341504,54920]}],
"actors/haunted_cage/bbh_cage_garbage.rgba16.png": [32,32,2048,{"jp:":[1462368,57992],"us":[1469536,57992],"eu":[1341504,57992]}],
"actors/haunted_cage/bbh_cage_garbage.rgba16.png": [32,32,2048,{"jp":[1462368,57992],"us":[1469536,57992],"eu":[1341504,57992]}],
"actors/heart/spinning_heart.rgba16.png": [32,32,2048,{"jp":[2032944,55264],"us":[2040320,55264],"eu":[1912288,55264]}],
"actors/heave_ho/heave-ho_arm_ornament.rgba16.png": [32,32,2048,{"jp":[1215456,68040],"us":[1222624,68040],"eu":[1094592,68040]}],
"actors/heave_ho/heave-ho_face.rgba16.png": [32,32,2048,{"jp":[1215456,59848],"us":[1222624,59848],"eu":[1094592,59848]}],
@@ -1031,8 +1031,7 @@
"sound/sequences/us/22_cutscene_lakitu.m64": [313,{"us":[8176864]}],
"textures/cave/hmc_textures.00000.rgba16.png": [32,64,4096,{"jp":[3432432,0],"us":[3439184,0],"eu":[3312784,0]}],
"textures/cave/hmc_textures.01000.rgba16.png": [32,32,2048,{"jp":[3432432,4096],"us":[3439184,4096],"eu":[3312784,4096]}],
"textures/cave/hmc_textures.01800.rgba16.png": [32,32,2048,{"jp":[3432432,6144],"us":[3439184,6144],"eu":[3312784,6144]}],
"textures/cave/hmc_textures.02000.rgba16.png": [32,32,2048,{"jp":[3432432,8192],"us":[3439184,8192],"eu":[3312784,8192]}],
"textures/cave/hmc_textures.01800.rgba16.png": [32,64,4096,{"jp":[3432432,6144],"us":[3439184,6144],"eu":[3312784,6144]}],
"textures/cave/hmc_textures.02800.rgba16.png": [32,32,2048,{"jp":[3432432,10240],"us":[3439184,10240],"eu":[3312784,10240]}],
"textures/cave/hmc_textures.03000.rgba16.png": [32,32,2048,{"jp":[3432432,12288],"us":[3439184,12288],"eu":[3312784,12288]}],
"textures/cave/hmc_textures.03800.rgba16.png": [32,64,4096,{"jp":[3432432,14336],"us":[3439184,14336],"eu":[3312784,14336]}],
@@ -1155,8 +1154,7 @@
"textures/inside/inside_castle_textures.07000.rgba16.png": [32,64,4096,{"jp":[3555104,28672],"us":[3561856,28672],"eu":[3435456,28672]}],
"textures/inside/inside_castle_textures.08000.rgba16.png": [32,32,2048,{"jp":[3555104,32768],"us":[3561856,32768],"eu":[3435456,32768]}],
"textures/inside/inside_castle_textures.08800.rgba16.png": [32,32,2048,{"jp":[3555104,34816],"us":[3561856,34816],"eu":[3435456,34816]}],
"textures/inside/inside_castle_textures.09000.rgba16.png": [32,32,2048,{"jp":[3555104,36864],"us":[3561856,36864],"eu":[3435456,36864]}],
"textures/inside/inside_castle_textures.09800.rgba16.png": [32,32,2048,{"jp":[3555104,38912],"us":[3561856,38912],"eu":[3435456,38912]}],
"textures/inside/inside_castle_textures.09000.rgba16.png": [32,64,4096,{"jp":[3555104,36864],"us":[3561856,36864],"eu":[3435456,36864]}],
"textures/inside/inside_castle_textures.0A000.rgba16.png": [32,64,4096,{"jp":[3555104,40960],"us":[3561856,40960],"eu":[3435456,40960]}],
"textures/inside/inside_castle_textures.0B000.rgba16.png": [32,32,2048,{"jp":[3555104,45056],"us":[3561856,45056],"eu":[3435456,45056]}],
"textures/inside/inside_castle_textures.0B800.rgba16.png": [64,32,4096,{"jp":[3555104,47104],"us":[3561856,47104],"eu":[3435456,47104]}],
@@ -1204,16 +1202,14 @@
"textures/machine/ttc_textures.08400.rgba16.png": [32,32,2048,{"jp":[3460352,33792],"us":[3467104,33792],"eu":[3340704,33792]}],
"textures/mountain/ttm_textures.00000.rgba16.png": [32,32,2048,{"jp":[3473152,0],"us":[3479904,0],"eu":[3353504,0]}],
"textures/mountain/ttm_textures.00800.rgba16.png": [64,32,4096,{"jp":[3473152,2048],"us":[3479904,2048],"eu":[3353504,2048]}],
"textures/mountain/ttm_textures.01800.rgba16.png": [32,32,2048,{"jp":[3473152,6144],"us":[3479904,6144],"eu":[3353504,6144]}],
"textures/mountain/ttm_textures.02000.rgba16.png": [32,32,2048,{"jp":[3473152,8192],"us":[3479904,8192],"eu":[3353504,8192]}],
"textures/mountain/ttm_textures.01800.rgba16.png": [32,64,4096,{"jp":[3473152,6144],"us":[3479904,6144],"eu":[3353504,6144]}],
"textures/mountain/ttm_textures.02800.rgba16.png": [32,32,2048,{"jp":[3473152,10240],"us":[3479904,10240],"eu":[3353504,10240]}],
"textures/mountain/ttm_textures.03000.rgba16.png": [32,32,2048,{"jp":[3473152,12288],"us":[3479904,12288],"eu":[3353504,12288]}],
"textures/mountain/ttm_textures.03800.rgba16.png": [32,32,2048,{"jp":[3473152,14336],"us":[3479904,14336],"eu":[3353504,14336]}],
"textures/mountain/ttm_textures.04000.rgba16.png": [32,32,2048,{"jp":[3473152,16384],"us":[3479904,16384],"eu":[3353504,16384]}],
"textures/mountain/ttm_textures.04800.rgba16.png": [32,32,2048,{"jp":[3473152,18432],"us":[3479904,18432],"eu":[3353504,18432]}],
"textures/mountain/ttm_textures.05000.rgba16.png": [32,32,2048,{"jp":[3473152,20480],"us":[3479904,20480],"eu":[3353504,20480]}],
"textures/mountain/ttm_textures.05800.rgba16.png": [32,32,2048,{"jp":[3473152,22528],"us":[3479904,22528],"eu":[3353504,22528]}],
"textures/mountain/ttm_textures.06000.rgba16.png": [32,32,2048,{"jp":[3473152,24576],"us":[3479904,24576],"eu":[3353504,24576]}],
"textures/mountain/ttm_textures.05800.rgba16.png": [32,64,4096,{"jp":[3473152,22528],"us":[3479904,22528],"eu":[3353504,22528]}],
"textures/mountain/ttm_textures.06800.rgba16.png": [32,32,2048,{"jp":[3473152,26624],"us":[3479904,26624],"eu":[3353504,26624]}],
"textures/mountain/ttm_textures.07000.rgba16.png": [32,32,2048,{"jp":[3473152,28672],"us":[3479904,28672],"eu":[3353504,28672]}],
"textures/mountain/ttm_textures.07800.rgba16.png": [32,32,2048,{"jp":[3473152,30720],"us":[3479904,30720],"eu":[3353504,30720]}],


+ 0
- 5
bin/cave.c View File

@@ -17,11 +17,6 @@ ALIGNED8 const u8 cave_09001800[] = {
#include "textures/cave/hmc_textures.01800.rgba16.inc.c"
};

// 0x09002000
ALIGNED8 const u8 cave_09002000[] = {
#include "textures/cave/hmc_textures.02000.rgba16.inc.c"
};

// 0x09002800
ALIGNED8 const u8 cave_09002800[] = {
#include "textures/cave/hmc_textures.02800.rgba16.inc.c"


+ 0
- 5
bin/inside.c View File

@@ -72,11 +72,6 @@ ALIGNED8 const u8 inside_09009000[] = {
#include "textures/inside/inside_castle_textures.09000.rgba16.inc.c"
};

// 0x09009800
ALIGNED8 const u8 inside_09009800[] = {
#include "textures/inside/inside_castle_textures.09800.rgba16.inc.c"
};

// 0x0900A000
ALIGNED8 const u8 inside_0900A000[] = {
#include "textures/inside/inside_castle_textures.0A000.rgba16.inc.c"


+ 0
- 10
bin/mountain.c View File

@@ -17,11 +17,6 @@ ALIGNED8 const u8 mountain_09001800[] = {
#include "textures/mountain/ttm_textures.01800.rgba16.inc.c"
};

// 0x09002000
ALIGNED8 const u8 mountain_09002000[] = {
#include "textures/mountain/ttm_textures.02000.rgba16.inc.c"
};

// 0x09002800
ALIGNED8 const u8 mountain_09002800[] = {
#include "textures/mountain/ttm_textures.02800.rgba16.inc.c"
@@ -57,11 +52,6 @@ ALIGNED8 const u8 mountain_09005800[] = {
#include "textures/mountain/ttm_textures.05800.rgba16.inc.c"
};

// 0x09006000
ALIGNED8 const u8 mountain_09006000[] = {
#include "textures/mountain/ttm_textures.06000.rgba16.inc.c"
};

// 0x09006800
ALIGNED8 const u8 mountain_09006800[] = {
#include "textures/mountain/ttm_textures.06800.rgba16.inc.c"


+ 4
- 4
bin/segment2.c View File

@@ -738,7 +738,7 @@ ALIGNED8 static const u8 texture_font_char_jp_hiragana_small_tsu[] = {
#include "textures/segment2/segment2.07710.ia1.inc.c"
};

ALIGNED8 static const u8 texture_font_char_jp_hiragana_small_ka[] = {
ALIGNED8 static const u8 texture_font_char_jp_hiragana_small_ya[] = {
#include "textures/segment2/segment2.07720.ia1.inc.c"
};

@@ -962,7 +962,7 @@ ALIGNED8 static const u8 texture_font_char_jp_katakana_small_tsu[] = {
#include "textures/segment2/segment2.07A90.ia1.inc.c"
};

ALIGNED8 static const u8 texture_font_char_jp_katakana_small_ka[] = {
ALIGNED8 static const u8 texture_font_char_jp_katakana_small_ya[] = {
#include "textures/segment2/segment2.07AA0.ia1.inc.c"
};

@@ -2028,7 +2028,7 @@ const u8 *const main_font_lut[] = {
texture_font_char_jp_katakana_yu, texture_font_char_jp_katakana_yo, texture_font_char_jp_katakana_ra, texture_font_char_jp_katakana_ri,
texture_font_char_jp_katakana_ru, texture_font_char_jp_katakana_re, texture_font_char_jp_katakana_ro, texture_font_char_jp_katakana_wa,
0x0, texture_font_char_jp_katakana_n, 0x0, texture_font_char_jp_long_vowel,
texture_font_char_jp_hiragana_small_e, texture_font_char_jp_hiragana_small_tsu, texture_font_char_jp_hiragana_small_ka, texture_font_char_jp_hiragana_small_yu,
texture_font_char_jp_hiragana_small_e, texture_font_char_jp_hiragana_small_tsu, texture_font_char_jp_hiragana_small_ya, texture_font_char_jp_hiragana_small_yu,
texture_font_char_jp_hiragana_small_yo, texture_font_char_jp_hiragana_small_a, texture_font_char_jp_hiragana_small_i, texture_font_char_jp_hiragana_small_u,
texture_font_char_jp_hiragana_small_o, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
@@ -2040,7 +2040,7 @@ const u8 *const main_font_lut[] = {
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
texture_font_char_jp_katakana_small_e, texture_font_char_jp_katakana_small_tsu, texture_font_char_jp_katakana_small_ka, texture_font_char_jp_katakana_small_yu,
texture_font_char_jp_katakana_small_e, texture_font_char_jp_katakana_small_tsu, texture_font_char_jp_katakana_small_ya, texture_font_char_jp_katakana_small_yu,
texture_font_char_jp_katakana_small_yo, texture_font_char_jp_katakana_small_a, texture_font_char_jp_katakana_small_i, texture_font_char_jp_katakana_small_u,
texture_font_char_jp_katakana_small_o, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,


+ 51
- 2
charmap.txt View File

@@ -1,39 +1,75 @@
'0' = 0x00
'0' = 0x00
'1' = 0x01
'1' = 0x01
'2' = 0x02
'2' = 0x02
'3' = 0x03
'3' = 0x03
'4' = 0x04
'4' = 0x04
'5' = 0x05
'5' = 0x05
'6' = 0x06
'6' = 0x06
'7' = 0x07
'7' = 0x07
'8' = 0x08
'8' = 0x08
'9' = 0x09
'9' = 0x09
'A' = 0x0A
'A' = 0x0A
'B' = 0x0B
'B' = 0x0B
'C' = 0x0C
'C' = 0x0C
'D' = 0x0D
'D' = 0x0D
'E' = 0x0E
'E' = 0x0E
'F' = 0x0F
'F' = 0x0F
'G' = 0x10
'G' = 0x10
'H' = 0x11
'H' = 0x11
'I' = 0x12
'I' = 0x12
'J' = 0x13
'J' = 0x13
'K' = 0x14
'K' = 0x14
'L' = 0x15
'L' = 0x15
'M' = 0x16
'M' = 0x16
'N' = 0x17
'N' = 0x17
'O' = 0x18
'O' = 0x18
'P' = 0x19
'P' = 0x19
'Q' = 0x1A
'Q' = 0x1A
'R' = 0x1B
'R' = 0x1B
'S' = 0x1C
'S' = 0x1C
'T' = 0x1D
'T' = 0x1D
'U' = 0x1E
'U' = 0x1E
'V' = 0x1F
'V' = 0x1F
'W' = 0x20
'W' = 0x20
'X' = 0x21
'X' = 0x21
'Y' = 0x22
'Y' = 0x22
'Z' = 0x23
'Z' = 0x23
'a' = 0x24
'b' = 0x25
'c' = 0x26
@@ -114,6 +150,7 @@
'ん' = 0x6D
'。' = 0x6E
',' = 0x6F
'、' = 0x6F
'ア' = 0x70
'イ' = 0x71
'ウ' = 0x72
@@ -162,7 +199,9 @@
'ヲ' = 0x9C
'ン' = 0x9D
' ' = 0x9E
' ' = 0x9E
'-' = 0x9F
'ー' = 0x9F
'ぇ' = 0xA0
'っ' = 0xA1
'ゃ' = 0xA2
@@ -183,17 +222,27 @@
'ォ' = 0xD8
'[%]' = 0xE0
'(' = 0xE1
'(' = 0xE1
')(' = 0xE2
')(' = 0xE2
')' = 0xE3
')' = 0xE3
'+' = 0xE4
'↔' = 0xE4
'&' = 0xE5
':' = 0xE6
'゛' = 0xF0
'゜' = 0xF1
'!' = 0xF2
'!' = 0xF2
'%' = 0xF3
'%' = 0xF3
'?' = 0xF4
'?' = 0xF4
'『' = 0xF5
'』' = 0xF6
'~' = 0xF7
'~' = 0xF7
'…' = 0xF8
'$' = 0xF9
'★' = 0xFA
@@ -202,7 +251,7 @@
'☆' = 0xFD
'\n' = 0xFE

# kana or hira with dakuten
# hiragana or katakana with dakuten
'が' = 0xF0, 0x45
'ぎ' = 0xF0, 0x46
'ぐ' = 0xF0, 0x47
@@ -244,7 +293,7 @@
'ベ' = 0xF0, 0x8C
'ボ' = 0xF0, 0x8D

# kana or hira with handakuten
# hiragana or katakana with handakuten
'ぱ' = 0xF1, 0x59
'ぴ' = 0xF1, 0x5A
'ぷ' = 0xF1, 0x5B


+ 1
- 1
charmap_menu.txt View File

@@ -23,7 +23,7 @@
'み' = 0x14
'ど' = 0x15
'の' = 0x16
'?' = 0x17
'' = 0x17
'サ' = 0x18
'ウ' = 0x19
'ン' = 0x1A


+ 2524
- 3003
data/behavior_data.c
File diff suppressed because it is too large
View File


+ 23
- 0
enhancements/debug_box.h View File

@@ -0,0 +1,23 @@
#ifndef _DEBUG_DRAW_CUBE_H
#define _DEBUG_DRAW_CUBE_H

/**
* @file debug_box.h
* Draws debug boxes, see debug_box.inc.c for details
*/

#include "types.h"

/**
* The max amount of debug boxes before debug_box() just returns.
* You can set this to something higher like 1000, but things like text will stop rendering.
*/
#define MAX_DEBUG_BOXES 100

void debug_box(Vec3f center, Vec3f bounds);
void debug_box_rot(Vec3f center, Vec3f bounds, s16 yaw);

void debug_box_pos(Vec3f pMin, Vec3f pMax);
void debug_box_pos_rot(Vec3f pMin, Vec3f pMax, s16 yaw);

#endif /* _DEBUG_DRAW_CUBE_H */

+ 248
- 0
enhancements/debug_box.inc.c View File

@@ -0,0 +1,248 @@
#include <ultra64.h>

#include "sm64.h"
#include "game/game.h"
#include "game/geo_misc.h"
#include "engine/math_util.h"

#include "debug_box.h"

/**
* @file debug_box.inc.c
* Draws 3D boxes for debugging purposes.
*
* How to use:
*
* In area.c, add this to the list of includes:
*
* #include "enhancements/debug_box.inc.c"
*
* Then in render_game() in the same file, add a call to render_debug_boxes():
*
* void render_game(void) {
* if (gCurrentArea != NULL && !gWarpTransition.pauseRendering) {
* geo_process_root(...);
*
* render_debug_boxes(); // add here
*
* gSPViewport(...);
* gDPSetScissor(...);
* //...
*
* Now just call debug_box() whenever you want to draw one!
*
* debug_box by default takes two arguments: a center and bounds vec3f.
* This will draw a box starting from the point (center - bounds) to (center + bounds).
*
* Use debug_box_rot to draw a box rotated in the xz-plane.
*
* If you want to draw a box by specifying min and max points, use debug_box_pos() instead.
*/

/**
* Internal struct containing box info
*/
struct DebugBox {
Vec3s center;
Vec3s bounds;
s16 yaw;
};

struct DebugBox *sBoxes[MAX_DEBUG_BOXES];
s16 sNumBoxes = 0;

extern Mat4 gMatStack[32]; //XXX: Hack

/**
* The debug boxes' transparency
*/
#define DBG_BOX_ALPHA 0x7F
/**
* The debug boxes' color
*/
#define DBG_BOX_COL 0xFF, 0x00, 0x00, DBG_BOX_ALPHA

/**
* Sets up the RCP for drawing the boxes
*/
static const Gfx dl_debug_box_begin[] = {
gsDPPipeSync(),
#if DBG_BOX_ALPHA < 0xFF
gsDPSetRenderMode(G_RM_ZB_XLU_SURF, G_RM_NOOP2),
#else
gsDPSetRenderMode(G_RM_ZB_OPA_SURF, G_RM_NOOP2),
#endif
gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK),
gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH),
gsSPTexture(0, 0, 0, 0, G_OFF),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPEndDisplayList(),
};

/**
* Actually draws the box
*/
static const Gfx dl_debug_draw_box[] = {
gsSP2Triangles( 0, 1, 2, 0x0, 2, 1, 3, 0x0),
gsSP2Triangles( 2, 3, 6, 0x0, 6, 3, 7, 0x0),

gsSP2Triangles( 4, 0, 2, 0x0, 2, 6, 4, 0x0),
gsSP2Triangles( 1, 5, 3, 0x0, 3, 5, 7, 0x0),
gsSP2Triangles( 1, 0, 4, 0x0, 1, 4, 5, 0x0),
gsSP2Triangles( 5, 4, 6, 0x0, 5, 6, 7, 0x0),

gsSPEndDisplayList(),
};

/**
* Adds a box to the list to be rendered this frame.
*
* If there are already MAX_DEBUG_BOXES boxes, does nothing.
*/
static void append_debug_box(Vec3f center, Vec3f bounds, s16 yaw)
{
if (sNumBoxes >= MAX_DEBUG_BOXES ||
(sBoxes[sNumBoxes] = mem_pool_alloc(gEffectsMemoryPool, sizeof(struct DebugBox))) == NULL) {
return;
}

vec3f_to_vec3s(sBoxes[sNumBoxes]->center, center);
vec3f_to_vec3s(sBoxes[sNumBoxes]->bounds, bounds);

sBoxes[sNumBoxes]->yaw = yaw;

++sNumBoxes;
}

/**
* Draws a debug box from (center - bounds) to (center + bounds)
* To draw a rotated box, use debug_box_rot()
*
* @see debug_box_rot()
*/
void debug_box(Vec3f center, Vec3f bounds)
{
append_debug_box(center, bounds, 0);
}

/**
* Draws a debug box from (center - bounds) to (center + bounds), rotating it by `yaw`
*/
void debug_box_rot(Vec3f center, Vec3f bounds, s16 yaw)
{
append_debug_box(center, bounds, yaw);
}

/**
* Draws a debug box from pMin to pMax
* To draw a rotated box this way, use debug_box_pos_rot()
*
* @see debug_box_pos_rot()
*/
void debug_box_pos(Vec3f pMin, Vec3f pMax)
{
debug_box_pos_rot(pMin, pMax, 0);
}

/**
* Draws a debug box from pMin to pMax, rotating it in the xz-plane by `yaw`
*/
void debug_box_pos_rot(Vec3f pMin, Vec3f pMax, s16 yaw)
{
Vec3f center, bounds;

bounds[0] = pMax[0] - pMin[0] / 2.0f;
bounds[1] = pMax[1] - pMin[1] / 2.0f;
bounds[2] = pMax[2] - pMin[2] / 2.0f;

center[0] = pMin[0] + bounds[0];
center[1] = pMin[1] + bounds[1];
center[2] = pMin[2] + bounds[2];

append_debug_box(center, bounds, yaw);
}

static void render_box(struct DebugBox *box)
{
Vtx *verts = alloc_display_list(8 * sizeof(Vtx));
Mtx *translate;
Mtx *rotate;
Mtx *translateback;
s32 x0 = box->center[0],
y0 = box->center[1],
z0 = box->center[2];

s32 xb = box->bounds[0],
yb = box->bounds[1],
zb = box->bounds[2];

if (verts != NULL) {
if (box->yaw != 0) {
// Translate to the origin, rotate, then translate back, effectively rotating the box about
// its center
translate = alloc_display_list(sizeof(Mtx));
rotate = alloc_display_list(sizeof(Mtx));
translateback = alloc_display_list(sizeof(Mtx));

guTranslate(translate, box->center[0], box->center[1], box->center[2]);
guRotate(rotate, box->yaw / (float)0x10000 * 360.0f, 0, 1.0f, 0);
guTranslate(translateback, -box->center[0], -box->center[1], -box->center[2]);

gSPMatrix(gDisplayListHead++, translate, G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_PUSH);
gSPMatrix(gDisplayListHead++, rotate, G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_NOPUSH);
gSPMatrix(gDisplayListHead++, translateback, G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_NOPUSH);
}
#define DBG_BOX_VTX(i, x, y, z) make_vertex(verts, i, x, y, z, 0, 0, DBG_BOX_COL)
DBG_BOX_VTX(0, x0 - xb, y0 + yb, z0 - zb);
DBG_BOX_VTX(1, x0 + xb, y0 + yb, z0 - zb);
DBG_BOX_VTX(2, x0 - xb, y0 - yb, z0 - zb);
DBG_BOX_VTX(3, x0 + xb, y0 - yb, z0 - zb);
DBG_BOX_VTX(4, x0 - xb, y0 + yb, z0 + zb);
DBG_BOX_VTX(5, x0 + xb, y0 + yb, z0 + zb);
DBG_BOX_VTX(6, x0 - xb, y0 - yb, z0 + zb);
DBG_BOX_VTX(7, x0 + xb, y0 - yb, z0 + zb);
#undef DBG_BOX_VTX
gSPVertex(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(verts), 8, 0);

gSPDisplayList(gDisplayListHead++, dl_debug_draw_box);

if (box->yaw != 0) {
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
}
}
}

void render_debug_boxes()
{
s32 i;
Mtx *mtx;

if (sNumBoxes == 0) {
return;
}

mtx = alloc_display_list(sizeof(Mtx));
if (mtx == NULL) {
for (i = 0; i < sNumBoxes; ++i) {
mem_pool_free(gEffectsMemoryPool, sBoxes[i]);
}
sNumBoxes = 0;
return;
}

//XXX: This is hacky. Ths camera's look-at matrix is stored in gMatStack[1], so this is a simple way
// of using it without reconstructing the matrix.
mtxf_to_mtx(mtx, gMatStack[1]);
gSPMatrix(gDisplayListHead++, mtx, G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
gSPDisplayList(gDisplayListHead++, dl_debug_box_begin);

for (i = 0; i < sNumBoxes; ++i) {
render_box(sBoxes[i]);
mem_pool_free(gEffectsMemoryPool, sBoxes[i]);
}

sNumBoxes = 0;
}

+ 52
- 44
enhancements/mem_error_screen.inc.c View File

@@ -9,13 +9,14 @@
* Make sure that USE_EXT_RAM is defined in include/segments.h
#define USE_EXT_RAM
*
* There are 6 files you will need to edit:
* There are 7 files you will need to edit:
* src/game/main.c
* src/engine/level_script.h
* include/text_strings.h.in
* levels/entry.s
* levels/intro/script.s
* levels/intro/geo.s
* levels/entry.c
* levels/intro/script.c
* levels/intro/geo.c
* levels/intro/header.h
*
* First, in main.c, you will need to add this line below the includes:
#include "../enhancements/mem_error_screen.inc.c"
@@ -45,48 +46,55 @@
#define TEXT_PJ64 _("If you are using PJ64 1.6, go to:\nOptions > Settings > Rom Settings Tab > Memory Size\nthen select 8 MB from the drop-down box.")
#define TEXT_PJ64_2 _("If you are using PJ64 2.X, go to:\nOptions > Settings > Config: > Memory Size, select 8 MB")
*
* In levels/entry.s, simply append the following to the file:
glabel level_script_entry_error_screen
init_level
sleep 2
blackout FALSE
set_reg 0
execute 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_error_screen
jump level_script_entry_error_screen
.align 4
* In levels/entry.c, simply append the following to the file:
const LevelScript level_script_entry_error_screen[] {
INIT_LEVEL(),
SLEEP(2),
BLACKOUT(FALSE),
SET_REG(0),
EXECUTE(0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_error_screen),
JUMP(level_script_entry_error_screen),
};
*
* In levels/intro/script.s, add the following to the top of the file:
glabel level_intro_entry_error_screen
init_level
fixed_load _goddardSegmentStart, _goddardSegmentRomStart, _goddardSegmentRomEnd
load_mio0 0x07, _intro_segment_7SegmentRomStart, _intro_segment_7SegmentRomEnd
alloc_level_pool

area 1, intro_geo_error_screen
end_area

free_level_pool
load_area 1
sleep 32767
exit_and_execute 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_error_screen
* In levels/intro/script.c, add the following to the top of the file:
const LevelScript level_intro_entry_error_screen[] {
INIT_LEVEL(),
FIXED_LOAD(_goddardSegmentStart, _goddardSegmentRomStart, _goddardSegmentRomEnd),
LOAD_MIO0(0x07, _intro_segment_7SegmentRomStart, _intro_segment_7SegmentRomEnd),
ALLOC_LEVEL_POOL(),

AREA(1, intro_geo_error_screen),
END_AREA(),

FREE_LEVEL_POOL(),
LOAD_AREA(1),
SLEEP(32767),
EXIT_AND_EXECUTE(0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_error_screen),
};
*
* Finally, add the following to the top of levels/intro/geo.s:
glabel intro_geo_error_screen
geo_node_screen_area 0, 160, 120, 160, 120
geo_open_node
geo_zbuffer 0
geo_open_node
geo_node_ortho 100
geo_open_node
geo_background 0x0001
geo_close_node
geo_close_node
geo_zbuffer 0
geo_open_node
geo_asm 0, geo18_display_error_message
geo_close_node
geo_close_node
geo_end
* Add the following to the top of levels/intro/geo.c:
const GeoLayout intro_geo_error_screen[] {
GEO_NODE_SCREEN_AREA(0, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2),
GEO_OPEN_NODE(),
GEO_ZBUFFER(0),
GEO_OPEN_NODE(),
GEO_NODE_ORTHO(100),
GEO_OPEN_NODE(),
GEO_BACKGROUND_COLOR(0x0001),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_ZBUFFER(0),
GEO_OPEN_NODE(),
GEO_ASM(0, geo18_display_error_message),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_END(),
};
* Finally, add the following to the bottom of levels/intro/header.h:
extern const GeoLayout intro_geo_error_screen[];
extern const LevelScript level_intro_entry_error_screen[];
extern Gfx *geo18_display_error_message(u32 run, UNUSED struct GraphNode *sp44, UNUSED u32 sp48);
*/
/* clang-format on */



+ 7
- 1
extract_assets.py View File

@@ -20,6 +20,12 @@ def read_local_asset_list(f):


def asset_needs_update(asset, version):
if version <= 4 and asset in ["textures/mountain/ttm_textures.01800.rgba16.png", "textures/mountain/ttm_textures.05800.rgba16.png"]:
return True
if version <= 3 and asset == "textures/cave/hmc_textures.01800.rgba16.png":
return True
if version <= 2 and asset == "textures/inside/inside_castle_textures.09000.rgba16.png":
return True
if version <= 1 and asset.endswith(".m64"):
return True
if version <= 0 and asset.endswith(".aiff"):
@@ -51,7 +57,7 @@ def clean_assets(local_asset_file):
def main():
# In case we ever need to change formats of generated files, we keep a
# revision ID in the local asset file.
new_version = 2
new_version = 5

try:
local_asset_file = open(".assets-local.txt")


+ 1
- 1
include/behavior_data.h View File

@@ -50,7 +50,7 @@ extern const BehaviorScript bhvWarp[];
extern const BehaviorScript bhvWarpPipe[];
extern const BehaviorScript bhvWhitePuffExplosion[];
extern const BehaviorScript bhvSpawnedStar[];
extern const BehaviorScript bhvUnused080C[];
extern const BehaviorScript bhvSpawnedStarNoLevelExit[];
extern const BehaviorScript bhvMrIBlueCoin[];
extern const BehaviorScript bhvCoinInsideBoo[];
extern const BehaviorScript bhvCoinFormationSpawn[];


+ 2
- 3
include/course_table.h View File

@@ -4,17 +4,16 @@
// Start of the 3 cap courses in a row.
#define COURSE_CAP_COURSES COURSE_COTMC

#define DEFINE_COURSE(courseenum, _1, _2, _3, _4) courseenum,
#define DEFINE_COURSE(courseenum, _1) courseenum,
#define DEFINE_COURSES_END() \
COURSE_BONUS_STAGES, \
COURSE_STAGES_MAX = COURSE_BONUS_STAGES - 1, \
COURSE_STAGES_COUNT = COURSE_STAGES_MAX,

#define DEFINE_BONUS_COURSE(courseenum, _1, _2, _3, _4) courseenum,
#define DEFINE_BONUS_COURSE(courseenum, _1) courseenum,

enum CourseNum
{
COURSE_NONE, // (0) Overworld (Castle Grounds, etc)
#include "levels/course_defines.h"
COURSE_END, // To mark end + 1 for marking max and count.
// Todo: clean this up. This is still bad. Which


+ 6
- 6
include/geo_commands.h View File

@@ -163,12 +163,12 @@
* 0x0F: Create a camera scene graph node.
* 0x01: unused
* 0x02: s16 camera type
* 0x04: s16 fromX
* 0x06: s16 fromY
* 0x08: s16 fromZ
* 0x0A: s16 toX
* 0x0C: s16 toY
* 0x0E: s16 toZ
* 0x04: s16 posX
* 0x06: s16 posY
* 0x08: s16 posZ
* 0x0A: s16 focusX
* 0x0C: s16 focusY
* 0x0E: s16 focusZ
* 0x10: GraphNodeFunc function
*/
#define GEO_CAMERA(type, x1, y1, z1, x2, y2, z2, function) \


+ 1
- 1
include/surface_terrains.h View File

@@ -46,7 +46,7 @@
#define SURFACE_BOSS_FIGHT_CAMERA 0x0065 // Wide camera for BOB and WF bosses
#define SURFACE_CAMERA_FREE_ROAM 0x0066 // Free roam camera for THI and TTC
#define SURFACE_THI3_WALLKICK 0x0068 // Surface where there's a wall kick section in THI 3rd area, has no action defined
#define SURFACE_CAMERA_PLATFORM 0x0069 // Surface that enables far camera for platforms, used in THI
#define SURFACE_CAMERA_8_DIR 0x0069 // Surface that enables far camera for platforms, used in THI
#define SURFACE_CAMERA_MIDDLE 0x006E // Surface camera that returns to the middle, used on the 4 pillars of SSL
#define SURFACE_CAMERA_ROTATE_RIGHT 0x006F // Surface camera that rotates to the right (Bowser 1 & THI)
#define SURFACE_CAMERA_ROTATE_LEFT 0x0070 // Surface camera that rotates to the left (BOB & TTM)


+ 1
- 1
include/text_menu_strings.h.in View File

@@ -10,7 +10,7 @@
*/
#define TEXT_JPHUD_MARIO _("マリオ")
#define TEXT_JPHUD_SELECT_FILE _("ファイルセレクト")
#define TEXT_JPHUD_CHECK_FILE _("どのスコアをみる?")
#define TEXT_JPHUD_CHECK_FILE _("どのスコアをみる")
#define TEXT_JPHUD_COPY_FILE _("ファイルコピーする")
#define TEXT_JPHUD_ERASE_FILE _("ファイルけす")
#define TEXT_JPHUD_SOUND_SELECT _("サウンドセレクト")


+ 39
- 39
include/text_strings.h.in View File

@@ -39,14 +39,14 @@
#define TEXT_ERASE_FILE TEXT_JPHUD_ERASE_FILE
#define TEXT_SOUND_SELECT TEXT_JPHUD_SOUND_SELECT

#define TEXT_FILE_MARIO_A _("マリオA")
#define TEXT_FILE_MARIO_B _("マリオB")
#define TEXT_FILE_MARIO_C _("マリオC")
#define TEXT_FILE_MARIO_D _("マリオD")
#define TEXT_FILE_MARIO_A _("マリオ")
#define TEXT_FILE_MARIO_B _("マリオ")
#define TEXT_FILE_MARIO_C _("マリオ")
#define TEXT_FILE_MARIO_D _("マリオ")

// Menu Options
#define TEXT_SCORE _("スコア")
#define TEXT_COPY _("コピ-")
#define TEXT_COPY _("コピ")
#define TEXT_ERASE _("けす")

// Sound Options
@@ -55,72 +55,72 @@
#define TEXT_HEADSET _("ヘッドホン")

// Misc Menu Text
#define TEXT_SAVED_DATA_EXISTS _("ファイルにデ-タがはいってます")
#define TEXT_NO_SAVED_DATA_EXISTS _("ファイルにデ-タがありません")
#define TEXT_SAVED_DATA_EXISTS _("ファイルにデタがはいってます")
#define TEXT_NO_SAVED_DATA_EXISTS _("ファイルにデタがありません")

// Inside a Menu
#define TEXT_RETURN _("もどる")
#define TEXT_CHECK_SCORE _("スコアをみる")
#define TEXT_COPY_FILE_BUTTON _("ファイルコピ-")
#define TEXT_COPY_FILE_BUTTON _("ファイルコピ")
#define TEXT_ERASE_FILE_BUTTON _("ファイルけす")

// Score Menu
#define TEXT_HI_SCORE _("ハイスコア")
#define TEXT_MY_SCORE _("マイスコア")
#define TEXT_SCORE_MARIO_A _("マリオA")
#define TEXT_SCORE_MARIO_B _("マリオB")
#define TEXT_SCORE_MARIO_C _("マリオC")
#define TEXT_SCORE_MARIO_D _("マリオD")
#define TEXT_SCORE_MARIO_A _("マリオ")
#define TEXT_SCORE_MARIO_B _("マリオ")
#define TEXT_SCORE_MARIO_C _("マリオ")
#define TEXT_SCORE_MARIO_D _("マリオ")

// Copy Menu
#define TEXT_COPY_IT_TO_WHERE _("どこにコピ-しますか?")
#define TEXT_COPYING_COMPLETED _("コピ-おわりました")
#define TEXT_COPY_IT_TO_WHERE _("どこにコピーしますか?")
#define TEXT_COPYING_COMPLETED _("コピおわりました")
#define TEXT_NO_FILE_TO_COPY_FROM _("からのファイルがありません")

// Erase Menu
#define TEXT_SURE _("ほんと?")
#define TEXT_SURE _("ほんと")
#define TEXT_YES _("はい")
#define TEXT_NO _("いいえ")
#define TEXT_FILE_MARIO_A_JUST_ERASED _("マリオAをけしました")
#define TEXT_FILE_MARIO_A_JUST_ERASED _("マリオをけしました")

/**
* Menus Text (Pause, Course Completed)
*/
// Main Courses
#define TEXT_COURSE _("コ-ス")
#define TEXT_COURSE _("コス")
#define TEXT_MYSCORE _("マイスコア")
#define TEXT_CONTINUE _("つづけて マリオする?")
#define TEXT_EXIT_COURSE _("コ-スからでる?")
#define TEXT_CAMERA_ANGLE_R _("Rボタンのカメラきりかえ")
#define TEXT_CONTINUE _("つづけて マリオする?")
#define TEXT_EXIT_COURSE _("コースからでる?")
#define TEXT_CAMERA_ANGLE_R _("ボタンのカメラきりかえ")

// Camera Options
#define TEXT_LAKITU_MARIO _("ジュゲム+マリオ")
#define TEXT_LAKITU_STOP _("ジュゲム+ストップ")
#define TEXT_NORMAL_UPCLOSE _("(おすすめ)(リアル)")
#define TEXT_NORMAL_FIXED _("(おすすめ)(とまる)")
#define TEXT_LAKITU_MARIO _("ジュゲムマリオ")
#define TEXT_LAKITU_STOP _("ジュゲムストップ")
#define TEXT_NORMAL_UPCLOSE _("(おすすめ)(リアル)")
#define TEXT_NORMAL_FIXED _("(おすすめ)(とまる)")

// Course Completed Misc Text
#define TEXT_CATCH _("キャッチ!")
#define TEXT_CLEAR _("クリア!")
#define TEXT_HUD_HI_SCORE _("HISCORE")
#define TEXT_CATCH _("キャッチ")
#define TEXT_CLEAR _("クリア")
#define TEXT_HUD_HI_SCORE _("HISCORE")

// Save Options
#define TEXT_SAVE_AND_CONTINUE _("セ-ブしてつづける?")
#define TEXT_SAVE_AND_QUIT _("セ-ブしておわる?")
#define TEXT_CONTINUE_WITHOUT_SAVING _("セ-ブしないでつづける?")
#define TEXT_SAVE_AND_CONTINUE _("セーブしてつづける?")
#define TEXT_SAVE_AND_QUIT _("セーブしておわる?")
#define TEXT_CONTINUE_WITHOUT_SAVING _("セーブしないでつづける?")

/**
* Ending Peach cutscene text.
*/
#define TEXT_FILE_MARIO_EXCLAMATION _("マリオ!!")
#define TEXT_POWER_STARS_RESTORED _("おしろにスタ-が もどったのね")
#define TEXT_THANKS_TO_YOU _("みんな あなたのおかげだわ!")
#define TEXT_THANK_YOU_MARIO _("ありがとう マリオ")
#define TEXT_SOMETHING_SPECIAL _("なにか おれいをしなくちゃ・・")
#define TEXT_LISTEN_EVERYBODY _("さあ みんな")
#define TEXT_LETS_HAVE_CAKE _("おいしいケ-キを やきましょう")
#define TEXT_FOR_MARIO _("マリオの ために・・・")
#define TEXT_FILE_MARIO_QUESTION _("マリオ?")
#define TEXT_FILE_MARIO_EXCLAMATION _("マリオ!!")
#define TEXT_POWER_STARS_RESTORED _("おしろにスターが もどったのね")
#define TEXT_THANKS_TO_YOU _("みんな あなたのおかげだわ!")
#define TEXT_THANK_YOU_MARIO _("ありがとう マリオ")
#define TEXT_SOMETHING_SPECIAL _("なにか おれいをしなくちゃ・・")
#define TEXT_LISTEN_EVERYBODY _("さあ みんな")
#define TEXT_LETS_HAVE_CAKE _("おいしいケーキを やきましょう")
#define TEXT_FOR_MARIO _("マリオの ために・・・")
#define TEXT_FILE_MARIO_QUESTION _("マリオ")

#endif



+ 0
- 4
include/textures.h View File

@@ -7,7 +7,6 @@
extern const u8 cave_09000000[];
extern const u8 cave_09001000[];
extern const u8 cave_09001800[];
extern const u8 cave_09002000[];
extern const u8 cave_09002800[];
extern const u8 cave_09003000[];
extern const u8 cave_09003800[];
@@ -114,7 +113,6 @@ extern const u8 inside_09007000[];
extern const u8 inside_09008000[];
extern const u8 inside_09008800[];
extern const u8 inside_09009000[];
extern const u8 inside_09009800[];
extern const u8 inside_0900A000[];
extern const u8 inside_0900B000[];
extern const u8 inside_0900B800[];
@@ -142,7 +140,6 @@ extern const u8 machine_09008400[];
extern const u8 mountain_09000000[];
extern const u8 mountain_09000800[];
extern const u8 mountain_09001800[];
extern const u8 mountain_09002000[];
extern const u8 mountain_09002800[];
extern const u8 mountain_09003000[];
extern const u8 mountain_09003800[];
@@ -150,7 +147,6 @@ extern const u8 mountain_09004000[];
extern const u8 mountain_09004800[];
extern const u8 mountain_09005000[];
extern const u8 mountain_09005800[];
extern const u8 mountain_09006000[];
extern const u8 mountain_09006800[];
extern const u8 mountain_09007000[];
extern const u8 mountain_09007800[];


+ 1
- 1
include/types.h View File

@@ -309,7 +309,7 @@ struct MarioState
/*0x88*/ struct Object *marioObj;
/*0x8C*/ struct SpawnInfo *spawnInfo;
/*0x90*/ struct Area *area;
/*0x94*/ struct CameraPlayerStatus *statusForCamera;
/*0x94*/ struct PlayerCameraState *statusForCamera;
/*0x98*/ struct MarioBodyState *marioBodyState;
/*0x9C*/ struct Controller *controller;
/*0xA0*/ struct MarioAnimation *animation;


+ 1
- 1
levels/bbh/areas/1/geo.inc.c View File

@@ -479,7 +479,7 @@ const GeoLayout geo_bbh_000F00[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 50, 10000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_SWITCH_CASE(32, geo_switch_area),
GEO_OPEN_NODE(),


+ 1
- 1
levels/bitdw/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout geo_bitdw_000618[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(14, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(14, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_ALPHA, bitdw_seg7_dl_070020C8),
GEO_RENDER_OBJ(),


+ 1
- 1
levels/bitfs/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout bitfs_geo_0007A0[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(14, 0, 2000, 6000, 0, -4500, -8000, geo_camera_preset_and_pos),
GEO_CAMERA(14, 0, 2000, 6000, 0, -4500, -8000, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_ALPHA, bitfs_seg7_dl_07002118),
GEO_ASM( 0, geo_movtex_pause_control),


+ 1
- 1
levels/bits/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout bits_geo_000718[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(14, 0, 2000, 6000, 0, -4500, -8000, geo_camera_preset_and_pos),
GEO_CAMERA(14, 0, 2000, 6000, 0, -4500, -8000, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_ALPHA, bits_seg7_dl_07002918),
GEO_RENDER_OBJ(),


+ 1
- 1
levels/bob/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout bob_geo_000488[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 30000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, 3072, 0, -4608, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, 3072, 0, -4608, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, bob_seg7_dl_07004390),
GEO_DISPLAY_LIST(LAYER_OPAQUE, bob_seg7_dl_07009D80),


+ 1
- 1
levels/bowser_1/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout bowser_1_geo_0000D0[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(11, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(11, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, bowser_1_seg7_dl_07002768),
GEO_RENDER_OBJ(),


+ 1
- 1
levels/bowser_2/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout bowser_2_geo_000188[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(11, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(11, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, bowser_2_seg7_dl_07001930),
GEO_RENDER_OBJ(),


+ 1
- 1
levels/bowser_3/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout bowser_3_geo_000398[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(11, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(11, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, bowser_3_seg7_dl_070046B0),
GEO_RENDER_OBJ(),


+ 1
- 1
levels/castle_courtyard/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout castle_courtyard_geo_000218[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, castle_courtyard_seg7_dl_070048B8),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT_DECAL, castle_courtyard_seg7_dl_07005698),


+ 1
- 1
levels/castle_grounds/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout castle_grounds_geo_00073C[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 1500, 2500, 0, 1500, -12000, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 1500, 2500, 0, 1500, -12000, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, castle_grounds_seg7_dl_07006D70),
GEO_DISPLAY_LIST(LAYER_OPAQUE, castle_grounds_seg7_dl_070095F0),


+ 1
- 1
levels/castle_inside/areas/1/geo.inc.c View File

@@ -269,7 +269,7 @@ const GeoLayout castle_geo_001400[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(64, 50, 7000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(13, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(13, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_SWITCH_CASE(17, geo_switch_area),
GEO_OPEN_NODE(),


+ 1
- 1
levels/castle_inside/areas/2/geo.inc.c View File

@@ -174,7 +174,7 @@ const GeoLayout castle_geo_001858[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(64, 50, 8000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_SWITCH_CASE(11, geo_switch_area),
GEO_OPEN_NODE(),


+ 1
- 1
levels/castle_inside/areas/3/geo.inc.c View File

@@ -160,7 +160,7 @@ const GeoLayout castle_geo_001C10[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(64, 50, 6400, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_SWITCH_CASE(10, geo_switch_area),
GEO_OPEN_NODE(),


+ 1
- 1
levels/ccm/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ccm_geo_00051C[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ccm_seg7_dl_0700B090),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ccm_seg7_dl_0700B1D8),


+ 1
- 1
levels/ccm/areas/2/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ccm_geo_0005E8[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ccm_seg7_dl_0701CE30),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ccm_seg7_dl_0701E558),


+ 1
- 1
levels/cotmc/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout cotmc_geo_0001A0[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, cotmc_seg7_dl_07007D48),
GEO_DISPLAY_LIST(LAYER_OPAQUE, cotmc_seg7_dl_0700A160),


+ 38
- 28
levels/course_defines.h View File

@@ -1,29 +1,39 @@
// Define lists for list of course for macros. Each of the following fields are described:
// Argument 1: Course macro for define.
// Argument 2, 3, 4, 5: Each hex digit is an index into D_8032E8A4 which is for a table of cutscene dance indexes. Defined by course index so we must define these.
DEFINE_COURSE(COURSE_BOB, 0x00, 0x20, 0x22, 0x04) // (1) Bob Omb Battlefield
DEFINE_COURSE(COURSE_WF, 0x00, 0x00, 0x02, 0x04) // (2) Whomp's Fortress
DEFINE_COURSE(COURSE_JRB, 0x22, 0x22, 0x22, 0x04) // (3) Jolly Rodger's Bay
DEFINE_COURSE(COURSE_CCM, 0x00, 0x22, 0x00, 0x04) // (4) Cool Cool Mountain
DEFINE_COURSE(COURSE_BBH, 0x22, 0x22, 0x22, 0x04) // (5) Big Boo's Haunt
DEFINE_COURSE(COURSE_HMC, 0x22, 0x22, 0x22, 0x04) // (6) Hazy Maze Cave
DEFINE_COURSE(COURSE_LLL, 0x12, 0x12, 0x12, 0x04) // (7) Lethal Lava Land
DEFINE_COURSE(COURSE_SSL, 0x02, 0x22, 0x22, 0x04) // (8) Shifting Sand Land
DEFINE_COURSE(COURSE_DDD, 0x22, 0x22, 0x22, 0x04) // (9) Dire Dire Docks
DEFINE_COURSE(COURSE_SL, 0x20, 0x20, 0x20, 0x04) // (10) Snowman's Land
DEFINE_COURSE(COURSE_WDW, 0x22, 0x01, 0x22, 0x04) // (11) Wet Dry World
DEFINE_COURSE(COURSE_TTM, 0x00, 0x00, 0x00, 0x04) // (12) Tall Tall Mountain
DEFINE_COURSE(COURSE_THI, 0x11, 0x11, 0x12, 0x04) // (13) Tiny Huge Island
DEFINE_COURSE(COURSE_TTC, 0x22, 0x22, 0x22, 0x04) // (14) Tick Tock Clock
DEFINE_COURSE(COURSE_RR, 0x00, 0x00, 0x00, 0x04) // (15) Rainbow Ride
/* Define lists for list of course for macros. Each of the following fields are described:
* Argument 1: Course macro for define.
* Argument 2: Star collection dance cutscenes
* Each hex digit determines what dance cutscene to play for the stars in the course. The last digit is
* unused. See determine_dance_cutscene() in camera.c for details.
* Cutscene Digits:
* 0: Lakitu flies away after the dance
* 1: The camera rotates around mario
* 2: The camera goes to a closeup of mario
* 3: Bowser keys and the grand star
* 4: Default, used for 100 coin stars, 8 red coin stars in bowser levels, and secret stars
*/
DEFINE_COURSE(COURSE_NONE, 0x44444440) // (0) Course Hub (Castle Grounds)
DEFINE_COURSE(COURSE_BOB, 0x00022240) // (1) Bob Omb Battlefield
DEFINE_COURSE(COURSE_WF, 0x00002040) // (2) Whomp's Fortress
DEFINE_COURSE(COURSE_JRB, 0x22222240) // (3) Jolly Rodger's Bay
DEFINE_COURSE(COURSE_CCM, 0x00220040) // (4) Cool Cool Mountain
DEFINE_COURSE(COURSE_BBH, 0x22222240) // (5) Big Boo's Haunt
DEFINE_COURSE(COURSE_HMC, 0x22222240) // (6) Hazy Maze Cave
DEFINE_COURSE(COURSE_LLL, 0x21212140) // (7) Lethal Lava Land
DEFINE_COURSE(COURSE_SSL, 0x20222240) // (8) Shifting Sand Land
DEFINE_COURSE(COURSE_DDD, 0x22222240) // (9) Dire Dire Docks
DEFINE_COURSE(COURSE_SL, 0x02020240) // (10) Snowman's Land
DEFINE_COURSE(COURSE_WDW, 0x22102240) // (11) Wet Dry World
DEFINE_COURSE(COURSE_TTM, 0x00000040) // (12) Tall Tall Mountain
DEFINE_COURSE(COURSE_THI, 0x11112140) // (13) Tiny Huge Island
DEFINE_COURSE(COURSE_TTC, 0x22222240) // (14) Tick Tock Clock
DEFINE_COURSE(COURSE_RR, 0x00000040) // (15) Rainbow Ride
DEFINE_COURSES_END()
DEFINE_BONUS_COURSE(COURSE_BITDW, 0x43, 0x44, 0x44, 0x04) // (16) Bowser in the Dark World
DEFINE_BONUS_COURSE(COURSE_BITFS, 0x43, 0x44, 0x44, 0x04) // (17) Bowser in the Fire Sea
DEFINE_BONUS_COURSE(COURSE_BITS, 0x43, 0x44, 0x44, 0x04) // (18) Bowser in the Sky
DEFINE_BONUS_COURSE(COURSE_PSS, 0x42, 0x44, 0x44, 0x04) // (19) Princess's Secret Slide
DEFINE_BONUS_COURSE(COURSE_COTMC, 0x44, 0x44, 0x44, 0x04) // (20) Cavern of the Metal Cap
DEFINE_BONUS_COURSE(COURSE_TOTWC, 0x40, 0x44, 0x44, 0x04) // (21) Tower of the Wing Cap
DEFINE_BONUS_COURSE(COURSE_VCUTM, 0x42, 0x44, 0x44, 0x04) // (22) Vanish Cap Under the Moat
DEFINE_BONUS_COURSE(COURSE_WMOTR, 0x40, 0x44, 0x44, 0x04) // (23) Winged Mario over the Rainbow
DEFINE_BONUS_COURSE(COURSE_SA, 0x42, 0x44, 0x44, 0x04) // (24) Secret Aquarium
DEFINE_BONUS_COURSE(COURSE_CAKE_END, 0x44, 0x44, 0x44, 0x04) // (25) The End (Cake Scene)
DEFINE_BONUS_COURSE(COURSE_BITDW, 0x34444440) // (16) Bowser in the Dark World
DEFINE_BONUS_COURSE(COURSE_BITFS, 0x34444440) // (17) Bowser in the Fire Sea
DEFINE_BONUS_COURSE(COURSE_BITS, 0x34444440) // (18) Bowser in the Sky
DEFINE_BONUS_COURSE(COURSE_PSS, 0x24444440) // (19) Princess's Secret Slide
DEFINE_BONUS_COURSE(COURSE_COTMC, 0x44444440) // (20) Cavern of the Metal Cap
DEFINE_BONUS_COURSE(COURSE_TOTWC, 0x04444440) // (21) Tower of the Wing Cap
DEFINE_BONUS_COURSE(COURSE_VCUTM, 0x24444440) // (22) Vanish Cap Under the Moat
DEFINE_BONUS_COURSE(COURSE_WMOTR, 0x04444440) // (23) Winged Mario over the Rainbow
DEFINE_BONUS_COURSE(COURSE_SA, 0x24444440) // (24) Secret Aquarium
DEFINE_BONUS_COURSE(COURSE_CAKE_END, 0x44444440) // (25) The End (Cake Scene)

+ 1
- 1
levels/ddd/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ddd_geo_0004C0[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(2, 0, 2000, 6000, 2560, 0, 512, geo_camera_preset_and_pos),
GEO_CAMERA(2, 0, 2000, 6000, 2560, 0, 512, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ddd_seg7_dl_07004D48),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ddd_seg7_dl_070057E8),


+ 1
- 1
levels/ddd/areas/2/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ddd_geo_000570[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(4, 0, 2000, 6000, 2560, 0, 512, geo_camera_preset_and_pos),
GEO_CAMERA(4, 0, 2000, 6000, 2560, 0, 512, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ddd_seg7_dl_07007408),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ddd_seg7_dl_07007CB8),


+ 1
- 1
levels/ending/geo.c View File

@@ -26,7 +26,7 @@ const GeoLayout ending_geo_000050[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(),


+ 1
- 1
levels/hmc/areas/1/geo.inc.c View File

@@ -302,7 +302,7 @@ const GeoLayout hmc_geo_000B90[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_SWITCH_CASE(18, geo_switch_area),
GEO_OPEN_NODE(),


+ 1
- 1
levels/jrb/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout jrb_geo_000A18[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 25000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_ALPHA, jrb_seg7_dl_07002FD0),
GEO_DISPLAY_LIST(LAYER_OPAQUE, jrb_seg7_dl_07004940),


+ 1
- 1
levels/jrb/areas/2/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout jrb_geo_000AFC[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 10000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, jrb_seg7_dl_0700EF00),
GEO_DISPLAY_LIST(LAYER_ALPHA, jrb_seg7_dl_0700FE48),


+ 11
- 15
levels/level_defines.h View File

@@ -15,25 +15,23 @@
// Argument 10: Specify dynamic music tables for levels, if specified. _ for none.
// Argument 11: Specify level camera table, if specified. _ for none.

// NOTE: Be sure to edit zoomOutAreaMasks in camera.c, as there isnt a good way to macro those right now.
// TODO: Figure something out for zoomOutAreaMasks?
#ifndef SKIP_FIRST_LAST_STUBS // this is needed for the zoomOutAreaMasks array which has a weird way of doing the bit array packs.
// NOTE: Be sure to edit sZoomOutAreaMasks in camera.c, as there isnt a good way to macro those right now.
// TODO: Figure something out for sZoomOutAreaMasks?
STUB_LEVEL( "", LEVEL_UNKNOWN_1, COURSE_NONE, 20000, 0x00, 0x00, 0x00, _, _)
#endif
STUB_LEVEL( "", LEVEL_UNKNOWN_2, COURSE_NONE, 20000, 0x00, 0x00, 0x00, _, _)
STUB_LEVEL( "", LEVEL_UNKNOWN_3, COURSE_NONE, 20000, 0x00, 0x00, 0x00, _, _)
DEFINE_LEVEL("TERESA OBAKE", LEVEL_BBH, COURSE_BBH, bbh, spooky, 28000, 0x28, 0x28, 0x28, sDynBbh, TableCameraBBH)
DEFINE_LEVEL("YYAMA1 % YSLD1", LEVEL_CCM, COURSE_CCM, ccm, snow, 17000, 0x10, 0x38, 0x38, _, TableCameraCCM)
DEFINE_LEVEL("SELECT ROOM", LEVEL_CASTLE, COURSE_NONE, castle_inside, inside, 20000, 0x20, 0x20, 0x30, _, TableCameraInside)
DEFINE_LEVEL("HORROR DUNGEON", LEVEL_HMC, COURSE_HMC, hmc, cave, 16000, 0x28, 0x28, 0x28, sDynHmc, TableCameraHMC)
DEFINE_LEVEL("SABAKU % PYRMD", LEVEL_SSL, COURSE_SSL, ssl, generic, 15000, 0x08, 0x30, 0x30, _, TableCameraSSL)
DEFINE_LEVEL("TERESA OBAKE", LEVEL_BBH, COURSE_BBH, bbh, spooky, 28000, 0x28, 0x28, 0x28, sDynBbh, sCamBBH)
DEFINE_LEVEL("YYAMA1 % YSLD1", LEVEL_CCM, COURSE_CCM, ccm, snow, 17000, 0x10, 0x38, 0x38, _, sCamCCM)
DEFINE_LEVEL("SELECT ROOM", LEVEL_CASTLE, COURSE_NONE, castle_inside, inside, 20000, 0x20, 0x20, 0x30, _, sCamCastle)
DEFINE_LEVEL("HORROR DUNGEON", LEVEL_HMC, COURSE_HMC, hmc, cave, 16000, 0x28, 0x28, 0x28, sDynHmc, sCamHMC)
DEFINE_LEVEL("SABAKU % PYRMD", LEVEL_SSL, COURSE_SSL, ssl, generic, 15000, 0x08, 0x30, 0x30, _, sCamSSL)
DEFINE_LEVEL("BATTLE FIELD", LEVEL_BOB, COURSE_BOB, bob, generic, 15000, 0x08, 0x08, 0x08, _, _)
DEFINE_LEVEL("YUKIYAMA2", LEVEL_SL, COURSE_SL, sl, snow, 14000, 0x10, 0x28, 0x28, _, TableCameraSL)
DEFINE_LEVEL("YUKIYAMA2", LEVEL_SL, COURSE_SL, sl, snow, 14000, 0x10, 0x28, 0x28, _, sCamSL)
DEFINE_LEVEL("POOL KAI", LEVEL_WDW, COURSE_WDW, wdw, grass, 17000, 0x10, 0x18, 0x18, sDynWdw, _)
DEFINE_LEVEL("WTDG % TINBOTU", LEVEL_JRB, COURSE_JRB, jrb, water, 20000, 0x10, 0x18, 0x18, sDynJrb, _)
DEFINE_LEVEL("BIG WORLD", LEVEL_THI, COURSE_THI, thi, grass, 20000, 0x0c, 0x0c, 0x20, _, TableCameraTHI)
DEFINE_LEVEL("BIG WORLD", LEVEL_THI, COURSE_THI, thi, grass, 20000, 0x0c, 0x0c, 0x20, _, sCamTHI)
DEFINE_LEVEL("CLOCK TOWER", LEVEL_TTC, COURSE_TTC, ttc, machine, 18000, 0x18, 0x18, 0x18, _, _)
DEFINE_LEVEL("RAINBOW CRUISE", LEVEL_RR, COURSE_RR, rr, sky, 20000, 0x20, 0x20, 0x20, _, TableCameraRR)
DEFINE_LEVEL("RAINBOW CRUISE", LEVEL_RR, COURSE_RR, rr, sky, 20000, 0x20, 0x20, 0x20, _, sCamRR)
DEFINE_LEVEL("MAIN MAP", LEVEL_CASTLE_GROUNDS, COURSE_NONE, castle_grounds, outside, 25000, 0x08, 0x08, 0x08, _, _)
DEFINE_LEVEL("EXT1 YOKO SCRL", LEVEL_BITDW, COURSE_BITDW, bitdw, sky, 16000, 0x28, 0x28, 0x28, _, _)
DEFINE_LEVEL("EXT7 HORI MINI", LEVEL_VCUTM, COURSE_VCUTM, vcutm, outside, 30000, 0x28, 0x28, 0x28, _, _)
@@ -46,7 +44,7 @@ DEFINE_LEVEL("MOUNTAIN", LEVEL_WF, COURSE_WF, wf,
DEFINE_LEVEL("ENDING", LEVEL_ENDING, COURSE_CAKE_END, ending, generic, 20000, 0x00, 0x00, 0x00, _, _)
DEFINE_LEVEL("URANIWA", LEVEL_CASTLE_COURTYARD, COURSE_NONE, castle_courtyard, outside, 20000, 0x08, 0x08, 0x08, _, _)
DEFINE_LEVEL("EXT4 MINI SLID", LEVEL_PSS, COURSE_PSS, pss, mountain, 20000, 0x28, 0x28, 0x28, _, _)
DEFINE_LEVEL("IN THE FALL", LEVEL_COTMC, COURSE_COTMC, cotmc, cave, 18000, 0x28, 0x28, 0x28, _, TableCameraCotMC)
DEFINE_LEVEL("IN THE FALL", LEVEL_COTMC, COURSE_COTMC, cotmc, cave, 18000, 0x28, 0x28, 0x28, _, sCamCotMC)
DEFINE_LEVEL("EXT6 MARIO FLY", LEVEL_TOTWC, COURSE_TOTWC, totwc, sky, 20000, 0x20, 0x20, 0x20, _, _)
DEFINE_LEVEL("KUPPA1", LEVEL_BOWSER_1, COURSE_BITDW, bowser_1, generic, VAL_DIFF, 0x40, 0x40, 0x40, _, _)
DEFINE_LEVEL("EXT8 BLUE SKY", LEVEL_WMOTR, COURSE_WMOTR, wmotr, generic, 20000, 0x28, 0x28, 0x28, _, _)
@@ -56,6 +54,4 @@ DEFINE_LEVEL("KUPPA3", LEVEL_BOWSER_3, COURSE_BITS, bowser_3
STUB_LEVEL( "", LEVEL_UNKNOWN_35, COURSE_NONE, 20000, 0x00, 0x00, 0x00, _, _)
DEFINE_LEVEL("DONKEY % SLID2", LEVEL_TTM, COURSE_TTM, ttm, mountain, 15000, 0x08, 0x08, 0x08, _, _)
STUB_LEVEL( "", LEVEL_UNKNOWN_37, COURSE_NONE, 20000, 0x00, 0x00, 0x00, _, _)
#ifndef SKIP_FIRST_LAST_STUBS
STUB_LEVEL( "", LEVEL_UNKNOWN_38, COURSE_NONE, 20000, 0x00, 0x00, 0x00, sDynUnk38, _)
#endif

+ 1
- 1
levels/lll/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout lll_geo_000E00[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(64, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, -8192, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, -8192, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, lll_seg7_dl_070134E0),
GEO_DISPLAY_LIST(LAYER_ALPHA, lll_seg7_dl_070138F8),


+ 1
- 1
levels/lll/areas/2/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout lll_geo_000EC0[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(2, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(2, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, lll_seg7_dl_070235C8),
GEO_DISPLAY_LIST(LAYER_OPAQUE, lll_seg7_dl_07024C18),


+ 1
- 1
levels/pss/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout pss_geo_000100[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, pss_seg7_dl_0700A7C0),
GEO_DISPLAY_LIST(LAYER_OPAQUE, pss_seg7_dl_0700AFA8),


+ 1
- 1
levels/rr/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout rr_geo_0009D0[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(14, 0, 2000, 6000, 0, 0, -8000, geo_camera_preset_and_pos),
GEO_CAMERA(14, 0, 2000, 6000, 0, 0, -8000, geo_camera_main),
GEO_OPEN_NODE(),
GEO_ASM(0, geo_exec_flying_carpet_timer_update),
GEO_DISPLAY_LIST(LAYER_ALPHA, dl_cruiser_metal_holes),


+ 1
- 1
levels/sa/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout sa_geo_000170[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, sa_seg7_dl_07002DE8),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, sa_seg7_dl_07002FD0),


+ 1
- 1
levels/sl/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout sl_geo_0003A8[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 2000, 6000, 0, 4400, 0, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 2000, 6000, 0, 4400, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, sl_seg7_dl_07005478),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, sl_seg7_dl_070056B0),


+ 1
- 1
levels/sl/areas/2/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout sl_geo_000484[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, sl_seg7_dl_0700BAE8),
GEO_DISPLAY_LIST(LAYER_OPAQUE, sl_seg7_dl_0700BCF8),


+ 1
- 1
levels/ssl/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ssl_geo_000648[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, -2048, 0, -1024, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, -2048, 0, -1024, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ssl_seg7_dl_07009F48),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ssl_seg7_dl_0700BA78),


+ 1
- 1
levels/ssl/areas/2/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ssl_geo_0007CC[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ssl_seg7_dl_0701EE80),
GEO_DISPLAY_LIST(LAYER_ALPHA, ssl_seg7_dl_0701F920),


+ 1
- 1
levels/ssl/areas/3/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ssl_geo_00088C[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(4, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ssl_seg7_dl_07021A08),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, ssl_seg7_dl_07021DE8),


+ 1
- 1
levels/thi/areas/1/collision.inc.c View File

@@ -1232,7 +1232,7 @@ const Collision thi_seg7_area_1_collision[] = {
COL_TRI_INIT(SURFACE_CAMERA_FREE_ROAM, 2),
COL_TRI(326, 328, 141),
COL_TRI(326, 141, 327),
COL_TRI_INIT(SURFACE_CAMERA_PLATFORM, 4),
COL_TRI_INIT(SURFACE_CAMERA_8_DIR, 4),
COL_TRI(288, 86, 193),
COL_TRI(256, 288, 193),
COL_TRI(256, 193, 27),


+ 1
- 1
levels/thi/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout thi_geo_000608[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, thi_seg7_dl_07005260),
GEO_DISPLAY_LIST(LAYER_OPAQUE, thi_seg7_dl_07006968),


+ 1
- 1
levels/thi/areas/2/collision.inc.c View File

@@ -963,7 +963,7 @@ const Collision thi_seg7_area_2_collision[] = {
COL_TRI_INIT(SURFACE_VERTICAL_WIND, 2),
COL_TRI(353, 354, 355),
COL_TRI(353, 355, 356),
COL_TRI_INIT(SURFACE_CAMERA_PLATFORM, 4),
COL_TRI_INIT(SURFACE_CAMERA_8_DIR, 4),
COL_TRI(243, 242, 46),
COL_TRI(242, 148, 46),
COL_TRI(242, 244, 148),


+ 1
- 1
levels/thi/areas/2/geo.inc.c View File

@@ -15,7 +15,7 @@ const GeoLayout thi_geo_0006D4[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_SCALE(0x00, 19660),
GEO_OPEN_NODE(),


+ 1
- 1
levels/thi/areas/3/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout thi_geo_00079C[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, thi_seg7_dl_07007C20),
GEO_DISPLAY_LIST(LAYER_OPAQUE, thi_seg7_dl_07009670),


+ 1
- 1
levels/totwc/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout totwc_geo_000188[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 25000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, totwc_seg7_dl_07005D28),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, totwc_seg7_dl_07007048),


+ 1
- 1
levels/ttc/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ttc_geo_0003B8[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(2, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(2, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_ASM( 0, geo_movtex_pause_control),
GEO_ASM(0x1400, geo_movtex_update_horizontal),


+ 1
- 1
levels/ttm/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ttm_geo_000A70[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, 0, -2200, 0, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, 0, -2200, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ttm_seg7_dl_0700A120),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ttm_seg7_dl_0700A2E0),


+ 1
- 1
levels/ttm/areas/2/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ttm_geo_000B5C[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ttm_seg7_dl_0701D798),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ttm_seg7_dl_0701DBB8),


+ 1
- 1
levels/ttm/areas/3/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ttm_geo_000BEC[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ttm_seg7_dl_070249A0),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ttm_seg7_dl_07024C78),


+ 1
- 1
levels/ttm/areas/4/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout ttm_geo_000C84[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(9, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ttm_seg7_dl_0702A1B8),
GEO_DISPLAY_LIST(LAYER_OPAQUE, ttm_seg7_dl_0702A8A0),


+ 1
- 1
levels/vcutm/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout vcutm_geo_000208[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 25000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(14, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(14, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, vcutm_seg7_dl_07007E88),
GEO_DISPLAY_LIST(LAYER_OPAQUE, vcutm_seg7_dl_07008E10),


+ 1
- 1
levels/wdw/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout wdw_geo_000658[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, -4352, 0, -4352, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, -4352, 0, -4352, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, wdw_seg7_dl_07009AB0),
GEO_DISPLAY_LIST(LAYER_ALPHA, wdw_seg7_dl_0700A138),


+ 1
- 1
levels/wdw/areas/2/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout wdw_geo_000724[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, -4352, 0, -4352, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, -4352, 0, -4352, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, wdw_seg7_dl_07011E48),
GEO_DISPLAY_LIST(LAYER_ALPHA, wdw_seg7_dl_07012258),


+ 1
- 1
levels/wf/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout wf_geo_000BF8[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 12800, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(1, 0, 2000, 6000, 0, 2000, 0, geo_camera_preset_and_pos),
GEO_CAMERA(1, 0, 2000, 6000, 0, 2000, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, wf_seg7_dl_070050C8),
GEO_DISPLAY_LIST(LAYER_OPAQUE_DECAL, wf_seg7_dl_070052B8),


+ 1
- 1
levels/wmotr/areas/1/geo.inc.c View File

@@ -13,7 +13,7 @@ const GeoLayout wmotr_geo_0001F0[] = {
GEO_OPEN_NODE(),
GEO_CAMERA_FRUSTUM_WITH_FUNC(45, 100, 20000, geo_camera_fov),
GEO_OPEN_NODE(),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_preset_and_pos),
GEO_CAMERA(16, 0, 2000, 6000, 0, 0, 0, geo_camera_main),
GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_OPAQUE, wmotr_seg7_dl_0700C1F8),
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, wmotr_seg7_dl_0700EFD8),


+ 89
- 89
src/engine/behavior_script.c View File

@@ -91,13 +91,13 @@ static void Unknown80383E44(void) // ?
}
}

static s32 beh_cmd_unhide(void) {
static s32 beh_cmd_hide(void) {
obj_hide();
gBehCommand++;
return BEH_CONTINUE;
}

static s32 beh_cmd_graph_clear(void) {
static s32 beh_cmd_disable_rendering(void) {
gCurrentObject->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE;
gBehCommand++;
return BEH_CONTINUE;
@@ -109,26 +109,26 @@ static s32 beh_cmd_billboard(void) {
return BEH_CONTINUE;
}

static s32 beh_cmd_graph_node(void) {
s32 index = (s16)(gBehCommand[0] & 0xFFFF);
gCurrentObject->header.gfx.sharedChild = gLoadedGraphNodes[index];
static s32 beh_cmd_set_model(void) {
s32 modelID = (s16)(gBehCommand[0] & 0xFFFF);
gCurrentObject->header.gfx.sharedChild = gLoadedGraphNodes[modelID];
gBehCommand++;
return BEH_CONTINUE;
}

static s32 beh_cmd_obj_load_chill(void) {
static s32 beh_cmd_spawn_child(void) {
u32 model = (u32) gBehCommand[1];
const BehaviorScript *behavior = (const BehaviorScript *) gBehCommand[2];

struct Object *object = spawn_object_at_origin(gCurrentObject, 0, model, behavior);
struct Object *child = spawn_object_at_origin(gCurrentObject, 0, model, behavior);

copy_object_pos_and_angle(object, gCurrentObject);
copy_object_pos_and_angle(child, gCurrentObject);

gBehCommand += 3;
return BEH_CONTINUE;
}

static s32 beh_cmd_obj_spawn(void) {
static s32 beh_cmd_spawn_obj(void) {
u32 model = (u32) gBehCommand[1];
const BehaviorScript *behavior = (const BehaviorScript *) gBehCommand[2];

@@ -142,16 +142,16 @@ static s32 beh_cmd_obj_spawn(void) {
return BEH_CONTINUE;
}

static s32 beh_cmd_obj_load_chill_param(void) {
static s32 beh_cmd_spawn_child_with_param(void) {
u32 behParam = (s16)(gBehCommand[0] & 0xFFFF);
u32 model = (u32) gBehCommand[1];
const BehaviorScript *behavior = (const BehaviorScript *) gBehCommand[2];

struct Object *object = spawn_object_at_origin(gCurrentObject, 0, model, behavior);
struct Object *child = spawn_object_at_origin(gCurrentObject, 0, model, behavior);

copy_object_pos_and_angle(object, gCurrentObject);
copy_object_pos_and_angle(child, gCurrentObject);

object->oBehParams2ndByte = behParam;
child->oBehParams2ndByte = behParam;

gBehCommand += 3;
return BEH_CONTINUE;
@@ -259,7 +259,7 @@ static s32 beh_cmd_end_repeat(void) {
return BEH_BREAK;
}

static s32 beh_cmd_end_repeat_nobreak(void) {
static s32 beh_cmd_end_repeat_continue(void) {
u32 count = (u32) cur_object_stack_pop();

count--;
@@ -291,7 +291,7 @@ static s32 beh_cmd_end_loop(void) {

typedef void (*BehaviorCallProc)(void);

static s32 beh_cmd_callnative(void) {