You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Add goddard as togglable and stop linking segments seperately
This commit is contained in:
48
Makefile
48
Makefile
@@ -9,7 +9,6 @@ default: all
|
||||
DEFINES :=
|
||||
|
||||
SRC_DIRS :=
|
||||
MAINSEG_SRC_DIRS :=
|
||||
|
||||
#==============================================================================#
|
||||
# Build Options #
|
||||
@@ -173,10 +172,9 @@ endif
|
||||
# 0 - does not
|
||||
UNF ?= 0
|
||||
$(eval $(call validate-option,UNF,0 1))
|
||||
|
||||
ifeq ($(UNF),1)
|
||||
DEFINES += UNF=1
|
||||
MAINSEG_SRC_DIRS += src/usb
|
||||
SRC_DIRS += src/usb
|
||||
endif
|
||||
|
||||
# HVQM - whether to use HVQM fmv library
|
||||
@@ -186,7 +184,16 @@ HVQM ?= 0
|
||||
$(eval $(call validate-option,HVQM,0 1))
|
||||
ifeq ($(HVQM),1)
|
||||
DEFINES += HVQM=1
|
||||
MAINSEG_SRC_DIRS += src/hvqm
|
||||
SRC_DIRS += src/hvqm
|
||||
endif
|
||||
|
||||
# GODDARD - whether to use libgoddard (Mario Head)
|
||||
# 1 - includes code in ROM
|
||||
# 0 - does not
|
||||
GODDARD ?= 0
|
||||
$(eval $(call validate-option,GODDARD,0 1))
|
||||
ifeq ($(GODDARD),1)
|
||||
DEFINES += GODDARD=1
|
||||
endif
|
||||
|
||||
# Whether to hide commands or not
|
||||
@@ -272,10 +279,9 @@ ACTOR_DIR := actors
|
||||
LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h)))
|
||||
|
||||
# Directories containing source files
|
||||
SRC_DIRS += src src/audio src/menu src/buffers actors levels bin data assets asm lib sound
|
||||
MAINSEG_SRC_DIRS += src/game
|
||||
ENGINE_SRC_DIRS := src/engine
|
||||
SRC_DIRS += src src/game src/engine src/audio src/menu src/buffers actors levels bin data assets asm lib sound
|
||||
LIBZ_SRC_DIRS := src/libz
|
||||
GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
|
||||
BIN_DIRS := bin bin/$(VERSION)
|
||||
|
||||
# File dependencies and variables for specific files
|
||||
@@ -284,10 +290,8 @@ include Makefile.split
|
||||
# Source code files
|
||||
LEVEL_C_FILES := $(wildcard levels/*/leveldata.c) $(wildcard levels/*/script.c) $(wildcard levels/*/geo.c)
|
||||
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) $(LEVEL_C_FILES)
|
||||
MAINSEG_C_FILES := $(foreach dir,$(MAINSEG_SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||
MAINSEG_S_FILES := $(foreach dir,$(MAINSEG_SRC_DIRS),$(wildcard $(dir)/*.s))
|
||||
ENGINE_C_FILES := $(foreach dir,$(ENGINE_SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||
LIBZ_C_FILES := $(foreach dir,$(LIBZ_SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||
GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
|
||||
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
|
||||
|
||||
@@ -311,12 +315,11 @@ O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \
|
||||
$(foreach file,$(GENERATED_C_FILES),$(file:.c=.o)) \
|
||||
lib/PR/hvqm/hvqm2sp1.o lib/PR/hvqm/hvqm2sp2.o
|
||||
|
||||
MAINSEG_O_FILES := $(foreach file,$(MAINSEG_C_FILES),$(BUILD_DIR)/$(file:.c=.o)) $(foreach file,$(MAINSEG_S_FILES),$(BUILD_DIR)/$(file:.s=.o))
|
||||
ENGINE_O_FILES := $(foreach file,$(ENGINE_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
||||
LIBZ_O_FILES := $(foreach file,$(LIBZ_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
||||
GODDARD_O_FILES := $(foreach file,$(GODDARD_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
||||
|
||||
# Automatic dependency files
|
||||
DEP_FILES := $(O_FILES:.o=.d) $(MAINSEG_O_FILES:.o=.d) $(ENGINE_O_FILES:.o=.d) $(LIBZ_O_FILES:.o=.d) $(BUILD_DIR)/$(LD_SCRIPT).d
|
||||
DEP_FILES := $(O_FILES:.o=.d) $(LIBZ_O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $(BUILD_DIR)/$(LD_SCRIPT).d
|
||||
|
||||
#==============================================================================#
|
||||
# Compiler Options #
|
||||
@@ -510,7 +513,7 @@ $(BUILD_DIR)/src/usb/usb.o: CFLAGS += -Wno-unused-variable -Wno-sign-compare -Wn
|
||||
$(BUILD_DIR)/src/usb/debug.o: OPT_FLAGS := -O0
|
||||
$(BUILD_DIR)/src/usb/debug.o: CFLAGS += -Wno-unused-parameter -Wno-maybe-uninitialized
|
||||
|
||||
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(MAINSEG_SRC_DIRS) $(GODDARD_SRC_DIRS) $(ENGINE_SRC_DIRS) $(LIBZ_SRC_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) rsp include) $(YAY0_DIR) $(addprefix $(YAY0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)
|
||||
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(GODDARD_SRC_DIRS) $(LIBZ_SRC_DIRS) $(ULTRA_BIN_DIRS) $(BIN_DIRS) $(TEXTURE_DIRS) $(TEXT_DIRS) $(SOUND_SAMPLE_DIRS) $(addprefix levels/,$(LEVEL_DIRS)) rsp include) $(YAY0_DIR) $(addprefix $(YAY0_DIR)/,$(VERSION)) $(SOUND_BIN_DIR) $(SOUND_BIN_DIR)/sequences/$(VERSION)
|
||||
|
||||
# Make sure build directory exists before compiling anything
|
||||
DUMMY != mkdir -p $(ALL_DIRS)
|
||||
@@ -704,15 +707,10 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
|
||||
$(call print,Preprocessing linker script:,$<,$@)
|
||||
$(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||
|
||||
# Link mainseg
|
||||
$(BUILD_DIR)/mainseg.o: $(MAINSEG_O_FILES) $(BUILD_DIR)/libz.a
|
||||
@$(PRINT) "$(GREEN)Linking main segment: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(LD) -o $@ -r $(MAINSEG_O_FILES) -L $(BUILD_DIR) -L$(LIBS_DIR) -Llib -lgcc -lnustd -lhvqm2 -lz
|
||||
|
||||
# Link engine
|
||||
$(BUILD_DIR)/engineseg.o: $(ENGINE_O_FILES)
|
||||
@$(PRINT) "$(GREEN)Linking engine segment: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(LD) -o $@ -r $(ENGINE_O_FILES)
|
||||
# Link libgoddard
|
||||
$(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)
|
||||
@$(PRINT) "$(GREEN)Linking libgoddard: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(AR) rcs -o $@ $(GODDARD_O_FILES)
|
||||
|
||||
# Link libz
|
||||
$(BUILD_DIR)/libz.a: $(LIBZ_O_FILES)
|
||||
@@ -720,9 +718,9 @@ $(BUILD_DIR)/libz.a: $(LIBZ_O_FILES)
|
||||
$(V)$(AR) rcs -o $@ $(LIBZ_O_FILES)
|
||||
|
||||
# Link SM64 ELF file
|
||||
$(ELF): $(BUILD_DIR)/mainseg.o $(BUILD_DIR)/engineseg.o $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt
|
||||
$(ELF): $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt $(BUILD_DIR)/libz.a $(BUILD_DIR)/libgoddard.a
|
||||
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(LD) -L $(BUILD_DIR) -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(BUILD_DIR)/src/audio -L$(LIBS_DIR) -lultra_rom
|
||||
$(V)$(LD) -L $(BUILD_DIR) -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -lultra_rom -Llib -lgcc -lnustd -lhvqm2 -lz -lgoddard -u sprintf -u osMapTLB
|
||||
|
||||
# Build ROM
|
||||
$(ROM): $(ELF)
|
||||
|
||||
@@ -261,6 +261,7 @@ $(BUILD_DIR)/bin/%_skybox.elf: SEGMENT_ADDRESS := 0x0A000000
|
||||
|
||||
# intro and ipl3 textures are not compressed
|
||||
INTRO_RAW_FILES := $(wildcard $(TEXTURE_DIR)/intro_raw/*.png)
|
||||
$(BUILD_DIR)/src/goddard/renderer.o: $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%.inc.c,$(INTRO_RAW_FILES)))
|
||||
|
||||
IPL3_TEXTURE_FILES := $(wildcard $(TEXTURE_DIR)/ipl3_raw/*.png)
|
||||
IPL3_RAW_FILES := $(addprefix $(BUILD_DIR)/,$(patsubst %.png,%,$(IPL3_TEXTURE_FILES)))
|
||||
|
||||
38
asm/entry.s
38
asm/entry.s
@@ -9,24 +9,20 @@
|
||||
.section .text, "ax"
|
||||
|
||||
glabel entry_point
|
||||
lui $t0, %hi(_mainSegmentNoloadStart) # $t0, 0x8034
|
||||
lui $t1, %lo(_mainSegmentNoloadSizeHi) # lui $t1, 2
|
||||
addiu $t0, %lo(_mainSegmentNoloadStart) # addiu $t0, $t0, -0x6df0
|
||||
ori $t1, %lo(_mainSegmentNoloadSizeLo) # ori $t1, $t1, 0xcee0
|
||||
.L80246010:
|
||||
addi $t1, $t1, -8
|
||||
sw $zero, ($t0)
|
||||
sw $zero, 4($t0)
|
||||
bnez $t1, .L80246010
|
||||
addi $t0, $t0, 8
|
||||
lui $t2, %hi(main_func) # $t2, 0x8024
|
||||
lui $sp, %hi(gIdleThreadStack) # $sp, 0x8020
|
||||
addiu $t2, %lo(main_func) # addiu $t2, $t2, 0x6dc4
|
||||
jr $t2
|
||||
addiu $sp, %lo(gIdleThreadStack) # addiu $sp, $sp, 0xa00
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
entry_point:
|
||||
lui $t0, %hi(_mainSegmentBssStart)
|
||||
lui $t1, %hi(_mainSegmentBssSize)
|
||||
addiu $t0, %lo(_mainSegmentBssStart)
|
||||
addiu $t1, %lo(_mainSegmentBssSize)
|
||||
.clear_bytes:
|
||||
addi $t1, $t1, -8 # Subtract 8 bytes from the amount remaining
|
||||
sw $zero, ($t0) # Clear 4 bytes
|
||||
sw $zero, 4($t0) # Clear the next 4 bytes
|
||||
bnez $t1, .clear_bytes # Continue clearing until clear_bytes is 0
|
||||
addi $t0, $t0, 8 # Increment the address of bytes to clear
|
||||
lui $t2, %hi(main_func) # Get the high half of the init function address
|
||||
lui $sp, %hi(gIdleThreadStack) # Set the high half of the stack pointer to that of the idle thread stack
|
||||
addiu $t2, %lo(main_func) # Get the low half of the init function address
|
||||
jr $t2 # Jump to the init function
|
||||
addiu $sp, %lo(gIdleThreadStack) # Set the low half of the stack pointer to that of the idle thread stack
|
||||
@@ -169,8 +169,13 @@
|
||||
CMD_PTR(romEnd)
|
||||
#endif
|
||||
|
||||
#ifdef GODDARD
|
||||
#define LOAD_MARIO_HEAD(sethead) \
|
||||
CMD_BBH(0x19, 0x04, sethead)
|
||||
#else
|
||||
#define LOAD_MARIO_HEAD() \
|
||||
CMD_BBH(0x32, 0x04, 0x0000)
|
||||
#endif
|
||||
|
||||
#ifdef NO_SEGMENTED_MEMORY
|
||||
#define LOAD_YAY0_TEXTURE(seg, romStart, romEnd) \
|
||||
|
||||
@@ -43,9 +43,9 @@ DECLARE_SEGMENT(goddard)
|
||||
DECLARE_SEGMENT(framebuffers)
|
||||
extern u8 _goddardSegmentStart[];
|
||||
extern u8 _engineSegmentStart[];
|
||||
extern u8 _engineSegmentNoloadEnd[];
|
||||
extern u8 _engineSegmentBssEnd[];
|
||||
extern u8 _engineSegmentEnd[];
|
||||
extern u8 _framebuffersSegmentNoloadEnd[];
|
||||
extern u8 _framebuffersSegmentBssEnd[];
|
||||
|
||||
DECLARE_LEVEL_SEGMENT(menu)
|
||||
DECLARE_LEVEL_SEGMENT(intro)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* importing large custom content.
|
||||
*/
|
||||
|
||||
#define SEG_POOL_START _framebuffersSegmentNoloadEnd // 0x0165000 in size
|
||||
#define SEG_POOL_START _framebuffersSegmentBssEnd // 0x0165000 in size
|
||||
#define SEG_GODDARD SEG_POOL_START + 0x113000
|
||||
|
||||
#define POOL_SIZE RAM_END - SEG_POOL_START
|
||||
|
||||
@@ -61,6 +61,11 @@ const GeoLayout intro_geo_mario_head_regular[] = {
|
||||
GEO_ZBUFFER(1),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_CAMERA_FRUSTUM(45, 128, 16384),
|
||||
#ifdef GODDARD
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(2, geo_draw_mario_head_goddard),
|
||||
GEO_CLOSE_NODE(),
|
||||
#endif
|
||||
GEO_CLOSE_NODE(),
|
||||
#ifdef VERSION_SH
|
||||
GEO_ZBUFFER(0),
|
||||
@@ -89,6 +94,11 @@ const GeoLayout intro_geo_mario_head_dizzy[] = {
|
||||
GEO_ZBUFFER(1),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_CAMERA_FRUSTUM(45, 128, 16384),
|
||||
#ifdef GODDARD
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(3, geo_draw_mario_head_goddard),
|
||||
GEO_CLOSE_NODE(),
|
||||
#endif
|
||||
GEO_CLOSE_NODE(),
|
||||
#ifdef VERSION_SH
|
||||
GEO_ZBUFFER(0),
|
||||
|
||||
@@ -47,6 +47,9 @@ const LevelScript level_intro_mario_head_regular[] = {
|
||||
INIT_LEVEL(),
|
||||
BLACKOUT(/*active*/ TRUE),
|
||||
FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd),
|
||||
#ifdef GODDARD
|
||||
LOAD_MARIO_HEAD(/*loadHeadID*/ REGULAR_FACE),
|
||||
#endif
|
||||
LOAD_RAW(/*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd),
|
||||
LOAD_YAY0_TEXTURE(/*seg*/ 0x0A, _title_screen_bg_yay0SegmentRomStart, _title_screen_bg_yay0SegmentRomEnd),
|
||||
|
||||
@@ -71,6 +74,9 @@ const LevelScript level_intro_mario_head_dizzy[] = {
|
||||
INIT_LEVEL(),
|
||||
BLACKOUT(/*active*/ TRUE),
|
||||
FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd),
|
||||
#ifdef GODDARD
|
||||
LOAD_MARIO_HEAD(/*loadHeadID*/ DIZZY_FACE),
|
||||
#endif
|
||||
LOAD_RAW(/*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd),
|
||||
LOAD_YAY0_TEXTURE(/*seg*/ 0x0A, _title_screen_bg_yay0SegmentRomStart, _title_screen_bg_yay0SegmentRomEnd),
|
||||
ALLOC_LEVEL_POOL(),
|
||||
|
||||
136
sm64.ld
136
sm64.ld
@@ -15,11 +15,12 @@ OUTPUT_ARCH (mips)
|
||||
__romPos += SIZEOF(.name);
|
||||
|
||||
#define BEGIN_NOLOAD(name) \
|
||||
_##name##SegmentNoloadStart = ADDR(.name.noload); \
|
||||
_##name##SegmentBssStart = ADDR(.name.noload); \
|
||||
.name.noload (NOLOAD) :
|
||||
|
||||
#define END_NOLOAD(name) \
|
||||
_##name##SegmentNoloadEnd = ADDR(.name.noload) + SIZEOF(.name.noload);
|
||||
_##name##SegmentBssEnd = ADDR(.name.noload) + SIZEOF(.name.noload); \
|
||||
_##name##SegmentBssSize = SIZEOF(.name.noload);
|
||||
|
||||
#define YAY0_SEG(name, segAddr) \
|
||||
BEGIN_SEG(name##_yay0, segAddr) \
|
||||
@@ -82,7 +83,7 @@ SECTIONS
|
||||
}
|
||||
END_NOLOAD(zbuffer)
|
||||
|
||||
. = _zbufferSegmentNoloadEnd;
|
||||
. = _zbufferSegmentBssEnd;
|
||||
BEGIN_NOLOAD(buffers)
|
||||
{
|
||||
BUILD_DIR/src/buffers/buffers.o(.bss*);
|
||||
@@ -97,7 +98,7 @@ SECTIONS
|
||||
}
|
||||
END_NOLOAD(buffers)
|
||||
|
||||
. = _buffersSegmentNoloadEnd;
|
||||
. = _buffersSegmentBssEnd;
|
||||
|
||||
#ifdef HVQM
|
||||
BEGIN_NOLOAD(hvqmwork)
|
||||
@@ -116,24 +117,47 @@ SECTIONS
|
||||
}
|
||||
END_NOLOAD(hvqbuf)
|
||||
|
||||
. = _hvqbufSegmentNoloadEnd;
|
||||
. = _hvqbufSegmentBssEnd;
|
||||
#endif
|
||||
|
||||
BEGIN_SEG(main, .) SUBALIGN(16)
|
||||
{
|
||||
BUILD_DIR/asm/entry.o(.text);
|
||||
|
||||
BUILD_DIR/mainseg.o(.text);
|
||||
BUILD_DIR/src/game*.o(.text);
|
||||
#ifdef HVQM
|
||||
BUILD_DIR/src/hvqm*.o(.text);
|
||||
#endif
|
||||
#ifdef UNF
|
||||
BUILD_DIR/src/usb*.o(.text);
|
||||
#endif
|
||||
BUILD_DIR/src/audio*.o(.text);
|
||||
*/libultra_rom.a:*.o(.text);
|
||||
*/libnustd.a:*.o(.text);
|
||||
*/libgcc.a:*.o(.text);
|
||||
#ifdef GZIP
|
||||
*/libz.a:*.o(.text);
|
||||
#endif
|
||||
#ifdef HVQM
|
||||
*/libhvqm2.a:*.o(.text);
|
||||
#endif
|
||||
|
||||
BUILD_DIR/lib/rsp.o(.text);
|
||||
lib/PR/hvqm/hvqm2sp1.o(.text);
|
||||
|
||||
/* data */
|
||||
BUILD_DIR/mainseg.o(.*data*);
|
||||
BUILD_DIR/src/game*.o(.*data*);
|
||||
#ifdef UNF
|
||||
BUILD_DIR/src/usb*.o(.*data*);
|
||||
#endif
|
||||
BUILD_DIR/src/audio*.o(.*data*);
|
||||
#ifdef GZIP
|
||||
*/libz.a:*.o(.*data*);
|
||||
#endif
|
||||
*/libultra_rom.a:*.o(.*data*);
|
||||
#ifdef HVQM
|
||||
*/libhvqm2.a:*.o(.*data*);
|
||||
#endif
|
||||
|
||||
BUILD_DIR/lib/rsp.o(.data*);
|
||||
#ifdef HVQM
|
||||
@@ -141,9 +165,16 @@ SECTIONS
|
||||
#endif
|
||||
|
||||
/* rodata */
|
||||
BUILD_DIR/mainseg.o(.rodata*);
|
||||
BUILD_DIR/src/game*.o(.rodata*);
|
||||
#ifdef UNF
|
||||
BUILD_DIR/src/usb*.o(.rodata*);
|
||||
#endif
|
||||
BUILD_DIR/src/audio*.o(.rodata*);
|
||||
*/libultra_rom.a:*.o(.rodata*);
|
||||
*/libgcc.a:*.o(.rodata*);
|
||||
#ifdef GZIP
|
||||
*/libz.a:*.o(.rodata*);
|
||||
#endif
|
||||
|
||||
BUILD_DIR/lib/rsp.o(.rodata*);
|
||||
#ifdef HVQM
|
||||
@@ -153,41 +184,55 @@ SECTIONS
|
||||
END_SEG(main)
|
||||
BEGIN_NOLOAD(main)
|
||||
{
|
||||
BUILD_DIR/mainseg.o(.*bss*);
|
||||
BUILD_DIR/src/game*.o(.*bss*);
|
||||
#ifdef HVQM
|
||||
BUILD_DIR/src/hvqm*.o(.*bss*);
|
||||
#endif
|
||||
#ifdef UNF
|
||||
BUILD_DIR/src/usb*.o(.*bss*);
|
||||
#endif
|
||||
BUILD_DIR/src/audio*.o(.*bss*);
|
||||
#ifdef GZIP
|
||||
BUILD_DIR/src/gzip*.o(.bss*);
|
||||
#endif
|
||||
BUILD_DIR/src/audio*.o(.*bss*);
|
||||
*/libultra_rom.a:*.o(COMMON);
|
||||
*/libultra_rom.a:*.o(.scommon);
|
||||
*/libultra_rom.a:*.o(.*bss*);
|
||||
#ifdef HVQM
|
||||
*/libhvqm2.a:*.o(.bss*);
|
||||
#endif
|
||||
#ifdef GZIP
|
||||
*/libz.a:*.o(.bss*);
|
||||
#endif
|
||||
. = ALIGN(0x8);
|
||||
}
|
||||
END_NOLOAD(main)
|
||||
_mainSegmentNoloadSizeLo = SIZEOF (.main.noload) & 0xffff;
|
||||
_mainSegmentNoloadSizeHi = SIZEOF (.main.noload) >> 16;
|
||||
|
||||
/*ASSERT((. <= SEG_ENGINE), "Error: main segment extended into engine.")*/
|
||||
|
||||
. = _mainSegmentNoloadEnd;
|
||||
. = _mainSegmentBssEnd;
|
||||
|
||||
BEGIN_SEG(engine, .)
|
||||
{
|
||||
BUILD_DIR/engineseg.o(.text);
|
||||
BUILD_DIR/src/engine*.o(.text);
|
||||
/* data */
|
||||
BUILD_DIR/engineseg.o(.data*);
|
||||
BUILD_DIR/engineseg.o(.sdata*);
|
||||
BUILD_DIR/src/engine*.o(.data*);
|
||||
BUILD_DIR/src/engine*.o(.sdata*);
|
||||
/* rodata */
|
||||
BUILD_DIR/engineseg.o(.rodata*);
|
||||
BUILD_DIR/src/engine*.o(.rodata*);
|
||||
}
|
||||
END_SEG(engine)
|
||||
BEGIN_NOLOAD(engine)
|
||||
{
|
||||
BUILD_DIR/engineseg.o(.bss*);
|
||||
BUILD_DIR/src/engine*.o(.bss*);
|
||||
. = ALIGN(0x100);
|
||||
}
|
||||
END_NOLOAD(engine)
|
||||
|
||||
/*ASSERT((. <= SEG_FRAMEBUFFERS), "Error: engine segment extended into framebuffers.")*/
|
||||
|
||||
. = _engineSegmentNoloadEnd;
|
||||
. = _engineSegmentBssEnd;
|
||||
BEGIN_NOLOAD(framebuffers)
|
||||
{
|
||||
BUILD_DIR/src/buffers/framebuffers.o(.bss*);
|
||||
@@ -254,11 +299,42 @@ SECTIONS
|
||||
BUILD_DIR/src/menu*.o(.text);
|
||||
BUILD_DIR/src/menu*.o(.data*);
|
||||
BUILD_DIR/src/menu*.o(.rodata*);
|
||||
#ifdef GODDARD
|
||||
BUILD_DIR/libgoddard.a:*.o(.text);
|
||||
/* goddard subsystem data */
|
||||
BUILD_DIR/libgoddard.a:gd_main.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:draw_objects.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:objects.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:particles.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:dynlist_proc.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:debug_utils.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:joints.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:shape_helper.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:renderer.o(.data*);
|
||||
/* goddard subsystem rodata */
|
||||
BUILD_DIR/libgoddard.a:gd_main.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:gd_memory.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:draw_objects.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:objects.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:skin_movement.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:particles.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:dynlist_proc.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:old_menu.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:debug_utils.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:joints.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:skin.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:gd_math.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:shape_helper.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:renderer.o(.rodata*);
|
||||
#endif
|
||||
}
|
||||
END_SEG(goddard)
|
||||
BEGIN_NOLOAD(goddard)
|
||||
{
|
||||
BUILD_DIR/src/menu*.o(.bss*);
|
||||
#ifdef GODDARD
|
||||
BUILD_DIR/libgoddard.a:*.o(.bss*);
|
||||
#endif
|
||||
}
|
||||
END_NOLOAD(goddard)
|
||||
|
||||
@@ -282,6 +358,30 @@ SECTIONS
|
||||
YAY0_SEG(debug_level_select, 0x07000000)
|
||||
YAY0_SEG(title_screen_bg, 0x0A000000)
|
||||
|
||||
#ifdef GODDARD
|
||||
BEGIN_SEG(gd_dynlists, 0x04000000)
|
||||
{
|
||||
BUILD_DIR/libgoddard.a:dynlist_test_cube.o(.data);
|
||||
BUILD_DIR/libgoddard.a:dynlist_unused.o(.data);
|
||||
BUILD_DIR/libgoddard.a:dynlist_mario_face.o(.data);
|
||||
BUILD_DIR/libgoddard.a:dynlists_mario_eyes.o(.data);
|
||||
BUILD_DIR/libgoddard.a:dynlists_mario_eyebrows_mustache.o(.data);
|
||||
BUILD_DIR/libgoddard.a:dynlist_mario_master.o(.data);
|
||||
BUILD_DIR/libgoddard.a:anim_mario_mustache_right.o(.data);
|
||||
BUILD_DIR/libgoddard.a:anim_mario_mustache_left.o(.data);
|
||||
BUILD_DIR/libgoddard.a:anim_mario_lips_1.o(.data);
|
||||
BUILD_DIR/libgoddard.a:anim_mario_lips_2.o(.data);
|
||||
BUILD_DIR/libgoddard.a:anim_mario_eyebrows_1.o(.data);
|
||||
BUILD_DIR/libgoddard.a:anim_group_1.o(.data);
|
||||
BUILD_DIR/libgoddard.a:anim_group_2.o(.data);
|
||||
BUILD_DIR/libgoddard.a:dynlist_test_cube.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:dynlist_unused.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:*.o(.data);
|
||||
BUILD_DIR/libgoddard.a:*.o(.rodata);
|
||||
}
|
||||
END_SEG(gd_dynlists)
|
||||
#endif
|
||||
|
||||
gMainLevels = __romPos;
|
||||
|
||||
BEGIN_SEG(menu, 0x14000000)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "game/profiler.h"
|
||||
#include "game/save_file.h"
|
||||
#include "game/sound_init.h"
|
||||
#include "goddard/renderer.h"
|
||||
#include "geo_layout.h"
|
||||
#include "graph_node.h"
|
||||
#include "level_script.h"
|
||||
@@ -280,6 +281,18 @@ static void level_cmd_load_yay0(void) {
|
||||
}
|
||||
|
||||
static void level_cmd_load_mario_head(void) {
|
||||
#ifdef GODDARD
|
||||
// TODO: Fix these hardcoded sizes
|
||||
void *addr = main_pool_alloc(DOUBLE_SIZE_ON_64_BIT(0xE1000), MEMORY_POOL_LEFT);
|
||||
if (addr != NULL) {
|
||||
gdm_init(addr, DOUBLE_SIZE_ON_64_BIT(0xE1000));
|
||||
gd_add_to_heap(gZBuffer, sizeof(gZBuffer)); // 0x25800
|
||||
gd_add_to_heap(gFrameBuffer0, 3 * sizeof(gFrameBuffer0)); // 0x70800
|
||||
gdm_setup();
|
||||
gdm_maketestdl(CMD_GET(s16, 2));
|
||||
} else {
|
||||
}
|
||||
#endif
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "engine/math_util.h"
|
||||
#include "envfx_snow.h"
|
||||
#include "game_init.h"
|
||||
#include "goddard/renderer.h"
|
||||
#include "interaction.h"
|
||||
#include "level_update.h"
|
||||
#include "mario_misc.h"
|
||||
@@ -77,6 +78,29 @@ struct GraphNodeObject gMirrorMario; // copy of Mario's geo node for drawing mi
|
||||
// (message NPC related things, the Mario head geo, and Mario geo
|
||||
// functions)
|
||||
|
||||
#ifdef GODDARD
|
||||
/**
|
||||
* Geo node script that draws Mario's head on the title screen.
|
||||
*/
|
||||
Gfx *geo_draw_mario_head_goddard(s32 callContext, struct GraphNode *node, Mat4 *c) {
|
||||
Gfx *gfx = NULL;
|
||||
s16 sfx = 0;
|
||||
struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node;
|
||||
UNUSED Mat4 *transform = c;
|
||||
|
||||
if (callContext == GEO_CONTEXT_RENDER) {
|
||||
if (gPlayer1Controller->controllerData != NULL && !gWarpTransition.isActive) {
|
||||
gd_copy_p1_contpad(gPlayer1Controller->controllerData);
|
||||
}
|
||||
gfx = (Gfx *) PHYSICAL_TO_VIRTUAL(gdm_gettestdl(asGenerated->parameter));
|
||||
gGoddardVblankCallback = gd_vblank;
|
||||
sfx = gd_sfx_to_play();
|
||||
play_menu_sounds(sfx);
|
||||
}
|
||||
return gfx;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void toad_message_faded(void) {
|
||||
if (gCurrentObject->oDistanceToMario > 700.0f) {
|
||||
gCurrentObject->oToadMessageRecentlyTalked = FALSE;
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
extern struct GraphNodeObject gMirrorMario;
|
||||
extern struct MarioBodyState gBodyStates[2];
|
||||
|
||||
#ifdef GODDARD
|
||||
Gfx *geo_draw_mario_head_goddard(s32 callContext, struct GraphNode *node, Mat4 *c);
|
||||
#endif
|
||||
void bhv_toad_message_loop(void);
|
||||
void bhv_toad_message_init(void);
|
||||
void bhv_unlock_door_star_init(void);
|
||||
|
||||
40
src/goddard/bad_declarations.h
Normal file
40
src/goddard/bad_declarations.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef GD_BAD_DECLARATIONS_H
|
||||
#define GD_BAD_DECLARATIONS_H
|
||||
|
||||
#include "gd_types.h"
|
||||
|
||||
/**
|
||||
* @file bad_declarations.h
|
||||
*
|
||||
* Match incorrect type promotion for two declared functions.
|
||||
*
|
||||
* There is an issue with the compiled code for these function calls in files
|
||||
* outside of the files in which they were defined: instead of passing f32's,
|
||||
* the caller passes f64's.
|
||||
*
|
||||
* The only possible reason I can come up with for this behavior is that
|
||||
* goddard only declared (not prototyped) his functions in the headers,
|
||||
* and didn't include the header in the function's defining .c file.
|
||||
* (Even IDO 5.3 cares about illegal promotion of types!) This results in
|
||||
* default argument promotion, which is incorrect in this case.
|
||||
*
|
||||
* Since that's an awful practice to emulate, include this file (first!) to prevent
|
||||
* the proper prototypes of these functions from being seen by files with the
|
||||
* the incorrectly compiled calls.
|
||||
*/
|
||||
|
||||
#ifndef AVOID_UB
|
||||
|
||||
#define GD_USE_BAD_DECLARATIONS
|
||||
|
||||
/* shape_helper.h */
|
||||
extern struct ObjFace *make_face_with_colour();
|
||||
/* should be: make_face_with_colour(f32, f32, f32) */
|
||||
|
||||
/* old_menu.h */
|
||||
extern struct ObjLabel *make_label();
|
||||
/* should be: make_label(struct ObjValPtr *, char *, s32, f32, f32, f32) */
|
||||
|
||||
#endif /* !AVOID_UB */
|
||||
|
||||
#endif // GD_BAD_DECLARATIONS_H
|
||||
954
src/goddard/debug_utils.c
Normal file
954
src/goddard/debug_utils.c
Normal file
File diff suppressed because it is too large
Load Diff
93
src/goddard/debug_utils.h
Normal file
93
src/goddard/debug_utils.h
Normal file
@@ -0,0 +1,93 @@
|
||||
#ifndef GD_DEBUGGING_UTILS_H
|
||||
#define GD_DEBUGGING_UTILS_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
|
||||
#define GD_NUM_MEM_TRACKERS 32
|
||||
#define GD_NUM_TIMERS 32
|
||||
|
||||
// structs
|
||||
struct MemTracker {
|
||||
/* 0x00 */ const char *name; // name (used as an identifier)
|
||||
/* 0x04 */ f32 begin; // used heap space (in bytes) before allocating memory
|
||||
/* 0x08 */ f32 end; // used heap space (in bytes) after allocating memory
|
||||
/* 0x0C */ f32 total; // total memory (in bytes) allocated between all start_memtracker/stop_memtracker calls
|
||||
};
|
||||
|
||||
struct GdTimer {
|
||||
/* 0x00 */ s32 start; // in cycles
|
||||
/* 0x04 */ s32 end; // in cycles
|
||||
/* 0x08 */ s32 total; // in cycles
|
||||
/* 0x0C */ f32 unused0C;
|
||||
/* 0x10 */ f32 scaledTotal; // total / sTimeScaleFactor (1.0f) Unused function modified value
|
||||
/* 0x14 */ f32 prevScaledTotal;
|
||||
/* 0x18 */ const char *name;
|
||||
/* 0x1C */ s32 gadgetColourNum; // color of gadget that represents timer?
|
||||
/* 0x20 */ s32 resetCount;
|
||||
}; // sizeof = 0x24
|
||||
|
||||
union PrintVal {
|
||||
f32 f;
|
||||
s32 i;
|
||||
s64 pad;
|
||||
};
|
||||
|
||||
/* based on fields set in gd_fopen; gd_malloc_perm(84) for size */
|
||||
struct GdFile {
|
||||
/* 0x00 */ u8 pad00[4];
|
||||
/* 0x04 */ u32 pos;
|
||||
/* 0x08 */ s8 *stream;
|
||||
/* Known Flags for +0xC field:
|
||||
** 1 : write mode
|
||||
** 2 : binary mode
|
||||
** 4 : eof */
|
||||
/* 0x0C */ u32 flags;
|
||||
/* 0x10 */ u8 pad10[0x50-0x10];
|
||||
/* 0x50 */ u32 size;
|
||||
}; /* sizeof() = 0x54 */
|
||||
|
||||
// bss
|
||||
extern u8 *gGdStreamBuffer;
|
||||
|
||||
// functions
|
||||
extern struct MemTracker *start_memtracker(const char *);
|
||||
extern u32 stop_memtracker(const char *);
|
||||
extern void remove_all_memtrackers(void);
|
||||
extern struct MemTracker *get_memtracker_by_index(s32);
|
||||
extern void print_all_memtrackers(void);
|
||||
extern void print_all_timers(void);
|
||||
extern void deactivate_timing(void);
|
||||
extern void activate_timing(void);
|
||||
extern void remove_all_timers(void);
|
||||
extern struct GdTimer *get_timer(const char *);
|
||||
extern struct GdTimer *get_timernum(s32);
|
||||
extern void start_timer(const char *);
|
||||
extern void restart_timer(const char *);
|
||||
extern void split_timer(const char *);
|
||||
extern void stop_timer(const char *);
|
||||
extern f32 get_scaled_timer_total(const char *);
|
||||
extern void fatal_print(const char *) NORETURN;
|
||||
extern void fatal_printf(const char *, ...) NORETURN;
|
||||
extern void imin(const char *);
|
||||
extern void imout(void);
|
||||
extern f32 gd_rand_float(void);
|
||||
extern s32 gd_atoi(const char *);
|
||||
extern f64 gd_lazy_atof(const char *, u32 *);
|
||||
extern char *sprint_val_withspecifiers(char *, union PrintVal, char *);
|
||||
extern void gd_strcpy(char *, const char *);
|
||||
extern char *gd_strdup(const char *);
|
||||
extern u32 gd_strlen(const char *);
|
||||
extern char *gd_strcat(char *, const char *);
|
||||
extern s32 gd_str_not_equal(const char *, const char *);
|
||||
extern s32 gd_str_contains(const char *, const char *);
|
||||
extern s32 gd_feof(struct GdFile *);
|
||||
extern struct GdFile *gd_fopen(const char *, const char *);
|
||||
extern s32 gd_fread(s8 *, s32, s32, struct GdFile *);
|
||||
extern void gd_fclose(struct GdFile *);
|
||||
extern u32 gd_get_file_size(struct GdFile *);
|
||||
extern s32 gd_fread_line(char *, u32, struct GdFile *);
|
||||
|
||||
#endif // GD_DEBUGGING_UTILS_H
|
||||
1542
src/goddard/draw_objects.c
Normal file
1542
src/goddard/draw_objects.c
Normal file
File diff suppressed because it is too large
Load Diff
52
src/goddard/draw_objects.h
Normal file
52
src/goddard/draw_objects.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef GD_DRAW_OBJECTS_H
|
||||
#define GD_DRAW_OBJECTS_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
|
||||
// TODO: make this an enum without causing bss reordering
|
||||
#define COLOUR_BLACK 0
|
||||
#define COLOUR_WHITE 1
|
||||
#define COLOUR_RED 2
|
||||
#define COLOUR_GREEN 3
|
||||
#define COLOUR_BLUE 4
|
||||
#define COLOUR_GRAY 5
|
||||
#define COLOUR_DARK_GRAY 6
|
||||
#define COLOUR_DARK_BLUE 7
|
||||
#define COLOUR_YELLOW 8
|
||||
#define COLOUR_PINK 9
|
||||
#define COLOUR_BLACK2 10 // same as COLOUR_BLACK
|
||||
|
||||
// data
|
||||
extern struct ObjCamera *gViewUpdateCamera;
|
||||
|
||||
// bss
|
||||
// this is unused, but it needs to be declared before gGdLightGroup
|
||||
extern u8 gUnref_801B9B30[0x88];
|
||||
extern struct ObjGroup *gGdLightGroup; // ObjGroup* of ObjLights
|
||||
|
||||
// functions
|
||||
void draw_light(struct ObjLight *light);
|
||||
void draw_material(struct ObjMaterial *mtl);
|
||||
struct GdColour *gd_get_colour(s32 idx);
|
||||
void draw_face(struct ObjFace *face);
|
||||
void draw_label(struct ObjLabel *label);
|
||||
void draw_net(struct ObjNet *self);
|
||||
void draw_gadget(struct ObjGadget *gdgt);
|
||||
void draw_camera(struct ObjCamera *cam);
|
||||
void world_pos_to_screen_coords(struct GdVec3f *pos, struct ObjCamera *cam, struct ObjView *view);
|
||||
void draw_nothing(UNUSED struct GdObj *nop);
|
||||
void draw_particle(struct GdObj *obj);
|
||||
void draw_bone(struct GdObj *obj);
|
||||
void draw_joint(struct GdObj *obj);
|
||||
void draw_group(struct ObjGroup *grp);
|
||||
void draw_plane(struct GdObj *obj);
|
||||
void apply_obj_draw_fn(struct GdObj *obj);
|
||||
void create_gddl_for_shapes(struct ObjGroup *grp);
|
||||
void map_face_materials(struct ObjGroup *faces, struct ObjGroup *mtls);
|
||||
void map_vertices(struct ObjGroup *facegrp, struct ObjGroup *vtxgrp);
|
||||
void update_view(struct ObjView *view);
|
||||
|
||||
#endif // GD_DRAW_OBJECTS_H
|
||||
3140
src/goddard/dynlist_proc.c
Normal file
3140
src/goddard/dynlist_proc.c
Normal file
File diff suppressed because it is too large
Load Diff
99
src/goddard/dynlist_proc.h
Normal file
99
src/goddard/dynlist_proc.h
Normal file
@@ -0,0 +1,99 @@
|
||||
#ifndef GD_DYNLIST_PROCESSOR_H
|
||||
#define GD_DYNLIST_PROCESSOR_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
|
||||
// types
|
||||
/// @name DynObjName Type
|
||||
/// @{
|
||||
/// A new type for identification of `GdObj`s in the dynamic object list.
|
||||
typedef void *DynObjName;
|
||||
/// Macros for casting between types of names,
|
||||
/// as the name can be either a number or a string.
|
||||
/// @{
|
||||
#define DynNameAsStr(name) ((char *)(name))
|
||||
#define DynNameAsInt(name) ((u32)(uintptr_t)(name))
|
||||
#define AsDynName(unk) ((DynObjName)(unk))
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// parameters types for `d_set_parm_ptr()`
|
||||
enum DParmPtr {
|
||||
PARM_PTR_OBJ_VTX = 1, ///< parameter is the index of a vertex to add to an `ObjFace`
|
||||
PARM_PTR_CHAR = 5 ///< parameter is a `char *`
|
||||
};
|
||||
|
||||
/// parameters for `d_set_parm_f()`
|
||||
enum DParmF {
|
||||
PARM_F_ALPHA = 1, ///< Set the alpha value for an `ObjShape` or `ObjVertex`
|
||||
PARM_F_RANGE_MIN = 2, ///< Set the left range for an `ObjGadget`
|
||||
PARM_F_RANGE_MAX = 3, ///< Set the right range for an `ObjGadget`
|
||||
PARM_F_VARVAL = 6 ///< Set the float variable value union in an `ObjGadget`
|
||||
};
|
||||
|
||||
/// `d_makeobj()` object types
|
||||
enum DObjTypes {
|
||||
D_CAR_DYNAMICS = 0,
|
||||
D_NET = 1,
|
||||
D_JOINT = 2,
|
||||
D_ANOTHER_JOINT = 3,
|
||||
D_CAMERA = 4,
|
||||
D_VERTEX = 5,
|
||||
D_FACE = 6,
|
||||
D_PLANE = 7,
|
||||
D_BONE = 8,
|
||||
D_MATERIAL = 9,
|
||||
D_SHAPE = 10,
|
||||
D_GADGET = 11,
|
||||
D_LABEL = 12,
|
||||
D_VIEW = 13,
|
||||
D_ANIMATOR = 14,
|
||||
D_DATA_GRP = 15, ///< An `ObjGroup` that links to raw vertex or face data
|
||||
D_PARTICLE = 16,
|
||||
D_LIGHT = 17,
|
||||
D_GROUP = 18
|
||||
};
|
||||
|
||||
// functions
|
||||
void d_stash_dynobj(void);
|
||||
void d_unstash_dynobj(void);
|
||||
void reset_dynlist(void);
|
||||
struct GdObj *proc_dynlist(struct DynList *dylist);
|
||||
void d_set_name_suffix(char *str);
|
||||
struct GdObj *d_makeobj(enum DObjTypes type, DynObjName name);
|
||||
void d_set_shapeptrptr(struct ObjShape **shpPtrptr);
|
||||
struct GdObj *d_use_obj(DynObjName name);
|
||||
void set_cur_dynobj(struct GdObj *obj);
|
||||
void d_start_group(DynObjName name);
|
||||
void d_end_group(DynObjName name);
|
||||
void d_use_integer_names(s32 isIntBool);
|
||||
void d_set_init_pos(f32 x, f32 y, f32 z);
|
||||
void d_get_init_pos(struct GdVec3f *dst);
|
||||
void d_get_init_rot(struct GdVec3f *dst);
|
||||
void d_set_rel_pos(f32 x, f32 y, f32 z);
|
||||
void d_get_rel_pos(struct GdVec3f *dst);
|
||||
struct ObjGroup *d_get_att_objgroup(void);
|
||||
void d_get_scale(struct GdVec3f *dst);
|
||||
void d_set_world_pos(f32 x, f32 y, f32 z);
|
||||
void d_get_world_pos(struct GdVec3f *dst);
|
||||
void d_set_scale(f32 x, f32 y, f32 z);
|
||||
void d_add_valptr(DynObjName name, u32 vflags, enum ValPtrType type, size_t offset);
|
||||
void d_add_valproc(union ObjVarVal * (*)(union ObjVarVal *, union ObjVarVal));
|
||||
void d_set_flags(s32 flags);
|
||||
void d_set_parm_f(enum DParmF param, f32 val);
|
||||
void d_set_parm_ptr(enum DParmPtr param, void *ptr);
|
||||
void d_set_obj_draw_flag(enum ObjDrawingFlags flag);
|
||||
void d_set_type(s32 type);
|
||||
void d_set_colour_num(s32 colornum);
|
||||
void d_set_diffuse(f32 r, f32 g, f32 b);
|
||||
struct GdBoundingBox* d_get_bounding_box(void);
|
||||
void d_get_matrix(Mat4f *dst);
|
||||
Mat4f *d_get_rot_mtx_ptr(void);
|
||||
void d_set_i_matrix(Mat4f *src);
|
||||
Mat4f *d_get_matrix_ptr(void);
|
||||
Mat4f *d_get_i_mtx_ptr(void);
|
||||
f32 d_calc_world_dist_btwn(struct GdObj *obj1, struct GdObj *obj2);
|
||||
|
||||
#endif // GD_DYNLIST_PROCESSOR_H
|
||||
2328
src/goddard/dynlists/anim_group_1.c
Normal file
2328
src/goddard/dynlists/anim_group_1.c
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user