Skip to content

Commit

Permalink
refresh 5
Browse files Browse the repository at this point in the history
  • Loading branch information
n64 committed Jan 3, 2020
1 parent 04732af commit 9273f38
Show file tree
Hide file tree
Showing 165 changed files with 12,569 additions and 10,305 deletions.
15 changes: 15 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $@ $<
Expand All @@ -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)
Expand Down
14 changes: 5 additions & 9 deletions assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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]}],
Expand Down Expand Up @@ -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]}],
Expand Down Expand Up @@ -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]}],
Expand Down Expand Up @@ -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]}],
Expand Down
5 changes: 0 additions & 5 deletions bin/cave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 0 additions & 5 deletions bin/inside.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 0 additions & 10 deletions bin/mountain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions bin/segment2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};

Expand Down Expand Up @@ -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"
};

Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
53 changes: 51 additions & 2 deletions charmap.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -114,6 +150,7 @@
'ん' = 0x6D
'。' = 0x6E
',' = 0x6F
'、' = 0x6F
'ア' = 0x70
'イ' = 0x71
'ウ' = 0x72
Expand Down Expand Up @@ -162,7 +199,9 @@
'ヲ' = 0x9C
'ン' = 0x9D
' ' = 0x9E
' ' = 0x9E
'-' = 0x9F
'ー' = 0x9F
'ぇ' = 0xA0
'っ' = 0xA1
'ゃ' = 0xA2
Expand All @@ -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
Expand All @@ -202,7 +251,7 @@
'☆' = 0xFD
'\n' = 0xFE

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

# kana or hira with handakuten
# hiragana or katakana with handakuten
'ぱ' = 0xF1, 0x59
'ぴ' = 0xF1, 0x5A
'ぷ' = 0xF1, 0x5B
Expand Down
2 changes: 1 addition & 1 deletion charmap_menu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'み' = 0x14
'ど' = 0x15
'の' = 0x16
'?' = 0x17
'' = 0x17
'サ' = 0x18
'ウ' = 0x19
'ン' = 0x1A
Expand Down
Loading

0 comments on commit 9273f38

Please sign in to comment.