Browse Source

refresh 4

master
n64 1 year ago
parent
commit
04732af90b
100 changed files with 3449 additions and 5359 deletions
  1. +30
    -0
      CHANGES
  2. +1
    -1
      Doxyfile
  3. +0
    -10
      Jenkinsfile
  4. +75
    -48
      Makefile
  5. +25
    -56
      Makefile.split
  6. +12
    -16
      actors/amp/model.inc.c
  7. +28
    -40
      actors/bird/model.inc.c
  8. +31
    -51
      actors/blargg/model.inc.c
  9. +6
    -10
      actors/blue_coin_switch/model.inc.c
  10. +8
    -12
      actors/blue_fish/model.inc.c
  11. +19
    -31
      actors/bobomb/model.inc.c
  12. +6
    -10
      actors/bomb/model.inc.c
  13. +7
    -11
      actors/boo/model.inc.c
  14. +7
    -11
      actors/boo_castle/model.inc.c
  15. +6
    -10
      actors/book/model.inc.c
  16. +59
    -99
      actors/bookend/model.inc.c
  17. +44
    -56
      actors/bowser/model.inc.c
  18. +7
    -11
      actors/bowser_key/model.inc.c
  19. +6
    -10
      actors/breakable_box/model.inc.c
  20. +20
    -28
      actors/bub/model.inc.c
  21. +44
    -68
      actors/bubba/model.inc.c
  22. +7
    -11
      actors/bullet_bill/model.inc.c
  23. +24
    -40
      actors/bully/model.inc.c
  24. +12
    -20
      actors/cannon_barrel/model.inc.c
  25. +12
    -20
      actors/cannon_base/model.inc.c
  26. +6
    -10
      actors/cannon_lid/model.inc.c
  27. +36
    -60
      actors/capswitch/model.inc.c
  28. +18
    -36
      actors/chain_chomp/model.inc.c
  29. +29
    -49
      actors/chair/model.inc.c
  30. +6
    -10
      actors/checkerboard_platform/model.inc.c
  31. +23
    -39
      actors/chillychief/model.inc.c
  32. +65
    -109
      actors/chuckya/model.inc.c
  33. +23
    -39
      actors/clam_shell/model.inc.c
  34. +18
    -31
      actors/cyan_fish/model.inc.c
  35. +32
    -48
      actors/dirt/model.inc.c
  36. +46
    -54
      actors/door/model.inc.c
  37. +66
    -110
      actors/dorrie/model.inc.c
  38. +8
    -12
      actors/exclamation_box/model.inc.c
  39. +30
    -50
      actors/exclamation_box_outline/model.inc.c
  40. +53
    -89
      actors/eyerok/model.inc.c
  41. +69
    -113
      actors/flyguy/model.inc.c
  42. +42
    -70
      actors/goomba/model.inc.c
  43. +24
    -40
      actors/haunted_cage/model.inc.c
  44. +101
    -165
      actors/heave_ho/model.inc.c
  45. +131
    -211
      actors/hoot/model.inc.c
  46. +1
    -1
      actors/impact_ring/model.inc.c
  47. +59
    -99
      actors/king_bobomb/model.inc.c
  48. +108
    -180
      actors/klepto/model.inc.c
  49. +114
    -178
      actors/koopa/model.inc.c
  50. +24
    -44
      actors/koopa_flag/model.inc.c
  51. +43
    -67
      actors/koopa_shell/model.inc.c
  52. +96
    -160
      actors/lakitu_cameraman/model.inc.c
  53. +53
    -89
      actors/lakitu_enemy/model.inc.c
  54. +55
    -91
      actors/mad_piano/model.inc.c
  55. +25
    -37
      actors/manta/model.inc.c
  56. +219
    -251
      actors/mario/model.inc.c
  57. +22
    -34
      actors/mario_cap/model.inc.c
  58. +6
    -10
      actors/metal_box/model.inc.c
  59. +134
    -222
      actors/mips/model.inc.c
  60. +2
    -2
      actors/mist/model.inc.c
  61. +41
    -69
      actors/moneybag/model.inc.c
  62. +89
    -149
      actors/monty_mole/model.inc.c
  63. +110
    -182
      actors/peach/model.inc.c
  64. +54
    -82
      actors/penguin/model.inc.c
  65. +40
    -53
      actors/piranha_plant/model.inc.c
  66. +6
    -10
      actors/poundable_pole/model.inc.c
  67. +6
    -10
      actors/purple_switch/model.inc.c
  68. +23
    -39
      actors/scuttlebug/model.inc.c
  69. +12
    -16
      actors/seaweed/model.inc.c
  70. +41
    -69
      actors/skeeter/model.inc.c
  71. +20
    -44
      actors/small_key/model.inc.c
  72. +35
    -59
      actors/snowman/model.inc.c
  73. +30
    -50
      actors/snufit/model.inc.c
  74. +18
    -30
      actors/spindrift/anims/anim_050006AC.inc.c
  75. +45
    -77
      actors/spindrift/model.inc.c
  76. +49
    -73
      actors/spiny/model.inc.c
  77. +27
    -35
      actors/spiny_egg/model.inc.c
  78. +10
    -14
      actors/springboard/model.inc.c
  79. +12
    -20
      actors/star/model.inc.c
  80. +23
    -39
      actors/swoop/model.inc.c
  81. +5
    -11
      actors/test_platform/model.inc.c
  82. +6
    -10
      actors/thwomp/model.inc.c
  83. +48
    -80
      actors/toad/model.inc.c
  84. +6
    -10
      actors/tornado/model.inc.c
  85. +6
    -10
      actors/transparent_star/model.inc.c
  86. +8
    -12
      actors/treasure_chest/model.inc.c
  87. +12
    -16
      actors/tree/model.inc.c
  88. +107
    -175
      actors/ukiki/model.inc.c
  89. +47
    -79
      actors/unagi/model.inc.c
  90. +18
    -30
      actors/warp_pipe/model.inc.c
  91. +6
    -10
      actors/water_bubble/model.inc.c
  92. +6
    -10
      actors/water_mine/model.inc.c
  93. +6
    -10
      actors/water_ring/model.inc.c
  94. +30
    -50
      actors/whomp/model.inc.c
  95. +25
    -37
      actors/wiggler_body/model.inc.c
  96. +32
    -48
      actors/wiggler_head/model.inc.c
  97. +12
    -20
      actors/wooden_signpost/model.inc.c
  98. +92
    -128
      actors/yoshi/model.inc.c
  99. +1
    -1
      asm/non_matchings/patch_audio_bank.s
  100. +2
    -2
      asm/non_matchings/process_level_music_dynamics.s

+ 30
- 0
CHANGES View File

@@ -1,3 +1,33 @@
Refresh #4
1.) Label screen_transition.c (#737)
2.) Revamp macros (#738)
3.) Simplify the cake makefile logic (#739)
4.) Move zbuffer to C (#742)
5.) Audio blob endian/64-bit fixes (#740)
6.) Ub fixes (#745)
7.) process_level_music_dynamics: slightly better stack and regalloc (#746)
8.) move level order specific definitions out to levels/level_defines.h (#743)
9.) Renamed some mislabelled sound effects (#748)
10.) Very minor white space fixes in Mario.c (#752)
11.) Renamed GRAVITY to OBJ_PHYSICS (#755)
12.) Use defined macros instead of literal values for interactions in behavior_data.c (#754)
13.) iQue Player console detection + full support (#756)
14.) Fix Goddard Mario head for little endian etc. (#757)
15.) Small bits of audio doc (#749)
16.) Update diff script (#750)
17.) Nicer format for course/dialog text, enum for dialog IDs (#753)
18.) first-diff: store most recent mtime during check (#759)
19.) Use Lights1 struct for light values (#760)
20.) Detect mips64-elf in diff.py (#761)
21.) Name display lists in gd renderer.c (#764)
22.) Document a variety of PU type crashes. (#765)
23.) Label object_behaviors. (#716)
24.) Update swoop.inc.c (#767)
25.) Label tilting_pyramid.inc.c (#768)
26.) Label red_coin.inc.c (#770)
27.) Use more level defines (#758)
28.) Named Mario actions 6, 7, and 8 and noted causes of hands-free holding glitch (#769)

Refresh #3
1.) Small bits of sound sample labelling
2.) Append 'b' to fopen calls in n64graphics to satisfy Windows


+ 1
- 1
Doxyfile View File

@@ -2089,7 +2089,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = NON_MATCHING
PREDEFINED = NON_MATCHING AVOID_UB

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The


+ 0
- 10
Jenkinsfile View File

@@ -27,16 +27,6 @@ pipeline {
sh 'make -j4 VERSION=us'
}
}
stage('Build J Source, NON_MATCHING') {
steps {
sh 'make -j4 VERSION=jp NON_MATCHING=1'
}
}
stage('Build U Source, NON_MATCHING') {
steps {
sh 'make -j4 VERSION=us NON_MATCHING=1'
}
}
}
environment {
QEMU_IRIX = credentials('qemu-irix')


+ 75
- 48
Makefile View File

@@ -6,29 +6,31 @@ default: all

### Build Options ###

# These options can either be changed by modifying the makefile, or
# by building with 'make SETTING=value'. 'make clean' may be required.

# Version of the game to build
VERSION ?= us
# Graphics microcode used
GRUCODE ?= f3d_old
# If COMPARE is 1, check the output sha1sum when building 'all'
COMPARE ?= 1
# If NON_MATCHING is 1, define the NON_MATCHING macro when building
# If NON_MATCHING is 1, define the NON_MATCHING and AVOID_UB macros when building (recommended)
NON_MATCHING ?= 0
# If ENDIAN_IND is 1, enable non-matching code changes that try to ensure
# endianness independence
ENDIAN_IND ?= 0
# Build for the N64 (turn this off for ports)
TARGET_N64 ?= 1

# Release

ifeq ($(VERSION),jp)
VERSION_CFLAGS := -DVERSION_JP=1
VERSION_CFLAGS := -DVERSION_JP
VERSION_ASFLAGS := --defsym VERSION_JP=1
GRUCODE_CFLAGS := -DF3D_OLD
GRUCODE_ASFLAGS := --defsym F3D_OLD=1
TARGET := sm64.jp
else
ifeq ($(VERSION),us)
VERSION_CFLAGS := -DVERSION_US=1
VERSION_CFLAGS := -DVERSION_US
VERSION_ASFLAGS := --defsym VERSION_US=1
GRUCODE_CFLAGS := -DF3D_OLD
GRUCODE_ASFLAGS := --defsym F3D_OLD=1
@@ -36,7 +38,7 @@ ifeq ($(VERSION),us)
else
ifeq ($(VERSION),eu)
$(warning Building EU is experimental and is prone to breaking. Try at your own risk.)
VERSION_CFLAGS := -DVERSION_EU=1
VERSION_CFLAGS := -DVERSION_EU
VERSION_ASFLAGS := --defsym VERSION_EU=1
GRUCODE_CFLAGS := -DF3D_NEW
GRUCODE_ASFLAGS := --defsym F3D_NEW=1
@@ -50,13 +52,13 @@ endif
# Microcode

ifeq ($(GRUCODE),f3dex) # Fast3DEX
GRUCODE_CFLAGS := -DF3DEX_GBI=1
GRUCODE_CFLAGS := -DF3DEX_GBI
GRUCODE_ASFLAGS := --defsym F3DEX_GBI_SHARED=1 --defsym F3DEX_GBI=1
TARGET := $(TARGET).f3dex
COMPARE := 0
else
ifeq ($(GRUCODE), f3dex2) # Fast3DEX2
GRUCODE_CFLAGS := -DF3DEX_GBI_2=1
GRUCODE_CFLAGS := -DF3DEX_GBI_2
GRUCODE_ASFLAGS := --defsym F3DEX_GBI_SHARED=1 --defsym F3DEX_GBI_2=1
TARGET := $(TARGET).f3dex2
COMPARE := 0
@@ -69,7 +71,7 @@ ifeq ($(GRUCODE),f3d_new) # Fast3D 2.0H (Shindou)
else
ifeq ($(GRUCODE),f3dzex) # Fast3DZEX (2.0J / Animal Forest - Dōbutsu no Mori)
$(warning Fast3DZEX is experimental. Try at your own risk.)
GRUCODE_CFLAGS := -DF3DEX_GBI_2=1
GRUCODE_CFLAGS := -DF3DEX_GBI_2
GRUCODE_ASFLAGS := --defsym F3DEX_GBI_SHARED=1 --defsym F3DZEX_GBI=1
TARGET := $(TARGET).f3dzex
COMPARE := 0
@@ -78,13 +80,12 @@ endif
endif
endif

ifeq ($(NON_MATCHING),1)
VERSION_CFLAGS := $(VERSION_CFLAGS) -DNON_MATCHING=1
COMPARE := 0
ifeq ($(TARGET_N64),0)
NON_MATCHING := 1
endif

ifeq ($(ENDIAN_IND),1)
VERSION_CFLAGS := $(VERSION_CFLAGS) -DENDIAN_IND=1
ifeq ($(NON_MATCHING),1)
VERSION_CFLAGS := $(VERSION_CFLAGS) -DNON_MATCHING -DAVOID_UB
COMPARE := 0
endif

@@ -132,8 +133,8 @@ ACTOR_DIR := actors
LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h)))

# Directories containing source files
SRC_DIRS := src src/engine src/game src/audio src/menu src/buffers actors levels text bin data assets
ASM_DIRS := asm lib sound
SRC_DIRS := src src/engine src/game src/audio src/menu src/buffers actors levels bin data assets
ASM_DIRS := asm lib
BIN_DIRS := bin bin/$(VERSION)

ULTRA_SRC_DIRS := lib/src lib/src/math
@@ -191,10 +192,10 @@ GODDARD_O_FILES := $(foreach file,$(GODDARD_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
# Automatic dependency files
DEP_FILES := $(O_FILES:.o=.d) $(ULTRA_O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $(BUILD_DIR)/$(LD_SCRIPT).d

# Files with NON_MATCHING ifdefs
NON_MATCHING_C_FILES != grep -rl NON_MATCHING $(wildcard src/audio/*.c) $(wildcard src/game/*.c)
NON_MATCHING_O_FILES = $(foreach file,$(NON_MATCHING_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
NON_MATCHING_DEP = $(BUILD_DIR)/src/audio/non_matching_dep
# Files with GLOBAL_ASM blocks
GLOBAL_ASM_C_FILES != grep -rl 'GLOBAL_ASM(' $(wildcard src/audio/*.c) $(wildcard src/game/*.c)
GLOBAL_ASM_O_FILES = $(foreach file,$(GLOBAL_ASM_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
GLOBAL_ASM_DEP = $(BUILD_DIR)/src/audio/non_matching_dep

# Segment elf files
SEG_FILES := $(SEGMENT_ELF_FILES) $(ACTOR_ELF_FILES) $(LEVEL_ELF_FILES)
@@ -218,23 +219,29 @@ endif

AS := $(CROSS)as
CC := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc
CPP := cpp -P
CPP := cpp -P -Wno-trigraphs
LD := $(CROSS)ld
AR := $(CROSS)ar
OBJDUMP := $(CROSS)objdump
OBJCOPY := $(CROSS)objcopy
PYTHON := python3

INCLUDE_CFLAGS := -I include -I include/libc -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I .
ifeq ($(TARGET_N64),1)
TARGET_CFLAGS := -nostdinc -I include/libc -DTARGET_N64
CC_CFLAGS := -fno-builtin
endif

INCLUDE_CFLAGS := -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I .

# Check code syntax with host compiler
CC_CHECK := gcc -fsyntax-only -fsigned-char -nostdinc -fno-builtin $(INCLUDE_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -DNON_MATCHING $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) -DTARGET_N64
CC_CHECK := gcc -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -DNON_MATCHING -DAVOID_UB $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)

ASFLAGS := -march=vr4300 -mabi=32 -I include -I $(BUILD_DIR) $(VERSION_ASFLAGS) $(GRUCODE_ASFLAGS)
CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn $(OPT_FLAGS) -signed $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS) -DTARGET_N64
CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -signed $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS)
OBJCOPYFLAGS := --pad-to=0x800000 --gap-fill=0xFF
SYMBOL_LINKING_FLAGS := $(addprefix -R ,$(SEG_FILES))
LDFLAGS := -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(SYMBOL_LINKING_FLAGS)
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth

ifeq ($(shell getconf LONG_BIT), 32)
# Work around memory allocation bug in QEMU
@@ -306,21 +313,26 @@ $(BUILD_DIR)/include/text_strings.h: include/text_strings.h.in
$(BUILD_DIR)/include/text_menu_strings.h: include/text_menu_strings.h.in
$(TEXTCONV) charmap_menu.txt $< $@

$(BUILD_DIR)/text/%.inc.c: text/$(VERSION)/%.c.in
$(TEXTCONV) charmap.txt $< $@

ifeq ($(VERSION),eu)
SRC_DIRS += text/de text/en text/fr
TEXT_DIRS := text/de text/us text/fr

# EU encoded text inserted into individual segment 0x19 files
$(BUILD_DIR)/bin/$(VERSION)/translation_de.o: $(BUILD_DIR)/text/de/dialog.inc.c $(BUILD_DIR)/text/de/level.inc.c $(BUILD_DIR)/text/de/star.inc.c
$(BUILD_DIR)/bin/$(VERSION)/translation_en.o: $(BUILD_DIR)/text/en/dialog.inc.c $(BUILD_DIR)/text/en/level.inc.c $(BUILD_DIR)/text/en/star.inc.c
$(BUILD_DIR)/bin/$(VERSION)/translation_fr.o: $(BUILD_DIR)/text/fr/dialog.inc.c $(BUILD_DIR)/text/fr/level.inc.c $(BUILD_DIR)/text/fr/star.inc.c
$(BUILD_DIR)/bin/eu/translation_en.o: $(BUILD_DIR)/text/us/define_text.inc.c
$(BUILD_DIR)/bin/eu/translation_de.o: $(BUILD_DIR)/text/de/define_text.inc.c
$(BUILD_DIR)/bin/eu/translation_fr.o: $(BUILD_DIR)/text/fr/define_text.inc.c

else
TEXT_DIRS := text/$(VERSION)

# non-EU encoded text inserted into segment 0x02
$(BUILD_DIR)/bin/segment2.o: $(BUILD_DIR)/text/debug.inc.c $(BUILD_DIR)/text/dialog.inc.c $(BUILD_DIR)/text/level.inc.c $(BUILD_DIR)/text/star.inc.c
$(BUILD_DIR)/bin/segment2.o: $(BUILD_DIR)/text/$(VERSION)/define_text.inc.c
endif

ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS) $(GODDARD_SRC_DIRS) $(ULTRA_SRC_DIRS) $(ULTRA_ASM_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) include) $(MIO0_DIR) $(addprefix $(MIO0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)
$(BUILD_DIR)/text/%/define_text.inc.c: text/define_text.inc.c text/%/courses.h text/%/dialogs.h
$(CPP) $(VERSION_CFLAGS) $< -o $@ -I text/$*/
$(TEXTCONV) charmap.txt $@ $@

ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS) $(GODDARD_SRC_DIRS) $(ULTRA_SRC_DIRS) $(ULTRA_ASM_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) include) $(MIO0_DIR) $(addprefix $(MIO0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)

# Make sure build directory exists before compiling anything
DUMMY != mkdir -p $(ALL_DIRS)
@@ -390,17 +402,24 @@ $(BUILD_DIR)/%.table: %.aiff
$(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
$(VADPCM_ENC) -c $^ $@

$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS)
$(PYTHON) tools/assemble_sound.py $(BUILD_DIR)/sound/samples/ sound/sound_banks/ $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(VERSION_CFLAGS)
$(ENDIAN_BITWIDTH): tools/determine-endian-bitwidth.c
$(CC) -c $(CFLAGS) -o $@.dummy2 $< 2>$@.dummy1; true
grep -o 'msgbegin --endian .* --bitwidth .* msgend' $@.dummy1 > $@.dummy2
head -n1 <$@.dummy2 | cut -d' ' -f2-5 > $@
@rm $@.dummy1
@rm $@.dummy2

$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS) $(ENDIAN_BITWIDTH)
$(PYTHON) tools/assemble_sound.py $(BUILD_DIR)/sound/samples/ sound/sound_banks/ $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(VERSION_CFLAGS) $$(cat $(ENDIAN_BITWIDTH))

$(SOUND_BIN_DIR)/sound_data.tbl: $(SOUND_BIN_DIR)/sound_data.ctl
touch $@
@true

$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json sound/sequences/ sound/sequences/$(VERSION)/ $(SOUND_SEQUENCE_FILES)
$(PYTHON) tools/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/bank_sets sound/sound_banks/ sound/sequences.json $(SOUND_SEQUENCE_FILES) $(VERSION_CFLAGS)
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json sound/sequences/ sound/sequences/$(VERSION)/ $(SOUND_SEQUENCE_FILES) $(ENDIAN_BITWIDTH)
$(PYTHON) tools/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/bank_sets sound/sound_banks/ sound/sequences.json $(SOUND_SEQUENCE_FILES) $(VERSION_CFLAGS) $$(cat $(ENDIAN_BITWIDTH))

$(SOUND_BIN_DIR)/bank_sets: $(SOUND_BIN_DIR)/sequences.bin
touch $@
@true

$(SOUND_BIN_DIR)/%.m64: $(SOUND_BIN_DIR)/%.o
$(OBJCOPY) -j .rodata $< -O binary $@
@@ -411,6 +430,11 @@ $(SOUND_BIN_DIR)/%.o: $(SOUND_BIN_DIR)/%.s
$(SOUND_BIN_DIR)/%.s: $(SOUND_BIN_DIR)/%
printf ".section .data\n\n.incbin \"$<\"\n" > $@

$(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h

$(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
$(CPP) -I . levels/level_headers.h.in | $(PYTHON) tools/output_level_headers.py > $(BUILD_DIR)/include/level_headers.h

$(BUILD_DIR)/assets/mario_anim_data.c: $(wildcard assets/anims/*.inc.c)
$(PYTHON) tools/mario_anims_converter.py > $@

@@ -420,7 +444,6 @@ $(BUILD_DIR)/assets/demo_data.c: assets/demo_data.json $(wildcard assets/demos/*
# Source code
$(BUILD_DIR)/src/goddard/%.o: OPT_FLAGS := -g
$(BUILD_DIR)/src/goddard/%.o: MIPSISET := -mips1
$(NON_MATCHING_O_FILES): CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
$(BUILD_DIR)/src/audio/%.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
$(BUILD_DIR)/src/audio/load.o: OPT_FLAGS := -O2 -framepointer -Wo,-loopunroll,0
$(BUILD_DIR)/lib/src/%.o: OPT_FLAGS :=
@@ -438,16 +461,20 @@ $(BUILD_DIR)/lib/src/_Ldtob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Printf.o: OPT_FLAGS := -O3
endif

# Rebuild files with '#ifdef NON_MATCHING' when that macro changes.
$(NON_MATCHING_O_FILES): $(NON_MATCHING_DEP).$(NON_MATCHING)
$(NON_MATCHING_DEP).$(NON_MATCHING):
@rm -f $(NON_MATCHING_DEP).*
ifeq ($(NON_MATCHING),0)
$(GLOBAL_ASM_O_FILES): CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
endif

# Rebuild files with 'GLOBAL_ASM' if the NON_MATCHING flag changes.
$(GLOBAL_ASM_O_FILES): $(GLOBAL_ASM_DEP).$(NON_MATCHING)
$(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 $@ || rm $@
tools/patch_libultra_math $@

$(BUILD_DIR)/%.o: %.c
@$(CC_CHECK) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
@@ -462,7 +489,7 @@ $(BUILD_DIR)/%.o: %.s
$(AS) $(ASFLAGS) -MD $(BUILD_DIR)/$*.d -o $@ $<

$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
$(CPP) $(VERSION_CFLAGS) -MMD -MP -MT $@ -MF $@.d -I include/ -DBUILD_DIR=$(BUILD_DIR) -o $@ $<
$(CPP) $(VERSION_CFLAGS) -MMD -MP -MT $@ -MF $@.d -I include/ -I . -DBUILD_DIR=$(BUILD_DIR) -o $@ $<

$(BUILD_DIR)/libultra.a: $(ULTRA_O_FILES)
$(AR) rcs -o $@ $(ULTRA_O_FILES)
@@ -483,7 +510,7 @@ $(BUILD_DIR)/$(TARGET).objdump: $(ELF)


.PHONY: all clean distclean default diff test load libultra
.PRECIOUS: $(BUILD_DIR)/bin/%.elf $(SOUND_BIN_DIR)/%.ctl $(SOUND_BIN_DIR)/%.tbl $(SOUND_SAMPLE_TABLES) $(SOUND_BIN_DIR)/%.s $(BUILD_DIR)/%
.PRECIOUS: $(BUILD_DIR)/bin/%.elf $(SOUND_BIN_DIR)/%.ctl $(SOUND_BIN_DIR)/%.tbl $(SOUND_SAMPLE_TABLES) $(SOUND_BIN_DIR)/%.s $(BUILD_DIR)/%
.DELETE_ON_ERROR:

# Remove built-in rules, to improve performance


+ 25
- 56
Makefile.split View File

@@ -135,70 +135,39 @@ $(BUILD_DIR)/actors/common1.elf: SEGMENT_ADDRESS := 0x03000000
# Level Rules
# --------------------------------------

# Using these rules:
# When defining a level, define the 3 variables needed and copy the rules
# as-is.
$(BUILD_DIR)/levels/%/leveldata.elf: SEGMENT_ADDRESS := 0x07000000

# TODO: Generate these rules from the level configs?

define level_rules =
$(1)_SEG7_FILES := $$(patsubst %.png,%.inc.c,$$(notdir $$(wildcard levels/$(1)/*.png)))
$$(BUILD_DIR)/levels/$(1)/leveldata.o: $$(addprefix $$(BUILD_DIR)/levels/$(1)/,$$($(1)_SEG7_FILES))
$$(BUILD_DIR)/levels/$(1)/leveldata.elf: SEGMENT_ADDRESS := $(2)
$$(BUILD_DIR)/levels/$(1)/leveldata.elf: TEXTURE_BIN := $(3)
$(1)_SEG7_FILES := $$(patsubst %.png,%.inc.c,$$(wildcard levels/$(1)/*.png))
$$(BUILD_DIR)/levels/$(1)/leveldata.o: $$(addprefix $$(BUILD_DIR)/,$$($(1)_SEG7_FILES))
$$(BUILD_DIR)/levels/$(1)/leveldata.elf: TEXTURE_BIN := $(2)
endef

$(eval $(call level_rules,bbh,0x07000000,spooky)) # BBH (Big Boo's Haunt)
$(eval $(call level_rules,ccm,0x07000000,snow)) # CCM (Cool Cool Mountain)
$(eval $(call level_rules,castle_inside,0x07000000,inside)) # Castle Inside (Inside Princess Peach's Castle)
$(eval $(call level_rules,hmc,0x07000000,cave))# HMC (Hazy Maze Cave)
$(eval $(call level_rules,ssl,0x07000000,generic)) # SSL (Shifting Sand Land)
$(eval $(call level_rules,bob,0x07000000,generic)) # BOB (Bob-Omb Battlefield)
$(eval $(call level_rules,sl,0x07000000,snow)) # SL (Snowman's Land)
$(eval $(call level_rules,wdw,0x07000000,grass)) # WDW (Wet Dry World)
$(eval $(call level_rules,jrb,0x07000000,water)) # JRB (Jolly Roger Bay)
$(eval $(call level_rules,thi,0x07000000,grass)) # THI (Tiny Huge Island)
$(eval $(call level_rules,ttc,0x07000000,machine)) # TTC (Tick Tock Clock)
$(eval $(call level_rules,rr,0x07000000,sky)) # RR (Rainbow Ride)
$(eval $(call level_rules,castle_grounds,0x07000000,outside)) # Castle Grounds (Outside Princess Peach's Castle)
$(eval $(call level_rules,bitdw,0x07000000,sky)) # BitDW (Bowser in the Dark World)
$(eval $(call level_rules,vcutm,0x07000000,outside)) # VCUTM (Vanish Cap under the Moat)
$(eval $(call level_rules,bitfs,0x07000000,sky)) # BITFS (Bowser in the Fire Sea)
$(eval $(call level_rules,sa,0x07000000,inside)) # SA (The Secret Aquarium)
$(eval $(call level_rules,bits,0x07000000,sky)) # BITS (Bowser in the Sky)
$(eval $(call level_rules,lll,0x07000000,fire)) # LLL (Lethal Lava Land)
$(eval $(call level_rules,ddd,0x07000000,water)) # DDD (Dire Dire Docks)
$(eval $(call level_rules,wf,0x07000000,grass)) # WF (Whomp's Fortress)
$(eval $(call level_rules,castle_courtyard,0x07000000,outside)) # Castle Courtyard (The Courtyard of Princess Peach's Castle)
$(eval $(call level_rules,pss,0x07000000,mountain)) # PSS (The Princess's Secret Slide)
$(eval $(call level_rules,cotmc,0x07000000,cave)) # COTMC (Cavern of the Metal Cap)
$(eval $(call level_rules,totwc,0x07000000,sky)) # TOTWC (Tower of the Wing Cap)
$(eval $(call level_rules,bowser_1,0x07000000,generic)) # BOWSER_1 (Bowser in the Dark World [Boss Area])
$(eval $(call level_rules,wmotr,0x07000000,generic)) # WMOTR (Wing Mario over the Rainbow)
$(eval $(call level_rules,bowser_2,0x07000000,fire)) # BOWSER_2 (Bowser in the Fire Sea [Boss Area])
$(eval $(call level_rules,bowser_3,0x07000000,generic)) # BOWSER_3 (Bowser in the Sky [Boss Area])
$(eval $(call level_rules,totwc,0x07000000,sky)) # TOTWC (Tower of the Wing Cap)
$(eval $(call level_rules,ttm,0x07000000,mountain)) # TTM (Tall Tall Mountain)
$(eval $(call level_rules,intro,0x07000000,generic)) # Intro (Super Mario 64 Logo)
$(eval $(call level_rules,menu,0x07000000,generic)) # Menu (File Select)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
$(BUILD_DIR)/level_rules.mk: levels/level_rules.mk levels/level_defines.h
$(CPP) $(VERSION_CFLAGS) -I . -o $@ $<
include $(BUILD_DIR)/level_rules.mk
endif
endif

# --------------------------------------
# Extra Level Rules
# --------------------------------------
$(eval $(call level_rules,intro,generic)) # Intro (Super Mario 64 Logo)
$(eval $(call level_rules,menu,generic)) # Menu (File Select)

# Ending cake texture override
ifeq ($(VERSION),eu)
ending_SEG7_FILES := $(patsubst %.png,%.inc.c,$(notdir $(wildcard levels/ending/eu*.png levels/ending/*eu.png)))
$(BUILD_DIR)/levels/ending/leveldata.o: $(addprefix $(BUILD_DIR)/levels/ending/,$(ending_SEG7_FILES))
$(BUILD_DIR)/levels/ending/leveldata.elf: SEGMENT_ADDRESS := 0x07000000
$(BUILD_DIR)/levels/ending/leveldata.elf: TEXTURE_BIN := generic
# --------------------------------------
# Cake Texture Rules
# --------------------------------------

# Ending cake textures are generated in a special way
$(BUILD_DIR)/levels/ending/cake_eu.inc.c: levels/ending/cake_eu.png
$(SKYCONV) --type cake-eu --split $^ $(BUILD_DIR)/levels/ending
else
ending_SEG7_FILES := cake.inc.c
$(BUILD_DIR)/levels/ending/leveldata.o: $(BUILD_DIR)/levels/ending/cake.inc.c
$(BUILD_DIR)/levels/ending/leveldata.elf: SEGMENT_ADDRESS := 0x07000000
$(BUILD_DIR)/levels/ending/leveldata.elf: TEXTURE_BIN := generic

$(BUILD_DIR)/levels/ending/cake.inc.c: levels/ending/cake.png
$(SKYCONV) --type cake --split $^ $(BUILD_DIR)/levels/ending
endif

# --------------------------------------
# Texture Bin Rules
@@ -257,9 +226,9 @@ $(BUILD_DIR)/bin/mountain.elf: SEGMENT_ADDRESS := 0x09000000
$(BUILD_DIR)/bin/grass.elf: SEGMENT_ADDRESS := 0x09000000

# EU segment 19 translations
$(BUILD_DIR)/bin/$(VERSION)/translation_de.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/$(VERSION)/translation_en.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/$(VERSION)/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/eu/translation_de.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/eu/translation_en.elf: SEGMENT_ADDRESS := 0x19000000
$(BUILD_DIR)/bin/eu/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000

# --------------------------------------
# Skybox Rules


+ 12
- 16
actors/amp/model.inc.c View File

@@ -166,14 +166,10 @@ const Gfx amp_seg8_dl_08002E58[] = {
};

// 0x08002EC8
static const Ambient amp_seg8_light_08002EC8 = {
{{0x33, 0x3f, 0x00}, 0, {0x33, 0x3f, 0x00}, 0}
};

// 0x08002ED0
static const Light amp_seg8_light_08002ED0 = {
{{0xcf, 0xff, 0x00}, 0, {0xcf, 0xff, 0x00}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 amp_seg8_lights_08002EC8 = gdSPDefLights1(
0x33, 0x3f, 0x00,
0xcf, 0xff, 0x00, 0x28, 0x28, 0x28
);

// //! Another malformed entry: Vertex interpreted as light
// 0x08002EE0
@@ -401,8 +397,8 @@ static const Vtx amp_seg8_vertex_080038D0[] = {

// 0x08003910 - 0x08003940
const Gfx amp_seg8_dl_08003910[] = {
gsSPLight(&amp_seg8_light_08002ED0, 1),
gsSPLight(&amp_seg8_light_08002EC8, 2),
gsSPLight(&amp_seg8_lights_08002EC8.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2),
gsSPVertex(amp_seg8_vertex_08002EE0, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(),
@@ -410,8 +406,8 @@ const Gfx amp_seg8_dl_08003910[] = {

// 0x08003940 - 0x08003970
const Gfx amp_seg8_dl_08003940[] = {
gsSPLight(&amp_seg8_light_08002ED0, 1),
gsSPLight(&amp_seg8_light_08002EC8, 2),
gsSPLight(&amp_seg8_lights_08002EC8.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2),
gsSPVertex(amp_seg8_vertex_08002F40, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(),
@@ -419,8 +415,8 @@ const Gfx amp_seg8_dl_08003940[] = {

// 0x08003970 - 0x080039A0
const Gfx amp_seg8_dl_08003970[] = {
gsSPLight(&amp_seg8_light_08002ED0, 1),
gsSPLight(&amp_seg8_light_08002EC8, 2),
gsSPLight(&amp_seg8_lights_08002EC8.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2),
gsSPVertex(amp_seg8_vertex_08002FA0, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(),
@@ -428,8 +424,8 @@ const Gfx amp_seg8_dl_08003970[] = {

// 0x080039A0 - 0x080039D0
const Gfx amp_seg8_dl_080039A0[] = {
gsSPLight(&amp_seg8_light_08002ED0, 1),
gsSPLight(&amp_seg8_light_08002EC8, 2),
gsSPLight(&amp_seg8_lights_08002EC8.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2),
gsSPVertex(amp_seg8_vertex_08003000, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(),


+ 28
- 40
actors/bird/model.inc.c View File

@@ -1,34 +1,22 @@
// Birds

// 0x05000000
static const Ambient birds_seg5_light_05000000 = {
{{0x07, 0x24, 0x2c}, 0, {0x07, 0x24, 0x2c}, 0}
};

// 0x05000008
static const Light birds_seg5_light_05000008 = {
{{0x1d, 0x91, 0xb0}, 0, {0x1d, 0x91, 0xb0}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 birds_seg5_lights_05000000 = gdSPDefLights1(
0x07, 0x24, 0x2c,
0x1d, 0x91, 0xb0, 0x28, 0x28, 0x28
);

// 0x05000018
static const Ambient birds_seg5_light_05000018 = {
{{0x33, 0x27, 0x0d}, 0, {0x33, 0x27, 0x0d}, 0}
};

// 0x05000020
static const Light birds_seg5_light_05000020 = {
{{0xce, 0x9d, 0x34}, 0, {0xce, 0x9d, 0x34}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 birds_seg5_lights_05000018 = gdSPDefLights1(
0x33, 0x27, 0x0d,
0xce, 0x9d, 0x34, 0x28, 0x28, 0x28
);

// 0x05000030
static const Ambient birds_seg5_light_05000030 = {
{{0x3f, 0x3f, 0x3f}, 0, {0x3f, 0x3f, 0x3f}, 0}
};

// 0x05000038
static const Light birds_seg5_light_05000038 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 birds_seg5_lights_05000030 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05000048
static const Vtx birds_seg5_vertex_05000048[] = {
@@ -150,8 +138,8 @@ static const Vtx birds_seg5_vertex_050004C8[] = {

// 0x05000528 - 0x05000598
const Gfx birds_seg5_dl_05000528[] = {
gsSPLight(&birds_seg5_light_05000008, 1),
gsSPLight(&birds_seg5_light_05000000, 2),
gsSPLight(&birds_seg5_lights_05000000.l, 1),
gsSPLight(&birds_seg5_lights_05000000.a, 2),
gsSPVertex(birds_seg5_vertex_05000048, 9, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 3, 0, 0x0),
gsSP2Triangles( 4, 3, 2, 0x0, 5, 3, 6, 0x0),
@@ -163,16 +151,16 @@ const Gfx birds_seg5_dl_05000528[] = {

// 0x05000598 - 0x05000600
const Gfx birds_seg5_dl_05000598[] = {
gsSPLight(&birds_seg5_light_05000008, 1),
gsSPLight(&birds_seg5_light_05000000, 2),
gsSPLight(&birds_seg5_lights_05000000.l, 1),
gsSPLight(&birds_seg5_lights_05000000.a, 2),
gsSPVertex(birds_seg5_vertex_050000D8, 3, 0),
gsSP1Triangle( 0, 1, 2, 0x0),
gsSPLight(&birds_seg5_light_05000008, 1),
gsSPLight(&birds_seg5_light_05000000, 2),
gsSPLight(&birds_seg5_lights_05000000.l, 1),
gsSPLight(&birds_seg5_lights_05000000.a, 2),
gsSPVertex(birds_seg5_vertex_05000108, 3, 0),
gsSP1Triangle( 0, 1, 2, 0x0),
gsSPLight(&birds_seg5_light_05000008, 1),
gsSPLight(&birds_seg5_light_05000000, 2),
gsSPLight(&birds_seg5_lights_05000000.l, 1),
gsSPLight(&birds_seg5_lights_05000000.a, 2),
gsSPVertex(birds_seg5_vertex_05000138, 3, 0),
gsSP1Triangle( 0, 1, 2, 0x0),
gsSPEndDisplayList(),
@@ -180,8 +168,8 @@ const Gfx birds_seg5_dl_05000598[] = {

// 0x05000600 - 0x05000670
const Gfx birds_seg5_dl_05000600[] = {
gsSPLight(&birds_seg5_light_05000008, 1),
gsSPLight(&birds_seg5_light_05000000, 2),
gsSPLight(&birds_seg5_lights_05000000.l, 1),
gsSPLight(&birds_seg5_lights_05000000.a, 2),
gsSPVertex(birds_seg5_vertex_05000168, 9, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 3, 0, 0x0),
gsSP2Triangles( 0, 3, 4, 0x0, 5, 3, 6, 0x0),
@@ -193,8 +181,8 @@ const Gfx birds_seg5_dl_05000600[] = {

// 0x05000670 - 0x050007E0
const Gfx birds_seg5_dl_05000670[] = {
gsSPLight(&birds_seg5_light_05000008, 1),
gsSPLight(&birds_seg5_light_05000000, 2),
gsSPLight(&birds_seg5_lights_05000000.l, 1),
gsSPLight(&birds_seg5_lights_05000000.a, 2),
gsSPVertex(birds_seg5_vertex_050001F8, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 1, 9, 10, 0x0),
@@ -210,16 +198,16 @@ const Gfx birds_seg5_dl_05000670[] = {
gsSP1Triangle( 7, 6, 15, 0x0),
gsSPVertex(birds_seg5_vertex_050003F8, 3, 0),
gsSP1Triangle( 0, 1, 2, 0x0),
gsSPLight(&birds_seg5_light_05000038, 1),
gsSPLight(&birds_seg5_light_05000030, 2),
gsSPLight(&birds_seg5_lights_05000030.l, 1),
gsSPLight(&birds_seg5_lights_05000030.a, 2),
gsSPVertex(birds_seg5_vertex_05000428, 10, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 0, 7, 0x0, 7, 8, 6, 0x0),
gsSP2Triangles( 9, 7, 2, 0x0, 2, 7, 0, 0x0),
gsSP2Triangles( 2, 3, 9, 0x0, 7, 9, 8, 0x0),
gsSP1Triangle( 5, 4, 1, 0x0),
gsSPLight(&birds_seg5_light_05000020, 1),
gsSPLight(&birds_seg5_light_05000018, 2),
gsSPLight(&birds_seg5_lights_05000018.l, 1),
gsSPLight(&birds_seg5_lights_05000018.a, 2),
gsSPVertex(birds_seg5_vertex_050004C8, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 0, 4, 0x0),
gsSP1Triangle( 1, 3, 5, 0x0),


+ 31
- 51
actors/blargg/model.inc.c View File

@@ -1,54 +1,34 @@
// Blargg (Unused)

// Unreferenced light
UNUSED static const Ambient blargg_light_1 = {
{{0x3f, 0x3f, 0x3f}, 0, {0x3f, 0x3f, 0x3f}, 0}
};

// Unreferenced light
UNUSED static const Light blargg_light_2 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
// Unreferenced light group
UNUSED static const Lights1 blargg_lights_unused = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05004740
static const Ambient blargg_seg5_light_05004740 = {
{{0x3f, 0x0d, 0x05}, 0, {0x3f, 0x0d, 0x05}, 0}
};

// 0x05004748
static const Light blargg_seg5_light_05004748 = {
{{0xff, 0x36, 0x16}, 0, {0xff, 0x36, 0x16}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 blargg_seg5_lights_05004740 = gdSPDefLights1(
0x3f, 0x0d, 0x05,
0xff, 0x36, 0x16, 0x28, 0x28, 0x28
);

// 0x05004758
static const Ambient blargg_seg5_light_05004758 = {
{{0x2c, 0x2c, 0x2c}, 0, {0x2c, 0x2c, 0x2c}, 0}
};

// 0x05004760
static const Light blargg_seg5_light_05004760 = {
{{0xb2, 0xb2, 0xb2}, 0, {0xb2, 0xb2, 0xb2}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 blargg_seg5_lights_05004758 = gdSPDefLights1(
0x2c, 0x2c, 0x2c,
0xb2, 0xb2, 0xb2, 0x28, 0x28, 0x28
);

// 0x05004770
static const Ambient blargg_seg5_light_05004770 = {
{{0x3f, 0x0a, 0x06}, 0, {0x3f, 0x0a, 0x06}, 0}
};

// 0x05004778
static const Light blargg_seg5_light_05004778 = {
{{0xff, 0x2a, 0x1a}, 0, {0xff, 0x2a, 0x1a}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 blargg_seg5_lights_05004770 = gdSPDefLights1(
0x3f, 0x0a, 0x06,
0xff, 0x2a, 0x1a, 0x28, 0x28, 0x28
);

// 0x05004788
static const Ambient blargg_seg5_light_05004788 = {
{{0x3f, 0x0b, 0x07}, 0, {0x3f, 0x0b, 0x07}, 0}
};

// 0x05004790
static const Light blargg_seg5_light_05004790 = {
{{0xff, 0x2e, 0x1f}, 0, {0xff, 0x2e, 0x1f}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 blargg_seg5_lights_05004788 = gdSPDefLights1(
0x3f, 0x0b, 0x07,
0xff, 0x2e, 0x1f, 0x28, 0x28, 0x28
);

// 0x050047A0
static const Vtx blargg_seg5_vertex_050047A0[] = {
@@ -403,8 +383,8 @@ static const Vtx blargg_seg5_vertex_050057E0[] = {

// 0x050058D0 - 0x05005A60
const Gfx blargg_seg5_dl_050058D0[] = {
gsSPLight(&blargg_seg5_light_05004760, 1),
gsSPLight(&blargg_seg5_light_05004758, 2),
gsSPLight(&blargg_seg5_lights_05004758.l, 1),
gsSPLight(&blargg_seg5_lights_05004758.a, 2),
gsSPVertex(blargg_seg5_vertex_050047A0, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
@@ -418,8 +398,8 @@ const Gfx blargg_seg5_dl_050058D0[] = {
gsSPVertex(blargg_seg5_vertex_050049A0, 8, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
gsSPLight(&blargg_seg5_light_05004748, 1),
gsSPLight(&blargg_seg5_light_05004740, 2),
gsSPLight(&blargg_seg5_lights_05004740.l, 1),
gsSPLight(&blargg_seg5_lights_05004740.a, 2),
gsSPVertex(blargg_seg5_vertex_05004A20, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
@@ -438,8 +418,8 @@ const Gfx blargg_seg5_dl_050058D0[] = {

// 0x05005A60 - 0x05005D00
const Gfx blargg_seg5_dl_05005A60[] = {
gsSPLight(&blargg_seg5_light_05004760, 1),
gsSPLight(&blargg_seg5_light_05004758, 2),
gsSPLight(&blargg_seg5_lights_05004758.l, 1),
gsSPLight(&blargg_seg5_lights_05004758.a, 2),
gsSPVertex(blargg_seg5_vertex_05004BE0, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
@@ -453,8 +433,8 @@ const Gfx blargg_seg5_dl_05005A60[] = {
gsSPVertex(blargg_seg5_vertex_05004DE0, 8, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
gsSPLight(&blargg_seg5_light_05004778, 1),
gsSPLight(&blargg_seg5_light_05004770, 2),
gsSPLight(&blargg_seg5_lights_05004770.l, 1),
gsSPLight(&blargg_seg5_lights_05004770.a, 2),
gsSPVertex(blargg_seg5_vertex_05004E60, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 2, 6, 7, 0x0, 2, 7, 8, 0x0),
@@ -492,8 +472,8 @@ const Gfx blargg_seg5_dl_05005A60[] = {

// 0x05005D00 - 0x05005EB8
const Gfx blargg_seg5_dl_05005D00[] = {
gsSPLight(&blargg_seg5_light_05004790, 1),
gsSPLight(&blargg_seg5_light_05004788, 2),
gsSPLight(&blargg_seg5_lights_05004788.l, 1),
gsSPLight(&blargg_seg5_lights_05004788.a, 2),
gsSPVertex(blargg_seg5_vertex_050053E0, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),


+ 6
- 10
actors/blue_coin_switch/model.inc.c View File

@@ -1,14 +1,10 @@
// Blue Coin Switch

// 0x08000000
static const Ambient blue_coin_switch_seg8_light_08000000 = {
{{0x7f, 0x7f, 0x7f}, 0, {0x7f, 0x7f, 0x7f}, 0}
};

// 0x08000008
static const Light blue_coin_switch_seg8_light_08000008 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 blue_coin_switch_seg8_lights_08000000 = gdSPDefLights1(
0x7f, 0x7f, 0x7f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x08000018
ALIGNED8 static const u8 blue_coin_switch_seg8_texture_08000018[] = {
@@ -53,8 +49,8 @@ const Gfx blue_coin_switch_seg8_dl_08000D58[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, blue_coin_switch_seg8_texture_08000018),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&blue_coin_switch_seg8_light_08000008, 1),
gsSPLight(&blue_coin_switch_seg8_light_08000000, 2),
gsSPLight(&blue_coin_switch_seg8_lights_08000000.l, 1),
gsSPLight(&blue_coin_switch_seg8_lights_08000000.a, 2),
gsSPVertex(blue_coin_switch_seg8_vertex_08000C18, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 7, 5, 0x0),


+ 8
- 12
actors/blue_fish/model.inc.c View File

@@ -1,14 +1,10 @@
// Blue Fish

// 0x0301B5C8
static const Ambient blue_fish_seg3_light_0301B5C8 = {
{{0x3f, 0x3f, 0x3f}, 0, {0x3f, 0x3f, 0x3f}, 0}
};

// 0x0301B5D0
static const Light blue_fish_seg3_light_0301B5D0 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 blue_fish_seg3_lights_0301B5C8 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x0301B5E0
ALIGNED8 static const u8 blue_fish_seg3_texture_0301B5E0[] = {
@@ -38,8 +34,8 @@ const Gfx blue_fish_seg3_dl_0301BEC0[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, blue_fish_seg3_texture_0301B5E0),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&blue_fish_seg3_light_0301B5D0, 1),
gsSPLight(&blue_fish_seg3_light_0301B5C8, 2),
gsSPLight(&blue_fish_seg3_lights_0301B5C8.l, 1),
gsSPLight(&blue_fish_seg3_lights_0301B5C8.a, 2),
gsSPVertex(blue_fish_seg3_vertex_0301BDE0, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 0, 4, 0x0),
gsSP2Triangles( 5, 0, 3, 0x0, 2, 6, 0, 0x0),
@@ -90,8 +86,8 @@ const Gfx blue_fish_seg3_dl_0301C0A8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, blue_fish_seg3_texture_0301B5E0),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&blue_fish_seg3_light_0301B5D0, 1),
gsSPLight(&blue_fish_seg3_light_0301B5C8, 2),
gsSPLight(&blue_fish_seg3_lights_0301B5C8.l, 1),
gsSPLight(&blue_fish_seg3_lights_0301B5C8.a, 2),
gsSPVertex(blue_fish_seg3_vertex_0301C018, 9, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 3, 4, 0x0),
gsSP2Triangles( 4, 5, 2, 0x0, 2, 5, 6, 0x0),


+ 19
- 31
actors/bobomb/model.inc.c View File

@@ -168,34 +168,22 @@ const Gfx bobomb_seg8_dl_08022D78[] = {
};

// 0x08022DE8
static const Ambient bobomb_seg8_light_08022DE8 = {
{{0x3f, 0x26, 0x04}, 0, {0x3f, 0x26, 0x04}, 0}
};

// 0x08022DF0
static const Light bobomb_seg8_light_08022DF0 = {
{{0xff, 0x99, 0x12}, 0, {0xff, 0x99, 0x12}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bobomb_seg8_lights_08022DE8 = gdSPDefLights1(
0x3f, 0x26, 0x04,
0xff, 0x99, 0x12, 0x28, 0x28, 0x28
);

// 0x08022E00
static const Ambient bobomb_seg8_light_08022E00 = {
{{0x2c, 0x2c, 0x2c}, 0, {0x2c, 0x2c, 0x2c}, 0}
};
static const Lights1 bobomb_seg8_lights_08022E00 = gdSPDefLights1(
0x2c, 0x2c, 0x2c,
0xb2, 0xb2, 0xb2, 0x28, 0x28, 0x28
);

// 0x08022E08
static const Light bobomb_seg8_light_08022E08 = {
{{0xb2, 0xb2, 0xb2}, 0, {0xb2, 0xb2, 0xb2}, 0, {0x28, 0x28, 0x28}, 0}
};

// Unreferenced light
UNUSED static const Ambient bobomb_light_1 = {
{{0x00, 0x00, 0x00}, 0, {0x00, 0x00, 0x00}, 0}
};

// Unreferenced light
UNUSED static const Light bobomb_light_2 = {
{{0x00, 0x00, 0x00}, 0, {0x00, 0x00, 0x00}, 0, {0x28, 0x28, 0x28}, 0}
};
// Unreferenced light group
static const Lights1 bobomb_lights_unused = gdSPDefLights1(
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x28, 0x28, 0x28
);

// 0x08022E30
static const Vtx bobomb_seg8_vertex_08022E30[] = {
@@ -291,8 +279,8 @@ static const Vtx bobomb_seg8_vertex_08023190[] = {

// 0x08023270 - 0x08023378
const Gfx bobomb_seg8_dl_08023270[] = {
gsSPLight(&bobomb_seg8_light_08022DF0, 1),
gsSPLight(&bobomb_seg8_light_08022DE8, 2),
gsSPLight(&bobomb_seg8_lights_08022DE8.l, 1),
gsSPLight(&bobomb_seg8_lights_08022DE8.a, 2),
gsSPVertex(bobomb_seg8_vertex_08022E30, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),
@@ -314,8 +302,8 @@ const Gfx bobomb_seg8_dl_08023270[] = {

// 0x08023378 - 0x08023480
const Gfx bobomb_seg8_dl_08023378[] = {
gsSPLight(&bobomb_seg8_light_08022DF0, 1),
gsSPLight(&bobomb_seg8_light_08022DE8, 2),
gsSPLight(&bobomb_seg8_lights_08022DE8.l, 1),
gsSPLight(&bobomb_seg8_lights_08022DE8.a, 2),
gsSPVertex(bobomb_seg8_vertex_08022F70, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),
@@ -337,8 +325,8 @@ const Gfx bobomb_seg8_dl_08023378[] = {

// 0x08023480 - 0x08023528
const Gfx bobomb_seg8_dl_08023480[] = {
gsSPLight(&bobomb_seg8_light_08022E08, 1),
gsSPLight(&bobomb_seg8_light_08022E00, 2),
gsSPLight(&bobomb_seg8_lights_08022E00.l, 1),
gsSPLight(&bobomb_seg8_lights_08022E00.a, 2),
gsSPVertex(bobomb_seg8_vertex_080230B0, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 0, 3, 0x0, 4, 3, 5, 0x0),


+ 6
- 10
actors/bomb/model.inc.c View File

@@ -1,14 +1,10 @@
// Bomb

// 0x06057AA8
static const Ambient bomb_seg6_light_06057AA8 = {
{{0x3f, 0x3f, 0x3f}, 0, {0x3f, 0x3f, 0x3f}, 0}
};

// 0x06057AB0
static const Light bomb_seg6_light_06057AB0 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bomb_seg6_lights_06057AA8 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x06057AC0
ALIGNED8 static const u8 bomb_seg6_texture_06057AC0[] = {
@@ -177,8 +173,8 @@ const Gfx bomb_seg6_dl_0605A8A8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bomb_seg6_texture_06059AC0),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bomb_seg6_light_06057AB0, 1),
gsSPLight(&bomb_seg6_light_06057AA8, 2),
gsSPLight(&bomb_seg6_lights_06057AA8.l, 1),
gsSPLight(&bomb_seg6_lights_06057AA8.a, 2),
gsSPVertex(bomb_seg6_vertex_0605A340, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),


+ 7
- 11
actors/boo/model.inc.c View File

@@ -1,14 +1,10 @@
// Boo

// 0x05009B28
static const Ambient boo_seg5_light_05009B28 = {
{{0x97, 0x9a, 0xff}, 0, {0x97, 0x9a, 0xff}, 0}
};

// 0x05009B30
static const Light boo_seg5_light_05009B30 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 boo_seg5_lights_05009B28 = gdSPDefLights1(
0x97, 0x9a, 0xff,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05009B40
ALIGNED8 static const u8 boo_seg5_texture_05009B40[] = {
@@ -265,8 +261,8 @@ const Gfx boo_seg5_dl_0500BEE0[] = {
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&boo_seg5_light_05009B30, 1),
gsSPLight(&boo_seg5_light_05009B28, 2),
gsSPLight(&boo_seg5_lights_05009B28.l, 1),
gsSPLight(&boo_seg5_lights_05009B28.a, 2),
gsSPVertex(boo_seg5_vertex_0500B340, 12, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
@@ -338,7 +334,7 @@ const Gfx boo_seg5_dl_0500BFA0[] = {
const Gfx boo_seg5_dl_0500C1B0[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_BLENDRGBFADEA, G_CC_BLENDRGBFADEA),
gsSPNumLights(NUMLIGHTS_0), // I cannot tell if they meant to put 0 or 1 here.
gsSPNumLights(NUMLIGHTS_1),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),


+ 7
- 11
actors/boo_castle/model.inc.c View File

@@ -1,14 +1,10 @@
// Boo (Castle)

// 0x06015658
static const Ambient boo_castle_seg6_light_06015658 = {
{{0x97, 0x9a, 0xff}, 0, {0x97, 0x9a, 0xff}, 0}
};

// 0x06015660
static const Light boo_castle_seg6_light_06015660 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 boo_castle_seg6_lights_06015658 = gdSPDefLights1(
0x97, 0x9a, 0xff,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x06015670
ALIGNED8 static const u8 boo_castle_seg6_texture_06015670[] = {
@@ -265,8 +261,8 @@ const Gfx boo_castle_seg6_dl_06017A10[] = {
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&boo_castle_seg6_light_06015660, 1),
gsSPLight(&boo_castle_seg6_light_06015658, 2),
gsSPLight(&boo_castle_seg6_lights_06015658.l, 1),
gsSPLight(&boo_castle_seg6_lights_06015658.a, 2),
gsSPVertex(boo_castle_seg6_vertex_06016E70, 12, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
@@ -338,7 +334,7 @@ const Gfx boo_castle_seg6_dl_06017AD0[] = {
const Gfx boo_castle_seg6_dl_06017CE0[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_BLENDRGBFADEA, G_CC_BLENDRGBFADEA),
gsSPNumLights(NUMLIGHTS_0), // I cannot tell if they meant to put 0 or 1 here.
gsSPNumLights(NUMLIGHTS_1),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),


+ 6
- 10
actors/book/model.inc.c View File

@@ -3,14 +3,10 @@
// This actor file requires including actor bookend because of bookend_seg5_texture_05000C60

// 0x05002558
static const Ambient book_seg5_light_05002558 = {
{{0x7f, 0x7f, 0x7f}, 0, {0x7f, 0x7f, 0x7f}, 0}
};

// 0x05002560
static const Light book_seg5_light_05002560 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 book_seg5_lights_05002558 = gdSPDefLights1(
0x7f, 0x7f, 0x7f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05002570
ALIGNED8 static const u8 book_seg5_texture_05002570[] = {
@@ -54,8 +50,8 @@ const Gfx book_seg5_dl_05002EF0[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bookend_seg5_texture_05000C60),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPLight(&book_seg5_light_05002560, 1),
gsSPLight(&book_seg5_light_05002558, 2),
gsSPLight(&book_seg5_lights_05002558.l, 1),
gsSPLight(&book_seg5_lights_05002558.a, 2),
gsSPVertex(book_seg5_vertex_05002D70, 12, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),


+ 59
- 99
actors/bookend/model.inc.c View File

@@ -1,44 +1,28 @@
// Bookend

// Unreferenced Light
UNUSED static const Ambient bookend_light_1 = {
{{0x3f, 0x3f, 0x3f}, 0, {0x3f, 0x3f, 0x3f}, 0}
};

// Unreferenced Light
UNUSED static const Light bookend_light_2 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};

// Unreferenced Light
UNUSED static const Ambient bookend_light_3 = {
{{0x03, 0x19, 0x09}, 0, {0x03, 0x19, 0x09}, 0}
};

// Unreferenced Light
UNUSED static const Light bookend_light_4 = {
{{0x0c, 0x66, 0x26}, 0, {0x0c, 0x66, 0x26}, 0, {0x28, 0x28, 0x28}, 0}
};

// Unreferenced Light
UNUSED static const Ambient bookend_light_5 = {
{{0x3f, 0x3f, 0x3f}, 0, {0x3f, 0x3f, 0x3f}, 0}
};

// Unreferenced Light
UNUSED static const Light bookend_light_6 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};

// Unreferenced Light
UNUSED static const Ambient bookend_light_7 = {
{{0x3f, 0x00, 0x00}, 0, {0x3f, 0x00, 0x00}, 0}
};

// Unreferenced Light
UNUSED static const Light bookend_light_8 = {
{{0xff, 0x00, 0x00}, 0, {0xff, 0x00, 0x00}, 0, {0x28, 0x28, 0x28}, 0}
};
// Unreferenced light group
UNUSED static const Lights1 bookend_lights_unused1 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// Unreferenced light group
UNUSED static const Lights1 bookend_lights_unused2 = gdSPDefLights1(
0x03, 0x19, 0x09,
0x0c, 0x66, 0x26, 0x28, 0x28, 0x28
);

// Unreferenced light group
UNUSED static const Lights1 bookend_lights_unused3 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// Unreferenced light group
UNUSED static const Lights1 bookend_lights_unused4 = gdSPDefLights1(
0x3f, 0x00, 0x00,
0xff, 0x00, 0x00, 0x28, 0x28, 0x28
);

// 0x05000060
ALIGNED8 static const u8 bookend_seg5_texture_05000060[] = {
@@ -66,14 +50,10 @@ ALIGNED8 static const u8 bookend_seg5_texture_05001060[] = {
};

// 0x05001860
static const Ambient bookend_seg5_light_05001860 = {
{{0x66, 0x66, 0x66}, 0, {0x66, 0x66, 0x66}, 0}
};

// 0x05001868
static const Light bookend_seg5_light_05001868 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bookend_seg5_lights_05001860 = gdSPDefLights1(
0x66, 0x66, 0x66,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05001878
static const Vtx bookend_seg5_vertex_05001878[] = {
@@ -96,8 +76,8 @@ const Gfx bookend_seg5_dl_050018F8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bookend_seg5_texture_05000060),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bookend_seg5_light_05001868, 1),
gsSPLight(&bookend_seg5_light_05001860, 2),
gsSPLight(&bookend_seg5_lights_05001860.l, 1),
gsSPLight(&bookend_seg5_lights_05001860.a, 2),
gsSPVertex(bookend_seg5_vertex_05001878, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSPEndDisplayList(),
@@ -136,14 +116,10 @@ const Gfx bookend_seg5_dl_05001978[] = {
};

// 0x05001A08
static const Ambient bookend_seg5_light_05001A08 = {
{{0x66, 0x66, 0x66}, 0, {0x66, 0x66, 0x66}, 0}
};

// 0x05001A10
static const Light bookend_seg5_light_05001A10 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bookend_seg5_lights_05001A08 = gdSPDefLights1(
0x66, 0x66, 0x66,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05001A20
static const Vtx bookend_seg5_vertex_05001A20[] = {
@@ -166,8 +142,8 @@ const Gfx bookend_seg5_dl_05001AA0[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bookend_seg5_texture_05000060),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bookend_seg5_light_05001A10, 1),
gsSPLight(&bookend_seg5_light_05001A08, 2),
gsSPLight(&bookend_seg5_lights_05001A08.l, 1),
gsSPLight(&bookend_seg5_lights_05001A08.a, 2),
gsSPVertex(bookend_seg5_vertex_05001A20, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSPEndDisplayList(),
@@ -206,14 +182,10 @@ const Gfx bookend_seg5_dl_05001B20[] = {
};

// 0x05001BB0
static const Ambient bookend_seg5_light_05001BB0 = {
{{0x66, 0x66, 0x66}, 0, {0x66, 0x66, 0x66}, 0}
};

// 0x05001BB8
static const Light bookend_seg5_light_05001BB8 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bookend_seg5_lights_05001BB0 = gdSPDefLights1(
0x66, 0x66, 0x66,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05001BC8
static const Vtx bookend_seg5_vertex_05001BC8[] = {
@@ -244,8 +216,8 @@ const Gfx bookend_seg5_dl_05001CC8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bookend_seg5_texture_05000860),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bookend_seg5_light_05001BB8, 1),
gsSPLight(&bookend_seg5_light_05001BB0, 2),
gsSPLight(&bookend_seg5_lights_05001BB0.l, 1),
gsSPLight(&bookend_seg5_lights_05001BB0.a, 2),
gsSPVertex(bookend_seg5_vertex_05001BC8, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSPEndDisplayList(),
@@ -283,14 +255,10 @@ const Gfx bookend_seg5_dl_05001D68[] = {
};

// 0x05001DE0
static const Ambient bookend_seg5_light_05001DE0 = {
{{0x66, 0x66, 0x66}, 0, {0x66, 0x66, 0x66}, 0}
};

// 0x05001DE8
static const Light bookend_seg5_light_05001DE8 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bookend_seg5_lights_05001DE0 = gdSPDefLights1(
0x66, 0x66, 0x66,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05001DF8
static const Vtx bookend_seg5_vertex_05001DF8[] = {
@@ -321,8 +289,8 @@ const Gfx bookend_seg5_dl_05001EF8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bookend_seg5_texture_05000860),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bookend_seg5_light_05001DE8, 1),
gsSPLight(&bookend_seg5_light_05001DE0, 2),
gsSPLight(&bookend_seg5_lights_05001DE0.l, 1),
gsSPLight(&bookend_seg5_lights_05001DE0.a, 2),
gsSPVertex(bookend_seg5_vertex_05001DF8, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSPEndDisplayList(),
@@ -360,14 +328,10 @@ const Gfx bookend_seg5_dl_05001F98[] = {
};

// 0x05002010
static const Ambient bookend_seg5_light_05002010 = {
{{0x66, 0x66, 0x66}, 0, {0x66, 0x66, 0x66}, 0}
};

// 0x05002018
static const Light bookend_seg5_light_05002018 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bookend_seg5_lights_05002010 = gdSPDefLights1(
0x66, 0x66, 0x66,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05002028
static const Vtx bookend_seg5_vertex_05002028[] = {
@@ -390,8 +354,8 @@ const Gfx bookend_seg5_dl_050020E8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bookend_seg5_texture_05000460),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bookend_seg5_light_05002018, 1),
gsSPLight(&bookend_seg5_light_05002010, 2),
gsSPLight(&bookend_seg5_lights_05002010.l, 1),
gsSPLight(&bookend_seg5_lights_05002010.a, 2),
gsSPVertex(bookend_seg5_vertex_05002028, 12, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
@@ -417,14 +381,10 @@ const Gfx bookend_seg5_dl_05002140[] = {
};

// 0x050021B0
static const Ambient bookend_seg5_light_050021B0 = {
{{0x66, 0x66, 0x66}, 0, {0x66, 0x66, 0x66}, 0}
};

// 0x050021B8
static const Light bookend_seg5_light_050021B8 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bookend_seg5_lights_050021B0 = gdSPDefLights1(
0x66, 0x66, 0x66,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x050021C8
static const Vtx bookend_seg5_vertex_050021C8[] = {
@@ -447,8 +407,8 @@ const Gfx bookend_seg5_dl_05002288[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bookend_seg5_texture_05000460),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bookend_seg5_light_050021B8, 1),
gsSPLight(&bookend_seg5_light_050021B0, 2),
gsSPLight(&bookend_seg5_lights_050021B0.l, 1),
gsSPLight(&bookend_seg5_lights_050021B0.a, 2),
gsSPVertex(bookend_seg5_vertex_050021C8, 12, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),


+ 44
- 56
actors/bowser/model.inc.c View File

@@ -148,34 +148,22 @@ ALIGNED8 static const u8 bowser_seg6_texture_06037C38[] = {
};

// 0x06038C38
static const Ambient bowser_seg6_light_06038C38 = {
{{0x3f, 0x3f, 0x3f}, 0, {0x3f, 0x3f, 0x3f}, 0}
};

// 0x06038C40
static const Light bowser_seg6_light_06038C40 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};

// Unreferenced light
UNUSED static const Ambient bowser_light_1 = {
{{0x33, 0x31, 0x00}, 0, {0x33, 0x31, 0x00}, 0}
};

// Unreferenced light
UNUSED static const Light bowser_light_2 = {
{{0xce, 0xc7, 0x00}, 0, {0xce, 0xc7, 0x00}, 0, {0x28, 0x28, 0x28}, 0}
};

// Unreferenced light
UNUSED static const Ambient bowser_light_3 = {
{{0x34, 0x34, 0x00}, 0, {0x34, 0x34, 0x00}, 0}
};

// Unreferenced light
UNUSED static const Light bowser_light_4 = {
{{0xd2, 0xd2, 0x00}, 0, {0xd2, 0xd2, 0x00}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bowser_seg6_lights_06038C38 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// Unreferenced light group
UNUSED static const Lights1 bowser_lights_unused1 = gdSPDefLights1(
0x33, 0x31, 0x00,
0xce, 0xc7, 0x00, 0x28, 0x28, 0x28
);

// Unreferenced light group
UNUSED static const Lights1 bowser_lights_unused2 = gdSPDefLights1(
0x34, 0x34, 0x00,
0xd2, 0xd2, 0x00, 0x28, 0x28, 0x28
);

// 0x06038C80
static const Vtx bowser_seg6_vertex_06038C80[] = {
@@ -279,8 +267,8 @@ const Gfx bowser_seg6_dl_06039110[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06022438),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_06038C80, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 4, 6, 5, 0x0, 7, 8, 9, 0x0),
@@ -451,8 +439,8 @@ const Gfx bowser_seg6_dl_06039808[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06023C38),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_06039368, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 6, 4, 0x0, 7, 8, 9, 0x0),
@@ -683,8 +671,8 @@ const Gfx bowser_seg6_dl_0603A210[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06022438),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_06039A60, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 0, 4, 0x0),
gsSP2Triangles( 4, 0, 2, 0x0, 2, 1, 5, 0x0),
@@ -959,8 +947,8 @@ const Gfx bowser_seg6_dl_0603AED8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06022438),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_0603A568, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 4, 6, 5, 0x0, 7, 5, 8, 0x0),
@@ -1144,8 +1132,8 @@ const Gfx bowser_seg6_dl_0603B718[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06022438),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_0603B288, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 1, 3, 0x0),
gsSP2Triangles( 1, 4, 3, 0x0, 5, 3, 4, 0x0),
@@ -1322,8 +1310,8 @@ const Gfx bowser_seg6_dl_0603BDF8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06023C38),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_0603B948, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 3, 5, 0x0, 7, 6, 5, 0x0),
@@ -1495,8 +1483,8 @@ const Gfx bowser_seg6_dl_0603C500[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06023C38),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_0603C050, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 6, 7, 0x0, 3, 7, 4, 0x0),
@@ -1730,8 +1718,8 @@ const Gfx bowser_seg6_dl_0603CF28[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06022438),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_0603C758, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 4, 0x0),
gsSP2Triangles( 5, 0, 4, 0x0, 0, 2, 6, 0x0),
@@ -2021,8 +2009,8 @@ const Gfx bowser_seg6_dl_0603DC70[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06022438),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_0603D280, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 4, 6, 7, 0x0, 4, 7, 8, 0x0),
@@ -2211,8 +2199,8 @@ const Gfx bowser_seg6_dl_0603E500[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06022438),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_0603E030, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 6, 4, 0x0, 7, 8, 9, 0x0),
@@ -2690,8 +2678,8 @@ const Gfx bowser_seg6_dl_0603FBA8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06023C38),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_0603E718, 9, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
@@ -3404,8 +3392,8 @@ const Gfx bowser_seg6_dl_06041A28[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06028438),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_060402D8, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 6, 7, 8, 0x0, 9, 10, 11, 0x0),
@@ -3961,8 +3949,8 @@ const Gfx bowser_seg6_dl_06042EE0[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06020C38),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_06042660, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 6, 7, 3, 0x0),
@@ -4119,8 +4107,8 @@ const Gfx bowser_seg6_dl_06043548[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bowser_seg6_texture_06022438),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bowser_seg6_light_06038C40, 1),
gsSPLight(&bowser_seg6_light_06038C38, 2),
gsSPLight(&bowser_seg6_lights_06038C38.l, 1),
gsSPLight(&bowser_seg6_lights_06038C38.a, 2),
gsSPVertex(bowser_seg6_vertex_06043278, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 0, 0x0),
gsSP2Triangles( 0, 2, 3, 0x0, 0, 5, 1, 0x0),


+ 7
- 11
actors/bowser_key/model.inc.c View File

@@ -1,14 +1,10 @@
// Bowser Key

// 0x030156E0, solid color brown
static const Ambient bowser_key_amb_light = {
{{0x3f, 0x2c, 0x00}, 0, {0x3f, 0x2c, 0x00}, 0}
};

// 0x030156E8, solid color orange
static const Light bowser_key_diff_light = {
{{0xff, 0xb2, 0x00}, 0, {0xff, 0xb2, 0x00}, 0, {0x28, 0x28, 0x28}, 0}
};
// 0x030156E0, ambient color brown - light color orange
static const Lights1 bowser_key_lights = gdSPDefLights1(
0x3f, 0x2c, 0x00,
0xff, 0xb2, 0x00, 0x28, 0x28, 0x28
);

// 0x030156F8
static const Vtx bowser_key_dl_vertex_group1[] = {
@@ -236,8 +232,8 @@ static const Vtx bowser_key_dl_vertex_group12[] = {

// 0x030161F8 - 0x03016530
const Gfx bowser_key_dl[] = {
gsSPLight(&bowser_key_diff_light, 1),
gsSPLight(&bowser_key_amb_light, 2),
gsSPLight(&bowser_key_lights.l, 1),
gsSPLight(&bowser_key_lights.a, 2),
gsSPVertex(bowser_key_dl_vertex_group1, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),


+ 6
- 10
actors/breakable_box/model.inc.c View File

@@ -1,14 +1,10 @@
// Breakable Box

// 0x08011A78
static const Ambient breakable_box_seg8_light_08011A78 = {
{{0x3f, 0x3f, 0x3f}, 0, {0x3f, 0x3f, 0x3f}, 0}
};

// 0x08011A80
static const Light breakable_box_seg8_light_08011A80 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 breakable_box_seg8_lights_08011A80 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x08011A90
ALIGNED8 static const u8 breakable_box_seg8_texture_08011A90[] = {
@@ -56,8 +52,8 @@ static const Vtx breakable_box_seg8_vertex_08012B80[] = {

// 0x08012C30 - 0x08012CD8
const Gfx breakable_box_seg8_dl_08012C30[] = {
gsSPLight(&breakable_box_seg8_light_08011A80, 1),
gsSPLight(&breakable_box_seg8_light_08011A78, 2),
gsSPLight(&breakable_box_seg8_lights_08011A80.l, 1),
gsSPLight(&breakable_box_seg8_lights_08011A80.a, 2),
gsSPVertex(breakable_box_seg8_vertex_08012A90, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),


+ 20
- 28
actors/bub/model.inc.c View File

@@ -1,24 +1,16 @@
// Bub

// 0x0600E278
static const Ambient bub_seg6_light_0600E278 = {
{{0x3f, 0x3f, 0x3f}, 0, {0x3f, 0x3f, 0x3f}, 0}
};

// 0x0600E280
static const Light bub_seg6_light_0600E280 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bub_seg6_lights_0600E280 = gdSPDefLights1(
0x3f, 0x3f, 0x3f,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x0600E290
static const Ambient bub_seg6_light_0600E290 = {
{{0x3f, 0x1d, 0x25}, 0, {0x3f, 0x1d, 0x25}, 0}
};

// 0x0600E298
static const Light bub_seg6_light_0600E298 = {
{{0xff, 0x75, 0x94}, 0, {0xff, 0x75, 0x94}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bub_seg6_lights_0600E290 = gdSPDefLights1(
0x3f, 0x1d, 0x25,
0xff, 0x75, 0x94, 0x28, 0x28, 0x28
);

// 0x0600E2A8
ALIGNED8 static const u8 bub_seg6_texture_0600E2A8[] = {
@@ -171,8 +163,8 @@ const Gfx bub_seg6_dl_06011848[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bub_seg6_texture_0600E2A8),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bub_seg6_light_0600E280, 1),
gsSPLight(&bub_seg6_light_0600E278, 2),
gsSPLight(&bub_seg6_lights_0600E280.l, 1),
gsSPLight(&bub_seg6_lights_0600E280.a, 2),
gsSPVertex(bub_seg6_vertex_060112A8, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 3, 2, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 5, 7, 6, 0x0),
@@ -230,8 +222,8 @@ const Gfx bub_seg6_dl_06011968[] = {

// 0x06011A50 - 0x06011B28
const Gfx bub_seg6_dl_06011A50[] = {
gsSPLight(&bub_seg6_light_0600E298, 1),
gsSPLight(&bub_seg6_light_0600E290, 2),
gsSPLight(&bub_seg6_lights_0600E290.l, 1),
gsSPLight(&bub_seg6_lights_0600E290.a, 2),
gsSPVertex(bub_seg6_vertex_06011718, 12, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSP2Triangles( 1, 4, 2, 0x0, 1, 3, 4, 0x0),
@@ -240,8 +232,8 @@ const Gfx bub_seg6_dl_06011A50[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 8, 5, 0, 0x0),
gsSP2Triangles( 0, 11, 8, 0x0, 8, 10, 5, 0x0),
gsSP2Triangles( 5, 10, 6, 0x0, 10, 9, 6, 0x0),
gsSPLight(&bub_seg6_light_0600E280, 1),
gsSPLight(&bub_seg6_light_0600E278, 2),
gsSPLight(&bub_seg6_lights_0600E280.l, 1),
gsSPLight(&bub_seg6_lights_0600E280.a, 2),
gsSPVertex(bub_seg6_vertex_060117D8, 7, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 3, 4, 0x0),
gsSP2Triangles( 2, 1, 5, 0x0, 2, 5, 6, 0x0),
@@ -292,8 +284,8 @@ const Gfx bub_seg6_dl_06011C58[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bub_seg6_texture_0600EAA8),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bub_seg6_light_0600E280, 1),
gsSPLight(&bub_seg6_light_0600E278, 2),
gsSPLight(&bub_seg6_lights_0600E280.l, 1),
gsSPLight(&bub_seg6_lights_0600E280.a, 2),
gsSPVertex(bub_seg6_vertex_06011BD8, 8, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 0, 2, 0x0),
gsSP2Triangles( 4, 5, 0, 0x0, 0, 5, 6, 0x0),
@@ -336,8 +328,8 @@ const Gfx bub_seg6_dl_06011DC0[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bub_seg6_texture_0600EAA8),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bub_seg6_light_0600E280, 1),
gsSPLight(&bub_seg6_light_0600E278, 2),
gsSPLight(&bub_seg6_lights_0600E280.l, 1),
gsSPLight(&bub_seg6_lights_0600E280.a, 2),
gsSPVertex(bub_seg6_vertex_06011D50, 7, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 2, 0x0),
gsSP2Triangles( 2, 4, 0, 0x0, 3, 2, 1, 0x0),
@@ -379,8 +371,8 @@ const Gfx bub_seg6_dl_06011F18[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bub_seg6_texture_0600EAA8),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bub_seg6_light_0600E280, 1),
gsSPLight(&bub_seg6_light_0600E278, 2),
gsSPLight(&bub_seg6_lights_0600E280.l, 1),
gsSPLight(&bub_seg6_lights_0600E280.a, 2),
gsSPVertex(bub_seg6_vertex_06011EA8, 7, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSP2Triangles( 4, 3, 0, 0x0, 0, 5, 6, 0x0),


+ 44
- 68
actors/bubba/model.inc.c View File

@@ -34,34 +34,22 @@ ALIGNED8 static const u8 bubba_seg5_texture_05002408[] = {
};

// 0x05004408
static const Ambient bubba_seg5_light_05004408 = {
{{0x48, 0x31, 0x2a}, 0, {0x48, 0x31, 0x2a}, 0}
};

// 0x05004410
static const Light bubba_seg5_light_05004410 = {
{{0xf1, 0xa6, 0x8c}, 0, {0xf1, 0xa6, 0x8c}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bubba_seg5_lights_05004408 = gdSPDefLights1(
0x48, 0x31, 0x2a,
0xf1, 0xa6, 0x8c, 0x28, 0x28, 0x28
);

// 0x05004420
static const Ambient bubba_seg5_light_05004420 = {
{{0x4c, 0x4c, 0x4c}, 0, {0x4c, 0x4c, 0x4c}, 0}
};

// 0x05004428
static const Light bubba_seg5_light_05004428 = {
{{0xff, 0xff, 0xff}, 0, {0xff, 0xff, 0xff}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bubba_seg5_lights_05004420 = gdSPDefLights1(
0x4c, 0x4c, 0x4c,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x05004438
static const Ambient bubba_seg5_light_05004438 = {
{{0x10, 0x07, 0x08}, 0, {0x10, 0x07, 0x08}, 0}
};

// 0x05004440
static const Light bubba_seg5_light_05004440 = {
{{0x36, 0x1a, 0x1c}, 0, {0x36, 0x1a, 0x1c}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bubba_seg5_lights_05004438 = gdSPDefLights1(
0x10, 0x07, 0x08,
0x36, 0x1a, 0x1c, 0x28, 0x28, 0x28
);

// 0x05004450
static const Vtx bubba_seg5_vertex_05004450[] = {
@@ -199,8 +187,8 @@ const Gfx bubba_seg5_dl_05004A40[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bubba_seg5_texture_05000008),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bubba_seg5_light_05004410, 1),
gsSPLight(&bubba_seg5_light_05004408, 2),
gsSPLight(&bubba_seg5_lights_05004408.l, 1),
gsSPLight(&bubba_seg5_lights_05004408.a, 2),
gsSPVertex(bubba_seg5_vertex_05004450, 7, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 1, 0, 0x0),
gsSP2Triangles( 4, 1, 3, 0x0, 5, 1, 4, 0x0),
@@ -213,8 +201,8 @@ const Gfx bubba_seg5_dl_05004AA8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, bubba_seg5_texture_05001408),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPLight(&bubba_seg5_light_05004428, 1),
gsSPLight(&bubba_seg5_light_05004420, 2),
gsSPLight(&bubba_seg5_lights_05004420.l, 1),
gsSPLight(&bubba_seg5_lights_05004420.a, 2),
gsSPVertex(bubba_seg5_vertex_050044C0, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 0, 0x0),
gsSP2Triangles( 0, 2, 3, 0x0, 5, 0, 4, 0x0),
@@ -274,8 +262,8 @@ const Gfx bubba_seg5_dl_05004C40[] = {

// 0x05004D48 - 0x05004E80
const Gfx bubba_seg5_dl_05004D48[] = {
gsSPLight(&bubba_seg5_light_05004410, 1),
gsSPLight(&bubba_seg5_light_05004408, 2),
gsSPLight(&bubba_seg5_lights_05004408.l, 1),
gsSPLight(&bubba_seg5_lights_05004408.a, 2),
gsSPVertex(bubba_seg5_vertex_05004870, 13, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 2, 4, 5, 0x0, 4, 6, 5, 0x0),
@@ -284,16 +272,16 @@ const Gfx bubba_seg5_dl_05004D48[] = {
gsSP2Triangles(10, 11, 7, 0x0, 3, 7, 0, 0x0),
gsSP2Triangles( 0, 11, 1, 0x0, 6, 10, 9, 0x0),
gsSP2Triangles(12, 10, 6, 0x0, 12, 11, 10, 0x0),
gsSPLight(&bubba_seg5_light_05004440, 1),
gsSPLight(&bubba_seg5_light_05004438, 2),
gsSPLight(&bubba_seg5_lights_05004438.l, 1),
gsSPLight(&bubba_seg5_lights_05004438.a, 2),
gsSPVertex(bubba_seg5_vertex_05004940, 9, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 6, 7, 0x0, 5, 6, 3, 0x0),
gsSP2Triangles( 3, 8, 4, 0x0, 7, 6, 5, 0x0),
gsSP2Triangles( 8, 2, 1, 0x0, 8, 1, 0, 0x0),
gsSP1Triangle( 4, 8, 0, 0x0),
gsSPLight(&bubba_seg5_light_05004428, 1),
gsSPLight(&bubba_seg5_light_05004420, 2),
gsSPLight(&bubba_seg5_lights_05004420.l, 1),
gsSPLight(&bubba_seg5_lights_05004420.a, 2),
gsSPVertex(bubba_seg5_vertex_050049D0, 7, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSP2Triangles( 4, 5, 0, 0x0, 0, 5, 3, 0x0),
@@ -328,34 +316,22 @@ const Gfx bubba_seg5_dl_05004E80[] = {
};

// 0x05004F30
static const Ambient bubba_seg5_light_05004F30 = {
{{0x48, 0x31, 0x2a}, 0, {0x48, 0x31, 0x2a}, 0}
};

// 0x05004F38
static const Light bubba_seg5_light_05004F38 = {
{{0xf1, 0xa6, 0x8c}, 0, {0xf1, 0xa6, 0x8c}, 0, {0x28, 0x28, 0x28}, 0}
};
static const Lights1 bubba_seg5_lights_05004F30 = gdSPDefLights1(
0x48, 0x31, 0x2a,
0xf1, 0xa6, 0x8c, 0x28, 0x28, 0x28
);

// 0x05004F48