Browse Source

refresh 4

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

30
CHANGES

@ -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

2
Doxyfile

@ -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

10
Jenkinsfile

@ -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')

123
Makefile

@ -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

81
Makefile.split

@ -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

28
actors/amp/model.inc.c

@ -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(),

68
actors/bird/model.inc.c

@ -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),

82
actors/blargg/model.inc.c

@ -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),

16
actors/blue_coin_switch/model.inc.c

@ -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),

20
actors/blue_fish/model.inc.c

@ -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),

50
actors/bobomb/model.inc.c

@ -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),

16
actors/bomb/model.inc.c

@ -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),

18
actors/boo/model.inc.c

@ -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),

18
actors/boo_castle/model.inc.c

@ -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),

16
actors/book/model.inc.c

@ -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),

158
actors/bookend/model.inc.c

@ -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),