Introduce support for gcc
This commit is contained in:
parent
4b7e93de8a
commit
17583575e4
599
Makefile
599
Makefile
|
@ -1,58 +1,122 @@
|
|||
# User configurable
|
||||
################################################################################
|
||||
# Options
|
||||
|
||||
# ROMID - The ROM version to build.
|
||||
#
|
||||
# Can be set in your environment using
|
||||
# $ export ROMID=...
|
||||
#
|
||||
# Supported values:
|
||||
# * ntsc-beta
|
||||
# * ntsc-1.0
|
||||
# * ntsc-final
|
||||
# * pal-beta
|
||||
# * pal-final
|
||||
# * jpn-final
|
||||
|
||||
ROMID ?= ntsc-final
|
||||
MATCHING ?= 1
|
||||
PIRACYCHECKS ?= 1
|
||||
|
||||
# In PD, some code is compiled with IDO 5.3 and some is IDO 7.1.
|
||||
# The project requires the ido-static-recomp project, which deconstructs the IDO
|
||||
# compiler and related binaries and recompiles them for your computer's
|
||||
# architecture. These recompiled compilers and binaries are then used to compile
|
||||
# the game's source.
|
||||
# MATCHING - Whether to build a matching ROM (1) or a custom one (0).
|
||||
#
|
||||
# Build a matching ROM to prove that the decompilation is accurate.
|
||||
#
|
||||
# If enabled, all further options are ignored and are set automatically.
|
||||
|
||||
# These are paths to the recompiled compilers
|
||||
CC53 ?= build/recomp/5.3/cc
|
||||
CC71 ?= build/recomp/7.1/cc
|
||||
MATCHING = 1
|
||||
|
||||
# By default we'll compile everything using 5.3,
|
||||
# as this is what most of the project uses.
|
||||
CC := $(CC53)
|
||||
# COMPILER - Choose which compiler to use.
|
||||
#
|
||||
# A matching build uses ido. For non-matching builds, use gcc for performance.
|
||||
#
|
||||
# gcc is currently only supported when ROMID is ntsc-1.0 or ntsc-final.
|
||||
#
|
||||
# Supported values: ido, gcc
|
||||
|
||||
COMPILER = gcc
|
||||
|
||||
# GCC_OPT_LVL - the optimisation level if building with gcc.
|
||||
#
|
||||
# Supported values: -O0, -O1, -O2, -Os
|
||||
|
||||
GCC_OPT_LVL = -Os
|
||||
|
||||
# PAL - Whether to use the PAL television standard (1) or NTSC (0).
|
||||
#
|
||||
# PAL runs at 50Hz while NTSC is 60Hz, and PAL uses different screen dimensions.
|
||||
|
||||
PAL = 0
|
||||
|
||||
################################################################################
|
||||
|
||||
export ROMID
|
||||
# The VERSION constant is used in the source to handle version-specific code.
|
||||
ifeq ($(ROMID), ntsc-beta)
|
||||
VERSION = 0
|
||||
endif
|
||||
ifeq ($(ROMID), ntsc-1.0)
|
||||
VERSION = 1
|
||||
endif
|
||||
ifeq ($(ROMID), ntsc-final)
|
||||
VERSION = 2
|
||||
endif
|
||||
ifeq ($(ROMID), pal-beta)
|
||||
VERSION = 3
|
||||
endif
|
||||
ifeq ($(ROMID), pal-final)
|
||||
VERSION = 4
|
||||
endif
|
||||
ifeq ($(ROMID), jpn-final)
|
||||
VERSION = 5
|
||||
endif
|
||||
|
||||
PAL=0
|
||||
ZIPMAGIC=0x0000
|
||||
COPYLEN=2
|
||||
# Set runtime piracy checks off. We turn this on for matching builds if needed.
|
||||
PIRACYCHECKS = 0
|
||||
|
||||
ifeq ($(ROMID),ntsc-beta)
|
||||
VERSION=0
|
||||
PIRACYCHECKS=0
|
||||
# A magic value that's only used to produce a matching ROM.
|
||||
# It's required because old-school zlib was influenced by uninitialised data.
|
||||
# ZIPMAGIC is the value of the uninitialised data. We set it per version for
|
||||
# matching builds, otherwise 0 is fine.
|
||||
ZIPMAGIC = 0x0000
|
||||
|
||||
# This is also a value that's only used to produce a matching ROM.
|
||||
# The final ROM has some duplicate bytes, and there doesn't seem to be any logic
|
||||
# for determining how many bytes are duplicated.
|
||||
COPYLEN = 2
|
||||
|
||||
# If a matching build has been requested, override directives as needed.
|
||||
ifeq ($(MATCHING), 1)
|
||||
COMPILER = ido
|
||||
|
||||
ifeq ($(ROMID), ntsc-beta)
|
||||
PAL = 0
|
||||
PIRACYCHECKS = 0
|
||||
endif
|
||||
ifeq ($(ROMID),ntsc-1.0)
|
||||
VERSION=1
|
||||
ZIPMAGIC=0xffff
|
||||
ifeq ($(ROMID), ntsc-1.0)
|
||||
PAL = 0
|
||||
PIRACYCHECKS = 1
|
||||
ZIPMAGIC = 0xffff
|
||||
endif
|
||||
ifeq ($(ROMID),ntsc-final)
|
||||
VERSION=2
|
||||
ZIPMAGIC=0xffff
|
||||
ifeq ($(ROMID), ntsc-final)
|
||||
PAL = 0
|
||||
PIRACYCHECKS = 1
|
||||
ZIPMAGIC = 0xffff
|
||||
endif
|
||||
ifeq ($(ROMID),pal-beta)
|
||||
PAL=1
|
||||
VERSION=3
|
||||
ZIPMAGIC=0x0c00
|
||||
COPYLEN=6
|
||||
ifeq ($(ROMID), pal-beta)
|
||||
PAL = 1
|
||||
PIRACYCHECKS = 1
|
||||
ZIPMAGIC = 0x0c00
|
||||
COPYLEN = 6
|
||||
endif
|
||||
ifeq ($(ROMID),pal-final)
|
||||
PAL=1
|
||||
VERSION=4
|
||||
ZIPMAGIC=0xaf00
|
||||
ifeq ($(ROMID), pal-final)
|
||||
PAL = 1
|
||||
PIRACYCHECKS = 1
|
||||
ZIPMAGIC = 0xaf00
|
||||
endif
|
||||
ifeq ($(ROMID), jpn-final)
|
||||
PAL = 0
|
||||
PIRACYCHECKS = 1
|
||||
ZIPMAGIC = 0x0002
|
||||
COPYLEN = 4
|
||||
endif
|
||||
ifeq ($(ROMID),jpn-final)
|
||||
VERSION=5
|
||||
ZIPMAGIC=0x0002
|
||||
COPYLEN=4
|
||||
endif
|
||||
|
||||
DEFINES := VERSION=$(VERSION) MATCHING=$(MATCHING) PAL=$(PAL) PIRACYCHECKS=$(PIRACYCHECKS) _FINALROM=1
|
||||
|
@ -64,163 +128,20 @@ A_DIR := src/assets/$(ROMID)
|
|||
B_DIR := build/$(ROMID)
|
||||
E_DIR := extracted/$(ROMID)
|
||||
|
||||
ifeq ($(shell type mips-linux-gnu-ld >/dev/null 2>/dev/null; echo $$?), 0)
|
||||
# Debian, Ubuntu and Arch AUR
|
||||
ifneq ($(strip $(MIPS_BINUTILS_PREFIX)),)
|
||||
TOOLCHAIN := $(MIPS_BINUTILS_PREFIX)
|
||||
else ifneq ($(shell type mips-elf-ld),)
|
||||
TOOLCHAIN := mips-elf
|
||||
else ifneq ($(shell type mips-linux-gnu-ld),)
|
||||
TOOLCHAIN := mips-linux-gnu
|
||||
else ifeq ($(shell type mips64-elf-ld >/dev/null 2>/dev/null; echo $$?), 0)
|
||||
# Arch AUR
|
||||
else ifneq ($(shell type mips64-elf-ld),)
|
||||
TOOLCHAIN := mips64-elf
|
||||
else ifeq ($(shell type mips64-linux-gnu-ld >/dev/null 2>/dev/null; echo $$?), 0)
|
||||
else ifneq ($(shell type mips64-linux-gnu-ld),)
|
||||
TOOLCHAIN := mips64-linux-gnu
|
||||
else
|
||||
TOOLCHAIN := mips-elf
|
||||
$(error You need to install a suitable MIPS binutils toolchain (eg. mips-elf-ld))
|
||||
endif
|
||||
|
||||
AS := $(TOOLCHAIN)-as
|
||||
|
||||
LOOPUNROLL_C_FILES := \
|
||||
src/lib/ultra/gu/frustum.c \
|
||||
src/lib/ultra/gu/mtxutil.c \
|
||||
src/lib/ultra/gu/ortho.c \
|
||||
src/lib/ultra/io/conteepread.c \
|
||||
src/lib/ultra/io/conteepwrite.c \
|
||||
src/lib/ultra/io/contpfs.c \
|
||||
src/lib/ultra/io/contramread.c \
|
||||
src/lib/ultra/io/contramwrite.c \
|
||||
src/lib/ultra/io/gbpakgetstatus.c \
|
||||
src/lib/ultra/io/gbpakreadid.c \
|
||||
src/lib/ultra/io/motor.c \
|
||||
src/lib/ultra/io/pfschecker.c \
|
||||
src/lib/ultra/io/pfsfreeblocks.c \
|
||||
src/lib/ultra/io/pfsgetstatus.c \
|
||||
src/lib/ultra/io/pfsinitpak2.c
|
||||
|
||||
MIPS3_C_FILES := \
|
||||
src/lib/ultra/libc/ll.c \
|
||||
src/lib/ultra/libc/llcvt.c
|
||||
|
||||
G_C_FILES := \
|
||||
$(shell find src/lib/ultra/audio -name '*.c') \
|
||||
$(shell find src/lib/naudio -name '*.c') \
|
||||
$(shell find src/lib/mp3 -name '*.c') \
|
||||
src/lib/lib_2fc60.c \
|
||||
src/lib/lib_317f0.c \
|
||||
src/lib/lib_39c80.c \
|
||||
src/lib/lib_3e3e0.c \
|
||||
src/lib/mp3.c \
|
||||
src/lib/speaker.c
|
||||
|
||||
O1_C_FILES := \
|
||||
src/lib/lib_04f60nb.c \
|
||||
src/lib/ultra/io/ai.c \
|
||||
src/lib/ultra/io/aisetnextbuf.c \
|
||||
src/lib/ultra/io/conteeplongread.c \
|
||||
src/lib/ultra/io/contquery.c \
|
||||
src/lib/ultra/io/controller.c \
|
||||
src/lib/ultra/io/dpctr.c \
|
||||
src/lib/ultra/io/pigetcmdq.c \
|
||||
src/lib/ultra/io/pidma.c \
|
||||
src/lib/ultra/io/si.c \
|
||||
src/lib/ultra/io/sp.c \
|
||||
src/lib/ultra/io/spsetpc.c \
|
||||
src/lib/ultra/io/sptaskyielded.c \
|
||||
src/lib/ultra/io/vi.c \
|
||||
src/lib/ultra/io/viblack.c \
|
||||
src/lib/ultra/io/vigetcurrframebuf.c \
|
||||
src/lib/ultra/io/vigetnextframebuf.c \
|
||||
src/lib/ultra/io/visetevent.c \
|
||||
src/lib/ultra/io/visetmode.c \
|
||||
src/lib/ultra/io/visetxscale.c \
|
||||
src/lib/ultra/io/visetyscale.c \
|
||||
src/lib/ultra/io/viswapbuf.c \
|
||||
src/lib/ultra/libc/ll.c \
|
||||
src/lib/ultra/libc/llcvt.c \
|
||||
src/lib/ultra/os/atomic.c \
|
||||
src/lib/ultra/os/createmesgqueue.c \
|
||||
src/lib/ultra/os/destroythread.c \
|
||||
src/lib/ultra/os/gettime.c \
|
||||
src/lib/ultra/os/initialize2.c \
|
||||
src/lib/ultra/os/jammesg.c \
|
||||
src/lib/ultra/os/recvmesg.c \
|
||||
src/lib/ultra/os/resetglobalintmask.c \
|
||||
src/lib/ultra/os/sendmesg.c \
|
||||
src/lib/ultra/os/seteventmesg.c \
|
||||
src/lib/ultra/os/setglobalintmask.c \
|
||||
src/lib/ultra/os/setthreadpri.c \
|
||||
src/lib/ultra/os/settimer.c \
|
||||
src/lib/ultra/os/startthread.c \
|
||||
src/lib/ultra/os/stopthread.c \
|
||||
src/lib/ultra/os/stoptimer.c \
|
||||
src/lib/ultra/os/thread.c \
|
||||
src/lib/ultra/os/timerintr.c \
|
||||
src/lib/ultra/os/virtualtophysical.c \
|
||||
src/lib/ultra/os/yieldthread.c
|
||||
|
||||
ifeq ($(ROMID), ntsc-beta)
|
||||
O1_C_FILES := $(O1_C_FILES) src/lib/ultra/io/pfsisplug.c
|
||||
endif
|
||||
|
||||
O3_C_FILES := \
|
||||
src/lib/ultra/gu/align.c \
|
||||
src/lib/ultra/gu/frustum.c \
|
||||
src/lib/ultra/gu/ortho.c \
|
||||
src/lib/ultra/gu/scale.c \
|
||||
src/lib/ultra/libc/xprintf.c
|
||||
|
||||
IDO71_C_FILES := \
|
||||
$(shell find src/lib/ultra/audio -name '*.c') \
|
||||
$(shell find src/lib/naudio -name '*.c') \
|
||||
$(shell find src/lib/mp3 -name '*.c') \
|
||||
src/lib/lib_2fc60.c \
|
||||
src/lib/lib_39c80.c
|
||||
|
||||
LOOPUNROLL_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(LOOPUNROLL_C_FILES))
|
||||
MIPS3_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(MIPS3_C_FILES))
|
||||
G_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(G_C_FILES))
|
||||
O1_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(O1_C_FILES))
|
||||
O3_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(O3_C_FILES))
|
||||
IDO71_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(IDO71_C_FILES))
|
||||
|
||||
LOOPUNROLL := -Wo,-loopunroll,0
|
||||
MIPSISET := -mips2 -32
|
||||
OPT_LVL := -O2
|
||||
|
||||
$(LOOPUNROLL_O_FILES): LOOPUNROLL :=
|
||||
$(MIPS3_O_FILES): MIPSISET := -mips3 -32
|
||||
$(G_O_FILES): OPT_LVL := -g
|
||||
$(O1_O_FILES): OPT_LVL := -O1
|
||||
$(O3_O_FILES): OPT_LVL := -O3
|
||||
$(IDO71_O_FILES): CC := $(CC71)
|
||||
|
||||
CFLAGS = $(C_DEFINES) \
|
||||
$(LOOPUNROLL) \
|
||||
-Wab,-r4300_mul \
|
||||
-non_shared \
|
||||
-Olimit 2000 \
|
||||
-G 0 \
|
||||
-Xcpluscomm \
|
||||
-w2 \
|
||||
-Wab,-w \
|
||||
-woff 581,649,819,820,821,838,852 \
|
||||
-I include \
|
||||
-I include/PR \
|
||||
-I src/include \
|
||||
-I src/generated/$(ROMID) \
|
||||
-I src/lib/ultra/audio \
|
||||
$(OPT_LVL) \
|
||||
$(MIPSISET)
|
||||
|
||||
ASFLAGS = -march=vr4300 -mabi=32 -Iinclude -Iinclude/PR -Isrc/include -Isrc/lib/ultra/audio $(AS_DEFINES)
|
||||
|
||||
C_FILES := $(shell find src/lib src/game src/inflate -name '*.c')
|
||||
S_FILES := $(shell find src/lib src/game src/preamble -name '*.s')
|
||||
|
||||
# Files containing GLOBAL_ASM must be built with the asm_processor
|
||||
GLOBALASM_C_FILES != grep -rl 'GLOBAL_ASM(' $(C_FILES)
|
||||
GLOBALASM_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(GLOBALASM_C_FILES))
|
||||
|
||||
$(GLOBALASM_O_FILES): CC := /usr/bin/env python3 tools/asm_processor/build.py $(CC) -- $(TOOLCHAIN)-as $(ASFLAGS) --
|
||||
|
||||
# Asset files are files which are included in the "files" segment of the ROM.
|
||||
# This excludes animations, fonts, SFX, MIDI and textures.
|
||||
# And because setup files are part of the files segment they are included here,
|
||||
|
@ -253,9 +174,15 @@ LANG_O_FILES := \
|
|||
PADS_O_FILES := $(patsubst $(A_DIR)/pads/%.json, $(B_DIR)/assets/files/bgdata/bg_%_padsZ.o, $(PADS_JSON_FILES))
|
||||
TILES_O_FILES := $(patsubst $(A_DIR)/tiles/%.json, $(B_DIR)/assets/files/bgdata/bg_%_tilesZ.o, $(TILES_JSON_FILES))
|
||||
|
||||
C_FILES := $(shell find src/lib src/game src/inflate -name '*.c')
|
||||
S_FILES := $(shell find src/lib src/game src/preamble -name '*.s')
|
||||
|
||||
C_O_FILES := $(patsubst src/%.c, $(B_DIR)/%.o, $(C_FILES))
|
||||
S_O_FILES := $(patsubst src/%.s, $(B_DIR)/%.o, $(S_FILES))
|
||||
|
||||
O_FILES := \
|
||||
$(patsubst src/%.c, $(B_DIR)/%.o, $(C_FILES)) \
|
||||
$(patsubst src/%.s, $(B_DIR)/%.o, $(S_FILES)) \
|
||||
$(C_O_FILES) \
|
||||
$(S_O_FILES) \
|
||||
$(patsubst %, %.o, $(ASSET_FILES)) \
|
||||
$(LANG_O_FILES) \
|
||||
$(PADS_O_FILES) \
|
||||
|
@ -301,57 +228,229 @@ O_FILES := \
|
|||
|
||||
# ntsc-beta doesn't have this segment
|
||||
ifneq ($(ROMID), ntsc-beta)
|
||||
O_FILES := $(O_FILES) $(B_DIR)/assets/accessingpakZ.o
|
||||
O_FILES := $(O_FILES) $(B_DIR)/assets/accessingpakZ.o
|
||||
endif
|
||||
|
||||
INCLUDES = \
|
||||
-I include \
|
||||
-I include/PR \
|
||||
-I src/include \
|
||||
-I src/generated/$(ROMID) \
|
||||
-I src/lib/ultra/audio \
|
||||
|
||||
AS := $(TOOLCHAIN)-as
|
||||
ASFLAGS = -march=vr4300 -mabi=32 $(INCLUDES) $(AS_DEFINES)
|
||||
|
||||
ifeq ($(COMPILER), ido)
|
||||
RECOMP_FILES := \
|
||||
build/recomp/5.3/as1 \
|
||||
build/recomp/5.3/cc \
|
||||
build/recomp/5.3/cfe \
|
||||
build/recomp/5.3/err.english.cc \
|
||||
build/recomp/5.3/ugen \
|
||||
build/recomp/5.3/ujoin \
|
||||
build/recomp/5.3/uld \
|
||||
build/recomp/5.3/umerge \
|
||||
build/recomp/5.3/uopt \
|
||||
build/recomp/5.3/usplit \
|
||||
build/recomp/7.1/as1 \
|
||||
build/recomp/7.1/cc \
|
||||
build/recomp/7.1/cfe \
|
||||
build/recomp/7.1/err.english.cc \
|
||||
build/recomp/7.1/ugen \
|
||||
build/recomp/7.1/uopt
|
||||
|
||||
LOOPUNROLL_C_FILES := \
|
||||
src/lib/ultra/gu/frustum.c \
|
||||
src/lib/ultra/gu/mtxutil.c \
|
||||
src/lib/ultra/gu/ortho.c \
|
||||
src/lib/ultra/io/conteepread.c \
|
||||
src/lib/ultra/io/conteepwrite.c \
|
||||
src/lib/ultra/io/contpfs.c \
|
||||
src/lib/ultra/io/contramread.c \
|
||||
src/lib/ultra/io/contramwrite.c \
|
||||
src/lib/ultra/io/gbpakgetstatus.c \
|
||||
src/lib/ultra/io/gbpakreadid.c \
|
||||
src/lib/ultra/io/motor.c \
|
||||
src/lib/ultra/io/pfschecker.c \
|
||||
src/lib/ultra/io/pfsfreeblocks.c \
|
||||
src/lib/ultra/io/pfsgetstatus.c \
|
||||
src/lib/ultra/io/pfsinitpak2.c
|
||||
|
||||
MIPS3_C_FILES := \
|
||||
src/lib/ultra/libc/ll.c \
|
||||
src/lib/ultra/libc/llcvt.c
|
||||
|
||||
G_C_FILES := \
|
||||
$(shell find src/lib/ultra/audio -name '*.c') \
|
||||
$(shell find src/lib/naudio -name '*.c') \
|
||||
$(shell find src/lib/mp3 -name '*.c') \
|
||||
src/lib/lib_2fc60.c \
|
||||
src/lib/lib_317f0.c \
|
||||
src/lib/lib_39c80.c \
|
||||
src/lib/lib_3e3e0.c \
|
||||
src/lib/mp3.c \
|
||||
src/lib/speaker.c
|
||||
|
||||
O1_C_FILES := \
|
||||
src/lib/lib_04f60nb.c \
|
||||
src/lib/ultra/io/ai.c \
|
||||
src/lib/ultra/io/aisetnextbuf.c \
|
||||
src/lib/ultra/io/conteeplongread.c \
|
||||
src/lib/ultra/io/contquery.c \
|
||||
src/lib/ultra/io/controller.c \
|
||||
src/lib/ultra/io/dpctr.c \
|
||||
src/lib/ultra/io/pigetcmdq.c \
|
||||
src/lib/ultra/io/pidma.c \
|
||||
src/lib/ultra/io/si.c \
|
||||
src/lib/ultra/io/sp.c \
|
||||
src/lib/ultra/io/spsetpc.c \
|
||||
src/lib/ultra/io/sptaskyielded.c \
|
||||
src/lib/ultra/io/vi.c \
|
||||
src/lib/ultra/io/viblack.c \
|
||||
src/lib/ultra/io/vigetcurrframebuf.c \
|
||||
src/lib/ultra/io/vigetnextframebuf.c \
|
||||
src/lib/ultra/io/visetevent.c \
|
||||
src/lib/ultra/io/visetmode.c \
|
||||
src/lib/ultra/io/visetxscale.c \
|
||||
src/lib/ultra/io/visetyscale.c \
|
||||
src/lib/ultra/io/viswapbuf.c \
|
||||
src/lib/ultra/libc/ll.c \
|
||||
src/lib/ultra/libc/llcvt.c \
|
||||
src/lib/ultra/os/atomic.c \
|
||||
src/lib/ultra/os/createmesgqueue.c \
|
||||
src/lib/ultra/os/destroythread.c \
|
||||
src/lib/ultra/os/gettime.c \
|
||||
src/lib/ultra/os/initialize2.c \
|
||||
src/lib/ultra/os/jammesg.c \
|
||||
src/lib/ultra/os/recvmesg.c \
|
||||
src/lib/ultra/os/resetglobalintmask.c \
|
||||
src/lib/ultra/os/sendmesg.c \
|
||||
src/lib/ultra/os/seteventmesg.c \
|
||||
src/lib/ultra/os/setglobalintmask.c \
|
||||
src/lib/ultra/os/setthreadpri.c \
|
||||
src/lib/ultra/os/settimer.c \
|
||||
src/lib/ultra/os/startthread.c \
|
||||
src/lib/ultra/os/stopthread.c \
|
||||
src/lib/ultra/os/stoptimer.c \
|
||||
src/lib/ultra/os/thread.c \
|
||||
src/lib/ultra/os/timerintr.c \
|
||||
src/lib/ultra/os/virtualtophysical.c \
|
||||
src/lib/ultra/os/yieldthread.c
|
||||
|
||||
ifeq ($(ROMID), ntsc-beta)
|
||||
O1_C_FILES := $(O1_C_FILES) src/lib/ultra/io/pfsisplug.c
|
||||
endif
|
||||
|
||||
O3_C_FILES := \
|
||||
src/lib/ultra/gu/align.c \
|
||||
src/lib/ultra/gu/frustum.c \
|
||||
src/lib/ultra/gu/ortho.c \
|
||||
src/lib/ultra/gu/scale.c \
|
||||
src/lib/ultra/libc/xprintf.c
|
||||
|
||||
IDO71_C_FILES := \
|
||||
$(shell find src/lib/ultra/audio -name '*.c') \
|
||||
$(shell find src/lib/naudio -name '*.c') \
|
||||
$(shell find src/lib/mp3 -name '*.c') \
|
||||
src/lib/lib_2fc60.c \
|
||||
src/lib/lib_39c80.c
|
||||
|
||||
LOOPUNROLL_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(LOOPUNROLL_C_FILES))
|
||||
MIPS3_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(MIPS3_C_FILES))
|
||||
G_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(G_C_FILES))
|
||||
O1_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(O1_C_FILES))
|
||||
O3_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(O3_C_FILES))
|
||||
IDO71_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(IDO71_C_FILES))
|
||||
|
||||
LOOPUNROLL := -Wo,-loopunroll,0
|
||||
MIPSISET := -mips2
|
||||
OPT_LVL := -O2
|
||||
CC := build/recomp/5.3/cc
|
||||
|
||||
$(LOOPUNROLL_O_FILES): LOOPUNROLL :=
|
||||
$(MIPS3_O_FILES): MIPSISET := -mips3
|
||||
$(G_O_FILES): OPT_LVL := -g
|
||||
$(O1_O_FILES): OPT_LVL := -O1
|
||||
$(O3_O_FILES): OPT_LVL := -O3
|
||||
$(IDO71_O_FILES): CC := build/recomp/7.1/cc
|
||||
|
||||
CFLAGS = $(C_DEFINES) $(INCLUDES) \
|
||||
$(LOOPUNROLL) \
|
||||
-Wab,-r4300_mul \
|
||||
-non_shared \
|
||||
-Olimit 2000 \
|
||||
-G 0 \
|
||||
-Xcpluscomm \
|
||||
-w2 \
|
||||
-Wab,-w \
|
||||
-woff 581,649,819,820,821,838,852 \
|
||||
$(MIPSISET) -32
|
||||
|
||||
# Files containing GLOBAL_ASM must be built with the asm_processor
|
||||
ifeq ($(MATCHING), 1)
|
||||
GLOBALASM_C_FILES != grep -rl 'GLOBAL_ASM(' $(C_FILES)
|
||||
GLOBALASM_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(GLOBALASM_C_FILES))
|
||||
$(GLOBALASM_O_FILES): CC := /usr/bin/env python3 tools/asm_processor/build.py $(CC) -- $(TOOLCHAIN)-as $(ASFLAGS) --
|
||||
endif
|
||||
else ifeq ($(COMPILER), gcc)
|
||||
CC := $(TOOLCHAIN)-gcc
|
||||
|
||||
$(C_O_FILES): OPT_LVL := $(GCC_OPT_LVL)
|
||||
|
||||
# Turn off symbol reordering for asset files (eg. stage setups)
|
||||
# but allow it for source C files.
|
||||
CFLAGS := $(C_DEFINES) -DAVOID_UB=1 $(INCLUDES) \
|
||||
-EB \
|
||||
-march=vr4300 \
|
||||
-mabi=32 \
|
||||
-mfix4300 \
|
||||
-mdivide-breaks \
|
||||
-ffreestanding \
|
||||
-ffast-math \
|
||||
-fno-unsafe-math-optimizations \
|
||||
-fno-builtin \
|
||||
-fno-inline-functions \
|
||||
-fno-merge-constants \
|
||||
-fno-strict-aliasing \
|
||||
-fno-zero-initialized-in-bss \
|
||||
-fwrapv \
|
||||
-Wall \
|
||||
-Werror \
|
||||
-Wno-address \
|
||||
-Wno-aggressive-loop-optimizations \
|
||||
-Wno-array-bounds \
|
||||
-Wno-int-in-bool-context \
|
||||
-Wno-int-to-pointer-cast \
|
||||
-Wno-maybe-uninitialized \
|
||||
-Wno-misleading-indentation \
|
||||
-Wno-missing-braces \
|
||||
-Wno-multichar \
|
||||
-Wno-pointer-sign \
|
||||
-Wno-pointer-to-int-cast \
|
||||
-Wno-tautological-compare \
|
||||
-Wno-uninitialized \
|
||||
-Wno-unused-but-set-variable \
|
||||
-Wno-unused-value \
|
||||
-Wno-unused-variable \
|
||||
-G 0
|
||||
else
|
||||
$(error The COMPILER option must be "ido" or "gcc")
|
||||
endif
|
||||
|
||||
# Make ROMID available as an environment variable to all tooling.
|
||||
# (We use this a lot)
|
||||
export ROMID
|
||||
|
||||
default: rom
|
||||
|
||||
################################################################################
|
||||
# ROM Finalisation Stages
|
||||
|
||||
# Link all objects together with ld to make stage1.elf. In this stage, the game,
|
||||
# lib and data segments are uncompressed and placed past the end of the ROM.
|
||||
$(B_DIR)/stage1.elf: $(O_FILES) ld/pd.ld
|
||||
cpp -DROMID=$(ROMID) -DVERSION=$(VERSION) -P ld/pd.ld -o $(B_DIR)/pd.ld
|
||||
$(TOOLCHAIN)-ld --no-check-sections -z muldefs -T $(B_DIR)/pd.ld --print-map -o $@ > $(B_DIR)/pd.map
|
||||
|
||||
$(B_DIR)/stage1.bin: $(B_DIR)/stage1.elf
|
||||
$(TOOLCHAIN)-objcopy $< $@ -O binary
|
||||
|
||||
# Build the final ROM from stage1.bin using mkrom
|
||||
# mkrom handles calculating the piracy checksums, zipping segments and
|
||||
# calculating the ROM checksum.
|
||||
$(B_DIR)/pd.z64: $(B_DIR)/stage1.bin tools/mkrom/mkrom
|
||||
tools/mkrom/mkrom $(B_DIR)/stage1.bin $(B_DIR)/pd.map $(PIRACYCHECKS) $(ZIPMAGIC) $(COPYLEN) $@
|
||||
|
||||
tools/mkrom/mkrom:
|
||||
$(MAKE) -C tools/mkrom
|
||||
|
||||
################################################################################
|
||||
# Recomp
|
||||
# ---------------------
|
||||
# ------------------------------------------------------------------------------
|
||||
# The ido-static-recomp project is installed as a git submodule at tools/recomp.
|
||||
# The IRIX binaries are taken from that project and they are recompiled to
|
||||
# build/recomp/<version>/
|
||||
|
||||
RECOMP_FILES := \
|
||||
build/recomp/5.3/as1 \
|
||||
build/recomp/5.3/cc \
|
||||
build/recomp/5.3/cfe \
|
||||
build/recomp/5.3/err.english.cc \
|
||||
build/recomp/5.3/ugen \
|
||||
build/recomp/5.3/ujoin \
|
||||
build/recomp/5.3/uld \
|
||||
build/recomp/5.3/umerge \
|
||||
build/recomp/5.3/uopt \
|
||||
build/recomp/5.3/usplit \
|
||||
build/recomp/7.1/as1 \
|
||||
build/recomp/7.1/cc \
|
||||
build/recomp/7.1/cfe \
|
||||
build/recomp/7.1/err.english.cc \
|
||||
build/recomp/7.1/ugen \
|
||||
build/recomp/7.1/uopt
|
||||
|
||||
tools/recomp/recomp.cpp:
|
||||
@echo "Please install ido-static-recomp by running:"
|
||||
@echo
|
||||
|
@ -390,6 +489,28 @@ build/recomp/%/err.english.cc:
|
|||
@mkdir -p build/recomp/$?
|
||||
cp tools/err.english.cc build/recomp/$*
|
||||
|
||||
################################################################################
|
||||
# ROM Finalisation Stages
|
||||
|
||||
# Link all objects together with ld to make stage1.elf. In this stage, the game,
|
||||
# lib and data segments are uncompressed and placed past the end of the ROM.
|
||||
$(B_DIR)/stage1.elf: $(O_FILES) ld/pd.ld
|
||||
cpp -DROMID=$(ROMID) -DVERSION=$(VERSION) -P ld/pd.ld -o $(B_DIR)/pd.ld
|
||||
$(TOOLCHAIN)-ld --no-check-sections -z muldefs -T $(B_DIR)/pd.ld --print-map -o $@ > $(B_DIR)/pd.map
|
||||
|
||||
$(B_DIR)/stage1.bin: $(B_DIR)/stage1.elf
|
||||
$(TOOLCHAIN)-objcopy $< $@ -O binary
|
||||
|
||||
# Build the final ROM from stage1.bin using mkrom
|
||||
# mkrom handles calculating the piracy checksums, zipping segments and
|
||||
# calculating the ROM checksum.
|
||||
$(B_DIR)/pd.z64: $(B_DIR)/stage1.bin tools/mkrom/mkrom
|
||||
tools/mkrom/mkrom $(B_DIR)/stage1.bin $(B_DIR)/pd.map $(PIRACYCHECKS) $(ZIPMAGIC) $(COPYLEN) $@
|
||||
@echo -e "\033[0;32mROM written to $@\033[0m"
|
||||
|
||||
tools/mkrom/mkrom:
|
||||
$(MAKE) -C tools/mkrom
|
||||
|
||||
################################################################################
|
||||
# Testing Related
|
||||
# ---------------------
|
||||
|
@ -575,7 +696,7 @@ $(B_DIR)/assets/accessingpakZ.o: $(B_DIR)/assets/accessingpakZ
|
|||
$(B_DIR)/assets/copyrightZ.o: $(B_DIR)/assets/copyrightZ
|
||||
TOOLCHAIN=$(TOOLCHAIN) ROMID=$(ROMID) tools/mkrawobject $< $@
|
||||
|
||||
$(B_DIR)/rsp/%.text.bin $(B_DIR)/rsp/%.data.bin &: src/rsp/%.s
|
||||
$(B_DIR)/rsp/%.text.bin $(B_DIR)/rsp/%.data.bin: src/rsp/%.s
|
||||
@mkdir -p $(dir $@)
|
||||
armips -strequ CODE_FILE $(B_DIR)/rsp/$*.text.bin -strequ DATA_FILE $(B_DIR)/rsp/$*.data.bin $<
|
||||
|
||||
|
@ -587,19 +708,21 @@ $(B_DIR)/rsp/%.bin: $(E_DIR)/rsp/%.bin
|
|||
$(B_DIR)/rsp/%.o: $(B_DIR)/rsp/%.bin
|
||||
TOOLCHAIN=$(TOOLCHAIN) ROMID=$(ROMID) tools/mkrawobject $< $@
|
||||
|
||||
ifeq ($(COMPILER), ido)
|
||||
$(B_DIR)/lib/ultra/libc/llcvt.o: src/lib/ultra/libc/llcvt.c $(ASSETMGR_O_FILES) $(RECOMP_FILES)
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
$(CC) -c $(CFLAGS) $(OPT_LVL) -o $@ $<
|
||||
tools/patchmips3 $@ || rm $@
|
||||
|
||||
$(B_DIR)/lib/ultra/libc/ll.o: src/lib/ultra/libc/ll.c $(ASSETMGR_O_FILES) $(RECOMP_FILES)
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
$(CC) -c $(CFLAGS) $(OPT_LVL) $< -o $@
|
||||
tools/patchmips3 $@ || rm $@
|
||||
endif
|
||||
|
||||
$(B_DIR)/%.o: src/%.c $(ASSETMGR_O_FILES) $(RECOMP_FILES)
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
$(CC) -c $(CFLAGS) $(OPT_LVL) -o $@ $<
|
||||
|
||||
$(B_DIR)/%.o: src/%.s
|
||||
@mkdir -p $(dir $@)
|
||||
|
|
|
@ -6,9 +6,9 @@ Thanks to the decompilation project we can easily see all the differences betwee
|
|||
|
||||
## The Root Cause
|
||||
|
||||
The root cause is in a function that the decomp project has named bgInit which can be found in [src/game/bg.c](src/game/bg.c). This function is somewhat complex so we'll just cover the important parts here.
|
||||
The root cause is in a function that the decomp project has named bgReset which can be found in [src/game/bg.c](src/game/bg.c). This function is somewhat complex so we'll just cover the important parts here.
|
||||
|
||||
bgInit is called while the screen is black after accepting the challenge. It's responsible for loading the background (BG) file for a stage. BG files contain the stage polygon data, room information, a texture list and lighting information among other things. The exact format of the file is not important here, but you just need to know that it contains several sections and some of those sections are compressed, similar to a zip file.
|
||||
bgReset is called while the screen is black after accepting the challenge. It's responsible for loading the background (BG) file for a stage. BG files contain the stage polygon data, room information, a texture list and lighting information among other things. The exact format of the file is not important here, but you just need to know that it contains several sections and some of those sections are compressed, similar to a zip file.
|
||||
|
||||
The problem starts when loading the section 2 data, approximately half way into the function. Section 2 is a section of the BG file that is very simple; it's just a compressed list of texture IDs. Let's start by looking at the fix the developers made:
|
||||
|
||||
|
@ -102,7 +102,7 @@ A better fix would be to change the allocation size so it's just the aligned inf
|
|||
|
||||
The one line tl;dr: When loading the background data for a stage, if the background file contained a specific section that decompressed to a smaller size than the compressed data itself, an overflow would occur due to a miscalculated buffer size. For the overflow to cause any problems the allocation had to be made from the first memory bank and be the exact same size as the remaining space in that bank. If this criteria was met, the overflow would overwrite a pointer in texture data which would cause a crash. The fix that was made increases the allocation to point where it can never be made out of the first bank, therefore avoiding the issue.
|
||||
|
||||
But what about the requirement of having 3 players? Why does it not happen with 4? Because each additional player causes an additional player structure to be allocated, and these are made prior to bgInit being called which means they affect the amount of free space in the first bank when bgInit is run. With 1 or 2 players there's going to be more memory available so the issue does not occur. And when playing with 4 players the expansion pak bank starts to be used sooner so the issue does not occur there either. Using 3 players on this particular stage made it total to the exact value that was needed for the onboard bank to be full at this point. In contrast, changing other settings like the number of bots or the weapon loadout would have no effect on this because those are allocated after bgInit is called.
|
||||
But what about the requirement of having 3 players? Why does it not happen with 4? Because each additional player causes an additional player structure to be allocated, and these are made prior to bgReset being called which means they affect the amount of free space in the first bank when bgReset is run. With 1 or 2 players there's going to be more memory available so the issue does not occur. And when playing with 4 players the expansion pak bank starts to be used sooner so the issue does not occur there either. Using 3 players on this particular stage made it total to the exact value that was needed for the onboard bank to be full at this point. In contrast, changing other settings like the number of bots or the weapon loadout would have no effect on this because those are allocated after bgReset is called.
|
||||
|
||||
Just to be clear, this situation was incredibly unlucky. Adding or deleting a couple of lines of code anywhere else in the game would have made this a non-issue because it would change the heap size (the heap is sized based on what's left over after code and data). And even if the memory system is in the danger territory, there's a 1 in 455 chance that any number of player structure allocations would line it up in a way that can trigger the bug (each player structure is 7280 bytes and there's a 16 byte window where the bug can occur).
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define _GBI_H_
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "gbiex.h"
|
||||
|
||||
/*
|
||||
* To use the F3DEX ucodes, define F3DEX_GBI before include this file.
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
|
||||
#define M_PI 3.14159265358979323846
|
||||
#define OS_M_PI 3.14159265358979323846
|
||||
#define M_DTOR (3.14159265358979323846/180.0)
|
||||
|
||||
#define FTOFIX32(x) (long)((x) * (float)0x00010000)
|
||||
|
@ -69,10 +69,10 @@ typedef struct {
|
|||
* Function Prototypes
|
||||
*/
|
||||
|
||||
extern int guLoadTextureBlockMipMap(Gfx **glist, unsigned char *tbuf, Image *im,
|
||||
unsigned char startTile, unsigned char pal, unsigned char cms,
|
||||
unsigned char cmt, unsigned char masks, unsigned char maskt,
|
||||
unsigned char shifts, unsigned char shiftt, unsigned char cfs,
|
||||
extern int guLoadTextureBlockMipMap(Gfx **glist, unsigned char *tbuf, Image *im,
|
||||
unsigned char startTile, unsigned char pal, unsigned char cms,
|
||||
unsigned char cmt, unsigned char masks, unsigned char maskt,
|
||||
unsigned char shifts, unsigned char shiftt, unsigned char cfs,
|
||||
unsigned char cft);
|
||||
|
||||
extern int guGetDPLoadTextureTileSz (int ult, int lrt);
|
||||
|
@ -86,7 +86,7 @@ extern void guDPLoadTextureTile (Gfx *glistp, void *timg,
|
|||
int shifts, int shiftt);
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* matrix operations:
|
||||
*
|
||||
* The 'F' version is floating point, in case the application wants
|
||||
|
@ -95,19 +95,19 @@ extern void guDPLoadTextureTile (Gfx *glistp, void *timg,
|
|||
*/
|
||||
extern void guMtxIdent(Mtx *m);
|
||||
extern void guMtxIdentF(float mf[4][4]);
|
||||
extern void guOrtho(Mtx *m, float l, float r, float b, float t,
|
||||
extern void guOrtho(Mtx *m, float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guOrthoF(float mf[4][4], float l, float r, float b, float t,
|
||||
extern void guOrthoF(float mf[4][4], float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guFrustum(Mtx *m, float l, float r, float b, float t,
|
||||
extern void guFrustum(Mtx *m, float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guFrustumF(float mf[4][4], float l, float r, float b, float t,
|
||||
extern void guFrustumF(float mf[4][4], float l, float r, float b, float t,
|
||||
float n, float f, float scale);
|
||||
extern void guPerspective(Mtx *m, u16 *perspNorm, float fovy,
|
||||
extern void guPerspective(Mtx *m, u16 *perspNorm, float fovy,
|
||||
float aspect, float near, float far, float scale);
|
||||
extern void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy,
|
||||
extern void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy,
|
||||
float aspect, float near, float far, float scale);
|
||||
extern void guLookAt(Mtx *m,
|
||||
extern void guLookAt(Mtx *m,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
|
@ -118,7 +118,7 @@ extern void guLookAtReflect(Mtx *m, LookAt *l,
|
|||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
extern void guLookAtReflectF(float mf[4][4], LookAt *l,
|
||||
extern void guLookAtReflectF(float mf[4][4], LookAt *l,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp);
|
||||
|
@ -129,22 +129,22 @@ extern void guLookAtHilite(Mtx *m, LookAt *l, Hilite *h,
|
|||
float xl1, float yl1, float zl1,
|
||||
float xl2, float yl2, float zl2,
|
||||
int twidth, int theight);
|
||||
extern void guLookAtHiliteF(float mf[4][4], LookAt *l, Hilite *h,
|
||||
extern void guLookAtHiliteF(float mf[4][4], LookAt *l, Hilite *h,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float xl1, float yl1, float zl1,
|
||||
float xl2, float yl2, float zl2,
|
||||
int twidth, int theight);
|
||||
extern void guLookAtStereo(Mtx *m,
|
||||
extern void guLookAtStereo(Mtx *m,
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float xUp, float yUp, float zUp,
|
||||
float eyedist);
|
||||
extern void guLookAtStereoF(float mf[4][4],
|
||||
extern void guLookAtStereoF(float mf[4][4],
|
||||
float xEye, float yEye, float zEye,
|
||||
float xAt, float yAt, float zAt,
|
||||
float xUp, float yUp, float zUp,
|
||||
float xUp, float yUp, float zUp,
|
||||
float eyedist);
|
||||
extern void guRotate(Mtx *m, float a, float x, float y, float z);
|
||||
extern void guRotateF(float mf[4][4], float a, float x, float y, float z);
|
||||
|
@ -164,9 +164,9 @@ extern void guMtxF2L(float mf[4][4], Mtx *m);
|
|||
extern void guMtxL2F(float mf[4][4], Mtx *m);
|
||||
extern void guMtxCatF(float m[4][4], float n[4][4], float r[4][4]);
|
||||
extern void guMtxCatL(Mtx *m, Mtx *n, Mtx *res);
|
||||
extern void guMtxXFMF(float mf[4][4], float x, float y, float z,
|
||||
extern void guMtxXFMF(float mf[4][4], float x, float y, float z,
|
||||
float *ox, float *oy, float *oz);
|
||||
extern void guMtxXFML(Mtx *m, float x, float y, float z,
|
||||
extern void guMtxXFML(Mtx *m, float x, float y, float z,
|
||||
float *ox, float *oy, float *oz);
|
||||
|
||||
/* vector utility: */
|
||||
|
@ -207,8 +207,8 @@ extern float sqrtf(float value);
|
|||
extern void guParseRdpDL(u64 *rdp_dl, u64 nbytes, u8 flags);
|
||||
extern void guParseString(char *StringPointer, u64 nbytes);
|
||||
|
||||
/*
|
||||
* NO LONGER SUPPORTED,
|
||||
/*
|
||||
* NO LONGER SUPPORTED,
|
||||
* use guParseRdpDL with GU_PARSERDP_DUMPONLY flags
|
||||
*/
|
||||
/* extern void guDumpRawRdpDL(u64 *rdp_dl, u64 nbytes); */
|
||||
|
@ -223,7 +223,7 @@ guBlinkRdpDL(u64 *rdp_dl_in, u64 nbytes_in,
|
|||
u32 x, u32 y, u32 radius,
|
||||
u8 red, u8 green, u8 blue,
|
||||
u8 flags);
|
||||
|
||||
|
||||
/* flag values for guParseGbiDL() */
|
||||
#define GU_PARSEGBI_ROWMAJOR 1
|
||||
#define GU_PARSEGBI_NONEST 2
|
||||
|
@ -252,7 +252,7 @@ typedef struct {
|
|||
u32 paddr;
|
||||
} guDLPrintCB;
|
||||
|
||||
void guSprite2DInit(uSprite *SpritePointer,
|
||||
void guSprite2DInit(uSprite *SpritePointer,
|
||||
void *SourceImagePointer,
|
||||
void *TlutPointer,
|
||||
int Stride,
|
||||
|
|
|
@ -34,6 +34,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/abi.h>
|
||||
#include <PR/mbi.h>
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -300,10 +301,7 @@ typedef struct {
|
|||
ALHeap *heap;
|
||||
s32 outputRate; /* output sample rate */
|
||||
ALFxId fxTypes[4];
|
||||
|
||||
// This should be [4], but this causes too much stack usage in sndInit.
|
||||
// May have to figure out what sndInit's sp7c is before this can be fixed.
|
||||
s32 *params[1];
|
||||
s32 *params[2];
|
||||
} ALSynConfig;
|
||||
|
||||
typedef struct ALPlayer_s {
|
||||
|
|
|
@ -402,6 +402,8 @@ extern long long int n_aspMainDataStart[], n_aspMainDataEnd[];
|
|||
|
||||
f32 func0003b9d4(s32 arg0);
|
||||
void func0003ba64(struct fx *fx, f32 outputrate);
|
||||
s16 _getRate(f32 vol, f32 tgt, s32 count, u16 *ratel);
|
||||
s16 _getVol(s16 ivol, s32 samples, s16 ratem, u16 ratel);
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo.
|
||||
|
||||
|
||||
$RCSfile: os_motor.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:15 $
|
||||
|
@ -68,6 +68,7 @@ extern s32 osMotorInit(OSMesgQueue *, OSPfs *, int);
|
|||
#define osMotorStart(x) __osMotorAccess((x), MOTOR_START)
|
||||
#define osMotorStop(x) __osMotorAccess((x), MOTOR_STOP)
|
||||
extern s32 __osMotorAccess(OSPfs *, s32);
|
||||
s32 osMotorProbe(OSMesgQueue* ctrlrqueue, OSPfs* pfs, s32 channel);
|
||||
#else
|
||||
extern s32 osMotorStop(OSPfs *);
|
||||
extern s32 osMotorStart(OSPfs *);
|
||||
|
|
|
@ -153,21 +153,21 @@ s32 osPfsInitPak(OSMesgQueue *queue, OSPfs *pfs, s32 channel, s32 *arg3);
|
|||
#else
|
||||
s32 osPfsInitPak(OSMesgQueue *queue, OSPfs *pfs, s32 channel);
|
||||
#endif
|
||||
extern s32 osPfsRepairId(OSPfs *);
|
||||
extern s32 osPfsInit(OSMesgQueue *, OSPfs *, int);
|
||||
extern s32 osPfsReFormat(OSPfs *, OSMesgQueue *, int);
|
||||
extern s32 osPfsChecker(OSPfs *);
|
||||
extern s32 osPfsAllocateFile(OSPfs *, u16, u32, u8 *, u8 *, int, s32 *);
|
||||
extern s32 osPfsFindFile(OSPfs *, u16, u32, u8 *, u8 *, s32 *);
|
||||
extern s32 osPfsDeleteFile(OSPfs *, u16, u32, u8 *, u8 *);
|
||||
extern s32 osPfsReadWriteFile(OSPfs *, s32, u8, int, int, u8 *);
|
||||
extern s32 osPfsFileState(OSPfs *, s32, OSPfsState *);
|
||||
extern s32 osPfsGetLabel(OSPfs *, u8 *, int *);
|
||||
extern s32 osPfsSetLabel(OSPfs *, u8 *);
|
||||
extern s32 osPfsIsPlug(OSMesgQueue *, u8 *);
|
||||
extern s32 osPfsFreeBlocks(OSPfs *, s32 *);
|
||||
extern s32 osPfsNumFiles(OSPfs *, s32 *, s32 *);
|
||||
|
||||
s32 osPfsRepairId(OSPfs *);
|
||||
s32 osPfsInit(OSMesgQueue *, OSPfs *, int);
|
||||
s32 osPfsReFormat(OSPfs *, OSMesgQueue *, int);
|
||||
s32 osPfsChecker(OSPfs *);
|
||||
s32 osPfsAllocateFile(OSPfs *, u16, u32, u8 *, u8 *, int, s32 *);
|
||||
s32 osPfsFindFile(OSPfs *, u16, u32, u8 *, u8 *, s32 *);
|
||||
s32 osPfsDeleteFile(OSPfs *, u16, u32, u8 *, u8 *);
|
||||
s32 osPfsReadWriteFile(OSPfs *, s32, u8, int, int, u8 *);
|
||||
s32 osPfsFileState(OSPfs *, s32, OSPfsState *);
|
||||
s32 osPfsGetLabel(OSPfs *, u8 *, int *);
|
||||
s32 osPfsSetLabel(OSPfs *, u8 *);
|
||||
s32 osPfsIsPlug(OSMesgQueue *, u8 *);
|
||||
s32 osPfsFreeBlocks(OSPfs *, s32 *);
|
||||
s32 osPfsNumFiles(OSPfs *, s32 *, s32 *);
|
||||
s32 osPfsReSizeFile(OSPfs *pfs, u16 company_code, u32 game_code, u8 *game_name, u8 *ext_name, int length);
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
|
|
16
ld/pd.ld
16
ld/pd.ld
|
@ -38,6 +38,7 @@
|
|||
BEGIN_SEG(mpstrings##lang) \
|
||||
{ \
|
||||
build/ROMID/assets/mpstrings/mpstrings##lang.o (.data); \
|
||||
. = ALIGN(0x10); \
|
||||
} \
|
||||
END_SEG(mpstrings##lang)
|
||||
|
||||
|
@ -45,6 +46,7 @@
|
|||
varname = __rompos; \
|
||||
.file##id : AT(__rompos) { \
|
||||
build/ROMID/assets/files/filename.o (.data); \
|
||||
. = ALIGN(0x10); \
|
||||
} \
|
||||
__rompos += SIZEOF(.file##id)
|
||||
|
||||
|
@ -52,6 +54,7 @@
|
|||
BEGIN_SEG(font##name) \
|
||||
{ \
|
||||
build/ROMID/assets/fonts/name.o (.data); \
|
||||
. = ALIGN(0x10); \
|
||||
} \
|
||||
END_SEG(font##name)
|
||||
|
||||
|
@ -198,10 +201,11 @@ SECTIONS
|
|||
__rompos = 0x02000000;
|
||||
__rampos = 0x70001050;
|
||||
|
||||
BEGIN_SEG(lib) SUBALIGN(16)
|
||||
BEGIN_SEG(lib) SUBALIGN(0x10)
|
||||
{
|
||||
LIBFILES(.text)
|
||||
LIBFILES(.rodata)
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(lib)
|
||||
|
||||
|
@ -231,6 +235,7 @@ SECTIONS
|
|||
GAMEFILES(.data)
|
||||
build/ROMID/rsp/gsp.data.o (.data);
|
||||
build/ROMID/rsp/asp.data.o (.data);
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(data)
|
||||
|
||||
|
@ -258,6 +263,7 @@ SECTIONS
|
|||
{
|
||||
LIBFILES(.bss)
|
||||
GAMEFILES(.bss)
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(bss)
|
||||
|
||||
|
@ -277,6 +283,9 @@ SECTIONS
|
|||
{
|
||||
build/ROMID/inflate/inflate.o (.text);
|
||||
build/ROMID/inflate/inflate.o (.data);
|
||||
build/ROMID/inflate/inflate.o (.bss);
|
||||
build/ROMID/inflate/inflate.o (.rodata);
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(inflate)
|
||||
|
||||
|
@ -297,6 +306,7 @@ SECTIONS
|
|||
{
|
||||
GAMEFILES(.text)
|
||||
GAMEFILES(.rodata)
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(game)
|
||||
|
||||
|
@ -345,6 +355,7 @@ SECTIONS
|
|||
BEGIN_SEG(mpconfigs)
|
||||
{
|
||||
build/ROMID/mpconfigs.o (.data);
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(mpconfigs)
|
||||
|
||||
|
@ -375,6 +386,7 @@ SECTIONS
|
|||
BEGIN_SEG(firingrange)
|
||||
{
|
||||
build/ROMID/firingrange.o (.data);
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(firingrange)
|
||||
|
||||
|
@ -391,6 +403,7 @@ SECTIONS
|
|||
BEGIN_SEG(textureconfig)
|
||||
{
|
||||
build/ROMID/textureconfig.o (.data);
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(textureconfig)
|
||||
|
||||
|
@ -547,6 +560,7 @@ SECTIONS
|
|||
{
|
||||
build/ROMID/assets/files/list.o (.data);
|
||||
build/ROMID/assets/files/list.o (.rodata);
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
END_SEG(filenames)
|
||||
|
||||
|
|
|
@ -5,10 +5,12 @@ SECTIONS
|
|||
{
|
||||
.data 0x00000000 : AT(0x0000) {
|
||||
__FILE__ (.data);
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
|
||||
.rodata : AT(SIZEOF(.data)) {
|
||||
__FILE__ (.rodata);
|
||||
. = ALIGN(0x10);
|
||||
}
|
||||
|
||||
/DISCARD/ : {
|
||||
|
|
|
@ -13,22 +13,16 @@ u16 var8006ae90[] = {
|
|||
0x5555, 0x53db, 0x525c, 0x50d9, 0x4f51, 0x4dc5, 0x4c32, 0x4a9a,
|
||||
0x48fc, 0x4757, 0x45ab, 0x43f7, 0x423a, 0x4075, 0x3ea5, 0x3ccb,
|
||||
0x3ae5, 0x38f1, 0x36ef, 0x34dc, 0x32b7, 0x307d, 0x2e2b, 0x2bbd,
|
||||
0x292e, 0x2678, 0x2391, 0x206c, 0x1cf6, 0x0000,
|
||||
};
|
||||
|
||||
u16 var8006af0c[] = {
|
||||
0x1cf6, 0x1cbb, 0x1c80, 0x1c45, 0x1c08, 0x1bcc, 0x1b8f, 0x1b51,
|
||||
0x1b13, 0x1ad4, 0x1a95, 0x1a55, 0x1a14, 0x19d3, 0x1992, 0x194f,
|
||||
0x190c, 0x18c9, 0x1884, 0x183f, 0x17f9, 0x17b3, 0x176b, 0x1723,
|
||||
0x16da, 0x1690, 0x1645, 0x15f9, 0x15ac, 0x155e, 0x150f, 0x14be,
|
||||
0x146d, 0x141a, 0x13c6, 0x1370, 0x1319, 0x12c1, 0x1267, 0x120b,
|
||||
0x11ad, 0x114e, 0x10ec, 0x1088, 0x1022, 0x0fb9, 0x0f4d, 0x0ede,
|
||||
0x0e6c, 0x0df7, 0x0d7d, 0x0d00, 0x0c7d, 0x0bf4, 0x0b66, 0x0ad0,
|
||||
0x0a31, 0x0989, 0x08d3, 0x080e, 0x0734, 0x063d, 0x0518, 0x039a,
|
||||
};
|
||||
|
||||
u16 var8006af8c[] = {
|
||||
0x039a, 0x031e, 0x028c, 0x01cd,
|
||||
0x292e, 0x2678, 0x2391, 0x206c, 0x1cf6, 0x0000, 0x1cf6, 0x1cbb,
|
||||
0x1c80, 0x1c45, 0x1c08, 0x1bcc, 0x1b8f, 0x1b51, 0x1b13, 0x1ad4,
|
||||
0x1a95, 0x1a55, 0x1a14, 0x19d3, 0x1992, 0x194f, 0x190c, 0x18c9,
|
||||
0x1884, 0x183f, 0x17f9, 0x17b3, 0x176b, 0x1723, 0x16da, 0x1690,
|
||||
0x1645, 0x15f9, 0x15ac, 0x155e, 0x150f, 0x14be, 0x146d, 0x141a,
|
||||
0x13c6, 0x1370, 0x1319, 0x12c1, 0x1267, 0x120b, 0x11ad, 0x114e,
|
||||
0x10ec, 0x1088, 0x1022, 0x0fb9, 0x0f4d, 0x0ede, 0x0e6c, 0x0df7,
|
||||
0x0d7d, 0x0d00, 0x0c7d, 0x0bf4, 0x0b66, 0x0ad0, 0x0a31, 0x0989,
|
||||
0x08d3, 0x080e, 0x0734, 0x063d, 0x0518, 0x039a, 0x039a, 0x031e,
|
||||
0x028c, 0x01cd, 0x0000,
|
||||
};
|
||||
|
||||
s32 func0f096890(s32 arg0)
|
||||
|
@ -43,17 +37,17 @@ s32 func0f096890(s32 arg0)
|
|||
if (arg0 >= 32736) {
|
||||
mask = 0x07;
|
||||
shiftamount = 3;
|
||||
array = var8006af8c;
|
||||
array = &var8006ae90[126];
|
||||
arg0 -= 32736;
|
||||
} else if (arg0 >= 30720) {
|
||||
mask = 0x1f;
|
||||
shiftamount = 5;
|
||||
array = var8006af0c;
|
||||
array = &var8006ae90[62];
|
||||
arg0 -= 30720;
|
||||
} else {
|
||||
mask = 0x1ff;
|
||||
shiftamount = 9;
|
||||
array = var8006ae90;
|
||||
array = &var8006ae90[0];
|
||||
}
|
||||
|
||||
index = arg0 >> shiftamount;
|
||||
|
|
|
@ -17,7 +17,7 @@ f32 acosf(f32 value)
|
|||
intval = value * 32767.0f;
|
||||
}
|
||||
|
||||
return (acos(intval) * M_PI) / 65535.0f;
|
||||
return acos(intval) * M_PI / 65535.0f;
|
||||
}
|
||||
|
||||
f32 asinf(f32 value)
|
||||
|
@ -29,8 +29,8 @@ f32 asinf(f32 value)
|
|||
} else if (value <= -1) {
|
||||
intval = -32767;
|
||||
} else {
|
||||
intval = (value * 32767.0f);
|
||||
intval = value * 32767.0f;
|
||||
}
|
||||
|
||||
return (asin(intval) * M_PI) / 65535.0f;
|
||||
return asin(intval) * M_PI / 65535.0f;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "lib/main.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "lib/ailist.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
@ -176,7 +177,7 @@ s32 amPickTargetMenuList(s32 operation, struct menuitem *item, union handlerdata
|
|||
}
|
||||
} while (numremaining >= 0);
|
||||
|
||||
colour = teamcolours[g_MpAllChrConfigPtrs[chrindex]->team] | renderdata->colour & 0xff;
|
||||
colour = teamcolours[g_MpAllChrConfigPtrs[chrindex]->team] | (renderdata->colour & 0xff);
|
||||
|
||||
if (renderdata->unk10) {
|
||||
u32 weight = menuGetSinOscFrac(40) * 255;
|
||||
|
@ -374,7 +375,7 @@ void amApply(s32 slot)
|
|||
case 1: // Function
|
||||
if (g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED
|
||||
&& g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST
|
||||
&& g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7))) {
|
||||
&& g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << ((g_Vars.currentplayer->gunctrl.weaponnum - 1) & 7))) {
|
||||
if (slot == 1) {
|
||||
g_AmMenus[g_AmIndex].togglefunc = true;
|
||||
}
|
||||
|
@ -469,10 +470,7 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label)
|
|||
secfunc = weaponGetFunction(&g_Vars.currentplayer->hands[HAND_RIGHT].gset, FUNC_SECONDARY);
|
||||
|
||||
if (slot == 1) {
|
||||
if (!secfunc
|
||||
|| g_Vars.currentplayer->gunctrl.weaponnum < WEAPON_UNARMED
|
||||
|| g_Vars.currentplayer->gunctrl.weaponnum > WEAPON_COMBATBOOST
|
||||
|| (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7))) == 0) {
|
||||
if (!secfunc || !FUNCISSEC()) {
|
||||
*flags |= AMSLOTFLAG_CURRENT;
|
||||
}
|
||||
|
||||
|
@ -480,10 +478,7 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label)
|
|||
strcpy(label, langGet(prifunc->name));
|
||||
}
|
||||
} else {
|
||||
if (!prifunc || (
|
||||
g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED
|
||||
&& g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST
|
||||
&& g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7)))) {
|
||||
if (!prifunc || FUNCISSEC()) {
|
||||
*flags |= AMSLOTFLAG_CURRENT;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "game/options.h"
|
||||
#include "bss.h"
|
||||
#include "lib/joy.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "game/debug.h"
|
||||
#include "game/dlights.h"
|
||||
#include "game/game_006900.h"
|
||||
#include "game/portal.h"
|
||||
#include "game/room.h"
|
||||
#include "game/chr.h"
|
||||
#include "game/prop.h"
|
||||
|
@ -28,6 +29,7 @@
|
|||
#include "game/texdecompress.h"
|
||||
#include "game/wallhit.h"
|
||||
#include "bss.h"
|
||||
#include "lib/lib_17ce0.h"
|
||||
#include "lib/rzip.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/dma.h"
|
||||
|
@ -38,6 +40,7 @@
|
|||
#include "lib/mtx.h"
|
||||
#include "lib/lib_2f490.h"
|
||||
#include "data.h"
|
||||
#include "gbiex.h"
|
||||
#include "types.h"
|
||||
|
||||
#define BGCMD_END 0x00
|
||||
|
@ -266,7 +269,7 @@ Gfx *bg0f158184(Gfx *gdl, struct xraydata *xraydata)
|
|||
{
|
||||
struct gfxvtx *vertices;
|
||||
u32 *colours;
|
||||
s32 end;
|
||||
s32 numgroups;
|
||||
s32 i;
|
||||
s32 count;
|
||||
|
||||
|
@ -288,13 +291,22 @@ Gfx *bg0f158184(Gfx *gdl, struct xraydata *xraydata)
|
|||
count = xraydata->numvertices;
|
||||
gDPSetVerticeArray(gdl++, vertices, count);
|
||||
|
||||
end = (xraydata->numtris - 1) / 4 + 1;
|
||||
numgroups = (xraydata->numtris - 1) / 4 + 1;
|
||||
|
||||
// @bug: The original code overflows the tris array and unintentionally writes zero
|
||||
// into the xraydata->numtris property. IDO reloads the xraydata->numtris value
|
||||
// on each loop iteration so it reads the 0 value and ends the loop.
|
||||
#ifdef AVOID_UB
|
||||
for (i = xraydata->numtris; i < numgroups * 4; i++) {
|
||||
xraydata->tris[i][0] = xraydata->tris[i][1] = xraydata->tris[i][2] = 0;
|
||||
}
|
||||
#else
|
||||
for (i = xraydata->numtris; i < xraydata->numtris * 4; i++) {
|
||||
xraydata->tris[i][0] = xraydata->tris[i][1] = xraydata->tris[i][2] = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i < end; i++) {
|
||||
for (i = 0; i < numgroups; i++) {
|
||||
gDPTri4(gdl++,
|
||||
xraydata->tris[i * 4 + 0][0], xraydata->tris[i * 4 + 0][1], xraydata->tris[i * 4 + 0][2],
|
||||
xraydata->tris[i * 4 + 1][0], xraydata->tris[i * 4 + 1][1], xraydata->tris[i * 4 + 1][2],
|
||||
|
@ -2619,17 +2631,17 @@ void bgReset(s32 stagenum)
|
|||
g_BgPrimaryData = mempAlloc(ALIGN16(inflatedsize + 0x8010), MEMPOOL_STAGE);
|
||||
|
||||
// Set up pointer to scratch space
|
||||
scratch = ((u32)g_BgPrimaryData + inflatedsize) - primcompsize;
|
||||
scratch = (u32) g_BgPrimaryData + inflatedsize - primcompsize;
|
||||
scratch = ALIGN16(scratch + 0x8000);
|
||||
|
||||
g_LoadType = LOADTYPE_BG;
|
||||
|
||||
// Copy section 1 header + compressed primary to scratch space
|
||||
bgLoadFile((u8 *)scratch, 0, ALIGN16(primcompsize + 15));
|
||||
bgLoadFile((u8 *) scratch, 0, ALIGN16(primcompsize + 15));
|
||||
|
||||
// Inflate primary data to the start of the buffer
|
||||
scratch += 0xc;
|
||||
bgInflate((u8 *)scratch, g_BgPrimaryData, primcompsize);
|
||||
bgInflate((u8 *) scratch, g_BgPrimaryData, primcompsize);
|
||||
|
||||
// Shrink the allocation (ie. free the scratch space)
|
||||
mempRealloc(g_BgPrimaryData, inflatedsize, MEMPOOL_STAGE);
|
||||
|
@ -2639,30 +2651,33 @@ void bgReset(s32 stagenum)
|
|||
|
||||
bgLoadFile(header, section2start, 0x40);
|
||||
|
||||
inflatedsize = (*(u16 *)&header[0] & 0x7fff) - 1;
|
||||
section2compsize = *(u16 *)&header[2];
|
||||
inflatedsize = (*(u16 *) &header[0] & 0x7fff) - 1;
|
||||
section2compsize = *(u16 *) &header[2];
|
||||
inflatedsize = (inflatedsize | 0xf) + 1;
|
||||
|
||||
// Allocate space for the section 2 data (texture ID list).
|
||||
// This is the cause and fix for the Challenge 7 memory corruption bug in
|
||||
// NTSC 1.0. A full writeup about the bug and how the fix works can be found
|
||||
// in the docs folder of this project.
|
||||
#if VERSION >= VERSION_NTSC_FINAL
|
||||
#ifdef AVOID_UB
|
||||
section2 = mempAlloc(inflatedsize + section2compsize, MEMPOOL_STAGE);
|
||||
scratch = (u32) section2 + inflatedsize;
|
||||
#elif VERSION >= VERSION_NTSC_FINAL
|
||||
section2 = mempAlloc(inflatedsize + 0x8000, MEMPOOL_STAGE);
|
||||
scratch = (u32)section2 + 0x8000;
|
||||
scratch = (u32) section2 + 0x8000;
|
||||
#else
|
||||
section2 = mempAlloc(inflatedsize + 0x800, MEMPOOL_STAGE);
|
||||
scratch = (u32)section2 + 0x800;
|
||||
scratch = (u32) section2 + 0x800;
|
||||
#endif
|
||||
|
||||
// Load compressed data from ROM to scratch
|
||||
bgLoadFile((u8 *)scratch, section2start + 4, ((section2compsize - 1) | 0xf) + 1);
|
||||
bgLoadFile((u8 *) scratch, section2start + 4, ((section2compsize - 1) | 0xf) + 1);
|
||||
|
||||
// Inflate section 2 to the start of the buffer
|
||||
bgInflate((u8 *)scratch, (u8 *)section2, section2compsize);
|
||||
bgInflate((u8 *) scratch, (u8 *) section2, section2compsize);
|
||||
|
||||
// Iterate texture IDs and ensure they're loaded
|
||||
inflatedsize = (*(u16 *)&header[0] & 0x7fff) >> 1;
|
||||
inflatedsize = (*(u16 *) &header[0] & 0x7fff) >> 1;
|
||||
|
||||
for (i = 0; i != inflatedsize; i++) {
|
||||
texLoadFromTextureNum(section2[i], NULL);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "game/bondgun.h"
|
||||
#include "game/gunfx.h"
|
||||
#include "game/game_0b0fd0.h"
|
||||
#include "game/modeldef.h"
|
||||
#include "game/modelmgr.h"
|
||||
#include "game/tex.h"
|
||||
#include "game/camera.h"
|
||||
|
@ -39,6 +40,7 @@
|
|||
#include "game/propobj.h"
|
||||
#include "game/objectives.h"
|
||||
#include "bss.h"
|
||||
#include "lib/collision.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/joy.h"
|
||||
#include "lib/main.h"
|
||||
|
@ -153,12 +155,8 @@ struct fireslot g_Fireslots[NUM_FIRESLOTS];
|
|||
u32 fill2[1];
|
||||
#endif
|
||||
|
||||
u32 var80070090 = 0x96969600;
|
||||
u32 var80070094 = 0x96969600;
|
||||
u32 var80070098 = 0xffffff00;
|
||||
u32 var8007009c = 0xffffff00;
|
||||
u32 var800700a0 = 0xb24d2e00;
|
||||
u32 var800700a4 = 0x00000000;
|
||||
Lights1 var80070090 = gdSPDefLights1(0x96, 0x96, 0x96, 0xff, 0xff, 0xff, 0xb2, 0x4d, 0x2e);
|
||||
|
||||
u32 var800700a8 = 0x00025800;
|
||||
u32 var800700ac = 0x0001e000;
|
||||
|
||||
|
@ -2880,9 +2878,7 @@ s32 bgunTickIncIdle(struct handweaponinfo *info, s32 handnum, struct hand *hand,
|
|||
}
|
||||
|
||||
// Consider switching to other gun function
|
||||
usesec = g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED
|
||||
&& g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST
|
||||
&& (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << (g_Vars.currentplayer->gunctrl.weaponnum - 1 & 7)));
|
||||
usesec = FUNCISSEC();
|
||||
|
||||
if (usesec == gunfunc) {
|
||||
sp30 = bgun0f098ca0(1 - hand->gset.weaponfunc, info, hand);
|
||||
|
@ -10185,10 +10181,10 @@ glabel var7f1aca90
|
|||
/* f0a747c: ad6e0004 */ sw $t6,0x4($t3)
|
||||
/* f0a7480: 8faf014c */ lw $t7,0x14c($sp)
|
||||
/* f0a7484: 3c090386 */ lui $t1,0x386
|
||||
/* f0a7488: 3c088007 */ lui $t0,%hi(var80070098)
|
||||
/* f0a7488: 3c088007 */ lui $t0,%hi(var80070090+0x08)
|
||||
/* f0a748c: 25ec0008 */ addiu $t4,$t7,0x8
|
||||
/* f0a7490: afac014c */ sw $t4,0x14c($sp)
|
||||
/* f0a7494: 25080098 */ addiu $t0,$t0,%lo(var80070098)
|
||||
/* f0a7494: 25080098 */ addiu $t0,$t0,%lo(var80070090+0x08)
|
||||
/* f0a7498: 35290010 */ ori $t1,$t1,0x10
|
||||
/* f0a749c: ade90000 */ sw $t1,0x0($t7)
|
||||
/* f0a74a0: ade80004 */ sw $t0,0x4($t7)
|
||||
|
@ -11026,10 +11022,10 @@ glabel var7f1aca90
|
|||
/* f0a747c: ad6e0004 */ sw $t6,0x4($t3)
|
||||
/* f0a7480: 8faf014c */ lw $t7,0x14c($sp)
|
||||
/* f0a7484: 3c090386 */ lui $t1,0x386
|
||||
/* f0a7488: 3c088007 */ lui $t0,%hi(var80070098)
|
||||
/* f0a7488: 3c088007 */ lui $t0,%hi(var80070090+0x08)
|
||||
/* f0a748c: 25ec0008 */ addiu $t4,$t7,0x8
|
||||
/* f0a7490: afac014c */ sw $t4,0x14c($sp)
|
||||
/* f0a7494: 25080098 */ addiu $t0,$t0,%lo(var80070098)
|
||||
/* f0a7494: 25080098 */ addiu $t0,$t0,%lo(var80070090+0x08)
|
||||
/* f0a7498: 35290010 */ ori $t1,$t1,0x10
|
||||
/* f0a749c: ade90000 */ sw $t1,0x0($t7)
|
||||
/* f0a74a0: ade80004 */ sw $t0,0x4($t7)
|
||||
|
@ -12528,9 +12524,7 @@ void bgunRender(Gfx **gdlptr)
|
|||
gdl = beamRender(gdl, &hand->beam, 0, 0);
|
||||
|
||||
if (weaponHasFlag(hand->gset.weaponnum, WEAPONFLAG_00008000)) {
|
||||
gSPNumLights(gdl++, 1);
|
||||
gSPLight(gdl++, &var80070098, 1);
|
||||
gSPLight(gdl++, &var80070090, 2);
|
||||
gSPSetLights1(gdl++, var80070090);
|
||||
gSPLookAt(gdl++, camGetLookAt());
|
||||
}
|
||||
|
||||
|
@ -13242,8 +13236,6 @@ void bgunSetTriggerOn(s32 handnum, bool on)
|
|||
}
|
||||
}
|
||||
|
||||
#define VALIDWEAPON() (g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED && g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST)
|
||||
#define GETFUNC() (VALIDWEAPON() && (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << ((g_Vars.currentplayer->gunctrl.weaponnum - 1) & 7))))
|
||||
#define SETFUNCPRI() g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] &= ~(1 << ((g_Vars.currentplayer->gunctrl.weaponnum - 1) & 7))
|
||||
#define SETFUNCSEC() g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] |= 1 << ((g_Vars.currentplayer->gunctrl.weaponnum - 1) & 7)
|
||||
|
||||
|
@ -13303,7 +13295,7 @@ s32 bgunConsiderToggleGunFunction(s32 usedowntime, bool trigpressed, bool fromac
|
|||
// These weapons disallow B+Z
|
||||
if (!trigpressed) {
|
||||
if (VALIDWEAPON()) {
|
||||
if (1 - GETFUNC()) {
|
||||
if (1 - FUNCISSEC()) {
|
||||
SETFUNCSEC();
|
||||
} else {
|
||||
SETFUNCPRI();
|
||||
|
@ -13319,7 +13311,7 @@ s32 bgunConsiderToggleGunFunction(s32 usedowntime, bool trigpressed, bool fromac
|
|||
g_Vars.currentplayer->gunctrl.invertgunfunc = true;
|
||||
} else {
|
||||
if (VALIDWEAPON()) {
|
||||
if (!GETFUNC()) {
|
||||
if (!FUNCISSEC()) {
|
||||
SETFUNCSEC();
|
||||
} else {
|
||||
SETFUNCPRI();
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "game/activemenu.h"
|
||||
#include "game/bondbike.h"
|
||||
#include "game/bondgrab.h"
|
||||
#include "game/bondmove.h"
|
||||
#include "game/bondwalk.h"
|
||||
#include "game/cheats.h"
|
||||
#include "game/chraction.h"
|
||||
#include "game/footstep.h"
|
||||
#include "game/game_006900.h"
|
||||
#include "game/chr.h"
|
||||
#include "game/prop.h"
|
||||
|
@ -26,6 +28,7 @@
|
|||
#include "game/options.h"
|
||||
#include "game/propobj.h"
|
||||
#include "bss.h"
|
||||
#include "lib/lib_17ce0.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/collision.h"
|
||||
#include "lib/joy.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "lib/joy.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/str.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
@ -193,7 +194,7 @@ Gfx *bviewPrepareStaticRgba16(Gfx *gdl, u32 colour, u32 alpha)
|
|||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPSetTileSize(gdl++, G_TX_RENDERTILE, 0, 0, 0x0800, 0x0020);
|
||||
gDPSetTextureFilter(gdl++, G_TF_POINT);
|
||||
gDPSetColor(gdl++, G_SETENVCOLOR, colour & 0xffffff00 | alpha & 0xff);
|
||||
gDPSetColor(gdl++, G_SETENVCOLOR, (colour & 0xffffff00) | (alpha & 0xff));
|
||||
gDPSetCombineLERP(gdl++,
|
||||
TEXEL0, 0, ENVIRONMENT, 0, 0, 0, 0, ENVIRONMENT,
|
||||
TEXEL0, 0, ENVIRONMENT, 0, 0, 0, 0, ENVIRONMENT);
|
||||
|
@ -227,7 +228,7 @@ Gfx *bviewPrepareStaticI8(Gfx *gdl, u32 colour, u32 alpha)
|
|||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPSetTileSize(gdl++, G_TX_RENDERTILE, 0, 0, 0x0800, 0x0020);
|
||||
gDPSetTextureFilter(gdl++, G_TF_POINT);
|
||||
gDPSetColor(gdl++, G_SETENVCOLOR, colour & 0xffffff00 | alpha & 0xff);
|
||||
gDPSetColor(gdl++, G_SETENVCOLOR, (colour & 0xffffff00) | (alpha & 0xff));
|
||||
gDPSetCombineLERP(gdl++,
|
||||
TEXEL0, 0, ENVIRONMENT, 0, 0, 0, 0, ENVIRONMENT,
|
||||
TEXEL0, 0, ENVIRONMENT, 0, 0, 0, 0, ENVIRONMENT);
|
||||
|
@ -298,7 +299,7 @@ Gfx *bviewDrawStatic(Gfx *gdl, u32 arg1, s32 arg2)
|
|||
s32 viewheight = viGetViewHeight();
|
||||
s32 viewwidth = viGetViewWidth();
|
||||
s32 viewleft = viGetViewLeft();
|
||||
u16 *fb2 = (u16 *) (random() & 0xfff00 | 0x80000000);
|
||||
u16 *fb2 = (u16 *) PHYS_TO_K0(random() & 0xfff00);
|
||||
s32 y;
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "game/cheats.h"
|
||||
#include "game/chraction.h"
|
||||
#include "game/debug.h"
|
||||
#include "game/footstep.h"
|
||||
#include "game/game_006900.h"
|
||||
#include "game/chr.h"
|
||||
#include "game/prop.h"
|
||||
|
@ -17,6 +18,7 @@
|
|||
#include "game/playermgr.h"
|
||||
#include "game/propobj.h"
|
||||
#include "bss.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/snd.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/mtx.h"
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "game/propobj.h"
|
||||
#include "game/splat.h"
|
||||
#include "bss.h"
|
||||
#include "lib/collision.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/mtx.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "game/activemenu.h"
|
||||
#include "game/chraction.h"
|
||||
#include "game/debug.h"
|
||||
#include "game/chr.h"
|
||||
|
@ -10,6 +11,7 @@
|
|||
#include "game/bot.h"
|
||||
#include "game/botcmd.h"
|
||||
#include "game/botact.h"
|
||||
#include "game/botinv.h"
|
||||
#include "game/mplayer/mplayer.h"
|
||||
#include "game/propobj.h"
|
||||
#include "bss.h"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "game/body.h"
|
||||
#include "game/prop.h"
|
||||
#include "game/botcmd.h"
|
||||
#include "game/botinvinit.h"
|
||||
#include "game/mplayer/mplayer.h"
|
||||
#include "bss.h"
|
||||
#include "lib/memp.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "lib/libc/ll.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
#include "string.h"
|
||||
|
||||
struct camerafile {
|
||||
u8 unk00[128];
|
||||
|
@ -3014,7 +3015,7 @@ void func0f14f700(struct var8007f8e0 *arg0, u32 arg1, u32 arg2)
|
|||
{
|
||||
u32 bit;
|
||||
|
||||
for (bit = 1 << (arg2 + 31); bit != 0; bit >>= 1) {
|
||||
for (bit = 1 << (arg2 - 1); bit != 0; bit >>= 1) {
|
||||
if (bit & arg1) {
|
||||
s32 remainder = arg0->unk02c % 8;
|
||||
s32 index = arg0->unk02c / 8;
|
||||
|
@ -3032,7 +3033,7 @@ u32 func0f14f76c(struct var8007f8e0 *arg0, u32 arg1)
|
|||
u32 bit;
|
||||
u32 bits;
|
||||
|
||||
for (bit = 1 << (arg1 + 31), bits = 0; bit != 0; bit >>= 1) {
|
||||
for (bit = 1 << (arg1 - 1), bits = 0; bit != 0; bit >>= 1) {
|
||||
u32 remainder = arg0->unk02c % 8;
|
||||
u32 index = arg0->unk02c / 8;
|
||||
u8 mask = 1 << (7 - remainder);
|
||||
|
@ -3072,7 +3073,7 @@ s32 phead0f14f7d4(struct var8007f8e0 *arg0)
|
|||
|
||||
v0 = func0f14f76c(arg0, sp24);
|
||||
|
||||
if ((1 << (sp24 + 31)) & v0) {
|
||||
if ((1 << (sp24 - 1)) & v0) {
|
||||
return v0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "lib/sched.h"
|
||||
#include "lib/str.h"
|
||||
#include "game/camdraw.h"
|
||||
#include "game/cheats.h"
|
||||
#include "game/inv.h"
|
||||
|
@ -251,16 +252,16 @@ void cheatsReset(void)
|
|||
(1 << CHEAT_LAPTOPGUN)
|
||||
);
|
||||
g_CheatsActiveBank1 &= ~(
|
||||
(1 << CHEAT_PHOENIX - 32) |
|
||||
(1 << CHEAT_PSYCHOSISGUN - 32) |
|
||||
(1 << CHEAT_PP9I - 32) |
|
||||
(1 << CHEAT_CC13 - 32) |
|
||||
(1 << CHEAT_KL01313 - 32) |
|
||||
(1 << CHEAT_KF7SPECIAL - 32) |
|
||||
(1 << CHEAT_ZZT - 32) |
|
||||
(1 << CHEAT_DMC - 32) |
|
||||
(1 << CHEAT_AR53 - 32) |
|
||||
(1 << CHEAT_RCP45 - 32)
|
||||
(1 << (CHEAT_PHOENIX - 32)) |
|
||||
(1 << (CHEAT_PSYCHOSISGUN - 32)) |
|
||||
(1 << (CHEAT_PP9I - 32)) |
|
||||
(1 << (CHEAT_CC13 - 32)) |
|
||||
(1 << (CHEAT_KL01313 - 32)) |
|
||||
(1 << (CHEAT_KF7SPECIAL - 32)) |
|
||||
(1 << (CHEAT_ZZT - 32)) |
|
||||
(1 << (CHEAT_DMC - 32)) |
|
||||
(1 << (CHEAT_AR53 - 32)) |
|
||||
(1 << (CHEAT_RCP45 - 32))
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "game/chraction.h"
|
||||
#include "game/debug.h"
|
||||
#include "game/chr.h"
|
||||
#include "game/env.h"
|
||||
#include "game/prop.h"
|
||||
#include "game/propsnd.h"
|
||||
#include "game/objectives.h"
|
||||
|
@ -44,6 +45,7 @@
|
|||
#include "lib/anim.h"
|
||||
#include "lib/collision.h"
|
||||
#include "data.h"
|
||||
#include "gbiex.h"
|
||||
#include "types.h"
|
||||
|
||||
void *var8009ccc0[20];
|
||||
|
@ -4237,8 +4239,7 @@ glabel chr0f0260c4
|
|||
#else
|
||||
// Mismatch: The bottom two tmp calculations should multiply by s32 0xc using
|
||||
// shift operations, however doing this causes it to boot gdlptr out of s8 and
|
||||
// use s8 for s32 0xc. The below multiplies by 6 which is incorrect, but creates
|
||||
// a diff of only one instruction to show that this is the only issue.
|
||||
// use s8 for s32 0xc.
|
||||
void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struct coord *arg3)
|
||||
{
|
||||
struct modelnode *bestnode = NULL;
|
||||
|
@ -4460,7 +4461,7 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
|
|||
|
||||
tmp = ALIGN8((s32)&rodata->vertices[rodata->numvertices]); // s32 0xc
|
||||
} else {
|
||||
tmp = ALIGN8((s32)rodata->vertices + rodata->numvertices * 6); // s32 0xc
|
||||
tmp = ALIGN8((s32)&rodata->vertices[rodata->numvertices]); // s32 0xc
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "game/mpstats.h"
|
||||
#include "bss.h"
|
||||
#include "lib/joy.h"
|
||||
#include "lib/lib_17ce0.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/snd.h"
|
||||
|
@ -5113,16 +5114,14 @@ bool func0f03645c(struct chrdata *chr, struct coord *arg1, s16 *arg2, struct coo
|
|||
f32 ymax;
|
||||
f32 ymin;
|
||||
f32 radius;
|
||||
u32 stack[3];
|
||||
s16 sp32;
|
||||
s16 sp30;
|
||||
s16 rooms[8];
|
||||
struct prop *prop = chr->prop;
|
||||
|
||||
chrGetBbox(prop, &radius, &ymax, &ymin);
|
||||
chrSetPerimEnabled(chr, false);
|
||||
|
||||
if (cdTestCylMove04(arg1, arg2, arg3, &sp30, arg5, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) {
|
||||
if (cdTestCylMove01(arg3, &sp30, arg4, arg5, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) {
|
||||
if (cdTestCylMove04(arg1, arg2, arg3, rooms, arg5, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) {
|
||||
if (cdTestCylMove01(arg3, rooms, arg4, arg5, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "bss.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/ailist.h"
|
||||
#include "lib/model.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
|
|
@ -9511,7 +9511,7 @@ bool aiSayQuip(void)
|
|||
s32 distance; // 116 - not referenced
|
||||
s32 row = cmd[3]; // 112
|
||||
u32 playernum; // 108 - not referenced
|
||||
u8 headshotted = g_Vars.chrdata->hidden2 & CHRH2FLAG_HEADSHOTTED; // 107
|
||||
u8 headshotted = (g_Vars.chrdata->hidden2 & CHRH2FLAG_HEADSHOTTED) & 0xff; // 107
|
||||
struct chrdata *loopchr; // 100
|
||||
|
||||
// Choose bank
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "game/camera.h"
|
||||
#include "game/game_006900.h"
|
||||
#include "game/title.h"
|
||||
#include "game/tex.h"
|
||||
|
@ -972,7 +973,7 @@ Gfx *creditsDrawParticles(Gfx *gdl)
|
|||
|
||||
gDPSetVerticeArray(gdl++, osVirtualToPhysical(vertices), 4);
|
||||
|
||||
gDPTri2(gdl++, 0, 1, 2, 2, 3, 0)
|
||||
gDPTri2(gdl++, 0, 1, 2, 2, 3, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "game/challenge.h"
|
||||
#include "game/chraction.h"
|
||||
#include "game/debug.h"
|
||||
#include "game/gamefile.h"
|
||||
#include "lib/ailist.h"
|
||||
#include "lib/debughud.h"
|
||||
#include "lib/rmon.h"
|
||||
#include "lib/str.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/vm.h"
|
||||
#include "bss.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "game/bossfile.h"
|
||||
#include "game/cheats.h"
|
||||
#include "game/game_006900.h"
|
||||
#include "game/title.h"
|
||||
|
@ -25,6 +26,7 @@
|
|||
#include "bss.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
@ -89,7 +91,7 @@ s32 endscreenHandleRetryMission(s32 operation, struct menudialogdef *dialogdef,
|
|||
}
|
||||
}
|
||||
|
||||
menudialog00103608(operation, dialogdef, data);
|
||||
return menudialog00103608(operation, dialogdef, data);
|
||||
}
|
||||
|
||||
char *endscreenMenuTitleRetryMission(struct menudialogdef *dialogdef)
|
||||
|
|
|
@ -25,22 +25,26 @@ u32 var800810a8 = 0;
|
|||
u32 var800810ac = 0;
|
||||
|
||||
// lensflare, r, g, b, x, y, z, texture size, orb size
|
||||
struct sun sun_00 = { 1, 0xff, 0xff, 0xff, -1000000, 200000, 50000, 20, 48 };
|
||||
struct sun sun_area51 = { 0, 0xff, 0xe0, 0x80, -200000, 310000, 1000000, 20, 48 };
|
||||
struct sun sun_villa = { 1, 0xff, 0xff, 0xff, -1000000, 200000, 50000, 20, 48 };
|
||||
struct sun sun_ci = { 1, 0xff, 0xff, 0xff, 400000, 600000, -1000000, 20, 48 };
|
||||
struct sun sun_skedar = { 1, 0xff, 0xff, 0xff, -400000, 600000, 1000000, 20, 48 };
|
||||
struct sun sun_05 = { 1, 0xff, 0xff, 0xff, 0, 1000000, 1000000, 25, 60 };
|
||||
struct sun sun_06 = { 1, 0xff, 0xff, 0xff, 400000, 600000, 1000000, 15, 36 };
|
||||
struct sun sun_crashsite = { 1, 0xff, 0xd7, 0xf2, 1900000, 300000, -1400000, 22, 48 };
|
||||
struct sun sun_airbase = { 1, 0xff, 0xd7, 0xf2, -1200000, 200000, 150000, 30, 60 };
|
||||
struct sun suns_00[] = { 1, 0xff, 0xff, 0xff, -1000000, 200000, 50000, 20, 48 };
|
||||
struct sun suns_area51[] = { 0, 0xff, 0xe0, 0x80, -200000, 310000, 1000000, 20, 48 };
|
||||
struct sun suns_villa[] = { 1, 0xff, 0xff, 0xff, -1000000, 200000, 50000, 20, 48 };
|
||||
struct sun suns_ci[] = { 1, 0xff, 0xff, 0xff, 400000, 600000, -1000000, 20, 48 };
|
||||
|
||||
struct sun suns_skedar[] = {
|
||||
{ 1, 0xff, 0xff, 0xff, -400000, 600000, 1000000, 20, 48 },
|
||||
{ 1, 0xff, 0xff, 0xff, 0, 1000000, 1000000, 25, 60 },
|
||||
{ 1, 0xff, 0xff, 0xff, 400000, 600000, 1000000, 15, 36 },
|
||||
};
|
||||
|
||||
struct sun suns_crashsite[] = { 1, 0xff, 0xd7, 0xf2, 1900000, 300000, -1400000, 22, 48 };
|
||||
struct sun suns_airbase[] = { 1, 0xff, 0xd7, 0xf2, -1200000, 200000, 150000, 30, 60 };
|
||||
|
||||
struct envtype1 g_EnvironmentsType1[] = {
|
||||
// |--- fog ----| |---- sky -----| |----------- clouds -----------| |--------------- water ---------------|
|
||||
// stage near far 06 08 0a min max r g b sun e scale 1c r g b 20 21 scale type r g b 28
|
||||
{ STAGE_CRASHSITE, 15, 10000, 0, 0, 0, 0x03e2, 0x03e8, 0x9b, 0x2d, 0x1e, 1, &sun_crashsite, 1, 1500, 0x00, 0xfa, 0xfa, 0x00, 0, 0, -5000, 0, 0x00, 0x00, 0x00, 0x00 },
|
||||
{ STAGE_CRASHSITE, 15, 10000, 0, 0, 0, 0x03e2, 0x03e8, 0x9b, 0x2d, 0x1e, 1, suns_crashsite, 1, 1500, 0x00, 0xfa, 0xfa, 0x00, 0, 0, -5000, 0, 0x00, 0x00, 0x00, 0x00 },
|
||||
{ STAGE_PELAGIC, 15, 15000, 3333, 4444, 600, 0x03e3, 0x03e8, 0x2d, 0x3e, 0x60, 0, NULL, 1, 5000, 0x00, 0xf0, 0xf0, 0xf0, 0, 0, -2000, 0, 0x14, 0x21, 0x2b, 0x00 },
|
||||
{ STAGE_VILLA, 15, 20000, 0, 0, 0, 0x03d5, 0x0417, 0x46, 0xa0, 0xff, 1, &sun_villa, 1, 5000, 0x00, 0xff, 0xff, 0xff, 0, 0, -1850, 1, 0x00, 0xff, 0xff, 0x00 },
|
||||
{ STAGE_VILLA, 15, 20000, 0, 0, 0, 0x03d5, 0x0417, 0x46, 0xa0, 0xff, 1, suns_villa, 1, 5000, 0x00, 0xff, 0xff, 0xff, 0, 0, -1850, 1, 0x00, 0xff, 0xff, 0x00 },
|
||||
{ STAGE_PELAGIC + 900, 30, 15000, 3333, 4444, 600, 0x03e3, 0x03e8, 0x10, 0x30, 0x60, 0, NULL, 1, 5000, 0x00, 0xff, 0xff, 0xff, 0, 0, -1000, 0, 0x00, 0x00, 0x00, 0x00 },
|
||||
{ STAGE_24, 2, 25000, 0, 0, 0, 0x03e4, 0x03e8, 0x00, 0x00, 0x00, 0, NULL, 1, 10000, 0x00, 0xff, 0xff, 0xff, 0, 0, 0, 1, 0x00, 0xff, 0xff, 0x07 },
|
||||
{ STAGE_2B, 2, 2000, 2500, 3055, 750, 0x03bd, 0x03e8, 0x20, 0x10, 0x10, 0, NULL, 1, 5000, 0x00, 0x3a, 0x11, 0x00, 0, 0, -1000, 1, 0x00, 0xff, 0xff, 0x14 },
|
||||
|
@ -61,22 +65,22 @@ struct envtype2 g_EnvironmentsType2[] = {
|
|||
{ STAGE_RESCUE, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_MAIANSOS, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_ATTACKSHIP, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 0 },
|
||||
{ STAGE_INFILTRATION, 15, 12000, 0, 0, 0, 0x00, 0x00, 0x00, 1, &sun_area51, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_ESCAPE, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 1, &sun_area51, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_INFILTRATION, 15, 12000, 0, 0, 0, 0x00, 0x00, 0x00, 1, suns_area51, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_ESCAPE, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 1, suns_area51, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_TEST_ARCH, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 0 },
|
||||
{ STAGE_DEEPSEA, 15, 10000, 0, 0, 0, 0x05, 0x00, 0x00, 0, NULL, 0, 0x9b, 0x9b, 0x9b, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 0 },
|
||||
{ STAGE_TEST_DEST, 15, 10000, 0, 0, 0, 0x10, 0x30, 0x60, 0, NULL, 1, 0xe6, 0xe6, 0xe6, 3000, 0, 1, 0xff, 0xff, 0x96, -150, 2, 0, 0 },
|
||||
{ STAGE_TEST_LEN, 15, 10000, 0, 0, 0, 0x30, 0x40, 0x10, 0, NULL, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 0 },
|
||||
{ STAGE_TEST_ASH, 15, 25000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_DEFENSE, 15, 10000, 0, 0, 0, 0x65, 0xb2, 0xff, 1, &sun_ci, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_CITRAINING, 15, 10000, 0, 0, 0, 0x65, 0xb2, 0xff, 1, &sun_ci, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_DUEL, 10, 10000, 0, 0, 0, 0x65, 0xb2, 0xff, 1, &sun_ci, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_RETAKING, 15, 10000, 0, 0, 0, 0x65, 0xb2, 0xff, 1, &sun_ci, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_DEFENSE, 15, 10000, 0, 0, 0, 0x65, 0xb2, 0xff, 1, suns_ci, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_CITRAINING, 15, 10000, 0, 0, 0, 0x65, 0xb2, 0xff, 1, suns_ci, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_DUEL, 10, 10000, 0, 0, 0, 0x65, 0xb2, 0xff, 1, suns_ci, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_RETAKING, 15, 10000, 0, 0, 0, 0x65, 0xb2, 0xff, 1, suns_ci, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_DEFECTION, 10, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0x3a, 0x11, 0x00, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_MBR, 10, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0x3a, 0x11, 0x00, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_EXTRACTION, 10, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0x3a, 0x11, 0x00, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_SKEDARRUINS, 15, 10000, 0, 0, 0, 0x65, 0x65, 0xff, 3, &sun_skedar, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_WAR, 15, 10000, 0, 0, 0, 0x65, 0x65, 0xff, 3, &sun_skedar, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_SKEDARRUINS, 15, 10000, 0, 0, 0, 0x65, 0x65, 0xff, 3, suns_skedar, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_WAR, 15, 10000, 0, 0, 0, 0x65, 0x65, 0xff, 3, suns_skedar, 0, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_TEST_RUN, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0x3a, 0x11, 0x00, 5000, 0, 0, 0x00, 0x00, 0x00, 0, 0, 0, 1 },
|
||||
{ STAGE_MP_SKEDAR, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 1, 0x3a, 0x11, 0x00, 5000, 0, 0, 0x00, 0x00, 0x00, -5000, 0, 0, 1 },
|
||||
{ STAGE_TEST_SILO, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 1, 0x3a, 0x11, 0x00, 5000, 0, 0, 0x00, 0x00, 0x00, -5000, 0, 0, 1 },
|
||||
|
@ -84,7 +88,7 @@ struct envtype2 g_EnvironmentsType2[] = {
|
|||
{ STAGE_G5BUILDING, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0x50, 0x28, 0x0a, 5000, 0, 0, 0x00, 0x00, 0x00, -5000, 0, 0, 1 },
|
||||
{ STAGE_AIRFORCEONE, 15, 20000, 0, 0, 0, 0x00, 0x10, 0x40, 0, NULL, 1, 0xff, 0xff, 0xff, 5000, 0, 1, 0xff, 0xff, 0xff, -5000, 2, 0, 1 },
|
||||
{ STAGE_MP_RAVINE, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 1, 0x50, 0x28, 0x0a, 5000, 0, 0, 0x00, 0x00, 0x00, -31000, 0, 0, 1 },
|
||||
{ STAGE_AIRBASE, 15, 20000, 0, 0, 0, 0x00, 0x10, 0x40, 1, &sun_airbase, 1, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, -5000, 0, 0, 1 },
|
||||
{ STAGE_AIRBASE, 15, 20000, 0, 0, 0, 0x00, 0x10, 0x40, 1, suns_airbase, 1, 0xff, 0xff, 0xff, 5000, 0, 0, 0x00, 0x00, 0x00, -5000, 0, 0, 1 },
|
||||
{ STAGE_INVESTIGATION, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x00, 0, NULL, 0, 0x1e, 0x1e, 0x1e, 5000, 0, 0, 0x00, 0x00, 0x00, -5000, 0, 0, 1 },
|
||||
{ STAGE_MP_PIPES, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x08, 0, NULL, 1, 0x46, 0xc7, 0xba, 4500, 0, 0, 0x00, 0x00, 0x00, -5000, 0, 0, 0 },
|
||||
{ STAGE_MP_G5BUILDING, 15, 10000, 0, 0, 0, 0x00, 0x00, 0x08, 0, NULL, 1, 0x5a, 0x90, 0xa5, 4500, 0, 0, 0x00, 0x00, 0x00, -20000, 0, 0, 0 },
|
||||
|
@ -424,7 +428,7 @@ struct coord *env0f1667e8(void)
|
|||
return var800a65e8;
|
||||
}
|
||||
|
||||
s32 env0f1667f4(struct prop *prop, f32 *arg1)
|
||||
s32 env0f1667f4(struct prop *prop, f32 arg1[4])
|
||||
{
|
||||
if (!g_FogEnabled) {
|
||||
return 2;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "game/utils.h"
|
||||
#include "game/wallhit.h"
|
||||
#include "bss.h"
|
||||
#include "lib/collision.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/rng.h"
|
||||
|
@ -93,19 +94,19 @@ bool explosionCreateComplex(struct prop *prop, struct coord *pos, s16 *rooms, s1
|
|||
bool makescorch = true;
|
||||
s16 room;
|
||||
f32 y;
|
||||
bool sp68;
|
||||
struct prop *collisionprop;
|
||||
|
||||
if (type == EXPLOSIONTYPE_NONE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (prop) {
|
||||
room = cdFindFloorRoomYColourNormalPropAtPos(&prop->pos, prop->rooms, &y, 0, &sp88, &sp68);
|
||||
room = cdFindFloorRoomYColourNormalPropAtPos(&prop->pos, prop->rooms, &y, NULL, &sp88, &collisionprop);
|
||||
sp100.x = prop->pos.x;
|
||||
sp100.y = y;
|
||||
sp100.z = prop->pos.z;
|
||||
} else {
|
||||
room = cdFindFloorRoomYColourNormalPropAtPos(pos, rooms, &y, 0, &sp88, &sp68);
|
||||
room = cdFindFloorRoomYColourNormalPropAtPos(pos, rooms, &y, NULL, &sp88, &collisionprop);
|
||||
sp100.x = pos->x;
|
||||
sp100.y = y;
|
||||
sp100.z = pos->z;
|
||||
|
@ -113,7 +114,7 @@ bool explosionCreateComplex(struct prop *prop, struct coord *pos, s16 *rooms, s1
|
|||
|
||||
etype = &g_ExplosionTypes[type];
|
||||
|
||||
if (sp68 || room <= 0
|
||||
if (collisionprop || room <= 0
|
||||
|| !(pos->y - y <= (etype->rangev + etype->changeratev * etype->duration + etype->innersize) * 0.5f || pos->y - y <= 75)) {
|
||||
makescorch = false;
|
||||
}
|
||||
|
|
|
@ -4137,7 +4137,7 @@ void fileLoad(u8 *dst, u32 allocationlen, u32 *romaddrptr, struct fileinfo *info
|
|||
dmaExec(dst, *romaddrptr, romsize);
|
||||
} else {
|
||||
// DMA the compressed data to scratch space then inflate
|
||||
u8 *scratch = (dst + allocationlen) - (romsize + 7 & 0xfffffff8);
|
||||
u8 *scratch = (dst + allocationlen) - ((romsize + 7) & 0xfffffff8);
|
||||
|
||||
if ((u32)scratch - (u32)dst < 8) {
|
||||
info->loadedsize = 0;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "game/utils.h"
|
||||
#include "bss.h"
|
||||
#include "lib/fault.h"
|
||||
#include "lib/joy.h"
|
||||
#include "lib/snd.h"
|
||||
#include "lib/mema.h"
|
||||
#include "data.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "game/utils.h"
|
||||
#include "bss.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/joy.h"
|
||||
#include "lib/mema.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "game/propsnd.h"
|
||||
#include "game/bg.h"
|
||||
#include "bss.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "data.h"
|
||||
|
@ -162,7 +163,6 @@ void footstepCheckDefault(struct chrdata *chr)
|
|||
s32 soundnum;
|
||||
f32 prevframe = chr->oldframe;
|
||||
f32 frame = chr->model->anim->frame;
|
||||
f32 stack;
|
||||
s32 i;
|
||||
|
||||
chr->oldframe = frame;
|
||||
|
|
|
@ -110,40 +110,40 @@ u32 var8007fb30 = 0x00000000;
|
|||
u32 var8007fb34 = 0x00000000;
|
||||
u32 var8007fb38 = 0x00000000;
|
||||
|
||||
u32 var8007fb3c = 0xff00ff00;
|
||||
u32 var8007fb40 = 0xff00ff00;
|
||||
u32 var8007fb44 = 0xff00ff00;
|
||||
u32 var8007fb48 = 0xff00ff00;
|
||||
u32 var8007fb4c = 0xff00ff24;
|
||||
u32 var8007fb50 = 0xff48ff6c;
|
||||
u32 var8007fb54 = 0xff90ffb4;
|
||||
u32 var8007fb58 = 0xffd8ffff;
|
||||
u32 var8007fb5c = 0xff00ff58;
|
||||
u32 var8007fb60 = 0xff74ff90;
|
||||
u32 var8007fb64 = 0xffacffc8;
|
||||
u32 var8007fb68 = 0xffe4ffff;
|
||||
u32 var8007fb6c = 0xffffffff;
|
||||
u32 var8007fb70 = 0xffffffff;
|
||||
u32 var8007fb74 = 0xffffffff;
|
||||
u32 var8007fb78 = 0xffffffff;
|
||||
u32 var8007fb7c = 0xff00ff00;
|
||||
u32 var8007fb80 = 0xff00ff00;
|
||||
u32 var8007fb84 = 0xff00ff00;
|
||||
u32 var8007fb88 = 0xff00ff00;
|
||||
u32 var8007fb8c = 0xff00ff18;
|
||||
u32 var8007fb90 = 0xff30ff5c;
|
||||
u32 var8007fb94 = 0xff88ffb4;
|
||||
u32 var8007fb98 = 0xffd8ffff;
|
||||
u16 var8007fb3c[] = {
|
||||
0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00,
|
||||
0xff00, 0xff24, 0xff48, 0xff6c, 0xff90, 0xffb4, 0xffd8, 0xffff,
|
||||
};
|
||||
|
||||
u16 var8007fb5c[] = {
|
||||
0xff00, 0xff58, 0xff74, 0xff90, 0xffac, 0xffc8, 0xffe4, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
};
|
||||
|
||||
u16 var8007fb7c[] = {
|
||||
0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00,
|
||||
0xff00, 0xff18, 0xff30, 0xff5c, 0xff88, 0xffb4, 0xffd8, 0xffff,
|
||||
};
|
||||
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
u32 var800801d8jf = 0xff00ff11;
|
||||
u32 var800801dcjf = 0xff22ff33;
|
||||
u32 var800801e0jf = 0xff44ff55;
|
||||
u32 var800801e4jf = 0xff66ff77;
|
||||
u32 var800801e8jf = 0xff88ff99;
|
||||
u32 var800801ecjf = 0xffaaffbb;
|
||||
u32 var800801f0jf = 0xffccffdd;
|
||||
u32 var800801f4jf = 0xffeeffff;
|
||||
u16 var800801d8jf[] = {
|
||||
0xff00,
|
||||
0xff11,
|
||||
0xff22,
|
||||
0xff33,
|
||||
0xff44,
|
||||
0xff55,
|
||||
0xff66,
|
||||
0xff77,
|
||||
0xff88,
|
||||
0xff99,
|
||||
0xffaa,
|
||||
0xffbb,
|
||||
0xffcc,
|
||||
0xffdd,
|
||||
0xffee,
|
||||
0xffff,
|
||||
};
|
||||
#endif
|
||||
|
||||
bool var8007fb9c = false;
|
||||
|
@ -873,7 +873,7 @@ u32 textApplyProjectionColour(s32 x, s32 y, u32 colour)
|
|||
intensity = 255 - (u32) weightf;
|
||||
result = intensity << 8 | intensity | intensity << 16 | intensity << 24;
|
||||
} else if (g_Blend.diagtimer - (f14 + f16) < f12) {
|
||||
result = ((colour & 0xff) + 0xff) >> 1 | colour & 0xffffff00;
|
||||
result = (((colour & 0xff) + 0xff) >> 1) | (colour & 0xffffff00);
|
||||
} else if ((g_Blend.diagtimer - (f14 + f18 + f16)) < f12) {
|
||||
u32 colour2 = (((colour & 0xff) + 0xff) / 2) | (colour & 0xffffff00);
|
||||
weightf = (f12 - (g_Blend.diagtimer - (f14 + f18 + f16))) / f18 * 255.0f;
|
||||
|
@ -1925,14 +1925,14 @@ Gfx *text0f154f38(Gfx *gdl, s32 *arg1, struct fontchar *curchar, struct fontchar
|
|||
|
||||
if (curchar->index >= 0x80) {
|
||||
if (!var80080104jf) {
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(&var800801d8jf));
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(var800801d8jf));
|
||||
var80080104jf = 1;
|
||||
gDPLoadSync(gdl++);
|
||||
gDPLoadTLUTCmd(gdl++, 6, 15);
|
||||
}
|
||||
} else {
|
||||
if (var80080104jf) {
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(&var8007fb3c));
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(var8007fb3c));
|
||||
var80080104jf = 0;
|
||||
gDPLoadSync(gdl++);
|
||||
gDPLoadTLUTCmd(gdl++, 6, 15);
|
||||
|
@ -2044,10 +2044,10 @@ Gfx *text0f1552d4(Gfx *gdl, f32 x, f32 y, f32 widthscale, f32 heightscale,
|
|||
gDPSetTextureLUT(gdl++, G_TT_IA16);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(&var800801d8jf));
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(var800801d8jf));
|
||||
var80080104jf = true;
|
||||
#else
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(&var8007fb3c));
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(var8007fb3c));
|
||||
#endif
|
||||
|
||||
gDPLoadSync(gdl++);
|
||||
|
@ -2170,7 +2170,7 @@ Gfx *text0f15568c(Gfx *gdl, s32 *x, s32 *y, struct fontchar *curchar, struct fon
|
|||
|
||||
if (curchar->index >= 0x80) {
|
||||
if (!var80080104jf) {
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(&var800801d8jf));
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(var800801d8jf));
|
||||
|
||||
var80080104jf = true;
|
||||
|
||||
|
@ -2179,7 +2179,7 @@ Gfx *text0f15568c(Gfx *gdl, s32 *x, s32 *y, struct fontchar *curchar, struct fon
|
|||
}
|
||||
} else {
|
||||
if (var80080104jf) {
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(&var8007fb3c));
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(var8007fb3c));
|
||||
|
||||
var80080104jf = false;
|
||||
|
||||
|
@ -2546,10 +2546,10 @@ Gfx *textRenderProjected(Gfx *gdl, s32 *x, s32 *y, char *text, struct fontchar *
|
|||
gDPSetTextureLUT(gdl++, G_TT_IA16);
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(&var800801d8jf));
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(var800801d8jf));
|
||||
var80080104jf = 1;
|
||||
#else
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(&var8007fb3c));
|
||||
gDPSetTextureImage(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, osVirtualToPhysical(var8007fb3c));
|
||||
#endif
|
||||
|
||||
gDPLoadSync(gdl++);
|
||||
|
|
|
@ -56,7 +56,7 @@ void mblurAllocate(void)
|
|||
}
|
||||
|
||||
var800844f0 = mempAlloc(var800ab7c0 * var800ab7c4 * 2 + 0x40, MEMPOOL_STAGE);
|
||||
var800844f0 = (void *)((u32)var800844f0 + 0x3f & ~0x3f);
|
||||
var800844f0 = (void *)(((u32) var800844f0 + 0x3f) & ~0x3f);
|
||||
var800844f4 = var800844f0;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "bss.h"
|
||||
#include "lib/fault.h"
|
||||
#include "lib/snd.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
#include "game/gfxmemory.h"
|
||||
#include "game/stubs/game_175f50.h"
|
||||
#include "bss.h"
|
||||
#include "lib/args.h"
|
||||
#include "lib/rzip.h"
|
||||
#include "lib/dma.h"
|
||||
#include "lib/memp.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "game/file.h"
|
||||
#include "bss.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "data.h"
|
||||
|
|
|
@ -16,10 +16,12 @@
|
|||
#include "bss.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/snd.h"
|
||||
#include "lib/str.h"
|
||||
#include "lib/memp.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
#include "string.h"
|
||||
|
||||
u32 g_NextHudMessageId;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "game/activemenu.h"
|
||||
#include "game/atan2f.h"
|
||||
#include "game/bg.h"
|
||||
#include "game/body.h"
|
||||
#include "game/bondgun.h"
|
||||
#include "game/bondhead.h"
|
||||
#include "game/bondmove.h"
|
||||
|
@ -31,6 +32,8 @@
|
|||
#include "game/game_1531a0.h"
|
||||
#include "game/game_176080.h"
|
||||
#include "game/challenge.h"
|
||||
#include "game/chrmgr.h"
|
||||
#include "game/env.h"
|
||||
#include "game/gfxmemory.h"
|
||||
#include "game/gunfx.h"
|
||||
#include "game/hudmsg.h"
|
||||
|
@ -53,10 +56,12 @@
|
|||
#include "game/propobj.h"
|
||||
#include "game/propobjstop.h"
|
||||
#include "game/propsnd.h"
|
||||
#include "game/room.h"
|
||||
#include "game/savebuffer.h"
|
||||
#include "game/setup.h"
|
||||
#include "game/shards.h"
|
||||
#include "game/sky.h"
|
||||
#include "game/smoke.h"
|
||||
#include "game/sparks.h"
|
||||
#include "game/splat.h"
|
||||
#include "game/stars.h"
|
||||
|
@ -66,6 +71,7 @@
|
|||
#include "game/stubs/game_0153f0.h"
|
||||
#include "game/stubs/game_015400.h"
|
||||
#include "game/stubs/game_015410.h"
|
||||
#include "game/tex.h"
|
||||
#include "game/texdecompress.h"
|
||||
#include "game/tiles.h"
|
||||
#include "game/title.h"
|
||||
|
@ -84,6 +90,7 @@
|
|||
#include "lib/mtx.h"
|
||||
#include "lib/music.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/sched.h"
|
||||
#include "lib/snd.h"
|
||||
#include "lib/vars.h"
|
||||
#include "lib/vi.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "game/bossfile.h"
|
||||
#include "game/cheats.h"
|
||||
#include "game/setup.h"
|
||||
#include "game/title.h"
|
||||
|
@ -24,8 +25,10 @@
|
|||
#include "game/options.h"
|
||||
#include "bss.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/joy.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/snd.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "game/menugfx.h"
|
||||
#include "game/menuitem.h"
|
||||
#include "game/menu.h"
|
||||
#include "game/filelist.h"
|
||||
#include "game/filemgr.h"
|
||||
#include "game/credits.h"
|
||||
#include "game/game_1531a0.h"
|
||||
|
@ -41,6 +42,7 @@
|
|||
#include "lib/snd.h"
|
||||
#include "lib/memp.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/str.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "lib/lib_317f0.h"
|
||||
#include "data.h"
|
||||
|
@ -1713,13 +1715,7 @@ void func0f0f37a4(struct menu840 *arg0)
|
|||
arg0->unk554 = -1.0f;
|
||||
}
|
||||
|
||||
u32 var80071468 = 0x96969600;
|
||||
u32 var8007146c = 0x96969600;
|
||||
|
||||
u32 var80071470 = 0xffffff00;
|
||||
u32 var80071474 = 0xffffff00;
|
||||
u32 var80071478 = 0xb24d2e00;
|
||||
u32 var8007147c = 0x00000000;
|
||||
Lights1 var80071468 = gdSPDefLights1(0x96, 0x96, 0x96, 0xff, 0xff, 0xff, 0xb2, 0x4d, 0x2e);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
/**
|
||||
|
@ -2310,9 +2306,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
}
|
||||
}
|
||||
|
||||
gSPNumLights(gdl++, 1);
|
||||
gSPLight(gdl++, &var80071470, 1);
|
||||
gSPLight(gdl++, &var80071468, 2);
|
||||
gSPSetLights1(gdl++, var80071468);
|
||||
gSPLookAtX(gdl++, &camGetLookAt()->l[0]);
|
||||
gSPLookAtY(gdl++, &camGetLookAt()->l[1]);
|
||||
|
||||
|
@ -5635,7 +5629,7 @@ void func0f0f820c(struct menudialogdef *dialogdef, s32 root)
|
|||
g_MenuData.unk00c = dialogdef;
|
||||
}
|
||||
|
||||
bool menuSetBackground(s32 bg)
|
||||
void menuSetBackground(s32 bg)
|
||||
{
|
||||
// Can only screenshot if there is no background already,
|
||||
// because we want a clean screenshot
|
||||
|
|
|
@ -549,447 +549,447 @@ Gfx *menugfxDrawListGroupHeader(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, s32 x3
|
|||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
glabel menugfxDrawListGroupHeader
|
||||
/* f0ded8c: 27bdff70 */ addiu $sp,$sp,-144
|
||||
/* f0ded90: afbf003c */ sw $ra,0x3c($sp)
|
||||
/* f0ded94: afa40090 */ sw $a0,0x90($sp)
|
||||
/* f0ded98: afb20038 */ sw $s2,0x38($sp)
|
||||
/* f0ded9c: afb10034 */ sw $s1,0x34($sp)
|
||||
/* f0deda0: afb00030 */ sw $s0,0x30($sp)
|
||||
/* f0deda4: afa50094 */ sw $a1,0x94($sp)
|
||||
/* f0deda8: afa60098 */ sw $a2,0x98($sp)
|
||||
/* f0dedac: afa7009c */ sw $a3,0x9c($sp)
|
||||
/* f0dedb0: 0fc588c3 */ jal gfxAllocateColours
|
||||
/* f0dedb4: 24040007 */ addiu $a0,$zero,0x7
|
||||
/* f0dedb8: 00408825 */ or $s1,$v0,$zero
|
||||
/* f0dedbc: 0fc588a9 */ jal gfxAllocateVertices
|
||||
/* f0dedc0: 24040009 */ addiu $a0,$zero,0x9
|
||||
/* f0dedc4: 8fae0090 */ lw $t6,0x90($sp)
|
||||
/* f0dedc8: 3c18e700 */ lui $t8,0xe700
|
||||
/* f0dedcc: 00408025 */ or $s0,$v0,$zero
|
||||
/* f0dedd0: 25cf0008 */ addiu $t7,$t6,0x8
|
||||
/* f0dedd4: afaf0090 */ sw $t7,0x90($sp)
|
||||
/* f0dedd8: adc00004 */ sw $zero,0x4($t6)
|
||||
/* f0deddc: add80000 */ sw $t8,0x0($t6)
|
||||
glabel menugfxDrawListGroupHeader
|
||||
/* f0ded8c: 27bdff70 */ addiu $sp,$sp,-144
|
||||
/* f0ded90: afbf003c */ sw $ra,0x3c($sp)
|
||||
/* f0ded94: afa40090 */ sw $a0,0x90($sp)
|
||||
/* f0ded98: afb20038 */ sw $s2,0x38($sp)
|
||||
/* f0ded9c: afb10034 */ sw $s1,0x34($sp)
|
||||
/* f0deda0: afb00030 */ sw $s0,0x30($sp)
|
||||
/* f0deda4: afa50094 */ sw $a1,0x94($sp)
|
||||
/* f0deda8: afa60098 */ sw $a2,0x98($sp)
|
||||
/* f0dedac: afa7009c */ sw $a3,0x9c($sp)
|
||||
/* f0dedb0: 0fc588c3 */ jal gfxAllocateColours
|
||||
/* f0dedb4: 24040007 */ addiu $a0,$zero,0x7
|
||||
/* f0dedb8: 00408825 */ or $s1,$v0,$zero
|
||||
/* f0dedbc: 0fc588a9 */ jal gfxAllocateVertices
|
||||
/* f0dedc0: 24040009 */ addiu $a0,$zero,0x9
|
||||
/* f0dedc4: 8fae0090 */ lw $t6,0x90($sp)
|
||||
/* f0dedc8: 3c18e700 */ lui $t8,0xe700
|
||||
/* f0dedcc: 00408025 */ or $s0,$v0,$zero
|
||||
/* f0dedd0: 25cf0008 */ addiu $t7,$t6,0x8
|
||||
/* f0dedd4: afaf0090 */ sw $t7,0x90($sp)
|
||||
/* f0dedd8: adc00004 */ sw $zero,0x4($t6)
|
||||
/* f0deddc: add80000 */ sw $t8,0x0($t6)
|
||||
/* f0dede0: 8fb90090 */ lw $t9,0x90($sp)
|
||||
/* f0dede4: 3c0fba00 */ lui $t7,0xba00
|
||||
/* f0dede8: 35ef1402 */ ori $t7,$t7,0x1402
|
||||
/* f0dedec: 272e0008 */ addiu $t6,$t9,0x8
|
||||
/* f0dedf0: afae0090 */ sw $t6,0x90($sp)
|
||||
/* f0dedf4: af200004 */ sw $zero,0x4($t9)
|
||||
/* f0dedf8: af2f0000 */ sw $t7,0x0($t9)
|
||||
/* f0dede4: 3c0fba00 */ lui $t7,0xba00
|
||||
/* f0dede8: 35ef1402 */ ori $t7,$t7,0x1402
|
||||
/* f0dedec: 272e0008 */ addiu $t6,$t9,0x8
|
||||
/* f0dedf0: afae0090 */ sw $t6,0x90($sp)
|
||||
/* f0dedf4: af200004 */ sw $zero,0x4($t9)
|
||||
/* f0dedf8: af2f0000 */ sw $t7,0x0($t9)
|
||||
/* f0dedfc: 8fb80090 */ lw $t8,0x90($sp)
|
||||
/* f0dee00: 3c0eb900 */ lui $t6,0xb900
|
||||
/* f0dee04: 35ce0002 */ ori $t6,$t6,0x2
|
||||
/* f0dee08: 27190008 */ addiu $t9,$t8,0x8
|
||||
/* f0dee0c: afb90090 */ sw $t9,0x90($sp)
|
||||
/* f0dee10: af000004 */ sw $zero,0x4($t8)
|
||||
/* f0dee14: af0e0000 */ sw $t6,0x0($t8)
|
||||
/* f0dee00: 3c0eb900 */ lui $t6,0xb900
|
||||
/* f0dee04: 35ce0002 */ ori $t6,$t6,0x2
|
||||
/* f0dee08: 27190008 */ addiu $t9,$t8,0x8
|
||||
/* f0dee0c: afb90090 */ sw $t9,0x90($sp)
|
||||
/* f0dee10: af000004 */ sw $zero,0x4($t8)
|
||||
/* f0dee14: af0e0000 */ sw $t6,0x0($t8)
|
||||
/* f0dee18: 8faf0090 */ lw $t7,0x90($sp)
|
||||
/* f0dee1c: 3c19fc12 */ lui $t9,0xfc12
|
||||
/* f0dee20: 37397e24 */ ori $t9,$t9,0x7e24
|
||||
/* f0dee24: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0dee1c: 3c19fc12 */ lui $t9,0xfc12
|
||||
/* f0dee20: 37397e24 */ ori $t9,$t9,0x7e24
|
||||
/* f0dee24: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0dee28: afb80090 */ sw $t8,0x90($sp)
|
||||
/* f0dee2c: 240ef9fc */ addiu $t6,$zero,-1540
|
||||
/* f0dee30: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0dee34: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0dee2c: 240ef9fc */ addiu $t6,$zero,-1540
|
||||
/* f0dee30: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0dee34: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0dee38: 8faf0090 */ lw $t7,0x90($sp)
|
||||
/* f0dee3c: 3c19b600 */ lui $t9,0xb600
|
||||
/* f0dee40: 240e3000 */ addiu $t6,$zero,0x3000
|
||||
/* f0dee44: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0dee48: afb80090 */ sw $t8,0x90($sp)
|
||||
/* f0dee4c: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0dee50: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0dee3c: 3c19b600 */ lui $t9,0xb600
|
||||
/* f0dee40: 240e3000 */ addiu $t6,$zero,0x3000
|
||||
/* f0dee44: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0dee48: afb80090 */ sw $t8,0x90($sp)
|
||||
/* f0dee4c: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0dee50: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0dee54: 8faf0090 */ lw $t7,0x90($sp)
|
||||
/* f0dee58: 3c19ba00 */ lui $t9,0xba00
|
||||
/* f0dee5c: 37390c02 */ ori $t9,$t9,0xc02
|
||||
/* f0dee60: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0dee58: 3c19ba00 */ lui $t9,0xba00
|
||||
/* f0dee5c: 37390c02 */ ori $t9,$t9,0xc02
|
||||
/* f0dee60: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0dee64: afb80090 */ sw $t8,0x90($sp)
|
||||
/* f0dee68: 240e2000 */ addiu $t6,$zero,0x2000
|
||||
/* f0dee6c: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0dee68: 240e2000 */ addiu $t6,$zero,0x2000
|
||||
/* f0dee6c: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0dee70: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0dee74: 240f0002 */ addiu $t7,$zero,0x2
|
||||
/* f0dee78: 24180001 */ addiu $t8,$zero,0x1
|
||||
/* f0dee7c: afb80014 */ sw $t8,0x14($sp)
|
||||
/* f0dee80: afaf0010 */ sw $t7,0x10($sp)
|
||||
/* f0dee74: 240f0002 */ addiu $t7,$zero,0x2
|
||||
/* f0dee78: 24180001 */ addiu $t8,$zero,0x1
|
||||
/* f0dee7c: afb80014 */ sw $t8,0x14($sp)
|
||||
/* f0dee80: afaf0010 */ sw $t7,0x10($sp)
|
||||
/* f0dee84: afa00018 */ sw $zero,0x18($sp)
|
||||
/* f0dee88: 27a40090 */ addiu $a0,$sp,0x90
|
||||
/* f0dee8c: 00002825 */ or $a1,$zero,$zero
|
||||
/* f0dee90: 24060002 */ addiu $a2,$zero,0x2
|
||||
/* f0dee94: 0fc2c5c8 */ jal texSelect
|
||||
/* f0dee98: 00003825 */ or $a3,$zero,$zero
|
||||
/* f0dee88: 27a40090 */ addiu $a0,$sp,0x90
|
||||
/* f0dee8c: 00002825 */ or $a1,$zero,$zero
|
||||
/* f0dee90: 24060002 */ addiu $a2,$zero,0x2
|
||||
/* f0dee94: 0fc2c5c8 */ jal texSelect
|
||||
/* f0dee98: 00003825 */ or $a3,$zero,$zero
|
||||
/* f0dee9c: 8fab0094 */ lw $t3,0x94($sp)
|
||||
/* f0deea0: 2404000a */ addiu $a0,$zero,0xa
|
||||
/* f0deea0: 2404000a */ addiu $a0,$zero,0xa
|
||||
/* f0deea4: 8fac0098 */ lw $t4,0x98($sp)
|
||||
/* f0deea8: 01640019 */ multu $t3,$a0
|
||||
/* f0deeac: 8fad009c */ lw $t5,0x9c($sp)
|
||||
/* f0deeb0: 8fb90090 */ lw $t9,0x90($sp)
|
||||
/* f0deea8: 01640019 */ multu $t3,$a0
|
||||
/* f0deeac: 8fad009c */ lw $t5,0x9c($sp)
|
||||
/* f0deeb0: 8fb90090 */ lw $t9,0x90($sp)
|
||||
/* f0deeb4: 8faa00a0 */ lw $t2,0xa0($sp)
|
||||
/* f0deeb8: 3c0fb900 */ lui $t7,0xb900
|
||||
/* f0deebc: 272e0008 */ addiu $t6,$t9,0x8
|
||||
/* f0deeb8: 3c0fb900 */ lui $t7,0xb900
|
||||
/* f0deebc: 272e0008 */ addiu $t6,$t9,0x8
|
||||
/* f0deec0: afae0090 */ sw $t6,0x90($sp)
|
||||
/* f0deec4: 3c180050 */ lui $t8,0x50
|
||||
/* f0deec8: 37184240 */ ori $t8,$t8,0x4240
|
||||
/* f0deecc: 35ef031d */ ori $t7,$t7,0x31d
|
||||
/* f0deed0: 00002812 */ mflo $a1
|
||||
/* f0deed4: af2f0000 */ sw $t7,0x0($t9)
|
||||
/* f0deec4: 3c180050 */ lui $t8,0x50
|
||||
/* f0deec8: 37184240 */ ori $t8,$t8,0x4240
|
||||
/* f0deecc: 35ef031d */ ori $t7,$t7,0x31d
|
||||
/* f0deed0: 00002812 */ mflo $a1
|
||||
/* f0deed4: af2f0000 */ sw $t7,0x0($t9)
|
||||
/* f0deed8: af380004 */ sw $t8,0x4($t9)
|
||||
/* f0deedc: 01840019 */ multu $t4,$a0
|
||||
/* f0deee0: 03201825 */ or $v1,$t9,$zero
|
||||
/* f0deee4: 014c9021 */ addu $s2,$t2,$t4
|
||||
/* f0deee8: 2402fff6 */ addiu $v0,$zero,-10
|
||||
/* f0deeec: a6050000 */ sh $a1,0x0($s0)
|
||||
/* f0deef0: a6020004 */ sh $v0,0x4($s0)
|
||||
/* f0deef4: a6020010 */ sh $v0,0x10($s0)
|
||||
/* f0deef8: a6050018 */ sh $a1,0x18($s0)
|
||||
/* f0deefc: a602001c */ sh $v0,0x1c($s0)
|
||||
/* f0deedc: 01840019 */ multu $t4,$a0
|
||||
/* f0deee0: 03201825 */ or $v1,$t9,$zero
|
||||
/* f0deee4: 014c9021 */ addu $s2,$t2,$t4
|
||||
/* f0deee8: 2402fff6 */ addiu $v0,$zero,-10
|
||||
/* f0deeec: a6050000 */ sh $a1,0x0($s0)
|
||||
/* f0deef0: a6020004 */ sh $v0,0x4($s0)
|
||||
/* f0deef4: a6020010 */ sh $v0,0x10($s0)
|
||||
/* f0deef8: a6050018 */ sh $a1,0x18($s0)
|
||||
/* f0deefc: a602001c */ sh $v0,0x1c($s0)
|
||||
/* f0def00: a6020028 */ sh $v0,0x28($s0)
|
||||
/* f0def04: 00003012 */ mflo $a2
|
||||
/* f0def08: a6060002 */ sh $a2,0x2($s0)
|
||||
/* f0def04: 00003012 */ mflo $a2
|
||||
/* f0def08: a6060002 */ sh $a2,0x2($s0)
|
||||
/* f0def0c: a606000e */ sh $a2,0xe($s0)
|
||||
/* f0def10: 01a40019 */ multu $t5,$a0
|
||||
/* f0def14: a6050030 */ sh $a1,0x30($s0)
|
||||
/* f0def18: a6020034 */ sh $v0,0x34($s0)
|
||||
/* f0def10: 01a40019 */ multu $t5,$a0
|
||||
/* f0def14: a6050030 */ sh $a1,0x30($s0)
|
||||
/* f0def18: a6020034 */ sh $v0,0x34($s0)
|
||||
/* f0def1c: a6020040 */ sh $v0,0x40($s0)
|
||||
/* f0def20: 240f0018 */ addiu $t7,$zero,0x18
|
||||
/* f0def24: 24050008 */ addiu $a1,$zero,0x8
|
||||
/* f0def28: 2418000c */ addiu $t8,$zero,0xc
|
||||
/* f0def2c: 00003812 */ mflo $a3
|
||||
/* f0def20: 240f0018 */ addiu $t7,$zero,0x18
|
||||
/* f0def24: 24050008 */ addiu $a1,$zero,0x8
|
||||
/* f0def28: 2418000c */ addiu $t8,$zero,0xc
|
||||
/* f0def2c: 00003812 */ mflo $a3
|
||||
/* f0def30: a607000c */ sh $a3,0xc($s0)
|
||||
/* f0def34: 06410003 */ bgez $s2,.NB0f0def44
|
||||
/* f0def38: 0012c843 */ sra $t9,$s2,0x1
|
||||
/* f0def3c: 26410001 */ addiu $at,$s2,0x1
|
||||
/* f0def40: 0001c843 */ sra $t9,$at,0x1
|
||||
.NB0f0def44:
|
||||
/* f0def44: 03240019 */ multu $t9,$a0
|
||||
/* f0def48: a6070024 */ sh $a3,0x24($s0)
|
||||
/* f0def34: 06410003 */ bgez $s2,.NB0f0def44
|
||||
/* f0def38: 0012c843 */ sra $t9,$s2,0x1
|
||||
/* f0def3c: 26410001 */ addiu $at,$s2,0x1
|
||||
/* f0def40: 0001c843 */ sra $t9,$at,0x1
|
||||
.NB0f0def44:
|
||||
/* f0def44: 03240019 */ multu $t9,$a0
|
||||
/* f0def48: a6070024 */ sh $a3,0x24($s0)
|
||||
/* f0def4c: a607003c */ sh $a3,0x3c($s0)
|
||||
/* f0def50: 03209025 */ or $s2,$t9,$zero
|
||||
/* f0def54: 24190010 */ addiu $t9,$zero,0x10
|
||||
/* f0def58: 00004012 */ mflo $t0
|
||||
/* f0def5c: a608001a */ sh $t0,0x1a($s0)
|
||||
/* f0def50: 03209025 */ or $s2,$t9,$zero
|
||||
/* f0def54: 24190010 */ addiu $t9,$zero,0x10
|
||||
/* f0def58: 00004012 */ mflo $t0
|
||||
/* f0def5c: a608001a */ sh $t0,0x1a($s0)
|
||||
/* f0def60: a6080026 */ sh $t0,0x26($s0)
|
||||
/* f0def64: 01440019 */ multu $t2,$a0
|
||||
/* f0def68: 00001812 */ mflo $v1
|
||||
/* f0def6c: a6030032 */ sh $v1,0x32($s0)
|
||||
/* f0def70: a603003e */ sh $v1,0x3e($s0)
|
||||
/* f0def74: 8fae00a4 */ lw $t6,0xa4($sp)
|
||||
/* f0def78: a20f0013 */ sb $t7,0x13($s0)
|
||||
/* f0def64: 01440019 */ multu $t2,$a0
|
||||
/* f0def68: 00001812 */ mflo $v1
|
||||
/* f0def6c: a6030032 */ sh $v1,0x32($s0)
|
||||
/* f0def70: a603003e */ sh $v1,0x3e($s0)
|
||||
/* f0def74: 8fae00a4 */ lw $t6,0xa4($sp)
|
||||
/* f0def78: a20f0013 */ sb $t7,0x13($s0)
|
||||
/* f0def7c: a606004a */ sh $a2,0x4a($s0)
|
||||
/* f0def80: 01c40019 */ multu $t6,$a0
|
||||
/* f0def84: 24040004 */ addiu $a0,$zero,0x4
|
||||
/* f0def88: a204001f */ sb $a0,0x1f($s0)
|
||||
/* f0def80: 01c40019 */ multu $t6,$a0
|
||||
/* f0def84: 24040004 */ addiu $a0,$zero,0x4
|
||||
/* f0def88: a204001f */ sb $a0,0x1f($s0)
|
||||
/* f0def8c: a204002b */ sb $a0,0x2b($s0)
|
||||
/* f0def90: 016d2021 */ addu $a0,$t3,$t5
|
||||
/* f0def94: a2050037 */ sb $a1,0x37($s0)
|
||||
/* f0def90: 016d2021 */ addu $a0,$t3,$t5
|
||||
/* f0def94: a2050037 */ sb $a1,0x37($s0)
|
||||
/* f0def98: a2050043 */ sb $a1,0x43($s0)
|
||||
/* f0def9c: 240e0014 */ addiu $t6,$zero,0x14
|
||||
/* f0defa0: a602004c */ sh $v0,0x4c($s0)
|
||||
/* f0def9c: 240e0014 */ addiu $t6,$zero,0x14
|
||||
/* f0defa0: a602004c */ sh $v0,0x4c($s0)
|
||||
/* f0defa4: a6080056 */ sh $t0,0x56($s0)
|
||||
/* f0defa8: 00004812 */ mflo $t1
|
||||
/* f0defac: a6090048 */ sh $t1,0x48($s0)
|
||||
/* f0defb0: a6090054 */ sh $t1,0x54($s0)
|
||||
/* f0defb4: a6020058 */ sh $v0,0x58($s0)
|
||||
/* f0defb8: a6090060 */ sh $t1,0x60($s0)
|
||||
/* f0defbc: a6030062 */ sh $v1,0x62($s0)
|
||||
/* f0defc0: a6020064 */ sh $v0,0x64($s0)
|
||||
/* f0defc4: a2000007 */ sb $zero,0x7($s0)
|
||||
/* f0defc8: a218004f */ sb $t8,0x4f($s0)
|
||||
/* f0defcc: a219005b */ sb $t9,0x5b($s0)
|
||||
/* f0defa8: 00004812 */ mflo $t1
|
||||
/* f0defac: a6090048 */ sh $t1,0x48($s0)
|
||||
/* f0defb0: a6090054 */ sh $t1,0x54($s0)
|
||||
/* f0defb4: a6020058 */ sh $v0,0x58($s0)
|
||||
/* f0defb8: a6090060 */ sh $t1,0x60($s0)
|
||||
/* f0defbc: a6030062 */ sh $v1,0x62($s0)
|
||||
/* f0defc0: a6020064 */ sh $v0,0x64($s0)
|
||||
/* f0defc4: a2000007 */ sb $zero,0x7($s0)
|
||||
/* f0defc8: a218004f */ sb $t8,0x4f($s0)
|
||||
/* f0defcc: a219005b */ sb $t9,0x5b($s0)
|
||||
/* f0defd0: a20e0067 */ sb $t6,0x67($s0)
|
||||
/* f0defd4: 04810003 */ bgez $a0,.NB0f0defe4
|
||||
/* f0defd8: 00047843 */ sra $t7,$a0,0x1
|
||||
/* f0defdc: 24810001 */ addiu $at,$a0,0x1
|
||||
/* f0defe0: 00017843 */ sra $t7,$at,0x1
|
||||
.NB0f0defe4:
|
||||
/* f0defe4: 01e02025 */ or $a0,$t7,$zero
|
||||
/* f0defe8: afaf0050 */ sw $t7,0x50($sp)
|
||||
/* f0defd4: 04810003 */ bgez $a0,.NB0f0defe4
|
||||
/* f0defd8: 00047843 */ sra $t7,$a0,0x1
|
||||
/* f0defdc: 24810001 */ addiu $at,$a0,0x1
|
||||
/* f0defe0: 00017843 */ sra $t7,$at,0x1
|
||||
.NB0f0defe4:
|
||||
/* f0defe4: 01e02025 */ or $a0,$t7,$zero
|
||||
/* f0defe8: afaf0050 */ sw $t7,0x50($sp)
|
||||
/* f0defec: afb20044 */ sw $s2,0x44($sp)
|
||||
/* f0deff0: 02402825 */ or $a1,$s2,$zero
|
||||
/* f0deff4: 0fc53a82 */ jal text0f1543ac
|
||||
/* f0deff8: 2406ffff */ addiu $a2,$zero,-1
|
||||
/* f0deff0: 02402825 */ or $a1,$s2,$zero
|
||||
/* f0deff4: 0fc53a82 */ jal text0f1543ac
|
||||
/* f0deff8: 2406ffff */ addiu $a2,$zero,-1
|
||||
/* f0deffc: 8fa40050 */ lw $a0,0x50($sp)
|
||||
/* f0df000: 305200ff */ andi $s2,$v0,0xff
|
||||
/* f0df000: 305200ff */ andi $s2,$v0,0xff
|
||||
/* f0df004: 8fa50044 */ lw $a1,0x44($sp)
|
||||
/* f0df008: 0fc53a82 */ jal text0f1543ac
|
||||
/* f0df00c: 2406ff7f */ addiu $a2,$zero,-129
|
||||
/* f0df010: 2406ff00 */ addiu $a2,$zero,-256
|
||||
/* f0df014: 36586f00 */ ori $t8,$s2,0x6f00
|
||||
/* f0df018: 304300ff */ andi $v1,$v0,0xff
|
||||
/* f0df01c: 3c016f6f */ lui $at,0x6f6f
|
||||
/* f0df008: 0fc53a82 */ jal text0f1543ac
|
||||
/* f0df00c: 2406ff7f */ addiu $a2,$zero,-129
|
||||
/* f0df010: 2406ff00 */ addiu $a2,$zero,-256
|
||||
/* f0df014: 36586f00 */ ori $t8,$s2,0x6f00
|
||||
/* f0df018: 304300ff */ andi $v1,$v0,0xff
|
||||
/* f0df01c: 3c016f6f */ lui $at,0x6f6f
|
||||
/* f0df020: ae380000 */ sw $t8,0x0($s1)
|
||||
/* f0df024: 34796f00 */ ori $t9,$v1,0x6f00
|
||||
/* f0df028: 36453f00 */ ori $a1,$s2,0x3f00
|
||||
/* f0df02c: 34216f00 */ ori $at,$at,0x6f00
|
||||
/* f0df030: 03267024 */ and $t6,$t9,$a2
|
||||
/* f0df034: 00a67824 */ and $t7,$a1,$a2
|
||||
/* f0df038: 0241c025 */ or $t8,$s2,$at
|
||||
/* f0df03c: ae390004 */ sw $t9,0x4($s1)
|
||||
/* f0df040: ae250008 */ sw $a1,0x8($s1)
|
||||
/* f0df044: ae26000c */ sw $a2,0xc($s1)
|
||||
/* f0df048: ae2e0010 */ sw $t6,0x10($s1)
|
||||
/* f0df04c: ae2f0014 */ sw $t7,0x14($s1)
|
||||
/* f0df050: ae380018 */ sw $t8,0x18($s1)
|
||||
/* f0df024: 34796f00 */ ori $t9,$v1,0x6f00
|
||||
/* f0df028: 36453f00 */ ori $a1,$s2,0x3f00
|
||||
/* f0df02c: 34216f00 */ ori $at,$at,0x6f00
|
||||
/* f0df030: 03267024 */ and $t6,$t9,$a2
|
||||
/* f0df034: 00a67824 */ and $t7,$a1,$a2
|
||||
/* f0df038: 0241c025 */ or $t8,$s2,$at
|
||||
/* f0df03c: ae390004 */ sw $t9,0x4($s1)
|
||||
/* f0df040: ae250008 */ sw $a1,0x8($s1)
|
||||
/* f0df044: ae26000c */ sw $a2,0xc($s1)
|
||||
/* f0df048: ae2e0010 */ sw $t6,0x10($s1)
|
||||
/* f0df04c: ae2f0014 */ sw $t7,0x14($s1)
|
||||
/* f0df050: ae380018 */ sw $t8,0x18($s1)
|
||||
/* f0df054: 8fb90090 */ lw $t9,0x90($sp)
|
||||
/* f0df058: 3c0f0718 */ lui $t7,0x718
|
||||
/* f0df05c: 35ef001c */ ori $t7,$t7,0x1c
|
||||
/* f0df060: 272e0008 */ addiu $t6,$t9,0x8
|
||||
/* f0df064: afae0090 */ sw $t6,0x90($sp)
|
||||
/* f0df058: 3c0f0718 */ lui $t7,0x718
|
||||
/* f0df05c: 35ef001c */ ori $t7,$t7,0x1c
|
||||
/* f0df060: 272e0008 */ addiu $t6,$t9,0x8
|
||||
/* f0df064: afae0090 */ sw $t6,0x90($sp)
|
||||
/* f0df068: af2f0000 */ sw $t7,0x0($t9)
|
||||
/* f0df06c: 02202025 */ or $a0,$s1,$zero
|
||||
/* f0df070: 0c013100 */ jal osVirtualToPhysical
|
||||
/* f0df074: afb90060 */ sw $t9,0x60($sp)
|
||||
/* f0df06c: 02202025 */ or $a0,$s1,$zero
|
||||
/* f0df070: 0c013100 */ jal osVirtualToPhysical
|
||||
/* f0df074: afb90060 */ sw $t9,0x60($sp)
|
||||
/* f0df078: 8fa70060 */ lw $a3,0x60($sp)
|
||||
/* f0df07c: 3c0e0480 */ lui $t6,0x480
|
||||
/* f0df080: 35ce006c */ ori $t6,$t6,0x6c
|
||||
/* f0df084: ace20004 */ sw $v0,0x4($a3)
|
||||
/* f0df07c: 3c0e0480 */ lui $t6,0x480
|
||||
/* f0df080: 35ce006c */ ori $t6,$t6,0x6c
|
||||
/* f0df084: ace20004 */ sw $v0,0x4($a3)
|
||||
/* f0df088: 8fb10090 */ lw $s1,0x90($sp)
|
||||
/* f0df08c: 02002025 */ or $a0,$s0,$zero
|
||||
/* f0df090: 26390008 */ addiu $t9,$s1,0x8
|
||||
/* f0df08c: 02002025 */ or $a0,$s0,$zero
|
||||
/* f0df090: 26390008 */ addiu $t9,$s1,0x8
|
||||
/* f0df094: afb90090 */ sw $t9,0x90($sp)
|
||||
/* f0df098: 0c013100 */ jal osVirtualToPhysical
|
||||
/* f0df09c: ae2e0000 */ sw $t6,0x0($s1)
|
||||
/* f0df0a0: ae220004 */ sw $v0,0x4($s1)
|
||||
/* f0df098: 0c013100 */ jal osVirtualToPhysical
|
||||
/* f0df09c: ae2e0000 */ sw $t6,0x0($s1)
|
||||
/* f0df0a0: ae220004 */ sw $v0,0x4($s1)
|
||||
/* f0df0a4: 8faf0090 */ lw $t7,0x90($sp)
|
||||
/* f0df0a8: 3c19b100 */ lui $t9,0xb100
|
||||
/* f0df0ac: 3c0e3432 */ lui $t6,0x3432
|
||||
/* f0df0b0: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0df0a8: 3c19b100 */ lui $t9,0xb100
|
||||
/* f0df0ac: 3c0e3432 */ lui $t6,0x3432
|
||||
/* f0df0b0: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0df0b4: afb80090 */ sw $t8,0x90($sp)
|
||||
/* f0df0b8: 35ce2310 */ ori $t6,$t6,0x2310
|
||||
/* f0df0bc: 37395403 */ ori $t9,$t9,0x5403
|
||||
/* f0df0c0: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0df0c4: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0df0b8: 35ce2310 */ ori $t6,$t6,0x2310
|
||||
/* f0df0bc: 37395403 */ ori $t9,$t9,0x5403
|
||||
/* f0df0c0: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0df0c4: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0df0c8: 8faf0090 */ lw $t7,0x90($sp)
|
||||
/* f0df0cc: 3c0e5873 */ lui $t6,0x5873
|
||||
/* f0df0d0: 3c19b100 */ lui $t9,0xb100
|
||||
/* f0df0d4: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0df0cc: 3c0e5873 */ lui $t6,0x5873
|
||||
/* f0df0d0: 3c19b100 */ lui $t9,0xb100
|
||||
/* f0df0d4: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0df0d8: afb80090 */ sw $t8,0x90($sp)
|
||||
/* f0df0dc: 37393817 */ ori $t9,$t9,0x3817
|
||||
/* f0df0e0: 35ce3761 */ ori $t6,$t6,0x3761
|
||||
/* f0df0e4: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0df0e8: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0df0dc: 37393817 */ ori $t9,$t9,0x3817
|
||||
/* f0df0e0: 35ce3761 */ ori $t6,$t6,0x3761
|
||||
/* f0df0e4: adee0004 */ sw $t6,0x4($t7)
|
||||
/* f0df0e8: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0df0ec: 8fa60098 */ lw $a2,0x98($sp)
|
||||
/* f0df0f0: 325000ff */ andi $s0,$s2,0xff
|
||||
/* f0df0f4: 0010c882 */ srl $t9,$s0,0x2
|
||||
/* f0df0f8: 240f0028 */ addiu $t7,$zero,0x28
|
||||
/* f0df0fc: 240e0001 */ addiu $t6,$zero,0x1
|
||||
/* f0df100: 24d80001 */ addiu $t8,$a2,0x1
|
||||
/* f0df104: afb80010 */ sw $t8,0x10($sp)
|
||||
/* f0df108: afae0018 */ sw $t6,0x18($sp)
|
||||
/* f0df0f0: 325000ff */ andi $s0,$s2,0xff
|
||||
/* f0df0f4: 0010c882 */ srl $t9,$s0,0x2
|
||||
/* f0df0f8: 240f0028 */ addiu $t7,$zero,0x28
|
||||
/* f0df0fc: 240e0001 */ addiu $t6,$zero,0x1
|
||||
/* f0df100: 24d80001 */ addiu $t8,$a2,0x1
|
||||
/* f0df104: afb80010 */ sw $t8,0x10($sp)
|
||||
/* f0df108: afae0018 */ sw $t6,0x18($sp)
|
||||
/* f0df10c: afaf001c */ sw $t7,0x1c($sp)
|
||||
/* f0df110: 03208025 */ or $s0,$t9,$zero
|
||||
/* f0df114: afb90014 */ sw $t9,0x14($sp)
|
||||
/* f0df118: afa00020 */ sw $zero,0x20($sp)
|
||||
/* f0df11c: 8fa7009c */ lw $a3,0x9c($sp)
|
||||
/* f0df110: 03208025 */ or $s0,$t9,$zero
|
||||
/* f0df114: afb90014 */ sw $t9,0x14($sp)
|
||||
/* f0df118: afa00020 */ sw $zero,0x20($sp)
|
||||
/* f0df11c: 8fa7009c */ lw $a3,0x9c($sp)
|
||||
/* f0df120: 8fa50094 */ lw $a1,0x94($sp)
|
||||
/* f0df124: 0fc37fce */ jal menugfxDrawShimmer
|
||||
/* f0df128: 8fa40090 */ lw $a0,0x90($sp)
|
||||
/* f0df124: 0fc37fce */ jal menugfxDrawShimmer
|
||||
/* f0df128: 8fa40090 */ lw $a0,0x90($sp)
|
||||
/* f0df12c: 8fa600a0 */ lw $a2,0xa0($sp)
|
||||
/* f0df130: 24190028 */ addiu $t9,$zero,0x28
|
||||
/* f0df134: 240e0001 */ addiu $t6,$zero,0x1
|
||||
/* f0df138: 24d80001 */ addiu $t8,$a2,0x1
|
||||
/* f0df13c: afa20090 */ sw $v0,0x90($sp)
|
||||
/* f0df140: afb80010 */ sw $t8,0x10($sp)
|
||||
/* f0df144: afae0020 */ sw $t6,0x20($sp)
|
||||
/* f0df130: 24190028 */ addiu $t9,$zero,0x28
|
||||
/* f0df134: 240e0001 */ addiu $t6,$zero,0x1
|
||||
/* f0df138: 24d80001 */ addiu $t8,$a2,0x1
|
||||
/* f0df13c: afa20090 */ sw $v0,0x90($sp)
|
||||
/* f0df140: afb80010 */ sw $t8,0x10($sp)
|
||||
/* f0df144: afae0020 */ sw $t6,0x20($sp)
|
||||
/* f0df148: afb9001c */ sw $t9,0x1c($sp)
|
||||
/* f0df14c: 00402025 */ or $a0,$v0,$zero
|
||||
/* f0df150: 8fa50094 */ lw $a1,0x94($sp)
|
||||
/* f0df154: 8fa7009c */ lw $a3,0x9c($sp)
|
||||
/* f0df14c: 00402025 */ or $a0,$v0,$zero
|
||||
/* f0df150: 8fa50094 */ lw $a1,0x94($sp)
|
||||
/* f0df154: 8fa7009c */ lw $a3,0x9c($sp)
|
||||
/* f0df158: afb00014 */ sw $s0,0x14($sp)
|
||||
/* f0df15c: 0fc37fce */ jal menugfxDrawShimmer
|
||||
/* f0df160: afa00018 */ sw $zero,0x18($sp)
|
||||
/* f0df164: 8fbf003c */ lw $ra,0x3c($sp)
|
||||
/* f0df168: 8fb00030 */ lw $s0,0x30($sp)
|
||||
/* f0df16c: 8fb10034 */ lw $s1,0x34($sp)
|
||||
/* f0df15c: 0fc37fce */ jal menugfxDrawShimmer
|
||||
/* f0df160: afa00018 */ sw $zero,0x18($sp)
|
||||
/* f0df164: 8fbf003c */ lw $ra,0x3c($sp)
|
||||
/* f0df168: 8fb00030 */ lw $s0,0x30($sp)
|
||||
/* f0df16c: 8fb10034 */ lw $s1,0x34($sp)
|
||||
/* f0df170: 8fb20038 */ lw $s2,0x38($sp)
|
||||
/* f0df174: 03e00008 */ jr $ra
|
||||
/* f0df178: 27bd0090 */ addiu $sp,$sp,0x90
|
||||
);
|
||||
/* f0df174: 03e00008 */ jr $ra
|
||||
/* f0df178: 27bd0090 */ addiu $sp,$sp,0x90
|
||||
);
|
||||
#endif
|
||||
|
||||
#if MATCHING
|
||||
GLOBAL_ASM(
|
||||
glabel menugfxRenderGradient
|
||||
/* f0e1ce8: 27bdffa0 */ addiu $sp,$sp,-96
|
||||
/* f0e1cec: afbf002c */ sw $ra,0x2c($sp)
|
||||
/* f0e1cf0: afa40060 */ sw $a0,0x60($sp)
|
||||
/* f0e1cf4: afb10028 */ sw $s1,0x28($sp)
|
||||
/* f0e1cf8: afb00024 */ sw $s0,0x24($sp)
|
||||
/* f0e1cfc: afa50064 */ sw $a1,0x64($sp)
|
||||
/* f0e1d00: afa60068 */ sw $a2,0x68($sp)
|
||||
/* f0e1d04: afa7006c */ sw $a3,0x6c($sp)
|
||||
/* f0e1d08: 0fc59e73 */ jal gfxAllocateColours
|
||||
/* f0e1d0c: 24040003 */ addiu $a0,$zero,0x3
|
||||
/* f0e1d10: 00408825 */ or $s1,$v0,$zero
|
||||
/* f0e1d14: 0fc59e59 */ jal gfxAllocateVertices
|
||||
/* f0e1d18: 24040006 */ addiu $a0,$zero,0x6
|
||||
/* f0e1d1c: 8fae0060 */ lw $t6,0x60($sp)
|
||||
/* f0e1d20: 3c18e700 */ lui $t8,0xe700
|
||||
/* f0e1d24: 00408025 */ or $s0,$v0,$zero
|
||||
/* f0e1d28: 25cf0008 */ addiu $t7,$t6,0x8
|
||||
/* f0e1d2c: afaf0060 */ sw $t7,0x60($sp)
|
||||
/* f0e1d30: adc00004 */ sw $zero,0x4($t6)
|
||||
/* f0e1d34: add80000 */ sw $t8,0x0($t6)
|
||||
GLOBAL_ASM(
|
||||
glabel menugfxRenderGradient
|
||||
/* f0e1ce8: 27bdffa0 */ addiu $sp,$sp,-96
|
||||
/* f0e1cec: afbf002c */ sw $ra,0x2c($sp)
|
||||
/* f0e1cf0: afa40060 */ sw $a0,0x60($sp)
|
||||
/* f0e1cf4: afb10028 */ sw $s1,0x28($sp)
|
||||
/* f0e1cf8: afb00024 */ sw $s0,0x24($sp)
|
||||
/* f0e1cfc: afa50064 */ sw $a1,0x64($sp)
|
||||
/* f0e1d00: afa60068 */ sw $a2,0x68($sp)
|
||||
/* f0e1d04: afa7006c */ sw $a3,0x6c($sp)
|
||||
/* f0e1d08: 0fc59e73 */ jal gfxAllocateColours
|
||||
/* f0e1d0c: 24040003 */ addiu $a0,$zero,0x3
|
||||
/* f0e1d10: 00408825 */ or $s1,$v0,$zero
|
||||
/* f0e1d14: 0fc59e59 */ jal gfxAllocateVertices
|
||||
/* f0e1d18: 24040006 */ addiu $a0,$zero,0x6
|
||||
/* f0e1d1c: 8fae0060 */ lw $t6,0x60($sp)
|
||||
/* f0e1d20: 3c18e700 */ lui $t8,0xe700
|
||||
/* f0e1d24: 00408025 */ or $s0,$v0,$zero
|
||||
/* f0e1d28: 25cf0008 */ addiu $t7,$t6,0x8
|
||||
/* f0e1d2c: afaf0060 */ sw $t7,0x60($sp)
|
||||
/* f0e1d30: adc00004 */ sw $zero,0x4($t6)
|
||||
/* f0e1d34: add80000 */ sw $t8,0x0($t6)
|
||||
/* f0e1d38: 8fb90060 */ lw $t9,0x60($sp)
|
||||
/* f0e1d3c: 3c0eba00 */ lui $t6,0xba00
|
||||
/* f0e1d40: 35ce1402 */ ori $t6,$t6,0x1402
|
||||
/* f0e1d44: 272d0008 */ addiu $t5,$t9,0x8
|
||||
/* f0e1d48: afad0060 */ sw $t5,0x60($sp)
|
||||
/* f0e1d4c: af200004 */ sw $zero,0x4($t9)
|
||||
/* f0e1d50: af2e0000 */ sw $t6,0x0($t9)
|
||||
/* f0e1d3c: 3c0eba00 */ lui $t6,0xba00
|
||||
/* f0e1d40: 35ce1402 */ ori $t6,$t6,0x1402
|
||||
/* f0e1d44: 272d0008 */ addiu $t5,$t9,0x8
|
||||
/* f0e1d48: afad0060 */ sw $t5,0x60($sp)
|
||||
/* f0e1d4c: af200004 */ sw $zero,0x4($t9)
|
||||
/* f0e1d50: af2e0000 */ sw $t6,0x0($t9)
|
||||
/* f0e1d54: 8faf0060 */ lw $t7,0x60($sp)
|
||||
/* f0e1d58: 3c19b900 */ lui $t9,0xb900
|
||||
/* f0e1d5c: 37390002 */ ori $t9,$t9,0x2
|
||||
/* f0e1d60: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0e1d64: afb80060 */ sw $t8,0x60($sp)
|
||||
/* f0e1d68: ade00004 */ sw $zero,0x4($t7)
|
||||
/* f0e1d6c: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0e1d58: 3c19b900 */ lui $t9,0xb900
|
||||
/* f0e1d5c: 37390002 */ ori $t9,$t9,0x2
|
||||
/* f0e1d60: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* f0e1d64: afb80060 */ sw $t8,0x60($sp)
|
||||
/* f0e1d68: ade00004 */ sw $zero,0x4($t7)
|
||||
/* f0e1d6c: adf90000 */ sw $t9,0x0($t7)
|
||||
/* f0e1d70: 8fad0060 */ lw $t5,0x60($sp)
|
||||
/* f0e1d74: 3c0ffc12 */ lui $t7,0xfc12
|
||||
/* f0e1d78: 35ef7e24 */ ori $t7,$t7,0x7e24
|
||||
/* f0e1d7c: 25ae0008 */ addiu $t6,$t5,0x8
|
||||
/* f0e1d74: 3c0ffc12 */ lui $t7,0xfc12
|
||||
/* f0e1d78: 35ef7e24 */ ori $t7,$t7,0x7e24
|
||||
/* f0e1d7c: 25ae0008 */ addiu $t6,$t5,0x8
|
||||
/* f0e1d80: afae0060 */ sw $t6,0x60($sp)
|
||||
/* f0e1d84: 2418f9fc */ addiu $t8,$zero,-1540
|
||||
/* f0e1d88: adb80004 */ sw $t8,0x4($t5)
|
||||
/* f0e1d8c: adaf0000 */ sw $t7,0x0($t5)
|
||||
/* f0e1d84: 2418f9fc */ addiu $t8,$zero,-1540
|
||||
/* f0e1d88: adb80004 */ sw $t8,0x4($t5)
|
||||
/* f0e1d8c: adaf0000 */ sw $t7,0x0($t5)
|
||||
/* f0e1d90: 8fb90060 */ lw $t9,0x60($sp)
|
||||
/* f0e1d94: 240f3000 */ addiu $t7,$zero,0x3000
|
||||
/* f0e1d98: 3c0eb600 */ lui $t6,0xb600
|
||||
/* f0e1d9c: 272d0008 */ addiu $t5,$t9,0x8
|
||||
/* f0e1da0: afad0060 */ sw $t5,0x60($sp)
|
||||
/* f0e1da4: af2f0004 */ sw $t7,0x4($t9)
|
||||
/* f0e1da8: af2e0000 */ sw $t6,0x0($t9)
|
||||
/* f0e1d94: 240f3000 */ addiu $t7,$zero,0x3000
|
||||
/* f0e1d98: 3c0eb600 */ lui $t6,0xb600
|
||||
/* f0e1d9c: 272d0008 */ addiu $t5,$t9,0x8
|
||||
/* f0e1da0: afad0060 */ sw $t5,0x60($sp)
|
||||
/* f0e1da4: af2f0004 */ sw $t7,0x4($t9)
|
||||
/* f0e1da8: af2e0000 */ sw $t6,0x0($t9)
|
||||
/* f0e1dac: 8fb80060 */ lw $t8,0x60($sp)
|
||||
/* f0e1db0: 3c0dba00 */ lui $t5,0xba00
|
||||
/* f0e1db4: 35ad0c02 */ ori $t5,$t5,0xc02
|
||||
/* f0e1db8: 27190008 */ addiu $t9,$t8,0x8
|
||||
/* f0e1db0: 3c0dba00 */ lui $t5,0xba00
|
||||
/* f0e1db4: 35ad0c02 */ ori $t5,$t5,0xc02
|
||||
/* f0e1db8: 27190008 */ addiu $t9,$t8,0x8
|
||||
/* f0e1dbc: afb90060 */ sw $t9,0x60($sp)
|
||||
/* f0e1dc0: 240e2000 */ addiu $t6,$zero,0x2000
|
||||
/* f0e1dc4: af0e0004 */ sw $t6,0x4($t8)
|
||||
/* f0e1dc0: 240e2000 */ addiu $t6,$zero,0x2000
|
||||
/* f0e1dc4: af0e0004 */ sw $t6,0x4($t8)
|
||||
/* f0e1dc8: af0d0000 */ sw $t5,0x0($t8)
|
||||
/* f0e1dcc: 24180001 */ addiu $t8,$zero,0x1
|
||||
/* f0e1dd0: 240f0002 */ addiu $t7,$zero,0x2
|
||||
/* f0e1dd4: afaf0010 */ sw $t7,0x10($sp)
|
||||
/* f0e1dd8: afb80014 */ sw $t8,0x14($sp)
|
||||
/* f0e1dcc: 24180001 */ addiu $t8,$zero,0x1
|
||||
/* f0e1dd0: 240f0002 */ addiu $t7,$zero,0x2
|
||||
/* f0e1dd4: afaf0010 */ sw $t7,0x10($sp)
|
||||
/* f0e1dd8: afb80014 */ sw $t8,0x14($sp)
|
||||
/* f0e1ddc: afa00018 */ sw $zero,0x18($sp)
|
||||
/* f0e1de0: 27a40060 */ addiu $a0,$sp,0x60
|
||||
/* f0e1de4: 00002825 */ or $a1,$zero,$zero
|
||||
/* f0e1de8: 24060002 */ addiu $a2,$zero,0x2
|
||||
/* f0e1dec: 0fc2ce70 */ jal texSelect
|
||||
/* f0e1df0: 00003825 */ or $a3,$zero,$zero
|
||||
/* f0e1df4: 8fb90060 */ lw $t9,0x60($sp)
|
||||
/* f0e1df8: 8fab0070 */ lw $t3,0x70($sp)
|
||||
/* f0e1dfc: 8fac0068 */ lw $t4,0x68($sp)
|
||||
/* f0e1e00: 8fa9006c */ lw $t1,0x6c($sp)
|
||||
/* f0e1de0: 27a40060 */ addiu $a0,$sp,0x60
|
||||
/* f0e1de4: 00002825 */ or $a1,$zero,$zero
|
||||
/* f0e1de8: 24060002 */ addiu $a2,$zero,0x2
|
||||
/* f0e1dec: 0fc2ce70 */ jal texSelect
|
||||
/* f0e1df0: 00003825 */ or $a3,$zero,$zero
|
||||
/* f0e1df4: 8fb90060 */ lw $t9,0x60($sp)
|
||||
/* f0e1df8: 8fab0070 */ lw $t3,0x70($sp)
|
||||
/* f0e1dfc: 8fac0068 */ lw $t4,0x68($sp)
|
||||
/* f0e1e00: 8fa9006c */ lw $t1,0x6c($sp)
|
||||
/* f0e1e04: 8faa0064 */ lw $t2,0x64($sp)
|
||||
/* f0e1e08: 272d0008 */ addiu $t5,$t9,0x8
|
||||
/* f0e1e08: 272d0008 */ addiu $t5,$t9,0x8
|
||||
/* f0e1e0c: afad0060 */ sw $t5,0x60($sp)
|
||||
/* f0e1e10: 3c0eb900 */ lui $t6,0xb900
|
||||
/* f0e1e14: 3c0f0050 */ lui $t7,0x50
|
||||
/* f0e1e18: 018b4021 */ addu $t0,$t4,$t3
|
||||
/* f0e1e1c: 35ef4240 */ ori $t7,$t7,0x4240
|
||||
/* f0e1e20: 35ce031d */ ori $t6,$t6,0x31d
|
||||
/* f0e1e24: af2e0000 */ sw $t6,0x0($t9)
|
||||
/* f0e1e10: 3c0eb900 */ lui $t6,0xb900
|
||||
/* f0e1e14: 3c0f0050 */ lui $t7,0x50
|
||||
/* f0e1e18: 018b4021 */ addu $t0,$t4,$t3
|
||||
/* f0e1e1c: 35ef4240 */ ori $t7,$t7,0x4240
|
||||
/* f0e1e20: 35ce031d */ ori $t6,$t6,0x31d
|
||||
/* f0e1e24: af2e0000 */ sw $t6,0x0($t9)
|
||||
/* f0e1e28: af2f0004 */ sw $t7,0x4($t9)
|
||||
/* f0e1e2c: 03201025 */ or $v0,$t9,$zero
|
||||
/* f0e1e30: 05010003 */ bgez $t0,.L0f0e1e40
|
||||
/* f0e1e34: 0008c043 */ sra $t8,$t0,0x1
|
||||
/* f0e1e38: 25010001 */ addiu $at,$t0,0x1
|
||||
/* f0e1e3c: 0001c043 */ sra $t8,$at,0x1
|
||||
.L0f0e1e40:
|
||||
/* f0e1e40: 0018c840 */ sll $t9,$t8,0x1
|
||||
/* f0e1e44: 012a2023 */ subu $a0,$t1,$t2
|
||||
/* f0e1e48: 0099082a */ slt $at,$a0,$t9
|
||||
/* f0e1e4c: 10200001 */ beqz $at,.L0f0e1e54
|
||||
/* f0e1e50: 03004025 */ or $t0,$t8,$zero
|
||||
.L0f0e1e54:
|
||||
/* f0e1e54: 2406000a */ addiu $a2,$zero,0xa
|
||||
/* f0e1e58: 01460019 */ multu $t2,$a2
|
||||
/* f0e1e5c: 2407fff6 */ addiu $a3,$zero,-10
|
||||
/* f0e1e60: a6070004 */ sh $a3,0x4($s0)
|
||||
/* f0e1e64: a6070010 */ sh $a3,0x10($s0)
|
||||
/* f0e1e68: a607001c */ sh $a3,0x1c($s0)
|
||||
/* f0e1e6c: a6070028 */ sh $a3,0x28($s0)
|
||||
/* f0e1e70: a6070034 */ sh $a3,0x34($s0)
|
||||
/* f0e1e74: a6070040 */ sh $a3,0x40($s0)
|
||||
/* f0e1e78: a2000007 */ sb $zero,0x7($s0)
|
||||
/* f0e1e2c: 03201025 */ or $v0,$t9,$zero
|
||||
/* f0e1e30: 05010003 */ bgez $t0,.L0f0e1e40
|
||||
/* f0e1e34: 0008c043 */ sra $t8,$t0,0x1
|
||||
/* f0e1e38: 25010001 */ addiu $at,$t0,0x1
|
||||
/* f0e1e3c: 0001c043 */ sra $t8,$at,0x1
|
||||
.L0f0e1e40:
|
||||
/* f0e1e40: 0018c840 */ sll $t9,$t8,0x1
|
||||
/* f0e1e44: 012a2023 */ subu $a0,$t1,$t2
|
||||
/* f0e1e48: 0099082a */ slt $at,$a0,$t9
|
||||
/* f0e1e4c: 10200001 */ beqz $at,.L0f0e1e54
|
||||
/* f0e1e50: 03004025 */ or $t0,$t8,$zero
|
||||
.L0f0e1e54:
|
||||
/* f0e1e54: 2406000a */ addiu $a2,$zero,0xa
|
||||
/* f0e1e58: 01460019 */ multu $t2,$a2
|
||||
/* f0e1e5c: 2407fff6 */ addiu $a3,$zero,-10
|
||||
/* f0e1e60: a6070004 */ sh $a3,0x4($s0)
|
||||
/* f0e1e64: a6070010 */ sh $a3,0x10($s0)
|
||||
/* f0e1e68: a607001c */ sh $a3,0x1c($s0)
|
||||
/* f0e1e6c: a6070028 */ sh $a3,0x28($s0)
|
||||
/* f0e1e70: a6070034 */ sh $a3,0x34($s0)
|
||||
/* f0e1e74: a6070040 */ sh $a3,0x40($s0)
|
||||
/* f0e1e78: a2000007 */ sb $zero,0x7($s0)
|
||||
/* f0e1e7c: a2000013 */ sb $zero,0x13($s0)
|
||||
/* f0e1e80: 00001012 */ mflo $v0
|
||||
/* f0e1e84: a6020000 */ sh $v0,0x0($s0)
|
||||
/* f0e1e80: 00001012 */ mflo $v0
|
||||
/* f0e1e84: a6020000 */ sh $v0,0x0($s0)
|
||||
/* f0e1e88: a6020024 */ sh $v0,0x24($s0)
|
||||
/* f0e1e8c: 01860019 */ multu $t4,$a2
|
||||
/* f0e1e90: 00001812 */ mflo $v1
|
||||
/* f0e1e94: a6030002 */ sh $v1,0x2($s0)
|
||||
/* f0e1e8c: 01860019 */ multu $t4,$a2
|
||||
/* f0e1e90: 00001812 */ mflo $v1
|
||||
/* f0e1e94: a6030002 */ sh $v1,0x2($s0)
|
||||
/* f0e1e98: a603000e */ sh $v1,0xe($s0)
|
||||
/* f0e1e9c: 01260019 */ multu $t1,$a2
|
||||
/* f0e1ea0: 24030004 */ addiu $v1,$zero,0x4
|
||||
/* f0e1ea4: a203001f */ sb $v1,0x1f($s0)
|
||||
/* f0e1e9c: 01260019 */ multu $t1,$a2
|
||||
/* f0e1ea0: 24030004 */ addiu $v1,$zero,0x4
|
||||
/* f0e1ea4: a203001f */ sb $v1,0x1f($s0)
|
||||
/* f0e1ea8: a203002b */ sb $v1,0x2b($s0)
|
||||
/* f0e1eac: 00002012 */ mflo $a0
|
||||
/* f0e1eb0: a604000c */ sh $a0,0xc($s0)
|
||||
/* f0e1eac: 00002012 */ mflo $a0
|
||||
/* f0e1eb0: a604000c */ sh $a0,0xc($s0)
|
||||
/* f0e1eb4: a6040018 */ sh $a0,0x18($s0)
|
||||
/* f0e1eb8: 01660019 */ multu $t3,$a2
|
||||
/* f0e1ebc: 24040008 */ addiu $a0,$zero,0x8
|
||||
/* f0e1ec0: a2040037 */ sb $a0,0x37($s0)
|
||||
/* f0e1eb8: 01660019 */ multu $t3,$a2
|
||||
/* f0e1ebc: 24040008 */ addiu $a0,$zero,0x8
|
||||
/* f0e1ec0: a2040037 */ sb $a0,0x37($s0)
|
||||
/* f0e1ec4: a2040043 */ sb $a0,0x43($s0)
|
||||
/* f0e1ec8: 02202025 */ or $a0,$s1,$zero
|
||||
/* f0e1ecc: 00002812 */ mflo $a1
|
||||
/* f0e1ed0: a605001a */ sh $a1,0x1a($s0)
|
||||
/* f0e1ec8: 02202025 */ or $a0,$s1,$zero
|
||||
/* f0e1ecc: 00002812 */ mflo $a1
|
||||
/* f0e1ed0: a605001a */ sh $a1,0x1a($s0)
|
||||
/* f0e1ed4: a6050026 */ sh $a1,0x26($s0)
|
||||
/* f0e1ed8: 01460019 */ multu $t2,$a2
|
||||
/* f0e1edc: 00006812 */ mflo $t5
|
||||
/* f0e1ed8: 01460019 */ multu $t2,$a2
|
||||
/* f0e1edc: 00006812 */ mflo $t5
|
||||
/* f0e1ee0: a60d0030 */ sh $t5,0x30($s0)
|
||||
/* f0e1ee4: 00000000 */ nop
|
||||
/* f0e1ee8: 01060019 */ multu $t0,$a2
|
||||
/* f0e1eec: 00001012 */ mflo $v0
|
||||
/* f0e1ef0: a6020032 */ sh $v0,0x32($s0)
|
||||
/* f0e1ee4: 00000000 */ nop
|
||||
/* f0e1ee8: 01060019 */ multu $t0,$a2
|
||||
/* f0e1eec: 00001012 */ mflo $v0
|
||||
/* f0e1ef0: a6020032 */ sh $v0,0x32($s0)
|
||||
/* f0e1ef4: a602003e */ sh $v0,0x3e($s0)
|
||||
/* f0e1ef8: 01260019 */ multu $t1,$a2
|
||||
/* f0e1efc: 00007012 */ mflo $t6
|
||||
/* f0e1f00: a60e003c */ sh $t6,0x3c($s0)
|
||||
/* f0e1f04: 8faf0074 */ lw $t7,0x74($sp)
|
||||
/* f0e1f08: ae2f0000 */ sw $t7,0x0($s1)
|
||||
/* f0e1ef8: 01260019 */ multu $t1,$a2
|
||||
/* f0e1efc: 00007012 */ mflo $t6
|
||||
/* f0e1f00: a60e003c */ sh $t6,0x3c($s0)
|
||||
/* f0e1f04: 8faf0074 */ lw $t7,0x74($sp)
|
||||
/* f0e1f08: ae2f0000 */ sw $t7,0x0($s1)
|
||||
/* f0e1f0c: 8fb80078 */ lw $t8,0x78($sp)
|
||||
/* f0e1f10: 3c0f0708 */ lui $t7,0x708
|
||||
/* f0e1f14: 35ef000c */ ori $t7,$t7,0xc
|
||||
/* f0e1f18: ae380008 */ sw $t8,0x8($s1)
|
||||
/* f0e1f1c: 8fb9007c */ lw $t9,0x7c($sp)
|
||||
/* f0e1f20: ae390004 */ sw $t9,0x4($s1)
|
||||
/* f0e1f10: 3c0f0708 */ lui $t7,0x708
|
||||
/* f0e1f14: 35ef000c */ ori $t7,$t7,0xc
|
||||
/* f0e1f18: ae380008 */ sw $t8,0x8($s1)
|
||||
/* f0e1f1c: 8fb9007c */ lw $t9,0x7c($sp)
|
||||
/* f0e1f20: ae390004 */ sw $t9,0x4($s1)
|
||||
/* f0e1f24: 8fad0060 */ lw $t5,0x60($sp)
|
||||
/* f0e1f28: 25ae0008 */ addiu $t6,$t5,0x8
|
||||
/* f0e1f2c: afae0060 */ sw $t6,0x60($sp)
|
||||
/* f0e1f28: 25ae0008 */ addiu $t6,$t5,0x8
|
||||
/* f0e1f2c: afae0060 */ sw $t6,0x60($sp)
|
||||
/* f0e1f30: adaf0000 */ sw $t7,0x0($t5)
|
||||
/* f0e1f34: 0c012d20 */ jal osVirtualToPhysical
|
||||
/* f0e1f38: afad0034 */ sw $t5,0x34($sp)
|
||||
/* f0e1f34: 0c012d20 */ jal osVirtualToPhysical
|
||||
/* f0e1f38: afad0034 */ sw $t5,0x34($sp)
|
||||
/* f0e1f3c: 8fa30034 */ lw $v1,0x34($sp)
|
||||
/* f0e1f40: 3c0d0450 */ lui $t5,0x450
|
||||
/* f0e1f44: 35ad0048 */ ori $t5,$t5,0x48
|
||||
/* f0e1f48: ac620004 */ sw $v0,0x4($v1)
|
||||
/* f0e1f40: 3c0d0450 */ lui $t5,0x450
|
||||
/* f0e1f44: 35ad0048 */ ori $t5,$t5,0x48
|
||||
/* f0e1f48: ac620004 */ sw $v0,0x4($v1)
|
||||
/* f0e1f4c: 8fb80060 */ lw $t8,0x60($sp)
|
||||
/* f0e1f50: 02002025 */ or $a0,$s0,$zero
|
||||
/* f0e1f54: 27190008 */ addiu $t9,$t8,0x8
|
||||
/* f0e1f58: afb90060 */ sw $t9,0x60($sp)
|
||||
/* f0e1f50: 02002025 */ or $a0,$s0,$zero
|
||||
/* f0e1f54: 27190008 */ addiu $t9,$t8,0x8
|
||||
/* f0e1f58: afb90060 */ sw $t9,0x60($sp)
|
||||
/* f0e1f5c: af0d0000 */ sw $t5,0x0($t8)
|
||||
/* f0e1f60: 0c012d20 */ jal osVirtualToPhysical
|
||||
/* f0e1f64: afb80030 */ sw $t8,0x30($sp)
|
||||
/* f0e1f60: 0c012d20 */ jal osVirtualToPhysical
|
||||
/* f0e1f64: afb80030 */ sw $t8,0x30($sp)
|
||||
/* f0e1f68: 8fa50030 */ lw $a1,0x30($sp)
|
||||
/* f0e1f6c: 3c18b100 */ lui $t8,0xb100
|
||||
/* f0e1f70: 3c195432 */ lui $t9,0x5432
|
||||
/* f0e1f74: aca20004 */ sw $v0,0x4($a1)
|
||||
/* f0e1f6c: 3c18b100 */ lui $t8,0xb100
|
||||
/* f0e1f70: 3c195432 */ lui $t9,0x5432
|
||||
/* f0e1f74: aca20004 */ sw $v0,0x4($a1)
|
||||
/* f0e1f78: 8fae0060 */ lw $t6,0x60($sp)
|
||||
/* f0e1f7c: 37394510 */ ori $t9,$t9,0x4510
|
||||
/* f0e1f80: 37182405 */ ori $t8,$t8,0x2405
|
||||
/* f0e1f84: 25cf0008 */ addiu $t7,$t6,0x8
|
||||
/* f0e1f88: afaf0060 */ sw $t7,0x60($sp)
|
||||
/* f0e1f8c: add90004 */ sw $t9,0x4($t6)
|
||||
/* f0e1f90: add80000 */ sw $t8,0x0($t6)
|
||||
/* f0e1f94: 8fbf002c */ lw $ra,0x2c($sp)
|
||||
/* f0e1f98: 8fb10028 */ lw $s1,0x28($sp)
|
||||
/* f0e1f9c: 8fb00024 */ lw $s0,0x24($sp)
|
||||
/* f0e1f7c: 37394510 */ ori $t9,$t9,0x4510
|
||||
/* f0e1f80: 37182405 */ ori $t8,$t8,0x2405
|
||||
/* f0e1f84: 25cf0008 */ addiu $t7,$t6,0x8
|
||||
/* f0e1f88: afaf0060 */ sw $t7,0x60($sp)
|
||||
/* f0e1f8c: add90004 */ sw $t9,0x4($t6)
|
||||
/* f0e1f90: add80000 */ sw $t8,0x0($t6)
|
||||
/* f0e1f94: 8fbf002c */ lw $ra,0x2c($sp)
|
||||
/* f0e1f98: 8fb10028 */ lw $s1,0x28($sp)
|
||||
/* f0e1f9c: 8fb00024 */ lw $s0,0x24($sp)
|
||||
/* f0e1fa0: 8fa20060 */ lw $v0,0x60($sp)
|
||||
/* f0e1fa4: 03e00008 */ jr $ra
|
||||
/* f0e1fa8: 27bd0060 */ addiu $sp,$sp,0x60
|
||||
);
|
||||
/* f0e1fa4: 03e00008 */ jr $ra
|
||||
/* f0e1fa8: 27bd0060 */ addiu $sp,$sp,0x60
|
||||
);
|
||||
#else
|
||||
// Mismatch: Goal has the if statement with empty contents
|
||||
Gfx *menugfxRenderGradient(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, u32 colourstart, u32 colourmid, u32 colourend)
|
||||
|
@ -1165,9 +1165,9 @@ Gfx *menugfx0f0e2498(Gfx *gdl)
|
|||
gDPSetCycleType(gdl++, G_CYC_1CYCLE);
|
||||
gDPSetAlphaCompare(gdl++, G_AC_NONE);
|
||||
gDPSetCombineMode(gdl++, G_CC_MODULATEI, G_CC_MODULATEI);
|
||||
gSPClearGeometryMode(gdl++, G_CULL_BOTH)
|
||||
gSPClearGeometryMode(gdl++, G_CULL_BOTH);
|
||||
|
||||
texSelect(&gdl, 0, 2, 0, 2, 1, NULL);
|
||||
texSelect(&gdl, 0, 2, 0, 2, 1, NULL);
|
||||
|
||||
gDPSetRenderMode(gdl++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "bss.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
@ -1191,12 +1192,12 @@ Gfx *menuitemKeyboardRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
textcolour = colourBlend(textcolour, 0x00000000, 127) & 0xffffff00 | textcolour & 0xff;
|
||||
textcolour = (colourBlend(textcolour, 0x00000000, 127) & 0xffffff00) | (textcolour & 0xff);
|
||||
}
|
||||
|
||||
if (data->capseffective && col == 2 && row == 4) {
|
||||
// CAPS button - make it yellow
|
||||
textcolour = textcolour & 0xff | 0xffff0000;
|
||||
textcolour = (textcolour & 0xff) | 0xffff0000;
|
||||
}
|
||||
|
||||
// If this button is the focused one, set highlighted colour
|
||||
|
@ -1267,7 +1268,7 @@ Gfx *menuitemKeyboardRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
textcolour = colourBlend(textcolour, 0, 127) & 0xffffff00 | textcolour & 0xff;
|
||||
textcolour = (colourBlend(textcolour, 0, 127) & 0xffffff00) | (textcolour & 0xff);
|
||||
}
|
||||
|
||||
textSetWaveColours(
|
||||
|
@ -2756,7 +2757,7 @@ Gfx *menuitemSelectableRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
leftcolour = colourBlend(leftcolour, 0, 127) & 0xffffff00 | leftcolour & 0xff;
|
||||
leftcolour = (colourBlend(leftcolour, 0, 127) & 0xffffff00) | (leftcolour & 0xff);
|
||||
}
|
||||
|
||||
rightcolour = leftcolour;
|
||||
|
@ -2799,7 +2800,7 @@ Gfx *menuitemSelectableRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
leftcolour = colourBlend(leftcolour, 0x00000000, 127) & 0xffffff00 | leftcolour & 0xff;
|
||||
leftcolour = (colourBlend(leftcolour, 0x00000000, 127) & 0xffffff00) | (leftcolour & 0xff);
|
||||
}
|
||||
|
||||
rightcolour = leftcolour;
|
||||
|
@ -3251,7 +3252,7 @@ Gfx *menuitemCheckboxRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff;
|
||||
maincolour = (colourBlend(maincolour, 0, 127) & 0xffffff00) | (maincolour & 0xff);
|
||||
}
|
||||
|
||||
textSetWaveColours(
|
||||
|
@ -3268,7 +3269,7 @@ Gfx *menuitemCheckboxRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff;
|
||||
maincolour = (colourBlend(maincolour, 0, 127) & 0xffffff00) | (maincolour & 0xff);
|
||||
}
|
||||
|
||||
textSetWaveColours(
|
||||
|
@ -3312,7 +3313,7 @@ Gfx *menuitemCheckboxRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff;
|
||||
maincolour = (colourBlend(maincolour, 0, 127) & 0xffffff00) | (maincolour & 0xff);
|
||||
}
|
||||
|
||||
textSetWaveColours(
|
||||
|
@ -3473,7 +3474,7 @@ Gfx *menuitemScrollableRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
colour = colourBlend(colour, 0, 0x7f) & 0xffffff00 | colour & 0xff;
|
||||
colour = (colourBlend(colour, 0, 0x7f) & 0xffffff00) | (colour & 0xff);
|
||||
}
|
||||
|
||||
textSetWaveColours(
|
||||
|
@ -4007,7 +4008,7 @@ Gfx *menuitemMarqueeRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
colour = colourBlend(colour, 0, 127) & 0xffffff00 | colour & 0xff;
|
||||
colour = (colourBlend(colour, 0, 127) & 0xffffff00) | (colour & 0xff);
|
||||
}
|
||||
|
||||
x = context->x + context->width - data->totalmoved;
|
||||
|
@ -4231,7 +4232,7 @@ Gfx *menuitemRankingRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
textcolour = colourBlend(textcolour, 0, 127) & 0xffffff00 | textcolour & 0xff;
|
||||
textcolour = (colourBlend(textcolour, 0, 127) & 0xffffff00) | (textcolour & 0xff);
|
||||
}
|
||||
|
||||
if (!team) {
|
||||
|
@ -4263,7 +4264,7 @@ Gfx *menuitemRankingRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (dialog->dimmed) {
|
||||
linecolour1 = colourBlend(linecolour1, 0, 44) & 0xffffff00 | linecolour1 & 0xff;
|
||||
linecolour1 = (colourBlend(linecolour1, 0, 44) & 0xffffff00) | (linecolour1 & 0xff);
|
||||
}
|
||||
|
||||
if (dialog->transitionfrac < 0) {
|
||||
|
@ -4276,11 +4277,11 @@ Gfx *menuitemRankingRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (dialog->dimmed) {
|
||||
linecolour2 = colourBlend(linecolour2, 0, 44) & 0xffffff00 | linecolour2 & 0xff;
|
||||
linecolour2 = (colourBlend(linecolour2, 0, 44) & 0xffffff00) | (linecolour2 & 0xff);
|
||||
}
|
||||
|
||||
linecolour1 = textApplyProjectionColour(context->x, context->y + 2, -129) & 0xff | linecolour1 & 0xffffff00;
|
||||
linecolour2 = textApplyProjectionColour(context->x + context->width, context->y + 2, -129) & 0xff | linecolour2 & 0xffffff00;
|
||||
linecolour1 = (textApplyProjectionColour(context->x, context->y + 2, -129) & 0xff) | (linecolour1 & 0xffffff00);
|
||||
linecolour2 = (textApplyProjectionColour(context->x + context->width, context->y + 2, -129) & 0xff) | (linecolour2 & 0xffffff00);
|
||||
|
||||
// Horizontal line between header and body
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
|
@ -4501,7 +4502,7 @@ Gfx *menuitemPlayerStatsRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
maincolour = colourBlend(maincolour, 0x00000000, 127) & 0xffffff00 | maincolour & 0xff;
|
||||
maincolour = (colourBlend(maincolour, 0x00000000, 127) & 0xffffff00) | (maincolour & 0xff);
|
||||
}
|
||||
|
||||
textMeasure(&textheight, &textwidth, langGet(L_MPMENU_281), g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
|
@ -4553,7 +4554,7 @@ Gfx *menuitemPlayerStatsRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (context->dialog->dimmed) {
|
||||
maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff;
|
||||
maincolour = (colourBlend(maincolour, 0, 127) & 0xffffff00) | (maincolour & 0xff);
|
||||
}
|
||||
|
||||
// "Deaths" heading
|
||||
|
@ -4736,7 +4737,7 @@ bool menuitemPlayerStatsTick(struct menuitem *item, struct menudialog *dialog, s
|
|||
}
|
||||
}
|
||||
|
||||
menuitemDropdownTick(item, dialog, inputs, tickflags, data);
|
||||
return menuitemDropdownTick(item, dialog, inputs, tickflags, data);
|
||||
}
|
||||
|
||||
Gfx *menuitemPlayerStatsOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menudialog *dialog, union menuitemdata *data)
|
||||
|
@ -5406,7 +5407,7 @@ Gfx *menuitemControllerRender(Gfx *gdl, struct menurendercontext *context)
|
|||
}
|
||||
|
||||
if (dialog->dimmed) {
|
||||
colour = colourBlend(colour, 0, 44) & 0xffffff00 | colour & 0xff;
|
||||
colour = (colourBlend(colour, 0, 44) & 0xffffff00) | (colour & 0xff);
|
||||
}
|
||||
|
||||
textSetWaveColours(
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "game/bossfile.h"
|
||||
#include "game/game_006900.h"
|
||||
#include "game/title.h"
|
||||
#include "game/pdmode.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "bss.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/model.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
@ -105,7 +106,7 @@ struct skeleton *g_Skeletons[] = {
|
|||
&g_SkelBB,
|
||||
};
|
||||
|
||||
void modeldef0f1a7560(struct modelfiledata *modeldef, u16 filenum, u32 arg2, u32 arg3, struct texpool *arg4, bool arg5)
|
||||
void modeldef0f1a7560(struct modelfiledata *modeldef, u16 filenum, u32 arg2, struct modelfiledata *modeldef2, struct texpool *texpool, bool arg5)
|
||||
{
|
||||
s32 allocsize;
|
||||
s32 loadedsize;
|
||||
|
@ -131,13 +132,13 @@ void modeldef0f1a7560(struct modelfiledata *modeldef, u16 filenum, u32 arg2, u32
|
|||
sp84 = (s32)v1 + (s32)((s32)modeldef - ((u32)modeldef + (gdl & 0xffffff)));
|
||||
|
||||
texCopyGdls((Gfx *)((u32)modeldef + (gdl & 0xffffff)), (Gfx *)(v1 + (u32)modeldef), loadedsize - (s32)(((u32)modeldef + (gdl & 0xffffff)) - (u32)modeldef));
|
||||
texLoadFromConfigs(modeldef->texconfigs, modeldef->numtexconfigs, arg4, arg3 - arg2);
|
||||
texLoadFromConfigs(modeldef->texconfigs, modeldef->numtexconfigs, texpool, (u32)modeldef2 - arg2);
|
||||
|
||||
while (node) {
|
||||
prevnode = node;
|
||||
s0 = gdl;
|
||||
|
||||
modelIterateDisplayLists(modeldef, &node, &gdl);
|
||||
modelIterateDisplayLists(modeldef, &node, (Gfx **) &gdl);
|
||||
|
||||
if (gdl) {
|
||||
s4 = gdl - s0;
|
||||
|
@ -145,7 +146,7 @@ void modeldef0f1a7560(struct modelfiledata *modeldef, u16 filenum, u32 arg2, u32
|
|||
s4 = loadedsize + (u32)modeldef - (u32)modeldef - (s0 & 0xffffff);
|
||||
}
|
||||
|
||||
modelNodeReplaceGdl(modeldef, prevnode, s0, s5);
|
||||
modelNodeReplaceGdl(modeldef, prevnode, (Gfx *) s0, (Gfx *) s5);
|
||||
|
||||
if (prevnode->type == MODELNODETYPE_DL) {
|
||||
struct modelrodata_dl *rodata = &prevnode->rodata->dl;
|
||||
|
@ -154,7 +155,7 @@ void modeldef0f1a7560(struct modelfiledata *modeldef, u16 filenum, u32 arg2, u32
|
|||
vertices = NULL;
|
||||
}
|
||||
|
||||
s5 += texLoadFromGdl((Gfx *)((u32)modeldef + (s0 & 0xffffff) + sp84), s4, (Gfx *)((u32)modeldef + (s5 & 0xffffff)), arg4, (u8 *) vertices);
|
||||
s5 += texLoadFromGdl((Gfx *)((u32)modeldef + (s0 & 0xffffff) + sp84), s4, (Gfx *)((u32)modeldef + (s5 & 0xffffff)), texpool, (u8 *) vertices);
|
||||
}
|
||||
|
||||
fileSetSize(filenum, modeldef, (((u32)modeldef + (s5 & 0xffffff)) - (u32)modeldef + 0xf) & ~0xf, arg5);
|
||||
|
@ -189,7 +190,7 @@ struct modelfiledata *modeldefLoad(u16 fileid, u8 *dst, s32 size, struct texpool
|
|||
|
||||
modelPromoteTypeToPointer(filedata);
|
||||
modelPromoteOffsetsToPointers(filedata, 0x5000000, (u32) filedata);
|
||||
modeldef0f1a7560(filedata, fileid, 0x5000000, (u32)filedata, arg3, dst == NULL);
|
||||
modeldef0f1a7560(filedata, fileid, 0x5000000, filedata, arg3, dst == NULL);
|
||||
|
||||
return filedata;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "lib/vi.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/str.h"
|
||||
#include "lib/lib_317f0.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
@ -666,7 +667,7 @@ s32 mpGetPlayerRankings(struct ranking *rankings)
|
|||
|
||||
scenarioCalculatePlayerScore(mpchr, i, &score, &deaths);
|
||||
|
||||
rankablescore = (score + 0x8000) << 16 | 0xffff - deaths;
|
||||
rankablescore = (score + 0x8000) << 16 | (0xffff - deaths);
|
||||
dstindex = 0;
|
||||
found = false;
|
||||
|
||||
|
@ -693,7 +694,7 @@ s32 mpGetPlayerRankings(struct ranking *rankings)
|
|||
count++;
|
||||
|
||||
// Write the new figures
|
||||
rankablescores[dstindex] = (score + 0x8000) << 16 | 0xffff - deaths;
|
||||
rankablescores[dstindex] = (score + 0x8000) << 16 | (0xffff - deaths);
|
||||
scores[dstindex] = score;
|
||||
mpchrs[dstindex] = mpchr;
|
||||
chrnums[dstindex] = i;
|
||||
|
@ -794,7 +795,7 @@ s32 mpCalculateTeamScore(s32 teamnum, s32 *result)
|
|||
|
||||
if (teamexists) {
|
||||
*result = teamscore;
|
||||
return (teamscore + 0x8000) << 16 | 0xffff - teamdeaths;
|
||||
return (teamscore + 0x8000) << 16 | (0xffff - teamdeaths);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -2196,8 +2197,12 @@ void mpCalculateAwards(void)
|
|||
// @bug: playerrankings should have 12 elements. Because it's too small,
|
||||
// overflow occurs in mpGetPlayerRankings. The overflow writes into the
|
||||
// metrics array (above) which is yet to be initialised, so this bug has
|
||||
// no effect.
|
||||
// no effect on IDO.
|
||||
#ifdef AVOID_UB
|
||||
struct ranking playerrankings[MAX_MPCHRS];
|
||||
#else
|
||||
struct ranking playerrankings[1];
|
||||
#endif
|
||||
|
||||
s32 numchrs;
|
||||
s32 numteams;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "game/mplayer/scenarios.h"
|
||||
#include "game/radar.h"
|
||||
#include "game/botcmd.h"
|
||||
#include "game/botinv.h"
|
||||
#include "game/challenge.h"
|
||||
#include "game/lang.h"
|
||||
#include "game/mplayer/mplayer.h"
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
#include "lib/snd.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
#include "gbiex.h"
|
||||
#include "types.h"
|
||||
|
||||
struct menuitem g_MpCharacterMenuItems[];
|
||||
|
@ -971,7 +973,7 @@ s32 mpMedalMenuHandler(s32 operation, struct menuitem *item, union handlerdata *
|
|||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
colour = colour & 0xffffff00 | (colour & 0xff) * (renderdata->colour & 0xff) >> 8;
|
||||
colour = (colour & 0xffffff00) | (colour & 0xff) * (renderdata->colour & 0xff) >> 8;
|
||||
#endif
|
||||
|
||||
gDPSetEnvColorViaWord(gdl++, colour);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "game/playermgr.h"
|
||||
#include "game/mplayer/setup.h"
|
||||
#include "game/botcmd.h"
|
||||
#include "game/botinv.h"
|
||||
#include "game/lang.h"
|
||||
#include "game/mplayer/mplayer.h"
|
||||
#include "game/options.h"
|
||||
|
|
|
@ -323,7 +323,7 @@ Gfx *nbombCreateGdl(void)
|
|||
|
||||
gdl = gdlstart = gfxAllocate(gdlsizes[index]);
|
||||
|
||||
texSelect(&gdl, &g_TexGeneralConfigs[0x0a], 2, 1, 2, 1, NULL);
|
||||
texSelect(&gdl, &g_TexGeneralConfigs[10], 2, 1, 2, 1, NULL);
|
||||
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetCycleType(gdl++, G_CYC_1CYCLE);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "lib/dma.h"
|
||||
#include "lib/memp.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/str.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include "versions.h"
|
||||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "game/bossfile.h"
|
||||
#include "game/camdraw.h"
|
||||
#include "game/filelist.h"
|
||||
#include "game/menu.h"
|
||||
#include "game/crc.h"
|
||||
#include "game/gamefile.h"
|
||||
|
@ -14,8 +16,10 @@
|
|||
#include "lib/main.h"
|
||||
#include "lib/memp.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/str.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
#include "string.h"
|
||||
|
||||
/**
|
||||
* Perfect Dark supports saving to an in-cartridge EEPROM chip, as well as to
|
||||
|
@ -944,7 +948,7 @@ s32 _pakSaveAtGuid(s8 device, s32 fileid, s32 filetype, u8 *newdata, s32 *outfil
|
|||
// Find the file to be "replaced"
|
||||
oldoffset = pakFindFile(device, fileid, &header);
|
||||
|
||||
if (oldoffset && (!oldoffset || oldoffset >= pakGetPdNumBytes(device) || (pakGetBlockSize(device) - 1 & oldoffset))) {
|
||||
if (oldoffset && (!oldoffset || oldoffset >= pakGetPdNumBytes(device) || ((pakGetBlockSize(device) - 1) & oldoffset))) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
@ -1703,7 +1707,7 @@ s32 pak0f118b04(s8 device, u32 fileid)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (offset == 0 || (offset != 0 && offset < pakGetPdNumBytes(device) && (pakGetBlockSize(device) - 1 & offset) == 0)) {
|
||||
if (offset == 0 || (offset != 0 && offset < pakGetPdNumBytes(device) && ((pakGetBlockSize(device) - 1) & offset) == 0)) {
|
||||
if (!pakReplaceFileAtOffsetWithBlank(device, offset)) {
|
||||
return 4;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "game/atan2f.h"
|
||||
#include "game/quaternion.h"
|
||||
#include "game/bondgun.h"
|
||||
#include "game/env.h"
|
||||
#include "game/gunfx.h"
|
||||
#include "game/game_0b0fd0.h"
|
||||
#include "game/game_0b2150.h"
|
||||
|
@ -27,6 +28,7 @@
|
|||
#include "game/hudmsg.h"
|
||||
#include "game/menu.h"
|
||||
#include "game/mainmenu.h"
|
||||
#include "game/file.h"
|
||||
#include "game/filemgr.h"
|
||||
#include "game/inv.h"
|
||||
#include "game/playermgr.h"
|
||||
|
@ -55,6 +57,7 @@
|
|||
#include "lib/ailist.h"
|
||||
#include "lib/collision.h"
|
||||
#include "lib/joy.h"
|
||||
#include "lib/lib_17ce0.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/main.h"
|
||||
#include "lib/snd.h"
|
||||
|
@ -2237,7 +2240,7 @@ Gfx *player0f0baf84(Gfx *gdl)
|
|||
guPerspective(a, &b, g_Vars.currentplayer->zoominfovy,
|
||||
PAL ? 1.7316017150879f : 1.4545454978943f, 10, 300, 1);
|
||||
|
||||
gSPMatrix(gdl++, 0x80000000 + (u32)a, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gdl++, OS_PHYSICAL_TO_K0(a), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPPerspNormalize(gdl++, b);
|
||||
}
|
||||
|
||||
|
@ -3753,7 +3756,7 @@ void playerTick(bool arg0)
|
|||
if (rocket->base.hidden & OBJHFLAG_PROJECTILE) {
|
||||
struct projectile *projectile = rocket->base.projectile;
|
||||
u32 mode = optionsGetControlMode(g_Vars.currentplayerstats->mpindex);
|
||||
f32 fVar22;
|
||||
f32 targetspeed;
|
||||
s8 contpad1 = optionsGetContpadNum1(g_Vars.currentplayerstats->mpindex);
|
||||
s8 contpad2 = optionsGetContpadNum2(g_Vars.currentplayerstats->mpindex);
|
||||
s8 stickx = 0;
|
||||
|
@ -3761,14 +3764,18 @@ void playerTick(bool arg0)
|
|||
Mtxf sp1fc;
|
||||
Mtxf sp1bc;
|
||||
Mtxf sp17c;
|
||||
f32 targetspeed;
|
||||
f32 sp178;
|
||||
f32 sp174;
|
||||
f32 sp15c[6];
|
||||
f32 sp14c[4];
|
||||
f32 sp13c[4];
|
||||
f32 sp12c[4];
|
||||
f32 prevspeed;
|
||||
#ifdef AVOID_UB
|
||||
f32 sp11c[4];
|
||||
#else
|
||||
f32 sp11c[3];
|
||||
#endif
|
||||
bool explode = false;
|
||||
bool slow = false;
|
||||
bool pause = false;
|
||||
|
@ -3853,7 +3860,7 @@ void playerTick(bool arg0)
|
|||
sp2ac.x = sp2b8[0][0];
|
||||
sp2ac.z = sp2b8[0][2];
|
||||
|
||||
fVar22 = sticky * LVUPDATE240FREAL() * 0.00025f;
|
||||
sp178 = sticky * LVUPDATE240FREAL() * 0.00025f;
|
||||
sp174 = -stickx * LVUPDATE240FREAL() * 0.00025f;
|
||||
|
||||
f20 = sqrtf(sp2ac.f[0] * sp2ac.f[0] + sp2ac.f[2] * sp2ac.f[2]);
|
||||
|
@ -3861,9 +3868,9 @@ void playerTick(bool arg0)
|
|||
sp2ac.x /= f20;
|
||||
sp2ac.z /= f20;
|
||||
|
||||
f20 = sinf(fVar22);
|
||||
f20 = sinf(sp178);
|
||||
|
||||
sp14c[0] = cosf(fVar22);
|
||||
sp14c[0] = cosf(sp178);
|
||||
sp14c[1] = sp2ac.f[0] * f20;
|
||||
sp14c[2] = 0;
|
||||
sp14c[3] = sp2ac.f[2] * f20;
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include "game/wallhit.h"
|
||||
#include "game/mpstats.h"
|
||||
#include "bss.h"
|
||||
#include "lib/collision.h"
|
||||
#include "lib/lib_17ce0.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/snd.h"
|
||||
#include "lib/rng.h"
|
||||
|
@ -588,12 +590,11 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
|||
bool done;
|
||||
s32 sparktype;
|
||||
|
||||
// This is probably supposed to have a length of 131 because the game can
|
||||
// write that far into the array, but changing it causes a mismatch due to
|
||||
// too much stack allocation.
|
||||
// @dangerous: You'll want to change this to 131 if compiling using a
|
||||
// non-matching compiler.
|
||||
#ifdef AVOID_UB
|
||||
s16 rooms[131];
|
||||
#else
|
||||
s16 rooms[124];
|
||||
#endif
|
||||
|
||||
s16 spc8[8];
|
||||
s16 spb8[8];
|
||||
|
@ -990,7 +991,7 @@ struct prop *func0f061d54(s32 handnum, u32 arg1, u32 arg2)
|
|||
mtx4TransformVec(camGetProjectionMtxF(), &sp58, &sp40);
|
||||
mtx4RotateVec(camGetProjectionMtxF(), &sp64, &sp4c);
|
||||
|
||||
shotCalculateHits(handnum, arg1, &sp58, &sp64, &sp40, &sp4c, 0, 4294836224, PLAYERCOUNT() >= 2);
|
||||
return shotCalculateHits(handnum, arg1, &sp58, &sp64, &sp40, &sp4c, 0, 4294836224, PLAYERCOUNT() >= 2);
|
||||
}
|
||||
|
||||
void shotCreate(s32 handnum, bool arg1, bool dorandom, s32 arg3, bool arg4)
|
||||
|
@ -2504,7 +2505,7 @@ void farsightChooseTarget(void)
|
|||
struct prop *prop = g_ChrSlots[i].prop;
|
||||
|
||||
if (prop && prop->chr) {
|
||||
if (prop->type == PROPTYPE_CHR && (prop->flags & PROPFLAG_ENABLED)
|
||||
if ((prop->type == PROPTYPE_CHR && (prop->flags & PROPFLAG_ENABLED))
|
||||
|| (prop->type == PROPTYPE_PLAYER && playermgrGetPlayerNumByProp(prop) != g_Vars.currentplayernum)) {
|
||||
struct chrdata *chr = prop->chr;
|
||||
|
||||
|
|
|
@ -66,14 +66,17 @@
|
|||
#include "lib/str.h"
|
||||
#include "lib/memp.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "lib/anim.h"
|
||||
#include "lib/collision.h"
|
||||
#include "lib/lib_17ce0.h"
|
||||
#include "lib/lib_317f0.h"
|
||||
#include "data.h"
|
||||
#include "textures.h"
|
||||
#include "types.h"
|
||||
#include "string.h"
|
||||
|
||||
struct weaponobj *g_Proxies[30];
|
||||
f32 g_GasReleaseTimerMax240;
|
||||
|
@ -1719,7 +1722,7 @@ void colourTween(u8 *col, u8 *nextcol)
|
|||
}
|
||||
}
|
||||
|
||||
void func0f069750(s32 *arg0, s32 arg1, f32 *arg2)
|
||||
void func0f069750(s32 *arg0, s32 arg1, f32 arg2[4])
|
||||
{
|
||||
if (arg1 == 1) {
|
||||
f32 tmp;
|
||||
|
@ -2490,7 +2493,7 @@ void objFree(struct defaultobj *obj, bool freeprop, bool canregen)
|
|||
// flag. If the propnum was 0, all chrs would be assigned to
|
||||
// this one chair, and their original chairs would still have
|
||||
// the occupied flag.
|
||||
if (g_ChrSlots[i].proppreset1 = obj->prop - g_Vars.props) {
|
||||
if ((g_ChrSlots[i].proppreset1 = obj->prop - g_Vars.props)) {
|
||||
g_ChrSlots[i].proppreset1 = -1;
|
||||
}
|
||||
}
|
||||
|
@ -3229,11 +3232,9 @@ s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2,
|
|||
bool s0;
|
||||
s16 spcc[120];
|
||||
s16 *ptr;
|
||||
s16 spb8[8];
|
||||
s32 i;
|
||||
f32 scale = 1.0f;
|
||||
u32 stack2;
|
||||
s32 spb8;
|
||||
u32 stack3[2];
|
||||
|
||||
cdresult = CDRESULT_NOCOLLISION;
|
||||
|
||||
|
@ -3251,7 +3252,7 @@ s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2,
|
|||
if ((prop->pos.x != pos->x || prop->pos.y != pos->y || prop->pos.z != pos->z)
|
||||
&& (obj->hidden & OBJHFLAG_PROJECTILE)
|
||||
&& (obj->projectile->flags & PROJECTILEFLAG_STICKY)) {
|
||||
portal00018148(&prop->pos, &sp1c4, prop->rooms, &spb8, &spcc, 20);
|
||||
portal00018148(&prop->pos, &sp1c4, prop->rooms, spb8, spcc, 20);
|
||||
|
||||
ptr = spcc;
|
||||
|
||||
|
@ -6315,12 +6316,9 @@ s32 func0f072144(struct defaultobj *obj, struct coord *arg1, f32 arg2, bool arg3
|
|||
s16 rooms[8];
|
||||
struct hov prevhov;
|
||||
struct hov *hov = NULL;
|
||||
struct hoverbikeobj *hoverbike;
|
||||
struct hoverpropobj *hoverprop;
|
||||
u8 stack[0x2f0];
|
||||
struct geocyl cyl;
|
||||
union geounion geounion;
|
||||
struct prop *prop = obj->prop;
|
||||
u32 stack2;
|
||||
struct hoverbikeobj *hoverbike;
|
||||
Mtxf spa4;
|
||||
Mtxf sp64;
|
||||
f32 sp40[3][3];
|
||||
|
@ -6373,11 +6371,10 @@ s32 func0f072144(struct defaultobj *obj, struct coord *arg1, f32 arg2, bool arg3
|
|||
setup0f09233c(obj, &pos, sp460, rooms);
|
||||
|
||||
if (obj->type == OBJTYPE_HOVERBIKE) {
|
||||
hoverbike = (struct hoverbikeobj *)obj;
|
||||
hoverbike = (struct hoverbikeobj *) obj;
|
||||
hov = &hoverbike->hov;
|
||||
} else if (obj->type == OBJTYPE_HOVERPROP) {
|
||||
hoverprop = (struct hoverpropobj *)obj;
|
||||
hov = &hoverprop->hov;
|
||||
hov = &((struct hoverpropobj *) obj)->hov;
|
||||
}
|
||||
|
||||
if (hov != NULL) {
|
||||
|
@ -6401,12 +6398,13 @@ s32 func0f072144(struct defaultobj *obj, struct coord *arg1, f32 arg2, bool arg3
|
|||
}
|
||||
|
||||
if (cdresult == CDRESULT_NOCOLLISION) {
|
||||
func0f069850(obj, &pos, sp460, &cyl);
|
||||
func0f069850(obj, &pos, sp460, &geounion.cyl);
|
||||
|
||||
if (obj->flags3 & OBJFLAG3_GEOCYL) {
|
||||
cdresult = cdExamCylMove01(&prop->pos, &pos, cyl.radius, rooms, CDTYPE_ALL, CHECKVERTICAL_YES, cyl.ymax - pos.y, cyl.ymin - pos.y);
|
||||
cdresult = cdExamCylMove01(&prop->pos, &pos, geounion.cyl.radius, rooms, CDTYPE_ALL,
|
||||
CHECKVERTICAL_YES, geounion.cyl.ymax - pos.y, geounion.cyl.ymin - pos.y);
|
||||
} else {
|
||||
cdresult = cd0002f02c((struct geoblock *)&cyl, rooms, CDTYPE_ALL);
|
||||
cdresult = cd0002f02c(&geounion.block, rooms, CDTYPE_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6424,9 +6422,9 @@ s32 func0f072144(struct defaultobj *obj, struct coord *arg1, f32 arg2, bool arg3
|
|||
|
||||
if (obj->geocyl && (obj->hidden2 & OBJH2FLAG_08)) {
|
||||
if (obj->flags3 & OBJFLAG3_GEOCYL) {
|
||||
*obj->geocyl = cyl;
|
||||
*obj->geocyl = geounion.cyl;
|
||||
} else {
|
||||
*obj->geoblock = *(struct geoblock *)&cyl;
|
||||
*obj->geoblock = geounion.block;
|
||||
}
|
||||
}
|
||||
} else if (hov) {
|
||||
|
@ -15600,12 +15598,9 @@ Gfx *objRenderShadow(struct defaultobj *obj, Gfx *gdl)
|
|||
|
||||
Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass)
|
||||
{
|
||||
u32 stack;
|
||||
u32 stack2;
|
||||
struct defaultobj *obj = prop->obj;
|
||||
f32 spe8;
|
||||
f32 spe8[4];
|
||||
s32 spe4;
|
||||
s32 i;
|
||||
struct defaultobj *obj = prop->obj;
|
||||
struct modelrenderdata renderdata = {NULL, true, 3};
|
||||
struct screenbox screenbox;
|
||||
s32 colour[4];
|
||||
|
@ -15624,8 +15619,9 @@ Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass)
|
|||
struct colour *oldcolours;
|
||||
struct colour *newcolours;
|
||||
f32 objdist;
|
||||
s32 i;
|
||||
|
||||
spe4 = env0f1667f4(prop, &spe8);
|
||||
spe4 = env0f1667f4(prop, spe8);
|
||||
|
||||
if (spe4 == 0) {
|
||||
return gdl;
|
||||
|
@ -15708,9 +15704,9 @@ Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass)
|
|||
if (door->doortype == DOORTYPE_LASER) {
|
||||
node = func0f0687e4(obj->model);
|
||||
dldata1 = &node->rodata->dl;
|
||||
dldata2 = (struct modelrwdata_dl *)modelGetNodeRwData(obj->model, node);
|
||||
oldcolours = (struct colour *)(((u32)&dldata1->vertices[dldata1->numvertices] + 7 | 7) ^ 7);
|
||||
newcolours = (struct colour *)gfxAllocateColours(dldata1->numcolours);
|
||||
dldata2 = (struct modelrwdata_dl *) modelGetNodeRwData(obj->model, node);
|
||||
oldcolours = (struct colour *) ((((u32) &dldata1->vertices[dldata1->numvertices] + 7) | 7) ^ 7);
|
||||
newcolours = (struct colour *) gfxAllocateColours(dldata1->numcolours);
|
||||
|
||||
for (i = 0; i < dldata1->numcolours; i++) {
|
||||
newcolours[i] = oldcolours[i];
|
||||
|
@ -15809,7 +15805,7 @@ Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass)
|
|||
colour[3] = 0xff;
|
||||
}
|
||||
|
||||
func0f069750(colour, spe4, &spe8);
|
||||
func0f069750(colour, spe4, spe8);
|
||||
|
||||
if (USINGDEVICE(DEVICE_NIGHTVISION)) {
|
||||
if ((obj->flags & OBJFLAG_PATHBLOCKER) == 0) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "constants.h"
|
||||
#include "game/race.h"
|
||||
#include "game/chr.h"
|
||||
#include "lib/model.h"
|
||||
#include "bss.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "lib/vi.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "data.h"
|
||||
#include "gbiex.h"
|
||||
#include "types.h"
|
||||
|
||||
u32 g_RadarX;
|
||||
|
@ -129,7 +130,7 @@ Gfx *radarDrawDot(Gfx *gdl, struct prop *prop, struct coord *dist, u32 colour1,
|
|||
osSyncPrintf("RadarDrawDot : Prop=%x", prop);
|
||||
|
||||
spcc = (atan2f(dist->x, dist->z) * 180.0f) / M_PI + g_Vars.currentplayer->vv_theta + 180.0f;
|
||||
sqdist = sqrtf(dist->z * dist->z + dist->x * dist->x) * 0.004f;
|
||||
sqdist = sqrtf(dist->z * dist->z + dist->x * dist->x) * (1.0f / 250.0f);
|
||||
|
||||
if (sqdist < 16.0f) {
|
||||
shiftamount = 0;
|
||||
|
|
|
@ -380,7 +380,7 @@ Gfx *menugfxDrawPlane(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, u32 colour1, u32
|
|||
*/
|
||||
void savebufferOr(struct savebuffer *buffer, u32 value, s32 numbits)
|
||||
{
|
||||
u32 bit = 1 << (numbits + 31);
|
||||
u32 bit = 1 << (numbits - 1);
|
||||
|
||||
for (; bit; bit >>= 1) {
|
||||
if (bit & value) {
|
||||
|
@ -403,7 +403,7 @@ void savebufferOr(struct savebuffer *buffer, u32 value, s32 numbits)
|
|||
*/
|
||||
void savebufferWriteBits(struct savebuffer *buffer, u32 value, s32 numbits, u8 *dst)
|
||||
{
|
||||
u32 bit = 1 << (numbits + 31);
|
||||
u32 bit = 1 << (numbits - 1);
|
||||
|
||||
for (; bit; bit >>= 1) {
|
||||
s32 bitindex = buffer->bitpos % 8;
|
||||
|
@ -429,7 +429,7 @@ void savebufferWriteBits(struct savebuffer *buffer, u32 value, s32 numbits, u8 *
|
|||
*/
|
||||
u32 savebufferReadBits(struct savebuffer *buffer, s32 numbits)
|
||||
{
|
||||
u32 bit = 1 << (numbits + 31);
|
||||
u32 bit = 1 << (numbits - 1);
|
||||
u32 value = 0;
|
||||
|
||||
for (; bit; bit >>= 1) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "game/playerreset.h"
|
||||
#include "game/botmgr.h"
|
||||
#include "game/chr.h"
|
||||
#include "game/chrmgr.h"
|
||||
#include "game/body.h"
|
||||
#include "game/prop.h"
|
||||
#include "game/setuputils.h"
|
||||
|
@ -24,8 +25,10 @@
|
|||
#include "game/pad.h"
|
||||
#include "game/propobj.h"
|
||||
#include "bss.h"
|
||||
#include "lib/args.h"
|
||||
#include "lib/memp.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "lib/ailist.h"
|
||||
|
@ -781,7 +784,7 @@ void setupCreateMine(struct mineobj *mine, s32 cmdindex)
|
|||
setupCreateObject(&mine->base, cmdindex);
|
||||
|
||||
if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) {
|
||||
mine->base.hidden = mine->base.hidden & 0x0fffffff | OBJHFLAG_20000000;
|
||||
mine->base.hidden = (mine->base.hidden & 0x0fffffff) | OBJHFLAG_20000000;
|
||||
}
|
||||
|
||||
mine->base.prop->forcetick = true;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "game/bg.h"
|
||||
#include "game/pad.h"
|
||||
#include "bss.h"
|
||||
#include "lib/collision.h"
|
||||
#include "lib/memp.h"
|
||||
#include "lib/anim.h"
|
||||
#include "data.h"
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
#include "game/bondhead.h"
|
||||
#include "game/bg.h"
|
||||
#include "game/pad.h"
|
||||
#include "game/setup.h"
|
||||
#include "bss.h"
|
||||
#include "lib/collision.h"
|
||||
#include "lib/mtx.h"
|
||||
#include "lib/anim.h"
|
||||
#include "lib/model.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "game/bg.h"
|
||||
#include "game/modeldef.h"
|
||||
#include "game/propobj.h"
|
||||
#include "lib/model.h"
|
||||
#include "bss.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
|
|
@ -22,7 +22,7 @@ void shardsReset(void)
|
|||
if (g_MaxShards == 0) {
|
||||
g_Shards = NULL;
|
||||
} else {
|
||||
g_Shards = mempAlloc(g_MaxShards * sizeof(struct shard) + 0xf & ~0xf, MEMPOOL_STAGE);
|
||||
g_Shards = mempAlloc((g_MaxShards * sizeof(struct shard) + 0xf) & ~0xf, MEMPOOL_STAGE);
|
||||
|
||||
for (i = 0; i < g_MaxShards; i++) {
|
||||
g_Shards[i].age60 = 0;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "game/game_152fa0.h"
|
||||
#include "game/env.h"
|
||||
#include "game/pad.h"
|
||||
#include "game/tex.h"
|
||||
#include "bss.h"
|
||||
#include "lib/vi.h"
|
||||
#include "lib/mtx.h"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "game/utils.h"
|
||||
#include "game/wallhit.h"
|
||||
#include "bss.h"
|
||||
#include "lib/lib_17ce0.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/rng.h"
|
||||
#include "lib/mtx.h"
|
||||
|
@ -273,8 +274,8 @@ bool splat0f149274(f32 arg0, struct prop *chrprop, struct shotdata *shotdata, f3
|
|||
endpos.f[i] = stackshotdata.gunpos.f[i] + stackshotdata.dir.f[i] * g_SplatMaxDistance;
|
||||
}
|
||||
|
||||
portal00018148(&chrprop->pos, &stackshotdata.gunpos, chrprop->rooms, &gunrooms, NULL, 0);
|
||||
portal00018148(&stackshotdata.gunpos, &endpos, &gunrooms, &endrooms, rooms, ARRAYCOUNT(rooms) - 1);
|
||||
portal00018148(&chrprop->pos, &stackshotdata.gunpos, chrprop->rooms, gunrooms, NULL, 0);
|
||||
portal00018148(&stackshotdata.gunpos, &endpos, gunrooms, endrooms, rooms, ARRAYCOUNT(rooms) - 1);
|
||||
|
||||
for (i = 0; rooms[i] != -1; i++) {
|
||||
if (bgTestHitInRoom(&stackshotdata.gunpos, &endpos, rooms[i], &hitthing)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "game/texdecompress.h"
|
||||
#include "bss.h"
|
||||
#include "data.h"
|
||||
#include "gbiex.h"
|
||||
#include "textures.h"
|
||||
#include "types.h"
|
||||
|
||||
|
|
|
@ -351,10 +351,10 @@ s32 texGetAverageRed(u16 colour1, u16 colour2, u16 colour3, u16 colour4)
|
|||
{
|
||||
s32 value = 0;
|
||||
|
||||
value += ((colour1 >> 11) & 0x1f) << 3 | (colour1 >> 13) & 7;
|
||||
value += ((colour2 >> 11) & 0x1f) << 3 | (colour2 >> 13) & 7;
|
||||
value += ((colour3 >> 11) & 0x1f) << 3 | (colour3 >> 13) & 7;
|
||||
value += ((colour4 >> 11) & 0x1f) << 3 | (colour4 >> 13) & 7;
|
||||
value += (((colour1 >> 11) & 0x1f) << 3) | ((colour1 >> 13) & 7);
|
||||
value += (((colour2 >> 11) & 0x1f) << 3) | ((colour2 >> 13) & 7);
|
||||
value += (((colour3 >> 11) & 0x1f) << 3) | ((colour3 >> 13) & 7);
|
||||
value += (((colour4 >> 11) & 0x1f) << 3) | ((colour4 >> 13) & 7);
|
||||
|
||||
value = (value + 2) >> 2;
|
||||
|
||||
|
@ -373,10 +373,10 @@ s32 texGetAverageGreen(u16 colour1, u16 colour2, u16 colour3, u16 colour4)
|
|||
{
|
||||
s32 value = 0;
|
||||
|
||||
value += ((colour1 >> 6) & 0x1f) << 3 | (colour1 >> 8) & 7;
|
||||
value += ((colour2 >> 6) & 0x1f) << 3 | (colour2 >> 8) & 7;
|
||||
value += ((colour3 >> 6) & 0x1f) << 3 | (colour3 >> 8) & 7;
|
||||
value += ((colour4 >> 6) & 0x1f) << 3 | (colour4 >> 8) & 7;
|
||||
value += (((colour1 >> 6) & 0x1f) << 3) | ((colour1 >> 8) & 7);
|
||||
value += (((colour2 >> 6) & 0x1f) << 3) | ((colour2 >> 8) & 7);
|
||||
value += (((colour3 >> 6) & 0x1f) << 3) | ((colour3 >> 8) & 7);
|
||||
value += (((colour4 >> 6) & 0x1f) << 3) | ((colour4 >> 8) & 7);
|
||||
|
||||
value = (value + 2) >> 2;
|
||||
|
||||
|
@ -395,10 +395,10 @@ s32 texGetAverageBlue(u16 colour1, u16 colour2, u16 colour3, u16 colour4)
|
|||
{
|
||||
s32 value = 0;
|
||||
|
||||
value += ((colour1 >> 1) & 0x1f) << 3 | (colour1 >> 3) & 7;
|
||||
value += ((colour2 >> 1) & 0x1f) << 3 | (colour2 >> 3) & 7;
|
||||
value += ((colour3 >> 1) & 0x1f) << 3 | (colour3 >> 3) & 7;
|
||||
value += ((colour4 >> 1) & 0x1f) << 3 | (colour4 >> 3) & 7;
|
||||
value += (((colour1 >> 1) & 0x1f) << 3) | ((colour1 >> 3) & 7);
|
||||
value += (((colour2 >> 1) & 0x1f) << 3) | ((colour2 >> 3) & 7);
|
||||
value += (((colour3 >> 1) & 0x1f) << 3) | ((colour3 >> 3) & 7);
|
||||
value += (((colour4 >> 1) & 0x1f) << 3) | ((colour4 >> 3) & 7);
|
||||
|
||||
value = (value + 2) >> 2;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ s32 texReadBits(s32 arg0)
|
|||
|
||||
var800ab548 -= arg0;
|
||||
|
||||
return var800ab544 >> var800ab548 & (1 << arg0) - 1;
|
||||
return var800ab544 >> var800ab548 & ((1 << arg0) - 1);
|
||||
}
|
||||
|
||||
extern u8 *g_TextureConfigSegment;
|
||||
|
@ -76,7 +76,7 @@ void texReset(void)
|
|||
g_TexWords = mempAlloc(ALIGN16(g_TexNumConfigs * 4), MEMPOOL_STAGE);
|
||||
|
||||
for (i = 0; i < g_TexNumConfigs; i++) {
|
||||
g_TexWords[i] = 0;
|
||||
g_TexWords[i] = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAYCOUNT(g_TcExplosionTexturePairs); i++) {
|
||||
|
|
|
@ -289,7 +289,21 @@ void texSelect(Gfx **gdlptr, struct textureconfig *tconfig, u32 arg2, s32 arg3,
|
|||
if (tconfig->unk0b == 1) {
|
||||
ptr = (u16 *)tconfig->textureptr;
|
||||
texturenum = ((u16 *)PHYS_TO_K0(ptr))[-4];
|
||||
|
||||
// GCC has problems with this area because it seems to think that
|
||||
// registers are 64 bits wide. To do the index < g_TexNumConfigs
|
||||
// comparison, it shifts index left and adds to it repeatedly,
|
||||
// creating a 64-bit value, then uses a neg before the comparison.
|
||||
// When a tconfig is passed that is not in the preset configs list,
|
||||
// the index < g_TexNumConfigs check passes when it shouldn't,
|
||||
// causing a read from g_TexWords using an invalid index.
|
||||
// Casting the pointers to integers makes gcc emit different code
|
||||
// which works around this issue.
|
||||
#ifdef __sgi
|
||||
index = tconfig - g_TexWallhitConfigs;
|
||||
#else
|
||||
index = ((s32) tconfig - (s32) g_TexWallhitConfigs) / sizeof(struct textureconfig);
|
||||
#endif
|
||||
|
||||
if (index >= 0 && index < g_TexNumConfigs) {
|
||||
tex = g_TexWords[index];
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "lib/lib_317f0.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
#include "string.h"
|
||||
|
||||
u8 *var8009cca0;
|
||||
u32 var8009cca4;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "game/game_00b820.h"
|
||||
#include "game/getitle.h"
|
||||
#include "game/title.h"
|
||||
#include "bss.h"
|
||||
#include "lib/memp.h"
|
||||
|
|
|
@ -2338,6 +2338,9 @@ u8 g_ChrBioSlot = 0;
|
|||
|
||||
struct chrbio *ciGetChrBioByBodynum(u32 bodynum)
|
||||
{
|
||||
#ifdef AVOID_UB
|
||||
static
|
||||
#endif
|
||||
struct chrbio bios[] = {
|
||||
// name, race, age, profile
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
|
@ -2432,6 +2435,9 @@ s32 ciGetChrBioBodynumBySlot(s32 slot)
|
|||
|
||||
struct miscbio *ciGetMiscBio(s32 index)
|
||||
{
|
||||
#ifdef AVOID_UB
|
||||
static
|
||||
#endif
|
||||
struct miscbio bios[] = {
|
||||
// name, description
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
|
@ -2521,6 +2527,9 @@ u8 g_HangarBioSlot = 0;
|
|||
|
||||
struct hangarbio *ciGetHangarBio(s32 index)
|
||||
{
|
||||
#ifdef AVOID_UB
|
||||
static
|
||||
#endif
|
||||
struct hangarbio bios[] = {
|
||||
// name, description
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
|
|
|
@ -191,7 +191,7 @@ s32 frWeaponListMenuHandler(s32 operation, struct menuitem *item, union handlerd
|
|||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
colour = colour & 0xffffff00 | ((colour & 0xff) * (renderdata->colour & 0xff)) >> 8;
|
||||
colour = (colour & 0xffffff00) | (((colour & 0xff) * (renderdata->colour & 0xff)) >> 8);
|
||||
#endif
|
||||
|
||||
gDPSetEnvColorViaWord(gdl++, colour);
|
||||
|
@ -607,9 +607,9 @@ s32 frScoringMenuHandler(s32 operation, struct menuitem *item, union handlerdata
|
|||
static u32 y4 = 0;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
linecolourmid = linecolourmid & 0xffffff00 | (linecolourmid & 0xff) * (renderdata->colour & 0xff) >> 8;
|
||||
linecolourfig = linecolourfig & 0xffffff00 | (linecolourfig & 0xff) * (renderdata->colour & 0xff) >> 8;
|
||||
linecolourtex = linecolourtex & 0xffffff00 | (linecolourtex & 0xff) * (renderdata->colour & 0xff) >> 8;
|
||||
linecolourmid = (linecolourmid & 0xffffff00) | ((linecolourmid & 0xff) * (renderdata->colour & 0xff) >> 8);
|
||||
linecolourfig = (linecolourfig & 0xffffff00) | ((linecolourfig & 0xff) * (renderdata->colour & 0xff) >> 8);
|
||||
linecolourtex = (linecolourtex & 0xffffff00) | ((linecolourtex & 0xff) * (renderdata->colour & 0xff) >> 8);
|
||||
#endif
|
||||
|
||||
mainOverrideVariable("x1", &x1);
|
||||
|
@ -635,7 +635,7 @@ s32 frScoringMenuHandler(s32 operation, struct menuitem *item, union handlerdata
|
|||
gDPSetTextureFilter(gdl++, G_TF_POINT);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
colour = (failed ? 0xff777799 : 0x55ff5588) & 0xffffff00 | ((failed ? 0xff777799 : 0x55ff5588) & 0xff) * (renderdata->colour & 0xff) >> 8;
|
||||
colour = ((failed ? 0xff777799 : 0x55ff5588) & 0xffffff00) | (((failed ? 0xff777799 : 0x55ff5588) & 0xff) * (renderdata->colour & 0xff) >> 8);
|
||||
gDPSetEnvColorViaWord(gdl++, colour);
|
||||
#else
|
||||
gDPSetEnvColorViaWord(gdl++, failed ? 0xff777799 : 0x55ff5588);
|
||||
|
@ -670,8 +670,8 @@ s32 frScoringMenuHandler(s32 operation, struct menuitem *item, union handlerdata
|
|||
G_TX_RENDERTILE, 16, 1024, -1024 / g_ScaleX, 1024);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
gdl = textSetPrimColour(gdl, (failed ? 0xff000055 : 0x00ff0055) & 0xffffff00 | ((failed ? 0xff000055 : 0x00ff0055) & 0xff) * (renderdata->colour & 0xff) >> 8);
|
||||
colour = (failed ? 0xff6969aa : renderdata->colour) & 0xffffff00 | (((failed ? 0xff6969aa : renderdata->colour) & 0xff) * (renderdata->colour & 0xff)) >> 8;
|
||||
gdl = textSetPrimColour(gdl, ((failed ? 0xff000055 : 0x00ff0055) & 0xffffff00) | (((failed ? 0xff000055 : 0x00ff0055) & 0xff) * (renderdata->colour & 0xff) >> 8));
|
||||
colour = ((failed ? 0xff6969aa : renderdata->colour) & 0xffffff00) | ((((failed ? 0xff6969aa : renderdata->colour) & 0xff) * (renderdata->colour & 0xff)) >> 8);
|
||||
#else
|
||||
gdl = textSetPrimColour(gdl, failed ? 0xff000055 : 0x00ff0055);
|
||||
#endif
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "game/propobj.h"
|
||||
#include "bss.h"
|
||||
#include "lib/mema.h"
|
||||
#include "lib/model.h"
|
||||
#include "lib/rng.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
|
|
@ -23,17 +23,6 @@
|
|||
|
||||
struct weatherdata *g_WeatherData = NULL;
|
||||
|
||||
s32 var8007f0c4[4] = {
|
||||
0x000080b7,
|
||||
0x000080b6,
|
||||
0x000080b8,
|
||||
-1,
|
||||
};
|
||||
|
||||
u32 g_RainSpeedExtra = 20;
|
||||
u32 g_SnowSpeed = 15;
|
||||
u32 g_SnowSpeedExtra = 10;
|
||||
|
||||
Gfx *weatherRender(Gfx *gdl)
|
||||
{
|
||||
struct weatherdata *weather;
|
||||
|
@ -267,6 +256,10 @@ void weatherSetIntensity(s32 intensity)
|
|||
g_WeatherData->intensity = intensity;
|
||||
}
|
||||
|
||||
u32 g_RainSpeedExtra;
|
||||
u32 g_SnowSpeed;
|
||||
u32 g_SnowSpeedExtra;
|
||||
|
||||
void weatherTickRain(struct weatherdata *weather)
|
||||
{ \
|
||||
s32 lVar6 = 0;
|
||||
|
@ -302,7 +295,12 @@ void weatherTickRain(struct weatherdata *weather)
|
|||
|
||||
// Rain noise
|
||||
for (i = 0; i != 4; i++) {
|
||||
s32 sounds[4] = var8007f0c4;
|
||||
s32 sounds[] = {
|
||||
0x80b7,
|
||||
0x80b6,
|
||||
0x80b8,
|
||||
-1,
|
||||
};
|
||||
|
||||
iVar10 = weather->unk58[i].unk00 * 32767.0f * weather->unk88;
|
||||
|
||||
|
@ -422,6 +420,10 @@ void weatherTickRain(struct weatherdata *weather)
|
|||
}
|
||||
}
|
||||
|
||||
u32 g_RainSpeedExtra = 20;
|
||||
u32 g_SnowSpeed = 15;
|
||||
u32 g_SnowSpeedExtra = 10;
|
||||
|
||||
void weatherTickSnow(struct weatherdata *weather)
|
||||
{ \
|
||||
s32 lVar7 = 0;
|
||||
|
@ -4559,8 +4561,6 @@ u32 var8007f108 = 10;
|
|||
u32 var8007f10c = 0x8888aaff;
|
||||
u32 var8007f110 = 0xffffff7f;
|
||||
#else
|
||||
u32 var8007f100 = 50;
|
||||
|
||||
Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
||||
{
|
||||
struct weatherparticledata *particledata;
|
||||
|
@ -4621,6 +4621,7 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
s32 index;
|
||||
s32 stack2[2];
|
||||
|
||||
static u32 var8007f100 = 50;
|
||||
static u32 var8007f104 = 5;
|
||||
static u32 var8007f108 = 10;
|
||||
static u32 var8007f10c = 0x8888aaff;
|
||||
|
@ -4686,7 +4687,7 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
// x
|
||||
f0 = particle->pos.f[0] - particledata->boundarymin.f[0] - sp228.f[0];
|
||||
|
||||
if (f0 < 0) {
|
||||
if (f0 < 0.0f) {
|
||||
f0 += particledata->boundaryrange.f[0];
|
||||
}
|
||||
|
||||
|
@ -4699,7 +4700,7 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
// y
|
||||
f0 = particle->pos.f[1] - particledata->boundarymin.f[1] - sp228.f[1];
|
||||
|
||||
if (f0 < 0) {
|
||||
if (f0 < 0.0f) {
|
||||
f0 += particledata->boundaryrange.f[1];
|
||||
}
|
||||
|
||||
|
@ -4712,7 +4713,7 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
// z
|
||||
f0 = particle->pos.f[2] - particledata->boundarymin.f[2] - sp228.f[2];
|
||||
|
||||
if (f0 < 0) {
|
||||
if (f0 < 0.0f) {
|
||||
f0 += particledata->boundaryrange.f[2];
|
||||
}
|
||||
|
||||
|
@ -4771,6 +4772,8 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
if (a0 && sp1268 < 50) {
|
||||
sp126c[sp1268] = sp144[j2];
|
||||
sp1268++;
|
||||
} else {
|
||||
// empty
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4790,15 +4793,15 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
if (s7 < 50) {
|
||||
sp1078[s7] = sp126c[i];
|
||||
s7++;
|
||||
} else {
|
||||
// empty
|
||||
}
|
||||
}
|
||||
|
||||
if (1);
|
||||
}
|
||||
|
||||
// 4ea4
|
||||
for (j = 0; j < s7; j++) {
|
||||
if (var8007f100);
|
||||
if (1);
|
||||
|
||||
sp264[j][6] = sp264[j][0] = g_Rooms[sp1078[j]].bbmin[0] / 1 - var8007f104;
|
||||
sp264[j][9] = sp264[j][3] = g_Rooms[sp1078[j]].bbmax[0] / 1 + var8007f104;
|
||||
|
@ -4832,7 +4835,7 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
colours = gfxAllocateColours(16);
|
||||
|
||||
for (j = 0; j < 16; j++) {
|
||||
colours[j] = (var8007f10c & 0xffffff00) | ((0x10ef - j * 0xff) / 0x11);
|
||||
colours[j] = (var8007f10c & 0xffffff00) | ((0xff * 17 - j * 0xff) / 17);
|
||||
}
|
||||
|
||||
gDPSetColorArray(gdl++, osVirtualToPhysical(colours), 16);
|
||||
|
@ -4844,12 +4847,13 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
if (particledata->particles[s8].active & 3) {
|
||||
sp1354 = osGetCount();
|
||||
|
||||
sp124.f[0] = particledata->unk3e80.f[0] + particledata->particles[s8].pos.f[0];
|
||||
sp124.f[1] = particledata->unk3e80.f[1] + particledata->particles[s8].pos.f[1];
|
||||
sp124.f[2] = particledata->unk3e80.f[2] + particledata->particles[s8].pos.f[2];
|
||||
sp124.f[0] = particledata->particles[s8].pos.f[0] + particledata->unk3e80.f[0];
|
||||
sp124.f[1] = particledata->particles[s8].pos.f[1] + particledata->unk3e80.f[1];
|
||||
sp124.f[2] = particledata->particles[s8].pos.f[2] + particledata->unk3e80.f[2];
|
||||
|
||||
if (cam0f0b5b9c(&sp124, 5)) {
|
||||
sp137c = sp137c + osGetCount() - sp1354;
|
||||
s32 count = osGetCount();
|
||||
sp137c = sp137c + count - sp1354;
|
||||
|
||||
sp21c = particledata->particles[s8].pos.f[0];
|
||||
sp220 = particledata->particles[s8].pos.f[2];
|
||||
|
@ -4859,17 +4863,19 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
if (f20 < 0.00001f) {
|
||||
// empty
|
||||
} else {
|
||||
sp260 = 0.0f;
|
||||
s32 tmp2 = sp198 * 4;
|
||||
|
||||
if (sp198 == 0) {
|
||||
vertices = gfxAllocateVertices(8);
|
||||
}
|
||||
|
||||
v0_2 = &vertices[tmp2];
|
||||
|
||||
sp260 = 0.0f;
|
||||
|
||||
sp21c /= f20;
|
||||
sp220 /= f20;
|
||||
|
||||
v0_2 = &vertices[sp198 * 4];
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
v0_2[j].s = 0;
|
||||
v0_2[j].t = 0;
|
||||
|
@ -4887,8 +4893,6 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
|
||||
for (j = 0; j < s7; j++) {
|
||||
// 5398
|
||||
if (var8007f100);
|
||||
|
||||
if (s1
|
||||
&& sp264[j][6] < sp118.f[0]
|
||||
&& sp264[j][9] > sp118.f[0]
|
||||
|
@ -4946,6 +4950,8 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
|
||||
// 559c
|
||||
if (s1) {
|
||||
s32 j;
|
||||
|
||||
f0_3 = sqrtf(particledata->particles[s8].pos.f[0] * particledata->particles[s8].pos.f[0]
|
||||
+ particledata->particles[s8].pos.f[1] * particledata->particles[s8].pos.f[1]
|
||||
+ particledata->particles[s8].pos.f[2] * particledata->particles[s8].pos.f[2]);
|
||||
|
@ -4957,21 +4963,33 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
// 55fc
|
||||
f0_4 = sqrtf(f24 * f24 + f26 * f26);
|
||||
|
||||
sp1144.f[2] = sp108 * (f24 / f0_4);
|
||||
sp1144.f[1] = -f0_3;
|
||||
sp1144.f[0] = sp108 * (f26 / f0_4);
|
||||
sp1144.f[1] = -f0_4;
|
||||
sp1144.f[2] = sp108 * (f24 / f0_4);
|
||||
|
||||
sp1144.f[6] = -sp220;
|
||||
sp1144.f[7] = 1.0f;
|
||||
sp1144.f[8] = sp21c;
|
||||
sp115c.f[0] = -sp220;
|
||||
sp115c.f[1] = 1.0f;
|
||||
sp115c.f[2] = sp21c;
|
||||
|
||||
// 5720
|
||||
index = (s8 >> 2) & 7;
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
sp19c[j].f[0] += (var8007f104 * (f26 / f0_4)) * sp1168[index][j][0] + (var8007f104 * sp1144.f[2]) * sp1168[index][j][1];
|
||||
sp19c[j].f[1] += 0.0f + (var8007f104 * sp1144.f[1]) * sp1168[index][j][1];
|
||||
sp19c[j].f[2] += (var8007f104 * -(f24 / f0_4)) * sp1168[index][j][0] + (var8007f104 * sp1144.f[0]) * sp1168[index][j][1];
|
||||
f32 a;
|
||||
f32 b;
|
||||
f32 c;
|
||||
|
||||
a = var8007f104 * (f26 / f0_4) * sp1168[index][j][0];
|
||||
b = 0.0f;
|
||||
c = var8007f104 * -(f24 / f0_4) * sp1168[index][j][0];
|
||||
|
||||
a += var8007f104 * sp1144.f[2] * sp1168[index][j][1];
|
||||
b += var8007f104 * sp1144.f[1] * sp1168[index][j][1];
|
||||
c += var8007f104 * sp1144.f[0] * sp1168[index][j][1];
|
||||
|
||||
sp19c[j].f[1] += b;
|
||||
sp19c[j].f[0] += a;
|
||||
sp19c[j].f[2] += c;
|
||||
}
|
||||
|
||||
// 5784
|
||||
|
@ -5029,44 +5047,49 @@ Gfx *weatherRenderSnow(Gfx *gdl, struct weatherdata *weather, s32 arg2)
|
|||
}
|
||||
|
||||
// 5978
|
||||
v0 = &vertices[sp198 * 4];
|
||||
{
|
||||
s16 a;
|
||||
s16 b;
|
||||
|
||||
v0[0].colour = (s32)(sp260 * 16.0f) * 4;
|
||||
v0[1].colour = (s32)(sp260 * 16.0f) * 4;
|
||||
v0[2].colour = (s32)(sp260 * 16.0f) * 4;
|
||||
v0[3].colour = (s32)(sp260 * 16.0f) * 4;
|
||||
b = (s16) (((s8 & 2) >> 1) * 8);
|
||||
a = (s16) ((s8 & 1) * 8);
|
||||
|
||||
v0[0].s = ((s32)(s8 & 1) * 8) * 32;
|
||||
v0[1].s = ((s32)(s8 & 1) * 8 + 8) * 32;
|
||||
v0[2].s = ((s32)(s8 & 1) * 8 + 8) * 32;
|
||||
v0[3].s = ((s32)(s8 & 1) * 8) * 32;
|
||||
vertices[sp198 * 4 + 0].colour = (s32) (sp260 * 16.0f) * 4;
|
||||
vertices[sp198 * 4 + 1].colour = (s32) (sp260 * 16.0f) * 4;
|
||||
vertices[sp198 * 4 + 2].colour = (s32) (sp260 * 16.0f) * 4;
|
||||
vertices[sp198 * 4 + 3].colour = (s32) (sp260 * 16.0f) * 4;
|
||||
|
||||
v0[0].t = (((s8 & 2) >> 1) * 8 + 8) * 32;
|
||||
v0[1].t = (((s8 & 2) >> 1) * 8 + 8) * 32;
|
||||
v0[2].t = (((s8 & 2) >> 1) * 8) * 32;
|
||||
v0[3].t = (((s8 & 2) >> 1) * 8) * 32;
|
||||
vertices[sp198 * 4 + 0].s = (s16) (a) * 32;
|
||||
vertices[sp198 * 4 + 1].s = (s16) (a + 8) * 32;
|
||||
vertices[sp198 * 4 + 2].s = (s16) (a + 8) * 32;
|
||||
vertices[sp198 * 4 + 3].s = (s16) (a) * 32;
|
||||
|
||||
v0[0].x = sp19c[0].f[0];
|
||||
v0[0].y = sp19c[0].f[1];
|
||||
v0[0].z = sp19c[0].f[2];
|
||||
vertices[sp198 * 4 + 0].t = (s16) (b + 8) * 32;
|
||||
vertices[sp198 * 4 + 1].t = (s16) (b + 8) * 32;
|
||||
vertices[sp198 * 4 + 2].t = (s16) (b) * 32;
|
||||
vertices[sp198 * 4 + 3].t = (s16) (b) * 32;
|
||||
}
|
||||
|
||||
v0[1].x = sp19c[1].f[0];
|
||||
v0[1].y = sp19c[1].f[1];
|
||||
v0[1].z = sp19c[1].f[2];
|
||||
vertices[sp198 * 4 + 0].x = sp19c[0].f[0];
|
||||
vertices[sp198 * 4 + 0].y = sp19c[0].f[1];
|
||||
vertices[sp198 * 4 + 0].z = sp19c[0].f[2];
|
||||
|
||||
v0[2].x = sp19c[2].f[0];
|
||||
v0[2].y = sp19c[2].f[1];
|
||||
v0[2].z = sp19c[2].f[2];
|
||||
vertices[sp198 * 4 + 1].x = sp19c[1].f[0];
|
||||
vertices[sp198 * 4 + 1].y = sp19c[1].f[1];
|
||||
vertices[sp198 * 4 + 1].z = sp19c[1].f[2];
|
||||
|
||||
v0[3].x = sp19c[3].f[0];
|
||||
v0[3].y = sp19c[3].f[1];
|
||||
v0[3].z = sp19c[3].f[2];
|
||||
vertices[sp198 * 4 + 2].x = sp19c[2].f[0];
|
||||
vertices[sp198 * 4 + 2].y = sp19c[2].f[1];
|
||||
vertices[sp198 * 4 + 2].z = sp19c[2].f[2];
|
||||
|
||||
vertices[sp198 * 4 + 3].x = sp19c[3].f[0];
|
||||
vertices[sp198 * 4 + 3].y = sp19c[3].f[1];
|
||||
vertices[sp198 * 4 + 3].z = sp19c[3].f[2];
|
||||
|
||||
if (sp198 == 1) {
|
||||
sp198 = 0;
|
||||
|
||||
gDPSetVerticeArray(gdl++, osVirtualToPhysical(vertices), 8);
|
||||
gDPTri4(gdl++, 0, 1, 2, 2, 3, 0, 4, 5, 6, 6, 7, 4);
|
||||
sp198 = 0;
|
||||
} else {
|
||||
sp198 = 1;
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
#define ABS(val) ((val) > 0 ? (val) : -(val))
|
||||
#define ABSF(val) ((val) > 0.0f ? (val) : -(val))
|
||||
#define ALIGN2(val) (((val) | 1) ^ 0x1)
|
||||
#define ALIGN8(val) (((val) + 0x7 | 0x7) ^ 0x7)
|
||||
#define ALIGN16(val) (((val) + 0xf | 0xf) ^ 0xf)
|
||||
#define ALIGN64(val) ((((u32)(val)) + 0x3f | 0x3f) ^ 0x3f)
|
||||
#define ALIGN8(val) ((((val) + 0x7) | 0x7) ^ 0x7)
|
||||
#define ALIGN16(val) ((((val) + 0xf) | 0xf) ^ 0xf)
|
||||
#define ALIGN64(val) (((((u32)(val)) + 0x3f) | 0x3f) ^ 0x3f)
|
||||
#define ARRAYCOUNT(a) (s32)(sizeof(a) / sizeof(a[0]))
|
||||
#define CHRRACE(chr) (chr ? chr->race : RACE_HUMAN)
|
||||
#define CRASH() *(u8 *)0 = 69
|
||||
|
@ -40,6 +40,9 @@
|
|||
#define SECSTOTIME60(secs) (secs * 60)
|
||||
#define PFS(device) (device == SAVEDEVICE_GAMEPAK ? NULL : &g_Pfses[device])
|
||||
|
||||
#define VALIDWEAPON() (g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED && g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST)
|
||||
#define FUNCISSEC() (VALIDWEAPON() && (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << ((g_Vars.currentplayer->gunctrl.weaponnum - 1) & 7))))
|
||||
|
||||
#define USINGDEVICE(device) (!g_Vars.currentplayer->isdead \
|
||||
&& !g_InCutscene \
|
||||
&& EYESPYINACTIVE() \
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
|
||||
Gfx *creditsDraw(Gfx *gdl);
|
||||
void creditsReset(void);
|
||||
void creditsRequestAltTitle(void);
|
||||
void credits0f13ae04(Mtxf *mtx);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,6 +28,7 @@ bool debugIsChrStatsEnabled(void);
|
|||
bool debug0f11ef80(void);
|
||||
|
||||
s32 dmenuGetSelectedOption(void);
|
||||
void dmenuSetSelectedOption(s32 option);
|
||||
void dmenuSetMenu(char **labels, s32 (*positions)[2], s32 *offsets);
|
||||
void dmenuNavigateRight(void);
|
||||
void dmenuNavigateLeft(void);
|
||||
|
|
|
@ -16,6 +16,6 @@ Gfx *envStartFog(Gfx *gdl, bool xlupass);
|
|||
Gfx *envStopFog(Gfx *gdl);
|
||||
bool env0f1666f8(struct coord *pos, f32 arg1);
|
||||
struct coord *env0f1667e8(void);
|
||||
s32 env0f1667f4(struct prop *prop, f32 *arg1);
|
||||
s32 env0f1667f4(struct prop *prop, f32 arg1[4]);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "types.h"
|
||||
|
||||
void langInit(void);
|
||||
void langReset(s32 stagenum);
|
||||
void langTick(void);
|
||||
|
||||
u32 langGetLangBankIndexFromStagenum(s32 stagenum);
|
||||
|
|
|
@ -79,7 +79,7 @@ void dialogCalculatePosition(struct menudialog *dialog);
|
|||
void menuClose(void);
|
||||
void func0f0f8120(void);
|
||||
void func0f0f820c(struct menudialogdef *dialogdef, s32 root);
|
||||
bool menuSetBackground(s32 bg);
|
||||
void menuSetBackground(s32 bg);
|
||||
void func0f0f8300(void);
|
||||
void menuPushRootDialog(struct menudialogdef *dialogdef, s32 arg1);
|
||||
void func0f0f85e0(struct menudialogdef *dialogdef, s32 root);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
void modeldef0f1a7560(struct modelfiledata *modeldef, u16 filenum, u32 arg2, u32 arg3, struct texpool *arg4, bool arg5);
|
||||
void modeldef0f1a7560(struct modelfiledata *modeldef, u16 filenum, u32 arg2, struct modelfiledata *modeldef2, struct texpool *texpool, bool arg5);
|
||||
void modelPromoteTypeToPointer(struct modelfiledata *filedata);
|
||||
struct modelfiledata *modeldefLoad(u16 fileid, u8 *arg1, s32 arg2, struct texpool *arg3);
|
||||
struct modelfiledata *modeldefLoadToNew(u16 fileid);
|
||||
|
|
|
@ -8,6 +8,8 @@ extern f32 g_AutoAimScale;
|
|||
|
||||
void propsTick(void);
|
||||
|
||||
void propsStop(void);
|
||||
|
||||
void propsSort(void);
|
||||
void propEnable(struct prop *prop);
|
||||
void propDisable(struct prop *prop);
|
||||
|
|
|
@ -88,7 +88,7 @@ s32 func0f068fc8(struct prop *prop, bool arg1);
|
|||
void propCalculateShadeColour(struct prop *prop, u8 *nextcol, u16 floorcol);
|
||||
void propCalculateShadeInfo(struct prop *prop, u8 *nextcol, u16 floorcol);
|
||||
void colourTween(u8 *col, u8 *nextcol);
|
||||
void func0f069750(s32 *arg0, s32 arg1, f32 *arg2);
|
||||
void func0f069750(s32 *arg0, s32 arg1, f32 arg2[4]);
|
||||
void func0f069850(struct defaultobj *obj, struct coord *pos, f32 rot[3][3], struct geocyl *cyl);
|
||||
void func0f069b4c(struct defaultobj *obj);
|
||||
void func0f069c1c(struct defaultobj *obj);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "types.h"
|
||||
|
||||
void quaternion0f096ca0(struct coord *arg0, f32 quat[4]);
|
||||
void quaternionToMtx(f32 *arg0, Mtxf *arg1);
|
||||
void quaternionToMtx(f32 arg0[4], Mtxf *arg1);
|
||||
void quaternion0f097044(Mtxf *matrix, f32 arg1[4]);
|
||||
void quaternionToTransformMtx(struct coord *pos, f32 rot[4], Mtxf *matrix);
|
||||
void quaternionSlerp(f32 q1[4], f32 q2[4], f32 t, f32 result[4]);
|
||||
|
|
|
@ -19,7 +19,7 @@ s32 tex0f0b34d8(s32 width, s32 height, s32 lod);
|
|||
s32 tex0f0b3548(s32 width, s32 height, s32 lod);
|
||||
void texSetRenderMode(Gfx **gdlptr, s32 arg1, s32 numcycles, s32 arg3);
|
||||
void texLoadFromConfig(struct textureconfig *config);
|
||||
void texSelect(Gfx **gdl, struct textureconfig *tconfig, u32 arg2, s32 arg3, u32 arg4, bool arg5, struct texpool *pool);
|
||||
void texSelect(Gfx **gdl, struct textureconfig *tconfig, u32 arg2, s32 arg3, u32 ulst, bool arg5, struct texpool *pool);
|
||||
|
||||
void tex0f173a08(void);
|
||||
bool texSetLutMode(u32 value);
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#ifndef _IN_GBIEX_H
|
||||
#define _IN_GBIEX_H
|
||||
#include <ultra64.h>
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
#define G_SETCOLOR 0x07
|
||||
#define G_TRI4 -79
|
||||
|
|
|
@ -9,6 +9,8 @@ void dhudInit(void);
|
|||
void dhudReset(void);
|
||||
void dhudClear(void);
|
||||
void dhudSetPos(s32 x, s32 y);
|
||||
void dhudSetFgColour(s32 r, s32 g, s32 b, s32 a);
|
||||
void dhudSetBgColour(s32 r, s32 g, s32 b, s32 a);
|
||||
void dhudPrintChar(u8 c);
|
||||
void dhudPrintString(char *text);
|
||||
Gfx *dhudRender(Gfx *gdl);
|
||||
|
|
|
@ -105,6 +105,6 @@ void modelInit(struct model *model, struct modelfiledata *filedata, union modelr
|
|||
void animInit(struct anim *anim);
|
||||
void model00023108(struct model *model, struct modelfiledata *arg1, struct modelnode *node, struct modelfiledata *arg3);
|
||||
void modelIterateDisplayLists(struct modelfiledata *filedata, struct modelnode **nodeptr, Gfx **gdlptr);
|
||||
void modelNodeReplaceGdl(u32 arg0, struct modelnode *node, Gfx *find, Gfx *replacement);
|
||||
void modelNodeReplaceGdl(struct modelfiledata *modeldef, struct modelnode *node, Gfx *find, Gfx *replacement);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef _IN_LIB_PROFILE_H
|
||||
#define _IN_LIB_PROFILE_H
|
||||
#include <ultra64.h>
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
void profileInit(void);
|
||||
void profileTick(void);
|
||||
void profileReset(void);
|
||||
void profile00009a98(void);
|
||||
void profileSetMarker(u32 arg0);
|
||||
Gfx *profileRender(Gfx *gdl);
|
||||
|
||||
#endif
|
|
@ -3,5 +3,6 @@
|
|||
#include <ultra64.h>
|
||||
|
||||
void resetproc(void *data);
|
||||
void resetThreadCreate(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -14,6 +14,7 @@ void __scExec(OSSched *sc, OSScTask *sp, OSScTask *dp);
|
|||
void __scMain(void *arg);
|
||||
void __scYield(OSSched *sc);
|
||||
void schedInitArtifacts(void);
|
||||
void schedResetArtifacts(void);
|
||||
struct artifact *schedGetWriteArtifacts(void);
|
||||
struct artifact *schedGetFrontArtifacts(void);
|
||||
void schedIncrementWriteArtifacts(void);
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
char *strcpy(char *dst, char *src);
|
||||
char *strncpy(char *dst, char *s2, s32 len);
|
||||
char *strcat(char *dst, char *src);
|
||||
s32 strcmp(char *s1, char *s2);
|
||||
s32 strncmp(char *s1, char *s2, s32 len);
|
||||
char *strcpy(char *dst, const char *src);
|
||||
char *strncpy(char *dst, const char *src, s32 len);
|
||||
char *strcat(char *dst, const char *src);
|
||||
s32 strcmp(const char *s1, const char *s2);
|
||||
s32 strncmp(const char *s1, const char *s2, s32 len);
|
||||
char toupper(char c);
|
||||
s32 isdigit(char c);
|
||||
s32 isalpha(char c);
|
||||
s32 isspace(char c);
|
||||
s32 strtol(char *arg0, char **arg1, s32 arg2);
|
||||
s32 strtol(const char *src, const char **endptr, s32 base);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
void profileInit(void);
|
||||
void profileTick(void);
|
||||
void profileReset(void);
|
||||
void profile00009a98(void);
|
||||
void profileSetMarker(u32 arg0);
|
||||
Gfx *profileRender(Gfx *gdl);
|
||||
void viConfigureForLogos(void);
|
||||
void viConfigureForCopyright(u16 *fb);
|
||||
void viConfigureForLegal(void);
|
||||
|
@ -19,6 +13,7 @@ void vi00009ed4(void);
|
|||
void viUpdateMode(void);
|
||||
void viShake(f32 intensity);
|
||||
void viSetMode(s32 mode);
|
||||
void viSet16Bit(void);
|
||||
u16 *viGetBackBuffer(void);
|
||||
u16 *viGetFrontBuffer(void);
|
||||
Vp *viGetCurrentPlayerViewport(void);
|
||||
|
@ -54,5 +49,7 @@ f32 viGetFovY(void);
|
|||
void viSetZRange(f32 arg0, f32 arg1);
|
||||
void viGetZRange(struct zrange *zrange);
|
||||
Gfx *viSetFillColour(Gfx *gdl, s32 r, s32 g, s32 b);
|
||||
void viGrabJpg32(void);
|
||||
void viGrabRgb32(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
#include <sched.h>
|
||||
#include "n_libaudio.h"
|
||||
#include "constants.h"
|
||||
#include "gbiex.h"
|
||||
#include "lang.h"
|
||||
#include "pads.h"
|
||||
#include "tiles.h"
|
||||
#include "gbi.h"
|
||||
|
||||
#define bool s32
|
||||
#define ubool u32
|
||||
|
@ -895,6 +895,13 @@ struct geocyl {
|
|||
/*0x14*/ f32 radius;
|
||||
};
|
||||
|
||||
union geounion {
|
||||
struct geotilei tilei;
|
||||
struct geotilef tilef;
|
||||
struct geoblock block;
|
||||
struct geocyl cyl;
|
||||
};
|
||||
|
||||
struct act_stand {
|
||||
/*0x2c*/ s32 prestand;
|
||||
/*0x30*/ s32 flags;
|
||||
|
@ -3431,7 +3438,7 @@ union soundnumhack {
|
|||
};
|
||||
|
||||
struct {
|
||||
u16 hasconfig : 1;
|
||||
u16 hasconfig2 : 1;
|
||||
u16 unk02 : 2;
|
||||
u16 mp3priority : 2;
|
||||
u16 id : 11;
|
||||
|
@ -4232,8 +4239,7 @@ struct mpplayerconfig {
|
|||
/*0x94*/ u8 medals;
|
||||
/*0x95*/ u8 title;
|
||||
/*0x96*/ u8 newtitle;
|
||||
/*0x97*/ u8 gunfuncs[5];
|
||||
/*0x9c*/ u8 unk9c;
|
||||
/*0x97*/ u8 gunfuncs[6];
|
||||
/*0x9d*/ u8 handicap;
|
||||
};
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue