Add goddard as togglable and stop linking segments seperately
This commit is contained in:
1 parent
359ba19531
commit
ea6c7d60e1
61 files changed
+28019
-67
No files matched your search
@@ -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)))
|
||||
|
||||
+17
-21
@@ -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)
|
||||
|
||||
+1
-1
@@ -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(),
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,954 @@
|
||||
#include <PR/ultratypes.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "debug_utils.h"
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
#include "renderer.h"
|
||||
#include "draw_objects.h"
|
||||
|
||||
// types
|
||||
struct UnkBufThing {
|
||||
/* 0x00 */ s32 size;
|
||||
/* 0x04 */ char name[0x40];
|
||||
}; /* sizeof = 0x44 */
|
||||
|
||||
// data
|
||||
static s32 sNumRoutinesInStack = 0; // @ 801A8280
|
||||
static s32 sTimerGadgetColours[7] = {
|
||||
COLOUR_RED,
|
||||
COLOUR_WHITE,
|
||||
COLOUR_GREEN,
|
||||
COLOUR_BLUE,
|
||||
COLOUR_GRAY,
|
||||
COLOUR_YELLOW,
|
||||
COLOUR_PINK
|
||||
};
|
||||
static s32 sNumActiveMemTrackers = 0; // @ 801A82A0
|
||||
static u32 sPrimarySeed = 0x12345678; // @ 801A82A4
|
||||
static u32 sSecondarySeed = 0x58374895; // @ 801A82A8
|
||||
|
||||
// bss
|
||||
u8 *gGdStreamBuffer; // @ 801BA190
|
||||
static const char *sRoutineNames[64]; // @ 801BA198
|
||||
static s32 sTimingActive; // @ 801BA298
|
||||
static struct GdTimer sTimers[GD_NUM_TIMERS]; // @ 801BA2A0
|
||||
static struct MemTracker sMemTrackers[GD_NUM_MEM_TRACKERS]; // @ 801BA720
|
||||
static struct MemTracker *sActiveMemTrackers[16]; // @ 801BA920
|
||||
|
||||
/*
|
||||
* Memtrackers
|
||||
*
|
||||
* These are used to monitor how much heap memory is being used by certain
|
||||
* operations.
|
||||
* To create a memtracker, call new_memtracker with a unique name.
|
||||
* To record the amount of memory used by a certain allocation, call
|
||||
* start_memtracker before allocating memory, and call stop_memtracker after
|
||||
* allocating memory.
|
||||
* The memtracker keeps track of the memory allocated between a single
|
||||
* start_memtracker/stop_memtracker pair as well as the total memory allocated
|
||||
* of all start_memtracker/stop_memtracker pairs.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a new memtracker with the specified name
|
||||
*/
|
||||
struct MemTracker *new_memtracker(const char *name) {
|
||||
s32 i;
|
||||
struct MemTracker *tracker = NULL;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sMemTrackers); i++) {
|
||||
if (sMemTrackers[i].name == NULL) {
|
||||
sMemTrackers[i].name = name;
|
||||
tracker = &sMemTrackers[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (tracker != NULL) {
|
||||
tracker->total = 0.0f;
|
||||
}
|
||||
|
||||
return tracker;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the memtracker with the specified name, or NULL if it
|
||||
* does not exist
|
||||
*/
|
||||
struct MemTracker *get_memtracker(const char *name) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sMemTrackers); i++) {
|
||||
if (sMemTrackers[i].name != NULL) {
|
||||
if (gd_str_not_equal(sMemTrackers[i].name, name) == FALSE) {
|
||||
return &sMemTrackers[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Records the amount of heap usage before allocating memory.
|
||||
*/
|
||||
struct MemTracker *start_memtracker(const char *name) {
|
||||
struct MemTracker *tracker = get_memtracker(name);
|
||||
|
||||
// Create one if it doesn't exist
|
||||
if (tracker == NULL) {
|
||||
tracker = new_memtracker(name);
|
||||
if (tracker == NULL) {
|
||||
fatal_printf("Unable to make memtracker '%s'", name);
|
||||
}
|
||||
}
|
||||
|
||||
tracker->begin = (f32) get_alloc_mem_amt();
|
||||
if (sNumActiveMemTrackers >= ARRAY_COUNT(sActiveMemTrackers)) {
|
||||
fatal_printf("too many memtracker calls");
|
||||
}
|
||||
|
||||
sActiveMemTrackers[sNumActiveMemTrackers++] = tracker;
|
||||
|
||||
return tracker;
|
||||
}
|
||||
|
||||
/* @ 23ABE0 -> 23AC28; not called; orig name: Unknown8018C410 */
|
||||
void print_most_recent_memtracker_name(void) {
|
||||
gd_printf("%s\n", sActiveMemTrackers[sNumActiveMemTrackers - 1]->name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Records the amount of heap usage after allocating memory.
|
||||
*/
|
||||
u32 stop_memtracker(const char *name) {
|
||||
struct MemTracker *tracker;
|
||||
|
||||
if (sNumActiveMemTrackers-- < 0) {
|
||||
fatal_printf("bad mem tracker count");
|
||||
}
|
||||
|
||||
tracker = get_memtracker(name);
|
||||
if (tracker == NULL) {
|
||||
fatal_printf("memtracker '%s' not found", name);
|
||||
}
|
||||
|
||||
tracker->end = get_alloc_mem_amt();
|
||||
tracker->total += (tracker->end - tracker->begin);
|
||||
|
||||
return (u32) tracker->total;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys all memtrackers
|
||||
*/
|
||||
void remove_all_memtrackers(void) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sMemTrackers); i++) {
|
||||
sMemTrackers[i].name = NULL;
|
||||
sMemTrackers[i].begin = 0.0f;
|
||||
sMemTrackers[i].end = 0.0f;
|
||||
sMemTrackers[i].total = 0.0f;
|
||||
}
|
||||
|
||||
#ifdef AVOID_UB
|
||||
sNumActiveMemTrackers = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a memtracker by index rather than name
|
||||
*/
|
||||
struct MemTracker *get_memtracker_by_index(s32 index) {
|
||||
return &sMemTrackers[index];
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the total memory allocated for each memtracker
|
||||
*/
|
||||
void print_all_memtrackers(void) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sMemTrackers); i++) {
|
||||
if (sMemTrackers[i].name != NULL) {
|
||||
gd_printf("'%s' = %dk\n", sMemTrackers[i].name, (s32)(sMemTrackers[i].total / 1024.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Timers
|
||||
*
|
||||
* These are used to profile the code by measuring the time it takes to perform
|
||||
* operations.
|
||||
* To record elapsed time, call start_timer, perform some operations, then call stop_timer.
|
||||
* You can also use restart_timer/split_timer instead of start_timer/stop_timer
|
||||
* to keep a running total.
|
||||
*/
|
||||
|
||||
/* 23AEFC -> 23AFB0; orig name: func_8018C72C */
|
||||
void print_all_timers(void) {
|
||||
s32 i;
|
||||
|
||||
gd_printf("\nTimers:\n");
|
||||
for (i = 0; i < ARRAY_COUNT(sTimers); i++) {
|
||||
if (sTimers[i].name != NULL) {
|
||||
gd_printf("'%s' = %f (%d)\n", sTimers[i].name, sTimers[i].scaledTotal,
|
||||
sTimers[i].resetCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 23AFB0 -> 23AFC8; orig name: func_8018C7E0 */
|
||||
void deactivate_timing(void) {
|
||||
sTimingActive = FALSE;
|
||||
}
|
||||
|
||||
/* 23AFC8 -> 23AFE4; orig name: func_8018C7F8 */
|
||||
void activate_timing(void) {
|
||||
sTimingActive = TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys all timers
|
||||
*/
|
||||
void remove_all_timers(void) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sTimers); i++) {
|
||||
sTimers[i].name = NULL;
|
||||
sTimers[i].total = 0;
|
||||
sTimers[i].unused0C = 0.0f;
|
||||
sTimers[i].scaledTotal = 0.0f;
|
||||
sTimers[i].prevScaledTotal = 0.0f;
|
||||
sTimers[i].gadgetColourNum = sTimerGadgetColours[(u32) i % 7];
|
||||
sTimers[i].resetCount = 0;
|
||||
}
|
||||
activate_timing();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new timer with the specified name
|
||||
*/
|
||||
static struct GdTimer *new_timer(const char *name) {
|
||||
s32 i;
|
||||
struct GdTimer *timer = NULL;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sTimers); i++) {
|
||||
if (sTimers[i].name == NULL) {
|
||||
sTimers[i].name = name;
|
||||
timer = &sTimers[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return timer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the timer with the specified name, or NULL if it does not exist.
|
||||
*/
|
||||
struct GdTimer *get_timer(const char *timerName) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sTimers); i++) {
|
||||
if (sTimers[i].name != NULL) {
|
||||
if (gd_str_not_equal(sTimers[i].name, timerName) == FALSE) {
|
||||
return &sTimers[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the timer with the specified name, or aborts the program if it does
|
||||
* not exist.
|
||||
*/
|
||||
static struct GdTimer *get_timer_checked(const char *timerName) {
|
||||
struct GdTimer *timer;
|
||||
|
||||
timer = get_timer(timerName);
|
||||
if (timer == NULL) {
|
||||
fatal_printf("Timer '%s' not found", timerName);
|
||||
}
|
||||
|
||||
return timer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a timer by index rather than name
|
||||
*/
|
||||
struct GdTimer *get_timernum(s32 index) {
|
||||
if (index >= ARRAY_COUNT(sTimers)) {
|
||||
fatal_printf("get_timernum(): Timer number %d out of range (MAX %d)", index, ARRAY_COUNT(sTimers));
|
||||
}
|
||||
|
||||
return &sTimers[index];
|
||||
}
|
||||
|
||||
/* 23B350 -> 23B42C; orig name: func_8018CB80 */
|
||||
void split_timer_ptr(struct GdTimer *timer) {
|
||||
if (!sTimingActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
timer->end = gd_get_ostime();
|
||||
timer->total += timer->end - timer->start;
|
||||
|
||||
if (timer->total < 0) {
|
||||
timer->total = 0;
|
||||
}
|
||||
|
||||
timer->scaledTotal = ((f32) timer->total) / get_time_scale();
|
||||
timer->start = timer->end;
|
||||
}
|
||||
|
||||
/* 23B42C -> 23B49C; not called; orig name: Unknown8018CC5C */
|
||||
void split_all_timers(void) {
|
||||
s32 i;
|
||||
struct GdTimer *timer;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sTimers); i++) {
|
||||
timer = get_timernum(i);
|
||||
if (timer->name != NULL) {
|
||||
split_timer_ptr(timer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused - records the start time for all timers
|
||||
*/
|
||||
void start_all_timers(void) {
|
||||
s32 i;
|
||||
struct GdTimer *timer;
|
||||
|
||||
if (!sTimingActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sTimers); i++) {
|
||||
timer = get_timernum(i);
|
||||
|
||||
if (timer->name != NULL) {
|
||||
timer->start = gd_get_ostime();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Records the current time before performing an operation
|
||||
*/
|
||||
void start_timer(const char *name) {
|
||||
struct GdTimer *timer;
|
||||
|
||||
if (!sTimingActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create timer if it does not exist.
|
||||
timer = get_timer(name);
|
||||
if (timer == NULL) {
|
||||
timer = new_timer(name);
|
||||
if (timer == NULL) {
|
||||
fatal_printf("start_timer(): Unable to make timer '%s'", name);
|
||||
}
|
||||
}
|
||||
|
||||
timer->prevScaledTotal = timer->scaledTotal;
|
||||
timer->start = gd_get_ostime();
|
||||
timer->total = 0;
|
||||
timer->resetCount = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Records the current time before performing an operation
|
||||
*/
|
||||
void restart_timer(const char *name) {
|
||||
struct GdTimer *timer;
|
||||
|
||||
if (!sTimingActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create timer if it does not exist.
|
||||
timer = get_timer(name);
|
||||
if (timer == NULL) {
|
||||
timer = new_timer(name);
|
||||
if (timer == NULL) {
|
||||
fatal_printf("restart_timer(): Unable to make timer '%s'", name);
|
||||
}
|
||||
}
|
||||
|
||||
timer->start = gd_get_ostime();
|
||||
timer->resetCount++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Records the current time after performing an operation, adds the elapsed time
|
||||
* to the total, then restarts the timer
|
||||
*/
|
||||
void split_timer(const char *name) {
|
||||
struct GdTimer *timer;
|
||||
|
||||
if (!sTimingActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
timer = get_timer_checked(name);
|
||||
split_timer_ptr(timer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Records the current time after performing an operation
|
||||
*/
|
||||
void stop_timer(const char *name) {
|
||||
struct GdTimer *timer;
|
||||
|
||||
if (!sTimingActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
timer = get_timer_checked(name);
|
||||
timer->end = gd_get_ostime();
|
||||
timer->total += timer->end - timer->start;
|
||||
if (timer->total < 0) {
|
||||
timer->total = 0;
|
||||
}
|
||||
|
||||
timer->scaledTotal = ((f32) timer->total) / get_time_scale();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the scaled total for the specified timer
|
||||
*/
|
||||
f32 get_scaled_timer_total(const char *name) {
|
||||
struct GdTimer *timer = get_timer_checked(name);
|
||||
|
||||
return timer->scaledTotal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused - returns the raw total for the specified timer
|
||||
*/
|
||||
f32 get_timer_total(const char *name) {
|
||||
struct GdTimer *timer = get_timer_checked(name);
|
||||
|
||||
return (f32) timer->total;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Miscellaneous debug functions
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Prints the given string, prints the stack trace, and exits the program
|
||||
*/
|
||||
void fatal_print(const char *str) {
|
||||
fatal_printf(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the stack trace registered by callng imin()/imout()
|
||||
*/
|
||||
void print_stack_trace(void) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < sNumRoutinesInStack; i++) {
|
||||
gd_printf("\tIn: '%s'\n", sRoutineNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the formatted string, prints the stack trace, and exits the program
|
||||
*/
|
||||
void fatal_printf(const char *fmt, ...) {
|
||||
char cur;
|
||||
UNUSED u8 pad[4];
|
||||
va_list vl;
|
||||
|
||||
va_start(vl, fmt);
|
||||
while ((cur = *fmt++)) {
|
||||
switch (cur) {
|
||||
case '%':
|
||||
switch (cur = *fmt++) {
|
||||
case 'd':
|
||||
gd_printf("%d", va_arg(vl, s32));
|
||||
break;
|
||||
case 'f':
|
||||
gd_printf("%f", va_arg(vl, double));
|
||||
break;
|
||||
case 's':
|
||||
gd_printf("%s", va_arg(vl, char *));
|
||||
break;
|
||||
case 'c':
|
||||
gd_printf("%c", va_arg(vl, char));
|
||||
break;
|
||||
case 'x':
|
||||
gd_printf("%x", va_arg(vl, s32));
|
||||
break;
|
||||
default:
|
||||
gd_printf("%c", cur);
|
||||
}
|
||||
break;
|
||||
case '\\':
|
||||
gd_printf("\\");
|
||||
break;
|
||||
case '\n':
|
||||
gd_printf("\n");
|
||||
break;
|
||||
default:
|
||||
gd_printf("%c", cur);
|
||||
}
|
||||
}
|
||||
va_end(vl);
|
||||
|
||||
gd_printf("\n");
|
||||
print_stack_trace();
|
||||
gd_printf("\n");
|
||||
gd_exit(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* "I'm in"
|
||||
* Adds the function name to the stack trace
|
||||
*/
|
||||
void imin(const char *routine) {
|
||||
sRoutineNames[sNumRoutinesInStack++] = routine;
|
||||
sRoutineNames[sNumRoutinesInStack] = NULL; //! array bounds is checked after writing this.
|
||||
|
||||
if (sNumRoutinesInStack >= ARRAY_COUNT(sRoutineNames)) {
|
||||
fatal_printf("You're in too many routines");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* "I'm out"
|
||||
* Removes the function name from the stack trace
|
||||
*/
|
||||
void imout(void) {
|
||||
s32 i;
|
||||
|
||||
if (--sNumRoutinesInStack < 0) {
|
||||
for (i = 0; i < ARRAY_COUNT(sRoutineNames); i++) {
|
||||
if (sRoutineNames[i] != NULL) {
|
||||
gd_printf(" - %s\n", sRoutineNames[i]);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fatal_printf("imout() - imout() called too many times");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a random floating point number between 0 and 1 (inclusive)
|
||||
* TODO: figure out type of rng generator?
|
||||
*/
|
||||
f32 gd_rand_float(void) {
|
||||
u32 temp;
|
||||
u32 i;
|
||||
f32 val;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (sPrimarySeed & 0x80000000) {
|
||||
sPrimarySeed = sPrimarySeed << 1 | 1;
|
||||
} else {
|
||||
sPrimarySeed <<= 1;
|
||||
}
|
||||
}
|
||||
sPrimarySeed += 4;
|
||||
|
||||
/* Seed Switch */
|
||||
if ((sPrimarySeed ^= gd_get_ostime()) & 1) {
|
||||
temp = sPrimarySeed;
|
||||
sPrimarySeed = sSecondarySeed;
|
||||
sSecondarySeed = temp;
|
||||
}
|
||||
|
||||
val = (sPrimarySeed & 0xFFFF) / 65535.0; // 65535.0f
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reimplementation of the standard "atoi" function
|
||||
*/
|
||||
s32 gd_atoi(const char *str) {
|
||||
char cur;
|
||||
const char *origstr = str;
|
||||
s32 curval;
|
||||
s32 out = 0;
|
||||
s32 isNegative = FALSE;
|
||||
|
||||
while (TRUE) {
|
||||
cur = *str++;
|
||||
|
||||
// Each character must be either a digit or a minus sign
|
||||
if ((cur < '0' || cur > '9') && (cur != '-'))
|
||||
fatal_printf("gd_atoi() bad number '%s'", origstr);
|
||||
|
||||
if (cur == '-') {
|
||||
isNegative = TRUE;
|
||||
} else {
|
||||
curval = cur - '0';
|
||||
out += curval & 0xFF;
|
||||
|
||||
if (*str == '\0' || *str == '.' || *str < '0' || *str > '9') {
|
||||
break;
|
||||
}
|
||||
|
||||
out *= 10;
|
||||
}
|
||||
}
|
||||
|
||||
if (isNegative) {
|
||||
out = -out;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Like the standard "atof" function, but only supports integer values
|
||||
*/
|
||||
f64 gd_lazy_atof(const char *str, UNUSED u32 *unk) {
|
||||
return gd_atoi(str);
|
||||
}
|
||||
|
||||
static char sHexNumerals[] = {"0123456789ABCDEF"};
|
||||
|
||||
/* 23C018 -> 23C078; orig name: func_8018D848 */
|
||||
char *format_number_hex(char *str, s32 val) {
|
||||
s32 shift;
|
||||
|
||||
for (shift = 28; shift > -4; shift -= 4) {
|
||||
*str++ = sHexNumerals[(val >> shift) & 0xF];
|
||||
}
|
||||
|
||||
*str = '\0';
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
static s32 sPadNumPrint = 0; // @ 801A82C0
|
||||
|
||||
/* 23C078 -> 23C174; orig name: func_8018D8A8 */
|
||||
/* padnum = a decimal number with the max desired output width */
|
||||
char *format_number_decimal(char *str, s32 val, s32 padnum) {
|
||||
s32 i;
|
||||
|
||||
if (val == 0) {
|
||||
*str++ = '0';
|
||||
*str = '\0';
|
||||
return str;
|
||||
}
|
||||
|
||||
if (val < 0) {
|
||||
val = -val;
|
||||
*str++ = '-';
|
||||
}
|
||||
|
||||
while (padnum > 0) {
|
||||
if (padnum <= val) {
|
||||
sPadNumPrint = TRUE;
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
val -= padnum;
|
||||
if (val < 0) {
|
||||
val += padnum;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*str++ = i + '0';
|
||||
} else {
|
||||
if (sPadNumPrint) {
|
||||
*str++ = '0';
|
||||
}
|
||||
}
|
||||
|
||||
padnum /= 10;
|
||||
}
|
||||
|
||||
*str = '\0';
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
/* 23C174 -> 23C1C8; orig name: func_8018D9A4 */
|
||||
static s32 int_sci_notation(s32 base, s32 significand) {
|
||||
s32 i;
|
||||
|
||||
for (i = 1; i < significand; i++) {
|
||||
base *= 10;
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
|
||||
/* 23C1C8 -> 23C468; orig name: func_8018D9F8 */
|
||||
char *sprint_val_withspecifiers(char *str, union PrintVal val, char *specifiers) {
|
||||
s32 fracPart; // sp3C
|
||||
s32 intPart; // sp38
|
||||
s32 intPrec; // sp34
|
||||
s32 fracPrec; // sp30
|
||||
UNUSED u8 pad[4];
|
||||
char cur; // sp2B
|
||||
|
||||
fracPrec = 6;
|
||||
intPrec = 6;
|
||||
|
||||
while ((cur = *specifiers++)) {
|
||||
if (cur == 'd') {
|
||||
sPadNumPrint = FALSE;
|
||||
str = format_number_decimal(str, val.i, 1000000000);
|
||||
} else if (cur == 'x') {
|
||||
sPadNumPrint = TRUE; /* doesn't affect hex printing, though... */
|
||||
str = format_number_hex(str, val.i);
|
||||
} else if (cur == 'f') {
|
||||
intPart = (s32) val.f;
|
||||
fracPart = (s32)((val.f - (f32) intPart) * (f32) int_sci_notation(10, fracPrec));
|
||||
sPadNumPrint = FALSE;
|
||||
str = format_number_decimal(str, intPart, int_sci_notation(10, intPrec));
|
||||
*str++ = '.';
|
||||
sPadNumPrint = TRUE;
|
||||
str = format_number_decimal(str, fracPart, int_sci_notation(10, fracPrec - 1));
|
||||
} else if (cur >= '0' && cur <= '9') {
|
||||
cur = cur - '0';
|
||||
intPrec = cur;
|
||||
if (*specifiers++) {
|
||||
fracPrec = (*specifiers++) - '0';
|
||||
}
|
||||
} else {
|
||||
gd_strcpy(str, "<BAD TYPE>");
|
||||
str += 10;
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
/* 23C468 -> 23C4AC; orig name: func_8018DC98 */
|
||||
void gd_strcpy(char *dst, const char *src) {
|
||||
while ((*dst++ = *src++)) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/* 23C4AC -> 23C52C; not called; orig name: Unknown8018DCDC */
|
||||
void ascii_to_uppercase(char *str) {
|
||||
char c;
|
||||
|
||||
while ((c = *str)) {
|
||||
if (c >= 'a' && c <= 'z') {
|
||||
*str = c & 0xDF;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
}
|
||||
|
||||
/* 23C52C -> 23C5A8; orig name: func_8018DD5C */
|
||||
char *gd_strdup(const char *src) {
|
||||
char *dst; // sp24
|
||||
|
||||
dst = gd_malloc_perm((gd_strlen(src) + 1) * sizeof(char));
|
||||
|
||||
if (dst == NULL) {
|
||||
fatal_printf("gd_strdup(): out of memory");
|
||||
}
|
||||
gd_strcpy(dst, src);
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
/* 23C5A8 -> 23C5FC; orig name: func_8018DDD8 */
|
||||
u32 gd_strlen(const char *str) {
|
||||
u32 len = 0;
|
||||
|
||||
while (*str++) {
|
||||
len++;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/* 23C5FC -> 23C680; orig name: func_8018DE2C */
|
||||
char *gd_strcat(char *dst, const char *src) {
|
||||
while (*dst++) {
|
||||
;
|
||||
}
|
||||
|
||||
if (*src) {
|
||||
dst--;
|
||||
while ((*dst++ = *src++)) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
return --dst;
|
||||
}
|
||||
|
||||
/* 23C67C -> 23C728; orig name: func_8018DEB0 */
|
||||
/* Returns a bool, not the position of the mismatch */
|
||||
s32 gd_str_not_equal(const char *str1, const char *str2) {
|
||||
while (*str1 && *str2) {
|
||||
if (*str1++ != *str2++) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return *str1 != '\0' || *str2 != '\0';
|
||||
}
|
||||
|
||||
/* 23C728 -> 23C7B8; orig name; func_8018DF58 */
|
||||
s32 gd_str_contains(const char *str1, const char *str2) {
|
||||
const char *startsub = str2;
|
||||
|
||||
while (*str1 && *str2) {
|
||||
if (*str1++ != *str2++) {
|
||||
str2 = startsub;
|
||||
}
|
||||
}
|
||||
|
||||
return !*str2;
|
||||
}
|
||||
|
||||
/* 23C7B8 -> 23C7DC; orig name: func_8018DFE8 */
|
||||
s32 gd_feof(struct GdFile *f) {
|
||||
return f->flags & 0x4;
|
||||
}
|
||||
|
||||
/* 23C7DC -> 23C7FC; orig name: func_8018E00C */
|
||||
void gd_set_feof(struct GdFile *f) {
|
||||
f->flags |= 0x4;
|
||||
}
|
||||
|
||||
/* 23C7FC -> 23CA0C */
|
||||
struct GdFile *gd_fopen(const char *filename, const char *mode) {
|
||||
struct GdFile *f; // sp74
|
||||
char *loadedname; // sp70
|
||||
u32 i; // sp6C
|
||||
UNUSED u32 pad68;
|
||||
struct UnkBufThing buf; // sp24
|
||||
u8 *bufbytes; // sp20
|
||||
u8 *fileposptr; // sp1C
|
||||
s32 filecsr; // sp18
|
||||
|
||||
filecsr = 0;
|
||||
|
||||
while (TRUE) {
|
||||
bufbytes = (u8 *) &buf;
|
||||
for (i = 0; i < sizeof(struct UnkBufThing); i++) {
|
||||
*bufbytes++ = gGdStreamBuffer[filecsr++];
|
||||
}
|
||||
stub_renderer_13(&buf);
|
||||
fileposptr = &gGdStreamBuffer[filecsr];
|
||||
filecsr += buf.size;
|
||||
|
||||
loadedname = buf.name;
|
||||
|
||||
if (buf.size == 0) {
|
||||
break;
|
||||
}
|
||||
if (!gd_str_not_equal(filename, loadedname)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (buf.size == 0) {
|
||||
fatal_printf("gd_fopen() File not found '%s'", filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
f = gd_malloc_perm(sizeof(struct GdFile));
|
||||
if (f == NULL) {
|
||||
fatal_printf("gd_fopen() Out of memory loading '%s'", filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
f->stream = (s8 *) fileposptr;
|
||||
f->size = buf.size;
|
||||
f->pos = f->flags = 0;
|
||||
if (gd_str_contains(mode, "w")) {
|
||||
f->flags |= 0x1;
|
||||
}
|
||||
if (gd_str_contains(mode, "b")) {
|
||||
f->flags |= 0x2;
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
/* 23CA0C -> 23CB38; orig name: func_8018E23C */
|
||||
s32 gd_fread(s8 *buf, s32 bytes, UNUSED s32 count, struct GdFile *f) {
|
||||
s32 bytesToRead = bytes;
|
||||
s32 bytesread;
|
||||
|
||||
if (f->pos + bytesToRead > f->size) {
|
||||
bytesToRead = f->size - f->pos;
|
||||
}
|
||||
|
||||
if (bytesToRead == 0) {
|
||||
gd_set_feof(f);
|
||||
return -1;
|
||||
}
|
||||
|
||||
bytesread = bytesToRead;
|
||||
while (bytesread--) {
|
||||
*buf++ = f->stream[f->pos++];
|
||||
}
|
||||
|
||||
return bytesToRead;
|
||||
}
|
||||
|
||||
/* 23CB38 -> 23CB54; orig name: func_8018E368 */
|
||||
void gd_fclose(UNUSED struct GdFile *f) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* 23CB54 -> 23CB70; orig name: func_8018E384 */
|
||||
u32 gd_get_file_size(struct GdFile *f) {
|
||||
return f->size;
|
||||
}
|
||||
|
||||
/* 23CB70 -> 23CBA8; orig name: func_8018E3A0 */
|
||||
s32 is_newline(char c) {
|
||||
return c == '\r' || c == '\n';
|
||||
}
|
||||
|
||||
/* 23CBA8 -> 23CCF0; orig name: func_8018E3D8 */
|
||||
s32 gd_fread_line(char *buf, u32 size, struct GdFile *f) {
|
||||
signed char c;
|
||||
u32 pos = 0;
|
||||
UNUSED u32 pad1c;
|
||||
|
||||
do {
|
||||
if (gd_fread(&c, 1, 1, f) == -1) {
|
||||
break;
|
||||
}
|
||||
} while (is_newline(c));
|
||||
|
||||
while (!is_newline(c)) {
|
||||
if (c == -1) {
|
||||
break;
|
||||
}
|
||||
if (pos > size) {
|
||||
break;
|
||||
}
|
||||
buf[pos++] = c;
|
||||
if (gd_fread(&c, 1, 1, f) == -1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
buf[pos++] = '\0';
|
||||
|
||||
return pos;
|
||||
}
|
||||
@@ -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
|
||||
File diff suppressed because it is too large.
Load diff
@@ -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
|
||||
File diff suppressed because it is too large.
Load diff
@@ -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
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,215 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "animdata.h"
|
||||
#include "../gd_types.h"
|
||||
|
||||
static s16 animdata_mario_eyebrows_1_1[][3] = {
|
||||
{ -68, 0, 1775 }, { -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1773 }, { -68, 0, 1773 },
|
||||
{ -68, 0, 1772 }, { -68, 0, 1771 }, { -68, 0, 1770 }, { -68, 0, 1768 }, { -68, 0, 1767 },
|
||||
{ -68, 0, 1766 }, { -68, -1, 1766 }, { -68, -1, 1765 }, { -68, -1, 1765 }, { -68, -1, 1764 },
|
||||
{ -68, -1, 1765 }, { -68, -1, 1765 }, { -68, -1, 1766 }, { -68, 0, 1767 }, { -68, 0, 1769 },
|
||||
{ -68, 0, 1772 }, { -68, 0, 1775 }, { -68, 0, 1782 }, { -68, 2, 1796 }, { -68, 4, 1814 },
|
||||
{ -68, 6, 1832 }, { -68, 8, 1849 }, { -67, 10, 1861 }, { -67, 10, 1866 }, { -67, 10, 1863 },
|
||||
{ -67, 9, 1857 }, { -68, 8, 1847 }, { -68, 7, 1836 }, { -68, 5, 1823 }, { -68, 4, 1810 },
|
||||
{ -68, 2, 1798 }, { -68, 1, 1787 }, { -68, 0, 1779 }, { -68, 0, 1775 }, { -68, 0, 1772 },
|
||||
{ -68, 0, 1771 }, { -68, 0, 1769 }, { -68, 0, 1768 }, { -68, 0, 1767 }, { -68, -1, 1766 },
|
||||
{ -68, -1, 1765 }, { -68, -1, 1765 }, { -68, -1, 1765 }, { -68, -1, 1764 }, { -68, -1, 1765 },
|
||||
{ -68, -1, 1765 }, { -68, -1, 1765 }, { -68, -1, 1766 }, { -68, -1, 1766 }, { -68, 0, 1767 },
|
||||
{ -68, 0, 1767 }, { -68, 0, 1768 }, { -68, 0, 1769 }, { -68, 0, 1770 }, { -68, 0, 1770 },
|
||||
{ -68, 0, 1771 }, { -68, 0, 1772 }, { -68, 0, 1772 }, { -68, 0, 1773 }, { -68, 0, 1774 },
|
||||
{ -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1774 },
|
||||
{ -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1773 }, { -68, 0, 1773 },
|
||||
{ -68, 0, 1773 }, { -68, 0, 1773 }, { -68, 0, 1773 }, { -68, 0, 1773 }, { -68, 0, 1773 },
|
||||
{ -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1775 }, { -68, 0, 1776 },
|
||||
{ -68, 0, 1779 }, { -68, 0, 1782 }, { -68, 1, 1785 }, { -68, 1, 1786 }, { -68, 1, 1786 },
|
||||
{ -68, 1, 1787 }, { -68, 1, 1787 }, { -68, 1, 1787 }, { -68, 1, 1788 }, { -68, 1, 1788 },
|
||||
{ -68, 1, 1788 }, { -68, 1, 1788 }, { -68, 1, 1788 }, { -68, 1, 1788 }, { -68, 1, 1788 },
|
||||
{ -68, 1, 1788 }, { -68, 1, 1788 }, { -68, 1, 1787 }, { -68, 1, 1787 }, { -68, 1, 1787 },
|
||||
{ -68, 1, 1786 }, { -68, 1, 1786 }, { -68, 1, 1785 }, { -68, 1, 1783 }, { -68, 0, 1780 },
|
||||
{ -68, 0, 1778 }, { -68, 0, 1776 }, { -68, 0, 1775 }, { -68, 0, 1774 }, { -68, 0, 1774 },
|
||||
{ -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1774 },
|
||||
{ -68, 0, 1774 }, { -68, 0, 1774 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1774 },
|
||||
{ -68, 0, 1773 }, { -68, 0, 1771 }, { -68, 0, 1768 }, { -69, -1, 1765 }, { -69, -1, 1762 },
|
||||
{ -69, -1, 1758 }, { -69, -2, 1754 }, { -69, -2, 1751 }, { -69, -3, 1747 }, { -69, -3, 1743 },
|
||||
{ -69, -3, 1740 }, { -70, -4, 1737 }, { -70, -4, 1735 }, { -70, -4, 1733 }, { -70, -4, 1732 },
|
||||
{ -70, -4, 1732 }, { -70, -4, 1733 }, { -70, -4, 1734 }, { -70, -4, 1738 }, { -69, -3, 1742 },
|
||||
{ -69, -3, 1748 }, { -69, -2, 1755 }, { -69, -1, 1764 }, { -68, 0, 1775 }, { -67, 4, 1818 },
|
||||
{ -64, 14, 1905 }, { -60, 26, 2005 }, { -57, 35, 2088 }, { -56, 39, 2122 }, { -56, 37, 2110 },
|
||||
{ -57, 34, 2076 }, { -59, 28, 2027 }, { -61, 22, 1970 }, { -63, 15, 1910 }, { -65, 8, 1853 },
|
||||
{ -67, 3, 1806 }, { -68, 0, 1775 }, { -69, -1, 1760 }, { -71, -1, 1758 }, { -72, -1, 1764 },
|
||||
{ -72, 0, 1776 }, { -73, 1, 1788 }, { -74, 2, 1798 }, { -74, 3, 1803 }, { -74, 3, 1804 },
|
||||
{ -74, 3, 1804 }, { -75, 3, 1804 }, { -75, 3, 1805 }, { -76, 3, 1805 }, { -77, 3, 1805 },
|
||||
{ -78, 3, 1804 }, { -78, 3, 1804 }, { -79, 3, 1804 }, { -80, 3, 1803 }, { -81, 3, 1803 },
|
||||
{ -82, 3, 1802 }, { -83, 3, 1802 }, { -84, 3, 1801 }, { -85, 3, 1801 }, { -85, 3, 1800 },
|
||||
{ -86, 2, 1800 }, { -87, 2, 1799 }, { -87, 2, 1799 }, { -87, 2, 1798 }, { -88, 2, 1798 },
|
||||
{ -88, 2, 1797 }, { -88, 2, 1797 }, { -88, 2, 1797 }, { -87, 2, 1797 }, { -87, 2, 1797 },
|
||||
{ -86, 2, 1797 }, { -85, 2, 1797 }, { -84, 2, 1798 }, { -82, 2, 1799 }, { -81, 2, 1799 },
|
||||
{ -79, 3, 1800 }, { -76, 3, 1802 }, { -74, 3, 1803 }, { -69, 3, 1806 }, { -61, 4, 1810 },
|
||||
{ -50, 5, 1816 }, { -37, 6, 1823 }, { -23, 7, 1830 }, { -9, 8, 1838 }, { 5, 9, 1846 },
|
||||
{ 18, 10, 1854 }, { 30, 11, 1861 }, { 40, 11, 1867 }, { 46, 12, 1871 }, { 51, 12, 1875 },
|
||||
{ 55, 12, 1878 }, { 58, 12, 1882 }, { 60, 12, 1885 }, { 62, 12, 1888 }, { 64, 12, 1891 },
|
||||
{ 64, 12, 1893 }, { 64, 12, 1895 }, { 64, 12, 1897 }, { 63, 11, 1898 }, { 61, 11, 1899 },
|
||||
{ 58, 11, 1899 }, { 55, 11, 1898 }, { 51, 10, 1896 }, { 47, 10, 1894 }, { 40, 9, 1890 },
|
||||
{ 29, 9, 1882 }, { 16, 8, 1872 }, { 1, 7, 1861 }, { -14, 6, 1849 }, { -30, 5, 1837 },
|
||||
{ -44, 5, 1826 }, { -57, 4, 1816 }, { -68, 3, 1808 }, { -74, 3, 1803 }, { -78, 3, 1800 },
|
||||
{ -81, 2, 1798 }, { -83, 2, 1796 }, { -85, 2, 1794 }, { -86, 2, 1793 }, { -86, 2, 1792 },
|
||||
{ -86, 1, 1792 }, { -86, 1, 1792 }, { -85, 1, 1792 }, { -84, 1, 1793 }, { -83, 1, 1793 },
|
||||
{ -81, 1, 1794 }, { -80, 1, 1795 }, { -79, 1, 1796 }, { -77, 2, 1798 }, { -76, 2, 1799 },
|
||||
{ -75, 2, 1800 }, { -74, 2, 1802 }, { -74, 3, 1803 }, { -73, 4, 1806 }, { -72, 6, 1812 },
|
||||
{ -71, 9, 1820 }, { -70, 11, 1828 }, { -69, 13, 1834 }, { -68, 15, 1837 }, { -68, 15, 1838 },
|
||||
{ -68, 15, 1839 }, { -68, 16, 1840 }, { -67, 16, 1840 }, { -67, 16, 1841 }, { -67, 16, 1841 },
|
||||
{ -67, 16, 1841 }, { -67, 16, 1841 }, { -67, 16, 1841 }, { -67, 16, 1840 }, { -68, 16, 1840 },
|
||||
{ -68, 15, 1839 }, { -68, 15, 1839 }, { -68, 15, 1839 }, { -68, 15, 1838 }, { -68, 15, 1838 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 15, 1837 },
|
||||
{ -68, 15, 1837 }, { -68, 15, 1837 }, { -68, 14, 1836 }, { -68, 14, 1833 }, { -68, 14, 1830 },
|
||||
{ -69, 13, 1825 }, { -69, 13, 1821 }, { -69, 12, 1817 }, { -69, 12, 1814 }, { -69, 12, 1813 },
|
||||
{ -69, 12, 1815 }, { -69, 13, 1819 }, { -69, 13, 1826 }, { -68, 15, 1837 }, { -66, 19, 1876 },
|
||||
{ -62, 26, 1946 }, { -59, 34, 2015 }, { -57, 38, 2048 }, { -57, 38, 2050 }, { -57, 37, 2044 },
|
||||
{ -58, 36, 2032 }, { -59, 35, 2015 }, { -60, 33, 1996 }, { -62, 31, 1974 }, { -63, 28, 1951 },
|
||||
{ -64, 26, 1930 }, { -66, 23, 1911 }, { -67, 20, 1889 }, { -69, 14, 1861 }, { -71, 9, 1833 },
|
||||
{ -73, 5, 1812 }, { -74, 3, 1803 }, { -74, 3, 1802 }, { -74, 3, 1801 }, { -74, 2, 1800 },
|
||||
{ -74, 2, 1799 }, { -74, 2, 1798 }, { -74, 2, 1797 }, { -74, 2, 1796 }, { -74, 2, 1796 },
|
||||
{ -75, 1, 1795 }, { -75, 1, 1794 }, { -75, 1, 1794 }, { -75, 1, 1793 }, { -75, 1, 1792 },
|
||||
{ -75, 1, 1792 }, { -75, 1, 1791 }, { -75, 1, 1791 }, { -75, 1, 1791 }, { -75, 0, 1790 },
|
||||
{ -75, 0, 1790 }, { -75, 0, 1789 }, { -75, 0, 1789 }, { -75, 0, 1789 }, { -75, 0, 1789 },
|
||||
{ -75, 0, 1788 }, { -75, 0, 1788 }, { -75, 0, 1788 }, { -75, 0, 1788 }, { -75, 0, 1788 },
|
||||
{ -75, 0, 1788 }, { -75, 0, 1788 }, { -75, 0, 1788 }, { -75, 0, 1788 }, { -75, 0, 1788 },
|
||||
{ -75, 0, 1788 }, { -75, 0, 1788 }, { -75, 0, 1788 }, { -75, 0, 1788 }, { -75, 0, 1788 },
|
||||
{ -75, 0, 1789 }, { -75, 0, 1789 }, { -75, 0, 1789 }, { -75, 0, 1789 }, { -75, 0, 1789 },
|
||||
{ -75, 0, 1790 }, { -75, 0, 1790 }, { -75, 0, 1790 }, { -75, 1, 1790 }, { -75, 1, 1791 },
|
||||
{ -75, 1, 1791 }, { -75, 1, 1791 }, { -75, 1, 1792 }, { -75, 1, 1792 }, { -75, 1, 1792 },
|
||||
{ -75, 1, 1793 }, { -75, 1, 1793 }, { -75, 1, 1793 }, { -75, 1, 1794 }, { -75, 1, 1794 },
|
||||
{ -75, 1, 1794 }, { -75, 1, 1795 }, { -75, 1, 1795 }, { -74, 1, 1795 }, { -74, 2, 1796 },
|
||||
{ -74, 2, 1796 }, { -74, 2, 1797 }, { -74, 2, 1797 }, { -74, 2, 1797 }, { -74, 2, 1798 },
|
||||
{ -74, 2, 1798 }, { -74, 2, 1798 }, { -74, 2, 1799 }, { -74, 2, 1799 }, { -74, 2, 1799 },
|
||||
{ -74, 2, 1800 }, { -74, 2, 1800 }, { -74, 2, 1800 }, { -74, 2, 1801 }, { -74, 3, 1801 },
|
||||
{ -74, 3, 1801 }, { -74, 3, 1801 }, { -74, 3, 1802 }, { -74, 3, 1802 }, { -74, 3, 1802 },
|
||||
{ -74, 3, 1802 }, { -74, 3, 1802 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1803 }, { -74, 3, 1804 }, { -74, 3, 1804 },
|
||||
{ -74, 3, 1804 }, { -74, 3, 1804 }, { -74, 3, 1804 }, { -74, 3, 1804 }, { -74, 3, 1804 },
|
||||
{ -74, 3, 1804 }, { -74, 3, 1804 }, { -74, 3, 1805 }, { -74, 3, 1805 }, { -74, 3, 1805 },
|
||||
{ -74, 3, 1805 }, { -74, 3, 1805 }, { -74, 3, 1805 }, { -74, 3, 1804 }, { -74, 3, 1804 },
|
||||
{ -74, 3, 1804 }, { -74, 3, 1804 }, { -74, 3, 1804 }, { -74, 3, 1803 }, { -74, 3, 1803 },
|
||||
{ -74, 3, 1803 }, { -74, 3, 1802 }, { -74, 3, 1802 }, { -74, 3, 1801 }, { -73, 3, 1801 },
|
||||
{ -73, 3, 1800 }, { -73, 3, 1800 }, { -73, 2, 1799 }, { -73, 2, 1798 }, { -73, 2, 1798 },
|
||||
{ -73, 2, 1797 }, { -73, 2, 1797 }, { -72, 2, 1796 }, { -72, 2, 1795 }, { -72, 2, 1795 },
|
||||
{ -72, 2, 1794 }, { -72, 2, 1793 }, { -72, 2, 1792 }, { -72, 2, 1792 }, { -71, 1, 1791 },
|
||||
{ -71, 1, 1790 }, { -71, 1, 1789 }, { -71, 1, 1789 }, { -71, 1, 1788 }, { -71, 1, 1787 },
|
||||
{ -71, 1, 1786 }, { -70, 1, 1786 }, { -70, 1, 1785 }, { -70, 1, 1784 }, { -70, 1, 1784 },
|
||||
{ -70, 0, 1783 }, { -70, 0, 1782 }, { -70, 0, 1782 }, { -69, 0, 1781 }, { -69, 0, 1780 },
|
||||
{ -69, 0, 1780 }, { -69, 0, 1779 }, { -69, 0, 1778 }, { -69, 0, 1778 }, { -69, 0, 1777 },
|
||||
{ -69, 0, 1777 }, { -69, 0, 1776 }, { -68, 0, 1776 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1774 }, { -69, 0, 1774 }, { -70, 0, 1773 }, { -72, 0, 1773 }, { -73, 0, 1773 },
|
||||
{ -75, 1, 1772 }, { -77, 1, 1772 }, { -79, 2, 1772 }, { -80, 2, 1772 }, { -82, 2, 1772 },
|
||||
{ -83, 3, 1772 }, { -84, 3, 1772 }, { -84, 3, 1772 }, { -84, 3, 1772 }, { -84, 3, 1772 },
|
||||
{ -82, 2, 1773 }, { -80, 2, 1773 }, { -77, 1, 1773 }, { -73, 1, 1774 }, { -68, 0, 1775 },
|
||||
{ -60, -1, 1776 }, { -48, -4, 1777 }, { -33, -7, 1779 }, { -15, -11, 1781 }, { 4, -15, 1784 },
|
||||
{ 24, -19, 1786 }, { 44, -24, 1789 }, { 62, -28, 1791 }, { 79, -31, 1793 }, { 93, -34, 1795 },
|
||||
{ 103, -36, 1796 }, { 108, -37, 1796 }, { 110, -38, 1797 }, { 113, -38, 1797 }, { 115, -39, 1797 },
|
||||
{ 117, -39, 1798 }, { 118, -40, 1798 }, { 120, -40, 1798 }, { 122, -40, 1798 }, { 123, -40, 1798 },
|
||||
{ 124, -41, 1798 }, { 125, -41, 1799 }, { 126, -41, 1799 }, { 127, -41, 1799 }, { 128, -41, 1799 },
|
||||
{ 128, -42, 1799 }, { 129, -42, 1799 }, { 129, -42, 1799 }, { 129, -42, 1799 }, { 130, -42, 1799 },
|
||||
{ 130, -42, 1799 }, { 130, -42, 1799 }, { 130, -42, 1799 }, { 129, -42, 1799 }, { 129, -42, 1799 },
|
||||
{ 129, -42, 1799 }, { 128, -42, 1799 }, { 128, -42, 1799 }, { 127, -41, 1799 }, { 127, -41, 1799 },
|
||||
{ 126, -41, 1799 }, { 126, -41, 1799 }, { 125, -41, 1799 }, { 124, -41, 1798 }, { 123, -41, 1798 },
|
||||
{ 123, -40, 1798 }, { 122, -40, 1798 }, { 121, -40, 1798 }, { 120, -40, 1798 }, { 119, -40, 1798 },
|
||||
{ 119, -40, 1798 }, { 118, -39, 1798 }, { 117, -39, 1798 }, { 116, -39, 1797 }, { 115, -39, 1797 },
|
||||
{ 114, -39, 1797 }, { 114, -38, 1797 }, { 113, -38, 1797 }, { 112, -38, 1797 }, { 112, -38, 1797 },
|
||||
{ 111, -38, 1797 }, { 110, -38, 1797 }, { 110, -38, 1797 }, { 109, -38, 1797 }, { 109, -37, 1797 },
|
||||
{ 109, -37, 1797 }, { 108, -37, 1797 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 },
|
||||
{ 108, -37, 1796 }, { 108, -37, 1796 }, { 108, -37, 1796 }, { 112, -38, 1797 }, { 108, -37, 1796 },
|
||||
{ 91, -34, 1794 }, { 71, -29, 1792 }, { 48, -24, 1789 }, { 24, -19, 1786 }, { 1, -14, 1783 },
|
||||
{ -20, -10, 1781 }, { -39, -6, 1778 }, { -55, -2, 1776 }, { -65, 0, 1775 }, { -68, 0, 1775 },
|
||||
};
|
||||
|
||||
static s16 animdata_mario_eyebrows_1_2[][3] = {
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 },
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 },
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 },
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 },
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 },
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 },
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 },
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 },
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1820 },
|
||||
{ -68, 5, 1820 }, { -68, 5, 1820 }, { -68, 5, 1819 }, { -68, 5, 1818 }, { -68, 5, 1817 },
|
||||
{ -68, 5, 1816 }, { -68, 4, 1815 }, { -68, 4, 1814 }, { -68, 4, 1813 }, { -68, 4, 1811 },
|
||||
{ -68, 4, 1810 }, { -68, 4, 1809 }, { -68, 3, 1808 }, { -68, 3, 1807 }, { -68, 3, 1806 },
|
||||
{ -68, 3, 1805 }, { -68, 3, 1804 }, { -68, 3, 1804 }, { -68, 3, 1804 }, { -68, 3, 1804 },
|
||||
{ -68, 3, 1804 }, { -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1803 },
|
||||
{ -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1803 },
|
||||
{ -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1803 },
|
||||
{ -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1804 }, { -68, 3, 1804 },
|
||||
{ -68, 3, 1804 }, { -68, 3, 1804 }, { -68, 3, 1804 }, { -68, 3, 1804 }, { -68, 3, 1804 },
|
||||
{ -68, 3, 1804 }, { -68, 3, 1804 }, { -68, 3, 1804 }, { -68, 3, 1805 }, { -68, 3, 1805 },
|
||||
{ -68, 3, 1805 }, { -68, 3, 1805 }, { -68, 3, 1805 }, { -68, 3, 1805 }, { -68, 3, 1805 },
|
||||
{ -68, 3, 1805 }, { -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 },
|
||||
{ -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 },
|
||||
{ -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 },
|
||||
{ -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 },
|
||||
{ -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1806 }, { -68, 3, 1805 }, { -68, 3, 1805 },
|
||||
{ -68, 3, 1805 }, { -68, 3, 1805 }, { -68, 3, 1805 }, { -68, 3, 1804 }, { -68, 3, 1804 },
|
||||
{ -68, 3, 1804 }, { -68, 3, 1803 }, { -68, 3, 1803 }, { -68, 3, 1802 }, { -68, 3, 1801 },
|
||||
{ -68, 3, 1801 }, { -68, 3, 1800 }, { -68, 2, 1799 }, { -68, 2, 1798 }, { -68, 2, 1797 },
|
||||
{ -68, 2, 1796 }, { -68, 2, 1795 }, { -68, 2, 1794 }, { -68, 2, 1793 }, { -68, 2, 1792 },
|
||||
{ -68, 1, 1790 }, { -68, 1, 1789 }, { -68, 1, 1788 }, { -68, 1, 1787 }, { -68, 1, 1786 },
|
||||
{ -68, 1, 1785 }, { -68, 1, 1784 }, { -68, 0, 1783 }, { -68, 0, 1781 }, { -68, 0, 1781 },
|
||||
{ -68, 0, 1780 }, { -68, 0, 1779 }, { -68, 0, 1778 }, { -68, 0, 1777 }, { -68, 0, 1777 },
|
||||
{ -68, 0, 1776 }, { -68, 0, 1776 }, { -68, 0, 1775 }, { -68, 0, 1775 }, { -68, 0, 1775 },
|
||||
{ -68, 0, 1775 },
|
||||
};
|
||||
|
||||
struct AnimDataInfo anim_mario_eyebrows_1[] = {
|
||||
{ ARRAY_COUNT(animdata_mario_eyebrows_1_1), GD_ANIM_ROT3S, animdata_mario_eyebrows_1_1 },
|
||||
{ ARRAY_COUNT(animdata_mario_eyebrows_1_2), GD_ANIM_ROT3S, animdata_mario_eyebrows_1_2 },
|
||||
END_ANIMDATA_INFO_ARR,
|
||||
};
|
||||
@@ -0,0 +1,256 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "animdata.h"
|
||||
#include "../gd_types.h"
|
||||
|
||||
static s16 animdata_mario_lips_1_1[][3] = {
|
||||
{ -80, -6, 1818 }, { -80, -6, 1818 }, { -80, -6, 1818 }, { -80, -6, 1817 },
|
||||
{ -80, -6, 1817 }, { -80, -6, 1816 }, { -80, -6, 1815 }, { -80, -6, 1815 },
|
||||
{ -80, -6, 1814 }, { -80, -6, 1813 }, { -80, -6, 1812 }, { -80, -6, 1812 },
|
||||
{ -80, -7, 1811 }, { -80, -7, 1811 }, { -80, -7, 1811 }, { -80, -7, 1811 },
|
||||
{ -80, -7, 1812 }, { -80, -6, 1812 }, { -80, -6, 1813 }, { -80, -6, 1814 },
|
||||
{ -80, -6, 1816 }, { -80, -6, 1818 }, { -80, -5, 1823 }, { -80, -4, 1833 },
|
||||
{ -80, -2, 1845 }, { -80, 0, 1857 }, { -80, 1, 1869 }, { -80, 2, 1877 },
|
||||
{ -80, 2, 1880 }, { -80, 2, 1879 }, { -80, 1, 1874 }, { -80, 0, 1868 },
|
||||
{ -80, 0, 1860 }, { -80, -1, 1851 }, { -80, -2, 1842 }, { -80, -3, 1834 },
|
||||
{ -80, -4, 1826 }, { -80, -5, 1821 }, { -80, -6, 1818 }, { -80, -6, 1817 },
|
||||
{ -80, -6, 1815 }, { -80, -6, 1814 }, { -80, -6, 1813 }, { -80, -6, 1813 },
|
||||
{ -80, -6, 1812 }, { -80, -7, 1812 }, { -80, -7, 1811 }, { -80, -7, 1811 },
|
||||
{ -80, -7, 1811 }, { -80, -7, 1811 }, { -80, -7, 1811 }, { -80, -7, 1811 },
|
||||
{ -80, -6, 1812 }, { -80, -6, 1812 }, { -80, -6, 1813 }, { -80, -6, 1813 },
|
||||
{ -80, -6, 1813 }, { -80, -6, 1814 }, { -80, -6, 1815 }, { -80, -6, 1815 },
|
||||
{ -80, -6, 1816 }, { -80, -6, 1816 }, { -80, -6, 1816 }, { -80, -6, 1817 },
|
||||
{ -80, -6, 1817 }, { -80, -6, 1818 }, { -80, -6, 1818 }, { -80, -6, 1818 },
|
||||
{ -80, -6, 1818 }, { -80, -6, 1818 }, { -80, -6, 1818 }, { -81, -6, 1818 },
|
||||
{ -82, -6, 1818 }, { -84, -6, 1818 }, { -85, -6, 1819 }, { -87, -6, 1819 },
|
||||
{ -88, -6, 1819 }, { -90, -6, 1819 }, { -91, -6, 1819 }, { -92, -6, 1819 },
|
||||
{ -93, -6, 1819 }, { -93, -6, 1819 }, { -93, -6, 1819 }, { -92, -6, 1819 },
|
||||
{ -91, -6, 1819 }, { -89, -6, 1819 }, { -87, -6, 1819 }, { -84, -6, 1818 },
|
||||
{ -80, -6, 1818 }, { -65, -5, 1817 }, { -38, -3, 1814 }, { -7, -2, 1811 },
|
||||
{ 20, 0, 1808 }, { 34, 0, 1806 }, { 39, 0, 1806 }, { 43, 0, 1805 },
|
||||
{ 46, 0, 1805 }, { 49, 1, 1805 }, { 52, 1, 1804 }, { 54, 1, 1804 },
|
||||
{ 55, 1, 1804 }, { 56, 1, 1804 }, { 56, 1, 1804 }, { 56, 1, 1804 },
|
||||
{ 55, 1, 1804 }, { 53, 1, 1804 }, { 51, 1, 1805 }, { 49, 1, 1805 },
|
||||
{ 46, 0, 1805 }, { 42, 0, 1805 }, { 38, 0, 1806 }, { 34, 0, 1806 },
|
||||
{ 23, 0, 1807 }, { 3, -1, 1809 }, { -21, -2, 1812 }, { -46, -4, 1815 },
|
||||
{ -67, -5, 1817 }, { -80, -6, 1818 }, { -85, -6, 1819 }, { -89, -6, 1819 },
|
||||
{ -90, -6, 1820 }, { -90, -6, 1820 }, { -90, -6, 1820 }, { -88, -6, 1820 },
|
||||
{ -86, -6, 1820 }, { -84, -6, 1820 }, { -82, -6, 1820 }, { -80, -6, 1819 },
|
||||
{ -80, -6, 1818 }, { -80, -6, 1816 }, { -79, -6, 1814 }, { -79, -6, 1812 },
|
||||
{ -79, -7, 1809 }, { -79, -7, 1806 }, { -79, -8, 1803 }, { -79, -8, 1800 },
|
||||
{ -79, -8, 1798 }, { -79, -9, 1796 }, { -79, -9, 1795 }, { -79, -9, 1795 },
|
||||
{ -79, -9, 1795 }, { -79, -9, 1795 }, { -79, -9, 1796 }, { -79, -9, 1796 },
|
||||
{ -79, -9, 1797 }, { -79, -8, 1797 }, { -79, -8, 1798 }, { -79, -8, 1799 },
|
||||
{ -79, -8, 1800 }, { -79, -8, 1801 }, { -79, -8, 1802 }, { -79, -8, 1803 },
|
||||
{ -79, -8, 1804 }, { -79, -7, 1805 }, { -79, -7, 1806 }, { -79, -7, 1806 },
|
||||
{ -79, -7, 1807 }, { -79, -7, 1808 }, { -79, -7, 1808 }, { -79, -7, 1809 },
|
||||
{ -79, -7, 1809 }, { -79, -7, 1809 }, { -79, -7, 1809 }, { -79, -7, 1806 },
|
||||
{ -79, -8, 1801 }, { -79, -9, 1794 }, { -79, -10, 1790 }, { -79, -10, 1790 },
|
||||
{ -79, -8, 1799 }, { -79, -6, 1814 }, { -80, -4, 1829 }, { -80, -3, 1837 },
|
||||
{ -80, -3, 1837 }, { -80, -4, 1830 }, { -80, -5, 1822 }, { -80, -6, 1818 },
|
||||
{ -80, -6, 1817 }, { -80, -6, 1816 }, { -80, -6, 1816 }, { -80, -6, 1816 },
|
||||
{ -80, -6, 1816 }, { -80, -6, 1816 }, { -80, -6, 1816 }, { -80, -6, 1817 },
|
||||
{ -80, -6, 1817 }, { -80, -6, 1817 }, { -80, -6, 1818 }, { -80, -6, 1818 },
|
||||
{ -80, -6, 1818 }, { -79, -6, 1818 }, { -79, -6, 1816 }, { -79, -7, 1814 },
|
||||
{ -79, -7, 1812 }, { -78, -8, 1809 }, { -78, -9, 1805 }, { -77, -10, 1802 },
|
||||
{ -77, -11, 1798 }, { -76, -12, 1794 }, { -75, -13, 1791 }, { -75, -14, 1787 },
|
||||
{ -74, -15, 1784 }, { -74, -16, 1781 }, { -74, -17, 1778 }, { -73, -17, 1777 },
|
||||
{ -73, -18, 1776 }, { -73, -18, 1776 }, { -73, -18, 1776 }, { -74, -17, 1778 },
|
||||
{ -74, -16, 1781 }, { -75, -15, 1786 }, { -76, -13, 1791 }, { -77, -11, 1799 },
|
||||
{ -78, -9, 1807 }, { -80, -6, 1818 }, { -86, 6, 1861 }, { -99, 30, 1947 },
|
||||
{ -114, 59, 2046 }, { -126, 82, 2127 }, { -131, 92, 2161 }, { -130, 88, 2149 },
|
||||
{ -127, 79, 2117 }, { -123, 65, 2070 }, { -117, 49, 2014 }, { -110, 32, 1955 },
|
||||
{ -101, 16, 1899 }, { -91, 3, 1851 }, { -80, -6, 1818 }, { -64, -11, 1799 },
|
||||
{ -42, -13, 1789 }, { -18, -13, 1786 }, { 5, -12, 1787 }, { 27, -11, 1790 },
|
||||
{ 43, -9, 1794 }, { 52, -9, 1795 }, { 55, -9, 1795 }, { 57, -9, 1794 },
|
||||
{ 59, -9, 1793 }, { 60, -9, 1793 }, { 62, -9, 1792 }, { 62, -9, 1792 },
|
||||
{ 63, -9, 1791 }, { 63, -9, 1790 }, { 62, -9, 1790 }, { 62, -9, 1789 },
|
||||
{ 61, -9, 1789 }, { 60, -9, 1788 }, { 59, -9, 1787 }, { 58, -9, 1787 },
|
||||
{ 56, -9, 1787 }, { 55, -9, 1786 }, { 53, -8, 1786 }, { 52, -8, 1786 },
|
||||
{ 51, -8, 1785 }, { 49, -8, 1785 }, { 48, -8, 1785 }, { 46, -8, 1785 },
|
||||
{ 45, -8, 1786 }, { 44, -8, 1786 }, { 44, -8, 1786 }, { 43, -8, 1787 },
|
||||
{ 43, -8, 1787 }, { 43, -8, 1788 }, { 44, -8, 1789 }, { 44, -8, 1790 },
|
||||
{ 45, -8, 1791 }, { 47, -9, 1792 }, { 49, -9, 1794 }, { 52, -9, 1795 },
|
||||
{ 57, -9, 1798 }, { 66, -9, 1803 }, { 79, -10, 1810 }, { 94, -10, 1818 },
|
||||
{ 110, -11, 1827 }, { 126, -11, 1836 }, { 142, -12, 1845 }, { 156, -13, 1853 },
|
||||
{ 167, -14, 1860 }, { 174, -14, 1866 }, { 176, -15, 1869 }, { 174, -17, 1871 },
|
||||
{ 170, -18, 1873 }, { 163, -20, 1874 }, { 155, -21, 1874 }, { 145, -23, 1874 },
|
||||
{ 134, -25, 1874 }, { 123, -27, 1873 }, { 110, -29, 1872 }, { 98, -31, 1870 },
|
||||
{ 86, -32, 1868 }, { 74, -34, 1866 }, { 64, -35, 1864 }, { 54, -36, 1861 },
|
||||
{ 46, -36, 1858 }, { 40, -36, 1855 }, { 36, -35, 1852 }, { 35, -33, 1847 },
|
||||
{ 35, -31, 1841 }, { 36, -27, 1834 }, { 39, -24, 1828 }, { 42, -20, 1820 },
|
||||
{ 45, -17, 1813 }, { 48, -13, 1807 }, { 50, -11, 1801 }, { 52, -9, 1795 },
|
||||
{ 52, -8, 1791 }, { 52, -7, 1786 }, { 53, -6, 1782 }, { 53, -5, 1778 },
|
||||
{ 53, -5, 1774 }, { 53, -5, 1770 }, { 53, -5, 1767 }, { 52, -5, 1763 },
|
||||
{ 52, -5, 1760 }, { 52, -5, 1756 }, { 52, -5, 1753 }, { 52, -5, 1750 },
|
||||
{ 54, -4, 1746 }, { 58, -3, 1742 }, { 63, -2, 1738 }, { 66, -1, 1734 },
|
||||
{ 67, -1, 1732 }, { 63, -1, 1731 }, { 52, -3, 1733 }, { 30, -7, 1738 },
|
||||
{ -4, -13, 1749 }, { -45, -20, 1761 }, { -84, -26, 1773 }, { -116, -32, 1782 },
|
||||
{ -132, -35, 1787 }, { -139, -36, 1788 }, { -144, -37, 1788 }, { -148, -38, 1788 },
|
||||
{ -150, -39, 1788 }, { -152, -39, 1787 }, { -153, -40, 1786 }, { -153, -40, 1785 },
|
||||
{ -152, -41, 1783 }, { -151, -41, 1781 }, { -149, -41, 1779 }, { -147, -41, 1778 },
|
||||
{ -145, -41, 1776 }, { -143, -41, 1774 }, { -140, -40, 1772 }, { -138, -40, 1770 },
|
||||
{ -136, -40, 1768 }, { -134, -40, 1767 }, { -132, -40, 1766 }, { -131, -40, 1765 },
|
||||
{ -131, -40, 1764 }, { -131, -40, 1764 }, { -131, -40, 1764 }, { -131, -40, 1763 },
|
||||
{ -131, -40, 1763 }, { -131, -40, 1763 }, { -131, -40, 1763 }, { -131, -40, 1763 },
|
||||
{ -131, -40, 1762 }, { -131, -40, 1762 }, { -131, -40, 1762 }, { -131, -40, 1762 },
|
||||
{ -131, -41, 1762 }, { -131, -41, 1762 }, { -131, -41, 1762 }, { -131, -41, 1762 },
|
||||
{ -131, -41, 1762 }, { -131, -41, 1762 }, { -131, -40, 1762 }, { -131, -40, 1762 },
|
||||
{ -131, -40, 1762 }, { -131, -40, 1762 }, { -131, -40, 1762 }, { -131, -40, 1763 },
|
||||
{ -131, -40, 1763 }, { -131, -40, 1763 }, { -131, -40, 1763 }, { -131, -40, 1763 },
|
||||
{ -131, -40, 1763 }, { -131, -40, 1763 }, { -131, -40, 1763 }, { -131, -40, 1763 },
|
||||
{ -131, -40, 1764 }, { -131, -40, 1764 }, { -131, -40, 1764 }, { -131, -40, 1764 },
|
||||
{ -131, -40, 1764 }, { -131, -40, 1764 }, { -131, -40, 1764 }, { -131, -40, 1764 },
|
||||
{ -131, -40, 1764 }, { -131, -40, 1764 }, { -131, -40, 1764 }, { -131, -40, 1764 },
|
||||
{ -131, -40, 1763 }, { -131, -41, 1761 }, { -131, -42, 1757 }, { -131, -43, 1753 },
|
||||
{ -131, -44, 1749 }, { -131, -45, 1745 }, { -131, -45, 1742 }, { -131, -46, 1741 },
|
||||
{ -131, -45, 1743 }, { -131, -44, 1746 }, { -131, -43, 1753 }, { -131, -40, 1764 },
|
||||
{ -131, -31, 1802 }, { -132, -15, 1869 }, { -134, 0, 1935 }, { -134, 9, 1971 },
|
||||
{ -136, 10, 1978 }, { -140, 10, 1980 }, { -144, 9, 1976 }, { -149, 6, 1969 },
|
||||
{ -153, 3, 1958 }, { -154, 0, 1945 }, { -153, -2, 1931 }, { -147, -5, 1917 },
|
||||
{ -137, -7, 1904 }, { -109, -8, 1885 }, { -61, -8, 1857 }, { -9, -9, 1828 },
|
||||
{ 33, -9, 1805 }, { 52, -9, 1795 }, { 53, -9, 1794 }, { 55, -9, 1793 },
|
||||
{ 57, -9, 1792 }, { 59, -9, 1791 }, { 60, -9, 1790 }, { 62, -9, 1789 },
|
||||
{ 63, -9, 1789 }, { 64, -9, 1788 }, { 66, -9, 1787 }, { 67, -9, 1786 },
|
||||
{ 68, -9, 1786 }, { 69, -9, 1785 }, { 70, -9, 1785 }, { 71, -9, 1784 },
|
||||
{ 72, -9, 1784 }, { 73, -9, 1783 }, { 73, -9, 1783 }, { 74, -9, 1782 },
|
||||
{ 75, -9, 1782 }, { 75, -9, 1782 }, { 76, -9, 1781 }, { 76, -9, 1781 },
|
||||
{ 77, -9, 1781 }, { 77, -9, 1781 }, { 77, -9, 1780 }, { 78, -9, 1780 },
|
||||
{ 78, -9, 1780 }, { 78, -9, 1780 }, { 78, -9, 1780 }, { 78, -9, 1780 },
|
||||
{ 78, -9, 1780 }, { 78, -9, 1780 }, { 78, -9, 1780 }, { 78, -9, 1780 },
|
||||
{ 78, -9, 1780 }, { 78, -9, 1780 }, { 77, -9, 1780 }, { 77, -9, 1781 },
|
||||
{ 77, -9, 1781 }, { 77, -9, 1781 }, { 76, -9, 1781 }, { 76, -9, 1781 },
|
||||
{ 76, -9, 1782 }, { 75, -9, 1782 }, { 75, -9, 1782 }, { 74, -9, 1782 },
|
||||
{ 74, -9, 1783 }, { 73, -9, 1783 }, { 73, -9, 1783 }, { 72, -9, 1783 },
|
||||
{ 72, -9, 1784 }, { 71, -9, 1784 }, { 70, -9, 1784 }, { 70, -9, 1785 },
|
||||
{ 69, -9, 1785 }, { 69, -9, 1785 }, { 68, -9, 1786 }, { 67, -9, 1786 },
|
||||
{ 67, -9, 1787 }, { 66, -9, 1787 }, { 65, -9, 1787 }, { 65, -9, 1788 },
|
||||
{ 64, -9, 1788 }, { 64, -9, 1788 }, { 63, -9, 1789 }, { 62, -9, 1789 },
|
||||
{ 62, -9, 1789 }, { 61, -9, 1790 }, { 60, -9, 1790 }, { 60, -9, 1791 },
|
||||
{ 59, -9, 1791 }, { 59, -9, 1791 }, { 58, -9, 1792 }, { 58, -9, 1792 },
|
||||
{ 57, -9, 1792 }, { 56, -9, 1792 }, { 56, -9, 1793 }, { 55, -9, 1793 },
|
||||
{ 55, -9, 1793 }, { 55, -9, 1794 }, { 54, -9, 1794 }, { 54, -9, 1794 },
|
||||
{ 53, -9, 1794 }, { 53, -9, 1794 }, { 53, -9, 1795 }, { 52, -9, 1795 },
|
||||
{ 52, -9, 1795 }, { 52, -9, 1795 }, { 52, -9, 1795 }, { 52, -9, 1795 },
|
||||
{ 52, -9, 1795 }, { 52, -9, 1795 }, { 52, -9, 1795 }, { 52, -9, 1795 },
|
||||
{ 52, -9, 1795 }, { 53, -9, 1795 }, { 54, -9, 1794 }, { 55, -9, 1794 },
|
||||
{ 56, -9, 1794 }, { 57, -9, 1794 }, { 57, -9, 1793 }, { 58, -9, 1793 },
|
||||
{ 58, -9, 1793 }, { 57, -9, 1793 }, { 56, -9, 1794 }, { 54, -9, 1794 },
|
||||
{ 52, -9, 1795 }, { 48, -9, 1796 }, { 43, -9, 1798 }, { 37, -9, 1800 },
|
||||
{ 30, -9, 1802 }, { 23, -10, 1805 }, { 15, -10, 1807 }, { 7, -10, 1810 },
|
||||
{ 0, -10, 1813 }, { -8, -11, 1815 }, { -15, -11, 1818 }, { -21, -11, 1820 },
|
||||
{ -26, -11, 1821 }, { -30, -11, 1823 }, { -33, -11, 1824 }, { -34, -11, 1824 },
|
||||
{ -33, -11, 1823 }, { -29, -11, 1822 }, { -24, -11, 1820 }, { -17, -11, 1818 },
|
||||
{ -9, -11, 1815 }, { 0, -10, 1813 }, { 8, -10, 1810 }, { 18, -10, 1807 },
|
||||
{ 26, -10, 1804 }, { 34, -9, 1801 }, { 41, -9, 1799 }, { 47, -9, 1797 },
|
||||
{ 50, -9, 1796 }, { 52, -9, 1795 }, { 50, -9, 1796 }, { 47, -9, 1797 },
|
||||
{ 43, -9, 1798 }, { 36, -9, 1800 }, { 29, -9, 1803 }, { 21, -10, 1805 },
|
||||
{ 13, -10, 1808 }, { 4, -10, 1811 }, { -3, -10, 1814 }, { -11, -11, 1816 },
|
||||
{ -19, -11, 1819 }, { -25, -11, 1821 }, { -30, -11, 1822 }, { -33, -11, 1823 },
|
||||
{ -34, -11, 1824 }, { -33, -11, 1823 }, { -29, -11, 1822 }, { -24, -11, 1820 },
|
||||
{ -17, -11, 1818 }, { -9, -11, 1815 }, { 0, -10, 1813 }, { 8, -10, 1810 },
|
||||
{ 18, -10, 1807 }, { 26, -10, 1804 }, { 34, -9, 1801 }, { 41, -9, 1799 },
|
||||
{ 47, -9, 1797 }, { 50, -9, 1796 }, { 52, -9, 1795 }, { 50, -9, 1796 },
|
||||
{ 46, -9, 1797 }, { 40, -9, 1799 }, { 32, -9, 1802 }, { 23, -10, 1805 },
|
||||
{ 13, -10, 1808 }, { 3, -10, 1811 }, { -5, -11, 1814 }, { -14, -11, 1817 },
|
||||
{ -22, -11, 1820 }, { -28, -11, 1822 }, { -32, -11, 1823 }, { -34, -11, 1824 },
|
||||
{ -33, -11, 1824 }, { -30, -11, 1823 }, { -25, -11, 1821 }, { -18, -11, 1820 },
|
||||
{ -11, -11, 1818 }, { -3, -11, 1816 }, { 5, -10, 1813 }, { 14, -10, 1811 },
|
||||
{ 22, -10, 1808 }, { 31, -10, 1805 }, { 38, -9, 1803 }, { 44, -9, 1801 },
|
||||
{ 48, -9, 1798 }, { 51, -9, 1797 }, { 52, -9, 1795 }, { 50, -9, 1794 },
|
||||
{ 47, -9, 1793 }, { 43, -9, 1792 }, { 37, -9, 1791 }, { 31, -9, 1789 },
|
||||
{ 24, -9, 1788 }, { 16, -9, 1787 }, { 8, -9, 1787 }, { 0, -9, 1786 },
|
||||
{ -8, -9, 1785 }, { -17, -9, 1785 }, { -25, -9, 1784 }, { -32, -9, 1784 },
|
||||
{ -39, -9, 1784 }, { -45, -9, 1784 }, { -50, -9, 1784 }, { -54, -9, 1785 },
|
||||
{ -56, -9, 1785 }, { -59, -9, 1786 }, { -61, -9, 1787 }, { -63, -8, 1788 },
|
||||
{ -65, -8, 1789 }, { -67, -8, 1790 }, { -69, -8, 1791 }, { -70, -8, 1792 },
|
||||
{ -71, -8, 1793 }, { -72, -8, 1795 }, { -73, -8, 1796 }, { -74, -7, 1798 },
|
||||
{ -74, -7, 1799 }, { -75, -7, 1801 }, { -75, -7, 1802 }, { -76, -7, 1804 },
|
||||
{ -76, -7, 1805 }, { -77, -7, 1807 }, { -77, -7, 1808 }, { -77, -6, 1809 },
|
||||
{ -77, -6, 1811 }, { -77, -6, 1812 }, { -78, -6, 1813 }, { -78, -6, 1814 },
|
||||
{ -78, -6, 1815 }, { -79, -6, 1816 }, { -79, -6, 1817 }, { -80, -6, 1818 },
|
||||
{ -80, -6, 1819 }, { -82, -6, 1819 }, { -84, -6, 1819 }, { -86, -6, 1819 },
|
||||
{ -89, -6, 1819 }, { -92, -6, 1819 }, { -94, -6, 1819 }, { -97, -6, 1819 },
|
||||
{ -99, -6, 1818 }, { -102, -6, 1818 }, { -103, -6, 1818 }, { -104, -6, 1817 },
|
||||
{ -105, -6, 1817 }, { -104, -6, 1817 }, { -103, -6, 1817 }, { -101, -6, 1817 },
|
||||
{ -98, -6, 1817 }, { -93, -6, 1817 }, { -87, -6, 1817 }, { -80, -6, 1818 },
|
||||
{ -68, -5, 1819 }, { -51, -5, 1821 }, { -30, -5, 1823 }, { -5, -4, 1826 },
|
||||
{ 21, -4, 1829 }, { 50, -3, 1831 }, { 78, -3, 1834 }, { 105, -3, 1836 },
|
||||
{ 131, -2, 1838 }, { 153, -2, 1839 }, { 171, -1, 1840 }, { 184, -1, 1839 },
|
||||
{ 193, -1, 1837 }, { 200, -1, 1834 }, { 206, -1, 1831 }, { 210, 0, 1827 },
|
||||
{ 214, 0, 1822 }, { 216, 0, 1818 }, { 217, 0, 1813 }, { 218, 0, 1808 },
|
||||
{ 218, 0, 1803 }, { 217, 0, 1798 }, { 216, 0, 1793 }, { 215, 0, 1788 },
|
||||
{ 214, 0, 1784 }, { 212, 0, 1781 }, { 211, 0, 1778 }, { 210, 0, 1775 },
|
||||
{ 209, 0, 1774 }, { 209, 0, 1773 }, { 208, 0, 1774 }, { 208, 0, 1774 },
|
||||
{ 208, 0, 1776 }, { 207, 0, 1778 }, { 206, 0, 1780 }, { 205, 0, 1783 },
|
||||
{ 204, 0, 1786 }, { 203, 0, 1789 }, { 202, -1, 1792 }, { 201, -1, 1796 },
|
||||
{ 199, -1, 1800 }, { 198, -1, 1804 }, { 197, -1, 1808 }, { 195, -2, 1812 },
|
||||
{ 194, -2, 1816 }, { 192, -2, 1819 }, { 191, -2, 1823 }, { 190, -2, 1826 },
|
||||
{ 188, -2, 1830 }, { 187, -2, 1832 }, { 186, -2, 1835 }, { 185, -1, 1837 },
|
||||
{ 184, -1, 1839 }, { 183, 0, 1835 }, { 183, 2, 1826 }, { 183, 6, 1816 },
|
||||
{ 184, 7, 1811 }, { 184, 5, 1818 }, { 184, 0, 1831 }, { 184, -1, 1839 },
|
||||
{ 184, 0, 1834 }, { 184, 3, 1824 }, { 184, 5, 1817 }, { 184, 5, 1819 },
|
||||
{ 184, 3, 1824 }, { 184, 1, 1828 }, { 184, 1, 1829 }, { 184, 1, 1829 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 }, { 184, 1, 1828 },
|
||||
{ 189, 2, 1828 }, { 184, 1, 1828 }, { 158, 1, 1827 }, { 128, 0, 1826 },
|
||||
{ 94, 0, 1824 }, { 59, -1, 1823 }, { 24, -2, 1822 }, { -8, -3, 1821 },
|
||||
{ -36, -4, 1820 }, { -59, -5, 1819 }, { -74, -5, 1818 }, { -80, -6, 1818 },
|
||||
};
|
||||
|
||||
static s16 animdata_mario_lips_1_2[][3] = {
|
||||
{ -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 },
|
||||
{ -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 },
|
||||
{ -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 },
|
||||
{ -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 },
|
||||
{ -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 },
|
||||
{ -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 },
|
||||
{ -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 },
|
||||
{ -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 },
|
||||
{ -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 }, { -97, -93, 1924 },
|
||||
{ -97, -93, 1924 }, { -97, -92, 1924 }, { -97, -91, 1922 }, { -97, -90, 1921 }, { -96, -88, 1919 },
|
||||
{ -96, -86, 1917 }, { -95, -84, 1914 }, { -95, -82, 1912 }, { -95, -79, 1909 }, { -94, -77, 1906 },
|
||||
{ -94, -74, 1904 }, { -93, -72, 1901 }, { -93, -70, 1898 }, { -92, -68, 1895 }, { -92, -66, 1893 },
|
||||
{ -92, -64, 1891 }, { -91, -63, 1889 }, { -91, -63, 1887 }, { -91, -62, 1885 }, { -91, -62, 1884 },
|
||||
{ -90, -62, 1882 }, { -90, -62, 1881 }, { -90, -62, 1880 }, { -90, -62, 1878 }, { -90, -62, 1877 },
|
||||
{ -90, -62, 1875 }, { -89, -63, 1874 }, { -89, -63, 1873 }, { -89, -64, 1871 }, { -89, -65, 1870 },
|
||||
{ -89, -65, 1869 }, { -89, -66, 1867 }, { -89, -66, 1866 }, { -88, -67, 1865 }, { -88, -68, 1864 },
|
||||
{ -88, -68, 1863 }, { -88, -69, 1862 }, { -88, -69, 1861 }, { -88, -69, 1860 }, { -88, -70, 1859 },
|
||||
{ -88, -70, 1858 }, { -88, -70, 1857 }, { -88, -70, 1856 }, { -87, -70, 1855 }, { -87, -69, 1855 },
|
||||
{ -87, -69, 1854 }, { -87, -68, 1853 }, { -87, -68, 1853 }, { -87, -67, 1852 }, { -87, -66, 1851 },
|
||||
{ -87, -66, 1851 }, { -86, -65, 1850 }, { -86, -64, 1849 }, { -86, -63, 1849 }, { -86, -63, 1848 },
|
||||
{ -86, -62, 1847 }, { -86, -61, 1847 }, { -86, -60, 1846 }, { -86, -59, 1845 }, { -85, -58, 1845 },
|
||||
{ -85, -57, 1844 }, { -85, -56, 1843 }, { -85, -55, 1842 }, { -85, -54, 1842 }, { -85, -53, 1841 },
|
||||
{ -85, -52, 1840 }, { -85, -51, 1840 }, { -84, -50, 1839 }, { -84, -49, 1839 }, { -84, -47, 1838 },
|
||||
{ -84, -46, 1837 }, { -84, -45, 1837 }, { -84, -44, 1836 }, { -84, -43, 1835 }, { -83, -42, 1835 },
|
||||
{ -83, -41, 1834 }, { -83, -39, 1833 }, { -83, -38, 1833 }, { -83, -37, 1832 }, { -83, -36, 1832 },
|
||||
{ -83, -35, 1831 }, { -83, -34, 1831 }, { -82, -33, 1830 }, { -82, -31, 1829 }, { -82, -30, 1829 },
|
||||
{ -82, -29, 1828 }, { -82, -28, 1828 }, { -82, -27, 1827 }, { -82, -26, 1827 }, { -82, -25, 1826 },
|
||||
{ -81, -24, 1826 }, { -81, -23, 1825 }, { -81, -22, 1825 }, { -81, -21, 1824 }, { -81, -20, 1824 },
|
||||
{ -81, -19, 1824 }, { -81, -18, 1823 }, { -81, -17, 1823 }, { -81, -16, 1822 }, { -81, -15, 1822 },
|
||||
{ -80, -15, 1822 }, { -80, -14, 1821 }, { -80, -13, 1821 }, { -80, -12, 1821 }, { -80, -12, 1820 },
|
||||
{ -80, -11, 1820 }, { -80, -10, 1820 }, { -80, -10, 1820 }, { -80, -9, 1819 }, { -80, -9, 1819 },
|
||||
{ -80, -8, 1819 }, { -80, -8, 1819 }, { -80, -7, 1819 }, { -80, -7, 1818 }, { -80, -7, 1818 },
|
||||
{ -80, -6, 1818 }, { -80, -6, 1818 }, { -80, -6, 1818 }, { -80, -6, 1818 }, { -80, -6, 1818 },
|
||||
{ -80, -6, 1818 },
|
||||
};
|
||||
|
||||
struct AnimDataInfo anim_mario_lips_1[] = {
|
||||
{ ARRAY_COUNT(animdata_mario_lips_1_1), GD_ANIM_ROT3S, animdata_mario_lips_1_1 },
|
||||
{ ARRAY_COUNT(animdata_mario_lips_1_2), GD_ANIM_ROT3S, animdata_mario_lips_1_2 },
|
||||
END_ANIMDATA_INFO_ARR,
|
||||
};
|
||||
@@ -0,0 +1,264 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "animdata.h"
|
||||
#include "../gd_types.h"
|
||||
|
||||
static s16 animdata_mario_lips_2_1[][3] = {
|
||||
{ -97, -3, -1771 }, { -97, -3, -1772 }, { -97, -3, -1772 }, { -97, -4, -1773 },
|
||||
{ -97, -4, -1773 }, { -97, -4, -1774 }, { -97, -4, -1775 }, { -97, -4, -1776 },
|
||||
{ -97, -4, -1777 }, { -97, -5, -1778 }, { -97, -5, -1779 }, { -97, -5, -1780 },
|
||||
{ -97, -5, -1781 }, { -97, -5, -1781 }, { -97, -5, -1781 }, { -97, -5, -1781 },
|
||||
{ -97, -5, -1781 }, { -97, -5, -1780 }, { -97, -5, -1778 }, { -97, -4, -1777 },
|
||||
{ -97, -4, -1774 }, { -97, -3, -1771 }, { -97, -2, -1764 }, { -97, 0, -1750 },
|
||||
{ -97, 2, -1733 }, { -96, 5, -1714 }, { -96, 8, -1698 }, { -96, 10, -1686 },
|
||||
{ -96, 11, -1681 }, { -96, 11, -1683 }, { -96, 10, -1690 }, { -96, 8, -1699 },
|
||||
{ -96, 6, -1711 }, { -97, 4, -1723 }, { -97, 2, -1736 }, { -97, 0, -1748 },
|
||||
{ -97, -1, -1759 }, { -97, -3, -1767 }, { -97, -3, -1771 }, { -97, -4, -1773 },
|
||||
{ -97, -4, -1775 }, { -97, -4, -1777 }, { -97, -5, -1778 }, { -97, -5, -1779 },
|
||||
{ -97, -5, -1780 }, { -97, -5, -1781 }, { -97, -5, -1781 }, { -97, -5, -1781 },
|
||||
{ -97, -5, -1781 }, { -97, -5, -1781 }, { -97, -5, -1781 }, { -97, -5, -1781 },
|
||||
{ -97, -5, -1780 }, { -97, -5, -1780 }, { -97, -5, -1779 }, { -97, -5, -1779 },
|
||||
{ -97, -4, -1778 }, { -97, -4, -1777 }, { -97, -4, -1776 }, { -97, -4, -1776 },
|
||||
{ -97, -4, -1775 }, { -97, -4, -1774 }, { -97, -4, -1774 }, { -97, -4, -1773 },
|
||||
{ -97, -4, -1772 }, { -97, -3, -1772 }, { -97, -3, -1772 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1772 }, { -97, -4, -1773 }, { -97, -4, -1775 },
|
||||
{ -97, -4, -1776 }, { -97, -4, -1777 }, { -97, -4, -1777 }, { -97, -4, -1777 },
|
||||
{ -97, -4, -1778 }, { -97, -4, -1778 }, { -97, -4, -1778 }, { -97, -5, -1778 },
|
||||
{ -97, -5, -1778 }, { -97, -5, -1778 }, { -97, -5, -1778 }, { -97, -5, -1778 },
|
||||
{ -97, -5, -1778 }, { -97, -5, -1778 }, { -97, -4, -1778 }, { -97, -4, -1778 },
|
||||
{ -97, -4, -1778 }, { -97, -4, -1777 }, { -97, -4, -1777 }, { -97, -4, -1777 },
|
||||
{ -97, -4, -1776 }, { -97, -4, -1775 }, { -97, -4, -1774 }, { -97, -4, -1773 },
|
||||
{ -97, -3, -1772 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1772 }, { -97, -4, -1773 }, { -97, -4, -1775 },
|
||||
{ -97, -4, -1778 }, { -97, -5, -1781 }, { -97, -5, -1784 }, { -98, -6, -1788 },
|
||||
{ -98, -7, -1791 }, { -98, -7, -1795 }, { -98, -8, -1799 }, { -98, -8, -1803 },
|
||||
{ -98, -9, -1806 }, { -98, -9, -1809 }, { -99, -10, -1811 }, { -99, -10, -1813 },
|
||||
{ -99, -10, -1814 }, { -99, -10, -1814 }, { -99, -10, -1813 }, { -99, -10, -1811 },
|
||||
{ -98, -9, -1808 }, { -98, -9, -1804 }, { -98, -8, -1798 }, { -98, -7, -1791 },
|
||||
{ -97, -5, -1782 }, { -97, -3, -1771 }, { -95, 3, -1728 }, { -91, 17, -1641 },
|
||||
{ -87, 33, -1542 }, { -83, 46, -1460 }, { -82, 52, -1426 }, { -82, 50, -1438 },
|
||||
{ -84, 45, -1470 }, { -86, 37, -1517 }, { -88, 28, -1573 }, { -91, 18, -1632 },
|
||||
{ -93, 9, -1689 }, { -95, 1, -1737 }, { -97, -3, -1771 }, { -98, -7, -1792 },
|
||||
{ -98, -9, -1804 }, { -99, -10, -1810 }, { -99, -10, -1811 }, { -99, -10, -1809 },
|
||||
{ -99, -9, -1807 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -100, -9, -1805 }, { -100, -9, -1804 }, { -100, -9, -1804 },
|
||||
{ -100, -9, -1803 }, { -100, -9, -1802 }, { -101, -9, -1801 }, { -101, -9, -1800 },
|
||||
{ -101, -9, -1799 }, { -101, -8, -1798 }, { -102, -8, -1797 }, { -102, -8, -1796 },
|
||||
{ -102, -8, -1795 }, { -102, -8, -1794 }, { -103, -8, -1793 }, { -103, -8, -1791 },
|
||||
{ -103, -7, -1790 }, { -103, -7, -1789 }, { -103, -7, -1787 }, { -103, -7, -1786 },
|
||||
{ -103, -7, -1785 }, { -103, -6, -1783 }, { -102, -6, -1782 }, { -102, -6, -1781 },
|
||||
{ -102, -6, -1779 }, { -101, -5, -1778 }, { -101, -5, -1777 }, { -100, -5, -1776 },
|
||||
{ -100, -4, -1775 }, { -99, -4, -1773 }, { -98, -4, -1772 }, { -97, -3, -1771 },
|
||||
{ -95, -3, -1770 }, { -92, -2, -1769 }, { -88, -1, -1769 }, { -83, 0, -1768 },
|
||||
{ -78, 0, -1767 }, { -72, 1, -1766 }, { -67, 2, -1765 }, { -62, 3, -1764 },
|
||||
{ -57, 4, -1763 }, { -54, 5, -1762 }, { -51, 6, -1761 }, { -50, 6, -1759 },
|
||||
{ -48, 6, -1758 }, { -47, 7, -1756 }, { -46, 7, -1754 }, { -45, 8, -1752 },
|
||||
{ -45, 8, -1749 }, { -45, 8, -1747 }, { -45, 8, -1745 }, { -45, 8, -1743 },
|
||||
{ -45, 8, -1741 }, { -46, 8, -1740 }, { -47, 8, -1739 }, { -48, 8, -1738 },
|
||||
{ -49, 8, -1738 }, { -51, 8, -1738 }, { -54, 7, -1739 }, { -58, 6, -1742 },
|
||||
{ -63, 5, -1745 }, { -68, 3, -1749 }, { -74, 2, -1754 }, { -80, 0, -1758 },
|
||||
{ -86, 0, -1763 }, { -91, -2, -1767 }, { -94, -3, -1770 }, { -97, -3, -1771 },
|
||||
{ -98, -4, -1772 }, { -100, -4, -1773 }, { -101, -4, -1774 }, { -102, -5, -1774 },
|
||||
{ -103, -5, -1774 }, { -104, -5, -1774 }, { -104, -5, -1774 }, { -105, -5, -1773 },
|
||||
{ -105, -5, -1773 }, { -105, -5, -1773 }, { -105, -5, -1772 }, { -104, -5, -1772 },
|
||||
{ -104, -5, -1771 }, { -103, -5, -1771 }, { -102, -4, -1771 }, { -101, -4, -1771 },
|
||||
{ -100, -4, -1771 }, { -99, -4, -1771 }, { -97, -3, -1771 }, { -92, -3, -1773 },
|
||||
{ -84, -1, -1775 }, { -74, 0, -1777 }, { -64, 1, -1780 }, { -56, 3, -1782 },
|
||||
{ -52, 3, -1784 }, { -50, 4, -1784 }, { -49, 4, -1784 }, { -48, 4, -1785 },
|
||||
{ -47, 4, -1785 }, { -47, 4, -1785 }, { -46, 4, -1785 }, { -46, 4, -1785 },
|
||||
{ -47, 4, -1785 }, { -47, 4, -1785 }, { -47, 4, -1785 }, { -48, 4, -1785 },
|
||||
{ -48, 4, -1784 }, { -49, 4, -1784 }, { -49, 4, -1784 }, { -50, 4, -1784 },
|
||||
{ -50, 4, -1784 }, { -51, 4, -1784 }, { -51, 4, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 }, { -52, 3, -1784 },
|
||||
{ -52, 3, -1785 }, { -52, 3, -1787 }, { -52, 3, -1791 }, { -52, 2, -1795 },
|
||||
{ -52, 2, -1800 }, { -52, 2, -1803 }, { -52, 2, -1806 }, { -52, 1, -1807 },
|
||||
{ -52, 2, -1806 }, { -52, 2, -1802 }, { -52, 2, -1795 }, { -52, 3, -1784 },
|
||||
{ -51, 7, -1744 }, { -49, 13, -1674 }, { -47, 19, -1606 }, { -46, 22, -1572 },
|
||||
{ -46, 22, -1570 }, { -45, 22, -1576 }, { -44, 21, -1589 }, { -44, 20, -1606 },
|
||||
{ -44, 18, -1626 }, { -44, 16, -1648 }, { -45, 15, -1670 }, { -47, 12, -1691 },
|
||||
{ -51, 10, -1709 }, { -58, 7, -1730 }, { -70, 2, -1755 }, { -84, -3, -1779 },
|
||||
{ -94, -7, -1798 }, { -99, -9, -1805 }, { -100, -9, -1806 }, { -100, -9, -1807 },
|
||||
{ -101, -10, -1808 }, { -101, -10, -1809 }, { -101, -10, -1810 }, { -102, -10, -1811 },
|
||||
{ -102, -10, -1811 }, { -102, -10, -1812 }, { -103, -11, -1813 }, { -103, -11, -1813 },
|
||||
{ -103, -11, -1814 }, { -104, -11, -1814 }, { -104, -11, -1815 }, { -104, -11, -1815 },
|
||||
{ -104, -11, -1816 }, { -105, -11, -1816 }, { -105, -11, -1817 }, { -105, -12, -1817 },
|
||||
{ -105, -12, -1817 }, { -105, -12, -1818 }, { -105, -12, -1818 }, { -106, -12, -1818 },
|
||||
{ -106, -12, -1818 }, { -106, -12, -1818 }, { -106, -12, -1819 }, { -106, -12, -1819 },
|
||||
{ -106, -12, -1819 }, { -106, -12, -1819 }, { -106, -12, -1819 }, { -106, -12, -1819 },
|
||||
{ -106, -12, -1819 }, { -106, -12, -1819 }, { -106, -12, -1819 }, { -106, -12, -1819 },
|
||||
{ -106, -12, -1819 }, { -106, -12, -1819 }, { -106, -12, -1819 }, { -106, -12, -1819 },
|
||||
{ -106, -12, -1818 }, { -106, -12, -1818 }, { -106, -12, -1818 }, { -105, -12, -1818 },
|
||||
{ -105, -12, -1818 }, { -105, -12, -1817 }, { -105, -12, -1817 }, { -105, -12, -1817 },
|
||||
{ -105, -11, -1817 }, { -105, -11, -1817 }, { -105, -11, -1816 }, { -104, -11, -1816 },
|
||||
{ -104, -11, -1816 }, { -104, -11, -1815 }, { -104, -11, -1815 }, { -104, -11, -1815 },
|
||||
{ -104, -11, -1815 }, { -104, -11, -1814 }, { -103, -11, -1814 }, { -103, -11, -1814 },
|
||||
{ -103, -11, -1813 }, { -103, -11, -1813 }, { -103, -11, -1813 }, { -103, -11, -1812 },
|
||||
{ -102, -10, -1812 }, { -102, -10, -1812 }, { -102, -10, -1811 }, { -102, -10, -1811 },
|
||||
{ -102, -10, -1811 }, { -102, -10, -1810 }, { -101, -10, -1810 }, { -101, -10, -1810 },
|
||||
{ -101, -10, -1809 }, { -101, -10, -1809 }, { -101, -10, -1809 }, { -101, -10, -1809 },
|
||||
{ -101, -10, -1808 }, { -100, -10, -1808 }, { -100, -10, -1808 }, { -100, -10, -1807 },
|
||||
{ -100, -9, -1807 }, { -100, -9, -1807 }, { -100, -9, -1807 }, { -100, -9, -1807 },
|
||||
{ -100, -9, -1806 }, { -100, -9, -1806 }, { -99, -9, -1806 }, { -99, -9, -1806 },
|
||||
{ -99, -9, -1806 }, { -99, -9, -1806 }, { -99, -9, -1806 }, { -99, -9, -1806 },
|
||||
{ -99, -9, -1806 }, { -99, -9, -1806 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1805 }, { -99, -9, -1806 },
|
||||
{ -99, -9, -1806 }, { -99, -9, -1806 }, { -99, -9, -1806 }, { -99, -9, -1806 },
|
||||
{ -99, -9, -1806 }, { -99, -9, -1806 }, { -99, -9, -1806 }, { -99, -9, -1806 },
|
||||
{ -99, -9, -1807 }, { -99, -9, -1807 }, { -99, -9, -1807 }, { -99, -9, -1807 },
|
||||
{ -99, -9, -1807 }, { -99, -9, -1807 }, { -99, -9, -1807 }, { -99, -9, -1807 },
|
||||
{ -99, -9, -1807 }, { -99, -9, -1807 }, { -99, -9, -1807 }, { -99, -9, -1807 },
|
||||
{ -99, -9, -1807 }, { -99, -9, -1807 }, { -99, -9, -1807 }, { -99, -9, -1807 },
|
||||
{ -99, -9, -1806 }, { -99, -9, -1806 }, { -99, -9, -1805 }, { -99, -9, -1805 },
|
||||
{ -99, -9, -1804 }, { -99, -9, -1804 }, { -99, -9, -1803 }, { -99, -9, -1803 },
|
||||
{ -99, -9, -1802 }, { -99, -8, -1801 }, { -99, -8, -1801 }, { -99, -8, -1800 },
|
||||
{ -99, -8, -1799 }, { -99, -8, -1799 }, { -99, -8, -1798 }, { -99, -8, -1797 },
|
||||
{ -99, -8, -1796 }, { -98, -7, -1795 }, { -98, -7, -1794 }, { -98, -7, -1794 },
|
||||
{ -98, -7, -1793 }, { -98, -7, -1792 }, { -98, -7, -1791 }, { -98, -7, -1790 },
|
||||
{ -98, -6, -1789 }, { -98, -6, -1788 }, { -98, -6, -1787 }, { -98, -6, -1787 },
|
||||
{ -98, -6, -1786 }, { -98, -6, -1785 }, { -98, -5, -1784 }, { -98, -5, -1783 },
|
||||
{ -98, -5, -1782 }, { -98, -5, -1781 }, { -97, -5, -1780 }, { -97, -5, -1780 },
|
||||
{ -97, -5, -1779 }, { -97, -4, -1778 }, { -97, -4, -1777 }, { -97, -4, -1777 },
|
||||
{ -97, -4, -1776 }, { -97, -4, -1775 }, { -97, -4, -1774 }, { -97, -4, -1774 },
|
||||
{ -97, -4, -1773 }, { -97, -4, -1772 }, { -97, -3, -1772 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1770 }, { -97, -3, -1770 },
|
||||
{ -97, -3, -1770 }, { -97, -3, -1770 }, { -97, -3, -1770 }, { -97, -3, -1770 },
|
||||
{ -97, -3, -1770 }, { -97, -3, -1770 }, { -97, -3, -1770 }, { -97, -3, -1770 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
};
|
||||
|
||||
static s16 animdata_mario_lips_2_2[][3] = {
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 },
|
||||
{ -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1839 }, { -96, -15, -1838 },
|
||||
{ -96, -15, -1837 }, { -96, -14, -1836 }, { -96, -14, -1835 }, { -96, -14, -1834 },
|
||||
{ -96, -14, -1832 }, { -96, -13, -1831 }, { -96, -13, -1829 }, { -96, -13, -1827 },
|
||||
{ -96, -13, -1825 }, { -96, -12, -1824 }, { -96, -12, -1822 }, { -96, -12, -1820 },
|
||||
{ -96, -11, -1818 }, { -96, -11, -1817 }, { -96, -11, -1815 }, { -96, -11, -1814 },
|
||||
{ -96, -10, -1812 }, { -96, -10, -1810 }, { -96, -10, -1808 }, { -96, -9, -1807 },
|
||||
{ -96, -9, -1805 }, { -96, -9, -1803 }, { -96, -8, -1800 }, { -96, -8, -1798 },
|
||||
{ -96, -8, -1796 }, { -96, -7, -1794 }, { -96, -7, -1792 }, { -96, -7, -1790 },
|
||||
{ -96, -6, -1788 }, { -96, -6, -1786 }, { -97, -6, -1784 }, { -97, -5, -1782 },
|
||||
{ -97, -5, -1780 }, { -97, -5, -1779 }, { -97, -4, -1777 }, { -97, -4, -1776 },
|
||||
{ -97, -4, -1775 }, { -97, -4, -1774 }, { -97, -4, -1773 }, { -97, -3, -1772 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1772 }, { -97, -4, -1772 }, { -97, -4, -1773 },
|
||||
{ -97, -4, -1774 }, { -97, -4, -1775 }, { -97, -4, -1776 }, { -97, -4, -1777 },
|
||||
{ -97, -5, -1778 }, { -97, -5, -1779 }, { -97, -5, -1781 }, { -97, -5, -1782 },
|
||||
{ -96, -6, -1784 }, { -96, -6, -1786 }, { -96, -6, -1787 }, { -96, -6, -1789 },
|
||||
{ -96, -7, -1790 }, { -96, -7, -1792 }, { -96, -7, -1794 }, { -96, -8, -1796 },
|
||||
{ -96, -8, -1797 }, { -96, -8, -1799 }, { -96, -8, -1801 }, { -96, -9, -1802 },
|
||||
{ -96, -9, -1804 }, { -96, -9, -1805 }, { -96, -9, -1807 }, { -96, -10, -1808 },
|
||||
{ -96, -10, -1809 }, { -96, -10, -1810 }, { -96, -10, -1811 }, { -96, -10, -1812 },
|
||||
{ -96, -11, -1813 }, { -96, -11, -1814 }, { -96, -11, -1815 }, { -96, -11, -1815 },
|
||||
{ -96, -11, -1815 }, { -96, -11, -1815 }, { -96, -11, -1815 }, { -96, -11, -1815 },
|
||||
{ -96, -11, -1814 }, { -96, -11, -1814 }, { -96, -10, -1813 }, { -96, -10, -1812 },
|
||||
{ -96, -10, -1811 }, { -96, -10, -1810 }, { -96, -10, -1808 }, { -96, -9, -1807 },
|
||||
{ -96, -9, -1806 }, { -96, -9, -1804 }, { -96, -9, -1802 }, { -96, -8, -1801 },
|
||||
{ -96, -8, -1799 }, { -96, -8, -1797 }, { -96, -7, -1795 }, { -96, -7, -1793 },
|
||||
{ -96, -7, -1792 }, { -97, -7, -1790 }, { -97, -6, -1788 }, { -97, -6, -1786 },
|
||||
{ -97, -6, -1784 }, { -97, -5, -1783 }, { -97, -5, -1781 }, { -97, -5, -1780 },
|
||||
{ -97, -5, -1778 }, { -97, -4, -1777 }, { -97, -4, -1776 }, { -97, -4, -1775 },
|
||||
{ -97, -4, -1774 }, { -97, -4, -1773 }, { -97, -4, -1772 }, { -97, -3, -1772 },
|
||||
{ -97, -3, -1771 }, { -97, -3, -1771 },
|
||||
};
|
||||
|
||||
struct AnimDataInfo anim_mario_lips_2[] = {
|
||||
{ ARRAY_COUNT(animdata_mario_lips_2_1), GD_ANIM_ROT3S, animdata_mario_lips_2_1 },
|
||||
{ ARRAY_COUNT(animdata_mario_lips_2_2), GD_ANIM_ROT3S, animdata_mario_lips_2_2 },
|
||||
END_ANIMDATA_INFO_ARR,
|
||||
};
|
||||
@@ -0,0 +1,264 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "animdata.h"
|
||||
#include "../gd_types.h"
|
||||
|
||||
static s16 animdata_mario_mustache_left_1[][3] = {
|
||||
{ -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1800, -1645, -292 }, { -1800, -1645, -291 },
|
||||
{ -1800, -1645, -290 }, { -1800, -1645, -289 }, { -1801, -1645, -287 }, { -1801, -1645, -286 },
|
||||
{ -1802, -1645, -284 }, { -1802, -1645, -283 }, { -1802, -1644, -281 }, { -1803, -1644, -280 },
|
||||
{ -1803, -1644, -280 }, { -1803, -1644, -279 }, { -1803, -1644, -279 }, { -1803, -1644, -280 },
|
||||
{ -1802, -1644, -281 }, { -1802, -1645, -283 }, { -1801, -1645, -285 }, { -1800, -1645, -289 },
|
||||
{ -1799, -1645, -293 }, { -1796, -1645, -305 }, { -1790, -1646, -329 }, { -1782, -1646, -357 },
|
||||
{ -1775, -1647, -385 }, { -1770, -1648, -405 }, { -1768, -1648, -412 }, { -1771, -1648, -402 },
|
||||
{ -1777, -1647, -379 }, { -1785, -1647, -349 }, { -1793, -1646, -317 }, { -1800, -1645, -289 },
|
||||
{ -1806, -1645, -269 }, { -1806, -1645, -269 }, { -1802, -1645, -284 }, { -1799, -1645, -293 },
|
||||
{ -1799, -1645, -294 }, { -1799, -1645, -294 }, { -1799, -1645, -295 }, { -1799, -1645, -295 },
|
||||
{ -1799, -1645, -295 }, { -1799, -1645, -296 }, { -1799, -1645, -296 }, { -1798, -1645, -296 },
|
||||
{ -1798, -1645, -296 }, { -1798, -1645, -296 }, { -1798, -1645, -296 }, { -1798, -1645, -296 },
|
||||
{ -1798, -1645, -296 }, { -1798, -1645, -296 }, { -1799, -1645, -296 }, { -1799, -1645, -296 },
|
||||
{ -1799, -1645, -296 }, { -1799, -1645, -295 }, { -1799, -1645, -295 }, { -1799, -1645, -295 },
|
||||
{ -1799, -1645, -295 }, { -1799, -1645, -295 }, { -1799, -1645, -294 }, { -1799, -1645, -294 },
|
||||
{ -1799, -1645, -294 }, { -1799, -1645, -294 }, { -1799, -1645, -293 }, { -1799, -1645, -293 },
|
||||
{ -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1799, -1645, -293 },
|
||||
{ -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1799, -1645, -293 },
|
||||
{ -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1799, -1645, -293 },
|
||||
{ -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1799, -1645, -293 },
|
||||
{ -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1800, -1645, -292 }, { -1800, -1645, -289 },
|
||||
{ -1801, -1645, -286 }, { -1802, -1645, -283 }, { -1803, -1644, -281 }, { -1802, -1644, -281 },
|
||||
{ -1801, -1645, -285 }, { -1799, -1645, -293 }, { -1793, -1645, -317 }, { -1782, -1647, -358 },
|
||||
{ -1772, -1648, -397 }, { -1766, -1648, -418 }, { -1765, -1648, -423 }, { -1764, -1649, -428 },
|
||||
{ -1763, -1649, -432 }, { -1762, -1649, -435 }, { -1761, -1649, -438 }, { -1760, -1649, -440 },
|
||||
{ -1760, -1649, -441 }, { -1760, -1649, -442 }, { -1760, -1649, -442 }, { -1760, -1649, -442 },
|
||||
{ -1760, -1649, -441 }, { -1761, -1649, -439 }, { -1761, -1649, -437 }, { -1762, -1649, -434 },
|
||||
{ -1763, -1649, -431 }, { -1764, -1649, -427 }, { -1765, -1648, -423 }, { -1766, -1648, -418 },
|
||||
{ -1770, -1648, -405 }, { -1776, -1647, -381 }, { -1784, -1646, -352 }, { -1791, -1646, -324 },
|
||||
{ -1797, -1645, -302 }, { -1799, -1645, -293 }, { -1799, -1645, -293 }, { -1799, -1645, -293 },
|
||||
{ -1799, -1645, -295 }, { -1798, -1645, -298 }, { -1797, -1645, -301 }, { -1796, -1645, -306 },
|
||||
{ -1795, -1645, -310 }, { -1793, -1645, -316 }, { -1792, -1645, -322 }, { -1790, -1645, -328 },
|
||||
{ -1788, -1646, -334 }, { -1787, -1646, -341 }, { -1785, -1646, -347 }, { -1783, -1646, -354 },
|
||||
{ -1781, -1646, -360 }, { -1780, -1646, -366 }, { -1778, -1646, -372 }, { -1777, -1646, -378 },
|
||||
{ -1775, -1647, -383 }, { -1774, -1647, -387 }, { -1773, -1647, -391 }, { -1772, -1647, -394 },
|
||||
{ -1772, -1647, -397 }, { -1771, -1647, -399 }, { -1771, -1647, -401 }, { -1770, -1647, -403 },
|
||||
{ -1770, -1647, -404 }, { -1770, -1647, -405 }, { -1769, -1647, -405 }, { -1769, -1647, -405 },
|
||||
{ -1769, -1647, -405 }, { -1770, -1647, -405 }, { -1770, -1647, -404 }, { -1770, -1647, -403 },
|
||||
{ -1770, -1647, -401 }, { -1771, -1647, -399 }, { -1772, -1647, -397 }, { -1772, -1647, -394 },
|
||||
{ -1773, -1647, -391 }, { -1774, -1647, -388 }, { -1775, -1647, -383 }, { -1776, -1646, -379 },
|
||||
{ -1778, -1646, -373 }, { -1779, -1646, -368 }, { -1781, -1646, -362 }, { -1782, -1646, -356 },
|
||||
{ -1784, -1646, -350 }, { -1786, -1646, -344 }, { -1787, -1646, -338 }, { -1789, -1646, -332 },
|
||||
{ -1790, -1645, -326 }, { -1792, -1645, -320 }, { -1793, -1645, -315 }, { -1795, -1645, -310 },
|
||||
{ -1796, -1645, -305 }, { -1797, -1645, -300 }, { -1798, -1645, -296 }, { -1799, -1645, -293 },
|
||||
{ -1800, -1645, -290 }, { -1801, -1645, -288 }, { -1801, -1645, -287 }, { -1801, -1645, -286 },
|
||||
{ -1801, -1645, -286 }, { -1801, -1645, -286 }, { -1801, -1645, -286 }, { -1801, -1645, -287 },
|
||||
{ -1801, -1645, -288 }, { -1800, -1645, -289 }, { -1800, -1645, -290 }, { -1800, -1645, -292 },
|
||||
{ -1799, -1645, -293 }, { -1799, -1645, -294 }, { -1798, -1645, -296 }, { -1798, -1645, -299 },
|
||||
{ -1797, -1645, -301 }, { -1796, -1645, -304 }, { -1796, -1645, -307 }, { -1795, -1645, -310 },
|
||||
{ -1794, -1645, -314 }, { -1793, -1645, -317 }, { -1792, -1645, -320 }, { -1791, -1645, -324 },
|
||||
{ -1790, -1645, -327 }, { -1789, -1645, -330 }, { -1789, -1645, -333 }, { -1788, -1645, -336 },
|
||||
{ -1787, -1645, -338 }, { -1787, -1645, -341 }, { -1786, -1645, -342 }, { -1786, -1645, -344 },
|
||||
{ -1785, -1645, -345 }, { -1785, -1645, -345 }, { -1785, -1645, -345 }, { -1786, -1645, -344 },
|
||||
{ -1786, -1645, -343 }, { -1787, -1645, -340 }, { -1791, -1645, -326 }, { -1799, -1646, -295 },
|
||||
{ -1808, -1646, -258 }, { -1816, -1646, -228 }, { -1820, -1646, -216 }, { -1819, -1646, -220 },
|
||||
{ -1816, -1646, -232 }, { -1811, -1646, -249 }, { -1806, -1646, -269 }, { -1800, -1646, -290 },
|
||||
{ -1795, -1646, -311 }, { -1790, -1645, -328 }, { -1787, -1645, -340 }, { -1785, -1645, -348 },
|
||||
{ -1784, -1645, -352 }, { -1783, -1645, -353 }, { -1783, -1645, -353 }, { -1783, -1645, -352 },
|
||||
{ -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 },
|
||||
{ -1784, -1645, -351 }, { -1784, -1645, -350 }, { -1784, -1645, -350 }, { -1784, -1645, -350 },
|
||||
{ -1784, -1645, -350 }, { -1784, -1645, -349 }, { -1784, -1645, -349 }, { -1784, -1645, -349 },
|
||||
{ -1785, -1645, -348 }, { -1785, -1645, -348 }, { -1785, -1645, -347 }, { -1785, -1645, -347 },
|
||||
{ -1785, -1645, -346 }, { -1785, -1645, -346 }, { -1785, -1645, -345 }, { -1785, -1645, -345 },
|
||||
{ -1786, -1645, -344 }, { -1786, -1645, -344 }, { -1786, -1645, -343 }, { -1786, -1645, -343 },
|
||||
{ -1786, -1645, -342 }, { -1786, -1645, -342 }, { -1786, -1645, -342 }, { -1786, -1645, -341 },
|
||||
{ -1787, -1645, -341 }, { -1787, -1645, -340 }, { -1787, -1645, -340 }, { -1787, -1645, -340 },
|
||||
{ -1787, -1645, -339 }, { -1787, -1645, -339 }, { -1787, -1645, -339 }, { -1787, -1645, -339 },
|
||||
{ -1787, -1645, -339 }, { -1787, -1645, -339 }, { -1787, -1645, -339 }, { -1787, -1645, -339 },
|
||||
{ -1787, -1645, -339 }, { -1787, -1645, -339 }, { -1787, -1645, -339 }, { -1787, -1645, -339 },
|
||||
{ -1787, -1645, -340 }, { -1787, -1645, -340 }, { -1787, -1645, -340 }, { -1786, -1645, -342 },
|
||||
{ -1786, -1645, -344 }, { -1785, -1646, -346 }, { -1784, -1646, -350 }, { -1783, -1646, -354 },
|
||||
{ -1782, -1646, -358 }, { -1781, -1646, -362 }, { -1780, -1646, -367 }, { -1779, -1646, -371 },
|
||||
{ -1778, -1646, -374 }, { -1777, -1646, -378 }, { -1776, -1647, -380 }, { -1776, -1647, -382 },
|
||||
{ -1775, -1647, -383 }, { -1776, -1647, -382 }, { -1776, -1647, -379 }, { -1778, -1646, -373 },
|
||||
{ -1780, -1646, -365 }, { -1783, -1646, -355 }, { -1785, -1646, -345 }, { -1788, -1645, -335 },
|
||||
{ -1791, -1645, -325 }, { -1793, -1645, -318 }, { -1794, -1645, -313 }, { -1795, -1645, -311 },
|
||||
{ -1794, -1645, -312 }, { -1793, -1645, -315 }, { -1792, -1645, -320 }, { -1791, -1645, -326 },
|
||||
{ -1789, -1645, -333 }, { -1787, -1646, -341 }, { -1784, -1646, -349 }, { -1782, -1646, -357 },
|
||||
{ -1780, -1646, -365 }, { -1778, -1646, -372 }, { -1777, -1647, -377 }, { -1776, -1647, -382 },
|
||||
{ -1775, -1647, -386 }, { -1773, -1647, -390 }, { -1772, -1647, -394 }, { -1772, -1647, -396 },
|
||||
{ -1772, -1647, -395 }, { -1773, -1647, -391 }, { -1776, -1647, -382 }, { -1780, -1646, -364 },
|
||||
{ -1788, -1646, -336 }, { -1796, -1646, -304 }, { -1805, -1646, -273 }, { -1811, -1646, -250 },
|
||||
{ -1814, -1645, -239 }, { -1814, -1645, -238 }, { -1814, -1645, -239 }, { -1813, -1645, -241 },
|
||||
{ -1812, -1645, -244 }, { -1811, -1645, -248 }, { -1810, -1645, -253 }, { -1808, -1645, -259 },
|
||||
{ -1807, -1645, -265 }, { -1805, -1645, -272 }, { -1803, -1645, -279 }, { -1801, -1645, -287 },
|
||||
{ -1799, -1645, -294 }, { -1797, -1645, -301 }, { -1795, -1645, -308 }, { -1794, -1645, -315 },
|
||||
{ -1792, -1645, -320 }, { -1791, -1645, -325 }, { -1790, -1645, -330 }, { -1789, -1645, -333 },
|
||||
{ -1788, -1645, -335 }, { -1788, -1645, -336 }, { -1788, -1645, -337 }, { -1787, -1645, -338 },
|
||||
{ -1787, -1645, -339 }, { -1787, -1645, -340 }, { -1787, -1645, -341 }, { -1786, -1645, -342 },
|
||||
{ -1786, -1645, -343 }, { -1786, -1645, -343 }, { -1786, -1645, -344 }, { -1785, -1645, -345 },
|
||||
{ -1785, -1645, -346 }, { -1785, -1645, -346 }, { -1785, -1645, -347 }, { -1785, -1645, -347 },
|
||||
{ -1785, -1645, -348 }, { -1785, -1645, -348 }, { -1784, -1645, -349 }, { -1784, -1645, -349 },
|
||||
{ -1784, -1645, -350 }, { -1784, -1645, -350 }, { -1784, -1645, -350 }, { -1784, -1645, -351 },
|
||||
{ -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -352 },
|
||||
{ -1784, -1645, -352 }, { -1784, -1645, -352 }, { -1784, -1645, -352 }, { -1784, -1645, -352 },
|
||||
{ -1783, -1645, -352 }, { -1783, -1645, -352 }, { -1783, -1645, -352 }, { -1783, -1645, -352 },
|
||||
{ -1783, -1645, -352 }, { -1783, -1645, -352 }, { -1783, -1645, -352 }, { -1783, -1645, -352 },
|
||||
{ -1783, -1645, -352 }, { -1783, -1645, -352 }, { -1783, -1645, -352 }, { -1783, -1645, -352 },
|
||||
{ -1784, -1645, -352 }, { -1784, -1645, -352 }, { -1784, -1645, -352 }, { -1784, -1645, -352 },
|
||||
{ -1784, -1645, -352 }, { -1784, -1645, -352 }, { -1784, -1645, -352 }, { -1784, -1645, -351 },
|
||||
{ -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 },
|
||||
{ -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 },
|
||||
{ -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -350 },
|
||||
{ -1784, -1645, -350 }, { -1784, -1645, -350 }, { -1784, -1645, -350 }, { -1784, -1645, -350 },
|
||||
{ -1784, -1645, -350 }, { -1784, -1645, -350 }, { -1784, -1645, -351 }, { -1784, -1645, -351 },
|
||||
{ -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 },
|
||||
{ -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -351 }, { -1784, -1645, -350 },
|
||||
{ -1784, -1645, -350 }, { -1784, -1645, -350 }, { -1784, -1645, -349 }, { -1784, -1645, -349 },
|
||||
{ -1784, -1645, -348 }, { -1785, -1645, -348 }, { -1785, -1645, -347 }, { -1785, -1645, -347 },
|
||||
{ -1785, -1645, -346 }, { -1785, -1645, -346 }, { -1785, -1645, -345 }, { -1786, -1645, -344 },
|
||||
{ -1786, -1645, -344 }, { -1786, -1645, -343 }, { -1786, -1645, -343 }, { -1786, -1645, -342 },
|
||||
{ -1786, -1645, -341 }, { -1787, -1645, -341 }, { -1787, -1645, -340 }, { -1787, -1645, -340 },
|
||||
{ -1787, -1645, -339 }, { -1787, -1645, -339 }, { -1787, -1645, -338 }, { -1787, -1645, -338 },
|
||||
{ -1787, -1645, -337 }, { -1787, -1645, -337 }, { -1788, -1645, -337 }, { -1788, -1644, -337 },
|
||||
{ -1788, -1644, -336 }, { -1788, -1644, -336 }, { -1788, -1644, -336 }, { -1788, -1644, -336 },
|
||||
{ -1788, -1645, -337 }, { -1788, -1645, -337 }, { -1787, -1645, -337 }, { -1787, -1645, -338 },
|
||||
{ -1787, -1645, -338 }, { -1787, -1645, -339 }, { -1787, -1645, -339 }, { -1787, -1645, -340 },
|
||||
{ -1786, -1645, -341 }, { -1786, -1645, -342 }, { -1786, -1645, -343 }, { -1786, -1645, -344 },
|
||||
{ -1785, -1645, -346 }, { -1785, -1645, -347 }, { -1784, -1645, -349 }, { -1784, -1645, -351 },
|
||||
{ -1776, -1647, -379 }, { -1763, -1649, -430 }, { -1756, -1651, -458 }, { -1756, -1651, -457 },
|
||||
{ -1756, -1650, -455 }, { -1757, -1650, -452 }, { -1758, -1650, -449 }, { -1759, -1650, -444 },
|
||||
{ -1761, -1650, -439 }, { -1762, -1649, -433 }, { -1764, -1649, -427 }, { -1766, -1649, -420 },
|
||||
{ -1768, -1648, -413 }, { -1769, -1648, -406 }, { -1771, -1648, -399 }, { -1773, -1647, -392 },
|
||||
{ -1775, -1647, -385 }, { -1777, -1647, -378 }, { -1779, -1646, -371 }, { -1780, -1646, -365 },
|
||||
{ -1782, -1646, -360 }, { -1783, -1645, -355 }, { -1784, -1645, -351 }, { -1783, -1645, -356 },
|
||||
{ -1779, -1646, -369 }, { -1778, -1646, -375 }, { -1780, -1646, -364 }, { -1785, -1645, -348 },
|
||||
{ -1787, -1645, -339 }, { -1784, -1645, -350 }, { -1779, -1646, -368 }, { -1778, -1646, -375 },
|
||||
{ -1780, -1646, -366 }, { -1783, -1646, -353 }, { -1788, -1645, -337 }, { -1792, -1645, -320 },
|
||||
{ -1796, -1645, -304 }, { -1800, -1645, -290 }, { -1803, -1645, -280 }, { -1805, -1645, -272 },
|
||||
{ -1807, -1645, -263 }, { -1809, -1645, -255 }, { -1812, -1645, -247 }, { -1814, -1645, -239 },
|
||||
{ -1816, -1645, -232 }, { -1817, -1645, -225 }, { -1819, -1645, -219 }, { -1820, -1645, -214 },
|
||||
{ -1821, -1645, -211 }, { -1822, -1645, -209 }, { -1822, -1646, -209 }, { -1821, -1646, -210 },
|
||||
{ -1820, -1646, -214 }, { -1818, -1646, -221 }, { -1816, -1646, -232 }, { -1812, -1646, -246 },
|
||||
{ -1807, -1646, -262 }, { -1803, -1647, -281 }, { -1797, -1647, -300 }, { -1792, -1647, -320 },
|
||||
{ -1787, -1647, -340 }, { -1782, -1647, -359 }, { -1777, -1648, -377 }, { -1773, -1648, -393 },
|
||||
{ -1769, -1648, -406 }, { -1767, -1648, -416 }, { -1765, -1648, -421 }, { -1765, -1648, -422 },
|
||||
{ -1766, -1648, -417 }, { -1769, -1648, -406 }, { -1774, -1648, -389 }, { -1779, -1648, -368 },
|
||||
{ -1786, -1648, -344 }, { -1793, -1648, -318 }, { -1800, -1648, -292 }, { -1807, -1648, -265 },
|
||||
{ -1814, -1648, -239 }, { -1820, -1648, -216 }, { -1825, -1648, -196 }, { -1829, -1648, -180 },
|
||||
{ -1832, -1648, -170 }, { -1833, -1648, -167 }, { -1832, -1648, -170 }, { -1830, -1648, -179 },
|
||||
{ -1826, -1648, -193 }, { -1821, -1648, -211 }, { -1815, -1648, -233 }, { -1809, -1648, -257 },
|
||||
{ -1802, -1648, -282 }, { -1796, -1648, -307 }, { -1789, -1648, -332 }, { -1783, -1648, -356 },
|
||||
{ -1777, -1648, -377 }, { -1772, -1648, -395 }, { -1768, -1648, -410 }, { -1766, -1648, -419 },
|
||||
{ -1765, -1648, -422 }, { -1766, -1648, -418 }, { -1769, -1648, -408 }, { -1773, -1648, -392 },
|
||||
{ -1778, -1648, -371 }, { -1785, -1648, -348 }, { -1792, -1648, -322 }, { -1799, -1648, -294 },
|
||||
{ -1806, -1648, -267 }, { -1813, -1648, -241 }, { -1819, -1648, -217 }, { -1825, -1648, -197 },
|
||||
{ -1829, -1648, -181 }, { -1832, -1648, -170 }, { -1833, -1648, -167 }, { -1832, -1648, -171 },
|
||||
{ -1828, -1648, -183 }, { -1824, -1648, -201 }, { -1818, -1648, -224 }, { -1810, -1648, -251 },
|
||||
{ -1803, -1648, -280 }, { -1795, -1648, -309 }, { -1787, -1648, -338 }, { -1780, -1648, -364 },
|
||||
{ -1774, -1648, -388 }, { -1769, -1648, -406 }, { -1766, -1648, -418 }, { -1765, -1648, -422 },
|
||||
{ -1766, -1648, -419 }, { -1768, -1648, -410 }, { -1772, -1648, -397 }, { -1776, -1648, -379 },
|
||||
{ -1782, -1648, -358 }, { -1788, -1648, -335 }, { -1795, -1648, -311 }, { -1801, -1648, -286 },
|
||||
{ -1808, -1648, -261 }, { -1814, -1648, -238 }, { -1820, -1648, -216 }, { -1825, -1648, -198 },
|
||||
{ -1829, -1648, -182 }, { -1831, -1648, -172 }, { -1833, -1648, -167 }, { -1833, -1648, -166 },
|
||||
{ -1832, -1648, -170 }, { -1830, -1648, -176 }, { -1828, -1647, -185 }, { -1825, -1647, -197 },
|
||||
{ -1821, -1647, -210 }, { -1817, -1647, -224 }, { -1813, -1647, -240 }, { -1809, -1647, -256 },
|
||||
{ -1805, -1646, -272 }, { -1801, -1646, -288 }, { -1797, -1646, -303 }, { -1793, -1646, -317 },
|
||||
{ -1790, -1646, -329 }, { -1787, -1646, -339 }, { -1785, -1645, -346 }, { -1784, -1645, -351 },
|
||||
{ -1783, -1645, -353 }, { -1783, -1645, -355 }, { -1782, -1645, -356 }, { -1782, -1645, -356 },
|
||||
{ -1782, -1645, -356 }, { -1783, -1645, -356 }, { -1783, -1645, -354 }, { -1783, -1645, -353 },
|
||||
{ -1784, -1645, -351 }, { -1785, -1645, -348 }, { -1785, -1645, -346 }, { -1786, -1645, -343 },
|
||||
{ -1787, -1645, -339 }, { -1788, -1645, -336 }, { -1789, -1645, -332 }, { -1790, -1645, -329 },
|
||||
{ -1791, -1645, -325 }, { -1792, -1645, -321 }, { -1793, -1645, -317 }, { -1794, -1645, -314 },
|
||||
{ -1795, -1645, -310 }, { -1796, -1645, -307 }, { -1796, -1645, -304 }, { -1797, -1645, -301 },
|
||||
{ -1798, -1645, -298 }, { -1798, -1645, -296 }, { -1799, -1645, -294 }, { -1799, -1645, -293 },
|
||||
{ -1800, -1645, -292 }, { -1800, -1645, -291 }, { -1800, -1645, -291 }, { -1800, -1645, -292 },
|
||||
{ -1799, -1645, -292 }, { -1799, -1645, -293 }, { -1799, -1645, -294 }, { -1799, -1645, -295 },
|
||||
{ -1798, -1645, -296 }, { -1798, -1645, -297 }, { -1798, -1645, -298 }, { -1798, -1645, -299 },
|
||||
{ -1798, -1645, -299 }, { -1797, -1645, -300 }, { -1797, -1645, -300 }, { -1798, -1645, -299 },
|
||||
{ -1798, -1645, -299 }, { -1798, -1645, -297 }, { -1799, -1645, -295 }, { -1799, -1645, -293 },
|
||||
{ -1801, -1645, -288 }, { -1803, -1645, -281 }, { -1805, -1645, -271 }, { -1808, -1645, -260 },
|
||||
{ -1811, -1646, -248 }, { -1814, -1646, -236 }, { -1817, -1646, -225 }, { -1820, -1646, -216 },
|
||||
{ -1822, -1646, -208 }, { -1823, -1647, -204 }, { -1823, -1647, -204 }, { -1822, -1647, -207 },
|
||||
{ -1821, -1647, -212 }, { -1819, -1647, -219 }, { -1817, -1646, -227 }, { -1814, -1646, -237 },
|
||||
{ -1811, -1646, -247 }, { -1808, -1646, -258 }, { -1805, -1646, -270 }, { -1802, -1646, -282 },
|
||||
{ -1799, -1646, -293 }, { -1796, -1646, -304 }, { -1794, -1646, -314 }, { -1791, -1646, -323 },
|
||||
{ -1789, -1645, -331 }, { -1788, -1645, -337 }, { -1787, -1645, -340 }, { -1787, -1645, -339 },
|
||||
{ -1789, -1645, -331 }, { -1793, -1645, -318 }, { -1797, -1645, -303 }, { -1801, -1645, -288 },
|
||||
{ -1804, -1645, -276 }, { -1806, -1645, -269 }, { -1807, -1645, -265 }, { -1808, -1645, -262 },
|
||||
{ -1808, -1645, -259 }, { -1809, -1645, -256 }, { -1810, -1645, -253 }, { -1811, -1645, -251 },
|
||||
{ -1811, -1645, -248 }, { -1812, -1645, -246 }, { -1812, -1645, -244 }, { -1813, -1645, -242 },
|
||||
{ -1813, -1645, -241 }, { -1814, -1645, -239 }, { -1814, -1645, -238 }, { -1814, -1645, -237 },
|
||||
{ -1815, -1645, -235 }, { -1815, -1646, -234 }, { -1815, -1646, -233 }, { -1816, -1646, -232 },
|
||||
{ -1816, -1646, -231 }, { -1816, -1646, -230 }, { -1816, -1646, -229 }, { -1817, -1646, -228 },
|
||||
{ -1817, -1646, -227 }, { -1817, -1646, -226 }, { -1817, -1646, -226 }, { -1817, -1646, -226 },
|
||||
{ -1817, -1646, -227 }, { -1817, -1646, -227 }, { -1817, -1646, -228 }, { -1816, -1646, -228 },
|
||||
{ -1816, -1646, -229 }, { -1816, -1646, -229 }, { -1816, -1646, -229 }, { -1816, -1646, -229 },
|
||||
{ -1816, -1646, -229 }, { -1817, -1646, -228 }, { -1817, -1646, -226 }, { -1818, -1646, -224 },
|
||||
{ -1818, -1646, -223 }, { -1819, -1646, -221 }, { -1819, -1646, -218 }, { -1820, -1646, -216 },
|
||||
{ -1820, -1646, -214 }, { -1821, -1646, -211 }, { -1822, -1647, -209 }, { -1822, -1647, -206 },
|
||||
{ -1823, -1647, -203 }, { -1824, -1647, -201 }, { -1824, -1647, -198 }, { -1825, -1647, -195 },
|
||||
{ -1826, -1647, -193 }, { -1827, -1647, -190 }, { -1827, -1647, -188 }, { -1828, -1648, -185 },
|
||||
{ -1829, -1648, -183 }, { -1829, -1648, -181 }, { -1830, -1648, -178 }, { -1830, -1648, -176 },
|
||||
{ -1831, -1648, -175 }, { -1831, -1648, -173 }, { -1831, -1648, -172 }, { -1832, -1648, -170 },
|
||||
{ -1832, -1648, -169 }, { -1832, -1648, -169 }, { -1832, -1648, -168 }, { -1832, -1648, -168 },
|
||||
{ -1832, -1648, -168 }, { -1832, -1648, -169 }, { -1832, -1648, -170 }, { -1832, -1648, -171 },
|
||||
{ -1831, -1648, -173 }, { -1831, -1648, -174 }, { -1830, -1648, -177 }, { -1830, -1648, -179 },
|
||||
{ -1829, -1648, -181 }, { -1828, -1648, -184 }, { -1827, -1647, -187 }, { -1827, -1647, -190 },
|
||||
{ -1826, -1647, -193 }, { -1825, -1647, -196 }, { -1824, -1647, -199 }, { -1823, -1647, -202 },
|
||||
{ -1823, -1647, -205 }, { -1822, -1647, -208 }, { -1821, -1646, -212 }, { -1820, -1646, -215 },
|
||||
{ -1819, -1646, -217 }, { -1819, -1646, -220 }, { -1818, -1646, -223 }, { -1817, -1646, -225 },
|
||||
{ -1817, -1646, -228 }, { -1816, -1646, -228 }, { -1817, -1646, -228 }, { -1817, -1646, -228 },
|
||||
{ -1817, -1646, -226 }, { -1817, -1646, -228 }, { -1815, -1646, -234 }, { -1813, -1646, -241 },
|
||||
{ -1811, -1645, -250 }, { -1809, -1645, -258 }, { -1806, -1645, -267 }, { -1804, -1645, -275 },
|
||||
{ -1802, -1645, -282 }, { -1801, -1645, -288 }, { -1800, -1645, -292 }, { -1799, -1645, -293 },
|
||||
};
|
||||
|
||||
static s16 animdata_mario_mustache_left_2[][3] = {
|
||||
{ -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 },
|
||||
{ -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 },
|
||||
{ -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 },
|
||||
{ -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 },
|
||||
{ -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 },
|
||||
{ -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1756, -1651, -459 }, { -1754, -1651, -464 },
|
||||
{ -1753, -1652, -469 }, { -1756, -1652, -459 }, { -1770, -1648, -404 }, { -1783, -1646, -352 },
|
||||
{ -1787, -1645, -340 }, { -1789, -1645, -330 }, { -1792, -1645, -321 }, { -1793, -1645, -315 },
|
||||
{ -1795, -1645, -310 }, { -1795, -1645, -308 }, { -1795, -1645, -308 }, { -1795, -1645, -310 },
|
||||
{ -1793, -1646, -315 }, { -1790, -1646, -326 }, { -1786, -1647, -345 }, { -1779, -1648, -368 },
|
||||
{ -1773, -1649, -393 }, { -1766, -1649, -418 }, { -1761, -1650, -439 }, { -1757, -1651, -454 },
|
||||
{ -1756, -1651, -459 }, { -1756, -1651, -458 }, { -1756, -1651, -456 }, { -1757, -1651, -453 },
|
||||
{ -1758, -1651, -449 }, { -1760, -1650, -444 }, { -1761, -1650, -438 }, { -1763, -1650, -432 },
|
||||
{ -1765, -1650, -425 }, { -1767, -1649, -417 }, { -1769, -1649, -410 }, { -1771, -1649, -402 },
|
||||
{ -1773, -1649, -394 }, { -1775, -1648, -386 }, { -1777, -1648, -378 }, { -1779, -1648, -371 },
|
||||
{ -1780, -1647, -365 }, { -1782, -1647, -358 }, { -1783, -1647, -355 }, { -1787, -1647, -341 },
|
||||
{ -1791, -1647, -325 }, { -1795, -1647, -308 }, { -1800, -1648, -291 }, { -1804, -1648, -273 },
|
||||
{ -1809, -1648, -256 }, { -1813, -1648, -240 }, { -1817, -1648, -225 }, { -1821, -1648, -212 },
|
||||
{ -1823, -1648, -201 }, { -1825, -1648, -194 }, { -1827, -1648, -189 }, { -1827, -1648, -187 },
|
||||
{ -1828, -1649, -185 }, { -1828, -1649, -182 }, { -1829, -1649, -180 }, { -1829, -1649, -179 },
|
||||
{ -1830, -1649, -177 }, { -1830, -1649, -175 }, { -1831, -1649, -174 }, { -1831, -1649, -172 },
|
||||
{ -1831, -1649, -171 }, { -1832, -1649, -170 }, { -1832, -1649, -169 }, { -1832, -1649, -168 },
|
||||
{ -1832, -1649, -167 }, { -1833, -1649, -166 }, { -1833, -1649, -166 }, { -1833, -1649, -165 },
|
||||
{ -1833, -1649, -165 }, { -1833, -1649, -164 }, { -1833, -1649, -164 }, { -1833, -1649, -164 },
|
||||
{ -1833, -1649, -164 }, { -1833, -1649, -164 }, { -1833, -1649, -164 }, { -1833, -1649, -164 },
|
||||
{ -1833, -1649, -164 }, { -1833, -1649, -164 }, { -1833, -1649, -165 }, { -1833, -1649, -165 },
|
||||
{ -1833, -1649, -165 }, { -1833, -1649, -166 }, { -1833, -1649, -167 }, { -1832, -1649, -167 },
|
||||
{ -1832, -1649, -168 }, { -1832, -1649, -169 }, { -1832, -1649, -169 }, { -1832, -1649, -170 },
|
||||
{ -1831, -1649, -171 }, { -1831, -1649, -172 }, { -1831, -1649, -173 }, { -1831, -1649, -174 },
|
||||
{ -1830, -1649, -175 }, { -1830, -1649, -176 }, { -1830, -1649, -177 }, { -1830, -1649, -178 },
|
||||
{ -1829, -1649, -179 }, { -1829, -1649, -180 }, { -1829, -1649, -181 }, { -1828, -1649, -182 },
|
||||
{ -1828, -1649, -184 }, { -1828, -1649, -185 }, { -1827, -1649, -186 }, { -1827, -1649, -187 },
|
||||
{ -1827, -1649, -188 }, { -1827, -1648, -189 }, { -1826, -1648, -191 }, { -1826, -1648, -192 },
|
||||
{ -1825, -1648, -194 }, { -1825, -1648, -196 }, { -1824, -1648, -199 }, { -1823, -1648, -202 },
|
||||
{ -1822, -1648, -205 }, { -1822, -1648, -208 }, { -1821, -1648, -211 }, { -1820, -1648, -215 },
|
||||
{ -1819, -1647, -218 }, { -1818, -1647, -222 }, { -1817, -1647, -226 }, { -1816, -1647, -230 },
|
||||
{ -1815, -1647, -234 }, { -1814, -1647, -238 }, { -1813, -1647, -242 }, { -1812, -1646, -246 },
|
||||
{ -1811, -1646, -250 }, { -1809, -1646, -254 }, { -1808, -1646, -258 }, { -1807, -1646, -262 },
|
||||
{ -1806, -1646, -266 }, { -1806, -1646, -269 }, { -1805, -1646, -272 }, { -1804, -1645, -276 },
|
||||
{ -1803, -1645, -279 }, { -1802, -1645, -281 }, { -1802, -1645, -284 }, { -1801, -1645, -286 },
|
||||
{ -1801, -1645, -288 }, { -1800, -1645, -290 }, { -1800, -1645, -291 }, { -1800, -1645, -292 },
|
||||
{ -1799, -1645, -293 }, { -1799, -1645, -293 },
|
||||
};
|
||||
|
||||
struct AnimDataInfo anim_mario_mustache_left[] = {
|
||||
{ ARRAY_COUNT(animdata_mario_mustache_left_1), GD_ANIM_ROT3S, animdata_mario_mustache_left_1 },
|
||||
{ ARRAY_COUNT(animdata_mario_mustache_left_2), GD_ANIM_ROT3S, animdata_mario_mustache_left_2 },
|
||||
END_ANIMDATA_INFO_ARR,
|
||||
};
|
||||
@@ -0,0 +1,215 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "animdata.h"
|
||||
#include "../gd_types.h"
|
||||
|
||||
static s16 animdata_mario_mustache_right_1[][3] = {
|
||||
{ 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1507 }, { 0, 154, 1508 }, { 0, 154, 1510 },
|
||||
{ 1, 154, 1511 }, { 1, 154, 1513 }, { 2, 154, 1515 }, { 2, 155, 1517 }, { 3, 155, 1518 },
|
||||
{ 3, 155, 1520 }, { 3, 155, 1521 }, { 4, 155, 1522 }, { 4, 155, 1522 }, { 4, 155, 1522 },
|
||||
{ 4, 155, 1522 }, { 3, 155, 1520 }, { 3, 155, 1518 }, { 2, 154, 1515 }, { 1, 154, 1511 },
|
||||
{ 0, 154, 1506 }, { -3, 154, 1491 }, { -11, 153, 1463 }, { -20, 152, 1429 }, { -28, 151, 1396 },
|
||||
{ -35, 150, 1372 }, { -37, 150, 1364 }, { -34, 150, 1375 }, { -27, 151, 1401 }, { -18, 151, 1436 },
|
||||
{ -8, 152, 1474 }, { 0, 153, 1507 }, { 6, 154, 1530 }, { 6, 154, 1531 }, { 2, 154, 1516 },
|
||||
{ 0, 154, 1506 }, { 0, 154, 1505 }, { 0, 154, 1505 }, { 0, 154, 1504 }, { 0, 154, 1504 },
|
||||
{ 0, 154, 1504 }, { 0, 154, 1503 }, { 0, 154, 1503 }, { 0, 154, 1503 }, { 0, 154, 1503 },
|
||||
{ 0, 154, 1503 }, { 0, 154, 1503 }, { 0, 154, 1503 }, { 0, 154, 1503 }, { 0, 154, 1503 },
|
||||
{ 0, 154, 1503 }, { 0, 154, 1503 }, { 0, 154, 1503 }, { 0, 154, 1504 }, { 0, 154, 1504 },
|
||||
{ 0, 154, 1504 }, { 0, 154, 1504 }, { 0, 154, 1504 }, { 0, 154, 1505 }, { 0, 154, 1505 },
|
||||
{ 0, 154, 1505 }, { 0, 154, 1505 }, { 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 },
|
||||
{ 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 },
|
||||
{ 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 },
|
||||
{ 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1506 },
|
||||
{ 0, 154, 1506 }, { 0, 154, 1506 }, { 0, 154, 1507 }, { 0, 154, 1509 }, { 1, 154, 1511 },
|
||||
{ 1, 154, 1513 }, { 2, 154, 1514 }, { 2, 154, 1514 }, { 1, 154, 1511 }, { 0, 154, 1506 },
|
||||
{ -4, 154, 1490 }, { -11, 153, 1463 }, { -18, 153, 1437 }, { -22, 153, 1423 }, { -23, 153, 1419 },
|
||||
{ -23, 153, 1416 }, { -24, 152, 1414 }, { -25, 152, 1411 }, { -25, 152, 1410 }, { -26, 152, 1408 },
|
||||
{ -26, 152, 1407 }, { -26, 152, 1407 }, { -26, 152, 1407 }, { -26, 152, 1407 }, { -26, 152, 1408 },
|
||||
{ -25, 152, 1409 }, { -25, 152, 1410 }, { -25, 152, 1412 }, { -24, 152, 1414 }, { -23, 153, 1417 },
|
||||
{ -22, 153, 1420 }, { -22, 153, 1423 }, { -19, 153, 1432 }, { -15, 153, 1448 }, { -10, 153, 1468 },
|
||||
{ -5, 154, 1487 }, { -1, 154, 1501 }, { 0, 154, 1506 }, { 0, 154, 1505 }, { 0, 154, 1503 },
|
||||
{ -1, 154, 1501 }, { -2, 154, 1497 }, { -3, 154, 1494 }, { -4, 154, 1489 }, { -5, 154, 1484 },
|
||||
{ -7, 154, 1479 }, { -8, 154, 1474 }, { -10, 153, 1468 }, { -11, 153, 1462 }, { -13, 153, 1456 },
|
||||
{ -14, 153, 1450 }, { -16, 153, 1444 }, { -18, 153, 1438 }, { -19, 153, 1433 }, { -20, 153, 1427 },
|
||||
{ -22, 152, 1422 }, { -23, 152, 1417 }, { -24, 152, 1413 }, { -25, 152, 1410 }, { -26, 152, 1407 },
|
||||
{ -27, 152, 1404 }, { -27, 152, 1402 }, { -28, 152, 1400 }, { -28, 152, 1399 }, { -28, 152, 1398 },
|
||||
{ -29, 152, 1397 }, { -29, 152, 1396 }, { -29, 152, 1396 }, { -29, 152, 1396 }, { -29, 152, 1397 },
|
||||
{ -28, 152, 1397 }, { -28, 152, 1399 }, { -28, 152, 1400 }, { -27, 152, 1402 }, { -27, 152, 1404 },
|
||||
{ -26, 152, 1407 }, { -25, 152, 1410 }, { -24, 152, 1413 }, { -23, 152, 1418 }, { -22, 152, 1422 },
|
||||
{ -20, 153, 1427 }, { -19, 153, 1433 }, { -18, 153, 1438 }, { -16, 153, 1444 }, { -14, 153, 1450 },
|
||||
{ -13, 153, 1456 }, { -11, 153, 1462 }, { -10, 153, 1468 }, { -8, 154, 1474 }, { -7, 154, 1479 },
|
||||
{ -5, 154, 1485 }, { -4, 154, 1490 }, { -3, 154, 1495 }, { -1, 154, 1499 }, { 0, 154, 1503 },
|
||||
{ 0, 154, 1506 }, { 0, 154, 1509 }, { 1, 154, 1511 }, { 1, 154, 1512 }, { 1, 154, 1513 },
|
||||
{ 2, 154, 1514 }, { 2, 154, 1514 }, { 1, 154, 1513 }, { 1, 154, 1513 }, { 1, 154, 1512 },
|
||||
{ 1, 154, 1510 }, { 0, 154, 1509 }, { 0, 154, 1508 }, { 0, 154, 1506 }, { 0, 154, 1504 },
|
||||
{ -1, 154, 1502 }, { -1, 154, 1500 }, { -2, 154, 1497 }, { -3, 154, 1493 }, { -4, 154, 1490 },
|
||||
{ -5, 154, 1487 }, { -6, 154, 1483 }, { -7, 154, 1479 }, { -8, 154, 1475 }, { -9, 154, 1471 },
|
||||
{ -10, 154, 1468 }, { -11, 154, 1464 }, { -12, 154, 1461 }, { -12, 154, 1457 }, { -13, 154, 1454 },
|
||||
{ -14, 154, 1452 }, { -15, 154, 1449 }, { -15, 154, 1447 }, { -16, 154, 1446 }, { -16, 154, 1445 },
|
||||
{ -16, 153, 1444 }, { -16, 153, 1444 }, { -16, 153, 1445 }, { -15, 153, 1447 }, { -12, 153, 1460 },
|
||||
{ -4, 153, 1488 }, { 3, 153, 1521 }, { 11, 154, 1548 }, { 14, 154, 1560 }, { 13, 154, 1556 },
|
||||
{ 10, 154, 1545 }, { 6, 154, 1530 }, { 1, 153, 1511 }, { -3, 153, 1492 }, { -8, 153, 1473 },
|
||||
{ -12, 153, 1458 }, { -15, 153, 1447 }, { -17, 153, 1440 }, { -18, 153, 1437 }, { -18, 153, 1435 },
|
||||
{ -18, 153, 1435 }, { -18, 153, 1436 }, { -18, 153, 1437 }, { -18, 153, 1437 }, { -18, 153, 1437 },
|
||||
{ -18, 153, 1438 }, { -18, 153, 1438 }, { -18, 153, 1438 }, { -18, 153, 1438 }, { -18, 153, 1438 },
|
||||
{ -17, 153, 1439 }, { -17, 153, 1439 }, { -17, 153, 1439 }, { -17, 153, 1440 }, { -17, 153, 1440 },
|
||||
{ -17, 153, 1441 }, { -17, 154, 1441 }, { -17, 154, 1442 }, { -17, 154, 1442 }, { -16, 154, 1443 },
|
||||
{ -16, 154, 1443 }, { -16, 154, 1444 }, { -16, 154, 1444 }, { -16, 154, 1445 }, { -16, 154, 1445 },
|
||||
{ -16, 154, 1446 }, { -15, 154, 1446 }, { -15, 154, 1447 }, { -15, 154, 1447 }, { -15, 154, 1448 },
|
||||
{ -15, 154, 1448 }, { -15, 154, 1449 }, { -15, 154, 1449 }, { -15, 154, 1449 }, { -15, 154, 1449 },
|
||||
{ -15, 154, 1450 }, { -15, 154, 1450 }, { -14, 154, 1450 }, { -14, 154, 1450 }, { -14, 154, 1450 },
|
||||
{ -14, 154, 1450 }, { -15, 154, 1450 }, { -15, 154, 1450 }, { -15, 154, 1449 }, { -15, 154, 1449 },
|
||||
{ -15, 153, 1448 }, { -15, 153, 1448 }, { -15, 153, 1447 }, { -15, 153, 1447 }, { -16, 153, 1445 },
|
||||
{ -16, 153, 1443 }, { -17, 153, 1439 }, { -19, 153, 1435 }, { -20, 153, 1430 }, { -21, 153, 1424 },
|
||||
{ -23, 152, 1419 }, { -24, 152, 1413 }, { -26, 152, 1408 }, { -27, 152, 1403 }, { -28, 152, 1399 },
|
||||
{ -29, 151, 1396 }, { -29, 151, 1394 }, { -30, 151, 1393 }, { -29, 151, 1393 }, { -28, 151, 1397 },
|
||||
{ -27, 152, 1404 }, { -24, 152, 1414 }, { -21, 152, 1426 }, { -17, 153, 1439 }, { -14, 153, 1452 },
|
||||
{ -11, 153, 1464 }, { -8, 154, 1473 }, { -7, 154, 1480 }, { -6, 154, 1482 }, { -6, 154, 1481 },
|
||||
{ -7, 154, 1478 }, { -9, 154, 1472 }, { -10, 154, 1465 }, { -13, 153, 1457 }, { -15, 153, 1448 },
|
||||
{ -18, 153, 1438 }, { -20, 153, 1429 }, { -22, 152, 1420 }, { -25, 152, 1411 }, { -26, 152, 1405 },
|
||||
{ -28, 152, 1399 }, { -29, 152, 1395 }, { -30, 151, 1391 }, { -31, 151, 1388 }, { -31, 151, 1387 },
|
||||
{ -31, 151, 1388 }, { -30, 151, 1392 }, { -28, 152, 1399 }, { -24, 152, 1414 }, { -18, 152, 1437 },
|
||||
{ -11, 153, 1464 }, { -4, 154, 1489 }, { 0, 154, 1509 }, { 3, 154, 1518 }, { 3, 154, 1520 },
|
||||
{ 3, 154, 1520 }, { 3, 154, 1520 }, { 3, 154, 1518 }, { 2, 154, 1516 }, { 1, 154, 1513 },
|
||||
{ 0, 154, 1509 }, { 0, 154, 1505 }, { -1, 154, 1501 }, { -2, 154, 1496 }, { -3, 154, 1491 },
|
||||
{ -5, 154, 1486 }, { -6, 154, 1481 }, { -7, 154, 1477 }, { -8, 154, 1472 }, { -10, 154, 1468 },
|
||||
{ -10, 154, 1465 }, { -11, 154, 1462 }, { -12, 154, 1460 }, { -12, 154, 1459 }, { -12, 154, 1458 },
|
||||
{ -13, 154, 1457 }, { -13, 154, 1456 }, { -13, 154, 1455 }, { -13, 154, 1455 }, { -13, 154, 1454 },
|
||||
{ -14, 154, 1453 }, { -14, 154, 1452 }, { -14, 154, 1452 }, { -14, 154, 1451 }, { -14, 154, 1451 },
|
||||
{ -14, 154, 1450 }, { -15, 154, 1449 }, { -15, 154, 1449 }, { -15, 154, 1448 }, { -15, 154, 1448 },
|
||||
{ -15, 154, 1447 }, { -15, 154, 1447 }, { -15, 154, 1447 }, { -15, 154, 1446 }, { -16, 154, 1446 },
|
||||
{ -16, 154, 1445 }, { -16, 154, 1445 }, { -16, 154, 1445 }, { -16, 154, 1444 }, { -16, 154, 1444 },
|
||||
{ -16, 154, 1444 }, { -16, 154, 1444 }, { -16, 154, 1443 }, { -16, 154, 1443 }, { -16, 154, 1443 },
|
||||
{ -16, 154, 1443 }, { -16, 154, 1442 }, { -17, 154, 1442 }, { -17, 154, 1442 }, { -17, 154, 1442 },
|
||||
{ -17, 153, 1442 }, { -17, 153, 1441 }, { -17, 153, 1441 }, { -17, 153, 1441 }, { -17, 153, 1441 },
|
||||
{ -17, 153, 1441 }, { -17, 153, 1441 }, { -17, 153, 1441 }, { -17, 153, 1440 }, { -17, 153, 1440 },
|
||||
{ -17, 153, 1440 }, { -17, 153, 1440 }, { -17, 153, 1440 }, { -17, 153, 1440 }, { -17, 153, 1440 },
|
||||
{ -17, 153, 1440 }, { -17, 153, 1440 }, { -17, 153, 1440 }, { -17, 153, 1439 }, { -17, 153, 1439 },
|
||||
{ -17, 153, 1439 }, { -17, 153, 1439 }, { -17, 153, 1439 }, { -17, 153, 1439 }, { -17, 153, 1439 },
|
||||
{ -17, 153, 1439 }, { -17, 153, 1439 }, { -17, 153, 1439 }, { -18, 153, 1439 }, { -18, 153, 1438 },
|
||||
{ -18, 153, 1438 }, { -18, 153, 1438 }, { -18, 153, 1438 }, { -18, 153, 1438 }, { -18, 153, 1438 },
|
||||
{ -18, 153, 1438 }, { -18, 153, 1437 }, { -18, 153, 1437 }, { -18, 153, 1437 }, { -18, 153, 1437 },
|
||||
{ -18, 153, 1437 }, { -18, 153, 1437 }, { -18, 153, 1438 }, { -18, 153, 1438 }, { -18, 153, 1438 },
|
||||
{ -18, 154, 1438 }, { -17, 154, 1439 }, { -17, 154, 1439 }, { -17, 154, 1440 }, { -17, 154, 1440 },
|
||||
{ -17, 154, 1441 }, { -17, 154, 1441 }, { -17, 154, 1442 }, { -17, 154, 1442 }, { -16, 154, 1443 },
|
||||
{ -16, 154, 1443 }, { -16, 154, 1444 }, { -16, 154, 1444 }, { -16, 154, 1445 }, { -16, 154, 1446 },
|
||||
{ -16, 154, 1446 }, { -15, 154, 1447 }, { -15, 154, 1447 }, { -15, 154, 1448 }, { -15, 154, 1448 },
|
||||
{ -15, 154, 1448 }, { -15, 154, 1449 }, { -15, 154, 1449 }, { -15, 154, 1449 }, { -15, 154, 1450 },
|
||||
{ -15, 154, 1450 }, { -15, 154, 1450 }, { -14, 154, 1450 }, { -14, 154, 1450 }, { -14, 154, 1450 },
|
||||
{ -15, 154, 1450 }, { -15, 154, 1450 }, { -15, 154, 1450 }, { -15, 154, 1449 }, { -15, 154, 1449 },
|
||||
{ -15, 154, 1448 }, { -15, 154, 1448 }, { -15, 154, 1447 }, { -16, 154, 1446 }, { -16, 154, 1445 },
|
||||
{ -16, 154, 1444 }, { -16, 154, 1443 }, { -17, 154, 1442 }, { -17, 154, 1441 }, { -17, 154, 1439 },
|
||||
{ -18, 153, 1437 }, { -24, 152, 1412 }, { -36, 150, 1367 }, { -43, 148, 1343 }, { -42, 149, 1343 },
|
||||
{ -42, 149, 1345 }, { -41, 149, 1348 }, { -40, 149, 1351 }, { -39, 149, 1355 }, { -38, 149, 1360 },
|
||||
{ -36, 150, 1366 }, { -35, 150, 1372 }, { -33, 150, 1378 }, { -32, 151, 1385 }, { -30, 151, 1392 },
|
||||
{ -28, 151, 1398 }, { -26, 152, 1405 }, { -25, 152, 1411 }, { -23, 152, 1417 }, { -22, 153, 1422 },
|
||||
{ -20, 153, 1427 }, { -19, 153, 1431 }, { -18, 153, 1435 }, { -18, 153, 1437 }, { -21, 153, 1426 },
|
||||
{ -27, 152, 1404 }, { -30, 151, 1390 }, { -28, 152, 1398 }, { -24, 153, 1415 }, { -21, 153, 1426 },
|
||||
{ -23, 153, 1416 }, { -28, 152, 1400 }, { -29, 152, 1396 }, { -26, 152, 1407 }, { -22, 152, 1423 },
|
||||
{ -17, 153, 1441 }, { -11, 153, 1461 }, { -6, 154, 1480 }, { -2, 154, 1496 }, { 0, 154, 1509 },
|
||||
{ 3, 154, 1519 }, { 6, 154, 1529 }, { 9, 154, 1540 }, { 11, 154, 1551 }, { 14, 154, 1561 },
|
||||
{ 17, 154, 1571 }, { 19, 154, 1580 }, { 21, 154, 1588 }, { 23, 154, 1595 }, { 24, 153, 1600 },
|
||||
{ 25, 153, 1603 }, { 25, 153, 1604 }, { 25, 153, 1602 }, { 24, 153, 1598 }, { 22, 152, 1590 },
|
||||
{ 18, 152, 1577 }, { 14, 152, 1560 }, { 9, 151, 1540 }, { 3, 151, 1518 }, { -3, 151, 1494 },
|
||||
{ -9, 150, 1470 }, { -15, 150, 1445 }, { -22, 150, 1422 }, { -27, 149, 1400 }, { -33, 149, 1381 },
|
||||
{ -37, 149, 1364 }, { -40, 149, 1352 }, { -42, 149, 1345 }, { -43, 148, 1343 }, { -41, 148, 1348 },
|
||||
{ -38, 149, 1360 }, { -33, 149, 1378 }, { -27, 149, 1401 }, { -20, 149, 1428 }, { -12, 149, 1457 },
|
||||
{ -4, 150, 1487 }, { 2, 150, 1517 }, { 10, 150, 1546 }, { 17, 151, 1572 }, { 23, 151, 1594 },
|
||||
{ 28, 151, 1612 }, { 31, 151, 1623 }, { 32, 151, 1628 }, { 31, 151, 1624 }, { 28, 151, 1614 },
|
||||
{ 24, 151, 1598 }, { 19, 151, 1578 }, { 12, 150, 1554 }, { 5, 150, 1527 }, { -1, 150, 1499 },
|
||||
{ -9, 150, 1471 }, { -16, 149, 1443 }, { -23, 149, 1416 }, { -29, 149, 1393 }, { -35, 149, 1372 },
|
||||
{ -39, 149, 1356 }, { -42, 149, 1346 }, { -43, 148, 1343 }, { -42, 149, 1347 }, { -38, 149, 1358 },
|
||||
{ -34, 149, 1376 }, { -28, 149, 1399 }, { -21, 149, 1426 }, { -13, 150, 1455 }, { -5, 150, 1485 },
|
||||
{ 2, 150, 1515 }, { 10, 150, 1544 }, { 17, 151, 1571 }, { 23, 151, 1594 }, { 28, 151, 1612 },
|
||||
{ 31, 151, 1623 }, { 32, 151, 1628 }, { 30, 151, 1623 }, { 27, 151, 1609 }, { 22, 151, 1589 },
|
||||
{ 15, 151, 1563 }, { 7, 150, 1534 }, { -1, 150, 1501 }, { -9, 150, 1469 }, { -18, 149, 1437 },
|
||||
{ -26, 149, 1407 }, { -32, 149, 1381 }, { -38, 149, 1361 }, { -41, 149, 1347 }, { -43, 148, 1343 },
|
||||
{ -42, 149, 1346 }, { -39, 149, 1356 }, { -35, 149, 1371 }, { -30, 149, 1390 }, { -24, 149, 1413 },
|
||||
{ -17, 149, 1438 }, { -10, 149, 1465 }, { -3, 150, 1493 }, { 3, 150, 1521 }, { 10, 150, 1547 },
|
||||
{ 17, 150, 1571 }, { 22, 151, 1592 }, { 27, 151, 1609 }, { 30, 151, 1621 }, { 32, 151, 1628 },
|
||||
{ 32, 151, 1629 }, { 31, 151, 1626 }, { 30, 152, 1620 }, { 27, 152, 1611 }, { 24, 152, 1599 },
|
||||
{ 21, 152, 1586 }, { 17, 152, 1571 }, { 12, 152, 1555 }, { 8, 153, 1538 }, { 3, 153, 1522 },
|
||||
{ 0, 153, 1506 }, { -4, 153, 1490 }, { -8, 153, 1476 }, { -11, 153, 1464 }, { -14, 153, 1453 },
|
||||
{ -16, 153, 1446 }, { -17, 154, 1441 }, { -18, 154, 1439 }, { -18, 154, 1437 }, { -18, 154, 1437 },
|
||||
{ -18, 154, 1436 }, { -18, 154, 1437 }, { -18, 154, 1438 }, { -18, 154, 1439 }, { -17, 154, 1441 },
|
||||
{ -16, 154, 1443 }, { -16, 154, 1446 }, { -15, 154, 1449 }, { -14, 154, 1452 }, { -13, 154, 1456 },
|
||||
{ -12, 154, 1460 }, { -11, 154, 1463 }, { -10, 154, 1467 }, { -9, 154, 1471 }, { -8, 154, 1475 },
|
||||
{ -7, 154, 1479 }, { -6, 154, 1483 }, { -5, 154, 1487 }, { -4, 154, 1491 }, { -3, 154, 1494 },
|
||||
{ -2, 154, 1497 }, { -1, 154, 1500 }, { 0, 154, 1502 }, { 0, 154, 1505 }, { 0, 154, 1506 },
|
||||
{ 0, 154, 1507 }, { 0, 154, 1508 }, { 0, 154, 1508 }, { 0, 154, 1508 }, { 0, 154, 1507 },
|
||||
{ 0, 154, 1507 }, { 0, 154, 1506 }, { 0, 154, 1505 }, { 0, 154, 1504 }, { 0, 154, 1503 },
|
||||
{ -1, 154, 1502 }, { -1, 154, 1501 }, { -1, 154, 1500 }, { -1, 154, 1500 }, { -1, 154, 1500 },
|
||||
{ -1, 154, 1500 }, { -1, 154, 1501 }, { -1, 154, 1502 }, { 0, 154, 1504 }, { 0, 154, 1506 },
|
||||
{ 1, 154, 1510 }, { 2, 154, 1517 }, { 5, 154, 1526 }, { 7, 154, 1535 }, { 10, 153, 1546 },
|
||||
{ 13, 153, 1557 }, { 16, 153, 1567 }, { 18, 153, 1576 }, { 20, 153, 1583 }, { 21, 153, 1588 },
|
||||
{ 22, 153, 1589 }, { 21, 153, 1588 }, { 21, 153, 1586 }, { 20, 153, 1582 }, { 18, 153, 1577 },
|
||||
{ 17, 153, 1571 }, { 15, 153, 1564 }, { 13, 153, 1557 }, { 11, 153, 1549 }, { 9, 154, 1542 },
|
||||
{ 7, 154, 1534 }, { 5, 154, 1527 }, { 4, 154, 1521 }, { 2, 154, 1515 }, { 1, 154, 1511 },
|
||||
{ 0, 154, 1508 }, { 0, 154, 1506 }, { 0, 154, 1509 }, { 3, 154, 1517 }, { 6, 154, 1529 },
|
||||
{ 9, 154, 1542 }, { 13, 153, 1555 }, { 16, 153, 1566 }, { 17, 153, 1571 }, { 18, 153, 1574 },
|
||||
{ 19, 153, 1577 }, { 19, 153, 1579 }, { 20, 153, 1581 }, { 20, 153, 1583 }, { 21, 153, 1585 },
|
||||
{ 21, 153, 1586 }, { 21, 153, 1587 }, { 22, 153, 1588 }, { 22, 153, 1589 }, { 22, 153, 1590 },
|
||||
{ 22, 153, 1591 }, { 22, 153, 1591 }, { 22, 153, 1592 }, { 23, 153, 1592 }, { 23, 153, 1592 },
|
||||
{ 23, 153, 1593 }, { 23, 152, 1593 }, { 23, 152, 1594 }, { 23, 152, 1594 }, { 23, 152, 1595 },
|
||||
{ 23, 152, 1595 }, { 24, 152, 1596 }, { 24, 152, 1596 }, { 24, 152, 1596 }, { 24, 152, 1596 },
|
||||
{ 23, 152, 1596 }, { 23, 152, 1595 }, { 23, 152, 1595 }, { 23, 152, 1594 }, { 23, 152, 1594 },
|
||||
{ 23, 152, 1594 }, { 23, 152, 1594 }, { 23, 152, 1594 }, { 23, 152, 1594 }, { 23, 152, 1595 },
|
||||
{ 24, 152, 1596 }, { 24, 152, 1597 }, { 24, 152, 1599 }, { 25, 152, 1600 }, { 25, 152, 1602 },
|
||||
{ 25, 152, 1603 }, { 26, 152, 1605 }, { 26, 152, 1607 }, { 27, 152, 1608 }, { 27, 152, 1610 },
|
||||
{ 28, 152, 1612 }, { 28, 151, 1614 }, { 29, 151, 1616 }, { 29, 151, 1618 }, { 30, 151, 1620 },
|
||||
{ 30, 151, 1621 }, { 31, 151, 1623 }, { 31, 151, 1625 }, { 32, 151, 1626 }, { 32, 151, 1628 },
|
||||
{ 32, 151, 1630 }, { 33, 151, 1631 }, { 33, 151, 1632 }, { 33, 151, 1633 }, { 34, 150, 1634 },
|
||||
{ 34, 150, 1635 }, { 34, 150, 1636 }, { 34, 150, 1636 }, { 34, 150, 1637 }, { 34, 150, 1637 },
|
||||
{ 34, 150, 1637 }, { 34, 150, 1636 }, { 34, 150, 1636 }, { 34, 150, 1635 }, { 33, 150, 1634 },
|
||||
{ 33, 151, 1632 }, { 33, 151, 1631 }, { 32, 151, 1629 }, { 32, 151, 1628 }, { 31, 151, 1626 },
|
||||
{ 31, 151, 1624 }, { 30, 151, 1622 }, { 30, 151, 1620 }, { 29, 151, 1617 }, { 29, 151, 1615 },
|
||||
{ 28, 152, 1613 }, { 27, 152, 1611 }, { 27, 152, 1609 }, { 26, 152, 1606 }, { 26, 152, 1604 },
|
||||
{ 25, 152, 1602 }, { 25, 152, 1600 }, { 24, 152, 1598 }, { 24, 152, 1597 }, { 23, 152, 1595 },
|
||||
{ 23, 152, 1595 }, { 23, 152, 1595 }, { 23, 152, 1595 }, { 24, 152, 1597 }, { 23, 152, 1595 },
|
||||
{ 21, 153, 1587 }, { 18, 153, 1576 }, { 15, 153, 1565 }, { 12, 153, 1553 }, { 9, 153, 1541 },
|
||||
{ 6, 154, 1530 }, { 3, 154, 1521 }, { 1, 154, 1513 }, { 0, 154, 1508 }, { 0, 154, 1506 },
|
||||
};
|
||||
|
||||
static s16 animdata_mario_mustache_right_2[][3] = {
|
||||
{ 23, 152, 1595 }, { 23, 152, 1595 }, { 23, 152, 1596 }, { 24, 152, 1597 }, { 24, 152, 1598 },
|
||||
{ 24, 152, 1600 }, { 25, 152, 1602 }, { 25, 152, 1604 }, { 26, 152, 1605 }, { 26, 152, 1607 },
|
||||
{ 27, 152, 1609 }, { 27, 152, 1610 }, { 28, 152, 1611 }, { 28, 152, 1612 }, { 28, 152, 1613 },
|
||||
{ 28, 152, 1613 }, { 28, 152, 1613 }, { 28, 152, 1612 }, { 27, 152, 1610 }, { 26, 152, 1607 },
|
||||
{ 26, 152, 1604 }, { 25, 152, 1600 }, { 23, 152, 1595 }, { 13, 153, 1557 }, { -3, 153, 1493 },
|
||||
{ -12, 154, 1459 }, { -3, 153, 1493 }, { 13, 153, 1557 }, { 23, 152, 1595 }, { 23, 153, 1596 },
|
||||
{ 22, 153, 1590 }, { 19, 153, 1578 }, { 15, 154, 1563 }, { 11, 154, 1548 }, { 7, 154, 1534 },
|
||||
{ 4, 155, 1524 }, { 3, 155, 1520 }, { 4, 155, 1524 }, { 6, 154, 1532 }, { 10, 154, 1544 },
|
||||
{ 13, 154, 1558 }, { 17, 153, 1572 }, { 20, 153, 1584 }, { 22, 153, 1592 }, { 23, 152, 1595 },
|
||||
{ 23, 152, 1595 }, { 23, 152, 1596 }, { 24, 152, 1597 }, { 24, 152, 1598 }, { 24, 152, 1599 },
|
||||
{ 25, 152, 1601 }, { 25, 152, 1602 }, { 25, 152, 1604 }, { 26, 152, 1606 }, { 26, 152, 1608 },
|
||||
{ 27, 152, 1610 }, { 27, 151, 1612 }, { 28, 151, 1614 }, { 28, 151, 1615 }, { 29, 151, 1617 },
|
||||
{ 29, 151, 1619 }, { 30, 151, 1620 }, { 29, 151, 1618 }, { 29, 151, 1618 }, { 29, 151, 1618 },
|
||||
{ 29, 151, 1618 }, { 29, 151, 1618 }, { 29, 151, 1618 }, { 29, 151, 1618 }, { 29, 151, 1618 },
|
||||
{ 29, 151, 1619 }, { 29, 151, 1619 }, { 29, 151, 1619 }, { 29, 151, 1619 }, { 29, 151, 1619 },
|
||||
{ 30, 151, 1620 }, { 30, 151, 1620 }, { 30, 151, 1620 }, { 30, 151, 1621 }, { 30, 151, 1621 },
|
||||
{ 30, 151, 1621 }, { 30, 151, 1622 }, { 30, 151, 1622 }, { 30, 151, 1622 }, { 30, 151, 1623 },
|
||||
{ 30, 151, 1623 }, { 31, 151, 1623 }, { 31, 151, 1624 }, { 31, 151, 1624 }, { 31, 151, 1625 },
|
||||
{ 31, 151, 1625 }, { 31, 151, 1625 }, { 31, 151, 1626 }, { 31, 151, 1626 }, { 31, 151, 1626 },
|
||||
{ 31, 151, 1626 }, { 31, 151, 1627 }, { 31, 151, 1627 }, { 32, 151, 1627 }, { 32, 151, 1627 },
|
||||
{ 32, 151, 1628 }, { 32, 151, 1628 }, { 32, 151, 1628 }, { 32, 151, 1628 }, { 32, 151, 1628 },
|
||||
{ 32, 151, 1628 }, { 32, 151, 1628 }, { 32, 151, 1628 }, { 32, 151, 1628 }, { 32, 151, 1628 },
|
||||
{ 32, 151, 1628 }, { 32, 151, 1628 }, { 32, 151, 1628 }, { 32, 151, 1628 }, { 32, 151, 1628 },
|
||||
{ 32, 151, 1627 }, { 31, 151, 1627 }, { 31, 151, 1627 }, { 31, 151, 1626 }, { 31, 151, 1626 },
|
||||
{ 31, 151, 1625 }, { 31, 151, 1625 }, { 31, 151, 1624 }, { 30, 151, 1623 }, { 30, 151, 1622 },
|
||||
{ 30, 151, 1622 }, { 30, 151, 1621 }, { 30, 151, 1620 }, { 29, 151, 1619 }, { 29, 151, 1618 },
|
||||
{ 29, 151, 1617 }, { 28, 151, 1615 }, { 28, 151, 1613 }, { 27, 151, 1611 }, { 26, 151, 1608 },
|
||||
{ 26, 151, 1605 }, { 25, 151, 1602 }, { 24, 152, 1598 }, { 23, 152, 1595 }, { 22, 152, 1591 },
|
||||
{ 21, 152, 1587 }, { 20, 152, 1583 }, { 19, 152, 1579 }, { 18, 152, 1575 }, { 16, 152, 1570 },
|
||||
{ 15, 152, 1566 }, { 14, 153, 1561 }, { 13, 153, 1557 }, { 12, 153, 1553 }, { 11, 153, 1548 },
|
||||
{ 10, 153, 1544 }, { 8, 153, 1540 }, { 7, 153, 1536 }, { 6, 153, 1532 }, { 5, 154, 1528 },
|
||||
{ 4, 154, 1525 }, { 4, 154, 1522 }, { 3, 154, 1519 }, { 2, 154, 1516 }, { 1, 154, 1513 },
|
||||
{ 1, 154, 1511 }, { 0, 154, 1510 }, { 0, 154, 1508 }, { 0, 154, 1507 }, { 0, 154, 1506 },
|
||||
{ 0, 154, 1506 },
|
||||
};
|
||||
|
||||
struct AnimDataInfo anim_mario_mustache_right[3] = {
|
||||
{ ARRAY_COUNT(animdata_mario_mustache_right_1), GD_ANIM_ROT3S, animdata_mario_mustache_right_1 },
|
||||
{ ARRAY_COUNT(animdata_mario_mustache_right_2), GD_ANIM_ROT3S, animdata_mario_mustache_right_2 },
|
||||
END_ANIMDATA_INFO_ARR,
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef GD_ANIMDATA_H
|
||||
#define GD_ANIMDATA_H
|
||||
|
||||
#include "../gd_types.h"
|
||||
#define END_ANIMDATA_INFO_ARR { -1, GD_ANIM_EMPTY, NULL }
|
||||
|
||||
extern struct AnimDataInfo anim_mario_mustache_right[];
|
||||
extern struct AnimDataInfo anim_mario_mustache_left[];
|
||||
extern struct AnimDataInfo anim_mario_lips_1[];
|
||||
extern struct AnimDataInfo anim_mario_lips_2[];
|
||||
extern struct AnimDataInfo anim_mario_eyebrows_1[];
|
||||
extern struct AnimDataInfo anim_mario_eyebrows_equalizer[];
|
||||
extern struct AnimDataInfo anim_mario_eyebrows_2[];
|
||||
extern struct AnimDataInfo anim_mario_eyebrows_3[];
|
||||
extern struct AnimDataInfo anim_mario_eyebrows_4[];
|
||||
extern struct AnimDataInfo anim_mario_eyebrows_5[];
|
||||
extern struct AnimDataInfo anim_mario_eye_left[];
|
||||
extern struct AnimDataInfo anim_mario_eye_right[];
|
||||
extern struct AnimDataInfo anim_mario_cap[];
|
||||
extern struct AnimDataInfo anim_mario_lips_3[];
|
||||
extern struct AnimDataInfo anim_mario_lips_4[];
|
||||
extern struct AnimDataInfo anim_mario_ear_left[];
|
||||
extern struct AnimDataInfo anim_mario_ear_right[];
|
||||
extern struct AnimDataInfo anim_mario_nose[];
|
||||
extern struct AnimDataInfo anim_mario_lips_5[];
|
||||
extern struct AnimDataInfo anim_mario_lips_6[];
|
||||
extern struct AnimDataInfo anim_mario_eyelid_left[];
|
||||
extern struct AnimDataInfo anim_mario_eyelid_right[];
|
||||
extern struct AnimDataInfo anim_mario_intro[];
|
||||
extern struct AnimDataInfo anim_silver_star[];
|
||||
extern struct AnimDataInfo anim_red_star[];
|
||||
|
||||
#endif // GD_ANIMDATA_H
|
||||
@@ -0,0 +1,402 @@
|
||||
#ifndef GD_DYNLIST_MACROS_H
|
||||
#define GD_DYNLIST_MACROS_H
|
||||
|
||||
/* DynListCmd Macros */
|
||||
|
||||
/**
|
||||
* Must be the first command in a dynlist.
|
||||
*/
|
||||
#define BeginList() \
|
||||
{ 53716, {0}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Must be the last command in a dynlist.
|
||||
*/
|
||||
#define EndList() \
|
||||
{ 58, {0}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* If `enable` is TRUE, then subsequent object names are treated as integers
|
||||
* rather than strings.
|
||||
*/
|
||||
#define UseIntegerNames(enable) \
|
||||
{ 0, {0}, {(void *)(enable)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the initial position of the current object
|
||||
* Supported Objs: joints, particles, nets, vertices, cameras
|
||||
*/
|
||||
#define SetInitialPosition(x, y, z) \
|
||||
{ 1, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Set the relative position of the current object
|
||||
* Supported Objs: joints, particles, vertices, cameras, labels
|
||||
*/
|
||||
#define SetRelativePosition(x, y, z) \
|
||||
{ 2, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Set the world position of the current object
|
||||
* Supported Objs: joints, nets, vertices, cameras, gadgets, views
|
||||
*/
|
||||
#define SetWorldPosition(x, y, z) \
|
||||
{ 3, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Set the normal of the current object
|
||||
* Supported Objs: vertices
|
||||
*/
|
||||
#define SetNormal(x, y, z) \
|
||||
{ 4, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Set the scale of the current object
|
||||
* Supported Objs: joints, particles, nets, gadgets, views, lights
|
||||
*/
|
||||
#define SetScale(x, y, z) \
|
||||
{ 5, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Set the rotation of the current object
|
||||
* Supported Objs: joints, nets
|
||||
*/
|
||||
#define SetRotation(x, y, z) \
|
||||
{ 6, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Set the specified bits in the object's `drawFlags` field
|
||||
* Supported Objs: all
|
||||
*/
|
||||
#define SetDrawFlag(flags) \
|
||||
{ 7, {0}, {(void *)(flags)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the specified bits in the object specific flag
|
||||
* Supported Objs: bones, joints, particles, shapes, nets, cameras, views, lights
|
||||
*/
|
||||
#define SetFlag(flags) \
|
||||
{ 8, {0}, {(void *)(flags)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Clear the specified bits in the object specific flag
|
||||
* Supported Objs: bones, joints, particles, nets, cameras
|
||||
*/
|
||||
#define ClearFlag(flags) \
|
||||
{ 9, {0}, {(void *)(flags)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the friction vector of a Joint
|
||||
* Supported Objs: joints
|
||||
*/
|
||||
#define SetFriction(x, y, z) \
|
||||
{ 10, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Set the spring value of a Bone
|
||||
* Supported Objs: bones
|
||||
*/
|
||||
#define SetSpring(spring) \
|
||||
{ 11, {0}, {0}, {(spring), 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Jump to pointed dynlist. Once that list has finished processing, flow returns
|
||||
* to the current list.
|
||||
*/
|
||||
#define CallList(list) \
|
||||
{ 12, {(void *)(list)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Sets the object's color to one of the predefined colors (see draw_objects.h
|
||||
* for the list of colors.
|
||||
* Supported Objs: joints, particles, nets, faces, gadgets
|
||||
*/
|
||||
#define SetColourNum(colourNum) \
|
||||
{ 13, {0}, {(void *)(colourNum)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Make an object of the specified type and name, and set it as the current
|
||||
* object.
|
||||
*/
|
||||
#define MakeDynObj(type, name) \
|
||||
{ 15, {(void *)(name)}, {(void *)(type)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Make a group that will contain all subsequently created objects once the
|
||||
* EndGroup command is called.
|
||||
*/
|
||||
#define StartGroup(grpName) \
|
||||
{ 16, {(void *)(grpName)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* End a group. All objects created between StartGroup and EndGroup are added to
|
||||
* the group.
|
||||
*/
|
||||
#define EndGroup(grpName) \
|
||||
{ 17, {(void *)(grpName)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Add the current object to the specified group.
|
||||
* Supported Objs: all
|
||||
*/
|
||||
#define AddToGroup(grpName) \
|
||||
{ 18, {(void *)(grpName)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set an object specific type flag.
|
||||
* Supported Objs: groups, joints, particles, nets, materials, gadgets
|
||||
*/
|
||||
#define SetType(type) \
|
||||
{ 19, {0}, {(void *)(type)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the current shape's material group to the specified group.
|
||||
* Supported Objs: shapes
|
||||
*/
|
||||
#define SetMaterialGroup(mtlGrpName) \
|
||||
{ 20, {(void *)(mtlGrpName)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Assign the specified group to the current object. The purpose of the group
|
||||
* depends on the current object's type. For shapes, it sets the vertex data.
|
||||
* For animators, it sets the animation data. For nets, it sets ???. For
|
||||
* gadgets, it sets ???.
|
||||
* Supported Objs: shapes, nets, gadgets, animators
|
||||
*/
|
||||
#define SetNodeGroup(grpName) \
|
||||
{ 21, {(void *)(grpName)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the skin group of the current Net object with the vertices from the
|
||||
* specified shape.
|
||||
* Supported Objs: nets
|
||||
*/
|
||||
#define SetSkinShape(shapeName) \
|
||||
{ 22, {(void *)(shapeName)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the plane (face) group of the current object.
|
||||
* Supported Objs: shapes, nets
|
||||
*/
|
||||
#define SetPlaneGroup(planeGrpName) \
|
||||
{ 23, {(void *)(planeGrpName)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the current object's shape, where `shapePtr` is a pointer to an
|
||||
* `ObjShape`.
|
||||
* Supported Objs: bones, joints, particles, nets, gadgets, lights
|
||||
*/
|
||||
#define SetShapePtrPtr(shapePtr) \
|
||||
{ 24, {(void *)(shapePtr)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the current object's shape, where `shapeName` is the name of a shape
|
||||
* object.
|
||||
* Supported Objs: bones, joints, particles, nets, gadgets
|
||||
*/
|
||||
#define SetShapePtr(shapeName) \
|
||||
{ 25, {(void *)(shapeName)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set offset of the connected shape
|
||||
* Supported Objs: joints
|
||||
*/
|
||||
#define SetShapeOffset(x, y, z) \
|
||||
{ 26, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Set the center of gravity of the current Net object
|
||||
* Supported Objs: nets
|
||||
*/
|
||||
#define SetCenterOfGravity(x, y, z) \
|
||||
{ 27, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
// TODO:
|
||||
|
||||
/* Link Object ID to the current dynobj */
|
||||
/* Supported Objs: groups, bones, faces, cameras, views, labels, animators */
|
||||
#define LinkWith(w1) \
|
||||
{ 28, {(void *)(w1)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/* Link Object pointer to the current dynobj */
|
||||
/* Supported Objs: groups, bones, faces, cameras, views, labels, animators */
|
||||
#define LinkWithPtr(w1) \
|
||||
{ 29, {(void *)(w1)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the specified object as the current object.
|
||||
* Supported Objs: all
|
||||
*/
|
||||
#define UseObj(name) \
|
||||
{ 30, {(void *)(name)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the current Net object's control type field. Control type is never used
|
||||
* for anything, so this command effectively does nothing.
|
||||
* Supported Objs: nets
|
||||
*/
|
||||
#define SetControlType(w2) \
|
||||
{ 31, {0}, {(void *)(w2)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the weight percentage of the specified vertex controlled by the current
|
||||
* Joint object.
|
||||
* Supported Objs: joints
|
||||
*/
|
||||
#define SetSkinWeight(vtxNum, weight) \
|
||||
{ 32, {0}, {(void *)(vtxNum)}, {(weight), 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the ambient color of the current Material object.
|
||||
* Supported Objs: materials
|
||||
*/
|
||||
#define SetAmbient(r, g, b) \
|
||||
{ 33, {0}, {0}, {(r), (g), (b)} }
|
||||
|
||||
/**
|
||||
* Set the diffuse color of the current Material or Light object.
|
||||
* Supported Objs: materials, lights
|
||||
*/
|
||||
#define SetDiffuse(r, g, b) \
|
||||
{ 34, {0}, {0}, {(r), (g), (b)} }
|
||||
|
||||
/**
|
||||
* Set the object specific ID field.
|
||||
* Supported Objs: joints, vertices, materials, lights
|
||||
*/
|
||||
#define SetId(id) \
|
||||
{ 35, {0}, {(void *)(id)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the material id of the current Face
|
||||
* Supported Objs: faces
|
||||
*/
|
||||
#define SetMaterial(id) \
|
||||
{ 36, {0}, {(void *)(id)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* For all faces in the current Group, resolve their material IDs to actual
|
||||
* `ObjMaterial`s.
|
||||
* Supported Objs: groups
|
||||
*/
|
||||
#define MapMaterials(name) \
|
||||
{ 37, {(void *)(name)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* For all faces in the current Group, resolve their vertex indices to pointers
|
||||
* to actual `ObjVertex`es. Calculate normals for all vertices in the the group
|
||||
* specified by `name`
|
||||
* Supported Objs: groups
|
||||
*/
|
||||
#define MapVertices(name) \
|
||||
{ 38, {(void *)(name)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Stub command (does nothing).
|
||||
* Supported Objs: joints
|
||||
*/
|
||||
#define Attach(name) \
|
||||
{ 39, {(void *)(name)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Attach the current object to the specified object, using the specified flags.
|
||||
* Supported Objs: joints, particles, nets, animators
|
||||
*/
|
||||
#define AttachTo(flags, name) \
|
||||
{ 40, {(void *)(name)}, {(void *)(flags)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the point at which the current object is attached to its parent object
|
||||
* Supported Objs: joints, particles, nets
|
||||
*/
|
||||
#define SetAttachOffset(x, y, z) \
|
||||
{ 41, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Set a "suffix" to use with dynobj names. All commands that take a name as a
|
||||
* parameter will have this suffix appended to the name.
|
||||
*/
|
||||
#define SetNameSuffix(suffix) \
|
||||
{ 43, {(void *)(suffix)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set the float paramter `param` to `value`.
|
||||
* For Shapes, the following parameters are supported:
|
||||
* PARM_F_ALPHA - the alpha (opacity) of the shape
|
||||
* For Gadgets, the following parameters are supported:
|
||||
* PARM_F_RANGE_MIN - the minimum value of the gadget
|
||||
* PARM_F_RANGE_MAX - the maximum value of the gadget
|
||||
* PARM_F_VARVAL - the current value of the gadget
|
||||
* For Vertices, the following parameters are supported:
|
||||
* PARM_F_ALPHA - the alpha (opacity) of the vertex
|
||||
* Supported Objs: shapes, vertices, gadgets
|
||||
*/
|
||||
#define SetParamF(param, value) \
|
||||
{ 44, {0}, {(void *)(param)}, {(value), 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Set pointer paramter `param` to `value`
|
||||
* For Labels, the following parameters are supported:
|
||||
* PARM_PTR_CHAR - the format string for the label text
|
||||
* For Views, the following parameters are supported:
|
||||
* PARM_PTR_CHAR - the name of the view
|
||||
* For Faces, the following parameters are supported:
|
||||
* PARM_PTR_OBJ_VTX - (not actually a pointer) index of a vertex created with `MakeVertex`.
|
||||
* Supported Objs: faces, views, labels */
|
||||
#define SetParamPtr(param, value) \
|
||||
{ 45, {(void *)(value)}, {(void *)(param)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Create a Net with the specified name, and add a group to it.
|
||||
*/
|
||||
#define MakeNetWithSubGroup(name) \
|
||||
{ 46, {(void *)(name)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Make a Joint and attach it to the Net created with "MakeNetWithSubGroup".
|
||||
*/
|
||||
#define MakeAttachedJoint(name) \
|
||||
{ 47, {(void *)(name)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* End a Net that was created with "MakeNetWithSubGroup"
|
||||
*/
|
||||
#define EndNetWithSubGroup(name) \
|
||||
{ 48, {(void *)(name)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Add a Vertex dynobj
|
||||
*/
|
||||
#define MakeVertex(x, y, z) \
|
||||
{ 49, {0}, {0}, {(x), (y), (z)} }
|
||||
|
||||
/**
|
||||
* Add a ValPtr dynobj
|
||||
*/
|
||||
#define MakeValPtr(id, flags, type, offset) \
|
||||
{ 50, {(void *)(id)}, {(void *)(type)}, {(offset), (flags), 0.0} }
|
||||
|
||||
/**
|
||||
* Set the texture of the current Material dynobj. Note that textures are not
|
||||
* actually supported.
|
||||
* Supported Objs: materials
|
||||
*/
|
||||
#define UseTexture(texture) \
|
||||
{ 52, {0}, {(void *)(texture)}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/**
|
||||
* Stub command (does nothing).
|
||||
* Supported Objs: vertices
|
||||
*/
|
||||
#define SetTextureST(s, t) \
|
||||
{ 53, {0}, {0}, {(s), (t), 0.0} }
|
||||
|
||||
/* Make a new Net from Shape ID */
|
||||
#define MakeNetFromShape(shape) \
|
||||
{ 54, {(void *)(shape)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
/* Make a new Net from Shape double pointer PTR */
|
||||
#define MakeNetFromShapePtrPtr(w1) \
|
||||
{ 55, {(void *)(w1)}, {0}, {0.0, 0.0, 0.0} }
|
||||
|
||||
#endif // GD_DYNLIST_MACROS_H
|
||||
@@ -0,0 +1,406 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "dynlist_macros.h"
|
||||
#include "dynlists.h"
|
||||
#include "../dynlist_proc.h"
|
||||
|
||||
static s16 mario_Face_VtxData[][3] = {
|
||||
{ 434, 326, -209 }, { 283, 371, -268 }, { 344, 531, -97 }, { 360, 187, -363 },
|
||||
{ 162, -260, 265 }, { 172, -251, 175 }, { 218, -191, 287 }, { 173, 279, 296 },
|
||||
{ 192, 226, 279 }, { 233, 346, 216 }, { 135, -283, 182 }, { 165, -299, 114 },
|
||||
{ 283, -7, -283 }, { 252, -41, -396 }, { 339, 63, -209 }, { 128, 20, 390 },
|
||||
{ 203, -50, 366 }, { 219, 24, 358 }, { 127, -74, 423 }, { 0, -125, 459 },
|
||||
{ 125, -76, 401 }, { 83, 86, 359 }, { 124, 85, 409 }, { 144, 91, 567 },
|
||||
{ 151, 5, 459 }, { 65, -67, 636 }, { 106, -104, 567 }, { 117, 1, 636 },
|
||||
{ 0, 141, 459 }, { 0, 139, 567 }, { 66, 80, 636 }, { 99, -284, 284 },
|
||||
{ 125, -295, 252 }, { 343, -31, 227 }, { 296, 35, 287 }, { 267, -115, 314 },
|
||||
{ 374, -65, 73 }, { 366, -103, 153 }, { 369, -90, 62 }, { 77, -339, 122 },
|
||||
{ 94, -363, 22 }, { 0, -123, 567 }, { 63, -198, 357 }, { 115, -178, 351 },
|
||||
{ 53, -167, 398 }, { 311, 79, 200 }, { 265, 141, 195 }, { 242, 98, 288 },
|
||||
{ 54, 306, 339 }, { 127, 314, 325 }, { 123, 383, 276 }, { 195, 158, 286 },
|
||||
{ 490, 222, -179 }, { 410, 149, -123 }, { 281, 383, 493 }, { 349, 313, 311 },
|
||||
{ 243, 407, 458 }, { 323, 286, 131 }, { 445, 241, -29 }, { 466, 126, -176 },
|
||||
{ 432, 145, -125 }, { 465, 96, -107 }, { 327, -122, -180 }, { 348, -73, -156 },
|
||||
{ 297, -152, -126 }, { 496, 52, -220 }, { 424, 90, -198 }, { 431, 480, -59 },
|
||||
{ 356, 611, 78 }, { 119, 770, 199 }, { 243, 714, 165 }, { 183, 744, 77 },
|
||||
{ 117, 190, -556 }, { 206, 36, -541 }, { 273, -85, -230 }, { 132, 423, 573 },
|
||||
{ 263, 636, 246 }, { 236, 536, 288 }, { 318, 452, 218 }, { 114, 573, -114 },
|
||||
{ 49, 394, -230 }, { 127, 365, -303 }, { 41, 126, 357 }, { 0, 127, 368 },
|
||||
{ 342, -114, -82 }, { 144, -241, 291 }, { 128, -226, 276 }, { 0, -112, 421 },
|
||||
{ 385, 17, -116 }, { 430, 29, -155 }, { 484, -69, -165 }, { 436, -20, -205 },
|
||||
{ 504, 4, -195 }, { 308, -167, 222 }, { 288, -237, 119 }, { 341, -164, 56 },
|
||||
{ 257, -234, -64 }, { 143, 91, 333 }, { 35, -227, 201 }, { 0, -293, 274 },
|
||||
{ 66, -283, 272 }, { 91, -149, 273 }, { 50, -217, 325 }, { 74, -107, 155 },
|
||||
{ 75, -227, 201 }, { 74, -321, 190 }, { 186, -226, -173 }, { 97, -313, -200 },
|
||||
{ 159, -331, 5 }, { 157, -164, 336 }, { 162, -139, 369 }, { 164, -190, 319 },
|
||||
{ 156, -150, 317 }, { 41, -314, 282 }, { 62, -329, 252 }, { 0, -342, 252 },
|
||||
{ 0, -339, 190 }, { 0, -371, 136 }, { 379, 21, -58 }, { 345, -32, -2 },
|
||||
{ 375, -21, -59 }, { 314, 331, 289 }, { 425, -38, -132 }, { 483, 49, -147 },
|
||||
{ 177, 107, 315 }, { 311, 216, 143 }, { 56, 131, 305 }, { 82, 87, 283 },
|
||||
{ 59, 268, 295 }, { 0, 383, 308 }, { 46, 224, 357 }, { 73, 297, 289 },
|
||||
{ 124, 305, 270 }, { 161, 275, 258 }, { 181, 226, 248 }, { 167, 123, 248 },
|
||||
{ 138, 92, 249 }, { 348, -76, -25 }, { 416, -115, -95 }, { 396, 155, -77 },
|
||||
{ 345, 5, -6 }, { 407, 80, -78 }, { 399, 192, -5 }, { 351, 211, 49 },
|
||||
{ 385, -16, 93 }, { 471, 410, 0 }, { 406, 344, 72 }, { 299, 642, -9 },
|
||||
{ 99, 678, -16 }, { 61, 746, 77 }, { 0, 662, 326 }, { 144, 693, 290 },
|
||||
{ 367, 553, 169 }, { 246, -69, -335 }, { 179, 521, 305 }, { 145, 447, 317 },
|
||||
{ 67, 655, 314 }, { 148, 624, 303 }, { 237, 378, 229 }, { 127, -190, 213 },
|
||||
{ 168, 2, 567 }, { 0, 1, 662 }, { 209, 314, -391 }, { 41, 354, -332 },
|
||||
{ 406, 115, -313 }, { 260, -175, -198 }, { 90, -361, -92 }, { 401, -99, -132 },
|
||||
{ 470, -19, -130 }, { 355, 55, 133 }, { 325, 107, 130 }, { 411, 73, 85 },
|
||||
{ 362, 145, 57 }, { 83, 298, -450 }, { -41, 354, -332 }, { -83, 298, -450 },
|
||||
{ -112, 190, -556 }, { -2, -382, 60 }, { -90, -361, -92 }, { -97, -313, -200 },
|
||||
{ 108, -241, -280 }, { 0, -238, -280 }, { -67, 80, 636 }, { -66, -67, 636 },
|
||||
{ -113, 529, 326 }, { -179, 521, 305 }, { -145, 447, 317 }, { -74, -107, 155 },
|
||||
{ -50, -217, 325 }, { -35, -227, 201 }, { 0, 3, -569 }, { 0, -42, -443 },
|
||||
{ -119, 770, 199 }, { -99, 678, -16 }, { -114, 573, -114 }, { -61, 746, 77 },
|
||||
{ -54, 306, 339 }, { -46, 224, 357 }, { -63, -198, 357 }, { -53, -167, 398 },
|
||||
{ 98, -67, -392 }, { 127, 441, 523 }, { 0, 423, 573 }, { 292, -219, -231 },
|
||||
{ 78, -230, -456 }, { 56, -257, -404 }, { 32, -210, -431 }, { 124, -217, -428 },
|
||||
{ 125, -185, -370 }, { 97, -166, -483 }, { 56, -159, -486 }, { -3, -72, -404 },
|
||||
{ -3, -174, -377 }, { 303, -200, -423 }, { 243, -262, -358 }, { 204, -203, -428 },
|
||||
{ 241, -139, -464 }, { 166, -110, -445 }, { 277, -93, -416 }, { 174, -205, -404 },
|
||||
{ 294, -239, -381 }, { 258, -243, -302 }, { 345, -172, -370 }, { 342, -132, -280 },
|
||||
{ 382, 54, -197 }, { 439, 41, -227 }, { 389, 29, -202 }, { 390, -13, -203 },
|
||||
{ 412, -69, -184 }, { 422, -63, -95 }, { 0, 440, 529 }, { 364, 16, 148 },
|
||||
{ 424, 39, 39 }, { 401, 29, 97 }, { 391, 132, 5 }, { 395, 101, -33 },
|
||||
{ 172, -260, -335 }, { 103, -257, -404 }, { 295, -131, -457 }, { 403, 171, -41 },
|
||||
{ -471, 410, 0 }, { -490, 222, -179 }, { -445, 241, -29 }, { -410, 149, -123 },
|
||||
{ -396, 155, -77 }, { -403, 171, -41 }, { -323, 286, 131 }, { -406, 344, 72 },
|
||||
{ -399, 192, -5 }, { -318, 452, 218 }, { -209, 314, -391 }, { -283, 371, -268 },
|
||||
{ -127, 365, -303 }, { -98, -67, -392 }, { -125, -185, -370 }, { -166, -110, -445 },
|
||||
{ -246, -69, -335 }, { -277, -93, -416 }, { -342, -132, -280 }, { -292, -219, -231 },
|
||||
{ -258, -243, -302 }, { -113, -243, -280 }, { -172, -260, -335 }, { -358, 57, 132 },
|
||||
{ -363, 17, 151 }, { -311, 79, 200 }, { -407, 29, 97 }, { -345, 5, -6 },
|
||||
{ -395, 101, -33 }, { -391, 132, 5 }, { -351, 211, 49 }, { -362, 145, 57 },
|
||||
{ -385, -16, 93 }, { -343, -31, 227 }, { -283, -7, -287 }, { -273, -85, -230 },
|
||||
{ -360, 187, -363 }, { -206, 36, -541 }, { -406, 115, -313 }, { -303, -200, -423 },
|
||||
{ -345, -172, -370 }, { -295, -131, -457 }, { -241, -139, -464 }, { -204, -203, -428 },
|
||||
{ -294, -239, -381 }, { -243, -262, -358 }, { -78, -230, -456 }, { -56, -159, -486 },
|
||||
{ -32, -210, -431 }, { -97, -166, -483 }, { -124, -217, -428 }, { -103, -257, -404 },
|
||||
{ -56, -257, -404 }, { -174, -205, -404 }, { -311, 216, 143 }, { -418, 39, 39 },
|
||||
{ -411, 73, 85 }, { -327, 106, 129 }, { -374, -65, 73 }, { -348, -76, -25 },
|
||||
{ -345, -167, 56 }, { -369, -90, 62 }, { -345, -32, -2 }, { -237, 378, 229 },
|
||||
{ -314, 331, 289 }, { -243, 407, 458 }, { -127, 441, 523 }, { -439, 41, -227 },
|
||||
{ -436, -20, -205 }, { -504, 4, -195 }, { -416, -115, -95 }, { -422, -63, -95 },
|
||||
{ -339, 63, -209 }, { -348, -73, -156 }, { -390, -13, -203 }, { -401, -99, -132 },
|
||||
{ -342, -114, -82 }, { -484, -69, -165 }, { -412, -69, -184 }, { -470, -19, -130 },
|
||||
{ -425, -38, -132 }, { -375, -21, -59 }, { -407, 80, -78 }, { -385, 17, -116 },
|
||||
{ -379, 21, -58 }, { -424, 90, -198 }, { -382, 54, -197 }, { -389, 29, -202 },
|
||||
{ -496, 52, -220 }, { -483, 49, -147 }, { -466, 126, -176 }, { -432, 145, -125 },
|
||||
{ -465, 96, -107 }, { -186, -226, -173 }, { -260, -175, -198 }, { -132, 423, 573 },
|
||||
{ -94, -363, 22 }, { -77, -339, 122 }, { -123, 383, 276 }, { -252, -20, -373 },
|
||||
{ -430, 29, -155 }, { -254, -230, -63 }, { -159, -331, 5 }, { -297, -152, -126 },
|
||||
{ -322, -122, -180 }, { -49, 394, -230 }, { -145, 91, 567 }, { -124, 85, 409 },
|
||||
{ -169, 2, 567 }, { -151, 5, 459 }, { -119, -69, 429 }, { -106, -104, 567 },
|
||||
{ -118, 1, 636 }, { -128, 20, 390 }, { -115, -178, 351 }, { -157, -164, 336 },
|
||||
{ -155, -149, 317 }, { -127, -190, 214 }, { -75, -227, 201 }, { -367, 553, 169 },
|
||||
{ -236, 536, 288 }, { -263, 636, 246 }, { -148, 624, 303 }, { -144, 693, 290 },
|
||||
{ -67, 655, 314 }, { -434, 326, -209 }, { -243, 714, 165 }, { -356, 611, 78 },
|
||||
{ -183, 744, 77 }, { -299, 642, -9 }, { -344, 531, -97 }, { -366, -103, 153 },
|
||||
{ -267, -115, 314 }, { -296, 35, 287 }, { -242, 98, 288 }, { -192, 221, 279 },
|
||||
{ -162, -139, 369 }, { -91, -147, 273 }, { -288, -237, 119 }, { -165, -299, 114 },
|
||||
{ -172, -251, 176 }, { -219, 24, 358 }, { -143, 91, 333 }, { -203, -50, 366 },
|
||||
{ -125, -76, 401 }, { -82, 87, 288 }, { -83, 86, 359 }, { -41, 126, 357 },
|
||||
{ -138, 92, 254 }, { -177, 107, 311 }, { -167, 120, 250 }, { -198, 155, 286 },
|
||||
{ -181, 221, 239 }, { -161, 268, 247 }, { -169, 277, 296 }, { -124, 298, 270 },
|
||||
{ -127, 314, 325 }, { -73, 290, 291 }, { -56, 128, 309 }, { -59, 261, 299 },
|
||||
{ -265, 141, 195 }, { -233, 346, 207 }, { -281, 383, 493 }, { -349, 313, 311 },
|
||||
{ -308, -167, 222 }, { -135, -283, 182 }, { -74, -321, 190 }, { -218, -191, 287 },
|
||||
{ -164, -187, 321 }, { -162, -260, 265 }, { -144, -241, 291 }, { -99, -284, 283 },
|
||||
{ -62, -329, 252 }, { -41, -314, 282 }, { -66, -284, 272 }, { -125, -295, 252 },
|
||||
{ -127, -226, 276 }, { -431, 480, -59 }, { 0, -320, 282 }, { -181, 161, 238 },
|
||||
{ 0, 461, 348 }, { -72, 454, 336 }, { 72, 454, 336 }, { 181, 165, 241 },
|
||||
{ 0, 529, 345 }, { 113, 529, 326 }, { -59, 524, 333 }, { 59, 524, 333 },
|
||||
{ 0, 306, 339 }, { 0, 224, 357 }, { 162, 48, 567 }, { 156, -52, 567 },
|
||||
{ -77, 126, 434 }, { -156, -52, 567 }, { -90, 127, 567 }, { 88, 127, 567 },
|
||||
{ -67, -114, 567 }, { 66, -114, 567 }, { 76, 126, 434 }, { -157, 46, 567 },
|
||||
};
|
||||
|
||||
static struct GdVtxData mario_Face_VtxInfo = { ARRAY_COUNT(mario_Face_VtxData), 0x1, mario_Face_VtxData };
|
||||
|
||||
static u16 mario_Face_FaceData[][4] = {
|
||||
{ 0, 43, 102, 112 }, { 0, 102, 42, 188 }, { 0, 354, 356, 188 }, { 0, 188, 198, 354 },
|
||||
{ 0, 198, 188, 42 }, { 0, 43, 42, 102 }, { 1, 4, 5, 6 }, { 1, 7, 8, 9 },
|
||||
{ 1, 10, 11, 5 }, { 1, 15, 16, 17 }, { 1, 18, 19, 20 }, { 1, 21, 22, 15 },
|
||||
{ 1, 23, 24, 22 }, { 1, 27, 25, 26 }, { 1, 27, 26, 431 }, { 1, 435, 23, 22 },
|
||||
{ 1, 30, 23, 435 }, { 1, 4, 31, 32 }, { 1, 33, 34, 35 }, { 1, 36, 37, 38 },
|
||||
{ 1, 11, 39, 40 }, { 1, 437, 26, 25 }, { 1, 18, 26, 19 }, { 1, 42, 43, 44 },
|
||||
{ 1, 45, 46, 47 }, { 1, 48, 49, 50 }, { 1, 47, 46, 51 }, { 1, 59, 60, 61 },
|
||||
{ 1, 62, 63, 64 }, { 1, 59, 65, 66 }, { 1, 34, 33, 45 }, { 1, 24, 15, 22 },
|
||||
{ 1, 20, 15, 18 }, { 1, 82, 83, 28 }, { 1, 82, 28, 438 }, { 1, 84, 64, 63 },
|
||||
{ 1, 85, 86, 31 }, { 1, 87, 20, 19 }, { 1, 35, 16, 20 }, { 1, 88, 89, 61 },
|
||||
{ 1, 90, 91, 92 }, { 1, 6, 5, 93 }, { 1, 94, 95, 37 }, { 1, 96, 95, 94 },
|
||||
{ 1, 21, 15, 97 }, { 1, 10, 32, 105 }, { 1, 87, 44, 20 }, { 1, 106, 96, 107 },
|
||||
{ 1, 96, 64, 95 }, { 1, 94, 108, 96 }, { 1, 109, 35, 110 }, { 1, 35, 109, 6 },
|
||||
{ 1, 111, 109, 112 }, { 1, 100, 99, 113 }, { 1, 114, 113, 115 }, { 1, 114, 32, 31 },
|
||||
{ 1, 113, 31, 100 }, { 1, 5, 4, 10 }, { 1, 105, 114, 116 }, { 1, 4, 85, 31 },
|
||||
{ 1, 109, 111, 6 }, { 1, 6, 85, 4 }, { 1, 37, 93, 94 }, { 1, 35, 6, 93 },
|
||||
{ 1, 35, 93, 37 }, { 1, 20, 44, 110 }, { 1, 20, 110, 35 }, { 1, 38, 37, 95 },
|
||||
{ 1, 84, 95, 64 }, { 1, 105, 117, 39 }, { 1, 10, 39, 11 }, { 1, 108, 94, 11 },
|
||||
{ 1, 94, 93, 5 }, { 1, 118, 119, 120 }, { 1, 57, 9, 8 }, { 1, 88, 122, 89 },
|
||||
{ 1, 123, 59, 61 }, { 1, 49, 7, 9 }, { 1, 47, 51, 124 }, { 1, 47, 124, 97 },
|
||||
{ 1, 125, 8, 46 }, { 1, 50, 129, 48 }, { 1, 126, 130, 82 }, { 1, 128, 131, 48 },
|
||||
{ 1, 131, 49, 48 }, { 1, 132, 7, 49 }, { 1, 133, 8, 7 }, { 1, 134, 51, 8 },
|
||||
{ 1, 135, 124, 51 }, { 1, 136, 97, 124 }, { 1, 127, 21, 97 }, { 1, 127, 82, 21 },
|
||||
{ 1, 34, 17, 35 }, { 1, 35, 17, 16 }, { 1, 15, 20, 16 }, { 1, 97, 15, 17 },
|
||||
{ 1, 47, 97, 17 }, { 1, 34, 47, 17 }, { 1, 137, 84, 138 }, { 1, 88, 120, 122 },
|
||||
{ 1, 84, 137, 95 }, { 1, 94, 5, 11 }, { 1, 110, 44, 43 }, { 1, 60, 53, 139 },
|
||||
{ 1, 140, 141, 139 }, { 1, 57, 8, 125 }, { 1, 118, 140, 119 }, { 1, 34, 45, 47 },
|
||||
{ 1, 37, 144, 33 }, { 1, 37, 33, 35 }, { 1, 18, 15, 24 }, { 1, 431, 26, 18 },
|
||||
{ 1, 30, 27, 23 }, { 1, 161, 27, 30 }, { 1, 161, 25, 27 }, { 1, 430, 23, 27 },
|
||||
{ 1, 431, 160, 27 }, { 1, 19, 26, 437 }, { 1, 19, 437, 41 }, { 1, 430, 160, 24 },
|
||||
{ 1, 106, 64, 96 }, { 1, 40, 166, 108 }, { 1, 166, 107, 108 }, { 1, 96, 108, 107 },
|
||||
{ 1, 84, 63, 167 }, { 1, 89, 168, 123 }, { 1, 123, 61, 89 }, { 1, 59, 123, 65 },
|
||||
{ 1, 88, 118, 120 }, { 1, 59, 66, 53 }, { 1, 61, 139, 141 }, { 1, 61, 141, 88 },
|
||||
{ 1, 169, 170, 45 }, { 1, 39, 177, 40 }, { 1, 178, 166, 177 }, { 1, 107, 166, 179 },
|
||||
{ 1, 180, 107, 181 }, { 1, 161, 30, 182 }, { 1, 183, 25, 161 }, { 1, 129, 196, 428 },
|
||||
{ 1, 428, 196, 197 }, { 1, 429, 197, 387 }, { 1, 198, 44, 199 }, { 1, 199, 44, 87 },
|
||||
{ 1, 182, 30, 29 }, { 1, 41, 25, 183 }, { 1, 180, 165, 106 }, { 1, 180, 106, 107 },
|
||||
{ 1, 139, 61, 60 }, { 1, 59, 53, 60 }, { 1, 65, 123, 92 }, { 1, 224, 66, 225 },
|
||||
{ 1, 226, 225, 91 }, { 1, 227, 91, 228 }, { 1, 63, 227, 228 }, { 1, 63, 228, 167 },
|
||||
{ 1, 91, 90, 228 }, { 1, 66, 224, 53 }, { 1, 118, 141, 140 }, { 1, 141, 118, 88 },
|
||||
{ 1, 90, 92, 168 }, { 1, 120, 229, 122 }, { 1, 119, 137, 120 }, { 1, 90, 229, 138 },
|
||||
{ 1, 168, 122, 229 }, { 1, 90, 167, 228 }, { 1, 90, 138, 167 }, { 1, 167, 138, 84 },
|
||||
{ 1, 138, 229, 137 }, { 1, 225, 92, 91 }, { 1, 231, 45, 33 }, { 1, 140, 144, 119 },
|
||||
{ 1, 137, 119, 38 }, { 1, 137, 38, 95 }, { 1, 125, 170, 172 }, { 1, 36, 119, 144 },
|
||||
{ 1, 57, 125, 143 }, { 1, 144, 231, 33 }, { 1, 169, 45, 231 }, { 1, 263, 264, 265 },
|
||||
{ 1, 272, 273, 264 }, { 1, 246, 270, 294 }, { 1, 298, 272, 267 }, { 1, 294, 271, 297 },
|
||||
{ 1, 299, 300, 301 }, { 1, 299, 301, 302 }, { 1, 302, 298, 267 }, { 1, 264, 273, 265 },
|
||||
{ 1, 307, 308, 309 }, { 1, 310, 299, 311 }, { 1, 315, 316, 310 }, { 1, 317, 315, 310 },
|
||||
{ 1, 317, 318, 315 }, { 1, 319, 311, 320 }, { 1, 317, 310, 311 }, { 1, 302, 321, 299 },
|
||||
{ 1, 321, 320, 311 }, { 1, 317, 319, 309 }, { 1, 322, 323, 324 }, { 1, 324, 267, 322 },
|
||||
{ 1, 325, 243, 326 }, { 1, 308, 318, 317 }, { 1, 313, 315, 318 }, { 1, 313, 318, 314 },
|
||||
{ 1, 314, 318, 308 }, { 1, 327, 308, 307 }, { 1, 326, 307, 325 }, { 1, 328, 309, 329 },
|
||||
{ 1, 330, 331, 243 }, { 1, 244, 331, 332 }, { 1, 261, 179, 333 }, { 1, 261, 333, 334 },
|
||||
{ 1, 336, 177, 337 }, { 1, 178, 177, 336 }, { 1, 263, 265, 297 }, { 1, 332, 323, 322 },
|
||||
{ 1, 332, 322, 244 }, { 1, 330, 243, 325 }, { 1, 323, 321, 324 }, { 1, 330, 328, 329 },
|
||||
{ 1, 329, 340, 332 }, { 1, 340, 329, 319 }, { 1, 316, 315, 313 }, { 1, 341, 179, 342 },
|
||||
{ 1, 178, 342, 179 }, { 1, 336, 342, 178 }, { 1, 333, 341, 343 }, { 1, 434, 29, 28 },
|
||||
{ 1, 349, 350, 433 }, { 1, 436, 351, 19 }, { 1, 436, 19, 41 }, { 1, 433, 351, 352 },
|
||||
{ 1, 161, 352, 183 }, { 1, 161, 182, 352 }, { 1, 350, 349, 353 }, { 1, 354, 355, 356 },
|
||||
{ 1, 371, 372, 273 }, { 1, 371, 273, 272 }, { 1, 373, 374, 265 }, { 1, 324, 302, 267 },
|
||||
{ 1, 246, 294, 375 }, { 1, 267, 244, 322 }, { 1, 331, 244, 243 }, { 1, 376, 354, 199 },
|
||||
{ 1, 378, 379, 380 }, { 1, 316, 300, 299 }, { 1, 323, 320, 321 }, { 1, 299, 310, 316 },
|
||||
{ 1, 373, 381, 374 }, { 1, 374, 381, 382 }, { 1, 382, 381, 353 }, { 1, 353, 383, 384 },
|
||||
{ 1, 372, 383, 381 }, { 1, 373, 372, 381 }, { 1, 385, 386, 387 }, { 1, 385, 382, 386 },
|
||||
{ 1, 388, 389, 382 }, { 1, 390, 391, 389 }, { 1, 392, 375, 391 }, { 1, 393, 394, 375 },
|
||||
{ 1, 395, 396, 394 }, { 1, 397, 196, 396 }, { 1, 399, 197, 196 }, { 1, 398, 387, 197 },
|
||||
{ 1, 338, 196, 129 }, { 1, 401, 394, 396 }, { 1, 294, 400, 375 }, { 1, 374, 382, 389 },
|
||||
{ 1, 374, 389, 391 }, { 1, 329, 332, 330 }, { 1, 323, 340, 320 }, { 1, 246, 375, 401 },
|
||||
{ 1, 324, 321, 302 }, { 1, 378, 380, 404 }, { 1, 342, 379, 378 }, { 1, 405, 379, 337 },
|
||||
{ 1, 406, 337, 117 }, { 1, 316, 343, 300 }, { 1, 301, 300, 371 }, { 1, 384, 372, 376 },
|
||||
{ 1, 384, 376, 199 }, { 1, 372, 371, 404 }, { 1, 372, 404, 407 }, { 1, 371, 378, 404 },
|
||||
{ 1, 356, 355, 408 }, { 1, 407, 409, 410 }, { 1, 355, 407, 408 }, { 1, 409, 411, 410 },
|
||||
{ 1, 406, 116, 412 }, { 1, 380, 405, 409 }, { 1, 413, 414, 411 }, { 1, 412, 411, 415 },
|
||||
{ 1, 412, 115, 413 }, { 1, 414, 413, 99 }, { 1, 372, 407, 355 }, { 1, 355, 376, 372 },
|
||||
{ 1, 300, 341, 378 }, { 1, 341, 300, 343 }, { 1, 333, 179, 341 }, { 1, 87, 384, 199 },
|
||||
{ 1, 405, 406, 415 }, { 1, 386, 382, 353 }, { 1, 342, 378, 341 }, { 1, 378, 371, 300 },
|
||||
{ 1, 407, 404, 380 }, { 1, 317, 309, 308 }, { 1, 323, 332, 340 }, { 1, 372, 384, 383 },
|
||||
{ 1, 87, 19, 384 }, { 1, 347, 432, 387 }, { 1, 410, 411, 416 }, { 1, 384, 350, 353 },
|
||||
{ 1, 349, 347, 353 }, { 1, 373, 265, 273 }, { 1, 330, 325, 328 }, { 1, 343, 316, 313 },
|
||||
{ 1, 330, 332, 331 }, { 1, 374, 391, 400 }, { 1, 196, 338, 396 }, { 1, 265, 374, 400 },
|
||||
{ 1, 198, 199, 354 }, { 1, 350, 19, 351 }, { 1, 436, 41, 183 }, { 1, 379, 336, 337 },
|
||||
{ 1, 298, 301, 371 }, { 1, 273, 372, 373 }, { 1, 409, 415, 411 }, { 1, 434, 346, 182 },
|
||||
{ 1, 183, 352, 351 }, { 1, 346, 347, 349 }, { 1, 386, 353, 347 }, { 1, 350, 384, 19 },
|
||||
{ 1, 353, 381, 383 }, { 1, 405, 380, 379 }, { 1, 394, 401, 375 }, { 1, 409, 407, 380 },
|
||||
{ 1, 342, 336, 379 }, { 1, 307, 328, 325 }, { 1, 414, 416, 411 }, { 1, 412, 415, 406 },
|
||||
{ 1, 418, 99, 413 }, { 1, 418, 413, 115 }, { 1, 413, 411, 412 }, { 1, 415, 409, 405 },
|
||||
{ 1, 115, 412, 116 }, { 1, 116, 406, 117 }, { 1, 406, 405, 337 }, { 1, 391, 375, 400 },
|
||||
{ 1, 399, 398, 197 }, { 1, 395, 397, 396 }, { 1, 393, 395, 394 }, { 1, 392, 393, 375 },
|
||||
{ 1, 419, 392, 391 }, { 1, 419, 391, 390 }, { 1, 390, 389, 388 }, { 1, 388, 382, 385 },
|
||||
{ 1, 398, 385, 387 }, { 1, 355, 354, 376 }, { 1, 298, 371, 272 }, { 1, 334, 333, 343 },
|
||||
{ 1, 320, 340, 319 }, { 1, 400, 297, 265 }, { 1, 117, 337, 177 }, { 1, 327, 307, 326 },
|
||||
{ 1, 314, 308, 327 }, { 1, 329, 309, 319 }, { 1, 319, 317, 311 }, { 1, 321, 311, 299 },
|
||||
{ 1, 328, 307, 309 }, { 1, 298, 302, 301 }, { 1, 400, 294, 297 }, { 1, 271, 294, 270 },
|
||||
{ 1, 172, 143, 125 }, { 1, 46, 170, 125 }, { 1, 36, 38, 119 }, { 1, 65, 92, 225 },
|
||||
{ 1, 120, 137, 229 }, { 1, 168, 229, 90 }, { 1, 123, 168, 92 }, { 1, 227, 226, 91 },
|
||||
{ 1, 226, 224, 225 }, { 1, 42, 44, 198 }, { 1, 117, 177, 39 }, { 1, 179, 181, 107 },
|
||||
{ 1, 261, 181, 179 }, { 1, 178, 179, 166 }, { 1, 46, 45, 170 }, { 1, 122, 168, 89 },
|
||||
{ 1, 165, 64, 106 }, { 1, 112, 109, 43 }, { 1, 36, 144, 37 }, { 1, 109, 110, 43 },
|
||||
{ 1, 126, 82, 127 }, { 1, 136, 127, 97 }, { 1, 135, 136, 124 }, { 1, 423, 135, 51 },
|
||||
{ 1, 423, 51, 134 }, { 1, 134, 8, 133 }, { 1, 133, 7, 132 }, { 1, 132, 49, 131 },
|
||||
{ 1, 128, 130, 126 }, { 1, 51, 46, 8 }, { 1, 105, 39, 10 }, { 1, 116, 117, 105 },
|
||||
{ 1, 115, 116, 114 }, { 1, 32, 10, 4 }, { 1, 113, 114, 31 }, { 1, 418, 115, 113 },
|
||||
{ 1, 418, 113, 99 }, { 1, 114, 105, 32 }, { 1, 100, 31, 86 }, { 1, 225, 66, 65 },
|
||||
{ 1, 108, 11, 40 }, { 1, 166, 40, 177 }, { 1, 64, 165, 62 }, { 1, 343, 313, 344 },
|
||||
{ 1, 343, 344, 334 }, { 1, 111, 85, 6 }, { 1, 112, 86, 111 }, { 1, 408, 410, 416 },
|
||||
{ 1, 407, 410, 408 }, { 1, 416, 356, 408 }, { 1, 86, 85, 111 }, { 1, 428, 48, 129 },
|
||||
{ 1, 428, 429, 130 }, { 1, 130, 429, 83 }, { 1, 387, 83, 429 }, { 1, 83, 82, 130 },
|
||||
{ 1, 130, 48, 428 }, { 1, 197, 429, 428 }, { 1, 438, 22, 21 }, { 1, 432, 28, 83 },
|
||||
{ 1, 432, 83, 387 }, { 1, 387, 386, 347 }, { 1, 21, 82, 438 }, { 1, 347, 346, 434 },
|
||||
{ 1, 28, 29, 435 }, { 1, 183, 351, 436 }, { 1, 25, 41, 437 }, { 1, 27, 160, 430 },
|
||||
{ 1, 24, 23, 430 }, { 1, 431, 18, 24 }, { 1, 24, 160, 431 }, { 1, 350, 351, 433 },
|
||||
{ 1, 433, 348, 349 }, { 1, 352, 348, 433 }, { 1, 435, 29, 30 }, { 1, 182, 29, 434 },
|
||||
{ 1, 28, 432, 434 }, { 1, 435, 438, 28 }, { 1, 434, 432, 347 }, { 1, 22, 438, 435 },
|
||||
{ 1, 396, 338, 401 }, { 1, 9, 50, 49 }, { 1, 196, 397, 399 }, { 1, 48, 130, 128 },
|
||||
{ 1, 349, 348, 439 }, { 1, 439, 348, 352 }, { 1, 439, 346, 349 }, { 1, 439, 348, 352 },
|
||||
{ 1, 439, 352, 182 }, { 1, 182, 346, 439 }, { 2, 12, 13, 14 }, { 2, 153, 13, 12 },
|
||||
{ 2, 153, 191, 13 }, { 2, 153, 200, 191 }, { 2, 256, 191, 253 }, { 2, 256, 274, 339 },
|
||||
{ 2, 274, 312, 339 }, { 2, 256, 339, 191 }, { 3, 184, 185, 186 }, { 3, 156, 150, 424 },
|
||||
{ 3, 155, 154, 425 }, { 3, 426, 421, 420 }, { 3, 420, 422, 427 }, { 3, 184, 364, 362 },
|
||||
{ 3, 157, 156, 425 }, { 3, 150, 364, 424 }, { 3, 362, 185, 184 }, { 3, 425, 154, 157 },
|
||||
{ 4, 126, 127, 128 }, { 4, 398, 399, 385 }, { 4, 388, 385, 399 }, { 4, 390, 388, 399 },
|
||||
{ 4, 419, 390, 399 }, { 4, 392, 419, 399 }, { 4, 393, 392, 399 }, { 4, 395, 393, 399 },
|
||||
{ 4, 397, 395, 399 }, { 4, 136, 128, 127 }, { 4, 135, 128, 136 }, { 4, 423, 128, 135 },
|
||||
{ 4, 134, 128, 423 }, { 4, 133, 128, 134 }, { 4, 132, 128, 133 }, { 4, 131, 128, 132 },
|
||||
{ 5, 14, 63, 74 }, { 5, 14, 74, 12 }, { 5, 142, 57, 143 }, { 5, 74, 62, 165 },
|
||||
{ 5, 170, 171, 172 }, { 5, 180, 203, 165 }, { 5, 204, 205, 206 }, { 5, 207, 200, 208 },
|
||||
{ 5, 209, 210, 200 }, { 5, 211, 206, 212 }, { 5, 181, 212, 206 }, { 5, 213, 214, 215 },
|
||||
{ 5, 216, 217, 218 }, { 5, 216, 219, 217 }, { 5, 220, 221, 214 }, { 5, 222, 223, 221 },
|
||||
{ 5, 222, 218, 223 }, { 5, 14, 224, 226 }, { 5, 14, 226, 227 }, { 5, 14, 53, 224 },
|
||||
{ 5, 14, 227, 63 }, { 5, 232, 171, 233 }, { 5, 232, 233, 144 }, { 5, 234, 172, 171 },
|
||||
{ 5, 233, 231, 144 }, { 5, 171, 170, 169 }, { 5, 232, 234, 171 }, { 5, 140, 235, 232 },
|
||||
{ 5, 140, 232, 144 }, { 5, 210, 206, 211 }, { 5, 180, 207, 208 }, { 5, 236, 219, 214 },
|
||||
{ 5, 205, 181, 206 }, { 5, 209, 200, 207 }, { 5, 237, 207, 180 }, { 5, 205, 180, 181 },
|
||||
{ 5, 237, 180, 205 }, { 5, 211, 200, 210 }, { 5, 204, 237, 205 }, { 5, 204, 207, 237 },
|
||||
{ 5, 204, 209, 207 }, { 5, 204, 210, 209 }, { 5, 204, 206, 210 }, { 5, 213, 220, 214 },
|
||||
{ 5, 213, 222, 220 }, { 5, 216, 238, 213 }, { 5, 213, 215, 216 }, { 5, 213, 238, 222 },
|
||||
{ 5, 12, 74, 153 }, { 5, 143, 172, 234 }, { 5, 239, 234, 235 }, { 5, 239, 235, 139 },
|
||||
{ 5, 139, 235, 140 }, { 5, 169, 231, 233 }, { 5, 180, 208, 236 }, { 5, 180, 236, 203 },
|
||||
{ 5, 203, 221, 223 }, { 5, 153, 223, 218 }, { 5, 200, 153, 217 }, { 5, 200, 217, 208 },
|
||||
{ 5, 253, 254, 255 }, { 5, 253, 255, 256 }, { 5, 256, 257, 258 }, { 5, 259, 258, 260 },
|
||||
{ 5, 261, 259, 262 }, { 5, 261, 262, 254 }, { 5, 263, 266, 264 }, { 5, 244, 267, 268 },
|
||||
{ 5, 245, 244, 268 }, { 5, 245, 268, 269 }, { 5, 270, 269, 271 }, { 5, 274, 256, 275 },
|
||||
{ 5, 279, 280, 281 }, { 5, 279, 282, 283 }, { 5, 282, 279, 281 }, { 5, 279, 284, 280 },
|
||||
{ 5, 279, 285, 284 }, { 5, 286, 287, 288 }, { 5, 286, 289, 287 }, { 5, 286, 290, 289 },
|
||||
{ 5, 286, 291, 290 }, { 5, 286, 292, 291 }, { 5, 211, 287, 253 }, { 5, 291, 292, 261 },
|
||||
{ 5, 292, 181, 261 }, { 5, 291, 261, 290 }, { 5, 289, 290, 253 }, { 5, 292, 288, 181 },
|
||||
{ 5, 212, 288, 211 }, { 5, 262, 285, 293 }, { 5, 261, 254, 290 }, { 5, 287, 211, 288 },
|
||||
{ 5, 267, 272, 295 }, { 5, 267, 295, 268 }, { 5, 295, 296, 269 }, { 5, 296, 263, 297 },
|
||||
{ 5, 266, 272, 264 }, { 5, 269, 296, 271 }, { 5, 295, 272, 266 }, { 5, 295, 266, 296 },
|
||||
{ 5, 312, 313, 314 }, { 5, 312, 326, 243 }, { 5, 312, 314, 327 }, { 5, 312, 327, 326 },
|
||||
{ 5, 280, 258, 257 }, { 5, 280, 260, 258 }, { 5, 285, 262, 260 }, { 5, 282, 255, 293 },
|
||||
{ 5, 282, 257, 255 }, { 5, 279, 283, 285 }, { 5, 181, 288, 212 }, { 5, 289, 253, 287 },
|
||||
{ 5, 290, 254, 253 }, { 5, 286, 288, 292 }, { 5, 261, 334, 259 }, { 5, 297, 271, 296 },
|
||||
{ 5, 275, 334, 344 }, { 5, 312, 275, 313 }, { 5, 248, 270, 246 }, { 5, 275, 344, 313 },
|
||||
{ 5, 312, 274, 275 }, { 5, 284, 285, 260 }, { 5, 236, 214, 221 }, { 5, 259, 334, 275 },
|
||||
{ 5, 211, 253, 191 }, { 5, 281, 257, 282 }, { 5, 283, 282, 293 }, { 5, 284, 260, 280 },
|
||||
{ 5, 281, 280, 257 }, { 5, 266, 263, 296 }, { 5, 268, 295, 269 }, { 5, 283, 293, 285 },
|
||||
{ 5, 248, 269, 270 }, { 5, 248, 245, 269 }, { 5, 293, 254, 262 }, { 5, 260, 262, 259 },
|
||||
{ 5, 275, 258, 259 }, { 5, 275, 256, 258 }, { 5, 257, 256, 255 }, { 5, 293, 255, 254 },
|
||||
{ 5, 219, 208, 217 }, { 5, 218, 217, 153 }, { 5, 74, 223, 153 }, { 5, 74, 203, 223 },
|
||||
{ 5, 221, 203, 236 }, { 5, 219, 236, 208 }, { 5, 142, 234, 239 }, { 5, 142, 143, 234 },
|
||||
{ 5, 191, 200, 211 }, { 5, 215, 214, 219 }, { 5, 235, 234, 232 }, { 5, 233, 171, 169 },
|
||||
{ 5, 238, 218, 222 }, { 5, 220, 222, 221 }, { 5, 215, 219, 216 }, { 5, 238, 216, 218 },
|
||||
{ 5, 203, 74, 165 }, { 5, 74, 63, 62 }, { 6, 98, 99, 100 }, { 6, 101, 102, 103 },
|
||||
{ 6, 104, 100, 86 }, { 6, 112, 101, 103 }, { 6, 103, 98, 104 }, { 6, 103, 104, 159 },
|
||||
{ 6, 103, 159, 112 }, { 6, 102, 101, 112 }, { 6, 103, 102, 187 }, { 6, 99, 98, 189 },
|
||||
{ 6, 189, 98, 103 }, { 6, 189, 103, 187 }, { 6, 187, 356, 357 }, { 6, 187, 357, 358 },
|
||||
{ 6, 187, 358, 189 }, { 6, 356, 187, 377 }, { 6, 358, 416, 414 }, { 6, 377, 187, 188 },
|
||||
{ 6, 189, 414, 99 }, { 6, 358, 414, 189 }, { 6, 357, 416, 358 }, { 6, 357, 356, 416 },
|
||||
{ 6, 356, 377, 188 }, { 6, 188, 187, 102 }, { 6, 159, 86, 112 }, { 6, 159, 104, 86 },
|
||||
{ 6, 104, 98, 100 }, { 7, 0, 1, 2 }, { 7, 3, 1, 0 }, { 7, 52, 53, 14 },
|
||||
{ 7, 54, 55, 56 }, { 7, 55, 9, 57 }, { 7, 53, 52, 58 }, { 7, 67, 2, 68 },
|
||||
{ 7, 69, 70, 71 }, { 7, 72, 3, 73 }, { 7, 54, 56, 75 }, { 7, 76, 77, 78 },
|
||||
{ 7, 2, 1, 79 }, { 7, 80, 1, 81 }, { 7, 75, 50, 54 }, { 7, 57, 121, 55 },
|
||||
{ 7, 54, 50, 55 }, { 7, 145, 78, 146 }, { 7, 2, 79, 147 }, { 7, 71, 70, 147 },
|
||||
{ 7, 147, 148, 71 }, { 7, 71, 149, 69 }, { 7, 150, 151, 69 }, { 7, 52, 0, 145 },
|
||||
{ 7, 152, 145, 68 }, { 7, 76, 68, 70 }, { 7, 151, 70, 69 }, { 7, 52, 3, 0 },
|
||||
{ 7, 80, 79, 1 }, { 7, 77, 154, 155 }, { 7, 151, 156, 157 }, { 7, 151, 157, 76 },
|
||||
{ 7, 155, 158, 77 }, { 7, 158, 57, 78 }, { 7, 152, 78, 145 }, { 7, 72, 162, 3 },
|
||||
{ 7, 80, 81, 163 }, { 7, 52, 14, 164 }, { 7, 52, 164, 3 }, { 7, 72, 173, 162 },
|
||||
{ 7, 173, 174, 163 }, { 7, 175, 72, 176 }, { 7, 72, 73, 190 }, { 7, 150, 69, 192 },
|
||||
{ 7, 69, 149, 192 }, { 7, 193, 79, 194 }, { 7, 195, 148, 193 }, { 7, 79, 80, 194 },
|
||||
{ 7, 50, 75, 129 }, { 7, 75, 201, 202 }, { 7, 155, 230, 201 }, { 7, 155, 201, 56 },
|
||||
{ 7, 155, 56, 121 }, { 7, 158, 121, 57 }, { 7, 3, 164, 73 }, { 7, 175, 174, 173 },
|
||||
{ 7, 162, 173, 81 }, { 7, 162, 81, 1 }, { 7, 57, 146, 78 }, { 7, 239, 58, 142 },
|
||||
{ 7, 57, 142, 146 }, { 7, 139, 58, 239 }, { 7, 53, 58, 139 }, { 7, 145, 58, 52 },
|
||||
{ 7, 240, 241, 242 }, { 7, 243, 244, 242 }, { 7, 244, 245, 242 }, { 7, 246, 247, 248 },
|
||||
{ 7, 245, 248, 242 }, { 7, 246, 249, 247 }, { 7, 250, 251, 252 }, { 7, 250, 252, 175 },
|
||||
{ 7, 276, 277, 278 }, { 7, 303, 246, 304 }, { 7, 186, 304, 305 }, { 7, 186, 305, 306 },
|
||||
{ 7, 186, 306, 230 }, { 7, 335, 202, 306 }, { 7, 338, 129, 335 }, { 7, 339, 277, 191 },
|
||||
{ 7, 176, 250, 175 }, { 7, 241, 276, 278 }, { 7, 241, 278, 312 }, { 7, 345, 174, 252 },
|
||||
{ 7, 176, 276, 250 }, { 7, 359, 240, 249 }, { 7, 303, 249, 246 }, { 7, 186, 360, 303 },
|
||||
{ 7, 361, 185, 362 }, { 7, 363, 364, 150 }, { 7, 360, 186, 185 }, { 7, 345, 251, 194 },
|
||||
{ 7, 241, 365, 276 }, { 7, 339, 278, 277 }, { 7, 363, 192, 366 }, { 7, 361, 366, 367 },
|
||||
{ 7, 359, 367, 240 }, { 7, 241, 240, 365 }, { 7, 150, 192, 363 }, { 7, 368, 192, 195 },
|
||||
{ 7, 369, 368, 193 }, { 7, 368, 369, 366 }, { 7, 370, 369, 194 }, { 7, 240, 247, 249 },
|
||||
{ 7, 402, 403, 338 }, { 7, 246, 403, 304 }, { 7, 335, 402, 338 }, { 7, 345, 252, 251 },
|
||||
{ 7, 370, 194, 251 }, { 7, 361, 249, 360 }, { 7, 402, 335, 305 }, { 7, 176, 277, 276 },
|
||||
{ 7, 192, 368, 366 }, { 7, 417, 367, 370 }, { 7, 243, 242, 241 }, { 7, 403, 246, 401 },
|
||||
{ 7, 402, 305, 403 }, { 7, 241, 312, 243 }, { 7, 276, 365, 251 }, { 7, 365, 370, 251 },
|
||||
{ 7, 417, 370, 365 }, { 7, 250, 276, 251 }, { 7, 304, 403, 305 }, { 7, 369, 370, 367 },
|
||||
{ 7, 306, 305, 335 }, { 7, 359, 249, 361 }, { 7, 401, 338, 403 }, { 7, 193, 194, 369 },
|
||||
{ 7, 367, 366, 369 }, { 7, 195, 193, 368 }, { 7, 417, 365, 240 }, { 7, 417, 240, 367 },
|
||||
{ 7, 359, 361, 367 }, { 7, 361, 363, 366 }, { 7, 360, 185, 361 }, { 7, 249, 303, 360 },
|
||||
{ 7, 163, 174, 80 }, { 7, 190, 191, 277 }, { 7, 202, 335, 129 }, { 7, 230, 306, 202 },
|
||||
{ 7, 421, 186, 230 }, { 7, 421, 230, 420 }, { 7, 303, 304, 186 }, { 7, 174, 175, 252 },
|
||||
{ 7, 242, 248, 247 }, { 7, 247, 240, 242 }, { 7, 146, 58, 145 }, { 7, 58, 146, 142 },
|
||||
{ 7, 163, 81, 173 }, { 7, 158, 155, 121 }, { 7, 230, 155, 422 }, { 7, 230, 422, 420 },
|
||||
{ 7, 230, 202, 201 }, { 7, 202, 129, 75 }, { 7, 345, 194, 80 }, { 7, 149, 148, 195 },
|
||||
{ 7, 148, 79, 193 }, { 7, 195, 192, 149 }, { 7, 190, 73, 191 }, { 7, 176, 72, 190 },
|
||||
{ 7, 277, 176, 190 }, { 7, 173, 72, 175 }, { 7, 78, 77, 158 }, { 7, 77, 76, 154 },
|
||||
{ 7, 76, 70, 151 }, { 7, 152, 68, 76 }, { 7, 67, 68, 145 }, { 7, 67, 145, 0 },
|
||||
{ 7, 149, 71, 148 }, { 7, 68, 147, 70 }, { 7, 148, 147, 79 }, { 7, 9, 55, 50 },
|
||||
{ 7, 152, 76, 78 }, { 7, 201, 75, 56 }, { 7, 147, 68, 2 }, { 7, 121, 56, 55 },
|
||||
{ 7, 164, 14, 13 }, { 7, 162, 1, 3 }, { 7, 67, 0, 2 }, { 7, 345, 80, 174 },
|
||||
{ 7, 73, 13, 191 }, { 7, 73, 164, 13 }, { 7, 312, 278, 339 }, { 7, 186, 421, 184 },
|
||||
{ 7, 420, 424, 426 }, { 7, 422, 425, 427 }, { 7, 426, 424, 364 }, { 7, 425, 156, 427 },
|
||||
{ 7, 363, 361, 362 }, { 7, 362, 364, 363 }, { 7, 157, 154, 76 }, { 7, 151, 150, 156 },
|
||||
{ 7, 421, 426, 184 }, { 7, 422, 155, 425 }, { 7, 420, 427, 424 }, { 7, 364, 184, 426 },
|
||||
{ 7, 156, 424, 427 },
|
||||
};
|
||||
|
||||
static struct GdFaceData mario_Face_FaceInfo = { ARRAY_COUNT(mario_Face_FaceData), 0x1, mario_Face_FaceData };
|
||||
|
||||
struct DynList dynlist_mario_face_shape[] = {
|
||||
BeginList(),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_FACE_VTX_GROUP),
|
||||
LinkWithPtr(&mario_Face_VtxInfo),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_FACE_TRI_GROUP),
|
||||
LinkWithPtr(&mario_Face_FaceInfo),
|
||||
|
||||
StartGroup(DYNOBJ_MARIO_FACE_MTL_GROUP),
|
||||
// Teeth color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(0),
|
||||
SetAmbient(1.0, 1.0, 1.0),
|
||||
SetDiffuse(1.0, 1.0, 1.0),
|
||||
// Face color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(1),
|
||||
SetAmbient(0.883, 0.602, 0.408),
|
||||
SetDiffuse(0.883, 0.602, 0.408),
|
||||
// Shadow on back of hat
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(2),
|
||||
SetAmbient(0.362, 0.0, 0.0),
|
||||
SetDiffuse(0.362, 0.0, 0.0),
|
||||
// Cap emblem color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(3),
|
||||
SetAmbient(1.0, 1.0, 1.0),
|
||||
SetDiffuse(1.0, 1.0, 1.0),
|
||||
// Eye color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(4),
|
||||
SetAmbient(1.0, 1.0, 1.0),
|
||||
SetDiffuse(1.0, 1.0, 1.0),
|
||||
// Hair color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(5),
|
||||
SetAmbient(0.362, 0.0, 0.0),
|
||||
SetDiffuse(0.362, 0.0, 0.0),
|
||||
// Mouth color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(6),
|
||||
SetAmbient(0.526, 0.0, 0.0),
|
||||
SetDiffuse(0.526, 0.0, 0.0),
|
||||
// Cap color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(7),
|
||||
SetAmbient(1.0, 0.0, 0.0),
|
||||
SetDiffuse(1.0, 0.0, 0.0),
|
||||
EndGroup(DYNOBJ_MARIO_FACE_MTL_GROUP),
|
||||
|
||||
MakeDynObj(D_SHAPE, DYNOBJ_MARIO_FACE_SHAPE),
|
||||
SetNodeGroup(DYNOBJ_MARIO_FACE_VTX_GROUP),
|
||||
SetPlaneGroup(DYNOBJ_MARIO_FACE_TRI_GROUP),
|
||||
SetMaterialGroup(DYNOBJ_MARIO_FACE_MTL_GROUP),
|
||||
|
||||
EndList(),
|
||||
};
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,82 @@
|
||||
// early unused test dynlist
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "dynlist_macros.h"
|
||||
#include "dynlists.h"
|
||||
#include "../dynlist_proc.h"
|
||||
// maybe move types into the dynlists.h file?
|
||||
|
||||
struct DynList dynlist_test_cube[] = {
|
||||
BeginList(),
|
||||
|
||||
StartGroup("ico1vg"),
|
||||
MakeVertex(-2.0, 0.0, -2.0),
|
||||
MakeVertex(-2.0, 0.0, 2.0),
|
||||
MakeVertex(2.0, 0.0, 2.0),
|
||||
MakeVertex(2.0, 0.0, -2.0),
|
||||
MakeVertex(0.0, 3.0, 0.0),
|
||||
MakeVertex(0.0, -3.0, 0.0),
|
||||
EndGroup("ico1vg"),
|
||||
|
||||
StartGroup("ico1pg"),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 1),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 3),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 4),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 3),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 1),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 4),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 1),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 4),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 3),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 4),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 5),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 3),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 1),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 5),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 1),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 5),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 3),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 5),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
EndGroup("ico1pg"),
|
||||
|
||||
UseObj("ico1pg"),
|
||||
MapVertices("ico1vg"),
|
||||
|
||||
MakeDynObj(D_SHAPE, "ico1_sh"),
|
||||
SetNodeGroup("ico1vg"),
|
||||
SetPlaneGroup("ico1pg"),
|
||||
|
||||
EndList(),
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "dynlist_macros.h"
|
||||
#include "dynlists.h"
|
||||
#include "../dynlist_proc.h"
|
||||
|
||||
struct DynList dynlist_spot_shape[] = {
|
||||
BeginList(),
|
||||
|
||||
StartGroup("spotvg"),
|
||||
MakeVertex(0.0, 0.0, 0.0),
|
||||
MakeVertex(1.0, -1.0, 1.0),
|
||||
SetParamF(PARM_F_ALPHA, 0.0),
|
||||
MakeVertex(1.0, 1.0, 1.0),
|
||||
SetParamF(PARM_F_ALPHA, 0.0),
|
||||
MakeVertex(-1.0, 1.0, 1.0),
|
||||
SetParamF(PARM_F_ALPHA, 0.0),
|
||||
MakeVertex(-1.0, -1.0, 1.0),
|
||||
SetParamF(PARM_F_ALPHA, 0.0),
|
||||
MakeVertex(0.0, 0.0, 0.0),
|
||||
EndGroup("spotvg"),
|
||||
|
||||
StartGroup("spotpg"),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 3),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 5),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 3),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 4),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 5),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 4),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 1),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 5),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 1),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 5),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 3),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 4),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 3),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 1),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 4),
|
||||
MakeDynObj(D_FACE, NULL),
|
||||
SetMaterial(0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 0),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 2),
|
||||
SetParamPtr(PARM_PTR_OBJ_VTX, 1),
|
||||
EndGroup("spotpg"),
|
||||
|
||||
UseObj("spotpg"),
|
||||
MapVertices("spotvg"),
|
||||
|
||||
MakeDynObj(D_SHAPE, "spot_sh"),
|
||||
SetNodeGroup("spotvg"),
|
||||
SetPlaneGroup("spotpg"),
|
||||
SetParamF(PARM_F_ALPHA, 0.1),
|
||||
|
||||
EndList(),
|
||||
};
|
||||
@@ -0,0 +1,148 @@
|
||||
#ifndef GD_DYNLISTS_H
|
||||
#define GD_DYNLISTS_H
|
||||
|
||||
#include "../gd_types.h"
|
||||
|
||||
// Dynamic Object names
|
||||
enum {
|
||||
DYNOBJ_MARIO_RIGHT_MUSTACHE_JOINT_2 = 3,
|
||||
DYNOBJ_MARIO_RIGHT_MUSTACHE_JOINT_1 = 6,
|
||||
DYNOBJ_MARIO_RIGHT_MUSTACHE_ANIMDATA_GROUP = 7,
|
||||
DYNOBJ_MARIO_RIGHT_MUSTACHE_ANIMATOR = 8,
|
||||
DYNOBJ_MARIO_RIGHT_MUSTACHE_SKIN_NET = 9,
|
||||
DYNOBJ_MARIO_LEFT_MUSTACHE_JOINT_2 = 12,
|
||||
DYNOBJ_MARIO_LEFT_MUSTACHE_JOINT_1 = 15,
|
||||
DYNOBJ_MARIO_LEFT_MUSTACHE_ANIMDATA_GROUP = 16,
|
||||
DYNOBJ_MARIO_LEFT_MUSTACHE_ANIMATOR = 17,
|
||||
DYNOBJ_MARIO_LEFT_MUSTACHE_SKIN_NET = 18,
|
||||
DYNOBJ_MARIO_MUSTACHE_NET = 21, // (left and right mustache skin nets are attached to this net)
|
||||
DYNOBJ_MARIO_MUSTACHE_VTX_GROUP = 22,
|
||||
DYNOBJ_MARIO_MUSTACHE_TRI_GROUP = 23,
|
||||
DYNOBJ_MARIO_MUSTACHE_MTL_GROUP = 24,
|
||||
DYNOBJ_MARIO_MUSTACHE_SHAPE = 25,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_MPART_JOINT_2 = 28,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_MPART_JOINT_1 = 31,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_MPART_SKIN_NET = 34,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_RPART_JOINT_2 = 37,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_RPART_JOINT_1 = 40,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_RPART_SKIN_NET = 43,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_LPART_JOINT_2 = 46,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_LPART_JOINT_1 = 49,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_LPART_SKIN_NET = 52,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_NET = 55,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_VTX_GROUP = 56,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_TRI_GROUP = 57,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_MTL_GROUP = 58,
|
||||
DYNOBJ_MARIO_LEFT_EYEBROW_SHAPE = 59,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_MPART_JOINT_2 = 62,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_MPART_JOINT_1 = 65,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_MPART_SKIN_NET = 68,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_LPART_JOINT_2 = 71,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_LPART_JOINT_1 = 74,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_LPART_SKIN_NET = 77,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_RPART_JOINT_2 = 80,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_RPART_JOINT_1 = 83,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_RPART_SKIN_NET = 86,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_NET = 89,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_VTX_GROUP = 90,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_TRI_GROUP = 91,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_MTL_GROUP = 92,
|
||||
DYNOBJ_MARIO_RIGHT_EYEBROW_SHAPE = 93,
|
||||
DYNOBJ_MARIO_LEFT_EYE_UNKNOWN_NET = 96,
|
||||
DYNOBJ_MARIO_LEFT_EYE_VTX_GROUP = 97,
|
||||
DYNOBJ_MARIO_LEFT_EYE_TRI_GROUP = 98,
|
||||
DYNOBJ_MARIO_LEFT_EYE_MTL_GROUP = 99,
|
||||
DYNOBJ_MARIO_LEFT_EYE_SHAPE = 100,
|
||||
DYNOMJ_MARIO_LEFT_EYE_JOINT_2 = 103,
|
||||
DYNOBJ_MARIO_LEFT_EYE_JOINT_1 = 106,
|
||||
DYNOBJ_MARIO_LEFT_EYE_ANIMDATA_GROUP = 107,
|
||||
DYNOBJ_MARIO_LEFT_EYE_ANIMATOR = 108,
|
||||
DYNOBJ_MARIO_LEFT_EYE_SKIN_NET = 109,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_UNKNOWN_NET = 112,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_VTX_GROUP = 113,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_TRI_GROUP = 114,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_MTL_GROUP = 115,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_SHAPE = 116,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_JOINT_2 = 119,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_JOINT_1 = 122,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_ANIMDATA_GROUP = 123,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_ANIMATOR = 124,
|
||||
DYNOBJ_MARIO_RIGHT_EYE_SKIN_NET = 125,
|
||||
DYNOBJ_MARIO_CAP_JOINT_2 = 128,
|
||||
DYNOBJ_MARIO_CAP_JOINT_1 = 131,
|
||||
DYNOBJ_MARIO_CAP_ANIMDATA_GROUP = 132,
|
||||
DYNOBJ_MARIO_CAP_ANIMATOR = 133,
|
||||
DYNOBJ_MARIO_CAP_SKIN_NET = 134,
|
||||
DYNOBJ_MARIO_UNKNOWN_137 = 137,
|
||||
DYNOBJ_MARIO_UNKNOWN_140 = 140,
|
||||
DYNOBJ_MARIO_LEFT_LIP_CORNER_JOINT_2 = 146,
|
||||
DYNOBJ_MARIO_LEFT_LIP_CORNER_JOINT_1 = 149,
|
||||
DYNOBJ_MARIO_LEFT_LIP_CORNER_ANIMDATA_GROUP = 150,
|
||||
DYNOBJ_MARIO_LEFT_LIP_CORNER_ANIMATOR = 151,
|
||||
DYNOBJ_MARIO_LEFT_LIP_CORNER_SKIN_NET = 152,
|
||||
DYNOBJ_MARIO_RIGHT_LIP_CORNER_JOINT_2 = 155,
|
||||
DYNOBJ_MARIO_RIGHT_LIP_CORNER_JOINT_1 = 158,
|
||||
DYNOBJ_MARIO_RIGHT_LIP_CORNER_ANIMDATA_GROUP = 159,
|
||||
DYNOBJ_MARIO_RIGHT_LIP_CORNER_ANIMATOR = 160,
|
||||
DYNOBJ_MARIO_RIGHT_LIP_CORNER_SKIN_NET = 161,
|
||||
DYNOBJ_MARIO_LEFT_EAR_JOINT_2 = 164,
|
||||
DYNOBJ_MARIO_LEFT_EAR_JOINT_1 = 167, // 167 "N167l"
|
||||
DYNOBJ_MARIO_LEFT_EAR_ANIMDATA_GROUP = 168,
|
||||
DYNOBJ_MARIO_LEFT_EAR_ANIMATOR = 169,
|
||||
DYNOBJ_MARIO_LEFT_EAR_SKIN_NET = 170,
|
||||
DYNOBJ_MARIO_RIGHT_EAR_JOINT_2 = 173,
|
||||
DYNOBJ_MARIO_RIGHT_EAR_JOINT_1 = 176,
|
||||
DYNOBJ_MARIO_RIGHT_EAR_ANIMADATA_GROUP = 177,
|
||||
DYNOBJ_MARIO_RIGHT_EAR_ANIMATOR = 178,
|
||||
DYNOBJ_MARIO_RIGHT_EAR_SKIN_NET = 179,
|
||||
DYNOBJ_MARIO_NOSE_JOINT_2 = 182,
|
||||
DYNOBJ_MARIO_NOSE_JOINT_1 = 185,
|
||||
DYNOBJ_MARIO_NOSE_ANIMDATA_GROUP = 186,
|
||||
DYNOBJ_MARIO_NOSE_ANIMATOR = 187,
|
||||
DYNOBJ_MARIO_NOSE_SKIN_NET = 188,
|
||||
DYNOBJ_MARIO_UNKNOWN_191 = 191,
|
||||
DYNOBJ_MARIO_LEFT_JAW_JOINT = 194,
|
||||
DYNOBJ_MARIO_LEFT_JAW_ANIMDATA_GROUP = 195,
|
||||
DYNOBJ_MARIO_LEFT_JAW_ANIMATOR = 196,
|
||||
DYNOBJ_MARIO_RIGHT_JAW_JOINT = 197,
|
||||
DYNOBJ_MARIO_RIGHT_JAW_ANIMDATA_GROUP = 198,
|
||||
DYNOBJ_MARIO_RIGHT_JAW_ANIMATOR = 199,
|
||||
DYNOBJ_MARIO_JAW_SKIN_NET = 200,
|
||||
DYNOBJ_LEFT_EYELID_JOINT_2 = 203,
|
||||
DYNOBJ_LEFT_EYELID_JOINT_1 = 206,
|
||||
DYNOBJ_LEFT_EYELID_ANIMDATA_GROUP = 207,
|
||||
DYNOBJ_LEFT_EYELID_ANIMATOR = 208,
|
||||
DYNOBJ_LEFT_EYELID_SKIN_NET = 209,
|
||||
DYNOBJ_RIGHT_EYELID_JOINT_2 = 212,
|
||||
DYNOBJ_RIGHT_EYELID_JOINT_1 = 215,
|
||||
DYNOBJ_RIGHT_EYELID_ANIMDATA_GROUP = 216,
|
||||
DYNOBJ_RIGHT_EYELID_ANIMATOR = 217,
|
||||
DYNOBJ_RIGHT_EYELID_SKIN_NET = 218,
|
||||
DYNOBJ_MARIO_MAIN_NET = 221, // rename to HEAD_NET?
|
||||
DYNOBJ_MARIO_FACE_VTX_GROUP = 222,
|
||||
DYNOBJ_MARIO_FACE_TRI_GROUP = 223,
|
||||
DYNOBJ_MARIO_FACE_MTL_GROUP = 224,
|
||||
DYNOBJ_MARIO_FACE_SHAPE = 225,
|
||||
DYNOBJ_MARIO_HEAD_ANIMDATA_GROUP = 226,
|
||||
DYNOBJ_MARIO_HEAD_ANIMATOR = 227,
|
||||
DYNOBJ_SILVER_STAR_LIGHT = 228, // "N228l"
|
||||
DYNOBJ_SILVER_STAR_ANIMDATA_GROUP = 229,
|
||||
DYNOBJ_SILVER_STAR_ANIMATOR = 230,
|
||||
DYNOBJ_RED_STAR_LIGHT = 231, // "N231l"
|
||||
DYNOBJ_RED_STAR_ANIMDATA_GROUP = 232,
|
||||
DYNOBJ_RED_STAR_ANIMATOR = 233,
|
||||
DYNOBJ_MARIO_MAIN_SHAPES_GROUP = 1000, // "N1000l"
|
||||
DYNOBJ_MARIO_MAIN_ANIMATOR = 1001 // root animator
|
||||
};
|
||||
|
||||
extern struct DynList dynlist_test_cube[];
|
||||
extern struct DynList dynlist_spot_shape[];
|
||||
extern struct DynList dynlist_mario_face_shape[];
|
||||
extern struct DynList dynlist_mario_eye_right_shape[];
|
||||
extern struct DynList dynlist_mario_eye_left_shape[];
|
||||
extern struct DynList dynlist_mario_eyebrow_right_shape[];
|
||||
extern struct DynList dynlist_mario_eyebrow_left_shape[];
|
||||
extern struct DynList dynlist_mario_mustache_shape[];
|
||||
extern struct DynList dynlist_mario_master[];
|
||||
|
||||
#endif // GD_DYNLISTS_H
|
||||
@@ -0,0 +1,170 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "dynlist_macros.h"
|
||||
#include "dynlists.h"
|
||||
#include "../dynlist_proc.h"
|
||||
|
||||
static s16 verts_mario_eyebrow_right[][3] = {
|
||||
{ 105, 391, 363 }, { 62, 370, 378 }, { 86, 366, 370 }, { 171, 380, 339 }, { 139, 377, 353 },
|
||||
{ 193, 353, 331 }, { 204, 314, 297 }, { 175, 342, 305 }, { 209, 361, 291 }, { 124, 360, 323 },
|
||||
{ 161, 393, 306 }, { 230, 323, 286 }, { 233, 276, 289 }, { 123, 402, 319 }, { 85, 399, 334 },
|
||||
{ 73, 355, 342 }, { 45, 330, 354 }, { 17, 294, 356 }, { 29, 348, 361 }, { 212, 358, 323 },
|
||||
{ 214, 324, 318 }, { 139, 394, 353 }, { 57, 339, 377 }, { 231, 330, 311 }, { 58, 384, 349 },
|
||||
{ 41, 345, 382 },
|
||||
};
|
||||
|
||||
static struct GdVtxData vtx_mario_eyebrow_right = { ARRAY_COUNT(verts_mario_eyebrow_right), 0x1, verts_mario_eyebrow_right };
|
||||
|
||||
static u16 facedata_mario_eyebrow_right[][4] = {
|
||||
{ 0, 0, 1, 2 }, { 0, 3, 4, 5 }, { 0, 20, 23, 19 }, { 0, 1, 25, 22 }, { 0, 0, 21, 13 },
|
||||
{ 0, 2, 15, 9 }, { 0, 7, 6, 20 }, { 0, 3, 19, 8 }, { 0, 25, 1, 24 }, { 0, 19, 5, 20 },
|
||||
{ 0, 19, 3, 5 }, { 0, 3, 21, 4 }, { 0, 21, 0, 4 }, { 0, 0, 2, 4 }, { 0, 1, 22, 2 },
|
||||
{ 0, 20, 12, 23 }, { 0, 13, 14, 0 }, { 0, 4, 2, 9 }, { 0, 20, 5, 7 }, { 0, 22, 17, 16 },
|
||||
{ 0, 8, 10, 3 }, { 0, 24, 18, 25 }, { 0, 23, 11, 8 }, { 0, 14, 24, 1 }, { 0, 5, 4, 9 },
|
||||
{ 0, 2, 22, 15 }, { 0, 11, 23, 12 }, { 0, 25, 18, 17 }, { 0, 20, 6, 12 }, { 0, 10, 13, 21 },
|
||||
{ 0, 8, 19, 23 }, { 0, 25, 17, 22 }, { 0, 1, 0, 14 }, { 0, 21, 3, 10 }, { 0, 22, 16, 15 },
|
||||
{ 0, 9, 7, 5 },
|
||||
};
|
||||
|
||||
static struct GdFaceData faces_mario_eyebrow_right = { ARRAY_COUNT(facedata_mario_eyebrow_right), 0x1, facedata_mario_eyebrow_right };
|
||||
|
||||
struct DynList dynlist_mario_eyebrow_right_shape[] = {
|
||||
BeginList(),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_RIGHT_EYEBROW_VTX_GROUP),
|
||||
LinkWithPtr(&vtx_mario_eyebrow_right),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_RIGHT_EYEBROW_TRI_GROUP),
|
||||
LinkWithPtr(&faces_mario_eyebrow_right),
|
||||
|
||||
StartGroup(DYNOBJ_MARIO_RIGHT_EYEBROW_MTL_GROUP),
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(0),
|
||||
SetAmbient(0.0, 0.005, 0.0), // Why is green 0.005 on the right eyebrow, but 0.0 on the left eyebrow?
|
||||
SetDiffuse(0.0, 0.0, 0.0),
|
||||
EndGroup(DYNOBJ_MARIO_RIGHT_EYEBROW_MTL_GROUP),
|
||||
|
||||
MakeDynObj(D_SHAPE, DYNOBJ_MARIO_RIGHT_EYEBROW_SHAPE),
|
||||
SetNodeGroup(DYNOBJ_MARIO_RIGHT_EYEBROW_VTX_GROUP),
|
||||
SetPlaneGroup(DYNOBJ_MARIO_RIGHT_EYEBROW_TRI_GROUP),
|
||||
SetMaterialGroup(DYNOBJ_MARIO_RIGHT_EYEBROW_MTL_GROUP),
|
||||
|
||||
EndList(),
|
||||
};
|
||||
|
||||
static s16 verts_mario_eyebrow_left[][3] = {
|
||||
{ -57, 339, 377 }, { -17, 294, 356 }, { -45, 341, 383 }, { -45, 330, 354 }, { -73, 355, 342 },
|
||||
{ -52, 377, 349 }, { -139, 394, 353 }, { -123, 402, 319 }, { -161, 393, 306 }, { -233, 276, 289 },
|
||||
{ -204, 314, 297 }, { -214, 324, 318 }, { -29, 335, 363 }, { -231, 330, 311 }, { -230, 323, 286 },
|
||||
{ -86, 366, 370 }, { -124, 360, 323 }, { -139, 377, 353 }, { -193, 353, 331 }, { -62, 370, 378 },
|
||||
{ -85, 399, 334 }, { -209, 361, 291 }, { -171, 380, 339 }, { -175, 342, 305 }, { -105, 391, 363 },
|
||||
{ -212, 358, 323 },
|
||||
};
|
||||
|
||||
static struct GdVtxData vtx_mario_eyebrow_left = { ARRAY_COUNT(verts_mario_eyebrow_left), 0x1, verts_mario_eyebrow_left };
|
||||
|
||||
static u16 facedata_mario_eyebrow_left[][4] = {
|
||||
{ 0, 0, 1, 2 }, { 0, 8, 22, 6 }, { 0, 6, 7, 8 }, { 0, 9, 10, 11 }, { 0, 1, 12, 2 },
|
||||
{ 0, 9, 13, 14 }, { 0, 4, 0, 15 }, { 0, 16, 17, 18 }, { 0, 19, 5, 20 }, { 0, 21, 14, 13 },
|
||||
{ 0, 2, 12, 5 }, { 0, 22, 8, 21 }, { 0, 3, 1, 0 }, { 0, 23, 18, 11 }, { 0, 16, 15, 17 },
|
||||
{ 0, 24, 20, 7 }, { 0, 13, 9, 11 }, { 0, 15, 0, 19 }, { 0, 17, 15, 24 }, { 0, 17, 24, 6 },
|
||||
{ 0, 17, 6, 22 }, { 0, 18, 22, 25 }, { 0, 11, 18, 25 }, { 0, 4, 3, 0 }, { 0, 18, 23, 16 },
|
||||
{ 0, 20, 24, 19 }, { 0, 13, 25, 21 }, { 0, 5, 19, 2 }, { 0, 21, 25, 22 }, { 0, 11, 10, 23 },
|
||||
{ 0, 18, 17, 22 }, { 0, 15, 19, 24 }, { 0, 16, 4, 15 }, { 0, 7, 6, 24 }, { 0, 0, 2, 19 },
|
||||
{ 0, 25, 13, 11 },
|
||||
};
|
||||
|
||||
static struct GdFaceData faces_mario_eyebrow_left = { ARRAY_COUNT(facedata_mario_eyebrow_left), 0x1, facedata_mario_eyebrow_left };
|
||||
|
||||
struct DynList dynlist_mario_eyebrow_left_shape[] = {
|
||||
BeginList(),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_LEFT_EYEBROW_VTX_GROUP),
|
||||
LinkWithPtr(&vtx_mario_eyebrow_left),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_LEFT_EYEBROW_TRI_GROUP),
|
||||
LinkWithPtr(&faces_mario_eyebrow_left),
|
||||
|
||||
StartGroup(DYNOBJ_MARIO_LEFT_EYEBROW_MTL_GROUP),
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(0),
|
||||
SetAmbient(0.0, 0.0, 0.0),
|
||||
SetDiffuse(0.0, 0.0, 0.0),
|
||||
EndGroup(DYNOBJ_MARIO_LEFT_EYEBROW_MTL_GROUP),
|
||||
|
||||
MakeDynObj(D_SHAPE, DYNOBJ_MARIO_LEFT_EYEBROW_SHAPE),
|
||||
SetNodeGroup(DYNOBJ_MARIO_LEFT_EYEBROW_VTX_GROUP),
|
||||
SetPlaneGroup(DYNOBJ_MARIO_LEFT_EYEBROW_TRI_GROUP),
|
||||
SetMaterialGroup(DYNOBJ_MARIO_LEFT_EYEBROW_MTL_GROUP),
|
||||
|
||||
EndList(),
|
||||
};
|
||||
|
||||
static s16 verts_mario_mustache[][3] = {
|
||||
{ -202, 15, 400 }, { -295, -13, 358 }, { -287, -45, 362 }, { 229, -89, 385 },
|
||||
{ 214, -126, 385 }, { 221, -131, 360 }, { -266, 73, 363 }, { -202, 15, 375 },
|
||||
{ -154, -160, 372 }, { -154, -148, 397 }, { -191, -150, 387 }, { 276, -74, 345 },
|
||||
{ 287, -45, 362 }, { 276, -74, 370 }, { -221, -131, 360 }, { -214, -126, 385 },
|
||||
{ -229, -89, 385 }, { -298, -45, 337 }, { 293, 20, 357 }, { 295, -13, 358 },
|
||||
{ 307, -13, 333 }, { 202, 15, 400 }, { 266, 73, 363 }, { 202, 15, 375 },
|
||||
{ -95, -25, 457 }, { 95, -25, 457 }, { -95, -25, 406 }, { 95, -25, 406 },
|
||||
{ 154, -148, 397 }, { 110, -178, 416 }, { 121, -188, 384 }, { 266, 88, 338 },
|
||||
{ -293, 20, 357 }, { -266, 88, 338 }, { -276, -74, 370 }, { -239, -95, 359 },
|
||||
{ 197, -155, 362 }, { 191, -150, 387 }, { -68, -181, 427 }, { -110, -178, 416 },
|
||||
{ -75, -191, 396 }, { -4, -157, 406 }, { 4, -157, 406 }, { -4, -157, 444 },
|
||||
{ -197, -155, 362 }, { 154, -160, 372 }, { 239, -95, 359 }, { 298, -45, 337 },
|
||||
{ -307, -13, 333 }, { -276, -74, 345 }, { 68, -181, 427 }, { 4, -157, 444 },
|
||||
{ -121, -188, 384 }, { 75, -191, 396 }, { 304, 20, 332 }, { -304, 20, 332 },
|
||||
};
|
||||
|
||||
static struct GdVtxData vtx_mario_mustache = { ARRAY_COUNT(verts_mario_mustache), 0x1, verts_mario_mustache };
|
||||
|
||||
static u16 facedata_mario_mustache[][4] = {
|
||||
{ 0, 0, 1, 2 }, { 0, 3, 4, 5 }, { 0, 3, 5, 46 }, { 0, 6, 0, 7 }, { 0, 6, 7, 33 },
|
||||
{ 0, 8, 9, 10 }, { 0, 8, 10, 44 }, { 0, 11, 47, 12 }, { 0, 11, 12, 13 }, { 0, 14, 15, 16 },
|
||||
{ 0, 14, 16, 35 }, { 0, 2, 1, 48 }, { 0, 2, 48, 17 }, { 0, 18, 19, 20 }, { 0, 18, 20, 54 },
|
||||
{ 0, 21, 22, 31 }, { 0, 21, 31, 23 }, { 0, 24, 25, 27 }, { 0, 24, 27, 26 }, { 0, 27, 25, 21 },
|
||||
{ 0, 27, 21, 23 }, { 0, 0, 24, 26 }, { 0, 0, 26, 7 }, { 0, 28, 29, 30 }, { 0, 28, 30, 45 },
|
||||
{ 0, 31, 22, 18 }, { 0, 31, 18, 54 }, { 0, 32, 6, 33 }, { 0, 32, 33, 55 }, { 0, 16, 34, 49 },
|
||||
{ 0, 16, 49, 35 }, { 0, 36, 5, 4 }, { 0, 36, 4, 37 }, { 0, 38, 39, 52 }, { 0, 38, 52, 40 },
|
||||
{ 0, 41, 42, 51 }, { 0, 41, 51, 43 }, { 0, 10, 15, 14 }, { 0, 10, 14, 44 }, { 0, 37, 28, 45 },
|
||||
{ 0, 37, 45, 36 }, { 0, 35, 7, 26 }, { 0, 13, 3, 46 }, { 0, 13, 46, 11 }, { 0, 19, 12, 47 },
|
||||
{ 0, 19, 47, 20 }, { 0, 1, 32, 55 }, { 0, 1, 55, 48 }, { 0, 34, 2, 17 }, { 0, 34, 17, 49 },
|
||||
{ 0, 43, 38, 40 }, { 0, 43, 40, 41 }, { 0, 42, 53, 50 }, { 0, 42, 50, 51 }, { 0, 39, 9, 8 },
|
||||
{ 0, 39, 8, 52 }, { 0, 29, 50, 53 }, { 0, 29, 53, 30 }, { 0, 51, 50, 25 }, { 0, 43, 51, 25 },
|
||||
{ 0, 43, 25, 24 }, { 0, 29, 28, 25 }, { 0, 3, 13, 12 }, { 0, 3, 12, 21 }, { 0, 3, 21, 25 },
|
||||
{ 0, 50, 29, 25 }, { 0, 25, 37, 4 }, { 0, 25, 28, 37 }, { 0, 25, 4, 3 }, { 0, 9, 39, 24 },
|
||||
{ 0, 16, 15, 24 }, { 0, 39, 38, 24 }, { 0, 38, 43, 24 }, { 0, 10, 9, 24 }, { 0, 24, 0, 16 },
|
||||
{ 0, 15, 10, 24 }, { 0, 8, 44, 14 }, { 0, 18, 22, 21 }, { 0, 19, 18, 21 }, { 0, 12, 19, 21 },
|
||||
{ 0, 0, 6, 32 }, { 0, 0, 32, 1 }, { 0, 2, 34, 16 }, { 0, 2, 16, 0 }, { 0, 23, 11, 46 },
|
||||
{ 0, 8, 14, 35 }, { 0, 23, 31, 54 }, { 0, 46, 27, 23 }, { 0, 8, 35, 26 }, { 0, 27, 46, 45 },
|
||||
{ 0, 54, 20, 47 }, { 0, 54, 47, 11 }, { 0, 55, 33, 7 }, { 0, 7, 49, 55 }, { 0, 49, 17, 55 },
|
||||
{ 0, 17, 48, 55 }, { 0, 35, 49, 7 }, { 0, 54, 11, 23 }, { 0, 46, 5, 45 }, { 0, 5, 36, 45 },
|
||||
};
|
||||
|
||||
static struct GdFaceData faces_mario_mustache = { ARRAY_COUNT(facedata_mario_mustache), 0x1, facedata_mario_mustache };
|
||||
|
||||
struct DynList dynlist_mario_mustache_shape[] = {
|
||||
BeginList(),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_MUSTACHE_VTX_GROUP),
|
||||
LinkWithPtr(&vtx_mario_mustache),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_MUSTACHE_TRI_GROUP),
|
||||
LinkWithPtr(&faces_mario_mustache),
|
||||
|
||||
StartGroup(DYNOBJ_MARIO_MUSTACHE_MTL_GROUP),
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(0),
|
||||
SetAmbient(0.0, 0.0, 0.0),
|
||||
SetDiffuse(0.0, 0.0, 0.0),
|
||||
EndGroup(DYNOBJ_MARIO_MUSTACHE_MTL_GROUP),
|
||||
|
||||
MakeDynObj(D_SHAPE, DYNOBJ_MARIO_MUSTACHE_SHAPE),
|
||||
SetNodeGroup(DYNOBJ_MARIO_MUSTACHE_VTX_GROUP),
|
||||
SetPlaneGroup(DYNOBJ_MARIO_MUSTACHE_TRI_GROUP),
|
||||
SetMaterialGroup(DYNOBJ_MARIO_MUSTACHE_MTL_GROUP),
|
||||
|
||||
EndList(),
|
||||
};
|
||||
@@ -0,0 +1,160 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "dynlist_macros.h"
|
||||
#include "dynlists.h"
|
||||
#include "../dynlist_proc.h"
|
||||
|
||||
static s16 verts_mario_eye_right[][3] = {
|
||||
{ 306, 26, 83 }, { 318, 18, 81 }, { 312, -13, 94 }, { 308, 43, 53 }, { 320, 35, 50 },
|
||||
{ 308, 47, 12 }, { 320, 39, 9 }, { 316, 31, -30 }, { 304, 39, -27 }, { 311, 11, -58 },
|
||||
{ 299, 19, -55 }, { 304, -21, -66 }, { 287, -46, -51 }, { 299, -54, -53 }, { 285, -64, -20 },
|
||||
{ 297, -72, -23 }, { 286, -69, 20 }, { 299, -76, 17 }, { 301, -68, 57 }, { 289, -60, 60 },
|
||||
{ 305, -47, 85 }, { 294, -40, 88 }, { 315, -35, 13 }, { 316, -33, 21 }, { 317, -28, 25 },
|
||||
{ 293, -14, -64 }, { 316, -17, 67 }, { 312, -37, 61 }, { 310, -50, 44 }, { 307, -53, -14 },
|
||||
{ 308, -42, -33 }, { 311, -22, -41 }, { 315, -2, -36 }, { 319, 10, -18 }, { 322, 13, 39 },
|
||||
{ 320, 2, 59 }, { 318, -20, 29 }, { 308, -57, 15 }, { 315, -34, 4 }, { 315, -30, 0 },
|
||||
{ 316, -22, -4 }, { 318, -14, -1 }, { 319, -9, 2 }, { 322, 16, 10 }, { 320, -8, 20 },
|
||||
{ 319, -13, 24 }, { 320, -7, 11 }, { 301, -6, 96 },
|
||||
};
|
||||
|
||||
static struct GdVtxData vtx_mario_eye_right = { ARRAY_COUNT(verts_mario_eye_right), 0x1, verts_mario_eye_right };
|
||||
|
||||
static u16 facedata_mario_eye_right[][4] = {
|
||||
{ 1, 2, 1, 0 }, { 1, 1, 4, 3 }, { 1, 4, 6, 5 }, { 1, 6, 7, 5 }, { 1, 7, 9, 8 },
|
||||
{ 1, 9, 11, 10 }, { 1, 11, 13, 12 }, { 1, 13, 15, 14 }, { 1, 15, 17, 16 }, { 1, 17, 18, 16 },
|
||||
{ 1, 18, 20, 19 }, { 1, 20, 2, 21 }, { 1, 0, 47, 2 }, { 1, 2, 26, 1 }, { 1, 20, 26, 2 },
|
||||
{ 1, 18, 27, 20 }, { 1, 17, 28, 18 }, { 1, 15, 29, 17 }, { 1, 13, 30, 15 }, { 1, 11, 31, 13 },
|
||||
{ 1, 9, 31, 11 }, { 1, 7, 32, 9 }, { 1, 6, 33, 7 }, { 1, 4, 34, 6 }, { 1, 1, 35, 4 },
|
||||
{ 1, 35, 34, 4 }, { 1, 34, 43, 6 }, { 1, 6, 43, 33 }, { 1, 7, 33, 32 }, { 1, 9, 32, 31 },
|
||||
{ 1, 31, 30, 13 }, { 1, 30, 29, 15 }, { 1, 29, 37, 17 }, { 1, 17, 37, 28 }, { 1, 18, 28, 27 },
|
||||
{ 1, 20, 27, 26 }, { 1, 26, 35, 1 }, { 1, 3, 0, 1 }, { 1, 5, 3, 4 }, { 1, 7, 8, 5 },
|
||||
{ 1, 9, 10, 8 }, { 1, 11, 25, 10 }, { 1, 12, 25, 11 }, { 1, 14, 12, 13 }, { 1, 16, 14, 15 },
|
||||
{ 1, 18, 19, 16 }, { 1, 2, 47, 21 }, { 1, 20, 21, 19 }, { 2, 26, 36, 35 }, { 2, 27, 36, 26 },
|
||||
{ 2, 28, 24, 27 }, { 2, 37, 23, 28 }, { 2, 29, 38, 37 }, { 2, 30, 39, 29 }, { 2, 31, 40, 30 },
|
||||
{ 2, 32, 40, 31 }, { 2, 33, 41, 32 }, { 2, 43, 42, 33 }, { 2, 34, 44, 43 }, { 2, 35, 45, 34 },
|
||||
{ 2, 45, 44, 34 }, { 2, 44, 46, 43 }, { 2, 43, 46, 42 }, { 2, 33, 42, 41 }, { 2, 32, 41, 40 },
|
||||
{ 2, 40, 39, 30 }, { 2, 39, 38, 29 }, { 2, 38, 22, 37 }, { 2, 37, 22, 23 }, { 2, 28, 23, 24 },
|
||||
{ 2, 27, 24, 36 }, { 2, 36, 45, 35 }, { 3, 24, 23, 22 }, { 3, 22, 36, 24 }, { 3, 22, 38, 36 },
|
||||
{ 3, 38, 39, 36 }, { 3, 39, 40, 36 }, { 3, 40, 41, 36 }, { 3, 41, 45, 36 }, { 3, 41, 42, 45 },
|
||||
{ 3, 42, 46, 45 }, { 3, 46, 44, 45 },
|
||||
};
|
||||
|
||||
static struct GdFaceData faces_mario_eye_right = { ARRAY_COUNT(facedata_mario_eye_right), 0x1, facedata_mario_eye_right };
|
||||
|
||||
struct DynList dynlist_mario_eye_right_shape[] = {
|
||||
BeginList(),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_RIGHT_EYE_VTX_GROUP),
|
||||
LinkWithPtr(&vtx_mario_eye_right),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_RIGHT_EYE_TRI_GROUP),
|
||||
LinkWithPtr(&faces_mario_eye_right),
|
||||
|
||||
StartGroup(DYNOBJ_MARIO_RIGHT_EYE_MTL_GROUP),
|
||||
// ???
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(0),
|
||||
SetAmbient(0.0, 0.291, 1.0),
|
||||
SetDiffuse(0.0, 0.291, 1.0),
|
||||
// Iris color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(1),
|
||||
SetAmbient(0.0, 0.576, 1.0),
|
||||
SetDiffuse(0.0, 0.576, 1.0),
|
||||
// Pupil color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(2),
|
||||
SetAmbient(0.0, 0.0, 0.0),
|
||||
SetDiffuse(0.0, 0.0, 0.0),
|
||||
// Color of spot in the middle of pupil
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(3),
|
||||
SetAmbient(1.0, 1.0, 1.0),
|
||||
SetDiffuse(1.0, 1.0, 1.0),
|
||||
EndGroup(DYNOBJ_MARIO_RIGHT_EYE_MTL_GROUP),
|
||||
|
||||
MakeDynObj(D_SHAPE, DYNOBJ_MARIO_RIGHT_EYE_SHAPE),
|
||||
SetNodeGroup(DYNOBJ_MARIO_RIGHT_EYE_VTX_GROUP),
|
||||
SetPlaneGroup(DYNOBJ_MARIO_RIGHT_EYE_TRI_GROUP),
|
||||
SetMaterialGroup(DYNOBJ_MARIO_RIGHT_EYE_MTL_GROUP),
|
||||
|
||||
EndList(),
|
||||
};
|
||||
|
||||
static s16 verts_mario_eye_left[][3] = {
|
||||
{ 302, 35, -81 }, { 316, 28, -79 }, { 311, -2, -97 }, { 304, 48, -48 }, { 318, 40, -46 },
|
||||
{ 302, 46, -7 }, { 316, 38, -5 }, { 311, 24, 32 }, { 297, 32, 30 }, { 305, 0, 56 },
|
||||
{ 291, 7, 55 }, { 298, -34, 60 }, { 280, -57, 40 }, { 294, -64, 42 }, { 279, -70, 7 },
|
||||
{ 294, -78, 9 }, { 282, -68, -33 }, { 296, -76, -31 }, { 300, -62, -69 }, { 286, -54, -71 },
|
||||
{ 305, -37, -94 }, { 291, -29, -96 }, { 314, -35, -20 }, { 315, -32, -28 }, { 316, -27, -32 },
|
||||
{ 285, -26, 58 }, { 316, -9, -71 }, { 312, -30, -69 }, { 310, -46, -53 }, { 305, -58, 3 },
|
||||
{ 305, -49, 24 }, { 307, -30, 35 }, { 311, -10, 33 }, { 316, 4, 17 }, { 321, 16, -39 },
|
||||
{ 319, 8, -60 }, { 318, -18, -34 }, { 307, -56, -25 }, { 313, -35, -11 }, { 314, -32, -6 },
|
||||
{ 315, -25, 0 }, { 316, -17, -3 }, { 318, -11, -6 }, { 320, 14, -9 }, { 319, -8, -23 },
|
||||
{ 319, -11, -28 }, { 319, -8, -14 }, { 297, 5, -99 },
|
||||
};
|
||||
|
||||
static struct GdVtxData vtx_mario_eye_left = { ARRAY_COUNT(verts_mario_eye_left), 0x1, verts_mario_eye_left };
|
||||
|
||||
static u16 facedata_mario_eye_left[][4] = {
|
||||
{ 1, 0, 1, 2 }, { 1, 3, 4, 1 }, { 1, 5, 6, 4 }, { 1, 5, 7, 6 }, { 1, 8, 9, 7 },
|
||||
{ 1, 10, 11, 9 }, { 1, 12, 13, 11 }, { 1, 14, 15, 13 }, { 1, 16, 17, 15 }, { 1, 16, 18, 17 },
|
||||
{ 1, 19, 20, 18 }, { 1, 21, 2, 20 }, { 1, 2, 47, 0 }, { 1, 1, 26, 2 }, { 1, 2, 26, 20 },
|
||||
{ 1, 20, 27, 18 }, { 1, 18, 28, 17 }, { 1, 17, 29, 15 }, { 1, 15, 30, 13 }, { 1, 13, 31, 11 },
|
||||
{ 1, 11, 31, 9 }, { 1, 9, 32, 7 }, { 1, 7, 33, 6 }, { 1, 6, 34, 4 }, { 1, 4, 35, 1 },
|
||||
{ 1, 4, 34, 35 }, { 1, 6, 43, 34 }, { 1, 33, 43, 6 }, { 1, 32, 33, 7 }, { 1, 31, 32, 9 },
|
||||
{ 1, 13, 30, 31 }, { 1, 15, 29, 30 }, { 1, 17, 37, 29 }, { 1, 28, 37, 17 }, { 1, 27, 28, 18 },
|
||||
{ 1, 26, 27, 20 }, { 1, 1, 35, 26 }, { 1, 1, 0, 3 }, { 1, 4, 3, 5 }, { 1, 5, 8, 7 },
|
||||
{ 1, 8, 10, 9 }, { 1, 10, 25, 11 }, { 1, 11, 25, 12 }, { 1, 13, 12, 14 }, { 1, 15, 14, 16 },
|
||||
{ 1, 16, 19, 18 }, { 1, 21, 47, 2 }, { 1, 19, 21, 20 }, { 2, 35, 36, 26 }, { 2, 26, 36, 27 },
|
||||
{ 2, 27, 24, 28 }, { 2, 28, 23, 37 }, { 2, 37, 38, 29 }, { 2, 29, 39, 30 }, { 2, 30, 40, 31 },
|
||||
{ 2, 31, 40, 32 }, { 2, 32, 41, 33 }, { 2, 33, 42, 43 }, { 2, 43, 44, 34 }, { 2, 34, 45, 35 },
|
||||
{ 2, 34, 44, 45 }, { 2, 43, 46, 44 }, { 2, 42, 46, 43 }, { 2, 41, 42, 33 }, { 2, 40, 41, 32 },
|
||||
{ 2, 30, 39, 40 }, { 2, 29, 38, 39 }, { 2, 37, 22, 38 }, { 2, 23, 22, 37 }, { 2, 24, 23, 28 },
|
||||
{ 2, 36, 24, 27 }, { 2, 35, 45, 36 }, { 3, 22, 23, 24 }, { 3, 24, 36, 22 }, { 3, 36, 38, 22 },
|
||||
{ 3, 36, 39, 38 }, { 3, 36, 40, 39 }, { 3, 36, 41, 40 }, { 3, 36, 45, 41 }, { 3, 45, 42, 41 },
|
||||
{ 3, 45, 46, 42 }, { 3, 45, 44, 46 },
|
||||
};
|
||||
|
||||
static struct GdFaceData faces_mario_eye_left = { ARRAY_COUNT(facedata_mario_eye_left), 0x1, facedata_mario_eye_left };
|
||||
|
||||
struct DynList dynlist_mario_eye_left_shape[28] = {
|
||||
BeginList(),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_LEFT_EYE_VTX_GROUP),
|
||||
LinkWithPtr(&vtx_mario_eye_left),
|
||||
|
||||
MakeDynObj(D_DATA_GRP, DYNOBJ_MARIO_LEFT_EYE_TRI_GROUP),
|
||||
LinkWithPtr(&faces_mario_eye_left),
|
||||
|
||||
StartGroup(DYNOBJ_MARIO_LEFT_EYE_MTL_GROUP),
|
||||
// ???
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(0),
|
||||
SetAmbient(0.0, 0.291, 1.0),
|
||||
SetDiffuse(0.0, 0.291, 1.0),
|
||||
// Iris color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(1),
|
||||
SetAmbient(0.0, 0.576, 1.0),
|
||||
SetDiffuse(0.0, 0.576, 1.0),
|
||||
// Pupil color
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(2),
|
||||
SetAmbient(0.0, 0.0, 0.0),
|
||||
SetDiffuse(0.0, 0.0, 0.0),
|
||||
// Color of spot in the middle of pupil
|
||||
MakeDynObj(D_MATERIAL, 0),
|
||||
SetId(3),
|
||||
SetAmbient(1.0, 1.0, 1.0),
|
||||
SetDiffuse(1.0, 1.0, 1.0),
|
||||
EndGroup(DYNOBJ_MARIO_LEFT_EYE_MTL_GROUP),
|
||||
|
||||
MakeDynObj(D_SHAPE, DYNOBJ_MARIO_LEFT_EYE_SHAPE),
|
||||
SetNodeGroup(DYNOBJ_MARIO_LEFT_EYE_VTX_GROUP),
|
||||
SetPlaneGroup(DYNOBJ_MARIO_LEFT_EYE_TRI_GROUP),
|
||||
SetMaterialGroup(DYNOBJ_MARIO_LEFT_EYE_MTL_GROUP),
|
||||
|
||||
EndList(),
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef GD_MACROS_H
|
||||
#define GD_MACROS_H
|
||||
|
||||
/**
|
||||
* @file gd_macros.h
|
||||
*
|
||||
* Common macros that Goddard used throughout the Mario Head subsytem code.
|
||||
*/
|
||||
|
||||
#define DEG_PER_RAD 57.29577950560105
|
||||
#define RAD_PER_DEG (1.0 / DEG_PER_RAD)
|
||||
|
||||
#define ABS(val) (((val) < 0 ? (-(val)) : (val)))
|
||||
#define SQ(val) ((val) * (val))
|
||||
#define ALIGN(VAL_, ALIGNMENT_) (((VAL_) + ((ALIGNMENT_) - 1)) & ~((ALIGNMENT_) - 1))
|
||||
|
||||
#endif // GD_MACROS_H
|
||||
@@ -0,0 +1,61 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "debug_utils.h"
|
||||
#include "gd_main.h"
|
||||
#include "gd_memory.h"
|
||||
#include "macros.h"
|
||||
#include "objects.h"
|
||||
#include "renderer.h"
|
||||
|
||||
/* This file was spilt out of debug_memory.asm based on rodata.
|
||||
* The rodata for functions after this "__main__" function have string literals following
|
||||
* f32 literal, which implies that this is its own file
|
||||
*/
|
||||
|
||||
// data
|
||||
s32 gGdMoveScene = TRUE; // @ 801A8050
|
||||
static s32 sUnref801A8054 = TRUE;
|
||||
f32 D_801A8058 = -600.0f;
|
||||
s32 gGdUseVtxNormal = TRUE; // @ 801A805C; instead of face normals
|
||||
static s32 sUnrefScnWidth = 320;
|
||||
static s32 sUnrefScnHeight = 240;
|
||||
|
||||
// bss
|
||||
struct GdControl gGdCtrl; // @ 801B9920; processed controller info
|
||||
struct GdControl gGdCtrlPrev; // @ 801B9A18; previous frame's controller info
|
||||
|
||||
/**
|
||||
* Unused main function possibly from when this was a standalone demo
|
||||
*/
|
||||
u32 __main__(void) {
|
||||
UNUSED u32 pad1C;
|
||||
|
||||
gd_printf("%x, %x\n", (u32) (uintptr_t) &D_801A8058, (u32) (uintptr_t) &gGdMoveScene);
|
||||
imin("main");
|
||||
gd_init();
|
||||
|
||||
gGdCtrl.unk88 = 0.46799f;
|
||||
gGdCtrl.unkA0 = -34.0f;
|
||||
gGdCtrl.unkAC = 34.0f;
|
||||
gGdCtrl.unk00 = 2;
|
||||
gGdCtrl.newStartPress = FALSE;
|
||||
gGdCtrl.prevFrame = &gGdCtrlPrev;
|
||||
|
||||
imin("main - make_scene");
|
||||
make_scene(); // make_scene does nothing, though
|
||||
imout();
|
||||
|
||||
gd_init_controllers();
|
||||
print_all_memtrackers();
|
||||
|
||||
start_timer("dlgen");
|
||||
stop_timer("dlgen");
|
||||
mem_stats();
|
||||
|
||||
while (TRUE) {
|
||||
func_801A520C();
|
||||
}
|
||||
|
||||
imout();
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
#ifndef GD_MAIN_H
|
||||
#define GD_MAIN_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
// In various files of the Goddard subsystem, there are miscellaneous
|
||||
// unused rodata strings. These are likely byproducts of a printf macro
|
||||
// that was stubbed out as "#define printf", letting printf calls expand
|
||||
// to no-op comma expressions. (IDO doesn't support variadic macros, so
|
||||
// "#define printf(...) /* nothing */" wasn't an option.)
|
||||
// This macro is separate from the gd_printf function; one probably
|
||||
// forwarded to the other, but it is hard to tell in which direction.
|
||||
#ifdef __GNUC__
|
||||
#define printf(...) \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wunused-value\"") \
|
||||
(__VA_ARGS__); \
|
||||
_Pragma ("GCC diagnostic pop")
|
||||
#else
|
||||
#define printf
|
||||
#endif
|
||||
|
||||
// structs
|
||||
struct GdControl { // gGdCtrl
|
||||
/* 0x00 */ s32 unk00; // set but never used
|
||||
/* 0x04 */ u8 pad04[4];
|
||||
/* 0x08 */ s32 dleft; // Dpad-left (mask)
|
||||
/* 0x0C */ s32 dright; // Dpad-right (mask)
|
||||
/* 0x10 */ s32 dup; // Dpad-up (mask)
|
||||
/* 0x14 */ s32 ddown; // Dpad-down (mask)
|
||||
/* 0x18 */ s32 cleft; // bool C-left
|
||||
/* 0x1C */ s32 cright; // bool C-right
|
||||
/* 0x20 */ s32 cup; // bool C-up
|
||||
/* 0x24 */ s32 cdown; // bool C-down
|
||||
/* 0x28 */ void * unk28; // null-checked ptr? symbol not deref-ed in extant code?
|
||||
/* 0x2C */ void * unk2C; // some sort of old texture ptr? symbol not deref-ed in extant code?
|
||||
/* 0x30 */ void * unk30; // null-checked ptr? symbol not deref-ed in extant code?
|
||||
/* 0x34 */ s32 btnA; // bool A button
|
||||
/* 0x38 */ s32 btnB; // bool B button
|
||||
/* 0x3C */ u8 pad3C[0x44-0x3C];
|
||||
/* 0x44 */ s32 trgL; // bool L trigger pressed
|
||||
/* 0x48 */ s32 trgR; // bool R trigger pressed
|
||||
/* 0x4C */ s32 unk4C;
|
||||
/* 0x50 */ s32 unk50;
|
||||
/* 0x54 */ s32 newStartPress; // toggle bit? start pressed?
|
||||
/* 0x58 */ u8 pad58[0x7C-0x58];
|
||||
/* 0x7C */ f32 stickXf;
|
||||
/* 0x80 */ f32 stickYf;
|
||||
/* 0x84 */ u8 pad84[4];
|
||||
/* 0x88 */ f32 unk88; // set but never used
|
||||
/* 0x8C */ u8 pad8c[0xA0-0x8C];
|
||||
/* 0xA0 */ f32 unkA0; // set but never used
|
||||
/* 0xA4 */ u8 padA4[0xAC-0xA4];
|
||||
/* 0xAC */ f32 unkAC;
|
||||
/* 0xB0 */ u8 padB0[0xB8-0xB0];
|
||||
/* 0xB8 */ s32 dragStartX; // cursor x position when there was a new (A) press?
|
||||
/* 0xBC */ s32 dragStartY; // cursor y position when there was a new (A) press?
|
||||
/* 0xC0 */ s32 stickDeltaX;
|
||||
/* 0xC4 */ s32 stickDeltaY;
|
||||
/* 0xC8 */ s32 stickX;
|
||||
/* 0xCC */ s32 stickY;
|
||||
/* 0xD0 */ s32 csrX; // bounded by screen view
|
||||
/* 0xD4 */ s32 csrY; // bounded by screen view
|
||||
/* 0xD8 */ /* hand/cursor state bitfield? */
|
||||
/* b80 */ u8 dragging : 1; // bool (A) pressed
|
||||
/* b40 */ u8 unkD8b40 : 1; // set to FALSE and unused
|
||||
/* b20 */ u8 unkD8b20 : 1; // set to FALSE and unused
|
||||
/* b10 */ u8 startedDragging : 1; // bool new (A) press
|
||||
/* b08 */ u8 unkD8b08 : 1;
|
||||
/* b04 */ u8 unkD8b04 : 1;
|
||||
/* b02 */ u8 AbtnPressWait : 1; // bool 10 frames between (A) presses (cursor cool down?)
|
||||
/* 0xDC */ u32 dragStartFrame; // first frame of new a press
|
||||
/* 0xE0 */ u8 padE0[0xE8-0xE0];
|
||||
/* 0xE8 */ u32 currFrame; // frame count?
|
||||
/* 0xEC */ u8 padEC[0xF0-0xEC];
|
||||
/* 0xF0 */ struct GdControl *prevFrame; // previous frame data
|
||||
};
|
||||
|
||||
// data
|
||||
extern s32 gGdMoveScene;
|
||||
extern f32 D_801A8058;
|
||||
extern s32 gGdUseVtxNormal;
|
||||
|
||||
// bss
|
||||
extern struct GdControl gGdCtrl;
|
||||
extern struct GdControl gGdCtrlPrev;
|
||||
|
||||
#endif // GD_MAIN_H
|
||||
@@ -0,0 +1,966 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "debug_utils.h"
|
||||
#include "gd_macros.h"
|
||||
#include "gd_main.h"
|
||||
#include "gd_math.h"
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
#include "renderer.h"
|
||||
|
||||
/**
|
||||
* Finds the square root of a float by treating
|
||||
* it as a double and finding the square root from there.
|
||||
*/
|
||||
f32 gd_sqrt_f(f32 val) {
|
||||
return (f32) gd_sqrt_d(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set mtx to a look-at matrix for the camera. The resulting transformation
|
||||
* transforms the world as if there exists a camera at position 'from' pointed
|
||||
* at the position 'to'.
|
||||
* An effective goddard copy of mtxf_lookat.
|
||||
*/
|
||||
void gd_mat4f_lookat(Mat4f *mtx, f32 xFrom, f32 yFrom, f32 zFrom, f32 xTo, f32 yTo, f32 zTo,
|
||||
f32 zColY, f32 yColY, f32 xColY) {
|
||||
f32 invLength;
|
||||
|
||||
struct GdVec3f d;
|
||||
struct GdVec3f colX;
|
||||
struct GdVec3f norm;
|
||||
|
||||
// No reason to do this? mtx is set lower.
|
||||
gd_set_identity_mat4(mtx);
|
||||
|
||||
d.z = xTo - xFrom;
|
||||
d.y = yTo - yFrom;
|
||||
d.x = zTo - zFrom;
|
||||
|
||||
invLength = ABS(d.z) + ABS(d.y) + ABS(d.x);
|
||||
|
||||
// Scales 'd' if smaller than 10 or larger than 10,000 to be
|
||||
// of a magnitude of 10,000.
|
||||
if (invLength > 10000.0f || invLength < 10.0f) {
|
||||
norm.x = d.z;
|
||||
norm.y = d.y;
|
||||
norm.z = d.x;
|
||||
gd_normalize_vec3f(&norm);
|
||||
norm.x *= 10000.0f;
|
||||
norm.y *= 10000.0f;
|
||||
norm.z *= 10000.0f;
|
||||
|
||||
d.z = norm.x;
|
||||
d.y = norm.y;
|
||||
d.x = norm.z;
|
||||
}
|
||||
|
||||
invLength = -1.0 / gd_sqrt_f(SQ(d.z) + SQ(d.y) + SQ(d.x));
|
||||
d.z *= invLength;
|
||||
d.y *= invLength;
|
||||
d.x *= invLength;
|
||||
|
||||
colX.z = yColY * d.x - xColY * d.y;
|
||||
colX.y = xColY * d.z - zColY * d.x;
|
||||
colX.x = zColY * d.y - yColY * d.z;
|
||||
|
||||
invLength = 1.0 / gd_sqrt_f(SQ(colX.z) + SQ(colX.y) + SQ(colX.x));
|
||||
|
||||
colX.z *= invLength;
|
||||
colX.y *= invLength;
|
||||
colX.x *= invLength;
|
||||
|
||||
zColY = d.y * colX.x - d.x * colX.y;
|
||||
yColY = d.x * colX.z - d.z * colX.x;
|
||||
xColY = d.z * colX.y - d.y * colX.z;
|
||||
|
||||
invLength = 1.0 / gd_sqrt_f(SQ(zColY) + SQ(yColY) + SQ(xColY));
|
||||
|
||||
zColY *= invLength;
|
||||
yColY *= invLength;
|
||||
xColY *= invLength;
|
||||
|
||||
(*mtx)[0][0] = colX.z;
|
||||
(*mtx)[1][0] = colX.y;
|
||||
(*mtx)[2][0] = colX.x;
|
||||
(*mtx)[3][0] = -(xFrom * colX.z + yFrom * colX.y + zFrom * colX.x);
|
||||
|
||||
(*mtx)[0][1] = zColY;
|
||||
(*mtx)[1][1] = yColY;
|
||||
(*mtx)[2][1] = xColY;
|
||||
(*mtx)[3][1] = -(xFrom * zColY + yFrom * yColY + zFrom * xColY);
|
||||
|
||||
(*mtx)[0][2] = d.z;
|
||||
(*mtx)[1][2] = d.y;
|
||||
(*mtx)[2][2] = d.x;
|
||||
(*mtx)[3][2] = -(xFrom * d.z + yFrom * d.y + zFrom * d.x);
|
||||
|
||||
(*mtx)[0][3] = 0.0f;
|
||||
(*mtx)[1][3] = 0.0f;
|
||||
(*mtx)[2][3] = 0.0f;
|
||||
(*mtx)[3][3] = 1.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Scales a mat4f in each dimension by a vector.
|
||||
*/
|
||||
void gd_scale_mat4f_by_vec3f(Mat4f *mtx, struct GdVec3f *vec) {
|
||||
(*mtx)[0][0] *= vec->x;
|
||||
(*mtx)[0][1] *= vec->x;
|
||||
(*mtx)[0][2] *= vec->x;
|
||||
(*mtx)[1][0] *= vec->y;
|
||||
(*mtx)[1][1] *= vec->y;
|
||||
(*mtx)[1][2] *= vec->y;
|
||||
(*mtx)[2][0] *= vec->z;
|
||||
(*mtx)[2][1] *= vec->z;
|
||||
(*mtx)[2][2] *= vec->z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates the matrix 'mtx' about the vector given.
|
||||
*/
|
||||
void gd_rot_mat_about_vec(Mat4f *mtx, struct GdVec3f *vec) {
|
||||
if (vec->x != 0.0f) {
|
||||
gd_absrot_mat4(mtx, GD_X_AXIS, vec->x);
|
||||
}
|
||||
if (vec->y != 0.0f) {
|
||||
gd_absrot_mat4(mtx, GD_Y_AXIS, vec->y);
|
||||
}
|
||||
if (vec->z != 0.0f) {
|
||||
gd_absrot_mat4(mtx, GD_Z_AXIS, vec->z);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds each component of a vector to the
|
||||
* translation column of a mat4f matrix.
|
||||
*/
|
||||
void gd_add_vec3f_to_mat4f_offset(Mat4f *mtx, struct GdVec3f *vec) {
|
||||
UNUSED Mat4f temp;
|
||||
f32 z, y, x;
|
||||
|
||||
x = vec->x;
|
||||
y = vec->y;
|
||||
z = vec->z;
|
||||
|
||||
(*mtx)[3][0] += x;
|
||||
(*mtx)[3][1] += y;
|
||||
(*mtx)[3][2] += z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a lookat matrix, but specifically from the perspective of the origin.
|
||||
* Rolls is only ever 0 in practice, and this is really only ever used once.
|
||||
*
|
||||
* Matrix has form- | -(cz+sxy)/h sh (cx-syz)/h 0 |
|
||||
* | (sz-cxy)/h ch -(sx+cyz)/h 0 |
|
||||
* | -x -y -z 0 |
|
||||
* | 0 0 0 1 |
|
||||
*/
|
||||
void gd_create_origin_lookat(Mat4f *mtx, struct GdVec3f *vec, f32 roll) {
|
||||
f32 invertedHMag;
|
||||
f32 hMag;
|
||||
f32 c;
|
||||
f32 s;
|
||||
f32 radPerDeg = RAD_PER_DEG;
|
||||
struct GdVec3f unit;
|
||||
|
||||
unit.x = vec->x;
|
||||
unit.y = vec->y;
|
||||
unit.z = vec->z;
|
||||
|
||||
gd_normalize_vec3f(&unit);
|
||||
hMag = gd_sqrt_f(SQ(unit.x) + SQ(unit.z));
|
||||
|
||||
roll *= radPerDeg; // convert roll from degrees to radians
|
||||
s = gd_sin_d(roll);
|
||||
c = gd_cos_d(roll);
|
||||
|
||||
gd_set_identity_mat4(mtx);
|
||||
if (hMag != 0.0f) {
|
||||
invertedHMag = 1.0f / hMag;
|
||||
(*mtx)[0][0] = ((-unit.z * c) - (s * unit.y * unit.x)) * invertedHMag;
|
||||
(*mtx)[1][0] = ((unit.z * s) - (c * unit.y * unit.x)) * invertedHMag;
|
||||
(*mtx)[2][0] = -unit.x;
|
||||
(*mtx)[3][0] = 0.0f;
|
||||
|
||||
(*mtx)[0][1] = s * hMag;
|
||||
(*mtx)[1][1] = c * hMag;
|
||||
(*mtx)[2][1] = -unit.y;
|
||||
(*mtx)[3][1] = 0.0f;
|
||||
|
||||
(*mtx)[0][2] = ((c * unit.x) - (s * unit.y * unit.z)) * invertedHMag;
|
||||
(*mtx)[1][2] = ((-s * unit.x) - (c * unit.y * unit.z)) * invertedHMag;
|
||||
(*mtx)[2][2] = -unit.z;
|
||||
(*mtx)[3][2] = 0.0f;
|
||||
|
||||
(*mtx)[0][3] = 0.0f;
|
||||
(*mtx)[1][3] = 0.0f;
|
||||
(*mtx)[2][3] = 0.0f;
|
||||
(*mtx)[3][3] = 1.0f;
|
||||
} else {
|
||||
(*mtx)[0][0] = 0.0f;
|
||||
(*mtx)[1][0] = 1.0f;
|
||||
(*mtx)[2][0] = 0.0f;
|
||||
(*mtx)[3][0] = 0.0f;
|
||||
|
||||
(*mtx)[0][1] = 0.0f;
|
||||
(*mtx)[1][1] = 0.0f;
|
||||
(*mtx)[2][1] = 1.0f;
|
||||
(*mtx)[3][1] = 0.0f;
|
||||
|
||||
(*mtx)[0][2] = 1.0f;
|
||||
(*mtx)[1][2] = 0.0f;
|
||||
(*mtx)[2][2] = 0.0f;
|
||||
(*mtx)[3][2] = 0.0f;
|
||||
|
||||
(*mtx)[0][3] = 0.0f;
|
||||
(*mtx)[1][3] = 0.0f;
|
||||
(*mtx)[2][3] = 0.0f;
|
||||
(*mtx)[3][3] = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clamps a float within a set range about zero.
|
||||
*/
|
||||
f32 gd_clamp_f32(f32 a, f32 b) {
|
||||
if (b < a) {
|
||||
a = b;
|
||||
} else if (a < -b) {
|
||||
a = -b;
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clamps a vector within a set range about zero.
|
||||
*/
|
||||
void gd_clamp_vec3f(struct GdVec3f *vec, f32 limit) {
|
||||
if (vec->x > limit) {
|
||||
vec->x = limit;
|
||||
} else if (vec->x < -limit) {
|
||||
vec->x = -limit;
|
||||
}
|
||||
|
||||
if (vec->y > limit) {
|
||||
vec->y = limit;
|
||||
} else if (vec->y < -limit) {
|
||||
vec->y = -limit;
|
||||
}
|
||||
|
||||
if (vec->z > limit) {
|
||||
vec->z = limit;
|
||||
} else if (vec->z < -limit) {
|
||||
vec->z = -limit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates a 2D vector by some angle in degrees.
|
||||
*/
|
||||
void gd_rot_2d_vec(f32 deg, f32 *x, f32 *y) {
|
||||
f32 xP;
|
||||
f32 yP;
|
||||
f32 rad;
|
||||
|
||||
rad = deg / DEG_PER_RAD;
|
||||
xP = (*x * gd_cos_d(rad)) - (*y * gd_sin_d(rad));
|
||||
yP = (*x * gd_sin_d(rad)) + (*y * gd_cos_d(rad));
|
||||
*x = xP;
|
||||
*y = yP;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates a matrix about one of its rows.
|
||||
*/
|
||||
void UNUSED gd_rot_mat_about_row(Mat4f *mat, s32 row, f32 ang) {
|
||||
Mat4f rot;
|
||||
struct GdVec3f vec;
|
||||
|
||||
vec.x = (*mat)[row][0];
|
||||
vec.y = (*mat)[row][1];
|
||||
vec.z = (*mat)[row][2];
|
||||
|
||||
gd_create_rot_mat_angular(&rot, &vec, ang / 2.0);
|
||||
gd_mult_mat4f(mat, &rot, mat);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates a mat4f matrix about a given axis
|
||||
* by a set angle in degrees.
|
||||
*/
|
||||
void gd_absrot_mat4(Mat4f *mtx, s32 axisnum, f32 ang) {
|
||||
Mat4f rMat;
|
||||
struct GdVec3f rot;
|
||||
|
||||
switch (axisnum) {
|
||||
case GD_X_AXIS:
|
||||
rot.x = 1.0f;
|
||||
rot.y = 0.0f;
|
||||
rot.z = 0.0f;
|
||||
break;
|
||||
case GD_Y_AXIS:
|
||||
rot.x = 0.0f;
|
||||
rot.y = 1.0f;
|
||||
rot.z = 0.0f;
|
||||
break;
|
||||
case GD_Z_AXIS:
|
||||
rot.x = 0.0f;
|
||||
rot.y = 0.0f;
|
||||
rot.z = 1.0f;
|
||||
break;
|
||||
default:
|
||||
fatal_printf("absrot_matrix4(): Bad axis num");
|
||||
}
|
||||
|
||||
gd_create_rot_mat_angular(&rMat, &rot, ang / 2.0); //? 2.0f
|
||||
gd_mult_mat4f(mtx, &rMat, mtx);
|
||||
}
|
||||
|
||||
|
||||
f32 gd_vec3f_magnitude(struct GdVec3f *vec) {
|
||||
return gd_sqrt_f(SQ(vec->x) + SQ(vec->y) + SQ(vec->z));
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a vec3f to have a length of 1.
|
||||
*/
|
||||
s32 gd_normalize_vec3f(struct GdVec3f *vec) {
|
||||
f32 mag;
|
||||
if ((mag = SQ(vec->x) + SQ(vec->y) + SQ(vec->z)) == 0.0f) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mag = gd_sqrt_f(mag);
|
||||
// gd_sqrt_f rounds near 0 numbers to 0, so verify again.
|
||||
if (mag == 0.0f) {
|
||||
vec->x = 0.0f;
|
||||
vec->y = 0.0f;
|
||||
vec->z = 0.0f;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
vec->x /= mag;
|
||||
vec->y /= mag;
|
||||
vec->z /= mag;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the cross product of 'a' x 'b' in 'dst'.
|
||||
*/
|
||||
void gd_cross_vec3f(struct GdVec3f *a, struct GdVec3f *b, struct GdVec3f *dst) {
|
||||
struct GdVec3f result;
|
||||
|
||||
result.x = (a->y * b->z) - (a->z * b->y);
|
||||
result.y = (a->z * b->x) - (a->x * b->z);
|
||||
result.z = (a->x * b->y) - (a->y * b->x);
|
||||
|
||||
dst->x = result.x;
|
||||
dst->y = result.y;
|
||||
dst->z = result.z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the dot product of 'a' and 'b'.
|
||||
*/
|
||||
f32 gd_dot_vec3f(struct GdVec3f *a, struct GdVec3f *b) {
|
||||
return (a->x * b->x) + (a->y * b->y) + (a->z * b->z);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inverts each element of src into dst.
|
||||
*/
|
||||
void UNUSED gd_invert_elements_mat4f(Mat4f *src, Mat4f *dst) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
(*dst)[i][j] = 1.0f / (*src)[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inverts a matrix from src and stores it into dst.
|
||||
* Reaches a fatal_print if the determinant is 0.
|
||||
*/
|
||||
void gd_inverse_mat4f(Mat4f *src, Mat4f *dst) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
f32 determinant;
|
||||
|
||||
gd_adjunct_mat4f(src, dst);
|
||||
determinant = gd_mat4f_det(dst);
|
||||
|
||||
if (ABS(determinant) < 1e-5) //? 1e-5f
|
||||
{
|
||||
fatal_print("Non-singular matrix, no inverse!\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
(*dst)[i][j] /= determinant;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes a matrix from src and converts it into its adjunct in dst.
|
||||
*/
|
||||
void gd_adjunct_mat4f(Mat4f *src, Mat4f *dst) {
|
||||
struct InvMat4 inv;
|
||||
|
||||
inv.r3.c3 = (*src)[0][0];
|
||||
inv.r2.c3 = (*src)[0][1];
|
||||
inv.r1.c3 = (*src)[0][2];
|
||||
inv.r0.c3 = (*src)[0][3];
|
||||
inv.r3.c2 = (*src)[1][0];
|
||||
inv.r2.c2 = (*src)[1][1];
|
||||
inv.r1.c2 = (*src)[1][2];
|
||||
inv.r0.c2 = (*src)[1][3];
|
||||
inv.r3.c1 = (*src)[2][0];
|
||||
inv.r2.c1 = (*src)[2][1];
|
||||
inv.r1.c1 = (*src)[2][2];
|
||||
inv.r0.c1 = (*src)[2][3];
|
||||
inv.r3.c0 = (*src)[3][0];
|
||||
inv.r2.c0 = (*src)[3][1];
|
||||
inv.r1.c0 = (*src)[3][2];
|
||||
inv.r0.c0 = (*src)[3][3];
|
||||
|
||||
(*dst)[0][0] = gd_3x3_det(inv.r2.c2, inv.r2.c1, inv.r2.c0, inv.r1.c2, inv.r1.c1, inv.r1.c0,
|
||||
inv.r0.c2, inv.r0.c1, inv.r0.c0);
|
||||
(*dst)[1][0] = -gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r1.c2, inv.r1.c1, inv.r1.c0,
|
||||
inv.r0.c2, inv.r0.c1, inv.r0.c0);
|
||||
(*dst)[2][0] = gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r2.c2, inv.r2.c1, inv.r2.c0,
|
||||
inv.r0.c2, inv.r0.c1, inv.r0.c0);
|
||||
(*dst)[3][0] = -gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r2.c2, inv.r2.c1, inv.r2.c0,
|
||||
inv.r1.c2, inv.r1.c1, inv.r1.c0);
|
||||
(*dst)[0][1] = -gd_3x3_det(inv.r2.c3, inv.r2.c1, inv.r2.c0, inv.r1.c3, inv.r1.c1, inv.r1.c0,
|
||||
inv.r0.c3, inv.r0.c1, inv.r0.c0);
|
||||
(*dst)[1][1] = gd_3x3_det(inv.r3.c3, inv.r3.c1, inv.r3.c0, inv.r1.c3, inv.r1.c1, inv.r1.c0,
|
||||
inv.r0.c3, inv.r0.c1, inv.r0.c0);
|
||||
(*dst)[2][1] = -gd_3x3_det(inv.r3.c3, inv.r3.c1, inv.r3.c0, inv.r2.c3, inv.r2.c1, inv.r2.c0,
|
||||
inv.r0.c3, inv.r0.c1, inv.r0.c0);
|
||||
(*dst)[3][1] = gd_3x3_det(inv.r3.c3, inv.r3.c1, inv.r3.c0, inv.r2.c3, inv.r2.c1, inv.r2.c0,
|
||||
inv.r1.c3, inv.r1.c1, inv.r1.c0);
|
||||
(*dst)[0][2] = gd_3x3_det(inv.r2.c3, inv.r2.c2, inv.r2.c0, inv.r1.c3, inv.r1.c2, inv.r1.c0,
|
||||
inv.r0.c3, inv.r0.c2, inv.r0.c0);
|
||||
(*dst)[1][2] = -gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c0, inv.r1.c3, inv.r1.c2, inv.r1.c0,
|
||||
inv.r0.c3, inv.r0.c2, inv.r0.c0);
|
||||
(*dst)[2][2] = gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c0, inv.r2.c3, inv.r2.c2, inv.r2.c0,
|
||||
inv.r0.c3, inv.r0.c2, inv.r0.c0);
|
||||
(*dst)[3][2] = -gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c0, inv.r2.c3, inv.r2.c2, inv.r2.c0,
|
||||
inv.r1.c3, inv.r1.c2, inv.r1.c0);
|
||||
(*dst)[0][3] = -gd_3x3_det(inv.r2.c3, inv.r2.c2, inv.r2.c1, inv.r1.c3, inv.r1.c2, inv.r1.c1,
|
||||
inv.r0.c3, inv.r0.c2, inv.r0.c1);
|
||||
(*dst)[1][3] = gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c1, inv.r1.c3, inv.r1.c2, inv.r1.c1,
|
||||
inv.r0.c3, inv.r0.c2, inv.r0.c1);
|
||||
(*dst)[2][3] = -gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c1, inv.r2.c3, inv.r2.c2, inv.r2.c1,
|
||||
inv.r0.c3, inv.r0.c2, inv.r0.c1);
|
||||
(*dst)[3][3] = gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c1, inv.r2.c3, inv.r2.c2, inv.r2.c1,
|
||||
inv.r1.c3, inv.r1.c2, inv.r1.c1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the determinant of a mat4f matrix.
|
||||
*/
|
||||
f32 gd_mat4f_det(Mat4f *mtx) {
|
||||
f32 det;
|
||||
struct InvMat4 inv;
|
||||
|
||||
inv.r3.c3 = (*mtx)[0][0];
|
||||
inv.r2.c3 = (*mtx)[0][1];
|
||||
inv.r1.c3 = (*mtx)[0][2];
|
||||
inv.r0.c3 = (*mtx)[0][3];
|
||||
inv.r3.c2 = (*mtx)[1][0];
|
||||
inv.r2.c2 = (*mtx)[1][1];
|
||||
inv.r1.c2 = (*mtx)[1][2];
|
||||
inv.r0.c2 = (*mtx)[1][3];
|
||||
inv.r3.c1 = (*mtx)[2][0];
|
||||
inv.r2.c1 = (*mtx)[2][1];
|
||||
inv.r1.c1 = (*mtx)[2][2];
|
||||
inv.r0.c1 = (*mtx)[2][3];
|
||||
inv.r3.c0 = (*mtx)[3][0];
|
||||
inv.r2.c0 = (*mtx)[3][1];
|
||||
inv.r1.c0 = (*mtx)[3][2];
|
||||
inv.r0.c0 = (*mtx)[3][3];
|
||||
|
||||
det = (inv.r3.c3
|
||||
* gd_3x3_det(inv.r2.c2, inv.r2.c1, inv.r2.c0,
|
||||
inv.r1.c2, inv.r1.c1, inv.r1.c0,
|
||||
inv.r0.c2, inv.r0.c1, inv.r0.c0)
|
||||
- inv.r2.c3
|
||||
* gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0,
|
||||
inv.r1.c2, inv.r1.c1, inv.r1.c0,
|
||||
inv.r0.c2, inv.r0.c1, inv.r0.c0))
|
||||
+ inv.r1.c3
|
||||
* gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0,
|
||||
inv.r2.c2, inv.r2.c1, inv.r2.c0,
|
||||
inv.r0.c2, inv.r0.c1, inv.r0.c0)
|
||||
- inv.r0.c3
|
||||
* gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0,
|
||||
inv.r2.c2, inv.r2.c1, inv.r2.c0,
|
||||
inv.r1.c2, inv.r1.c1, inv.r1.c0);
|
||||
|
||||
return det;
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes the individual values of a 3 by 3 matrix and
|
||||
* returns the determinant.
|
||||
*/
|
||||
f32 gd_3x3_det(f32 r0c0, f32 r0c1, f32 r0c2,
|
||||
f32 r1c0, f32 r1c1, f32 r1c2,
|
||||
f32 r2c0, f32 r2c1, f32 r2c2) {
|
||||
f32 det;
|
||||
|
||||
det = r0c0 * gd_2x2_det(r1c1, r1c2, r2c1, r2c2) - r1c0 * gd_2x2_det(r0c1, r0c2, r2c1, r2c2)
|
||||
+ r2c0 * gd_2x2_det(r0c1, r0c2, r1c1, r1c2);
|
||||
|
||||
return det;
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes the individual values of a 2 by 2 matrix and
|
||||
* returns the determinant.
|
||||
*/
|
||||
f32 gd_2x2_det(f32 a, f32 b, f32 c, f32 d) {
|
||||
f32 det = a * d - b * c;
|
||||
|
||||
return det;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a vector negative to what was passed in. Also sets the first row of a mat4f
|
||||
* to 1 0 0 0. Perhaps meant to be used at the end of gd_create_quat_rot_mat? Not
|
||||
* sure of the purpose of the vector portion, though.
|
||||
*/
|
||||
void UNUSED gd_create_neg_vec_zero_first_mat_row(Mat4f *mtx, struct GdVec3f *vec, f32 x, f32 y, f32 z) {
|
||||
s32 i;
|
||||
|
||||
vec->x = -x;
|
||||
vec->y = -y;
|
||||
vec->z = -z;
|
||||
|
||||
(*mtx)[0][0] = 1.0f;
|
||||
|
||||
for (i = 1; i < 4; i++) {
|
||||
(*mtx)[0][i] = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function quite literally does nothing.
|
||||
* Seems to have been meant to create a vector from a quaternion?
|
||||
*/
|
||||
void UNUSED gd_broken_quat_to_vec3f(f32 quat[4], struct GdVec3f *vec, f32 zHalf, s32 i, s32 run) {
|
||||
s32 j;
|
||||
s32 k;
|
||||
UNUSED f32 jVal;
|
||||
UNUSED f32 kVal;
|
||||
UNUSED struct GdVec3f uVec;
|
||||
struct GdVec3f tVec;
|
||||
|
||||
tVec.x = vec->x;
|
||||
tVec.y = vec->y;
|
||||
tVec.z = vec->z;
|
||||
|
||||
if (run < 0) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((j = i + 1) >= 4) {
|
||||
j = 1;
|
||||
}
|
||||
|
||||
if ((k = j + 1) >= 4) {
|
||||
k = 1;
|
||||
}
|
||||
|
||||
jVal = quat[j];
|
||||
kVal = quat[k];
|
||||
uVec.x = quat[0];
|
||||
uVec.y = quat[i];
|
||||
uVec.z = zHalf + zHalf;
|
||||
|
||||
end:
|
||||
vec->x = tVec.x;
|
||||
vec->y = tVec.y;
|
||||
vec->z = tVec.z;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is a pitch rotation of a quaternion, with the sign allowing both regular
|
||||
* and inverse multiplication.
|
||||
*/
|
||||
void UNUSED gd_quat_rotation(f32 quat[4], UNUSED s32 unused, f32 c, f32 s, s32 i, s32 sign) {
|
||||
s32 j;
|
||||
s32 k;
|
||||
f32 quatVal;
|
||||
UNUSED u32 pad[2];
|
||||
|
||||
if ((j = i + 1) >= 4) {
|
||||
j = 1;
|
||||
}
|
||||
if ((k = j + 1) >= 4) {
|
||||
k = 1;
|
||||
}
|
||||
|
||||
quatVal = quat[i];
|
||||
quat[i] = sign * s * quat[0] + quatVal * c;
|
||||
quat[0] = quat[0] * c - sign * s * quatVal;
|
||||
|
||||
quatVal = quat[j];
|
||||
quat[j] = quat[k] * s + quatVal * c;
|
||||
quat[k] = quat[k] * c - s * quatVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shifts a matrix up by one row, putting the top row on bottom.
|
||||
*/
|
||||
void gd_shift_mat_up(Mat4f *mtx) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
f32 temp[3];
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
temp[i] = (*mtx)[0][i + 1];
|
||||
}
|
||||
for (i = 1; i < 4; i++) {
|
||||
for (j = 1; j < 4; j++) {
|
||||
(*mtx)[i - 1][j - 1] = (*mtx)[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
(*mtx)[0][3] = 0.0f;
|
||||
(*mtx)[1][3] = 0.0f;
|
||||
(*mtx)[2][3] = 0.0f;
|
||||
(*mtx)[3][3] = 1.0f;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
(*mtx)[3][i] = temp[i];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a rotation matrix from a quaternion.
|
||||
*
|
||||
* Has form-
|
||||
* | 1 - - - |
|
||||
* | 0 w^2+i^2-j^2-k^2 2ij+2wk 2ik+2wj |
|
||||
* | 0 2ij-2wk w^2+j^2-i^2-k^2 2jk+2wi |
|
||||
* | 0 2ik+2wj 2jk-2wi w^2+k^2-i^2-j^2 |
|
||||
*
|
||||
* Potentially broken if 'mtx' is not an identity matrix/zero'ed.
|
||||
*/
|
||||
void UNUSED gd_create_quat_rot_mat(f32 quat[4], UNUSED s32 unused, Mat4f *mtx) {
|
||||
f32 twoIJ;
|
||||
f32 two0K;
|
||||
f32 sqQuat[4];
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 k;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
sqQuat[i] = SQ(quat[i]);
|
||||
}
|
||||
|
||||
for (i = 1; i < 4; i++) {
|
||||
if ((j = i + 1) >= 4) {
|
||||
j = 1;
|
||||
}
|
||||
|
||||
if ((k = j + 1) >= 4) {
|
||||
k = 1;
|
||||
}
|
||||
|
||||
twoIJ = 2.0 * quat[i] * quat[j];
|
||||
two0K = 2.0 * quat[k] * quat[0];
|
||||
|
||||
(*mtx)[j][i] = twoIJ - two0K;
|
||||
(*mtx)[i][j] = twoIJ + two0K;
|
||||
(*mtx)[i][i] = sqQuat[i] + sqQuat[0] - sqQuat[j] - sqQuat[k];
|
||||
(*mtx)[i][0] = 0.0f;
|
||||
}
|
||||
|
||||
//! The first row only ever has the first value set to 1, but the
|
||||
//! latter portions remain what they were originally. Perhaps this was meant
|
||||
//! to call gd_create_neg_vec_zero_first_mat_row?
|
||||
(*mtx)[0][0] = 1.0f;
|
||||
gd_shift_mat_up(mtx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a rotation matrix to multiply the primary matrix by.
|
||||
* s/c are sin(angle)/cos(angle). That angular rotation is about vector
|
||||
* 'vec'.
|
||||
*
|
||||
* Matrix has form-
|
||||
*
|
||||
* | (1-c)z^2+c (1-c)zy-sx (1-c)xz-sy 0 |
|
||||
* | (1-c)zy-sx (1-c)y^2+c (1-c)xy-sz 0 |
|
||||
* | (1-c)xz-sy (1-c)xy-sz (1-c)x^2+c 0 |
|
||||
* | 0 0 0 1 |
|
||||
*/
|
||||
void gd_create_rot_matrix(Mat4f *mtx, struct GdVec3f *vec, f32 s, f32 c) {
|
||||
f32 oneMinusCos;
|
||||
struct GdVec3f rev;
|
||||
|
||||
rev.z = vec->x;
|
||||
rev.y = vec->y;
|
||||
rev.x = vec->z;
|
||||
|
||||
oneMinusCos = 1.0 - c;
|
||||
|
||||
(*mtx)[0][0] = oneMinusCos * rev.z * rev.z + c;
|
||||
(*mtx)[0][1] = oneMinusCos * rev.z * rev.y + s * rev.x;
|
||||
(*mtx)[0][2] = oneMinusCos * rev.z * rev.x - s * rev.y;
|
||||
(*mtx)[0][3] = 0.0f;
|
||||
|
||||
(*mtx)[1][0] = oneMinusCos * rev.z * rev.y - s * rev.x;
|
||||
(*mtx)[1][1] = oneMinusCos * rev.y * rev.y + c;
|
||||
(*mtx)[1][2] = oneMinusCos * rev.y * rev.x + s * rev.z;
|
||||
(*mtx)[1][3] = 0.0f;
|
||||
|
||||
(*mtx)[2][0] = oneMinusCos * rev.z * rev.x + s * rev.y;
|
||||
(*mtx)[2][1] = oneMinusCos * rev.y * rev.x - s * rev.z;
|
||||
(*mtx)[2][2] = oneMinusCos * rev.x * rev.x + c;
|
||||
(*mtx)[2][3] = 0.0f;
|
||||
|
||||
(*mtx)[3][0] = 0.0f;
|
||||
(*mtx)[3][1] = 0.0f;
|
||||
(*mtx)[3][2] = 0.0f;
|
||||
(*mtx)[3][3] = 1.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a rotation matrix about vector 'vec' with ang in degrees.
|
||||
*/
|
||||
void gd_create_rot_mat_angular(Mat4f *mtx, struct GdVec3f *vec, f32 ang) {
|
||||
f32 s;
|
||||
f32 c;
|
||||
|
||||
s = gd_sin_d(ang / (DEG_PER_RAD / 2.0));
|
||||
c = gd_cos_d(ang / (DEG_PER_RAD / 2.0));
|
||||
|
||||
gd_create_rot_matrix(mtx, vec, s, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a mat4f matrix to an identity matrix.
|
||||
*/
|
||||
void gd_set_identity_mat4(Mat4f *mtx) {
|
||||
(*mtx)[0][0] = 1.0f;
|
||||
(*mtx)[0][1] = 0.0f;
|
||||
(*mtx)[0][2] = 0.0f;
|
||||
(*mtx)[0][3] = 0.0f;
|
||||
(*mtx)[1][0] = 0.0f;
|
||||
(*mtx)[1][1] = 1.0f;
|
||||
(*mtx)[1][2] = 0.0f;
|
||||
(*mtx)[1][3] = 0.0f;
|
||||
(*mtx)[2][0] = 0.0f;
|
||||
(*mtx)[2][1] = 0.0f;
|
||||
(*mtx)[2][2] = 1.0f;
|
||||
(*mtx)[2][3] = 0.0f;
|
||||
(*mtx)[3][0] = 0.0f;
|
||||
(*mtx)[3][1] = 0.0f;
|
||||
(*mtx)[3][2] = 0.0f;
|
||||
(*mtx)[3][3] = 1.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies a mat4f from src to dst.
|
||||
*/
|
||||
void gd_copy_mat4f(const Mat4f *src, Mat4f *dst) {
|
||||
(*dst)[0][0] = (*src)[0][0];
|
||||
(*dst)[0][1] = (*src)[0][1];
|
||||
(*dst)[0][2] = (*src)[0][2];
|
||||
(*dst)[0][3] = (*src)[0][3];
|
||||
(*dst)[1][0] = (*src)[1][0];
|
||||
(*dst)[1][1] = (*src)[1][1];
|
||||
(*dst)[1][2] = (*src)[1][2];
|
||||
(*dst)[1][3] = (*src)[1][3];
|
||||
(*dst)[2][0] = (*src)[2][0];
|
||||
(*dst)[2][1] = (*src)[2][1];
|
||||
(*dst)[2][2] = (*src)[2][2];
|
||||
(*dst)[2][3] = (*src)[2][3];
|
||||
(*dst)[3][0] = (*src)[3][0];
|
||||
(*dst)[3][1] = (*src)[3][1];
|
||||
(*dst)[3][2] = (*src)[3][2];
|
||||
(*dst)[3][3] = (*src)[3][3];
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a vec3f, rotating with the main 3x3 portion of the mat4f
|
||||
* and translating with the 4th column.
|
||||
*/
|
||||
void gd_rotate_and_translate_vec3f(struct GdVec3f *vec, const Mat4f *mtx) {
|
||||
struct GdVec3f out;
|
||||
|
||||
out.x = (*mtx)[0][0] * vec->x + (*mtx)[1][0] * vec->y + (*mtx)[2][0] * vec->z;
|
||||
out.y = (*mtx)[0][1] * vec->x + (*mtx)[1][1] * vec->y + (*mtx)[2][1] * vec->z;
|
||||
out.z = (*mtx)[0][2] * vec->x + (*mtx)[1][2] * vec->y + (*mtx)[2][2] * vec->z;
|
||||
out.x += (*mtx)[3][0];
|
||||
out.y += (*mtx)[3][1];
|
||||
out.z += (*mtx)[3][2];
|
||||
|
||||
vec->x = out.x;
|
||||
vec->y = out.y;
|
||||
vec->z = out.z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiples a vec3f by the main 3x3 portion of a mat4f matrix.
|
||||
*/
|
||||
void gd_mat4f_mult_vec3f(struct GdVec3f *vec, const Mat4f *mtx) {
|
||||
struct GdVec3f out;
|
||||
|
||||
out.x = (*mtx)[0][0] * vec->x + (*mtx)[1][0] * vec->y + (*mtx)[2][0] * vec->z;
|
||||
out.y = (*mtx)[0][1] * vec->x + (*mtx)[1][1] * vec->y + (*mtx)[2][1] * vec->z;
|
||||
out.z = (*mtx)[0][2] * vec->x + (*mtx)[1][2] * vec->y + (*mtx)[2][2] * vec->z;
|
||||
|
||||
vec->x = out.x;
|
||||
vec->y = out.y;
|
||||
vec->z = out.z;
|
||||
}
|
||||
|
||||
#define MAT4_DOT_PROD(A, B, R, row, col) \
|
||||
{ \
|
||||
(R)[(row)][(col)] = (A)[(row)][0] * (B)[0][(col)]; \
|
||||
(R)[(row)][(col)] += (A)[(row)][1] * (B)[1][(col)]; \
|
||||
(R)[(row)][(col)] += (A)[(row)][2] * (B)[2][(col)]; \
|
||||
(R)[(row)][(col)] += (A)[(row)][3] * (B)[3][(col)]; \
|
||||
}
|
||||
|
||||
#define MAT4_MULTIPLY(A, B, R) \
|
||||
{ \
|
||||
MAT4_DOT_PROD((A), (B), (R), 0, 0); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 0, 1); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 0, 2); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 0, 3); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 1, 0); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 1, 1); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 1, 2); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 1, 3); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 2, 0); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 2, 1); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 2, 2); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 2, 3); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 3, 0); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 3, 1); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 3, 2); \
|
||||
MAT4_DOT_PROD((A), (B), (R), 3, 3); \
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiplies two Mat4f matrices and puts it in dst.
|
||||
*/
|
||||
void gd_mult_mat4f(const Mat4f *mA, const Mat4f *mB, Mat4f *dst) {
|
||||
Mat4f res;
|
||||
|
||||
MAT4_MULTIPLY((*mA), (*mB), res);
|
||||
gd_copy_mat4f(&res, dst);
|
||||
}
|
||||
|
||||
#undef MAT4_MULTIPLY
|
||||
#undef MAT4_DOT_PROD
|
||||
|
||||
/**
|
||||
* Prints a vec3f vector.
|
||||
*
|
||||
* Printed the prefix at some point, as shown by how the function is used.
|
||||
*/
|
||||
void gd_print_vec(UNUSED const char *prefix, const struct GdVec3f *vec) {
|
||||
UNUSED u8 pad[8];
|
||||
|
||||
printf("%f,%f,%f\n", vec->x, vec->y, vec->z);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a plane's boundaries.
|
||||
*
|
||||
* Printed a prefix at some point, as shone by how the function is used.
|
||||
*/
|
||||
void gd_print_bounding_box(UNUSED const char *prefix, UNUSED const struct GdBoundingBox *p) {
|
||||
UNUSED u8 pad[8];
|
||||
|
||||
printf("Min X = %f, Max X = %f \n", p->minX, p->maxX);
|
||||
printf("Min Y = %f, Max Y = %f \n", p->minY, p->maxY);
|
||||
printf("Min Z = %f, Max Z = %f \n", p->minZ, p->maxZ);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a Mat4f.
|
||||
*
|
||||
* Although the prefix input is unused, the one usage of this function
|
||||
* does have a "Matrix:" prefix, so it was definitely used at one point.
|
||||
*/
|
||||
void gd_print_mtx(UNUSED const char *prefix, const Mat4f *mtx) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
gd_printf("%f ", (*mtx)[i][j]);
|
||||
}
|
||||
gd_printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a quaternion along with a prefix.
|
||||
*/
|
||||
void UNUSED gd_print_quat(const char *prefix, const f32 f[4]) {
|
||||
s32 i;
|
||||
|
||||
gd_printf(prefix);
|
||||
for (i = 0; i < 4; i++) {
|
||||
gd_printf("%f ", f[i]);
|
||||
}
|
||||
gd_printf("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates a matrix or creates a rotation matrix about a vector made from an offset
|
||||
* of 100 and the passed in x, y, and z values.
|
||||
*/
|
||||
void UNUSED gd_rot_mat_offset(Mat4f *dst, f32 x, f32 y, f32 z, s32 copy) {
|
||||
f32 adj = 100.0f;
|
||||
Mat4f rot;
|
||||
f32 c;
|
||||
f32 s;
|
||||
f32 opp;
|
||||
f32 mag;
|
||||
struct GdVec3f vec;
|
||||
|
||||
opp = gd_sqrt_f(SQ(x) + SQ(y) + SQ(z));
|
||||
|
||||
if (opp == 0.0f) {
|
||||
if (copy) {
|
||||
gd_set_identity_mat4(dst);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
mag = gd_sqrt_f(SQ(adj) + SQ(opp));
|
||||
c = adj / mag;
|
||||
s = opp / mag;
|
||||
|
||||
vec.x = -y / opp;
|
||||
vec.y = -x / opp;
|
||||
vec.z = -z / opp;
|
||||
|
||||
gd_create_rot_matrix(&rot, &vec, s, c);
|
||||
if (!copy) {
|
||||
gd_mult_mat4f(dst, &rot, dst);
|
||||
} else {
|
||||
gd_copy_mat4f(&rot, dst);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
#ifndef GD_MATH_H
|
||||
#define GD_MATH_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
|
||||
struct Row4 {
|
||||
f32 c0, c1, c2, c3;
|
||||
};
|
||||
|
||||
struct InvMat4 {
|
||||
struct Row4 r0, r1, r2, r3;
|
||||
};
|
||||
|
||||
enum GdRotAxis {
|
||||
GD_X_AXIS,
|
||||
GD_Y_AXIS,
|
||||
GD_Z_AXIS
|
||||
};
|
||||
|
||||
// Needed for gd_math.c itself.
|
||||
void gd_adjunct_mat4f(Mat4f *src, Mat4f *dst);
|
||||
f32 gd_mat4f_det(Mat4f *mtx);
|
||||
f32 gd_3x3_det(f32 r0c0, f32 r0c1, f32 r0c2,
|
||||
f32 r1c0, f32 r1c1, f32 r1c2,
|
||||
f32 r2c0, f32 r2c1, f32 r2c2);
|
||||
f32 gd_2x2_det(f32 a, f32 b, f32 c, f32 d);
|
||||
|
||||
void gd_mat4f_lookat(Mat4f *mtx, f32 xFrom, f32 yFrom, f32 zFrom, f32 xTo, f32 yTo, f32 zTo,
|
||||
f32 zColY, f32 yColY, f32 xColY);
|
||||
void gd_scale_mat4f_by_vec3f(Mat4f *mtx, struct GdVec3f *vec);
|
||||
void gd_rot_mat_about_vec(Mat4f *mtx, struct GdVec3f *vec);
|
||||
void gd_add_vec3f_to_mat4f_offset(Mat4f *mtx, struct GdVec3f *vec);
|
||||
void gd_create_origin_lookat(Mat4f *mtx, struct GdVec3f *vec, f32 roll);
|
||||
f32 gd_clamp_f32(f32 a, f32 b);
|
||||
void gd_clamp_vec3f(struct GdVec3f *vec, f32 limit);
|
||||
void gd_rot_2d_vec(f32 deg, f32 *x, f32 *y);
|
||||
void gd_absrot_mat4(Mat4f *mtx, s32 axisnum, f32 ang);
|
||||
f32 gd_vec3f_magnitude(struct GdVec3f *vec);
|
||||
s32 gd_normalize_vec3f(struct GdVec3f *vec);
|
||||
void gd_cross_vec3f(struct GdVec3f *a, struct GdVec3f *b, struct GdVec3f *dst);
|
||||
f32 gd_dot_vec3f(struct GdVec3f *a, struct GdVec3f *b);
|
||||
void gd_inverse_mat4f(Mat4f *src, Mat4f *dst);
|
||||
void gd_create_rot_mat_angular(Mat4f *mtx, struct GdVec3f *vec, f32 ang);
|
||||
void gd_set_identity_mat4(Mat4f *mtx);
|
||||
void gd_copy_mat4f(const Mat4f *src, Mat4f *dst);
|
||||
void gd_rotate_and_translate_vec3f(struct GdVec3f *vec, const Mat4f *mtx);
|
||||
void gd_mat4f_mult_vec3f(struct GdVec3f *vec, const Mat4f *mtx);
|
||||
void gd_mult_mat4f(const Mat4f *mA, const Mat4f *mB, Mat4f *dst);
|
||||
void gd_print_vec(UNUSED const char *prefix, const struct GdVec3f *vec);
|
||||
void gd_print_bounding_box(UNUSED const char *prefix, const struct GdBoundingBox *p);
|
||||
void gd_print_mtx(UNUSED const char *prefix, const Mat4f *mtx);
|
||||
|
||||
#endif // GD_MATH_H
|
||||
@@ -0,0 +1,314 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "debug_utils.h"
|
||||
#include "gd_memory.h"
|
||||
#include "renderer.h"
|
||||
|
||||
/**
|
||||
* @file gd_memory.c
|
||||
*
|
||||
* This file contains the functions need to manage allocation in
|
||||
* goddard's heap. However, the actual, useable allocation functions
|
||||
* are `gd_malloc()`, `gd_malloc_perm()`, and `gd_malloc_temp()`, as
|
||||
* well as `gd_free()`. This file is for managing the underlying memory
|
||||
* block lists.
|
||||
*/
|
||||
|
||||
/* bss */
|
||||
static struct GMemBlock *sFreeBlockListHead;
|
||||
static struct GMemBlock *sUsedBlockListHead;
|
||||
static struct GMemBlock *sEmptyBlockListHead;
|
||||
|
||||
/* Forward Declarations */
|
||||
void empty_mem_block(struct GMemBlock *);
|
||||
struct GMemBlock *into_free_memblock(struct GMemBlock *);
|
||||
struct GMemBlock *make_mem_block(u32, u8);
|
||||
u32 print_list_stats(struct GMemBlock *, s32, s32);
|
||||
|
||||
/**
|
||||
* Empty a `GMemBlock` into a default state. This empty block
|
||||
* doesn't point to any data, nor does it have any size. The
|
||||
* block is removed from whatever list is was in, and is added
|
||||
* to the empty block list.
|
||||
*/
|
||||
void empty_mem_block(struct GMemBlock *block) {
|
||||
if (block->next != NULL) {
|
||||
block->next->prev = block->prev;
|
||||
}
|
||||
|
||||
if (block->prev != NULL) {
|
||||
block->prev->next = block->next;
|
||||
}
|
||||
|
||||
switch (block->blockType) {
|
||||
case G_MEM_BLOCK_FREE:
|
||||
if (block->prev == NULL) {
|
||||
sFreeBlockListHead = block->next;
|
||||
}
|
||||
break;
|
||||
case G_MEM_BLOCK_USED:
|
||||
if (block->prev == NULL) {
|
||||
sUsedBlockListHead = block->next;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
block->next = sEmptyBlockListHead;
|
||||
if (block->next != NULL) {
|
||||
sEmptyBlockListHead->prev = block;
|
||||
}
|
||||
|
||||
sEmptyBlockListHead = block;
|
||||
block->prev = NULL;
|
||||
block->ptr = NULL;
|
||||
block->size = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform a `GMemBlock` into a free block that points to memory available
|
||||
* for allocation.
|
||||
*
|
||||
* @returns pointer to the free `GMemBlock` */
|
||||
struct GMemBlock *into_free_memblock(struct GMemBlock *block) {
|
||||
struct GMemBlock *freeBlock;
|
||||
void *ptr;
|
||||
u8 permanence;
|
||||
u32 space;
|
||||
|
||||
ptr = block->ptr;
|
||||
space = block->size;
|
||||
permanence = block->permFlag;
|
||||
|
||||
empty_mem_block(block);
|
||||
freeBlock = make_mem_block(G_MEM_BLOCK_FREE, permanence);
|
||||
freeBlock->ptr = ptr;
|
||||
freeBlock->size = space;
|
||||
freeBlock->permFlag = permanence;
|
||||
|
||||
return freeBlock;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate a new `GMemBlock` structure of the given type and permanence.
|
||||
* It does not assign any heap space to the new block.
|
||||
*
|
||||
* @param blockType either `G_MEM_BLOCK_FREE` or `G_MEM_BLOCK_USED`
|
||||
* @param permFlag some sort of permanence value, where setting one the upper
|
||||
* four bits imply a permanent block, while setting one the lower
|
||||
* four bits imply a temporary block
|
||||
* @returns a pointer to the new `GMemBlock`
|
||||
*/
|
||||
struct GMemBlock *make_mem_block(u32 blockType, u8 permFlag) {
|
||||
struct GMemBlock *newMemBlock;
|
||||
|
||||
if (sEmptyBlockListHead == NULL) {
|
||||
sEmptyBlockListHead = (struct GMemBlock *) gd_allocblock(sizeof(struct GMemBlock));
|
||||
|
||||
if (sEmptyBlockListHead == NULL) {
|
||||
fatal_printf("MakeMemBlock() unable to allocate");
|
||||
}
|
||||
|
||||
sEmptyBlockListHead->next = NULL;
|
||||
sEmptyBlockListHead->prev = NULL;
|
||||
}
|
||||
|
||||
newMemBlock = sEmptyBlockListHead;
|
||||
if ((sEmptyBlockListHead = newMemBlock->next) != NULL) {
|
||||
newMemBlock->next->prev = NULL;
|
||||
}
|
||||
|
||||
switch (blockType) {
|
||||
case G_MEM_BLOCK_FREE:
|
||||
newMemBlock->next = sFreeBlockListHead;
|
||||
if (newMemBlock->next != NULL) {
|
||||
sFreeBlockListHead->prev = newMemBlock;
|
||||
}
|
||||
sFreeBlockListHead = newMemBlock;
|
||||
break;
|
||||
case G_MEM_BLOCK_USED:
|
||||
newMemBlock->next = sUsedBlockListHead;
|
||||
if (newMemBlock->next != NULL) {
|
||||
sUsedBlockListHead->prev = newMemBlock;
|
||||
}
|
||||
sUsedBlockListHead = newMemBlock;
|
||||
break;
|
||||
default:
|
||||
fatal_printf("unkown memblock type");
|
||||
}
|
||||
newMemBlock->prev = NULL;
|
||||
newMemBlock->blockType = (u8) blockType;
|
||||
newMemBlock->permFlag = permFlag;
|
||||
|
||||
return newMemBlock;
|
||||
}
|
||||
|
||||
/**
|
||||
* Free memory allocated on the goddard heap.
|
||||
*
|
||||
* @param ptr pointer to heap allocated memory
|
||||
* @returns size of memory freed
|
||||
* @retval 0 `ptr` did not point to a valid memory block
|
||||
*/
|
||||
u32 gd_free_mem(void *ptr) {
|
||||
register struct GMemBlock *curBlock;
|
||||
u32 bytesFreed;
|
||||
register u8 *targetBlock = ptr;
|
||||
|
||||
for (curBlock = sUsedBlockListHead; curBlock != NULL; curBlock = curBlock->next) {
|
||||
if (targetBlock == curBlock->ptr) {
|
||||
bytesFreed = curBlock->size;
|
||||
into_free_memblock(curBlock);
|
||||
return bytesFreed;
|
||||
}
|
||||
}
|
||||
|
||||
fatal_printf("Free() Not a valid memory block");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a pointer to goddard heap memory of at least `size` and
|
||||
* of the same `permanence`.
|
||||
*
|
||||
* @return pointer to heap
|
||||
* @retval NULL could not fulfill the request
|
||||
*/
|
||||
void *gd_request_mem(u32 size, u8 permanence) {
|
||||
struct GMemBlock *foundBlock = NULL;
|
||||
struct GMemBlock *curBlock;
|
||||
struct GMemBlock *newBlock;
|
||||
|
||||
newBlock = make_mem_block(G_MEM_BLOCK_USED, permanence);
|
||||
curBlock = sFreeBlockListHead;
|
||||
|
||||
while (curBlock != NULL) {
|
||||
if (curBlock->permFlag & permanence) {
|
||||
if (curBlock->size == size) {
|
||||
foundBlock = curBlock;
|
||||
break;
|
||||
} else {
|
||||
if (curBlock->size > size) {
|
||||
if (foundBlock != NULL) { /* find closest sized block */
|
||||
if (curBlock->size < foundBlock->size) {
|
||||
foundBlock = curBlock;
|
||||
}
|
||||
} else {
|
||||
foundBlock = curBlock;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
curBlock = curBlock->next;
|
||||
}
|
||||
|
||||
if (foundBlock == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (foundBlock->size > size) { /* split free block */
|
||||
newBlock->ptr = foundBlock->ptr;
|
||||
newBlock->size = size;
|
||||
|
||||
foundBlock->size -= size;
|
||||
foundBlock->ptr += size;
|
||||
} else if (foundBlock->size == size) { /* recycle whole free block */
|
||||
newBlock->ptr = foundBlock->ptr;
|
||||
newBlock->size = size;
|
||||
empty_mem_block(foundBlock);
|
||||
}
|
||||
|
||||
return newBlock->ptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add memory of `size` at `addr` to the goddard heap for later allocation.
|
||||
*
|
||||
* @returns `GMemBlock` that contains info about the new heap memory
|
||||
*/
|
||||
struct GMemBlock *gd_add_mem_to_heap(u32 size, void *addr, u8 permanence) {
|
||||
struct GMemBlock *newBlock;
|
||||
/* eight-byte align the new block's data stats */
|
||||
size = (size - 8) & ~7;
|
||||
addr = (void *)(((uintptr_t) addr + 8) & ~7);
|
||||
|
||||
newBlock = make_mem_block(G_MEM_BLOCK_FREE, permanence);
|
||||
newBlock->ptr = addr;
|
||||
newBlock->size = size;
|
||||
|
||||
return newBlock;
|
||||
}
|
||||
|
||||
/**
|
||||
* NULL the various `GMemBlock` list heads
|
||||
*/
|
||||
void init_mem_block_lists(void) {
|
||||
sFreeBlockListHead = NULL;
|
||||
sUsedBlockListHead = NULL;
|
||||
sEmptyBlockListHead = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print information (size, entries) about the `GMemBlock` list. It can print
|
||||
* information for individual blocks as well as summary info for the entry list.
|
||||
*
|
||||
* @param block `GMemBlock` to start reading the list
|
||||
* @param printBlockInfo If `TRUE`, print information about every block
|
||||
* in the list
|
||||
* @param permanence Limit info printed to blocks with this permanence
|
||||
* @returns number of entries
|
||||
*/
|
||||
u32 print_list_stats(struct GMemBlock *block, s32 printBlockInfo, s32 permanence) {
|
||||
u32 entries = 0;
|
||||
u32 totalSize = 0;
|
||||
|
||||
while (block != NULL) {
|
||||
if (block->permFlag & permanence) {
|
||||
entries++;
|
||||
if (printBlockInfo) {
|
||||
gd_printf(" %6.2fk (%d bytes)\n",
|
||||
(f32) block->size / 1024.0, //? 1024.0f
|
||||
block->size);
|
||||
}
|
||||
totalSize += block->size;
|
||||
}
|
||||
block = block->next;
|
||||
}
|
||||
|
||||
gd_printf("Total %6.2fk (%d bytes) in %d entries\n",
|
||||
(f32) totalSize / 1024.0, //? 1024.0f
|
||||
totalSize, entries);
|
||||
|
||||
return entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print summary information about all used, free, and empty
|
||||
* `GMemBlock`s.
|
||||
*/
|
||||
void mem_stats(void) {
|
||||
struct GMemBlock *list;
|
||||
|
||||
gd_printf("Perm Used blocks:\n");
|
||||
list = sUsedBlockListHead;
|
||||
print_list_stats(list, FALSE, PERM_G_MEM_BLOCK);
|
||||
gd_printf("\n");
|
||||
|
||||
gd_printf("Perm Free blocks:\n");
|
||||
list = sFreeBlockListHead;
|
||||
print_list_stats(list, FALSE, PERM_G_MEM_BLOCK);
|
||||
gd_printf("\n");
|
||||
|
||||
gd_printf("Temp Used blocks:\n");
|
||||
list = sUsedBlockListHead;
|
||||
print_list_stats(list, FALSE, TEMP_G_MEM_BLOCK);
|
||||
gd_printf("\n");
|
||||
|
||||
gd_printf("Temp Free blocks:\n");
|
||||
list = sFreeBlockListHead;
|
||||
print_list_stats(list, FALSE, TEMP_G_MEM_BLOCK);
|
||||
gd_printf("\n");
|
||||
|
||||
gd_printf("Empty blocks:\n");
|
||||
list = sEmptyBlockListHead;
|
||||
print_list_stats(list, FALSE, PERM_G_MEM_BLOCK | TEMP_G_MEM_BLOCK);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef GD_MEMORY_H
|
||||
#define GD_MEMORY_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
/// A structure that holds information about memory allocation on goddard's heap.
|
||||
struct GMemBlock {
|
||||
/* 0x00 */ u8 *ptr;
|
||||
/* 0x04 */ u32 size;
|
||||
/* 0x08 */ u8 blockType;
|
||||
/* 0x09 */ u8 permFlag; ///< Permanent (upper four bits) or Temporary (lower four bits)
|
||||
/* 0x0C */ struct GMemBlock *next;
|
||||
/* 0x10 */ struct GMemBlock *prev;
|
||||
};
|
||||
|
||||
/// Block list types for `GMemBlock.blockType`. Note that Empty Blocks don't have
|
||||
/// a specific value.
|
||||
enum GMemBlockTypes {
|
||||
G_MEM_BLOCK_FREE = 1,
|
||||
G_MEM_BLOCK_USED = 2
|
||||
};
|
||||
/* Block Permanence Defines */
|
||||
/* This may be collections of certain allocation types
|
||||
* eg. 0x10 = Object; 0x20 = Color Buffer; 0x40 = Z Buf; 0x01 = basic; etc. */
|
||||
#define PERM_G_MEM_BLOCK 0xF0
|
||||
#define TEMP_G_MEM_BLOCK 0x0F
|
||||
|
||||
// functions
|
||||
extern u32 gd_free_mem(void *ptr);
|
||||
extern void *gd_request_mem(u32 size, u8 permanence);
|
||||
extern struct GMemBlock *gd_add_mem_to_heap(u32 size, void *addr, u8 permanence);
|
||||
extern void init_mem_block_lists(void);
|
||||
extern void mem_stats(void);
|
||||
|
||||
#endif // GD_MEMORY_H
|
||||
@@ -0,0 +1,656 @@
|
||||
#ifndef GD_TYPES_H
|
||||
#define GD_TYPES_H
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
/* Vector Types */
|
||||
struct GdVec3f
|
||||
{
|
||||
f32 x, y, z;
|
||||
};
|
||||
|
||||
struct GdBoundingBox {
|
||||
f32 minX, minY, minZ;
|
||||
f32 maxX, maxY, maxZ;
|
||||
};
|
||||
|
||||
struct GdTriangleF {
|
||||
struct GdVec3f p0, p1, p2;
|
||||
};
|
||||
|
||||
struct GdAnimTransform {
|
||||
struct GdVec3f scale;
|
||||
struct GdVec3f rotate; // each component specifies the degrees to rotate about that axis
|
||||
struct GdVec3f pos;
|
||||
};
|
||||
|
||||
typedef f32 Mat4f[4][4];
|
||||
|
||||
struct GdColour {
|
||||
f32 r, g, b;
|
||||
};
|
||||
|
||||
/* dynlist entries and types */
|
||||
union DynUnion {
|
||||
void *ptr;
|
||||
char *str;
|
||||
s32 word;
|
||||
};
|
||||
|
||||
struct DynList {
|
||||
s32 cmd;
|
||||
union DynUnion w1;
|
||||
union DynUnion w2;
|
||||
struct GdVec3f vec;
|
||||
};
|
||||
|
||||
/* Goddard Code Object Structs */
|
||||
/* Object Type Flags */
|
||||
enum ObjTypeFlag {
|
||||
OBJ_TYPE_GROUPS = 0x00000001,
|
||||
OBJ_TYPE_BONES = 0x00000002,
|
||||
OBJ_TYPE_JOINTS = 0x00000004,
|
||||
OBJ_TYPE_PARTICLES = 0x00000008,
|
||||
OBJ_TYPE_SHAPES = 0x00000010,
|
||||
OBJ_TYPE_NETS = 0x00000020,
|
||||
OBJ_TYPE_PLANES = 0x00000040,
|
||||
OBJ_TYPE_FACES = 0x00000080,
|
||||
OBJ_TYPE_VERTICES = 0x00000100,
|
||||
OBJ_TYPE_CAMERAS = 0x00000200,
|
||||
// 0x400 was not used
|
||||
OBJ_TYPE_MATERIALS = 0x00000800,
|
||||
OBJ_TYPE_WEIGHTS = 0x00001000,
|
||||
OBJ_TYPE_GADGETS = 0x00002000,
|
||||
OBJ_TYPE_VIEWS = 0x00004000,
|
||||
OBJ_TYPE_LABELS = 0x00008000,
|
||||
OBJ_TYPE_ANIMATORS = 0x00010000,
|
||||
OBJ_TYPE_VALPTRS = 0x00020000,
|
||||
// 0x40000 was not used
|
||||
OBJ_TYPE_LIGHTS = 0x00080000,
|
||||
OBJ_TYPE_ZONES = 0x00100000,
|
||||
OBJ_TYPE_UNK200000 = 0x00200000
|
||||
};
|
||||
/* This constant seems to be used to indicate the type of any or all objects */
|
||||
#define OBJ_TYPE_ALL 0x00FFFFFF
|
||||
|
||||
|
||||
/// Function pointer for a `GdObj`'s drawing routine
|
||||
typedef void (*drawmethod_t)(void *);
|
||||
/// Flags for the drawFlags field of an GdObj
|
||||
enum ObjDrawingFlags {
|
||||
OBJ_DRAW_UNK01 = 0x01,
|
||||
OBJ_INVISIBLE = 0x02, ///< This `GdObj` shouldn't be drawn when updating a scene
|
||||
OBJ_PICKED = 0x04, ///< This `GdObj` is held by the cursor
|
||||
OBJ_IS_GRABBALE = 0x08, ///< This `GdObj` can be grabbed/picked by the cursor
|
||||
OBJ_HIGHLIGHTED = 0x10
|
||||
};
|
||||
|
||||
/**
|
||||
* The base of structure of all of Goddard's objects. It is present as a "header"
|
||||
* at the beginning of all `ObjX` structures, and as such, this type is used
|
||||
* when we need to generalize code to take different `ObjX`es.
|
||||
* Every GdObj created is connected together in a linked list with `prev` and `next` pointers.
|
||||
*/
|
||||
struct GdObj {
|
||||
/* 0x00 */ struct GdObj *prev; // previous node in gGdObjectList linked list
|
||||
/* 0x04 */ struct GdObj *next; // next node in gGdObjectList linked list
|
||||
/* 0x08 */ drawmethod_t objDrawFn;
|
||||
/* 0x0C */ enum ObjTypeFlag type;
|
||||
/* 0x10 */ s16 index; ///< the index of this `GdObj` in the linked list
|
||||
/* 0x12 */ u16 drawFlags; ///< enumerated in `::ObjDrawingFlags`
|
||||
/* 0x14 Specific object data starts here */
|
||||
};
|
||||
|
||||
/* Used to create a linked list of objects (or data)
|
||||
** within an ObjGroup */
|
||||
struct ListNode {
|
||||
/* 0x00 */ struct ListNode *prev;
|
||||
/* 0x04 */ struct ListNode *next;
|
||||
/* 0x08 */ struct GdObj *obj;
|
||||
};
|
||||
|
||||
// I think this is actually the same type as ListNode, and data is just a generic "void *" pointer.
|
||||
struct VtxLink {
|
||||
struct VtxLink *prev;
|
||||
struct VtxLink *next;
|
||||
Vtx *data;
|
||||
};
|
||||
|
||||
/* These are the compressed versions of ObjFace or ObjVertex that are
|
||||
** pointed to by ListNode in the faceGroup and vtxGroup, if Group.linkType
|
||||
** is set to 0x01. See `chk_shapegen` */
|
||||
struct GdFaceData {
|
||||
u32 count;
|
||||
s32 type;
|
||||
u16 (*data)[4]; ///< (mtl id, vtx ids[3])
|
||||
};
|
||||
|
||||
struct GdVtxData {
|
||||
u32 count;
|
||||
s32 type;
|
||||
s16 (*data)[3]; ///< [x, y, z]
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Used to group related objects together. Seems to mainly be used for `apply_to_obj_types_in_group`.
|
||||
*/
|
||||
struct ObjGroup {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ struct ObjGroup *prev;
|
||||
/* 0x18 */ struct ObjGroup *next;
|
||||
/* 0x1C */ struct ListNode *firstMember; ///< Head of a linked list for objects contained in this group
|
||||
/* 0x20 */ struct ListNode *lastMember; ///< Tail of a linked list for objects contained in this group
|
||||
/* 0x24 */ s32 memberTypes; ///< OR'd collection of type flags for all objects in this group
|
||||
/* 0x28 */ s32 memberCount; // number of objects in this group
|
||||
/* 0x2C */ s32 debugPrint; // might also be a type?
|
||||
/* 0x30 */ s32 linkType;
|
||||
/* 0x34 */ char name[0x40]; ///< possibly, only referenced in old code
|
||||
/* 0x74 */ s32 id;
|
||||
}; /* sizeof = 0x78 */
|
||||
|
||||
/* Known linkTypes
|
||||
* 0x00 : Normal (link to GdObj)
|
||||
* 0x01 : Compressed (vtx or face data)
|
||||
*/
|
||||
|
||||
struct ObjBone {
|
||||
/* 0x000 */ struct GdObj header;
|
||||
/* 0x014 */ struct GdVec3f worldPos; // "position"?? from dead code in draw_bone
|
||||
/* 0x020 */ struct ObjBone *prev; // maybe, based on make_bone
|
||||
/* 0x024 */ struct ObjBone *next; // maybe, based on make_bone
|
||||
/* 0x028 */ struct GdVec3f unk28; // "rotation"?? from dead code in draw_bone
|
||||
/* 0x034 */ u8 pad34[0x40-0x34];
|
||||
/* 0x040 */ struct GdVec3f unk40;
|
||||
/* 0x04C */ u8 pad4C[0x58-0x4C];
|
||||
/* 0x058 */ struct GdVec3f unk58; // orientation?
|
||||
/* 0x064 */ struct GdVec3f unk64;
|
||||
/* 0x070 */ Mat4f mat70;
|
||||
/* 0x0B0 */ Mat4f matB0;
|
||||
/* 0x0F0 */ struct ObjShape *shapePtr; // from dead code in draw_bone
|
||||
/* 0x0F4 */ f32 unkF4; // also length?
|
||||
/* 0x0F8 */ f32 unkF8; // length?
|
||||
/* 0x0FC */ f32 unkFC; // also length?
|
||||
/* 0x100 */ s32 colourNum; // "colour"
|
||||
/* 0x104 */ s32 unk104; // "flags"
|
||||
/* 0x108 */ s32 id;
|
||||
/* 0x10C */ struct ObjGroup *unk10C; // group of joints?
|
||||
/* 0x110 */ f32 spring;
|
||||
/* 0x114 */ f32 unk114;
|
||||
/* 0x118 */ f32 unk118;
|
||||
/* 0x11C */ u8 pad11C[0x124-0x11C];
|
||||
}; /* sizeof = 0x124 */
|
||||
|
||||
struct ObjJoint {
|
||||
/* 0x000 */ struct GdObj header;
|
||||
/* 0x014 */ struct GdVec3f worldPos; // position in world space
|
||||
/* 0x020 */ struct ObjShape *shapePtr;
|
||||
/* 0x024 */ struct ObjJoint *prevjoint; // prev joint? linked joint?
|
||||
/* 0x028 */ struct ObjJoint *nextjoint;
|
||||
/* 0x02C */ void (*updateFunc)(struct ObjJoint*); // seems to update attached objects? see grabbable_joint_update_func
|
||||
/* 0x030 */ struct GdVec3f unk30; // huge array of vecs? another matrix?
|
||||
/* 0x03C */ struct GdVec3f unk3C; // relative position?
|
||||
/* 0x048 */ struct GdVec3f unk48;
|
||||
/* 0x054 */ struct GdVec3f initPos; // attached offset? (with +200 as well)
|
||||
/* 0x060 */ u8 pad60[0x6C-0x60];
|
||||
/* 0x06C */ struct GdVec3f unk6C; // initial rotation vec
|
||||
/* 0x078 */ struct GdVec3f velocity;
|
||||
/* 0x084 */ struct GdVec3f unk84;
|
||||
/* 0x090 */ struct GdVec3f unk90;
|
||||
/* 0x09C */ struct GdVec3f scale;
|
||||
/* 0x0A8 */ struct GdVec3f unkA8;
|
||||
/* 0x0B4 */ struct GdVec3f unkB4;
|
||||
/* 0x0C0 */ struct GdVec3f shapeOffset;
|
||||
/* 0x0CC */ struct GdVec3f unkCC;
|
||||
/* 0x0D8 */ u8 padD8[4];
|
||||
/* 0x0DC */ struct GdVec3f friction;
|
||||
/* 0x0E8 */ Mat4f matE8; //matrix4x4
|
||||
/* 0x128 */ Mat4f mat128; // "rot matrix"
|
||||
/* 0x168 */ Mat4f mat168; // "id matrix"
|
||||
/* 0x1A8 */ struct GdVec3f unk1A8;
|
||||
/* 0x1B4 */ s32 id;
|
||||
/* 0x1B8 */ u8 pad1B8[4];
|
||||
/* 0x1BC */ s32 flags; // "flags" - 0x2000 = grabbed
|
||||
/* 0x1C0 */ s32 unk1C0;
|
||||
/* 0x1C4 */ struct ObjGroup *unk1C4; // bone group?
|
||||
/* 0x1C8 */ s32 colourNum;
|
||||
/* 0x1CC */ s32 type; // 0 = normal joint, 5 = grabbable joint. seems to be set, but never used
|
||||
/* 0x1D0 */ struct ObjAnimator *rootAnimator; // root animator? used by eye_joint_update_func
|
||||
/* 0x1D4 */ u8 pad1D4[0x1f4-0x1d4];
|
||||
/* 0x1F4 */ struct ObjGroup *weightGrp; //Group of ObjWeights, only? skin weights?
|
||||
/* 0x1F8 */ struct ObjGroup *attachedObjsGrp; //attach object group
|
||||
/* 0x1FC */ s32 attachFlags; //d_attach_to arg 0; "AttFlag"
|
||||
/* 0x200 */ struct GdVec3f attachOffset;
|
||||
/* 0x20C */ struct GdObj *attachedToObj; // object that this object is attached to
|
||||
/* 0x210 */ u8 pad210[0x228-0x210];
|
||||
/* 0x228 */ f32 unk228;
|
||||
}; /* sizeof = 0x22C */
|
||||
|
||||
/* Particle Types (+60)
|
||||
3 = Has groups of other particles in 6C?
|
||||
*/
|
||||
|
||||
struct ObjParticle {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ u8 pad14[0x1C-0x14];
|
||||
/* 0x1C */ struct ObjShape *shapePtr; // looks like a shape...
|
||||
/* 0x20 */ struct GdVec3f pos; // some kind of position - relative? world?
|
||||
/* 0x2C */ u8 pad2C[0x30-0x2C];
|
||||
/* 0x30 */ f32 unk30;
|
||||
/* 0x34 */ u8 pad34[0x38-0x34];
|
||||
/* 0x38 */ struct GdVec3f unk38;
|
||||
/* 0x44 */ f32 unk44; //not vec?
|
||||
/* 0x48 */ f32 unk48; //not vec?
|
||||
/* 0x4C */ u8 pad4C[0x50-0x4C];
|
||||
/* 0x50 */ s32 id;
|
||||
/* 0x54 */ u32 flags; // "dflags"?
|
||||
/* 0x58 */ s32 colourNum;
|
||||
/* 0x5C */ s32 timeout; // when this reaches zero, the particle disappears
|
||||
/* 0x60 */ s32 unk60; //type?
|
||||
/* 0x64 */ s32 unk64; //type? (1 = has 50 sub-particles, 2,3 = has 30 sub-particles
|
||||
/* 0x68 */ u8 pad68[0x6C-0x68];
|
||||
/* 0x6C */ struct ObjGroup *subParticlesGrp; // group of other Particles ?
|
||||
/* 0x70 */ u8 pad70[4];
|
||||
/* 0x74 */ s32 unk74;
|
||||
/* 0x78 */ u8 unk78[4];
|
||||
/* 0x7C */ struct ObjAnimator *unk7C; // guessing on type; doesn't seem to be used in final code
|
||||
/* 0x80 */ struct ObjLight *unk80; // could be a Net or Light; not seen as non-null in running code
|
||||
/* 0x84 */ u8 pad84[0xB0-0x84];
|
||||
/* 0xB0 */ s32 unkB0; //state?
|
||||
/* 0xB4 */ struct ObjGroup *attachedObjsGrp; // attach group? unused group of particles
|
||||
/* 0xB8 */ s32 attachFlags; //attached arg0; "AttFlag"
|
||||
/* 0xBC */ struct GdObj *attachedToObj; // object that this object is attached to. looks like can be a Light or Camera
|
||||
}; /* sizeof = 0xC0 */
|
||||
|
||||
/**
|
||||
* An object that represents the visual portion of a 3D model.
|
||||
*/
|
||||
struct ObjShape {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ struct ObjShape *prevShape;
|
||||
/* 0x18 */ struct ObjShape *nextShape;
|
||||
/* 0x1C */ struct ObjGroup *faceGroup; /* face group; based on get_3DG1_shape */
|
||||
/* 0x20 */ struct ObjGroup *vtxGroup; /* vtx group; based on get_3DG1_shape */
|
||||
/* 0x24 */ struct ObjGroup *scaledVtxGroup; /* group for type 2 shapenets only ? vertices whose scaleFactor is not 1 get put into this group. */
|
||||
/* 0x28 */ u8 pad28[4];
|
||||
/* 0x2C */ struct ObjGroup *mtlGroup; /* what does this group do? materials? */
|
||||
/* 0x30 */ s32 unk30;
|
||||
/* 0x34 */ s32 faceCount; /* face count? based on get_3DG1_shape */
|
||||
/* 0x38 */ s32 vtxCount; /* vtx count? based on get_3DG1_shape */
|
||||
/* 0x3C */ s32 unk3C; // bool? if FALSE, then draw_shape_faces(shape)
|
||||
/* 0x40 */ u32 id;
|
||||
/* 0x44 */ s32 flag; // what are the flag values? only from dynlists?
|
||||
/* 0x48 */ s32 dlNums[2]; // gd dl number for each frame buffer (??) [0, 1]
|
||||
s32 unk50; // frame number (index into dlNums)?
|
||||
/* 0x54 */ u8 pad54[0x58-0x54]; // part of above array??
|
||||
/* 0x58 */ f32 alpha; // paramF? opacitiy? something with rendertype
|
||||
/* 0x5C */ char name[0x40];
|
||||
}; /* sizeof = 0x9C */
|
||||
|
||||
/* 0x44 Flag Values
|
||||
* 0x01 -
|
||||
* 0x10 - Use vtx position as vtx normal? (`chk_shapegen`)
|
||||
*/
|
||||
|
||||
/* netTypes
|
||||
* 0 - default?
|
||||
* 1 - shape net
|
||||
* 2 - something about the shape unk24 group having vertices too?
|
||||
* 3 - joints?
|
||||
* 4 - dynamic net? bone net?
|
||||
* 5 - particle net?
|
||||
* 6 - stub
|
||||
* 7 -
|
||||
*/
|
||||
|
||||
struct ObjNet {
|
||||
/* 0x000 */ struct GdObj header;
|
||||
/* 0x014 */ struct GdVec3f worldPos; // position? d_set_initpos + d_set_world_pos; print_net says world
|
||||
/* 0x020 */ struct GdVec3f initPos; // position? d_set_initpos? attached offset? dynamic? scratch?
|
||||
/* 0x02C */ u8 pad2c[0x34-0x2C];
|
||||
/* 0x034 */ s32 flags; // "dflags"?
|
||||
/* 0x038 */ u32 id; // some sort of id? from move_net
|
||||
/* 0x03C */ s32 unk3C; // state flags? vertex info flags?
|
||||
/* 0x040 */ s32 colourNum;
|
||||
/* 0x044 */ struct GdVec3f unusedForce; // "force" (unused)
|
||||
/* 0x050 */ struct GdVec3f velocity;
|
||||
/* 0x05C */ struct GdVec3f rotation;
|
||||
/* 0x068 */ struct GdVec3f unk68; //initial rotation?
|
||||
/* 0x074 */ struct GdVec3f collDisp; // what is this?
|
||||
/* 0x080 */ struct GdVec3f collTorque; // what is this?
|
||||
/* 0x08C */ struct GdVec3f unusedCollTorqueL; // unused
|
||||
/* 0x098 */ struct GdVec3f unusedCollTorqueD; // unused
|
||||
/* 0x0A4 */ struct GdVec3f torque; // torque
|
||||
/* 0x0B0 */ struct GdVec3f centerOfGravity; // "CofG" center of gravity?
|
||||
/* 0x0BC */ struct GdBoundingBox boundingBox;
|
||||
/* 0x0D4 */ struct GdVec3f unusedCollDispOff; // unused
|
||||
/* 0x0E0 */ f32 unusedCollMaxD; // unused
|
||||
/* 0x0E4 */ f32 maxRadius;
|
||||
/* 0x0E8 */ Mat4f matE8;
|
||||
/* 0x128 */ Mat4f mat128;
|
||||
/* 0x168 */ Mat4f mat168; // "rotation matrix"
|
||||
/* 0x1A8 */ struct ObjShape *shapePtr;
|
||||
/* 0x1AC */ struct GdVec3f scale;
|
||||
/* 0x1B8 */ f32 unusedMass; // unused
|
||||
/* 0x1BC */ s32 numModes; // unused
|
||||
/* 0x1C0 */ struct ObjGroup *unk1C0; // group of `ObjVertex` or `ObjParticle`
|
||||
/* 0x1C4 */ struct ObjGroup *skinGrp; // SkinGroup (from reset_weight) (joints and bones)
|
||||
/* 0x1C8 */ struct ObjGroup *unk1C8; // "node group" (joints, weights?)
|
||||
/* 0x1CC */ struct ObjGroup *unk1CC; // plane group (only type 1?)
|
||||
/* 0x1D0 */ struct ObjGroup *unk1D0; // vertex group
|
||||
/* 0x1D4 */ struct ObjGroup *attachedObjsGrp;
|
||||
/* 0x1D8 */ struct GdVec3f attachOffset;
|
||||
/* 0x1E4 */ s32 attachFlags; // d_attach_to arg 0; "AttFlag"
|
||||
/* 0x1E8 */ struct GdObj *attachedToObj; // object that this object is attached to
|
||||
/* 0x1EC */ s32 netType; // from move_net
|
||||
/* 0x1F0 */ struct ObjNet *unk1F0; // or joint. guess from Unknown80192AD0
|
||||
/* 0x1F4 */ struct GdVec3f unk1F4;
|
||||
/* 0x200 */ struct GdVec3f unk200;
|
||||
/* 0x20C */ struct ObjGroup *unk20C;
|
||||
/* 0x210 */ s32 ctrlType; // has no purpose
|
||||
/* 0x214 */ u8 pad214[0x21C-0x214];
|
||||
/* 0x21C */ struct ObjGroup *unk21C;
|
||||
}; /* sizeof = 0x220 */
|
||||
|
||||
struct ObjPlane {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ u32 id;
|
||||
/* 0x18 */ s32 unk18; //bool; contained within zone? (from its parent Net?)
|
||||
/* 0x1C */ f32 unk1C;
|
||||
/* 0x20 */ s32 unk20;
|
||||
/* 0x24 */ s32 unk24;
|
||||
/* 0x28 */ struct GdBoundingBox boundingBox;
|
||||
/* 0x40 */ struct ObjFace* unk40;
|
||||
}; /* sizeof = 0x44*/
|
||||
|
||||
struct ObjVertex {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ struct GdVec3f initPos;
|
||||
/* 0x20 */ struct GdVec3f pos; // new position after being moved by joints?
|
||||
/* 0x2C */ struct GdVec3f normal; // normal? also color (like gbi?)
|
||||
/* 0x38 */ s16 id;
|
||||
/* 0x3C */ f32 scaleFactor;
|
||||
/* 0x40 */ f32 alpha;
|
||||
/* 0x44 */ struct VtxLink *gbiVerts;
|
||||
}; /* sizeof = 0x48 */
|
||||
|
||||
/**
|
||||
* An object that represents a face in an `ObjShape`. It connects 3 or 4 vertices.
|
||||
*/
|
||||
struct ObjFace {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ struct GdColour colour;
|
||||
/* 0x20 */ s32 colourNum; // "colour" index
|
||||
/* 0x24 */ struct GdVec3f normal;
|
||||
/* 0x30 */ s32 vtxCount;
|
||||
/* 0x34 */ struct ObjVertex *vertices[4]; // these can also be s32 indices? which are then replaced by `find_thisface_verts`
|
||||
/* 0x44 */ s32 mtlId; // from compressed GdFaceData; -1 == coloured face?
|
||||
/* 0x48 */ struct ObjMaterial *mtl; // initialize to NULL; set by `map_face_materials` from mtlId
|
||||
}; /* sizeof = 0x4C */
|
||||
|
||||
#define CAMERA_FLAG_CONTROLLABLE 0x4
|
||||
|
||||
struct ObjCamera {
|
||||
/* 0x000 */ struct GdObj header;
|
||||
/* 0x014 */ struct GdVec3f worldPos; // position vec? from d_set_initpos
|
||||
/* 0x020 */ struct ObjCamera* prev;
|
||||
/* 0x024 */ struct ObjCamera* next;
|
||||
/* 0x028 */ s32 id;
|
||||
/* 0x02C */ s32 flags; // flag of some sort
|
||||
/* 0x030 */ struct GdObj* unk30; // pointer to some type of object
|
||||
/* 0x034 */ struct GdVec3f lookAt; // point that the camera faces
|
||||
/* 0x040 */ struct GdVec3f unk40; // relative position related?
|
||||
/* 0x04C */ struct GdVec3f unk4C;
|
||||
/* 0x058 */ f32 unk58; // GdVec3f ?
|
||||
/* 0x05C */ u8 pad5C[0x4];
|
||||
/* 0x060 */ f32 unk60;
|
||||
/* 0x064 */ Mat4f unk64; //matrix4x4
|
||||
/* 0x0A4 */ f32 unkA4;
|
||||
/* 0x0A8 */ Mat4f unkA8; //matrix4x4
|
||||
/* 0x0E8 */ Mat4f unkE8;
|
||||
/* 0x128 */ struct GdVec3f unk128; //possibly
|
||||
/* 0x134 */ struct GdVec3f unk134;
|
||||
/* 0x140 */ struct GdVec3f zoomPositions[4]; // zoom positions (*1, *1.5, *2, empty fourth)
|
||||
/* 0x170 */ s32 maxZoomLevel; // max number of zoom positions
|
||||
/* 0x174 */ s32 zoomLevel; // index into zoomPositions array
|
||||
/* 0x178 */ f32 unk178;
|
||||
/* 0x17C */ f32 unk17C;
|
||||
/* 0x180 */ struct GdVec3f unk180;
|
||||
/* 0x18C */ struct ObjView *unk18C; // view that has/is using this camera?
|
||||
}; /* sizeof = 0x190 */
|
||||
|
||||
enum GdMtlTypes {
|
||||
GD_MTL_STUB_DL = 0x01,
|
||||
GD_MTL_BREAK = 0x04,
|
||||
GD_MTL_SHINE_DL = 0x10,
|
||||
GD_MTL_TEX_OFF = 0x20,
|
||||
GD_MTL_LIGHTS = 0x40 // uses default case
|
||||
};
|
||||
|
||||
struct ObjMaterial {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ u8 pad14[0x1c-0x14];
|
||||
/* 0x1C */ s32 id;
|
||||
/* 0x20 */ char name[8];
|
||||
/* 0x28 */ s32 type;
|
||||
/* 0x2C */ u8 pad2C[4];
|
||||
/* 0x30 */ struct GdColour Ka; // ambient color
|
||||
/* 0x3C */ struct GdColour Kd; // diffuse color
|
||||
/* 0x48 */ u8 pad48[0x58-0x48];
|
||||
/* 0x58 */ void *texture; //set by d_usetexture; never seems to be non-null though.
|
||||
/* 0x5C */ s32 gddlNumber;
|
||||
}; /* sizeof = 0x60 */
|
||||
|
||||
struct ObjWeight {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ u8 pad14[0x8];
|
||||
/* 0x1C */ s32 vtxId; // ID of vertex that this weight applies to
|
||||
/* 0x20 */ struct GdVec3f vec20; // based on func_80181894? maybe a GdBoundingBox?
|
||||
/* 0x2C */ u8 pad2C[0x38-0x2c];
|
||||
/* 0x38 */ f32 weightVal; // weight (unit?)
|
||||
/* 0x3C */ struct ObjVertex* vtx;
|
||||
}; /* sizeof = 0x40 */
|
||||
|
||||
/* This union is used in ObjGadget for a variable typed field.
|
||||
** The type can be found by checking group unk4C */
|
||||
union ObjVarVal {
|
||||
s32 i;
|
||||
f32 f;
|
||||
u64 l;
|
||||
};
|
||||
|
||||
/*
|
||||
* A slider control used to adjust the value of a variable
|
||||
*/
|
||||
struct ObjGadget {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ struct GdVec3f worldPos; // "world" position vec?
|
||||
/* 0x20 */ s32 unk20; // unused; only ever set to 0
|
||||
/* 0x24 */ s32 type;
|
||||
/* 0x28 */ f32 sliderPos; // position of the slider (from 0 to 1)
|
||||
/* 0x2C */ u8 pad2C[4];
|
||||
/* 0x30 */ union ObjVarVal varval; //retype and rename varval30
|
||||
/* 0x38 */ f32 rangeMin;
|
||||
/* 0x3C */ f32 rangeMax;
|
||||
/* 0x40 */ struct GdVec3f size; // size (x = width, y = height)
|
||||
/* 0x4C */ struct ObjGroup *valueGrp; // group containing `ObjValPtr`s controlled by this gadget
|
||||
/* 0x50 */ struct ObjShape *shapePtr;
|
||||
/* 0x54 */ struct ObjGroup *unk54; //node group?
|
||||
/* 0x58 */ u8 pad58[4];
|
||||
/* 0x5C */ s32 colourNum;
|
||||
}; /* sizeof = 0x60 */
|
||||
|
||||
enum GdViewFlags {
|
||||
VIEW_2_COL_BUF = 0x000008,
|
||||
VIEW_ALLOC_ZBUF = 0x000010,
|
||||
VIEW_SAVE_TO_GLOBAL = 0x000040,
|
||||
VIEW_DEFAULT_PARENT = 0x000100,
|
||||
VIEW_BORDERED = 0x000400,
|
||||
VIEW_UPDATE = 0x000800,
|
||||
VIEW_UNK_1000 = 0x001000, // used in setup_view_buffers
|
||||
VIEW_UNK_2000 = 0x002000, // only see together with 0x4000
|
||||
VIEW_UNK_4000 = 0x004000,
|
||||
VIEW_COLOUR_BUF = 0x008000,
|
||||
VIEW_Z_BUF = 0x010000,
|
||||
VIEW_1_CYCLE = 0x020000,
|
||||
VIEW_MOVEMENT = 0x040000,
|
||||
VIEW_DRAW = 0x080000,
|
||||
VIEW_WAS_UPDATED = 0x100000,
|
||||
VIEW_LIGHT = 0x200000
|
||||
};
|
||||
|
||||
struct ObjView {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ u8 pad14[0x8];
|
||||
/* 0x1C */ s32 unk1C; // set as nonexistent return of `setup_view_buffers`
|
||||
/* 0x20 */ s32 id;
|
||||
/* 0x24 */ struct ObjCamera *activeCam; // is this really active?
|
||||
/* 0x28 */ struct ObjGroup *components; // camera + joints + nets, etc..?
|
||||
/* 0x2C */ struct ObjGroup *lights; // only lights?
|
||||
/* 0x30 */ struct GdObj *pickedObj; // selected with cursor (`update_view`)
|
||||
/* 0x34 */ enum GdViewFlags flags;
|
||||
/* 0x38 */ s32 projectionType; // enum? if 1 use guPerspective, if 0 (or 2?) use guOrtho (see `drawscene`)
|
||||
/* 0x3C */ struct GdVec3f upperLeft; // position vec?
|
||||
/* 0x48 */ f32 unk48; // what are these? are they another vec?
|
||||
/* 0x4C */ f32 unk4C;
|
||||
/* 0x50 */ u8 pad50[0x4];
|
||||
/* 0x54 */ struct GdVec3f lowerRight;
|
||||
/* 0x60 */ struct GdVec3f clipping; // z-coordinate of (x: near, y: far) clipping plane?
|
||||
/* 0x6C */ const char *namePtr;
|
||||
/* 0x70 */ s32 gdDlNum;
|
||||
/* 0x74 */ s32 unk74;
|
||||
/* 0x78 */ s32 unk78;
|
||||
/* 0x7C */ struct GdColour colour;
|
||||
/* 0x88 */ struct ObjView *parent; // maybe not a true parent, but link to buffers in parent?
|
||||
/* 0x8C */ void *zbuf;
|
||||
/* 0x90 */ void *colourBufs[2]; // frame buffers?
|
||||
/* 0x98 */ void (*proc)(struct ObjView *); // Never non-null in game...?
|
||||
/* 0x9C */ s32 unk9C;
|
||||
}; /* sizeof = 0xA0 */
|
||||
|
||||
|
||||
typedef union ObjVarVal * (*valptrproc_t)(union ObjVarVal *, union ObjVarVal);
|
||||
|
||||
struct ObjLabel {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ struct GdVec3f position;
|
||||
/* 0x20 */ char *fmtstr; // format string for displaying the value contained in `valptr`
|
||||
/* 0x24 */ s32 unk24; // always 8
|
||||
/* 0x28 */ struct ObjValPtr *valptr;
|
||||
/* 0x2C */ valptrproc_t valfn;
|
||||
/* 0x30 */ s32 unk30; // set to 3 or 4 in the code, but never actually used. could possibly be colourNum?
|
||||
}; /* sizeof = 0x34 */
|
||||
|
||||
/* unk30 types:
|
||||
* 3 = f32? f32 pointer?
|
||||
**/
|
||||
|
||||
struct ObjAnimator {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ struct ObjGroup* animatedPartsGrp; // group containing objects animated by this animator. I think all of them are joints.
|
||||
/* 0x18 */ struct ObjGroup* animdataGrp; //animation data? a group, but the link points to something weird..
|
||||
/* 0x1C */ u8 pad1C[0x4];
|
||||
/* 0x20 */ s32 animSeqNum; // which entry in the AnimDataInfo array to use
|
||||
/* 0x24 */ f32 unk24;
|
||||
/* 0x28 */ f32 frame; // key frame number. This is a float so that it can interpolate between key frames, though I think in practice, it's always a whole number.
|
||||
/* 0x2C */ u8 pad2C[4];
|
||||
/* 0x30 */ struct ObjGroup *attachedObjsGrp;
|
||||
/* 0x34 */ s32 attachFlags; //attach arg0, not used
|
||||
/* 0x38 */ u8 pad38[0x44-0x38];
|
||||
/* 0x44 */ struct GdObj* attachedToObj; // object that this object is attached to. Normally another Objanimator?
|
||||
/* 0x48 */ void (*controlFunc) (struct ObjAnimator *); // function that "controls" the animation sequence by choosing the frame number
|
||||
/* 0x4C */ s32 state; //state enum?
|
||||
/* 0x50 */ s32 nods; // Counts the number of nods when Mario is dozing off. When this reaches zero, he wakes up again
|
||||
/* 0x54 */ s32 stillTimer; // number of frames to remain in the part where Mario's head stays still with his eyes following the cursor
|
||||
}; /* sizeof = 0x58 */
|
||||
|
||||
/* Animation Data Types */
|
||||
enum GdAnimations {
|
||||
GD_ANIM_EMPTY = 0, // Listed types are how the data are arranged in memory; maybe not be exact type
|
||||
GD_ANIM_MTX4x4 = 1, // f32[4][4]
|
||||
GD_ANIM_SCALE3F_ROT3F_POS3F = 2, // f32[3][3]
|
||||
GD_ANIM_SCALE3S_POS3S_ROT3S = 3, // s16[9]
|
||||
GD_ANIM_SCALE3F_ROT3F_POS3F_2 = 4, // f32[3][3]
|
||||
GD_ANIM_STUB = 5,
|
||||
GD_ANIM_ROT3S = 6, // s16[3]
|
||||
GD_ANIM_POS3S = 7, // s16[3]
|
||||
GD_ANIM_ROT3S_POS3S = 8, // s16[6]
|
||||
GD_ANIM_MTX4x4F_SCALE3F = 9, // {f32 mtx[4][4]; f32 vec[3];}
|
||||
GD_ANIM_CAMERA_EYE3S_LOOKAT3S = 11 // s16[6]
|
||||
};
|
||||
/* This struct is pointed to by the `obj` field in ListNode struct in the `animdata` ObjGroup */
|
||||
struct AnimDataInfo {
|
||||
s32 count; // count or -1 for end of array of AnimDataInfo structures
|
||||
enum GdAnimations type; // types are used in "move_animator"
|
||||
void* data; // points to an array of `type` data
|
||||
};
|
||||
/* GD_ANIM_MTX4x4F_SCALE3F (9) type */
|
||||
struct AnimMtxVec {
|
||||
/* 0x00 */ Mat4f matrix;
|
||||
/* 0x40 */ struct GdVec3f vec; // seems to be a scale vec
|
||||
};
|
||||
|
||||
enum ValPtrType {
|
||||
OBJ_VALUE_INT = 1,
|
||||
OBJ_VALUE_FLOAT = 2
|
||||
};
|
||||
|
||||
/**
|
||||
* An object that points to a value in memory (either a field of another object,
|
||||
* or a standalone variable). Used by `ObjLabel` and `ObjGadget` to manage their
|
||||
* values.
|
||||
*/
|
||||
struct ObjValPtr {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ struct GdObj *obj; // maybe just a void *?
|
||||
/* 0x18 */ uintptr_t offset; // value pointed to is `obj` + `offset`
|
||||
/* 0x1C */ enum ValPtrType datatype;
|
||||
/* 0x20 */ s32 flag; // TODO: better name for this? If 0x40000, then `offset` is an offset to a field in `obj`. Otherwise, `obj` is NULL, and `offset` is the address of a variable.
|
||||
}; /* sizeof = 0x24 */
|
||||
|
||||
enum GdLightFlags {
|
||||
LIGHT_UNK02 = 0x02, // old type of light?
|
||||
LIGHT_NEW_UNCOUNTED = 0x10,
|
||||
LIGHT_UNK20 = 0x20 // new, actually used type of light? used for phong shading?
|
||||
};
|
||||
|
||||
struct ObjLight {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ u8 pad0[0x8];
|
||||
/* 0x1C */ s32 id;
|
||||
/* 0x20 */ char name[8];
|
||||
/* 0x28 */ u8 pad28[4];
|
||||
/* 0x2C */ s32 flags;
|
||||
/* 0x30 */ f32 unk30; // color (5C) = Kd (50) * 30
|
||||
/* 0x34 */ u8 pad34[4];
|
||||
/* 0x38 */ f32 unk38; // calculated diffuse theta (in degrees?)
|
||||
/* 0x3C */ s32 unk3C;
|
||||
/* 0x40 */ s32 unk40;
|
||||
/* 0x44 */ u8 pad3[0x8];
|
||||
/* 0x4C */ s32 unk4C;
|
||||
/* 0x50 */ struct GdColour diffuse;
|
||||
/* 0x5C */ struct GdColour colour;
|
||||
/* 0x68 */ struct GdVec3f unk68;
|
||||
/* 0x74 */ struct GdVec3f position;
|
||||
/* 0x80 */ struct GdVec3f unk80;
|
||||
/* 0x8C */ struct GdVec3f unk8C;
|
||||
/* 0x98 */ s32 unk98;
|
||||
/* 0x9C */ struct ObjShape *unk9C;
|
||||
}; /* sizeof = 0xA0 */
|
||||
|
||||
struct ObjZone {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ struct GdBoundingBox boundingBox;
|
||||
/* 0x2C */ struct ObjGroup *unk2C; // plane group?
|
||||
/* 0x30 */ struct ObjGroup *unk30; // guess based on Unknown801781DC; might have to change later
|
||||
/* 0x34 */ u8 pad[4];
|
||||
}; /* sizeof = 0x38*/
|
||||
|
||||
struct ObjUnk200000 {
|
||||
/* 0x00 */ struct GdObj header;
|
||||
/* 0x14 */ u8 pad14[0x30-0x14];
|
||||
/* 0x30 */ struct ObjVertex *unk30; //not sure; guessing for Unknown801781DC; 30 and 34 could switch with ObjZone
|
||||
/* 0x34 */ struct ObjFace *unk34; //not sure; guessing for Unknown801781DC
|
||||
}; /* sizeof = 0x38*/
|
||||
|
||||
#endif // GD_TYPES_H
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,31 @@
|
||||
#ifndef GD_JOINTS_H
|
||||
#define GD_JOINTS_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
|
||||
// bss
|
||||
extern s32 sResetWeightVtxNum;
|
||||
|
||||
// functions
|
||||
void eye_joint_update_func(struct ObjJoint *self);
|
||||
struct ObjJoint *make_joint(s32 flags, f32 x, f32 y, f32 z);
|
||||
struct ObjJoint *make_grabber_joint(struct ObjShape *shape, s32 flags, f32 x, f32 y, f32 z);
|
||||
void func_8018F328(struct ObjBone *b);
|
||||
void func_8018FA68(struct ObjBone *b);
|
||||
s32 set_skin_weight(struct ObjJoint *j, s32 id, struct ObjVertex *vtx, f32 weight);
|
||||
void func_8018FB58(struct ObjBone *b);
|
||||
void add_joint2bone(struct ObjBone *b, struct ObjJoint *j);
|
||||
struct ObjBone *make_bone(s32 a0, struct ObjJoint *j1, struct ObjJoint *j2, s32 a3);
|
||||
void func_801911A8(struct ObjJoint *j);
|
||||
void func_80191220(struct ObjJoint *j);
|
||||
void func_801913C0(struct ObjJoint *j);
|
||||
void func_801913F0(struct ObjJoint *j);
|
||||
void stub_joints_2(struct ObjJoint *j);
|
||||
void reset_joint(struct ObjJoint *j);
|
||||
void func_80191824(struct ObjJoint *j);
|
||||
void func_80191E88(struct ObjGroup *grp);
|
||||
void reset_joint_counts(void);
|
||||
|
||||
#endif // GD_JOINTS_H
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,105 @@
|
||||
#ifndef GD_OBJECTS_H
|
||||
#define GD_OBJECTS_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
|
||||
// types
|
||||
// Type to erase for func arg to `apply_to_obj_types_in_group`. Maybe one day this
|
||||
// can be the proper type of 'void (*)(struct GdObj *)...
|
||||
typedef void (*applyproc_t)(void *);
|
||||
|
||||
// structs
|
||||
struct DebugCounters {
|
||||
u32 ctr0;
|
||||
s32 ctr1;
|
||||
};
|
||||
|
||||
// bss
|
||||
extern struct GdBoundingBox gSomeBoundingBox;
|
||||
extern struct ObjCamera *sCurrentMoveCamera;
|
||||
extern struct ObjView *sCurrentMoveView;
|
||||
extern struct DebugCounters gGdCounter;
|
||||
extern Mat4f D_801B9DC8;
|
||||
extern struct GdVec3f D_801B9E08;
|
||||
extern struct ObjGroup* sCurrentMoveGrp;
|
||||
extern struct GdVec3f D_801B9E18;
|
||||
extern struct GdVec3f D_801B9E28;
|
||||
extern f32 D_801B9E34;
|
||||
extern Mat4f* D_801B9E38; /* never read from */
|
||||
extern struct ObjParticle *D_801B9E3C; /* never read from */
|
||||
extern s32 D_801B9E40; /* always 0 */
|
||||
extern s32 D_801B9E44;
|
||||
extern Mat4f* D_801B9E48;
|
||||
extern struct ObjCamera* gGdCameraList;
|
||||
extern void* D_801B9E50;
|
||||
extern struct ObjGroup* gGdGroupList;
|
||||
extern s32 gGdObjCount;
|
||||
extern s32 gGdGroupCount;
|
||||
extern s32 gGdPlaneCount;
|
||||
extern s32 gGdCameraCount;
|
||||
extern struct Unk801B9E68 sGdViewInfo; /* count in first member? */
|
||||
extern void* D_801B9E80;
|
||||
extern struct ObjJoint* gGdJointList;
|
||||
extern struct ObjBone* gGdBoneList;
|
||||
extern struct GdObj* gGdObjectList;
|
||||
extern struct ObjGroup* gGdViewsGroup;
|
||||
|
||||
// functions
|
||||
void reset_bounding_box(void);
|
||||
void add_obj_pos_to_bounding_box(struct GdObj *a0);
|
||||
void get_some_bounding_box(struct GdBoundingBox *a0);
|
||||
void stub_objects_1(UNUSED struct ObjGroup *a0, UNUSED struct GdObj *a1);
|
||||
struct GdObj *make_object(enum ObjTypeFlag objFlag);
|
||||
struct ObjZone *make_zone(struct ObjGroup *a0, struct GdBoundingBox *a1, struct ObjGroup *a2);
|
||||
struct ObjUnk200000 *func_8017C7A0(struct ObjVertex *a0, struct ObjFace *a1);
|
||||
struct ListNode *make_link_to_obj(struct ListNode *head, struct GdObj *a1);
|
||||
struct VtxLink *make_vtx_link(struct VtxLink *prevLink, Vtx *data);
|
||||
struct ObjValPtr *make_valptr(struct GdObj *obj, s32 flags, enum ValPtrType type, size_t offset);
|
||||
void reset_plane(struct ObjPlane *plane);
|
||||
struct ObjPlane *make_plane(s32 inZone, struct ObjFace *a1);
|
||||
struct ObjCamera *make_camera(s32 a0, struct GdObj *a1);
|
||||
struct ObjMaterial *make_material(UNUSED s32 a0, char *name, s32 id);
|
||||
struct ObjLight *make_light(s32 flags, char *name, s32 id);
|
||||
struct ObjView *make_view(const char *name, s32 flags, s32 a2, s32 ulx, s32 uly, s32 lrx, s32 lry,
|
||||
struct ObjGroup *parts);
|
||||
struct ObjAnimator *make_animator(void);
|
||||
struct ObjWeight *make_weight(UNUSED s32 a0, s32 id, struct ObjVertex *vtx, f32 weight);
|
||||
struct ObjGroup *make_group_of_type(enum ObjTypeFlag, struct GdObj*, struct GdObj*);
|
||||
void format_object_id(char*, struct GdObj*);
|
||||
struct ObjGroup* make_group(s32 count, ...);
|
||||
void addto_group(struct ObjGroup *group, struct GdObj *obj);
|
||||
void addto_groupfirst(struct ObjGroup *group, struct GdObj *obj);
|
||||
s32 group_contains_obj(struct ObjGroup *group, struct GdObj *obj);
|
||||
void show_details(enum ObjTypeFlag type);
|
||||
s32 stub_objects_2(void);
|
||||
s32 make_scene(void);
|
||||
void menu_cb_reset_positions(void);
|
||||
s32 apply_to_obj_types_in_group(s32 types, applyproc_t fn, struct ObjGroup *group);
|
||||
void func_8017E584(struct ObjNet *a0, struct GdVec3f *a1, struct GdVec3f *a2);
|
||||
void func_8017E838(struct ObjNet *a0, struct GdVec3f *a1, struct GdVec3f *a2);
|
||||
void func_8017E9EC(struct ObjNet *a0);
|
||||
s32 func_8017EA94(struct GdVec3f *vec, Mat4f matrix);
|
||||
s32 func_8017EB24(struct GdObj *a0, struct GdObj *a1);
|
||||
s32 is_obj_xz_in_bounding_box(struct GdObj *a0, struct GdBoundingBox *a1);
|
||||
s32 is_point_xz_in_bounding_box(struct GdVec3f *a0, struct GdBoundingBox *a1);
|
||||
s32 gd_plane_point_within(struct GdBoundingBox *a0, struct GdBoundingBox *a1);
|
||||
s32 transform_child_objects_recursive(struct GdObj *a0, struct GdObj *a1);
|
||||
s32 func_8017F210(struct GdObj *a0, struct GdObj *a1);
|
||||
void stub_objects_3(UNUSED f32 a0, UNUSED struct GdObj *a1, UNUSED struct GdObj *a2);
|
||||
void interpolate_animation_transform(struct GdAnimTransform *a0, struct GdAnimTransform *a1, f32 a2);
|
||||
void move_animator(struct ObjAnimator *animObj);
|
||||
void drag_picked_object(struct GdObj *inputObj);
|
||||
void move_animators(struct ObjGroup *group);
|
||||
void find_and_drag_picked_object(struct ObjGroup *group);
|
||||
void move_camera(struct ObjCamera *cam);
|
||||
void move_cameras_in_grp(struct ObjGroup *group);
|
||||
void func_8018100C(struct ObjLight *light);
|
||||
void move_lights_in_grp(struct ObjGroup *group);
|
||||
void proc_view_movement(struct ObjView *view);
|
||||
void reset_nets_and_gadgets(struct ObjGroup *group);
|
||||
void null_obj_lists(void);
|
||||
|
||||
#endif // GD_OBJECTS_H
|
||||
@@ -0,0 +1,254 @@
|
||||
#include <PR/ultratypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "debug_utils.h"
|
||||
#include "dynlist_proc.h"
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
#include "objects.h"
|
||||
#include "old_menu.h"
|
||||
#include "renderer.h"
|
||||
|
||||
/**
|
||||
* @file old_menu.c
|
||||
*
|
||||
* This file contains remnants of code for rendering what appears to be a GUI
|
||||
* that used the IRIX Graphics Library, from when this program was a standalone demo.
|
||||
* It also contains code for creating labels and gadget, which are `GdObj`s that
|
||||
* allow for displaying text and memory values on screen. Those `GdObj`s are not
|
||||
* created in-game, but there are some functions in `renderer.c` that use
|
||||
* them, and those functions may still work if called.
|
||||
*/
|
||||
|
||||
// bss
|
||||
static char sDefSettingsMenuStr[0x100];
|
||||
static struct GdVec3f sStaticVec;
|
||||
static struct GdVec3f unusedVec;
|
||||
static struct ObjGadget *sCurGadgetPtr;
|
||||
|
||||
// forward declarations
|
||||
static void reset_gadget_default(struct ObjGadget *);
|
||||
|
||||
/* 239EC0 -> 239F78 */
|
||||
void get_objvalue(union ObjVarVal *dst, enum ValPtrType type, void *base, size_t offset) {
|
||||
union ObjVarVal *objAddr = (void *) ((u8 *) base + offset);
|
||||
|
||||
switch (type) {
|
||||
case OBJ_VALUE_INT:
|
||||
dst->i = objAddr->i;
|
||||
break;
|
||||
case OBJ_VALUE_FLOAT:
|
||||
dst->f = objAddr->f;
|
||||
break;
|
||||
default:
|
||||
fatal_printf("%s: Undefined ValueType", "get_objvalue");
|
||||
}
|
||||
}
|
||||
|
||||
/* 239F78 -> 23A00C */
|
||||
void Unknown8018B7A8(void *a0) {
|
||||
struct GdVec3f sp1C;
|
||||
|
||||
set_cur_dynobj(a0);
|
||||
d_get_init_pos(&sp1C);
|
||||
|
||||
sp1C.x += sStaticVec.x;
|
||||
sp1C.y += sStaticVec.y;
|
||||
sp1C.z += sStaticVec.z;
|
||||
d_set_world_pos(sp1C.x, sp1C.y, sp1C.z);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused - called when an item is selected from the "Default Settings" menu.
|
||||
*
|
||||
* @param itemId ID of the menu item that was clicked
|
||||
*/
|
||||
static void menu_cb_default_settings(intptr_t itemId) {
|
||||
struct ObjGroup *group = (struct ObjGroup *)itemId; // Unpack pointer from menu item ID
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_GADGETS, (applyproc_t) reset_gadget_default, group);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_VIEWS, (applyproc_t) stub_renderer_6, gGdViewsGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused - appends a menu item for the group to sDefSettingsMenuStr.
|
||||
*/
|
||||
static void add_item_to_default_settings_menu(struct ObjGroup *group) {
|
||||
char buf[0x100];
|
||||
|
||||
if (group->debugPrint == 1) {
|
||||
// Convert pointer to integer and store it as the menu item ID.
|
||||
sprintf(buf, "| %s %%x%d", group->name, (u32) (intptr_t) group);
|
||||
gd_strcat(sDefSettingsMenuStr, buf);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused - creates a popup menu that allows the user to control some settings.
|
||||
*/
|
||||
long create_gui_menu(struct ObjGroup *grp) {
|
||||
long dynamicsMenuId;
|
||||
long defaultSettingMenuId;
|
||||
long contTypeMenuId;
|
||||
|
||||
gd_strcpy(sDefSettingsMenuStr, "Default Settings %t %F");
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_GROUPS, (applyproc_t) add_item_to_default_settings_menu, grp);
|
||||
defaultSettingMenuId = defpup(sDefSettingsMenuStr, &menu_cb_default_settings);
|
||||
|
||||
contTypeMenuId = defpup(
|
||||
"Control Type %t %F"
|
||||
"| U-64 Analogue Joystick %x1 "
|
||||
"| Keyboard %x2 "
|
||||
"| Mouse %x3",
|
||||
&menu_cb_control_type);
|
||||
|
||||
dynamicsMenuId = defpup(
|
||||
"Dynamics %t "
|
||||
"|\t\t\tReset Positions %f "
|
||||
"|\t\t\tSet Defaults %m "
|
||||
"|\t\t\tSet Controller %m "
|
||||
"|\t\t\tRe-Calibrate Controller %f "
|
||||
"|\t\t\tQuit %f",
|
||||
&menu_cb_reset_positions, defaultSettingMenuId, contTypeMenuId, &menu_cb_recalibrate_controller, &gd_exit);
|
||||
|
||||
return dynamicsMenuId;
|
||||
}
|
||||
|
||||
/* 23A190 -> 23A250 */
|
||||
struct ObjLabel *make_label(struct ObjValPtr *ptr, char *str, s32 a2, f32 x, f32 y, f32 z) {
|
||||
struct ObjLabel *label = (struct ObjLabel *) make_object(OBJ_TYPE_LABELS);
|
||||
label->valfn = NULL;
|
||||
label->valptr = ptr;
|
||||
label->fmtstr = str;
|
||||
label->unk24 = a2;
|
||||
label->unk30 = 4;
|
||||
label->position.x = x;
|
||||
label->position.y = y;
|
||||
label->position.z = z;
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
/* 23A250 -> 23A32C */
|
||||
struct ObjGadget *make_gadget(UNUSED s32 a0, s32 a1) {
|
||||
struct ObjGadget *gdgt = (struct ObjGadget *) make_object(OBJ_TYPE_GADGETS);
|
||||
gdgt->valueGrp = NULL;
|
||||
gdgt->rangeMax = 1.0f;
|
||||
gdgt->rangeMin = 0.0f;
|
||||
gdgt->unk20 = a1;
|
||||
gdgt->colourNum = 0;
|
||||
gdgt->sliderPos = 1.0f;
|
||||
gdgt->size.x = 100.0f;
|
||||
gdgt->size.y = 10.0f;
|
||||
gdgt->size.z = 10.0f; // how is this useful?
|
||||
|
||||
return gdgt;
|
||||
}
|
||||
|
||||
/* 23A32C -> 23A3E4 */
|
||||
void set_objvalue(union ObjVarVal *src, enum ValPtrType type, void *base, size_t offset) {
|
||||
union ObjVarVal *dst = (void *) ((u8 *) base + offset);
|
||||
switch (type) {
|
||||
case OBJ_VALUE_INT:
|
||||
dst->i = src->i;
|
||||
break;
|
||||
case OBJ_VALUE_FLOAT:
|
||||
dst->f = src->f;
|
||||
break;
|
||||
default:
|
||||
fatal_printf("%s: Undefined ValueType", "set_objvalue");
|
||||
}
|
||||
}
|
||||
|
||||
/* 23A3E4 -> 23A488; orig name: Unknown8018BD54 */
|
||||
void set_static_gdgt_value(struct ObjValPtr *vp) {
|
||||
switch (vp->datatype) {
|
||||
case OBJ_VALUE_FLOAT:
|
||||
set_objvalue(&sCurGadgetPtr->varval, OBJ_VALUE_FLOAT, vp->obj, vp->offset);
|
||||
break;
|
||||
case OBJ_VALUE_INT:
|
||||
set_objvalue(&sCurGadgetPtr->varval, OBJ_VALUE_INT, vp->obj, vp->offset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* 23A488 -> 23A4D0 */
|
||||
static void reset_gadget_default(struct ObjGadget *gdgt) {
|
||||
UNUSED u8 pad[4];
|
||||
|
||||
sCurGadgetPtr = gdgt;
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_VALPTRS, (applyproc_t) set_static_gdgt_value, gdgt->valueGrp);
|
||||
}
|
||||
|
||||
/* 23A4D0 -> 23A784 */
|
||||
void adjust_gadget(struct ObjGadget *gdgt, s32 a1, s32 a2) {
|
||||
UNUSED u8 pad[8];
|
||||
f32 range;
|
||||
struct ObjValPtr *vp;
|
||||
|
||||
if (gdgt->type == 1) {
|
||||
gdgt->sliderPos += a2 * (-sCurrentMoveCamera->unk40.z * 1.0E-5);
|
||||
} else if (gdgt->type == 2) {
|
||||
gdgt->sliderPos += a1 * (-sCurrentMoveCamera->unk40.z * 1.0E-5);
|
||||
}
|
||||
|
||||
// slider position must be between 0 and 1 (inclusive)
|
||||
if (gdgt->sliderPos < 0.0f) {
|
||||
gdgt->sliderPos = 0.0f;
|
||||
} else if (gdgt->sliderPos > 1.0f) {
|
||||
gdgt->sliderPos = 1.0f;
|
||||
}
|
||||
|
||||
range = gdgt->rangeMax - gdgt->rangeMin;
|
||||
|
||||
if (gdgt->valueGrp != NULL) {
|
||||
vp = (struct ObjValPtr *) gdgt->valueGrp->firstMember->obj;
|
||||
|
||||
switch (vp->datatype) {
|
||||
case OBJ_VALUE_FLOAT:
|
||||
gdgt->varval.f = gdgt->sliderPos * range + gdgt->rangeMin;
|
||||
break;
|
||||
case OBJ_VALUE_INT:
|
||||
gdgt->varval.i = ((s32)(gdgt->sliderPos * range)) + gdgt->rangeMin;
|
||||
break;
|
||||
default:
|
||||
fatal_printf("%s: Undefined ValueType", "adjust_gadget");
|
||||
}
|
||||
}
|
||||
|
||||
reset_gadget_default(gdgt);
|
||||
}
|
||||
|
||||
/* 23A784 -> 23A940; orig name: Unknown8018BFB4 */
|
||||
void reset_gadget(struct ObjGadget *gdgt) {
|
||||
UNUSED u8 pad[8];
|
||||
f32 range;
|
||||
struct ObjValPtr *vp;
|
||||
|
||||
if (gdgt->rangeMax - gdgt->rangeMin == 0.0f) {
|
||||
fatal_printf("gadget has zero range (%f -> %f)\n", gdgt->rangeMin, gdgt->rangeMax);
|
||||
}
|
||||
|
||||
range = (f32)(1.0 / (gdgt->rangeMax - gdgt->rangeMin));
|
||||
|
||||
if (gdgt->valueGrp != NULL) {
|
||||
vp = (struct ObjValPtr *) gdgt->valueGrp->firstMember->obj;
|
||||
|
||||
switch (vp->datatype) {
|
||||
case OBJ_VALUE_FLOAT:
|
||||
get_objvalue(&gdgt->varval, OBJ_VALUE_FLOAT, vp->obj, vp->offset);
|
||||
gdgt->sliderPos = (gdgt->varval.f - gdgt->rangeMin) * range;
|
||||
break;
|
||||
case OBJ_VALUE_INT:
|
||||
get_objvalue(&gdgt->varval, OBJ_VALUE_INT, vp->obj, vp->offset);
|
||||
gdgt->sliderPos = (gdgt->varval.i - gdgt->rangeMin) * range;
|
||||
break;
|
||||
default:
|
||||
fatal_printf("%s: Undefined ValueType", "reset_gadget");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 23A940 -> 23A980 */
|
||||
void reset_gadgets_in_grp(struct ObjGroup *grp) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_GADGETS, (applyproc_t) reset_gadget, grp);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef GD_OLD_MENU_H
|
||||
#define GD_OLD_MENU_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
|
||||
void get_objvalue(union ObjVarVal *dst, enum ValPtrType type, void *base, size_t offset);
|
||||
struct ObjGadget *make_gadget(UNUSED s32 a0, s32 a1);
|
||||
void reset_gadget(struct ObjGadget *gdgt);
|
||||
void reset_gadgets_in_grp(struct ObjGroup *grp);
|
||||
|
||||
// see bad_declarations.h
|
||||
#ifndef GD_USE_BAD_DECLARATIONS
|
||||
struct ObjLabel *make_label(struct ObjValPtr *ptr, char *str, s32 a2, f32 x, f32 y, f32 z);
|
||||
#endif
|
||||
|
||||
#endif // GD_OLD_MENU_H
|
||||
@@ -0,0 +1,526 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "debug_utils.h"
|
||||
#include "draw_objects.h"
|
||||
#include "dynlist_proc.h"
|
||||
#include "gd_math.h"
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
#include "objects.h"
|
||||
#include "particles.h"
|
||||
#include "renderer.h"
|
||||
#include "skin.h"
|
||||
|
||||
// static types
|
||||
typedef union {
|
||||
struct ObjVertex *vtx;
|
||||
struct ObjParticle *ptc;
|
||||
} VtxPtc;
|
||||
|
||||
struct Connection {
|
||||
struct GdObj header; // this header is never used
|
||||
u8 filler14[8];
|
||||
VtxPtc node1; // first connected vertex or particle
|
||||
VtxPtc node2; // second connected vertex or particle
|
||||
f32 unk24;
|
||||
u32 unk28; // union tag? 0 = vertex; 1 = particle?
|
||||
};
|
||||
|
||||
// data
|
||||
static void *sUnused801A81D0 = NULL;
|
||||
static s32 D_801A81D4[25] = {
|
||||
/* ID? X Y Z */
|
||||
9, 3, 12, -14, 25, 5, 16, -25, 42, 4, 15, -39, 55,
|
||||
-6, 20, -23, 70, -2, 20, -23, 135, 0, 16, 0, 0 /* Terminator */
|
||||
};
|
||||
static s32 D_801A8238[5] = {
|
||||
/* ID? X Y Z */
|
||||
15, 0, 22, 0, 0 /* Terminator */
|
||||
};
|
||||
|
||||
// static bss
|
||||
static struct ObjFace *D_801B9EF0;
|
||||
|
||||
// fn declarations
|
||||
struct Connection *make_connection(struct ObjVertex *, struct ObjVertex *);
|
||||
void Unknown80181D14(struct ObjFace *);
|
||||
void func_80181EB0(struct Connection *);
|
||||
void func_80182088(struct Connection *);
|
||||
void move_particle(struct ObjParticle *);
|
||||
struct Connection *make_connection(struct ObjVertex *, struct ObjVertex *);
|
||||
int func_80182778(struct ObjParticle *);
|
||||
void func_80182A08(struct ObjParticle *, struct GdVec3f *b);
|
||||
void func_801838D0(struct ObjParticle *);
|
||||
void Unknown801835C8(struct ObjParticle *ptc);
|
||||
|
||||
static void connect_vertices(struct ObjVertex *vtx1, struct ObjVertex *vtx2) {
|
||||
struct Connection *newConn;
|
||||
register struct ListNode *link;
|
||||
|
||||
if (vtx1 == vtx2) {
|
||||
return;
|
||||
}
|
||||
link = gGdSkinNet->unk1C0->firstMember;
|
||||
while (link != NULL) {
|
||||
// FIXME: types
|
||||
struct Connection *conn = (struct Connection *) link->obj;
|
||||
|
||||
if ((conn->node1.vtx == vtx1 || conn->node1.vtx == vtx2)
|
||||
&& (conn->node2.vtx == vtx1 || conn->node2.vtx == vtx2)) {
|
||||
break;
|
||||
}
|
||||
link = link->next;
|
||||
}
|
||||
if (link == NULL) {
|
||||
newConn = make_connection(vtx1, vtx2);
|
||||
//! make_connection never sets the header, so not sure what happens here
|
||||
addto_group(gGdSkinNet->unk1C0, &newConn->header);
|
||||
}
|
||||
}
|
||||
|
||||
/* 2304E4 -> 230680 */
|
||||
void Unknown80181D14(struct ObjFace *face) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
struct ObjVertex *vtx1;
|
||||
struct ObjVertex *vtx2;
|
||||
|
||||
for (i = 0; i < face->vtxCount - 1; i++) {
|
||||
vtx1 = face->vertices[i];
|
||||
vtx2 = face->vertices[i + 1];
|
||||
connect_vertices(vtx1, vtx2);
|
||||
}
|
||||
if (D_801B9EF0 != NULL) {
|
||||
for (i = 0; i < face->vtxCount; i++) {
|
||||
vtx1 = face->vertices[i];
|
||||
for (j = 0; j < D_801B9EF0->vtxCount; j++) {
|
||||
vtx2 = D_801B9EF0->vertices[j];
|
||||
connect_vertices(vtx1, vtx2);
|
||||
}
|
||||
}
|
||||
}
|
||||
D_801B9EF0 = face;
|
||||
}
|
||||
|
||||
/* 230680 -> 230858 */
|
||||
void func_80181EB0(struct Connection *cxn) {
|
||||
struct GdVec3f sp34;
|
||||
UNUSED u8 unused[0x2C];
|
||||
struct ObjParticle *sp4 = cxn->node1.ptc;
|
||||
struct ObjParticle *sp0 = cxn->node2.ptc;
|
||||
|
||||
sp34.x = 0.0f;
|
||||
sp34.y = sp4->pos.y - sp0->pos.y;
|
||||
sp34.z = 0.0f;
|
||||
sp34.y *= 0.01;
|
||||
sp4->unk38.x -= sp34.x;
|
||||
sp4->unk38.y -= sp34.y;
|
||||
sp4->unk38.z -= sp34.z;
|
||||
sp0->unk38.x += sp34.x;
|
||||
sp0->unk38.y += sp34.y;
|
||||
sp0->unk38.z += sp34.z;
|
||||
if (!(sp4->flags & 2)) {
|
||||
sp4->pos.x -= sp34.x;
|
||||
sp4->pos.y -= sp34.y;
|
||||
sp4->pos.z -= sp34.z;
|
||||
}
|
||||
if (!(sp0->flags & 2)) {
|
||||
sp0->pos.x += sp34.x;
|
||||
sp0->pos.y += sp34.y;
|
||||
sp0->pos.z += sp34.z;
|
||||
}
|
||||
}
|
||||
|
||||
/* @ 230858 -> 230B70 */
|
||||
void func_80182088(struct Connection *cxn) {
|
||||
struct GdVec3f sp4C;
|
||||
UNUSED u8 unused[0x24];
|
||||
f32 sp24;
|
||||
f32 sp20;
|
||||
struct ObjParticle *sp1C;
|
||||
struct ObjParticle *sp18;
|
||||
|
||||
if (cxn->unk28 & 1) {
|
||||
func_80181EB0(cxn);
|
||||
return;
|
||||
}
|
||||
sp1C = cxn->node1.ptc;
|
||||
sp18 = cxn->node2.ptc;
|
||||
sp4C.x = sp1C->pos.x - sp18->pos.x;
|
||||
sp4C.y = sp1C->pos.y - sp18->pos.y;
|
||||
sp4C.z = sp1C->pos.z - sp18->pos.z;
|
||||
sp20 = gd_vec3f_magnitude(&sp4C);
|
||||
sp24 = sp20 - cxn->unk24;
|
||||
sp4C.x /= sp20;
|
||||
sp4C.y /= sp20;
|
||||
sp4C.z /= sp20;
|
||||
sp4C.x *= sp24 * 0.1;
|
||||
sp4C.y *= sp24 * 0.1;
|
||||
sp4C.z *= sp24 * 0.1;
|
||||
sp1C->unk38.x -= sp4C.x;
|
||||
sp1C->unk38.y -= sp4C.y;
|
||||
sp1C->unk38.z -= sp4C.z;
|
||||
sp18->unk38.x += sp4C.x;
|
||||
sp18->unk38.y += sp4C.y;
|
||||
sp18->unk38.z += sp4C.z;
|
||||
if (!(sp1C->flags & 2)) {
|
||||
sp1C->pos.x -= sp4C.x;
|
||||
sp1C->pos.y -= sp4C.y;
|
||||
sp1C->pos.z -= sp4C.z;
|
||||
}
|
||||
if (!(sp18->flags & 2)) {
|
||||
sp18->pos.x += sp4C.x;
|
||||
sp18->pos.y += sp4C.y;
|
||||
sp18->pos.z += sp4C.z;
|
||||
}
|
||||
}
|
||||
|
||||
/* 230B70 -> 230CC0 */
|
||||
void func_801823A0(struct ObjNet *net) {
|
||||
register struct ListNode *link;
|
||||
struct Connection *cxn;
|
||||
|
||||
gGdSkinNet = net;
|
||||
switch (net->unk3C) {
|
||||
case 1: // Shape; Are these flags the same as net->netType (+0x1EC)?
|
||||
net->unk1C8 = net->shapePtr->vtxGroup;
|
||||
net->unk1C0 = make_group(0);
|
||||
D_801B9EF0 = NULL;
|
||||
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_FACES, (applyproc_t) Unknown80181D14,
|
||||
net->shapePtr->faceGroup);
|
||||
net->unk3C = 2;
|
||||
break;
|
||||
case 2:
|
||||
link = net->unk1C0->firstMember;
|
||||
while (link != NULL) {
|
||||
// FIXME: types
|
||||
cxn = (struct Connection *) link->obj;
|
||||
func_80182088(cxn);
|
||||
link = link->next;
|
||||
}
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_PARTICLES, (applyproc_t) move_particle, net->unk1C8);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_PLANES, (applyproc_t) reset_plane, net->unk1CC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* 230CC0 -> 230DCC */
|
||||
struct ObjParticle *make_particle(u32 flags, s32 colourNum, f32 x, f32 y, f32 z) {
|
||||
struct ObjParticle *particle = (struct ObjParticle *) make_object(OBJ_TYPE_PARTICLES);
|
||||
UNUSED u8 unused[8];
|
||||
|
||||
particle->pos.x = x;
|
||||
particle->pos.y = y;
|
||||
particle->pos.z = z;
|
||||
particle->unk38.x = particle->unk38.y = particle->unk38.z = 0.0f;
|
||||
particle->colourNum = colourNum;
|
||||
particle->flags = flags | 8;
|
||||
particle->timeout = -1;
|
||||
particle->id = D_801B9E40; /* should this be D_801B9E40++? */
|
||||
particle->shapePtr = NULL;
|
||||
particle->unkB0 = 1;
|
||||
return particle;
|
||||
}
|
||||
|
||||
/* 230DCC -> 230F48 */
|
||||
struct Connection *make_connection(struct ObjVertex *vtx1, struct ObjVertex *vtx2) {
|
||||
struct Connection *conn = gd_malloc_perm(sizeof(struct Connection));
|
||||
struct GdVec3f sp28;
|
||||
struct GdVec3f sp1C;
|
||||
|
||||
if (conn == NULL) {
|
||||
fatal_print("Cant allocate connection memory!");
|
||||
}
|
||||
conn->node1.vtx = vtx1;
|
||||
conn->node2.vtx = vtx2;
|
||||
d_stash_dynobj();
|
||||
set_cur_dynobj((struct GdObj *)vtx1);
|
||||
d_get_world_pos(&sp28);
|
||||
set_cur_dynobj((struct GdObj *)vtx2);
|
||||
d_get_world_pos(&sp1C);
|
||||
sp28.x -= sp1C.x;
|
||||
sp28.y -= sp1C.y;
|
||||
sp28.z -= sp1C.z;
|
||||
conn->unk24 = gd_vec3f_magnitude(&sp28);
|
||||
// Duplicate conditional. Possibly should've checked `vtx2`;
|
||||
// Also, this shouldn't be called with particle types...
|
||||
if (vtx1->header.type == OBJ_TYPE_PARTICLES && vtx1->header.type == OBJ_TYPE_PARTICLES) {
|
||||
if ((((struct ObjParticle *) vtx1)->flags & 4) && (((struct ObjParticle *) vtx2)->flags & 4)) {
|
||||
conn->unk28 |= 1;
|
||||
}
|
||||
}
|
||||
d_unstash_dynobj();
|
||||
return conn;
|
||||
}
|
||||
|
||||
/* 230F48 -> 2311D8 */
|
||||
int func_80182778(struct ObjParticle *ptc) {
|
||||
s32 sp4 = 0;
|
||||
|
||||
if (ptc->unk7C->animSeqNum == 2 && ptc->unk74 == 1) {
|
||||
while (D_801A81D4[sp4] != 0) {
|
||||
if (D_801A81D4[sp4] == ptc->unk7C->frame) {
|
||||
ptc->pos.x = D_801A81D4[sp4 + 1] * 10.0f;
|
||||
ptc->pos.y = D_801A81D4[sp4 + 2] * 10.0f;
|
||||
ptc->pos.z = D_801A81D4[sp4 + 3] * 10.0f;
|
||||
return TRUE;
|
||||
}
|
||||
sp4 += 4;
|
||||
}
|
||||
}
|
||||
if (ptc->unk7C->animSeqNum == 1 && ptc->unk74 == 1) {
|
||||
while (D_801A8238[sp4] != 0) {
|
||||
if (D_801A8238[sp4] == ptc->unk7C->frame) {
|
||||
ptc->pos.x = D_801A8238[sp4 + 1] * 10.0f;
|
||||
ptc->pos.y = D_801A8238[sp4 + 2] * 10.0f;
|
||||
ptc->pos.z = D_801A8238[sp4 + 3] * 10.0f;
|
||||
return TRUE;
|
||||
}
|
||||
sp4 += 4;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 2311D8 -> 231454 */
|
||||
void func_80182A08(struct ObjParticle *ptc, struct GdVec3f *b) {
|
||||
register struct ListNode *link;
|
||||
struct ObjParticle *sp20;
|
||||
|
||||
if (ptc->subParticlesGrp != NULL) {
|
||||
link = ptc->subParticlesGrp->firstMember;
|
||||
while (link != NULL) {
|
||||
// FIXME: types
|
||||
sp20 = (struct ObjParticle *) link->obj;
|
||||
if (sp20->timeout <= 0) {
|
||||
sp20->pos.x = ptc->pos.x;
|
||||
sp20->pos.y = ptc->pos.y;
|
||||
sp20->pos.z = ptc->pos.z;
|
||||
sp20->timeout = 12.0f - gd_rand_float() * 5.0f;
|
||||
do {
|
||||
sp20->unk38.x = gd_rand_float() * 50.0 - 25.0;
|
||||
sp20->unk38.y = gd_rand_float() * 50.0 - 25.0;
|
||||
sp20->unk38.z = gd_rand_float() * 50.0 - 25.0;
|
||||
} while (gd_vec3f_magnitude(&sp20->unk38) > 30.0);
|
||||
sp20->unk38.x += b->x;
|
||||
sp20->unk38.y += b->y;
|
||||
sp20->unk38.z += b->z;
|
||||
sp20->header.drawFlags &= ~OBJ_INVISIBLE;
|
||||
sp20->flags |= 8;
|
||||
}
|
||||
link = link->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 231454 -> 231D40; orig name: Unknown80182C84 */
|
||||
void move_particle(struct ObjParticle *ptc) {
|
||||
f32 sp7C;
|
||||
UNUSED u8 unused2[12];
|
||||
struct GdVec3f sp64;
|
||||
struct ObjParticle *sp60;
|
||||
UNUSED u8 unused1[4];
|
||||
s32 i;
|
||||
UNUSED u8 unused4[4];
|
||||
UNUSED u8 unused5[4];
|
||||
struct ObjCamera *sp4C;
|
||||
struct GdVec3f sp40;
|
||||
struct GdVec3f sp34;
|
||||
|
||||
if (ptc->flags & 2) {
|
||||
return;
|
||||
}
|
||||
if (!(ptc->flags & 8)) {
|
||||
return;
|
||||
}
|
||||
if (ptc->unk60 == 3) {
|
||||
sp40.x = -gViewUpdateCamera->unkE8[2][0] * 50.0f;
|
||||
sp40.y = -gViewUpdateCamera->unkE8[2][1] * 50.0f;
|
||||
sp40.z = gViewUpdateCamera->unkE8[2][2] * 50.0f;
|
||||
sp34.x = gViewUpdateCamera->unkE8[2][0] * -20.0f;
|
||||
sp34.y = gViewUpdateCamera->unkE8[2][1] * -20.0f;
|
||||
sp34.z = gViewUpdateCamera->unkE8[2][2] * -20.0f;
|
||||
}
|
||||
if (ptc->attachedToObj != NULL) {
|
||||
set_cur_dynobj(ptc->attachedToObj);
|
||||
if (ptc->unk60 == 3) {
|
||||
if (ptc->unk64 == 3) {
|
||||
sp4C = (struct ObjCamera *) ptc->attachedToObj;
|
||||
// Camera->unk18C = ObjView here
|
||||
if (sp4C->unk18C->pickedObj != NULL) {
|
||||
set_cur_dynobj(sp4C->unk18C->pickedObj);
|
||||
ptc->flags |= 0x20;
|
||||
; // needed to match
|
||||
} else {
|
||||
ptc->flags &= ~0x10;
|
||||
ptc->flags &= ~0x20;
|
||||
}
|
||||
}
|
||||
}
|
||||
d_get_world_pos(&sp64);
|
||||
ptc->pos.x = sp64.x;
|
||||
ptc->pos.y = sp64.y;
|
||||
ptc->pos.z = sp64.z;
|
||||
}
|
||||
sp7C = -0.4f;
|
||||
ptc->pos.x += ptc->unk38.x;
|
||||
ptc->pos.y += ptc->unk38.y;
|
||||
ptc->pos.z += ptc->unk38.z;
|
||||
if (ptc->flags & 1) {
|
||||
ptc->unk38.y += sp7C;
|
||||
}
|
||||
func_801838D0(ptc);
|
||||
switch (ptc->unkB0) {
|
||||
case 1:
|
||||
ptc->unkB0 = 2;
|
||||
if (ptc->unk60 == 3) {
|
||||
switch (ptc->unk64) {
|
||||
case 1:
|
||||
ptc->subParticlesGrp = make_group(0);
|
||||
for (i = 0; i < 50; i++) {
|
||||
sp60 = make_particle(1, -1, ptc->pos.x, ptc->pos.y, ptc->pos.z);
|
||||
sp60->shapePtr = ptc->shapePtr;
|
||||
addto_group(ptc->subParticlesGrp, &sp60->header);
|
||||
sp60->flags &= ~8;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
ptc->subParticlesGrp = make_group(0);
|
||||
for (i = 0; i < 30; i++) {
|
||||
sp60 = make_particle(1, -1, ptc->pos.x, ptc->pos.y, ptc->pos.z);
|
||||
sp60->shapePtr = ptc->shapePtr;
|
||||
addto_group(ptc->subParticlesGrp, &sp60->header);
|
||||
sp60->flags &= ~8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ptc->unk38.x *= 0.9;
|
||||
ptc->unk38.y *= 0.9;
|
||||
ptc->unk38.z *= 0.9;
|
||||
if (ptc->unk60 == 3) {
|
||||
switch (ptc->unk64) {
|
||||
case 1:
|
||||
if (func_80182778(ptc) && ptc->subParticlesGrp != NULL) {
|
||||
register struct ListNode *link;
|
||||
|
||||
if (ptc->unk80 != NULL) {
|
||||
ptc->unk80->unk3C |= 1;
|
||||
ptc->unk80->position.x = ptc->pos.x;
|
||||
ptc->unk80->position.y = ptc->pos.y;
|
||||
ptc->unk80->position.z = ptc->pos.z;
|
||||
}
|
||||
link = ptc->subParticlesGrp->firstMember;
|
||||
while (link != NULL) {
|
||||
struct ObjParticle *sp2C = (struct ObjParticle *) link->obj;
|
||||
|
||||
sp2C->pos.x = ptc->pos.x;
|
||||
sp2C->pos.y = ptc->pos.y;
|
||||
sp2C->pos.z = ptc->pos.z;
|
||||
sp2C->timeout = 20;
|
||||
do {
|
||||
sp2C->unk38.x = gd_rand_float() * 64.0 - 32.0;
|
||||
sp2C->unk38.y = gd_rand_float() * 64.0 - 32.0;
|
||||
sp2C->unk38.z = gd_rand_float() * 64.0 - 32.0;
|
||||
} while (gd_vec3f_magnitude(&sp2C->unk38) > 32.0);
|
||||
sp2C->unk30 = gd_rand_float() * 180.0f;
|
||||
sp2C->header.drawFlags &= ~OBJ_INVISIBLE;
|
||||
sp2C->flags |= 8;
|
||||
link = link->next;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if ((ptc->flags & 0x20) && !(ptc->flags & 0x10)) {
|
||||
func_80182A08(ptc, &sp40);
|
||||
ptc->flags |= 0x10;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
func_80182A08(ptc, &sp34);
|
||||
break;
|
||||
}
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_PARTICLES, (applyproc_t) move_particle, ptc->subParticlesGrp);
|
||||
}
|
||||
if (ptc->timeout >= 0) {
|
||||
if (ptc->timeout-- <= 0) {
|
||||
ptc->header.drawFlags |= OBJ_INVISIBLE;
|
||||
ptc->flags &= ~8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 231D40 -> 231D98; orig name: func_80183570 */
|
||||
void move_particles_in_grp(struct ObjGroup *group) {
|
||||
start_timer("particles");
|
||||
gGdSkinNet = NULL;
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_PARTICLES, (applyproc_t) move_particle, group);
|
||||
stop_timer("particles");
|
||||
}
|
||||
|
||||
#define ABS(x) ((x) < 0.0f ? -(x) : (x))
|
||||
/* 231D98 -> 232040 */
|
||||
void Unknown801835C8(struct ObjParticle *ptc) {
|
||||
struct GdVec3f sp54;
|
||||
f32 sp50;
|
||||
register struct ListNode *link;
|
||||
|
||||
gd_printf("p(%d)=", ptc->attachedObjsGrp->memberCount);
|
||||
link = ptc->attachedObjsGrp->firstMember;
|
||||
while (link != NULL) {
|
||||
// FIXME: types
|
||||
struct ObjParticle *sp48 = (struct ObjParticle *) link->obj;
|
||||
|
||||
sp54.x = sp48->pos.x - ptc->pos.x;
|
||||
sp54.y = sp48->pos.y - ptc->pos.y;
|
||||
sp54.z = sp48->pos.z - ptc->pos.z;
|
||||
sp50 = 150.0f - (ABS(sp54.x) + ABS(sp54.y) + ABS(sp54.z));
|
||||
gd_printf(",%f ", sp50);
|
||||
sp50 *= 0.00000005;
|
||||
ptc->pos.x += sp50 * sp54.x;
|
||||
ptc->pos.y += sp50 * sp54.y;
|
||||
ptc->pos.z += sp50 * sp54.z;
|
||||
sp48->pos.x -= sp50 * sp54.x;
|
||||
sp48->pos.y -= sp50 * sp54.y;
|
||||
sp48->pos.z -= sp50 * sp54.z;
|
||||
link = link->next;
|
||||
}
|
||||
gd_printf("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused
|
||||
*/
|
||||
void stub_particles_1(UNUSED s32 a) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused
|
||||
*/
|
||||
void stub_particles_2(UNUSED s32 a) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused
|
||||
*/
|
||||
void stub_particles_3(UNUSED s32 a, UNUSED s32 b, UNUSED s32 c) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused
|
||||
*/
|
||||
void stub_particles_4(UNUSED s32 a, UNUSED s32 b, UNUSED s32 c) {
|
||||
}
|
||||
|
||||
/* 2320A0 -> 2320D4; pad to 2320E0 */
|
||||
void func_801838D0(struct ObjParticle *ptc) {
|
||||
D_801B9E3C = ptc;
|
||||
if (ptc->pos.y < -15.0f) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef GD_PARTICLES_H
|
||||
#define GD_PARTICLES_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
|
||||
// functions
|
||||
void func_801823A0(struct ObjNet *net);
|
||||
struct ObjParticle *make_particle(u32 a, s32 b, f32 x, f32 y, f32 z);
|
||||
void move_particles_in_grp(struct ObjGroup *group);
|
||||
|
||||
#endif // GD_PARTICLES_H
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,126 @@
|
||||
#ifndef GD_RENDERER_H
|
||||
#define GD_RENDERER_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/os_cont.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
#include "macros.h"
|
||||
|
||||
// types
|
||||
/// Properties types used in [gd_setproperty](@ref gd_setproperty); most are stubbed out.
|
||||
enum GdProperty {
|
||||
GD_PROP_OVERLAY = 4,
|
||||
GD_PROP_LIGHTING = 11,
|
||||
GD_PROP_AMB_COLOUR = 12,
|
||||
GD_PROP_DIFUSE_COLOUR = 13,
|
||||
GD_PROP_LIGHT_DIR = 15,
|
||||
GD_PROP_CULLING = 16,
|
||||
GD_PROP_STUB17 = 17,
|
||||
GD_PROP_STUB18 = 18,
|
||||
GD_PROP_STUB19 = 19,
|
||||
GD_PROP_STUB20 = 20,
|
||||
GD_PROP_STUB21 = 21,
|
||||
GD_PROP_ZBUF_FN = 22
|
||||
};
|
||||
|
||||
enum GdSceneId {
|
||||
GD_SCENE_YOSHI, // create yoshi?
|
||||
GD_SCENE_YOSHI1, // destroy yoshi?
|
||||
GD_SCENE_REGULAR_MARIO,
|
||||
GD_SCENE_DIZZY_MARIO,
|
||||
GD_SCENE_CAR, // create car?
|
||||
GD_SCENE_CAR5 // destroy car?
|
||||
};
|
||||
|
||||
// data
|
||||
extern s32 gGdFrameBufNum;
|
||||
|
||||
// functions
|
||||
u32 get_alloc_mem_amt(void);
|
||||
s32 gd_get_ostime(void);
|
||||
f32 get_time_scale(void);
|
||||
f64 gd_sin_d(f64 x);
|
||||
f64 gd_cos_d(f64 x);
|
||||
f64 gd_sqrt_d(f64 x);
|
||||
void gd_printf(const char *format, ...);
|
||||
void gd_exit(UNUSED s32 code) NORETURN;
|
||||
void gd_free(void *ptr);
|
||||
void *gd_allocblock(u32 size);
|
||||
void *gd_malloc(u32 size, u8 perm);
|
||||
void *gd_malloc_perm(u32 size);
|
||||
void *gd_malloc_temp(u32 size);
|
||||
void draw_indexed_dl(s32 dlNum, s32 gfxIdx);
|
||||
void gd_add_to_heap(void *addr, u32 size);
|
||||
void gdm_init(void *blockpool, u32 size);
|
||||
void gdm_setup(void);
|
||||
void gdm_maketestdl(s32 id);
|
||||
void gd_vblank(void);
|
||||
void gd_copy_p1_contpad(OSContPad *p1cont);
|
||||
s32 gd_sfx_to_play(void);
|
||||
Gfx *gdm_gettestdl(s32 id);
|
||||
void gd_draw_rect(f32 ulx, f32 uly, f32 lrx, f32 lry);
|
||||
void gd_draw_border_rect(f32 ulx, f32 uly, f32 lrx, f32 lry);
|
||||
void gd_dl_set_fill(struct GdColour *colour);
|
||||
void stash_current_gddl(void);
|
||||
void pop_gddl_stash(void);
|
||||
s32 gd_startdisplist(s32 memarea);
|
||||
s32 gd_enddlsplist_parent(void);
|
||||
void gd_dl_load_matrix(Mat4f *mtx);
|
||||
void gd_dl_push_matrix(void);
|
||||
void gd_dl_pop_matrix(void);
|
||||
void gd_dl_mul_trans_matrix(f32 x, f32 y, f32 z);
|
||||
void gd_dl_load_trans_matrix(f32 x, f32 y, f32 z);
|
||||
void gd_dl_scale(f32 x, f32 y, f32 z);
|
||||
void func_8019F2C4(f32 arg0, s8 arg1);
|
||||
void gd_dl_lookat(struct ObjCamera *cam, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7);
|
||||
void check_tri_display(s32 vtxcount);
|
||||
Vtx *gd_dl_make_vertex(f32 x, f32 y, f32 z, f32 alpha);
|
||||
void func_8019FEF0(void);
|
||||
void gd_dl_make_triangle(f32 x1, f32 y1, f32 z1, f32 x2, f32 y2, f32 z2, f32 x3, f32 y3, f32 z3);
|
||||
void func_801A0038(void);
|
||||
void gd_dl_flush_vertices(void);
|
||||
void set_render_alpha(f32 arg0);
|
||||
void set_light_id(s32 index);
|
||||
void set_light_num(s32 n);
|
||||
s32 create_mtl_gddl(s32 mtlType);
|
||||
void branch_to_gddl(s32 dlNum);
|
||||
void gd_dl_hilite(s32, struct ObjCamera *, struct GdVec3f *, struct GdVec3f *, struct GdVec3f *, struct GdColour *);
|
||||
void gd_dl_hilite(s32 idx, struct ObjCamera *cam, UNUSED struct GdVec3f *arg2, UNUSED struct GdVec3f *arg3,
|
||||
struct GdVec3f *arg4, struct GdColour *colour);
|
||||
s32 gd_dl_material_lighting(s32 id, struct GdColour *colour, s32 material);
|
||||
void set_Vtx_norm_buf_1(struct GdVec3f *norm);
|
||||
void set_Vtx_norm_buf_2(struct GdVec3f *norm);
|
||||
void set_gd_mtx_parameters(s32 params);
|
||||
void gd_set_one_cycle(void);
|
||||
void gddl_is_loading_stub_dl(UNUSED s32 dlLoad);
|
||||
void start_view_dl(struct ObjView *view);
|
||||
void border_active_view(void);
|
||||
void gd_shading(s32 model);
|
||||
s32 gd_getproperty(s32 prop, UNUSED void *arg1);
|
||||
void gd_setproperty(enum GdProperty prop, f32 f1, f32 f2, f32 f3);
|
||||
void gd_create_ortho_matrix(f32 l, f32 r, f32 b, f32 t, f32 n, f32 f);
|
||||
void gd_create_perspective_matrix(f32 fovy, f32 aspect, f32 near, f32 far);
|
||||
s32 setup_view_buffers(const char *name, struct ObjView *view, UNUSED s32 ulx, UNUSED s32 uly,
|
||||
UNUSED s32 lrx, UNUSED s32 lry);
|
||||
void gd_init_controllers(void);
|
||||
void stub_renderer_6(struct GdObj *obj); //apply to OBJ_TYPE_VIEWS
|
||||
long defpup(UNUSED const char *menufmt, ...);
|
||||
void menu_cb_control_type(u32);
|
||||
void menu_cb_recalibrate_controller(u32);
|
||||
void func_801A4438(f32 x, f32 y, f32 z);
|
||||
void stub_renderer_10(u32 arg0);
|
||||
void stub_draw_label_text(UNUSED char *s);
|
||||
void set_active_view(struct ObjView *v);
|
||||
void func_801A520C(void);
|
||||
void gd_init(void);
|
||||
void stub_renderer_12(s8 *arg0); /* convert LE bytes to BE word? */
|
||||
void stub_renderer_13(UNUSED void *arg0);
|
||||
void stub_renderer_14(UNUSED s8 *arg0); /* convert LE bytes to BE f32? */
|
||||
void init_pick_buf(s16 *buf, s32 len);
|
||||
void store_in_pickbuf(s16 data);
|
||||
s32 get_cur_pickbuf_offset(UNUSED s16 *arg0);
|
||||
void set_vtx_tc_buf(f32 tcS, f32 tcT);
|
||||
struct GdObj *load_dynlist(struct DynList *dynlist);
|
||||
|
||||
#endif // GD_RENDERER_H
|
||||
@@ -0,0 +1,38 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "sfx.h"
|
||||
|
||||
static u32 sCurrSfx; // bitset of currently playing sound effects
|
||||
static u32 sPrevSfx; // bitset of sound effects that were playing on the previous frame
|
||||
|
||||
/**
|
||||
* Stops all sound effects
|
||||
*/
|
||||
void gd_reset_sfx(void) {
|
||||
sPrevSfx = GD_SFX_NONE;
|
||||
sCurrSfx = GD_SFX_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a bitset of the newly started sound effects.
|
||||
* This is used by geo_draw_mario_head_goddard to start new sounds.
|
||||
*/
|
||||
u32 gd_new_sfx_to_play(void) {
|
||||
return ~sPrevSfx & sCurrSfx;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called at the start of a frame.
|
||||
*/
|
||||
void gd_sfx_update(void) {
|
||||
sPrevSfx = sCurrSfx;
|
||||
sCurrSfx = GD_SFX_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks a sound effect to be played. This must be called repeatedly once per
|
||||
* frame to keep the sound effect playing.
|
||||
*/
|
||||
void gd_play_sfx(enum GdSfx sfx) {
|
||||
sCurrSfx |= sfx;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef GD_SFX_H
|
||||
#define GD_SFX_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
// Sfx for Mario Head Screen
|
||||
enum GdSfx {
|
||||
GD_SFX_NONE = 0x00,
|
||||
GD_SFX_HAND_APPEAR = 0x01,
|
||||
GD_SFX_HAND_DISAPPEAR = 0x02,
|
||||
GD_SFX_UNUSED_COIN = 0x04,
|
||||
GD_SFX_PINCH_FACE = 0x08,
|
||||
GD_SFX_PINCH_FACE_2 = 0x10,
|
||||
GD_SFX_LET_GO_FACE = 0x20,
|
||||
GD_SFX_CAM_ZOOM_IN = 0x40,
|
||||
GD_SFX_CAM_ZOOM_OUT = 0x80
|
||||
};
|
||||
|
||||
// functions
|
||||
void gd_reset_sfx(void);
|
||||
u32 gd_new_sfx_to_play(void);
|
||||
void gd_sfx_update(void);
|
||||
void gd_play_sfx(enum GdSfx sfx);
|
||||
|
||||
#endif // GD_SFX_H
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,33 @@
|
||||
#ifndef GD_SHAPE_HELPER_H
|
||||
#define GD_SHAPE_HELPER_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
|
||||
// data
|
||||
extern struct ObjGroup *gMarioFaceGrp;
|
||||
extern struct ObjShape *gSpotShape;
|
||||
extern struct ObjShape *gShapeRedSpark;
|
||||
extern struct ObjShape *gShapeSilverSpark;
|
||||
extern struct ObjShape *gShapeRedStar;
|
||||
extern struct ObjShape *gShapeSilverStar;
|
||||
|
||||
// functions
|
||||
void calc_face_normal(struct ObjFace *face);
|
||||
struct ObjVertex *gd_make_vertex(f32 x, f32 y, f32 z);
|
||||
void add_3_vtx_to_face(struct ObjFace *face, struct ObjVertex *vtx1, struct ObjVertex *vtx2, struct ObjVertex *vtx3);
|
||||
struct ObjShape *make_shape(s32 flag, const char *name);
|
||||
void scale_verts_in_shape(struct ObjShape *shape, f32 x, f32 y, f32 z);
|
||||
struct ObjNet *make_netfromshape(struct ObjShape *shape);
|
||||
void animate_mario_head_gameover(struct ObjAnimator *self);
|
||||
void animate_mario_head_normal(struct ObjAnimator *self);
|
||||
s32 load_mario_head(void (*aniFn)(struct ObjAnimator *));
|
||||
void load_shapes2(void);
|
||||
|
||||
// see bad_declarations.h
|
||||
#ifndef GD_USE_BAD_DECLARATIONS
|
||||
struct ObjFace* make_face_with_colour(f32 r, f32 g, f32 b);
|
||||
#endif
|
||||
|
||||
#endif // GD_SHAPE_HELPER_H
|
||||
@@ -0,0 +1,528 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
#include "prevent_bss_reordering.h"
|
||||
#endif
|
||||
|
||||
#include "debug_utils.h"
|
||||
#include "gd_main.h"
|
||||
#include "gd_math.h"
|
||||
#include "gd_types.h"
|
||||
#include "joints.h"
|
||||
#include "macros.h"
|
||||
#include "objects.h"
|
||||
#include "particles.h"
|
||||
#include "renderer.h"
|
||||
#include "skin.h"
|
||||
#include "skin_movement.h"
|
||||
|
||||
// bss
|
||||
struct ObjNet *gGdSkinNet; // @ 801BAAF0
|
||||
|
||||
static s32 D_801BAAF4;
|
||||
static s32 sNetCount; // @ 801BAAF8
|
||||
|
||||
/* 2406E0 -> 240894 */
|
||||
void compute_net_bounding_box(struct ObjNet *net) {
|
||||
reset_bounding_box();
|
||||
if (net->unk1D0 != NULL) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_ALL, (applyproc_t) add_obj_pos_to_bounding_box, net->unk1D0);
|
||||
}
|
||||
if (net->unk1C8 != NULL) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_ALL, (applyproc_t) add_obj_pos_to_bounding_box, net->unk1C8);
|
||||
}
|
||||
gSomeBoundingBox.minX *= net->scale.x;
|
||||
gSomeBoundingBox.maxX *= net->scale.x;
|
||||
gSomeBoundingBox.minY *= net->scale.y;
|
||||
gSomeBoundingBox.maxY *= net->scale.y;
|
||||
gSomeBoundingBox.minZ *= net->scale.z;
|
||||
gSomeBoundingBox.maxZ *= net->scale.z;
|
||||
|
||||
net->boundingBox.minX = gSomeBoundingBox.minX;
|
||||
net->boundingBox.minY = gSomeBoundingBox.minY;
|
||||
net->boundingBox.minZ = gSomeBoundingBox.minZ;
|
||||
net->boundingBox.maxX = gSomeBoundingBox.maxX;
|
||||
net->boundingBox.maxY = gSomeBoundingBox.maxY;
|
||||
net->boundingBox.maxZ = gSomeBoundingBox.maxZ;
|
||||
}
|
||||
|
||||
/* 240894 -> 240A64; orig name: func_801920C4 */
|
||||
void reset_net(struct ObjNet *net) {
|
||||
struct ObjGroup *grp;
|
||||
|
||||
printf("reset_net %d\n", net->id);
|
||||
|
||||
net->worldPos.x = net->initPos.x;
|
||||
net->worldPos.y = net->initPos.y;
|
||||
net->worldPos.z = net->initPos.z;
|
||||
net->velocity.x = net->velocity.y = net->velocity.z = 0.0f;
|
||||
net->torque.x = net->torque.y = net->torque.z = 0.0f;
|
||||
|
||||
compute_net_bounding_box(net);
|
||||
gd_print_vec("net scale: ", &net->scale);
|
||||
gd_print_bounding_box("net box: ", &net->boundingBox);
|
||||
|
||||
gGdSkinNet = net;
|
||||
D_801BAAF4 = 0;
|
||||
gd_set_identity_mat4(&net->mat168);
|
||||
gd_set_identity_mat4(&net->matE8);
|
||||
gd_rot_mat_about_vec(&net->matE8, &net->unk68); // set rot mtx to initial rotation?
|
||||
gd_add_vec3f_to_mat4f_offset(&net->matE8, &net->worldPos); // set to initial position?
|
||||
gd_copy_mat4f(&net->matE8, &net->mat128);
|
||||
|
||||
if ((grp = net->unk1C8) != NULL) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) reset_joint, grp);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) func_80191220, grp);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_BONES, (applyproc_t) func_8018FB58, grp);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_BONES, (applyproc_t) func_8018FA68, grp);
|
||||
}
|
||||
}
|
||||
|
||||
/* 240A64 -> 240ACC */
|
||||
void func_80192294(struct ObjNet *net) {
|
||||
UNUSED s32 sp1C = 0;
|
||||
|
||||
if (net->attachedToObj == NULL) {
|
||||
restart_timer("childpos");
|
||||
sp1C = transform_child_objects_recursive(&net->header, NULL);
|
||||
split_timer("childpos");
|
||||
}
|
||||
}
|
||||
|
||||
/* 240ACC -> 240B84 */
|
||||
void func_801922FC(struct ObjNet *net) {
|
||||
struct ObjGroup *group; // 24
|
||||
UNUSED u32 pad18[2];
|
||||
|
||||
gGdSkinNet = net;
|
||||
// TODO: netype constants?
|
||||
if (net->netType == 4) {
|
||||
if (net->shapePtr != NULL) {
|
||||
D_801B9E38 = &net->mat128;
|
||||
scale_verts(net->shapePtr->vtxGroup);
|
||||
}
|
||||
if ((group = net->unk1C8) != NULL) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) reset_joint_weights, group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 240B84 -> 240CF8 */
|
||||
struct ObjNet *make_net(UNUSED s32 a0, struct ObjShape *shapedata, struct ObjGroup *a2,
|
||||
struct ObjGroup *a3, struct ObjGroup *a4) {
|
||||
struct ObjNet *net;
|
||||
|
||||
net = (struct ObjNet *) make_object(OBJ_TYPE_NETS);
|
||||
gd_set_identity_mat4(&net->mat128);
|
||||
net->initPos.x = net->initPos.y = net->initPos.z = 0.0f;
|
||||
net->id = ++sNetCount;
|
||||
net->scale.x = net->scale.y = net->scale.z = 1.0f;
|
||||
net->shapePtr = shapedata;
|
||||
net->unk1C8 = a2;
|
||||
net->unk1CC = a3;
|
||||
net->unk1D0 = a4;
|
||||
net->netType = 0;
|
||||
net->ctrlType = 0;
|
||||
net->unk21C = NULL;
|
||||
net->unk3C = 1;
|
||||
net->colourNum = 0;
|
||||
net->skinGrp = NULL;
|
||||
reset_net(net);
|
||||
|
||||
return net;
|
||||
}
|
||||
|
||||
/* 240CF8 -> 240E74 */
|
||||
void func_80192528(struct ObjNet *net) {
|
||||
net->unusedForce.x = net->unusedForce.y = net->unusedForce.z = 0.0f;
|
||||
net->collDisp.x = net->collDisp.y = net->collDisp.z = 0.0f;
|
||||
net->collTorque.x = net->collTorque.y = net->collTorque.z = 0.0f;
|
||||
net->unusedCollDispOff.x = net->unusedCollDispOff.y = net->unusedCollDispOff.z = 0.0f;
|
||||
net->unusedCollMaxD = 0.0f;
|
||||
|
||||
gGdCounter.ctr0 = 0;
|
||||
gGdCounter.ctr1 = 0;
|
||||
D_801B9E18.x = 0.0f;
|
||||
D_801B9E18.y = 0.0f;
|
||||
D_801B9E18.z = 0.0f;
|
||||
D_801B9E28.x = 0.0f;
|
||||
D_801B9E28.y = 0.0f;
|
||||
D_801B9E28.z = 0.0f;
|
||||
D_801B9E34 = 0.0f;
|
||||
|
||||
if (net->flags & 0x1) {
|
||||
net->velocity.y += -4.0; //? 4.0f
|
||||
}
|
||||
|
||||
net->worldPos.x += net->velocity.x / 1.0f;
|
||||
net->worldPos.y += net->velocity.y / 1.0f;
|
||||
net->worldPos.z += net->velocity.z / 1.0f;
|
||||
}
|
||||
|
||||
/* 240E74 -> 2412A0 */
|
||||
void collision_something_801926A4(struct ObjNet *net) {
|
||||
if (gGdCounter.ctr1 != 0) {
|
||||
if (D_801B9E34 != 0.0f) {
|
||||
D_801B9E28.x /= D_801B9E34;
|
||||
D_801B9E28.y /= D_801B9E34;
|
||||
D_801B9E28.z /= D_801B9E34;
|
||||
}
|
||||
|
||||
D_801B9E28.x *= 1.0 / gGdCounter.ctr1; // !1.0f
|
||||
D_801B9E28.y *= 1.0 / gGdCounter.ctr1; // !1.0f
|
||||
D_801B9E28.z *= 1.0 / gGdCounter.ctr1; // !1.0f
|
||||
D_801B9E18.x *= 1.0 / gGdCounter.ctr1; // !1.0f
|
||||
D_801B9E18.y *= 1.0 / gGdCounter.ctr1; // !1.0f
|
||||
D_801B9E18.z *= 1.0 / gGdCounter.ctr1; // !1.0f
|
||||
|
||||
func_8017E584(gGdSkinNet, &D_801B9E28, &D_801B9E18);
|
||||
func_8017E838(gGdSkinNet, &D_801B9E28, &D_801B9E18);
|
||||
}
|
||||
|
||||
net->torque.x += net->collTorque.x;
|
||||
net->torque.y += net->collTorque.y;
|
||||
net->torque.z += net->collTorque.z;
|
||||
net->collDisp.x *= 1.0; // 1.0f;
|
||||
net->collDisp.y *= 1.0; // 1.0f;
|
||||
net->collDisp.z *= 1.0; // 1.0f;
|
||||
net->velocity.x += net->collDisp.x;
|
||||
net->velocity.y += net->collDisp.y;
|
||||
net->velocity.z += net->collDisp.z;
|
||||
net->worldPos.x += net->collDisp.x;
|
||||
net->worldPos.y += net->collDisp.y;
|
||||
net->worldPos.z += net->collDisp.z;
|
||||
func_8017E9EC(net);
|
||||
|
||||
net->torque.x *= 0.98; //? 0.98f
|
||||
net->torque.z *= 0.98; //? 0.98f
|
||||
net->torque.y *= 0.9; //? 0.9f
|
||||
}
|
||||
|
||||
/* 2412A0 -> 24142C; not called */
|
||||
void func_80192AD0(struct ObjNet *net) {
|
||||
UNUSED u32 pad64;
|
||||
struct ObjGroup *sp60;
|
||||
UNUSED u32 pad20[0x10];
|
||||
UNUSED u32 sp1C;
|
||||
struct ObjNet *sp18;
|
||||
|
||||
if ((sp60 = net->unk1C8) == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
sp18 = net->unk1F0;
|
||||
net->worldPos.x = net->unk1F4.x;
|
||||
net->worldPos.y = net->unk1F4.y;
|
||||
net->worldPos.z = net->unk1F4.z;
|
||||
gd_rotate_and_translate_vec3f(&net->worldPos, &sp18->mat128);
|
||||
|
||||
net->worldPos.x += net->unk1F0->worldPos.x;
|
||||
net->worldPos.y += net->unk1F0->worldPos.y;
|
||||
net->worldPos.z += net->unk1F0->worldPos.z;
|
||||
net->unk200.x = 0.0f;
|
||||
net->unk200.y = 10.0f;
|
||||
net->unk200.z = -4.0f;
|
||||
gd_rotate_and_translate_vec3f(&net->unk200, &sp18->mat128);
|
||||
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) func_80191824, sp60);
|
||||
func_80191E88(sp60);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_BONES, (applyproc_t) func_8018F328, net->unk20C);
|
||||
}
|
||||
|
||||
/* 24142C -> 24149C; orig name: func_80192C5C */
|
||||
void move_bonesnet(struct ObjNet *net) {
|
||||
struct ObjGroup *sp24;
|
||||
UNUSED u32 pad18[3];
|
||||
|
||||
imin("move_bonesnet");
|
||||
gd_set_identity_mat4(&D_801B9DC8);
|
||||
if ((sp24 = net->unk1C8) != NULL) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) func_801913C0, sp24);
|
||||
}
|
||||
imout();
|
||||
}
|
||||
|
||||
/* 24149C -> 241768 */
|
||||
void func_80192CCC(struct ObjNet *net) {
|
||||
Mat4f sp38;
|
||||
UNUSED struct GdControl *ctrl; // 34
|
||||
struct ObjGroup *group; // 30
|
||||
struct GdVec3f sp24;
|
||||
|
||||
ctrl = &gGdCtrl;
|
||||
if (gGdCtrl.unk2C != NULL) {
|
||||
menu_cb_reset_positions();
|
||||
}
|
||||
gd_set_identity_mat4(&D_801B9DC8);
|
||||
|
||||
if (gGdCtrl.unk30 != NULL) {
|
||||
sp24.x = net->mat128[0][0];
|
||||
sp24.y = net->mat128[0][1];
|
||||
sp24.z = net->mat128[0][2];
|
||||
gd_create_rot_mat_angular(&sp38, &sp24, 4.0f);
|
||||
gd_mult_mat4f(&sp38, &D_801B9DC8, &D_801B9DC8);
|
||||
net->torque.x = net->torque.y = net->torque.z = 0.0f;
|
||||
}
|
||||
|
||||
if (gGdCtrl.unk28 != NULL) {
|
||||
sp24.x = net->mat128[0][0];
|
||||
sp24.y = net->mat128[0][1];
|
||||
sp24.z = net->mat128[0][2];
|
||||
gd_create_rot_mat_angular(&sp38, &sp24, -4.0f);
|
||||
gd_mult_mat4f(&sp38, &D_801B9DC8, &D_801B9DC8);
|
||||
net->torque.x = net->torque.y = net->torque.z = 0.0f;
|
||||
}
|
||||
|
||||
if (gGdCtrl.newStartPress) {
|
||||
return;
|
||||
} // start was pressed
|
||||
|
||||
switch (net->ctrlType) {
|
||||
case 2:
|
||||
break;
|
||||
}
|
||||
|
||||
func_80192528(net);
|
||||
if ((group = net->unk1C8) != NULL) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) func_80191220, group);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) func_801913F0, group);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) stub_joints_2, group);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) func_801911A8, group);
|
||||
}
|
||||
|
||||
collision_something_801926A4(net);
|
||||
gd_mult_mat4f(&net->mat128, &D_801B9DC8, &net->mat128);
|
||||
if (group != NULL) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) func_801913C0, group);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_BONES, (applyproc_t) func_8018FA68, group);
|
||||
}
|
||||
}
|
||||
|
||||
/* 241768 -> 241AB4; orig name: func_80192F98 */
|
||||
void convert_gd_verts_to_Vn(struct ObjGroup *grp) {
|
||||
UNUSED u8 pad[0x40 - 0x2c];
|
||||
Vtx *vn; // 28
|
||||
u8 nx, ny, nz; // 24, 25, 26
|
||||
UNUSED u32 pad20;
|
||||
register struct VtxLink *vtxlink; // a1
|
||||
#ifndef GBI_FLOATS
|
||||
register s16 *vnPos; // a2
|
||||
#endif
|
||||
register s16 x; // a3
|
||||
register s16 y; // t0
|
||||
register s16 z; // t1
|
||||
register struct ObjVertex *vtx; // t2
|
||||
register struct ListNode *link; // t3
|
||||
struct GdObj *obj; // sp4
|
||||
|
||||
for (link = grp->firstMember; link != NULL; link = link->next) {
|
||||
obj = link->obj;
|
||||
vtx = (struct ObjVertex *) obj;
|
||||
x = (s16) vtx->pos.x;
|
||||
y = (s16) vtx->pos.y;
|
||||
z = (s16) vtx->pos.z;
|
||||
|
||||
nx = (u8)(vtx->normal.x * 255.0f);
|
||||
ny = (u8)(vtx->normal.y * 255.0f);
|
||||
nz = (u8)(vtx->normal.z * 255.0f);
|
||||
|
||||
for (vtxlink = vtx->gbiVerts; vtxlink != NULL; vtxlink = vtxlink->prev) {
|
||||
#ifndef GBI_FLOATS
|
||||
vnPos = vtxlink->data->n.ob;
|
||||
vn = vtxlink->data;
|
||||
*vnPos++ = x;
|
||||
*vnPos++ = y;
|
||||
*vnPos++ = z;
|
||||
#else
|
||||
vn = vtxlink->data;
|
||||
vn->n.ob[0] = x;
|
||||
vn->n.ob[1] = y;
|
||||
vn->n.ob[2] = z;
|
||||
#endif
|
||||
vn->n.n[0] = nx;
|
||||
vn->n.n[1] = ny;
|
||||
vn->n.n[2] = nz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 241AB4 -> 241BCC; orig name: func_801932E4 */
|
||||
void convert_gd_verts_to_Vtx(struct ObjGroup *grp) {
|
||||
UNUSED u32 pad24[6];
|
||||
register struct VtxLink *vtxlink; // a1
|
||||
#ifndef GBI_FLOATS
|
||||
register s16 *vtxcoords; // a2
|
||||
#endif
|
||||
register s16 x; // a3
|
||||
register s16 y; // t0
|
||||
register s16 z; // t1
|
||||
register struct ObjVertex *vtx; // t2
|
||||
register struct ListNode *link; // t3
|
||||
struct GdObj *obj; // sp4
|
||||
|
||||
for (link = grp->firstMember; link != NULL; link = link->next) {
|
||||
obj = link->obj;
|
||||
vtx = (struct ObjVertex *) obj;
|
||||
x = (s16) vtx->pos.x;
|
||||
y = (s16) vtx->pos.y;
|
||||
z = (s16) vtx->pos.z;
|
||||
|
||||
for (vtxlink = vtx->gbiVerts; vtxlink != NULL; vtxlink = vtxlink->prev) {
|
||||
#ifndef GBI_FLOATS
|
||||
vtxcoords = vtxlink->data->v.ob;
|
||||
vtxcoords[0] = x;
|
||||
vtxcoords[1] = y;
|
||||
vtxcoords[2] = z;
|
||||
#else
|
||||
vtxlink->data->v.ob[0] = x;
|
||||
vtxlink->data->v.ob[1] = y;
|
||||
vtxlink->data->v.ob[2] = z;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 241BCC -> 241CA0; orig name: Proc801933FC */
|
||||
void convert_net_verts(struct ObjNet *net) {
|
||||
if (net->shapePtr != NULL) {
|
||||
if (net->shapePtr->unk30) {
|
||||
convert_gd_verts_to_Vn(net->shapePtr->vtxGroup);
|
||||
}
|
||||
}
|
||||
|
||||
switch (net->netType) {
|
||||
case 2:
|
||||
if (net->shapePtr != NULL) {
|
||||
convert_gd_verts_to_Vtx(net->shapePtr->scaledVtxGroup);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* 241CA0 -> 241D6C */
|
||||
static void move_joints_in_net(struct ObjNet *net) {
|
||||
struct ObjGroup *grp; // 2c
|
||||
register struct ListNode *link; // s0
|
||||
struct GdObj *obj; // 24
|
||||
|
||||
if ((grp = net->unk1C8) != NULL) {
|
||||
for (link = grp->firstMember; link != NULL; link = link->next) {
|
||||
obj = link->obj;
|
||||
switch (obj->type) {
|
||||
case OBJ_TYPE_JOINTS:
|
||||
if (((struct ObjJoint *) obj)->updateFunc != NULL) {
|
||||
(*((struct ObjJoint *) obj)->updateFunc)((struct ObjJoint *) obj);
|
||||
}
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 241D6C -> 241E94; orig name: func_8019359C */
|
||||
void move_net(struct ObjNet *net) {
|
||||
gGdSkinNet = net;
|
||||
|
||||
switch (net->netType) {
|
||||
case 1:
|
||||
break;
|
||||
case 7:
|
||||
func_80192CCC(net);
|
||||
break;
|
||||
case 4:
|
||||
restart_timer("move_bones");
|
||||
move_bonesnet(net);
|
||||
split_timer("move_bones");
|
||||
break;
|
||||
case 2:
|
||||
restart_timer("move_skin");
|
||||
move_skin(net);
|
||||
split_timer("move_skin");
|
||||
break;
|
||||
case 3:
|
||||
move_joints_in_net(net);
|
||||
break;
|
||||
case 5:
|
||||
func_801823A0(net);
|
||||
break;
|
||||
case 6:
|
||||
break;
|
||||
default:
|
||||
fatal_printf("move_net(%d(%d)): Undefined net type", net->id, net->netType);
|
||||
}
|
||||
}
|
||||
|
||||
/* 241E94 -> 241F0C; orig name: func_801936C4 */
|
||||
void move_nets(struct ObjGroup *group) {
|
||||
imin("move_nets");
|
||||
restart_timer("move_nets");
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_NETS, (applyproc_t) func_80192294, group);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_NETS, (applyproc_t) move_net, group);
|
||||
split_timer("move_nets");
|
||||
imout();
|
||||
}
|
||||
|
||||
/* 241F0C -> 242018 */
|
||||
void func_8019373C(struct ObjNet *net) {
|
||||
register struct ListNode *link;
|
||||
struct ObjVertex *vtx;
|
||||
|
||||
switch (net->netType) {
|
||||
case 2:
|
||||
if (net->shapePtr != NULL) {
|
||||
net->shapePtr->scaledVtxGroup = make_group(0);
|
||||
for (link = net->shapePtr->vtxGroup->firstMember; link != NULL; link = link->next) {
|
||||
vtx = (struct ObjVertex *) link->obj;
|
||||
if (vtx->scaleFactor != 1.0) {
|
||||
addto_group(net->shapePtr->scaledVtxGroup, &vtx->header);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* 242018 -> 24208C */
|
||||
void func_80193848(struct ObjGroup *group) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_NETS, (applyproc_t) reset_net, group);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_NETS, (applyproc_t) func_80192294, group);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_NETS, (applyproc_t) func_801922FC, group);
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_NETS, (applyproc_t) func_8019373C, group);
|
||||
}
|
||||
|
||||
/* 24208C -> 2422E0; not called; orig name: func_801938BC */
|
||||
void gd_print_net(struct ObjNet *net) {
|
||||
gd_printf("Flags:%x\n", net->flags);
|
||||
gd_print_vec("World:", &net->worldPos);
|
||||
gd_print_vec("Force:", &net->unusedForce);
|
||||
gd_print_vec("Vel:", &net->velocity);
|
||||
gd_print_vec("Rot:", &net->rotation);
|
||||
gd_print_vec("CollDisp:", &net->collDisp);
|
||||
gd_print_vec("CollTorque:", &net->collTorque);
|
||||
gd_print_vec("CollTorqueL:", &net->unusedCollTorqueL);
|
||||
gd_print_vec("CollTorqueD:", &net->unusedCollTorqueD);
|
||||
gd_print_vec("Torque:", &net->torque);
|
||||
gd_print_vec("CofG:", &net->centerOfGravity);
|
||||
gd_print_bounding_box("BoundBox:", &net->boundingBox);
|
||||
gd_print_vec("CollDispOff:", &net->unusedCollDispOff);
|
||||
gd_printf("CollMaxD: %f\n", net->unusedCollMaxD);
|
||||
gd_printf("MaxRadius: %f\n", net->maxRadius);
|
||||
gd_print_mtx("Matrix:", &net->mat128);
|
||||
if (net->shapePtr != NULL) {
|
||||
gd_printf("ShapePtr: %x (%s)\n", (u32) (uintptr_t) net->shapePtr, net->shapePtr->name);
|
||||
} else {
|
||||
gd_printf("ShapePtr: NULL\n");
|
||||
}
|
||||
gd_print_vec("Scale:", &net->scale);
|
||||
gd_printf("Mass: %f\n", net->unusedMass);
|
||||
gd_printf("NumModes: %d\n", net->numModes);
|
||||
gd_printf("NodeGroup: %x\n", (u32) (uintptr_t) net->unk1C8);
|
||||
gd_printf("PlaneGroup: %x\n", (u32) (uintptr_t) net->unk1CC);
|
||||
gd_printf("VertexGroup: %x\n", (u32) (uintptr_t) net->unk1D0);
|
||||
}
|
||||
|
||||
/* 2422E0 -> 2422F8; orig name: func_80193B10 */
|
||||
void reset_net_count(void) {
|
||||
sNetCount = 0;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef GD_SKIN_H
|
||||
#define GD_SKIN_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "gd_types.h"
|
||||
|
||||
// bss
|
||||
extern struct ObjNet* gGdSkinNet; // @ 801BAAF0
|
||||
|
||||
// functions
|
||||
void reset_net(struct ObjNet *net);
|
||||
struct ObjNet *make_net(UNUSED s32 a0, struct ObjShape *shapedata, struct ObjGroup *a2,
|
||||
struct ObjGroup *a3, struct ObjGroup *a4);
|
||||
void convert_net_verts(struct ObjNet *net);
|
||||
void move_nets(struct ObjGroup *group);
|
||||
void func_80193848(struct ObjGroup *group);
|
||||
void reset_net_count(void);
|
||||
|
||||
#endif // GD_SKIN_H
|
||||
@@ -0,0 +1,158 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "debug_utils.h"
|
||||
#include "gd_math.h"
|
||||
#include "gd_types.h"
|
||||
#include "joints.h"
|
||||
#include "macros.h"
|
||||
#include "objects.h"
|
||||
#include "skin.h"
|
||||
#include "skin_movement.h"
|
||||
|
||||
/* bss */
|
||||
struct ObjWeight *sResetCurWeight;
|
||||
static Mat4f D_801B9EA8; // TODO: rename to sHead2Mtx?
|
||||
static struct ObjJoint *D_801B9EE8; // set but not used
|
||||
|
||||
/* @ 22FDB0 for 0x180 */
|
||||
void func_801815E0(Mat4f *mtx) {
|
||||
struct GdVec3f scratchVec;
|
||||
|
||||
scratchVec.x = (*mtx)[0][0];
|
||||
scratchVec.y = (*mtx)[0][1];
|
||||
scratchVec.z = (*mtx)[0][2];
|
||||
gd_normalize_vec3f(&scratchVec);
|
||||
(*mtx)[0][0] = scratchVec.x;
|
||||
(*mtx)[0][1] = scratchVec.y;
|
||||
(*mtx)[0][2] = scratchVec.z;
|
||||
|
||||
scratchVec.x = (*mtx)[1][0];
|
||||
scratchVec.y = (*mtx)[1][1];
|
||||
scratchVec.z = (*mtx)[1][2];
|
||||
gd_normalize_vec3f(&scratchVec);
|
||||
(*mtx)[1][0] = scratchVec.x;
|
||||
(*mtx)[1][1] = scratchVec.y;
|
||||
(*mtx)[1][2] = scratchVec.z;
|
||||
|
||||
scratchVec.x = (*mtx)[2][0];
|
||||
scratchVec.y = (*mtx)[2][1];
|
||||
scratchVec.z = (*mtx)[2][2];
|
||||
gd_normalize_vec3f(&scratchVec);
|
||||
(*mtx)[2][0] = scratchVec.x;
|
||||
(*mtx)[2][1] = scratchVec.y;
|
||||
(*mtx)[2][2] = scratchVec.z;
|
||||
}
|
||||
|
||||
/* @ 22FF30 for 0xDC */
|
||||
/* called with ObjNext->unk1A8 (variable obj ptr?) ->unk20 or ->unk24 ptr*/
|
||||
// TODO: figure out the proper object type for a0
|
||||
void scale_verts(struct ObjGroup *a0) {
|
||||
register f32 sp1C;
|
||||
register struct ListNode *link;
|
||||
struct ObjVertex *vtx;
|
||||
|
||||
for (link = a0->firstMember; link != NULL; link = link->next) {
|
||||
vtx = (struct ObjVertex *) link->obj;
|
||||
|
||||
if ((sp1C = vtx->scaleFactor) != 0.0f) {
|
||||
vtx->pos.x = vtx->initPos.x * sp1C;
|
||||
vtx->pos.y = vtx->initPos.y * sp1C;
|
||||
vtx->pos.z = vtx->initPos.z * sp1C;
|
||||
} else {
|
||||
vtx->pos.x = vtx->pos.y = vtx->pos.z = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* @ 23000C for 0x58; orig name: func8018183C*/
|
||||
void move_skin(struct ObjNet *net) {
|
||||
UNUSED u8 pad1C[8];
|
||||
|
||||
if (net->shapePtr != NULL) {
|
||||
scale_verts(net->shapePtr->scaledVtxGroup);
|
||||
}
|
||||
}
|
||||
|
||||
/* @ 230064 for 0x13C*/
|
||||
void func_80181894(struct ObjJoint *joint) {
|
||||
register struct ObjGroup *weightGroup; // baseGroup? weights Only?
|
||||
struct GdVec3f stackVec;
|
||||
register struct ObjWeight *curWeight;
|
||||
register struct ObjVertex *connectedVtx;
|
||||
register struct ListNode *link;
|
||||
register f32 scaleFactor;
|
||||
struct GdObj *linkedObj;
|
||||
|
||||
weightGroup = joint->weightGrp;
|
||||
if (weightGroup != NULL) {
|
||||
for (link = weightGroup->firstMember; link != NULL; link = link->next) {
|
||||
linkedObj = link->obj;
|
||||
curWeight = (struct ObjWeight *) linkedObj;
|
||||
|
||||
if (curWeight->weightVal > 0.0) //? 0.0f
|
||||
{
|
||||
stackVec.x = curWeight->vec20.x;
|
||||
stackVec.y = curWeight->vec20.y;
|
||||
stackVec.z = curWeight->vec20.z;
|
||||
gd_rotate_and_translate_vec3f(&stackVec, &joint->matE8);
|
||||
|
||||
connectedVtx = curWeight->vtx;
|
||||
scaleFactor = curWeight->weightVal;
|
||||
|
||||
connectedVtx->pos.x += stackVec.x * scaleFactor;
|
||||
connectedVtx->pos.y += stackVec.y * scaleFactor;
|
||||
connectedVtx->pos.z += stackVec.z * scaleFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* @ 2301A0 for 0x110 */
|
||||
void reset_weight_vtx(struct ObjVertex *vtx) {
|
||||
struct GdVec3f localVec;
|
||||
UNUSED u8 pad24[0x10];
|
||||
|
||||
if (sResetWeightVtxNum++ == sResetCurWeight->vtxId) { // found matching vertex
|
||||
sResetCurWeight->vtx = vtx;
|
||||
localVec.x = vtx->pos.x;
|
||||
localVec.y = vtx->pos.y;
|
||||
localVec.z = vtx->pos.z;
|
||||
|
||||
gd_rotate_and_translate_vec3f(&localVec, &D_801B9EA8);
|
||||
sResetCurWeight->vec20.x = localVec.x;
|
||||
sResetCurWeight->vec20.y = localVec.y;
|
||||
sResetCurWeight->vec20.z = localVec.z;
|
||||
|
||||
vtx->scaleFactor -= sResetCurWeight->weightVal;
|
||||
}
|
||||
}
|
||||
|
||||
void reset_weight(struct ObjWeight *weight) {
|
||||
UNUSED u32 vtxCount;
|
||||
UNUSED u32 pad20;
|
||||
struct ObjGroup *skinGroup;
|
||||
|
||||
sResetCurWeight = weight;
|
||||
sResetWeightVtxNum = 0;
|
||||
if ((skinGroup = gGdSkinNet->skinGrp) != NULL) {
|
||||
// Go through every vertex in the skin group, and reset the weight if the vertex is managed by the weight
|
||||
vtxCount =
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_VERTICES, (applyproc_t) reset_weight_vtx, skinGroup);
|
||||
} else {
|
||||
fatal_printf("reset_weight(): Skin net has no SkinGroup");
|
||||
}
|
||||
|
||||
if (weight->vtx == NULL) {
|
||||
fatal_printf("reset_weight(): Skin vertex ID %d not found", weight->vtxId);
|
||||
}
|
||||
}
|
||||
|
||||
void reset_joint_weights(struct ObjJoint *joint) {
|
||||
struct ObjGroup *group;
|
||||
|
||||
gd_inverse_mat4f(&joint->matE8, &D_801B9EA8);
|
||||
D_801B9EE8 = joint;
|
||||
if ((group = joint->weightGrp) != NULL) {
|
||||
apply_to_obj_types_in_group(OBJ_TYPE_WEIGHTS, (applyproc_t) reset_weight, group);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef GD_SKIN_MOVEMENT_H
|
||||
#define GD_SKIN_MOVEMENT_H
|
||||
|
||||
#include "gd_types.h"
|
||||
|
||||
void scale_verts(struct ObjGroup *a0);
|
||||
void move_skin(struct ObjNet *net);
|
||||
void func_80181894(struct ObjJoint *joint);
|
||||
void reset_joint_weights(struct ObjJoint *joint);
|
||||
|
||||
#endif // GD_SKIN_MOVEMENT_H
|
||||
Reference in new issue
Block a user