Add status page and merge private

This commit is contained in:
kholdfuzion committed 2020-12-30 11:42:28 -06:00
1 parent 9574a451fa
commit 8f2c5c73bb
190 files changed
+25643 -17062

No files matched your search

+108
View File
@@ -0,0 +1,108 @@
name: GE-CI
on:
push:
branches: master
paths-ignore:
- 'tools/**'
pull_request:
branches: master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
buildus:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install Depedencies
run: |
sudo apt update
sudo apt install binutils-mips-linux-gnu make
- name: Get US File
env:
FILE_US: ${{ secrets.SECRET_FILE_US }}
run: wget -O baserom.u.z64 $FILE_US
- name: Extract US Assets
run: ./extract_baserom.u.sh
- name: Make US
run: make -j VERSION=US
- name: Make report
run: make -C tools/report
- name: Stats
run: python3 tools/ge-stats.py --version us --report
#git diff HEAD^ HEAD --name-only
# expected args
# 1481 15854 12774 232276 564 1312 652 20330 15471 269772 49 336 tools/report/index.html "src/game/bond.c"
# Replace this with Git push to repo
# but somehow avoid loop
#- uses: actions/download-artifact@v2
# with:
# name: my-artifact
# path: tools/report/index.html
- name: Upload output files
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
API_TOKEN_USER: ${{ secrets.API_TOKEN_USER }}
API_TOKEN_EMAIL: ${{ secrets.API_TOKEN_EMAIL }}
with:
destination_repo: 'kholdfuzion/goldeneyestatus'
user_email: $API_TOKEN_EMAIL
user_name: $API_TOKEN_USER
source_file: |
tools/report/cursor.cur
tools/report/index.html
tools/report/sfx.ogg
tools/report/background.jpg
buildjp:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install Depedencies
run: |
sudo apt update
sudo apt install binutils-mips-linux-gnu make
- name: Get US File
env:
FILE_US: ${{ secrets.SECRET_FILE_US }}
run: wget -O baserom.u.z64 $FILE_US
- name: Get JP File
env:
FILE_JP: ${{ secrets.SECRET_FILE_JP }}
run: wget -O baserom.j.z64 $FILE_JP
- name: Extract US Assets
run: ./extract_baserom.u.sh
- name: Extract JP Assets
run: ./extract_diff.j.sh
- name: Make JP
run: make -j VERSION=JP
- name: Stats
run: python3 tools/ge-stats.py --version jp
#need way of telling report that JAP passed/failed
+4
View File
@@ -6,6 +6,7 @@
*.rz *.rz
*.tmp *.tmp
*.z64 *.z64
*.o
/.vs /.vs
021990.bin 021990.bin
0219D0.bin 0219D0.bin
@@ -47,3 +48,6 @@ ge007.j.elf
ge007.u.bin ge007.u.bin
ge007.u.elf ge007.u.elf
lib/libultra_rom.a lib/libultra_rom.a
tools/aaa_rip/aaa_rip
tools/extractor/extractor
notes/
+9 -3
View File
@@ -83,8 +83,10 @@ CODEFILES := $(foreach dir,src,$(wildcard $(dir)/*.c))
CODEOBJECTS := $(foreach file,$(CODEFILES),$(BUILD_DIR)/$(file:.c=.o)) CODEOBJECTS := $(foreach file,$(CODEFILES),$(BUILD_DIR)/$(file:.c=.o))
LIBULTRA := lib/libultra_rom.a LIBULTRA := lib/libultra_rom.a
ULTRAFILES := $(foreach dir,src/libultra,$(wildcard $(dir)/*.s)) ULTRAFILES_S := $(foreach dir,src/libultra,$(wildcard $(dir)/*.s))
ULTRAOBJECTS := $(foreach file,$(ULTRAFILES),$(BUILD_DIR)/$(file:.s=.o)) ULTRAFILES_C := $(foreach dir,src/libultra,$(wildcard $(dir)/*.c))
ULTRAOBJECTS := $(foreach file,$(ULTRAFILES_S),$(BUILD_DIR)/$(file:.s=.o)) \
$(foreach file,$(ULTRAFILES_C),$(BUILD_DIR)/$(file:.c=.o))
GAMEFILES := $(foreach dir,src/game,$(wildcard $(dir)/*.c)) GAMEFILES := $(foreach dir,src/game,$(wildcard $(dir)/*.c))
GAMEOBJECTS := $(foreach file,$(GAMEFILES),$(BUILD_DIR)/$(file:.c=.o)) GAMEOBJECTS := $(foreach file,$(GAMEFILES),$(BUILD_DIR)/$(file:.c=.o))
@@ -124,7 +126,8 @@ OBJECTS := $(RSPOBJECTS) $(CODEOBJECTS) $(GAMEOBJECTS) $(RZOBJECTS) $(OBSEGMENT)
INCLUDE := -I . -I include -I include/ultra64 -I src -I src/game -I src/inflate INCLUDE := -I . -I include -I include/ultra64 -I src -I src/game -I src/inflate
CC := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc CC := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc
CFLAGS := -Wo,-loopunroll,0 -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm $(CFLAGWARNING) -woff 819,820,852,821,838 -signed $(INCLUDE) -mips2 $(LCDEFS) CFLAGS := 0 -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm $(CFLAGWARNING) -woff 819,820,852,821,838 -signed $(INCLUDE) -mips2 $(LCDEFS) -DTARGET_N64
CFLAGS_LIBULTRA := 0 -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm $(CFLAGWARNING) -woff 819,820,852,821,838 -signed $(INCLUDE) -mips2 $(LCDEFS) -DTARGET_N64
LD := $(TOOLCHAIN)ld LD := $(TOOLCHAIN)ld
LD_SCRIPT := ge007.$(COUNTRYCODE).ld LD_SCRIPT := ge007.$(COUNTRYCODE).ld
@@ -156,6 +159,9 @@ clean:
$(HEADEROBJECTS) $(BOOTOBJECTS) $(CODEOBJECTS) $(GAMEOBJECTS) $(RZOBJECTS) \ $(HEADEROBJECTS) $(BOOTOBJECTS) $(CODEOBJECTS) $(GAMEOBJECTS) $(RZOBJECTS) \
$(OBSEG_OBJECTS) $(OBSEG_RZ) $(ROMOBJECTS) $(RAMROM_OBJECTS) $(FONT_OBJECTS) $(MUSIC_OBJECTS) $(IMAGE_OBJS) $(MUSIC_RZ_FILES) $(RSPOBJECTS) $(OBSEG_OBJECTS) $(OBSEG_RZ) $(ROMOBJECTS) $(RAMROM_OBJECTS) $(FONT_OBJECTS) $(MUSIC_OBJECTS) $(IMAGE_OBJS) $(MUSIC_RZ_FILES) $(RSPOBJECTS)
$(BUILD_DIR)/src/libultra/%.o: src/libultra/%.c
$(CC) -c $(CFLAGS_LIBULTRA) -o $@ $<
$(BUILD_DIR)/rsp/%.bin: rsp/*.s $(BUILD_DIR)/rsp/%.bin: rsp/*.s
$(ARMIPS) -sym $@.sym -strequ CODE_FILE $(BUILD_DIR)/rsp/$*.bin -strequ DATA_FILE $(BUILD_DIR)/rsp/$*_data.bin $< $(ARMIPS) -sym $@.sym -strequ CODE_FILE $(BUILD_DIR)/rsp/$*.bin -strequ DATA_FILE $(BUILD_DIR)/rsp/$*_data.bin $<
+1 -1
View File
@@ -1,7 +1,7 @@
#include "ultra64.h" #include "ultra64.h"
#include "bondconstants.h" #include "bondconstants.h"
#include "bondtypes.h" #include "bondtypes.h"
#include <gbi.h> #include "PR/gbi.h"
struct sGlobalImageTable GlobalImageTable = { struct sGlobalImageTable GlobalImageTable = {
{ //globalDL_0x000 { //globalDL_0x000
File diff suppressed because it is too large. Load diff
+5 -5
View File
@@ -31,7 +31,7 @@ struct portal_data_table_entry
u16 control_bytes; u16 control_bytes;
}; };
struct xyzpoint struct coord
{ {
float x; float x;
float y; float y;
@@ -45,7 +45,7 @@ struct portal_3_point
char padding1; char padding1;
char padding2; char padding2;
char padding3; char padding3;
struct xyzpoint points[3]; struct coord points[3];
}; };
struct portal_4_point struct portal_4_point
@@ -54,7 +54,7 @@ struct portal_4_point
char padding1; char padding1;
char padding2; char padding2;
char padding3; char padding3;
struct xyzpoint points[4]; struct coord points[4];
}; };
struct portal_5_point struct portal_5_point
@@ -63,7 +63,7 @@ struct portal_5_point
char padding1; char padding1;
char padding2; char padding2;
char padding3; char padding3;
struct xyzpoint points[5]; struct coord points[5];
}; };
struct portal_6_point struct portal_6_point
@@ -72,7 +72,7 @@ struct portal_6_point
char padding1; char padding1;
char padding2; char padding2;
char padding3; char padding3;
struct xyzpoint points[6]; struct coord points[6];
}; };
extern struct room_data_table_entry room_data_table[]; extern struct room_data_table_entry room_data_table[];
+1 -1
View File
@@ -8,7 +8,7 @@ struct BriefStruct UbrieftraZ = {
TEXT(LTRA, 3) /* Moneypenny */ TEXT(LTRA, 3) /* Moneypenny */
}, },
{ /* Objectives (Text and Difficult) */ { /* Objectives (Text and Difficult) */
{TEXT(LTRA, 4), DIFFICULTY_AGENT}, /* Destroy break units */ {TEXT(LTRA, 4), DIFFICULTY_AGENT}, /* Destroy brake units */
{TEXT(LTRA, 5), DIFFICULTY_AGENT}, /* Rescue Natalya */ {TEXT(LTRA, 5), DIFFICULTY_AGENT}, /* Rescue Natalya */
{TEXT(LTRA, 6), DIFFICULTY_SECRET}, /* Locate Janus secret base */ {TEXT(LTRA, 6), DIFFICULTY_SECRET}, /* Locate Janus secret base */
{TEXT(LTRA, 7), DIFFICULTY_00}, /* Crack Boris' password */ {TEXT(LTRA, 7), DIFFICULTY_00}, /* Crack Boris' password */
+1 -1
View File
@@ -19,7 +19,7 @@ if [ "$DOALL" == "1" ] || [ $1 == 'files' ]; then
fi fi
if [ "$DOALL" == "1" ] || [ $1 == 'images' ]; then if [ "$DOALL" == "1" ] || [ $1 == 'images' ]; then
while IFS=, read -r offset size name while IFS=, read -r offset size name compressed extract
do do
echo "removing $name" echo "removing $name"
rm -f $name rm -f $name
+83 -36
View File
@@ -1,40 +1,83 @@
#!/bin/bash #!/bin/bash
if [ -z "$1" ]; then
DOALL="1" #set defaults
echo "Processing Everything" DOALL="1"
BASEROM="baserom.u.z64"
clear
if [ -z "$2" ]; then
if [ -z "$1" ]; then
#No Args
echo "Processing Everything"
elif [ "$1" = "files" ] || [ "$1" = "images" ]; then
#Arg1 is "files" or "images"
DOALL="0"
echo "Processing $1 Only"
else
#Arg1 is ROM
BASEROM=$1
echo "Processing Everything using $BASEROM"
fi
else
BASEROM=$2
if [ "$1" = "files" ] || [ "$1" != "images" ]; then
#Arg1 is "files" or "images
DOALL="0"
echo "Processing $1 Only using $BASEROM"
else
echo "Processing Everything using $BASEROM"
fi
fi fi
true="1" true="1"
mkdir assets assets/font assets/images assets/images/split assets/music assets/ramrom assets/obseg assets/obseg/bg assets/obseg/brief assets/obseg/chr assets/obseg/gun assets/obseg/prop assets/obseg/setup assets/obseg/setup/u assets/obseg/stan assets/obseg/text assets/obseg/text/u
DIRs='assets assets/font assets/images assets/images/split assets/music assets/ramrom assets/obseg assets/obseg/bg assets/obseg/brief assets/obseg/chr assets/obseg/gun assets/obseg/prop assets/obseg/setup assets/obseg/setup/u assets/obseg/stan assets/obseg/text assets/obseg/text/u'
for DIR in $DIRs
do
# if dir not exist, make
if [ ! -d $DIR ]; then
mkdir $DIR
fi
done
#build/rebuild extractor
[ ! -x tools/extractor/extractor ] && make -C tools/extractor
if [ "$DOALL" == "1" ] || [ $1 == 'files' ]; then if [ "$DOALL" == "1" ] || [ $1 == 'files' ]; then
echo "Processing Files" echo "Processing Files"
while IFS=, read -r offset size name compressed extract if [ -x tools/extractor/extractor ]; then
do tools/extractor/extractor "$BASEROM" filelist.u.csv
if [ "$extract" == "$true" ]; then else
if [ "$compressed" == "$true" ]; then while IFS=, read -r offset size name compressed extract
echo "Extracting compressed $name, $size bytes..." do
dd bs=1 skip=$offset count=$size if=baserom.u.z64 of=$name status=none if [ "$extract" == "$true" ]; then
# Add the gZip Header to a new file using the name given in command if [ "$compressed" == "$true" ]; then
echo -n -e \\x1F\\x8B\\x08\\x00\\x00\\x00\\x00\\x00\\x02\\x03 > $name.temp echo "Extracting compressed $name, $size bytes..."
# Add the contents of the compressed file minus the 1172 to the new file dd bs=1 skip=$offset count=$size if="$BASEROM" of=$name status=none
cat $name | tail --bytes=+3 >> $name.temp # Add the gZip Header to a new file using the name given in command
# copy the new file over the old compressed file echo -n -e \\x1F\\x8B\\x08\\x00\\x00\\x00\\x00\\x00\\x02\\x03 > $name.temp
cat $name.temp > $name.zip # Add the contents of the compressed file minus the 1172 to the new file
# decompress the Z file to the filename given in the command cat $name | tail --bytes=+3 >> $name.temp
cat $name.zip | gzip --quiet --decompress > $name.bin # copy the new file over the old compressed file
# remove the compressed Z file cat $name.temp > $name.zip
rm $name.temp $name.zip $name # decompress the Z file to the filename given in the command
echo "Successfully Decompressed $name" cat $name.zip | gzip --quiet --decompress > $name
# remove the compressed Z file
rm $name.temp $name.zip
echo "Successfully Decompressed $name"
else
echo "Extracting uncompressed $name, $size bytes..."
dd bs=1 skip=$offset count=$size if="$BASEROM" of=$name status=none
echo "Successfully Extracted $name"
fi
else else
echo "Extracting uncompressed $name, $size bytes..." echo "skip $name"
dd bs=1 skip=$offset count=$size if=baserom.u.z64 of=$name status=none
echo "Successfully Extracted $name"
fi fi
else done < filelist.u.csv
echo "skip $name" fi
fi
done < filelist.u.csv
#filelist.u.csv should follow pattern of: #filelist.u.csv should follow pattern of:
#offset,size,name,compressed,extract #offset,size,name,compressed,extract
#formatting matters, no comments, no extra lines, unix line endings only #formatting matters, no comments, no extra lines, unix line endings only
@@ -42,15 +85,19 @@ if [ "$DOALL" == "1" ] || [ $1 == 'files' ]; then
fi fi
if [ "$DOALL" == "1" ] || [ $1 == 'images' ]; then if [ "$DOALL" == "1" ] || [ $1 == 'images' ]; then
echo "Processing Imagess" echo "Processing Images"
while IFS=, read -r offset size name if [ -x tools/extractor/extractor ]; then
do tools/extractor/extractor "$BASEROM" imagelist.u.csv
echo "Extracting $name, $size bytes..." else
dd bs=1 skip=$offset count=$size if=baserom.u.z64 of=$name status=none while IFS=, read -r offset size name
echo "Successfully Extracted $name" do
done < imagelist.u.csv echo "Extracting $name, $size bytes..."
dd bs=1 skip=$offset count=$size if="$BASEROM" of=$name status=none
echo "Successfully Extracted $name"
done < imagelist.u.csv
fi
#imageslist.u.csv should follow pattern of: #imageslist.u.csv should follow pattern of:
#offset,size,name #offset,size,name,compressed,extract
#formatting matters, no comments, no extra lines, unix line endings only #formatting matters, no comments, no extra lines, unix line endings only
#and always end with a newline #and always end with a newline
fi fi
+664 -664
View File
File diff suppressed because it is too large. Load diff
+2699 -2699
View File
File diff suppressed because it is too large. Load diff
+453
View File
@@ -0,0 +1,453 @@
/**************************************************************************
* *
* Copyright (C) 1995, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/**************************************************************************
*
* $Revision: 1.13 $
* $Date: 1997/02/11 08:15:34 $
* $Source: /disk6/Master/cvsmdev2/PR/include/R4300.h,v $
*
**************************************************************************/
#ifndef __R4300_H__
#define __R4300_H__
#include <PR/ultratypes.h>
/*
* Segment base addresses and sizes
*/
#define KUBASE 0
#define KUSIZE 0x80000000
#define K0BASE 0x80000000
#define K0SIZE 0x20000000
#define K1BASE 0xA0000000
#define K1SIZE 0x20000000
#define K2BASE 0xC0000000
#define K2SIZE 0x20000000
/*
* Exception vectors
*/
#define SIZE_EXCVEC 0x80 /* Size of an exc. vec */
#define UT_VEC K0BASE /* utlbmiss vector */
#define R_VEC (K1BASE+0x1fc00000) /* reset vector */
#define XUT_VEC (K0BASE+0x80) /* extended address tlbmiss */
#define ECC_VEC (K0BASE+0x100) /* Ecc exception vector */
#define E_VEC (K0BASE+0x180) /* Gen. exception vector */
/*
* Address conversion macros
*/
#ifdef _LANGUAGE_ASSEMBLY
#define K0_TO_K1(x) ((x)|0xA0000000) /* kseg0 to kseg1 */
#define K1_TO_K0(x) ((x)&0x9FFFFFFF) /* kseg1 to kseg0 */
#define K0_TO_PHYS(x) ((x)&0x1FFFFFFF) /* kseg0 to physical */
#define K1_TO_PHYS(x) ((x)&0x1FFFFFFF) /* kseg1 to physical */
#define KDM_TO_PHYS(x) ((x)&0x1FFFFFFF) /* direct mapped to physical */
#define PHYS_TO_K0(x) ((x)|0x80000000) /* physical to kseg0 */
#define PHYS_TO_K1(x) ((x)|0xA0000000) /* physical to kseg1 */
#else /* _LANGUAGE_C */
#define K0_TO_K1(x) ((u32)(x)|0xA0000000) /* kseg0 to kseg1 */
#define K1_TO_K0(x) ((u32)(x)&0x9FFFFFFF) /* kseg1 to kseg0 */
#define K0_TO_PHYS(x) ((u32)(x)&0x1FFFFFFF) /* kseg0 to physical */
#define K1_TO_PHYS(x) ((u32)(x)&0x1FFFFFFF) /* kseg1 to physical */
#define KDM_TO_PHYS(x) ((u32)(x)&0x1FFFFFFF) /* direct mapped to physical */
#define PHYS_TO_K0(x) ((u32)(x)|0x80000000) /* physical to kseg0 */
#define PHYS_TO_K1(x) ((u32)(x)|0xA0000000) /* physical to kseg1 */
#endif /* _LANGUAGE_ASSEMBLY */
/*
* Address predicates
*/
#define IS_KSEG0(x) ((u32)(x) >= K0BASE && (u32)(x) < K1BASE)
#define IS_KSEG1(x) ((u32)(x) >= K1BASE && (u32)(x) < K2BASE)
#define IS_KSEGDM(x) ((u32)(x) >= K0BASE && (u32)(x) < K2BASE)
#define IS_KSEG2(x) ((u32)(x) >= K2BASE && (u32)(x) < KPTE_SHDUBASE)
#define IS_KPTESEG(x) ((u32)(x) >= KPTE_SHDUBASE)
#define IS_KUSEG(x) ((u32)(x) < K0BASE)
/*
* TLB size constants
*/
#define NTLBENTRIES 31 /* entry 31 is reserved by rdb */
#define TLBHI_VPN2MASK 0xffffe000
#define TLBHI_VPN2SHIFT 13
#define TLBHI_PIDMASK 0xff
#define TLBHI_PIDSHIFT 0
#define TLBHI_NPID 255 /* 255 to fit in 8 bits */
#define TLBLO_PFNMASK 0x3fffffc0
#define TLBLO_PFNSHIFT 6
#define TLBLO_CACHMASK 0x38 /* cache coherency algorithm */
#define TLBLO_CACHSHIFT 3
#define TLBLO_UNCACHED 0x10 /* not cached */
#define TLBLO_NONCOHRNT 0x18 /* Cacheable non-coherent */
#define TLBLO_EXLWR 0x28 /* Exclusive write */
#define TLBLO_D 0x4 /* writeable */
#define TLBLO_V 0x2 /* valid bit */
#define TLBLO_G 0x1 /* global access bit */
#define TLBINX_PROBE 0x80000000
#define TLBINX_INXMASK 0x3f
#define TLBINX_INXSHIFT 0
#define TLBRAND_RANDMASK 0x3f
#define TLBRAND_RANDSHIFT 0
#define TLBWIRED_WIREDMASK 0x3f
#define TLBCTXT_BASEMASK 0xff800000
#define TLBCTXT_BASESHIFT 23
#define TLBCTXT_BASEBITS 9
#define TLBCTXT_VPNMASK 0x7ffff0
#define TLBCTXT_VPNSHIFT 4
#define TLBPGMASK_4K 0x0
#define TLBPGMASK_16K 0x6000
#define TLBPGMASK_64K 0x1e000
/*
* Status register
*/
#define SR_CUMASK 0xf0000000 /* coproc usable bits */
#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
#define SR_RP 0x08000000 /* Reduced power (quarter speed) */
#define SR_FR 0x04000000 /* MIPS III FP register mode */
#define SR_RE 0x02000000 /* Reverse endian */
#define SR_ITS 0x01000000 /* Instruction trace support */
#define SR_BEV 0x00400000 /* Use boot exception vectors */
#define SR_TS 0x00200000 /* TLB shutdown */
#define SR_SR 0x00100000 /* Soft reset occured */
#define SR_CH 0x00040000 /* Cache hit for last 'cache' op */
#define SR_CE 0x00020000 /* Create ECC */
#define SR_DE 0x00010000 /* ECC of parity does not cause error */
/*
* Interrupt enable bits
* (NOTE: bits set to 1 enable the corresponding level interrupt)
*/
#define SR_IMASK 0x0000ff00 /* Interrupt mask */
#define SR_IMASK8 0x00000000 /* mask level 8 */
#define SR_IMASK7 0x00008000 /* mask level 7 */
#define SR_IMASK6 0x0000c000 /* mask level 6 */
#define SR_IMASK5 0x0000e000 /* mask level 5 */
#define SR_IMASK4 0x0000f000 /* mask level 4 */
#define SR_IMASK3 0x0000f800 /* mask level 3 */
#define SR_IMASK2 0x0000fc00 /* mask level 2 */
#define SR_IMASK1 0x0000fe00 /* mask level 1 */
#define SR_IMASK0 0x0000ff00 /* mask level 0 */
#define SR_IBIT8 0x00008000 /* bit level 8 */
#define SR_IBIT7 0x00004000 /* bit level 7 */
#define SR_IBIT6 0x00002000 /* bit level 6 */
#define SR_IBIT5 0x00001000 /* bit level 5 */
#define SR_IBIT4 0x00000800 /* bit level 4 */
#define SR_IBIT3 0x00000400 /* bit level 3 */
#define SR_IBIT2 0x00000200 /* bit level 2 */
#define SR_IBIT1 0x00000100 /* bit level 1 */
#define SR_IMASKSHIFT 8
#define SR_KX 0x00000080 /* extended-addr TLB vec in kernel */
#define SR_SX 0x00000040 /* xtended-addr TLB vec supervisor */
#define SR_UX 0x00000020 /* xtended-addr TLB vec in user mode */
#define SR_KSU_MASK 0x00000018 /* mode mask */
#define SR_KSU_USR 0x00000010 /* user mode */
#define SR_KSU_SUP 0x00000008 /* supervisor mode */
#define SR_KSU_KER 0x00000000 /* kernel mode */
#define SR_ERL 0x00000004 /* Error level, 1=>cache error */
#define SR_EXL 0x00000002 /* Exception level, 1=>exception */
#define SR_IE 0x00000001 /* interrupt enable, 1=>enable */
/*
* Cause Register
*/
#define CAUSE_BD 0x80000000 /* Branch delay slot */
#define CAUSE_CEMASK 0x30000000 /* coprocessor error */
#define CAUSE_CESHIFT 28
/* Interrupt pending bits */
#define CAUSE_IP8 0x00008000 /* External level 8 pending - COMPARE */
#define CAUSE_IP7 0x00004000 /* External level 7 pending - INT4 */
#define CAUSE_IP6 0x00002000 /* External level 6 pending - INT3 */
#define CAUSE_IP5 0x00001000 /* External level 5 pending - INT2 */
#define CAUSE_IP4 0x00000800 /* External level 4 pending - INT1 */
#define CAUSE_IP3 0x00000400 /* External level 3 pending - INT0 */
#define CAUSE_SW2 0x00000200 /* Software level 2 pending */
#define CAUSE_SW1 0x00000100 /* Software level 1 pending */
#define CAUSE_IPMASK 0x0000FF00 /* Pending interrupt mask */
#define CAUSE_IPSHIFT 8
#define CAUSE_EXCMASK 0x0000007C /* Cause code bits */
#define CAUSE_EXCSHIFT 2
/* Cause register exception codes */
#define EXC_CODE(x) ((x)<<2)
/* Hardware exception codes */
#define EXC_INT EXC_CODE(0) /* interrupt */
#define EXC_MOD EXC_CODE(1) /* TLB mod */
#define EXC_RMISS EXC_CODE(2) /* Read TLB Miss */
#define EXC_WMISS EXC_CODE(3) /* Write TLB Miss */
#define EXC_RADE EXC_CODE(4) /* Read Address Error */
#define EXC_WADE EXC_CODE(5) /* Write Address Error */
#define EXC_IBE EXC_CODE(6) /* Instruction Bus Error */
#define EXC_DBE EXC_CODE(7) /* Data Bus Error */
#define EXC_SYSCALL EXC_CODE(8) /* SYSCALL */
#define EXC_BREAK EXC_CODE(9) /* BREAKpoint */
#define EXC_II EXC_CODE(10) /* Illegal Instruction */
#define EXC_CPU EXC_CODE(11) /* CoProcessor Unusable */
#define EXC_OV EXC_CODE(12) /* OVerflow */
#define EXC_TRAP EXC_CODE(13) /* Trap exception */
#define EXC_VCEI EXC_CODE(14) /* Virt. Coherency on Inst. fetch */
#define EXC_FPE EXC_CODE(15) /* Floating Point Exception */
#define EXC_WATCH EXC_CODE(23) /* Watchpoint reference */
#define EXC_VCED EXC_CODE(31) /* Virt. Coherency on data read */
/* C0_PRID Defines */
#define C0_IMPMASK 0xff00
#define C0_IMPSHIFT 8
#define C0_REVMASK 0xff
#define C0_MAJREVMASK 0xf0
#define C0_MAJREVSHIFT 4
#define C0_MINREVMASK 0xf
/*
* Coprocessor 0 operations
*/
#define C0_READI 0x1 /* read ITLB entry addressed by C0_INDEX */
#define C0_WRITEI 0x2 /* write ITLB entry addressed by C0_INDEX */
#define C0_WRITER 0x6 /* write ITLB entry addressed by C0_RAND */
#define C0_PROBE 0x8 /* probe for ITLB entry addressed by TLBHI */
#define C0_RFE 0x10 /* restore for exception */
/*
* 'cache' instruction definitions
*/
/* Target cache */
#define CACH_PI 0x0 /* specifies primary inst. cache */
#define CACH_PD 0x1 /* primary data cache */
#define CACH_SI 0x2 /* secondary instruction cache */
#define CACH_SD 0x3 /* secondary data cache */
/* Cache operations */
#define C_IINV 0x0 /* index invalidate (inst, 2nd inst) */
#define C_IWBINV 0x0 /* index writeback inval (d, sd) */
#define C_ILT 0x4 /* index load tag (all) */
#define C_IST 0x8 /* index store tag (all) */
#define C_CDX 0xc /* create dirty exclusive (d, sd) */
#define C_HINV 0x10 /* hit invalidate (all) */
#define C_HWBINV 0x14 /* hit writeback inv. (d, sd) */
#define C_FILL 0x14 /* fill (i) */
#define C_HWB 0x18 /* hit writeback (i, d, sd) */
#define C_HSV 0x1c /* hit set virt. (si, sd) */
/*
* Cache size definitions
*/
#define ICACHE_SIZE 0x4000 /* 16K */
#define ICACHE_LINESIZE 32 /* 8 words */
#define ICACHE_LINEMASK (ICACHE_LINESIZE-1)
#define DCACHE_SIZE 0x2000 /* 8K */
#define DCACHE_LINESIZE 16 /* 4 words */
#define DCACHE_LINEMASK (DCACHE_LINESIZE-1)
/*
* C0_CONFIG register definitions
*/
#define CONFIG_CM 0x80000000 /* 1 == Master-Checker enabled */
#define CONFIG_EC 0x70000000 /* System Clock ratio */
#define CONFIG_EC_1_1 0x6 /* System Clock ratio 1 :1 */
#define CONFIG_EC_3_2 0x7 /* System Clock ratio 1.5 :1 */
#define CONFIG_EC_2_1 0x0 /* System Clock ratio 2 :1 */
#define CONFIG_EC_3_1 0x1 /* System Clock ratio 3 :1 */
#define CONFIG_EP 0x0f000000 /* Transmit Data Pattern */
#define CONFIG_SB 0x00c00000 /* Secondary cache block size */
#define CONFIG_SS 0x00200000 /* Split scache: 0 == I&D combined */
#define CONFIG_SW 0x00100000 /* scache port: 0==128, 1==64 */
#define CONFIG_EW 0x000c0000 /* System Port width: 0==64, 1==32 */
#define CONFIG_SC 0x00020000 /* 0 -> 2nd cache present */
#define CONFIG_SM 0x00010000 /* 0 -> Dirty Shared Coherency enabled*/
#define CONFIG_BE 0x00008000 /* Endian-ness: 1 --> BE */
#define CONFIG_EM 0x00004000 /* 1 -> ECC mode, 0 -> parity */
#define CONFIG_EB 0x00002000 /* Block order:1->sequent,0->subblock */
#define CONFIG_IC 0x00000e00 /* Primary Icache size */
#define CONFIG_DC 0x000001c0 /* Primary Dcache size */
#define CONFIG_IB 0x00000020 /* Icache block size */
#define CONFIG_DB 0x00000010 /* Dcache block size */
#define CONFIG_CU 0x00000008 /* Update on Store-conditional */
#define CONFIG_K0 0x00000007 /* K0SEG Coherency algorithm */
#define CONFIG_UNCACHED 0x00000002 /* K0 is uncached */
#define CONFIG_NONCOHRNT 0x00000003
#define CONFIG_COHRNT_EXLWR 0x00000005
#define CONFIG_SB_SHFT 22 /* shift SB to bit position 0 */
#define CONFIG_IC_SHFT 9 /* shift IC to bit position 0 */
#define CONFIG_DC_SHFT 6 /* shift DC to bit position 0 */
#define CONFIG_BE_SHFT 15 /* shift BE to bit position 0 */
/*
* C0_TAGLO definitions for setting/getting cache states and physaddr bits
*/
#define SADDRMASK 0xFFFFE000 /* 31..13 -> scache paddr bits 35..17 */
#define SVINDEXMASK 0x00000380 /* 9..7: prim virt index bits 14..12 */
#define SSTATEMASK 0x00001c00 /* bits 12..10 hold scache line state */
#define SINVALID 0x00000000 /* invalid --> 000 == state 0 */
#define SCLEANEXCL 0x00001000 /* clean exclusive --> 100 == state 4 */
#define SDIRTYEXCL 0x00001400 /* dirty exclusive --> 101 == state 5 */
#define SECC_MASK 0x0000007f /* low 7 bits are ecc for the tag */
#define SADDR_SHIFT 4 /* shift STagLo (31..13) to 35..17 */
#define PADDRMASK 0xFFFFFF00 /* PTagLo31..8->prim paddr bits35..12 */
#define PADDR_SHIFT 4 /* roll bits 35..12 down to 31..8 */
#define PSTATEMASK 0x00C0 /* bits 7..6 hold primary line state */
#define PINVALID 0x0000 /* invalid --> 000 == state 0 */
#define PCLEANEXCL 0x0080 /* clean exclusive --> 10 == state 2 */
#define PDIRTYEXCL 0x00C0 /* dirty exclusive --> 11 == state 3 */
#define PPARITY_MASK 0x0001 /* low bit is parity bit (even). */
/*
* C0_CACHE_ERR definitions.
*/
#define CACHERR_ER 0x80000000 /* 0: inst ref, 1: data ref */
#define CACHERR_EC 0x40000000 /* 0: primary, 1: secondary */
#define CACHERR_ED 0x20000000 /* 1: data error */
#define CACHERR_ET 0x10000000 /* 1: tag error */
#define CACHERR_ES 0x08000000 /* 1: external ref, e.g. snoop*/
#define CACHERR_EE 0x04000000 /* error on SysAD bus */
#define CACHERR_EB 0x02000000 /* complicated, see spec. */
#define CACHERR_EI 0x01000000 /* complicated, see spec. */
#define CACHERR_SIDX_MASK 0x003ffff8 /* secondary cache index */
#define CACHERR_PIDX_MASK 0x00000007 /* primary cache index */
#define CACHERR_PIDX_SHIFT 12 /* bits 2..0 are paddr14..12 */
/* R4000 family supports hardware watchpoints:
* C0_WATCHLO:
* bits 31..3 are bits 31..3 of physaddr to watch
* bit 2: reserved; must be written as 0.
* bit 1: when set causes a watchpoint trap on load accesses to paddr.
* bit 0: when set traps on stores to paddr;
* C0_WATCHHI
* bits 31..4 are reserved and must be written as zeros.
* bits 3..0 are bits 35..32 of the physaddr to watch
*/
#define WATCHLO_WTRAP 0x00000001
#define WATCHLO_RTRAP 0x00000002
#define WATCHLO_ADDRMASK 0xfffffff8
#define WATCHLO_VALIDMASK 0xfffffffb
#define WATCHHI_VALIDMASK 0x0000000f
/*
* Coprocessor 0 registers
*/
#ifdef _LANGUAGE_ASSEMBLY
#define C0_INX $0
#define C0_RAND $1
#define C0_ENTRYLO0 $2
#define C0_ENTRYLO1 $3
#define C0_CONTEXT $4
#define C0_PAGEMASK $5 /* page mask */
#define C0_WIRED $6 /* # wired entries in tlb */
#define C0_BADVADDR $8
#define C0_COUNT $9 /* free-running counter */
#define C0_ENTRYHI $10
#define C0_SR $12
#define C0_CAUSE $13
#define C0_EPC $14
#define C0_PRID $15 /* revision identifier */
#define C0_COMPARE $11 /* counter comparison reg. */
#define C0_CONFIG $16 /* hardware configuration */
#define C0_LLADDR $17 /* load linked address */
#define C0_WATCHLO $18 /* watchpoint */
#define C0_WATCHHI $19 /* watchpoint */
#define C0_ECC $26 /* S-cache ECC and primary parity */
#define C0_CACHE_ERR $27 /* cache error status */
#define C0_TAGLO $28 /* cache operations */
#define C0_TAGHI $29 /* cache operations */
#define C0_ERROR_EPC $30 /* ECC error prg. counter */
# else /* ! _LANGUAGE_ASSEMBLY */
#define C0_INX 0
#define C0_RAND 1
#define C0_ENTRYLO0 2
#define C0_ENTRYLO1 3
#define C0_CONTEXT 4
#define C0_PAGEMASK 5 /* page mask */
#define C0_WIRED 6 /* # wired entries in tlb */
#define C0_BADVADDR 8
#define C0_COUNT 9 /* free-running counter */
#define C0_ENTRYHI 10
#define C0_SR 12
#define C0_CAUSE 13
#define C0_EPC 14
#define C0_PRID 15 /* revision identifier */
#define C0_COMPARE 11 /* counter comparison reg. */
#define C0_CONFIG 16 /* hardware configuration */
#define C0_LLADDR 17 /* load linked address */
#define C0_WATCHLO 18 /* watchpoint */
#define C0_WATCHHI 19 /* watchpoint */
#define C0_ECC 26 /* S-cache ECC and primary parity */
#define C0_CACHE_ERR 27 /* cache error status */
#define C0_TAGLO 28 /* cache operations */
#define C0_TAGHI 29 /* cache operations */
#define C0_ERROR_EPC 30 /* ECC error prg. counter */
#endif /* _LANGUAGE_ASSEMBLY */
/*
* floating-point status register
*/
#define FPCSR_FS 0x01000000 /* flush denorm to zero */
#define FPCSR_C 0x00800000 /* condition bit */
#define FPCSR_CE 0x00020000 /* cause: unimplemented operation */
#define FPCSR_CV 0x00010000 /* cause: invalid operation */
#define FPCSR_CZ 0x00008000 /* cause: division by zero */
#define FPCSR_CO 0x00004000 /* cause: overflow */
#define FPCSR_CU 0x00002000 /* cause: underflow */
#define FPCSR_CI 0x00001000 /* cause: inexact operation */
#define FPCSR_EV 0x00000800 /* enable: invalid operation */
#define FPCSR_EZ 0x00000400 /* enable: division by zero */
#define FPCSR_EO 0x00000200 /* enable: overflow */
#define FPCSR_EU 0x00000100 /* enable: underflow */
#define FPCSR_EI 0x00000080 /* enable: inexact operation */
#define FPCSR_FV 0x00000040 /* flag: invalid operation */
#define FPCSR_FZ 0x00000020 /* flag: division by zero */
#define FPCSR_FO 0x00000010 /* flag: overflow */
#define FPCSR_FU 0x00000008 /* flag: underflow */
#define FPCSR_FI 0x00000004 /* flag: inexact operation */
#define FPCSR_RM_MASK 0x00000003 /* rounding mode mask */
#define FPCSR_RM_RN 0x00000000 /* round to nearest */
#define FPCSR_RM_RZ 0x00000001 /* round to zero */
#define FPCSR_RM_RP 0x00000002 /* round to positive infinity */
#define FPCSR_RM_RM 0x00000003 /* round to negative infinity */
#endif /* __R4300_H */
+841
View File
@@ -0,0 +1,841 @@
#ifndef _ABI_H_
#define _ABI_H_
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/**************************************************************************
*
* $Revision: 1.32 $
* $Date: 1997/02/11 08:16:37 $
* $Source: /exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/abi.h,v $
*
**************************************************************************/
/*
* Header file for the Audio Binary Interface.
* This is included in the Media Binary Interface file
* mbi.h.
*
* This file follows the framework used for graphics.
*
*/
/* Audio commands: */
#define A_SPNOOP 0
#define A_ADPCM 1
#define A_CLEARBUFF 2
#define A_RESAMPLE 5
#define A_SETBUFF 8
#define A_DMEMMOVE 10
#define A_LOADADPCM 11
#define A_MIXER 12
#define A_INTERLEAVE 13
#define A_SETLOOP 15
#ifndef VERSION_SH
#define A_ENVMIXER 3
#define A_LOADBUFF 4
#define A_RESAMPLE 5
#define A_SAVEBUFF 6
#define A_SEGMENT 7
#define A_SETVOL 9
#define A_POLEF 14
#else
#define A_ADDMIXER 4
#define A_RESAMPLE_ZOH 6
#define A_INTERL 17
#define A_ENVSETUP1 18
#define A_ENVMIXER 19
#define A_LOADBUFF 20
#define A_SAVEBUFF 21
#define A_ENVSETUP2 22
#define A_UNK_23 23
#define A_HILOGAIN 24
#define A_UNK_25 25
#define A_DUPLICATE 26
#define A_FILTER 27
#endif
#define ACMD_SIZE 32
/*
* Audio flags
*/
#define A_INIT 0x01
#define A_CONTINUE 0x00
#define A_LOOP 0x02
#define A_OUT 0x02
#define A_LEFT 0x02
#define A_RIGHT 0x00
#define A_VOL 0x04
#define A_RATE 0x00
#define A_AUX 0x08
#define A_NOAUX 0x00
#define A_MAIN 0x00
#define A_MIX 0x10
/*
* BEGIN C-specific section: (typedef's)
*/
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/*
* Data Structures.
*/
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int gain:16;
unsigned int addr;
} Aadpcm;
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int gain:16;
unsigned int addr;
} Apolef;
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int pad1:16;
unsigned int addr;
} Aenvelope;
typedef struct {
unsigned int cmd:8;
unsigned int pad1:8;
unsigned int dmem:16;
unsigned int pad2:16;
unsigned int count:16;
} Aclearbuff;
typedef struct {
unsigned int cmd:8;
unsigned int pad1:8;
unsigned int pad2:16;
unsigned int inL:16;
unsigned int inR:16;
} Ainterleave;
typedef struct {
unsigned int cmd:8;
unsigned int pad1:24;
unsigned int addr;
} Aloadbuff;
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int pad1:16;
unsigned int addr;
} Aenvmixer;
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int gain:16;
unsigned int dmemi:16;
unsigned int dmemo:16;
} Amixer;
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int dmem2:16;
unsigned int addr;
} Apan;
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int pitch:16;
unsigned int addr;
} Aresample;
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int pad1:16;
unsigned int addr;
} Areverb;
typedef struct {
unsigned int cmd:8;
unsigned int pad1:24;
unsigned int addr;
} Asavebuff;
typedef struct {
unsigned int cmd:8;
unsigned int pad1:24;
unsigned int pad2:2;
unsigned int number:4;
unsigned int base:24;
} Asegment;
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int dmemin:16;
unsigned int dmemout:16;
unsigned int count:16;
} Asetbuff;
typedef struct {
unsigned int cmd:8;
unsigned int flags:8;
unsigned int vol:16;
unsigned int voltgt:16;
unsigned int volrate:16;
} Asetvol;
typedef struct {
unsigned int cmd:8;
unsigned int pad1:8;
unsigned int dmemin:16;
unsigned int dmemout:16;
unsigned int count:16;
} Admemmove;
typedef struct {
unsigned int cmd:8;
unsigned int pad1:8;
unsigned int count:16;
unsigned int addr;
} Aloadadpcm;
typedef struct {
unsigned int cmd:8;
unsigned int pad1:8;
unsigned int pad2:16;
unsigned int addr;
} Asetloop;
/*
* Generic Acmd Packet
*/
typedef struct {
uintptr_t w0;
uintptr_t w1;
} Awords;
typedef union {
Awords words;
#if IS_BIG_ENDIAN && !IS_64_BIT
Aadpcm adpcm;
Apolef polef;
Aclearbuff clearbuff;
Aenvelope envelope;
Ainterleave interleave;
Aloadbuff loadbuff;
Aenvmixer envmixer;
Aresample resample;
Areverb reverb;
Asavebuff savebuff;
Asegment segment;
Asetbuff setbuff;
Asetvol setvol;
Admemmove dmemmove;
Aloadadpcm loadadpcm;
Amixer mixer;
Asetloop setloop;
#endif
long long int force_union_align; /* dummy, force alignment */
} Acmd;
/*
* ADPCM State
*/
typedef short ADPCM_STATE[16];
/*
* Pole filter state
*/
typedef short POLEF_STATE[4];
/*
* Resampler state
*/
typedef short RESAMPLE_STATE[16];
/*
* Resampler constants
*/
#define UNITY_PITCH 0x8000
#define MAX_RATIO 1.99996 /* within .03 cents of +1 octave */
/*
* Enveloper/Mixer state
*/
typedef short ENVMIX_STATE[40];
/*
* Macros to assemble the audio command list
*/
/*
* Info about parameters:
*
* A "count" in the following macros is always measured in bytes.
*
* All volumes/gains are in Q1.15 signed fixed point numbers:
* 0x8000 is the minimum volume (-100%), negating the audio curve.
* 0x0000 is silent.
* 0x7fff is maximum volume (99.997%).
*
* All DRAM addresses refer to segmented addresses. A segment table shall
* first be set up by calling aSegment for each segment. When a DRAM
* address is later used as parameter, the 8 high bits will be an index
* to the segment table and the lower 24 bits are added to the base address
* stored in the segment table for this entry. The result is the physical address.
*
* Transfers to/from DRAM are executed using DMA and hence follow these restrictions:
* All DRAM addresses should be aligned by 8 bytes, or they will be
* rounded down to the nearest multiple of 8 bytes.
* All DRAM lengths should be aligned by 8 bytes, or they will be
* rounded up to the nearest multiple of 8 bytes.
*/
/*
* Decompresses ADPCM data.
* Possible flags: A_INIT and A_LOOP.
*
* First set up internal data in DMEM:
* aLoadADPCM(cmd++, nEntries * 16, physicalAddressOfBook)
* aSetLoop(cmd++, physicalAddressOfLoopState) (if A_LOOP is set)
*
* Then before this command, call:
* aSetBuffer(cmd++, 0, in, out, count)
*
* Note: count will be rounded up to the nearest multiple of 32 bytes.
*
* ADPCM decompression works on a block of 16 (uncompressed) samples.
* The previous 2 samples and 9 bytes of input are decompressed to
* 16 new samples using the code book previously loaded.
*
* Before the algorithm starts, the previous 16 samples are loaded according to flag:
* A_INIT: all zeros
* A_LOOP: the address set by aSetLoop
* no flags: the DRAM address in the s parameter
* These 16 samples are immediately copied to the destination address.
*
* The result of "count" bytes will be written after these 16 initial samples.
* The last 16 samples written to the destination will also be written to
* the state address in DRAM.
*/
#define aADPCMdec(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_ADPCM, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (uintptr_t)(s); \
}
#define aADPCM_23(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_UNK_23, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Not used in SM64.
*/
#define aPoleFilter(pkt, f, g, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_POLEF, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(g, 0, 16)); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Clears DMEM data, where d is address and c is count, by writing zeros.
*
* Note: c is rounded up to the nearest multiple of 16 bytes.
*/
#define aClearBuffer(pkt, d, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(d, 0, 24); \
_a->words.w1 = (uintptr_t)(c); \
}
/*
* Mixes an envelope with mono sound into 2 or 4 channels.
* Possible flags: A_INIT, A_AUX (indicates that 4 channels should be used).
*
* Before this command, call:
* aSetBuffer(cmd++, 0, inBuf, dryLeft, count)
* aSetBuffer(cmd++, A_AUX, dryRight, wetLeft, wetRight)
*
* The first time (A_INIT is set), volume also needs to be set:
* aSetVolume(cmd++, A_VOL | A_LEFT, initialVolumeLeft, 0, 0)
* aSetVolume(cmd++, A_VOL | A_RIGHT, initialVolumeRight, 0, 0)
* aSetVolume32(cmd++, A_RATE | A_LEFT, targetVolumeLeft, rampLeft)
* aSetVolume32(cmd++, A_RATE | A_RIGHT, targetVolumeRight, rampRight)
* aSetVolume(cmd++, A_AUX, dryVolume, 0, wetVolume)
*
* This command will now mix samples in inBuf into the destination buffers (dry and wet),
* but with the volume increased (or decreased) from initial volumes to target volumes,
* with the specified ramp rate. Once the target volume is reached, the volume stays
* at that level. Before the samples are finally mixed (added) into the destination
* buffers (dry and wet), the volume is changed according to dryVolume and wetVolume.
*
* Note: count will be rounded up to the nearest multiple of 16 bytes.
* Note: the wet channels are used for reverb.
*
*/
#define aEnvMixer(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_ENVMIXER, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Interleaves two mono channels into stereo.
*
* First call:
* aSetBuffer(cmd++, 0, 0, output, count)
*
* The count refers to the size of each input. Hence 2 * count bytes will be written out.
* A left sample will be placed before the right sample.
*
* Note: count will be rounded up to the nearest multiple of 16 bytes.
*/
#define aInterleave(pkt, l, r) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_INTERLEAVE, 24, 8); \
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
}
/*
* Loads a buffer from DRAM to DMEM.
*
* First call:
* aSetBuffer(cmd++, 0, in, 0, count)
*
* The in parameter to aSetBuffer is the destination in DMEM and the
* s parameter to this command is the source in DRAM.
*/
#define aLoadBuffer(pkt, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Mixes audio.
* Possible flags: no flags used, although parameter present.
*
* First call:
* aSetBuffer(cmd++, 0, 0, 0, count)
*
* Input and output addresses are taken from the i and o parameters.
* The volume with which the input is changed is taken from the g parameter.
* After the volume of the input samples have been changed, the result
* is added to the output.
*
* Note: count will be rounded up to the nearest multiple of 32 bytes.
*/
#define aMix(pkt, f, g, i, o) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_MIXER, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(g, 0, 16)); \
_a->words.w1 = _SHIFTL(i,16, 16) | _SHIFTL(o, 0, 16); \
}
// Not present in the audio microcode.
#define aPan(pkt, f, d, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_PAN, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(d, 0, 16)); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Resamples audio.
* Possible flags: A_INIT, A_OUT? (not used in SM64).
*
* First call:
* aSetBuffer(cmd++, 0, in, out, count)
*
* This command resamples the audio using the given frequency ratio (pitch)
* using a filter that uses a window of 4 source samples. This can be used
* either for just resampling audio to be able to be played back at a different
* sample rate, or to change the pitch if the result is played back at
* the same sample rate as the input.
*
* The frequency ratio is given in UQ1.15 fixed point format.
* For no change in frequency, use pitch 0x8000.
* For 1 octave up or downsampling to (roughly) half number of samples, use pitch 0xffff.
* For 1 octave down or upsampling to double as many samples, use pitch 0x4000.
*
* Note: count represents the number of output sample bytes and is rounded up to
* the nearest multiple of 16 bytes.
*
* The state consists of the four following source samples when the algorithm stopped as
* well as a fractional position, and is initialized to all zeros if A_INIT is given.
* Otherwise it is loaded from DRAM at address s.
*
* The algorithm starts by writing the four source samples from the state (or zero)
* to just before the input address given. It then creates one output sample by examining
* the four next source samples and then moving the source position zero or more
* samples forward. The first output sample (when A_INIT is given) is always 0.
*
* When "count" bytes have been written, the following four source samples
* are written to the state in DRAM as well as a fractional position.
*/
#define aResample(pkt, f, p, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_RESAMPLE, 24, 8) | _SHIFTL(f, 16, 8) |\
_SHIFTL(p, 0, 16)); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Stores a buffer in DMEM to DRAM.
*
* First call:
* aSetBuffer(cmd++, 0, 0, out, count)
*
* The out parameter to aSetBuffer is the source in DMEM and the
* s parameter to this command is the destination in DRAM.
*/
#define aSaveBuffer(pkt, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Sets up an entry in the segment table.
*
* The s parameter is a segment index, 0 to 15.
* The b parameter is the base offset.
*/
#define aSegment(pkt, s, b) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_SEGMENT, 24, 8); \
_a->words.w1 = _SHIFTL(s, 24, 8) | _SHIFTL(b, 0, 24); \
}
/*
* Sets internal DMEM buffer addresses used for later commands.
* See each command for how to use aSetBuffer.
*/
#define aSetBuffer(pkt, f, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_SETBUFF, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(i, 0, 16)); \
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
#define aInterl(pkt, f, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_INTERL, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(i, 0, 16)); \
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
/*
* Sets internal volume parameters.
* See aEnvMixer for more info.
*/
#define aSetVolume(pkt, f, v, t, r) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \
_SHIFTL(v, 0, 16)); \
_a->words.w1 = _SHIFTL(t, 16, 16) | _SHIFTL(r, 0, 16); \
}
/*
* Sets the address to ADPCM loop state.
*
* The a parameter is a DRAM address.
* See aADPCMdec for more info.
*/
#define aSetLoop(pkt, a) \
{ \
Acmd *_a = (Acmd *)pkt; \
_a->words.w0 = _SHIFTL(A_SETLOOP, 24, 8); \
_a->words.w1 = (uintptr_t)(a); \
}
/*
* Copies memory in DMEM.
*
* Copies c bytes from address i to address o.
*
* Note: count is rounded up to the nearest multiple of 16 bytes.
*
* Note: This acts as memcpy where 16 bytes are moved at a time, therefore
* if input and output overlap, output address should be less than input address.
*/
#define aDMEMMove(pkt, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_DMEMMOVE, 24, 8) | _SHIFTL(i, 0, 24); \
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
/*
* Loads ADPCM book from DRAM into DMEM.
*
* This command loads ADPCM table entries from DRAM to DMEM.
*
* The count parameter c should be a multiple of 16 bytes.
* The d parameter is a DRAM address.
*/
#define aLoadADPCM(pkt, c, d) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_LOADADPCM, 24, 8) | _SHIFTL(c, 0, 24); \
_a->words.w1 = (uintptr_t) (d); \
}
// This is a version of aSetVolume which takes a single 32-bit parameter
// instead of two 16-bit ones. According to AziAudio, it is used to set
// ramping values when neither bit 4 nor bit 8 is set in the flags parameter.
// It does not appear in the official abi.h header.
/*
* Sets internal volume parameters.
* See aEnvMixer for more info.
*/
#define aSetVolume32(pkt, f, v, tr) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \
_SHIFTL(v, 0, 16)); \
_a->words.w1 = (uintptr_t)(tr); \
}
#ifdef VERSION_SH
#undef aLoadBuffer
#undef aSaveBuffer
#undef aMix
#undef aEnvMixer
#undef aInterleave
/*
* Mix two tracks by simple clamped addition.
*
* s: DMEM source track 1
* d: DMEM source track 2 and destination
* c: number of bytes to write (rounded down to 16 byte alignment)
*/
#define aAddMixer(pkt, s, d, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_ADDMIXER, 24, 8) | \
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(0x7fff, 0, 16)); \
_a->words.w1 = (_SHIFTL(s, 16, 16) | _SHIFTL(d, 0, 16)); \
}
/*
* Loads a buffer from DRAM to DMEM.
*
* s: DRAM source
* d: DMEM destination
* c: number of bytes to copy (rounded down to 16 byte alignment)
*/
#define aLoadBuffer(pkt, s, d, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8) | \
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(d, 0, 16); \
_a->words.w1 = (uintptr_t)(s); \
}
/*
* Stores a buffer from DMEM to DRAM.
*
* s: DMEM source
* d: DRAM destination
* c: number of bytes to copy (rounded down to 16 byte alignment)
*/
#define aSaveBuffer(pkt, s, d, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8) | \
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(s, 0, 16); \
_a->words.w1 = (uintptr_t)(d); \
}
/*
* Duplicates 128 bytes of data a number of times.
*
* 128 bytes are read from source DMEM address s.
* Then c identical copies of these bytes are written to DMEM address d.
*/
#define aDuplicate(pkt, s, d, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_DUPLICATE, 24, 8) | \
_SHIFTL(c, 16, 8) | _SHIFTL(s, 0, 16)); \
_a->words.w1 = (_SHIFTL(d, 16, 16) | _SHIFTL(0x80, 0, 16)); \
}
/*
* Fast resample.
*
* Before this command, call:
* aSetBuffer(cmd++, 0, in, out, count)
*
* This works like the other resample command but just takes the "nearest" sample,
* instead of a function of the four nearest samples.
*/
#define aResampleZoh(pkt, pitch, start_fract) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_RESAMPLE_ZOH, 24, 8) | \
_SHIFTL(pitch, 0, 16)); \
_a->words.w1 = _SHIFTL(start_fract, 0, 16); \
}
/*
* Mixes audio.
*
* Input and output addresses are taken from the i and o parameters.
* The volume with which the input is changed is taken from the g parameter.
* After the volume of the input samples have been changed, the result
* is added to the output.
*
* Note: count is first rounded down to the nearest multiple of 16 bytes
* and then rounded up to the nearest multiple of 32 bytes.
*/
#define aMix(pkt, g, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_MIXER, 24, 8) | \
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(g, 0, 16)); \
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
}
#define aEnvSetup1(pkt, a, b, c, d) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | \
_SHIFTL(a, 16, 8) | _SHIFTL(b, 0, 16)); \
_a->words.w1 = _SHIFTL(c, 16, 16) | _SHIFTL(d, 0, 16); \
}
#define aEnvSetup2(pkt, volLeft, volRight) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_ENVSETUP2, 24, 8); \
_a->words.w1 = _SHIFTL(volLeft, 16, 16) | \
_SHIFTL(volRight, 0, 16); \
}
#define aEnvMixer(pkt, inBuf, nSamples, bit1, bit2, bit3, dryLeft, dryRight, wetLeft, wetRight) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_ENVMIXER, 24, 8) | \
_SHIFTL((inBuf) >> 4, 16, 8) | \
_SHIFTL(nSamples, 8, 8)) | \
_SHIFTL(bit1, 2, 1) | _SHIFTL(bit2, 1, 1) | \
_SHIFTL(bit3, 0, 1); \
_a->words.w1 = _SHIFTL((dryLeft) >> 4, 24, 8) | \
_SHIFTL((dryRight) >> 4, 16, 8) | \
_SHIFTL((wetLeft) >> 4, 8, 8) | \
_SHIFTL((wetRight) >> 4, 0, 8); \
}
#define aInterleave(pkt, o, l, r, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_INTERLEAVE, 24, 8) | \
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(o, 0, 16); \
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
}
// countOrBuf meaning depends on flag
#define aFilter(pkt, f, countOrBuf, addr) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_FILTER, 24, 8) | _SHIFTL((f), 16, 8) | \
_SHIFTL((countOrBuf), 0, 16); \
_a->words.w1 = (uintptr_t)(addr); \
}
#define aHilogain(pkt, id, buflen, i) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_HILOGAIN, 24, 8) | \
_SHIFTL((id), 16, 8) | _SHIFTL((buflen), 0, 16); \
_a->words.w1 = _SHIFTL((i), 16, 16); \
}
#define aUnknown25(pkt, f, g, i, o) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_UNK_25, 24, 8) | \
_SHIFTL((f), 16, 8) | _SHIFTL((g), 0, 16)); \
_a->words.w1 = _SHIFTL((i), 16, 16) | _SHIFTL((o), 0, 16); \
}
#endif
#endif /* _LANGUAGE_C */
#endif /* !_ABI_H_ */
+4801
View File
File diff suppressed because it is too large. Load diff
+392
View File
@@ -0,0 +1,392 @@
/*---------------------------------------------------------------------
Copyright (C) 1997, Nintendo.
File gs2dex.h
Coded by Yoshitaka Yasumoto. Jul 31, 1997.
Modified by
Comments Header file for S2DEX ucode.
$Id: gs2dex.h,v 1.21 1998/05/28 00:14:49 has Exp $
---------------------------------------------------------------------*/
#ifndef _GS2DEX_H_
#define _GS2DEX_H_
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#include <PR/ultratypes.h>
/*===========================================================================*
* Macro
*===========================================================================*/
#define GS_CALC_DXT(line) (((1<< G_TX_DXT_FRAC)-1)/(line)+1)
#define GS_PIX2TMEM(pix, siz) ((pix)>>(4-(siz)))
#define GS_PIX2DXT(pix, siz) GS_CALC_DXT(GS_PIX2TMEM((pix), (siz)))
/*===========================================================================*
* Data structures for S2DEX microcode
*===========================================================================*/
/*---------------------------------------------------------------------------*
* Background
*---------------------------------------------------------------------------*/
#define G_BGLT_LOADBLOCK 0x0033
#define G_BGLT_LOADTILE 0xfff4
#define G_BG_FLAG_FLIPS 0x01
#define G_BG_FLAG_FLIPT 0x10
/* Non scalable background plane */
typedef struct {
u16 imageX; /* x-coordinate of upper-left position of texture (u10.5) */
u16 imageW; /* width of the texture (u10.2) */
s16 frameX; /* upper-left position of transferred frame (s10.2) */
u16 frameW; /* width of transferred frame (u10.2) */
u16 imageY; /* y-coordinate of upper-left position of texture (u10.5) */
u16 imageH; /* height of the texture (u10.2) */
s16 frameY; /* upper-left position of transferred frame (s10.2) */
u16 frameH; /* height of transferred frame (u10.2) */
u64 *imagePtr; /* texture source address on DRAM */
u16 imageLoad; /* which to use, LoadBlock or LoadTile */
u8 imageFmt; /* format of texel - G_IM_FMT_* */
u8 imageSiz; /* size of texel - G_IM_SIZ_* */
u16 imagePal; /* pallet number */
u16 imageFlip; /* right & left image inversion (Inverted by G_BG_FLAG_FLIPS) */
/* The following is set in the initialization routine guS2DInitBg(). There is no need for the user to set it. */
u16 tmemW; /* TMEM width and Word size of frame 1 line.
At LoadBlock, GS_PIX2TMEM(imageW/4,imageSiz)
At LoadTile GS_PIX2TMEM(frameW/4,imageSiz)+1 */
u16 tmemH; /* height of TMEM loadable at a time (s13.2) 4 times value
When the normal texture, 512/tmemW*4
When the CI texture, 256/tmemW*4 */
u16 tmemLoadSH; /* SH value
At LoadBlock, tmemSize/2-1
At LoadTile, tmemW*16-1 */
u16 tmemLoadTH; /* TH value or Stride value
At LoadBlock, GS_CALC_DXT(tmemW)
At LoadTile, tmemH-1 */
u16 tmemSizeW; /* skip value of imagePtr for image 1-line
At LoadBlock, tmemW*2
At LoadTile, GS_PIX2TMEM(imageW/4,imageSiz)*2 */
u16 tmemSize; /* skip value of imagePtr for 1-loading
= tmemSizeW*tmemH */
} uObjBg_t; /* 40 bytes */
/* Scalable background plane */
typedef struct {
u16 imageX; /* x-coordinate of upper-left position of texture (u10.5) */
u16 imageW; /* width of texture (u10.2) */
s16 frameX; /* upper-left position of transferred frame (s10.2) */
u16 frameW; /* width of transferred frame (u10.2) */
u16 imageY; /* y-coordinate of upper-left position of texture (u10.5) */
u16 imageH; /* height of texture (u10.2) */
s16 frameY; /* upper-left position of transferred frame (s10.2) */
u16 frameH; /* height of transferred frame (u10.2) */
u64 *imagePtr; /* texture source address on DRAM */
u16 imageLoad; /* Which to use, LoadBlock or LoadTile? */
u8 imageFmt; /* format of texel - G_IM_FMT_* */
u8 imageSiz; /* size of texel - G_IM_SIZ_* */
u16 imagePal; /* pallet number */
u16 imageFlip; /* right & left image inversion (Inverted by G_BG_FLAG_FLIPS) */
u16 scaleW; /* scale value of X-direction (u5.10) */
u16 scaleH; /* scale value of Y-direction (u5.10) */
s32 imageYorig; /* start point of drawing on image (s20.5) */
u8 padding[4];
} uObjScaleBg_t; /* 40 bytes */
typedef union {
uObjBg_t b;
uObjScaleBg_t s;
long long int force_structure_alignment;
} uObjBg;
/*---------------------------------------------------------------------------*
* 2D Objects
*---------------------------------------------------------------------------*/
#define G_OBJ_FLAG_FLIPS 1<<0 /* inversion to S-direction */
#define G_OBJ_FLAG_FLIPT 1<<4 /* nversion to T-direction */
typedef struct {
s16 objX; /* s10.2 OBJ x-coordinate of upper-left end */
u16 scaleW; /* u5.10 Scaling of u5.10 width direction */
u16 imageW; /* u10.5 width of u10.5 texture (length of S-direction) */
u16 paddingX; /* Unused - Always 0 */
s16 objY; /* s10.2 OBJ y-coordinate of s10.2 OBJ upper-left end */
u16 scaleH; /* u5.10 Scaling of u5.10 height direction */
u16 imageH; /* u10.5 height of u10.5 texture (length of T-direction) */
u16 paddingY; /* Unused - Always 0 */
u16 imageStride; /* folding width of texel (In units of 64bit word) */
u16 imageAdrs; /* texture header position in TMEM (In units of 64bit word) */
u8 imageFmt; /* format of texel - G_IM_FMT_* */
u8 imageSiz; /* size of texel - G_IM_SIZ_* */
u8 imagePal; /* pallet number (0-7) */
u8 imageFlags; /* The display flag - G_OBJ_FLAG_FLIP* */
} uObjSprite_t; /* 24 bytes */
typedef union {
uObjSprite_t s;
long long int force_structure_alignment;
} uObjSprite;
/*---------------------------------------------------------------------------*
* 2D Matrix
*---------------------------------------------------------------------------*/
typedef struct {
s32 A, B, C, D; /* s15.16 */
s16 X, Y; /* s10.2 */
u16 BaseScaleX; /* u5.10 */
u16 BaseScaleY; /* u5.10 */
} uObjMtx_t; /* 24 bytes */
typedef union {
uObjMtx_t m;
long long int force_structure_alignment;
} uObjMtx;
typedef struct {
s16 X, Y; /* s10.2 */
u16 BaseScaleX; /* u5.10 */
u16 BaseScaleY; /* u5.10 */
} uObjSubMtx_t; /* 8 bytes */
typedef union {
uObjSubMtx_t m;
long long int force_structure_alignment;
} uObjSubMtx;
/*---------------------------------------------------------------------------*
* Loading into TMEM
*---------------------------------------------------------------------------*/
#define G_OBJLT_TXTRBLOCK 0x00001033
#define G_OBJLT_TXTRTILE 0x00fc1034
#define G_OBJLT_TLUT 0x00000030
#define GS_TB_TSIZE(pix,siz) (GS_PIX2TMEM((pix),(siz))-1)
#define GS_TB_TLINE(pix,siz) (GS_CALC_DXT(GS_PIX2TMEM((pix),(siz))))
typedef struct {
u32 type; /* G_OBJLT_TXTRBLOCK divided into types */
u64 *image; /* texture source address on DRAM */
u16 tmem; /* loaded TMEM word address (8byteWORD) */
u16 tsize; /* Texture size, Specified by macro GS_TB_TSIZE() */
u16 tline; /* width of Texture 1-line, Specified by macro GS_TB_TLINE() */
u16 sid; /* STATE ID Multipled by 4 (Either one of 0, 4, 8 and 12) */
u32 flag; /* STATE flag */
u32 mask; /* STATE mask */
} uObjTxtrBlock_t; /* 24 bytes */
#define GS_TT_TWIDTH(pix,siz) ((GS_PIX2TMEM((pix), (siz))<<2)-1)
#define GS_TT_THEIGHT(pix,siz) (((pix)<<2)-1)
typedef struct {
u32 type; /* G_OBJLT_TXTRTILE divided into types */
u64 *image; /* texture source address on DRAM */
u16 tmem; /* loaded TMEM word address (8byteWORD)*/
u16 twidth; /* width of Texture (Specified by macro GS_TT_TWIDTH()) */
u16 theight; /* height of Texture (Specified by macro GS_TT_THEIGHT()) */
u16 sid; /* STATE ID Multipled by 4 (Either one of 0, 4, 8 and 12) */
u32 flag; /* STATE flag */
u32 mask; /* STATE mask */
} uObjTxtrTile_t; /* 24 bytes */
#define GS_PAL_HEAD(head) ((head)+256)
#define GS_PAL_NUM(num) ((num)-1)
typedef struct {
u32 type; /* G_OBJLT_TLUT divided into types */
u64 *image; /* texture source address on DRAM */
u16 phead; /* pallet number of load header (Between 256 and 511) */
u16 pnum; /* loading pallet number -1 */
u16 zero; /* Assign 0 all the time */
u16 sid; /* STATE ID Multipled by 4 (Either one of 0, 4, 8 and 12)*/
u32 flag; /* STATE flag */
u32 mask; /* STATE mask */
} uObjTxtrTLUT_t; /* 24 bytes */
typedef union {
uObjTxtrBlock_t block;
uObjTxtrTile_t tile;
uObjTxtrTLUT_t tlut;
long long int force_structure_alignment;
} uObjTxtr;
/*---------------------------------------------------------------------------*
* Loading into TMEM & 2D Objects
*---------------------------------------------------------------------------*/
typedef struct {
uObjTxtr txtr;
uObjSprite sprite;
} uObjTxSprite; /* 48 bytes */
/*===========================================================================*
* GBI Commands for S2DEX microcode
*===========================================================================*/
/* GBI Header */
#ifdef F3DEX_GBI_2
#define G_OBJ_RECTANGLE_R 0xda
#define G_OBJ_MOVEMEM 0xdc
#define G_RDPHALF_0 0xe4
#define G_OBJ_RECTANGLE 0x01
#define G_OBJ_SPRITE 0x02
#define G_SELECT_DL 0x04
#define G_OBJ_LOADTXTR 0x05
#define G_OBJ_LDTX_SPRITE 0x06
#define G_OBJ_LDTX_RECT 0x07
#define G_OBJ_LDTX_RECT_R 0x08
#define G_BG_1CYC 0x09
#define G_BG_COPY 0x0a
#define G_OBJ_RENDERMODE 0x0b
#else
#define G_BG_1CYC 0x01
#define G_BG_COPY 0x02
#define G_OBJ_RECTANGLE 0x03
#define G_OBJ_SPRITE 0x04
#define G_OBJ_MOVEMEM 0x05
#define G_SELECT_DL 0xb0
#define G_OBJ_RENDERMODE 0xb1
#define G_OBJ_RECTANGLE_R 0xb2
#define G_OBJ_LOADTXTR 0xc1
#define G_OBJ_LDTX_SPRITE 0xc2
#define G_OBJ_LDTX_RECT 0xc3
#define G_OBJ_LDTX_RECT_R 0xc4
#define G_RDPHALF_0 0xe4
#endif
/*---------------------------------------------------------------------------*
* Background wrapped screen
*---------------------------------------------------------------------------*/
#define gSPBgRectangle(pkt, m, mptr) gDma0p((pkt),(m),(mptr),0)
#define gsSPBgRectangle(m, mptr) gsDma0p( (m),(mptr),0)
#define gSPBgRectCopy(pkt, mptr) gSPBgRectangle((pkt), G_BG_COPY, (mptr))
#define gsSPBgRectCopy(mptr) gsSPBgRectangle( G_BG_COPY, (mptr))
#define gSPBgRect1Cyc(pkt, mptr) gSPBgRectangle((pkt), G_BG_1CYC, (mptr))
#define gsSPBgRect1Cyc(mptr) gsSPBgRectangle( G_BG_1CYC, (mptr))
/*---------------------------------------------------------------------------*
* 2D Objects
*---------------------------------------------------------------------------*/
#define gSPObjSprite(pkt, mptr) gDma0p((pkt),G_OBJ_SPRITE, (mptr),0)
#define gsSPObjSprite(mptr) gsDma0p( G_OBJ_SPRITE, (mptr),0)
#define gSPObjRectangle(pkt, mptr) gDma0p((pkt),G_OBJ_RECTANGLE, (mptr),0)
#define gsSPObjRectangle(mptr) gsDma0p( G_OBJ_RECTANGLE, (mptr),0)
#define gSPObjRectangleR(pkt, mptr) gDma0p((pkt),G_OBJ_RECTANGLE_R,(mptr),0)
#define gsSPObjRectangleR(mptr) gsDma0p( G_OBJ_RECTANGLE_R,(mptr),0)
/*---------------------------------------------------------------------------*
* 2D Matrix
*---------------------------------------------------------------------------*/
#define gSPObjMatrix(pkt, mptr) gDma1p((pkt),G_OBJ_MOVEMEM,(mptr),0,23)
#define gsSPObjMatrix(mptr) gsDma1p( G_OBJ_MOVEMEM,(mptr),0,23)
#define gSPObjSubMatrix(pkt, mptr) gDma1p((pkt),G_OBJ_MOVEMEM,(mptr),2, 7)
#define gsSPObjSubMatrix(mptr) gsDma1p( G_OBJ_MOVEMEM,(mptr),2, 7)
/*---------------------------------------------------------------------------*
* Loading into TMEM
*---------------------------------------------------------------------------*/
#define gSPObjLoadTxtr(pkt, tptr) gDma0p((pkt),G_OBJ_LOADTXTR, (tptr),23)
#define gsSPObjLoadTxtr(tptr) gsDma0p( G_OBJ_LOADTXTR, (tptr),23)
#define gSPObjLoadTxSprite(pkt, tptr) gDma0p((pkt),G_OBJ_LDTX_SPRITE,(tptr),47)
#define gsSPObjLoadTxSprite(tptr) gsDma0p( G_OBJ_LDTX_SPRITE,(tptr),47)
#define gSPObjLoadTxRect(pkt, tptr) gDma0p((pkt),G_OBJ_LDTX_RECT, (tptr),47)
#define gsSPObjLoadTxRect(tptr) gsDma0p( G_OBJ_LDTX_RECT, (tptr),47)
#define gSPObjLoadTxRectR(pkt, tptr) gDma0p((pkt),G_OBJ_LDTX_RECT_R,(tptr),47)
#define gsSPObjLoadTxRectR(tptr) gsDma0p( G_OBJ_LDTX_RECT_R,(tptr),47)
/*---------------------------------------------------------------------------*
* Select Display List
*---------------------------------------------------------------------------*/
#define gSPSelectDL(pkt, mptr, sid, flag, mask) \
{ gDma1p((pkt), G_RDPHALF_0, (flag), (u32)(mptr) & 0xffff, (sid)); \
gDma1p((pkt), G_SELECT_DL, (mask), (u32)(mptr) >> 16, G_DL_PUSH); }
#define gsSPSelectDL(mptr, sid, flag, mask) \
{ gsDma1p(G_RDPHALF_0, (flag), (u32)(mptr) & 0xffff, (sid)); \
gsDma1p(G_SELECT_DL, (mask), (u32)(mptr) >> 16, G_DL_PUSH); }
#define gSPSelectBranchDL(pkt, mptr, sid, flag, mask) \
{ gDma1p((pkt), G_RDPHALF_0, (flag), (u32)(mptr) & 0xffff, (sid)); \
gDma1p((pkt), G_SELECT_DL, (mask), (u32)(mptr) >> 16, G_DL_NOPUSH); }
#define gsSPSelectBranchDL(mptr, sid, flag, mask) \
{ gsDma1p(G_RDPHALF_0, (flag), (u32)(mptr) & 0xffff, (sid)); \
gsDma1p(G_SELECT_DL, (mask), (u32)(mptr) >> 16, G_DL_NOPUSH); }
/*---------------------------------------------------------------------------*
* Set general status
*---------------------------------------------------------------------------*/
#define G_MW_GENSTAT 0x08 /* Note that it is the same value of G_MW_FOG */
#define gSPSetStatus(pkt, sid, val) \
gMoveWd((pkt), G_MW_GENSTAT, (sid), (val))
#define gsSPSetStatus(sid, val) \
gsMoveWd( G_MW_GENSTAT, (sid), (val))
/*---------------------------------------------------------------------------*
* Set Object Render Mode
*---------------------------------------------------------------------------*/
#define G_OBJRM_NOTXCLAMP 0x01
#define G_OBJRM_XLU 0x02 /* Ignored */
#define G_OBJRM_ANTIALIAS 0x04 /* Ignored */
#define G_OBJRM_BILERP 0x08
#define G_OBJRM_SHRINKSIZE_1 0x10
#define G_OBJRM_SHRINKSIZE_2 0x20
#define G_OBJRM_WIDEN 0x40
#define gSPObjRenderMode(pkt, mode) gImmp1((pkt),G_OBJ_RENDERMODE,(mode))
#define gsSPObjRenderMode(mode) gsImmp1( G_OBJ_RENDERMODE,(mode))
/*===========================================================================*
* Render Mode Macro
*===========================================================================*/
#define RM_RA_SPRITE(clk) \
AA_EN | CVG_DST_CLAMP | \
CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_OPA | TEX_EDGE | \
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
#define G_RM_SPRITE G_RM_OPA_SURF
#define G_RM_SPRITE2 G_RM_OPA_SURF2
#define G_RM_RA_SPRITE RM_RA_SPRITE(1)
#define G_RM_RA_SPRITE2 RM_RA_SPRITE(2)
#define G_RM_AA_SPRITE G_RM_AA_TEX_TERR
#define G_RM_AA_SPRITE2 G_RM_AA_TEX_TERR2
#define G_RM_XLU_SPRITE G_RM_XLU_SURF
#define G_RM_XLU_SPRITE2 G_RM_XLU_SURF2
#define G_RM_AA_XLU_SPRITE G_RM_AA_XLU_SURF
#define G_RM_AA_XLU_SPRITE2 G_RM_AA_XLU_SURF2
/*===========================================================================*
* External functions
*===========================================================================*/
extern u64 gspS2DEX_fifoTextStart[], gspS2DEX_fifoTextEnd[];
extern u64 gspS2DEX_fifoDataStart[], gspS2DEX_fifoDataEnd[];
extern u64 gspS2DEX_fifo_dTextStart[], gspS2DEX_fifo_dTextEnd[];
extern u64 gspS2DEX_fifo_dDataStart[], gspS2DEX_fifo_dDataEnd[];
extern u64 gspS2DEX2_fifoTextStart[], gspS2DEX2_fifoTextEnd[];
extern u64 gspS2DEX2_fifoDataStart[], gspS2DEX2_fifoDataEnd[];
extern u64 gspS2DEX2_xbusTextStart[], gspS2DEX2_xbusTextEnd[];
extern u64 gspS2DEX2_xbusDataStart[], gspS2DEX2_xbusDataEnd[];
extern void guS2DInitBg(uObjBg *);
#ifdef F3DEX_GBI_2
# define guS2DEmuBgRect1Cyc guS2D2EmuBgRect1Cyc /*Wrapper*/
# define guS2DEmuSetScissor guS2D2EmuSetScissor /*Wrapper*/
extern void guS2D2EmuSetScissor(u32, u32, u32, u32, u8);
extern void guS2D2EmuBgRect1Cyc(Gfx **, uObjBg *);
#else
extern void guS2DEmuSetScissor(u32, u32, u32, u32, u8);
extern void guS2DEmuBgRect1Cyc(Gfx **, uObjBg *);
#endif
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* _GS2DEX_H_ */
/*======== End of gs2dex.h ========*/
+8
View File
@@ -1,6 +1,9 @@
#ifndef _ULTRA64_GU_H_ #ifndef _ULTRA64_GU_H_
#define _ULTRA64_GU_H_ #define _ULTRA64_GU_H_
#include <PR/mbi.h>
#include <PR/ultratypes.h>
#define GU_PI 3.1415926 #define GU_PI 3.1415926
/* Functions */ /* Functions */
@@ -18,4 +21,9 @@ void guMtxIdent(Mtx *m);
void guMtxIdentF(float mf[4][4]); void guMtxIdentF(float mf[4][4]);
void guMtxL2F(float mf[4][4], Mtx *m); void guMtxL2F(float mf[4][4], Mtx *m);
void guNormalize(float *, float *, float *); void guNormalize(float *, float *, float *);
/* Used only in Fast3DEX2 */
void guLookAtReflect (Mtx *m, LookAt *l, float xEye, float yEye, float zEye,
float xAt, float yAt, float zAt,
float xUp, float yUp, float zUp);
#endif #endif
+48
View File
@@ -0,0 +1,48 @@
#ifndef _ULTRA64_LIBAUDIO_H_
#define _ULTRA64_LIBAUDIO_H_
#include "abi.h"
typedef struct
{
u8 *offset;
s32 len;
#ifdef VERSION_SH
s8 magic[2]; // tbl: 0x0204, otherwise: 0x0203
// for ctl (else zeros):
union {
// unused, just for clarification (big endian)
struct {
u8 bank;
u8 ff;
u8 numInstruments;
u8 numDrums;
} as_u8;
// used
struct {
s16 bankAndFf;
s16 numInstrumentsAndDrums;
} as_s16;
} ctl;
#endif
} ALSeqData;
typedef struct
{
#ifndef VERSION_SH
s16 revision;
#endif
s16 seqCount;
#ifdef VERSION_SH
s16 unk2;
u8 *data;
s32 pad[2];
#endif
ALSeqData seqArray[1];
} ALSeqFile;
void alSeqFileNew(ALSeqFile *f, u8 *base);
#endif
@@ -12,6 +12,7 @@
extern u32 osTvType; extern u32 osTvType;
extern u32 osRomBase; extern u32 osRomBase;
extern u32 osResetType; extern u32 osResetType;
extern u32 osMemSize;
extern u8 osAppNmiBuffer[64]; extern u8 osAppNmiBuffer[64];
extern u64 osClockRate;
#endif /* _LIBULTRA_H */ #endif /* _LIBULTRA_H */
+102
View File
@@ -0,0 +1,102 @@
#ifndef _MBI_H_
#define _MBI_H_
#include "platform_info.h"
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/**************************************************************************
*
* $Revision: 1.136 $
* $Date: 1999/01/05 13:04:00 $
* $Source: /hosts/gate3/exdisk2/cvs/N64OS/Master/cvsmdev2/PR/include/mbi.h,v $
*
**************************************************************************/
/*
* Header file for the Media Binary Interface
*
* NOTE: This file is included by the RSP microcode, so any C-specific
* constructs must be bracketed by #ifdef _LANGUAGE_C
*
*/
/*
* the SHIFT macros are used to build display list commands, inserting
* bit-fields into a 32-bit word. They take a value, a shift amount,
* and a width.
*
* For the left shift, the lower bits of the value are masked,
* then shifted left.
*
* For the right shift, the value is shifted right, then the lower bits
* are masked.
*
* (NOTE: _SHIFTL(v, 0, 32) won't work, just use an assignment)
*
*/
#define _SHIFTL(v, s, w) \
((unsigned int) (((unsigned int)(v) & ((0x01 << (w)) - 1)) << (s)))
#define _SHIFTR(v, s, w) \
((unsigned int)(((unsigned int)(v) >> (s)) & ((0x01 << (w)) - 1)))
#define _SHIFT _SHIFTL /* old, for compatibility only */
#define G_ON (1)
#define G_OFF (0)
/**************************************************************************
*
* Graphics Binary Interface
*
**************************************************************************/
#include <PR/gbi.h>
/**************************************************************************
*
* Audio Binary Interface
*
**************************************************************************/
#include <PR/abi.h>
/**************************************************************************
*
* Task list
*
**************************************************************************/
#define M_GFXTASK 1
#define M_AUDTASK 2
#define M_VIDTASK 3
#define M_HVQTASK 6
#define M_HVQMTASK 7
/**************************************************************************
*
* Segment macros and definitions
*
**************************************************************************/
#define NUM_SEGMENTS (16)
#define SEGMENT_OFFSET(a) ((unsigned int)(a) & 0x00ffffff)
#define SEGMENT_NUMBER(a) (((unsigned int)(a) << 4) >> 28)
#define SEGMENT_ADDR(num, off) (((num) << 24) + (off))
#ifndef NULL
#define NULL 0
#endif
#endif /* !_MBI_H_ */
+92
View File
@@ -0,0 +1,92 @@
/*====================================================================
* os_ai.h
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_ai.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:04 $
*---------------------------------------------------------------------*/
#ifndef _OS_AI_H_
#define _OS_AI_H_
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#include <PR/ultratypes.h>
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Type definitions
*
*/
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
/**************************************************************************
*
* Global definitions
*
*/
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Macro definitions
*
*/
/**************************************************************************
*
* Extern variables
*
*/
/**************************************************************************
*
* Function prototypes
*
*/
/* Audio interface (Ai) */
extern u32 osAiGetStatus(void);
extern u32 osAiGetLength(void);
extern s32 osAiSetFrequency(u32);
extern s32 osAiSetNextBuffer(void *, u32);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* !_OS_AI_H_ */
+96
View File
@@ -0,0 +1,96 @@
/*====================================================================
* os_cache.h
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_cache.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:04 $
*---------------------------------------------------------------------*/
#ifndef _OS_CACHE_H_
#define _OS_CACHE_H_
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#include <PR/ultratypes.h>
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Type definitions
*
*/
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
/**************************************************************************
*
* Global definitions
*
*/
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Macro definitions
*
*/
#define OS_DCACHE_ROUNDUP_ADDR(x) (void *)(((((u32)(x)+0xf)/0x10)*0x10))
#define OS_DCACHE_ROUNDUP_SIZE(x) (u32)(((((u32)(x)+0xf)/0x10)*0x10))
/**************************************************************************
*
* Extern variables
*
*/
/**************************************************************************
*
* Function prototypes
*
*/
/* Cache operations and macros */
extern void osInvalDCache(void *, size_t);
extern void osInvalICache(void *, size_t);
extern void osWritebackDCache(void *, size_t);
extern void osWritebackDCacheAll(void);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* !_OS_CACHE_H_ */
+207
View File
@@ -0,0 +1,207 @@
/*====================================================================
* os_cont.h
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_cont.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:05 $
*---------------------------------------------------------------------*/
#ifndef _OS_CONT_H_
#define _OS_CONT_H_
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#include <PR/ultratypes.h>
#include "os_message.h"
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Type definitions
*
*/
/*
* Structure for controllers
*/
typedef struct {
u16 type; /* Controller Type */
u8 status; /* Controller status */
u8 errnum;
}OSContStatus;
typedef struct {
u16 button;
s8 stick_x; /* -80 <= stick_x <= 80 */
s8 stick_y; /* -80 <= stick_y <= 80 */
u8 errnum;
} OSContPad;
typedef struct {
void *address; /* Ram pad Address: 11 bits */
u8 databuffer[32]; /* address of the data buffer */
u8 addressCrc; /* CRC code for address */
u8 dataCrc; /* CRC code for data */
u8 errnum;
} OSContRamIo;
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
/**************************************************************************
*
* Global definitions
*
*/
/*
* Controllers number
*/
#ifndef _HW_VERSION_1
#define MAXCONTROLLERS 4
#else
#define MAXCONTROLLERS 6
#endif
/* controller errors */
#define CONT_NO_RESPONSE_ERROR 0x8
#define CONT_OVERRUN_ERROR 0x4
#ifdef _HW_VERSION_1
#define CONT_FRAME_ERROR 0x2
#define CONT_COLLISION_ERROR 0x1
#endif
/* Controller type */
#define CONT_ABSOLUTE 0x0001
#define CONT_RELATIVE 0x0002
#define CONT_JOYPORT 0x0004
#define CONT_EEPROM 0x8000
#define CONT_EEP16K 0x4000
#define CONT_TYPE_MASK 0x1f07
#define CONT_TYPE_NORMAL 0x0005
#define CONT_TYPE_MOUSE 0x0002
#define CONT_TYPE_VOICE 0x0100
/* Controller status */
#define CONT_CARD_ON 0x01
#define CONT_CARD_PULL 0x02
#define CONT_ADDR_CRC_ER 0x04
#define CONT_EEPROM_BUSY 0x80
/* Buttons */
#define CONT_A 0x8000
#define CONT_B 0x4000
#define CONT_G 0x2000
#define CONT_START 0x1000
#define CONT_UP 0x0800
#define CONT_DOWN 0x0400
#define CONT_LEFT 0x0200
#define CONT_RIGHT 0x0100
#define CONT_L 0x0020
#define CONT_R 0x0010
#define CONT_E 0x0008
#define CONT_D 0x0004
#define CONT_C 0x0002
#define CONT_F 0x0001
/* Nintendo's official button names */
#define A_BUTTON CONT_A
#define B_BUTTON CONT_B
#define L_TRIG CONT_L
#define R_TRIG CONT_R
#define Z_TRIG CONT_G
#define START_BUTTON CONT_START
#define U_JPAD CONT_UP
#define L_JPAD CONT_LEFT
#define R_JPAD CONT_RIGHT
#define D_JPAD CONT_DOWN
#define U_CBUTTONS CONT_E
#define L_CBUTTONS CONT_C
#define R_CBUTTONS CONT_F
#define D_CBUTTONS CONT_D
/* Controller error number */
#define CONT_ERR_NO_CONTROLLER PFS_ERR_NOPACK /* 1 */
#define CONT_ERR_CONTRFAIL CONT_OVERRUN_ERROR /* 4 */
#define CONT_ERR_INVALID PFS_ERR_INVALID /* 5 */
#define CONT_ERR_DEVICE PFS_ERR_DEVICE /* 11 */
#define CONT_ERR_NOT_READY 12
#define CONT_ERR_VOICE_MEMORY 13
#define CONT_ERR_VOICE_WORD 14
#define CONT_ERR_VOICE_NO_RESPONSE 15
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Macro definitions
*
*/
/**************************************************************************
*
* Extern variables
*
*/
/**************************************************************************
*
* Function prototypes
*
*/
/* Controller interface */
extern s32 osContInit(OSMesgQueue *, u8 *, OSContStatus *);
extern s32 osContReset(OSMesgQueue *, OSContStatus *);
extern s32 osContStartQuery(OSMesgQueue *);
extern s32 osContStartReadData(OSMesgQueue *);
#ifndef _HW_VERSION_1
extern s32 osContSetCh(u8);
#endif
extern void osContGetQuery(OSContStatus *);
extern void osContGetReadData(OSContPad *);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* !_OS_CONT_H_ */
+107
View File
@@ -0,0 +1,107 @@
/*====================================================================
* os_eeprom.h
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_eeprom.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:06 $
*---------------------------------------------------------------------*/
#ifndef _OS_EEPROM_H_
#define _OS_EEPROM_H_
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#include <PR/ultratypes.h>
#include "os_message.h"
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Type definitions
*
*/
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
/**************************************************************************
*
* Global definitions
*
*/
/* EEPROM TYPE */
#define EEPROM_TYPE_4K 0x01
#define EEPROM_TYPE_16K 0x02
/* definition for EEPROM */
#define EEPROM_MAXBLOCKS 64
#define EEP16K_MAXBLOCKS 256
#define EEPROM_BLOCK_SIZE 8
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Macro definitions
*
*/
/**************************************************************************
*
* Extern variables
*
*/
/**************************************************************************
*
* Function prototypes
*
*/
/* EEPROM interface */
extern s32 osEepromProbe(OSMesgQueue *);
extern s32 osEepromRead(OSMesgQueue *, u8, u8 *);
extern s32 osEepromWrite(OSMesgQueue *, u8, u8 *);
extern s32 osEepromLongRead(OSMesgQueue *, u8, u8 *, int);
extern s32 osEepromLongWrite(OSMesgQueue *, u8, u8 *, int);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* !_OS_EEPROM_H_ */
+119
View File
@@ -0,0 +1,119 @@
/*====================================================================
* os_exception.h
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_exception.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:07 $
*---------------------------------------------------------------------*/
#ifndef _OS_EXCEPTION_H_
#define _OS_EXCEPTION_H_
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#include <PR/ultratypes.h>
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Type definitions
*
*/
typedef u32 OSIntMask;
typedef u32 OSHWIntr;
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
/**************************************************************************
*
* Global definitions
*
*/
/* Flags for debugging purpose */
#define OS_FLAG_CPU_BREAK 1 /* Break exception has occurred */
#define OS_FLAG_FAULT 2 /* CPU fault has occurred */
/* Interrupt masks */
#define OS_IM_NONE 0x00000001
#define OS_IM_SW1 0x00000501
#define OS_IM_SW2 0x00000601
#define OS_IM_CART 0x00000c01
#define OS_IM_PRENMI 0x00001401
#define OS_IM_RDBWRITE 0x00002401
#define OS_IM_RDBREAD 0x00004401
#define OS_IM_COUNTER 0x00008401
#define OS_IM_CPU 0x0000ff01
#define OS_IM_SP 0x00010401
#define OS_IM_SI 0x00020401
#define OS_IM_AI 0x00040401
#define OS_IM_VI 0x00080401
#define OS_IM_PI 0x00100401
#define OS_IM_DP 0x00200401
#define OS_IM_ALL 0x003fff01
#define RCP_IMASK 0x003f0000
#define RCP_IMASKSHIFT 16
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Macro definitions
*
*/
/**************************************************************************
*
* Extern variables
*
*/
/**************************************************************************
*
* Function prototypes
*
*/
/* Interrupt operations */
extern OSIntMask osGetIntMask(void);
extern OSIntMask osSetIntMask(OSIntMask);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* !_OS_EXCEPTION_H_ */
@@ -1,16 +1,19 @@
#ifndef _ULTRA64_OS_INTERNAL_H_ #ifndef _ULTRA64_OS_INTERNAL_H_
#define _ULTRA64_OS_INTERNAL_H_ #define _ULTRA64_OS_INTERNAL_H_
#include "PR/os_message.h"
/* Internal functions used by the operating system */ /* Internal functions used by the operating system */
/* Do not include this header in application code */ /* Do not include this header in application code */
/* Variables */ /* Variables */
//extern u64 osClockRate; extern u64 osClockRate;
/* Functions */ /* Functions */
/*u32 __osProbeTLB(void *); /*u32 __osProbeTLB(void *);
u32 __osDisableInt(void); u32 __osDisableInt(void);
void __osRestoreInt(u32);*/ void __osRestoreInt(u32);*/
OSThread *__osGetCurrFaultedThread(void);
#endif #endif
+10
View File
@@ -0,0 +1,10 @@
#ifndef _OS_LIBC_H_
#define _OS_LIBC_H_
#include "ultratypes.h"
// Old deprecated functions from strings.h, replaced by memcpy/memset.
extern void bcopy(const void *, void *, size_t);
extern void bzero(void *, size_t);
#endif /* !_OS_LIBC_H_ */
+164
View File
@@ -0,0 +1,164 @@
/*====================================================================
* os_message.h
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_message.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:15 $
*---------------------------------------------------------------------*/
#ifndef _OS_MESSAGE_H_
#define _OS_MESSAGE_H_
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#include <PR/ultratypes.h>
#include <PR/os_thread.h>
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Type definitions
*
*/
typedef u32 OSEvent;
/*
* Structure for message
*/
typedef void * OSMesg;
/*
* Structure for message queue
*/
typedef struct OSMesgQueue_s {
OSThread *mtqueue; /* Queue to store threads blocked
on empty mailboxes (receive) */
OSThread *fullqueue; /* Queue to store threads blocked
on full mailboxes (send) */
s32 validCount; /* Contains number of valid message */
s32 first; /* Points to first valid message */
s32 msgCount; /* Contains total # of messages */
OSMesg *msg; /* Points to message buffer array */
} OSMesgQueue;
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
/**************************************************************************
*
* Global definitions
*
*/
/* Events */
#ifdef _FINALROM
#define OS_NUM_EVENTS 15
#else
#define OS_NUM_EVENTS 23
#endif
#define OS_EVENT_SW1 0 /* CPU SW1 interrupt */
#define OS_EVENT_SW2 1 /* CPU SW2 interrupt */
#define OS_EVENT_CART 2 /* Cartridge interrupt: used by rmon */
#define OS_EVENT_COUNTER 3 /* Counter int: used by VI/Timer Mgr */
#define OS_EVENT_SP 4 /* SP task done interrupt */
#define OS_EVENT_SI 5 /* SI (controller) interrupt */
#define OS_EVENT_AI 6 /* AI interrupt */
#define OS_EVENT_VI 7 /* VI interrupt: used by VI/Timer Mgr */
#define OS_EVENT_PI 8 /* PI interrupt: used by PI Manager */
#define OS_EVENT_DP 9 /* DP full sync interrupt */
#define OS_EVENT_CPU_BREAK 10 /* CPU breakpoint: used by rmon */
#define OS_EVENT_SP_BREAK 11 /* SP breakpoint: used by rmon */
#define OS_EVENT_FAULT 12 /* CPU fault event: used by rmon */
#define OS_EVENT_THREADSTATUS 13 /* CPU thread status: used by rmon */
#define OS_EVENT_PRENMI 14 /* Pre NMI interrupt */
#ifndef _FINALROM
#define OS_EVENT_RDB_READ_DONE 15 /* RDB read ok event: used by rmon */
#define OS_EVENT_RDB_LOG_DONE 16 /* read of log data complete */
#define OS_EVENT_RDB_DATA_DONE 17 /* read of hostio data complete */
#define OS_EVENT_RDB_REQ_RAMROM 18 /* host needs ramrom access */
#define OS_EVENT_RDB_FREE_RAMROM 19 /* host is done with ramrom access */
#define OS_EVENT_RDB_DBG_DONE 20
#define OS_EVENT_RDB_FLUSH_PROF 21
#define OS_EVENT_RDB_ACK_PROF 22
#endif
/* Flags to turn blocking on/off when sending/receiving message */
#define OS_MESG_NOBLOCK 0
#define OS_MESG_BLOCK 1
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Macro definitions
*
*/
/* Get count of valid messages in queue */
#define MQ_GET_COUNT(mq) ((mq)->validCount)
/* Figure out if message queue is empty or full */
#define MQ_IS_EMPTY(mq) (MQ_GET_COUNT(mq) == 0)
#define MQ_IS_FULL(mq) (MQ_GET_COUNT(mq) >= (mq)->msgCount)
/**************************************************************************
*
* Extern variables
*
*/
/**************************************************************************
*
* Function prototypes
*
*/
/* Message operations */
extern void osCreateMesgQueue(OSMesgQueue *, OSMesg *, s32);
extern s32 osSendMesg(OSMesgQueue *, OSMesg, s32);
extern s32 osJamMesg(OSMesgQueue *, OSMesg, s32);
extern s32 osRecvMesg(OSMesgQueue *, OSMesg *, s32);
/* Event operations */
extern void osSetEventMesg(OSEvent, OSMesgQueue *, OSMesg);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* !_OS_MESSAGE_H_ */
@@ -1,11 +1,11 @@
#ifndef _ULTRA64_OS_MISC_H_ #ifndef _ULTRA64_OS_MISC_H_
#define _ULTRA64_OS_MISC_H_ #define _ULTRA64_OS_MISC_H_
#include <PR/ultratypes.h>
/* Miscellaneous OS functions */ /* Miscellaneous OS functions */
void osInitialize(void); void osInitialize(void);
u32 osGetCount(void); u32 osGetCount(void);
u32 osVirtualToPhysical(void *); uintptr_t osVirtualToPhysical(void *);
#endif #endif
+86
View File
@@ -0,0 +1,86 @@
#ifndef _ULTRA64_PI_H_
#define _ULTRA64_PI_H_
#include <ultra64.h>
/* Ultra64 Parallel Interface */
/* Types */
typedef struct {
#if !defined(VERSION_EU)
u32 errStatus;
#endif
void *dramAddr;
void *C2Addr;
u32 sectorSize;
u32 C1ErrNum;
u32 C1ErrSector[4];
} __OSBlockInfo;
typedef struct {
u32 cmdType; // 0
u16 transferMode; // 4
u16 blockNum; // 6
s32 sectorNum; // 8
uintptr_t devAddr; // c
#if defined(VERSION_EU)
u32 errStatus; //error status added moved to blockinfo
#endif
u32 bmCtlShadow; // 10
u32 seqCtlShadow; // 14
__OSBlockInfo block[2]; // 18
} __OSTranxInfo;
typedef struct OSPiHandle_s {
struct OSPiHandle_s *next;
u8 type;
u8 latency;
u8 pageSize;
u8 relDuration;
u8 pulse;
u8 domain;
u32 baseAddress;
u32 speed;
__OSTranxInfo transferInfo;
} OSPiHandle;
typedef struct {
u8 type;
uintptr_t address;
} OSPiInfo;
typedef struct {
u16 type;
u8 pri;
u8 status;
OSMesgQueue *retQueue;
} OSIoMesgHdr;
typedef struct {
/*0x00*/ OSIoMesgHdr hdr;
/*0x08*/ void *dramAddr;
/*0x0C*/ uintptr_t devAddr;
/*0x10*/ size_t size;
OSPiHandle *piHandle; // from the official definition
} OSIoMesg;
/* Definitions */
#define OS_READ 0 // device -> RDRAM
#define OS_WRITE 1 // device <- RDRAM
#define OS_MESG_PRI_NORMAL 0
#define OS_MESG_PRI_HIGH 1
/* Functions */
s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, uintptr_t devAddr, void *vAddr,
size_t nbytes, OSMesgQueue *mq);
void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgCnt);
OSMesgQueue *osPiGetCmdQueue(void);
s32 osPiWriteIo(uintptr_t devAddr, u32 data);
s32 osPiReadIo(uintptr_t devAddr, u32 *data);
s32 osPiRawStartDma(s32 dir, u32 cart_addr, void *dram_addr, size_t size);
s32 osEPiRawStartDma(OSPiHandle *piHandle, s32 dir, u32 cart_addr, void *dram_addr, size_t size);
#endif
+92
View File
@@ -0,0 +1,92 @@
/*====================================================================
* os_rdp.h
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_rdp.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:16 $
*---------------------------------------------------------------------*/
#ifndef _OS_RDP_H_
#define _OS_RDP_H_
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#include <PR/ultratypes.h>
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Type definitions
*
*/
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
/**************************************************************************
*
* Global definitions
*
*/
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Macro definitions
*
*/
/**************************************************************************
*
* Extern variables
*
*/
/**************************************************************************
*
* Function prototypes
*
*/
/* Display processor interface (Dp) */
extern u32 osDpGetStatus(void);
extern void osDpSetStatus(u32);
extern void osDpGetCounters(u32 *);
extern s32 osDpSetNextBuffer(void *, u64);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* !_OS_RDP_H_ */
@@ -1,6 +1,6 @@
#ifndef _ULTRA64_THREAD_H_ #ifndef _ULTRA64_THREAD_H_
#define _ULTRA64_THREAD_H_ #define _ULTRA64_THREAD_H_
#include "ultratypes.h"
/* Recommended priorities for system threads */ /* Recommended priorities for system threads */
#define OS_PRIORITY_MAX 255 #define OS_PRIORITY_MAX 255
#define OS_PRIORITY_VIMGR 254 #define OS_PRIORITY_VIMGR 254
@@ -1,6 +1,8 @@
#ifndef _ULTRA64_TIME_H_ #ifndef _ULTRA64_TIME_H_
#define _ULTRA64_TIME_H_ #define _ULTRA64_TIME_H_
#include "message.h"
#include <PR/ultratypes.h>
#include <PR/os_message.h>
/* Types */ /* Types */
@@ -20,6 +22,6 @@ typedef u64 OSTime;
OSTime osGetTime(void); OSTime osGetTime(void);
void osSetTime(OSTime time); void osSetTime(OSTime time);
u32 osSetTimer(OSTimer *, OSTime, u64, OSMesgQueue *, OSMesg); u32 osSetTimer(OSTimer *, OSTime, OSTime, OSMesgQueue *, OSMesg);
#endif #endif
+107
View File
@@ -0,0 +1,107 @@
/*====================================================================
* os_tlb.h
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_tlb.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:20 $
*---------------------------------------------------------------------*/
#ifndef _OS_TLB_H_
#define _OS_TLB_H_
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
#include <PR/ultratypes.h>
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Type definitions
*
*/
typedef u32 OSPageMask;
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
/**************************************************************************
*
* Global definitions
*
*/
/*
* Page size argument for TLB routines
*/
#define OS_PM_4K 0x0000000
#define OS_PM_16K 0x0006000
#define OS_PM_64K 0x001e000
#define OS_PM_256K 0x007e000
#define OS_PM_1M 0x01fe000
#define OS_PM_4M 0x07fe000
#define OS_PM_16M 0x1ffe000
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Macro definitions
*
*/
/**************************************************************************
*
* Extern variables
*
*/
/**************************************************************************
*
* Function prototypes
*
*/
/* TLB management routines */
extern void osMapTLB(s32, OSPageMask, void *, u32, u32, s32);
extern void osMapTLBRdb(void);
extern void osUnmapTLB(s32);
extern void osUnmapTLBAll(void);
extern void osSetTLBASID(s32);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* !_OS_TLB_H_ */
+6 -31
View File
@@ -1,6 +1,9 @@
#ifndef _ULTRA64_VI_H_ #ifndef _ULTRA64_VI_H_
#define _ULTRA64_VI_H_ #define _ULTRA64_VI_H_
#include <PR/ultratypes.h>
#include <PR/os_message.h>
/* Ultra64 Video Interface */ /* Ultra64 Video Interface */
@@ -58,7 +61,7 @@ typedef struct
/* 0x00 */ u16 unk00; //some kind of flags. swap buffer sets to 0x10 /* 0x00 */ u16 unk00; //some kind of flags. swap buffer sets to 0x10
/* 0x02 */ u16 retraceCount; /* 0x02 */ u16 retraceCount;
/* 0x04 */ void* buffer; /* 0x04 */ void* buffer;
/* 0x08 */ OSViMode *unk08; /* 0x08 */ OSViMode *modep;
/* 0x0c */ u32 features; /* 0x0c */ u32 features;
/* 0x10 */ OSMesgQueue *mq; /* 0x10 */ OSMesgQueue *mq;
/* 0x14 */ OSMesg *msg; /* 0x14 */ OSMesg *msg;
@@ -72,6 +75,7 @@ typedef struct
void osCreateViManager(OSPri pri); void osCreateViManager(OSPri pri);
void osViSetMode(OSViMode *mode); void osViSetMode(OSViMode *mode);
void osViSetEvent(OSMesgQueue *mq, OSMesg msg, u32 retraceCount);
void osViBlack(u8 active); void osViBlack(u8 active);
void osViSetSpecialFeatures(u32 func); void osViSetSpecialFeatures(u32 func);
void osViSwapBuffer(void *vaddr); void osViSwapBuffer(void *vaddr);
@@ -107,36 +111,7 @@ void osViSwapBuffer(void *vaddr);
#define OS_VI_PAL_HPN2 26 #define OS_VI_PAL_HPN2 26
#define OS_VI_PAL_HPF2 27 #define OS_VI_PAL_HPF2 27
#define OS_VI_MPAL_LPN1 28 /* MPAL - mainly Brazil */ #define OS_VI_MPAL_LAN1 30
#define OS_VI_MPAL_LPF1 29
#define OS_VI_MPAL_LAN1 30
#define OS_VI_MPAL_LAF1 31
#define OS_VI_MPAL_LPN2 32
#define OS_VI_MPAL_LPF2 33
#define OS_VI_MPAL_LAN2 34
#define OS_VI_MPAL_LAF2 35
#define OS_VI_MPAL_HPN1 36
#define OS_VI_MPAL_HPF1 37
#define OS_VI_MPAL_HAN1 38
#define OS_VI_MPAL_HAF1 39
#define OS_VI_MPAL_HPN2 40
#define OS_VI_MPAL_HPF2 41
#define OS_VI_FPAL_LPN1 42 /* FPAL - Full screen PAL */
#define OS_VI_FPAL_LPF1 43
#define OS_VI_FPAL_LAN1 44
#define OS_VI_FPAL_LAF1 45
#define OS_VI_FPAL_LPN2 46
#define OS_VI_FPAL_LPF2 47
#define OS_VI_FPAL_LAN2 48
#define OS_VI_FPAL_LAF2 49
#define OS_VI_FPAL_HPN1 50
#define OS_VI_FPAL_HPF1 51
#define OS_VI_FPAL_HAN1 52
#define OS_VI_FPAL_HAF1 53
#define OS_VI_FPAL_HPN2 54
#define OS_VI_FPAL_HPF2 55
extern OSViMode osViModeTable[]; /* Global VI mode table */ extern OSViMode osViModeTable[]; /* Global VI mode table */
+881
View File
@@ -0,0 +1,881 @@
#ifndef _RCP_H_
#define _RCP_H_
/**************************************************************************
* *
* Copyright (C) 1995, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/**************************************************************************
*
* File: rcp.h
*
* This file contains register and bit definitions for RCP memory map.
* $Revision: 1.20 $
* $Date: 1997/07/23 08:35:21 $
* $Source: /disk6/Master/cvsmdev2/PR/include/rcp.h,v $
*
**************************************************************************/
#include <PR/R4300.h>
#include <PR/ultratypes.h>
/**********************************************************************
*
* Here is a quick overview of the RCP memory map:
*
0x0000_0000 .. 0x03ef_ffff RDRAM memory
0x03f0_0000 .. 0x03ff_ffff RDRAM registers
RCP registers (see below)
0x0400_0000 .. 0x040f_ffff SP registers
0x0410_0000 .. 0x041f_ffff DP command registers
0x0420_0000 .. 0x042f_ffff DP span registers
0x0430_0000 .. 0x043f_ffff MI registers
0x0440_0000 .. 0x044f_ffff VI registers
0x0450_0000 .. 0x045f_ffff AI registers
0x0460_0000 .. 0x046f_ffff PI registers
0x0470_0000 .. 0x047f_ffff RI registers
0x0480_0000 .. 0x048f_ffff SI registers
0x0490_0000 .. 0x04ff_ffff unused
0x0500_0000 .. 0x05ff_ffff cartridge domain 2
0x0600_0000 .. 0x07ff_ffff cartridge domain 1
0x0800_0000 .. 0x0fff_ffff cartridge domain 2
0x1000_0000 .. 0x1fbf_ffff cartridge domain 1
0x1fc0_0000 .. 0x1fc0_07bf PIF Boot Rom (1984 bytes)
0x1fc0_07c0 .. 0x1fc0_07ff PIF (JoyChannel) RAM (64 bytes)
0x1fc0_0800 .. 0x1fcf_ffff Reserved
0x1fd0_0000 .. 0x7fff_ffff cartridge domain 1
0x8000_0000 .. 0xffff_ffff external SysAD device
The Indy development board use cartridge domain 1:
0x1000_0000 .. 0x10ff_ffff RAMROM
0x1800_0000 .. 0x1800_0003 GIO interrupt (6 bits valid in 4 bytes)
0x1800_0400 .. 0x1800_0403 GIO sync (6 bits valid in 4 bytes)
0x1800_0800 .. 0x1800_0803 CART interrupt (6 bits valid in 4 bytes)
**************************************************************************/
/*************************************************************************
* RDRAM Memory (Assumes that maximum size is 4 MB)
*/
#define RDRAM_0_START 0x00000000
#define RDRAM_0_END 0x001FFFFF
#define RDRAM_1_START 0x00200000
#define RDRAM_1_END 0x003FFFFF
#define RDRAM_START RDRAM_0_START
#define RDRAM_END RDRAM_1_END
/*************************************************************************
* Address predicates
*/
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
#define IS_RDRAM(x) ((unsigned)(x) >= RDRAM_START && \
(unsigned)(x) < RDRAM_END)
#endif
/*************************************************************************
* RDRAM Registers (0x03f0_0000 .. 0x03ff_ffff)
*/
#define RDRAM_BASE_REG 0x03F00000
#define RDRAM_CONFIG_REG (RDRAM_BASE_REG+0x00)
#define RDRAM_DEVICE_TYPE_REG (RDRAM_BASE_REG+0x00)
#define RDRAM_DEVICE_ID_REG (RDRAM_BASE_REG+0x04)
#define RDRAM_DELAY_REG (RDRAM_BASE_REG+0x08)
#define RDRAM_MODE_REG (RDRAM_BASE_REG+0x0c)
#define RDRAM_REF_INTERVAL_REG (RDRAM_BASE_REG+0x10)
#define RDRAM_REF_ROW_REG (RDRAM_BASE_REG+0x14)
#define RDRAM_RAS_INTERVAL_REG (RDRAM_BASE_REG+0x18)
#define RDRAM_MIN_INTERVAL_REG (RDRAM_BASE_REG+0x1c)
#define RDRAM_ADDR_SELECT_REG (RDRAM_BASE_REG+0x20)
#define RDRAM_DEVICE_MANUF_REG (RDRAM_BASE_REG+0x24)
#define RDRAM_0_DEVICE_ID 0
#define RDRAM_1_DEVICE_ID 1
#define RDRAM_RESET_MODE 0
#define RDRAM_ACTIVE_MODE 1
#define RDRAM_STANDBY_MODE 2
#define RDRAM_LENGTH (2*512*2048)
#define RDRAM_0_BASE_ADDRESS (RDRAM_0_DEVICE_ID*RDRAM_LENGTH)
#define RDRAM_1_BASE_ADDRESS (RDRAM_1_DEVICE_ID*RDRAM_LENGTH)
#define RDRAM_0_CONFIG 0x00000
#define RDRAM_1_CONFIG 0x00400
#define RDRAM_GLOBAL_CONFIG 0x80000
/*************************************************************************
* PIF Physical memory map (total size = 2 KB)
*
* Size Description Mode
* 1FC007FF +-------+-----------------+-----+
* | 64 B | JoyChannel RAM | R/W |
* 1FC007C0 +-------+-----------------+-----+
* |1984 B | Boot ROM | * | * = Reserved
* 1FC00000 +-------+-----------------+-----+
*
*/
#define PIF_ROM_START 0x1FC00000
#define PIF_ROM_END 0x1FC007BF
#define PIF_RAM_START 0x1FC007C0
#define PIF_RAM_END 0x1FC007FF
/*************************************************************************
* Controller channel
* Each game controller channel has 4 error bits that are defined in bit 6-7 of
* the Rx and Tx data size area bytes. Programmers need to clear these bits
* when setting the Tx/Rx size area values for a channel
*/
#define CHNL_ERR_NORESP 0x80 /* Bit 7 (Rx): No response error */
#define CHNL_ERR_OVERRUN 0x40 /* Bit 6 (Rx): Overrun error */
#define CHNL_ERR_FRAME 0x80 /* Bit 7 (Tx): Frame error */
#define CHNL_ERR_COLLISION 0x40 /* Bit 6 (Tx): Collision error */
#define CHNL_ERR_MASK 0xC0 /* Bit 6-7: channel errors */
/*************************************************************************
* External device info
*/
#define DEVICE_TYPE_CART 0 /* ROM cartridge */
#define DEVICE_TYPE_BULK 1 /* ROM bulk */
#define DEVICE_TYPE_64DD 2 /* 64 Disk Drive */
#define DEVICE_TYPE_SRAM 3 /* SRAM */
/*************************************************************************
* SP Memory
*/
#define SP_DMEM_START 0x04000000 /* read/write */
#define SP_DMEM_END 0x04000FFF
#define SP_IMEM_START 0x04001000 /* read/write */
#define SP_IMEM_END 0x04001FFF
/*************************************************************************
* SP CP0 Registers
*/
#define SP_BASE_REG 0x04040000
/* SP memory address (R/W): [11:0] DMEM/IMEM address; [12] 0=DMEM,1=IMEM */
#define SP_MEM_ADDR_REG (SP_BASE_REG+0x00) /* Master */
/* SP DRAM DMA address (R/W): [23:0] RDRAM address */
#define SP_DRAM_ADDR_REG (SP_BASE_REG+0x04) /* Slave */
/* SP read DMA length (R/W): [11:0] length, [19:12] count, [31:20] skip */
/* direction: I/DMEM <- RDRAM */
#define SP_RD_LEN_REG (SP_BASE_REG+0x08) /* R/W: read len */
/* SP write DMA length (R/W): [11:0] length, [19:12] count, [31:20] skip */
/* direction: I/DMEM -> RDRAM */
#define SP_WR_LEN_REG (SP_BASE_REG+0x0C) /* R/W: write len */
/* SP status (R/W): [14:0] valid bits; see below for write/read mode */
#define SP_STATUS_REG (SP_BASE_REG+0x10)
/* SP DMA full (R): [0] valid bit; dma full */
#define SP_DMA_FULL_REG (SP_BASE_REG+0x14)
/* SP DMA busy (R): [0] valid bit; dma busy */
#define SP_DMA_BUSY_REG (SP_BASE_REG+0x18)
/* SP semaphore (R/W): Read: [0] semaphore flag (set on read) */
/* Write: [] clear semaphore flag */
#define SP_SEMAPHORE_REG (SP_BASE_REG+0x1C)
/* SP PC (R/W): [11:0] program counter */
#define SP_PC_REG 0x04080000
/* SP MEM address: bit 12 specifies if address is IMEM or DMEM */
#define SP_DMA_DMEM 0x0000 /* Bit 12: 0=DMEM, 1=IMEM */
#define SP_DMA_IMEM 0x1000 /* Bit 12: 0=DMEM, 1=IMEM */
/*
* Values to clear/set bit in status reg (SP_STATUS_REG - write)
*/
#define SP_CLR_HALT 0x00001 /* Bit 0: clear halt */
#define SP_SET_HALT 0x00002 /* Bit 1: set halt */
#define SP_CLR_BROKE 0x00004 /* Bit 2: clear broke */
#define SP_CLR_INTR 0x00008 /* Bit 3: clear intr */
#define SP_SET_INTR 0x00010 /* Bit 4: set intr */
#define SP_CLR_SSTEP 0x00020 /* Bit 5: clear sstep */
#define SP_SET_SSTEP 0x00040 /* Bit 6: set sstep */
#define SP_CLR_INTR_BREAK 0x00080 /* Bit 7: clear intr on break */
#define SP_SET_INTR_BREAK 0x00100 /* Bit 8: set intr on break */
#define SP_CLR_SIG0 0x00200 /* Bit 9: clear signal 0 */
#define SP_SET_SIG0 0x00400 /* Bit 10: set signal 0 */
#define SP_CLR_SIG1 0x00800 /* Bit 11: clear signal 1 */
#define SP_SET_SIG1 0x01000 /* Bit 12: set signal 1 */
#define SP_CLR_SIG2 0x02000 /* Bit 13: clear signal 2 */
#define SP_SET_SIG2 0x04000 /* Bit 14: set signal 2 */
#define SP_CLR_SIG3 0x08000 /* Bit 15: clear signal 3 */
#define SP_SET_SIG3 0x10000 /* Bit 16: set signal 3 */
#define SP_CLR_SIG4 0x20000 /* Bit 17: clear signal 4 */
#define SP_SET_SIG4 0x40000 /* Bit 18: set signal 4 */
#define SP_CLR_SIG5 0x80000 /* Bit 19: clear signal 5 */
#define SP_SET_SIG5 0x100000 /* Bit 20: set signal 5 */
#define SP_CLR_SIG6 0x200000 /* Bit 21: clear signal 6 */
#define SP_SET_SIG6 0x400000 /* Bit 22: set signal 6 */
#define SP_CLR_SIG7 0x800000 /* Bit 23: clear signal 7 */
#define SP_SET_SIG7 0x1000000 /* Bit 24: set signal 7 */
/*
* Patterns to interpret status reg (SP_STATUS_REG - read)
*/
#define SP_STATUS_HALT 0x001 /* Bit 0: halt */
#define SP_STATUS_BROKE 0x002 /* Bit 1: broke */
#define SP_STATUS_DMA_BUSY 0x004 /* Bit 2: dma busy */
#define SP_STATUS_DMA_FULL 0x008 /* Bit 3: dma full */
#define SP_STATUS_IO_FULL 0x010 /* Bit 4: io full */
#define SP_STATUS_SSTEP 0x020 /* Bit 5: single step */
#define SP_STATUS_INTR_BREAK 0x040 /* Bit 6: interrupt on break */
#define SP_STATUS_SIG0 0x080 /* Bit 7: signal 0 set */
#define SP_STATUS_SIG1 0x100 /* Bit 8: signal 1 set */
#define SP_STATUS_SIG2 0x200 /* Bit 9: signal 2 set */
#define SP_STATUS_SIG3 0x400 /* Bit 10: signal 3 set */
#define SP_STATUS_SIG4 0x800 /* Bit 11: signal 4 set */
#define SP_STATUS_SIG5 0x1000 /* Bit 12: signal 5 set */
#define SP_STATUS_SIG6 0x2000 /* Bit 13: signal 6 set */
#define SP_STATUS_SIG7 0x4000 /* Bit 14: signal 7 set */
/*
* Use of SIG bits
*/
#define SP_CLR_YIELD SP_CLR_SIG0
#define SP_SET_YIELD SP_SET_SIG0
#define SP_STATUS_YIELD SP_STATUS_SIG0
#define SP_CLR_YIELDED SP_CLR_SIG1
#define SP_SET_YIELDED SP_SET_SIG1
#define SP_STATUS_YIELDED SP_STATUS_SIG1
#define SP_CLR_TASKDONE SP_CLR_SIG2
#define SP_SET_TASKDONE SP_SET_SIG2
#define SP_STATUS_TASKDONE SP_STATUS_SIG2
#define SP_CLR_RSPSIGNAL SP_CLR_SIG3
#define SP_SET_RSPSIGNAL SP_SET_SIG3
#define SP_STATUS_RSPSIGNAL SP_STATUS_SIG3
#define SP_CLR_CPUSIGNAL SP_CLR_SIG4
#define SP_SET_CPUSIGNAL SP_SET_SIG4
#define SP_STATUS_CPUSIGNAL SP_STATUS_SIG4
/* SP IMEM BIST REG (R/W): [6:0] BIST status bits; see below for detail */
#define SP_IBIST_REG 0x04080004
/*
* Patterns to interpret status reg (SP_BIST_REG - write)
*/
#define SP_IBIST_CHECK 0x01 /* Bit 0: BIST check */
#define SP_IBIST_GO 0x02 /* Bit 1: BIST go */
#define SP_IBIST_CLEAR 0x04 /* Bit 2: BIST clear */
/*
* Patterns to interpret status reg (SP_BIST_REG - read)
*/
/* First 2 bits are same as in write mode:
* Bit 0: BIST check; Bit 1: BIST go
*/
#define SP_IBIST_DONE 0x04 /* Bit 2: BIST done */
#define SP_IBIST_FAILED 0x78 /* Bit [6:3]: BIST fail */
/*************************************************************************
* DP Command Registers
*/
#define DPC_BASE_REG 0x04100000
/* DP CMD DMA start (R/W): [23:0] DMEM/RDRAM start address */
#define DPC_START_REG (DPC_BASE_REG+0x00)
/* DP CMD DMA end (R/W): [23:0] DMEM/RDRAM end address */
#define DPC_END_REG (DPC_BASE_REG+0x04)
/* DP CMD DMA end (R): [23:0] DMEM/RDRAM current address */
#define DPC_CURRENT_REG (DPC_BASE_REG+0x08)
/* DP CMD status (R/W): [9:0] valid bits - see below for definitions */
#define DPC_STATUS_REG (DPC_BASE_REG+0x0C)
/* DP clock counter (R): [23:0] clock counter */
#define DPC_CLOCK_REG (DPC_BASE_REG+0x10)
/* DP buffer busy counter (R): [23:0] clock counter */
#define DPC_BUFBUSY_REG (DPC_BASE_REG+0x14)
/* DP pipe busy counter (R): [23:0] clock counter */
#define DPC_PIPEBUSY_REG (DPC_BASE_REG+0x18)
/* DP TMEM load counter (R): [23:0] clock counter */
#define DPC_TMEM_REG (DPC_BASE_REG+0x1C)
/*
* Values to clear/set bit in status reg (DPC_STATUS_REG - write)
*/
#define DPC_CLR_XBUS_DMEM_DMA 0x0001 /* Bit 0: clear xbus_dmem_dma */
#define DPC_SET_XBUS_DMEM_DMA 0x0002 /* Bit 1: set xbus_dmem_dma */
#define DPC_CLR_FREEZE 0x0004 /* Bit 2: clear freeze */
#define DPC_SET_FREEZE 0x0008 /* Bit 3: set freeze */
#define DPC_CLR_FLUSH 0x0010 /* Bit 4: clear flush */
#define DPC_SET_FLUSH 0x0020 /* Bit 5: set flush */
#define DPC_CLR_TMEM_CTR 0x0040 /* Bit 6: clear tmem ctr */
#define DPC_CLR_PIPE_CTR 0x0080 /* Bit 7: clear pipe ctr */
#define DPC_CLR_CMD_CTR 0x0100 /* Bit 8: clear cmd ctr */
#define DPC_CLR_CLOCK_CTR 0x0200 /* Bit 9: clear clock ctr */
/*
* Patterns to interpret status reg (DPC_STATUS_REG - read)
*/
#define DPC_STATUS_XBUS_DMEM_DMA 0x001 /* Bit 0: xbus_dmem_dma */
#define DPC_STATUS_FREEZE 0x002 /* Bit 1: freeze */
#define DPC_STATUS_FLUSH 0x004 /* Bit 2: flush */
/*#define DPC_STATUS_FROZEN 0x008*/ /* Bit 3: frozen */
#define DPC_STATUS_START_GCLK 0x008 /* Bit 3: start gclk */
#define DPC_STATUS_TMEM_BUSY 0x010 /* Bit 4: tmem busy */
#define DPC_STATUS_PIPE_BUSY 0x020 /* Bit 5: pipe busy */
#define DPC_STATUS_CMD_BUSY 0x040 /* Bit 6: cmd busy */
#define DPC_STATUS_CBUF_READY 0x080 /* Bit 7: cbuf ready */
#define DPC_STATUS_DMA_BUSY 0x100 /* Bit 8: dma busy */
#define DPC_STATUS_END_VALID 0x200 /* Bit 9: end valid */
#define DPC_STATUS_START_VALID 0x400 /* Bit 10: start valid */
/*************************************************************************
* DP Span Registers
*/
#define DPS_BASE_REG 0x04200000
/* DP tmem bist (R/W): [10:0] BIST status bits; see below for detail */
#define DPS_TBIST_REG (DPS_BASE_REG+0x00)
/* DP span test mode (R/W): [0] Span buffer test access enable */
#define DPS_TEST_MODE_REG (DPS_BASE_REG+0x04)
/* DP span buffer test address (R/W): [6:0] bits; see below for detail */
#define DPS_BUFTEST_ADDR_REG (DPS_BASE_REG+0x08)
/* DP span buffer test data (R/W): [31:0] span buffer data */
#define DPS_BUFTEST_DATA_REG (DPS_BASE_REG+0x0C)
/*
* Patterns to interpret status reg (DPS_TMEM_BIST_REG - write)
*/
#define DPS_TBIST_CHECK 0x01 /* Bit 0: BIST check */
#define DPS_TBIST_GO 0x02 /* Bit 1: BIST go */
#define DPS_TBIST_CLEAR 0x04 /* Bit 2: BIST clear */
/*
* Patterns to interpret status reg (DPS_TMEM_BIST_REG - read)
*/
/* First 2 bits are same as in write mode:
* Bit 0: BIST check; Bit 1: BIST go
*/
#define DPS_TBIST_DONE 0x004 /* Bit 2: BIST done */
#define DPS_TBIST_FAILED 0x7F8 /* Bit [10:3]: BIST fail */
/*************************************************************************
* MIPS Interface (MI) Registers
*/
#define MI_BASE_REG 0x04300000
/*
* MI init mode (W): [6:0] init length, [7] clear init mode, [8] set init mode
* [9/10] clear/set ebus test mode, [11] clear DP interrupt
* (R): [6:0] init length, [7] init mode, [8] ebus test mode
*/
#define MI_INIT_MODE_REG (MI_BASE_REG+0x00)
#define MI_MODE_REG MI_INIT_MODE_REG
/*
* Values to clear/set bit in mode reg (MI_MODE_REG - write)
*/
#define MI_CLR_INIT 0x0080 /* Bit 7: clear init mode */
#define MI_SET_INIT 0x0100 /* Bit 8: set init mode */
#define MI_CLR_EBUS 0x0200 /* Bit 9: clear ebus test */
#define MI_SET_EBUS 0x0400 /* Bit 10: set ebus test mode */
#define MI_CLR_DP_INTR 0x0800 /* Bit 11: clear dp interrupt */
#define MI_CLR_RDRAM 0x1000 /* Bit 12: clear RDRAM reg */
#define MI_SET_RDRAM 0x2000 /* Bit 13: set RDRAM reg mode */
/*
* Patterns to interpret mode reg (MI_MODE_REG - read)
*/
#define MI_MODE_INIT 0x0080 /* Bit 7: init mode */
#define MI_MODE_EBUS 0x0100 /* Bit 8: ebus test mode */
#define MI_MODE_RDRAM 0x0200 /* Bit 9: RDRAM reg mode */
/* MI version (R): [7:0] io, [15:8] rac, [23:16] rdp, [31:24] rsp */
#define MI_VERSION_REG (MI_BASE_REG+0x04)
#define MI_NOOP_REG MI_VERSION_REG
/* MI interrupt (R): [5:0] valid bits - see below for bit patterns */
#define MI_INTR_REG (MI_BASE_REG+0x08)
/*
* MI interrupt mask (W): [11:0] valid bits - see below for bit patterns
* (R): [5:0] valid bits - see below for bit patterns
*/
#define MI_INTR_MASK_REG (MI_BASE_REG+0x0C)
/*
* The following are values to check for interrupt setting (MI_INTR_REG)
*/
#define MI_INTR_SP 0x01 /* Bit 0: SP intr */
#define MI_INTR_SI 0x02 /* Bit 1: SI intr */
#define MI_INTR_AI 0x04 /* Bit 2: AI intr */
#define MI_INTR_VI 0x08 /* Bit 3: VI intr */
#define MI_INTR_PI 0x10 /* Bit 4: PI intr */
#define MI_INTR_DP 0x20 /* Bit 5: DP intr */
/*
* The following are values to clear/set various interrupt bit mask
* They can be ORed together to manipulate multiple bits
* (MI_INTR_MASK_REG - write)
*/
#define MI_INTR_MASK_CLR_SP 0x0001 /* Bit 0: clear SP mask */
#define MI_INTR_MASK_SET_SP 0x0002 /* Bit 1: set SP mask */
#define MI_INTR_MASK_CLR_SI 0x0004 /* Bit 2: clear SI mask */
#define MI_INTR_MASK_SET_SI 0x0008 /* Bit 3: set SI mask */
#define MI_INTR_MASK_CLR_AI 0x0010 /* Bit 4: clear AI mask */
#define MI_INTR_MASK_SET_AI 0x0020 /* Bit 5: set AI mask */
#define MI_INTR_MASK_CLR_VI 0x0040 /* Bit 6: clear VI mask */
#define MI_INTR_MASK_SET_VI 0x0080 /* Bit 7: set VI mask */
#define MI_INTR_MASK_CLR_PI 0x0100 /* Bit 8: clear PI mask */
#define MI_INTR_MASK_SET_PI 0x0200 /* Bit 9: set PI mask */
#define MI_INTR_MASK_CLR_DP 0x0400 /* Bit 10: clear DP mask */
#define MI_INTR_MASK_SET_DP 0x0800 /* Bit 11: set DP mask */
/*
* The following are values to check for interrupt mask setting
* (MI_INTR_MASK_REG - read)
*/
#define MI_INTR_MASK_SP 0x01 /* Bit 0: SP intr mask */
#define MI_INTR_MASK_SI 0x02 /* Bit 1: SI intr mask */
#define MI_INTR_MASK_AI 0x04 /* Bit 2: AI intr mask */
#define MI_INTR_MASK_VI 0x08 /* Bit 3: VI intr mask */
#define MI_INTR_MASK_PI 0x10 /* Bit 4: PI intr mask */
#define MI_INTR_MASK_DP 0x20 /* Bit 5: DP intr mask */
/*************************************************************************
* Video Interface (VI) Registers
*/
#define VI_BASE_REG 0x04400000
/* VI status/control (R/W): [15-0] valid bits:
* [1:0] = type[1:0] (pixel size)
* 0: blank (no data, no sync)
* 1: reserved
* 2: 5/5/5/3 ("16" bit)
* 3: 8/8/8/8 (32 bit)
* [2] = gamma_dither_enable (normally on, unless "special effect")
* [3] = gamma_enable (normally on, unless MPEG/JPEG)
* [4] = divot_enable (normally on if antialiased, unless decal lines)
* [5] = reserved - always off
* [6] = serrate (always on if interlaced, off if not)
* [7] = reserved - diagnostics only
* [9:8] = anti-alias (aa) mode[1:0]
* 0: aa & resamp (always fetch extra lines)
* 1: aa & resamp (fetch extra lines if needed)
* 2: resamp only (treat as all fully covered)
* 3: neither (replicate pixels, no interpolate)
* [11] = reserved - diagnostics only
* [15:12] = reserved
*
*/
#define VI_STATUS_REG (VI_BASE_REG+0x00)
#define VI_CONTROL_REG VI_STATUS_REG
/* VI origin (R/W): [23:0] frame buffer origin in bytes */
#define VI_ORIGIN_REG (VI_BASE_REG+0x04)
#define VI_DRAM_ADDR_REG VI_ORIGIN_REG
/* VI width (R/W): [11:0] frame buffer line width in pixels */
#define VI_WIDTH_REG (VI_BASE_REG+0x08)
#define VI_H_WIDTH_REG VI_WIDTH_REG
/* VI vertical intr (R/W): [9:0] interrupt when current half-line = V_INTR */
#define VI_INTR_REG (VI_BASE_REG+0x0C)
#define VI_V_INTR_REG VI_INTR_REG
/*
* VI current vertical line (R/W): [9:0] current half line, sampled once per
* line (the lsb of V_CURRENT is constant within a field, and in
* interlaced modes gives the field number - which is constant for non-
* interlaced modes)
* - Any write to this register will clear interrupt line
*/
#define VI_CURRENT_REG (VI_BASE_REG+0x10)
#define VI_V_CURRENT_LINE_REG VI_CURRENT_REG
/*
* VI video timing (R/W): [ 7: 0] horizontal sync width in pixels,
* [15: 8] color burst width in pixels,
* [19:16] vertical sync width in half lines,
* [29:20] start of color burst in pixels from h-sync
*/
#define VI_BURST_REG (VI_BASE_REG+0x14)
#define VI_TIMING_REG VI_BURST_REG
/* VI vertical sync (R/W): [9:0] number of half-lines per field */
#define VI_V_SYNC_REG (VI_BASE_REG+0x18)
/* VI horizontal sync (R/W): [11: 0] total duration of a line in 1/4 pixel
* [20:16] a 5-bit leap pattern used for PAL only
* (h_sync_period)
*/
#define VI_H_SYNC_REG (VI_BASE_REG+0x1C)
/*
* VI horizontal sync leap (R/W): [11: 0] identical to h_sync_period
* [27:16] identical to h_sync_period
*/
#define VI_LEAP_REG (VI_BASE_REG+0x20)
#define VI_H_SYNC_LEAP_REG VI_LEAP_REG
/*
* VI horizontal video (R/W): [ 9: 0] end of active video in screen pixels
* : [25:16] start of active video in screen pixels
*/
#define VI_H_START_REG (VI_BASE_REG+0x24)
#define VI_H_VIDEO_REG VI_H_START_REG
/*
* VI vertical video (R/W): [ 9: 0] end of active video in screen half-lines
* : [25:16] start of active video in screen half-lines
*/
#define VI_V_START_REG (VI_BASE_REG+0x28)
#define VI_V_VIDEO_REG VI_V_START_REG
/*
* VI vertical burst (R/W): [ 9: 0] end of color burst enable in half-lines
* : [25:16] start of color burst enable in half-lines
*/
#define VI_V_BURST_REG (VI_BASE_REG+0x2C)
/* VI x-scale (R/W): [11: 0] 1/horizontal scale up factor (2.10 format)
* [27:16] horizontal subpixel offset (2.10 format)
*/
#define VI_X_SCALE_REG (VI_BASE_REG+0x30)
/* VI y-scale (R/W): [11: 0] 1/vertical scale up factor (2.10 format)
* [27:16] vertical subpixel offset (2.10 format)
*/
#define VI_Y_SCALE_REG (VI_BASE_REG+0x34)
/*
* Patterns to interpret VI_CONTROL_REG
*/
#define VI_CTRL_TYPE_16 0x00002 /* Bit [1:0] pixel size: 16 bit */
#define VI_CTRL_TYPE_32 0x00003 /* Bit [1:0] pixel size: 32 bit */
#define VI_CTRL_GAMMA_DITHER_ON 0x00004 /* Bit 2: default = on */
#define VI_CTRL_GAMMA_ON 0x00008 /* Bit 3: default = on */
#define VI_CTRL_DIVOT_ON 0x00010 /* Bit 4: default = on */
#define VI_CTRL_SERRATE_ON 0x00040 /* Bit 6: on if interlaced */
#define VI_CTRL_ANTIALIAS_MASK 0x00300 /* Bit [9:8] anti-alias mode */
#define VI_CTRL_DITHER_FILTER_ON 0x10000 /* Bit 16: dither-filter mode */
/*
* Possible video clocks (NTSC or PAL)
*/
#define VI_NTSC_CLOCK 48681812 /* Hz = 48.681812 MHz */
#define VI_PAL_CLOCK 49656530 /* Hz = 49.656530 MHz */
#define VI_MPAL_CLOCK 48628316 /* Hz = 48.628316 MHz */
/*************************************************************************
* Audio Interface (AI) Registers
*
* The address and length registers are double buffered; that is, they
* can be written twice before becoming full.
* The address must be written before the length.
*/
#define AI_BASE_REG 0x04500000
/* AI DRAM address (W): [23:0] starting RDRAM address (8B-aligned) */
#define AI_DRAM_ADDR_REG (AI_BASE_REG+0x00) /* R0: DRAM address */
/* AI length (R/W): [14:0] transfer length (v1.0) - Bottom 3 bits are ignored */
/* [17:0] transfer length (v2.0) - Bottom 3 bits are ignored */
#define AI_LEN_REG (AI_BASE_REG+0x04) /* R1: Length */
/* AI control (W): [0] DMA enable - if LSB == 1, DMA is enabled */
#define AI_CONTROL_REG (AI_BASE_REG+0x08) /* R2: DMA Control */
/*
* AI status (R): [31]/[0] ai_full (addr & len buffer full), [30] ai_busy
* Note that a 1->0 transition in ai_full will set interrupt
* (W): clear audio interrupt
*/
#define AI_STATUS_REG (AI_BASE_REG+0x0C) /* R3: Status */
/*
* AI DAC sample period register (W): [13:0] dac rate
* - vid_clock/(dperiod + 1) is the DAC sample rate
* - (dperiod + 1) >= 66 * (aclockhp + 1) must be true
*/
#define AI_DACRATE_REG (AI_BASE_REG+0x10) /* R4: DAC rate 14-lsb*/
/*
* AI bit rate (W): [3:0] bit rate (abus clock half period register - aclockhp)
* - vid_clock/(2 * (aclockhp + 1)) is the DAC clock rate
* - The abus clock stops if aclockhp is zero
*/
#define AI_BITRATE_REG (AI_BASE_REG+0x14) /* R5: Bit rate 4-lsb */
/* Value for control register */
#define AI_CONTROL_DMA_ON 0x01 /* LSB = 1: DMA enable*/
#define AI_CONTROL_DMA_OFF 0x00 /* LSB = 1: DMA enable*/
/* Value for status register */
#define AI_STATUS_FIFO_FULL 0x80000000 /* Bit 31: full */
#define AI_STATUS_DMA_BUSY 0x40000000 /* Bit 30: busy */
/* DAC rate = video clock / audio frequency
* - DAC rate >= (66 * Bit rate) must be true
*/
#define AI_MAX_DAC_RATE 16384 /* 14-bit+1 */
#define AI_MIN_DAC_RATE 132
/* Bit rate <= (DAC rate / 66) */
#define AI_MAX_BIT_RATE 16 /* 4-bit+1 */
#define AI_MIN_BIT_RATE 2
/*
* Maximum and minimum values for audio frequency based on video clocks
* max frequency = (video clock / min dac rate)
* min frequency = (video clock / max dac rate)
*/
#define AI_NTSC_MAX_FREQ 368000 /* 368 KHz */
#define AI_NTSC_MIN_FREQ 3000 /* 3 KHz ~ 2971 Hz */
#define AI_PAL_MAX_FREQ 376000 /* 376 KHz */
#define AI_PAL_MIN_FREQ 3050 /* 3 KHz ~ 3031 Hz */
#define AI_MPAL_MAX_FREQ 368000 /* 368 KHz */
#define AI_MPAL_MIN_FREQ 3000 /* 3 KHz ~ 2968 Hz */
/*************************************************************************
* Peripheral Interface (PI) Registers
*/
#define PI_BASE_REG 0x04600000
/* PI DRAM address (R/W): [23:0] starting RDRAM address */
#define PI_DRAM_ADDR_REG (PI_BASE_REG+0x00) /* DRAM address */
/* PI pbus (cartridge) address (R/W): [31:0] starting AD16 address */
#define PI_CART_ADDR_REG (PI_BASE_REG+0x04)
/* PI read length (R/W): [23:0] read data length */
#define PI_RD_LEN_REG (PI_BASE_REG+0x08)
/* PI write length (R/W): [23:0] write data length */
#define PI_WR_LEN_REG (PI_BASE_REG+0x0C)
/*
* PI status (R): [0] DMA busy, [1] IO busy, [2], error
* (W): [0] reset controller (and abort current op), [1] clear intr
*/
#define PI_STATUS_REG (PI_BASE_REG+0x10)
/* PI dom1 latency (R/W): [7:0] domain 1 device latency */
#define PI_BSD_DOM1_LAT_REG (PI_BASE_REG+0x14)
/* PI dom1 pulse width (R/W): [7:0] domain 1 device R/W strobe pulse width */
#define PI_BSD_DOM1_PWD_REG (PI_BASE_REG+0x18)
/* PI dom1 page size (R/W): [3:0] domain 1 device page size */
#define PI_BSD_DOM1_PGS_REG (PI_BASE_REG+0x1C) /* page size */
/* PI dom1 release (R/W): [1:0] domain 1 device R/W release duration */
#define PI_BSD_DOM1_RLS_REG (PI_BASE_REG+0x20)
/* PI dom2 latency (R/W): [7:0] domain 2 device latency */
#define PI_BSD_DOM2_LAT_REG (PI_BASE_REG+0x24) /* Domain 2 latency */
/* PI dom2 pulse width (R/W): [7:0] domain 2 device R/W strobe pulse width */
#define PI_BSD_DOM2_PWD_REG (PI_BASE_REG+0x28) /* pulse width */
/* PI dom2 page size (R/W): [3:0] domain 2 device page size */
#define PI_BSD_DOM2_PGS_REG (PI_BASE_REG+0x2C) /* page size */
/* PI dom2 release (R/W): [1:0] domain 2 device R/W release duration */
#define PI_BSD_DOM2_RLS_REG (PI_BASE_REG+0x30) /* release duration */
#define PI_DOMAIN1_REG PI_BSD_DOM1_LAT_REG
#define PI_DOMAIN2_REG PI_BSD_DOM2_LAT_REG
#define PI_DOM_LAT_OFS 0x00
#define PI_DOM_PWD_OFS 0x04
#define PI_DOM_PGS_OFS 0x08
#define PI_DOM_RLS_OFS 0x0C
/*
* PI status register has 3 bits active when read from (PI_STATUS_REG - read)
* Bit 0: DMA busy - set when DMA is in progress
* Bit 1: IO busy - set when IO is in progress
* Bit 2: Error - set when CPU issues IO request while DMA is busy
*/
#define PI_STATUS_ERROR 0x04
#define PI_STATUS_IO_BUSY 0x02
#define PI_STATUS_DMA_BUSY 0x01
/* PI status register has 2 bits active when written to:
* Bit 0: When set, reset PIC
* Bit 1: When set, clear interrupt flag
* The values of the two bits can be ORed together to both reset PIC and
* clear interrupt at the same time.
*
* Note:
* - The PIC does generate an interrupt at the end of each DMA. CPU
* needs to clear the interrupt flag explicitly (from an interrupt
* handler) by writing into the STATUS register with bit 1 set.
*
* - When a DMA completes, the interrupt flag is set. CPU can issue
* another request even while the interrupt flag is set (as long as
* PIC is idle). However, it is the CPU's responsibility for
* maintaining accurate correspondence between DMA completions and
* interrupts.
*
* - When PIC is reset, if PIC happens to be busy, an interrupt will
* be generated as PIC returns to idle. Otherwise, no interrupt will
* be generated and PIC remains idle.
*/
/*
* Values to clear interrupt/reset PIC (PI_STATUS_REG - write)
*/
#define PI_STATUS_RESET 0x01
#define PI_SET_RESET PI_STATUS_RESET
#define PI_STATUS_CLR_INTR 0x02
#define PI_CLR_INTR PI_STATUS_CLR_INTR
#define PI_DMA_BUFFER_SIZE 128
#define PI_DOM1_ADDR1 0x06000000 /* to 0x07FFFFFF */
#define PI_DOM1_ADDR2 0x10000000 /* to 0x1FBFFFFF */
#define PI_DOM1_ADDR3 0x1FD00000 /* to 0x7FFFFFFF */
#define PI_DOM2_ADDR1 0x05000000 /* to 0x05FFFFFF */
#define PI_DOM2_ADDR2 0x08000000 /* to 0x0FFFFFFF */
/*************************************************************************
* RDRAM Interface (RI) Registers
*/
#define RI_BASE_REG 0x04700000
/* RI mode (R/W): [1:0] operating mode, [2] stop T active, [3] stop R active */
#define RI_MODE_REG (RI_BASE_REG+0x00)
/* RI config (R/W): [5:0] current control input, [6] current control enable */
#define RI_CONFIG_REG (RI_BASE_REG+0x04)
/* RI current load (W): [] any write updates current control register */
#define RI_CURRENT_LOAD_REG (RI_BASE_REG+0x08)
/* RI select (R/W): [2:0] receive select, [2:0] transmit select */
#define RI_SELECT_REG (RI_BASE_REG+0x0C)
/* RI refresh (R/W): [7:0] clean refresh delay, [15:8] dirty refresh delay,
* [16] refresh bank, [17] refresh enable
* [18] refresh optimize
*/
#define RI_REFRESH_REG (RI_BASE_REG+0x10)
#define RI_COUNT_REG RI_REFRESH_REG
/* RI latency (R/W): [3:0] DMA latency/overlap */
#define RI_LATENCY_REG (RI_BASE_REG+0x14)
/* RI error (R): [0] nack error, [1] ack error */
#define RI_RERROR_REG (RI_BASE_REG+0x18)
/* RI error (W): [] any write clears all error bits */
#define RI_WERROR_REG (RI_BASE_REG+0x1C)
/*************************************************************************
* Serial Interface (SI) Registers
*/
#define SI_BASE_REG 0x04800000
/* SI DRAM address (R/W): [23:0] starting RDRAM address */
#define SI_DRAM_ADDR_REG (SI_BASE_REG+0x00) /* R0: DRAM address */
/* SI address read 64B (W): [] any write causes a 64B DMA write */
#define SI_PIF_ADDR_RD64B_REG (SI_BASE_REG+0x04) /* R1: 64B PIF->DRAM */
/* Address SI_BASE_REG + (0x08, 0x0c, 0x14) are reserved */
/* SI address write 64B (W): [] any write causes a 64B DMA read */
#define SI_PIF_ADDR_WR64B_REG (SI_BASE_REG+0x10) /* R4: 64B DRAM->PIF */
/*
* SI status (W): [] any write clears interrupt
* (R): [0] DMA busy, [1] IO read busy, [2] reserved
* [3] DMA error, [12] interrupt
*/
#define SI_STATUS_REG (SI_BASE_REG+0x18) /* R6: Status */
/* SI status register has the following bits active:
* 0: DMA busy - set when DMA is in progress
* 1: IO busy - set when IO access is in progress
* 3: DMA error - set when there are overlapping DMA requests
* 12: Interrupt - Interrupt set
*/
#define SI_STATUS_DMA_BUSY 0x0001
#define SI_STATUS_RD_BUSY 0x0002
#define SI_STATUS_DMA_ERROR 0x0008
#define SI_STATUS_INTERRUPT 0x1000
/*************************************************************************
* Development Board GIO Control Registers
*/
#define GIO_BASE_REG 0x18000000
/* Game to Host Interrupt */
#define GIO_GIO_INTR_REG (GIO_BASE_REG+0x000)
/* Game to Host SYNC */
#define GIO_GIO_SYNC_REG (GIO_BASE_REG+0x400)
/* Host to Game Interrupt */
#define GIO_CART_INTR_REG (GIO_BASE_REG+0x800)
/*************************************************************************
* Common macros
*/
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
#define IO_READ(addr) (*(vu32 *)PHYS_TO_K1(addr))
#define IO_WRITE(addr,data) (*(vu32 *)PHYS_TO_K1(addr)=(u32)(data))
#define RCP_STAT_PRINT \
rmonPrintf("current=%x start=%x end=%x dpstat=%x spstat=%x\n", \
IO_READ(DPC_CURRENT_REG), \
IO_READ(DPC_START_REG), \
IO_READ(DPC_END_REG), \
IO_READ(DPC_STATUS_REG), \
IO_READ(SP_STATUS_REG))
#endif
#endif /* _RCP_H_ */
@@ -8,7 +8,6 @@
#define M_HVQTASK 6 #define M_HVQTASK 6
#define M_HVQMTASK 7 #define M_HVQMTASK 7
//gGfxSPTaskYieldBuffer has to be changed for this too
#if (defined(F3DEX_GBI) || defined(F3DLP_GBI) || defined(F3DEX_GBI_2)) #if (defined(F3DEX_GBI) || defined(F3DLP_GBI) || defined(F3DEX_GBI_2))
#define OS_YIELD_DATA_SIZE 0xc00 #define OS_YIELD_DATA_SIZE 0xc00
#else #else
@@ -19,6 +18,9 @@
/* Flags */ /* Flags */
#define M_TASK_FLAG0 1 #define M_TASK_FLAG0 1
#define M_TASK_FLAG1 2 #define M_TASK_FLAG1 2
#ifdef VERSION_SH
#define M_TASK_FLAG2 4
#endif
/* SpStatus */ /* SpStatus */
#define SPSTATUS_CLEAR_HALT 0x00000001 #define SPSTATUS_CLEAR_HALT 0x00000001
@@ -11,13 +11,13 @@ extern u64 rspF3DBootStart[], rspF3DBootEnd[];
// F3D ucode // F3D ucode
extern u64 rspF3DStart[], rspF3DEnd[]; extern u64 rspF3DStart[], rspF3DEnd[];
// F3D data ucode // F3D ucode data
extern u64 rspF3DDataStart[], rspF3DDataEnd[]; extern u64 rspF3DDataStart[], rspF3DDataEnd[];
// F3D audio ucode // aspMain (audio) ucode
extern u64 rspF3DAudioStart[], rspF3DAudioEnd[]; extern u64 rspAspMainStart[], rspAspMainEnd[];
// F3D audio data ucode // aspMain ucode data
extern u64 rspF3DAudioDataStart[], rspF3DAudioDataEnd[]; extern u64 rspAspMainDataStart[], rspAspMainDataEnd[];
#endif #endif
@@ -29,13 +29,16 @@ typedef volatile s64 vs64;
typedef float f32; typedef float f32;
typedef double f64; typedef double f64;
typedef long int Mtx_t[4][4]; #ifdef TARGET_N64
typedef union typedef u32 size_t;
{ typedef s32 ssize_t;
Mtx_t m; typedef u32 uintptr_t;
long long int forc_structure_alignment; typedef s32 intptr_t;
} Mtx; typedef s32 ptrdiff_t;
#else
typedef unsigned long size_t; #include <stddef.h>
#include <stdint.h>
typedef ptrdiff_t ssize_t;
#endif
#endif #endif
+15
View File
@@ -0,0 +1,15 @@
#ifndef PLATFORM_INFO_H
#define PLATFORM_INFO_H
#ifdef TARGET_N64
#define IS_64_BIT 0
#define IS_BIG_ENDIAN 1
#else
#include <stdint.h>
#define IS_64_BIT (UINTPTR_MAX == 0xFFFFFFFFFFFFFFFFU)
#define IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
#endif
#define DOUBLE_SIZE_ON_64_BIT(size) ((size) * (sizeof(void *) / 4))
#endif // PLATFORM_INFO_H
+26 -22
View File
@@ -3,27 +3,31 @@
#include <math.h> #include <math.h>
#include <ultra64/types.h> #ifndef _LANGUAGE_C
#include <ultra64/interrupt.h> #define _LANGUAGE_C
#include <ultra64/os_misc.h> #endif
#include <ultra64/rdp.h>
#include <ultra64/thread.h> #include <PR/ultratypes.h>
#include <ultra64/time.h> #include <PR/os_exception.h>
#include <ultra64/message.h> #include <PR/os_misc.h>
#include <ultra64/os_cont.h> #include <PR/os_rdp.h>
#include <ultra64/tlb.h> #include <PR/os_thread.h>
#include <ultra64/sptask.h> #include <PR/os_time.h>
#include <ultra64/ucode.h> #include <PR/os_message.h>
#include <ultra64/cache.h> #include <PR/os_cont.h>
#include <ultra64/vi.h> #include <PR/os_tlb.h>
#include <ultra64/pi.h> #include <PR/sptask.h>
#include <ultra64/os_internal.h> #include <PR/ucode.h>
#include <ultra64/gbi.h> #include <PR/os_cache.h>
#include <ultra64/eeprom.h> #include <PR/os_vi.h>
#include <ultra64/libc.h> #include <PR/os_pi.h>
#include <ultra64/gu.h> #include <PR/os_internal.h>
#include <ultra64/os_ai.h> #include <PR/mbi.h>
#include <ultra64/libaudio.h> #include <PR/os_eeprom.h>
#include <ultra64/libultra.h> #include <PR/os_libc.h>
#include <PR/gu.h>
#include <PR/os_ai.h>
#include <PR/libaudio.h>
#include <PR/libultra.h>
#endif #endif
-11
View File
@@ -1,11 +0,0 @@
#ifndef _ULTRA64_CACHE_H_
#define _ULTRA64_CACHE_H_
/* Functions */
void osInvalICache(void *vaddr, s32 nbytes);
void osInvalDCache(void *vaddr, s32 nbytes);
void osWritebackDCache(void *vaddr, s32 nbytes);
void osWritebackDCacheAll(void);
#endif
-18
View File
@@ -1,18 +0,0 @@
#ifndef _ULTRA64_EEPROM_H_
#define _ULTRA64_EEPROM_H_
typedef struct
{
u16 unk00;
u16 unk01;
} OSEepromUnknownStruct0;
/* Functions */
s32 osEepromLongRead(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes);
s32 osEepromLongWrite(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes);
s32 osEepromWrite(OSMesgQueue *mq, u8 address, u8 *buffer);
s32 osEepromRead(OSMesgQueue *mq, u8 address, u8 *buffer);
s32 osEepromProbe(OSMesgQueue *mq);
#endif
-736
View File
@@ -1,736 +0,0 @@
#ifndef _ULTRA64_GBI_H_
#define _ULTRA64_GBI_H_
/* Types */
/* Vertex (set up for use with colors) */
typedef struct
{
short ob[3]; /* x, y, z */
unsigned short flag;
short tc[2]; /* texture coord */
unsigned char cn[4]; /* color & alpha */
} Vtx_t;
/* Vertex (set up for use with normals) */
typedef struct
{
short ob[3]; /* x, y, z */
unsigned short flag;
short tc[2]; /* texture coord */
signed char n[3]; /* normal */
unsigned char a; /* alpha */
} Vtx_tn;
typedef union
{
Vtx_t v; /* Use this one for colors */
Vtx_tn n; /* Use this one for normals */
long long int force_structure_alignment;
} Vtx;
typedef struct
{
short vscale[4]; /* scale, 2 bits fraction */
short vtrans[4]; /* translate, 2 bits fraction */
} Vp_t;
typedef union
{
Vp_t vp;
long long int force_structure_alignment;
} Vp;
typedef struct
{
unsigned int w0;
unsigned int w1;
} Gwords;
/* TODO: fill in the rest of the members */
typedef union
{
Gwords words;
long long int force_structure_alignment;
} Gfx;
#define _SHIFTL(value, shift, size) \
((unsigned int) (((unsigned int) (value) & ((1 << size) - 1)) << shift))
#define G_ON 1
#define G_OFF 0
#define GPACK_RGBA5551(r, g, b, a) \
((((r) << 8) & 0xF800) | \
(((g) << 3) & 0x07C0) | \
(((b) >> 2) & 0x003E) | \
((a) & 0x0001))
#define GPACK_ZDZ(z, dz) ((z) << 2 | (dz))
#define G_ZBUFFER 0x00000001
#define G_TEXTURE_ENABLE 0x00000002
#define G_SHADE 0x00000004
#define G_SHADING_SMOOTH 0x00000200
#define G_CULL_FRONT 0x00001000
#define G_CULL_BACK 0x00002000
#define G_CULL_BOTH 0x00003000
#define G_FOG 0x00010000
#define G_LIGHTING 0x00020000
#define G_TEXTURE_GEN 0x00040000
#define G_TEXTURE_GEN_LINEAR 0x00080000
#define G_LOD 0x00100000
#define G_CLIPPING 0x00800000
#define G_IM_FMT_RGBA 0
#define G_IM_FMT_YUV 1
#define G_IM_FMT_CI 2
#define G_IM_FMT_IA 3
#define G_IM_FMT_I 4
#define G_IM_SIZ_4b 0
#define G_IM_SIZ_8b 1
#define G_IM_SIZ_16b 2
#define G_IM_SIZ_32b 3
#define G_IM_SIZ_DD 5
#define G_AC_NONE (0 << 0)
#define G_AC_THRESHOLD (1 << 0)
#define G_AC_DITHER (3 << 0)
#define G_ZS_PIXEL (0 << 2)
#define G_ZS_PRIM (1 << 2)
#define G_CD_MAGICSQ (0 << 6)
#define G_CD_BAYER (1 << 6)
#define G_CD_NOISE (2 << 6)
#define G_CK_NONE (0 << 8)
#define G_CK_KEY (1 << 8)
#define G_TC_CONV (0 << 9)
#define G_TC_FILTCONV (5 << 9)
#define G_TC_FILT (6 << 9)
#define G_TF_POINT (0 << 12)
#define G_TF_BILERP (2 << 12)
#define G_TF_AVERAGE (3 << 12)
#define G_TT_NONE (0 << 14)
#define G_TT_RGBA16 (2 << 14)
#define G_TT_IA16 (3 << 14)
#define G_TL_TILE (0 << 16)
#define G_TL_LOD (1 << 16)
#define G_TD_CLAMP (0 << 17)
#define G_TD_SHARPEN (1 << 17)
#define G_TD_DETAIL (2 << 17)
#define G_TP_NONE (0 << 19)
#define G_TP_PERSP (1 << 19)
#define G_CYC_1CYCLE (0 << 20)
#define G_CYC_2CYCLE (1 << 20)
#define G_CYC_COPY (2 << 20)
#define G_CYC_FILL (3 << 20)
#define G_PM_NPRIMITIVE (0 << 23)
#define G_PM_1PRIMITIVE (1 << 23)
#define G_SC_NON_INTERLACE 0
#define G_SC_ODD_INTERLACE 3
#define G_SC_EVEN_INTERLACE 2
#define G_TX_LOADTILE 7
#define G_TX_RENDERTILE 0
#define G_TX_NOMIRROR 0
#define G_TX_WRAP 0
#define G_TX_MIRROR 1
#define G_TX_CLAMP 2
#define G_TX_NOMASK 0
#define G_TX_NOLOD 0
#define G_TX_LDBLK_MAX_TXL 2047
#define G_MV_VIEWPORT 0x80
#define G_MV_LOOKATY 0x82
#define G_MV_LOOKATX 0x84
#define G_MV_L0 0x86
#define G_MV_L1 0x88
#define G_MV_L2 0x8A
#define G_MV_L3 0x8C
#define G_MV_L4 0x8E
#define G_MV_L5 0x90
#define G_MV_L6 0x92
#define G_MV_L7 0x94
#define G_MV_TXTATT 0x96
#define G_MV_MATRIX_1 0x9E
#define G_MV_MATRIX_2 0x98
#define G_MV_MATRIX_3 0x9A
#define G_MV_MATRIX_4 0x9C
#define G_SETOTHERMODE_L 0xB9
#define G_SETOTHERMODE_H 0xBA
#ifndef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#define gSPMatrix(pkt, m, p) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0x01, 24, 8) \
| _SHIFTL((p), 16, 8) \
| _SHIFTL(sizeof(Mtx), 0, 16); \
_g->words.w1 = (u32)(m); \
}
#define gSPVertex(pkt, v, n, v0) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0x04, 24, 8) \
| _SHIFTL(((n)-1) << 4 | (v0), 16, 8) \
| _SHIFTL(sizeof(Vtx)*(n), 0, 16); \
_g->words.w1 = (u32)(v); \
}
#define gDPLoadSync(pkt) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xE6000000; \
_g->words.w1 = 0x00000000; \
}
#define gDPPipeSync(pkt) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xE7000000; \
_g->words.w1 = 0x00000000; \
}
#define gDPTileSync(pkt) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xE8000000; \
_g->words.w1 = 0x00000000; \
}
#define gDPFullSync(pkt) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xE9000000; \
_g->words.w1 = 0x00000000; \
}
#define gSPDisplayList(pkt, dl) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0x06000000; \
_g->words.w1 = (u32)(dl); \
}
#define gSPBranchList(pkt, dl) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = 0x06010000; \
_g->words.w1 = (u32)(dl); \
}
#define gSPEndDisplayList(pkt) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xB8000000; \
_g->words.w1 = 0x00000000; \
}
#define gDPSetCycleType(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA001402; \
_g->words.w1 = type; \
}
#define gDPPipelineMode(pkt, mode) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA001701; \
_g->words.w1 = mode; \
}
#define gDPSetScissor(pkt, mode, ulx, uly, lrx, lry) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xED, 24, 8) \
| _SHIFTL((int)((float)(ulx)*4.0f), 12, 12) \
| _SHIFTL((int)((float)(uly)*4.0f), 0, 12); \
_g->words.w1 = _SHIFTL((mode), 24, 8) \
| _SHIFTL((int)((float)(lrx)*4.0f), 12, 12) \
| _SHIFTL((int)((float)(lry)*4.0f), 0, 12); \
}
#define gDPSetCombine(pkt, muxs0, muxs1) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xFC, 24, 8) \
| _SHIFTL((muxs0), 0, 24); \
_g->words.w1 = (muxs1); \
}
#define gDPSetTextureLOD(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA001001; \
_g->words.w1 = type; \
}
#define gDPSetTextureLUT(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA000E02; \
_g->words.w1 = type; \
}
#define gDPSetTextureDetail(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA001102; \
_g->words.w1 = type; \
}
#define gDPSetTexturePersp(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA001301; \
_g->words.w1 = type; \
}
#define gDPSetTextureFilter(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA000C02; \
_g->words.w1 = type; \
}
#define gDPSetTextureConvert(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA000903; \
_g->words.w1 = type; \
}
#define gDPSetCombineKey(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA000801; \
_g->words.w1 = type; \
}
#define gDPSetColorDither(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBA000602; \
_g->words.w1 = type; \
}
#define gDPSetFillColor(pkt, color) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xF7000000; \
_g->words.w1 = color; \
}
#define gDPFillRectangle(pkt, ulx, uly, lrx, lry) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xF6, 24, 8) \
| _SHIFTL((lrx), 14, 10) \
| _SHIFTL((lry), 2, 10); \
_g->words.w1 = _SHIFTL(0, 24, 8) \
| _SHIFTL((ulx), 14, 10) \
| _SHIFTL((uly), 2, 10); \
}
#define gDPSetAlphaCompare(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xB9000002; \
_g->words.w1 = type; \
}
#define gDPSetDepthSource(pkt, type) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xB9000201; \
_g->words.w1 = type; \
}
#define gSPSetOtherMode(pkt, cmd, shift, length, data) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = _SHIFTL((cmd), 24, 8) \
| _SHIFTL((shift), 8, 8) \
| _SHIFTL(((length)-1), 0, 8); \
_g->words.w1 = (data); \
}
#define gDPSetRenderMode(pkt, mode1, mode2) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xB900031D; \
_g->words.w1 = (mode1) | (mode2); \
}
#define gSPClearGeometryMode(pkt, mode) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xB6000000; \
_g->words.w1 = mode; \
}
#define gSPSetGeometryMode(pkt, word) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xB7000000; \
_g->words.w1 = word; \
}
#define gSPNumLights(pkt, n) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBC000002; \
_g->words.w1 = (0x80000000 + ((n) + 1) * 0x20); \
}
#define gSPTexture(pkt, sc, tc, level, tile, on) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xBB, 24, 8) \
| _SHIFTL(0, 16, 8) \
| _SHIFTL((level), 11, 3) \
| _SHIFTL((tile), 8, 3) \
| _SHIFTL((on), 0, 8); \
_g->words.w1 = _SHIFTL((sc), 16, 16) \
| _SHIFTL((tc), 0, 16); \
}
#define gDPSetColorImage(pkt, fmt, size, width, image) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xFF, 24, 8) \
| _SHIFTL((fmt), 21, 3) \
| _SHIFTL((size), 19, 2) \
| _SHIFTL((width)-1, 0, 12); \
_g->words.w1 = (image); \
}
#define gDPSetTileSize(pkt, tile, uls, ult, lrs, lrt) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xF2, 24, 8) \
| _SHIFTL(uls, 12, 12) \
| _SHIFTL(ult, 0, 12); \
_g->words.w1 = _SHIFTL(tile, 24, 3) \
| _SHIFTL(lrs, 12, 12) \
| _SHIFTL(lrt, 0, 12); \
}
#define gDPLoadBlock(pkt, tile, uls, ult, lrs, dxt) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xF3, 24, 8) \
| _SHIFTL((uls), 12, 12) \
| _SHIFTL((ult), 0, 12); \
_g->words.w1 = _SHIFTL((tile), 24, 3) \
| _SHIFTL((MIN((lrs),G_TX_LDBLK_MAX_TXL)), 12, 12) \
| _SHIFTL((dxt), 0, 12); \
}
#define gDPSetTile(pkt, fmt, siz, line, tmem, tile, \
palette, cmt, maskt, shiftt, cms, masks, shifts) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xF5, 24, 8) \
| _SHIFTL((fmt), 21, 3) \
| _SHIFTL((siz), 19, 2) \
| _SHIFTL((line), 9, 9) \
| _SHIFTL((tmem), 0, 9); \
_g->words.w1 = _SHIFTL((tile), 24, 3) \
| _SHIFTL((palette), 20, 4) \
| _SHIFTL((cmt), 18, 2) \
| _SHIFTL((maskt), 14, 4) \
| _SHIFTL((shiftt), 10, 4) \
| _SHIFTL((cms), 8, 2) \
| _SHIFTL((masks), 4, 4) \
| _SHIFTL((shifts), 0, 4); \
}
#define gDPSetDepthImage(pkt, image) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xFE, 24, 8); \
_g->words.w1 = (image); \
}
#define G_SETPRIMCOLOR 0xFA
#define gDPSetPrimColor(pkt, m, l, r, g, b, a) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(G_SETPRIMCOLOR, 24, 8) \
| _SHIFTL(m, 8, 8) \
| _SHIFTL(l, 0, 8); \
_g->words.w1 = _SHIFTL(r, 24, 8) \
| _SHIFTL(g, 16, 8) \
| _SHIFTL(b, 8, 8) \
| _SHIFTL(a, 0, 8); \
}
#define gDPSetEnvColor(pkt, r, g, b, a) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xFB, 24, 8); \
_g->words.w1 = _SHIFTL((r), 24, 8) \
| _SHIFTL((g), 16, 8) \
| _SHIFTL((b), 8, 8) \
| _SHIFTL((a), 0, 8); \
}
#define gDPSetTextureImage(pkt, fmt, size, width, img) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xFD, 24, 8) \
| _SHIFTL((fmt), 21, 3) \
| _SHIFTL((size), 19, 2) \
| _SHIFTL((width)-1, 0, 12); \
_g->words.w1 = (u32)(img); \
}
#define gMoveWd(pkt, index, offset, data) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xBC, 24, 8) \
| _SHIFTL((offset), 8, 16) \
| _SHIFTL((index), 0, 8); \
_g->words.w1 = (u32)(data); \
}
/* Matrix Operations */
#define G_MTX_MODELVIEW 0x00
#define G_MTX_PROJECTION 0x01
#define G_MTX_MUL 0x00
#define G_MTX_LOAD 0x02
#define G_MTX_NOPUSH 0x00
#define G_MTX_PUSH 0x04
#define gSPPopMatrix(pkt, n) \
{ \
Gfx *_g = (Gfx *) (pkt); \
_g->words.w0 = 0xBD000000; \
_g->words.w1 = (n); \
}
#define gSPViewport(pkt, v) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0x03, 24, 8) \
| _SHIFTL(G_MV_VIEWPORT, 16, 8) \
| _SHIFTL(sizeof(Vp), 0, 16); \
_g->words.w1 = (u32)(v); \
}
#define gSP1Triangle(pkt, v0, v1, v2, flag) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xBF, 24, 8); \
_g->words.w1 = _SHIFTL((flag), 24, 8) \
| _SHIFTL((v0)*10, 16, 8) \
| _SHIFTL((v1)*10, 8, 8) \
| _SHIFTL((v2)*10, 0, 8); \
}
#if (defined(F3DLP_GBI)||defined(F3DEX_GBI))
/***
*** 2 Triangles
***/
#define gSP2Triangles(pkt, v00, v01, v02, flag0, v10, v11, v12, flag1) \
{ \
Gfx *_g = (Gfx *)(pkt); \
\
_g->words.w0 = (_SHIFTL(G_TRI2, 24, 8)| \
__gsSP1Triangle_w1f(v00, v01, v02, flag0)); \
_g->words.w1 = __gsSP1Triangle_w1f(v10, v11, v12, flag1); \
}
#define gsSP2Triangles(v00, v01, v02, flag0, v10, v11, v12, flag1) \
{ \
(_SHIFTL(G_TRI2, 24, 8)| \
__gsSP1Triangle_w1f(v00, v01, v02, flag0)), \
__gsSP1Triangle_w1f(v10, v11, v12, flag1) \
}
#endif /* F3DEX_GBI/F3DLP_GBI */
#if (defined(TRI4_Ext))
/***
*** 4 Triangles - 2Tri Extension
*** Draws up to four triangles at a time.
*** Expects values from 0-F, corresponding with # points declared by vertex command.
*** Triangles with all points set to 0 are not drawn.
*** Vertex Buffer reduced to 16 due to only being able to address 0-F
***/
#define gSP4Triangles(pkt, v00, v01, v02, v10, v11, v12, \
v20, v21, v22, v30, v31, v32 ) \
{ \
Gfx *_g = (Gfx *)(pkt); \
\
_g->words.w0 = (_SHIFTL(G_TRI2, 24, 8)| \
_SHIFTL((v32),12,4)|_SHIFTL((v22),8,4)|_SHIFTL((v12),4,4)|_SHIFTL((v02),0,4); \
_g->words.w1 = _SHIFTL((v31),28,4)|_SHIFTL((v30),24,4)|_SHIFTL((v21),20,4)|_SHIFTL((v20),16,4) \
_SHIFTL((v11),12,4)|_SHIFTL((v10),8,4)|_SHIFTL((v02),4,4)|_SHIFTL((v00),0,4); \
}
#define gsSP4Triangles(v00, v01, v02, flag0, v10, v11, v12, flag1) \
{ \
(_SHIFTL(G_TRI2, 24, 8)| \
_SHIFTL((v32),12,4)|_SHIFTL((v22),8,4)|_SHIFTL((v12),4,4)|_SHIFTL((v02),0,4)), \
(_SHIFTL((v31),28,4)|_SHIFTL((v30),24,4)|_SHIFTL((v21),20,4)|_SHIFTL((v20),16,4) \
_SHIFTL((v11),12,4)|_SHIFTL((v10),8,4)|_SHIFTL((v02),4,4)|_SHIFTL((v00),0,4)); \
}
#endif /* TRI4_Ext*/
#define gSPTextureRectangle(pkt, xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xE4, 24, 8) \
| _SHIFTL((xh), 12, 12) \
| _SHIFTL((yh), 0, 12); \
_g->words.w1 = _SHIFTL((tile), 24, 3) \
| _SHIFTL((xl), 12, 12) \
| _SHIFTL((yl), 0, 12); \
} \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xB3, 24, 8); \
_g->words.w1 = _SHIFTL((s), 16, 16) \
| _SHIFTL((t), 0, 16); \
} \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(0xB2, 24, 8); \
_g->words.w1 = _SHIFTL((dsdx), 16, 16) \
| _SHIFTL((dtdy), 0, 16); \
}
/* Lights and Light Operations */
typedef struct {
unsigned char col[3];
char pad1;
unsigned char colc[3];
char pad2;
signed char dir[3];
char pad3;
} Light_t;
typedef struct {
unsigned char col[3];
char pad1;
unsigned char colc[3];
char pad2;
} Ambient_t;
typedef union {
Ambient_t l;
long long int force_structure_alignment[1];
} Ambient;
typedef union {
Light_t l;
long long int force_structure_alignment[2];
} Light;
typedef struct {
Ambient a;
Light l[4];
} Lights4;
typedef struct {
Light l[2];
} LookAt;
typedef struct {
int x1, y1, x2, y2;
} Hilite_t;
typedef union {
Hilite_t h;
long int force_alignmnet[4];
} Hilite;
#define G_MOVEMEM 0x03
/* for gSPNumLights */
// is NUMLIGHTS_0 accurate?
#define NUMLIGHTS_0 1
#define NUMLIGHTS_1 1
#define NUMLIGHTS_2 2
#define NUMLIGHTS_3 3
#define NUMLIGHTS_4 4
#define NUMLIGHTS_5 5
#define NUMLIGHTS_6 6
#define NUMLIGHTS_7 7
/* for gSPLight */
#define LIGHT_1 1
#define LIGHT_2 2
#define LIGHT_3 3
#define LIGHT_4 4
#define LIGHT_5 5
#define LIGHT_6 6
#define LIGHT_7 7
#define LIGHT_8 8
#define gSPLight(pkt, l, n) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \
| _SHIFTL(((n)-1)*2+G_MV_L0, 16, 8) \
| _SHIFTL(sizeof(Light), 0, 16); \
_g->words.w1 = (u32)(l); \
}
#define gSPLookAtX(pkt, la) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \
| _SHIFTL(G_MV_LOOKATX, 16, 8) \
| _SHIFTL(sizeof(Light), 0, 16); \
_g->words.w1 = (u32)(la); \
}
#define gSPLookAtY(pkt, la) \
{ \
Gfx *_g = (Gfx *)(pkt); \
_g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \
| _SHIFTL(G_MV_LOOKATY, 16, 8) \
| _SHIFTL(sizeof(Light), 0, 16); \
_g->words.w1 = (u32)(la); \
}
#define gSPLookAt(pkt, la) \
{ \
gSPLookAtX((pkt), (la)) \
gSPLookAtY((pkt), (char *)(la)+16) \
}
#endif
-332
View File
@@ -1,332 +0,0 @@
/* GNU as assembler macros for F3D GBI */
/* commands with no parameters */
.macro f3d_noparam cmd
.word (\cmd << 24), 0x00000000
.endm
.macro gsImmp1 cmd, param
.word (\cmd << 24), \param
.endm
/* DMA helper */
.macro gsDma1p cmd, segAddr, length, params
.byte \cmd, \params
.hword \length
.word \segAddr
.endm
/* 01: G_MTX */
/* params */
.set G_MTX_MODELVIEW, 0x00
.set G_MTX_PROJECTION, 0x01
.set G_MTX_MUL, 0x00
.set G_MTX_LOAD, 0x02
.set G_MTX_NOPUSH, 0x00
.set G_MTX_PUSH, 0x04
.set G_MTX, 0x01
.macro gsSPMatrix matrix, params
gsDma1p G_MTX, \matrix, 64, \params
.endm
/* 02: reserved */
/* 03: G_MOVEMEM */
.set G_MOVEMEM, 0x03
.set G_MV_L0, 0x86
.macro gsSPLight light, num
gsDma1p G_MOVEMEM, \light, 16, ((\num)-1)*2+G_MV_L0
.endm
/* 04: G_VTX */
.set G_VTX, 0x04
.macro gsSPVertex verts, num, index
gsDma1p G_VTX, \verts, 16*\num, ((\num)-1)<<4|(\index)
.endm
/* 05: reserved */
/* 06: G_DL */
.set G_DL, 0x06
.set G_DL_PUSH, 0x00
.set G_DL_NOPUSH, 0x01
.macro gsSPDisplayList dl
gsDma1p G_DL, \dl, 0, G_DL_PUSH
.endm
.macro gsSPBranchList dl
gsDma1p G_DL, \dl, 0, G_DL_NOPUSH
.endm
/* geometry mode flags */
.set G_ZBUFFER, 0x00000001
.set G_SHADE, 0x00000004
.set G_SHADING_SMOOTH, 0x00000200
.set G_CULL_FRONT, 0x00001000
.set G_CULL_BACK, 0x00002000
.set G_FOG, 0x00010000
.set G_LIGHTING, 0x00020000
.set G_TEXTURE_GEN, 0x00040000
.set G_TEXTURE_GEN_LINEAR, 0x00080000
/* B3: G_RDPHALF_2 */
.set G_RDPHALF_2, 0xB3
/* B4: G_RDPHALF_1 */
.set G_RDPHALF_1, 0xB4
/* B6: G_CLEARGEOMETRYMODE */
.set G_CLEARGEOMETRYMODE, 0xB6
.macro gsSPClearGeometryMode flags
.word G_CLEARGEOMETRYMODE << 24
.word \flags
.endm
/* B7: G_SETGEOMETRYMODE */
.set G_SETGEOMETRYMODE, 0xB7
.macro gsSPSetGeometryMode flags
.word G_SETGEOMETRYMODE << 24
.word \flags
.endm
/* B8: G_ENDDL */
.set G_ENDDL, 0xB8
.macro gsSPEndDisplayList
f3d_noparam G_ENDDL
.endm
/* B9: G_SETOTHERMODE_L */
.set G_SETOTHERMODE_L, 0xB9
/* G_SETOTHERMODE_L sft: shift count */
.set G_MDSFT_ALPHACOMPARE, 0
.set G_MDSFT_ZSRCSEL, 2
.set G_MDSFT_RENDERMODE, 3
.set G_MDSFT_BLENDER, 16
/* BA: G_SETOTHERMODE_H */
.set G_SETOTHERMODE_H, 0xBA
/* G_SETOTHERMODE_H sft: shift count */
.set G_MDSFT_ALPHADITHER, 4
.set G_MDSFT_RGBDITHER, 6
.set G_MDSFT_COMBKEY, 8
.set G_MDSFT_TEXTCONV, 9
.set G_MDSFT_TEXTFILT, 12
.set G_MDSFT_TEXTLUT, 14
.set G_MDSFT_TEXTLOD, 16
.set G_MDSFT_TEXTDETAIL, 17
.set G_MDSFT_TEXTPERSP, 19
.set G_MDSFT_CYCLETYPE, 20
.set G_MDSFT_PIPELINE, 23
.macro gsSPSetOtherMode cmd, sft, len, data
.word ((\cmd & 0xFF) << 24) | ((\sft & 0xFF) << 8) | (\len & 0xFF)
.word \data
.endm
/* BB: G_TEXTURE */
.set G_TEXTURE, 0xBB
.macro gsSPTexture scaleS, scaleT, level, tile, enable
.word (G_TEXTURE << 24) | ((\level & 0x7) << 11) | ((\tile & 0x7) << 8) | \enable
.word ((\scaleS & 0xFFFF) << 16) | (\scaleT & 0xFFFF)
.endm
/* BC: G_MOVEWORD */
.set G_MOVEWORD, 0xBC
.macro gsMoveWd index, offset, data
.word G_MOVEWORD << 24 | ((\index & 0xFFFF) << 8) | (\offset & 0xFF)
.word \data
.endm
/* BF: G_TRI1 */
.set G_TRI1, 0xBF
.macro gsSP1Triangle v0, v1, v2, flag
.word G_TRI1 << 24
.byte \flag, \v0*10, \v1*10, \v2*10
.endm
/* C0: G_NOOP */
.set G_NOOP, 0xC0
.macro gsDPNoOp
f3d_noparam G_NOOP
.endm
/* E6: G_RDPLOADSYNC */
.set G_RDPLOADSYNC, 0xE6
.macro gsDPLoadSync
f3d_noparam G_RDPLOADSYNC
.endm
/* E7: G_RDPPIPESYNC */
.set G_RDPPIPESYNC, 0xE7
.macro gsDPPipeSync
f3d_noparam G_RDPPIPESYNC
.endm
/* E8: G_RDPTILESYNC */
.set G_RDPTILESYNC, 0xE8
.macro gsDPTileSync
f3d_noparam G_RDPTILESYNC
.endm
/* E9: G_RDPFULLSYNC */
.set G_RDPFULLSYNC, 0xE9
.macro gsDPFullSync
f3d_noparam G_RDPFULLSYNC
.endm
/* F0: G_LOADTLUT */
.set G_LOADTLUT, 0xF0
.macro gsDPLoadTLUTCmd tile, count
.word G_LOADTLUT << 24
.word ((\tile & 0x7) << 24) | (\count & 0x3FFF) << 10
.endm
/* F1: unused */
/* F2: G_SETTILESIZE */
.set G_SETTILESIZE, 0xF2
.macro gsDPSetTileSize tile, uls, ult, lrs, lrt
.word (G_SETTILESIZE << 24) | ((\uls & 0x0FFF) << 12) | (\ult & 0x0FFF)
.word ((\tile & 0x7) << 24) | ((\lrs & 0x0FFF) << 12) | (\lrt & 0x0FFF)
.endm
/* F3: G_LOADBLOCK */
.set G_LOADBLOCK, 0xF3
.macro gsDPLoadBlock tile, uls, ult, lrs, dxt
.word (G_LOADBLOCK << 24) | ((\uls & 0x0FFF) << 12) | (\ult & 0x0FFF)
.word ((\tile & 0x7) << 24) | ((\lrs & 0x0FFF) << 12) | (\dxt & 0x0FFF)
.endm
/* F5: G_SETTILE */
.set G_TX_LOADTILE, 0x7
.set G_TX_RENDERTILE, 0x0
/* axis clamp and mirror flags */
.set G_TX_NOMIRROR, 0x0
.set G_TX_WRAP, 0x0
.set G_TX_MIRROR, 0x1
.set G_TX_CLAMP, 0x2
/* mask flags */
.set G_TX_NOMASK, 0x0
/* shift flags */
.set G_TX_NOLOD, 0x0
.set G_SETTILE, 0xF5
.macro gsDPSetTile fmt, siz, line, tmem, tile, palette, cmt, maskt, shiftt, cms, masks, shifts
.word (G_SETTILE << 24) | ((\fmt & 0x7) << 21) | ((\siz & 0x3) << 19) | ((\line & 0x1FF) << 9) | (\tmem & 0x1FF)
.word ((\tile & 0x7) << 24) | ((\palette & 0xF) << 20) | ((\cmt & 0x3) << 18) | ((\maskt & 0xF) << 14) | ((\shiftt & 0xF) << 10) | ((\cms & 0x3) << 8) | ((\masks & 0xF) << 4) | (\shifts & 0xF)
.endm
/* F6: G_FILLRECT */
.set G_FILLRECT, 0xF6
.macro gsDPFillRectangle ulx, uly, lrx, lry
.word (G_FILLRECT << 24) | ((\lrx & 0x3FF) << 14) | ((\lry & 0x3FF) << 2)
.word ((\ulx & 0x3FF) << 14) | ((\uly & 0x3FF) << 2)
.endm
/* F7: G_SETFILLCOLOR */
.set G_SETFILLCOLOR, 0xF7
.macro gsDPSetFillColor fillValue
.word G_SETFILLCOLOR << 24
.word \fillValue
.endm
/* helper for RGBA colors */
.macro sDPRGBColor cmd r, g, b, a
.word \cmd << 24
.byte \r, \g, \b, \a
.endm
/* F8: G_SETFOGCOLOR */
.set G_SETFOGCOLOR, 0xF8
.macro gsDPSetFogColor r, g, b, a
sDPRGBColor G_SETFOGCOLOR, \r, \g, \b, \a
.endm
/* F9: G_SETBLENDCOLOR */
.set G_SETBLENDCOLOR, 0xF9
.macro gsDPSetBlendColor r, g, b, a
sDPRGBColor G_SETBLENDCOLOR, \r, \g, \b, \a
.endm
/* FA: G_SETPRIMCOLOR */
.set G_SETPRIMCOLOR, 0xFA
.macro gsDPSetPrimColor m, l, r, g, b, a
.word (G_SETPRIMCOLOR << 24) | ((\m & 0xFF) << 8) | (\l & 0xFF)
.byte \r, \g, \b, \a
.endm
/* FB: G_SETENVCOLOR */
.set G_SETENVCOLOR, 0xFB
.macro gsDPSetEnvColor r, g, b, a
sDPRGBColor G_SETENVCOLOR, \r, \g, \b, \a
.endm
/* FC: G_SETCOMBINE */
/* color combiner */
.set G_CCMUX_COMBINED, 0
.set G_CCMUX_TEXEL0, 1
.set G_CCMUX_TEXEL1, 2
.set G_CCMUX_PRIMITIVE, 3
.set G_CCMUX_SHADE, 4
.set G_CCMUX_ENVIRONMENT, 5
.set G_CCMUX_CENTER, 6
.set G_CCMUX_SCALE, 6
.set G_CCMUX_COMBINED_ALPHA, 7
.set G_CCMUX_TEXEL0_ALPHA, 8
.set G_CCMUX_TEXEL1_ALPHA, 9
.set G_CCMUX_PRIMITIVE_ALPHA, 10
.set G_CCMUX_SHADE_ALPHA, 11
.set G_CCMUX_ENV_ALPHA, 12
.set G_CCMUX_LOD_FRACTION, 13
.set G_CCMUX_PRIM_LOD_FRAC, 14
.set G_CCMUX_NOISE, 7
.set G_CCMUX_K4, 7
.set G_CCMUX_K5, 15
.set G_CCMUX_1, 6
.set G_CCMUX_0, 31
/* alpha combiner */
.set G_ACMUX_COMBINED, 0
.set G_ACMUX_TEXEL0, 1
.set G_ACMUX_TEXEL1, 2
.set G_ACMUX_PRIMITIVE, 3
.set G_ACMUX_SHADE, 4
.set G_ACMUX_ENVIRONMENT, 5
.set G_ACMUX_LOD_FRACTION, 0
.set G_ACMUX_PRIM_LOD_FRAC, 6
.set G_ACMUX_1, 6
.set G_ACMUX_0, 7
.set G_SETCOMBINE, 0xFC
.macro gsDPSetCombine muxs0, muxs1
.word (G_SETCOMBINE << 24) | (\muxs0 & 0x00FFFFFF)
.word \muxs1
.endm
.macro gsDPSetCombineMode a0, b0, c0, d0, Aa0, Ab0, Ac0, Ad0, a1, b1, c1, d1, Aa1, Ab1, Ac1, Ad1
.word (G_SETCOMBINE << 24) | ((\a0 & 0xF) << 20) | ((\c0 & 0x1F) << 15) | ((\Aa0 & 0x7) << 12) | ((\Ac0 & 0x7) << 9) | ((\a1 & 0xF) << 5) | (\c1 & 0x1F)
.word ((\b0 & 0xF) << 28) | ((\b1 & 0xF) << 24) | ((\Aa1 & 0x7) << 21) | ((\Ac1 & 0x7) << 18) | ((\d0 & 0x7) << 15) | ((\Ab0 & 0x7) << 12) | ((\Ad0 & 0x7) << 9) | ((\d1 & 0x7) << 6) | ((\Ab1 & 0x7) << 3) | (\Ad1 & 0x7)
.endm
/* FD: G_SETTIMG */
/* fmt */
.set G_IM_FMT_RGBA, 0x00
.set G_IM_FMT_YUV, 0x01
.set G_IM_FMT_CI, 0x02
.set G_IM_FMT_IA, 0x03
.set G_IM_FMT_I, 0x04
/* size */
.set G_IM_SIZ_4b, 0x00
.set G_IM_SIZ_8b, 0x01
.set G_IM_SIZ_16b, 0x02
.set G_IM_SIZ_32b, 0x03
.set G_SETTIMG, 0xFD
.macro gsDPSetTextureImage fmt, size, width, segAddr
.word (G_SETTIMG << 24) | ((\fmt & 0x7) << 21) | ((\size & 0x3) << 19) | ((\width-1) & 0x0FFF)
.word \segAddr
.endm
-14
View File
@@ -1,14 +0,0 @@
#ifndef _ULTRA64_INTERRUPT_H_
#define _ULTRA64_INTERRUPT_H_
/* Types */
typedef u32 OSIntMask;
/* Functions */
OSIntMask osGetIntMask(void);
OSIntMask osSetIntMask(OSIntMask);
#endif
-20
View File
@@ -1,20 +0,0 @@
#ifndef _ULTRA64_LIBAUDIO_H_
#define _ULTRA64_LIBAUDIO_H_
typedef struct
{
u8 *offset;
s32 len;
} ALSeqData;
typedef struct
{
s16 revision;
s16 seqCount;
ALSeqData seqArray[1];
} ALSeqFile;
void alSeqFileNew(ALSeqFile *f, u8 *base);
#endif
-8
View File
@@ -1,8 +0,0 @@
#ifndef _ULTRA64_LIBC_H_
#define _ULTRA64_LIBC_H_
int sprintf(char *, const char *, ... );
void bcopy(const void *src, void *dest, size_t size);
void bzero(void *s, size_t size);
#endif
-50
View File
@@ -1,50 +0,0 @@
#ifndef _ULTRA64_MESSAGE_H_
#define _ULTRA64_MESSAGE_H_
/* Events */
#define OS_EVENT_SW1 0
#define OS_EVENT_SW2 1
#define OS_EVENT_CART 2
#define OS_EVENT_COUNTER 3
#define OS_EVENT_SP 4
#define OS_EVENT_SI 5
#define OS_EVENT_AI 6
#define OS_EVENT_VI 7
#define OS_EVENT_PI 8
#define OS_EVENT_DP 9
#define OS_EVENT_CPU_BREAK 10
#define OS_EVENT_SP_BREAK 11
#define OS_EVENT_FAULT 12
#define OS_EVENT_THREADSTATUS 13
#define OS_EVENT_PRENMI 14
#define OS_MESG_NOBLOCK 0
#define OS_MESG_BLOCK 1
/* Types */
typedef u32 OSEvent;
typedef void *OSMesg;
typedef struct OSMesgQueue_s
{
OSThread *mtqueue;
OSThread *fullqueue;
s32 validCount;
s32 first;
s32 msgCount;
OSMesg *msg;
} OSMesgQueue;
/* Functions */
void osCreateMesgQueue(OSMesgQueue *mq, OSMesg *msgBuf, s32 count);
s32 osSendMesg(OSMesgQueue *mq, OSMesg msg, s32 flag);
s32 osJamMesg(OSMesgQueue *mq, OSMesg msg, s32 flag);
s32 osRecvMesg(OSMesgQueue *mq, OSMesg *msg, s32 flag);
void osSetEventMesg(OSEvent e, OSMesgQueue *mq, OSMesg msg);
void osViSetEvent(OSMesgQueue *mq, OSMesg msg, u32 retraceCount);
s32 osContStartReadData(OSMesgQueue *mq);
#endif
-39
View File
@@ -1,39 +0,0 @@
#ifndef _ULTRA64_CONTROLLER_H_
#define _ULTRA64_CONTROLLER_H_
typedef struct
{
/*0x00*/ u16 type; /* Controller Type */
/*0x02*/ u8 status; /* Controller status */
/*0x03*/ u8 errno;
} OSContStatus;
typedef struct {
/*0x00*/ u16 button;
/*0x02*/ s8 stick_x; /* -80 <= stick_x <= 80 */
/*0x03*/ s8 stick_y; /* -80 <= stick_y <= 80 */
/*0x04*/ u8 errno;
} OSContPad;
#define A_BUTTON (1 << 15) // 0x8000
#define B_BUTTON (1 << 14) // 0x4000
#define Z_TRIG (1 << 13) // 0x2000
#define START_BUTTON (1 << 12) // 0x1000
#define U_JPAD (1 << 11) // 0x0800
#define D_JPAD (1 << 10) // 0x0400
#define L_JPAD (1 << 9) // 0x0200
#define R_JPAD (1 << 8) // 0x0100
#define DUMMY_1 (1 << 7) // 0x0080 (unused)
#define DUMMY_2 (1 << 6) // 0x0040 (unused)
#define L_TRIG (1 << 5) // 0x0020
#define R_TRIG (1 << 4) // 0x0010
#define U_CBUTTONS (1 << 3) // 0x0008
#define D_CBUTTONS (1 << 2) // 0x0004
#define L_CBUTTONS (1 << 1) // 0x0002
#define R_CBUTTONS (1 << 0) // 0x0001
s32 osContInit(OSMesgQueue *, u8 *, OSContStatus *);
void osContGetReadData(OSContPad *);
#endif
-85
View File
@@ -1,85 +0,0 @@
#ifndef _ULTRA64_PI_H_
#define _ULTRA64_PI_H_
/* Ultra64 Parallel Interface */
/* Types */
typedef struct
{
u32 errStatus;
void *dramAddr;
void *C2Addr;
u32 sectorSize;
u32 C1ErrNum;
u32 C1ErrSector[4];
} __OSBlockInfo;
typedef struct
{
u32 cmdType;
u16 transferMode;
u16 blockNum;
s32 sectorNum;
u32 devAddr;
u32 bmCtlShadow;
u32 seqCtlShadow;
__OSBlockInfo block[2];
} __OSTranxInfo;
typedef struct OSPiHandle_s
{
struct OSPiHandle_s *next;
u8 type;
u8 latency;
u8 pageSize;
u8 relDuration;
u8 pulse;
u8 domain;
u32 baseAddress;
u32 speed;
__OSTranxInfo transferInfo;
} OSPiHandle;
typedef struct
{
u8 type;
u32 address;
} OSPiInfo;
typedef struct
{
u16 type;
u8 pri;
u8 status;
OSMesgQueue *retQueue;
} OSIoMesgHdr;
typedef struct
{
/*0x00*/ OSIoMesgHdr hdr;
/*0x08*/ void *dramAddr;
/*0x0C*/ u32 devAddr;
/*0x10*/ u32 size;
OSPiHandle *piHandle; //from the official definition
} OSIoMesg;
/* Definitions */
#define OS_READ 0 // device -> RDRAM
#define OS_WRITE 1 // device <- RDRAM
#define OS_MESG_PRI_NORMAL 0
#define OS_MESG_PRI_HIGH 1
/* Functions */
s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction,
u32 devAddr, void *vAddr, u32 nbytes, OSMesgQueue *mq);
void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf,
s32 cmdMsgCnt);
OSMesgQueue *osPiGetCmdQueue(void);
s32 osPiWriteIo(u32 devAddr, u32 data);
s32 osPiReadIo(u32 devAddr, u32 *data);
#endif
-33
View File
@@ -1,33 +0,0 @@
#ifndef _ULTRA64_RDP_H_
#define _ULTRA64_RDP_H_
/* DP Command Registers */
#define DPC_REG_BASE 0xA4100000
#define DPC_START_REG (*(vu32 *)(DPC_REG_BASE + 0x00))
#define DPC_END_REG (*(vu32 *)(DPC_REG_BASE + 0x04))
#define DPC_CURRENT_REG (*(vu32 *)(DPC_REG_BASE + 0x08))
#define DPC_STATUS_REG (*(vu32 *)(DPC_REG_BASE + 0x0C))
#define DPC_CLOCK_REG (*(vu32 *)(DPC_REG_BASE + 0x10))
#define DPC_BUFBUSY_REG (*(vu32 *)(DPC_REG_BASE + 0x14))
#define DPC_PIPEBUSY_REG (*(vu32 *)(DPC_REG_BASE + 0x18))
#define DPC_TMEM_REG (*(vu32 *)(DPC_REG_BASE + 0x1C))
/* DP Span Registers */
#define DPS_REG_BASE 0xA4200000
#define DPS_TBIST_REG (*(vu32 *)(DPS_REG_BASE + 0x00))
#define DPS_TEST_MODE_REG (*(vu32 *)(DPS_REG_BASE + 0x04))
#define DPS_BUFTEST_ADDR_REG (*(vu32 *)(DPS_REG_BASE + 0x08))
#define DPS_BUFTEST_DATA_REG (*(vu32 *)(DPS_REG_BASE + 0x0C))
/* Functions */
u32 osDpGetStatus(void);
void osDpSetStatus(u32 status);
#endif
-25
View File
@@ -1,25 +0,0 @@
#ifndef _ULTRA64_TLB_H_
#define _ULTRA64_TLB_H_
/* Types */
typedef u32 OSPageMask;
/* OSPageMask Valid Values */
#define OS_PM_4K 0x0000000
#define OS_PM_16K 0x0006000
#define OS_PM_64K 0x001e000
#define OS_PM_256K 0x007e000
#define OS_PM_1M 0x01fe000
#define OS_PM_4M 0x07fe000
#define OS_PM_16M 0x1ffe000
/* Functions */
void osMapTLB(s32 index, OSPageMask pm, void *vaddr, u32 evenpaddr,
u32 oddpaddr, s32 asid);
void osMapTLBRdb(void);
void osUnmapTLB(s32 index);
void osUnmapTLBAll(void);
void osSetTLBASID(s32 asid);
#endif
+3
View File
@@ -1,5 +1,8 @@
This is a working Goldeneye 007 decompilation! This is a working Goldeneye 007 decompilation!
[![GE-CI](https://github.com/kholdfuzion/goldeneye_src/workflows/GE-CI/badge.svg)](https://kholdfuzion.github.io/goldeneyestatus/)
## Setup ## Setup
The only requirements for Ubuntu 16.04 and 18.04 should be The only requirements for Ubuntu 16.04 and 18.04 should be
``` ```
+18 -10
View File
@@ -952,8 +952,10 @@
//============================================================================= //=============================================================================
// note: uses chr->visionrange while checking for bond. once bond has been spotted, // note: uses chr->visionrange while checking for bond. once bond has been spotted,
// check if bond and guard are within line of sight (ignores facing direction). // check if bond and guard are within line of sight (ignores facing direction).
// injured guards will also set spotted Bond state (won't work with invincible/armored guards).
// if bond breaks line of sight, do not goto label. if bond has broken line of // if bond breaks line of sight, do not goto label. if bond has broken line of
// sight for more than 10 seconds, reset spotted bond state // sight for more than 10 seconds, reset spotted bond state. when using with
// command 3E, make sure 32 takes priority over command 3E
//===========================================================================*/ //===========================================================================*/
#define if_guard_sees_bond_ID 0x32 #define if_guard_sees_bond_ID 0x32
#define if_guard_sees_bond_LENGTH 0x02 #define if_guard_sees_bond_LENGTH 0x02
@@ -1112,16 +1114,22 @@
label, label,
/*============================================================================= /*=============================================================================
// name: if_guard_was_shot_within_last_10_secs // name: if_guard_was_shot_or_seen_bond_within_last_10_secs
// command id: 3E // command id: 3E
// info: if guard was shot (from anyone) within the last 10 seconds, goto label // info: if guard was shot (from anyone) or saw Bond within the last 10 seconds, goto label
//============================================================================= //=============================================================================
// note: command will not count guard as shot if they are invincible/have armour // note: command will not count guard as shot if they are invincible/have armour.
// if guard saw Bond (using command 32) in the last 10 seconds, goto label. when
// using with command 32, make sure 32 takes priority over command 3E. if guard
// was injured within the last 10 seconds, goto label when finished injury reaction
// animation (will not work with invincible/armored guards).
// to check if guard was hit/damaged use commands 7E/F8 instead, or check if
// guard flags CHRFLAG_WAS_DAMAGED/CHRFLAG_WAS_HIT are set using command 9F/A2
//===========================================================================*/ //===========================================================================*/
#define if_guard_was_shot_within_last_10_secs_ID 0x3E #define if_guard_was_shot_or_seen_bond_within_last_10_secs_ID 0x3E
#define if_guard_was_shot_within_last_10_secs_LENGTH 0x02 #define if_guard_was_shot_or_seen_bond_within_last_10_secs_LENGTH 0x02
#define if_guard_was_shot_within_last_10_secs(label) \ #define if_guard_was_shot_or_seen_bond_within_last_10_secs(label) \
if_guard_was_shot_within_last_10_secs_ID, \ if_guard_was_shot_or_seen_bond_within_last_10_secs_ID, \
label, label,
/*============================================================================= /*=============================================================================
@@ -2436,7 +2444,7 @@
/*============================================================================= /*=============================================================================
// name: if_guard_bitfield_is_set_on // name: if_guard_bitfield_is_set_on
// command id: 96 // command id: 96
// info: if bits is set on in chr->BITFIELD, goto label // info: if any bits in argument are set on in chr->BITFIELD, goto label
//============================================================================= //=============================================================================
// note: can be used by obj ai lists, obj lists are free to utilize the entire // note: can be used by obj ai lists, obj lists are free to utilize the entire
// spectrum of flags // spectrum of flags
@@ -2483,7 +2491,7 @@
/*============================================================================= /*=============================================================================
// name: if_chr_bitfield_is_set_on // name: if_chr_bitfield_is_set_on
// command id: 99 // command id: 99
// info: if bits is set on in chr->BITFIELD, goto label // info: if any bits in argument are set on in chr->BITFIELD, goto label
//===========================================================================*/ //===========================================================================*/
#define if_chr_bitfield_is_set_on_ID 0x99 #define if_chr_bitfield_is_set_on_ID 0x99
#define if_chr_bitfield_is_set_on_LENGTH 0x04 #define if_chr_bitfield_is_set_on_LENGTH 0x04
+15 -2
View File
@@ -44,6 +44,17 @@ typedef enum MISSION_BRIEFING {
BRIEF_MONEYPENNY BRIEF_MONEYPENNY
} MISSION_BRIEFING; } MISSION_BRIEFING;
typedef enum OPTIONS {
PLAYER_OPTION_LOOK = 0,
PLAYER_OPTION_AUTOAIM,
PLAYER_OPTION_AIM,
PLAYER_OPTION_SIGHT,
PLAYER_OPTION_LOOKAHEAD,
PLAYER_OPTION_AMMODISPLAY,
PLAYER_OPTION_SCREEN,
PLAYER_OPTION_RATIO
} OPTIONS;
typedef enum DIFFICULTY { typedef enum DIFFICULTY {
DIFFICULTY_AGENT = 0, DIFFICULTY_AGENT = 0,
DIFFICULTY_SECRET, DIFFICULTY_SECRET,
@@ -1282,7 +1293,7 @@ typedef enum ACT_TYPE {
#define CHRFLAG_INIT 0x00000001 // initialize chr #define CHRFLAG_INIT 0x00000001 // initialize chr
#define CHRFLAG_CLONE 0x00000002 // clone on heard gunfire (used by GLIST_DETECT_BOND_SPAWN_CLONE_ON_HEARD_GUNFIRE) #define CHRFLAG_CLONE 0x00000002 // clone on heard gunfire (used by GLIST_DETECT_BOND_SPAWN_CLONE_ON_HEARD_GUNFIRE)
#define CHRFLAG_NEAR_MISS 0x00000004 // chr was just nearly shot (sometimes set on direct hit) #define CHRFLAG_NEAR_MISS 0x00000004 // chr was just nearly shot (sometimes set on direct hit) - resets every tick
#define CHRFLAG_HAS_BEEN_ON_SCREEN 0x00000008 // chr has been on screen before #define CHRFLAG_HAS_BEEN_ON_SCREEN 0x00000008 // chr has been on screen before
#define CHRFLAG_INVINCIBLE 0x00000010 // invincible #define CHRFLAG_INVINCIBLE 0x00000010 // invincible
#define CHRFLAG_00000020 0x00000020 // unknown #define CHRFLAG_00000020 0x00000020 // unknown
@@ -1428,7 +1439,9 @@ typedef enum ACT_TYPE {
#define OBJECTTYPE_35 0x35 #define OBJECTTYPE_35 0x35
#define OBJECTTYPE_36 0x36 #define OBJECTTYPE_36 0x36
#define CROUCH_SQUAT 0
#define CROUCH_HALF 1
#define CROUCH_STAND 2
#endif #endif
+3 -4
View File
@@ -1,9 +1,8 @@
#ifndef _BOND_H_ #ifndef _BONDGAME_H_
#define _BOND_H_ #define _BONDGAME_H_
#include "ultra64.h" #include "ultra64.h"
extern u8 cfb_16_a[]; extern u8 cfb_16[2][320*240*2];
extern u8 cfb_16_b[];
extern u32 *_codeSegmentStart; extern u32 *_codeSegmentStart;
extern u32 *_codeSegmentEnd; extern u32 *_codeSegmentEnd;
+5 -5
View File
@@ -2,6 +2,8 @@
#define _BONDTYPES_H_ #define _BONDTYPES_H_
#include "ultra64.h" #include "ultra64.h"
#include "bondconstants.h" #include "bondconstants.h"
#include "structs.h"
struct rgba_val{ struct rgba_val{
u8 r; u8 r;
u8 g; u8 g;
@@ -46,10 +48,8 @@ typedef struct PropRecord
} Entityp; } Entityp;
} PropRecord; } PropRecord;
typedef struct CHRdata CHRdata, *PCHRdata;
/* unfinished struct, WIP */ /* unfinished struct, WIP */
struct CHRdata { struct chrdata {
u16 chrnum; u16 chrnum;
s8 accuracyrating; s8 accuracyrating;
s8 speedrating; s8 speedrating;
@@ -70,7 +70,7 @@ struct CHRdata {
s8 flinchcnt; s8 flinchcnt;
s16 hidden; s16 hidden;
s32 chrflags; s32 chrflags;
void * pad; struct prop* posdata;
void * model; void * model;
/* 0x0020 */ /* 0x0020 */
void * field_20; void * field_20;
@@ -154,7 +154,7 @@ struct CHRdata {
u8 random; u8 random;
/* 0x0110 */ /* 0x0110 */
s32 timer60; s32 timer60;
u16 padpreset1; /* ID PAD_PRESET */ s16 padpreset1; /* ID PAD_PRESET */
u16 chrpreset1; /* ID CHR_PRESET */ u16 chrpreset1; /* ID CHR_PRESET */
u16 chrseeshot; /* ID CHR_SEE_SHOT - ignores invincible/armoured guards */ u16 chrseeshot; /* ID CHR_SEE_SHOT - ignores invincible/armoured guards */
u16 chrseedie; /* ID CHR_SEE_DIE */ u16 chrseedie; /* ID CHR_SEE_DIE */
+4 -4
View File
@@ -484,7 +484,7 @@ loop_29:
if (current_stage_num != 0x5a) if (current_stage_num != 0x5a)
{ {
phi_s1_2 = 0; phi_s1_2 = 0;
if (get_num_players() > 0) if (getPlayerCount() > 0)
{ {
loop_44: loop_44:
set_cur_player(sub_GAME_7F09B528(phi_s1_2)); set_cur_player(sub_GAME_7F09B528(phi_s1_2));
@@ -493,7 +493,7 @@ loop_44:
sub_GAME_7F0BF800(); sub_GAME_7F0BF800();
temp_s1 = phi_s1_2 + 1; temp_s1 = phi_s1_2 + 1;
phi_s1_2 = temp_s1; phi_s1_2 = temp_s1;
if (temp_s1 < get_num_players()) if (temp_s1 < getPlayerCount())
{ {
goto loop_44; goto loop_44;
} }
@@ -1013,7 +1013,7 @@ glabel mainloop
/* 0071A8 700065A8 2401005A */ li $at, 90 /* 0071A8 700065A8 2401005A */ li $at, 90
/* 0071AC 700065AC 13210018 */ beq $t9, $at, .L70006610 /* 0071AC 700065AC 13210018 */ beq $t9, $at, .L70006610
/* 0071B0 700065B0 00000000 */ nop /* 0071B0 700065B0 00000000 */ nop
/* 0071B4 700065B4 0FC26919 */ jal get_num_players /* 0071B4 700065B4 0FC26919 */ jal getPlayerCount
/* 0071B8 700065B8 00008825 */ move $s1, $zero /* 0071B8 700065B8 00008825 */ move $s1, $zero
/* 0071BC 700065BC 18400014 */ blez $v0, .L70006610 /* 0071BC 700065BC 18400014 */ blez $v0, .L70006610
/* 0071C0 700065C0 00000000 */ nop /* 0071C0 700065C0 00000000 */ nop
@@ -1032,7 +1032,7 @@ glabel mainloop
/* 0071F0 700065F0 860507F6 */ lh $a1, 0x7f6($s0) /* 0071F0 700065F0 860507F6 */ lh $a1, 0x7f6($s0)
/* 0071F4 700065F4 0FC2FE00 */ jal sub_GAME_7F0BF800 /* 0071F4 700065F4 0FC2FE00 */ jal sub_GAME_7F0BF800
/* 0071F8 700065F8 00000000 */ nop /* 0071F8 700065F8 00000000 */ nop
/* 0071FC 700065FC 0FC26919 */ jal get_num_players /* 0071FC 700065FC 0FC26919 */ jal getPlayerCount
/* 007200 70006600 26310001 */ addiu $s1, $s1, 1 /* 007200 70006600 26310001 */ addiu $s1, $s1, 1
/* 007204 70006604 0222082A */ slt $at, $s1, $v0 /* 007204 70006604 0222082A */ slt $at, $s1, $v0
/* 007208 70006608 1420FFEE */ bnez $at, .L700065C4 /* 007208 70006608 1420FFEE */ bnez $at, .L700065C4
+1 -2
View File
@@ -1,5 +1,4 @@
#include "ultra64.h" #include "ultra64.h"
#include "bondgame.h" #include "bondgame.h"
u8 cfb_16_a[320*240*2]; u8 cfb_16[2][320*240*2];
u8 cfb_16_b[320*240*2];
+1 -1
View File
@@ -590,7 +590,7 @@ void set_ptr_video_buffers(s32 arg0, s32 arg1) {
* calls 70005984: A0=803B5000, A1=803DA800 * calls 70005984: A0=803B5000, A1=803DA800
*/ */
void set_video_buffer_pointers(void) { void set_video_buffer_pointers(void) {
set_ptr_video_buffers(&cfb_16_a, &cfb_16_b); set_ptr_video_buffers(&cfb_16[0], &cfb_16[1]);
} }
+58 -90
View File
@@ -1028,7 +1028,7 @@ glabel sub_GAME_7F0B3C8C
/* 0E8880 7F0B3D50 56B90049 */ bnel $s5, $t9, .L7F0B3E78 /* 0E8880 7F0B3D50 56B90049 */ bnel $s5, $t9, .L7F0B3E78
/* 0E8884 7F0B3D54 26730001 */ addiu $s3, $s3, 1 /* 0E8884 7F0B3D54 26730001 */ addiu $s3, $s3, 1
/* 0E8888 7F0B3D58 26100008 */ addiu $s0, $s0, 8 /* 0E8888 7F0B3D58 26100008 */ addiu $s0, $s0, 8
/* 0E888C 7F0B3D5C 0FC1E0DD */ jal get_BONDdata_field_10D8 /* 0E888C 7F0B3D5C 0FC1E0DD */ jal currentPlayerGetProjectionMatrix
/* 0E8890 7F0B3D60 AE340000 */ sw $s4, ($s1) /* 0E8890 7F0B3D60 AE340000 */ sw $s4, ($s1)
/* 0E8894 7F0B3D64 0C003A2C */ jal osVirtualToPhysical /* 0E8894 7F0B3D64 0C003A2C */ jal osVirtualToPhysical
/* 0E8898 7F0B3D68 00402025 */ move $a0, $v0 /* 0E8898 7F0B3D68 00402025 */ move $a0, $v0
@@ -1081,7 +1081,7 @@ glabel sub_GAME_7F0B3C8C
/* 0E8948 7F0B3E18 02008825 */ move $s1, $s0 /* 0E8948 7F0B3E18 02008825 */ move $s1, $s0
.L7F0B3E1C: .L7F0B3E1C:
/* 0E894C 7F0B3E1C AE340000 */ sw $s4, ($s1) /* 0E894C 7F0B3E1C AE340000 */ sw $s4, ($s1)
/* 0E8950 7F0B3E20 0FC1E0DD */ jal get_BONDdata_field_10D8 /* 0E8950 7F0B3E20 0FC1E0DD */ jal currentPlayerGetProjectionMatrix
/* 0E8954 7F0B3E24 26100008 */ addiu $s0, $s0, 8 /* 0E8954 7F0B3E24 26100008 */ addiu $s0, $s0, 8
/* 0E8958 7F0B3E28 0C003A2C */ jal osVirtualToPhysical /* 0E8958 7F0B3E28 0C003A2C */ jal osVirtualToPhysical
/* 0E895C 7F0B3E2C 00402025 */ move $a0, $v0 /* 0E895C 7F0B3E2C 00402025 */ move $a0, $v0
@@ -1183,7 +1183,7 @@ glabel sub_GAME_7F0B3C8C
/* 0E8ABC 7F0B3F8C 02008825 */ move $s1, $s0 /* 0E8ABC 7F0B3F8C 02008825 */ move $s1, $s0
.L7F0B3F90: .L7F0B3F90:
/* 0E8AC0 7F0B3F90 AE340000 */ sw $s4, ($s1) /* 0E8AC0 7F0B3F90 AE340000 */ sw $s4, ($s1)
/* 0E8AC4 7F0B3F94 0FC1E0DD */ jal get_BONDdata_field_10D8 /* 0E8AC4 7F0B3F94 0FC1E0DD */ jal currentPlayerGetProjectionMatrix
/* 0E8AC8 7F0B3F98 26100008 */ addiu $s0, $s0, 8 /* 0E8AC8 7F0B3F98 26100008 */ addiu $s0, $s0, 8
/* 0E8ACC 7F0B3F9C 0C003A2C */ jal osVirtualToPhysical /* 0E8ACC 7F0B3F9C 0C003A2C */ jal osVirtualToPhysical
/* 0E8AD0 7F0B3FA0 00402025 */ move $a0, $v0 /* 0E8AD0 7F0B3FA0 00402025 */ move $a0, $v0
@@ -1235,32 +1235,25 @@ glabel sub_GAME_7F0B3C8C
#ifdef NONMATCHING #ifdef NONMATCHING
s32 sub_GAME_7F0B4034(s32 arg0) { int sub_GAME_7F0B4034(int room)
s32 temp_v1;
void *phi_a0;
s32 phi_v1;
s32 phi_v1_2;
// Node 0 {
phi_v1 = arg0; bg_room_data *pbVar1;
if ((ptr_bgdata_room_fileposition_list + (arg0 * 0x18))->unk4 == 0) f32 fVar2;
if (ptr_bgdata_room_fileposition_list[room].ypos == 0.00000000)
{
fVar2 = (ptr_bgdata_room_fileposition_list[room+1].ypos;
pbVar1 = ptr_bgdata_room_fileposition_list + room;
while( true )
{ {
// Node 1 room = room + 1;
phi_a0 = (ptr_bgdata_room_fileposition_list + (arg0 * 0x18)); if (fVar2 != 0.00000000) break;
phi_v1_2 = arg0; fVar2 = pbVar1[2].ypos;
loop_2: pbVar1 = pbVar1 + 1;
// Node 2
temp_v1 = (phi_v1_2 + 1);
phi_a0 = (phi_a0 + 0x18);
phi_v1 = temp_v1;
phi_v1_2 = temp_v1;
if (phi_a0->unk1C == 0)
{
goto loop_2;
}
} }
// Node 3 }
return phi_v1; return room;
} }
#else #else
GLOBAL_ASM( GLOBAL_ASM(
@@ -1538,7 +1531,7 @@ glabel load_bg_file
/* 0E8DFC 7F0B42CC 01F40019 */ multu $t7, $s4 /* 0E8DFC 7F0B42CC 01F40019 */ multu $t7, $s4
/* 0E8E00 7F0B42D0 0000C012 */ mflo $t8 /* 0E8E00 7F0B42D0 0000C012 */ mflo $t8
/* 0E8E04 7F0B42D4 0238C821 */ addu $t9, $s1, $t8 /* 0E8E04 7F0B42D4 0238C821 */ addu $t9, $s1, $t8
/* 0E8E08 7F0B42D8 0FC2CA54 */ jal sub_GAME_7F0B2950 /* 0E8E08 7F0B42D8 0FC2CA54 */ jal setLevelScale
/* 0E8E0C 7F0B42DC C72C000C */ lwc1 $f12, 0xc($t9) /* 0E8E0C 7F0B42DC C72C000C */ lwc1 $f12, 0xc($t9)
/* 0E8E10 7F0B42E0 8E480000 */ lw $t0, ($s2) /* 0E8E10 7F0B42E0 8E480000 */ lw $t0, ($s2)
/* 0E8E14 7F0B42E4 01140019 */ multu $t0, $s4 /* 0E8E14 7F0B42E4 01140019 */ multu $t0, $s4
@@ -1562,7 +1555,7 @@ glabel load_bg_file
/* 0E8E5C 7F0B432C E6040000 */ swc1 $f4, ($s0) /* 0E8E5C 7F0B432C E6040000 */ swc1 $f4, ($s0)
/* 0E8E60 7F0B4330 0FC225DB */ jal sub_GAME_7F08976C /* 0E8E60 7F0B4330 0FC225DB */ jal sub_GAME_7F08976C
/* 0E8E64 7F0B4334 C60C0000 */ lwc1 $f12, ($s0) /* 0E8E64 7F0B4334 C60C0000 */ lwc1 $f12, ($s0)
/* 0E8E68 7F0B4338 0FC16313 */ jal sub_GAME_7F058C4C /* 0E8E68 7F0B4338 0FC16313 */ jal matrix_4x4_7F058C4C
/* 0E8E6C 7F0B433C C60C0000 */ lwc1 $f12, ($s0) /* 0E8E6C 7F0B433C C60C0000 */ lwc1 $f12, ($s0)
/* 0E8E70 7F0B4340 8EE20000 */ lw $v0, ($s7) /* 0E8E70 7F0B4340 8EE20000 */ lw $v0, ($s7)
/* 0E8E74 7F0B4344 3C038008 */ lui $v1, %hi(dword_CODE_bss_8007BF98) /* 0E8E74 7F0B4344 3C038008 */ lui $v1, %hi(dword_CODE_bss_8007BF98)
@@ -1900,7 +1893,7 @@ glabel load_bg_file
#ifdef NONMATCHING #ifdef NONMATCHING
void sub_GAME_7F0B47E0(void) { void sub_GAME_7F0B47E0(void) {
sub_GAME_7F0B667C(); sub_GAME_7F0B667C();
sub_GAME_7F058C4C(1.0); matrix_4x4_7F058C4C(1.0);
} }
#else #else
GLOBAL_ASM( GLOBAL_ASM(
@@ -1912,7 +1905,7 @@ glabel sub_GAME_7F0B47E0
/* 0E931C 7F0B47EC 00000000 */ nop /* 0E931C 7F0B47EC 00000000 */ nop
/* 0E9320 7F0B47F0 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 0E9320 7F0B47F0 3C013F80 */ li $at, 0x3F800000 # 1.000000
/* 0E9324 7F0B47F4 44816000 */ mtc1 $at, $f12 /* 0E9324 7F0B47F4 44816000 */ mtc1 $at, $f12
/* 0E9328 7F0B47F8 0FC16313 */ jal sub_GAME_7F058C4C /* 0E9328 7F0B47F8 0FC16313 */ jal matrix_4x4_7F058C4C
/* 0E932C 7F0B47FC 00000000 */ nop /* 0E932C 7F0B47FC 00000000 */ nop
/* 0E9330 7F0B4800 8FBF0014 */ lw $ra, 0x14($sp) /* 0E9330 7F0B4800 8FBF0014 */ lw $ra, 0x14($sp)
/* 0E9334 7F0B4804 27BD0018 */ addiu $sp, $sp, 0x18 /* 0E9334 7F0B4804 27BD0018 */ addiu $sp, $sp, 0x18
@@ -2137,47 +2130,22 @@ def_7F0B490C:
void addToByteSetMaxSize15(u8* set, u8 newElement) {
s32 i = 0;
while (i < 0x10 && set[i] != 0xFF) {
if (newElement == set[i]) {
return;
}
i++;
}
#ifdef NONMATCHING if (i < 0xF) {
void sub_GAME_7F0B4A50(void) { set[i] = newElement;
set[i+1] = -1;
}
return;
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F0B4A50
/* 0E9580 7F0B4A50 AFA50004 */ sw $a1, 4($sp)
/* 0E9584 7F0B4A54 908E0000 */ lbu $t6, ($a0)
/* 0E9588 7F0B4A58 240800FF */ li $t0, 255
/* 0E958C 7F0B4A5C 30A600FF */ andi $a2, $a1, 0xff
/* 0E9590 7F0B4A60 110E000C */ beq $t0, $t6, .L7F0B4A94
/* 0E9594 7F0B4A64 00001025 */ move $v0, $zero
/* 0E9598 7F0B4A68 00801821 */ addu $v1, $a0, $zero
/* 0E959C 7F0B4A6C 90850000 */ lbu $a1, ($a0)
/* 0E95A0 7F0B4A70 00C03825 */ move $a3, $a2
.L7F0B4A74:
/* 0E95A4 7F0B4A74 10E5000D */ beq $a3, $a1, .L7F0B4AAC
/* 0E95A8 7F0B4A78 24420001 */ addiu $v0, $v0, 1
/* 0E95AC 7F0B4A7C 28410010 */ slti $at, $v0, 0x10
/* 0E95B0 7F0B4A80 10200004 */ beqz $at, .L7F0B4A94
/* 0E95B4 7F0B4A84 24630001 */ addiu $v1, $v1, 1
/* 0E95B8 7F0B4A88 90650000 */ lbu $a1, ($v1)
/* 0E95BC 7F0B4A8C 1505FFF9 */ bne $t0, $a1, .L7F0B4A74
/* 0E95C0 7F0B4A90 00000000 */ nop
.L7F0B4A94:
/* 0E95C4 7F0B4A94 2841000F */ slti $at, $v0, 0xf
/* 0E95C8 7F0B4A98 10200004 */ beqz $at, .L7F0B4AAC
/* 0E95CC 7F0B4A9C 00821821 */ addu $v1, $a0, $v0
/* 0E95D0 7F0B4AA0 240F00FF */ li $t7, 255
/* 0E95D4 7F0B4AA4 A0660000 */ sb $a2, ($v1)
/* 0E95D8 7F0B4AA8 A06F0001 */ sb $t7, 1($v1)
.L7F0B4AAC:
/* 0E95DC 7F0B4AAC 03E00008 */ jr $ra
/* 0E95E0 7F0B4AB0 00000000 */ nop
)
#endif
@@ -2297,12 +2265,12 @@ glabel sub_GAME_7F0B4AB4
/* 0E975C 7F0B4C2C 02602025 */ move $a0, $s3 /* 0E975C 7F0B4C2C 02602025 */ move $a0, $s3
/* 0E9760 7F0B4C30 156C000C */ bne $t3, $t4, .L7F0B4C64 /* 0E9760 7F0B4C30 156C000C */ bne $t3, $t4, .L7F0B4C64
/* 0E9764 7F0B4C34 00000000 */ nop /* 0E9764 7F0B4C34 00000000 */ nop
/* 0E9768 7F0B4C38 0FC2D294 */ jal sub_GAME_7F0B4A50 /* 0E9768 7F0B4C38 0FC2D294 */ jal addToByteSetMaxSize15
/* 0E976C 7F0B4C3C 90650005 */ lbu $a1, 5($v1) /* 0E976C 7F0B4C3C 90650005 */ lbu $a1, 5($v1)
/* 0E9770 7F0B4C40 8EAD0000 */ lw $t5, ($s5) /* 0E9770 7F0B4C40 8EAD0000 */ lw $t5, ($s5)
/* 0E9774 7F0B4C44 02802025 */ move $a0, $s4 /* 0E9774 7F0B4C44 02802025 */ move $a0, $s4
/* 0E9778 7F0B4C48 01B27021 */ addu $t6, $t5, $s2 /* 0E9778 7F0B4C48 01B27021 */ addu $t6, $t5, $s2
/* 0E977C 7F0B4C4C 0FC2D294 */ jal sub_GAME_7F0B4A50 /* 0E977C 7F0B4C4C 0FC2D294 */ jal addToByteSetMaxSize15
/* 0E9780 7F0B4C50 91C50005 */ lbu $a1, 5($t6) /* 0E9780 7F0B4C50 91C50005 */ lbu $a1, 5($t6)
/* 0E9784 7F0B4C54 8EA80000 */ lw $t0, ($s5) /* 0E9784 7F0B4C54 8EA80000 */ lw $t0, ($s5)
/* 0E9788 7F0B4C58 A2200000 */ sb $zero, ($s1) /* 0E9788 7F0B4C58 A2200000 */ sb $zero, ($s1)
@@ -2316,12 +2284,12 @@ glabel sub_GAME_7F0B4AB4
/* 0E97A4 7F0B4C74 02602025 */ move $a0, $s3 /* 0E97A4 7F0B4C74 02602025 */ move $a0, $s3
/* 0E97A8 7F0B4C78 55F8000C */ bnel $t7, $t8, .L7F0B4CAC /* 0E97A8 7F0B4C78 55F8000C */ bnel $t7, $t8, .L7F0B4CAC
/* 0E97AC 7F0B4C7C 920A0001 */ lbu $t2, 1($s0) /* 0E97AC 7F0B4C7C 920A0001 */ lbu $t2, 1($s0)
/* 0E97B0 7F0B4C80 0FC2D294 */ jal sub_GAME_7F0B4A50 /* 0E97B0 7F0B4C80 0FC2D294 */ jal addToByteSetMaxSize15
/* 0E97B4 7F0B4C84 90650004 */ lbu $a1, 4($v1) /* 0E97B4 7F0B4C84 90650004 */ lbu $a1, 4($v1)
/* 0E97B8 7F0B4C88 8EB90000 */ lw $t9, ($s5) /* 0E97B8 7F0B4C88 8EB90000 */ lw $t9, ($s5)
/* 0E97BC 7F0B4C8C 02802025 */ move $a0, $s4 /* 0E97BC 7F0B4C8C 02802025 */ move $a0, $s4
/* 0E97C0 7F0B4C90 03324821 */ addu $t1, $t9, $s2 /* 0E97C0 7F0B4C90 03324821 */ addu $t1, $t9, $s2
/* 0E97C4 7F0B4C94 0FC2D294 */ jal sub_GAME_7F0B4A50 /* 0E97C4 7F0B4C94 0FC2D294 */ jal addToByteSetMaxSize15
/* 0E97C8 7F0B4C98 91250004 */ lbu $a1, 4($t1) /* 0E97C8 7F0B4C98 91250004 */ lbu $a1, 4($t1)
/* 0E97CC 7F0B4C9C 8EA80000 */ lw $t0, ($s5) /* 0E97CC 7F0B4C9C 8EA80000 */ lw $t0, ($s5)
/* 0E97D0 7F0B4CA0 A2200000 */ sb $zero, ($s1) /* 0E97D0 7F0B4CA0 A2200000 */ sb $zero, ($s1)
@@ -2576,8 +2544,8 @@ glabel sub_GAME_7F0B4E40
/* 0E9A9C 7F0B4F6C 35080040 */ ori $t0, (0x01030040 & 0xFFFF) # ori $t0, $t0, 0x40 /* 0E9A9C 7F0B4F6C 35080040 */ ori $t0, (0x01030040 & 0xFFFF) # ori $t0, $t0, 0x40
/* 0E9AA0 7F0B4F70 00801025 */ move $v0, $a0 /* 0E9AA0 7F0B4F70 00801025 */ move $v0, $a0
/* 0E9AA4 7F0B4F74 AC480000 */ sw $t0, ($v0) /* 0E9AA4 7F0B4F74 AC480000 */ sw $t0, ($v0)
/* 0E9AA8 7F0B4F78 3C098006 */ lui $t1, %hi(m) /* 0E9AA8 7F0B4F78 3C098006 */ lui $t1, %hi(projectionMatrix)
/* 0E9AAC 7F0B4F7C 8D290820 */ lw $t1, %lo(m)($t1) /* 0E9AAC 7F0B4F7C 8D290820 */ lw $t1, %lo(projectionMatrix)($t1)
/* 0E9AB0 7F0B4F80 24840008 */ addiu $a0, $a0, 8 /* 0E9AB0 7F0B4F80 24840008 */ addiu $a0, $a0, 8
/* 0E9AB4 7F0B4F84 0FC22F3D */ jal sub_GAME_7F08BCF4 /* 0E9AB4 7F0B4F84 0FC22F3D */ jal sub_GAME_7F08BCF4
/* 0E9AB8 7F0B4F88 AC490004 */ sw $t1, 4($v0) /* 0E9AB8 7F0B4F88 AC490004 */ sw $t1, 4($v0)
@@ -2593,7 +2561,7 @@ glabel sub_GAME_7F0B4E40
#ifdef NONMATCHING #ifdef NONMATCHING
void sub_GAME_7F0B4F9C(s32 arg0) { s32 sub_GAME_7F0B4F9C(u8 arg0) {
return (dword_CODE_bss_8007FF94 + (arg0 * 4))->unk4; return (dword_CODE_bss_8007FF94 + (arg0 * 4))->unk4;
} }
#else #else
@@ -3287,7 +3255,7 @@ void sub_GAME_7F0B5488(void *arg0, void *arg1) {
*arg1 = (f32) (*arg0 * room_data_float2); *arg1 = (f32) (*arg0 * room_data_float2);
arg1->unk4 = (f32) (arg0->unk4 * room_data_float2); arg1->unk4 = (f32) (arg0->unk4 * room_data_float2);
arg1->unk8 = (f32) (arg0->unk8 * room_data_float2); arg1->unk8 = (f32) (arg0->unk8 * room_data_float2);
matrix_4x4_transform_vector_in_place(get_BONDdata_field_10CC(), arg1, arg0); matrix_4x4_transform_vector_in_place(currentPlayerGetMatrix10CC(), arg1, arg0);
sub_GAME_7F078060(arg1, arg1); sub_GAME_7F078060(arg1, arg1);
if (0.0f < arg1->unk8) if (0.0f < arg1->unk8)
{ {
@@ -3304,7 +3272,7 @@ glabel sub_GAME_7F0B5488
/* 0E9FBC 7F0B548C AFBF001C */ sw $ra, 0x1c($sp) /* 0E9FBC 7F0B548C AFBF001C */ sw $ra, 0x1c($sp)
/* 0E9FC0 7F0B5490 AFB00018 */ sw $s0, 0x18($sp) /* 0E9FC0 7F0B5490 AFB00018 */ sw $s0, 0x18($sp)
/* 0E9FC4 7F0B5494 00A08025 */ move $s0, $a1 /* 0E9FC4 7F0B5494 00A08025 */ move $s0, $a1
/* 0E9FC8 7F0B5498 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 0E9FC8 7F0B5498 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 0E9FCC 7F0B549C AFA40020 */ sw $a0, 0x20($sp) /* 0E9FCC 7F0B549C AFA40020 */ sw $a0, 0x20($sp)
/* 0E9FD0 7F0B54A0 8FA60020 */ lw $a2, 0x20($sp) /* 0E9FD0 7F0B54A0 8FA60020 */ lw $a2, 0x20($sp)
/* 0E9FD4 7F0B54A4 3C038004 */ lui $v1, %hi(room_data_float2) /* 0E9FD4 7F0B54A4 3C038004 */ lui $v1, %hi(room_data_float2)
@@ -3375,7 +3343,7 @@ glabel sub_GAME_7F0B5528
/* 0EA08C 7F0B555C AFB00030 */ sw $s0, 0x30($sp) /* 0EA08C 7F0B555C AFB00030 */ sw $s0, 0x30($sp)
/* 0EA090 7F0B5560 F7B80028 */ sdc1 $f24, 0x28($sp) /* 0EA090 7F0B5560 F7B80028 */ sdc1 $f24, 0x28($sp)
/* 0EA094 7F0B5564 F7B60020 */ sdc1 $f22, 0x20($sp) /* 0EA094 7F0B5564 F7B60020 */ sdc1 $f22, 0x20($sp)
/* 0EA098 7F0B5568 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 0EA098 7F0B5568 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 0EA09C 7F0B556C AFA400B0 */ sw $a0, 0xb0($sp) /* 0EA09C 7F0B556C AFA400B0 */ sw $a0, 0xb0($sp)
/* 0EA0A0 7F0B5570 AFA200AC */ sw $v0, 0xac($sp) /* 0EA0A0 7F0B5570 AFA200AC */ sw $v0, 0xac($sp)
/* 0EA0A4 7F0B5574 241E0001 */ li $fp, 1 /* 0EA0A4 7F0B5574 241E0001 */ li $fp, 1
@@ -9794,7 +9762,7 @@ f32 sub_GAME_7F0B908C(void) {
sp24 = (f32) D_80041404.unk4; sp24 = (f32) D_80041404.unk4;
sp28 = (f32) ((f32) D_8004140C + (f32) get_video2_settings_txtClipW()); sp28 = (f32) ((f32) D_8004140C + (f32) get_video2_settings_txtClipW());
sp20 = (f32) ((f32) D_80041410 + (f32) get_video2_settings_txtClipH()); sp20 = (f32) ((f32) D_80041410 + (f32) get_video2_settings_txtClipH());
pPlayer->unk1118 = (f32) get_video2_settings_ulx(); pPlayer->unk1118 = (f32) viGetViewLeft();
if (pPlayer->unk1118 < sp2C) if (pPlayer->unk1118 < sp2C)
{ {
// Node 1 // Node 1
@@ -9807,7 +9775,7 @@ f32 sub_GAME_7F0B908C(void) {
pPlayer->unk1118 = sp28; pPlayer->unk1118 = sp28;
} }
// Node 4 // Node 4
pPlayer->unk111C = (f32) get_video2_settings_uly(sp28, &pPlayer); pPlayer->unk111C = (f32) viGetViewTop(sp28, &pPlayer);
if (pPlayer->unk111C < sp24) if (pPlayer->unk111C < sp24)
{ {
// Node 5 // Node 5
@@ -9820,8 +9788,8 @@ f32 sub_GAME_7F0B908C(void) {
pPlayer->unk111C = sp20; pPlayer->unk111C = sp20;
} }
// Node 8 // Node 8
sp1E = get_video2_settings_ulx(sp20, &pPlayer); sp1E = viGetViewLeft(sp20, &pPlayer);
pPlayer->unk1120 = (f32) (get_video2_settings_width() + sp1E); pPlayer->unk1120 = (f32) (viGetViewWidth() + sp1E);
if (pPlayer->unk1120 < sp2C) if (pPlayer->unk1120 < sp2C)
{ {
// Node 9 // Node 9
@@ -9834,8 +9802,8 @@ f32 sub_GAME_7F0B908C(void) {
pPlayer->unk1120 = sp28; pPlayer->unk1120 = sp28;
} }
// Node 12 // Node 12
sp1E = get_video2_settings_uly(&pPlayer); sp1E = viGetViewTop(&pPlayer);
pPlayer->unk1124 = (f32) (get_video2_settings_height() + sp1E); pPlayer->unk1124 = (f32) (viGetViewHeight() + sp1E);
if (pPlayer->unk1124 < sp24) if (pPlayer->unk1124 < sp24)
{ {
// Node 13 // Node 13
@@ -9883,7 +9851,7 @@ glabel sub_GAME_7F0B908C
/* 0EDC24 7F0B90F4 468024A0 */ cvt.s.w $f18, $f4 /* 0EDC24 7F0B90F4 468024A0 */ cvt.s.w $f18, $f4
/* 0EDC28 7F0B90F8 46805420 */ cvt.s.w $f16, $f10 /* 0EDC28 7F0B90F8 46805420 */ cvt.s.w $f16, $f10
/* 0EDC2C 7F0B90FC 46128180 */ add.s $f6, $f16, $f18 /* 0EDC2C 7F0B90FC 46128180 */ add.s $f6, $f16, $f18
/* 0EDC30 7F0B9100 0C001145 */ jal get_video2_settings_ulx /* 0EDC30 7F0B9100 0C001145 */ jal viGetViewLeft
/* 0EDC34 7F0B9104 E7A60020 */ swc1 $f6, 0x20($sp) /* 0EDC34 7F0B9104 E7A60020 */ swc1 $f6, 0x20($sp)
/* 0EDC38 7F0B9108 44824000 */ mtc1 $v0, $f8 /* 0EDC38 7F0B9108 44824000 */ mtc1 $v0, $f8
/* 0EDC3C 7F0B910C 3C048008 */ lui $a0, %hi(pPlayer) /* 0EDC3C 7F0B910C 3C048008 */ lui $a0, %hi(pPlayer)
@@ -9909,7 +9877,7 @@ glabel sub_GAME_7F0B908C
/* 0EDC88 7F0B9158 00000000 */ nop /* 0EDC88 7F0B9158 00000000 */ nop
/* 0EDC8C 7F0B915C E46C1118 */ swc1 $f12, 0x1118($v1) /* 0EDC8C 7F0B915C E46C1118 */ swc1 $f12, 0x1118($v1)
.L7F0B9160: .L7F0B9160:
/* 0EDC90 7F0B9160 0C001149 */ jal get_video2_settings_uly /* 0EDC90 7F0B9160 0C001149 */ jal viGetViewTop
/* 0EDC94 7F0B9164 00000000 */ nop /* 0EDC94 7F0B9164 00000000 */ nop
/* 0EDC98 7F0B9168 44822000 */ mtc1 $v0, $f4 /* 0EDC98 7F0B9168 44822000 */ mtc1 $v0, $f4
/* 0EDC9C 7F0B916C 3C048008 */ lui $a0, %hi(pPlayer) /* 0EDC9C 7F0B916C 3C048008 */ lui $a0, %hi(pPlayer)
@@ -9935,9 +9903,9 @@ glabel sub_GAME_7F0B908C
/* 0EDCE8 7F0B91B8 00000000 */ nop /* 0EDCE8 7F0B91B8 00000000 */ nop
/* 0EDCEC 7F0B91BC E46C111C */ swc1 $f12, 0x111c($v1) /* 0EDCEC 7F0B91BC E46C111C */ swc1 $f12, 0x111c($v1)
.L7F0B91C0: .L7F0B91C0:
/* 0EDCF0 7F0B91C0 0C001145 */ jal get_video2_settings_ulx /* 0EDCF0 7F0B91C0 0C001145 */ jal viGetViewLeft
/* 0EDCF4 7F0B91C4 00000000 */ nop /* 0EDCF4 7F0B91C4 00000000 */ nop
/* 0EDCF8 7F0B91C8 0C001127 */ jal get_video2_settings_width /* 0EDCF8 7F0B91C8 0C001127 */ jal viGetViewWidth
/* 0EDCFC 7F0B91CC A7A2001E */ sh $v0, 0x1e($sp) /* 0EDCFC 7F0B91CC A7A2001E */ sh $v0, 0x1e($sp)
/* 0EDD00 7F0B91D0 87AA001E */ lh $t2, 0x1e($sp) /* 0EDD00 7F0B91D0 87AA001E */ lh $t2, 0x1e($sp)
/* 0EDD04 7F0B91D4 3C048008 */ lui $a0, %hi(pPlayer) /* 0EDD04 7F0B91D4 3C048008 */ lui $a0, %hi(pPlayer)
@@ -9965,9 +9933,9 @@ glabel sub_GAME_7F0B908C
/* 0EDD58 7F0B9228 00000000 */ nop /* 0EDD58 7F0B9228 00000000 */ nop
/* 0EDD5C 7F0B922C E46A1120 */ swc1 $f10, 0x1120($v1) /* 0EDD5C 7F0B922C E46A1120 */ swc1 $f10, 0x1120($v1)
.L7F0B9230: .L7F0B9230:
/* 0EDD60 7F0B9230 0C001149 */ jal get_video2_settings_uly /* 0EDD60 7F0B9230 0C001149 */ jal viGetViewTop
/* 0EDD64 7F0B9234 00000000 */ nop /* 0EDD64 7F0B9234 00000000 */ nop
/* 0EDD68 7F0B9238 0C00112B */ jal get_video2_settings_height /* 0EDD68 7F0B9238 0C00112B */ jal viGetViewHeight
/* 0EDD6C 7F0B923C A7A2001E */ sh $v0, 0x1e($sp) /* 0EDD6C 7F0B923C A7A2001E */ sh $v0, 0x1e($sp)
/* 0EDD70 7F0B9240 87AD001E */ lh $t5, 0x1e($sp) /* 0EDD70 7F0B9240 87AD001E */ lh $t5, 0x1e($sp)
/* 0EDD74 7F0B9244 3C048008 */ lui $a0, %hi(pPlayer) /* 0EDD74 7F0B9244 3C048008 */ lui $a0, %hi(pPlayer)
+3
View File
@@ -42,4 +42,7 @@ typedef struct s_room_info {
void bgInitDebugNoticeList(void); void bgInitDebugNoticeList(void);
s32 sub_GAME_7F0B8FD0(u8 roomA, u8 roomB);
s32 sub_GAME_7F0B4F9C(u8 room); // u8 not s32 for sub_GAME_7F0B2FE0
#endif #endif
+8 -8
View File
@@ -737,15 +737,15 @@ glabel sub_GAME_7F01C670
/* 051384 7F01C854 AC6F0004 */ sw $t7, 4($v1) /* 051384 7F01C854 AC6F0004 */ sw $t7, 4($v1)
/* 051388 7F01C858 26100008 */ addiu $s0, $s0, 8 /* 051388 7F01C858 26100008 */ addiu $s0, $s0, 8
/* 05138C 7F01C85C AFB00040 */ sw $s0, 0x40($sp) /* 05138C 7F01C85C AFB00040 */ sw $s0, 0x40($sp)
/* 051390 7F01C860 0C001127 */ jal get_video2_settings_width /* 051390 7F01C860 0C001127 */ jal viGetViewWidth
/* 051394 7F01C864 26100008 */ addiu $s0, $s0, 8 /* 051394 7F01C864 26100008 */ addiu $s0, $s0, 8
/* 051398 7F01C868 0C001145 */ jal get_video2_settings_ulx /* 051398 7F01C868 0C001145 */ jal viGetViewLeft
/* 05139C 7F01C86C A7A20026 */ sh $v0, 0x26($sp) /* 05139C 7F01C86C A7A20026 */ sh $v0, 0x26($sp)
/* 0513A0 7F01C870 0C001149 */ jal get_video2_settings_uly /* 0513A0 7F01C870 0C001149 */ jal viGetViewTop
/* 0513A4 7F01C874 A7A20028 */ sh $v0, 0x28($sp) /* 0513A4 7F01C874 A7A20028 */ sh $v0, 0x28($sp)
/* 0513A8 7F01C878 00028C00 */ sll $s1, $v0, 0x10 /* 0513A8 7F01C878 00028C00 */ sll $s1, $v0, 0x10
/* 0513AC 7F01C87C 0011C403 */ sra $t8, $s1, 0x10 /* 0513AC 7F01C87C 0011C403 */ sra $t8, $s1, 0x10
/* 0513B0 7F01C880 0C00112B */ jal get_video2_settings_height /* 0513B0 7F01C880 0C00112B */ jal viGetViewHeight
/* 0513B4 7F01C884 03008825 */ move $s1, $t8 /* 0513B4 7F01C884 03008825 */ move $s1, $t8
/* 0513B8 7F01C888 87B90028 */ lh $t9, 0x28($sp) /* 0513B8 7F01C888 87B90028 */ lh $t9, 0x28($sp)
/* 0513BC 7F01C88C 87A80026 */ lh $t0, 0x26($sp) /* 0513BC 7F01C88C 87A80026 */ lh $t0, 0x26($sp)
@@ -762,11 +762,11 @@ glabel sub_GAME_7F01C670
/* 0513E8 7F01C8B8 03214025 */ or $t0, $t9, $at /* 0513E8 7F01C8B8 03214025 */ or $t0, $t9, $at
/* 0513EC 7F01C8BC 000C6B00 */ sll $t5, $t4, 0xc /* 0513EC 7F01C8BC 000C6B00 */ sll $t5, $t4, 0xc
/* 0513F0 7F01C8C0 010D4825 */ or $t1, $t0, $t5 /* 0513F0 7F01C8C0 010D4825 */ or $t1, $t0, $t5
/* 0513F4 7F01C8C4 0C001145 */ jal get_video2_settings_ulx /* 0513F4 7F01C8C4 0C001145 */ jal viGetViewLeft
/* 0513F8 7F01C8C8 AD490000 */ sw $t1, ($t2) /* 0513F8 7F01C8C8 AD490000 */ sw $t1, ($t2)
/* 0513FC 7F01C8CC 00028C00 */ sll $s1, $v0, 0x10 /* 0513FC 7F01C8CC 00028C00 */ sll $s1, $v0, 0x10
/* 051400 7F01C8D0 00115C03 */ sra $t3, $s1, 0x10 /* 051400 7F01C8D0 00115C03 */ sra $t3, $s1, 0x10
/* 051404 7F01C8D4 0C001149 */ jal get_video2_settings_uly /* 051404 7F01C8D4 0C001149 */ jal viGetViewTop
/* 051408 7F01C8D8 01608825 */ move $s1, $t3 /* 051408 7F01C8D8 01608825 */ move $s1, $t3
/* 05140C 7F01C8DC 00117880 */ sll $t7, $s1, 2 /* 05140C 7F01C8DC 00117880 */ sll $t7, $s1, 2
/* 051410 7F01C8E0 8FAD0040 */ lw $t5, 0x40($sp) /* 051410 7F01C8E0 8FAD0040 */ lw $t5, 0x40($sp)
@@ -785,11 +785,11 @@ glabel sub_GAME_7F01C670
/* 051444 7F01C914 3C0AB300 */ lui $t2, 0xb300 /* 051444 7F01C914 3C0AB300 */ lui $t2, 0xb300
/* 051448 7F01C918 AC8A0000 */ sw $t2, ($a0) /* 051448 7F01C918 AC8A0000 */ sw $t2, ($a0)
/* 05144C 7F01C91C AFA40038 */ sw $a0, 0x38($sp) /* 05144C 7F01C91C AFA40038 */ sw $a0, 0x38($sp)
/* 051450 7F01C920 0C001127 */ jal get_video2_settings_width /* 051450 7F01C920 0C001127 */ jal viGetViewWidth
/* 051454 7F01C924 26100008 */ addiu $s0, $s0, 8 /* 051454 7F01C924 26100008 */ addiu $s0, $s0, 8
/* 051458 7F01C928 00028C00 */ sll $s1, $v0, 0x10 /* 051458 7F01C928 00028C00 */ sll $s1, $v0, 0x10
/* 05145C 7F01C92C 00115C03 */ sra $t3, $s1, 0x10 /* 05145C 7F01C92C 00115C03 */ sra $t3, $s1, 0x10
/* 051460 7F01C930 0C00112B */ jal get_video2_settings_height /* 051460 7F01C930 0C00112B */ jal viGetViewHeight
/* 051464 7F01C934 01608825 */ move $s1, $t3 /* 051464 7F01C934 01608825 */ move $s1, $t3
/* 051468 7F01C938 3C0C0001 */ lui $t4, (0x00014000 >> 16) # lui $t4, 1 /* 051468 7F01C938 3C0C0001 */ lui $t4, (0x00014000 >> 16) # lui $t4, 1
/* 05146C 7F01C93C 358C4000 */ ori $t4, (0x00014000 & 0xFFFF) # ori $t4, $t4, 0x4000 /* 05146C 7F01C93C 358C4000 */ ori $t4, (0x00014000 & 0xFFFF) # ori $t4, $t4, 0x4000
+834 -3037
View File
File diff suppressed because it is too large. Load diff
+102 -132
View File
@@ -3,8 +3,10 @@
#include "ultra64.h" #include "ultra64.h"
#include "game/chr.h" #include "game/chr.h"
#include "game/matrixmath.h"
#include "structs.h"
struct xyzpoint struct coord
{ {
f32 x; f32 x;
f32 y; f32 y;
@@ -299,31 +301,27 @@ typedef struct textoverride {
} textoverride; } textoverride;
struct Player struct player
{ {
s32 unknown; s32 unknown;
s32 xpos; f32 xpos;
s32 ypos; f32 ypos;
s32 zpos; f32 zpos;
s32 xpos2; f32 xpos2;
s32 ypos2; f32 ypos2;
s32 zpos2; f32 zpos2;
s32 xoffset; f32 xoffset;
s32 yoffset; f32 yoffset;
s32 zoffset; f32 zoffset;
s32 xpos3; f32 xpos3;
s32 ypos3; f32 ypos3;
s32 zpos3; f32 zpos3;
s32 room_pointer; s32 room_pointer;
s32 current_model_xpos; vec3 current_model_pos;
s32 current_model_ypos; vec3 previous_model_pos;
s32 current_model_zpos; f32 current_room_xpos;
s32 previous_model_xpos; f32 current_room_ypos;
s32 previous_model_ypos; f32 current_room_zpos;
s32 previous_model_zpos;
s32 current_room_xpos;
s32 current_room_ypos;
s32 current_room_zpos;
s32 field_5C; s32 field_5C;
s32 field_60; s32 field_60;
s32 field_64; s32 field_64;
@@ -334,16 +332,16 @@ struct Player
s32 field_78; s32 field_78;
s32 field_7C; s32 field_7C;
s32 field_80; s32 field_80;
s32 field_84; f32 field_84;
s32 field_88; f32 field_88;
s32 field_8C; s32 field_8C;
s32 field_90; f32 field_90;
s32 field_94; s32 field_94;
s32 field_98; f32 field_98;
s32 crouchposition; s32 crouchpos;
s32 ducking_height_offset; f32 ducking_height_offset;
s32 field_A4; f32 field_A4;
s32 position_data_pointer; struct prop* prop;
s32 field_AC; s32 field_AC;
s32 field_B0; s32 field_B0;
s32 zpos_0; s32 zpos_0;
@@ -356,12 +354,12 @@ struct Player
s32 field_D0; s32 field_D0;
s32 ptr_char_objectinstance; s32 ptr_char_objectinstance;
s32 bonddead; s32 bonddead;
s32 bondhealth; f32 bondhealth;
f32 bondarmour; f32 bondarmour;
s32 oldhealth; f32 oldhealth;
s32 oldarmour; f32 oldarmour;
s32 apparenthealth; f32 apparenthealth;
s32 apparentarmour; f32 apparentarmour;
s32 damageshowtime; s32 damageshowtime;
s32 healthshowtime; s32 healthshowtime;
s32 healthshowmode; s32 healthshowmode;
@@ -385,26 +383,26 @@ struct Player
s32 autoxaimtime60; s32 autoxaimtime60;
f32 vv_theta; f32 vv_theta;
f32 speedtheta; f32 speedtheta;
s32 vv_costheta; f32 vv_costheta;
s32 vv_sintheta; f32 vv_sintheta;
f32 vv_verta; f32 vv_verta;
s32 vv_verta360; f32 vv_verta360;
f32 speedverta; f32 speedverta;
s32 vv_cosverta; f32 vv_cosverta;
s32 vv_sinverta; f32 vv_sinverta;
f32 speedsideways; f32 speedsideways;
f32 speedstrafe; f32 speedstrafe;
f32 speedforwards; f32 speedforwards;
s32 speedboost; f32 speedboost;
s32 speedmaxtime60; s32 speedmaxtime60;
s32 boost_factor_x; f32 boost_factor_x;
s32 boost_factor_y; f32 boost_factor_y;
s32 boost_factor_z; f32 boost_factor_z;
s32 viewport_alpha; f32 bondfadetime60;
s32 bondfadetime60; f32 bondfadetimemax60;
s32 bondfadetimemax; f32 bondfadefracold;
s32 bondfadefracold;
f32 bondfadefracnew; f32 bondfadefracnew;
f32 field_19C;
s32 field_1A0; s32 field_1A0;
s32 field_1A4; s32 field_1A4;
s32 field_1A8; s32 field_1A8;
@@ -431,14 +429,14 @@ struct Player
s32 field_1FC; s32 field_1FC;
s32 pausing_flag; s32 pausing_flag;
f32 pause_starting_angle; f32 pause_starting_angle;
s32 field_208; f32 field_208;
s32 pause_target_angle; f32 pause_target_angle;
f32 field_210; f32 field_210;
f32 field_214; f32 field_214;
s32 field_218; s32 field_218;
s32 field_21C; s32 field_21C;
s32 step_in_view_watch_animation; s32 step_in_view_watch_animation;
s32 pause_animation_counter; f32 pause_animation_counter;
s32 field_228; s32 field_228;
s32 field_22C; s32 field_22C;
s32 something_with_watch_object_instance; s32 something_with_watch_object_instance;
@@ -543,23 +541,23 @@ struct Player
s32 field_3B8; s32 field_3B8;
s32 field_3BC; s32 field_3BC;
s32 field_3C0; s32 field_3C0;
s32 field_3C4; f32 field_3C4;
s32 field_3C8; f32 field_3C8;
s32 field_3CC; f32 field_3CC;
s32 tint_red; s32 colourscreenred;
s32 tint_green; s32 colourscreengreen;
s32 tint_blue; s32 colourscreenblue;
f32 tint_alpha; f32 colourscreenfrac;
s32 screen_fade_timer; f32 colourfadetime60;
f32 screen_fade_max_time; f32 colourfadetimemax60;
s32 field_3E8; s32 colourfaderedold;
s32 field_3EC; s32 colourfaderednew;
s32 field_3F0; s32 colourfadegreenold;
s32 field_3F4; s32 colourfadegreennew;
s32 field_3F8; s32 colourfadeblueold;
s32 field_3FC; s32 colourfadebluenew;
s32 field_400; f32 colourfadefracold;
s32 field_404; f32 colourfadefracnew;
s32 field_408; s32 field_408;
s32 field_40C; s32 field_40C;
s32 field_410; s32 field_410;
@@ -613,32 +611,20 @@ struct Player
s32 field_4D0; s32 field_4D0;
s32 field_4D4; s32 field_4D4;
s32 current_tile_ptr_for_portals; s32 current_tile_ptr_for_portals;
s32 field_4DC; u32 resetheadpos; // bool
s32 field_4E0; u32 resetheadrot; // bool
s32 field_4E4; s32 field_4E4;
s32 field_4E8; s32 field_4E8;
f32 field_4EC; f32 headdamp;
s32 field_4F0; s32 field_4F0;
s32 field_4F4; s32 field_4F4;
s32 field_4F8; s32 field_4F8;
struct xyzpoint scaled_velocity; vec3 headpos;
//f32 field_500; vec3 headlook;
//f32 field_504; vec3 headup;
struct xyzpoint field_508; vec3 headpossum;
//s32 field_50C; vec3 headlooksum;
//s32 field_510; vec3 headupsum;
struct xyzpoint field_514;
//s32 field_518;
//s32 field_51C;
struct xyzpoint velocity;
//f32 field_524;
//f32 field_528;
struct xyzpoint field_52C;
//s32 field_530;
//s32 field_534;
struct xyzpoint field_538;
//s32 field_53C;
//s32 field_540;
s32 field_544; s32 field_544;
s32 field_548; s32 field_548;
s32 field_54C; s32 field_54C;
@@ -647,19 +633,9 @@ struct Player
s32 field_558; s32 field_558;
s32 field_55C; s32 field_55C;
s32 field_560; s32 field_560;
s32 field_564; vec3 standlook[2];
s32 field_568; vec3 standup[2];
s32 field_56C; s32 standcnt;
s32 field_570;
s32 field_574;
s32 field_578;
s32 field_57C;
s32 field_580;
s32 field_584;
s32 field_588;
s32 field_58C;
s32 field_590;
s32 field_594;
s32 field_598; s32 field_598;
s32 field_59C; s32 field_59C;
s32 field_5A0; s32 field_5A0;
@@ -805,14 +781,7 @@ struct Player
s32 field_7C4; s32 field_7C4;
s32 field_7C8; s32 field_7C8;
s32 field_7CC; s32 field_7CC;
s32 field_7D0; Vp viewports[2];
s32 field_7D4;
s32 field_7D8;
s32 field_7DC;
s32 field_7E0;
s32 field_7E4;
s32 field_7E8;
s32 field_7EC;
s16 viewx; s16 viewx;
s16 viewy; s16 viewy;
s16 viewleft; s16 viewleft;
@@ -899,24 +868,23 @@ struct Player
f32 c_scaley; f32 c_scaley;
f32 c_recipscalex; f32 c_recipscalex;
f32 c_recipscaley; f32 c_recipscaley;
s32 field_10C4; Mtx* field_10C4;
s32 field_10C8; Mtx* field_10C8;
s32 field_10CC; Mtxf* field_10CC;
s32 field_10D0; s32 field_10D0; // ptr
s32 field_10D4; Mtxf* field_10D4;
s32 field_10D8; Mtx* projmatrix;
s32 field_10DC; Mtxf* projmatrixf;
s32 field_10E0; s32 field_10E0; // ptr
s32 field_10E4; s32 field_10E4; // ptr
s32 field_10E8; Mtxf* field_10E8;
s32 field_10EC; Mtxf* field_10EC;
f32 c_scalelod60; f32 c_scalelod60;
f32 c_scalelod; f32 c_scalelod;
f32 c_lodscalez; f32 c_lodscalez;
u32 c_lodscalezu32; u32 c_lodscalezu32;
struct xyzpoint c_cameratopnorm; struct coord c_cameratopnorm;
struct xyzpoint c_cameraleftnorm; struct coord c_cameraleftnorm;
f32 screenxminf; f32 screenxminf;
f32 screenyminf; f32 screenyminf;
f32 screenxmaxf; f32 screenxmaxf;
@@ -1004,9 +972,9 @@ struct Player
s32 field_1268; s32 field_1268;
s32 field_126C; s32 field_126C;
s32 field_1270; s32 field_1270;
s32 field_1274; f32 swaytarget;
s32 field_1278; f32 field_1278;
s32 field_127C; f32 field_127C;
s32 field_1280; s32 field_1280;
s32 players_cur_animation; s32 players_cur_animation;
s32 field_1288; s32 field_1288;
@@ -2498,7 +2466,7 @@ struct Player
s32 field_29B4; s32 field_29B4;
s32 field_29B8; s32 field_29B8;
s32 field_29BC; s32 field_29BC;
s32 field_29C0; f32 field_29C0;
s32 mpmenuon; s32 mpmenuon;
s32 mpmenumode; s32 mpmenumode;
s32 mpquitconfirm; s32 mpquitconfirm;
@@ -2513,11 +2481,11 @@ struct Player
s32 field_29F0; s32 field_29F0;
s32 field_29F4; s32 field_29F4;
s32 field_29F8; s32 field_29F8;
s32 field_29FC; s32 autocrouchpos;
s32 healthdisplaytime; s32 healthdisplaytime;
s16 field_2A04; s16 field_2A04;
s32 field_2A08; f32 field_2A08;
s32 field_2A0C; f32 field_2A0C;
s32 ptr_text_first_mp_award; s32 ptr_text_first_mp_award;
s32 ptr_text_second_mp_award; s32 ptr_text_second_mp_award;
s32 field_2A18; s32 field_2A18;
@@ -2873,4 +2841,6 @@ void sub_GAME_7F07E46C(f32 param);
void trigger_watch_zoom(f32 final, f32 time); void trigger_watch_zoom(f32 final, f32 time);
struct prop* get_curplayer_positiondata(void);
#endif #endif
+8 -8
View File
@@ -288,7 +288,7 @@ s32 check_if_item_for_hand_available(ITEM_IDS item,int hand)
{ {
#ifdef VERSION_US #ifdef VERSION_US
if (((pPlayer->equipallguns && (item < ITEM_BOMBCASE)) && if (((pPlayer->equipallguns && (item < ITEM_BOMBCASE)) &&
(item == hand)) && ((get_num_players() == 1 && (item == hand)) && ((getPlayerCount() == 1 &&
(bondwalkItemCheckBitflags(item,0x100000) != 0)))) (bondwalkItemCheckBitflags(item,0x100000) != 0))))
{ {
return 1; return 1;
@@ -303,7 +303,7 @@ s32 check_if_item_for_hand_available(ITEM_IDS item,int hand)
else else
{ {
if ((((pPlayer->equipallguns != 0) && (item < ITEM_BOMBCASE)) && if ((((pPlayer->equipallguns != 0) && (item < ITEM_BOMBCASE)) &&
(item == hand)) && (((get_num_players() == 1 && (item == hand)) && (((getPlayerCount() == 1 &&
(bondwalkItemCheckBitflags(item,0x100000) != 0)) && (bondwalkItemCheckBitflags(item,0x100000) != 0)) &&
((j_text_trigger == 0 || (item != ITEM_KNIFE)))))) ((j_text_trigger == 0 || (item != ITEM_KNIFE))))))
{ {
@@ -716,7 +716,7 @@ glabel sub_GAME_7F08C86C
/* 0C14CC 7F08C99C 8FA90028 */ lw $t1, 0x28($sp) /* 0C14CC 7F08C99C 8FA90028 */ lw $t1, 0x28($sp)
/* 0C14D0 7F08C9A0 51000051 */ beql $t0, $zero, .L7F08CAE8 /* 0C14D0 7F08C9A0 51000051 */ beql $t0, $zero, .L7F08CAE8
/* 0C14D4 7F08C9A4 8FAB0028 */ lw $t3, 0x28($sp) /* 0C14D4 7F08C9A4 8FAB0028 */ lw $t3, 0x28($sp)
/* 0C14D8 7F08C9A8 0FC26919 */ jal get_num_players /* 0C14D8 7F08C9A8 0FC26919 */ jal getPlayerCount
/* 0C14DC 7F08C9AC 8D300000 */ lw $s0, ($t1) /* 0C14DC 7F08C9AC 8D300000 */ lw $s0, ($t1)
/* 0C14E0 7F08C9B0 24010001 */ li $at, 1 /* 0C14E0 7F08C9B0 24010001 */ li $at, 1
/* 0C14E4 7F08C9B4 5441001E */ bnel $v0, $at, .L7F08CA30 /* 0C14E4 7F08C9B4 5441001E */ bnel $v0, $at, .L7F08CA30
@@ -914,7 +914,7 @@ glabel sub_GAME_7F08C86C
/* 0C1E04 7F08D294 8FA90028 */ lw $t1, 0x28($sp) /* 0C1E04 7F08D294 8FA90028 */ lw $t1, 0x28($sp)
/* 0C1E08 7F08D298 5100005E */ beql $t0, $zero, .Ljp7F08D414 /* 0C1E08 7F08D298 5100005E */ beql $t0, $zero, .Ljp7F08D414
/* 0C1E0C 7F08D29C 8FAD0028 */ lw $t5, 0x28($sp) /* 0C1E0C 7F08D29C 8FAD0028 */ lw $t5, 0x28($sp)
/* 0C1E10 7F08D2A0 0FC26C01 */ jal get_num_players /* 0C1E10 7F08D2A0 0FC26C01 */ jal getPlayerCount
/* 0C1E14 7F08D2A4 8D300000 */ lw $s0, ($t1) /* 0C1E14 7F08D2A4 8D300000 */ lw $s0, ($t1)
/* 0C1E18 7F08D2A8 24010001 */ li $at, 1 /* 0C1E18 7F08D2A8 24010001 */ li $at, 1
/* 0C1E1C 7F08D2AC 14410023 */ bne $v0, $at, .Ljp7F08D33C /* 0C1E1C 7F08D2AC 14410023 */ bne $v0, $at, .Ljp7F08D33C
@@ -1183,7 +1183,7 @@ glabel sub_GAME_7F08CB10
.L7F08CCE4: .L7F08CCE4:
/* 0C1814 7F08CCE4 1611001E */ bne $s0, $s1, .L7F08CD60 /* 0C1814 7F08CCE4 1611001E */ bne $s0, $s1, .L7F08CD60
/* 0C1818 7F08CCE8 00000000 */ nop /* 0C1818 7F08CCE8 00000000 */ nop
/* 0C181C 7F08CCEC 0FC26919 */ jal get_num_players /* 0C181C 7F08CCEC 0FC26919 */ jal getPlayerCount
/* 0C1820 7F08CCF0 00000000 */ nop /* 0C1820 7F08CCF0 00000000 */ nop
/* 0C1824 7F08CCF4 24010001 */ li $at, 1 /* 0C1824 7F08CCF4 24010001 */ li $at, 1
/* 0C1828 7F08CCF8 14410052 */ bne $v0, $at, .L7F08CE44 /* 0C1828 7F08CCF8 14410052 */ bne $v0, $at, .L7F08CE44
@@ -1222,7 +1222,7 @@ glabel sub_GAME_7F08CB10
/* 0C18A0 7F08CD70 10400018 */ beqz $v0, .L7F08CDD4 /* 0C18A0 7F08CD70 10400018 */ beqz $v0, .L7F08CDD4
/* 0C18A4 7F08CD74 24030021 */ li $v1, 33 /* 0C18A4 7F08CD74 24030021 */ li $v1, 33
.L7F08CD78: .L7F08CD78:
/* 0C18A8 7F08CD78 0FC26919 */ jal get_num_players /* 0C18A8 7F08CD78 0FC26919 */ jal getPlayerCount
/* 0C18AC 7F08CD7C 00000000 */ nop /* 0C18AC 7F08CD7C 00000000 */ nop
/* 0C18B0 7F08CD80 24010001 */ li $at, 1 /* 0C18B0 7F08CD80 24010001 */ li $at, 1
/* 0C18B4 7F08CD84 14410010 */ bne $v0, $at, .L7F08CDC8 /* 0C18B4 7F08CD84 14410010 */ bne $v0, $at, .L7F08CDC8
@@ -1436,7 +1436,7 @@ glabel sub_GAME_7F08CB10
.Ljp7F08D614: .Ljp7F08D614:
/* 0C2184 7F08D614 16110024 */ bne $s0, $s1, .Ljp7F08D6A8 /* 0C2184 7F08D614 16110024 */ bne $s0, $s1, .Ljp7F08D6A8
/* 0C2188 7F08D618 00000000 */ nop /* 0C2188 7F08D618 00000000 */ nop
/* 0C218C 7F08D61C 0FC26C01 */ jal get_num_players /* 0C218C 7F08D61C 0FC26C01 */ jal getPlayerCount
/* 0C2190 7F08D620 00000000 */ nop /* 0C2190 7F08D620 00000000 */ nop
/* 0C2194 7F08D624 24010001 */ li $at, 1 /* 0C2194 7F08D624 24010001 */ li $at, 1
/* 0C2198 7F08D628 1441005F */ bne $v0, $at, .Ljp7F08D7A8 /* 0C2198 7F08D628 1441005F */ bne $v0, $at, .Ljp7F08D7A8
@@ -1490,7 +1490,7 @@ glabel sub_GAME_7F08CB10
/* 0C2244 7F08D6D4 52010019 */ beql $s0, $at, .Ljp7F08D73C /* 0C2244 7F08D6D4 52010019 */ beql $s0, $at, .Ljp7F08D73C
/* 0C2248 7F08D6D8 260E0020 */ addiu $t6, $s0, 0x20 /* 0C2248 7F08D6D8 260E0020 */ addiu $t6, $s0, 0x20
.Ljp7F08D6DC: .Ljp7F08D6DC:
/* 0C224C 7F08D6DC 0FC26C01 */ jal get_num_players /* 0C224C 7F08D6DC 0FC26C01 */ jal getPlayerCount
/* 0C2250 7F08D6E0 00000000 */ nop /* 0C2250 7F08D6E0 00000000 */ nop
/* 0C2254 7F08D6E4 24010001 */ li $at, 1 /* 0C2254 7F08D6E4 24010001 */ li $at, 1
/* 0C2258 7F08D6E8 14410010 */ bne $v0, $at, .Ljp7F08D72C /* 0C2258 7F08D6E8 14410010 */ bne $v0, $at, .Ljp7F08D72C
+120 -120
View File
@@ -2201,7 +2201,7 @@ glabel likely_change_weapon_in_hand
/* 092064 7F05D534 8C4F0890 */ lw $t7, 0x890($v0) /* 092064 7F05D534 8C4F0890 */ lw $t7, 0x890($v0)
/* 092068 7F05D538 AC4F08B0 */ sw $t7, 0x8b0($v0) /* 092068 7F05D538 AC4F08B0 */ sw $t7, 0x8b0($v0)
/* 09206C 7F05D53C AFA7001C */ sw $a3, 0x1c($sp) /* 09206C 7F05D53C AFA7001C */ sw $a3, 0x1c($sp)
/* 092070 7F05D540 0FC26919 */ jal get_num_players /* 092070 7F05D540 0FC26919 */ jal getPlayerCount
/* 092074 7F05D544 AFA40020 */ sw $a0, 0x20($sp) /* 092074 7F05D544 AFA40020 */ sw $a0, 0x20($sp)
/* 092078 7F05D548 3C088008 */ lui $t0, %hi(pPlayer) /* 092078 7F05D548 3C088008 */ lui $t0, %hi(pPlayer)
/* 09207C 7F05D54C 24010001 */ li $at, 1 /* 09207C 7F05D54C 24010001 */ li $at, 1
@@ -2650,7 +2650,7 @@ glabel remove_hands_item
/* 092740 7F05DC10 01706021 */ addu $t4, $t3, $s0 /* 092740 7F05DC10 01706021 */ addu $t4, $t3, $s0
/* 092744 7F05DC14 AD860878 */ sw $a2, 0x878($t4) /* 092744 7F05DC14 AD860878 */ sw $a2, 0x878($t4)
.L7F05DC18: .L7F05DC18:
/* 092748 7F05DC18 0FC26919 */ jal get_num_players /* 092748 7F05DC18 0FC26919 */ jal getPlayerCount
/* 09274C 7F05DC1C 00000000 */ nop /* 09274C 7F05DC1C 00000000 */ nop
/* 092750 7F05DC20 28410002 */ slti $at, $v0, 2 /* 092750 7F05DC20 28410002 */ slti $at, $v0, 2
/* 092754 7F05DC24 14200003 */ bnez $at, .L7F05DC34 /* 092754 7F05DC24 14200003 */ bnez $at, .L7F05DC34
@@ -3846,7 +3846,7 @@ glabel sub_GAME_7F05EE24
/* 093990 7F05EE60 27A50088 */ addiu $a1, $sp, 0x88 /* 093990 7F05EE60 27A50088 */ addiu $a1, $sp, 0x88
/* 093994 7F05EE64 0FC1A073 */ jal sub_GAME_7F0681CC /* 093994 7F05EE64 0FC1A073 */ jal sub_GAME_7F0681CC
/* 093998 7F05EE68 8FA60140 */ lw $a2, 0x140($sp) /* 093998 7F05EE68 8FA60140 */ lw $a2, 0x140($sp)
/* 09399C 7F05EE6C 0FC1E111 */ jal sub_GAME_7F078444 /* 09399C 7F05EE6C 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 0939A0 7F05EE70 00000000 */ nop /* 0939A0 7F05EE70 00000000 */ nop
/* 0939A4 7F05EE74 00402025 */ move $a0, $v0 /* 0939A4 7F05EE74 00402025 */ move $a0, $v0
/* 0939A8 7F05EE78 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 0939A8 7F05EE78 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -4028,7 +4028,7 @@ glabel sub_GAME_7F05F09C
/* 093BF8 7F05F0C8 27A50078 */ addiu $a1, $sp, 0x78 /* 093BF8 7F05F0C8 27A50078 */ addiu $a1, $sp, 0x78
/* 093BFC 7F05F0CC 0FC1A073 */ jal sub_GAME_7F0681CC /* 093BFC 7F05F0CC 0FC1A073 */ jal sub_GAME_7F0681CC
/* 093C00 7F05F0D0 8FA60130 */ lw $a2, 0x130($sp) /* 093C00 7F05F0D0 8FA60130 */ lw $a2, 0x130($sp)
/* 093C04 7F05F0D4 0FC1E111 */ jal sub_GAME_7F078444 /* 093C04 7F05F0D4 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 093C08 7F05F0D8 00000000 */ nop /* 093C08 7F05F0D8 00000000 */ nop
/* 093C0C 7F05F0DC 00402025 */ move $a0, $v0 /* 093C0C 7F05F0DC 00402025 */ move $a0, $v0
/* 093C10 7F05F0E0 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 093C10 7F05F0E0 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -4319,7 +4319,7 @@ glabel generate_player_thrown_object
/* 093EE8 7F05F3B8 27A50088 */ addiu $a1, $sp, 0x88 /* 093EE8 7F05F3B8 27A50088 */ addiu $a1, $sp, 0x88
/* 093EEC 7F05F3BC 0FC1A073 */ jal sub_GAME_7F0681CC /* 093EEC 7F05F3BC 0FC1A073 */ jal sub_GAME_7F0681CC
/* 093EF0 7F05F3C0 8FA60140 */ lw $a2, 0x140($sp) /* 093EF0 7F05F3C0 8FA60140 */ lw $a2, 0x140($sp)
/* 093EF4 7F05F3C4 0FC1E111 */ jal sub_GAME_7F078444 /* 093EF4 7F05F3C4 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 093EF8 7F05F3C8 00000000 */ nop /* 093EF8 7F05F3C8 00000000 */ nop
/* 093EFC 7F05F3CC 00402025 */ move $a0, $v0 /* 093EFC 7F05F3CC 00402025 */ move $a0, $v0
/* 093F00 7F05F3D0 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 093F00 7F05F3D0 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -4464,7 +4464,7 @@ create_instance:
/* 0940F8 7F05F5C8 01200008 */ jr $t1 /* 0940F8 7F05F5C8 01200008 */ jr $t1
/* 0940FC 7F05F5CC 00000000 */ nop /* 0940FC 7F05F5CC 00000000 */ nop
generate_temp_remote_mine: generate_temp_remote_mine:
/* 094100 7F05F5D0 0FC26919 */ jal get_num_players /* 094100 7F05F5D0 0FC26919 */ jal getPlayerCount
/* 094104 7F05F5D4 00000000 */ nop /* 094104 7F05F5D4 00000000 */ nop
/* 094108 7F05F5D8 24010001 */ li $at, 1 /* 094108 7F05F5D8 24010001 */ li $at, 1
/* 09410C 7F05F5DC 14410004 */ bne $v0, $at, .L7F05F5F0 /* 09410C 7F05F5DC 14410004 */ bne $v0, $at, .L7F05F5F0
@@ -4476,7 +4476,7 @@ generate_temp_remote_mine:
/* 094120 7F05F5F0 10000024 */ b .L7F05F684 /* 094120 7F05F5F0 10000024 */ b .L7F05F684
/* 094124 7F05F5F4 A60B0082 */ sh $t3, 0x82($s0) /* 094124 7F05F5F4 A60B0082 */ sh $t3, 0x82($s0)
generate_temp_proximity_mine: generate_temp_proximity_mine:
/* 094128 7F05F5F8 0FC26919 */ jal get_num_players /* 094128 7F05F5F8 0FC26919 */ jal getPlayerCount
/* 09412C 7F05F5FC 00000000 */ nop /* 09412C 7F05F5FC 00000000 */ nop
/* 094130 7F05F600 24010001 */ li $at, 1 /* 094130 7F05F600 24010001 */ li $at, 1
/* 094134 7F05F604 14410004 */ bne $v0, $at, .L7F05F618 /* 094134 7F05F604 14410004 */ bne $v0, $at, .L7F05F618
@@ -4488,7 +4488,7 @@ generate_temp_proximity_mine:
/* 094148 7F05F618 1000001A */ b .L7F05F684 /* 094148 7F05F618 1000001A */ b .L7F05F684
/* 09414C 7F05F61C A60D0082 */ sh $t5, 0x82($s0) /* 09414C 7F05F61C A60D0082 */ sh $t5, 0x82($s0)
generate_temp_timed_mine: generate_temp_timed_mine:
/* 094150 7F05F620 0FC26919 */ jal get_num_players /* 094150 7F05F620 0FC26919 */ jal getPlayerCount
/* 094154 7F05F624 00000000 */ nop /* 094154 7F05F624 00000000 */ nop
/* 094158 7F05F628 24010001 */ li $at, 1 /* 094158 7F05F628 24010001 */ li $at, 1
/* 09415C 7F05F62C 14410004 */ bne $v0, $at, .L7F05F640 /* 09415C 7F05F62C 14410004 */ bne $v0, $at, .L7F05F640
@@ -4500,7 +4500,7 @@ generate_temp_timed_mine:
/* 094170 7F05F640 10000010 */ b .L7F05F684 /* 094170 7F05F640 10000010 */ b .L7F05F684
/* 094174 7F05F644 A60F0082 */ sh $t7, 0x82($s0) /* 094174 7F05F644 A60F0082 */ sh $t7, 0x82($s0)
generate_temp_bombcase: generate_temp_bombcase:
/* 094178 7F05F648 0FC26919 */ jal get_num_players /* 094178 7F05F648 0FC26919 */ jal getPlayerCount
/* 09417C 7F05F64C 00000000 */ nop /* 09417C 7F05F64C 00000000 */ nop
/* 094180 7F05F650 24010001 */ li $at, 1 /* 094180 7F05F650 24010001 */ li $at, 1
/* 094184 7F05F654 14410004 */ bne $v0, $at, .L7F05F668 /* 094184 7F05F654 14410004 */ bne $v0, $at, .L7F05F668
@@ -4616,7 +4616,7 @@ glabel sub_GAME_7F05F73C
/* 0942C8 7F05F798 27A50038 */ addiu $a1, $sp, 0x38 /* 0942C8 7F05F798 27A50038 */ addiu $a1, $sp, 0x38
/* 0942CC 7F05F79C 0FC1A073 */ jal sub_GAME_7F0681CC /* 0942CC 7F05F79C 0FC1A073 */ jal sub_GAME_7F0681CC
/* 0942D0 7F05F7A0 8FA600E8 */ lw $a2, 0xe8($sp) /* 0942D0 7F05F7A0 8FA600E8 */ lw $a2, 0xe8($sp)
/* 0942D4 7F05F7A4 0FC1E111 */ jal sub_GAME_7F078444 /* 0942D4 7F05F7A4 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 0942D8 7F05F7A8 00000000 */ nop /* 0942D8 7F05F7A8 00000000 */ nop
/* 0942DC 7F05F7AC 00402025 */ move $a0, $v0 /* 0942DC 7F05F7AC 00402025 */ move $a0, $v0
/* 0942E0 7F05F7B0 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 0942E0 7F05F7B0 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -4792,7 +4792,7 @@ glabel sub_GAME_7F05F928
/* 094540 7F05FA10 26040058 */ addiu $a0, $s0, 0x58 /* 094540 7F05FA10 26040058 */ addiu $a0, $s0, 0x58
/* 094544 7F05FA14 0FC16266 */ jal matrix_4x4_set_position /* 094544 7F05FA14 0FC16266 */ jal matrix_4x4_set_position
/* 094548 7F05FA18 02402825 */ move $a1, $s2 /* 094548 7F05FA18 02402825 */ move $a1, $s2
/* 09454C 7F05FA1C 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 09454C 7F05FA1C 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 094550 7F05FA20 00000000 */ nop /* 094550 7F05FA20 00000000 */ nop
/* 094554 7F05FA24 00402025 */ move $a0, $v0 /* 094554 7F05FA24 00402025 */ move $a0, $v0
/* 094558 7F05FA28 02402825 */ move $a1, $s2 /* 094558 7F05FA28 02402825 */ move $a1, $s2
@@ -4975,7 +4975,7 @@ glabel sub_GAME_7F05FB64
.L7F05FC10: .L7F05FC10:
/* 094740 7F05FC10 0FC1A064 */ jal sub_GAME_7F068190 /* 094740 7F05FC10 0FC1A064 */ jal sub_GAME_7F068190
/* 094744 7F05FC14 27A5004C */ addiu $a1, $sp, 0x4c /* 094744 7F05FC14 27A5004C */ addiu $a1, $sp, 0x4c
/* 094748 7F05FC18 0FC1E111 */ jal sub_GAME_7F078444 /* 094748 7F05FC18 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 09474C 7F05FC1C 00000000 */ nop /* 09474C 7F05FC1C 00000000 */ nop
/* 094750 7F05FC20 00402025 */ move $a0, $v0 /* 094750 7F05FC20 00402025 */ move $a0, $v0
/* 094754 7F05FC24 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 094754 7F05FC24 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -5038,7 +5038,7 @@ glabel sub_GAME_7F05FB64
/* 094830 7F05FD00 8C480014 */ lw $t0, 0x14($v0) /* 094830 7F05FD00 8C480014 */ lw $t0, 0x14($v0)
/* 094834 7F05FD04 8D09000C */ lw $t1, 0xc($t0) /* 094834 7F05FD04 8D09000C */ lw $t1, 0xc($t0)
/* 094838 7F05FD08 C52A0138 */ lwc1 $f10, 0x138($t1) /* 094838 7F05FD08 C52A0138 */ lwc1 $f10, 0x138($t1)
/* 09483C 7F05FD0C 0FC1E111 */ jal sub_GAME_7F078444 /* 09483C 7F05FD0C 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 094840 7F05FD10 E7AA003C */ swc1 $f10, 0x3c($sp) /* 094840 7F05FD10 E7AA003C */ swc1 $f10, 0x3c($sp)
/* 094844 7F05FD14 00402025 */ move $a0, $v0 /* 094844 7F05FD14 00402025 */ move $a0, $v0
/* 094848 7F05FD18 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 094848 7F05FD18 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -5060,7 +5060,7 @@ glabel sub_GAME_7F05FB64
.L7F05FD50: .L7F05FD50:
/* 094880 7F05FD50 0FC1A073 */ jal sub_GAME_7F0681CC /* 094880 7F05FD50 0FC1A073 */ jal sub_GAME_7F0681CC
/* 094884 7F05FD54 8FA60108 */ lw $a2, 0x108($sp) /* 094884 7F05FD54 8FA60108 */ lw $a2, 0x108($sp)
/* 094888 7F05FD58 0FC1E111 */ jal sub_GAME_7F078444 /* 094888 7F05FD58 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 09488C 7F05FD5C 00000000 */ nop /* 09488C 7F05FD5C 00000000 */ nop
/* 094890 7F05FD60 00402025 */ move $a0, $v0 /* 094890 7F05FD60 00402025 */ move $a0, $v0
/* 094894 7F05FD64 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 094894 7F05FD64 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -6077,7 +6077,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 095674 7F060B44 C60600DC */ lwc1 $f6, 0xdc($s0) /* 095674 7F060B44 C60600DC */ lwc1 $f6, 0xdc($s0)
/* 095678 7F060B48 E7A60020 */ swc1 $f6, 0x20($sp) /* 095678 7F060B48 E7A60020 */ swc1 $f6, 0x20($sp)
/* 09567C 7F060B4C C60A00E0 */ lwc1 $f10, 0xe0($s0) /* 09567C 7F060B4C C60A00E0 */ lwc1 $f10, 0xe0($s0)
/* 095680 7F060B50 0FC16642 */ jal sub_GAME_7F059908 /* 095680 7F060B50 0FC16642 */ jal matrix_4x4_7F059908
/* 095684 7F060B54 E7AA0024 */ swc1 $f10, 0x24($sp) /* 095684 7F060B54 E7AA0024 */ swc1 $f10, 0x24($sp)
/* 095688 7F060B58 27A401A4 */ addiu $a0, $sp, 0x1a4 /* 095688 7F060B58 27A401A4 */ addiu $a0, $sp, 0x1a4
/* 09568C 7F060B5C 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place /* 09568C 7F060B5C 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -6114,7 +6114,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 095708 7F060BD8 AFA40040 */ sw $a0, 0x40($sp) /* 095708 7F060BD8 AFA40040 */ sw $a0, 0x40($sp)
/* 09570C 7F060BDC 0FC16008 */ jal matrix_4x4_copy /* 09570C 7F060BDC 0FC16008 */ jal matrix_4x4_copy
/* 095710 7F060BE0 260502A8 */ addiu $a1, $s0, 0x2a8 /* 095710 7F060BE0 260502A8 */ addiu $a1, $s0, 0x2a8
/* 095714 7F060BE4 0FC1E111 */ jal sub_GAME_7F078444 /* 095714 7F060BE4 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 095718 7F060BE8 00000000 */ nop /* 095718 7F060BE8 00000000 */ nop
/* 09571C 7F060BEC 00402025 */ move $a0, $v0 /* 09571C 7F060BEC 00402025 */ move $a0, $v0
/* 095720 7F060BF0 8FA50044 */ lw $a1, 0x44($sp) /* 095720 7F060BF0 8FA50044 */ lw $a1, 0x44($sp)
@@ -6466,7 +6466,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 095C2C 7F0610FC C7B20258 */ lwc1 $f18, 0x258($sp) /* 095C2C 7F0610FC C7B20258 */ lwc1 $f18, 0x258($sp)
/* 095C30 7F061100 E61202EC */ swc1 $f18, 0x2ec($s0) /* 095C30 7F061100 E61202EC */ swc1 $f18, 0x2ec($s0)
/* 095C34 7F061104 C7AA025C */ lwc1 $f10, 0x25c($sp) /* 095C34 7F061104 C7AA025C */ lwc1 $f10, 0x25c($sp)
/* 095C38 7F061108 0FC1E111 */ jal sub_GAME_7F078444 /* 095C38 7F061108 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 095C3C 7F06110C E60A02F0 */ swc1 $f10, 0x2f0($s0) /* 095C3C 7F06110C E60A02F0 */ swc1 $f10, 0x2f0($s0)
/* 095C40 7F061110 00402025 */ move $a0, $v0 /* 095C40 7F061110 00402025 */ move $a0, $v0
/* 095C44 7F061114 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 095C44 7F061114 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -6577,7 +6577,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 095DE0 7F0612B0 46128281 */ sub.s $f10, $f16, $f18 /* 095DE0 7F0612B0 46128281 */ sub.s $f10, $f16, $f18
/* 095DE4 7F0612B4 44074000 */ mfc1 $a3, $f8 /* 095DE4 7F0612B4 44074000 */ mfc1 $a3, $f8
/* 095DE8 7F0612B8 24050000 */ li $a1, 0 /* 095DE8 7F0612B8 24050000 */ li $a1, 0
/* 095DEC 7F0612BC 0FC166D6 */ jal sub_GAME_7F059B58 /* 095DEC 7F0612BC 0FC166D6 */ jal matrix_4x4_7F059B58
/* 095DF0 7F0612C0 E7AA0010 */ swc1 $f10, 0x10($sp) /* 095DF0 7F0612C0 E7AA0010 */ swc1 $f10, 0x10($sp)
/* 095DF4 7F0612C4 27A40114 */ addiu $a0, $sp, 0x114 /* 095DF4 7F0612C4 27A40114 */ addiu $a0, $sp, 0x114
/* 095DF8 7F0612C8 0FC1601A */ jal matrix_4x4_multiply_in_place /* 095DF8 7F0612C8 0FC1601A */ jal matrix_4x4_multiply_in_place
@@ -6700,7 +6700,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 095FC4 7F061494 46088101 */ sub.s $f4, $f16, $f8 /* 095FC4 7F061494 46088101 */ sub.s $f4, $f16, $f8
/* 095FC8 7F061498 44073000 */ mfc1 $a3, $f6 /* 095FC8 7F061498 44073000 */ mfc1 $a3, $f6
/* 095FCC 7F06149C 24050000 */ li $a1, 0 /* 095FCC 7F06149C 24050000 */ li $a1, 0
/* 095FD0 7F0614A0 0FC166D6 */ jal sub_GAME_7F059B58 /* 095FD0 7F0614A0 0FC166D6 */ jal matrix_4x4_7F059B58
/* 095FD4 7F0614A4 E7A40010 */ swc1 $f4, 0x10($sp) /* 095FD4 7F0614A4 E7A40010 */ swc1 $f4, 0x10($sp)
/* 095FD8 7F0614A8 27A40114 */ addiu $a0, $sp, 0x114 /* 095FD8 7F0614A8 27A40114 */ addiu $a0, $sp, 0x114
/* 095FDC 7F0614AC 0FC1601A */ jal matrix_4x4_multiply_in_place /* 095FDC 7F0614AC 0FC1601A */ jal matrix_4x4_multiply_in_place
@@ -7861,7 +7861,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 095BD4 7F061064 C60600DC */ lwc1 $f6, 0xdc($s0) /* 095BD4 7F061064 C60600DC */ lwc1 $f6, 0xdc($s0)
/* 095BD8 7F061068 E7A60020 */ swc1 $f6, 0x20($sp) /* 095BD8 7F061068 E7A60020 */ swc1 $f6, 0x20($sp)
/* 095BDC 7F06106C C60A00E0 */ lwc1 $f10, 0xe0($s0) /* 095BDC 7F06106C C60A00E0 */ lwc1 $f10, 0xe0($s0)
/* 095BE0 7F061070 0FC1678A */ jal sub_GAME_7F059908 /* 095BE0 7F061070 0FC1678A */ jal matrix_4x4_7F059908
/* 095BE4 7F061074 E7AA0024 */ swc1 $f10, 0x24($sp) /* 095BE4 7F061074 E7AA0024 */ swc1 $f10, 0x24($sp)
/* 095BE8 7F061078 27A401A4 */ addiu $a0, $sp, 0x1a4 /* 095BE8 7F061078 27A401A4 */ addiu $a0, $sp, 0x1a4
/* 095BEC 7F06107C 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place /* 095BEC 7F06107C 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -7898,7 +7898,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 095C68 7F0610F8 AFA40040 */ sw $a0, 0x40($sp) /* 095C68 7F0610F8 AFA40040 */ sw $a0, 0x40($sp)
/* 095C6C 7F0610FC 0FC16150 */ jal matrix_4x4_copy /* 095C6C 7F0610FC 0FC16150 */ jal matrix_4x4_copy
/* 095C70 7F061100 260502A8 */ addiu $a1, $s0, 0x2a8 /* 095C70 7F061100 260502A8 */ addiu $a1, $s0, 0x2a8
/* 095C74 7F061104 0FC1E28D */ jal sub_GAME_7F078444 /* 095C74 7F061104 0FC1E28D */ jal currentPlayerGetMatrix10D4
/* 095C78 7F061108 00000000 */ nop /* 095C78 7F061108 00000000 */ nop
/* 095C7C 7F06110C 00402025 */ move $a0, $v0 /* 095C7C 7F06110C 00402025 */ move $a0, $v0
/* 095C80 7F061110 8FA50044 */ lw $a1, 0x44($sp) /* 095C80 7F061110 8FA50044 */ lw $a1, 0x44($sp)
@@ -8250,7 +8250,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 09618C 7F06161C C7B20258 */ lwc1 $f18, 0x258($sp) /* 09618C 7F06161C C7B20258 */ lwc1 $f18, 0x258($sp)
/* 096190 7F061620 E61202EC */ swc1 $f18, 0x2ec($s0) /* 096190 7F061620 E61202EC */ swc1 $f18, 0x2ec($s0)
/* 096194 7F061624 C7AA025C */ lwc1 $f10, 0x25c($sp) /* 096194 7F061624 C7AA025C */ lwc1 $f10, 0x25c($sp)
/* 096198 7F061628 0FC1E28D */ jal sub_GAME_7F078444 /* 096198 7F061628 0FC1E28D */ jal currentPlayerGetMatrix10D4
/* 09619C 7F06162C E60A02F0 */ swc1 $f10, 0x2f0($s0) /* 09619C 7F06162C E60A02F0 */ swc1 $f10, 0x2f0($s0)
/* 0961A0 7F061630 00402025 */ move $a0, $v0 /* 0961A0 7F061630 00402025 */ move $a0, $v0
/* 0961A4 7F061634 0FC16265 */ jal matrix_4x4_transform_vector_in_place /* 0961A4 7F061634 0FC16265 */ jal matrix_4x4_transform_vector_in_place
@@ -8361,7 +8361,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 096340 7F0617D0 46128281 */ sub.s $f10, $f16, $f18 /* 096340 7F0617D0 46128281 */ sub.s $f10, $f16, $f18
/* 096344 7F0617D4 44074000 */ mfc1 $a3, $f8 /* 096344 7F0617D4 44074000 */ mfc1 $a3, $f8
/* 096348 7F0617D8 24050000 */ li $a1, 0 /* 096348 7F0617D8 24050000 */ li $a1, 0
/* 09634C 7F0617DC 0FC1681E */ jal sub_GAME_7F059B58 /* 09634C 7F0617DC 0FC1681E */ jal matrix_4x4_7F059B58
/* 096350 7F0617E0 E7AA0010 */ swc1 $f10, 0x10($sp) /* 096350 7F0617E0 E7AA0010 */ swc1 $f10, 0x10($sp)
/* 096354 7F0617E4 27A40114 */ addiu $a0, $sp, 0x114 /* 096354 7F0617E4 27A40114 */ addiu $a0, $sp, 0x114
/* 096358 7F0617E8 0FC16162 */ jal matrix_4x4_multiply_in_place /* 096358 7F0617E8 0FC16162 */ jal matrix_4x4_multiply_in_place
@@ -8484,7 +8484,7 @@ glabel handles_firing_or_throwing_weapon_in_hand
/* 096524 7F0619B4 46088101 */ sub.s $f4, $f16, $f8 /* 096524 7F0619B4 46088101 */ sub.s $f4, $f16, $f8
/* 096528 7F0619B8 44073000 */ mfc1 $a3, $f6 /* 096528 7F0619B8 44073000 */ mfc1 $a3, $f6
/* 09652C 7F0619BC 24050000 */ li $a1, 0 /* 09652C 7F0619BC 24050000 */ li $a1, 0
/* 096530 7F0619C0 0FC1681E */ jal sub_GAME_7F059B58 /* 096530 7F0619C0 0FC1681E */ jal matrix_4x4_7F059B58
/* 096534 7F0619C4 E7A40010 */ swc1 $f4, 0x10($sp) /* 096534 7F0619C4 E7A40010 */ swc1 $f4, 0x10($sp)
/* 096538 7F0619C8 27A40114 */ addiu $a0, $sp, 0x114 /* 096538 7F0619C8 27A40114 */ addiu $a0, $sp, 0x114
/* 09653C 7F0619CC 0FC16162 */ jal matrix_4x4_multiply_in_place /* 09653C 7F0619CC 0FC16162 */ jal matrix_4x4_multiply_in_place
@@ -9063,7 +9063,7 @@ glabel sub_GAME_7F061BF4
/* 096754 7F061C24 AFB10018 */ sw $s1, 0x18($sp) /* 096754 7F061C24 AFB10018 */ sw $s1, 0x18($sp)
/* 096758 7F061C28 01CF8021 */ addu $s0, $t6, $t7 /* 096758 7F061C28 01CF8021 */ addu $s0, $t6, $t7
/* 09675C 7F061C2C 00808825 */ move $s1, $a0 /* 09675C 7F061C2C 00808825 */ move $s1, $a0
/* 096760 7F061C30 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 096760 7F061C30 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 096764 7F061C34 26100870 */ addiu $s0, $s0, 0x870 /* 096764 7F061C34 26100870 */ addiu $s0, $s0, 0x870
/* 096768 7F061C38 C604039C */ lwc1 $f4, 0x39c($s0) /* 096768 7F061C38 C604039C */ lwc1 $f4, 0x39c($s0)
/* 09676C 7F061C3C C4460008 */ lwc1 $f6, 8($v0) /* 09676C 7F061C3C C4460008 */ lwc1 $f6, 8($v0)
@@ -9098,7 +9098,7 @@ glabel sub_GAME_7F061BF4
/* 0967E0 7F061CB0 8F280004 */ lw $t0, 4($t9) /* 0967E0 7F061CB0 8F280004 */ lw $t0, 4($t9)
/* 0967E4 7F061CB4 51000054 */ beql $t0, $zero, .L7F061E08 /* 0967E4 7F061CB4 51000054 */ beql $t0, $zero, .L7F061E08
/* 0967E8 7F061CB8 8FBF001C */ lw $ra, 0x1c($sp) /* 0967E8 7F061CB8 8FBF001C */ lw $ra, 0x1c($sp)
/* 0967EC 7F061CBC 0FC26919 */ jal get_num_players /* 0967EC 7F061CBC 0FC26919 */ jal getPlayerCount
/* 0967F0 7F061CC0 00000000 */ nop /* 0967F0 7F061CC0 00000000 */ nop
/* 0967F4 7F061CC4 28410002 */ slti $at, $v0, 2 /* 0967F4 7F061CC4 28410002 */ slti $at, $v0, 2
/* 0967F8 7F061CC8 1420004E */ bnez $at, .L7F061E04 /* 0967F8 7F061CC8 1420004E */ bnez $at, .L7F061E04
@@ -9272,7 +9272,7 @@ glabel sub_GAME_7F061E18
/* 096A00 7F061ED0 8D8CD0D0 */ lw $t4, %lo(flareimage3)($t4) /* 096A00 7F061ED0 8D8CD0D0 */ lw $t4, %lo(flareimage3)($t4)
/* 096A04 7F061ED4 E7A000E8 */ swc1 $f0, 0xe8($sp) /* 096A04 7F061ED4 E7A000E8 */ swc1 $f0, 0xe8($sp)
/* 096A08 7F061ED8 E7A400B4 */ swc1 $f4, 0xb4($sp) /* 096A08 7F061ED8 E7A400B4 */ swc1 $f4, 0xb4($sp)
/* 096A0C 7F061EDC 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 096A0C 7F061EDC 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 096A10 7F061EE0 AFAC00B0 */ sw $t4, 0xb0($sp) /* 096A10 7F061EE0 AFAC00B0 */ sw $t4, 0xb0($sp)
/* 096A14 7F061EE4 AFA200A8 */ sw $v0, 0xa8($sp) /* 096A14 7F061EE4 AFA200A8 */ sw $v0, 0xa8($sp)
/* 096A18 7F061EE8 82230001 */ lb $v1, 1($s1) /* 096A18 7F061EE8 82230001 */ lb $v1, 1($s1)
@@ -9644,7 +9644,7 @@ glabel sub_GAME_7F061E18
/* 096F98 7F062468 E7AC00A0 */ swc1 $f12, 0xa0($sp) /* 096F98 7F062468 E7AC00A0 */ swc1 $f12, 0xa0($sp)
/* 096F9C 7F06246C E7AE00A4 */ swc1 $f14, 0xa4($sp) /* 096F9C 7F06246C E7AE00A4 */ swc1 $f14, 0xa4($sp)
.L7F062470: .L7F062470:
/* 096FA0 7F062470 0FC1E111 */ jal sub_GAME_7F078444 /* 096FA0 7F062470 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 096FA4 7F062474 00000000 */ nop /* 096FA4 7F062474 00000000 */ nop
/* 096FA8 7F062478 00402025 */ move $a0, $v0 /* 096FA8 7F062478 00402025 */ move $a0, $v0
/* 096FAC 7F06247C 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 096FAC 7F06247C 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -10417,7 +10417,7 @@ glabel sub_GAME_7F062BE4
/* 0979C4 7F062E94 01EA5825 */ or $t3, $t7, $t2 /* 0979C4 7F062E94 01EA5825 */ or $t3, $t7, $t2
/* 0979C8 7F062E98 AFAB00C0 */ sw $t3, 0xc0($sp) /* 0979C8 7F062E98 AFAB00C0 */ sw $t3, 0xc0($sp)
/* 0979CC 7F062E9C AFA00090 */ sw $zero, 0x90($sp) /* 0979CC 7F062E9C AFA00090 */ sw $zero, 0x90($sp)
/* 0979D0 7F062EA0 0FC16319 */ jal sub_GAME_7F058C64 /* 0979D0 7F062EA0 0FC16319 */ jal matrix_4x4_7F058C64
/* 0979D4 7F062EA4 267102F8 */ addiu $s1, $s3, 0x2f8 /* 0979D4 7F062EA4 267102F8 */ addiu $s1, $s3, 0x2f8
/* 0979D8 7F062EA8 24010019 */ li $at, 25 /* 0979D8 7F062EA8 24010019 */ li $at, 25
/* 0979DC 7F062EAC 56810011 */ bnel $s4, $at, .L7F062EF4 /* 0979DC 7F062EAC 56810011 */ bnel $s4, $at, .L7F062EF4
@@ -10476,7 +10476,7 @@ glabel sub_GAME_7F062BE4
/* 097AA0 7F062F70 8E640304 */ lw $a0, 0x304($s3) /* 097AA0 7F062F70 8E640304 */ lw $a0, 0x304($s3)
/* 097AA4 7F062F74 0FC22F52 */ jal sub_GAME_7F08BD48 /* 097AA4 7F062F74 0FC22F52 */ jal sub_GAME_7F08BD48
/* 097AA8 7F062F78 85A5000E */ lh $a1, 0xe($t5) /* 097AA8 7F062F78 85A5000E */ lh $a1, 0xe($t5)
/* 097AAC 7F062F7C 0FC16322 */ jal sub_GAME_7F058C88 /* 097AAC 7F062F7C 0FC16322 */ jal matrix_4x4_7F058C88
/* 097AB0 7F062F80 00000000 */ nop /* 097AB0 7F062F80 00000000 */ nop
/* 097AB4 7F062F84 3C0CBC00 */ lui $t4, (0xBC00000E >> 16) # lui $t4, 0xbc00 /* 097AB4 7F062F84 3C0CBC00 */ lui $t4, (0xBC00000E >> 16) # lui $t4, 0xbc00
/* 097AB8 7F062F88 358C000E */ ori $t4, (0xBC00000E & 0xFFFF) # ori $t4, $t4, 0xe /* 097AB8 7F062F88 358C000E */ ori $t4, (0xBC00000E & 0xFFFF) # ori $t4, $t4, 0xe
@@ -10828,7 +10828,7 @@ glabel set_enviro_fog_for_items_in_solo_watch_menu
/* 097F80 7F063450 0FC1D1A1 */ jal subdraw /* 097F80 7F063450 0FC1D1A1 */ jal subdraw
/* 097F84 7F063454 02602825 */ move $a1, $s3 /* 097F84 7F063454 02602825 */ move $a1, $s3
/* 097F88 7F063458 8FAF0164 */ lw $t7, 0x164($sp) /* 097F88 7F063458 8FAF0164 */ lw $t7, 0x164($sp)
/* 097F8C 7F06345C 0FC16319 */ jal sub_GAME_7F058C64 /* 097F8C 7F06345C 0FC16319 */ jal matrix_4x4_7F058C64
/* 097F90 7F063460 AFAF0198 */ sw $t7, 0x198($sp) /* 097F90 7F063460 AFAF0198 */ sw $t7, 0x198($sp)
/* 097F94 7F063464 864E000E */ lh $t6, 0xe($s2) /* 097F94 7F063464 864E000E */ lh $t6, 0xe($s2)
/* 097F98 7F063468 00008025 */ move $s0, $zero /* 097F98 7F063468 00008025 */ move $s0, $zero
@@ -10851,7 +10851,7 @@ glabel set_enviro_fog_for_items_in_solo_watch_menu
/* 097FD8 7F0634A8 5420FFF3 */ bnezl $at, .L7F063478 /* 097FD8 7F0634A8 5420FFF3 */ bnezl $at, .L7F063478
/* 097FDC 7F0634AC 8FA90144 */ lw $t1, 0x144($sp) /* 097FDC 7F0634AC 8FA90144 */ lw $t1, 0x144($sp)
.L7F0634B0: .L7F0634B0:
/* 097FE0 7F0634B0 0FC16322 */ jal sub_GAME_7F058C88 /* 097FE0 7F0634B0 0FC16322 */ jal matrix_4x4_7F058C88
/* 097FE4 7F0634B4 00000000 */ nop /* 097FE4 7F0634B4 00000000 */ nop
.L7F0634B8: .L7F0634B8:
/* 097FE8 7F0634B8 8FA20198 */ lw $v0, 0x198($sp) /* 097FE8 7F0634B8 8FA20198 */ lw $v0, 0x198($sp)
@@ -11174,7 +11174,7 @@ glabel sub_GAME_7F06359C
/* 098324 7F0637F4 0FC1D1A1 */ jal subdraw /* 098324 7F0637F4 0FC1D1A1 */ jal subdraw
/* 098328 7F0637F8 27A504D8 */ addiu $a1, $sp, 0x4d8 /* 098328 7F0637F8 27A504D8 */ addiu $a1, $sp, 0x4d8
/* 09832C 7F0637FC 8FB90504 */ lw $t9, 0x504($sp) /* 09832C 7F0637FC 8FB90504 */ lw $t9, 0x504($sp)
/* 098330 7F063800 0FC16319 */ jal sub_GAME_7F058C64 /* 098330 7F063800 0FC16319 */ jal matrix_4x4_7F058C64
/* 098334 7F063804 AFB90538 */ sw $t9, 0x538($sp) /* 098334 7F063804 AFB90538 */ sw $t9, 0x538($sp)
/* 098338 7F063808 8FB803D8 */ lw $t8, 0x3d8($sp) /* 098338 7F063808 8FB803D8 */ lw $t8, 0x3d8($sp)
/* 09833C 7F06380C 00008825 */ move $s1, $zero /* 09833C 7F06380C 00008825 */ move $s1, $zero
@@ -11200,7 +11200,7 @@ glabel sub_GAME_7F06359C
/* 098388 7F063858 5420FFF2 */ bnezl $at, .L7F063824 /* 098388 7F063858 5420FFF2 */ bnezl $at, .L7F063824
/* 09838C 7F06385C 8FAF04E4 */ lw $t7, 0x4e4($sp) /* 09838C 7F06385C 8FAF04E4 */ lw $t7, 0x4e4($sp)
.L7F063860: .L7F063860:
/* 098390 7F063860 0FC16322 */ jal sub_GAME_7F058C88 /* 098390 7F063860 0FC16322 */ jal matrix_4x4_7F058C88
/* 098394 7F063864 00000000 */ nop /* 098394 7F063864 00000000 */ nop
/* 098398 7F063868 126002AE */ beqz $s3, .L7F064324 /* 098398 7F063868 126002AE */ beqz $s3, .L7F064324
/* 09839C 7F06386C 8FAC03D8 */ lw $t4, 0x3d8($sp) /* 09839C 7F06386C 8FAC03D8 */ lw $t4, 0x3d8($sp)
@@ -11247,7 +11247,7 @@ glabel sub_GAME_7F06359C
/* 098438 7F063908 E7B80020 */ swc1 $f24, 0x20($sp) /* 098438 7F063908 E7B80020 */ swc1 $f24, 0x20($sp)
/* 09843C 7F06390C E7A00010 */ swc1 $f0, 0x10($sp) /* 09843C 7F06390C E7A00010 */ swc1 $f0, 0x10($sp)
/* 098440 7F063910 E7A20018 */ swc1 $f2, 0x18($sp) /* 098440 7F063910 E7A20018 */ swc1 $f2, 0x18($sp)
/* 098444 7F063914 0FC165A5 */ jal sub_GAME_7F059694 /* 098444 7F063914 0FC165A5 */ jal matrix_4x4_7F059694
/* 098448 7F063918 E7B00024 */ swc1 $f16, 0x24($sp) /* 098448 7F063918 E7B00024 */ swc1 $f16, 0x24($sp)
/* 09844C 7F06391C 3C01C0A0 */ li $at, 0xC0A00000 # -5.000000 /* 09844C 7F06391C 3C01C0A0 */ li $at, 0xC0A00000 # -5.000000
/* 098450 7F063920 44810000 */ mtc1 $at, $f0 /* 098450 7F063920 44810000 */ mtc1 $at, $f0
@@ -11264,7 +11264,7 @@ glabel sub_GAME_7F06359C
/* 09847C 7F06394C E7B80020 */ swc1 $f24, 0x20($sp) /* 09847C 7F06394C E7B80020 */ swc1 $f24, 0x20($sp)
/* 098480 7F063950 E7A00010 */ swc1 $f0, 0x10($sp) /* 098480 7F063950 E7A00010 */ swc1 $f0, 0x10($sp)
/* 098484 7F063954 E7A20018 */ swc1 $f2, 0x18($sp) /* 098484 7F063954 E7A20018 */ swc1 $f2, 0x18($sp)
/* 098488 7F063958 0FC165A5 */ jal sub_GAME_7F059694 /* 098488 7F063958 0FC165A5 */ jal matrix_4x4_7F059694
/* 09848C 7F06395C E7B20024 */ swc1 $f18, 0x24($sp) /* 09848C 7F06395C E7B20024 */ swc1 $f18, 0x24($sp)
/* 098490 7F063960 0FC15FF4 */ jal matrix_4x4_set_identity /* 098490 7F063960 0FC15FF4 */ jal matrix_4x4_set_identity
/* 098494 7F063964 02602025 */ move $a0, $s3 /* 098494 7F063964 02602025 */ move $a0, $s3
@@ -11894,7 +11894,7 @@ glabel sub_GAME_7F06359C
/* 098DE0 7F0642B0 0FC1D1A1 */ jal subdraw /* 098DE0 7F0642B0 0FC1D1A1 */ jal subdraw
/* 098DE4 7F0642B4 AFA90504 */ sw $t1, 0x504($sp) /* 098DE4 7F0642B4 AFA90504 */ sw $t1, 0x504($sp)
/* 098DE8 7F0642B8 8FAE0504 */ lw $t6, 0x504($sp) /* 098DE8 7F0642B8 8FAE0504 */ lw $t6, 0x504($sp)
/* 098DEC 7F0642BC 0FC16319 */ jal sub_GAME_7F058C64 /* 098DEC 7F0642BC 0FC16319 */ jal matrix_4x4_7F058C64
/* 098DF0 7F0642C0 AFAE0538 */ sw $t6, 0x538($sp) /* 098DF0 7F0642C0 AFAE0538 */ sw $t6, 0x538($sp)
/* 098DF4 7F0642C4 8FAB03D8 */ lw $t3, 0x3d8($sp) /* 098DF4 7F0642C4 8FAB03D8 */ lw $t3, 0x3d8($sp)
/* 098DF8 7F0642C8 00008825 */ move $s1, $zero /* 098DF8 7F0642C8 00008825 */ move $s1, $zero
@@ -11920,7 +11920,7 @@ glabel sub_GAME_7F06359C
/* 098E44 7F064314 5420FFF2 */ bnezl $at, .L7F0642E0 /* 098E44 7F064314 5420FFF2 */ bnezl $at, .L7F0642E0
/* 098E48 7F064318 8FB904E4 */ lw $t9, 0x4e4($sp) /* 098E48 7F064318 8FB904E4 */ lw $t9, 0x4e4($sp)
.L7F06431C: .L7F06431C:
/* 098E4C 7F06431C 0FC16322 */ jal sub_GAME_7F058C88 /* 098E4C 7F06431C 0FC16322 */ jal matrix_4x4_7F058C88
/* 098E50 7F064320 00000000 */ nop /* 098E50 7F064320 00000000 */ nop
.L7F064324: .L7F064324:
/* 098E54 7F064324 8FA20538 */ lw $v0, 0x538($sp) /* 098E54 7F064324 8FA20538 */ lw $v0, 0x538($sp)
@@ -13571,7 +13571,7 @@ Weapon_function_camera:
/* 09992C 7F064DFC 00002825 */ move $a1, $zero /* 09992C 7F064DFC 00002825 */ move $a1, $zero
/* 099930 7F064E00 15800005 */ bnez $t4, .L7F064E18 /* 099930 7F064E00 15800005 */ bnez $t4, .L7F064E18
/* 099934 7F064E04 00003025 */ move $a2, $zero /* 099934 7F064E04 00003025 */ move $a2, $zero
/* 099938 7F064E08 0FC201EC */ jal set_rgba_tint /* 099938 7F064E08 0FC201EC */ jal currentPlayerSetFadeColour
/* 09993C 7F064E0C 3C073F80 */ lui $a3, 0x3f80 /* 09993C 7F064E0C 3C073F80 */ lui $a3, 0x3f80
/* 099940 7F064E10 10000063 */ b .L7F064FA0 /* 099940 7F064E10 10000063 */ b .L7F064FA0
/* 099944 7F064E14 AE000398 */ sw $zero, 0x398($s0) /* 099944 7F064E14 AE000398 */ sw $zero, 0x398($s0)
@@ -13584,7 +13584,7 @@ Weapon_function_camera:
/* 09995C 7F064E2C 44802000 */ mtc1 $zero, $f4 /* 09995C 7F064E2C 44802000 */ mtc1 $zero, $f4
/* 099960 7F064E30 44816000 */ mtc1 $at, $f12 /* 099960 7F064E30 44816000 */ mtc1 $at, $f12
/* 099964 7F064E34 00003825 */ move $a3, $zero /* 099964 7F064E34 00003825 */ move $a3, $zero
/* 099968 7F064E38 0FC201F8 */ jal sub_GAME_7F0807E0 /* 099968 7F064E38 0FC201F8 */ jal currentPlayerAdjustFade
/* 09996C 7F064E3C E7A40010 */ swc1 $f4, 0x10($sp) /* 09996C 7F064E3C E7A40010 */ swc1 $f4, 0x10($sp)
/* 099970 7F064E40 240F0002 */ li $t7, 2 /* 099970 7F064E40 240F0002 */ li $t7, 2
/* 099974 7F064E44 AE0F0024 */ sw $t7, 0x24($s0) /* 099974 7F064E44 AE0F0024 */ sw $t7, 0x24($s0)
@@ -13739,7 +13739,7 @@ Weapon_shooting_pistol:
/* 099B68 7F065038 24190003 */ li $t9, 3 /* 099B68 7F065038 24190003 */ li $t9, 3
/* 099B6C 7F06503C 5560001E */ bnezl $t3, .L7F0650B8 /* 099B6C 7F06503C 5560001E */ bnezl $t3, .L7F0650B8
/* 099B70 7F065040 AE190024 */ sw $t9, 0x24($s0) /* 099B70 7F065040 AE190024 */ sw $t9, 0x24($s0)
/* 099B74 7F065044 0FC26919 */ jal get_num_players /* 099B74 7F065044 0FC26919 */ jal getPlayerCount
/* 099B78 7F065048 00000000 */ nop /* 099B78 7F065048 00000000 */ nop
/* 099B7C 7F06504C 24010001 */ li $at, 1 /* 099B7C 7F06504C 24010001 */ li $at, 1
/* 099B80 7F065050 50410009 */ beql $v0, $at, .L7F065078 /* 099B80 7F065050 50410009 */ beql $v0, $at, .L7F065078
@@ -13816,7 +13816,7 @@ Weapon_shooting_machinegun:
.L7F065150: .L7F065150:
/* 099C80 7F065150 5700004F */ bnezl $t8, .L7F065290 /* 099C80 7F065150 5700004F */ bnezl $t8, .L7F065290
/* 099C84 7F065154 820F000C */ lb $t7, 0xc($s0) /* 099C84 7F065154 820F000C */ lb $t7, 0xc($s0)
/* 099C88 7F065158 0FC26919 */ jal get_num_players /* 099C88 7F065158 0FC26919 */ jal getPlayerCount
/* 099C8C 7F06515C 00000000 */ nop /* 099C8C 7F06515C 00000000 */ nop
/* 099C90 7F065160 24010001 */ li $at, 1 /* 099C90 7F065160 24010001 */ li $at, 1
/* 099C94 7F065164 50410009 */ beql $v0, $at, .L7F06518C /* 099C94 7F065164 50410009 */ beql $v0, $at, .L7F06518C
@@ -13926,7 +13926,7 @@ Weapon_shooting_throwable:
/* 099DFC 7F0652CC 8E18002C */ lw $t8, 0x2c($s0) /* 099DFC 7F0652CC 8E18002C */ lw $t8, 0x2c($s0)
/* 099E00 7F0652D0 0FC26C54 */ jal get_cur_playernum /* 099E00 7F0652D0 0FC26C54 */ jal get_cur_playernum
/* 099E04 7F0652D4 00000000 */ nop /* 099E04 7F0652D4 00000000 */ nop
/* 099E08 7F0652D8 0FC26919 */ jal get_num_players /* 099E08 7F0652D8 0FC26919 */ jal getPlayerCount
/* 099E0C 7F0652DC AFA20048 */ sw $v0, 0x48($sp) /* 099E0C 7F0652DC AFA20048 */ sw $v0, 0x48($sp)
/* 099E10 7F0652E0 8FAE0048 */ lw $t6, 0x48($sp) /* 099E10 7F0652E0 8FAE0048 */ lw $t6, 0x48($sp)
/* 099E14 7F0652E4 3C053DCC */ lui $a1, (0x3DCCCCCD >> 16) # lui $a1, 0x3dcc /* 099E14 7F0652E4 3C053DCC */ lui $a1, (0x3DCCCCCD >> 16) # lui $a1, 0x3dcc
@@ -13979,7 +13979,7 @@ Weapon_shooting_throwable:
/* 099EC4 7F065394 00000000 */ nop /* 099EC4 7F065394 00000000 */ nop
/* 099EC8 7F065398 AFB901B4 */ sw $t9, 0x1b4($sp) /* 099EC8 7F065398 AFB901B4 */ sw $t9, 0x1b4($sp)
.L7F06539C: .L7F06539C:
/* 099ECC 7F06539C 0FC26919 */ jal get_num_players /* 099ECC 7F06539C 0FC26919 */ jal getPlayerCount
/* 099ED0 7F0653A0 00000000 */ nop /* 099ED0 7F0653A0 00000000 */ nop
/* 099ED4 7F0653A4 24010001 */ li $at, 1 /* 099ED4 7F0653A4 24010001 */ li $at, 1
/* 099ED8 7F0653A8 5041000A */ beql $v0, $at, .L7F0653D4 /* 099ED8 7F0653A8 5041000A */ beql $v0, $at, .L7F0653D4
@@ -14081,7 +14081,7 @@ Weapon_shooting_throwable:
/* 09A03C 7F06550C AE190024 */ sw $t9, 0x24($s0) /* 09A03C 7F06550C AE190024 */ sw $t9, 0x24($s0)
.L7F065510: .L7F065510:
/* 09A040 7F065510 AE000020 */ sw $zero, 0x20($s0) /* 09A040 7F065510 AE000020 */ sw $zero, 0x20($s0)
/* 09A044 7F065514 0FC26919 */ jal get_num_players /* 09A044 7F065514 0FC26919 */ jal getPlayerCount
/* 09A048 7F065518 AE00001C */ sw $zero, 0x1c($s0) /* 09A048 7F065518 AE00001C */ sw $zero, 0x1c($s0)
/* 09A04C 7F06551C 24010001 */ li $at, 1 /* 09A04C 7F06551C 24010001 */ li $at, 1
/* 09A050 7F065520 10410004 */ beq $v0, $at, .L7F065534 /* 09A050 7F065520 10410004 */ beq $v0, $at, .L7F065534
@@ -14441,7 +14441,7 @@ Weapon_shooting_throwable:
/* 09A584 7F065A54 24040010 */ li $a0, 16 /* 09A584 7F065A54 24040010 */ li $a0, 16
/* 09A588 7F065A58 54A2005E */ bnel $a1, $v0, .L7F065BD4 /* 09A588 7F065A58 54A2005E */ bnel $a1, $v0, .L7F065BD4
/* 09A58C 7F065A5C 24060006 */ li $a2, 6 /* 09A58C 7F065A5C 24060006 */ li $a2, 6
/* 09A590 7F065A60 0FC26919 */ jal get_num_players /* 09A590 7F065A60 0FC26919 */ jal getPlayerCount
/* 09A594 7F065A64 AFA40188 */ sw $a0, 0x188($sp) /* 09A594 7F065A64 AFA40188 */ sw $a0, 0x188($sp)
/* 09A598 7F065A68 28410002 */ slti $at, $v0, 2 /* 09A598 7F065A68 28410002 */ slti $at, $v0, 2
/* 09A59C 7F065A6C 14200002 */ bnez $at, .L7F065A78 /* 09A59C 7F065A6C 14200002 */ bnez $at, .L7F065A78
@@ -14451,7 +14451,7 @@ Weapon_shooting_throwable:
/* 09A5A8 7F065A78 8E19001C */ lw $t9, 0x1c($s0) /* 09A5A8 7F065A78 8E19001C */ lw $t9, 0x1c($s0)
/* 09A5AC 7F065A7C 5720000C */ bnezl $t9, .L7F065AB0 /* 09A5AC 7F065A7C 5720000C */ bnezl $t9, .L7F065AB0
/* 09A5B0 7F065A80 8E030020 */ lw $v1, 0x20($s0) /* 09A5B0 7F065A80 8E030020 */ lw $v1, 0x20($s0)
/* 09A5B4 7F065A84 0FC26919 */ jal get_num_players /* 09A5B4 7F065A84 0FC26919 */ jal getPlayerCount
/* 09A5B8 7F065A88 AFA40188 */ sw $a0, 0x188($sp) /* 09A5B8 7F065A88 AFA40188 */ sw $a0, 0x188($sp)
/* 09A5BC 7F065A8C 24010001 */ li $at, 1 /* 09A5BC 7F065A8C 24010001 */ li $at, 1
/* 09A5C0 7F065A90 14410004 */ bne $v0, $at, .L7F065AA4 /* 09A5C0 7F065A90 14410004 */ bne $v0, $at, .L7F065AA4
@@ -14478,7 +14478,7 @@ Weapon_shooting_throwable:
/* 09A608 7F065AD8 8C6F1130 */ lw $t7, 0x1130($v1) /* 09A608 7F065AD8 8C6F1130 */ lw $t7, 0x1130($v1)
/* 09A60C 7F065ADC 01F8C821 */ addu $t9, $t7, $t8 /* 09A60C 7F065ADC 01F8C821 */ addu $t9, $t7, $t8
/* 09A610 7F065AE0 AC791130 */ sw $t9, 0x1130($v1) /* 09A610 7F065AE0 AC791130 */ sw $t9, 0x1130($v1)
/* 09A614 7F065AE4 0FC26919 */ jal get_num_players /* 09A614 7F065AE4 0FC26919 */ jal getPlayerCount
/* 09A618 7F065AE8 AE00002C */ sw $zero, 0x2c($s0) /* 09A618 7F065AE8 AE00002C */ sw $zero, 0x2c($s0)
/* 09A61C 7F065AEC 28410002 */ slti $at, $v0, 2 /* 09A61C 7F065AEC 28410002 */ slti $at, $v0, 2
/* 09A620 7F065AF0 14200003 */ bnez $at, .L7F065B00 /* 09A620 7F065AF0 14200003 */ bnez $at, .L7F065B00
@@ -14661,7 +14661,7 @@ Weapon_shooting_throwable:
.L7F065D78: .L7F065D78:
/* 09A8A8 7F065D78 14410088 */ bne $v0, $at, .L7F065F9C /* 09A8A8 7F065D78 14410088 */ bne $v0, $at, .L7F065F9C
/* 09A8AC 7F065D7C 240C0017 */ li $t4, 23 /* 09A8AC 7F065D7C 240C0017 */ li $t4, 23
/* 09A8B0 7F065D80 0FC26919 */ jal get_num_players /* 09A8B0 7F065D80 0FC26919 */ jal getPlayerCount
/* 09A8B4 7F065D84 AFAC0178 */ sw $t4, 0x178($sp) /* 09A8B4 7F065D84 AFAC0178 */ sw $t4, 0x178($sp)
/* 09A8B8 7F065D88 28410002 */ slti $at, $v0, 2 /* 09A8B8 7F065D88 28410002 */ slti $at, $v0, 2
/* 09A8BC 7F065D8C 14200002 */ bnez $at, .L7F065D98 /* 09A8BC 7F065D8C 14200002 */ bnez $at, .L7F065D98
@@ -14671,7 +14671,7 @@ Weapon_shooting_throwable:
/* 09A8C8 7F065D98 8E0E001C */ lw $t6, 0x1c($s0) /* 09A8C8 7F065D98 8E0E001C */ lw $t6, 0x1c($s0)
/* 09A8CC 7F065D9C 55C00048 */ bnezl $t6, .L7F065EC0 /* 09A8CC 7F065D9C 55C00048 */ bnezl $t6, .L7F065EC0
/* 09A8D0 7F065DA0 8E0E0020 */ lw $t6, 0x20($s0) /* 09A8D0 7F065DA0 8E0E0020 */ lw $t6, 0x20($s0)
/* 09A8D4 7F065DA4 0FC26919 */ jal get_num_players /* 09A8D4 7F065DA4 0FC26919 */ jal getPlayerCount
/* 09A8D8 7F065DA8 00000000 */ nop /* 09A8D8 7F065DA8 00000000 */ nop
/* 09A8DC 7F065DAC 28410002 */ slti $at, $v0, 2 /* 09A8DC 7F065DAC 28410002 */ slti $at, $v0, 2
/* 09A8E0 7F065DB0 14200003 */ bnez $at, .L7F065DC0 /* 09A8E0 7F065DB0 14200003 */ bnez $at, .L7F065DC0
@@ -15245,7 +15245,7 @@ weapon_reload_none_sfx:
/* 09B0EC 7F0665BC 8E0D0020 */ lw $t5, 0x20($s0) /* 09B0EC 7F0665BC 8E0D0020 */ lw $t5, 0x20($s0)
/* 09B0F0 7F0665C0 5020000E */ beql $at, $zero, .L7F0665FC /* 09B0F0 7F0665C0 5020000E */ beql $at, $zero, .L7F0665FC
/* 09B0F4 7F0665C4 8E0D0020 */ lw $t5, 0x20($s0) /* 09B0F4 7F0665C4 8E0D0020 */ lw $t5, 0x20($s0)
/* 09B0F8 7F0665C8 0FC26919 */ jal get_num_players /* 09B0F8 7F0665C8 0FC26919 */ jal getPlayerCount
/* 09B0FC 7F0665CC 00000000 */ nop /* 09B0FC 7F0665CC 00000000 */ nop
/* 09B100 7F0665D0 28410002 */ slti $at, $v0, 2 /* 09B100 7F0665D0 28410002 */ slti $at, $v0, 2
/* 09B104 7F0665D4 14200003 */ bnez $at, .L7F0665E4 /* 09B104 7F0665D4 14200003 */ bnez $at, .L7F0665E4
@@ -16417,7 +16417,7 @@ Weapon_function_camera:
/* 099F00 7F065390 00002825 */ move $a1, $zero /* 099F00 7F065390 00002825 */ move $a1, $zero
/* 099F04 7F065394 15C00005 */ bnez $t6, .Ljp7F0653AC /* 099F04 7F065394 15C00005 */ bnez $t6, .Ljp7F0653AC
/* 099F08 7F065398 00003025 */ move $a2, $zero /* 099F08 7F065398 00003025 */ move $a2, $zero
/* 099F0C 7F06539C 0FC20370 */ jal set_rgba_tint /* 099F0C 7F06539C 0FC20370 */ jal currentPlayerSetFadeColour
/* 099F10 7F0653A0 3C073F80 */ lui $a3, 0x3f80 /* 099F10 7F0653A0 3C073F80 */ lui $a3, 0x3f80
/* 099F14 7F0653A4 10000063 */ b .Ljp7F065534 /* 099F14 7F0653A4 10000063 */ b .Ljp7F065534
/* 099F18 7F0653A8 AE000398 */ sw $zero, 0x398($s0) /* 099F18 7F0653A8 AE000398 */ sw $zero, 0x398($s0)
@@ -16430,7 +16430,7 @@ Weapon_function_camera:
/* 099F30 7F0653C0 44802000 */ mtc1 $zero, $f4 /* 099F30 7F0653C0 44802000 */ mtc1 $zero, $f4
/* 099F34 7F0653C4 44816000 */ mtc1 $at, $f12 /* 099F34 7F0653C4 44816000 */ mtc1 $at, $f12
/* 099F38 7F0653C8 00003825 */ move $a3, $zero /* 099F38 7F0653C8 00003825 */ move $a3, $zero
/* 099F3C 7F0653CC 0FC2037C */ jal sub_GAME_7F0807E0 /* 099F3C 7F0653CC 0FC2037C */ jal currentPlayerAdjustFade
/* 099F40 7F0653D0 E7A40010 */ swc1 $f4, 0x10($sp) /* 099F40 7F0653D0 E7A40010 */ swc1 $f4, 0x10($sp)
/* 099F44 7F0653D4 240F0002 */ li $t7, 2 /* 099F44 7F0653D4 240F0002 */ li $t7, 2
/* 099F48 7F0653D8 AE0F0024 */ sw $t7, 0x24($s0) /* 099F48 7F0653D8 AE0F0024 */ sw $t7, 0x24($s0)
@@ -16584,7 +16584,7 @@ Weapon_shooting_pistol:
/* 09A13C 7F0655CC 24190003 */ li $t9, 3 /* 09A13C 7F0655CC 24190003 */ li $t9, 3
/* 09A140 7F0655D0 5700001E */ bnezl $t8, .Ljp7F06564C /* 09A140 7F0655D0 5700001E */ bnezl $t8, .Ljp7F06564C
/* 09A144 7F0655D4 AE190024 */ sw $t9, 0x24($s0) /* 09A144 7F0655D4 AE190024 */ sw $t9, 0x24($s0)
/* 09A148 7F0655D8 0FC26C01 */ jal get_num_players /* 09A148 7F0655D8 0FC26C01 */ jal getPlayerCount
/* 09A14C 7F0655DC 00000000 */ nop /* 09A14C 7F0655DC 00000000 */ nop
/* 09A150 7F0655E0 24010001 */ li $at, 1 /* 09A150 7F0655E0 24010001 */ li $at, 1
/* 09A154 7F0655E4 50410009 */ beql $v0, $at, .Ljp7F06560C /* 09A154 7F0655E4 50410009 */ beql $v0, $at, .Ljp7F06560C
@@ -16661,7 +16661,7 @@ Weapon_shooting_machinegun:
.Ljp7F0656E4: .Ljp7F0656E4:
/* 09A254 7F0656E4 5700004F */ bnezl $t8, .Ljp7F065824 /* 09A254 7F0656E4 5700004F */ bnezl $t8, .Ljp7F065824
/* 09A258 7F0656E8 820F000C */ lb $t7, 0xc($s0) /* 09A258 7F0656E8 820F000C */ lb $t7, 0xc($s0)
/* 09A25C 7F0656EC 0FC26C01 */ jal get_num_players /* 09A25C 7F0656EC 0FC26C01 */ jal getPlayerCount
/* 09A260 7F0656F0 00000000 */ nop /* 09A260 7F0656F0 00000000 */ nop
/* 09A264 7F0656F4 24010001 */ li $at, 1 /* 09A264 7F0656F4 24010001 */ li $at, 1
/* 09A268 7F0656F8 50410009 */ beql $v0, $at, .Ljp7F065720 /* 09A268 7F0656F8 50410009 */ beql $v0, $at, .Ljp7F065720
@@ -16770,7 +16770,7 @@ Weapon_shooting_throwable:
/* 09A3D0 7F065860 8E0E002C */ lw $t6, 0x2c($s0) /* 09A3D0 7F065860 8E0E002C */ lw $t6, 0x2c($s0)
/* 09A3D4 7F065864 0FC26F3C */ jal get_cur_playernum /* 09A3D4 7F065864 0FC26F3C */ jal get_cur_playernum
/* 09A3D8 7F065868 00000000 */ nop /* 09A3D8 7F065868 00000000 */ nop
/* 09A3DC 7F06586C 0FC26C01 */ jal get_num_players /* 09A3DC 7F06586C 0FC26C01 */ jal getPlayerCount
/* 09A3E0 7F065870 AFA2004C */ sw $v0, 0x4c($sp) /* 09A3E0 7F065870 AFA2004C */ sw $v0, 0x4c($sp)
/* 09A3E4 7F065874 8FB8004C */ lw $t8, 0x4c($sp) /* 09A3E4 7F065874 8FB8004C */ lw $t8, 0x4c($sp)
/* 09A3E8 7F065878 3C053DCC */ lui $a1, (0x3DCCCCCD >> 16) # lui $a1, 0x3dcc /* 09A3E8 7F065878 3C053DCC */ lui $a1, (0x3DCCCCCD >> 16) # lui $a1, 0x3dcc
@@ -16823,7 +16823,7 @@ Weapon_shooting_throwable:
/* 09A498 7F065928 00000000 */ nop /* 09A498 7F065928 00000000 */ nop
/* 09A49C 7F06592C AFB801C4 */ sw $t8, 0x1c4($sp) /* 09A49C 7F06592C AFB801C4 */ sw $t8, 0x1c4($sp)
.Ljp7F065930: .Ljp7F065930:
/* 09A4A0 7F065930 0FC26C01 */ jal get_num_players /* 09A4A0 7F065930 0FC26C01 */ jal getPlayerCount
/* 09A4A4 7F065934 00000000 */ nop /* 09A4A4 7F065934 00000000 */ nop
/* 09A4A8 7F065938 24010001 */ li $at, 1 /* 09A4A8 7F065938 24010001 */ li $at, 1
/* 09A4AC 7F06593C 5041000A */ beql $v0, $at, .Ljp7F065968 /* 09A4AC 7F06593C 5041000A */ beql $v0, $at, .Ljp7F065968
@@ -16925,7 +16925,7 @@ Weapon_shooting_throwable:
/* 09A610 7F065AA0 AE0F0024 */ sw $t7, 0x24($s0) /* 09A610 7F065AA0 AE0F0024 */ sw $t7, 0x24($s0)
.Ljp7F065AA4: .Ljp7F065AA4:
/* 09A614 7F065AA4 AE000020 */ sw $zero, 0x20($s0) /* 09A614 7F065AA4 AE000020 */ sw $zero, 0x20($s0)
/* 09A618 7F065AA8 0FC26C01 */ jal get_num_players /* 09A618 7F065AA8 0FC26C01 */ jal getPlayerCount
/* 09A61C 7F065AAC AE00001C */ sw $zero, 0x1c($s0) /* 09A61C 7F065AAC AE00001C */ sw $zero, 0x1c($s0)
/* 09A620 7F065AB0 24010001 */ li $at, 1 /* 09A620 7F065AB0 24010001 */ li $at, 1
/* 09A624 7F065AB4 10410008 */ beq $v0, $at, .Ljp7F065AD8 /* 09A624 7F065AB4 10410008 */ beq $v0, $at, .Ljp7F065AD8
@@ -17289,7 +17289,7 @@ Weapon_shooting_throwable:
/* 09AB68 7F065FF8 24040010 */ li $a0, 16 /* 09AB68 7F065FF8 24040010 */ li $a0, 16
/* 09AB6C 7F065FFC 54A2005E */ bnel $a1, $v0, .Ljp7F066178 /* 09AB6C 7F065FFC 54A2005E */ bnel $a1, $v0, .Ljp7F066178
/* 09AB70 7F066000 24060006 */ li $a2, 6 /* 09AB70 7F066000 24060006 */ li $a2, 6
/* 09AB74 7F066004 0FC26C01 */ jal get_num_players /* 09AB74 7F066004 0FC26C01 */ jal getPlayerCount
/* 09AB78 7F066008 AFA4018C */ sw $a0, 0x18c($sp) /* 09AB78 7F066008 AFA4018C */ sw $a0, 0x18c($sp)
/* 09AB7C 7F06600C 28410002 */ slti $at, $v0, 2 /* 09AB7C 7F06600C 28410002 */ slti $at, $v0, 2
/* 09AB80 7F066010 14200002 */ bnez $at, .Ljp7F06601C /* 09AB80 7F066010 14200002 */ bnez $at, .Ljp7F06601C
@@ -17299,7 +17299,7 @@ Weapon_shooting_throwable:
/* 09AB8C 7F06601C 8E18001C */ lw $t8, 0x1c($s0) /* 09AB8C 7F06601C 8E18001C */ lw $t8, 0x1c($s0)
/* 09AB90 7F066020 5700000C */ bnezl $t8, .Ljp7F066054 /* 09AB90 7F066020 5700000C */ bnezl $t8, .Ljp7F066054
/* 09AB94 7F066024 8E030020 */ lw $v1, 0x20($s0) /* 09AB94 7F066024 8E030020 */ lw $v1, 0x20($s0)
/* 09AB98 7F066028 0FC26C01 */ jal get_num_players /* 09AB98 7F066028 0FC26C01 */ jal getPlayerCount
/* 09AB9C 7F06602C AFA4018C */ sw $a0, 0x18c($sp) /* 09AB9C 7F06602C AFA4018C */ sw $a0, 0x18c($sp)
/* 09ABA0 7F066030 24010001 */ li $at, 1 /* 09ABA0 7F066030 24010001 */ li $at, 1
/* 09ABA4 7F066034 14410004 */ bne $v0, $at, .Ljp7F066048 /* 09ABA4 7F066034 14410004 */ bne $v0, $at, .Ljp7F066048
@@ -17326,7 +17326,7 @@ Weapon_shooting_throwable:
/* 09ABEC 7F06607C 8C6E1130 */ lw $t6, 0x1130($v1) /* 09ABEC 7F06607C 8C6E1130 */ lw $t6, 0x1130($v1)
/* 09ABF0 7F066080 01CFC821 */ addu $t9, $t6, $t7 /* 09ABF0 7F066080 01CFC821 */ addu $t9, $t6, $t7
/* 09ABF4 7F066084 AC791130 */ sw $t9, 0x1130($v1) /* 09ABF4 7F066084 AC791130 */ sw $t9, 0x1130($v1)
/* 09ABF8 7F066088 0FC26C01 */ jal get_num_players /* 09ABF8 7F066088 0FC26C01 */ jal getPlayerCount
/* 09ABFC 7F06608C AE00002C */ sw $zero, 0x2c($s0) /* 09ABFC 7F06608C AE00002C */ sw $zero, 0x2c($s0)
/* 09AC00 7F066090 28410002 */ slti $at, $v0, 2 /* 09AC00 7F066090 28410002 */ slti $at, $v0, 2
/* 09AC04 7F066094 14200003 */ bnez $at, .Ljp7F0660A4 /* 09AC04 7F066094 14200003 */ bnez $at, .Ljp7F0660A4
@@ -17509,7 +17509,7 @@ Weapon_shooting_throwable:
.Ljp7F06631C: .Ljp7F06631C:
/* 09AE8C 7F06631C 1441008D */ bne $v0, $at, .Ljp7F066554 /* 09AE8C 7F06631C 1441008D */ bne $v0, $at, .Ljp7F066554
/* 09AE90 7F066320 24190017 */ li $t9, 23 /* 09AE90 7F066320 24190017 */ li $t9, 23
/* 09AE94 7F066324 0FC26C01 */ jal get_num_players /* 09AE94 7F066324 0FC26C01 */ jal getPlayerCount
/* 09AE98 7F066328 AFB9017C */ sw $t9, 0x17c($sp) /* 09AE98 7F066328 AFB9017C */ sw $t9, 0x17c($sp)
/* 09AE9C 7F06632C 28410002 */ slti $at, $v0, 2 /* 09AE9C 7F06632C 28410002 */ slti $at, $v0, 2
/* 09AEA0 7F066330 14200002 */ bnez $at, .Ljp7F06633C /* 09AEA0 7F066330 14200002 */ bnez $at, .Ljp7F06633C
@@ -17519,7 +17519,7 @@ Weapon_shooting_throwable:
/* 09AEAC 7F06633C 8E0E001C */ lw $t6, 0x1c($s0) /* 09AEAC 7F06633C 8E0E001C */ lw $t6, 0x1c($s0)
/* 09AEB0 7F066340 55C0004D */ bnezl $t6, .Ljp7F066478 /* 09AEB0 7F066340 55C0004D */ bnezl $t6, .Ljp7F066478
/* 09AEB4 7F066344 8E0F0020 */ lw $t7, 0x20($s0) /* 09AEB4 7F066344 8E0F0020 */ lw $t7, 0x20($s0)
/* 09AEB8 7F066348 0FC26C01 */ jal get_num_players /* 09AEB8 7F066348 0FC26C01 */ jal getPlayerCount
/* 09AEBC 7F06634C 00000000 */ nop /* 09AEBC 7F06634C 00000000 */ nop
/* 09AEC0 7F066350 28410002 */ slti $at, $v0, 2 /* 09AEC0 7F066350 28410002 */ slti $at, $v0, 2
/* 09AEC4 7F066354 14200003 */ bnez $at, .Ljp7F066364 /* 09AEC4 7F066354 14200003 */ bnez $at, .Ljp7F066364
@@ -18103,7 +18103,7 @@ weapon_reload_none_sfx:
/* 09B704 7F066B94 8E0F0020 */ lw $t7, 0x20($s0) /* 09B704 7F066B94 8E0F0020 */ lw $t7, 0x20($s0)
/* 09B708 7F066B98 5020000E */ beql $at, $zero, .Ljp7F066BD4 /* 09B708 7F066B98 5020000E */ beql $at, $zero, .Ljp7F066BD4
/* 09B70C 7F066B9C 8E0F0020 */ lw $t7, 0x20($s0) /* 09B70C 7F066B9C 8E0F0020 */ lw $t7, 0x20($s0)
/* 09B710 7F066BA0 0FC26C01 */ jal get_num_players /* 09B710 7F066BA0 0FC26C01 */ jal getPlayerCount
/* 09B714 7F066BA4 00000000 */ nop /* 09B714 7F066BA4 00000000 */ nop
/* 09B718 7F066BA8 28410002 */ slti $at, $v0, 2 /* 09B718 7F066BA8 28410002 */ slti $at, $v0, 2
/* 09B71C 7F066BAC 14200003 */ bnez $at, .Ljp7F066BBC /* 09B71C 7F066BAC 14200003 */ bnez $at, .Ljp7F066BBC
@@ -19612,7 +19612,7 @@ void sub_GAME_7F067AA4(s32 param_1)
} }
void sub_GAME_7F067AB4(struct xyzpoint *param_1) void sub_GAME_7F067AB4(struct coord *param_1)
{ {
pPlayer->hands[RIGHT_HAND].field_A38 = sub_GAME_7F05DCB8(RIGHT_HAND) + param_1->x; pPlayer->hands[RIGHT_HAND].field_A38 = sub_GAME_7F05DCB8(RIGHT_HAND) + param_1->x;
pPlayer->hands[RIGHT_HAND].field_A3C = param_1->y; pPlayer->hands[RIGHT_HAND].field_A3C = param_1->y;
@@ -20219,7 +20219,7 @@ void sub_GAME_7F0681CC(void *arg0, s32 arg1, s32 arg2) {
} }
} }
// Node 3 // Node 3
sp24 = (f32) ((120.0f * sp28) / video_related_23()); sp24 = (f32) ((120.0f * sp28) / viGetFovY());
sp1C = get_random_value(); sp1C = get_random_value();
temp_ret = get_random_value(); temp_ret = get_random_value();
temp_f10 = (f32) sp1C; temp_f10 = (f32) sp1C;
@@ -20312,7 +20312,7 @@ glabel sub_GAME_7F0681CC
/* 09CD8C 7F06825C 46083282 */ mul.s $f10, $f6, $f8 /* 09CD8C 7F06825C 46083282 */ mul.s $f10, $f6, $f8
/* 09CD90 7F068260 E7AA0028 */ swc1 $f10, 0x28($sp) /* 09CD90 7F068260 E7AA0028 */ swc1 $f10, 0x28($sp)
.L7F068264: .L7F068264:
/* 09CD94 7F068264 0C001177 */ jal video_related_23 /* 09CD94 7F068264 0C001177 */ jal viGetFovY
/* 09CD98 7F068268 00000000 */ nop /* 09CD98 7F068268 00000000 */ nop
/* 09CD9C 7F06826C 3C0142F0 */ li $at, 0x42F00000 # 120.000000 /* 09CD9C 7F06826C 3C0142F0 */ li $at, 0x42F00000 # 120.000000
/* 09CDA0 7F068270 44818000 */ mtc1 $at, $f16 /* 09CDA0 7F068270 44818000 */ mtc1 $at, $f16
@@ -20624,7 +20624,7 @@ glabel sub_GAME_7F068508
/* 09D060 7F068530 8C430028 */ lw $v1, 0x28($v0) /* 09D060 7F068530 8C430028 */ lw $v1, 0x28($v0)
/* 09D064 7F068534 506001F6 */ beql $v1, $zero, .L7F068D10 /* 09D064 7F068534 506001F6 */ beql $v1, $zero, .L7F068D10
/* 09D068 7F068538 8FBF001C */ lw $ra, 0x1c($sp) /* 09D068 7F068538 8FBF001C */ lw $ra, 0x1c($sp)
/* 09D06C 7F06853C 0FC26919 */ jal get_num_players /* 09D06C 7F06853C 0FC26919 */ jal getPlayerCount
/* 09D070 7F068540 AFA30070 */ sw $v1, 0x70($sp) /* 09D070 7F068540 AFA30070 */ sw $v1, 0x70($sp)
/* 09D074 7F068544 28410002 */ slti $at, $v0, 2 /* 09D074 7F068544 28410002 */ slti $at, $v0, 2
/* 09D078 7F068548 102001F0 */ beqz $at, .L7F068D0C /* 09D078 7F068548 102001F0 */ beqz $at, .L7F068D0C
@@ -21469,7 +21469,7 @@ glabel sub_GAME_7F068EC4
/* 09DAB0 7F068F80 27A5003C */ addiu $a1, $sp, 0x3c /* 09DAB0 7F068F80 27A5003C */ addiu $a1, $sp, 0x3c
/* 09DAB4 7F068F84 0FC16266 */ jal matrix_4x4_set_position /* 09DAB4 7F068F84 0FC16266 */ jal matrix_4x4_set_position
/* 09DAB8 7F068F88 24840004 */ addiu $a0, $a0, 4 /* 09DAB8 7F068F88 24840004 */ addiu $a0, $a0, 4
/* 09DABC 7F068F8C 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 09DABC 7F068F8C 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 09DAC0 7F068F90 00000000 */ nop /* 09DAC0 7F068F90 00000000 */ nop
/* 09DAC4 7F068F94 00402025 */ move $a0, $v0 /* 09DAC4 7F068F94 00402025 */ move $a0, $v0
/* 09DAC8 7F068F98 27A5003C */ addiu $a1, $sp, 0x3c /* 09DAC8 7F068F98 27A5003C */ addiu $a1, $sp, 0x3c
@@ -22949,7 +22949,7 @@ s32 generate_ammo_total_microcode(s32 arg0) {
// Node 2 // Node 2
sp64 = get_item_in_hand(1); sp64 = get_item_in_hand(1);
sp60 = get_item_in_hand(0); sp60 = get_item_in_hand(0);
if (get_num_players() < 3) if (getPlayerCount() < 3)
{ {
// Node 3 // Node 3
sp58 = 0x3b; sp58 = 0x3b;
@@ -22998,8 +22998,8 @@ s32 generate_ammo_total_microcode(s32 arg0) {
sp48 = (void *) (temp_v1->unk4 + globalbank_rdram_offset); sp48 = (void *) (temp_v1->unk4 + globalbank_rdram_offset);
sp30 = getPlayer_c_screenleft(); sp30 = getPlayer_c_screenleft();
sp34 = getPlayer_c_screenwidth(); sp34 = getPlayer_c_screenwidth();
sp38 = get_video2_settings_uly(); sp38 = viGetViewTop();
arg0 = set_rgba_redirect_generate_microcode(arg0, sp48, ((sp34 + sp30) - (f32) sp54), 0xbf800000, (f32) ((get_video2_settings_height() + sp38) + -0x14), 0, (f32) sp28->unk8, 1); arg0 = set_rgba_redirect_generate_microcode(arg0, sp48, ((sp34 + sp30) - (f32) sp54), 0xbf800000, (f32) ((viGetViewHeight() + sp38) + -0x14), 0, (f32) sp28->unk8, 1);
sp44 = (s32) sp48->unk4; sp44 = (s32) sp48->unk4;
} }
// Node 14 // Node 14
@@ -23028,10 +23028,10 @@ s32 generate_ammo_total_microcode(s32 arg0) {
if (bondwalkItemCheckBitflags(sp60, 0x400000) == 0) if (bondwalkItemCheckBitflags(sp60, 0x400000) == 0)
{ {
// Node 20 // Node 20
sp2C = get_video2_settings_ulx(); sp2C = viGetViewLeft();
sp2E = get_video2_settings_width(); sp2E = viGetViewWidth();
sp38 = get_video2_settings_uly(); sp38 = viGetViewTop();
get_video2_settings_height(); viGetViewHeight();
phi_t9 = (sp44 >> 1); phi_t9 = (sp44 >> 1);
if (sp44 < 0) if (sp44 < 0)
{ {
@@ -23045,10 +23045,10 @@ s32 generate_ammo_total_microcode(s32 arg0) {
if ((sp50 > 0) || (bondwalkItemCheckBitflags(sp60, 0x400000) != 0)) if ((sp50 > 0) || (bondwalkItemCheckBitflags(sp60, 0x400000) != 0))
{ {
// Node 25 // Node 25
sp2C = get_video2_settings_ulx(); sp2C = viGetViewLeft();
sp2E = get_video2_settings_width(); sp2E = viGetViewWidth();
sp38 = get_video2_settings_uly(); sp38 = viGetViewTop();
get_video2_settings_height(); viGetViewHeight();
temp_t3 = (sp44 + 1); temp_t3 = (sp44 + 1);
phi_t0 = (temp_t3 >> 1); phi_t0 = (temp_t3 >> 1);
if (temp_t3 < 0) if (temp_t3 < 0)
@@ -23096,8 +23096,8 @@ s32 generate_ammo_total_microcode(s32 arg0) {
sp28 = temp_v1_2; sp28 = temp_v1_2;
sp40 = (void *) (temp_v1_2->unk4 + globalbank_rdram_offset); sp40 = (void *) (temp_v1_2->unk4 + globalbank_rdram_offset);
sp34 = getPlayer_c_screenleft(); sp34 = getPlayer_c_screenleft();
sp38 = get_video2_settings_uly(); sp38 = viGetViewTop();
get_video2_settings_height(); viGetViewHeight();
arg0 = set_rgba_redirect_generate_microcode(sp28->unk8, arg0, sp40, (sp34 + (f32) sp58), 0xbf800000, 1, 1); arg0 = set_rgba_redirect_generate_microcode(sp28->unk8, arg0, sp40, (sp34 + (f32) sp58), 0xbf800000, 1, 1);
sp3C = (s32) sp40->unk4; sp3C = (s32) sp40->unk4;
} }
@@ -23127,9 +23127,9 @@ s32 generate_ammo_total_microcode(s32 arg0) {
if (bondwalkItemCheckBitflags(sp64, 0x400000) == 0) if (bondwalkItemCheckBitflags(sp64, 0x400000) == 0)
{ {
// Node 42 // Node 42
sp2E = get_video2_settings_ulx(); sp2E = viGetViewLeft();
sp38 = get_video2_settings_uly(); sp38 = viGetViewTop();
get_video2_settings_height(); viGetViewHeight();
phi_t3 = (sp3C >> 1); phi_t3 = (sp3C >> 1);
if (sp3C < 0) if (sp3C < 0)
{ {
@@ -23143,9 +23143,9 @@ s32 generate_ammo_total_microcode(s32 arg0) {
if ((sp50 > 0) || (bondwalkItemCheckBitflags(sp64, 0x400000) != 0)) if ((sp50 > 0) || (bondwalkItemCheckBitflags(sp64, 0x400000) != 0))
{ {
// Node 47 // Node 47
sp2E = get_video2_settings_ulx(); sp2E = viGetViewLeft();
sp38 = get_video2_settings_uly(); sp38 = viGetViewTop();
get_video2_settings_height(); viGetViewHeight();
temp_t1 = (sp3C + 1); temp_t1 = (sp3C + 1);
phi_t0_2 = (temp_t1 >> 1); phi_t0_2 = (temp_t1 >> 1);
if (temp_t1 < 0) if (temp_t1 < 0)
@@ -23192,7 +23192,7 @@ glabel generate_ammo_total_microcode
/* 09E858 7F069D28 AFA20064 */ sw $v0, 0x64($sp) /* 09E858 7F069D28 AFA20064 */ sw $v0, 0x64($sp)
/* 09E85C 7F069D2C 0FC17674 */ jal get_item_in_hand /* 09E85C 7F069D2C 0FC17674 */ jal get_item_in_hand
/* 09E860 7F069D30 00002025 */ move $a0, $zero /* 09E860 7F069D30 00002025 */ move $a0, $zero
/* 09E864 7F069D34 0FC26919 */ jal get_num_players /* 09E864 7F069D34 0FC26919 */ jal getPlayerCount
/* 09E868 7F069D38 AFA20060 */ sw $v0, 0x60($sp) /* 09E868 7F069D38 AFA20060 */ sw $v0, 0x60($sp)
/* 09E86C 7F069D3C 28410003 */ slti $at, $v0, 3 /* 09E86C 7F069D3C 28410003 */ slti $at, $v0, 3
/* 09E870 7F069D40 10200005 */ beqz $at, .L7F069D58 /* 09E870 7F069D40 10200005 */ beqz $at, .L7F069D58
@@ -23254,9 +23254,9 @@ glabel generate_ammo_total_microcode
/* 09E944 7F069E14 AFA20048 */ sw $v0, 0x48($sp) /* 09E944 7F069E14 AFA20048 */ sw $v0, 0x48($sp)
/* 09E948 7F069E18 0FC1E129 */ jal getPlayer_c_screenwidth /* 09E948 7F069E18 0FC1E129 */ jal getPlayer_c_screenwidth
/* 09E94C 7F069E1C E7A00030 */ swc1 $f0, 0x30($sp) /* 09E94C 7F069E1C E7A00030 */ swc1 $f0, 0x30($sp)
/* 09E950 7F069E20 0C001149 */ jal get_video2_settings_uly /* 09E950 7F069E20 0C001149 */ jal viGetViewTop
/* 09E954 7F069E24 E7A00034 */ swc1 $f0, 0x34($sp) /* 09E954 7F069E24 E7A00034 */ swc1 $f0, 0x34($sp)
/* 09E958 7F069E28 0C00112B */ jal get_video2_settings_height /* 09E958 7F069E28 0C00112B */ jal viGetViewHeight
/* 09E95C 7F069E2C A7A20038 */ sh $v0, 0x38($sp) /* 09E95C 7F069E2C A7A20038 */ sh $v0, 0x38($sp)
/* 09E960 7F069E30 8FAA0054 */ lw $t2, 0x54($sp) /* 09E960 7F069E30 8FAA0054 */ lw $t2, 0x54($sp)
/* 09E964 7F069E34 87AB0038 */ lh $t3, 0x38($sp) /* 09E964 7F069E34 87AB0038 */ lh $t3, 0x38($sp)
@@ -23327,13 +23327,13 @@ glabel generate_ammo_total_microcode
/* 09EA58 7F069F28 8FA40060 */ lw $a0, 0x60($sp) /* 09EA58 7F069F28 8FA40060 */ lw $a0, 0x60($sp)
/* 09EA5C 7F069F2C 54400023 */ bnezl $v0, .L7F069FBC /* 09EA5C 7F069F2C 54400023 */ bnezl $v0, .L7F069FBC
/* 09EA60 7F069F30 8FAD0050 */ lw $t5, 0x50($sp) /* 09EA60 7F069F30 8FAD0050 */ lw $t5, 0x50($sp)
/* 09EA64 7F069F34 0C001145 */ jal get_video2_settings_ulx /* 09EA64 7F069F34 0C001145 */ jal viGetViewLeft
/* 09EA68 7F069F38 00000000 */ nop /* 09EA68 7F069F38 00000000 */ nop
/* 09EA6C 7F069F3C 0C001127 */ jal get_video2_settings_width /* 09EA6C 7F069F3C 0C001127 */ jal viGetViewWidth
/* 09EA70 7F069F40 A7A2002C */ sh $v0, 0x2c($sp) /* 09EA70 7F069F40 A7A2002C */ sh $v0, 0x2c($sp)
/* 09EA74 7F069F44 0C001149 */ jal get_video2_settings_uly /* 09EA74 7F069F44 0C001149 */ jal viGetViewTop
/* 09EA78 7F069F48 A7A2002E */ sh $v0, 0x2e($sp) /* 09EA78 7F069F48 A7A2002E */ sh $v0, 0x2e($sp)
/* 09EA7C 7F069F4C 0C00112B */ jal get_video2_settings_height /* 09EA7C 7F069F4C 0C00112B */ jal viGetViewHeight
/* 09EA80 7F069F50 A7A20038 */ sh $v0, 0x38($sp) /* 09EA80 7F069F50 A7A20038 */ sh $v0, 0x38($sp)
/* 09EA84 7F069F54 87A8002E */ lh $t0, 0x2e($sp) /* 09EA84 7F069F54 87A8002E */ lh $t0, 0x2e($sp)
/* 09EA88 7F069F58 87AC002C */ lh $t4, 0x2c($sp) /* 09EA88 7F069F58 87AC002C */ lh $t4, 0x2c($sp)
@@ -23371,13 +23371,13 @@ glabel generate_ammo_total_microcode
/* 09EB00 7F069FD0 10400023 */ beqz $v0, .L7F06A060 /* 09EB00 7F069FD0 10400023 */ beqz $v0, .L7F06A060
/* 09EB04 7F069FD4 00000000 */ nop /* 09EB04 7F069FD4 00000000 */ nop
.L7F069FD8: .L7F069FD8:
/* 09EB08 7F069FD8 0C001145 */ jal get_video2_settings_ulx /* 09EB08 7F069FD8 0C001145 */ jal viGetViewLeft
/* 09EB0C 7F069FDC 00000000 */ nop /* 09EB0C 7F069FDC 00000000 */ nop
/* 09EB10 7F069FE0 0C001127 */ jal get_video2_settings_width /* 09EB10 7F069FE0 0C001127 */ jal viGetViewWidth
/* 09EB14 7F069FE4 A7A2002C */ sh $v0, 0x2c($sp) /* 09EB14 7F069FE4 A7A2002C */ sh $v0, 0x2c($sp)
/* 09EB18 7F069FE8 0C001149 */ jal get_video2_settings_uly /* 09EB18 7F069FE8 0C001149 */ jal viGetViewTop
/* 09EB1C 7F069FEC A7A2002E */ sh $v0, 0x2e($sp) /* 09EB1C 7F069FEC A7A2002E */ sh $v0, 0x2e($sp)
/* 09EB20 7F069FF0 0C00112B */ jal get_video2_settings_height /* 09EB20 7F069FF0 0C00112B */ jal viGetViewHeight
/* 09EB24 7F069FF4 A7A20038 */ sh $v0, 0x38($sp) /* 09EB24 7F069FF4 A7A20038 */ sh $v0, 0x38($sp)
/* 09EB28 7F069FF8 87AE002E */ lh $t6, 0x2e($sp) /* 09EB28 7F069FF8 87AE002E */ lh $t6, 0x2e($sp)
/* 09EB2C 7F069FFC 87B8002C */ lh $t8, 0x2c($sp) /* 09EB2C 7F069FFC 87B8002C */ lh $t8, 0x2c($sp)
@@ -23447,9 +23447,9 @@ glabel generate_ammo_total_microcode
/* 09EC1C 7F06A0EC 004C1021 */ addu $v0, $v0, $t4 /* 09EC1C 7F06A0EC 004C1021 */ addu $v0, $v0, $t4
/* 09EC20 7F06A0F0 0FC1E131 */ jal getPlayer_c_screenleft /* 09EC20 7F06A0F0 0FC1E131 */ jal getPlayer_c_screenleft
/* 09EC24 7F06A0F4 AFA20040 */ sw $v0, 0x40($sp) /* 09EC24 7F06A0F4 AFA20040 */ sw $v0, 0x40($sp)
/* 09EC28 7F06A0F8 0C001149 */ jal get_video2_settings_uly /* 09EC28 7F06A0F8 0C001149 */ jal viGetViewTop
/* 09EC2C 7F06A0FC E7A00034 */ swc1 $f0, 0x34($sp) /* 09EC2C 7F06A0FC E7A00034 */ swc1 $f0, 0x34($sp)
/* 09EC30 7F06A100 0C00112B */ jal get_video2_settings_height /* 09EC30 7F06A100 0C00112B */ jal viGetViewHeight
/* 09EC34 7F06A104 A7A20038 */ sh $v0, 0x38($sp) /* 09EC34 7F06A104 A7A20038 */ sh $v0, 0x38($sp)
/* 09EC38 7F06A108 8FAD0058 */ lw $t5, 0x58($sp) /* 09EC38 7F06A108 8FAD0058 */ lw $t5, 0x58($sp)
/* 09EC3C 7F06A10C 87AE0038 */ lh $t6, 0x38($sp) /* 09EC3C 7F06A10C 87AE0038 */ lh $t6, 0x38($sp)
@@ -23519,11 +23519,11 @@ glabel generate_ammo_total_microcode
/* 09ED2C 7F06A1FC 8FA40064 */ lw $a0, 0x64($sp) /* 09ED2C 7F06A1FC 8FA40064 */ lw $a0, 0x64($sp)
/* 09ED30 7F06A200 5440001F */ bnezl $v0, .L7F06A280 /* 09ED30 7F06A200 5440001F */ bnezl $v0, .L7F06A280
/* 09ED34 7F06A204 8FAC0050 */ lw $t4, 0x50($sp) /* 09ED34 7F06A204 8FAC0050 */ lw $t4, 0x50($sp)
/* 09ED38 7F06A208 0C001145 */ jal get_video2_settings_ulx /* 09ED38 7F06A208 0C001145 */ jal viGetViewLeft
/* 09ED3C 7F06A20C 00000000 */ nop /* 09ED3C 7F06A20C 00000000 */ nop
/* 09ED40 7F06A210 0C001149 */ jal get_video2_settings_uly /* 09ED40 7F06A210 0C001149 */ jal viGetViewTop
/* 09ED44 7F06A214 A7A2002E */ sh $v0, 0x2e($sp) /* 09ED44 7F06A214 A7A2002E */ sh $v0, 0x2e($sp)
/* 09ED48 7F06A218 0C00112B */ jal get_video2_settings_height /* 09ED48 7F06A218 0C00112B */ jal viGetViewHeight
/* 09ED4C 7F06A21C A7A20038 */ sh $v0, 0x38($sp) /* 09ED4C 7F06A21C A7A20038 */ sh $v0, 0x38($sp)
/* 09ED50 7F06A220 87AC002E */ lh $t4, 0x2e($sp) /* 09ED50 7F06A220 87AC002E */ lh $t4, 0x2e($sp)
/* 09ED54 7F06A224 8FAF0058 */ lw $t7, 0x58($sp) /* 09ED54 7F06A224 8FAF0058 */ lw $t7, 0x58($sp)
@@ -23559,11 +23559,11 @@ glabel generate_ammo_total_microcode
/* 09EDC4 7F06A294 1040001F */ beqz $v0, .L7F06A314 /* 09EDC4 7F06A294 1040001F */ beqz $v0, .L7F06A314
/* 09EDC8 7F06A298 00000000 */ nop /* 09EDC8 7F06A298 00000000 */ nop
.L7F06A29C: .L7F06A29C:
/* 09EDCC 7F06A29C 0C001145 */ jal get_video2_settings_ulx /* 09EDCC 7F06A29C 0C001145 */ jal viGetViewLeft
/* 09EDD0 7F06A2A0 00000000 */ nop /* 09EDD0 7F06A2A0 00000000 */ nop
/* 09EDD4 7F06A2A4 0C001149 */ jal get_video2_settings_uly /* 09EDD4 7F06A2A4 0C001149 */ jal viGetViewTop
/* 09EDD8 7F06A2A8 A7A2002E */ sh $v0, 0x2e($sp) /* 09EDD8 7F06A2A8 A7A2002E */ sh $v0, 0x2e($sp)
/* 09EDDC 7F06A2AC 0C00112B */ jal get_video2_settings_height /* 09EDDC 7F06A2AC 0C00112B */ jal viGetViewHeight
/* 09EDE0 7F06A2B0 A7A20038 */ sh $v0, 0x38($sp) /* 09EDE0 7F06A2B0 A7A20038 */ sh $v0, 0x38($sp)
/* 09EDE4 7F06A2B4 87AF002E */ lh $t7, 0x2e($sp) /* 09EDE4 7F06A2B4 87AF002E */ lh $t7, 0x2e($sp)
/* 09EDE8 7F06A2B8 8FAA0058 */ lw $t2, 0x58($sp) /* 09EDE8 7F06A2B8 8FAA0058 */ lw $t2, 0x58($sp)
@@ -23669,9 +23669,9 @@ s32 sub_GAME_7F06A334(s32 arg0) {
{ {
// Node 6 // Node 6
sp40 = (void *) (sp40 + globalbank_rdram_offset); sp40 = (void *) (sp40 + globalbank_rdram_offset);
sp34 = get_video2_settings_uly(); sp34 = viGetViewTop();
sp3C = (s32) sp40->unk4; sp3C = (s32) sp40->unk4;
phi_s0 = set_rgba_redirect_generate_microcode(arg0, sp40, 0x43480000, 0x43340000, (f32) ((get_video2_settings_height() + sp34) + -0x14), 0, (f32) sp30->unk8, 1); phi_s0 = set_rgba_redirect_generate_microcode(arg0, sp40, 0x43480000, 0x43340000, (f32) ((viGetViewHeight() + sp34) + -0x14), 0, (f32) sp30->unk8, 1);
} }
// Node 7 // Node 7
temp_s0 = microcode_constructor(phi_s0); temp_s0 = microcode_constructor(phi_s0);
@@ -23787,9 +23787,9 @@ glabel sub_GAME_7F06A334
/* 09EF10 7F06A3E0 00000000 */ nop /* 09EF10 7F06A3E0 00000000 */ nop
/* 09EF14 7F06A3E4 8D4AD0B0 */ lw $t2, %lo(globalbank_rdram_offset)($t2) /* 09EF14 7F06A3E4 8D4AD0B0 */ lw $t2, %lo(globalbank_rdram_offset)($t2)
/* 09EF18 7F06A3E8 006A1821 */ addu $v1, $v1, $t2 /* 09EF18 7F06A3E8 006A1821 */ addu $v1, $v1, $t2
/* 09EF1C 7F06A3EC 0C001149 */ jal get_video2_settings_uly /* 09EF1C 7F06A3EC 0C001149 */ jal viGetViewTop
/* 09EF20 7F06A3F0 AFA30040 */ sw $v1, 0x40($sp) /* 09EF20 7F06A3F0 AFA30040 */ sw $v1, 0x40($sp)
/* 09EF24 7F06A3F4 0C00112B */ jal get_video2_settings_height /* 09EF24 7F06A3F4 0C00112B */ jal viGetViewHeight
/* 09EF28 7F06A3F8 A7A20034 */ sh $v0, 0x34($sp) /* 09EF28 7F06A3F8 A7A20034 */ sh $v0, 0x34($sp)
/* 09EF2C 7F06A3FC 87AB0034 */ lh $t3, 0x34($sp) /* 09EF2C 7F06A3FC 87AB0034 */ lh $t3, 0x34($sp)
/* 09EF30 7F06A400 8FAE0030 */ lw $t6, 0x30($sp) /* 09EF30 7F06A400 8FAE0030 */ lw $t6, 0x30($sp)
@@ -24201,7 +24201,7 @@ void *increment_num_kills_display_text_in_MP(void) {
// Node 0 // Node 0
pPlayersPerm->killcount = (s32) (pPlayersPerm->killcount + 1); pPlayersPerm->killcount = (s32) (pPlayersPerm->killcount + 1);
pPlayer->field_29F8 = (s32) (pPlayer->field_29F8 + 1); pPlayer->field_29F8 = (s32) (pPlayer->field_29F8 + 1);
temp_ret = get_num_players(); temp_ret = getPlayerCount();
phi_return_reg = temp_ret; phi_return_reg = temp_ret;
if (temp_ret >= 2) if (temp_ret >= 2)
{ {
@@ -24292,7 +24292,7 @@ glabel increment_num_kills_display_text_in_MP
/* 09F2D8 7F06A7A8 8E020000 */ lw $v0, ($s0) /* 09F2D8 7F06A7A8 8E020000 */ lw $v0, ($s0)
/* 09F2DC 7F06A7AC 8C5829F8 */ lw $t8, 0x29f8($v0) /* 09F2DC 7F06A7AC 8C5829F8 */ lw $t8, 0x29f8($v0)
/* 09F2E0 7F06A7B0 27190001 */ addiu $t9, $t8, 1 /* 09F2E0 7F06A7B0 27190001 */ addiu $t9, $t8, 1
/* 09F2E4 7F06A7B4 0FC26919 */ jal get_num_players /* 09F2E4 7F06A7B4 0FC26919 */ jal getPlayerCount
/* 09F2E8 7F06A7B8 AC5929F8 */ sw $t9, 0x29f8($v0) /* 09F2E8 7F06A7B8 AC5929F8 */ sw $t9, 0x29f8($v0)
/* 09F2EC 7F06A7BC 28410002 */ slti $at, $v0, 2 /* 09F2EC 7F06A7BC 28410002 */ slti $at, $v0, 2
/* 09F2F0 7F06A7C0 54200054 */ bnezl $at, .L7F06A914 /* 09F2F0 7F06A7C0 54200054 */ bnezl $at, .L7F06A914
@@ -24407,7 +24407,7 @@ glabel increment_num_kills_display_text_in_MP
/* 09F2D8 7F06A7A8 8E020000 */ lw $v0, ($s0) /* 09F2D8 7F06A7A8 8E020000 */ lw $v0, ($s0)
/* 09F2DC 7F06A7AC 8C5829F8 */ lw $t8, 0x29f8($v0) /* 09F2DC 7F06A7AC 8C5829F8 */ lw $t8, 0x29f8($v0)
/* 09F2E0 7F06A7B0 27190001 */ addiu $t9, $t8, 1 /* 09F2E0 7F06A7B0 27190001 */ addiu $t9, $t8, 1
/* 09F2E4 7F06A7B4 0FC26919 */ jal get_num_players /* 09F2E4 7F06A7B4 0FC26919 */ jal getPlayerCount
/* 09F2E8 7F06A7B8 AC5929F8 */ sw $t9, 0x29f8($v0) /* 09F2E8 7F06A7B8 AC5929F8 */ sw $t9, 0x29f8($v0)
/* 09F2EC 7F06A7BC 28410002 */ slti $at, $v0, 2 /* 09F2EC 7F06A7BC 28410002 */ slti $at, $v0, 2
/* 09F2F0 7F06A7C0 54200054 */ bnezl $at, .L7F06A914 /* 09F2F0 7F06A7C0 54200054 */ bnezl $at, .L7F06A914
@@ -24524,7 +24524,7 @@ void increment_num_deaths(void)
{ {
char acStack256 [256] char acStack256 [256]
pPlayer->deathcount = (s32) (pPlayer->deathcount + 1); pPlayer->deathcount = (s32) (pPlayer->deathcount + 1);
if (get_num_players() >= 2) if (getPlayerCount() >= 2)
{ {
if (pPlayer->deathcount == 1) if (pPlayer->deathcount == 1)
{ {
@@ -24548,7 +24548,7 @@ glabel increment_num_deaths
/* 09F498 7F06A968 AFBF001C */ sw $ra, 0x1c($sp) /* 09F498 7F06A968 AFBF001C */ sw $ra, 0x1c($sp)
/* 09F49C 7F06A96C 8C4E29D8 */ lw $t6, 0x29d8($v0) /* 09F49C 7F06A96C 8C4E29D8 */ lw $t6, 0x29d8($v0)
/* 09F4A0 7F06A970 25CF0001 */ addiu $t7, $t6, 1 /* 09F4A0 7F06A970 25CF0001 */ addiu $t7, $t6, 1
/* 09F4A4 7F06A974 0FC26919 */ jal get_num_players /* 09F4A4 7F06A974 0FC26919 */ jal getPlayerCount
/* 09F4A8 7F06A978 AC4F29D8 */ sw $t7, 0x29d8($v0) /* 09F4A8 7F06A978 AC4F29D8 */ sw $t7, 0x29d8($v0)
/* 09F4AC 7F06A97C 28410002 */ slti $at, $v0, 2 /* 09F4AC 7F06A97C 28410002 */ slti $at, $v0, 2
/* 09F4B0 7F06A980 1420001D */ bnez $at, .L7F06A9F8 /* 09F4B0 7F06A980 1420001D */ bnez $at, .L7F06A9F8
@@ -24600,7 +24600,7 @@ glabel increment_num_deaths
/* 09F498 7F06A968 AFBF001C */ sw $ra, 0x1c($sp) /* 09F498 7F06A968 AFBF001C */ sw $ra, 0x1c($sp)
/* 09F49C 7F06A96C 8C4E29D8 */ lw $t6, 0x29d8($v0) /* 09F49C 7F06A96C 8C4E29D8 */ lw $t6, 0x29d8($v0)
/* 09F4A0 7F06A970 25CF0001 */ addiu $t7, $t6, 1 /* 09F4A0 7F06A970 25CF0001 */ addiu $t7, $t6, 1
/* 09F4A4 7F06A974 0FC26919 */ jal get_num_players /* 09F4A4 7F06A974 0FC26919 */ jal getPlayerCount
/* 09F4A8 7F06A978 AC4F29D8 */ sw $t7, 0x29d8($v0) /* 09F4A8 7F06A978 AC4F29D8 */ sw $t7, 0x29d8($v0)
/* 09F4AC 7F06A97C 28410002 */ slti $at, $v0, 2 /* 09F4AC 7F06A97C 28410002 */ slti $at, $v0, 2
/* 09F4B0 7F06A980 1420001D */ bnez $at, .L7F06A9F8 /* 09F4B0 7F06A980 1420001D */ bnez $at, .L7F06A9F8
@@ -24660,7 +24660,7 @@ void *increment_num_suicides_display_MP(void) {
// Node 0 // Node 0
pPlayer->num_suicides = (s32) (pPlayer->num_suicides + 1); pPlayer->num_suicides = (s32) (pPlayer->num_suicides + 1);
temp_ret = get_num_players(); temp_ret = getPlayerCount();
phi_return_reg = temp_ret; phi_return_reg = temp_ret;
if (temp_ret >= 2) if (temp_ret >= 2)
{ {
@@ -24747,7 +24747,7 @@ glabel increment_num_suicides_display_MP
/* 09F55C 7F06AA2C AFBF001C */ sw $ra, 0x1c($sp) /* 09F55C 7F06AA2C AFBF001C */ sw $ra, 0x1c($sp)
/* 09F560 7F06AA30 8C4E29DC */ lw $t6, 0x29dc($v0) /* 09F560 7F06AA30 8C4E29DC */ lw $t6, 0x29dc($v0)
/* 09F564 7F06AA34 25CF0001 */ addiu $t7, $t6, 1 /* 09F564 7F06AA34 25CF0001 */ addiu $t7, $t6, 1
/* 09F568 7F06AA38 0FC26919 */ jal get_num_players /* 09F568 7F06AA38 0FC26919 */ jal getPlayerCount
/* 09F56C 7F06AA3C AC4F29DC */ sw $t7, 0x29dc($v0) /* 09F56C 7F06AA3C AC4F29DC */ sw $t7, 0x29dc($v0)
/* 09F570 7F06AA40 28410002 */ slti $at, $v0, 2 /* 09F570 7F06AA40 28410002 */ slti $at, $v0, 2
/* 09F574 7F06AA44 54200052 */ bnezl $at, .L7F06AB90 /* 09F574 7F06AA44 54200052 */ bnezl $at, .L7F06AB90
@@ -24856,7 +24856,7 @@ glabel increment_num_suicides_display_MP
/* 09F55C 7F06AA2C AFBF001C */ sw $ra, 0x1c($sp) /* 09F55C 7F06AA2C AFBF001C */ sw $ra, 0x1c($sp)
/* 09F560 7F06AA30 8C4E29DC */ lw $t6, 0x29dc($v0) /* 09F560 7F06AA30 8C4E29DC */ lw $t6, 0x29dc($v0)
/* 09F564 7F06AA34 25CF0001 */ addiu $t7, $t6, 1 /* 09F564 7F06AA34 25CF0001 */ addiu $t7, $t6, 1
/* 09F568 7F06AA38 0FC26919 */ jal get_num_players /* 09F568 7F06AA38 0FC26919 */ jal getPlayerCount
/* 09F56C 7F06AA3C AC4F29DC */ sw $t7, 0x29dc($v0) /* 09F56C 7F06AA3C AC4F29DC */ sw $t7, 0x29dc($v0)
/* 09F570 7F06AA40 28410002 */ slti $at, $v0, 2 /* 09F570 7F06AA40 28410002 */ slti $at, $v0, 2
/* 09F574 7F06AA44 54200052 */ bnezl $at, .L7F06AB90 /* 09F574 7F06AA44 54200052 */ bnezl $at, .L7F06AB90
+15 -15
View File
@@ -262,7 +262,7 @@ glabel cheatButton_7F09177C
/* 0C62E4 7F0917B4 10000008 */ b .L7F0917D8 /* 0C62E4 7F0917B4 10000008 */ b .L7F0917D8
/* 0C62E8 7F0917B8 24130001 */ li $s3, 1 /* 0C62E8 7F0917B8 24130001 */ li $s3, 1
.L7F0917BC: .L7F0917BC:
/* 0C62EC 7F0917BC 0FC26919 */ jal get_num_players /* 0C62EC 7F0917BC 0FC26919 */ jal getPlayerCount
/* 0C62F0 7F0917C0 00000000 */ nop /* 0C62F0 7F0917C0 00000000 */ nop
/* 0C62F4 7F0917C4 24010001 */ li $at, 1 /* 0C62F4 7F0917C4 24010001 */ li $at, 1
/* 0C62F8 7F0917C8 14410003 */ bne $v0, $at, .L7F0917D8 /* 0C62F8 7F0917C8 14410003 */ bne $v0, $at, .L7F0917D8
@@ -521,7 +521,7 @@ void turn_on_cheat_for_players(u32 cheatindex)
uVar1 = D_8003F80C[cheatindex]; uVar1 = D_8003F80C[cheatindex];
playernum = get_cur_playernum(); playernum = get_cur_playernum();
numplayers = get_num_players(); numplayers = getPlayerCount();
if (numplayers == 1) { if (numplayers == 1) {
handle_cheats_turned_on(cheatindex); handle_cheats_turned_on(cheatindex);
} }
@@ -565,7 +565,7 @@ glabel turn_on_cheat_for_players
/* 0C65FC 7F091ACC AFB1001C */ sw $s1, 0x1c($sp) /* 0C65FC 7F091ACC AFB1001C */ sw $s1, 0x1c($sp)
/* 0C6600 7F091AD0 0FC26C54 */ jal get_cur_playernum /* 0C6600 7F091AD0 0FC26C54 */ jal get_cur_playernum
/* 0C6604 7F091AD4 8E10F808 */ lw $s0, %lo(D_8003F808)($s0) /* 0C6604 7F091AD4 8E10F808 */ lw $s0, %lo(D_8003F808)($s0)
/* 0C6608 7F091AD8 0FC26919 */ jal get_num_players /* 0C6608 7F091AD8 0FC26919 */ jal getPlayerCount
/* 0C660C 7F091ADC AFA20028 */ sw $v0, 0x28($sp) /* 0C660C 7F091ADC AFA20028 */ sw $v0, 0x28($sp)
/* 0C6610 7F091AE0 24010001 */ li $at, 1 /* 0C6610 7F091AE0 24010001 */ li $at, 1
/* 0C6614 7F091AE4 14410005 */ bne $v0, $at, .L7F091AFC /* 0C6614 7F091AE4 14410005 */ bne $v0, $at, .L7F091AFC
@@ -638,7 +638,7 @@ void handle_cheats_turned_on(CHEAT_IDS cheat)
uVar1 = (&D_8003F808)[cheat * 4]; uVar1 = (&D_8003F808)[cheat * 4];
playernum = get_cur_playernum(); playernum = get_cur_playernum();
numplayers = get_num_players(); numplayers = getPlayerCount();
if ((uVar1 & 0x10) == 0) { if ((uVar1 & 0x10) == 0) {
if ((uVar1 & 0x20) == 0) { if ((uVar1 & 0x20) == 0) {
cheatl_ARRAY_80079e30[cheat] = cheatl_ARRAY_80079e30[cheat] | (byte)(1 << (playernum & 0x1f)); cheatl_ARRAY_80079e30[cheat] = cheatl_ARRAY_80079e30[cheat] | (byte)(1 << (playernum & 0x1f));
@@ -792,7 +792,7 @@ void handle_cheats_turned_on(CHEAT_IDS cheat)
} }
break; break;
case cheats_cheat_invisibility_mp: case cheats_cheat_invisibility_mp:
set_curplayer_fade(300.00000000, 0.5f); currentPlayerStartChrFade(300.00000000, 0.5f);
break; break;
case cheats_cheat_fast: case cheats_cheat_fast:
if (get_debug_fast_bond_flag() == FALSE) if (get_debug_fast_bond_flag() == FALSE)
@@ -1022,7 +1022,7 @@ glabel handle_cheats_turned_on
/* 0C66AC 7F091B7C AFA40040 */ sw $a0, 0x40($sp) /* 0C66AC 7F091B7C AFA40040 */ sw $a0, 0x40($sp)
/* 0C66B0 7F091B80 0FC26C54 */ jal get_cur_playernum /* 0C66B0 7F091B80 0FC26C54 */ jal get_cur_playernum
/* 0C66B4 7F091B84 AFAF003C */ sw $t7, 0x3c($sp) /* 0C66B4 7F091B84 AFAF003C */ sw $t7, 0x3c($sp)
/* 0C66B8 7F091B88 0FC26919 */ jal get_num_players /* 0C66B8 7F091B88 0FC26919 */ jal getPlayerCount
/* 0C66BC 7F091B8C AFA20038 */ sw $v0, 0x38($sp) /* 0C66BC 7F091B8C AFA20038 */ sw $v0, 0x38($sp)
/* 0C66C0 7F091B90 8FA3003C */ lw $v1, 0x3c($sp) /* 0C66C0 7F091B90 8FA3003C */ lw $v1, 0x3c($sp)
/* 0C66C4 7F091B94 8FA60040 */ lw $a2, 0x40($sp) /* 0C66C4 7F091B94 8FA60040 */ lw $a2, 0x40($sp)
@@ -1421,7 +1421,7 @@ cheats_cheat_invisibility_mp:
/* 0C6C74 7F092144 3C014396 */ li $at, 0x43960000 # 300.000000 /* 0C6C74 7F092144 3C014396 */ li $at, 0x43960000 # 300.000000
/* 0C6C78 7F092148 44816000 */ mtc1 $at, $f12 /* 0C6C78 7F092148 44816000 */ mtc1 $at, $f12
/* 0C6C7C 7F09214C 3C018005 */ lui $at, %hi(finalamount) /* 0C6C7C 7F09214C 3C018005 */ lui $at, %hi(finalamount)
/* 0C6C80 7F092150 0FC20284 */ jal set_curplayer_fade /* 0C6C80 7F092150 0FC20284 */ jal currentPlayerStartChrFade
/* 0C6C84 7F092154 C42E73D8 */ lwc1 $f14, %lo(finalamount)($at) /* 0C6C84 7F092154 C42E73D8 */ lwc1 $f14, %lo(finalamount)($at)
/* 0C6C88 7F092158 100000B4 */ b .L7F09242C /* 0C6C88 7F092158 100000B4 */ b .L7F09242C
/* 0C6C8C 7F09215C 8FBF0014 */ lw $ra, 0x14($sp) /* 0C6C8C 7F09215C 8FBF0014 */ lw $ra, 0x14($sp)
@@ -1723,7 +1723,7 @@ glabel handle_cheats_turned_on
/* 0C71CC 7F09265C AFA40040 */ sw $a0, 0x40($sp) /* 0C71CC 7F09265C AFA40040 */ sw $a0, 0x40($sp)
/* 0C71D0 7F092660 0FC26F3C */ jal get_cur_playernum /* 0C71D0 7F092660 0FC26F3C */ jal get_cur_playernum
/* 0C71D4 7F092664 AFAF003C */ sw $t7, 0x3c($sp) /* 0C71D4 7F092664 AFAF003C */ sw $t7, 0x3c($sp)
/* 0C71D8 7F092668 0FC26C01 */ jal get_num_players /* 0C71D8 7F092668 0FC26C01 */ jal getPlayerCount
/* 0C71DC 7F09266C AFA20038 */ sw $v0, 0x38($sp) /* 0C71DC 7F09266C AFA20038 */ sw $v0, 0x38($sp)
/* 0C71E0 7F092670 8FA3003C */ lw $v1, 0x3c($sp) /* 0C71E0 7F092670 8FA3003C */ lw $v1, 0x3c($sp)
/* 0C71E4 7F092674 8FA60040 */ lw $a2, 0x40($sp) /* 0C71E4 7F092674 8FA60040 */ lw $a2, 0x40($sp)
@@ -2122,7 +2122,7 @@ cheats_cheat_invisibility_mp:
/* 0C7794 7F092C24 3C014396 */ li $at, 0x43960000 # 300.000000 /* 0C7794 7F092C24 3C014396 */ li $at, 0x43960000 # 300.000000
/* 0C7798 7F092C28 44816000 */ mtc1 $at, $f12 /* 0C7798 7F092C28 44816000 */ mtc1 $at, $f12
/* 0C779C 7F092C2C 3C018005 */ lui $at, %hi(finalamount) # $at, 0x8005 /* 0C779C 7F092C2C 3C018005 */ lui $at, %hi(finalamount) # $at, 0x8005
/* 0C77A0 7F092C30 0FC20408 */ jal set_curplayer_fade /* 0C77A0 7F092C30 0FC20408 */ jal currentPlayerStartChrFade
/* 0C77A4 7F092C34 C42E7408 */ lwc1 $f14, %lo(finalamount)($at) /* 0C77A4 7F092C34 C42E7408 */ lwc1 $f14, %lo(finalamount)($at)
/* 0C77A8 7F092C38 100000DC */ b .Ljp7F092FAC /* 0C77A8 7F092C38 100000DC */ b .Ljp7F092FAC
/* 0C77AC 7F092C3C 8FBF0014 */ lw $ra, 0x14($sp) /* 0C77AC 7F092C3C 8FBF0014 */ lw $ra, 0x14($sp)
@@ -2470,7 +2470,7 @@ glabel cheatDisplayMessageActivateCheat
/* 0C6F80 7F092450 AFA40020 */ sw $a0, 0x20($sp) /* 0C6F80 7F092450 AFA40020 */ sw $a0, 0x20($sp)
/* 0C6F84 7F092454 0FC26C54 */ jal get_cur_playernum /* 0C6F84 7F092454 0FC26C54 */ jal get_cur_playernum
/* 0C6F88 7F092458 AFAF001C */ sw $t7, 0x1c($sp) /* 0C6F88 7F092458 AFAF001C */ sw $t7, 0x1c($sp)
/* 0C6F8C 7F09245C 0FC26919 */ jal get_num_players /* 0C6F8C 7F09245C 0FC26919 */ jal getPlayerCount
/* 0C6F90 7F092460 AFA20018 */ sw $v0, 0x18($sp) /* 0C6F90 7F092460 AFA20018 */ sw $v0, 0x18($sp)
/* 0C6F94 7F092464 8FA3001C */ lw $v1, 0x1c($sp) /* 0C6F94 7F092464 8FA3001C */ lw $v1, 0x1c($sp)
/* 0C6F98 7F092468 8FA40020 */ lw $a0, 0x20($sp) /* 0C6F98 7F092468 8FA40020 */ lw $a0, 0x20($sp)
@@ -2608,7 +2608,7 @@ cheat_button_mp_invis:
/* 0C717C 7F09264C 44816000 */ mtc1 $at, $f12 /* 0C717C 7F09264C 44816000 */ mtc1 $at, $f12
/* 0C7180 7F092650 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 0C7180 7F092650 3C013F80 */ li $at, 0x3F800000 # 1.000000
/* 0C7184 7F092654 44817000 */ mtc1 $at, $f14 /* 0C7184 7F092654 44817000 */ mtc1 $at, $f14
/* 0C7188 7F092658 0FC20284 */ jal set_curplayer_fade /* 0C7188 7F092658 0FC20284 */ jal currentPlayerStartChrFade
/* 0C718C 7F09265C 00000000 */ nop /* 0C718C 7F09265C 00000000 */ nop
/* 0C7190 7F092660 10000014 */ b .L7F0926B4 /* 0C7190 7F092660 10000014 */ b .L7F0926B4
/* 0C7194 7F092664 8FBF0014 */ lw $ra, 0x14($sp) /* 0C7194 7F092664 8FBF0014 */ lw $ra, 0x14($sp)
@@ -2732,7 +2732,7 @@ glabel cheatDisplayMessageActivateCheat
/* 0C6F80 7F092450 AFA40020 */ sw $a0, 0x20($sp) /* 0C6F80 7F092450 AFA40020 */ sw $a0, 0x20($sp)
/* 0C6F84 7F092454 0FC26C54 */ jal get_cur_playernum /* 0C6F84 7F092454 0FC26C54 */ jal get_cur_playernum
/* 0C6F88 7F092458 AFAF001C */ sw $t7, 0x1c($sp) /* 0C6F88 7F092458 AFAF001C */ sw $t7, 0x1c($sp)
/* 0C6F8C 7F09245C 0FC26919 */ jal get_num_players /* 0C6F8C 7F09245C 0FC26919 */ jal getPlayerCount
/* 0C6F90 7F092460 AFA20018 */ sw $v0, 0x18($sp) /* 0C6F90 7F092460 AFA20018 */ sw $v0, 0x18($sp)
/* 0C6F94 7F092464 8FA3001C */ lw $v1, 0x1c($sp) /* 0C6F94 7F092464 8FA3001C */ lw $v1, 0x1c($sp)
/* 0C6F98 7F092468 8FA40020 */ lw $a0, 0x20($sp) /* 0C6F98 7F092468 8FA40020 */ lw $a0, 0x20($sp)
@@ -2870,7 +2870,7 @@ cheat_button_mp_invis:
/* 0C717C 7F09264C 44816000 */ mtc1 $at, $f12 /* 0C717C 7F09264C 44816000 */ mtc1 $at, $f12
/* 0C7180 7F092650 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 0C7180 7F092650 3C013F80 */ li $at, 0x3F800000 # 1.000000
/* 0C7184 7F092654 44817000 */ mtc1 $at, $f14 /* 0C7184 7F092654 44817000 */ mtc1 $at, $f14
/* 0C7188 7F092658 0FC20284 */ jal set_curplayer_fade /* 0C7188 7F092658 0FC20284 */ jal currentPlayerStartChrFade
/* 0C718C 7F09265C 00000000 */ nop /* 0C718C 7F09265C 00000000 */ nop
/* 0C7190 7F092660 10000014 */ b .L7F0926B4 /* 0C7190 7F092660 10000014 */ b .L7F0926B4
/* 0C7194 7F092664 8FBF0014 */ lw $ra, 0x14($sp) /* 0C7194 7F092664 8FBF0014 */ lw $ra, 0x14($sp)
@@ -2920,7 +2920,7 @@ void cheatDisableAllCheats(void) {
s32 phi_s0; s32 phi_s0;
// Node 0 // Node 0
temp_s4 = get_num_players(); temp_s4 = getPlayerCount();
sp30 = get_cur_playernum(); sp30 = get_cur_playernum();
if (temp_s4 > 0) if (temp_s4 > 0)
{ {
@@ -2994,7 +2994,7 @@ glabel cheatDisableAllCheats
/* 0C71FC 7F0926CC AFB30024 */ sw $s3, 0x24($sp) /* 0C71FC 7F0926CC AFB30024 */ sw $s3, 0x24($sp)
/* 0C7200 7F0926D0 AFB20020 */ sw $s2, 0x20($sp) /* 0C7200 7F0926D0 AFB20020 */ sw $s2, 0x20($sp)
/* 0C7204 7F0926D4 AFB1001C */ sw $s1, 0x1c($sp) /* 0C7204 7F0926D4 AFB1001C */ sw $s1, 0x1c($sp)
/* 0C7208 7F0926D8 0FC26919 */ jal get_num_players /* 0C7208 7F0926D8 0FC26919 */ jal getPlayerCount
/* 0C720C 7F0926DC AFB00018 */ sw $s0, 0x18($sp) /* 0C720C 7F0926DC AFB00018 */ sw $s0, 0x18($sp)
/* 0C7210 7F0926E0 0FC26C54 */ jal get_cur_playernum /* 0C7210 7F0926E0 0FC26C54 */ jal get_cur_playernum
/* 0C7214 7F0926E4 0040A025 */ move $s4, $v0 /* 0C7214 7F0926E4 0040A025 */ move $s4, $v0
+44 -138
View File
@@ -36,8 +36,8 @@ struct animation_something D_8002CC2C = {0xFFFFFFFF, 0, 0, 0.0, 0, 0, 0.0, NULL,
s32 D_8002CC58 = 0; s32 D_8002CC58 = 0;
s32 show_patrols_flag = FALSE; s32 show_patrols_flag = FALSE;
s32 player1_guardID = 0x1388; s32 player1_guardID = 5000;
s32 ptr_guard_data = 0; struct chrdata *ptr_guard_data = 0;
s32 num_guards = 0; s32 num_guards = 0;
s32 D_8002CC6C[] = {0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; s32 D_8002CC6C[] = {0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
s32 D_8002CCA8 = 0; s32 D_8002CCA8 = 0;
@@ -1219,7 +1219,7 @@ glabel sub_GAME_7F01F614
.L7F01F708: .L7F01F708:
/* 054238 7F01F708 AFA0004C */ sw $zero, 0x4c($sp) /* 054238 7F01F708 AFA0004C */ sw $zero, 0x4c($sp)
/* 05423C 7F01F70C 27A40078 */ addiu $a0, $sp, 0x78 /* 05423C 7F01F70C 27A40078 */ addiu $a0, $sp, 0x78
/* 054240 7F01F710 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 054240 7F01F710 0FC2CA2C */ jal getCollisionEdge_maybe
/* 054244 7F01F714 27A5006C */ addiu $a1, $sp, 0x6c /* 054244 7F01F714 27A5006C */ addiu $a1, $sp, 0x6c
/* 054248 7F01F718 50400130 */ beql $v0, $zero, .L7F01FBDC /* 054248 7F01F718 50400130 */ beql $v0, $zero, .L7F01FBDC
/* 05424C 7F01F71C 8FA40098 */ lw $a0, 0x98($sp) /* 05424C 7F01F71C 8FA40098 */ lw $a0, 0x98($sp)
@@ -2201,139 +2201,45 @@ glabel sub_GAME_7F01FC10
#endif #endif
#endif #endif
s32 chrGetNumFree(void)
{
s32 count = 0;
s32 i;
#ifdef NONMATCHING for (i = 0; i < num_guards; i++) {
void get_next_available_guardID(void) { if (ptr_guard_data[i].model == 0) {
count++;
}
}
return count;
} }
#else
GLOBAL_ASM(
.text
glabel get_next_available_guardID
/* 054AF0 7F01FFC0 3C048003 */ lui $a0, %hi(num_guards)
/* 054AF4 7F01FFC4 8C84CC68 */ lw $a0, %lo(num_guards)($a0)
/* 054AF8 7F01FFC8 00001825 */ move $v1, $zero
/* 054AFC 7F01FFCC 00001025 */ move $v0, $zero
/* 054B00 7F01FFD0 1880000F */ blez $a0, .L7F020010
/* 054B04 7F01FFD4 3C058003 */ lui $a1, %hi(ptr_guard_data)
/* 054B08 7F01FFD8 00043100 */ sll $a2, $a0, 4
/* 054B0C 7F01FFDC 00C43023 */ subu $a2, $a2, $a0
/* 054B10 7F01FFE0 000630C0 */ sll $a2, $a2, 3
/* 054B14 7F01FFE4 00C43023 */ subu $a2, $a2, $a0
/* 054B18 7F01FFE8 00063080 */ sll $a2, $a2, 2
/* 054B1C 7F01FFEC 8CA5CC64 */ lw $a1, %lo(ptr_guard_data)($a1)
.L7F01FFF0:
/* 054B20 7F01FFF0 8CAE001C */ lw $t6, 0x1c($a1)
/* 054B24 7F01FFF4 244201DC */ addiu $v0, $v0, 0x1dc
/* 054B28 7F01FFF8 0046082A */ slt $at, $v0, $a2
/* 054B2C 7F01FFFC 15C00002 */ bnez $t6, .L7F020008
/* 054B30 7F020000 00000000 */ nop
/* 054B34 7F020004 24630001 */ addiu $v1, $v1, 1
.L7F020008:
/* 054B38 7F020008 1420FFF9 */ bnez $at, .L7F01FFF0
/* 054B3C 7F02000C 24A501DC */ addiu $a1, $a1, 0x1dc
.L7F020010:
/* 054B40 7F020010 03E00008 */ jr $ra
/* 054B44 7F020014 00601025 */ move $v0, $v1
)
#endif
f32 get_007_health_mod(void);
void chrSetMaxDamage(struct chrdata *chr, f32 maxdamage)
#ifdef NONMATCHING {
void sub_GAME_7F020018(void) { chr->maxdamage = (get_007_health_mod() * maxdamage);
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F020018
/* 054B48 7F020018 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 054B4C 7F02001C AFBF0014 */ sw $ra, 0x14($sp)
/* 054B50 7F020020 AFA40018 */ sw $a0, 0x18($sp)
/* 054B54 7F020024 0FC074BA */ jal get_007_health_mod
/* 054B58 7F020028 AFA5001C */ sw $a1, 0x1c($sp)
/* 054B5C 7F02002C C7A4001C */ lwc1 $f4, 0x1c($sp)
/* 054B60 7F020030 8FAE0018 */ lw $t6, 0x18($sp)
/* 054B64 7F020034 46040182 */ mul.s $f6, $f0, $f4
/* 054B68 7F020038 E5C60100 */ swc1 $f6, 0x100($t6)
/* 054B6C 7F02003C 8FBF0014 */ lw $ra, 0x14($sp)
/* 054B70 7F020040 27BD0018 */ addiu $sp, $sp, 0x18
/* 054B74 7F020044 03E00008 */ jr $ra
/* 054B78 7F020048 00000000 */ nop
)
#endif
#ifdef NONMATCHING
void sub_GAME_7F02004C(void) {
f32 chrGetMaxDamage(struct chrdata *chr)
{
return chr->maxdamage;
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F02004C
/* 054B7C 7F02004C 03E00008 */ jr $ra
/* 054B80 7F020050 C4800100 */ lwc1 $f0, 0x100($a0)
)
#endif
#ifdef NONMATCHING
void sub_GAME_7F020054(void) {
void chrAddHealth(struct chrdata *chr, f32 health)
{
chr->damage -= (health * get_007_health_mod());
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F020054
/* 054B84 7F020054 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 054B88 7F020058 AFBF0014 */ sw $ra, 0x14($sp)
/* 054B8C 7F02005C AFA40018 */ sw $a0, 0x18($sp)
/* 054B90 7F020060 0FC074BA */ jal get_007_health_mod
/* 054B94 7F020064 AFA5001C */ sw $a1, 0x1c($sp)
/* 054B98 7F020068 C7A6001C */ lwc1 $f6, 0x1c($sp)
/* 054B9C 7F02006C 8FA20018 */ lw $v0, 0x18($sp)
/* 054BA0 7F020070 46003202 */ mul.s $f8, $f6, $f0
/* 054BA4 7F020074 C44400FC */ lwc1 $f4, 0xfc($v0)
/* 054BA8 7F020078 46082281 */ sub.s $f10, $f4, $f8
/* 054BAC 7F02007C E44A00FC */ swc1 $f10, 0xfc($v0)
/* 054BB0 7F020080 8FBF0014 */ lw $ra, 0x14($sp)
/* 054BB4 7F020084 27BD0018 */ addiu $sp, $sp, 0x18
/* 054BB8 7F020088 03E00008 */ jr $ra
/* 054BBC 7F02008C 00000000 */ nop
)
#endif
f32 chrGetArmor(struct chrdata *chr)
{
if (chr->damage < 0) {
return -chr->damage;
}
return 0;
#ifdef NONMATCHING
void sub_GAME_7F020090(void) {
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F020090
/* 054BC0 7F020090 44806000 */ mtc1 $zero, $f12
/* 054BC4 7F020094 C48200FC */ lwc1 $f2, 0xfc($a0)
/* 054BC8 7F020098 460C103C */ c.lt.s $f2, $f12
/* 054BCC 7F02009C 00000000 */ nop
/* 054BD0 7F0200A0 45020004 */ bc1fl .L7F0200B4
/* 054BD4 7F0200A4 46006006 */ mov.s $f0, $f12
/* 054BD8 7F0200A8 03E00008 */ jr $ra
/* 054BDC 7F0200AC 46001007 */ neg.s $f0, $f2
/* 054BE0 7F0200B0 46006006 */ mov.s $f0, $f12
.L7F0200B4:
/* 054BE4 7F0200B4 03E00008 */ jr $ra
/* 054BE8 7F0200B8 00000000 */ nop
)
#endif
#ifdef NONMATCHING #ifdef NONMATCHING
void init_GUARDdata_with_set_values(void) { void init_GUARDdata_with_set_values(void) {
@@ -3338,7 +3244,7 @@ glabel sub_GAME_7F02083C
/* 055720 7F020BF0 460A6300 */ add.s $f12, $f12, $f10 /* 055720 7F020BF0 460A6300 */ add.s $f12, $f12, $f10
/* 055724 7F020BF4 E7AC008C */ swc1 $f12, 0x8c($sp) /* 055724 7F020BF4 E7AC008C */ swc1 $f12, 0x8c($sp)
.L7F020BF8: .L7F020BF8:
/* 055728 7F020BF8 0FC1E111 */ jal sub_GAME_7F078444 /* 055728 7F020BF8 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 05572C 7F020BFC E7AE0090 */ swc1 $f14, 0x90($sp) /* 05572C 7F020BFC E7AE0090 */ swc1 $f14, 0x90($sp)
/* 055730 7F020C00 00402025 */ move $a0, $v0 /* 055730 7F020C00 00402025 */ move $a0, $v0
/* 055734 7F020C04 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place /* 055734 7F020C04 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -3439,7 +3345,7 @@ glabel sub_GAME_7F02083C
/* 055894 7F020D64 C7A80078 */ lwc1 $f8, 0x78($sp) /* 055894 7F020D64 C7A80078 */ lwc1 $f8, 0x78($sp)
/* 055898 7F020D68 E5080034 */ swc1 $f8, 0x34($t0) /* 055898 7F020D68 E5080034 */ swc1 $f8, 0x34($t0)
/* 05589C 7F020D6C C7A4007C */ lwc1 $f4, 0x7c($sp) /* 05589C 7F020D6C C7A4007C */ lwc1 $f4, 0x7c($sp)
/* 0558A0 7F020D70 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 0558A0 7F020D70 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 0558A4 7F020D74 E5040038 */ swc1 $f4, 0x38($t0) /* 0558A4 7F020D74 E5040038 */ swc1 $f4, 0x38($t0)
/* 0558A8 7F020D78 00402025 */ move $a0, $v0 /* 0558A8 7F020D78 00402025 */ move $a0, $v0
/* 0558AC 7F020D7C 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place /* 0558AC 7F020D7C 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -3732,7 +3638,7 @@ glabel sub_GAME_7F02083C
/* 0559F8 7F020E88 460A6300 */ add.s $f12, $f12, $f10 /* 0559F8 7F020E88 460A6300 */ add.s $f12, $f12, $f10
/* 0559FC 7F020E8C E7AC008C */ swc1 $f12, 0x8c($sp) /* 0559FC 7F020E8C E7AC008C */ swc1 $f12, 0x8c($sp)
.L7F020E90: .L7F020E90:
/* 055A00 7F020E90 0FC1E28D */ jal sub_GAME_7F078444 /* 055A00 7F020E90 0FC1E28D */ jal currentPlayerGetMatrix10D4
/* 055A04 7F020E94 E7AE0090 */ swc1 $f14, 0x90($sp) /* 055A04 7F020E94 E7AE0090 */ swc1 $f14, 0x90($sp)
/* 055A08 7F020E98 00402025 */ move $a0, $v0 /* 055A08 7F020E98 00402025 */ move $a0, $v0
/* 055A0C 7F020E9C 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place /* 055A0C 7F020E9C 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -3833,7 +3739,7 @@ glabel sub_GAME_7F02083C
/* 055B6C 7F020FFC C7A80078 */ lwc1 $f8, 0x78($sp) /* 055B6C 7F020FFC C7A80078 */ lwc1 $f8, 0x78($sp)
/* 055B70 7F021000 E5280034 */ swc1 $f8, 0x34($t1) /* 055B70 7F021000 E5280034 */ swc1 $f8, 0x34($t1)
/* 055B74 7F021004 C7A4007C */ lwc1 $f4, 0x7c($sp) /* 055B74 7F021004 C7A4007C */ lwc1 $f4, 0x7c($sp)
/* 055B78 7F021008 0FC1E26D */ jal get_BONDdata_field_10CC /* 055B78 7F021008 0FC1E26D */ jal currentPlayerGetMatrix10CC
/* 055B7C 7F02100C E5240038 */ swc1 $f4, 0x38($t1) /* 055B7C 7F02100C E5240038 */ swc1 $f4, 0x38($t1)
/* 055B80 7F021010 00402025 */ move $a0, $v0 /* 055B80 7F021010 00402025 */ move $a0, $v0
/* 055B84 7F021014 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place /* 055B84 7F021014 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -4113,9 +4019,9 @@ glabel sub_GAME_7F020EF0
/* 055C18 7F0210E8 0FC26C57 */ jal sub_GAME_7F09B15C /* 055C18 7F0210E8 0FC26C57 */ jal sub_GAME_7F09B15C
/* 055C1C 7F0210EC 01802025 */ move $a0, $t4 /* 055C1C 7F0210EC 01802025 */ move $a0, $t4
/* 055C20 7F0210F0 0002C880 */ sll $t9, $v0, 2 /* 055C20 7F0210F0 0002C880 */ sll $t9, $v0, 2
/* 055C24 7F0210F4 3C188008 */ lui $t8, %hi(ptr_BONDdata_p1) /* 055C24 7F0210F4 3C188008 */ lui $t8, %hi(players)
/* 055C28 7F0210F8 0319C021 */ addu $t8, $t8, $t9 /* 055C28 7F0210F8 0319C021 */ addu $t8, $t8, $t9
/* 055C2C 7F0210FC 8F189EE0 */ lw $t8, %lo(ptr_BONDdata_p1)($t8) /* 055C2C 7F0210FC 8F189EE0 */ lw $t8, %lo(players)($t8)
/* 055C30 7F021100 24010001 */ li $at, 1 /* 055C30 7F021100 24010001 */ li $at, 1
/* 055C34 7F021104 8F080000 */ lw $t0, ($t8) /* 055C34 7F021104 8F080000 */ lw $t0, ($t8)
/* 055C38 7F021108 51010005 */ beql $t0, $at, .L7F021120 /* 055C38 7F021108 51010005 */ beql $t0, $at, .L7F021120
@@ -4369,7 +4275,7 @@ glabel sub_GAME_7F020EF0
/* 055FA8 7F021478 3C018003 */ lui $at, %hi(D_80036090) /* 055FA8 7F021478 3C018003 */ lui $at, %hi(D_80036090)
/* 055FAC 7F02147C AC2A6090 */ sw $t2, %lo(D_80036090)($at) /* 055FAC 7F02147C AC2A6090 */ sw $t2, %lo(D_80036090)($at)
/* 055FB0 7F021480 3C018007 */ lui $at, %hi(dword_CODE_bss_80069B60) /* 055FB0 7F021480 3C018007 */ lui $at, %hi(dword_CODE_bss_80069B60)
/* 055FB4 7F021484 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 055FB4 7F021484 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 055FB8 7F021488 AC309B60 */ sw $s0, %lo(dword_CODE_bss_80069B60)($at) /* 055FB8 7F021488 AC309B60 */ sw $s0, %lo(dword_CODE_bss_80069B60)($at)
/* 055FBC 7F02148C 8FAB0110 */ lw $t3, 0x110($sp) /* 055FBC 7F02148C 8FAB0110 */ lw $t3, 0x110($sp)
/* 055FC0 7F021490 AFA20118 */ sw $v0, 0x118($sp) /* 055FC0 7F021490 AFA20118 */ sw $v0, 0x118($sp)
@@ -4965,9 +4871,9 @@ glabel sub_GAME_7F020EF0
/* 055EF0 7F021380 0FC26F3F */ jal sub_GAME_7F09B15C /* 055EF0 7F021380 0FC26F3F */ jal sub_GAME_7F09B15C
/* 055EF4 7F021384 01802025 */ move $a0, $t4 /* 055EF4 7F021384 01802025 */ move $a0, $t4
/* 055EF8 7F021388 0002C880 */ sll $t9, $v0, 2 /* 055EF8 7F021388 0002C880 */ sll $t9, $v0, 2
/* 055EFC 7F02138C 3C188008 */ lui $t8, %hi(ptr_BONDdata_p1) /* 055EFC 7F02138C 3C188008 */ lui $t8, %hi(players)
/* 055F00 7F021390 0319C021 */ addu $t8, $t8, $t9 /* 055F00 7F021390 0319C021 */ addu $t8, $t8, $t9
/* 055F04 7F021394 8F189F50 */ lw $t8, %lo(ptr_BONDdata_p1)($t8) /* 055F04 7F021394 8F189F50 */ lw $t8, %lo(players)($t8)
/* 055F08 7F021398 24010001 */ li $at, 1 /* 055F08 7F021398 24010001 */ li $at, 1
/* 055F0C 7F02139C 8F080000 */ lw $t0, ($t8) /* 055F0C 7F02139C 8F080000 */ lw $t0, ($t8)
/* 055F10 7F0213A0 51010005 */ beql $t0, $at, .Ljp7F0213B8 /* 055F10 7F0213A0 51010005 */ beql $t0, $at, .Ljp7F0213B8
@@ -5241,7 +5147,7 @@ glabel sub_GAME_7F020EF0
/* 0562D0 7F021760 3C018003 */ lui $at, %hi(D_80036090) # $at, 0x8003 /* 0562D0 7F021760 3C018003 */ lui $at, %hi(D_80036090) # $at, 0x8003
/* 0562D4 7F021764 AC2D60D0 */ sw $t5, %lo(D_80036090)($at) /* 0562D4 7F021764 AC2D60D0 */ sw $t5, %lo(D_80036090)($at)
/* 0562D8 7F021768 3C018007 */ lui $at, %hi(dword_CODE_bss_80069B60) # $at, 0x8007 /* 0562D8 7F021768 3C018007 */ lui $at, %hi(dword_CODE_bss_80069B60) # $at, 0x8007
/* 0562DC 7F02176C 0FC1E26D */ jal get_BONDdata_field_10CC /* 0562DC 7F02176C 0FC1E26D */ jal currentPlayerGetMatrix10CC
/* 0562E0 7F021770 AC309BA0 */ sw $s0, %lo(dword_CODE_bss_80069B60)($at) /* 0562E0 7F021770 AC309BA0 */ sw $s0, %lo(dword_CODE_bss_80069B60)($at)
/* 0562E4 7F021774 8FAC0110 */ lw $t4, 0x110($sp) /* 0562E4 7F021774 8FAC0110 */ lw $t4, 0x110($sp)
/* 0562E8 7F021778 AFA20118 */ sw $v0, 0x118($sp) /* 0562E8 7F021778 AFA20118 */ sw $v0, 0x118($sp)
@@ -6195,7 +6101,7 @@ glabel sub_GAME_7F022078
/* 056C98 7F022168 E7B00040 */ swc1 $f16, 0x40($sp) /* 056C98 7F022168 E7B00040 */ swc1 $f16, 0x40($sp)
/* 056C9C 7F02216C C4D20008 */ lwc1 $f18, 8($a2) /* 056C9C 7F02216C C4D20008 */ lwc1 $f18, 8($a2)
/* 056CA0 7F022170 46029102 */ mul.s $f4, $f18, $f2 /* 056CA0 7F022170 46029102 */ mul.s $f4, $f18, $f2
/* 056CA4 7F022174 0FC1E111 */ jal sub_GAME_7F078444 /* 056CA4 7F022174 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 056CA8 7F022178 E7A40044 */ swc1 $f4, 0x44($sp) /* 056CA8 7F022178 E7A40044 */ swc1 $f4, 0x44($sp)
/* 056CAC 7F02217C 00402025 */ move $a0, $v0 /* 056CAC 7F02217C 00402025 */ move $a0, $v0
/* 056CB0 7F022180 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 056CB0 7F022180 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -6691,7 +6597,7 @@ glabel sub_GAME_7F022648
/* 057360 7F022830 C6520010 */ lwc1 $f18, 0x10($s2) /* 057360 7F022830 C6520010 */ lwc1 $f18, 0x10($s2)
/* 057364 7F022834 E7B20078 */ swc1 $f18, 0x78($sp) /* 057364 7F022834 E7B20078 */ swc1 $f18, 0x78($sp)
/* 057368 7F022838 C6440014 */ lwc1 $f4, 0x14($s2) /* 057368 7F022838 C6440014 */ lwc1 $f4, 0x14($s2)
/* 05736C 7F02283C 0FC1E111 */ jal sub_GAME_7F078444 /* 05736C 7F02283C 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 057370 7F022840 E7A4007C */ swc1 $f4, 0x7c($sp) /* 057370 7F022840 E7A4007C */ swc1 $f4, 0x7c($sp)
/* 057374 7F022844 00402025 */ move $a0, $v0 /* 057374 7F022844 00402025 */ move $a0, $v0
/* 057378 7F022848 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 057378 7F022848 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -6846,7 +6752,7 @@ glabel sub_GAME_7F022980
/* 057590 7F022A60 46023202 */ mul.s $f8, $f6, $f2 /* 057590 7F022A60 46023202 */ mul.s $f8, $f6, $f2
/* 057594 7F022A64 E7A400A8 */ swc1 $f4, 0xa8($sp) /* 057594 7F022A64 E7A400A8 */ swc1 $f4, 0xa8($sp)
/* 057598 7F022A68 E7B000AC */ swc1 $f16, 0xac($sp) /* 057598 7F022A68 E7B000AC */ swc1 $f16, 0xac($sp)
/* 05759C 7F022A6C 0FC1E111 */ jal sub_GAME_7F078444 /* 05759C 7F022A6C 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 0575A0 7F022A70 E7A800B0 */ swc1 $f8, 0xb0($sp) /* 0575A0 7F022A70 E7A800B0 */ swc1 $f8, 0xb0($sp)
/* 0575A4 7F022A74 27B000A8 */ addiu $s0, $sp, 0xa8 /* 0575A4 7F022A74 27B000A8 */ addiu $s0, $sp, 0xa8
/* 0575A8 7F022A78 02002825 */ move $a1, $s0 /* 0575A8 7F022A78 02002825 */ move $a1, $s0
@@ -7072,7 +6978,7 @@ glabel sub_GAME_7F022980
/* 0578E8 7F022DB8 02002025 */ move $a0, $s0 /* 0578E8 7F022DB8 02002025 */ move $a0, $s0
/* 0578EC 7F022DBC 46082402 */ mul.s $f16, $f4, $f8 /* 0578EC 7F022DBC 46082402 */ mul.s $f16, $f4, $f8
/* 0578F0 7F022DC0 46105181 */ sub.s $f6, $f10, $f16 /* 0578F0 7F022DC0 46105181 */ sub.s $f6, $f10, $f16
/* 0578F4 7F022DC4 0FC16799 */ jal sub_GAME_7F059E64 /* 0578F4 7F022DC4 0FC16799 */ jal matrix_4x4_7F059E64
/* 0578F8 7F022DC8 E7A60078 */ swc1 $f6, 0x78($sp) /* 0578F8 7F022DC8 E7A60078 */ swc1 $f6, 0x78($sp)
/* 0578FC 7F022DCC 27B00070 */ addiu $s0, $sp, 0x70 /* 0578FC 7F022DCC 27B00070 */ addiu $s0, $sp, 0x70
/* 057900 7F022DD0 02002825 */ move $a1, $s0 /* 057900 7F022DD0 02002825 */ move $a1, $s0
@@ -7252,7 +7158,7 @@ glabel sub_GAME_7F022EEC
/* 057A7C 7F022F4C 44812000 */ mtc1 $at, $f4 /* 057A7C 7F022F4C 44812000 */ mtc1 $at, $f4
/* 057A80 7F022F50 02302021 */ addu $a0, $s1, $s0 /* 057A80 7F022F50 02302021 */ addu $a0, $s1, $s0
/* 057A84 7F022F54 4604B502 */ mul.s $f20, $f22, $f4 /* 057A84 7F022F54 4604B502 */ mul.s $f20, $f22, $f4
/* 057A88 7F022F58 0FC0CB79 */ jal sub_GAME_7F032DE4 /* 057A88 7F022F58 0FC0CB79 */ jal distToBond3D
/* 057A8C 7F022F5C 00000000 */ nop /* 057A8C 7F022F5C 00000000 */ nop
/* 057A90 7F022F60 8E700000 */ lw $s0, ($s3) /* 057A90 7F022F60 8E700000 */ lw $s0, ($s3)
/* 057A94 7F022F64 0211C821 */ addu $t9, $s0, $s1 /* 057A94 7F022F64 0211C821 */ addu $t9, $s0, $s1
+7 -5
View File
@@ -2,10 +2,12 @@
#define _CHR_H_ #define _CHR_H_
#include "ultra64.h" #include "ultra64.h"
#include "bondgame.h" #include "bondgame.h"
#include "chrai.h"
#include "bondtypes.h" // chrdata
struct animation_something struct animation_something
{ {
s32 anonymous_0; s32 anonymous_0;
s32 field_4; s32 field_4;
s32 field_8; s32 field_8;
f32 field_C; f32 field_C;
@@ -16,7 +18,7 @@ struct animation_something
s32 field_20; s32 field_20;
struct struck_animation_table *field_24; struct struck_animation_table *field_24;
s32 field_28; s32 field_28;
}; };
struct struck_animation_table struct struck_animation_table
{ {
@@ -173,7 +175,7 @@ extern s32 D_8002C910;
extern s32 D_8002CC58; extern s32 D_8002CC58;
extern s32 show_patrols_flag; extern s32 show_patrols_flag;
extern s32 player1_guardID; extern s32 player1_guardID;
extern s32 ptr_guard_data; extern struct chrdata *ptr_guard_data;
extern s32 num_guards; extern s32 num_guards;
extern s32 D_8002CC6C[]; extern s32 D_8002CC6C[];
extern s32 D_8002CCA8; extern s32 D_8002CCA8;
+84 -124
View File
@@ -2,6 +2,8 @@
#include "bondgame.h" #include "bondgame.h"
#include "game/chr.h" #include "game/chr.h"
#include "game/bondwalk.h" #include "game/bondwalk.h"
#include "game/lvl.h"
#include "bondconstants.h"
#ifdef NONMATCHING #ifdef NONMATCHING
void load_body_head_if_not_loaded(void) { void load_body_head_if_not_loaded(void) {
@@ -4032,7 +4034,7 @@ glabel sub_GAME_7F02624C
/* 05AD88 7F026258 AFA5003C */ sw $a1, 0x3c($sp) /* 05AD88 7F026258 AFA5003C */ sw $a1, 0x3c($sp)
/* 05AD8C 7F02625C AFA60040 */ sw $a2, 0x40($sp) /* 05AD8C 7F02625C AFA60040 */ sw $a2, 0x40($sp)
/* 05AD90 7F026260 27A50020 */ addiu $a1, $sp, 0x20 /* 05AD90 7F026260 27A50020 */ addiu $a1, $sp, 0x20
/* 05AD94 7F026264 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 05AD94 7F026264 0FC2CA2C */ jal getCollisionEdge_maybe
/* 05AD98 7F026268 27A4002C */ addiu $a0, $sp, 0x2c /* 05AD98 7F026268 27A4002C */ addiu $a0, $sp, 0x2c
/* 05AD9C 7F02626C 8FAE0040 */ lw $t6, 0x40($sp) /* 05AD9C 7F02626C 8FAE0040 */ lw $t6, 0x40($sp)
/* 05ADA0 7F026270 27A4002C */ addiu $a0, $sp, 0x2c /* 05ADA0 7F026270 27A4002C */ addiu $a0, $sp, 0x2c
@@ -4064,7 +4066,7 @@ glabel sub_GAME_7F026298
/* 05ADD4 7F0262A4 AFA5003C */ sw $a1, 0x3c($sp) /* 05ADD4 7F0262A4 AFA5003C */ sw $a1, 0x3c($sp)
/* 05ADD8 7F0262A8 27A50020 */ addiu $a1, $sp, 0x20 /* 05ADD8 7F0262A8 27A50020 */ addiu $a1, $sp, 0x20
/* 05ADDC 7F0262AC 27A4002C */ addiu $a0, $sp, 0x2c /* 05ADDC 7F0262AC 27A4002C */ addiu $a0, $sp, 0x2c
/* 05ADE0 7F0262B0 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 05ADE0 7F0262B0 0FC2CA2C */ jal getCollisionEdge_maybe
/* 05ADE4 7F0262B4 AFA60040 */ sw $a2, 0x40($sp) /* 05ADE4 7F0262B4 AFA60040 */ sw $a2, 0x40($sp)
/* 05ADE8 7F0262B8 8FA30038 */ lw $v1, 0x38($sp) /* 05ADE8 7F0262B8 8FA30038 */ lw $v1, 0x38($sp)
/* 05ADEC 7F0262BC C7A40020 */ lwc1 $f4, 0x20($sp) /* 05ADEC 7F0262BC C7A40020 */ lwc1 $f4, 0x20($sp)
@@ -4291,7 +4293,7 @@ glabel triggered_on_shot_hit
/* 05B078 7F026548 57010009 */ bnel $t8, $at, .L7F026570 /* 05B078 7F026548 57010009 */ bnel $t8, $at, .L7F026570
/* 05B07C 7F02654C 82020007 */ lb $v0, 7($s0) /* 05B07C 7F02654C 82020007 */ lb $v0, 7($s0)
/* 05B080 7F026550 AFA700AC */ sw $a3, 0xac($sp) /* 05B080 7F026550 AFA700AC */ sw $a3, 0xac($sp)
/* 05B084 7F026554 0FC26919 */ jal get_num_players /* 05B084 7F026554 0FC26919 */ jal getPlayerCount
/* 05B088 7F026558 E7AC00A8 */ swc1 $f12, 0xa8($sp) /* 05B088 7F026558 E7AC00A8 */ swc1 $f12, 0xa8($sp)
/* 05B08C 7F02655C 28410002 */ slti $at, $v0, 2 /* 05B08C 7F02655C 28410002 */ slti $at, $v0, 2
/* 05B090 7F026560 8FA700AC */ lw $a3, 0xac($sp) /* 05B090 7F026560 8FA700AC */ lw $a3, 0xac($sp)
@@ -5079,9 +5081,9 @@ glabel play_sound_for_shot_actor
/* 05BBB8 7F027088 0FC26C57 */ jal sub_GAME_7F09B15C /* 05BBB8 7F027088 0FC26C57 */ jal sub_GAME_7F09B15C
/* 05BBBC 7F02708C AFA00060 */ sw $zero, 0x60($sp) /* 05BBBC 7F02708C AFA00060 */ sw $zero, 0x60($sp)
/* 05BBC0 7F027090 0002C080 */ sll $t8, $v0, 2 /* 05BBC0 7F027090 0002C080 */ sll $t8, $v0, 2
/* 05BBC4 7F027094 3C198008 */ lui $t9, %hi(ptr_BONDdata_p1) /* 05BBC4 7F027094 3C198008 */ lui $t9, %hi(players)
/* 05BBC8 7F027098 0338C821 */ addu $t9, $t9, $t8 /* 05BBC8 7F027098 0338C821 */ addu $t9, $t9, $t8
/* 05BBCC 7F02709C 8F399EE0 */ lw $t9, %lo(ptr_BONDdata_p1)($t9) /* 05BBCC 7F02709C 8F399EE0 */ lw $t9, %lo(players)($t9)
/* 05BBD0 7F0270A0 8FA30060 */ lw $v1, 0x60($sp) /* 05BBD0 7F0270A0 8FA30060 */ lw $v1, 0x60($sp)
/* 05BBD4 7F0270A4 8F2800D8 */ lw $t0, 0xd8($t9) /* 05BBD4 7F0270A4 8F2800D8 */ lw $t0, 0xd8($t9)
/* 05BBD8 7F0270A8 55000071 */ bnezl $t0, .L7F027270 /* 05BBD8 7F0270A8 55000071 */ bnezl $t0, .L7F027270
@@ -5094,7 +5096,7 @@ glabel play_sound_for_shot_actor
/* 05BBF0 7F0270C0 914B0000 */ lbu $t3, ($t2) /* 05BBF0 7F0270C0 914B0000 */ lbu $t3, ($t2)
/* 05BBF4 7F0270C4 5561001D */ bnel $t3, $at, .L7F02713C /* 05BBF4 7F0270C4 5561001D */ bnel $t3, $at, .L7F02713C
/* 05BBF8 7F0270C8 8328000F */ lb $t0, 0xf($t9) /* 05BBF8 7F0270C8 8328000F */ lb $t0, 0xf($t9)
/* 05BBFC 7F0270CC 0FC26919 */ jal get_num_players /* 05BBFC 7F0270CC 0FC26919 */ jal getPlayerCount
/* 05BC00 7F0270D0 AFA30060 */ sw $v1, 0x60($sp) /* 05BC00 7F0270D0 AFA30060 */ sw $v1, 0x60($sp)
/* 05BC04 7F0270D4 24010001 */ li $at, 1 /* 05BC04 7F0270D4 24010001 */ li $at, 1
/* 05BC08 7F0270D8 1441000D */ bne $v0, $at, .L7F027110 /* 05BC08 7F0270D8 1441000D */ bne $v0, $at, .L7F027110
@@ -5359,7 +5361,7 @@ glabel handles_shot_actors
/* 05BF70 7F027440 46000086 */ mov.s $f2, $f0 /* 05BF70 7F027440 46000086 */ mov.s $f2, $f0
/* 05BF74 7F027444 51A0000B */ beql $t5, $zero, .L7F027474 /* 05BF74 7F027444 51A0000B */ beql $t5, $zero, .L7F027474
/* 05BF78 7F027448 8FA20070 */ lw $v0, 0x70($sp) /* 05BF78 7F027448 8FA20070 */ lw $v0, 0x70($sp)
/* 05BF7C 7F02744C 0FC26919 */ jal get_num_players /* 05BF7C 7F02744C 0FC26919 */ jal getPlayerCount
/* 05BF80 7F027450 E7A2003C */ swc1 $f2, 0x3c($sp) /* 05BF80 7F027450 E7A2003C */ swc1 $f2, 0x3c($sp)
/* 05BF84 7F027454 24010001 */ li $at, 1 /* 05BF84 7F027454 24010001 */ li $at, 1
/* 05BF88 7F027458 14410005 */ bne $v0, $at, .L7F027470 /* 05BF88 7F027458 14410005 */ bne $v0, $at, .L7F027470
@@ -7808,20 +7810,11 @@ glabel set_actor_on_path
#ifdef NONMATCHING void setSeenBondTimeToNow(struct chrdata *guardData)
void update_GUARDdata_timer_to_current(void) { {
guardData->timeshooter = global_timer;
return;
} }
#else
GLOBAL_ASM(
.text
glabel update_GUARDdata_timer_to_current
/* 05DDC8 7F029298 3C0E8005 */ lui $t6, %hi(global_timer)
/* 05DDCC 7F02929C 8DCE837C */ lw $t6, %lo(global_timer)($t6)
/* 05DDD0 7F0292A0 03E00008 */ jr $ra
/* 05DDD4 7F0292A4 AC8E00E8 */ sw $t6, 0xe8($a0)
)
#endif
@@ -7901,7 +7894,7 @@ glabel sub_GAME_7F0292A8
/* 05DED4 7F0293A4 8FAF0040 */ lw $t7, 0x40($sp) /* 05DED4 7F0293A4 8FAF0040 */ lw $t7, 0x40($sp)
/* 05DED8 7F0293A8 15CF0005 */ bne $t6, $t7, .L7F0293C0 /* 05DED8 7F0293A8 15CF0005 */ bne $t6, $t7, .L7F0293C0
/* 05DEDC 7F0293AC 00000000 */ nop /* 05DEDC 7F0293AC 00000000 */ nop
/* 05DEE0 7F0293B0 0FC0A4A6 */ jal update_GUARDdata_timer_to_current /* 05DEE0 7F0293B0 0FC0A4A6 */ jal setSeenBondTimeToNow
/* 05DEE4 7F0293B4 8FA40050 */ lw $a0, 0x50($sp) /* 05DEE4 7F0293B4 8FA40050 */ lw $a0, 0x50($sp)
/* 05DEE8 7F0293B8 24180001 */ li $t8, 1 /* 05DEE8 7F0293B8 24180001 */ li $t8, 1
/* 05DEEC 7F0293BC AFB8004C */ sw $t8, 0x4c($sp) /* 05DEEC 7F0293BC AFB8004C */ sw $t8, 0x4c($sp)
@@ -8039,7 +8032,7 @@ glabel sub_GAME_7F0294BC
/* 05E0B0 7F029580 8D2A0014 */ lw $t2, 0x14($t1) /* 05E0B0 7F029580 8D2A0014 */ lw $t2, 0x14($t1)
/* 05E0B4 7F029584 550A0006 */ bnel $t0, $t2, .L7F0295A0 /* 05E0B4 7F029584 550A0006 */ bnel $t0, $t2, .L7F0295A0
/* 05E0B8 7F029588 02002025 */ move $a0, $s0 /* 05E0B8 7F029588 02002025 */ move $a0, $s0
/* 05E0BC 7F02958C 0FC0A4A6 */ jal update_GUARDdata_timer_to_current /* 05E0BC 7F02958C 0FC0A4A6 */ jal setSeenBondTimeToNow
/* 05E0C0 7F029590 02002025 */ move $a0, $s0 /* 05E0C0 7F029590 02002025 */ move $a0, $s0
/* 05E0C4 7F029594 240B0001 */ li $t3, 1 /* 05E0C4 7F029594 240B0001 */ li $t3, 1
/* 05E0C8 7F029598 AFAB004C */ sw $t3, 0x4c($sp) /* 05E0C8 7F029598 AFAB004C */ sw $t3, 0x4c($sp)
@@ -9110,7 +9103,7 @@ glabel sub_GAME_7F02A1E8
s32 true_if_actor_dying_fading_limping_shot(PCHRdata chr) { s32 true_if_actor_dying_fading_limping_shot(struct chrdata *chr) {
s8 currentaction = chr->actiontype; s8 currentaction = chr->actiontype;
if ((currentaction == ACT_DIE) || (currentaction == ACT_DEAD) || (currentaction == ACT_PREARGH) || (currentaction == ACT_ARGH) && !(chr->chrflags & CHRFLAG_00000200)) if ((currentaction == ACT_DIE) || (currentaction == ACT_DEAD) || (currentaction == ACT_PREARGH) || (currentaction == ACT_ARGH) && !(chr->chrflags & CHRFLAG_00000200))
@@ -9120,7 +9113,7 @@ s32 true_if_actor_dying_fading_limping_shot(PCHRdata chr) {
s32 true_if_actor_dying_fading(PCHRdata chr) { s32 true_if_actor_dying_fading(struct chrdata *chr) {
s8 currentaction = chr->actiontype; s8 currentaction = chr->actiontype;
return ((currentaction == ACT_DIE) || (currentaction == ACT_DEAD)); return ((currentaction == ACT_DIE) || (currentaction == ACT_DEAD));
@@ -9922,7 +9915,7 @@ glabel actor_moves_to_preset_at_speed
/* 05F71C 7F02ABEC 29C1000A */ slti $at, $t6, 0xa /* 05F71C 7F02ABEC 29C1000A */ slti $at, $t6, 0xa
/* 05F720 7F02ABF0 50200053 */ beql $at, $zero, .L7F02AD40 /* 05F720 7F02ABF0 50200053 */ beql $at, $zero, .L7F02AD40
/* 05F724 7F02ABF4 00001025 */ move $v0, $zero /* 05F724 7F02ABF4 00001025 */ move $v0, $zero
/* 05F728 7F02ABF8 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 05F728 7F02ABF8 0FC0CBE5 */ jal convertPadIf9000
/* 05F72C 7F02ABFC 02002825 */ move $a1, $s0 /* 05F72C 7F02ABFC 02002825 */ move $a1, $s0
/* 05F730 7F02AC00 28412710 */ slti $at, $v0, 0x2710 /* 05F730 7F02AC00 28412710 */ slti $at, $v0, 0x2710
/* 05F734 7F02AC04 1020000A */ beqz $at, .L7F02AC30 /* 05F734 7F02AC04 1020000A */ beqz $at, .L7F02AC30
@@ -10584,7 +10577,7 @@ glabel sub_GAME_7F02AD98
void actor_reset_sleep(PCHRdata actor) { void actor_reset_sleep(struct chrdata *actor) {
actor->sleep = 0; actor->sleep = 0;
} }
@@ -10645,7 +10638,7 @@ glabel sub_GAME_7F02B4E8
/* 0600C4 7F02B594 314B0001 */ andi $t3, $t2, 1 /* 0600C4 7F02B594 314B0001 */ andi $t3, $t2, 1
/* 0600C8 7F02B598 55600012 */ bnezl $t3, .L7F02B5E4 /* 0600C8 7F02B598 55600012 */ bnezl $t3, .L7F02B5E4
/* 0600CC 7F02B59C 8E0C0014 */ lw $t4, 0x14($s0) /* 0600CC 7F02B59C 8E0C0014 */ lw $t4, 0x14($s0)
/* 0600D0 7F02B5A0 0FC0CB79 */ jal sub_GAME_7F032DE4 /* 0600D0 7F02B5A0 0FC0CB79 */ jal distToBond3D
/* 0600D4 7F02B5A4 02002025 */ move $a0, $s0 /* 0600D4 7F02B5A4 02002025 */ move $a0, $s0
/* 0600D8 7F02B5A8 3C014448 */ li $at, 0x44480000 # 800.000000 /* 0600D8 7F02B5A8 3C014448 */ li $at, 0x44480000 # 800.000000
/* 0600DC 7F02B5AC 44814000 */ mtc1 $at, $f8 /* 0600DC 7F02B5AC 44814000 */ mtc1 $at, $f8
@@ -12658,7 +12651,7 @@ glabel sub_GAME_7F02C4C0
/* 061788 7F02CC58 8F290004 */ lw $t1, 4($t9) /* 061788 7F02CC58 8F290004 */ lw $t1, 4($t9)
/* 06178C 7F02CC5C 0FC1639E */ jal sub_GAME_7F058E78 /* 06178C 7F02CC5C 0FC1639E */ jal sub_GAME_7F058E78
/* 061790 7F02CC60 AFA900B8 */ sw $t1, 0xb8($sp) /* 061790 7F02CC60 AFA900B8 */ sw $t1, 0xb8($sp)
/* 061794 7F02CC64 0FC1E115 */ jal sub_GAME_7F078454 /* 061794 7F02CC64 0FC1E115 */ jal currentPlayerGetMatrix10EC
/* 061798 7F02CC68 00000000 */ nop /* 061798 7F02CC68 00000000 */ nop
/* 06179C 7F02CC6C 00402025 */ move $a0, $v0 /* 06179C 7F02CC6C 00402025 */ move $a0, $v0
/* 0617A0 7F02CC70 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place /* 0617A0 7F02CC70 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -12692,7 +12685,7 @@ glabel sub_GAME_7F02C4C0
/* 06180C 7F02CCDC 00402025 */ move $a0, $v0 /* 06180C 7F02CCDC 00402025 */ move $a0, $v0
/* 061810 7F02CCE0 0FC1639E */ jal sub_GAME_7F058E78 /* 061810 7F02CCE0 0FC1639E */ jal sub_GAME_7F058E78
/* 061814 7F02CCE4 27A50068 */ addiu $a1, $sp, 0x68 /* 061814 7F02CCE4 27A50068 */ addiu $a1, $sp, 0x68
/* 061818 7F02CCE8 0FC1E115 */ jal sub_GAME_7F078454 /* 061818 7F02CCE8 0FC1E115 */ jal currentPlayerGetMatrix10EC
/* 06181C 7F02CCEC 00000000 */ nop /* 06181C 7F02CCEC 00000000 */ nop
/* 061820 7F02CCF0 00402025 */ move $a0, $v0 /* 061820 7F02CCF0 00402025 */ move $a0, $v0
/* 061824 7F02CCF4 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place /* 061824 7F02CCF4 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -13760,7 +13753,7 @@ glabel sub_GAME_7F02D630
/* 0621D0 7F02D6A0 C4660004 */ lwc1 $f6, 4($v1) /* 0621D0 7F02D6A0 C4660004 */ lwc1 $f6, 4($v1)
/* 0621D4 7F02D6A4 E6060004 */ swc1 $f6, 4($s0) /* 0621D4 7F02D6A4 E6060004 */ swc1 $f6, 4($s0)
/* 0621D8 7F02D6A8 C4680008 */ lwc1 $f8, 8($v1) /* 0621D8 7F02D6A8 C4680008 */ lwc1 $f8, 8($v1)
/* 0621DC 7F02D6AC 0FC1E111 */ jal sub_GAME_7F078444 /* 0621DC 7F02D6AC 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 0621E0 7F02D6B0 E6080008 */ swc1 $f8, 8($s0) /* 0621E0 7F02D6B0 E6080008 */ swc1 $f8, 8($s0)
/* 0621E4 7F02D6B4 00402025 */ move $a0, $v0 /* 0621E4 7F02D6B4 00402025 */ move $a0, $v0
/* 0621E8 7F02D6B8 8FA500B4 */ lw $a1, 0xb4($sp) /* 0621E8 7F02D6B8 8FA500B4 */ lw $a1, 0xb4($sp)
@@ -13777,7 +13770,7 @@ glabel sub_GAME_7F02D630
/* 062210 7F02D6E0 8FBF001C */ lw $ra, 0x1c($sp) /* 062210 7F02D6E0 8FBF001C */ lw $ra, 0x1c($sp)
/* 062214 7F02D6E4 0FC1B198 */ jal sub_GAME_7F06C660 /* 062214 7F02D6E4 0FC1B198 */ jal sub_GAME_7F06C660
/* 062218 7F02D6E8 00003025 */ move $a2, $zero /* 062218 7F02D6E8 00003025 */ move $a2, $zero
/* 06221C 7F02D6EC 0FC1E111 */ jal sub_GAME_7F078444 /* 06221C 7F02D6EC 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 062220 7F02D6F0 AFA2006C */ sw $v0, 0x6c($sp) /* 062220 7F02D6F0 AFA2006C */ sw $v0, 0x6c($sp)
/* 062224 7F02D6F4 00402025 */ move $a0, $v0 /* 062224 7F02D6F4 00402025 */ move $a0, $v0
/* 062228 7F02D6F8 8FA5006C */ lw $a1, 0x6c($sp) /* 062228 7F02D6F8 8FA5006C */ lw $a1, 0x6c($sp)
@@ -14443,7 +14436,7 @@ glabel sub_GAME_7F02D734
/* 062B44 7F02E014 8FA80230 */ lw $t0, 0x230($sp) /* 062B44 7F02E014 8FA80230 */ lw $t0, 0x230($sp)
.L7F02E018: .L7F02E018:
/* 062B48 7F02E018 8FA50270 */ lw $a1, 0x270($sp) /* 062B48 7F02E018 8FA50270 */ lw $a1, 0x270($sp)
/* 062B4C 7F02E01C 3C038008 */ lui $v1, %hi(dword_CODE_bss_8007BA04) /* 062B4C 7F02E01C 3C038008 */ lui $v1, %hi(stanSavedColl_posData)
/* 062B50 7F02E020 1100000F */ beqz $t0, .L7F02E060 /* 062B50 7F02E020 1100000F */ beqz $t0, .L7F02E060
/* 062B54 7F02E024 00000000 */ nop /* 062B54 7F02E024 00000000 */ nop
/* 062B58 7F02E028 C4A60008 */ lwc1 $f6, 8($a1) /* 062B58 7F02E028 C4A60008 */ lwc1 $f6, 8($a1)
@@ -14461,7 +14454,7 @@ glabel sub_GAME_7F02D734
/* 062B88 7F02E058 10000012 */ b .L7F02E0A4 /* 062B88 7F02E058 10000012 */ b .L7F02E0A4
/* 062B8C 7F02E05C 8FAC022C */ lw $t4, 0x22c($sp) /* 062B8C 7F02E05C 8FAC022C */ lw $t4, 0x22c($sp)
.L7F02E060: .L7F02E060:
/* 062B90 7F02E060 8C63BA04 */ lw $v1, %lo(dword_CODE_bss_8007BA04)($v1) /* 062B90 7F02E060 8C63BA04 */ lw $v1, %lo(stanSavedColl_posData)($v1)
/* 062B94 7F02E064 C7A8020C */ lwc1 $f8, 0x20c($sp) /* 062B94 7F02E064 C7A8020C */ lwc1 $f8, 0x20c($sp)
/* 062B98 7F02E068 10600006 */ beqz $v1, .L7F02E084 /* 062B98 7F02E068 10600006 */ beqz $v1, .L7F02E084
/* 062B9C 7F02E06C 00000000 */ nop /* 062B9C 7F02E06C 00000000 */ nop
@@ -14491,8 +14484,8 @@ glabel sub_GAME_7F02D734
/* 062BF0 7F02E0C0 0FC28F87 */ jal sub_GAME_7F0A3E1C /* 062BF0 7F02E0C0 0FC28F87 */ jal sub_GAME_7F0A3E1C
/* 062BF4 7F02E0C4 91A70003 */ lbu $a3, 3($t5) /* 062BF4 7F02E0C4 91A70003 */ lbu $a3, 3($t5)
.L7F02E0C8: .L7F02E0C8:
/* 062BF8 7F02E0C8 3C058008 */ lui $a1, %hi(dword_CODE_bss_8007BA04) /* 062BF8 7F02E0C8 3C058008 */ lui $a1, %hi(stanSavedColl_posData)
/* 062BFC 7F02E0CC 8CA5BA04 */ lw $a1, %lo(dword_CODE_bss_8007BA04)($a1) /* 062BFC 7F02E0CC 8CA5BA04 */ lw $a1, %lo(stanSavedColl_posData)($a1)
/* 062C00 7F02E0D0 8FAE0274 */ lw $t6, 0x274($sp) /* 062C00 7F02E0D0 8FAE0274 */ lw $t6, 0x274($sp)
/* 062C04 7F02E0D4 2406FFFF */ li $a2, -1 /* 062C04 7F02E0D4 2406FFFF */ li $a2, -1
/* 062C08 7F02E0D8 10A0002D */ beqz $a1, .L7F02E190 /* 062C08 7F02E0D8 10A0002D */ beqz $a1, .L7F02E190
@@ -14500,8 +14493,8 @@ glabel sub_GAME_7F02D734
/* 062C10 7F02E0E0 00E02025 */ move $a0, $a3 /* 062C10 7F02E0E0 00E02025 */ move $a0, $a3
/* 062C14 7F02E0E4 0FC19107 */ jal recall_joy2_hits_edit_detail_edit_flag /* 062C14 7F02E0E4 0FC19107 */ jal recall_joy2_hits_edit_detail_edit_flag
/* 062C18 7F02E0E8 2406FFFF */ li $a2, -1 /* 062C18 7F02E0E8 2406FFFF */ li $a2, -1
/* 062C1C 7F02E0EC 3C038008 */ lui $v1, %hi(dword_CODE_bss_8007BA04) /* 062C1C 7F02E0EC 3C038008 */ lui $v1, %hi(stanSavedColl_posData)
/* 062C20 7F02E0F0 8C63BA04 */ lw $v1, %lo(dword_CODE_bss_8007BA04)($v1) /* 062C20 7F02E0F0 8C63BA04 */ lw $v1, %lo(stanSavedColl_posData)($v1)
/* 062C24 7F02E0F4 24010003 */ li $at, 3 /* 062C24 7F02E0F4 24010003 */ li $at, 3
/* 062C28 7F02E0F8 8FAF0288 */ lw $t7, 0x288($sp) /* 062C28 7F02E0F8 8FAF0288 */ lw $t7, 0x288($sp)
/* 062C2C 7F02E0FC 90620000 */ lbu $v0, ($v1) /* 062C2C 7F02E0FC 90620000 */ lbu $v0, ($v1)
@@ -14532,8 +14525,8 @@ glabel sub_GAME_7F02D734
/* 062C88 7F02E158 81240080 */ lb $a0, 0x80($t1) /* 062C88 7F02E158 81240080 */ lb $a0, 0x80($t1)
/* 062C8C 7F02E15C 0FC26C54 */ jal get_cur_playernum /* 062C8C 7F02E15C 0FC26C54 */ jal get_cur_playernum
/* 062C90 7F02E160 E7A0004C */ swc1 $f0, 0x4c($sp) /* 062C90 7F02E160 E7A0004C */ swc1 $f0, 0x4c($sp)
/* 062C94 7F02E164 3C0B8008 */ lui $t3, %hi(dword_CODE_bss_8007BA04) /* 062C94 7F02E164 3C0B8008 */ lui $t3, %hi(stanSavedColl_posData)
/* 062C98 7F02E168 8D6BBA04 */ lw $t3, %lo(dword_CODE_bss_8007BA04)($t3) /* 062C98 7F02E168 8D6BBA04 */ lw $t3, %lo(stanSavedColl_posData)($t3)
/* 062C9C 7F02E16C 8FAA0274 */ lw $t2, 0x274($sp) /* 062C9C 7F02E16C 8FAA0274 */ lw $t2, 0x274($sp)
/* 062CA0 7F02E170 8FA5004C */ lw $a1, 0x4c($sp) /* 062CA0 7F02E170 8FA5004C */ lw $a1, 0x4c($sp)
/* 062CA4 7F02E174 8D640004 */ lw $a0, 4($t3) /* 062CA4 7F02E174 8D640004 */ lw $a0, 4($t3)
@@ -17853,7 +17846,7 @@ glabel sub_GAME_7F03081C
/* 065588 7F030A58 24080001 */ li $t0, 1 /* 065588 7F030A58 24080001 */ li $t0, 1
/* 06558C 7F030A5C AFA80088 */ sw $t0, 0x88($sp) /* 06558C 7F030A5C AFA80088 */ sw $t0, 0x88($sp)
/* 065590 7F030A60 27A40078 */ addiu $a0, $sp, 0x78 /* 065590 7F030A60 27A40078 */ addiu $a0, $sp, 0x78
/* 065594 7F030A64 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 065594 7F030A64 0FC2CA2C */ jal getCollisionEdge_maybe
/* 065598 7F030A68 27A5006C */ addiu $a1, $sp, 0x6c /* 065598 7F030A68 27A5006C */ addiu $a1, $sp, 0x6c
/* 06559C 7F030A6C 27A40078 */ addiu $a0, $sp, 0x78 /* 06559C 7F030A6C 27A40078 */ addiu $a0, $sp, 0x78
/* 0655A0 7F030A70 27A5006C */ addiu $a1, $sp, 0x6c /* 0655A0 7F030A70 27A5006C */ addiu $a1, $sp, 0x6c
@@ -17928,7 +17921,7 @@ glabel sub_GAME_7F03081C
/* 0656AC 7F030B7C 240C0001 */ li $t4, 1 /* 0656AC 7F030B7C 240C0001 */ li $t4, 1
/* 0656B0 7F030B80 AFAC0084 */ sw $t4, 0x84($sp) /* 0656B0 7F030B80 AFAC0084 */ sw $t4, 0x84($sp)
/* 0656B4 7F030B84 27A40060 */ addiu $a0, $sp, 0x60 /* 0656B4 7F030B84 27A40060 */ addiu $a0, $sp, 0x60
/* 0656B8 7F030B88 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 0656B8 7F030B88 0FC2CA2C */ jal getCollisionEdge_maybe
/* 0656BC 7F030B8C 27A50054 */ addiu $a1, $sp, 0x54 /* 0656BC 7F030B8C 27A50054 */ addiu $a1, $sp, 0x54
/* 0656C0 7F030B90 27A40060 */ addiu $a0, $sp, 0x60 /* 0656C0 7F030B90 27A40060 */ addiu $a0, $sp, 0x60
/* 0656C4 7F030B94 27A50054 */ addiu $a1, $sp, 0x54 /* 0656C4 7F030B94 27A50054 */ addiu $a1, $sp, 0x54
@@ -18040,7 +18033,7 @@ glabel sub_GAME_7F03081C
/* 06585C 7F030D2C AFAB0050 */ sw $t3, 0x50($sp) /* 06585C 7F030D2C AFAB0050 */ sw $t3, 0x50($sp)
.L7F030D30: .L7F030D30:
/* 065860 7F030D30 8FA400C0 */ lw $a0, 0xc0($sp) /* 065860 7F030D30 8FA400C0 */ lw $a0, 0xc0($sp)
/* 065864 7F030D34 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 065864 7F030D34 0FC2CA2C */ jal getCollisionEdge_maybe
/* 065868 7F030D38 8FA500C4 */ lw $a1, 0xc4($sp) /* 065868 7F030D38 8FA500C4 */ lw $a1, 0xc4($sp)
/* 06586C 7F030D3C 8FA400C0 */ lw $a0, 0xc0($sp) /* 06586C 7F030D3C 8FA400C0 */ lw $a0, 0xc0($sp)
/* 065870 7F030D40 8FA500C4 */ lw $a1, 0xc4($sp) /* 065870 7F030D40 8FA500C4 */ lw $a1, 0xc4($sp)
@@ -18228,14 +18221,14 @@ glabel sub_GAME_7F030D70
/* 065ADC 7F030FAC 24080001 */ li $t0, 1 /* 065ADC 7F030FAC 24080001 */ li $t0, 1
/* 065AE0 7F030FB0 AFA80090 */ sw $t0, 0x90($sp) /* 065AE0 7F030FB0 AFA80090 */ sw $t0, 0x90($sp)
/* 065AE4 7F030FB4 27A40080 */ addiu $a0, $sp, 0x80 /* 065AE4 7F030FB4 27A40080 */ addiu $a0, $sp, 0x80
/* 065AE8 7F030FB8 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 065AE8 7F030FB8 0FC2CA2C */ jal getCollisionEdge_maybe
/* 065AEC 7F030FBC 27A50074 */ addiu $a1, $sp, 0x74 /* 065AEC 7F030FBC 27A50074 */ addiu $a1, $sp, 0x74
/* 065AF0 7F030FC0 27A40080 */ addiu $a0, $sp, 0x80 /* 065AF0 7F030FC0 27A40080 */ addiu $a0, $sp, 0x80
/* 065AF4 7F030FC4 27A50074 */ addiu $a1, $sp, 0x74 /* 065AF4 7F030FC4 27A50074 */ addiu $a1, $sp, 0x74
/* 065AF8 7F030FC8 0FC0C1D3 */ jal sub_GAME_7F03074C /* 065AF8 7F030FC8 0FC0C1D3 */ jal sub_GAME_7F03074C
/* 065AFC 7F030FCC 27A600A8 */ addiu $a2, $sp, 0xa8 /* 065AFC 7F030FCC 27A600A8 */ addiu $a2, $sp, 0xa8
/* 065B00 7F030FD0 3C018008 */ lui $at, %hi(flt_CODE_bss_8007BA00) /* 065B00 7F030FD0 3C018008 */ lui $at, %hi(stanSavedColl_someMin)
/* 065B04 7F030FD4 C42ABA00 */ lwc1 $f10, %lo(flt_CODE_bss_8007BA00)($at) /* 065B04 7F030FD4 C42ABA00 */ lwc1 $f10, %lo(stanSavedColl_someMin)($at)
/* 065B08 7F030FD8 E7AA0054 */ swc1 $f10, 0x54($sp) /* 065B08 7F030FD8 E7AA0054 */ swc1 $f10, 0x54($sp)
.L7F030FDC: .L7F030FDC:
/* 065B0C 7F030FDC 8FA900C0 */ lw $t1, 0xc0($sp) /* 065B0C 7F030FDC 8FA900C0 */ lw $t1, 0xc0($sp)
@@ -18306,14 +18299,14 @@ glabel sub_GAME_7F030D70
/* 065C0C 7F0310DC 240C0001 */ li $t4, 1 /* 065C0C 7F0310DC 240C0001 */ li $t4, 1
/* 065C10 7F0310E0 AFAC008C */ sw $t4, 0x8c($sp) /* 065C10 7F0310E0 AFAC008C */ sw $t4, 0x8c($sp)
/* 065C14 7F0310E4 27A40068 */ addiu $a0, $sp, 0x68 /* 065C14 7F0310E4 27A40068 */ addiu $a0, $sp, 0x68
/* 065C18 7F0310E8 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 065C18 7F0310E8 0FC2CA2C */ jal getCollisionEdge_maybe
/* 065C1C 7F0310EC 27A5005C */ addiu $a1, $sp, 0x5c /* 065C1C 7F0310EC 27A5005C */ addiu $a1, $sp, 0x5c
/* 065C20 7F0310F0 27A40068 */ addiu $a0, $sp, 0x68 /* 065C20 7F0310F0 27A40068 */ addiu $a0, $sp, 0x68
/* 065C24 7F0310F4 27A5005C */ addiu $a1, $sp, 0x5c /* 065C24 7F0310F4 27A5005C */ addiu $a1, $sp, 0x5c
/* 065C28 7F0310F8 0FC0C1D3 */ jal sub_GAME_7F03074C /* 065C28 7F0310F8 0FC0C1D3 */ jal sub_GAME_7F03074C
/* 065C2C 7F0310FC 27A600A8 */ addiu $a2, $sp, 0xa8 /* 065C2C 7F0310FC 27A600A8 */ addiu $a2, $sp, 0xa8
/* 065C30 7F031100 3C018008 */ lui $at, %hi(flt_CODE_bss_8007BA00) /* 065C30 7F031100 3C018008 */ lui $at, %hi(stanSavedColl_someMin)
/* 065C34 7F031104 C428BA00 */ lwc1 $f8, %lo(flt_CODE_bss_8007BA00)($at) /* 065C34 7F031104 C428BA00 */ lwc1 $f8, %lo(stanSavedColl_someMin)($at)
/* 065C38 7F031108 E7A80050 */ swc1 $f8, 0x50($sp) /* 065C38 7F031108 E7A80050 */ swc1 $f8, 0x50($sp)
.L7F03110C: .L7F03110C:
/* 065C3C 7F03110C 8FAD0090 */ lw $t5, 0x90($sp) /* 065C3C 7F03110C 8FAD0090 */ lw $t5, 0x90($sp)
@@ -18434,7 +18427,7 @@ glabel sub_GAME_7F030D70
/* 065DF8 7F0312C8 AFAB0058 */ sw $t3, 0x58($sp) /* 065DF8 7F0312C8 AFAB0058 */ sw $t3, 0x58($sp)
.L7F0312CC: .L7F0312CC:
/* 065DFC 7F0312CC 8FA400C8 */ lw $a0, 0xc8($sp) /* 065DFC 7F0312CC 8FA400C8 */ lw $a0, 0xc8($sp)
/* 065E00 7F0312D0 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 065E00 7F0312D0 0FC2CA2C */ jal getCollisionEdge_maybe
/* 065E04 7F0312D4 8FA500CC */ lw $a1, 0xcc($sp) /* 065E04 7F0312D4 8FA500CC */ lw $a1, 0xcc($sp)
/* 065E08 7F0312D8 8FA400C8 */ lw $a0, 0xc8($sp) /* 065E08 7F0312D8 8FA400C8 */ lw $a0, 0xc8($sp)
/* 065E0C 7F0312DC 8FA500CC */ lw $a1, 0xcc($sp) /* 065E0C 7F0312DC 8FA500CC */ lw $a1, 0xcc($sp)
@@ -20449,7 +20442,7 @@ glabel sub_GAME_7F032C78
/* 067800 7F032CD0 30A90008 */ andi $t1, $a1, 8 /* 067800 7F032CD0 30A90008 */ andi $t1, $a1, 8
/* 067804 7F032CD4 1120001C */ beqz $t1, .L7F032D48 /* 067804 7F032CD4 1120001C */ beqz $t1, .L7F032D48
/* 067808 7F032CD8 00000000 */ nop /* 067808 7F032CD8 00000000 */ nop
/* 06780C 7F032CDC 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 06780C 7F032CDC 0FC0CBE5 */ jal convertPadIf9000
/* 067810 7F032CE0 00C02825 */ move $a1, $a2 /* 067810 7F032CE0 00C02825 */ move $a1, $a2
/* 067814 7F032CE4 28412710 */ slti $at, $v0, 0x2710 /* 067814 7F032CE4 28412710 */ slti $at, $v0, 0x2710
/* 067818 7F032CE8 1020000A */ beqz $at, .L7F032D14 /* 067818 7F032CE8 1020000A */ beqz $at, .L7F032D14
@@ -20540,43 +20533,21 @@ glabel get_angle_between_actor_cur_player
#endif #endif
float distToBond3D(struct chrdata *guardData)
#ifdef NONMATCHING {
void sub_GAME_7F032DE4(void) { struct prop *guardPosData;
struct prop *playerPosData;
float xDiff;
float yDiff;
float zDiff;
guardPosData = guardData->posdata;
playerPosData = get_curplayer_positiondata();
xDiff = (playerPosData->position).x - (guardPosData->position).x;
yDiff = (playerPosData->position).y - (guardPosData->position).y;
zDiff = (playerPosData->position).z - (guardPosData->position).z;
return sqrtf(xDiff * xDiff + yDiff * yDiff + zDiff * zDiff);
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F032DE4
/* 067914 7F032DE4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 067918 7F032DE8 AFBF0014 */ sw $ra, 0x14($sp)
/* 06791C 7F032DEC 8C830018 */ lw $v1, 0x18($a0)
/* 067920 7F032DF0 0FC225E6 */ jal get_curplayer_positiondata
/* 067924 7F032DF4 AFA3001C */ sw $v1, 0x1c($sp)
/* 067928 7F032DF8 8FA3001C */ lw $v1, 0x1c($sp)
/* 06792C 7F032DFC C4440008 */ lwc1 $f4, 8($v0)
/* 067930 7F032E00 C448000C */ lwc1 $f8, 0xc($v0)
/* 067934 7F032E04 C4660008 */ lwc1 $f6, 8($v1)
/* 067938 7F032E08 C46A000C */ lwc1 $f10, 0xc($v1)
/* 06793C 7F032E0C C4500010 */ lwc1 $f16, 0x10($v0)
/* 067940 7F032E10 46062001 */ sub.s $f0, $f4, $f6
/* 067944 7F032E14 C4720010 */ lwc1 $f18, 0x10($v1)
/* 067948 7F032E18 460A4081 */ sub.s $f2, $f8, $f10
/* 06794C 7F032E1C 46000102 */ mul.s $f4, $f0, $f0
/* 067950 7F032E20 46128381 */ sub.s $f14, $f16, $f18
/* 067954 7F032E24 46021182 */ mul.s $f6, $f2, $f2
/* 067958 7F032E28 46062200 */ add.s $f8, $f4, $f6
/* 06795C 7F032E2C 460E7282 */ mul.s $f10, $f14, $f14
/* 067960 7F032E30 0C007DF8 */ jal sqrtf
/* 067964 7F032E34 460A4300 */ add.s $f12, $f8, $f10
/* 067968 7F032E38 8FBF0014 */ lw $ra, 0x14($sp)
/* 06796C 7F032E3C 27BD0020 */ addiu $sp, $sp, 0x20
/* 067970 7F032E40 03E00008 */ jr $ra
/* 067974 7F032E44 00000000 */ nop
)
#endif
#ifdef NONMATCHING #ifdef NONMATCHING
@@ -20590,7 +20561,7 @@ glabel sub_GAME_7F032E48
/* 067978 7F032E48 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 067978 7F032E48 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 06797C 7F032E4C AFBF0014 */ sw $ra, 0x14($sp) /* 06797C 7F032E4C AFBF0014 */ sw $ra, 0x14($sp)
/* 067980 7F032E50 8C860018 */ lw $a2, 0x18($a0) /* 067980 7F032E50 8C860018 */ lw $a2, 0x18($a0)
/* 067984 7F032E54 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 067984 7F032E54 0FC0CBE5 */ jal convertPadIf9000
/* 067988 7F032E58 AFA6001C */ sw $a2, 0x1c($sp) /* 067988 7F032E58 AFA6001C */ sw $a2, 0x1c($sp)
/* 06798C 7F032E5C 28412710 */ slti $at, $v0, 0x2710 /* 06798C 7F032E5C 28412710 */ slti $at, $v0, 0x2710
/* 067990 7F032E60 1020000A */ beqz $at, .L7F032E8C /* 067990 7F032E60 1020000A */ beqz $at, .L7F032E8C
@@ -20649,7 +20620,7 @@ GLOBAL_ASM(
glabel check_if_room_for_preset_loaded glabel check_if_room_for_preset_loaded
/* 067A2C 7F032EFC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 067A2C 7F032EFC 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 067A30 7F032F00 AFBF0014 */ sw $ra, 0x14($sp) /* 067A30 7F032F00 AFBF0014 */ sw $ra, 0x14($sp)
/* 067A34 7F032F04 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 067A34 7F032F04 0FC0CBE5 */ jal convertPadIf9000
/* 067A38 7F032F08 00000000 */ nop /* 067A38 7F032F08 00000000 */ nop
/* 067A3C 7F032F0C 28412710 */ slti $at, $v0, 0x2710 /* 067A3C 7F032F0C 28412710 */ slti $at, $v0, 0x2710
/* 067A40 7F032F10 1020000A */ beqz $at, .L7F032F3C /* 067A40 7F032F10 1020000A */ beqz $at, .L7F032F3C
@@ -20677,7 +20648,7 @@ glabel check_if_room_for_preset_loaded
/* 067A90 7F032F60 00001025 */ move $v0, $zero /* 067A90 7F032F60 00001025 */ move $v0, $zero
/* 067A94 7F032F64 10800007 */ beqz $a0, .L7F032F84 /* 067A94 7F032F64 10800007 */ beqz $a0, .L7F032F84
/* 067A98 7F032F68 00000000 */ nop /* 067A98 7F032F68 00000000 */ nop
/* 067A9C 7F032F6C 0FC2CBF6 */ jal sub_GAME_7F0B2FD8 /* 067A9C 7F032F6C 0FC2CBF6 */ jal getTileRoom
/* 067AA0 7F032F70 00000000 */ nop /* 067AA0 7F032F70 00000000 */ nop
/* 067AA4 7F032F74 0FC2D794 */ jal sub_GAME_7F0B5E50 /* 067AA4 7F032F74 0FC2D794 */ jal sub_GAME_7F0B5E50
/* 067AA8 7F032F78 00402025 */ move $a0, $v0 /* 067AA8 7F032F78 00402025 */ move $a0, $v0
@@ -20693,25 +20664,14 @@ glabel check_if_room_for_preset_loaded
#endif #endif
s32 convertPadIf9000(struct chrdata *guardData,s32 padNo)
#ifdef NONMATCHING {
void sub_GAME_7F032F94(void) { // Guard's target pad.
if (padNo == PAD_PRESET) {
padNo = (s32)guardData->padpreset1;
}
return padNo;
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F032F94
/* 067AC4 7F032F94 24012328 */ li $at, 9000
/* 067AC8 7F032F98 14A10002 */ bne $a1, $at, .L7F032FA4
/* 067ACC 7F032F9C 00000000 */ nop
/* 067AD0 7F032FA0 84850114 */ lh $a1, 0x114($a0)
.L7F032FA4:
/* 067AD4 7F032FA4 03E00008 */ jr $ra
/* 067AD8 7F032FA8 00A01025 */ move $v0, $a1
)
#endif
#ifdef NONMATCHING #ifdef NONMATCHING
@@ -20891,7 +20851,7 @@ glabel get_distance_between_actor_and_preset
/* 067C94 7F033164 AFA50024 */ sw $a1, 0x24($sp) /* 067C94 7F033164 AFA50024 */ sw $a1, 0x24($sp)
/* 067C98 7F033168 8FA40020 */ lw $a0, 0x20($sp) /* 067C98 7F033168 8FA40020 */ lw $a0, 0x20($sp)
/* 067C9C 7F03316C 8FA50024 */ lw $a1, 0x24($sp) /* 067C9C 7F03316C 8FA50024 */ lw $a1, 0x24($sp)
/* 067CA0 7F033170 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 067CA0 7F033170 0FC0CBE5 */ jal convertPadIf9000
/* 067CA4 7F033174 AFA2001C */ sw $v0, 0x1c($sp) /* 067CA4 7F033174 AFA2001C */ sw $v0, 0x1c($sp)
/* 067CA8 7F033178 28412710 */ slti $at, $v0, 0x2710 /* 067CA8 7F033178 28412710 */ slti $at, $v0, 0x2710
/* 067CAC 7F03317C 1020000A */ beqz $at, .L7F0331A8 /* 067CAC 7F03317C 1020000A */ beqz $at, .L7F0331A8
@@ -21277,7 +21237,7 @@ glabel sub_GAME_7F0333F8
/* 067F68 7F033438 8FA40044 */ lw $a0, 0x44($sp) /* 067F68 7F033438 8FA40044 */ lw $a0, 0x44($sp)
/* 067F6C 7F03343C 0FC1B2E6 */ jal getsuboffset /* 067F6C 7F03343C 0FC1B2E6 */ jal getsuboffset
/* 067F70 7F033440 27A50020 */ addiu $a1, $sp, 0x20 /* 067F70 7F033440 27A50020 */ addiu $a1, $sp, 0x20
/* 067F74 7F033444 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 067F74 7F033444 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 067F78 7F033448 00000000 */ nop /* 067F78 7F033448 00000000 */ nop
/* 067F7C 7F03344C 00402025 */ move $a0, $v0 /* 067F7C 7F03344C 00402025 */ move $a0, $v0
/* 067F80 7F033450 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 067F80 7F033450 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -22205,7 +22165,7 @@ GLOBAL_ASM(
glabel sub_GAME_7F033D5C glabel sub_GAME_7F033D5C
/* 06888C 7F033D5C 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 06888C 7F033D5C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 068890 7F033D60 AFBF0014 */ sw $ra, 0x14($sp) /* 068890 7F033D60 AFBF0014 */ sw $ra, 0x14($sp)
/* 068894 7F033D64 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 068894 7F033D64 0FC0CBE5 */ jal convertPadIf9000
/* 068898 7F033D68 AFA40018 */ sw $a0, 0x18($sp) /* 068898 7F033D68 AFA40018 */ sw $a0, 0x18($sp)
/* 06889C 7F033D6C 8FAE0018 */ lw $t6, 0x18($sp) /* 06889C 7F033D6C 8FAE0018 */ lw $t6, 0x18($sp)
/* 0688A0 7F033D70 A5C20114 */ sh $v0, 0x114($t6) /* 0688A0 7F033D70 A5C20114 */ sh $v0, 0x114($t6)
@@ -22234,7 +22194,7 @@ glabel sub_GAME_7F033D84
/* 0688C8 7F033D98 10400006 */ beqz $v0, .L7F033DB4 /* 0688C8 7F033D98 10400006 */ beqz $v0, .L7F033DB4
/* 0688CC 7F033D9C 8FA40020 */ lw $a0, 0x20($sp) /* 0688CC 7F033D9C 8FA40020 */ lw $a0, 0x20($sp)
/* 0688D0 7F033DA0 8FA50028 */ lw $a1, 0x28($sp) /* 0688D0 7F033DA0 8FA50028 */ lw $a1, 0x28($sp)
/* 0688D4 7F033DA4 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 0688D4 7F033DA4 0FC0CBE5 */ jal convertPadIf9000
/* 0688D8 7F033DA8 AFA2001C */ sw $v0, 0x1c($sp) /* 0688D8 7F033DA8 AFA2001C */ sw $v0, 0x1c($sp)
/* 0688DC 7F033DAC 8FA3001C */ lw $v1, 0x1c($sp) /* 0688DC 7F033DAC 8FA3001C */ lw $v1, 0x1c($sp)
/* 0688E0 7F033DB0 A4620114 */ sh $v0, 0x114($v1) /* 0688E0 7F033DB0 A4620114 */ sh $v0, 0x114($v1)
@@ -22280,7 +22240,7 @@ glabel sub_GAME_7F033DC4
/* 068948 7F033E18 1000001F */ b .L7F033E98 /* 068948 7F033E18 1000001F */ b .L7F033E98
/* 06894C 7F033E1C 00001025 */ move $v0, $zero /* 06894C 7F033E1C 00001025 */ move $v0, $zero
.L7F033E20: .L7F033E20:
/* 068950 7F033E20 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 068950 7F033E20 0FC2CA2C */ jal getCollisionEdge_maybe
/* 068954 7F033E24 27A5003C */ addiu $a1, $sp, 0x3c /* 068954 7F033E24 27A5003C */ addiu $a1, $sp, 0x3c
/* 068958 7F033E28 8E060014 */ lw $a2, 0x14($s0) /* 068958 7F033E28 8E060014 */ lw $a2, 0x14($s0)
/* 06895C 7F033E2C 26230008 */ addiu $v1, $s1, 8 /* 06895C 7F033E2C 26230008 */ addiu $v1, $s1, 8
@@ -22336,7 +22296,7 @@ glabel sub_GAME_7F033EAC
/* 0689E8 7F033EB8 240E0001 */ li $t6, 1 /* 0689E8 7F033EB8 240E0001 */ li $t6, 1
/* 0689EC 7F033EBC AFA50034 */ sw $a1, 0x34($sp) /* 0689EC 7F033EBC AFA50034 */ sw $a1, 0x34($sp)
/* 0689F0 7F033EC0 AFAE002C */ sw $t6, 0x2c($sp) /* 0689F0 7F033EC0 AFAE002C */ sw $t6, 0x2c($sp)
/* 0689F4 7F033EC4 0FC2CBF6 */ jal sub_GAME_7F0B2FD8 /* 0689F4 7F033EC4 0FC2CBF6 */ jal getTileRoom
/* 0689F8 7F033EC8 00A02025 */ move $a0, $a1 /* 0689F8 7F033EC8 00A02025 */ move $a0, $a1
/* 0689FC 7F033ECC 0FC2D794 */ jal sub_GAME_7F0B5E50 /* 0689FC 7F033ECC 0FC2D794 */ jal sub_GAME_7F0B5E50
/* 068A00 7F033ED0 00402025 */ move $a0, $v0 /* 068A00 7F033ED0 00402025 */ move $a0, $v0
@@ -22346,7 +22306,7 @@ glabel sub_GAME_7F033EAC
/* 068A10 7F033EE0 24050000 */ li $a1, 0 /* 068A10 7F033EE0 24050000 */ li $a1, 0
/* 068A14 7F033EE4 50400014 */ beql $v0, $zero, .L7F033F38 /* 068A14 7F033EE4 50400014 */ beql $v0, $zero, .L7F033F38
/* 068A18 7F033EE8 8FBF0014 */ lw $ra, 0x14($sp) /* 068A18 7F033EE8 8FBF0014 */ lw $ra, 0x14($sp)
/* 068A1C 7F033EEC 0FC2CBF6 */ jal sub_GAME_7F0B2FD8 /* 068A1C 7F033EEC 0FC2CBF6 */ jal getTileRoom
/* 068A20 7F033EF0 8FA40034 */ lw $a0, 0x34($sp) /* 068A20 7F033EF0 8FA40034 */ lw $a0, 0x34($sp)
/* 068A24 7F033EF4 00402025 */ move $a0, $v0 /* 068A24 7F033EF4 00402025 */ move $a0, $v0
/* 068A28 7F033EF8 0FC2CF03 */ jal sub_GAME_7F0B3C0C /* 068A28 7F033EF8 0FC2CF03 */ jal sub_GAME_7F0B3C0C
@@ -22549,7 +22509,7 @@ glabel actionblock_guard_constructor_BDBE
/* 068C94 7F034164 AFA40040 */ sw $a0, 0x40($sp) /* 068C94 7F034164 AFA40040 */ sw $a0, 0x40($sp)
/* 068C98 7F034168 AFA50044 */ sw $a1, 0x44($sp) /* 068C98 7F034168 AFA50044 */ sw $a1, 0x44($sp)
/* 068C9C 7F03416C AFA60048 */ sw $a2, 0x48($sp) /* 068C9C 7F03416C AFA60048 */ sw $a2, 0x48($sp)
/* 068CA0 7F034170 0FC07FF0 */ jal get_next_available_guardID /* 068CA0 7F034170 0FC07FF0 */ jal chrGetNumFree
/* 068CA4 7F034174 AFA7004C */ sw $a3, 0x4c($sp) /* 068CA4 7F034174 AFA7004C */ sw $a3, 0x4c($sp)
/* 068CA8 7F034178 28410003 */ slti $at, $v0, 3 /* 068CA8 7F034178 28410003 */ slti $at, $v0, 3
/* 068CAC 7F03417C 14200031 */ bnez $at, .L7F034244 /* 068CAC 7F03417C 14200031 */ bnez $at, .L7F034244
@@ -22627,7 +22587,7 @@ glabel guard_constructor_BD
/* 068D8C 7F03425C AFBF0024 */ sw $ra, 0x24($sp) /* 068D8C 7F03425C AFBF0024 */ sw $ra, 0x24($sp)
/* 068D90 7F034260 AFA50034 */ sw $a1, 0x34($sp) /* 068D90 7F034260 AFA50034 */ sw $a1, 0x34($sp)
/* 068D94 7F034264 AFA60038 */ sw $a2, 0x38($sp) /* 068D94 7F034264 AFA60038 */ sw $a2, 0x38($sp)
/* 068D98 7F034268 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 068D98 7F034268 0FC0CBE5 */ jal convertPadIf9000
/* 068D9C 7F03426C 00E02825 */ move $a1, $a3 /* 068D9C 7F03426C 00E02825 */ move $a1, $a3
/* 068DA0 7F034270 28412710 */ slti $at, $v0, 0x2710 /* 068DA0 7F034270 28412710 */ slti $at, $v0, 0x2710
/* 068DA4 7F034274 1020000A */ beqz $at, .L7F0342A0 /* 068DA4 7F034274 1020000A */ beqz $at, .L7F0342A0
@@ -22736,7 +22696,7 @@ glabel check_if_actorID_is_at_preset
/* 068EC8 7F034398 AFA60028 */ sw $a2, 0x28($sp) /* 068EC8 7F034398 AFA60028 */ sw $a2, 0x28($sp)
/* 068ECC 7F03439C 8FA40020 */ lw $a0, 0x20($sp) /* 068ECC 7F03439C 8FA40020 */ lw $a0, 0x20($sp)
/* 068ED0 7F0343A0 8FA50028 */ lw $a1, 0x28($sp) /* 068ED0 7F0343A0 8FA50028 */ lw $a1, 0x28($sp)
/* 068ED4 7F0343A4 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 068ED4 7F0343A4 0FC0CBE5 */ jal convertPadIf9000
/* 068ED8 7F0343A8 AFA20018 */ sw $v0, 0x18($sp) /* 068ED8 7F0343A8 AFA20018 */ sw $v0, 0x18($sp)
/* 068EDC 7F0343AC 28412710 */ slti $at, $v0, 0x2710 /* 068EDC 7F0343AC 28412710 */ slti $at, $v0, 0x2710
/* 068EE0 7F0343B0 1020000A */ beqz $at, .L7F0343DC /* 068EE0 7F0343B0 1020000A */ beqz $at, .L7F0343DC
@@ -22801,7 +22761,7 @@ glabel check_if_actor_is_at_preset
/* 068F8C 7F03445C AFA50024 */ sw $a1, 0x24($sp) /* 068F8C 7F03445C AFA50024 */ sw $a1, 0x24($sp)
/* 068F90 7F034460 AFA2001C */ sw $v0, 0x1c($sp) /* 068F90 7F034460 AFA2001C */ sw $v0, 0x1c($sp)
/* 068F94 7F034464 8FA40020 */ lw $a0, 0x20($sp) /* 068F94 7F034464 8FA40020 */ lw $a0, 0x20($sp)
/* 068F98 7F034468 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 068F98 7F034468 0FC0CBE5 */ jal convertPadIf9000
/* 068F9C 7F03446C 8FA50024 */ lw $a1, 0x24($sp) /* 068F9C 7F03446C 8FA50024 */ lw $a1, 0x24($sp)
/* 068FA0 7F034470 28412710 */ slti $at, $v0, 0x2710 /* 068FA0 7F034470 28412710 */ slti $at, $v0, 0x2710
/* 068FA4 7F034474 1020000A */ beqz $at, .L7F0344A0 /* 068FA4 7F034474 1020000A */ beqz $at, .L7F0344A0
@@ -22883,7 +22843,7 @@ glabel removed_animation_routine_2B
{ {
s32 temp_ret; s32 temp_ret;
arg1 = sub_GAME_7F032F94(); arg1 = convertPadIf9000();
if (true_if_actor_dying_fading_limping_shot(arg0) != 0) if (true_if_actor_dying_fading_limping_shot(arg0) != 0)
{ {
temp_ret = scan_position_data_table_for_normal_object_at_preset(arg1); temp_ret = scan_position_data_table_for_normal_object_at_preset(arg1);
@@ -22904,7 +22864,7 @@ GLOBAL_ASM(
glabel sub_GAME_7F034514 glabel sub_GAME_7F034514
/* 069044 7F034514 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 069044 7F034514 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 069048 7F034518 AFBF0014 */ sw $ra, 0x14($sp) /* 069048 7F034518 AFBF0014 */ sw $ra, 0x14($sp)
/* 06904C 7F03451C 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 06904C 7F03451C 0FC0CBE5 */ jal convertPadIf9000
/* 069050 7F034520 AFA40018 */ sw $a0, 0x18($sp) /* 069050 7F034520 AFA40018 */ sw $a0, 0x18($sp)
/* 069054 7F034524 AFA2001C */ sw $v0, 0x1c($sp) /* 069054 7F034524 AFA2001C */ sw $v0, 0x1c($sp)
/* 069058 7F034528 0FC0A896 */ jal true_if_actor_dying_fading_limping_shot /* 069058 7F034528 0FC0A896 */ jal true_if_actor_dying_fading_limping_shot
@@ -22950,7 +22910,7 @@ glabel sub_GAME_7F034514
{ {
return 0; return 0;
} }
if (sub_GAME_7F032DE4(arg0) < 10.0f) if (distToBond3D(arg0) < 10.0f)
{ {
return 0; return 0;
} }
@@ -23022,7 +22982,7 @@ glabel actor_draws_throws_grenade_at_player_if_possible
/* 0690DC 7F0345AC 1000004E */ b .L7F0346E8 /* 0690DC 7F0345AC 1000004E */ b .L7F0346E8
/* 0690E0 7F0345B0 00001025 */ move $v0, $zero /* 0690E0 7F0345B0 00001025 */ move $v0, $zero
.L7F0345B4: .L7F0345B4:
/* 0690E4 7F0345B4 0FC0CB79 */ jal sub_GAME_7F032DE4 /* 0690E4 7F0345B4 0FC0CB79 */ jal distToBond3D
/* 0690E8 7F0345B8 02002025 */ move $a0, $s0 /* 0690E8 7F0345B8 02002025 */ move $a0, $s0
/* 0690EC 7F0345BC 3C014120 */ li $at, 0x41200000 # 10.000000 /* 0690EC 7F0345BC 3C014120 */ li $at, 0x41200000 # 10.000000
/* 0690F0 7F0345C0 44812000 */ mtc1 $at, $f4 /* 0690F0 7F0345C0 44812000 */ mtc1 $at, $f4
@@ -23132,7 +23092,7 @@ glabel actor_draws_throws_grenade_at_player_if_possible
temp_a0 = temp_ret->unk14; temp_a0 = temp_ret->unk14;
sp1C = temp_ret; sp1C = temp_ret;
set_obj_instance_controller_scale(temp_a0, temp_a0->unk14); set_obj_instance_controller_scale(temp_a0, temp_a0->unk14);
sub_GAME_7F03A5A4(sp1C->unk10, arg0->unk18); attachNewChild(sp1C->unk10, arg0->unk18);
sp1C->unk82 = (u16)0xb4; sp1C->unk82 = (u16)0xb4;
sub_GAME_7F04BFD0(sp1C->unk10, 1); sub_GAME_7F04BFD0(sp1C->unk10, 1);
arg0->unk12 = (s16) (arg0->unk12 | 1); arg0->unk12 = (s16) (arg0->unk12 | 1);
@@ -23165,7 +23125,7 @@ glabel actor_drops_itemtype_setting_timer
/* 069270 7F034740 8FA3001C */ lw $v1, 0x1c($sp) /* 069270 7F034740 8FA3001C */ lw $v1, 0x1c($sp)
/* 069274 7F034744 8FB80020 */ lw $t8, 0x20($sp) /* 069274 7F034744 8FB80020 */ lw $t8, 0x20($sp)
/* 069278 7F034748 8C640010 */ lw $a0, 0x10($v1) /* 069278 7F034748 8C640010 */ lw $a0, 0x10($v1)
/* 06927C 7F03474C 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 06927C 7F03474C 0FC0E969 */ jal attachNewChild
/* 069280 7F034750 8F050018 */ lw $a1, 0x18($t8) /* 069280 7F034750 8F050018 */ lw $a1, 0x18($t8)
/* 069284 7F034754 8FA3001C */ lw $v1, 0x1c($sp) /* 069284 7F034754 8FA3001C */ lw $v1, 0x1c($sp)
/* 069288 7F034758 241900B4 */ li $t9, 180 /* 069288 7F034758 241900B4 */ li $t9, 180
+88 -71
View File
@@ -140,7 +140,7 @@ char dword_CODE_bss_80075C10[0x78];
char dword_CODE_bss_80075C88[0x78]; char dword_CODE_bss_80075C88[0x78];
//CODE.bss:80075D00 //CODE.bss:80075D00
void * ptr_setup_path_tbl; struct Pad * ptr_setup_path_tbl;
//CODE.bss:80075D04 //CODE.bss:80075D04
void * ptr_setup_path_link; void * ptr_setup_path_link;
//CODE.bss:80075D08 //CODE.bss:80075D08
@@ -4023,7 +4023,7 @@ action42_If_Current_Guard_On_Screen_In_Loaded_Room_RVL_2:
/* 06B0E0 7F0365B0 26310002 */ addiu $s1, $s1, 2 /* 06B0E0 7F0365B0 26310002 */ addiu $s1, $s1, 2
action43_If_Guard_In_A_Room_Currently_Loaded_RVL_2: action43_If_Guard_In_A_Room_Currently_Loaded_RVL_2:
/* 06B0E4 7F0365B4 8EEC0018 */ lw $t4, 0x18($s7) /* 06B0E4 7F0365B4 8EEC0018 */ lw $t4, 0x18($s7)
/* 06B0E8 7F0365B8 0FC2CBF6 */ jal sub_GAME_7F0B2FD8 /* 06B0E8 7F0365B8 0FC2CBF6 */ jal getTileRoom
/* 06B0EC 7F0365BC 8D840014 */ lw $a0, 0x14($t4) /* 06B0EC 7F0365BC 8D840014 */ lw $a0, 0x14($t4)
/* 06B0F0 7F0365C0 0FC2D794 */ jal sub_GAME_7F0B5E50 /* 06B0F0 7F0365C0 0FC2D794 */ jal sub_GAME_7F0B5E50
/* 06B0F4 7F0365C4 00402025 */ move $a0, $v0 /* 06B0F4 7F0365C4 00402025 */ move $a0, $v0
@@ -4227,7 +4227,7 @@ action4B_RVL_If_In_Proximity_Of_Bond_4:
/* 06B3BC 7F03688C 00000000 */ nop /* 06B3BC 7F03688C 00000000 */ nop
/* 06B3C0 7F036890 468042A0 */ cvt.s.w $f10, $f8 /* 06B3C0 7F036890 468042A0 */ cvt.s.w $f10, $f8
/* 06B3C4 7F036894 46185402 */ mul.s $f16, $f10, $f24 /* 06B3C4 7F036894 46185402 */ mul.s $f16, $f10, $f24
/* 06B3C8 7F036898 0FC0CB79 */ jal sub_GAME_7F032DE4 /* 06B3C8 7F036898 0FC0CB79 */ jal distToBond3D
/* 06B3CC 7F03689C E7B005FC */ swc1 $f16, 0x5fc($sp) /* 06B3CC 7F03689C E7B005FC */ swc1 $f16, 0x5fc($sp)
/* 06B3D0 7F0368A0 C7B205FC */ lwc1 $f18, 0x5fc($sp) /* 06B3D0 7F0368A0 C7B205FC */ lwc1 $f18, 0x5fc($sp)
/* 06B3D4 7F0368A4 02C02025 */ move $a0, $s6 /* 06B3D4 7F0368A4 02C02025 */ move $a0, $s6
@@ -4255,7 +4255,7 @@ action4C_RVL_If_Not_In_Proximity_Of_Bond_4:
/* 06B424 7F0368F4 00000000 */ nop /* 06B424 7F0368F4 00000000 */ nop
/* 06B428 7F0368F8 468021A0 */ cvt.s.w $f6, $f4 /* 06B428 7F0368F8 468021A0 */ cvt.s.w $f6, $f4
/* 06B42C 7F0368FC 46183202 */ mul.s $f8, $f6, $f24 /* 06B42C 7F0368FC 46183202 */ mul.s $f8, $f6, $f24
/* 06B430 7F036900 0FC0CB79 */ jal sub_GAME_7F032DE4 /* 06B430 7F036900 0FC0CB79 */ jal distToBond3D
/* 06B434 7F036904 E7A805F4 */ swc1 $f8, 0x5f4($sp) /* 06B434 7F036904 E7A805F4 */ swc1 $f8, 0x5f4($sp)
/* 06B438 7F036908 C7AA05F4 */ lwc1 $f10, 0x5f4($sp) /* 06B438 7F036908 C7AA05F4 */ lwc1 $f10, 0x5f4($sp)
/* 06B43C 7F03690C 02C02025 */ move $a0, $s6 /* 06B43C 7F03690C 02C02025 */ move $a0, $s6
@@ -4932,7 +4932,7 @@ action64_Type_16_Object_Equipped_On_Guard_3:
/* 06BDB4 7F037284 26520003 */ addiu $s2, $s2, 3 /* 06BDB4 7F037284 26520003 */ addiu $s2, $s2, 3
/* 06BDB8 7F037288 8E040010 */ lw $a0, 0x10($s0) /* 06BDB8 7F037288 8E040010 */ lw $a0, 0x10($s0)
.L7F03728C: .L7F03728C:
/* 06BDBC 7F03728C 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 06BDBC 7F03728C 0FC0E969 */ jal attachNewChild
/* 06BDC0 7F037290 8E650018 */ lw $a1, 0x18($s3) /* 06BDC0 7F037290 8E650018 */ lw $a1, 0x18($s3)
.L7F037294: .L7F037294:
/* 06BDC4 7F037294 26520003 */ addiu $s2, $s2, 3 /* 06BDC4 7F037294 26520003 */ addiu $s2, $s2, 3
@@ -4994,7 +4994,7 @@ action65_Object_Moved_To_Preset_4:
/* 06BE94 7F037364 C60A0010 */ lwc1 $f10, 0x10($s0) /* 06BE94 7F037364 C60A0010 */ lwc1 $f10, 0x10($s0)
/* 06BE98 7F037368 E7AA0020 */ swc1 $f10, 0x20($sp) /* 06BE98 7F037368 E7AA0020 */ swc1 $f10, 0x20($sp)
/* 06BE9C 7F03736C C6100014 */ lwc1 $f16, 0x14($s0) /* 06BE9C 7F03736C C6100014 */ lwc1 $f16, 0x14($s0)
/* 06BEA0 7F037370 0FC16642 */ jal sub_GAME_7F059908 /* 06BEA0 7F037370 0FC16642 */ jal matrix_4x4_7F059908
/* 06BEA4 7F037374 E7B00024 */ swc1 $f16, 0x24($sp) /* 06BEA4 7F037374 E7B00024 */ swc1 $f16, 0x24($sp)
/* 06BEA8 7F037378 8E620014 */ lw $v0, 0x14($s3) /* 06BEA8 7F037378 8E620014 */ lw $v0, 0x14($s3)
/* 06BEAC 7F03737C 27A504B8 */ addiu $a1, $sp, 0x4b8 /* 06BEAC 7F03737C 27A504B8 */ addiu $a1, $sp, 0x4b8
@@ -5881,7 +5881,7 @@ action8F_Set_Guard_Health_3:
/* 06CAF8 7F037FC8 468054A0 */ cvt.s.w $f18, $f10 /* 06CAF8 7F037FC8 468054A0 */ cvt.s.w $f18, $f10
/* 06CAFC 7F037FCC 46069002 */ mul.s $f0, $f18, $f6 /* 06CAFC 7F037FCC 46069002 */ mul.s $f0, $f18, $f6
/* 06CB00 7F037FD0 44050000 */ mfc1 $a1, $f0 /* 06CB00 7F037FD0 44050000 */ mfc1 $a1, $f0
/* 06CB04 7F037FD4 0FC08006 */ jal sub_GAME_7F020018 /* 06CB04 7F037FD4 0FC08006 */ jal chrSetMaxDamage
/* 06CB08 7F037FD8 00000000 */ nop /* 06CB08 7F037FD8 00000000 */ nop
/* 06CB0C 7F037FDC 26520003 */ addiu $s2, $s2, 3 /* 06CB0C 7F037FDC 26520003 */ addiu $s2, $s2, 3
/* 06CB10 7F037FE0 1000F56A */ b GetByteS1_ParseCommandByte_SwitchCase /* 06CB10 7F037FE0 1000F56A */ b GetByteS1_ParseCommandByte_SwitchCase
@@ -5898,7 +5898,7 @@ action90_Set_Guard_Armor_Amount_3:
/* 06CB38 7F038008 46808220 */ cvt.s.w $f8, $f16 /* 06CB38 7F038008 46808220 */ cvt.s.w $f8, $f16
/* 06CB3C 7F03800C 46044002 */ mul.s $f0, $f8, $f4 /* 06CB3C 7F03800C 46044002 */ mul.s $f0, $f8, $f4
/* 06CB40 7F038010 44050000 */ mfc1 $a1, $f0 /* 06CB40 7F038010 44050000 */ mfc1 $a1, $f0
/* 06CB44 7F038014 0FC08015 */ jal sub_GAME_7F020054 /* 06CB44 7F038014 0FC08015 */ jal chrAddHealth
/* 06CB48 7F038018 00000000 */ nop /* 06CB48 7F038018 00000000 */ nop
/* 06CB4C 7F03801C 26520003 */ addiu $s2, $s2, 3 /* 06CB4C 7F03801C 26520003 */ addiu $s2, $s2, 3
/* 06CB50 7F038020 1000F55A */ b GetByteS1_ParseCommandByte_SwitchCase /* 06CB50 7F038020 1000F55A */ b GetByteS1_ParseCommandByte_SwitchCase
@@ -7560,7 +7560,7 @@ actionD9_GuardIDMovedToPresetReturnLoopIfSuccessful_5:
/* 06E2EC 7F0397BC 1040005E */ beqz $v0, .L7F039938 /* 06E2EC 7F0397BC 1040005E */ beqz $v0, .L7F039938
/* 06E2F0 7F0397C0 00408025 */ move $s0, $v0 /* 06E2F0 7F0397C0 00408025 */ move $s0, $v0
/* 06E2F4 7F0397C4 02E02025 */ move $a0, $s7 /* 06E2F4 7F0397C4 02E02025 */ move $a0, $s7
/* 06E2F8 7F0397C8 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 06E2F8 7F0397C8 0FC0CBE5 */ jal convertPadIf9000
/* 06E2FC 7F0397CC 02602825 */ move $a1, $s3 /* 06E2FC 7F0397CC 02602825 */ move $a1, $s3
/* 06E300 7F0397D0 28412710 */ slti $at, $v0, 0x2710 /* 06E300 7F0397D0 28412710 */ slti $at, $v0, 0x2710
/* 06E304 7F0397D4 1020000A */ beqz $at, .L7F039800 /* 06E304 7F0397D4 1020000A */ beqz $at, .L7F039800
@@ -7676,11 +7676,11 @@ actionDA_Fade_Out_From_Cut_Scene_1:
/* 06E4A4 7F039974 11A10008 */ beq $t5, $at, .L7F039998 /* 06E4A4 7F039974 11A10008 */ beq $t5, $at, .L7F039998
/* 06E4A8 7F039978 00002825 */ move $a1, $zero /* 06E4A8 7F039978 00002825 */ move $a1, $zero
/* 06E4AC 7F03997C 4407A000 */ mfc1 $a3, $f20 /* 06E4AC 7F03997C 4407A000 */ mfc1 $a3, $f20
/* 06E4B0 7F039980 0FC201EC */ jal set_rgba_tint /* 06E4B0 7F039980 0FC201EC */ jal currentPlayerSetFadeColour
/* 06E4B4 7F039984 00003025 */ move $a2, $zero /* 06E4B4 7F039984 00003025 */ move $a2, $zero
/* 06E4B8 7F039988 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 06E4B8 7F039988 3C013F80 */ li $at, 0x3F800000 # 1.000000
/* 06E4BC 7F03998C 44817000 */ mtc1 $at, $f14 /* 06E4BC 7F03998C 44817000 */ mtc1 $at, $f14
/* 06E4C0 7F039990 0FC20216 */ jal fade_to_over_seconds /* 06E4C0 7F039990 0FC20216 */ jal currentPlayerSetFadeFrac
/* 06E4C4 7F039994 4600B306 */ mov.s $f12, $f22 /* 06E4C4 7F039994 4600B306 */ mov.s $f12, $f22
.L7F039998: .L7F039998:
/* 06E4C8 7F039998 26520001 */ addiu $s2, $s2, 1 /* 06E4C8 7F039998 26520001 */ addiu $s2, $s2, 1
@@ -7694,10 +7694,10 @@ actionDB_Fade_In_From_Black_Reset_DA_1:
/* 06E4E4 7F0399B4 11C10007 */ beq $t6, $at, .L7F0399D4 /* 06E4E4 7F0399B4 11C10007 */ beq $t6, $at, .L7F0399D4
/* 06E4E8 7F0399B8 00002825 */ move $a1, $zero /* 06E4E8 7F0399B8 00002825 */ move $a1, $zero
/* 06E4EC 7F0399BC 00003025 */ move $a2, $zero /* 06E4EC 7F0399BC 00003025 */ move $a2, $zero
/* 06E4F0 7F0399C0 0FC201EC */ jal set_rgba_tint /* 06E4F0 7F0399C0 0FC201EC */ jal currentPlayerSetFadeColour
/* 06E4F4 7F0399C4 3C073F80 */ li $a3, 0x3F800000 # 1.000000 /* 06E4F4 7F0399C4 3C073F80 */ li $a3, 0x3F800000 # 1.000000
/* 06E4F8 7F0399C8 4600B306 */ mov.s $f12, $f22 /* 06E4F8 7F0399C8 4600B306 */ mov.s $f12, $f22
/* 06E4FC 7F0399CC 0FC20216 */ jal fade_to_over_seconds /* 06E4FC 7F0399CC 0FC20216 */ jal currentPlayerSetFadeFrac
/* 06E500 7F0399D0 4600A386 */ mov.s $f14, $f20 /* 06E500 7F0399D0 4600A386 */ mov.s $f14, $f20
.L7F0399D4: .L7F0399D4:
/* 06E504 7F0399D4 26520001 */ addiu $s2, $s2, 1 /* 06E504 7F0399D4 26520001 */ addiu $s2, $s2, 1
@@ -7812,7 +7812,7 @@ actionE0_Guard_ID_Draws_Weapon_num_3:
/* 06E680 7F039B50 1000EE8E */ b GetByteS1_ParseCommandByte_SwitchCase /* 06E680 7F039B50 1000EE8E */ b GetByteS1_ParseCommandByte_SwitchCase
/* 06E684 7F039B54 26310003 */ addiu $s1, $s1, 3 /* 06E684 7F039B54 26310003 */ addiu $s1, $s1, 3
actionE1_If_Fewer_than_This_Many_Players_Playing_RVL_3: actionE1_If_Fewer_than_This_Many_Players_Playing_RVL_3:
/* 06E688 7F039B58 0FC26919 */ jal get_num_players /* 06E688 7F039B58 0FC26919 */ jal getPlayerCount
/* 06E68C 7F039B5C 00000000 */ nop /* 06E68C 7F039B5C 00000000 */ nop
/* 06E690 7F039B60 822A0001 */ lb $t2, 1($s1) /* 06E690 7F039B60 822A0001 */ lb $t2, 1($s1)
/* 06E694 7F039B64 02C02025 */ move $a0, $s6 /* 06E694 7F039B64 02C02025 */ move $a0, $s6
@@ -9890,7 +9890,7 @@ action42_If_Current_Guard_On_Screen_In_Loaded_Room_RVL_2:
/* 06B0E0 7F0365B0 26310002 */ addiu $s1, $s1, 2 /* 06B0E0 7F0365B0 26310002 */ addiu $s1, $s1, 2
action43_If_Guard_In_A_Room_Currently_Loaded_RVL_2: action43_If_Guard_In_A_Room_Currently_Loaded_RVL_2:
/* 06B0E4 7F0365B4 8EEC0018 */ lw $t4, 0x18($s7) /* 06B0E4 7F0365B4 8EEC0018 */ lw $t4, 0x18($s7)
/* 06B0E8 7F0365B8 0FC2CBF6 */ jal sub_GAME_7F0B2FD8 /* 06B0E8 7F0365B8 0FC2CBF6 */ jal getTileRoom
/* 06B0EC 7F0365BC 8D840014 */ lw $a0, 0x14($t4) /* 06B0EC 7F0365BC 8D840014 */ lw $a0, 0x14($t4)
/* 06B0F0 7F0365C0 0FC2D794 */ jal sub_GAME_7F0B5E50 /* 06B0F0 7F0365C0 0FC2D794 */ jal sub_GAME_7F0B5E50
/* 06B0F4 7F0365C4 00402025 */ move $a0, $v0 /* 06B0F4 7F0365C4 00402025 */ move $a0, $v0
@@ -10094,7 +10094,7 @@ action4B_RVL_If_In_Proximity_Of_Bond_4:
/* 06B3BC 7F03688C 00000000 */ nop /* 06B3BC 7F03688C 00000000 */ nop
/* 06B3C0 7F036890 468042A0 */ cvt.s.w $f10, $f8 /* 06B3C0 7F036890 468042A0 */ cvt.s.w $f10, $f8
/* 06B3C4 7F036894 46185402 */ mul.s $f16, $f10, $f24 /* 06B3C4 7F036894 46185402 */ mul.s $f16, $f10, $f24
/* 06B3C8 7F036898 0FC0CB79 */ jal sub_GAME_7F032DE4 /* 06B3C8 7F036898 0FC0CB79 */ jal distToBond3D
/* 06B3CC 7F03689C E7B005FC */ swc1 $f16, 0x5fc($sp) /* 06B3CC 7F03689C E7B005FC */ swc1 $f16, 0x5fc($sp)
/* 06B3D0 7F0368A0 C7B205FC */ lwc1 $f18, 0x5fc($sp) /* 06B3D0 7F0368A0 C7B205FC */ lwc1 $f18, 0x5fc($sp)
/* 06B3D4 7F0368A4 02C02025 */ move $a0, $s6 /* 06B3D4 7F0368A4 02C02025 */ move $a0, $s6
@@ -10122,7 +10122,7 @@ action4C_RVL_If_Not_In_Proximity_Of_Bond_4:
/* 06B424 7F0368F4 00000000 */ nop /* 06B424 7F0368F4 00000000 */ nop
/* 06B428 7F0368F8 468021A0 */ cvt.s.w $f6, $f4 /* 06B428 7F0368F8 468021A0 */ cvt.s.w $f6, $f4
/* 06B42C 7F0368FC 46183202 */ mul.s $f8, $f6, $f24 /* 06B42C 7F0368FC 46183202 */ mul.s $f8, $f6, $f24
/* 06B430 7F036900 0FC0CB79 */ jal sub_GAME_7F032DE4 /* 06B430 7F036900 0FC0CB79 */ jal distToBond3D
/* 06B434 7F036904 E7A805F4 */ swc1 $f8, 0x5f4($sp) /* 06B434 7F036904 E7A805F4 */ swc1 $f8, 0x5f4($sp)
/* 06B438 7F036908 C7AA05F4 */ lwc1 $f10, 0x5f4($sp) /* 06B438 7F036908 C7AA05F4 */ lwc1 $f10, 0x5f4($sp)
/* 06B43C 7F03690C 02C02025 */ move $a0, $s6 /* 06B43C 7F03690C 02C02025 */ move $a0, $s6
@@ -10799,7 +10799,7 @@ action64_Type_16_Object_Equipped_On_Guard_3:
/* 06BDB4 7F037284 26520003 */ addiu $s2, $s2, 3 /* 06BDB4 7F037284 26520003 */ addiu $s2, $s2, 3
/* 06BDB8 7F037288 8E040010 */ lw $a0, 0x10($s0) /* 06BDB8 7F037288 8E040010 */ lw $a0, 0x10($s0)
.L7F03728C: .L7F03728C:
/* 06BDBC 7F03728C 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 06BDBC 7F03728C 0FC0E969 */ jal attachNewChild
/* 06BDC0 7F037290 8E650018 */ lw $a1, 0x18($s3) /* 06BDC0 7F037290 8E650018 */ lw $a1, 0x18($s3)
.L7F037294: .L7F037294:
/* 06BDC4 7F037294 26520003 */ addiu $s2, $s2, 3 /* 06BDC4 7F037294 26520003 */ addiu $s2, $s2, 3
@@ -10861,7 +10861,7 @@ action65_Object_Moved_To_Preset_4:
/* 06BE94 7F037364 C60A0010 */ lwc1 $f10, 0x10($s0) /* 06BE94 7F037364 C60A0010 */ lwc1 $f10, 0x10($s0)
/* 06BE98 7F037368 E7AA0020 */ swc1 $f10, 0x20($sp) /* 06BE98 7F037368 E7AA0020 */ swc1 $f10, 0x20($sp)
/* 06BE9C 7F03736C C6100014 */ lwc1 $f16, 0x14($s0) /* 06BE9C 7F03736C C6100014 */ lwc1 $f16, 0x14($s0)
/* 06BEA0 7F037370 0FC16642 */ jal sub_GAME_7F059908 /* 06BEA0 7F037370 0FC16642 */ jal matrix_4x4_7F059908
/* 06BEA4 7F037374 E7B00024 */ swc1 $f16, 0x24($sp) /* 06BEA4 7F037374 E7B00024 */ swc1 $f16, 0x24($sp)
/* 06BEA8 7F037378 8E620014 */ lw $v0, 0x14($s3) /* 06BEA8 7F037378 8E620014 */ lw $v0, 0x14($s3)
/* 06BEAC 7F03737C 27A504B8 */ addiu $a1, $sp, 0x4b8 /* 06BEAC 7F03737C 27A504B8 */ addiu $a1, $sp, 0x4b8
@@ -11748,7 +11748,7 @@ action8F_Set_Guard_Health_3:
/* 06CAF8 7F037FC8 468054A0 */ cvt.s.w $f18, $f10 /* 06CAF8 7F037FC8 468054A0 */ cvt.s.w $f18, $f10
/* 06CAFC 7F037FCC 46069002 */ mul.s $f0, $f18, $f6 /* 06CAFC 7F037FCC 46069002 */ mul.s $f0, $f18, $f6
/* 06CB00 7F037FD0 44050000 */ mfc1 $a1, $f0 /* 06CB00 7F037FD0 44050000 */ mfc1 $a1, $f0
/* 06CB04 7F037FD4 0FC08006 */ jal sub_GAME_7F020018 /* 06CB04 7F037FD4 0FC08006 */ jal chrSetMaxDamage
/* 06CB08 7F037FD8 00000000 */ nop /* 06CB08 7F037FD8 00000000 */ nop
/* 06CB0C 7F037FDC 26520003 */ addiu $s2, $s2, 3 /* 06CB0C 7F037FDC 26520003 */ addiu $s2, $s2, 3
/* 06CB10 7F037FE0 1000F56A */ b GetByteS1_ParseCommandByte_SwitchCase /* 06CB10 7F037FE0 1000F56A */ b GetByteS1_ParseCommandByte_SwitchCase
@@ -11765,7 +11765,7 @@ action90_Set_Guard_Armor_Amount_3:
/* 06CB38 7F038008 46808220 */ cvt.s.w $f8, $f16 /* 06CB38 7F038008 46808220 */ cvt.s.w $f8, $f16
/* 06CB3C 7F03800C 46044002 */ mul.s $f0, $f8, $f4 /* 06CB3C 7F03800C 46044002 */ mul.s $f0, $f8, $f4
/* 06CB40 7F038010 44050000 */ mfc1 $a1, $f0 /* 06CB40 7F038010 44050000 */ mfc1 $a1, $f0
/* 06CB44 7F038014 0FC08015 */ jal sub_GAME_7F020054 /* 06CB44 7F038014 0FC08015 */ jal chrAddHealth
/* 06CB48 7F038018 00000000 */ nop /* 06CB48 7F038018 00000000 */ nop
/* 06CB4C 7F03801C 26520003 */ addiu $s2, $s2, 3 /* 06CB4C 7F03801C 26520003 */ addiu $s2, $s2, 3
/* 06CB50 7F038020 1000F55A */ b GetByteS1_ParseCommandByte_SwitchCase /* 06CB50 7F038020 1000F55A */ b GetByteS1_ParseCommandByte_SwitchCase
@@ -13427,7 +13427,7 @@ actionD9_GuardIDMovedToPresetReturnLoopIfSuccessful_5:
/* 06E2EC 7F0397BC 1040005E */ beqz $v0, .L7F039938 /* 06E2EC 7F0397BC 1040005E */ beqz $v0, .L7F039938
/* 06E2F0 7F0397C0 00408025 */ move $s0, $v0 /* 06E2F0 7F0397C0 00408025 */ move $s0, $v0
/* 06E2F4 7F0397C4 02E02025 */ move $a0, $s7 /* 06E2F4 7F0397C4 02E02025 */ move $a0, $s7
/* 06E2F8 7F0397C8 0FC0CBE5 */ jal sub_GAME_7F032F94 /* 06E2F8 7F0397C8 0FC0CBE5 */ jal convertPadIf9000
/* 06E2FC 7F0397CC 02602825 */ move $a1, $s3 /* 06E2FC 7F0397CC 02602825 */ move $a1, $s3
/* 06E300 7F0397D0 28412710 */ slti $at, $v0, 0x2710 /* 06E300 7F0397D0 28412710 */ slti $at, $v0, 0x2710
/* 06E304 7F0397D4 1020000A */ beqz $at, .L7F039800 /* 06E304 7F0397D4 1020000A */ beqz $at, .L7F039800
@@ -13543,11 +13543,11 @@ actionDA_Fade_Out_From_Cut_Scene_1:
/* 06E4A4 7F039974 11A10008 */ beq $t5, $at, .L7F039998 /* 06E4A4 7F039974 11A10008 */ beq $t5, $at, .L7F039998
/* 06E4A8 7F039978 00002825 */ move $a1, $zero /* 06E4A8 7F039978 00002825 */ move $a1, $zero
/* 06E4AC 7F03997C 4407A000 */ mfc1 $a3, $f20 /* 06E4AC 7F03997C 4407A000 */ mfc1 $a3, $f20
/* 06E4B0 7F039980 0FC201EC */ jal set_rgba_tint /* 06E4B0 7F039980 0FC201EC */ jal currentPlayerSetFadeColour
/* 06E4B4 7F039984 00003025 */ move $a2, $zero /* 06E4B4 7F039984 00003025 */ move $a2, $zero
/* 06E4B8 7F039988 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 06E4B8 7F039988 3C013F80 */ li $at, 0x3F800000 # 1.000000
/* 06E4BC 7F03998C 44817000 */ mtc1 $at, $f14 /* 06E4BC 7F03998C 44817000 */ mtc1 $at, $f14
/* 06E4C0 7F039990 0FC20216 */ jal fade_to_over_seconds /* 06E4C0 7F039990 0FC20216 */ jal currentPlayerSetFadeFrac
/* 06E4C4 7F039994 4600B306 */ mov.s $f12, $f22 /* 06E4C4 7F039994 4600B306 */ mov.s $f12, $f22
.L7F039998: .L7F039998:
/* 06E4C8 7F039998 26520001 */ addiu $s2, $s2, 1 /* 06E4C8 7F039998 26520001 */ addiu $s2, $s2, 1
@@ -13561,10 +13561,10 @@ actionDB_Fade_In_From_Black_Reset_DA_1:
/* 06E4E4 7F0399B4 11C10007 */ beq $t6, $at, .L7F0399D4 /* 06E4E4 7F0399B4 11C10007 */ beq $t6, $at, .L7F0399D4
/* 06E4E8 7F0399B8 00002825 */ move $a1, $zero /* 06E4E8 7F0399B8 00002825 */ move $a1, $zero
/* 06E4EC 7F0399BC 00003025 */ move $a2, $zero /* 06E4EC 7F0399BC 00003025 */ move $a2, $zero
/* 06E4F0 7F0399C0 0FC201EC */ jal set_rgba_tint /* 06E4F0 7F0399C0 0FC201EC */ jal currentPlayerSetFadeColour
/* 06E4F4 7F0399C4 3C073F80 */ li $a3, 0x3F800000 # 1.000000 /* 06E4F4 7F0399C4 3C073F80 */ li $a3, 0x3F800000 # 1.000000
/* 06E4F8 7F0399C8 4600B306 */ mov.s $f12, $f22 /* 06E4F8 7F0399C8 4600B306 */ mov.s $f12, $f22
/* 06E4FC 7F0399CC 0FC20216 */ jal fade_to_over_seconds /* 06E4FC 7F0399CC 0FC20216 */ jal currentPlayerSetFadeFrac
/* 06E500 7F0399D0 4600A386 */ mov.s $f14, $f20 /* 06E500 7F0399D0 4600A386 */ mov.s $f14, $f20
.L7F0399D4: .L7F0399D4:
/* 06E504 7F0399D4 26520001 */ addiu $s2, $s2, 1 /* 06E504 7F0399D4 26520001 */ addiu $s2, $s2, 1
@@ -13679,7 +13679,7 @@ actionE0_Guard_ID_Draws_Weapon_num_3:
/* 06E680 7F039B50 1000EE8E */ b GetByteS1_ParseCommandByte_SwitchCase /* 06E680 7F039B50 1000EE8E */ b GetByteS1_ParseCommandByte_SwitchCase
/* 06E684 7F039B54 26310003 */ addiu $s1, $s1, 3 /* 06E684 7F039B54 26310003 */ addiu $s1, $s1, 3
actionE1_If_Fewer_than_This_Many_Players_Playing_RVL_3: actionE1_If_Fewer_than_This_Many_Players_Playing_RVL_3:
/* 06E688 7F039B58 0FC26919 */ jal get_num_players /* 06E688 7F039B58 0FC26919 */ jal getPlayerCount
/* 06E68C 7F039B5C 00000000 */ nop /* 06E68C 7F039B5C 00000000 */ nop
/* 06E690 7F039B60 822A0001 */ lb $t2, 1($s1) /* 06E690 7F039B60 822A0001 */ lb $t2, 1($s1)
/* 06E694 7F039B64 02C02025 */ move $a0, $s6 /* 06E694 7F039B64 02C02025 */ move $a0, $s6
@@ -14540,28 +14540,22 @@ glabel sub_GAME_7F03A538
#ifdef NONMATCHING void attachNewChild(struct prop *newChild,struct prop *host)
void sub_GAME_7F03A5A4(void) { {
newChild->host = host;
// Link the newChild into its siblings
if (host->child) {
host->child->prevSibling = newChild;
}
newChild->nextSibling = host->child;
newChild->prevSibling = 0x0;
newChild->standTile = 0x0;
host->child = newChild;
return;
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F03A5A4
/* 06F0D4 7F03A5A4 AC85001C */ sw $a1, 0x1c($a0)
/* 06F0D8 7F03A5A8 8CA20020 */ lw $v0, 0x20($a1)
/* 06F0DC 7F03A5AC 50400004 */ beql $v0, $zero, .L7F03A5C0
/* 06F0E0 7F03A5B0 AC820024 */ sw $v0, 0x24($a0)
/* 06F0E4 7F03A5B4 AC440028 */ sw $a0, 0x28($v0)
/* 06F0E8 7F03A5B8 8CA20020 */ lw $v0, 0x20($a1)
/* 06F0EC 7F03A5BC AC820024 */ sw $v0, 0x24($a0)
.L7F03A5C0:
/* 06F0F0 7F03A5C0 AC800028 */ sw $zero, 0x28($a0)
/* 06F0F4 7F03A5C4 AC800014 */ sw $zero, 0x14($a0)
/* 06F0F8 7F03A5C8 03E00008 */ jr $ra
/* 06F0FC 7F03A5CC ACA40020 */ sw $a0, 0x20($a1)
)
#endif
@@ -15549,7 +15543,7 @@ glabel sub_GAME_7F03B15C
/* 06FD54 7F03B224 C7AA019C */ lwc1 $f10, 0x19c($sp) /* 06FD54 7F03B224 C7AA019C */ lwc1 $f10, 0x19c($sp)
/* 06FD58 7F03B228 E7A601B0 */ swc1 $f6, 0x1b0($sp) /* 06FD58 7F03B228 E7A601B0 */ swc1 $f6, 0x1b0($sp)
/* 06FD5C 7F03B22C E7A801B4 */ swc1 $f8, 0x1b4($sp) /* 06FD5C 7F03B22C E7A801B4 */ swc1 $f8, 0x1b4($sp)
/* 06FD60 7F03B230 0FC1E111 */ jal sub_GAME_7F078444 /* 06FD60 7F03B230 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 06FD64 7F03B234 E7AA01B8 */ swc1 $f10, 0x1b8($sp) /* 06FD64 7F03B234 E7AA01B8 */ swc1 $f10, 0x1b8($sp)
/* 06FD68 7F03B238 00402025 */ move $a0, $v0 /* 06FD68 7F03B238 00402025 */ move $a0, $v0
/* 06FD6C 7F03B23C 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 06FD6C 7F03B23C 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -15559,7 +15553,7 @@ glabel sub_GAME_7F03B15C
/* 06FD7C 7F03B24C C7A401A8 */ lwc1 $f4, 0x1a8($sp) /* 06FD7C 7F03B24C C7A401A8 */ lwc1 $f4, 0x1a8($sp)
/* 06FD80 7F03B250 E7B001BC */ swc1 $f16, 0x1bc($sp) /* 06FD80 7F03B250 E7B001BC */ swc1 $f16, 0x1bc($sp)
/* 06FD84 7F03B254 E7B201C0 */ swc1 $f18, 0x1c0($sp) /* 06FD84 7F03B254 E7B201C0 */ swc1 $f18, 0x1c0($sp)
/* 06FD88 7F03B258 0FC1E111 */ jal sub_GAME_7F078444 /* 06FD88 7F03B258 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 06FD8C 7F03B25C E7A401C4 */ swc1 $f4, 0x1c4($sp) /* 06FD8C 7F03B25C E7A401C4 */ swc1 $f4, 0x1c4($sp)
/* 06FD90 7F03B260 00402025 */ move $a0, $v0 /* 06FD90 7F03B260 00402025 */ move $a0, $v0
/* 06FD94 7F03B264 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 06FD94 7F03B264 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -15645,7 +15639,7 @@ glabel sub_GAME_7F03B15C
/* 06FECC 7F03B39C C6080008 */ lwc1 $f8, 8($s0) /* 06FECC 7F03B39C C6080008 */ lwc1 $f8, 8($s0)
/* 06FED0 7F03B3A0 AFA4055C */ sw $a0, 0x55c($sp) /* 06FED0 7F03B3A0 AFA4055C */ sw $a0, 0x55c($sp)
/* 06FED4 7F03B3A4 46004402 */ mul.s $f16, $f8, $f0 /* 06FED4 7F03B3A4 46004402 */ mul.s $f16, $f8, $f0
/* 06FED8 7F03B3A8 0FC2CBF6 */ jal sub_GAME_7F0B2FD8 /* 06FED8 7F03B3A8 0FC2CBF6 */ jal getTileRoom
/* 06FEDC 7F03B3AC E7B00084 */ swc1 $f16, 0x84($sp) /* 06FEDC 7F03B3AC E7B00084 */ swc1 $f16, 0x84($sp)
/* 06FEE0 7F03B3B0 00408825 */ move $s1, $v0 /* 06FEE0 7F03B3B0 00408825 */ move $s1, $v0
/* 06FEE4 7F03B3B4 27A2018C */ addiu $v0, $sp, 0x18c /* 06FEE4 7F03B3B4 27A2018C */ addiu $v0, $sp, 0x18c
@@ -15678,7 +15672,7 @@ glabel sub_GAME_7F03B15C
/* 06FF48 7F03B418 00000000 */ nop /* 06FF48 7F03B418 00000000 */ nop
/* 06FF4C 7F03B41C 0FC225E6 */ jal get_curplayer_positiondata /* 06FF4C 7F03B41C 0FC225E6 */ jal get_curplayer_positiondata
/* 06FF50 7F03B420 00000000 */ nop /* 06FF50 7F03B420 00000000 */ nop
/* 06FF54 7F03B424 0FC2CBF6 */ jal sub_GAME_7F0B2FD8 /* 06FF54 7F03B424 0FC2CBF6 */ jal getTileRoom
/* 06FF58 7F03B428 8C440014 */ lw $a0, 0x14($v0) /* 06FF58 7F03B428 8C440014 */ lw $a0, 0x14($v0)
/* 06FF5C 7F03B42C 27AC007C */ addiu $t4, $sp, 0x7c /* 06FF5C 7F03B42C 27AC007C */ addiu $t4, $sp, 0x7c
/* 06FF60 7F03B430 27AD008C */ addiu $t5, $sp, 0x8c /* 06FF60 7F03B430 27AD008C */ addiu $t5, $sp, 0x8c
@@ -15696,7 +15690,7 @@ glabel sub_GAME_7F03B15C
.L7F03B460: .L7F03B460:
/* 06FF90 7F03B460 0FC225E6 */ jal get_curplayer_positiondata /* 06FF90 7F03B460 0FC225E6 */ jal get_curplayer_positiondata
/* 06FF94 7F03B464 00000000 */ nop /* 06FF94 7F03B464 00000000 */ nop
/* 06FF98 7F03B468 0FC2CBF6 */ jal sub_GAME_7F0B2FD8 /* 06FF98 7F03B468 0FC2CBF6 */ jal getTileRoom
/* 06FF9C 7F03B46C 8C440014 */ lw $a0, 0x14($v0) /* 06FF9C 7F03B46C 8C440014 */ lw $a0, 0x14($v0)
/* 06FFA0 7F03B470 27AF007C */ addiu $t7, $sp, 0x7c /* 06FFA0 7F03B470 27AF007C */ addiu $t7, $sp, 0x7c
/* 06FFA4 7F03B474 27B8008C */ addiu $t8, $sp, 0x8c /* 06FFA4 7F03B474 27B8008C */ addiu $t8, $sp, 0x8c
@@ -15774,7 +15768,7 @@ glabel sub_GAME_7F03B15C
/* 0700B0 7F03B580 5300000B */ beql $t8, $zero, .L7F03B5B0 /* 0700B0 7F03B580 5300000B */ beql $t8, $zero, .L7F03B5B0
/* 0700B4 7F03B584 8FB901AC */ lw $t9, 0x1ac($sp) /* 0700B4 7F03B584 8FB901AC */ lw $t9, 0x1ac($sp)
.L7F03B588: .L7F03B588:
/* 0700B8 7F03B588 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 0700B8 7F03B588 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 0700BC 7F03B58C 00000000 */ nop /* 0700BC 7F03B58C 00000000 */ nop
/* 0700C0 7F03B590 00402025 */ move $a0, $v0 /* 0700C0 7F03B590 00402025 */ move $a0, $v0
/* 0700C4 7F03B594 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 0700C4 7F03B594 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -16528,7 +16522,7 @@ glabel sub_GAME_7F03BDEC
/* 070B14 7F03BFE4 8E090014 */ lw $t1, 0x14($s0) /* 070B14 7F03BFE4 8E090014 */ lw $t1, 0x14($s0)
/* 070B18 7F03BFE8 15090024 */ bne $t0, $t1, .L7F03C07C /* 070B18 7F03BFE8 15090024 */ bne $t0, $t1, .L7F03C07C
/* 070B1C 7F03BFEC 00000000 */ nop /* 070B1C 7F03BFEC 00000000 */ nop
/* 070B20 7F03BFF0 0FC1E67C */ jal sub_GAME_7F0799F0 /* 070B20 7F03BFF0 0FC1E67C */ jal currentPlayerGetCrouchPos
/* 070B24 7F03BFF4 2411000F */ li $s1, 15 /* 070B24 7F03BFF4 2411000F */ li $s1, 15
/* 070B28 7F03BFF8 24010001 */ li $at, 1 /* 070B28 7F03BFF8 24010001 */ li $at, 1
/* 070B2C 7F03BFFC 14410003 */ bne $v0, $at, .L7F03C00C /* 070B2C 7F03BFFC 14410003 */ bne $v0, $at, .L7F03C00C
@@ -16536,7 +16530,7 @@ glabel sub_GAME_7F03BDEC
/* 070B34 7F03C004 10000006 */ b .L7F03C020 /* 070B34 7F03C004 10000006 */ b .L7F03C020
/* 070B38 7F03C008 241100C8 */ li $s1, 200 /* 070B38 7F03C008 241100C8 */ li $s1, 200
.L7F03C00C: .L7F03C00C:
/* 070B3C 7F03C00C 0FC1E67C */ jal sub_GAME_7F0799F0 /* 070B3C 7F03C00C 0FC1E67C */ jal currentPlayerGetCrouchPos
/* 070B40 7F03C010 00000000 */ nop /* 070B40 7F03C010 00000000 */ nop
/* 070B44 7F03C014 54400003 */ bnezl $v0, .L7F03C024 /* 070B44 7F03C014 54400003 */ bnezl $v0, .L7F03C024
/* 070B48 7F03C018 27A40084 */ addiu $a0, $sp, 0x84 /* 070B48 7F03C018 27A40084 */ addiu $a0, $sp, 0x84
@@ -16547,7 +16541,7 @@ glabel sub_GAME_7F03BDEC
/* 070B54 7F03C024 02A02825 */ move $a1, $s5 /* 070B54 7F03C024 02A02825 */ move $a1, $s5
/* 070B58 7F03C028 0FC1A073 */ jal sub_GAME_7F0681CC /* 070B58 7F03C028 0FC1A073 */ jal sub_GAME_7F0681CC
/* 070B5C 7F03C02C 8FA600C8 */ lw $a2, 0xc8($sp) /* 070B5C 7F03C02C 8FA600C8 */ lw $a2, 0xc8($sp)
/* 070B60 7F03C030 0FC1E111 */ jal sub_GAME_7F078444 /* 070B60 7F03C030 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 070B64 7F03C034 00000000 */ nop /* 070B64 7F03C034 00000000 */ nop
/* 070B68 7F03C038 00402025 */ move $a0, $v0 /* 070B68 7F03C038 00402025 */ move $a0, $v0
/* 070B6C 7F03C03C 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 070B6C 7F03C03C 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -16847,7 +16841,7 @@ glabel sub_GAME_7F03C2BC
/* 070F04 7F03C3D4 0FC225E6 */ jal get_curplayer_positiondata /* 070F04 7F03C3D4 0FC225E6 */ jal get_curplayer_positiondata
/* 070F08 7F03C3D8 00000000 */ nop /* 070F08 7F03C3D8 00000000 */ nop
/* 070F0C 7F03C3DC 02002025 */ move $a0, $s0 /* 070F0C 7F03C3DC 02002025 */ move $a0, $s0
/* 070F10 7F03C3E0 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 070F10 7F03C3E0 0FC0E969 */ jal attachNewChild
/* 070F14 7F03C3E4 00402825 */ move $a1, $v0 /* 070F14 7F03C3E4 00402825 */ move $a1, $v0
/* 070F18 7F03C3E8 8FBF001C */ lw $ra, 0x1c($sp) /* 070F18 7F03C3E8 8FBF001C */ lw $ra, 0x1c($sp)
.L7F03C3EC: .L7F03C3EC:
@@ -17025,7 +17019,7 @@ glabel sub_GAME_7F03C574
/* 0710B4 7F03C584 AFB30028 */ sw $s3, 0x28($sp) /* 0710B4 7F03C584 AFB30028 */ sw $s3, 0x28($sp)
/* 0710B8 7F03C588 AFB10020 */ sw $s1, 0x20($sp) /* 0710B8 7F03C588 AFB10020 */ sw $s1, 0x20($sp)
/* 0710BC 7F03C58C AFB0001C */ sw $s0, 0x1c($sp) /* 0710BC 7F03C58C AFB0001C */ sw $s0, 0x1c($sp)
/* 0710C0 7F03C590 0FC26919 */ jal get_num_players /* 0710C0 7F03C590 0FC26919 */ jal getPlayerCount
/* 0710C4 7F03C594 F7B40010 */ sdc1 $f20, 0x10($sp) /* 0710C4 7F03C594 F7B40010 */ sdc1 $f20, 0x10($sp)
/* 0710C8 7F03C598 240E0001 */ li $t6, 1 /* 0710C8 7F03C598 240E0001 */ li $t6, 1
/* 0710CC 7F03C59C 00409825 */ move $s3, $v0 /* 0710CC 7F03C59C 00409825 */ move $s3, $v0
@@ -17033,9 +17027,9 @@ glabel sub_GAME_7F03C574
/* 0710D4 7F03C5A4 1840001F */ blez $v0, .L7F03C624 /* 0710D4 7F03C5A4 1840001F */ blez $v0, .L7F03C624
/* 0710D8 7F03C5A8 00008025 */ move $s0, $zero /* 0710D8 7F03C5A8 00008025 */ move $s0, $zero
/* 0710DC 7F03C5AC 3C0143C8 */ li $at, 0x43C80000 # 400.000000 /* 0710DC 7F03C5AC 3C0143C8 */ li $at, 0x43C80000 # 400.000000
/* 0710E0 7F03C5B0 3C118008 */ lui $s1, %hi(ptr_BONDdata_p1) /* 0710E0 7F03C5B0 3C118008 */ lui $s1, %hi(players)
/* 0710E4 7F03C5B4 4481A000 */ mtc1 $at, $f20 /* 0710E4 7F03C5B4 4481A000 */ mtc1 $at, $f20
/* 0710E8 7F03C5B8 26319EE0 */ addiu $s1, %lo(ptr_BONDdata_p1) # addiu $s1, $s1, -0x6120 /* 0710E8 7F03C5B8 26319EE0 */ addiu $s1, %lo(players) # addiu $s1, $s1, -0x6120
.L7F03C5BC: .L7F03C5BC:
/* 0710EC 7F03C5BC 8E2F0000 */ lw $t7, ($s1) /* 0710EC 7F03C5BC 8E2F0000 */ lw $t7, ($s1)
/* 0710F0 7F03C5C0 C6460008 */ lwc1 $f6, 8($s2) /* 0710F0 7F03C5C0 C6460008 */ lwc1 $f6, 8($s2)
@@ -17219,7 +17213,7 @@ glabel handle_mp_respawn_and_some_things
/* 071354 7F03C824 AFA20028 */ sw $v0, 0x28($sp) /* 071354 7F03C824 AFA20028 */ sw $v0, 0x28($sp)
/* 071358 7F03C828 8FA30028 */ lw $v1, 0x28($sp) /* 071358 7F03C828 8FA30028 */ lw $v1, 0x28($sp)
/* 07135C 7F03C82C 8E040010 */ lw $a0, 0x10($s0) /* 07135C 7F03C82C 8E040010 */ lw $a0, 0x10($s0)
/* 071360 7F03C830 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 071360 7F03C830 0FC0E969 */ jal attachNewChild
/* 071364 7F03C834 8C650010 */ lw $a1, 0x10($v1) /* 071364 7F03C834 8C650010 */ lw $a1, 0x10($v1)
/* 071368 7F03C838 1000001C */ b .L7F03C8AC /* 071368 7F03C838 1000001C */ b .L7F03C8AC
/* 07136C 7F03C83C 24130001 */ li $s3, 1 /* 07136C 7F03C83C 24130001 */ li $s3, 1
@@ -17305,23 +17299,23 @@ glabel handle_mp_respawn_and_some_things
/* 07147C 7F03C94C 0FC26C57 */ jal sub_GAME_7F09B15C /* 07147C 7F03C94C 0FC26C57 */ jal sub_GAME_7F09B15C
/* 071480 7F03C950 02202025 */ move $a0, $s1 /* 071480 7F03C950 02202025 */ move $a0, $s1
/* 071484 7F03C954 00024080 */ sll $t0, $v0, 2 /* 071484 7F03C954 00024080 */ sll $t0, $v0, 2
/* 071488 7F03C958 3C048008 */ lui $a0, %hi(ptr_BONDdata_p1) /* 071488 7F03C958 3C048008 */ lui $a0, %hi(players)
/* 07148C 7F03C95C 00882021 */ addu $a0, $a0, $t0 /* 07148C 7F03C95C 00882021 */ addu $a0, $a0, $t0
/* 071490 7F03C960 8C849EE0 */ lw $a0, %lo(ptr_BONDdata_p1)($a0) /* 071490 7F03C960 8C849EE0 */ lw $a0, %lo(players)($a0)
/* 071494 7F03C964 0FC18AC0 */ jal sub_GAME_7F062B00 /* 071494 7F03C964 0FC18AC0 */ jal sub_GAME_7F062B00
/* 071498 7F03C968 24840A54 */ addiu $a0, $a0, 0xa54 /* 071498 7F03C968 24840A54 */ addiu $a0, $a0, 0xa54
/* 07149C 7F03C96C 0FC26C57 */ jal sub_GAME_7F09B15C /* 07149C 7F03C96C 0FC26C57 */ jal sub_GAME_7F09B15C
/* 0714A0 7F03C970 02202025 */ move $a0, $s1 /* 0714A0 7F03C970 02202025 */ move $a0, $s1
/* 0714A4 7F03C974 00024880 */ sll $t1, $v0, 2 /* 0714A4 7F03C974 00024880 */ sll $t1, $v0, 2
/* 0714A8 7F03C978 3C048008 */ lui $a0, %hi(ptr_BONDdata_p1) /* 0714A8 7F03C978 3C048008 */ lui $a0, %hi(players)
/* 0714AC 7F03C97C 00892021 */ addu $a0, $a0, $t1 /* 0714AC 7F03C97C 00892021 */ addu $a0, $a0, $t1
/* 0714B0 7F03C980 8C849EE0 */ lw $a0, %lo(ptr_BONDdata_p1)($a0) /* 0714B0 7F03C980 8C849EE0 */ lw $a0, %lo(players)($a0)
/* 0714B4 7F03C984 0FC18AC0 */ jal sub_GAME_7F062B00 /* 0714B4 7F03C984 0FC18AC0 */ jal sub_GAME_7F062B00
/* 0714B8 7F03C988 24840DFC */ addiu $a0, $a0, 0xdfc /* 0714B8 7F03C988 24840DFC */ addiu $a0, $a0, 0xdfc
/* 0714BC 7F03C98C 8E2A0004 */ lw $t2, 4($s1) /* 0714BC 7F03C98C 8E2A0004 */ lw $t2, 4($s1)
/* 0714C0 7F03C990 5140000C */ beql $t2, $zero, .L7F03C9C4 /* 0714C0 7F03C990 5140000C */ beql $t2, $zero, .L7F03C9C4
/* 0714C4 7F03C994 24010005 */ li $at, 5 /* 0714C4 7F03C994 24010005 */ li $at, 5
/* 0714C8 7F03C998 0FC26919 */ jal get_num_players /* 0714C8 7F03C998 0FC26919 */ jal getPlayerCount
/* 0714CC 7F03C99C 00000000 */ nop /* 0714CC 7F03C99C 00000000 */ nop
/* 0714D0 7F03C9A0 28410002 */ slti $at, $v0, 2 /* 0714D0 7F03C9A0 28410002 */ slti $at, $v0, 2
/* 0714D4 7F03C9A4 54200007 */ bnezl $at, .L7F03C9C4 /* 0714D4 7F03C9A4 54200007 */ bnezl $at, .L7F03C9C4
@@ -17904,10 +17898,10 @@ glabel sub_GAME_7F03CFE8
/* 071B4C 7F03D01C 0FC26C57 */ jal sub_GAME_7F09B15C /* 071B4C 7F03D01C 0FC26C57 */ jal sub_GAME_7F09B15C
/* 071B50 7F03D020 00000000 */ nop /* 071B50 7F03D020 00000000 */ nop
/* 071B54 7F03D024 00027080 */ sll $t6, $v0, 2 /* 071B54 7F03D024 00027080 */ sll $t6, $v0, 2
/* 071B58 7F03D028 3C048008 */ lui $a0, %hi(ptr_BONDdata_p1) /* 071B58 7F03D028 3C048008 */ lui $a0, %hi(players)
/* 071B5C 7F03D02C 008E2021 */ addu $a0, $a0, $t6 /* 071B5C 7F03D02C 008E2021 */ addu $a0, $a0, $t6
/* 071B60 7F03D030 0FC225DE */ jal sub_GAME_7F089778 /* 071B60 7F03D030 0FC225DE */ jal sub_GAME_7F089778
/* 071B64 7F03D034 8C849EE0 */ lw $a0, %lo(ptr_BONDdata_p1)($a0) /* 071B64 7F03D034 8C849EE0 */ lw $a0, %lo(players)($a0)
/* 071B68 7F03D038 10000004 */ b .L7F03D04C /* 071B68 7F03D038 10000004 */ b .L7F03D04C
/* 071B6C 7F03D03C 8FBF0014 */ lw $ra, 0x14($sp) /* 071B6C 7F03D03C 8FBF0014 */ lw $ra, 0x14($sp)
/* 071B70 7F03D040 44800000 */ mtc1 $zero, $f0 /* 071B70 7F03D040 44800000 */ mtc1 $zero, $f0
@@ -18199,7 +18193,7 @@ glabel sub_GAME_7F03D188
/* 071EBC 7F03D38C 44814000 */ mtc1 $at, $f8 /* 071EBC 7F03D38C 44814000 */ mtc1 $at, $f8
/* 071EC0 7F03D390 00000000 */ nop /* 071EC0 7F03D390 00000000 */ nop
/* 071EC4 7F03D394 46083282 */ mul.s $f10, $f6, $f8 /* 071EC4 7F03D394 46083282 */ mul.s $f10, $f6, $f8
/* 071EC8 7F03D398 0FC26919 */ jal get_num_players /* 071EC8 7F03D398 0FC26919 */ jal getPlayerCount
/* 071ECC 7F03D39C E7AA0058 */ swc1 $f10, 0x58($sp) /* 071ECC 7F03D39C E7AA0058 */ swc1 $f10, 0x58($sp)
/* 071ED0 7F03D3A0 24010001 */ li $at, 1 /* 071ED0 7F03D3A0 24010001 */ li $at, 1
/* 071ED4 7F03D3A4 14410005 */ bne $v0, $at, .L7F03D3BC /* 071ED4 7F03D3A4 14410005 */ bne $v0, $at, .L7F03D3BC
@@ -19334,7 +19328,7 @@ glabel sub_GAME_7F03E134
#ifdef NONMATCHING #ifdef NONMATCHING
void sub_GAME_7F03E18C(void) { void sub_GAME_7F03E18C(void) {
// Duplicate of the below function with a small extension.
} }
#else #else
GLOBAL_ASM( GLOBAL_ASM(
@@ -19384,8 +19378,31 @@ glabel sub_GAME_7F03E18C
#ifdef NONMATCHING #ifdef NONMATCHING
void sub_GAME_7F03E210(void) { /*
Main missing these kinds of instructions:
- sll $a1, $s0, 0x10
- sra $t6, $a1, 0x10
..
- sll $a1, $s0, 0x10
So it looks like a conversion from u32 to u16, but we're reading a u8?
I tried u32 room but no joy.
*/
void sub_GAME_7F03E210(struct prop *posData)
{
u8 room;
u8 *roomIter;
roomIter = posData->rooms;
room = roomIter[0];
while (room != 0xff) {
FUN_7f03dd9c(posData,(u16)room);
roomIter += 1;
room = *roomIter;
}
return;
} }
#else #else
GLOBAL_ASM( GLOBAL_ASM(
+8
View File
@@ -71,6 +71,14 @@ struct struct_20 {
void * anonymous_19; void * anonymous_19;
}; };
struct Pad {
u32 padNumber;
s32* neighbours;
u32 pathSetIndex;
s32 dist_tmp;
};
extern struct Pad * ptr_setup_path_tbl;
extern u32 D_800312A0[]; extern u32 D_800312A0[];
extern u32 D_800312B4[]; extern u32 D_800312B4[];
extern u32 D_800312C8[]; extern u32 D_800312C8[];
+3 -3
View File
@@ -27,7 +27,7 @@ u8 dword_D_80037084[] = { // GLIST_DETECT_BOND_SPAWN_CLONE_ON_HEARD_GUNFIRE: wai
goto_loop_repeat(0x01) goto_loop_repeat(0x01)
label(0x06) label(0x06)
if_guard_sees_bond(0x07) if_guard_sees_bond(0x07)
if_guard_was_shot_within_last_10_secs(0x0D) if_guard_was_shot_or_seen_bond_within_last_10_secs(0x0D)
if_guard_heard_bond_within_last_10_secs(0x0E) if_guard_heard_bond_within_last_10_secs(0x0E)
if_guard_shot_from_bond_missed(0x10) if_guard_shot_from_bond_missed(0x10)
if_guard_see_another_guard_shot(0x0D) if_guard_see_another_guard_shot(0x0D)
@@ -113,7 +113,7 @@ u8 dword_D_8003717C[] = { // GLIST_DETECT_BOND_DEAF_NO_CLONE_NO_IDLE_ANIM: wait
goto_loop_repeat(0x01) goto_loop_repeat(0x01)
label(0x06) label(0x06)
if_guard_sees_bond(0x07) if_guard_sees_bond(0x07)
if_guard_was_shot_within_last_10_secs(0x0D) if_guard_was_shot_or_seen_bond_within_last_10_secs(0x0D)
if_guard_shot_from_bond_missed(0x10) if_guard_shot_from_bond_missed(0x10)
if_guard_see_another_guard_shot(0x0D) if_guard_see_another_guard_shot(0x0D)
if_guard_see_another_guard_die(0x0D) if_guard_see_another_guard_die(0x0D)
@@ -212,7 +212,7 @@ u8 dword_D_80037248[] = { // GLIST_RUN_TO_BOND_AND_FIRE: run to bond and fire
u8 dword_D_80037250[] = { // GLIST_DETECT_BOND_NO_CLONE_NO_IDLE_ANIM: wait for bond detection (no clones/no idling) u8 dword_D_80037250[] = { // GLIST_DETECT_BOND_NO_CLONE_NO_IDLE_ANIM: wait for bond detection (no clones/no idling)
goto_loop_start(0x01) // wait for guard to stop moving before branching to next logic goto_loop_start(0x01) // wait for guard to stop moving before branching to next logic
if_guard_sees_bond(0x07) if_guard_sees_bond(0x07)
if_guard_was_shot_within_last_10_secs(0x0D) if_guard_was_shot_or_seen_bond_within_last_10_secs(0x0D)
if_guard_heard_bond_within_last_10_secs(0x0D) if_guard_heard_bond_within_last_10_secs(0x0D)
if_guard_shot_from_bond_missed(0x0D) if_guard_shot_from_bond_missed(0x0D)
if_guard_see_another_guard_shot(0x0D) if_guard_see_another_guard_shot(0x0D)
+79 -79
View File
@@ -2493,7 +2493,7 @@ glabel sub_GAME_7F041160
/* 075DCC 7F04129C 02202025 */ move $a0, $s1 /* 075DCC 7F04129C 02202025 */ move $a0, $s1
/* 075DD0 7F0412A0 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 075DD0 7F0412A0 0FC1611D */ jal matrix_4x4_transform_vector_in_place
/* 075DD4 7F0412A4 E4A80008 */ swc1 $f8, 8($a1) /* 075DD4 7F0412A4 E4A80008 */ swc1 $f8, 8($a1)
/* 075DD8 7F0412A8 0FC1E111 */ jal sub_GAME_7F078444 /* 075DD8 7F0412A8 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 075DDC 7F0412AC 00000000 */ nop /* 075DDC 7F0412AC 00000000 */ nop
/* 075DE0 7F0412B0 00402025 */ move $a0, $v0 /* 075DE0 7F0412B0 00402025 */ move $a0, $v0
/* 075DE4 7F0412B4 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 075DE4 7F0412B4 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -2531,7 +2531,7 @@ glabel sub_GAME_7F041160
/* 075E64 7F041334 E60A0004 */ swc1 $f10, 4($s0) /* 075E64 7F041334 E60A0004 */ swc1 $f10, 4($s0)
/* 075E68 7F041338 E6120008 */ swc1 $f18, 8($s0) /* 075E68 7F041338 E6120008 */ swc1 $f18, 8($s0)
.L7F04133C: .L7F04133C:
/* 075E6C 7F04133C 0FC1E111 */ jal sub_GAME_7F078444 /* 075E6C 7F04133C 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 075E70 7F041340 00000000 */ nop /* 075E70 7F041340 00000000 */ nop
/* 075E74 7F041344 00402025 */ move $a0, $v0 /* 075E74 7F041344 00402025 */ move $a0, $v0
/* 075E78 7F041348 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 075E78 7F041348 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -3401,7 +3401,7 @@ glabel sub_GAME_7F041E0C
/* 076A44 7F041F14 C6880004 */ lwc1 $f8, 4($s4) /* 076A44 7F041F14 C6880004 */ lwc1 $f8, 4($s4)
/* 076A48 7F041F18 E7A8008C */ swc1 $f8, 0x8c($sp) /* 076A48 7F041F18 E7A8008C */ swc1 $f8, 0x8c($sp)
/* 076A4C 7F041F1C C68A0008 */ lwc1 $f10, 8($s4) /* 076A4C 7F041F1C C68A0008 */ lwc1 $f10, 8($s4)
/* 076A50 7F041F20 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 076A50 7F041F20 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 076A54 7F041F24 E7AA0090 */ swc1 $f10, 0x90($sp) /* 076A54 7F041F24 E7AA0090 */ swc1 $f10, 0x90($sp)
/* 076A58 7F041F28 00402025 */ move $a0, $v0 /* 076A58 7F041F28 00402025 */ move $a0, $v0
/* 076A5C 7F041F2C 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 076A5C 7F041F2C 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -3411,7 +3411,7 @@ glabel sub_GAME_7F041E0C
/* 076A6C 7F041F3C C7B000A0 */ lwc1 $f16, 0xa0($sp) /* 076A6C 7F041F3C C7B000A0 */ lwc1 $f16, 0xa0($sp)
/* 076A70 7F041F40 E7A6007C */ swc1 $f6, 0x7c($sp) /* 076A70 7F041F40 E7A6007C */ swc1 $f6, 0x7c($sp)
/* 076A74 7F041F44 E7B20080 */ swc1 $f18, 0x80($sp) /* 076A74 7F041F44 E7B20080 */ swc1 $f18, 0x80($sp)
/* 076A78 7F041F48 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 076A78 7F041F48 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 076A7C 7F041F4C E7B00084 */ swc1 $f16, 0x84($sp) /* 076A7C 7F041F4C E7B00084 */ swc1 $f16, 0x84($sp)
/* 076A80 7F041F50 00402025 */ move $a0, $v0 /* 076A80 7F041F50 00402025 */ move $a0, $v0
/* 076A84 7F041F54 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 076A84 7F041F54 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -3513,9 +3513,9 @@ glabel sub_GAME_7F041E0C
/* 076BE8 7F0420B8 0FC26C57 */ jal sub_GAME_7F09B15C /* 076BE8 7F0420B8 0FC26C57 */ jal sub_GAME_7F09B15C
/* 076BEC 7F0420BC 02002025 */ move $a0, $s0 /* 076BEC 7F0420BC 02002025 */ move $a0, $s0
/* 076BF0 7F0420C0 00025880 */ sll $t3, $v0, 2 /* 076BF0 7F0420C0 00025880 */ sll $t3, $v0, 2
/* 076BF4 7F0420C4 3C0C8008 */ lui $t4, %hi(ptr_BONDdata_p1) /* 076BF4 7F0420C4 3C0C8008 */ lui $t4, %hi(players)
/* 076BF8 7F0420C8 018B6021 */ addu $t4, $t4, $t3 /* 076BF8 7F0420C8 018B6021 */ addu $t4, $t4, $t3
/* 076BFC 7F0420CC 8D8C9EE0 */ lw $t4, %lo(ptr_BONDdata_p1)($t4) /* 076BFC 7F0420CC 8D8C9EE0 */ lw $t4, %lo(players)($t4)
/* 076C00 7F0420D0 324E0004 */ andi $t6, $s2, 4 /* 076C00 7F0420D0 324E0004 */ andi $t6, $s2, 4
/* 076C04 7F0420D4 8D8D00AC */ lw $t5, 0xac($t4) /* 076C04 7F0420D4 8D8D00AC */ lw $t5, 0xac($t4)
/* 076C08 7F0420D8 51A00037 */ beql $t5, $zero, .L7F0421B8 /* 076C08 7F0420D8 51A00037 */ beql $t5, $zero, .L7F0421B8
@@ -3560,9 +3560,9 @@ glabel sub_GAME_7F041E0C
/* 076C94 7F042164 0FC26C57 */ jal sub_GAME_7F09B15C /* 076C94 7F042164 0FC26C57 */ jal sub_GAME_7F09B15C
/* 076C98 7F042168 02002025 */ move $a0, $s0 /* 076C98 7F042168 02002025 */ move $a0, $s0
/* 076C9C 7F04216C 00025880 */ sll $t3, $v0, 2 /* 076C9C 7F04216C 00025880 */ sll $t3, $v0, 2
/* 076CA0 7F042170 3C0C8008 */ lui $t4, %hi(ptr_BONDdata_p1) /* 076CA0 7F042170 3C0C8008 */ lui $t4, %hi(players)
/* 076CA4 7F042174 018B6021 */ addu $t4, $t4, $t3 /* 076CA4 7F042174 018B6021 */ addu $t4, $t4, $t3
/* 076CA8 7F042178 8D8C9EE0 */ lw $t4, %lo(ptr_BONDdata_p1)($t4) /* 076CA8 7F042178 8D8C9EE0 */ lw $t4, %lo(players)($t4)
/* 076CAC 7F04217C 02002025 */ move $a0, $s0 /* 076CAC 7F04217C 02002025 */ move $a0, $s0
/* 076CB0 7F042180 02802825 */ move $a1, $s4 /* 076CB0 7F042180 02802825 */ move $a1, $s4
/* 076CB4 7F042184 8D8D00AC */ lw $t5, 0xac($t4) /* 076CB4 7F042184 8D8D00AC */ lw $t5, 0xac($t4)
@@ -4319,7 +4319,7 @@ glabel sub_GAME_7F042A0C
/* 077734 7F042C04 E440005C */ swc1 $f0, 0x5c($v0) /* 077734 7F042C04 E440005C */ swc1 $f0, 0x5c($v0)
.L7F042C08: .L7F042C08:
/* 077738 7F042C08 27A40080 */ addiu $a0, $sp, 0x80 /* 077738 7F042C08 27A40080 */ addiu $a0, $sp, 0x80
/* 07773C 7F042C0C 0FC2CA2C */ jal sub_GAME_7F0B28B0 /* 07773C 7F042C0C 0FC2CA2C */ jal getCollisionEdge_maybe
/* 077740 7F042C10 27A50074 */ addiu $a1, $sp, 0x74 /* 077740 7F042C10 27A50074 */ addiu $a1, $sp, 0x74
/* 077744 7F042C14 C7A8007C */ lwc1 $f8, 0x7c($sp) /* 077744 7F042C14 C7A8007C */ lwc1 $f8, 0x7c($sp)
/* 077748 7F042C18 C7B00088 */ lwc1 $f16, 0x88($sp) /* 077748 7F042C18 C7B00088 */ lwc1 $f16, 0x88($sp)
@@ -5479,7 +5479,7 @@ glabel sub_GAME_7F043A6C
/* 078624 7F043AF4 8E0C0014 */ lw $t4, 0x14($s0) /* 078624 7F043AF4 8E0C0014 */ lw $t4, 0x14($s0)
/* 078628 7F043AF8 8FAB00FC */ lw $t3, 0xfc($sp) /* 078628 7F043AF8 8FAB00FC */ lw $t3, 0xfc($sp)
/* 07862C 7F043AFC AD8B001C */ sw $t3, 0x1c($t4) /* 07862C 7F043AFC AD8B001C */ sw $t3, 0x1c($t4)
/* 078630 7F043B00 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 078630 7F043B00 0FC0E969 */ jal attachNewChild
/* 078634 7F043B04 8FA500F4 */ lw $a1, 0xf4($sp) /* 078634 7F043B04 8FA500F4 */ lw $a1, 0xf4($sp)
/* 078638 7F043B08 27B100AC */ addiu $s1, $sp, 0xac /* 078638 7F043B08 27B100AC */ addiu $s1, $sp, 0xac
/* 07863C 7F043B0C 02202825 */ move $a1, $s1 /* 07863C 7F043B0C 02202825 */ move $a1, $s1
@@ -5488,7 +5488,7 @@ glabel sub_GAME_7F043A6C
/* 078648 7F043B18 26040058 */ addiu $a0, $s0, 0x58 /* 078648 7F043B18 26040058 */ addiu $a0, $s0, 0x58
/* 07864C 7F043B1C 0FC16266 */ jal matrix_4x4_set_position /* 07864C 7F043B1C 0FC16266 */ jal matrix_4x4_set_position
/* 078650 7F043B20 02202825 */ move $a1, $s1 /* 078650 7F043B20 02202825 */ move $a1, $s1
/* 078654 7F043B24 0FC1E111 */ jal sub_GAME_7F078444 /* 078654 7F043B24 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 078658 7F043B28 00000000 */ nop /* 078658 7F043B28 00000000 */ nop
/* 07865C 7F043B2C 00402025 */ move $a0, $v0 /* 07865C 7F043B2C 00402025 */ move $a0, $v0
/* 078660 7F043B30 8FA50028 */ lw $a1, 0x28($sp) /* 078660 7F043B30 8FA50028 */ lw $a1, 0x28($sp)
@@ -5570,7 +5570,7 @@ glabel generate_explosion_at_position
/* 07873C 7F043C0C C4460034 */ lwc1 $f6, 0x34($v0) /* 07873C 7F043C0C C4460034 */ lwc1 $f6, 0x34($v0)
/* 078740 7F043C10 E7A60048 */ swc1 $f6, 0x48($sp) /* 078740 7F043C10 E7A60048 */ swc1 $f6, 0x48($sp)
/* 078744 7F043C14 C4480038 */ lwc1 $f8, 0x38($v0) /* 078744 7F043C14 C4480038 */ lwc1 $f8, 0x38($v0)
/* 078748 7F043C18 0FC1E111 */ jal sub_GAME_7F078444 /* 078748 7F043C18 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 07874C 7F043C1C E7A8004C */ swc1 $f8, 0x4c($sp) /* 07874C 7F043C1C E7A8004C */ swc1 $f8, 0x4c($sp)
/* 078750 7F043C20 27B00044 */ addiu $s0, $sp, 0x44 /* 078750 7F043C20 27B00044 */ addiu $s0, $sp, 0x44
/* 078754 7F043C24 02002825 */ move $a1, $s0 /* 078754 7F043C24 02002825 */ move $a1, $s0
@@ -5710,7 +5710,7 @@ glabel generate_explosion_at_position
/* 078A7C 7F043F0C C4460034 */ lwc1 $f6, 0x34($v0) /* 078A7C 7F043F0C C4460034 */ lwc1 $f6, 0x34($v0)
/* 078A80 7F043F10 E7A60044 */ swc1 $f6, 0x44($sp) /* 078A80 7F043F10 E7A60044 */ swc1 $f6, 0x44($sp)
/* 078A84 7F043F14 C4480038 */ lwc1 $f8, 0x38($v0) /* 078A84 7F043F14 C4480038 */ lwc1 $f8, 0x38($v0)
/* 078A88 7F043F18 0FC1E28D */ jal sub_GAME_7F078444 /* 078A88 7F043F18 0FC1E28D */ jal currentPlayerGetMatrix10D4
/* 078A8C 7F043F1C E7A80048 */ swc1 $f8, 0x48($sp) /* 078A8C 7F043F1C E7A80048 */ swc1 $f8, 0x48($sp)
/* 078A90 7F043F20 27B00040 */ addiu $s0, $sp, 0x40 /* 078A90 7F043F20 27B00040 */ addiu $s0, $sp, 0x40
/* 078A94 7F043F24 02002825 */ move $a1, $s0 /* 078A94 7F043F24 02002825 */ move $a1, $s0
@@ -7055,13 +7055,13 @@ glabel sub_GAME_7F044718
/* 07930C 7F0447DC 46000507 */ neg.s $f20, $f0 /* 07930C 7F0447DC 46000507 */ neg.s $f20, $f0
/* 079310 7F0447E0 C62C0000 */ lwc1 $f12, ($s1) /* 079310 7F0447E0 C62C0000 */ lwc1 $f12, ($s1)
.L7F0447E4: .L7F0447E4:
/* 079314 7F0447E4 0FC2C5E5 */ jal sub_GAME_7F0B1794 /* 079314 7F0447E4 0FC2C5E5 */ jal distBetweenPoints2d
/* 079318 7F0447E8 C62E0004 */ lwc1 $f14, 4($s1) /* 079318 7F0447E8 C62E0004 */ lwc1 $f14, 4($s1)
/* 07931C 7F0447EC 4406B000 */ mfc1 $a2, $f22 /* 07931C 7F0447EC 4406B000 */ mfc1 $a2, $f22
/* 079320 7F0447F0 4407C000 */ mfc1 $a3, $f24 /* 079320 7F0447F0 4407C000 */ mfc1 $a3, $f24
/* 079324 7F0447F4 46000686 */ mov.s $f26, $f0 /* 079324 7F0447F4 46000686 */ mov.s $f26, $f0
/* 079328 7F0447F8 C60C0000 */ lwc1 $f12, ($s0) /* 079328 7F0447F8 C60C0000 */ lwc1 $f12, ($s0)
/* 07932C 7F0447FC 0FC2C5E5 */ jal sub_GAME_7F0B1794 /* 07932C 7F0447FC 0FC2C5E5 */ jal distBetweenPoints2d
/* 079330 7F044800 C60E0004 */ lwc1 $f14, 4($s0) /* 079330 7F044800 C60E0004 */ lwc1 $f14, 4($s0)
/* 079334 7F044804 461CA03C */ c.lt.s $f20, $f28 /* 079334 7F044804 461CA03C */ c.lt.s $f20, $f28
/* 079338 7F044808 00000000 */ nop /* 079338 7F044808 00000000 */ nop
@@ -7999,7 +7999,7 @@ glabel object_interaction
/* 079E34 7F045304 8E340014 */ lw $s4, 0x14($s1) /* 079E34 7F045304 8E340014 */ lw $s4, 0x14($s1)
/* 079E38 7F045308 AFA00690 */ sw $zero, 0x690($sp) /* 079E38 7F045308 AFA00690 */ sw $zero, 0x690($sp)
/* 079E3C 7F04530C AFA00680 */ sw $zero, 0x680($sp) /* 079E3C 7F04530C AFA00680 */ sw $zero, 0x680($sp)
/* 079E40 7F045310 0FC26919 */ jal get_num_players /* 079E40 7F045310 0FC26919 */ jal getPlayerCount
/* 079E44 7F045314 E7B6067C */ swc1 $f22, 0x67c($sp) /* 079E44 7F045314 E7B6067C */ swc1 $f22, 0x67c($sp)
/* 079E48 7F045318 240C0001 */ li $t4, 1 /* 079E48 7F045318 240C0001 */ li $t4, 1
/* 079E4C 7F04531C AFA20674 */ sw $v0, 0x674($sp) /* 079E4C 7F04531C AFA20674 */ sw $v0, 0x674($sp)
@@ -8578,7 +8578,7 @@ glabel object_interaction
/* 07A6C0 7F045B90 00409025 */ move $s2, $v0 /* 07A6C0 7F045B90 00409025 */ move $s2, $v0
/* 07A6C4 7F045B94 E7A605CC */ swc1 $f6, 0x5cc($sp) /* 07A6C4 7F045B94 E7A605CC */ swc1 $f6, 0x5cc($sp)
/* 07A6C8 7F045B98 E7A805D0 */ swc1 $f8, 0x5d0($sp) /* 07A6C8 7F045B98 E7A805D0 */ swc1 $f8, 0x5d0($sp)
/* 07A6CC 7F045B9C 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 07A6CC 7F045B9C 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 07A6D0 7F045BA0 E7A405D4 */ swc1 $f4, 0x5d4($sp) /* 07A6D0 7F045BA0 E7A405D4 */ swc1 $f4, 0x5d4($sp)
/* 07A6D4 7F045BA4 00402025 */ move $a0, $v0 /* 07A6D4 7F045BA4 00402025 */ move $a0, $v0
/* 07A6D8 7F045BA8 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 07A6D8 7F045BA8 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -8646,7 +8646,7 @@ glabel object_interaction
/* 07A7D0 7F045CA0 27A5058C */ addiu $a1, $sp, 0x58c /* 07A7D0 7F045CA0 27A5058C */ addiu $a1, $sp, 0x58c
/* 07A7D4 7F045CA4 46045182 */ mul.s $f6, $f10, $f4 /* 07A7D4 7F045CA4 46045182 */ mul.s $f6, $f10, $f4
/* 07A7D8 7F045CA8 46064281 */ sub.s $f10, $f8, $f6 /* 07A7D8 7F045CA8 46064281 */ sub.s $f10, $f8, $f6
/* 07A7DC 7F045CAC 0FC16799 */ jal sub_GAME_7F059E64 /* 07A7DC 7F045CAC 0FC16799 */ jal matrix_4x4_7F059E64
/* 07A7E0 7F045CB0 E7AA05D4 */ swc1 $f10, 0x5d4($sp) /* 07A7E0 7F045CB0 E7AA05D4 */ swc1 $f10, 0x5d4($sp)
/* 07A7E4 7F045CB4 27A4058C */ addiu $a0, $sp, 0x58c /* 07A7E4 7F045CB4 27A4058C */ addiu $a0, $sp, 0x58c
/* 07A7E8 7F045CB8 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 07A7E8 7F045CB8 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -11399,7 +11399,7 @@ glabel object_interaction
/* 07CFB0 7F048480 00402825 */ move $a1, $v0 /* 07CFB0 7F048480 00402825 */ move $a1, $v0
/* 07CFB4 7F048484 0FC149BB */ jal sub_GAME_7F0526EC /* 07CFB4 7F048484 0FC149BB */ jal sub_GAME_7F0526EC
/* 07CFB8 7F048488 AFA4039C */ sw $a0, 0x39c($sp) /* 07CFB8 7F048488 AFA4039C */ sw $a0, 0x39c($sp)
/* 07CFBC 7F04848C 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 07CFBC 7F04848C 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 07CFC0 7F048490 00000000 */ nop /* 07CFC0 7F048490 00000000 */ nop
/* 07CFC4 7F048494 00402025 */ move $a0, $v0 /* 07CFC4 7F048494 00402025 */ move $a0, $v0
/* 07CFC8 7F048498 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place /* 07CFC8 7F048498 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -11579,7 +11579,7 @@ glabel object_interaction
/* 07D26C 7F04873C 8FA40070 */ lw $a0, 0x70($sp) /* 07D26C 7F04873C 8FA40070 */ lw $a0, 0x70($sp)
/* 07D270 7F048740 0FC16266 */ jal matrix_4x4_set_position /* 07D270 7F048740 0FC16266 */ jal matrix_4x4_set_position
/* 07D274 7F048744 27A503A4 */ addiu $a1, $sp, 0x3a4 /* 07D274 7F048744 27A503A4 */ addiu $a1, $sp, 0x3a4
/* 07D278 7F048748 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 07D278 7F048748 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 07D27C 7F04874C 00000000 */ nop /* 07D27C 7F04874C 00000000 */ nop
/* 07D280 7F048750 00402025 */ move $a0, $v0 /* 07D280 7F048750 00402025 */ move $a0, $v0
/* 07D284 7F048754 27A503A4 */ addiu $a1, $sp, 0x3a4 /* 07D284 7F048754 27A503A4 */ addiu $a1, $sp, 0x3a4
@@ -11628,7 +11628,7 @@ glabel object_interaction
/* 07D328 7F0487F8 02402025 */ move $a0, $s2 /* 07D328 7F0487F8 02402025 */ move $a0, $s2
/* 07D32C 7F0487FC 0FC16266 */ jal matrix_4x4_set_position /* 07D32C 7F0487FC 0FC16266 */ jal matrix_4x4_set_position
/* 07D330 7F048800 8FA5006C */ lw $a1, 0x6c($sp) /* 07D330 7F048800 8FA5006C */ lw $a1, 0x6c($sp)
/* 07D334 7F048804 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 07D334 7F048804 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 07D338 7F048808 00000000 */ nop /* 07D338 7F048808 00000000 */ nop
/* 07D33C 7F04880C 00402025 */ move $a0, $v0 /* 07D33C 7F04880C 00402025 */ move $a0, $v0
/* 07D340 7F048810 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place /* 07D340 7F048810 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -11679,7 +11679,7 @@ glabel object_interaction
/* 07D3EC 7F0488BC 8D4E0014 */ lw $t6, 0x14($t2) /* 07D3EC 7F0488BC 8D4E0014 */ lw $t6, 0x14($t2)
/* 07D3F0 7F0488C0 0FC1629F */ jal matrix_scalar_multiply /* 07D3F0 7F0488C0 0FC1629F */ jal matrix_scalar_multiply
/* 07D3F4 7F0488C4 C5CC0014 */ lwc1 $f12, 0x14($t6) /* 07D3F4 7F0488C4 C5CC0014 */ lwc1 $f12, 0x14($t6)
/* 07D3F8 7F0488C8 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 07D3F8 7F0488C8 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 07D3FC 7F0488CC 00000000 */ nop /* 07D3FC 7F0488CC 00000000 */ nop
/* 07D400 7F0488D0 00402025 */ move $a0, $v0 /* 07D400 7F0488D0 00402025 */ move $a0, $v0
/* 07D404 7F0488D4 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place /* 07D404 7F0488D4 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -12107,7 +12107,7 @@ glabel object_interaction
/* 07DA38 7F048F08 15EBFFF8 */ bne $t7, $t3, .L7F048EEC /* 07DA38 7F048F08 15EBFFF8 */ bne $t7, $t3, .L7F048EEC
/* 07DA3C 7F048F0C AD21FFFC */ sw $at, -4($t1) /* 07DA3C 7F048F0C AD21FFFC */ sw $at, -4($t1)
/* 07DA40 7F048F10 8DE10000 */ lw $at, ($t7) /* 07DA40 7F048F10 8DE10000 */ lw $at, ($t7)
/* 07DA44 7F048F14 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 07DA44 7F048F14 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 07DA48 7F048F18 AD210000 */ sw $at, ($t1) /* 07DA48 7F048F18 AD210000 */ sw $at, ($t1)
/* 07DA4C 7F048F1C AFA201B0 */ sw $v0, 0x1b0($sp) /* 07DA4C 7F048F1C AFA201B0 */ sw $v0, 0x1b0($sp)
/* 07DA50 7F048F20 AFB201C0 */ sw $s2, 0x1c0($sp) /* 07DA50 7F048F20 AFB201C0 */ sw $s2, 0x1c0($sp)
@@ -12258,7 +12258,7 @@ glabel object_interaction
/* 07DC74 7F049144 8FA4006C */ lw $a0, 0x6c($sp) /* 07DC74 7F049144 8FA4006C */ lw $a0, 0x6c($sp)
/* 07DC78 7F049148 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place /* 07DC78 7F049148 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
/* 07DC7C 7F04914C 8FA50068 */ lw $a1, 0x68($sp) /* 07DC7C 7F04914C 8FA50068 */ lw $a1, 0x68($sp)
/* 07DC80 7F049150 0FC1E111 */ jal sub_GAME_7F078444 /* 07DC80 7F049150 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 07DC84 7F049154 00000000 */ nop /* 07DC84 7F049154 00000000 */ nop
/* 07DC88 7F049158 27B0016C */ addiu $s0, $sp, 0x16c /* 07DC88 7F049158 27B0016C */ addiu $s0, $sp, 0x16c
/* 07DC8C 7F04915C 02003025 */ move $a2, $s0 /* 07DC8C 7F04915C 02003025 */ move $a2, $s0
@@ -12522,7 +12522,7 @@ glabel object_interaction
/* 07E04C 7F04951C C4660004 */ lwc1 $f6, 4($v1) /* 07E04C 7F04951C C4660004 */ lwc1 $f6, 4($v1)
/* 07E050 7F049520 E7A60130 */ swc1 $f6, 0x130($sp) /* 07E050 7F049520 E7A60130 */ swc1 $f6, 0x130($sp)
/* 07E054 7F049524 C4680008 */ lwc1 $f8, 8($v1) /* 07E054 7F049524 C4680008 */ lwc1 $f8, 8($v1)
/* 07E058 7F049528 0FC1E111 */ jal sub_GAME_7F078444 /* 07E058 7F049528 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 07E05C 7F04952C E7A80134 */ swc1 $f8, 0x134($sp) /* 07E05C 7F04952C E7A80134 */ swc1 $f8, 0x134($sp)
/* 07E060 7F049530 27B100B8 */ addiu $s1, $sp, 0xb8 /* 07E060 7F049530 27B100B8 */ addiu $s1, $sp, 0xb8
/* 07E064 7F049534 02203025 */ move $a2, $s1 /* 07E064 7F049534 02203025 */ move $a2, $s1
@@ -13092,7 +13092,7 @@ glabel object_interaction
/* 07A248 7F0456D8 8E340014 */ lw $s4, 0x14($s1) /* 07A248 7F0456D8 8E340014 */ lw $s4, 0x14($s1)
/* 07A24C 7F0456DC AFA00698 */ sw $zero, 0x698($sp) /* 07A24C 7F0456DC AFA00698 */ sw $zero, 0x698($sp)
/* 07A250 7F0456E0 AFA00688 */ sw $zero, 0x688($sp) /* 07A250 7F0456E0 AFA00688 */ sw $zero, 0x688($sp)
/* 07A254 7F0456E4 0FC26C01 */ jal get_num_players /* 07A254 7F0456E4 0FC26C01 */ jal getPlayerCount
/* 07A258 7F0456E8 E7B60684 */ swc1 $f22, 0x684($sp) /* 07A258 7F0456E8 E7B60684 */ swc1 $f22, 0x684($sp)
/* 07A25C 7F0456EC 240F0001 */ li $t7, 1 /* 07A25C 7F0456EC 240F0001 */ li $t7, 1
/* 07A260 7F0456F0 AFA2067C */ sw $v0, 0x67c($sp) /* 07A260 7F0456F0 AFA2067C */ sw $v0, 0x67c($sp)
@@ -13675,7 +13675,7 @@ glabel object_interaction
/* 07AAE4 7F045F74 00409025 */ move $s2, $v0 /* 07AAE4 7F045F74 00409025 */ move $s2, $v0
/* 07AAE8 7F045F78 E7A605D4 */ swc1 $f6, 0x5d4($sp) /* 07AAE8 7F045F78 E7A605D4 */ swc1 $f6, 0x5d4($sp)
/* 07AAEC 7F045F7C E7A805D8 */ swc1 $f8, 0x5d8($sp) /* 07AAEC 7F045F7C E7A805D8 */ swc1 $f8, 0x5d8($sp)
/* 07AAF0 7F045F80 0FC1E26D */ jal get_BONDdata_field_10CC /* 07AAF0 7F045F80 0FC1E26D */ jal currentPlayerGetMatrix10CC
/* 07AAF4 7F045F84 E7A405DC */ swc1 $f4, 0x5dc($sp) /* 07AAF4 7F045F84 E7A405DC */ swc1 $f4, 0x5dc($sp)
/* 07AAF8 7F045F88 00402025 */ move $a0, $v0 /* 07AAF8 7F045F88 00402025 */ move $a0, $v0
/* 07AAFC 7F045F8C 0FC16265 */ jal matrix_4x4_transform_vector_in_place /* 07AAFC 7F045F8C 0FC16265 */ jal matrix_4x4_transform_vector_in_place
@@ -13743,7 +13743,7 @@ glabel object_interaction
/* 07ABF4 7F046084 27A50594 */ addiu $a1, $sp, 0x594 /* 07ABF4 7F046084 27A50594 */ addiu $a1, $sp, 0x594
/* 07ABF8 7F046088 46045182 */ mul.s $f6, $f10, $f4 /* 07ABF8 7F046088 46045182 */ mul.s $f6, $f10, $f4
/* 07ABFC 7F04608C 46064281 */ sub.s $f10, $f8, $f6 /* 07ABFC 7F04608C 46064281 */ sub.s $f10, $f8, $f6
/* 07AC00 7F046090 0FC168E1 */ jal sub_GAME_7F059E64 /* 07AC00 7F046090 0FC168E1 */ jal matrix_4x4_7F059E64
/* 07AC04 7F046094 E7AA05DC */ swc1 $f10, 0x5dc($sp) /* 07AC04 7F046094 E7AA05DC */ swc1 $f10, 0x5dc($sp)
/* 07AC08 7F046098 27A40594 */ addiu $a0, $sp, 0x594 /* 07AC08 7F046098 27A40594 */ addiu $a0, $sp, 0x594
/* 07AC0C 7F04609C 0FC16265 */ jal matrix_4x4_transform_vector_in_place /* 07AC0C 7F04609C 0FC16265 */ jal matrix_4x4_transform_vector_in_place
@@ -16505,7 +16505,7 @@ glabel object_interaction
/* 07D3F4 7F048884 00402825 */ move $a1, $v0 /* 07D3F4 7F048884 00402825 */ move $a1, $v0
/* 07D3F8 7F048888 0FC14AFA */ jal sub_GAME_7F0526EC /* 07D3F8 7F048888 0FC14AFA */ jal sub_GAME_7F0526EC
/* 07D3FC 7F04888C AFA403A0 */ sw $a0, 0x3a0($sp) /* 07D3FC 7F04888C AFA403A0 */ sw $a0, 0x3a0($sp)
/* 07D400 7F048890 0FC1E26D */ jal get_BONDdata_field_10CC /* 07D400 7F048890 0FC1E26D */ jal currentPlayerGetMatrix10CC
/* 07D404 7F048894 00000000 */ nop /* 07D404 7F048894 00000000 */ nop
/* 07D408 7F048898 00402025 */ move $a0, $v0 /* 07D408 7F048898 00402025 */ move $a0, $v0
/* 07D40C 7F04889C 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place /* 07D40C 7F04889C 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -16685,7 +16685,7 @@ glabel object_interaction
/* 07D6B0 7F048B40 8FA40074 */ lw $a0, 0x74($sp) /* 07D6B0 7F048B40 8FA40074 */ lw $a0, 0x74($sp)
/* 07D6B4 7F048B44 0FC163AE */ jal matrix_4x4_set_position /* 07D6B4 7F048B44 0FC163AE */ jal matrix_4x4_set_position
/* 07D6B8 7F048B48 27A503A8 */ addiu $a1, $sp, 0x3a8 /* 07D6B8 7F048B48 27A503A8 */ addiu $a1, $sp, 0x3a8
/* 07D6BC 7F048B4C 0FC1E26D */ jal get_BONDdata_field_10CC /* 07D6BC 7F048B4C 0FC1E26D */ jal currentPlayerGetMatrix10CC
/* 07D6C0 7F048B50 00000000 */ nop /* 07D6C0 7F048B50 00000000 */ nop
/* 07D6C4 7F048B54 00402025 */ move $a0, $v0 /* 07D6C4 7F048B54 00402025 */ move $a0, $v0
/* 07D6C8 7F048B58 27A503A8 */ addiu $a1, $sp, 0x3a8 /* 07D6C8 7F048B58 27A503A8 */ addiu $a1, $sp, 0x3a8
@@ -16734,7 +16734,7 @@ glabel object_interaction
/* 07D76C 7F048BFC 02402025 */ move $a0, $s2 /* 07D76C 7F048BFC 02402025 */ move $a0, $s2
/* 07D770 7F048C00 0FC163AE */ jal matrix_4x4_set_position /* 07D770 7F048C00 0FC163AE */ jal matrix_4x4_set_position
/* 07D774 7F048C04 8FA50070 */ lw $a1, 0x70($sp) /* 07D774 7F048C04 8FA50070 */ lw $a1, 0x70($sp)
/* 07D778 7F048C08 0FC1E26D */ jal get_BONDdata_field_10CC /* 07D778 7F048C08 0FC1E26D */ jal currentPlayerGetMatrix10CC
/* 07D77C 7F048C0C 00000000 */ nop /* 07D77C 7F048C0C 00000000 */ nop
/* 07D780 7F048C10 00402025 */ move $a0, $v0 /* 07D780 7F048C10 00402025 */ move $a0, $v0
/* 07D784 7F048C14 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place /* 07D784 7F048C14 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -16785,7 +16785,7 @@ glabel object_interaction
/* 07D830 7F048CC0 8F090014 */ lw $t1, 0x14($t8) /* 07D830 7F048CC0 8F090014 */ lw $t1, 0x14($t8)
/* 07D834 7F048CC4 0FC163E7 */ jal matrix_scalar_multiply /* 07D834 7F048CC4 0FC163E7 */ jal matrix_scalar_multiply
/* 07D838 7F048CC8 C52C0014 */ lwc1 $f12, 0x14($t1) /* 07D838 7F048CC8 C52C0014 */ lwc1 $f12, 0x14($t1)
/* 07D83C 7F048CCC 0FC1E26D */ jal get_BONDdata_field_10CC /* 07D83C 7F048CCC 0FC1E26D */ jal currentPlayerGetMatrix10CC
/* 07D840 7F048CD0 00000000 */ nop /* 07D840 7F048CD0 00000000 */ nop
/* 07D844 7F048CD4 00402025 */ move $a0, $v0 /* 07D844 7F048CD4 00402025 */ move $a0, $v0
/* 07D848 7F048CD8 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place /* 07D848 7F048CD8 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place
@@ -17213,7 +17213,7 @@ glabel object_interaction
/* 07DE7C 7F04930C 158FFFF8 */ bne $t4, $t7, .Ljp7F0492F0 /* 07DE7C 7F04930C 158FFFF8 */ bne $t4, $t7, .Ljp7F0492F0
/* 07DE80 7F049310 ADA1FFFC */ sw $at, -4($t5) /* 07DE80 7F049310 ADA1FFFC */ sw $at, -4($t5)
/* 07DE84 7F049314 8D810000 */ lw $at, ($t4) /* 07DE84 7F049314 8D810000 */ lw $at, ($t4)
/* 07DE88 7F049318 0FC1E26D */ jal get_BONDdata_field_10CC /* 07DE88 7F049318 0FC1E26D */ jal currentPlayerGetMatrix10CC
/* 07DE8C 7F04931C ADA10000 */ sw $at, ($t5) /* 07DE8C 7F04931C ADA10000 */ sw $at, ($t5)
/* 07DE90 7F049320 AFA201B4 */ sw $v0, 0x1b4($sp) /* 07DE90 7F049320 AFA201B4 */ sw $v0, 0x1b4($sp)
/* 07DE94 7F049324 AFB201C4 */ sw $s2, 0x1c4($sp) /* 07DE94 7F049324 AFB201C4 */ sw $s2, 0x1c4($sp)
@@ -17364,7 +17364,7 @@ glabel object_interaction
/* 07E0B8 7F049548 8FA40070 */ lw $a0, 0x70($sp) /* 07E0B8 7F049548 8FA40070 */ lw $a0, 0x70($sp)
/* 07E0BC 7F04954C 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place /* 07E0BC 7F04954C 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place
/* 07E0C0 7F049550 8FA5006C */ lw $a1, 0x6c($sp) /* 07E0C0 7F049550 8FA5006C */ lw $a1, 0x6c($sp)
/* 07E0C4 7F049554 0FC1E28D */ jal sub_GAME_7F078444 /* 07E0C4 7F049554 0FC1E28D */ jal currentPlayerGetMatrix10D4
/* 07E0C8 7F049558 00000000 */ nop /* 07E0C8 7F049558 00000000 */ nop
/* 07E0CC 7F04955C 27B00170 */ addiu $s0, $sp, 0x170 /* 07E0CC 7F04955C 27B00170 */ addiu $s0, $sp, 0x170
/* 07E0D0 7F049560 02003025 */ move $a2, $s0 /* 07E0D0 7F049560 02003025 */ move $a2, $s0
@@ -17628,7 +17628,7 @@ glabel object_interaction
/* 07E490 7F049920 C4660004 */ lwc1 $f6, 4($v1) /* 07E490 7F049920 C4660004 */ lwc1 $f6, 4($v1)
/* 07E494 7F049924 E7A60134 */ swc1 $f6, 0x134($sp) /* 07E494 7F049924 E7A60134 */ swc1 $f6, 0x134($sp)
/* 07E498 7F049928 C4680008 */ lwc1 $f8, 8($v1) /* 07E498 7F049928 C4680008 */ lwc1 $f8, 8($v1)
/* 07E49C 7F04992C 0FC1E28D */ jal sub_GAME_7F078444 /* 07E49C 7F04992C 0FC1E28D */ jal currentPlayerGetMatrix10D4
/* 07E4A0 7F049930 E7A80138 */ swc1 $f8, 0x138($sp) /* 07E4A0 7F049930 E7A80138 */ swc1 $f8, 0x138($sp)
/* 07E4A4 7F049934 27B100BC */ addiu $s1, $sp, 0xbc /* 07E4A4 7F049934 27B100BC */ addiu $s1, $sp, 0xbc
/* 07E4A8 7F049938 02203025 */ move $a2, $s1 /* 07E4A8 7F049938 02203025 */ move $a2, $s1
@@ -20656,7 +20656,7 @@ glabel sub_GAME_7F04AC20
/* 07FBD4 7F04B0A4 24E70008 */ addiu $a3, $a3, 8 /* 07FBD4 7F04B0A4 24E70008 */ addiu $a3, $a3, 8
/* 07FBD8 7F04B0A8 AC790000 */ sw $t9, ($v1) /* 07FBD8 7F04B0A8 AC790000 */ sw $t9, ($v1)
/* 07FBDC 7F04B0AC AFA70064 */ sw $a3, 0x64($sp) /* 07FBDC 7F04B0AC AFA70064 */ sw $a3, 0x64($sp)
/* 07FBE0 7F04B0B0 0FC1E0DD */ jal get_BONDdata_field_10D8 /* 07FBE0 7F04B0B0 0FC1E0DD */ jal currentPlayerGetProjectionMatrix
/* 07FBE4 7F04B0B4 AFA3002C */ sw $v1, 0x2c($sp) /* 07FBE4 7F04B0B4 AFA3002C */ sw $v1, 0x2c($sp)
/* 07FBE8 7F04B0B8 8FA3002C */ lw $v1, 0x2c($sp) /* 07FBE8 7F04B0B8 8FA3002C */ lw $v1, 0x2c($sp)
/* 07FBEC 7F04B0BC 8FA70064 */ lw $a3, 0x64($sp) /* 07FBEC 7F04B0BC 8FA70064 */ lw $a3, 0x64($sp)
@@ -21791,7 +21791,7 @@ glabel sub_GAME_7F04BCDC
/* 080A8C 7F04BF5C C4520004 */ lwc1 $f18, 4($v0) /* 080A8C 7F04BF5C C4520004 */ lwc1 $f18, 4($v0)
/* 080A90 7F04BF60 E7B20048 */ swc1 $f18, 0x48($sp) /* 080A90 7F04BF60 E7B20048 */ swc1 $f18, 0x48($sp)
/* 080A94 7F04BF64 C4440008 */ lwc1 $f4, 8($v0) /* 080A94 7F04BF64 C4440008 */ lwc1 $f4, 8($v0)
/* 080A98 7F04BF68 0FC1E111 */ jal sub_GAME_7F078444 /* 080A98 7F04BF68 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 080A9C 7F04BF6C E7A4004C */ swc1 $f4, 0x4c($sp) /* 080A9C 7F04BF6C E7A4004C */ swc1 $f4, 0x4c($sp)
/* 080AA0 7F04BF70 00402025 */ move $a0, $v0 /* 080AA0 7F04BF70 00402025 */ move $a0, $v0
/* 080AA4 7F04BF74 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place /* 080AA4 7F04BF74 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
@@ -22496,7 +22496,7 @@ glabel sub_GAME_7F04C130
/* 081374 7F04C844 8FA400F8 */ lw $a0, 0xf8($sp) /* 081374 7F04C844 8FA400F8 */ lw $a0, 0xf8($sp)
/* 081378 7F04C848 240E001F */ li $t6, 31 /* 081378 7F04C848 240E001F */ li $t6, 31
/* 08137C 7F04C84C AFA20058 */ sw $v0, 0x58($sp) /* 08137C 7F04C84C AFA20058 */ sw $v0, 0x58($sp)
/* 081380 7F04C850 0FC1E111 */ jal sub_GAME_7F078444 /* 081380 7F04C850 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 081384 7F04C854 AFAE0054 */ sw $t6, 0x54($sp) /* 081384 7F04C854 AFAE0054 */ sw $t6, 0x54($sp)
/* 081388 7F04C858 00402025 */ move $a0, $v0 /* 081388 7F04C858 00402025 */ move $a0, $v0
/* 08138C 7F04C85C 8FA50058 */ lw $a1, 0x58($sp) /* 08138C 7F04C85C 8FA50058 */ lw $a1, 0x58($sp)
@@ -24256,7 +24256,7 @@ glabel sub_GAME_7F04DE18
/* 082988 7F04DE58 8D230004 */ lw $v1, 4($t1) /* 082988 7F04DE58 8D230004 */ lw $v1, 4($t1)
/* 08298C 7F04DE5C 0FC1B198 */ jal sub_GAME_7F06C660 /* 08298C 7F04DE5C 0FC1B198 */ jal sub_GAME_7F06C660
/* 082990 7F04DE60 AFA30088 */ sw $v1, 0x88($sp) /* 082990 7F04DE60 AFA30088 */ sw $v1, 0x88($sp)
/* 082994 7F04DE64 0FC1E111 */ jal sub_GAME_7F078444 /* 082994 7F04DE64 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 082998 7F04DE68 AFA20084 */ sw $v0, 0x84($sp) /* 082998 7F04DE68 AFA20084 */ sw $v0, 0x84($sp)
/* 08299C 7F04DE6C 00402025 */ move $a0, $v0 /* 08299C 7F04DE6C 00402025 */ move $a0, $v0
/* 0829A0 7F04DE70 8FA50084 */ lw $a1, 0x84($sp) /* 0829A0 7F04DE70 8FA50084 */ lw $a1, 0x84($sp)
@@ -24818,7 +24818,7 @@ glabel maybe_detonate_object
/* 08303C 7F04E50C AFA600C0 */ sw $a2, 0xc0($sp) /* 08303C 7F04E50C AFA600C0 */ sw $a2, 0xc0($sp)
/* 083040 7F04E510 8FA600C0 */ lw $a2, 0xc0($sp) /* 083040 7F04E510 8FA600C0 */ lw $a2, 0xc0($sp)
/* 083044 7F04E514 8E050010 */ lw $a1, 0x10($s0) /* 083044 7F04E514 8E050010 */ lw $a1, 0x10($s0)
/* 083048 7F04E518 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 083048 7F04E518 0FC0E969 */ jal attachNewChild
/* 08304C 7F04E51C 8CC40010 */ lw $a0, 0x10($a2) /* 08304C 7F04E51C 8CC40010 */ lw $a0, 0x10($a2)
/* 083050 7F04E520 10000008 */ b .L7F04E544 /* 083050 7F04E520 10000008 */ b .L7F04E544
/* 083054 7F04E524 92020003 */ lbu $v0, 3($s0) /* 083054 7F04E524 92020003 */ lbu $v0, 3($s0)
@@ -25288,7 +25288,7 @@ glabel sub_GAME_7F04EA68
/* 083660 7F04EB30 AFA3005C */ sw $v1, 0x5c($sp) /* 083660 7F04EB30 AFA3005C */ sw $v1, 0x5c($sp)
/* 083664 7F04EB34 46080482 */ mul.s $f18, $f0, $f8 /* 083664 7F04EB34 46080482 */ mul.s $f18, $f0, $f8
/* 083668 7F04EB38 46123281 */ sub.s $f10, $f6, $f18 /* 083668 7F04EB38 46123281 */ sub.s $f10, $f6, $f18
/* 08366C 7F04EB3C 0FC1E111 */ jal sub_GAME_7F078444 /* 08366C 7F04EB3C 0FC1E111 */ jal currentPlayerGetMatrix10D4
/* 083670 7F04EB40 E7AA0068 */ swc1 $f10, 0x68($sp) /* 083670 7F04EB40 E7AA0068 */ swc1 $f10, 0x68($sp)
/* 083674 7F04EB44 00402025 */ move $a0, $v0 /* 083674 7F04EB44 00402025 */ move $a0, $v0
/* 083678 7F04EB48 0FC1611D */ jal matrix_4x4_transform_vector_in_place /* 083678 7F04EB48 0FC1611D */ jal matrix_4x4_transform_vector_in_place
@@ -26492,14 +26492,14 @@ void prepare_ammo_type_collection_text(u8 *finaltext, AMMOTYPES ammotype, u32 qu
if (j_text_trigger != 0) if (j_text_trigger != 0)
{ {
apped_text_ammotype(finaltext,ammotype,quantity); apped_text_ammotype(finaltext,ammotype,quantity);
if (get_num_players() < 3) if (getPlayerCount() < 3)
{ {
append_text_picked_up(finaltext, ammotype, quantity); append_text_picked_up(finaltext, ammotype, quantity);
} }
string_append_from_obseg_textbank(finaltext, (char *)D_800529D0); string_append_from_obseg_textbank(finaltext, (char *)D_800529D0);
return; return;
} }
if (get_num_players() < 3) if (getPlayerCount() < 3)
{ {
append_text_picked_up(finaltext, ammotype, quantity); append_text_picked_up(finaltext, ammotype, quantity);
append_text_ammo_amount_word(finaltext, ammotype, quantity); append_text_ammo_amount_word(finaltext, ammotype, quantity);
@@ -26527,7 +26527,7 @@ glabel prepare_ammo_type_collection_text
/* 08447C 7F04F94C 00C09025 */ move $s2, $a2 /* 08447C 7F04F94C 00C09025 */ move $s2, $a2
/* 084480 7F04F950 0FC13D03 */ jal apped_text_ammotype /* 084480 7F04F950 0FC13D03 */ jal apped_text_ammotype
/* 084484 7F04F954 00000000 */ nop /* 084484 7F04F954 00000000 */ nop
/* 084488 7F04F958 0FC26919 */ jal get_num_players /* 084488 7F04F958 0FC26919 */ jal getPlayerCount
/* 08448C 7F04F95C 00000000 */ nop /* 08448C 7F04F95C 00000000 */ nop
/* 084490 7F04F960 28410003 */ slti $at, $v0, 3 /* 084490 7F04F960 28410003 */ slti $at, $v0, 3
/* 084494 7F04F964 10200004 */ beqz $at, .L7F04F978 /* 084494 7F04F964 10200004 */ beqz $at, .L7F04F978
@@ -26543,7 +26543,7 @@ glabel prepare_ammo_type_collection_text
/* 0844B8 7F04F988 10000016 */ b .L7F04F9E4 /* 0844B8 7F04F988 10000016 */ b .L7F04F9E4
/* 0844BC 7F04F98C 8FBF0024 */ lw $ra, 0x24($sp) /* 0844BC 7F04F98C 8FBF0024 */ lw $ra, 0x24($sp)
.L7F04F990: .L7F04F990:
/* 0844C0 7F04F990 0FC26919 */ jal get_num_players /* 0844C0 7F04F990 0FC26919 */ jal getPlayerCount
/* 0844C4 7F04F994 00000000 */ nop /* 0844C4 7F04F994 00000000 */ nop
/* 0844C8 7F04F998 28410003 */ slti $at, $v0, 3 /* 0844C8 7F04F998 28410003 */ slti $at, $v0, 3
/* 0844CC 7F04F99C 10200008 */ beqz $at, .L7F04F9C0 /* 0844CC 7F04F99C 10200008 */ beqz $at, .L7F04F9C0
@@ -26791,7 +26791,7 @@ magazine_has_default_ammo_rounds:
/* 0847D4 7F04FCA4 28610002 */ slti $at, $v1, 2 /* 0847D4 7F04FCA4 28610002 */ slti $at, $v1, 2
/* 0847D8 7F04FCA8 5420000F */ bnezl $at, .L7F04FCE8 /* 0847D8 7F04FCA8 5420000F */ bnezl $at, .L7F04FCE8
/* 0847DC 7F04FCAC 8FBF0014 */ lw $ra, 0x14($sp) /* 0847DC 7F04FCAC 8FBF0014 */ lw $ra, 0x14($sp)
/* 0847E0 7F04FCB0 0FC26919 */ jal get_num_players /* 0847E0 7F04FCB0 0FC26919 */ jal getPlayerCount
/* 0847E4 7F04FCB4 AFA3001C */ sw $v1, 0x1c($sp) /* 0847E4 7F04FCB4 AFA3001C */ sw $v1, 0x1c($sp)
/* 0847E8 7F04FCB8 24010001 */ li $at, 1 /* 0847E8 7F04FCB8 24010001 */ li $at, 1
/* 0847EC 7F04FCBC 14410009 */ bne $v0, $at, .L7F04FCE4 /* 0847EC 7F04FCBC 14410009 */ bne $v0, $at, .L7F04FCE4
@@ -26895,7 +26895,7 @@ weapon_has_default_ammo:
/* 0848BC 7F04FD8C 28610002 */ slti $at, $v1, 2 /* 0848BC 7F04FD8C 28610002 */ slti $at, $v1, 2
/* 0848C0 7F04FD90 5420000F */ bnezl $at, .L7F04FDD0 /* 0848C0 7F04FD90 5420000F */ bnezl $at, .L7F04FDD0
/* 0848C4 7F04FD94 00601025 */ move $v0, $v1 /* 0848C4 7F04FD94 00601025 */ move $v0, $v1
/* 0848C8 7F04FD98 0FC26919 */ jal get_num_players /* 0848C8 7F04FD98 0FC26919 */ jal getPlayerCount
/* 0848CC 7F04FD9C AFA30018 */ sw $v1, 0x18($sp) /* 0848CC 7F04FD9C AFA30018 */ sw $v1, 0x18($sp)
/* 0848D0 7F04FDA0 24010001 */ li $at, 1 /* 0848D0 7F04FDA0 24010001 */ li $at, 1
/* 0848D4 7F04FDA4 14410009 */ bne $v0, $at, .L7F04FDCC /* 0848D4 7F04FDA4 14410009 */ bne $v0, $at, .L7F04FDCC
@@ -26933,7 +26933,7 @@ void generate_language_specific_text_for_weapon(char *finalstring,ITEM_IDS itemt
morethan2players = false; morethan2players = false;
if (j_text_trigger == 0) { if (j_text_trigger == 0) {
numplayers = get_num_players(); numplayers = getPlayerCount();
if ((int)numplayers < 3) { if ((int)numplayers < 3) {
textfiletext = get_textptr_for_textID(0xa400); textfiletext = get_textptr_for_textID(0xa400);
textpointer_load_parse_something(finalstring,textfiletext); textpointer_load_parse_something(finalstring,textfiletext);
@@ -26941,7 +26941,7 @@ void generate_language_specific_text_for_weapon(char *finalstring,ITEM_IDS itemt
} }
else { else {
textpointer_load_parse_something(finalstring,""); textpointer_load_parse_something(finalstring,"");
numplayers = get_num_players(); numplayers = getPlayerCount();
if (2 < (int)numplayers) { if (2 < (int)numplayers) {
morethan2players = true; morethan2players = true;
} }
@@ -27194,7 +27194,7 @@ glabel generate_language_specific_text_for_weapon
/* 084934 7F04FE04 3C058005 */ lui $a1, %hi(D_80052A3C) /* 084934 7F04FE04 3C058005 */ lui $a1, %hi(D_80052A3C)
/* 084938 7F04FE08 0C0029DC */ jal textpointer_load_parse_something /* 084938 7F04FE08 0C0029DC */ jal textpointer_load_parse_something
/* 08493C 7F04FE0C 24A52A3C */ addiu $a1, %lo(D_80052A3C) # addiu $a1, $a1, 0x2a3c /* 08493C 7F04FE0C 24A52A3C */ addiu $a1, %lo(D_80052A3C) # addiu $a1, $a1, 0x2a3c
/* 084940 7F04FE10 0FC26919 */ jal get_num_players /* 084940 7F04FE10 0FC26919 */ jal getPlayerCount
/* 084944 7F04FE14 00000000 */ nop /* 084944 7F04FE14 00000000 */ nop
/* 084948 7F04FE18 28410003 */ slti $at, $v0, 3 /* 084948 7F04FE18 28410003 */ slti $at, $v0, 3
/* 08494C 7F04FE1C 1420000D */ bnez $at, .L7F04FE54 /* 08494C 7F04FE1C 1420000D */ bnez $at, .L7F04FE54
@@ -27202,7 +27202,7 @@ glabel generate_language_specific_text_for_weapon
/* 084954 7F04FE24 1000000B */ b .L7F04FE54 /* 084954 7F04FE24 1000000B */ b .L7F04FE54
/* 084958 7F04FE28 AFAF0024 */ sw $t7, 0x24($sp) /* 084958 7F04FE28 AFAF0024 */ sw $t7, 0x24($sp)
.L7F04FE2C: .L7F04FE2C:
/* 08495C 7F04FE2C 0FC26919 */ jal get_num_players /* 08495C 7F04FE2C 0FC26919 */ jal getPlayerCount
/* 084960 7F04FE30 00000000 */ nop /* 084960 7F04FE30 00000000 */ nop
/* 084964 7F04FE34 28410003 */ slti $at, $v0, 3 /* 084964 7F04FE34 28410003 */ slti $at, $v0, 3
/* 084968 7F04FE38 50200007 */ beql $at, $zero, .L7F04FE58 /* 084968 7F04FE38 50200007 */ beql $at, $zero, .L7F04FE58
@@ -27652,7 +27652,7 @@ interact_ammobox_object:
/* 084E84 7F050354 96050082 */ lhu $a1, 0x82($s0) /* 084E84 7F050354 96050082 */ lhu $a1, 0x82($s0)
/* 084E88 7F050358 AFA4004C */ sw $a0, 0x4c($sp) /* 084E88 7F050358 AFA4004C */ sw $a0, 0x4c($sp)
/* 084E8C 7F05035C AFA30020 */ sw $v1, 0x20($sp) /* 084E8C 7F05035C AFA30020 */ sw $v1, 0x20($sp)
/* 084E90 7F050360 0FC26919 */ jal get_num_players /* 084E90 7F050360 0FC26919 */ jal getPlayerCount
/* 084E94 7F050364 AFA50050 */ sw $a1, 0x50($sp) /* 084E94 7F050364 AFA50050 */ sw $a1, 0x50($sp)
/* 084E98 7F050368 24010001 */ li $at, 1 /* 084E98 7F050368 24010001 */ li $at, 1
/* 084E9C 7F05036C 8FA30020 */ lw $v1, 0x20($sp) /* 084E9C 7F05036C 8FA30020 */ lw $v1, 0x20($sp)
@@ -27830,7 +27830,7 @@ interact_bodyarmor_object:
/* 085110 7F0505E0 8FA4006C */ lw $a0, 0x6c($sp) /* 085110 7F0505E0 8FA4006C */ lw $a0, 0x6c($sp)
/* 085114 7F0505E4 1440000D */ bnez $v0, .L7F05061C /* 085114 7F0505E4 1440000D */ bnez $v0, .L7F05061C
/* 085118 7F0505E8 00402025 */ move $a0, $v0 /* 085118 7F0505E8 00402025 */ move $a0, $v0
/* 08511C 7F0505EC 0FC26919 */ jal get_num_players /* 08511C 7F0505EC 0FC26919 */ jal getPlayerCount
/* 085120 7F0505F0 00000000 */ nop /* 085120 7F0505F0 00000000 */ nop
/* 085124 7F0505F4 28410003 */ slti $at, $v0, 3 /* 085124 7F0505F4 28410003 */ slti $at, $v0, 3
/* 085128 7F0505F8 10200005 */ beqz $at, .L7F050610 /* 085128 7F0505F8 10200005 */ beqz $at, .L7F050610
@@ -28032,7 +28032,7 @@ interact_ammobox_object:
/* 084E84 7F050354 96050082 */ lhu $a1, 0x82($s0) /* 084E84 7F050354 96050082 */ lhu $a1, 0x82($s0)
/* 084E88 7F050358 AFA4004C */ sw $a0, 0x4c($sp) /* 084E88 7F050358 AFA4004C */ sw $a0, 0x4c($sp)
/* 084E8C 7F05035C AFA30020 */ sw $v1, 0x20($sp) /* 084E8C 7F05035C AFA30020 */ sw $v1, 0x20($sp)
/* 084E90 7F050360 0FC26919 */ jal get_num_players /* 084E90 7F050360 0FC26919 */ jal getPlayerCount
/* 084E94 7F050364 AFA50050 */ sw $a1, 0x50($sp) /* 084E94 7F050364 AFA50050 */ sw $a1, 0x50($sp)
/* 084E98 7F050368 24010001 */ li $at, 1 /* 084E98 7F050368 24010001 */ li $at, 1
/* 084E9C 7F05036C 8FA30020 */ lw $v1, 0x20($sp) /* 084E9C 7F05036C 8FA30020 */ lw $v1, 0x20($sp)
@@ -28210,7 +28210,7 @@ interact_bodyarmor_object:
/* 085110 7F0505E0 8FA4006C */ lw $a0, 0x6c($sp) /* 085110 7F0505E0 8FA4006C */ lw $a0, 0x6c($sp)
/* 085114 7F0505E4 1440000D */ bnez $v0, .L7F05061C /* 085114 7F0505E4 1440000D */ bnez $v0, .L7F05061C
/* 085118 7F0505E8 00402025 */ move $a0, $v0 /* 085118 7F0505E8 00402025 */ move $a0, $v0
/* 08511C 7F0505EC 0FC26919 */ jal get_num_players /* 08511C 7F0505EC 0FC26919 */ jal getPlayerCount
/* 085120 7F0505F0 00000000 */ nop /* 085120 7F0505F0 00000000 */ nop
/* 085124 7F0505F4 28410003 */ slti $at, $v0, 3 /* 085124 7F0505F4 28410003 */ slti $at, $v0, 3
/* 085128 7F0505F8 10200005 */ beqz $at, .L7F050610 /* 085128 7F0505F8 10200005 */ beqz $at, .L7F050610
@@ -28566,7 +28566,7 @@ glabel object_collectability_routines
/* 0855A0 7F050A70 1000001A */ b .L7F050ADC /* 0855A0 7F050A70 1000001A */ b .L7F050ADC
/* 0855A4 7F050A74 AFB9005C */ sw $t9, 0x5c($sp) /* 0855A4 7F050A74 AFB9005C */ sw $t9, 0x5c($sp)
.L7F050A78: .L7F050A78:
/* 0855A8 7F050A78 0FC26919 */ jal get_num_players /* 0855A8 7F050A78 0FC26919 */ jal getPlayerCount
/* 0855AC 7F050A7C 00000000 */ nop /* 0855AC 7F050A7C 00000000 */ nop
/* 0855B0 7F050A80 28410002 */ slti $at, $v0, 2 /* 0855B0 7F050A80 28410002 */ slti $at, $v0, 2
/* 0855B4 7F050A84 54200016 */ bnezl $at, .L7F050AE0 /* 0855B4 7F050A84 54200016 */ bnezl $at, .L7F050AE0
@@ -29108,7 +29108,7 @@ glabel object_collectability_routines
/* 085AE4 7F050F74 10000019 */ b .Ljp7F050FDC /* 085AE4 7F050F74 10000019 */ b .Ljp7F050FDC
/* 085AE8 7F050F78 AFAF0064 */ sw $t7, 0x64($sp) /* 085AE8 7F050F78 AFAF0064 */ sw $t7, 0x64($sp)
.Ljp7F050F7C: .Ljp7F050F7C:
/* 085AEC 7F050F7C 0FC26C01 */ jal get_num_players /* 085AEC 7F050F7C 0FC26C01 */ jal getPlayerCount
/* 085AF0 7F050F80 00000000 */ nop /* 085AF0 7F050F80 00000000 */ nop
/* 085AF4 7F050F84 28410002 */ slti $at, $v0, 2 /* 085AF4 7F050F84 28410002 */ slti $at, $v0, 2
/* 085AF8 7F050F88 54200015 */ bnezl $at, .Ljp7F050FE0 /* 085AF8 7F050F88 54200015 */ bnezl $at, .Ljp7F050FE0
@@ -29534,7 +29534,7 @@ glabel sub_GAME_7F050F50
/* 085B24 7F050FF4 8D090008 */ lw $t1, 8($t0) /* 085B24 7F050FF4 8D090008 */ lw $t1, 8($t0)
/* 085B28 7F050FF8 8D2A0018 */ lw $t2, 0x18($t1) /* 085B28 7F050FF8 8D2A0018 */ lw $t2, 0x18($t1)
/* 085B2C 7F050FFC AD6A001C */ sw $t2, 0x1c($t3) /* 085B2C 7F050FFC AD6A001C */ sw $t2, 0x1c($t3)
/* 085B30 7F051000 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 085B30 7F051000 0FC0E969 */ jal attachNewChild
/* 085B34 7F051004 8C450018 */ lw $a1, 0x18($v0) /* 085B34 7F051004 8C450018 */ lw $a1, 0x18($v0)
/* 085B38 7F051008 8FAC0024 */ lw $t4, 0x24($sp) /* 085B38 7F051008 8FAC0024 */ lw $t4, 0x24($sp)
/* 085B3C 7F05100C AD9101D8 */ sw $s1, 0x1d8($t4) /* 085B3C 7F05100C AD9101D8 */ sw $s1, 0x1d8($t4)
@@ -30883,7 +30883,7 @@ glabel sub_GAME_7F051E1C
/* 086A3C 7F051F0C 10000004 */ b .L7F051F20 /* 086A3C 7F051F0C 10000004 */ b .L7F051F20
/* 086A40 7F051F10 00001025 */ move $v0, $zero /* 086A40 7F051F10 00001025 */ move $v0, $zero
.L7F051F14: .L7F051F14:
/* 086A44 7F051F14 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 086A44 7F051F14 0FC0E969 */ jal attachNewChild
/* 086A48 7F051F18 8CE50018 */ lw $a1, 0x18($a3) /* 086A48 7F051F18 8CE50018 */ lw $a1, 0x18($a3)
/* 086A4C 7F051F1C 24020001 */ li $v0, 1 /* 086A4C 7F051F1C 24020001 */ li $v0, 1
.L7F051F20: .L7F051F20:
@@ -33004,11 +33004,11 @@ glabel sub_GAME_7F053894
/* 0883E0 7F0538B0 AFB20024 */ sw $s2, 0x24($sp) /* 0883E0 7F0538B0 AFB20024 */ sw $s2, 0x24($sp)
/* 0883E4 7F0538B4 AFB0001C */ sw $s0, 0x1c($sp) /* 0883E4 7F0538B4 AFB0001C */ sw $s0, 0x1c($sp)
/* 0883E8 7F0538B8 AFA50034 */ sw $a1, 0x34($sp) /* 0883E8 7F0538B8 AFA50034 */ sw $a1, 0x34($sp)
/* 0883EC 7F0538BC 0FC26919 */ jal get_num_players /* 0883EC 7F0538BC 0FC26919 */ jal getPlayerCount
/* 0883F0 7F0538C0 C7B40038 */ lwc1 $f20, 0x38($sp) /* 0883F0 7F0538C0 C7B40038 */ lwc1 $f20, 0x38($sp)
/* 0883F4 7F0538C4 1840001D */ blez $v0, .L7F05393C /* 0883F4 7F0538C4 1840001D */ blez $v0, .L7F05393C
/* 0883F8 7F0538C8 3C0E8008 */ lui $t6, %hi(ptr_BONDdata_p1) /* 0883F8 7F0538C8 3C0E8008 */ lui $t6, %hi(players)
/* 0883FC 7F0538CC 25D09EE0 */ addiu $s0, $t6, %lo(ptr_BONDdata_p1) /* 0883FC 7F0538CC 25D09EE0 */ addiu $s0, $t6, %lo(players)
/* 088400 7F0538D0 00027880 */ sll $t7, $v0, 2 /* 088400 7F0538D0 00027880 */ sll $t7, $v0, 2
/* 088404 7F0538D4 01F09021 */ addu $s2, $t7, $s0 /* 088404 7F0538D4 01F09021 */ addu $s2, $t7, $s0
/* 088408 7F0538D8 8E180000 */ lw $t8, ($s0) /* 088408 7F0538D8 8E180000 */ lw $t8, ($s0)
@@ -34777,7 +34777,7 @@ glabel sub_GAME_7F054C58
/* 0897A8 7F054C78 8FBF0014 */ lw $ra, 0x14($sp) /* 0897A8 7F054C78 8FBF0014 */ lw $ra, 0x14($sp)
/* 0897AC 7F054C7C 0FC227F5 */ jal get_BONDdata_position /* 0897AC 7F054C7C 0FC227F5 */ jal get_BONDdata_position
/* 0897B0 7F054C80 AFA20030 */ sw $v0, 0x30($sp) /* 0897B0 7F054C80 AFA20030 */ sw $v0, 0x30($sp)
/* 0897B4 7F054C84 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 0897B4 7F054C84 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 0897B8 7F054C88 AFA2001C */ sw $v0, 0x1c($sp) /* 0897B8 7F054C88 AFA2001C */ sw $v0, 0x1c($sp)
/* 0897BC 7F054C8C 8FA3001C */ lw $v1, 0x1c($sp) /* 0897BC 7F054C8C 8FA3001C */ lw $v1, 0x1c($sp)
/* 0897C0 7F054C90 8FA50038 */ lw $a1, 0x38($sp) /* 0897C0 7F054C90 8FA50038 */ lw $a1, 0x38($sp)
@@ -36718,11 +36718,11 @@ glabel sub_GAME_7F056210
/* 08AE3C 7F05630C AFA8003C */ sw $t0, 0x3c($sp) /* 08AE3C 7F05630C AFA8003C */ sw $t0, 0x3c($sp)
/* 08AE40 7F056310 0FC2B366 */ jal microcode_constructor /* 08AE40 7F056310 0FC2B366 */ jal microcode_constructor
/* 08AE44 7F056314 02202025 */ move $a0, $s1 /* 08AE44 7F056314 02202025 */ move $a0, $s1
/* 08AE48 7F056318 0C001149 */ jal get_video2_settings_uly /* 08AE48 7F056318 0C001149 */ jal viGetViewTop
/* 08AE4C 7F05631C 00408825 */ move $s1, $v0 /* 08AE4C 7F05631C 00408825 */ move $s1, $v0
/* 08AE50 7F056320 00028400 */ sll $s0, $v0, 0x10 /* 08AE50 7F056320 00028400 */ sll $s0, $v0, 0x10
/* 08AE54 7F056324 00105403 */ sra $t2, $s0, 0x10 /* 08AE54 7F056324 00105403 */ sra $t2, $s0, 0x10
/* 08AE58 7F056328 0C00112B */ jal get_video2_settings_height /* 08AE58 7F056328 0C00112B */ jal viGetViewHeight
/* 08AE5C 7F05632C 01408025 */ move $s0, $t2 /* 08AE5C 7F05632C 01408025 */ move $s0, $t2
/* 08AE60 7F056330 8FA50044 */ lw $a1, 0x44($sp) /* 08AE60 7F056330 8FA50044 */ lw $a1, 0x44($sp)
/* 08AE64 7F056334 24010064 */ li $at, 100 /* 08AE64 7F056334 24010064 */ li $at, 100
@@ -36742,11 +36742,11 @@ glabel sub_GAME_7F056210
/* 08AE9C 7F05636C 24060082 */ li $a2, 130 /* 08AE9C 7F05636C 24060082 */ li $a2, 130
/* 08AEA0 7F056370 0FC1A723 */ jal display_ammo_total_in_a1 /* 08AEA0 7F056370 0FC1A723 */ jal display_ammo_total_in_a1
/* 08AEA4 7F056374 24070002 */ li $a3, 2 /* 08AEA4 7F056374 24070002 */ li $a3, 2
/* 08AEA8 7F056378 0C001149 */ jal get_video2_settings_uly /* 08AEA8 7F056378 0C001149 */ jal viGetViewTop
/* 08AEAC 7F05637C 00408825 */ move $s1, $v0 /* 08AEAC 7F05637C 00408825 */ move $s1, $v0
/* 08AEB0 7F056380 00028400 */ sll $s0, $v0, 0x10 /* 08AEB0 7F056380 00028400 */ sll $s0, $v0, 0x10
/* 08AEB4 7F056384 0010C403 */ sra $t8, $s0, 0x10 /* 08AEB4 7F056384 0010C403 */ sra $t8, $s0, 0x10
/* 08AEB8 7F056388 0C00112B */ jal get_video2_settings_height /* 08AEB8 7F056388 0C00112B */ jal viGetViewHeight
/* 08AEBC 7F05638C 03008025 */ move $s0, $t8 /* 08AEBC 7F05638C 03008025 */ move $s0, $t8
/* 08AEC0 7F056390 8FA50044 */ lw $a1, 0x44($sp) /* 08AEC0 7F056390 8FA50044 */ lw $a1, 0x44($sp)
/* 08AEC4 7F056394 2401000A */ li $at, 10 /* 08AEC4 7F056394 2401000A */ li $at, 10
@@ -36763,11 +36763,11 @@ glabel sub_GAME_7F056210
/* 08AEF0 7F0563C0 2406008A */ li $a2, 138 /* 08AEF0 7F0563C0 2406008A */ li $a2, 138
/* 08AEF4 7F0563C4 0FC1A723 */ jal display_ammo_total_in_a1 /* 08AEF4 7F0563C4 0FC1A723 */ jal display_ammo_total_in_a1
/* 08AEF8 7F0563C8 24070002 */ li $a3, 2 /* 08AEF8 7F0563C8 24070002 */ li $a3, 2
/* 08AEFC 7F0563CC 0C001149 */ jal get_video2_settings_uly /* 08AEFC 7F0563CC 0C001149 */ jal viGetViewTop
/* 08AF00 7F0563D0 00408825 */ move $s1, $v0 /* 08AF00 7F0563D0 00408825 */ move $s1, $v0
/* 08AF04 7F0563D4 00028400 */ sll $s0, $v0, 0x10 /* 08AF04 7F0563D4 00028400 */ sll $s0, $v0, 0x10
/* 08AF08 7F0563D8 00107403 */ sra $t6, $s0, 0x10 /* 08AF08 7F0563D8 00107403 */ sra $t6, $s0, 0x10
/* 08AF0C 7F0563DC 0C00112B */ jal get_video2_settings_height /* 08AF0C 7F0563DC 0C00112B */ jal viGetViewHeight
/* 08AF10 7F0563E0 01C08025 */ move $s0, $t6 /* 08AF10 7F0563E0 01C08025 */ move $s0, $t6
/* 08AF14 7F0563E4 00506821 */ addu $t5, $v0, $s0 /* 08AF14 7F0563E4 00506821 */ addu $t5, $v0, $s0
/* 08AF18 7F0563E8 25AFFFEE */ addiu $t7, $t5, -0x12 /* 08AF18 7F0563E8 25AFFFEE */ addiu $t7, $t5, -0x12
@@ -36782,11 +36782,11 @@ glabel sub_GAME_7F056210
/* 08AF3C 7F05640C 24060093 */ li $a2, 147 /* 08AF3C 7F05640C 24060093 */ li $a2, 147
/* 08AF40 7F056410 0FC1A694 */ jal some_kind_of_display_routine /* 08AF40 7F056410 0FC1A694 */ jal some_kind_of_display_routine
/* 08AF44 7F056414 24070002 */ li $a3, 2 /* 08AF44 7F056414 24070002 */ li $a3, 2
/* 08AF48 7F056418 0C001149 */ jal get_video2_settings_uly /* 08AF48 7F056418 0C001149 */ jal viGetViewTop
/* 08AF4C 7F05641C 00408825 */ move $s1, $v0 /* 08AF4C 7F05641C 00408825 */ move $s1, $v0
/* 08AF50 7F056420 00028400 */ sll $s0, $v0, 0x10 /* 08AF50 7F056420 00028400 */ sll $s0, $v0, 0x10
/* 08AF54 7F056424 00104C03 */ sra $t1, $s0, 0x10 /* 08AF54 7F056424 00104C03 */ sra $t1, $s0, 0x10
/* 08AF58 7F056428 0C00112B */ jal get_video2_settings_height /* 08AF58 7F056428 0C00112B */ jal viGetViewHeight
/* 08AF5C 7F05642C 01208025 */ move $s0, $t1 /* 08AF5C 7F05642C 01208025 */ move $s0, $t1
/* 08AF60 7F056430 8FA50040 */ lw $a1, 0x40($sp) /* 08AF60 7F056430 8FA50040 */ lw $a1, 0x40($sp)
/* 08AF64 7F056434 2401003C */ li $at, 60 /* 08AF64 7F056434 2401003C */ li $at, 60
@@ -36806,11 +36806,11 @@ glabel sub_GAME_7F056210
/* 08AF9C 7F05646C 2406009C */ li $a2, 156 /* 08AF9C 7F05646C 2406009C */ li $a2, 156
/* 08AFA0 7F056470 0FC1A723 */ jal display_ammo_total_in_a1 /* 08AFA0 7F056470 0FC1A723 */ jal display_ammo_total_in_a1
/* 08AFA4 7F056474 24070002 */ li $a3, 2 /* 08AFA4 7F056474 24070002 */ li $a3, 2
/* 08AFA8 7F056478 0C001149 */ jal get_video2_settings_uly /* 08AFA8 7F056478 0C001149 */ jal viGetViewTop
/* 08AFAC 7F05647C 00408825 */ move $s1, $v0 /* 08AFAC 7F05647C 00408825 */ move $s1, $v0
/* 08AFB0 7F056480 00028400 */ sll $s0, $v0, 0x10 /* 08AFB0 7F056480 00028400 */ sll $s0, $v0, 0x10
/* 08AFB4 7F056484 00107C03 */ sra $t7, $s0, 0x10 /* 08AFB4 7F056484 00107C03 */ sra $t7, $s0, 0x10
/* 08AFB8 7F056488 0C00112B */ jal get_video2_settings_height /* 08AFB8 7F056488 0C00112B */ jal viGetViewHeight
/* 08AFBC 7F05648C 01E08025 */ move $s0, $t7 /* 08AFBC 7F05648C 01E08025 */ move $s0, $t7
/* 08AFC0 7F056490 8FA50040 */ lw $a1, 0x40($sp) /* 08AFC0 7F056490 8FA50040 */ lw $a1, 0x40($sp)
/* 08AFC4 7F056494 2401000A */ li $at, 10 /* 08AFC4 7F056494 2401000A */ li $at, 10
@@ -36827,11 +36827,11 @@ glabel sub_GAME_7F056210
/* 08AFF0 7F0564C0 240600A4 */ li $a2, 164 /* 08AFF0 7F0564C0 240600A4 */ li $a2, 164
/* 08AFF4 7F0564C4 0FC1A723 */ jal display_ammo_total_in_a1 /* 08AFF4 7F0564C4 0FC1A723 */ jal display_ammo_total_in_a1
/* 08AFF8 7F0564C8 24070002 */ li $a3, 2 /* 08AFF8 7F0564C8 24070002 */ li $a3, 2
/* 08AFFC 7F0564CC 0C001149 */ jal get_video2_settings_uly /* 08AFFC 7F0564CC 0C001149 */ jal viGetViewTop
/* 08B000 7F0564D0 00408825 */ move $s1, $v0 /* 08B000 7F0564D0 00408825 */ move $s1, $v0
/* 08B004 7F0564D4 00028400 */ sll $s0, $v0, 0x10 /* 08B004 7F0564D4 00028400 */ sll $s0, $v0, 0x10
/* 08B008 7F0564D8 00105C03 */ sra $t3, $s0, 0x10 /* 08B008 7F0564D8 00105C03 */ sra $t3, $s0, 0x10
/* 08B00C 7F0564DC 0C00112B */ jal get_video2_settings_height /* 08B00C 7F0564DC 0C00112B */ jal viGetViewHeight
/* 08B010 7F0564E0 01608025 */ move $s0, $t3 /* 08B010 7F0564E0 01608025 */ move $s0, $t3
/* 08B014 7F0564E4 00506021 */ addu $t4, $v0, $s0 /* 08B014 7F0564E4 00506021 */ addu $t4, $v0, $s0
/* 08B018 7F0564E8 258EFFEE */ addiu $t6, $t4, -0x12 /* 08B018 7F0564E8 258EFFEE */ addiu $t6, $t4, -0x12
@@ -36846,11 +36846,11 @@ glabel sub_GAME_7F056210
/* 08B03C 7F05650C 240600AD */ li $a2, 173 /* 08B03C 7F05650C 240600AD */ li $a2, 173
/* 08B040 7F056510 0FC1A694 */ jal some_kind_of_display_routine /* 08B040 7F056510 0FC1A694 */ jal some_kind_of_display_routine
/* 08B044 7F056514 24070002 */ li $a3, 2 /* 08B044 7F056514 24070002 */ li $a3, 2
/* 08B048 7F056518 0C001149 */ jal get_video2_settings_uly /* 08B048 7F056518 0C001149 */ jal viGetViewTop
/* 08B04C 7F05651C 00408825 */ move $s1, $v0 /* 08B04C 7F05651C 00408825 */ move $s1, $v0
/* 08B050 7F056520 00028400 */ sll $s0, $v0, 0x10 /* 08B050 7F056520 00028400 */ sll $s0, $v0, 0x10
/* 08B054 7F056524 0010CC03 */ sra $t9, $s0, 0x10 /* 08B054 7F056524 0010CC03 */ sra $t9, $s0, 0x10
/* 08B058 7F056528 0C00112B */ jal get_video2_settings_height /* 08B058 7F056528 0C00112B */ jal viGetViewHeight
/* 08B05C 7F05652C 03208025 */ move $s0, $t9 /* 08B05C 7F05652C 03208025 */ move $s0, $t9
/* 08B060 7F056530 8FA5003C */ lw $a1, 0x3c($sp) /* 08B060 7F056530 8FA5003C */ lw $a1, 0x3c($sp)
/* 08B064 7F056534 24010064 */ li $at, 100 /* 08B064 7F056534 24010064 */ li $at, 100
@@ -36870,11 +36870,11 @@ glabel sub_GAME_7F056210
/* 08B09C 7F05656C 240600B6 */ li $a2, 182 /* 08B09C 7F05656C 240600B6 */ li $a2, 182
/* 08B0A0 7F056570 0FC1A723 */ jal display_ammo_total_in_a1 /* 08B0A0 7F056570 0FC1A723 */ jal display_ammo_total_in_a1
/* 08B0A4 7F056574 24070002 */ li $a3, 2 /* 08B0A4 7F056574 24070002 */ li $a3, 2
/* 08B0A8 7F056578 0C001149 */ jal get_video2_settings_uly /* 08B0A8 7F056578 0C001149 */ jal viGetViewTop
/* 08B0AC 7F05657C 00408825 */ move $s1, $v0 /* 08B0AC 7F05657C 00408825 */ move $s1, $v0
/* 08B0B0 7F056580 00028400 */ sll $s0, $v0, 0x10 /* 08B0B0 7F056580 00028400 */ sll $s0, $v0, 0x10
/* 08B0B4 7F056584 00107403 */ sra $t6, $s0, 0x10 /* 08B0B4 7F056584 00107403 */ sra $t6, $s0, 0x10
/* 08B0B8 7F056588 0C00112B */ jal get_video2_settings_height /* 08B0B8 7F056588 0C00112B */ jal viGetViewHeight
/* 08B0BC 7F05658C 01C08025 */ move $s0, $t6 /* 08B0BC 7F05658C 01C08025 */ move $s0, $t6
/* 08B0C0 7F056590 8FA5003C */ lw $a1, 0x3c($sp) /* 08B0C0 7F056590 8FA5003C */ lw $a1, 0x3c($sp)
/* 08B0C4 7F056594 2401000A */ li $at, 10 /* 08B0C4 7F056594 2401000A */ li $at, 10
+4 -4
View File
@@ -760,7 +760,7 @@ debug_collisions:
/* 0C540C 7F0908DC 10000166 */ b .L7F090E78 /* 0C540C 7F0908DC 10000166 */ b .L7F090E78
/* 0C5410 7F0908E0 8FB80018 */ lw $t8, 0x18($sp) /* 0C5410 7F0908E0 8FB80018 */ lw $t8, 0x18($sp)
debug_allguns: debug_allguns:
/* 0C5414 7F0908E4 0FC26919 */ jal get_num_players /* 0C5414 7F0908E4 0FC26919 */ jal getPlayerCount
/* 0C5418 7F0908E8 AFA0005C */ sw $zero, 0x5c($sp) /* 0C5418 7F0908E8 AFA0005C */ sw $zero, 0x5c($sp)
/* 0C541C 7F0908EC 58400162 */ blezl $v0, .L7F090E78 /* 0C541C 7F0908EC 58400162 */ blezl $v0, .L7F090E78
/* 0C5420 7F0908F0 8FB80018 */ lw $t8, 0x18($sp) /* 0C5420 7F0908F0 8FB80018 */ lw $t8, 0x18($sp)
@@ -773,7 +773,7 @@ debug_allguns:
/* 0C5438 7F090908 2C440001 */ sltiu $a0, $v0, 1 /* 0C5438 7F090908 2C440001 */ sltiu $a0, $v0, 1
/* 0C543C 7F09090C 8FAA005C */ lw $t2, 0x5c($sp) /* 0C543C 7F09090C 8FAA005C */ lw $t2, 0x5c($sp)
/* 0C5440 7F090910 254B0001 */ addiu $t3, $t2, 1 /* 0C5440 7F090910 254B0001 */ addiu $t3, $t2, 1
/* 0C5444 7F090914 0FC26919 */ jal get_num_players /* 0C5444 7F090914 0FC26919 */ jal getPlayerCount
/* 0C5448 7F090918 AFAB005C */ sw $t3, 0x5c($sp) /* 0C5448 7F090918 AFAB005C */ sw $t3, 0x5c($sp)
/* 0C544C 7F09091C 8FAC005C */ lw $t4, 0x5c($sp) /* 0C544C 7F09091C 8FAC005C */ lw $t4, 0x5c($sp)
/* 0C5450 7F090920 0182082A */ slt $at, $t4, $v0 /* 0C5450 7F090920 0182082A */ slt $at, $t4, $v0
@@ -785,7 +785,7 @@ debug_maxammo:
/* 0C5464 7F090934 0FC26C54 */ jal get_cur_playernum /* 0C5464 7F090934 0FC26C54 */ jal get_cur_playernum
/* 0C5468 7F090938 00000000 */ nop /* 0C5468 7F090938 00000000 */ nop
/* 0C546C 7F09093C AFA20054 */ sw $v0, 0x54($sp) /* 0C546C 7F09093C AFA20054 */ sw $v0, 0x54($sp)
/* 0C5470 7F090940 0FC26919 */ jal get_num_players /* 0C5470 7F090940 0FC26919 */ jal getPlayerCount
/* 0C5474 7F090944 AFA00058 */ sw $zero, 0x58($sp) /* 0C5474 7F090944 AFA00058 */ sw $zero, 0x58($sp)
/* 0C5478 7F090948 1840000D */ blez $v0, .L7F090980 /* 0C5478 7F090948 1840000D */ blez $v0, .L7F090980
/* 0C547C 7F09094C 00000000 */ nop /* 0C547C 7F09094C 00000000 */ nop
@@ -796,7 +796,7 @@ debug_maxammo:
/* 0C548C 7F09095C 00000000 */ nop /* 0C548C 7F09095C 00000000 */ nop
/* 0C5490 7F090960 8FAD0058 */ lw $t5, 0x58($sp) /* 0C5490 7F090960 8FAD0058 */ lw $t5, 0x58($sp)
/* 0C5494 7F090964 25AE0001 */ addiu $t6, $t5, 1 /* 0C5494 7F090964 25AE0001 */ addiu $t6, $t5, 1
/* 0C5498 7F090968 0FC26919 */ jal get_num_players /* 0C5498 7F090968 0FC26919 */ jal getPlayerCount
/* 0C549C 7F09096C AFAE0058 */ sw $t6, 0x58($sp) /* 0C549C 7F09096C AFAE0058 */ sw $t6, 0x58($sp)
/* 0C54A0 7F090970 8FAF0058 */ lw $t7, 0x58($sp) /* 0C54A0 7F090970 8FAF0058 */ lw $t7, 0x58($sp)
/* 0C54A4 7F090974 01E2082A */ slt $at, $t7, $v0 /* 0C54A4 7F090974 01E2082A */ slt $at, $t7, $v0
+15 -15
View File
@@ -52,20 +52,20 @@ void set_vtx_gfx_mem_alloc(void) {
if (check_token(1, "-mgfx") != 0) if (check_token(1, "-mgfx") != 0)
{ {
dyn_c_debug_notice_list_entry[get_num_players()] = strtol(check_token(1, "-mgfx"), 0, 0) << 0xa; dyn_c_debug_notice_list_entry[getPlayerCount()] = strtol(check_token(1, "-mgfx"), 0, 0) << 0xa;
} }
if (check_token(1, "-mvtx") != 0) if (check_token(1, "-mvtx") != 0)
{ {
D_800482F0[get_num_players()] = strtol(check_token(1, "-mvtx"), 0, 0) << 0xa; D_800482F0[getPlayerCount()] = strtol(check_token(1, "-mvtx"), 0, 0) << 0xa;
} }
mempAllocBytesInBank(dyn_c_debug_notice_list_entry[sVar1] << 1, 4); mempAllocBytesInBank(dyn_c_debug_notice_list_entry[sVar1] << 1, 4);
ptr_mgfx0_alloc_start.unk4 = (s32) ((0x80050000 + (get_num_players() * 4))->unk-7D20 + ptr_mgfx0_alloc_start); ptr_mgfx0_alloc_start.unk4 = (s32) ((0x80050000 + (getPlayerCount() * 4))->unk-7D20 + ptr_mgfx0_alloc_start);
ptr_mgfx0_alloc_start.unk8 = (s32) ((0x80050000 + (get_num_players() * 4))->unk-7D20 + ptr_mgfx0_alloc_start.unk4); ptr_mgfx0_alloc_start.unk8 = (s32) ((0x80050000 + (getPlayerCount() * 4))->unk-7D20 + ptr_mgfx0_alloc_start.unk4);
ptr_mvtx0_alloc_start = mempAllocBytesInBank(((0x80050000 + (get_num_players() * 4))->unk-7D10 * 2), 4); ptr_mvtx0_alloc_start = mempAllocBytesInBank(((0x80050000 + (getPlayerCount() * 4))->unk-7D10 * 2), 4);
ptr_mvtx0_alloc_start.unk4 = (s32) ((0x80050000 + (get_num_players() * 4))->unk-7D10 + ptr_mvtx0_alloc_start); ptr_mvtx0_alloc_start.unk4 = (s32) ((0x80050000 + (getPlayerCount() * 4))->unk-7D10 + ptr_mvtx0_alloc_start);
temp_ret = get_num_players(); temp_ret = getPlayerCount();
ptr_mvtx0_alloc_start.unk8 = (s32) ((0x80050000 + (temp_ret * 4))->unk-7D10 + ptr_mvtx0_alloc_start.unk4); ptr_mvtx0_alloc_start.unk8 = (s32) ((0x80050000 + (temp_ret * 4))->unk-7D10 + ptr_mvtx0_alloc_start.unk4);
bank_in_mgfx_alloc_table = (u8)0; bank_in_mgfx_alloc_table = (u8)0;
dword_CODE_bss_8008C254 = 0; dword_CODE_bss_8008C254 = 0;
@@ -105,7 +105,7 @@ glabel set_vtx_gfx_mem_alloc
/* 0F1FD0 7F0BD4A0 24040001 */ li $a0, 1 /* 0F1FD0 7F0BD4A0 24040001 */ li $a0, 1
/* 0F1FD4 7F0BD4A4 10400012 */ beqz $v0, .L7F0BD4F0 /* 0F1FD4 7F0BD4A4 10400012 */ beqz $v0, .L7F0BD4F0
/* 0F1FD8 7F0BD4A8 00000000 */ nop /* 0F1FD8 7F0BD4A8 00000000 */ nop
/* 0F1FDC 7F0BD4AC 0FC26919 */ jal get_num_players /* 0F1FDC 7F0BD4AC 0FC26919 */ jal getPlayerCount
/* 0F1FE0 7F0BD4B0 00000000 */ nop /* 0F1FE0 7F0BD4B0 00000000 */ nop
/* 0F1FE4 7F0BD4B4 3C058006 */ lui $a1, %hi(aMgfx_1) /* 0F1FE4 7F0BD4B4 3C058006 */ lui $a1, %hi(aMgfx_1)
/* 0F1FE8 7F0BD4B8 24A5B694 */ addiu $a1, %lo(aMgfx_1) # addiu $a1, $a1, -0x496c /* 0F1FE8 7F0BD4B8 24A5B694 */ addiu $a1, %lo(aMgfx_1) # addiu $a1, $a1, -0x496c
@@ -129,7 +129,7 @@ glabel set_vtx_gfx_mem_alloc
/* 0F202C 7F0BD4FC 24040001 */ li $a0, 1 /* 0F202C 7F0BD4FC 24040001 */ li $a0, 1
/* 0F2030 7F0BD500 10400012 */ beqz $v0, .L7F0BD54C /* 0F2030 7F0BD500 10400012 */ beqz $v0, .L7F0BD54C
/* 0F2034 7F0BD504 00000000 */ nop /* 0F2034 7F0BD504 00000000 */ nop
/* 0F2038 7F0BD508 0FC26919 */ jal get_num_players /* 0F2038 7F0BD508 0FC26919 */ jal getPlayerCount
/* 0F203C 7F0BD50C 00000000 */ nop /* 0F203C 7F0BD50C 00000000 */ nop
/* 0F2040 7F0BD510 3C058006 */ lui $a1, %hi(aMvtx_0) /* 0F2040 7F0BD510 3C058006 */ lui $a1, %hi(aMvtx_0)
/* 0F2044 7F0BD514 24A5B6A4 */ addiu $a1, %lo(aMvtx_0) # addiu $a1, $a1, -0x495c /* 0F2044 7F0BD514 24A5B6A4 */ addiu $a1, %lo(aMvtx_0) # addiu $a1, $a1, -0x495c
@@ -147,7 +147,7 @@ glabel set_vtx_gfx_mem_alloc
/* 0F2074 7F0BD544 00290821 */ addu $at, $at, $t1 /* 0F2074 7F0BD544 00290821 */ addu $at, $at, $t1
/* 0F2078 7F0BD548 AC3982F0 */ sw $t9, %lo(D_800482F0)($at) /* 0F2078 7F0BD548 AC3982F0 */ sw $t9, %lo(D_800482F0)($at)
.L7F0BD54C: .L7F0BD54C:
/* 0F207C 7F0BD54C 0FC26919 */ jal get_num_players /* 0F207C 7F0BD54C 0FC26919 */ jal getPlayerCount
/* 0F2080 7F0BD550 00000000 */ nop /* 0F2080 7F0BD550 00000000 */ nop
/* 0F2084 7F0BD554 00025080 */ sll $t2, $v0, 2 /* 0F2084 7F0BD554 00025080 */ sll $t2, $v0, 2
/* 0F2088 7F0BD558 3C048005 */ lui $a0, %hi(D_800482E0) /* 0F2088 7F0BD558 3C048005 */ lui $a0, %hi(D_800482E0)
@@ -158,7 +158,7 @@ glabel set_vtx_gfx_mem_alloc
/* 0F209C 7F0BD56C 0C0025C8 */ jal mempAllocBytesInBank /* 0F209C 7F0BD56C 0C0025C8 */ jal mempAllocBytesInBank
/* 0F20A0 7F0BD570 01602025 */ move $a0, $t3 /* 0F20A0 7F0BD570 01602025 */ move $a0, $t3
/* 0F20A4 7F0BD574 3C018009 */ lui $at, %hi(ptr_mgfx0_alloc_start) /* 0F20A4 7F0BD574 3C018009 */ lui $at, %hi(ptr_mgfx0_alloc_start)
/* 0F20A8 7F0BD578 0FC26919 */ jal get_num_players /* 0F20A8 7F0BD578 0FC26919 */ jal getPlayerCount
/* 0F20AC 7F0BD57C AC22C230 */ sw $v0, %lo(ptr_mgfx0_alloc_start)($at) /* 0F20AC 7F0BD57C AC22C230 */ sw $v0, %lo(ptr_mgfx0_alloc_start)($at)
/* 0F20B0 7F0BD580 3C038009 */ lui $v1, %hi(ptr_mgfx0_alloc_start) /* 0F20B0 7F0BD580 3C038009 */ lui $v1, %hi(ptr_mgfx0_alloc_start)
/* 0F20B4 7F0BD584 00026080 */ sll $t4, $v0, 2 /* 0F20B4 7F0BD584 00026080 */ sll $t4, $v0, 2
@@ -168,7 +168,7 @@ glabel set_vtx_gfx_mem_alloc
/* 0F20C4 7F0BD594 8C6F0000 */ lw $t7, ($v1) /* 0F20C4 7F0BD594 8C6F0000 */ lw $t7, ($v1)
/* 0F20C8 7F0BD598 8DAD82E0 */ lw $t5, %lo(D_800482E0)($t5) /* 0F20C8 7F0BD598 8DAD82E0 */ lw $t5, %lo(D_800482E0)($t5)
/* 0F20CC 7F0BD59C 01AF7021 */ addu $t6, $t5, $t7 /* 0F20CC 7F0BD59C 01AF7021 */ addu $t6, $t5, $t7
/* 0F20D0 7F0BD5A0 0FC26919 */ jal get_num_players /* 0F20D0 7F0BD5A0 0FC26919 */ jal getPlayerCount
/* 0F20D4 7F0BD5A4 AC6E0004 */ sw $t6, 4($v1) /* 0F20D4 7F0BD5A4 AC6E0004 */ sw $t6, 4($v1)
/* 0F20D8 7F0BD5A8 3C038009 */ lui $v1, %hi(ptr_mgfx0_alloc_start) /* 0F20D8 7F0BD5A8 3C038009 */ lui $v1, %hi(ptr_mgfx0_alloc_start)
/* 0F20DC 7F0BD5AC 0002C080 */ sll $t8, $v0, 2 /* 0F20DC 7F0BD5AC 0002C080 */ sll $t8, $v0, 2
@@ -178,7 +178,7 @@ glabel set_vtx_gfx_mem_alloc
/* 0F20EC 7F0BD5BC 8C790004 */ lw $t9, 4($v1) /* 0F20EC 7F0BD5BC 8C790004 */ lw $t9, 4($v1)
/* 0F20F0 7F0BD5C0 8D0882E0 */ lw $t0, %lo(D_800482E0)($t0) /* 0F20F0 7F0BD5C0 8D0882E0 */ lw $t0, %lo(D_800482E0)($t0)
/* 0F20F4 7F0BD5C4 01194821 */ addu $t1, $t0, $t9 /* 0F20F4 7F0BD5C4 01194821 */ addu $t1, $t0, $t9
/* 0F20F8 7F0BD5C8 0FC26919 */ jal get_num_players /* 0F20F8 7F0BD5C8 0FC26919 */ jal getPlayerCount
/* 0F20FC 7F0BD5CC AC690008 */ sw $t1, 8($v1) /* 0F20FC 7F0BD5CC AC690008 */ sw $t1, 8($v1)
/* 0F2100 7F0BD5D0 00025080 */ sll $t2, $v0, 2 /* 0F2100 7F0BD5D0 00025080 */ sll $t2, $v0, 2
/* 0F2104 7F0BD5D4 3C048005 */ lui $a0, %hi(D_800482F0) /* 0F2104 7F0BD5D4 3C048005 */ lui $a0, %hi(D_800482F0)
@@ -190,7 +190,7 @@ glabel set_vtx_gfx_mem_alloc
/* 0F211C 7F0BD5EC 01602025 */ move $a0, $t3 /* 0F211C 7F0BD5EC 01602025 */ move $a0, $t3
/* 0F2120 7F0BD5F0 3C038009 */ lui $v1, %hi(ptr_mvtx0_alloc_start) /* 0F2120 7F0BD5F0 3C038009 */ lui $v1, %hi(ptr_mvtx0_alloc_start)
/* 0F2124 7F0BD5F4 2463C240 */ addiu $v1, %lo(ptr_mvtx0_alloc_start) # addiu $v1, $v1, -0x3dc0 /* 0F2124 7F0BD5F4 2463C240 */ addiu $v1, %lo(ptr_mvtx0_alloc_start) # addiu $v1, $v1, -0x3dc0
/* 0F2128 7F0BD5F8 0FC26919 */ jal get_num_players /* 0F2128 7F0BD5F8 0FC26919 */ jal getPlayerCount
/* 0F212C 7F0BD5FC AC620000 */ sw $v0, ($v1) /* 0F212C 7F0BD5FC AC620000 */ sw $v0, ($v1)
/* 0F2130 7F0BD600 3C038009 */ lui $v1, %hi(ptr_mvtx0_alloc_start) /* 0F2130 7F0BD600 3C038009 */ lui $v1, %hi(ptr_mvtx0_alloc_start)
/* 0F2134 7F0BD604 00026080 */ sll $t4, $v0, 2 /* 0F2134 7F0BD604 00026080 */ sll $t4, $v0, 2
@@ -200,7 +200,7 @@ glabel set_vtx_gfx_mem_alloc
/* 0F2144 7F0BD614 8C6F0000 */ lw $t7, ($v1) /* 0F2144 7F0BD614 8C6F0000 */ lw $t7, ($v1)
/* 0F2148 7F0BD618 8DAD82F0 */ lw $t5, %lo(D_800482F0)($t5) /* 0F2148 7F0BD618 8DAD82F0 */ lw $t5, %lo(D_800482F0)($t5)
/* 0F214C 7F0BD61C 01AF7021 */ addu $t6, $t5, $t7 /* 0F214C 7F0BD61C 01AF7021 */ addu $t6, $t5, $t7
/* 0F2150 7F0BD620 0FC26919 */ jal get_num_players /* 0F2150 7F0BD620 0FC26919 */ jal getPlayerCount
/* 0F2154 7F0BD624 AC6E0004 */ sw $t6, 4($v1) /* 0F2154 7F0BD624 AC6E0004 */ sw $t6, 4($v1)
/* 0F2158 7F0BD628 3C038009 */ lui $v1, %hi(ptr_mvtx0_alloc_start) /* 0F2158 7F0BD628 3C038009 */ lui $v1, %hi(ptr_mvtx0_alloc_start)
/* 0F215C 7F0BD62C 0002C080 */ sll $t8, $v0, 2 /* 0F215C 7F0BD62C 0002C080 */ sll $t8, $v0, 2
+2 -2
View File
@@ -476,7 +476,7 @@ glabel load_enviroment
/* 0EF598 7F0BAA68 AFBF0014 */ sw $ra, 0x14($sp) /* 0EF598 7F0BAA68 AFBF0014 */ sw $ra, 0x14($sp)
/* 0EF59C 7F0BAA6C AFA5002C */ sw $a1, 0x2c($sp) /* 0EF59C 7F0BAA6C AFA5002C */ sw $a1, 0x2c($sp)
/* 0EF5A0 7F0BAA70 AFA0001C */ sw $zero, 0x1c($sp) /* 0EF5A0 7F0BAA70 AFA0001C */ sw $zero, 0x1c($sp)
/* 0EF5A4 7F0BAA74 0FC26919 */ jal get_num_players /* 0EF5A4 7F0BAA74 0FC26919 */ jal getPlayerCount
/* 0EF5A8 7F0BAA78 AFA40028 */ sw $a0, 0x28($sp) /* 0EF5A8 7F0BAA78 AFA40028 */ sw $a0, 0x28($sp)
/* 0EF5AC 7F0BAA7C 24010001 */ li $at, 1 /* 0EF5AC 7F0BAA7C 24010001 */ li $at, 1
/* 0EF5B0 7F0BAA80 8FA6001C */ lw $a2, 0x1c($sp) /* 0EF5B0 7F0BAA80 8FA6001C */ lw $a2, 0x1c($sp)
@@ -1126,7 +1126,7 @@ glabel sub_GAME_7F0BB2C8
.L7F0BB2E8: .L7F0BB2E8:
/* 0EFE18 7F0BB2E8 0FC227F5 */ jal get_BONDdata_position /* 0EFE18 7F0BB2E8 0FC227F5 */ jal get_BONDdata_position
/* 0EFE1C 7F0BB2EC AFA40030 */ sw $a0, 0x30($sp) /* 0EFE1C 7F0BB2EC AFA40030 */ sw $a0, 0x30($sp)
/* 0EFE20 7F0BB2F0 0FC1E0F1 */ jal get_BONDdata_field_10CC /* 0EFE20 7F0BB2F0 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
/* 0EFE24 7F0BB2F4 AFA2001C */ sw $v0, 0x1c($sp) /* 0EFE24 7F0BB2F4 AFA2001C */ sw $v0, 0x1c($sp)
/* 0EFE28 7F0BB2F8 8FA3001C */ lw $v1, 0x1c($sp) /* 0EFE28 7F0BB2F8 8FA3001C */ lw $v1, 0x1c($sp)
/* 0EFE2C 7F0BB2FC 8FA40030 */ lw $a0, 0x30($sp) /* 0EFE2C 7F0BB2FC 8FA40030 */ lw $a0, 0x30($sp)
+42 -117
View File
@@ -111,34 +111,23 @@ f32 get_007_accuracy_mod(void)
#ifdef NONMATCHING #ifdef NONMATCHING
void end_of_mission_briefing(void) void end_of_mission_briefing(void)
{ {
short sVar1; if (((-1 < briefingpage) && (selected_difficulty != DIFFICULTY_007)) && (append_cheat_sp == FALSE))
int iVar3; {
save_file *folder; unlock_stage_in_folder_on_difficulty(selected_folder_num, mission_folder_setup_entries[briefingpage].mission_num, selected_difficulty, get_mission_timer() / 0x3c);
ulonglong uVar2;
if (((-1 < briefingpage) && (selected_difficulty != DIFFICULTY_007)) && (append_cheat_sp == FALSE)
) {
sVar1 = (&solo_target_times_ARRAY_8002b564
[mission_folder_setup_entries[briefingpage].mission_num].agent_time)
[selected_difficulty];
unlock_stage_in_folder_on_difficulty if ((get_mission_timer() / 0x3c) <= (&solo_target_time_array[mission_folder_setup_entries[briefingpage].mission_num].agent_time)[selected_difficulty])
(selected_folder_num,(longlong)mission_folder_setup_entries[briefingpage].mission_num, {
(longlong)selected_difficulty,getMissiontime() / 0x3c); if (check_if_cheat_unlocked(get_save_folder_ptr(selected_folder_num), mission_folder_setup_entries[briefingpage].mission_num) == 0)
{
if ((longlong)(getMissiontime() / 0x3c) <= (longlong)sVar1) { sub_GAME_7F01E760(selected_folder_num, mission_folder_setup_entries[briefingpage].mission_num);
folder = getEEPROMforFoldernum(selected_folder_num); newcheatunlocked = 1;
if (check_if_cheat_unlocked(folder,(longlong)mission_folder_setup_entries[briefingpage].mission_num) == 0) { return;
proc_7F01E760(selected_folder_num,(longlong)mission_folder_setup_entries[briefingpage].mission_num); }
newcheatunlocked = 1; }
return; newcheatunlocked = 0;
}
} }
newcheatunlocked = 0; return;
}
return;
} }
#else #else
@@ -363,115 +352,51 @@ void set_selected_folder_num(u32 foldernum)
selected_folder_num = foldernum; selected_folder_num = foldernum;
} }
#ifdef NONMATCHING
void set_selected_difficulty(DIFFICULTY difficulty) void set_selected_difficulty(DIFFICULTY difficulty)
{ {
if (difficulty != DIFFICULTY_AGENT) switch(difficulty)
{
if (difficulty == DIFFICULTY_SECRET)
{ {
selected_difficulty = DIFFICULTY_SECRET; case DIFFICULTY_AGENT:
return; default:
selected_difficulty = DIFFICULTY_AGENT;
return;
case DIFFICULTY_SECRET:
selected_difficulty = DIFFICULTY_SECRET;
return;
case DIFFICULTY_00:
selected_difficulty = DIFFICULTY_00;
return;
case DIFFICULTY_007:
selected_difficulty = DIFFICULTY_007;
return;
} }
if (difficulty == DIFFICULTY_00)
{
selected_difficulty = DIFFICULTY_00;
return;
}
if (difficulty == DIFFICULTY_007)
{
selected_difficulty = DIFFICULTY_007;
return;
}
}
else
{
selected_difficulty = DIFFICULTY_AGENT;
}
} }
#else
GLOBAL_ASM(
.text
glabel set_selected_difficulty
/* 0520CC 7F01D59C 10800009 */ beqz $a0, .L7F01D5C4
/* 0520D0 7F01D5A0 24020001 */ li $v0, 1
/* 0520D4 7F01D5A4 1082000A */ beq $a0, $v0, .L7F01D5D0
/* 0520D8 7F01D5A8 3C018003 */ lui $at, %hi(selected_difficulty)
/* 0520DC 7F01D5AC 24020002 */ li $v0, 2
/* 0520E0 7F01D5B0 10820009 */ beq $a0, $v0, .L7F01D5D8
/* 0520E4 7F01D5B4 3C018003 */ lui $at, %hi(selected_difficulty)
/* 0520E8 7F01D5B8 24020003 */ li $v0, 3
/* 0520EC 7F01D5BC 10820008 */ beq $a0, $v0, .L7F01D5E0
/* 0520F0 7F01D5C0 3C018003 */ lui $at, %hi(selected_difficulty)
.L7F01D5C4:
/* 0520F4 7F01D5C4 3C018003 */ lui $at, %hi(selected_difficulty)
/* 0520F8 7F01D5C8 03E00008 */ jr $ra
/* 0520FC 7F01D5CC AC20A8FC */ sw $zero, %lo(selected_difficulty)($at)
.L7F01D5D0:
/* 052100 7F01D5D0 03E00008 */ jr $ra
/* 052104 7F01D5D4 AC22A8FC */ sw $v0, %lo(selected_difficulty)($at)
.L7F01D5D8:
/* 052108 7F01D5D8 03E00008 */ jr $ra
/* 05210C 7F01D5DC AC22A8FC */ sw $v0, %lo(selected_difficulty)($at)
.L7F01D5E0:
/* 052110 7F01D5E0 AC22A8FC */ sw $v0, %lo(selected_difficulty)($at)
/* 052114 7F01D5E4 03E00008 */ jr $ra
/* 052118 7F01D5E8 00000000 */ nop
)
#endif
void set_solo_and_ptr_briefing(LEVELID stage) void set_solo_and_ptr_briefing(LEVELID stage)
{ {
gamemode = GAMEMODE_SOLO; gamemode = GAMEMODE_SOLO;
selected_stage = stage; selected_stage = stage;
briefingpage = pull_and_display_text_for_folder_a0(stage); briefingpage = pull_and_display_text_for_folder_a0(stage);
} }
void sub_GAME_7F01D61C(struct save_file *savefile) void sub_GAME_7F01D61C(struct save_file *savefile)
{ {
copy_eeprom_from_to(selected_folder_num,savefile); copy_eeprom_from_to(selected_folder_num,savefile);
} }
#ifdef NONMATCHING //this feels fake, generated with a permuter session i forgot was running
void sub_GAME_7F01D644(struct save_file *eeprom) void sub_GAME_7F01D644(struct save_file *eeprom)
{ {
selected_folder_num_copy = selected_folder_num; int new_var;
selected_folder_num = 100; long long new_var2;
copy_eepromfile_a0_from_a1_to_buffer(100,eeprom); new_var2 = (long long) 0x64;
return; new_var = new_var2;
selected_folder_num_copy = (s32) selected_folder_num;
selected_folder_num = new_var;
copy_eepromfile_a0_from_a1_to_buffer(new_var, eeprom);
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F01D644
/* 052174 7F01D644 3C028003 */ lui $v0, %hi(selected_folder_num)
/* 052178 7F01D648 2442A8E8 */ addiu $v0, %lo(selected_folder_num) # addiu $v0, $v0, -0x5718
/* 05217C 7F01D64C 8C4E0000 */ lw $t6, ($v0)
/* 052180 7F01D650 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 052184 7F01D654 00802825 */ move $a1, $a0
/* 052188 7F01D658 3C018003 */ lui $at, %hi(selected_folder_num_copy)
/* 05218C 7F01D65C AFBF0014 */ sw $ra, 0x14($sp)
/* 052190 7F01D660 24040064 */ li $a0, 100
/* 052194 7F01D664 AC2EA8EC */ sw $t6, %lo(selected_folder_num_copy)($at)
/* 052198 7F01D668 0FC07D17 */ jal copy_eepromfile_a0_from_a1_to_buffer
/* 05219C 7F01D66C AC440000 */ sw $a0, ($v0)
/* 0521A0 7F01D670 8FBF0014 */ lw $ra, 0x14($sp)
/* 0521A4 7F01D674 27BD0018 */ addiu $sp, $sp, 0x18
/* 0521A8 7F01D678 03E00008 */ jr $ra
/* 0521AC 7F01D67C 00000000 */ nop
)
#endif
void store_favorite_weapon_current_player(u32 right,u32 left) void store_favorite_weapon_current_player(u32 right,u32 left)
@@ -479,6 +404,6 @@ void store_favorite_weapon_current_player(u32 right,u32 left)
u32 playerNum; u32 playerNum;
playerNum = get_cur_playernum(); playerNum = get_cur_playernum();
array_favweapon[playerNum][0] = right; array_favweapon[playerNum][RIGHT_HAND] = right;
array_favweapon[playerNum][1] = left; array_favweapon[playerNum][LEFT_HAND] = left;
} }
+1 -1
View File
@@ -6,7 +6,7 @@ struct save_data
{ {
int chksum1; int chksum1;
int chksum2; int chksum2;
char completion_bitflags; u8 completion_bitflags;
char flag_007; char flag_007;
char music_vol; char music_vol;
char sfx_vol; char sfx_vol;
+38 -105
View File
@@ -188,21 +188,11 @@ glabel sub_GAME_7F01D840
#endif #endif
u32 get_foldernum_of_eeprom(struct save_data *eeprom)
#ifdef NONMATCHING {
void get_foldernum_of_eeprom(void) { return eeprom->completion_bitflags & 7;
} }
#else
GLOBAL_ASM(
.text
glabel get_foldernum_of_eeprom
/* 0523F8 7F01D8C8 90820008 */ lbu $v0, 8($a0)
/* 0523FC 7F01D8CC 304E0007 */ andi $t6, $v0, 7
/* 052400 7F01D8D0 03E00008 */ jr $ra
/* 052404 7F01D8D4 01C01025 */ move $v0, $t6
)
#endif
@@ -225,21 +215,11 @@ glabel set_eeprom_to_folder_num
#endif #endif
u32 set_eeprom_flag_0x18(struct save_data *folder)
#ifdef NONMATCHING {
void set_eeprom_flag_0x18(void) { return (folder->completion_bitflags & 0x18) >> 3;
} }
#else
GLOBAL_ASM(
.text
glabel set_eeprom_flag_0x18
/* 052424 7F01D8F4 90820008 */ lbu $v0, 8($a0)
/* 052428 7F01D8F8 304E0018 */ andi $t6, $v0, 0x18
/* 05242C 7F01D8FC 03E00008 */ jr $ra
/* 052430 7F01D900 000E10C3 */ sra $v0, $t6, 3
)
#endif
@@ -264,20 +244,12 @@ glabel reset_eeprom_flag_0x18
#ifdef NONMATCHING
void get_selected_bond(void) {
u32 get_selected_bond(struct save_data *folder)
{
return (folder->completion_bitflags & 0x60) >> 5;
} }
#else
GLOBAL_ASM(
.text
glabel get_selected_bond
/* 052454 7F01D924 90820008 */ lbu $v0, 8($a0)
/* 052458 7F01D928 304E0060 */ andi $t6, $v0, 0x60
/* 05245C 7F01D92C 03E00008 */ jr $ra
/* 052460 7F01D930 000E1143 */ sra $v0, $t6, 5
)
#endif
@@ -302,46 +274,23 @@ glabel set_selected_bond
#ifdef NONMATCHING
void check_if_eeprom_flag_set_0x80(void) {
u32 check_if_eeprom_flag_set_0x80(struct save_data *folder)
{
return ((folder->completion_bitflags & 0x80) != 0);
} }
#else
GLOBAL_ASM(
.text
glabel check_if_eeprom_flag_set_0x80
/* 052484 7F01D954 90820008 */ lbu $v0, 8($a0)
/* 052488 7F01D958 304E0080 */ andi $t6, $v0, 0x80
/* 05248C 7F01D95C 03E00008 */ jr $ra
/* 052490 7F01D960 000E102B */ sltu $v0, $zero, $t6
)
#endif
void toggle_eeprom_flag_set_0x80(struct save_data *folder,u32 mode)
#ifdef NONMATCHING {
void toggle_eeprom_flag_set_0x80(void) { if (mode != 0) {
folder->completion_bitflags = folder->completion_bitflags | 0x80;
return;
}
folder->completion_bitflags = folder->completion_bitflags & 0xff7f;
return;
} }
#else
GLOBAL_ASM(
.text
glabel toggle_eeprom_flag_set_0x80
/* 052494 7F01D964 50A00006 */ beql $a1, $zero, .L7F01D980
/* 052498 7F01D968 90980008 */ lbu $t8, 8($a0)
/* 05249C 7F01D96C 908E0008 */ lbu $t6, 8($a0)
/* 0524A0 7F01D970 35CF0080 */ ori $t7, $t6, 0x80
/* 0524A4 7F01D974 03E00008 */ jr $ra
/* 0524A8 7F01D978 A08F0008 */ sb $t7, 8($a0)
/* 0524AC 7F01D97C 90980008 */ lbu $t8, 8($a0)
.L7F01D980:
/* 0524B0 7F01D980 3319FF7F */ andi $t9, $t8, 0xff7f
/* 0524B4 7F01D984 A0990008 */ sb $t9, 8($a0)
/* 0524B8 7F01D988 03E00008 */ jr $ra
/* 0524BC 7F01D98C 00000000 */ nop
)
#endif
@@ -649,7 +598,7 @@ glabel sub_GAME_7F01DCB0
#ifdef NONMATCHING #ifdef NONMATCHING
void check_if_cheat_unlocked(void) { u32 check_if_cheat_unlocked(save_file *folder,s32 cheat) {
} }
#else #else
@@ -1105,34 +1054,18 @@ glabel sub_GAME_7F01DF90
#ifdef NONMATCHING s32 check_if_valid_folder_num(s32 folder)
void check_if_valid_folder_num(void) { {
if ((folder >= 0) && (folder < 4))
{
return 1;
}
if (folder == 100)
{
return 1;
}
return 0;
} }
#else
GLOBAL_ASM(
.text
glabel check_if_valid_folder_num
/* 052DBC 7F01E28C 04800005 */ bltz $a0, .L7F01E2A4
/* 052DC0 7F01E290 28810004 */ slti $at, $a0, 4
/* 052DC4 7F01E294 50200004 */ beql $at, $zero, .L7F01E2A8
/* 052DC8 7F01E298 24010064 */ li $at, 100
/* 052DCC 7F01E29C 03E00008 */ jr $ra
/* 052DD0 7F01E2A0 24020001 */ li $v0, 1
.L7F01E2A4:
/* 052DD4 7F01E2A4 24010064 */ li $at, 100
.L7F01E2A8:
/* 052DD8 7F01E2A8 14810003 */ bne $a0, $at, .L7F01E2B8
/* 052DDC 7F01E2AC 00001025 */ move $v0, $zero
/* 052DE0 7F01E2B0 03E00008 */ jr $ra
/* 052DE4 7F01E2B4 24020001 */ li $v0, 1
.L7F01E2B8:
/* 052DE8 7F01E2B8 03E00008 */ jr $ra
/* 052DEC 7F01E2BC 00000000 */ nop
)
#endif
@@ -2187,7 +2120,7 @@ glabel update_eeprom_to_current_solo_watch_settings
/* 053A44 7F01EF14 AFBF001C */ sw $ra, 0x1c($sp) /* 053A44 7F01EF14 AFBF001C */ sw $ra, 0x1c($sp)
/* 053A48 7F01EF18 AFB00018 */ sw $s0, 0x18($sp) /* 053A48 7F01EF18 AFB00018 */ sw $s0, 0x18($sp)
/* 053A4C 7F01EF1C AFA40020 */ sw $a0, 0x20($sp) /* 053A4C 7F01EF1C AFA40020 */ sw $a0, 0x20($sp)
/* 053A50 7F01EF20 0FC2A4D6 */ jal sub_GAME_7F0A9358 /* 053A50 7F01EF20 0FC2A4D6 */ jal get_mTrack2Vol
/* 053A54 7F01EF24 00008025 */ move $s0, $zero /* 053A54 7F01EF24 00008025 */ move $s0, $zero
/* 053A58 7F01EF28 8FAF0020 */ lw $t7, 0x20($sp) /* 053A58 7F01EF28 8FAF0020 */ lw $t7, 0x20($sp)
/* 053A5C 7F01EF2C 000271C3 */ sra $t6, $v0, 7 /* 053A5C 7F01EF2C 000271C3 */ sra $t6, $v0, 7
@@ -2289,7 +2222,7 @@ glabel get_screen_ratio_settings_for_mpgame_from_folder
/* 053B84 7F01F054 00027843 */ sra $t7, $v0, 1 /* 053B84 7F01F054 00027843 */ sra $t7, $v0, 1
/* 053B88 7F01F058 01CF2025 */ or $a0, $t6, $t7 /* 053B88 7F01F058 01CF2025 */ or $a0, $t6, $t7
/* 053B8C 7F01F05C 3098FFFF */ andi $t8, $a0, 0xffff /* 053B8C 7F01F05C 3098FFFF */ andi $t8, $a0, 0xffff
/* 053B90 7F01F060 0FC2A4D9 */ jal sub_GAME_7F0A9364 /* 053B90 7F01F060 0FC2A4D9 */ jal set_mTrack2Vol
/* 053B94 7F01F064 03002025 */ move $a0, $t8 /* 053B94 7F01F064 03002025 */ move $a0, $t8
/* 053B98 7F01F068 8FB00024 */ lw $s0, 0x24($sp) /* 053B98 7F01F068 8FB00024 */ lw $s0, 0x24($sp)
/* 053B9C 7F01F06C 9202000B */ lbu $v0, 0xb($s0) /* 053B9C 7F01F06C 9202000B */ lbu $v0, 0xb($s0)
@@ -2300,7 +2233,7 @@ glabel get_screen_ratio_settings_for_mpgame_from_folder
/* 053BB0 7F01F080 0FC2A468 */ jal sub_GAME_7F0A91A0 /* 053BB0 7F01F080 0FC2A468 */ jal sub_GAME_7F0A91A0
/* 053BB4 7F01F084 01202025 */ move $a0, $t1 /* 053BB4 7F01F084 01202025 */ move $a0, $t1
/* 053BB8 7F01F088 960A000C */ lhu $t2, 0xc($s0) /* 053BB8 7F01F088 960A000C */ lhu $t2, 0xc($s0)
/* 053BBC 7F01F08C 0FC26919 */ jal get_num_players /* 053BBC 7F01F08C 0FC26919 */ jal getPlayerCount
/* 053BC0 7F01F090 A7AA0020 */ sh $t2, 0x20($sp) /* 053BC0 7F01F090 A7AA0020 */ sh $t2, 0x20($sp)
/* 053BC4 7F01F094 24010001 */ li $at, 1 /* 053BC4 7F01F094 24010001 */ li $at, 1
/* 053BC8 7F01F098 14410007 */ bne $v0, $at, .L7F01F0B8 /* 053BC8 7F01F098 14410007 */ bne $v0, $at, .L7F01F0B8
+1 -1
View File
@@ -58,7 +58,7 @@ glabel init_player_BONDdata_stats
/* 039C50 7F005120 3C108008 */ lui $s0, %hi(pPlayer) /* 039C50 7F005120 3C108008 */ lui $s0, %hi(pPlayer)
/* 039C54 7F005124 2610A0B0 */ addiu $s0, %lo(pPlayer) # addiu $s0, $s0, -0x5f50 /* 039C54 7F005124 2610A0B0 */ addiu $s0, %lo(pPlayer) # addiu $s0, $s0, -0x5f50
/* 039C58 7F005128 8E090000 */ lw $t1, ($s0) /* 039C58 7F005128 8E090000 */ lw $t1, ($s0)
/* 039C5C 7F00512C 0FC26919 */ jal get_num_players /* 039C5C 7F00512C 0FC26919 */ jal getPlayerCount
/* 039C60 7F005130 AD220808 */ sw $v0, 0x808($t1) /* 039C60 7F005130 AD220808 */ sw $v0, 0x808($t1)
/* 039C64 7F005134 24010001 */ li $at, 1 /* 039C64 7F005134 24010001 */ li $at, 1
/* 039C68 7F005138 14410006 */ bne $v0, $at, .L7F005154 /* 039C68 7F005138 14410006 */ bne $v0, $at, .L7F005154
+6 -6
View File
@@ -347,11 +347,11 @@ glabel sets_a_bunch_of_BONDdata_values_to_default
/* 03B2A4 7F006774 0FC1BF7A */ jal sub_GAME_7F06FDE8 /* 03B2A4 7F006774 0FC1BF7A */ jal sub_GAME_7F06FDE8
/* 03B2A8 7F006778 8DC50008 */ lw $a1, 8($t6) /* 03B2A8 7F006778 8DC50008 */ lw $a1, 8($t6)
/* 03B2AC 7F00677C 8E240000 */ lw $a0, ($s1) /* 03B2AC 7F00677C 8E240000 */ lw $a0, ($s1)
/* 03B2B0 7F006780 3C057F09 */ lui $a1, %hi(sub_GAME_7F08DBB0) # $a1, 0x7f09 /* 03B2B0 7F006780 3C057F09 */ lui $a1, %hi(currentPlayerToggle5BC) # $a1, 0x7f09
/* 03B2B4 7F006784 24A5DBB0 */ addiu $a1, %lo(sub_GAME_7F08DBB0) # addiu $a1, $a1, -0x2450 /* 03B2B4 7F006784 24A5DBB0 */ addiu $a1, %lo(currentPlayerToggle5BC) # addiu $a1, $a1, -0x2450
/* 03B2B8 7F006788 0FC1BF8F */ jal sub_GAME_7F06FE3C /* 03B2B8 7F006788 0FC1BF8F */ jal sub_GAME_7F06FE3C
/* 03B2BC 7F00678C 24840598 */ addiu $a0, $a0, 0x598 /* 03B2BC 7F00678C 24840598 */ addiu $a0, $a0, 0x598
/* 03B2C0 7F006790 0FC236F2 */ jal sub_GAME_7F08DBC8 /* 03B2C0 7F006790 0FC236F2 */ jal currentPlayerUpdateIdleHeadRoll
/* 03B2C4 7F006794 00000000 */ nop /* 03B2C4 7F006794 00000000 */ nop
/* 03B2C8 7F006798 8FBF0044 */ lw $ra, 0x44($sp) /* 03B2C8 7F006798 8FBF0044 */ lw $ra, 0x44($sp)
/* 03B2CC 7F00679C D7B40020 */ ldc1 $f20, 0x20($sp) /* 03B2CC 7F00679C D7B40020 */ ldc1 $f20, 0x20($sp)
@@ -640,11 +640,11 @@ glabel sets_a_bunch_of_BONDdata_values_to_default
/* 03B300 7F006790 0FC1C0F6 */ jal sub_GAME_7F06FDE8 /* 03B300 7F006790 0FC1C0F6 */ jal sub_GAME_7F06FDE8
/* 03B304 7F006794 8DC50008 */ lw $a1, 8($t6) /* 03B304 7F006794 8DC50008 */ lw $a1, 8($t6)
/* 03B308 7F006798 8E240000 */ lw $a0, ($s1) /* 03B308 7F006798 8E240000 */ lw $a0, ($s1)
/* 03B30C 7F00679C 3C057F09 */ lui $a1, %hi(sub_GAME_7F08DBB0) # $a1, 0x7f09 /* 03B30C 7F00679C 3C057F09 */ lui $a1, %hi(currentPlayerToggle5BC) # $a1, 0x7f09
/* 03B310 7F0067A0 24A5E690 */ addiu $a1, %lo(sub_GAME_7F08DBB0) # addiu $a1, $a1, -0x1970 /* 03B310 7F0067A0 24A5E690 */ addiu $a1, %lo(currentPlayerToggle5BC) # addiu $a1, $a1, -0x1970
/* 03B314 7F0067A4 0FC1C10B */ jal sub_GAME_7F06FE3C /* 03B314 7F0067A4 0FC1C10B */ jal sub_GAME_7F06FE3C
/* 03B318 7F0067A8 24840598 */ addiu $a0, $a0, 0x598 /* 03B318 7F0067A8 24840598 */ addiu $a0, $a0, 0x598
/* 03B31C 7F0067AC 0FC239AA */ jal sub_GAME_7F08DBC8 /* 03B31C 7F0067AC 0FC239AA */ jal currentPlayerUpdateIdleHeadRoll
/* 03B320 7F0067B0 00000000 */ nop /* 03B320 7F0067B0 00000000 */ nop
/* 03B324 7F0067B4 8FBF0044 */ lw $ra, 0x44($sp) /* 03B324 7F0067B4 8FBF0044 */ lw $ra, 0x44($sp)
/* 03B328 7F0067B8 D7B40020 */ ldc1 $f20, 0x20($sp) /* 03B328 7F0067B8 D7B40020 */ ldc1 $f20, 0x20($sp)
+4 -4
View File
@@ -644,7 +644,7 @@ def_7F005A74:
/* 03A9C8 7F005E98 8D089C68 */ lw $t0, %lo(dword_CODE_bss_80079C68)($t0) /* 03A9C8 7F005E98 8D089C68 */ lw $t0, %lo(dword_CODE_bss_80079C68)($t0)
/* 03A9CC 7F005E9C 5900002C */ blezl $t0, .L7F005F50 /* 03A9CC 7F005E9C 5900002C */ blezl $t0, .L7F005F50
/* 03A9D0 7F005EA0 27A4008C */ addiu $a0, $sp, 0x8c /* 03A9D0 7F005EA0 27A4008C */ addiu $a0, $sp, 0x8c
/* 03A9D4 7F005EA4 0FC26919 */ jal get_num_players /* 03A9D4 7F005EA4 0FC26919 */ jal getPlayerCount
/* 03A9D8 7F005EA8 00000000 */ nop /* 03A9D8 7F005EA8 00000000 */ nop
/* 03A9DC 7F005EAC 28410002 */ slti $at, $v0, 2 /* 03A9DC 7F005EAC 28410002 */ slti $at, $v0, 2
/* 03A9E0 7F005EB0 14200008 */ bnez $at, .L7F005ED4 /* 03A9E0 7F005EB0 14200008 */ bnez $at, .L7F005ED4
@@ -813,7 +813,7 @@ def_7F005A74:
/* 03AC58 7F006128 8E420000 */ lw $v0, ($s2) /* 03AC58 7F006128 8E420000 */ lw $v0, ($s2)
/* 03AC5C 7F00612C C45204BC */ lwc1 $f18, 0x4bc($v0) /* 03AC5C 7F00612C C45204BC */ lwc1 $f18, 0x4bc($v0)
/* 03AC60 7F006130 46009103 */ div.s $f4, $f18, $f0 /* 03AC60 7F006130 46009103 */ div.s $f4, $f18, $f0
/* 03AC64 7F006134 0FC26919 */ jal get_num_players /* 03AC64 7F006134 0FC26919 */ jal getPlayerCount
/* 03AC68 7F006138 E44403C0 */ swc1 $f4, 0x3c0($v0) /* 03AC68 7F006138 E44403C0 */ swc1 $f4, 0x3c0($v0)
/* 03AC6C 7F00613C 24010001 */ li $at, 1 /* 03AC6C 7F00613C 24010001 */ li $at, 1
/* 03AC70 7F006140 14410005 */ bne $v0, $at, .L7F006158 /* 03AC70 7F006140 14410005 */ bne $v0, $at, .L7F006158
@@ -1406,7 +1406,7 @@ def_7F005A74:
/* 03AA04 7F005E94 8F399CD8 */ lw $t9, %lo(dword_CODE_bss_80079C68)($t9) /* 03AA04 7F005E94 8F399CD8 */ lw $t9, %lo(dword_CODE_bss_80079C68)($t9)
/* 03AA08 7F005E98 5B20002C */ blezl $t9, .L7F005F4C /* 03AA08 7F005E98 5B20002C */ blezl $t9, .L7F005F4C
/* 03AA0C 7F005E9C 27A40094 */ addiu $a0, $sp, 0x94 /* 03AA0C 7F005E9C 27A40094 */ addiu $a0, $sp, 0x94
/* 03AA10 7F005EA0 0FC26C01 */ jal get_num_players /* 03AA10 7F005EA0 0FC26C01 */ jal getPlayerCount
/* 03AA14 7F005EA4 00000000 */ nop /* 03AA14 7F005EA4 00000000 */ nop
/* 03AA18 7F005EA8 28410002 */ slti $at, $v0, 2 /* 03AA18 7F005EA8 28410002 */ slti $at, $v0, 2
/* 03AA1C 7F005EAC 14200008 */ bnez $at, .L7F005ED0 /* 03AA1C 7F005EAC 14200008 */ bnez $at, .L7F005ED0
@@ -1574,7 +1574,7 @@ def_7F005A74:
/* 03AC90 7F006120 8E420000 */ lw $v0, ($s2) /* 03AC90 7F006120 8E420000 */ lw $v0, ($s2)
/* 03AC94 7F006124 C45204BC */ lwc1 $f18, 0x4bc($v0) /* 03AC94 7F006124 C45204BC */ lwc1 $f18, 0x4bc($v0)
/* 03AC98 7F006128 46009203 */ div.s $f8, $f18, $f0 /* 03AC98 7F006128 46009203 */ div.s $f8, $f18, $f0
/* 03AC9C 7F00612C 0FC26C01 */ jal get_num_players /* 03AC9C 7F00612C 0FC26C01 */ jal getPlayerCount
/* 03ACA0 7F006130 E44803C0 */ swc1 $f8, 0x3c0($v0) /* 03ACA0 7F006130 E44803C0 */ swc1 $f8, 0x3c0($v0)
/* 03ACA4 7F006134 24010001 */ li $at, 1 /* 03ACA4 7F006134 24010001 */ li $at, 1
/* 03ACA8 7F006138 14410005 */ bne $v0, $at, .L7F006150 /* 03ACA8 7F006138 14410005 */ bne $v0, $at, .L7F006150
+2 -2
View File
@@ -161,7 +161,7 @@ glabel alloc_explosion_smoke_casing_scorch_impact_buffers
/* 03BB00 7F006FD0 28810014 */ slti $at, $a0, 0x14 /* 03BB00 7F006FD0 28810014 */ slti $at, $a0, 0x14
/* 03BB04 7F006FD4 1420FFB7 */ bnez $at, .L7F006EB4 /* 03BB04 7F006FD4 1420FFB7 */ bnez $at, .L7F006EB4
/* 03BB08 7F006FD8 24C60198 */ addiu $a2, $a2, 0x198 /* 03BB08 7F006FD8 24C60198 */ addiu $a2, $a2, 0x198
/* 03BB0C 7F006FDC 0FC26919 */ jal get_num_players /* 03BB0C 7F006FDC 0FC26919 */ jal getPlayerCount
/* 03BB10 7F006FE0 00000000 */ nop /* 03BB10 7F006FE0 00000000 */ nop
/* 03BB14 7F006FE4 24010001 */ li $at, 1 /* 03BB14 7F006FE4 24010001 */ li $at, 1
/* 03BB18 7F006FE8 14410017 */ bne $v0, $at, .L7F007048 /* 03BB18 7F006FE8 14410017 */ bne $v0, $at, .L7F007048
@@ -205,7 +205,7 @@ glabel alloc_explosion_smoke_casing_scorch_impact_buffers
/* 03BBA4 7F007074 28611F40 */ slti $at, $v1, 0x1f40 /* 03BBA4 7F007074 28611F40 */ slti $at, $v1, 0x1f40
/* 03BBA8 7F007078 1420FFFB */ bnez $at, .L7F007068 /* 03BBA8 7F007078 1420FFFB */ bnez $at, .L7F007068
/* 03BBAC 7F00707C A5E60000 */ sh $a2, ($t7) /* 03BBAC 7F00707C A5E60000 */ sh $a2, ($t7)
/* 03BBB0 7F007080 0FC26919 */ jal get_num_players /* 03BBB0 7F007080 0FC26919 */ jal getPlayerCount
/* 03BBB4 7F007084 00000000 */ nop /* 03BBB4 7F007084 00000000 */ nop
/* 03BBB8 7F007088 241800C8 */ li $t8, 200 /* 03BBB8 7F007088 241800C8 */ li $t8, 200
/* 03BBBC 7F00708C 0302001A */ div $zero, $t8, $v0 /* 03BBBC 7F00708C 0302001A */ div $zero, $t8, $v0
+1 -1
View File
@@ -24,7 +24,7 @@ glabel init_pathtable_something
/* 03B314 7F0067E4 AE220000 */ sw $v0, ($s1) /* 03B314 7F0067E4 AE220000 */ sw $v0, ($s1)
/* 03B318 7F0067E8 00402025 */ move $a0, $v0 /* 03B318 7F0067E8 00402025 */ move $a0, $v0
/* 03B31C 7F0067EC 8E050000 */ lw $a1, ($s0) /* 03B31C 7F0067EC 8E050000 */ lw $a1, ($s0)
/* 03B320 7F0067F0 0FC2C0DB */ jal sub_GAME_7F0B036C /* 03B320 7F0067F0 0FC2C0DB */ jal isPointInsideTriStandTileUnscaled_Maybe
/* 03B324 7F0067F4 8E060008 */ lw $a2, 8($s0) /* 03B324 7F0067F4 8E060008 */ lw $a2, 8($s0)
/* 03B328 7F0067F8 5440001D */ bnezl $v0, .L7F006870 /* 03B328 7F0067F8 5440001D */ bnezl $v0, .L7F006870
/* 03B32C 7F0067FC 24020001 */ li $v0, 1 /* 03B32C 7F0067FC 24020001 */ li $v0, 1
+1 -1
View File
@@ -14,7 +14,7 @@ glabel sub_GAME_7F007180
/* 03BCB4 7F007184 AFBF0014 */ sw $ra, 0x14($sp) /* 03BCB4 7F007184 AFBF0014 */ sw $ra, 0x14($sp)
/* 03BCB8 7F007188 0FC2F7C1 */ jal sub_GAME_7F0BDF04 /* 03BCB8 7F007188 0FC2F7C1 */ jal sub_GAME_7F0BDF04
/* 03BCBC 7F00718C 00000000 */ nop /* 03BCBC 7F00718C 00000000 */ nop
/* 03BCC0 7F007190 0FC26919 */ jal get_num_players /* 03BCC0 7F007190 0FC26919 */ jal getPlayerCount
/* 03BCC4 7F007194 AFA20018 */ sw $v0, 0x18($sp) /* 03BCC4 7F007194 AFA20018 */ sw $v0, 0x18($sp)
/* 03BCC8 7F007198 240E00C8 */ li $t6, 200 /* 03BCC8 7F007198 240E00C8 */ li $t6, 200
/* 03BCCC 7F00719C 01C2001A */ div $zero, $t6, $v0 /* 03BCCC 7F00719C 01C2001A */ div $zero, $t6, $v0
+1 -1
View File
@@ -880,7 +880,7 @@ glabel insert_bond_eye_intro
/* 03CFB8 7F008488 27A40060 */ addiu $a0, $sp, 0x60 /* 03CFB8 7F008488 27A40060 */ addiu $a0, $sp, 0x60
/* 03CFBC 7F00848C E7B00020 */ swc1 $f16, 0x20($sp) /* 03CFBC 7F00848C E7B00020 */ swc1 $f16, 0x20($sp)
/* 03CFC0 7F008490 E7B20024 */ swc1 $f18, 0x24($sp) /* 03CFC0 7F008490 E7B20024 */ swc1 $f18, 0x24($sp)
/* 03CFC4 7F008494 0FC165A5 */ jal sub_GAME_7F059694 /* 03CFC4 7F008494 0FC165A5 */ jal matrix_4x4_7F059694
/* 03CFC8 7F008498 E7AA001C */ swc1 $f10, 0x1c($sp) /* 03CFC8 7F008498 E7AA001C */ swc1 $f10, 0x1c($sp)
/* 03CFCC 7F00849C 02002025 */ move $a0, $s0 /* 03CFCC 7F00849C 02002025 */ move $a0, $s0
/* 03CFD0 7F0084A0 24050002 */ li $a1, 2 /* 03CFD0 7F0084A0 24050002 */ li $a1, 2
+49 -101
View File
@@ -1,5 +1,6 @@
#include "ultra64.h" #include "ultra64.h"
#include "game/lightfixture.h" #include "game/lightfixture.h"
#include "assets/images/image_externs.h"
// bss // bss
//CODE.bss:80082660 //CODE.bss:80082660
@@ -19,50 +20,57 @@ s32 dword_CODE_bss_80083318;
//D:80046030 //D:80046030
s32 D_80046030[] = {0, 0, 0, 0, 0, 0, 0, 0}; s32 D_80046030[] = {0, 0, 0, 0, 0, 0, 0, 0};
//this mostly matches 4 bytes different
#ifdef NONMATCHING
void init_lightfixture_tables(void) void init_lightfixture_tables(void)
{ {
s32 i; s32 i;
for (i=0;i<0x64;i++) {light_fixture_table[i].index = 0;}
for (i=0;i<0x64;i++) for (i=0;i<0x400;i++) {word_CODE_bss_80082B18[i] = 0;}
{
light_fixture_table[i].index = 0;
}
for (i=0;i<0x400;i=i+8)
{
word_CODE_bss_80082B18[i+2] = 0;
word_CODE_bss_80082B18[i+4] = 0;
word_CODE_bss_80082B18[i+6] = 0;
word_CODE_bss_80082B18[i+0] = 0;
}
D_80046030[0] = 0; D_80046030[0] = 0;
} }
#else
GLOBAL_ASM(
.text
glabel init_lightfixture_tables
/* 0F0000 7F0BB4D0 3C038008 */ lui $v1, %hi(light_fixture_table)
/* 0F0004 7F0BB4D4 3C028008 */ lui $v0, %hi(cur_entry_lightfixture_table)
/* 0F0008 7F0BB4D8 24422B10 */ addiu $v0, %lo(cur_entry_lightfixture_table) # addiu $v0, $v0, 0x2b10
/* 0F000C 7F0BB4DC 24632660 */ addiu $v1, %lo(light_fixture_table) # addiu $v1, $v1, 0x2660
.L7F0BB4E0:
/* 0F0010 7F0BB4E0 2463000C */ addiu $v1, $v1, 0xc
/* 0F0014 7F0BB4E4 0062082B */ sltu $at, $v1, $v0
/* 0F0018 7F0BB4E8 1420FFFD */ bnez $at, .L7F0BB4E0
/* 0F001C 7F0BB4EC A460FFF4 */ sh $zero, -0xc($v1)
/* 0F0020 7F0BB4F0 3C038008 */ lui $v1, %hi(word_CODE_bss_80082B18)
/* 0F0024 7F0BB4F4 3C028008 */ lui $v0, %hi(dword_CODE_bss_80083318)
/* 0F0028 7F0BB4F8 24423318 */ addiu $v0, %lo(dword_CODE_bss_80083318) # addiu $v0, $v0, 0x3318
/* 0F002C 7F0BB4FC 24632B18 */ addiu $v1, %lo(word_CODE_bss_80082B18) # addiu $v1, $v1, 0x2b18
.L7F0BB500:
/*v1 offsets don't match*/
/* 0F0030 7F0BB500 24630010 */ addiu $v1, $v1, 0x10
/* 0F0034 7F0BB504 A460FFF4 */ sh $zero, -0xc($v1)
/* 0F0038 7F0BB508 A460FFF8 */ sh $zero, -8($v1)
/* 0F003C 7F0BB50C A460FFFC */ sh $zero, -4($v1)
/* 0F0040 7F0BB510 1462FFFB */ bne $v1, $v0, .L7F0BB500
/* 0F0044 7F0BB514 A460FFF0 */ sh $zero, -0x10($v1)
/* 0F0048 7F0BB518 3C018004 */ lui $at, %hi(D_80046030)
/* 0F004C 7F0BB51C 03E00008 */ jr $ra
/* 0F0050 7F0BB520 AC206030 */ sw $zero, %lo(D_80046030)($at)
)
#endif
s32 get_index_of_current_entry_in_init_lightfixture_table(void) s32 get_index_of_current_entry_in_init_lightfixture_table(void)
{ {
s32 i; s32 i;
for (i = 0; i != 0x64; i+=4) for (i = 0; i != 0x64; i++)
{ {
if (light_fixture_table[i].index == 0) if (light_fixture_table[i].index == 0)
{ {
return i; return i;
} }
if (light_fixture_table[i+1].index == 0)
{
return i + 1;
}
if (light_fixture_table[i+2].index == 0)
{
return i + 2;
}
if (light_fixture_table[i+3].index == 0)
{
return i + 3;
}
} }
return 0x64; return 0x64;
} }
@@ -86,87 +94,27 @@ void save_ptrDL_enpoint_to_current_init_lightfixture_table(Gfx *param_1)
} }
#ifdef NONMATCHING
s32 check_if_imageID_is_light(s32 imageID) s32 check_if_imageID_is_light(s32 imageID)
{ {
if (imageID == 0xC9) if ((imageID == _image201_ID_LIGHT) ||
(imageID == _image203_ID_LIGHT) ||
(imageID == _image205_ID_LIGHT) ||
(imageID == _image252_ID_LIGHT) ||
(imageID == _image254_ID_LIGHT) ||
(imageID == _image255_ID_LIGHT) ||
(imageID == _image256_ID_LIGHT) ||
(imageID == _image428_ID_LIGHT) ||
(imageID == _image982_ID_LIGHT) ||
(imageID == _image1383_ID_LIGHT))
{ {
return 1; return 1;
} }
if (imageID == 0xCB) else
{ {
return 1; return 0;
} }
if (imageID == 0xCD)
{
return 1;
}
if (imageID == 0xFC)
{
return 1;
}
if (imageID == 0xFE)
{
return 1;
}
if (imageID == 0xFF)
{
return 1;
}
if (imageID == 0x100)
{
return 1;
}
if (imageID == 0x1AC)
{
return 1;
}
if (imageID == 0x3D6)
{
return 1;
}
if (imageID == 0x567)
{
return 1;
}
return 0;
} }
#else
GLOBAL_ASM(
.text
glabel check_if_imageID_is_light
/* 0F0160 7F0BB630 240100C9 */ li $at, 201
/* 0F0164 7F0BB634 10810013 */ beq $a0, $at, .L7F0BB684
/* 0F0168 7F0BB638 240100CB */ li $at, 203
/* 0F016C 7F0BB63C 10810011 */ beq $a0, $at, .L7F0BB684
/* 0F0170 7F0BB640 240100CD */ li $at, 205
/* 0F0174 7F0BB644 1081000F */ beq $a0, $at, .L7F0BB684
/* 0F0178 7F0BB648 240100FC */ li $at, 252
/* 0F017C 7F0BB64C 1081000D */ beq $a0, $at, .L7F0BB684
/* 0F0180 7F0BB650 240100FE */ li $at, 254
/* 0F0184 7F0BB654 1081000B */ beq $a0, $at, .L7F0BB684
/* 0F0188 7F0BB658 240100FF */ li $at, 255
/* 0F018C 7F0BB65C 10810009 */ beq $a0, $at, .L7F0BB684
/* 0F0190 7F0BB660 24010100 */ li $at, 256
/* 0F0194 7F0BB664 10810007 */ beq $a0, $at, .L7F0BB684
/* 0F0198 7F0BB668 240101AC */ li $at, 428
/* 0F019C 7F0BB66C 10810005 */ beq $a0, $at, .L7F0BB684
/* 0F01A0 7F0BB670 240103D6 */ li $at, 982
/* 0F01A4 7F0BB674 10810003 */ beq $a0, $at, .L7F0BB684
/* 0F01A8 7F0BB678 24010567 */ li $at, 1383
/* 0F01AC 7F0BB67C 14810003 */ bne $a0, $at, .L7F0BB68C
/* 0F01B0 7F0BB680 00001025 */ move $v0, $zero
.L7F0BB684:
/* 0F01B4 7F0BB684 03E00008 */ jr $ra
/* 0F01B8 7F0BB688 24020001 */ li $v0, 1
.L7F0BB68C:
/* 0F01BC 7F0BB68C 03E00008 */ jr $ra
/* 0F01C0 7F0BB690 00000000 */ nop
)
#endif
+46 -46
View File
@@ -490,7 +490,7 @@ glabel stage_load
/* 0F27BC 7F0BDC8C 0240A025 */ move $s4, $s2 /* 0F27BC 7F0BDC8C 0240A025 */ move $s4, $s2
/* 0F27C0 7F0BDC90 24130004 */ li $s3, 4 /* 0F27C0 7F0BDC90 24130004 */ li $s3, 4
.L7F0BDC94: .L7F0BDC94:
/* 0F27C4 7F0BDC94 0FC26919 */ jal get_num_players /* 0F27C4 7F0BDC94 0FC26919 */ jal getPlayerCount
/* 0F27C8 7F0BDC98 00000000 */ nop /* 0F27C8 7F0BDC98 00000000 */ nop
/* 0F27CC 7F0BDC9C 24010001 */ li $at, 1 /* 0F27CC 7F0BDC9C 24010001 */ li $at, 1
/* 0F27D0 7F0BDCA0 14410009 */ bne $v0, $at, .L7F0BDCC8 /* 0F27D0 7F0BDCA0 14410009 */ bne $v0, $at, .L7F0BDCC8
@@ -605,7 +605,7 @@ glabel stage_load
/* 0F2968 7F0BDE38 00000000 */ nop /* 0F2968 7F0BDE38 00000000 */ nop
/* 0F296C 7F0BDE3C 0FC01410 */ jal something_with_ejected_cartridges /* 0F296C 7F0BDE3C 0FC01410 */ jal something_with_ejected_cartridges
/* 0F2970 7F0BDE40 00000000 */ nop /* 0F2970 7F0BDE40 00000000 */ nop
/* 0F2974 7F0BDE44 0FC26919 */ jal get_num_players /* 0F2974 7F0BDE44 0FC26919 */ jal getPlayerCount
/* 0F2978 7F0BDE48 00008025 */ move $s0, $zero /* 0F2978 7F0BDE48 00008025 */ move $s0, $zero
/* 0F297C 7F0BDE4C 18400016 */ blez $v0, .L7F0BDEA8 /* 0F297C 7F0BDE4C 18400016 */ blez $v0, .L7F0BDEA8
/* 0F2980 7F0BDE50 00000000 */ nop /* 0F2980 7F0BDE50 00000000 */ nop
@@ -626,7 +626,7 @@ glabel stage_load
/* 0F29B8 7F0BDE88 00000000 */ nop /* 0F29B8 7F0BDE88 00000000 */ nop
/* 0F29BC 7F0BDE8C 0FC01CBE */ jal disable_onscreen_cheat_text /* 0F29BC 7F0BDE8C 0FC01CBE */ jal disable_onscreen_cheat_text
/* 0F29C0 7F0BDE90 00000000 */ nop /* 0F29C0 7F0BDE90 00000000 */ nop
/* 0F29C4 7F0BDE94 0FC26919 */ jal get_num_players /* 0F29C4 7F0BDE94 0FC26919 */ jal getPlayerCount
/* 0F29C8 7F0BDE98 26100001 */ addiu $s0, $s0, 1 /* 0F29C8 7F0BDE98 26100001 */ addiu $s0, $s0, 1
/* 0F29CC 7F0BDE9C 0202082A */ slt $at, $s0, $v0 /* 0F29CC 7F0BDE9C 0202082A */ slt $at, $s0, $v0
/* 0F29D0 7F0BDEA0 1420FFEC */ bnez $at, .L7F0BDE54 /* 0F29D0 7F0BDEA0 1420FFEC */ bnez $at, .L7F0BDE54
@@ -637,7 +637,7 @@ glabel stage_load
.L7F0BDEB0: .L7F0BDEB0:
/* 0F29E0 7F0BDEB0 0FC0154D */ jal set_contents_of_80036078 /* 0F29E0 7F0BDEB0 0FC0154D */ jal set_contents_of_80036078
/* 0F29E4 7F0BDEB4 00002025 */ move $a0, $zero /* 0F29E4 7F0BDEB4 00002025 */ move $a0, $zero
/* 0F29E8 7F0BDEB8 0FC348E0 */ jal remove_viewport_buffer /* 0F29E8 7F0BDEB8 0FC348E0 */ jal zbufDeallocate
/* 0F29EC 7F0BDEBC 00000000 */ nop /* 0F29EC 7F0BDEBC 00000000 */ nop
/* 0F29F0 7F0BDEC0 0C000EEC */ jal setVideoWidthHeightToMode /* 0F29F0 7F0BDEC0 0C000EEC */ jal setVideoWidthHeightToMode
/* 0F29F4 7F0BDEC4 24040001 */ li $a0, 1 /* 0F29F4 7F0BDEC4 24040001 */ li $a0, 1
@@ -795,7 +795,7 @@ glabel stage_load
/* 0F33BC 7F0BE84C 0240A025 */ move $s4, $s2 /* 0F33BC 7F0BE84C 0240A025 */ move $s4, $s2
/* 0F33C0 7F0BE850 24130004 */ li $s3, 4 /* 0F33C0 7F0BE850 24130004 */ li $s3, 4
.Ljp7F0BE854: .Ljp7F0BE854:
/* 0F33C4 7F0BE854 0FC26C01 */ jal get_num_players /* 0F33C4 7F0BE854 0FC26C01 */ jal getPlayerCount
/* 0F33C8 7F0BE858 00000000 */ nop /* 0F33C8 7F0BE858 00000000 */ nop
/* 0F33CC 7F0BE85C 24010001 */ li $at, 1 /* 0F33CC 7F0BE85C 24010001 */ li $at, 1
/* 0F33D0 7F0BE860 14410009 */ bne $v0, $at, .Ljp7F0BE888 /* 0F33D0 7F0BE860 14410009 */ bne $v0, $at, .Ljp7F0BE888
@@ -910,7 +910,7 @@ glabel stage_load
/* 0F3568 7F0BE9F8 00000000 */ nop /* 0F3568 7F0BE9F8 00000000 */ nop
/* 0F356C 7F0BE9FC 0FC01418 */ jal something_with_ejected_cartridges /* 0F356C 7F0BE9FC 0FC01418 */ jal something_with_ejected_cartridges
/* 0F3570 7F0BEA00 00000000 */ nop /* 0F3570 7F0BEA00 00000000 */ nop
/* 0F3574 7F0BEA04 0FC26C01 */ jal get_num_players /* 0F3574 7F0BEA04 0FC26C01 */ jal getPlayerCount
/* 0F3578 7F0BEA08 00008025 */ move $s0, $zero /* 0F3578 7F0BEA08 00008025 */ move $s0, $zero
/* 0F357C 7F0BEA0C 18400016 */ blez $v0, .Ljp7F0BEA68 /* 0F357C 7F0BEA0C 18400016 */ blez $v0, .Ljp7F0BEA68
/* 0F3580 7F0BEA10 00000000 */ nop /* 0F3580 7F0BEA10 00000000 */ nop
@@ -931,7 +931,7 @@ glabel stage_load
/* 0F35B8 7F0BEA48 00000000 */ nop /* 0F35B8 7F0BEA48 00000000 */ nop
/* 0F35BC 7F0BEA4C 0FC01CC6 */ jal disable_onscreen_cheat_text /* 0F35BC 7F0BEA4C 0FC01CC6 */ jal disable_onscreen_cheat_text
/* 0F35C0 7F0BEA50 00000000 */ nop /* 0F35C0 7F0BEA50 00000000 */ nop
/* 0F35C4 7F0BEA54 0FC26C01 */ jal get_num_players /* 0F35C4 7F0BEA54 0FC26C01 */ jal getPlayerCount
/* 0F35C8 7F0BEA58 26100001 */ addiu $s0, $s0, 1 /* 0F35C8 7F0BEA58 26100001 */ addiu $s0, $s0, 1
/* 0F35CC 7F0BEA5C 0202082A */ slt $at, $s0, $v0 /* 0F35CC 7F0BEA5C 0202082A */ slt $at, $s0, $v0
/* 0F35D0 7F0BEA60 1420FFEC */ bnez $at, .Ljp7F0BEA14 /* 0F35D0 7F0BEA60 1420FFEC */ bnez $at, .Ljp7F0BEA14
@@ -942,7 +942,7 @@ glabel stage_load
.Ljp7F0BEA70: .Ljp7F0BEA70:
/* 0F35E0 7F0BEA70 0FC01555 */ jal set_contents_of_80036078 /* 0F35E0 7F0BEA70 0FC01555 */ jal set_contents_of_80036078
/* 0F35E4 7F0BEA74 00002025 */ move $a0, $zero /* 0F35E4 7F0BEA74 00002025 */ move $a0, $zero
/* 0F35E8 7F0BEA78 0FC34C18 */ jal remove_viewport_buffer /* 0F35E8 7F0BEA78 0FC34C18 */ jal zbufDeallocate
/* 0F35EC 7F0BEA7C 00000000 */ nop /* 0F35EC 7F0BEA7C 00000000 */ nop
/* 0F35F0 7F0BEA80 0C000EEC */ jal setVideoWidthHeightToMode /* 0F35F0 7F0BEA80 0C000EEC */ jal setVideoWidthHeightToMode
/* 0F35F4 7F0BEA84 24040001 */ li $a0, 1 /* 0F35F4 7F0BEA84 24040001 */ li $a0, 1
@@ -1348,7 +1348,7 @@ glabel sub_GAME_7F0BE30C
/* 0F2F68 7F0BE438 10000102 */ b .L7F0BE844 /* 0F2F68 7F0BE438 10000102 */ b .L7F0BE844
/* 0F2F6C 7F0BE43C AFA20060 */ sw $v0, 0x60($sp) /* 0F2F6C 7F0BE43C AFA20060 */ sw $v0, 0x60($sp)
.L7F0BE440: .L7F0BE440:
/* 0F2F70 7F0BE440 0FC26919 */ jal get_num_players /* 0F2F70 7F0BE440 0FC26919 */ jal getPlayerCount
/* 0F2F74 7F0BE444 00000000 */ nop /* 0F2F74 7F0BE444 00000000 */ nop
/* 0F2F78 7F0BE448 8FAA0060 */ lw $t2, 0x60($sp) /* 0F2F78 7F0BE448 8FAA0060 */ lw $t2, 0x60($sp)
/* 0F2F7C 7F0BE44C AFA20044 */ sw $v0, 0x44($sp) /* 0F2F7C 7F0BE44C AFA20044 */ sw $v0, 0x44($sp)
@@ -1402,7 +1402,7 @@ glabel sub_GAME_7F0BE30C
/* 0F3038 7F0BE508 0C001151 */ jal setvideo_far /* 0F3038 7F0BE508 0C001151 */ jal setvideo_far
/* 0F303C 7F0BE50C C5CC11D0 */ lwc1 $f12, 0x11d0($t6) /* 0F303C 7F0BE50C C5CC11D0 */ lwc1 $f12, 0x11d0($t6)
/* 0F3040 7F0BE510 8E0F0000 */ lw $t7, ($s0) /* 0F3040 7F0BE510 8E0F0000 */ lw $t7, ($s0)
/* 0F3044 7F0BE514 0C001164 */ jal video_related_21 /* 0F3044 7F0BE514 0C001164 */ jal set_page_aspect
/* 0F3048 7F0BE518 C5EC11D4 */ lwc1 $f12, 0x11d4($t7) /* 0F3048 7F0BE518 C5EC11D4 */ lwc1 $f12, 0x11d4($t7)
/* 0F304C 7F0BE51C 0C000FAD */ jal video_related_10 /* 0F304C 7F0BE51C 0C000FAD */ jal video_related_10
/* 0F3050 7F0BE520 8FA40060 */ lw $a0, 0x60($sp) /* 0F3050 7F0BE520 8FA40060 */ lw $a0, 0x60($sp)
@@ -1741,7 +1741,7 @@ glabel sub_GAME_7F0BE30C
/* 0F3B68 7F0BEFF8 1000010B */ b .Ljp7F0BF428 /* 0F3B68 7F0BEFF8 1000010B */ b .Ljp7F0BF428
/* 0F3B6C 7F0BEFFC AFA20060 */ sw $v0, 0x60($sp) /* 0F3B6C 7F0BEFFC AFA20060 */ sw $v0, 0x60($sp)
.Ljp7F0BF000: .Ljp7F0BF000:
/* 0F3B70 7F0BF000 0FC26C01 */ jal get_num_players /* 0F3B70 7F0BF000 0FC26C01 */ jal getPlayerCount
/* 0F3B74 7F0BF004 00000000 */ nop /* 0F3B74 7F0BF004 00000000 */ nop
/* 0F3B78 7F0BF008 8FAA0060 */ lw $t2, 0x60($sp) /* 0F3B78 7F0BF008 8FAA0060 */ lw $t2, 0x60($sp)
/* 0F3B7C 7F0BF00C AFA20044 */ sw $v0, 0x44($sp) /* 0F3B7C 7F0BF00C AFA20044 */ sw $v0, 0x44($sp)
@@ -1795,7 +1795,7 @@ glabel sub_GAME_7F0BE30C
/* 0F3C38 7F0BF0C8 0C001151 */ jal setvideo_far /* 0F3C38 7F0BF0C8 0C001151 */ jal setvideo_far
/* 0F3C3C 7F0BF0CC C5CC11D0 */ lwc1 $f12, 0x11d0($t6) /* 0F3C3C 7F0BF0CC C5CC11D0 */ lwc1 $f12, 0x11d0($t6)
/* 0F3C40 7F0BF0D0 8E0F0000 */ lw $t7, ($s0) /* 0F3C40 7F0BF0D0 8E0F0000 */ lw $t7, ($s0)
/* 0F3C44 7F0BF0D4 0C001164 */ jal video_related_21 /* 0F3C44 7F0BF0D4 0C001164 */ jal set_page_aspect
/* 0F3C48 7F0BF0D8 C5EC11D4 */ lwc1 $f12, 0x11d4($t7) /* 0F3C48 7F0BF0D8 C5EC11D4 */ lwc1 $f12, 0x11d4($t7)
/* 0F3C4C 7F0BF0DC 0C000FAD */ jal video_related_10 /* 0F3C4C 7F0BF0DC 0C000FAD */ jal video_related_10
/* 0F3C50 7F0BF0E0 8FA40060 */ lw $a0, 0x60($sp) /* 0F3C50 7F0BF0E0 8FA40060 */ lw $a0, 0x60($sp)
@@ -2581,7 +2581,7 @@ glabel manage_mp_game
/* 0F37CC 7F0BEC9C 1481FFEF */ bne $a0, $at, .L7F0BEC5C /* 0F37CC 7F0BEC9C 1481FFEF */ bne $a0, $at, .L7F0BEC5C
/* 0F37D0 7F0BECA0 24630001 */ addiu $v1, $v1, 1 /* 0F37D0 7F0BECA0 24630001 */ addiu $v1, $v1, 1
.L7F0BECA4: .L7F0BECA4:
/* 0F37D4 7F0BECA4 0FC26919 */ jal get_num_players /* 0F37D4 7F0BECA4 0FC26919 */ jal getPlayerCount
/* 0F37D8 7F0BECA8 00000000 */ nop /* 0F37D8 7F0BECA8 00000000 */ nop
/* 0F37DC 7F0BECAC 28410002 */ slti $at, $v0, 2 /* 0F37DC 7F0BECAC 28410002 */ slti $at, $v0, 2
/* 0F37E0 7F0BECB0 1420014B */ bnez $at, .L7F0BF1E0 /* 0F37E0 7F0BECB0 1420014B */ bnez $at, .L7F0BF1E0
@@ -2597,14 +2597,14 @@ glabel manage_mp_game
/* 0F3808 7F0BECD8 00000000 */ nop /* 0F3808 7F0BECD8 00000000 */ nop
/* 0F380C 7F0BECDC AFA00190 */ sw $zero, 0x190($sp) /* 0F380C 7F0BECDC AFA00190 */ sw $zero, 0x190($sp)
/* 0F3810 7F0BECE0 AFA0018C */ sw $zero, 0x18c($sp) /* 0F3810 7F0BECE0 AFA0018C */ sw $zero, 0x18c($sp)
/* 0F3814 7F0BECE4 0FC26919 */ jal get_num_players /* 0F3814 7F0BECE4 0FC26919 */ jal getPlayerCount
/* 0F3818 7F0BECE8 AFA00188 */ sw $zero, 0x188($sp) /* 0F3818 7F0BECE8 AFA00188 */ sw $zero, 0x188($sp)
/* 0F381C 7F0BECEC 8FA30190 */ lw $v1, 0x190($sp) /* 0F381C 7F0BECEC 8FA30190 */ lw $v1, 0x190($sp)
/* 0F3820 7F0BECF0 8FA5018C */ lw $a1, 0x18c($sp) /* 0F3820 7F0BECF0 8FA5018C */ lw $a1, 0x18c($sp)
/* 0F3824 7F0BECF4 1840001B */ blez $v0, .L7F0BED64 /* 0F3824 7F0BECF4 1840001B */ blez $v0, .L7F0BED64
/* 0F3828 7F0BECF8 8FA60188 */ lw $a2, 0x188($sp) /* 0F3828 7F0BECF8 8FA60188 */ lw $a2, 0x188($sp)
/* 0F382C 7F0BECFC 3C0E8008 */ lui $t6, %hi(ptr_BONDdata_p1) /* 0F382C 7F0BECFC 3C0E8008 */ lui $t6, %hi(players)
/* 0F3830 7F0BED00 25CE9EE0 */ addiu $t6, %lo(ptr_BONDdata_p1) # addiu $t6, $t6, -0x6120 /* 0F3830 7F0BED00 25CE9EE0 */ addiu $t6, %lo(players) # addiu $t6, $t6, -0x6120
/* 0F3834 7F0BED04 0003C880 */ sll $t9, $v1, 2 /* 0F3834 7F0BED04 0003C880 */ sll $t9, $v1, 2
/* 0F3838 7F0BED08 032E2021 */ addu $a0, $t9, $t6 /* 0F3838 7F0BED08 032E2021 */ addu $a0, $t9, $t6
.L7F0BED0C: .L7F0BED0C:
@@ -2623,7 +2623,7 @@ glabel manage_mp_game
.L7F0BED3C: .L7F0BED3C:
/* 0F386C 7F0BED3C AFA4001C */ sw $a0, 0x1c($sp) /* 0F386C 7F0BED3C AFA4001C */ sw $a0, 0x1c($sp)
/* 0F3870 7F0BED40 AFA5018C */ sw $a1, 0x18c($sp) /* 0F3870 7F0BED40 AFA5018C */ sw $a1, 0x18c($sp)
/* 0F3874 7F0BED44 0FC26919 */ jal get_num_players /* 0F3874 7F0BED44 0FC26919 */ jal getPlayerCount
/* 0F3878 7F0BED48 AFA60188 */ sw $a2, 0x188($sp) /* 0F3878 7F0BED48 AFA60188 */ sw $a2, 0x188($sp)
/* 0F387C 7F0BED4C 8FA30190 */ lw $v1, 0x190($sp) /* 0F387C 7F0BED4C 8FA30190 */ lw $v1, 0x190($sp)
/* 0F3880 7F0BED50 8FA4001C */ lw $a0, 0x1c($sp) /* 0F3880 7F0BED50 8FA4001C */ lw $a0, 0x1c($sp)
@@ -2656,7 +2656,7 @@ glabel manage_mp_game
/* 0F38E4 7F0BEDB4 01C4082A */ slt $at, $t6, $a0 /* 0F38E4 7F0BEDB4 01C4082A */ slt $at, $t6, $a0
/* 0F38E8 7F0BEDB8 14200012 */ bnez $at, .L7F0BEE04 /* 0F38E8 7F0BEDB8 14200012 */ bnez $at, .L7F0BEE04
/* 0F38EC 7F0BEDBC 00000000 */ nop /* 0F38EC 7F0BEDBC 00000000 */ nop
/* 0F38F0 7F0BEDC0 0FC26919 */ jal get_num_players /* 0F38F0 7F0BEDC0 0FC26919 */ jal getPlayerCount
/* 0F38F4 7F0BEDC4 AFA0017C */ sw $zero, 0x17c($sp) /* 0F38F4 7F0BEDC4 AFA0017C */ sw $zero, 0x17c($sp)
/* 0F38F8 7F0BEDC8 1840000E */ blez $v0, .L7F0BEE04 /* 0F38F8 7F0BEDC8 1840000E */ blez $v0, .L7F0BEE04
/* 0F38FC 7F0BEDCC 00000000 */ nop /* 0F38FC 7F0BEDCC 00000000 */ nop
@@ -2668,7 +2668,7 @@ glabel manage_mp_game
/* 0F3910 7F0BEDE0 2484B704 */ addiu $a0, %lo(aOneMinuteLeft) # addiu $a0, $a0, -0x48fc /* 0F3910 7F0BEDE0 2484B704 */ addiu $a0, %lo(aOneMinuteLeft) # addiu $a0, $a0, -0x48fc
/* 0F3914 7F0BEDE4 8FAF017C */ lw $t7, 0x17c($sp) /* 0F3914 7F0BEDE4 8FAF017C */ lw $t7, 0x17c($sp)
/* 0F3918 7F0BEDE8 25F80001 */ addiu $t8, $t7, 1 /* 0F3918 7F0BEDE8 25F80001 */ addiu $t8, $t7, 1
/* 0F391C 7F0BEDEC 0FC26919 */ jal get_num_players /* 0F391C 7F0BEDEC 0FC26919 */ jal getPlayerCount
/* 0F3920 7F0BEDF0 AFB8017C */ sw $t8, 0x17c($sp) /* 0F3920 7F0BEDF0 AFB8017C */ sw $t8, 0x17c($sp)
/* 0F3924 7F0BEDF4 8FB9017C */ lw $t9, 0x17c($sp) /* 0F3924 7F0BEDF4 8FB9017C */ lw $t9, 0x17c($sp)
/* 0F3928 7F0BEDF8 0322082A */ slt $at, $t9, $v0 /* 0F3928 7F0BEDF8 0322082A */ slt $at, $t9, $v0
@@ -2730,16 +2730,16 @@ glabel manage_mp_game
/* 0F39F8 7F0BEEC8 8F398374 */ lw $t9, %lo(clock_timer)($t9) /* 0F39F8 7F0BEEC8 8F398374 */ lw $t9, %lo(clock_timer)($t9)
/* 0F39FC 7F0BEECC 1320003A */ beqz $t9, .L7F0BEFB8 /* 0F39FC 7F0BEECC 1320003A */ beqz $t9, .L7F0BEFB8
/* 0F3A00 7F0BEED0 00000000 */ nop /* 0F3A00 7F0BEED0 00000000 */ nop
/* 0F3A04 7F0BEED4 0FC26919 */ jal get_num_players /* 0F3A04 7F0BEED4 0FC26919 */ jal getPlayerCount
/* 0F3A08 7F0BEED8 00000000 */ nop /* 0F3A08 7F0BEED8 00000000 */ nop
/* 0F3A0C 7F0BEEDC 00403825 */ move $a3, $v0 /* 0F3A0C 7F0BEEDC 00403825 */ move $a3, $v0
/* 0F3A10 7F0BEEE0 00002825 */ move $a1, $zero /* 0F3A10 7F0BEEE0 00002825 */ move $a1, $zero
/* 0F3A14 7F0BEEE4 00003025 */ move $a2, $zero /* 0F3A14 7F0BEEE4 00003025 */ move $a2, $zero
/* 0F3A18 7F0BEEE8 18400029 */ blez $v0, .L7F0BEF90 /* 0F3A18 7F0BEEE8 18400029 */ blez $v0, .L7F0BEF90
/* 0F3A1C 7F0BEEEC 00002025 */ move $a0, $zero /* 0F3A1C 7F0BEEEC 00002025 */ move $a0, $zero
/* 0F3A20 7F0BEEF0 3C038008 */ lui $v1, %hi(ptr_BONDdata_p1) /* 0F3A20 7F0BEEF0 3C038008 */ lui $v1, %hi(players)
/* 0F3A24 7F0BEEF4 44800000 */ mtc1 $zero, $f0 /* 0F3A24 7F0BEEF4 44800000 */ mtc1 $zero, $f0
/* 0F3A28 7F0BEEF8 24639EE0 */ addiu $v1, %lo(ptr_BONDdata_p1) # addiu $v1, $v1, -0x6120 /* 0F3A28 7F0BEEF8 24639EE0 */ addiu $v1, %lo(players) # addiu $v1, $v1, -0x6120
.L7F0BEEFC: .L7F0BEEFC:
/* 0F3A2C 7F0BEEFC 8C620000 */ lw $v0, ($v1) /* 0F3A2C 7F0BEEFC 8C620000 */ lw $v0, ($v1)
/* 0F3A30 7F0BEF00 8C4F00D8 */ lw $t7, 0xd8($v0) /* 0F3A30 7F0BEF00 8C4F00D8 */ lw $t7, 0xd8($v0)
@@ -2802,7 +2802,7 @@ glabel manage_mp_game
/* 0F3AFC 7F0BEFCC 8DEF8374 */ lw $t7, %lo(clock_timer)($t7) /* 0F3AFC 7F0BEFCC 8DEF8374 */ lw $t7, %lo(clock_timer)($t7)
/* 0F3B00 7F0BEFD0 11E00083 */ beqz $t7, .L7F0BF1E0 /* 0F3B00 7F0BEFD0 11E00083 */ beqz $t7, .L7F0BF1E0
/* 0F3B04 7F0BEFD4 00000000 */ nop /* 0F3B04 7F0BEFD4 00000000 */ nop
/* 0F3B08 7F0BEFD8 0FC26919 */ jal get_num_players /* 0F3B08 7F0BEFD8 0FC26919 */ jal getPlayerCount
/* 0F3B0C 7F0BEFDC 00000000 */ nop /* 0F3B0C 7F0BEFDC 00000000 */ nop
/* 0F3B10 7F0BEFE0 44800000 */ mtc1 $zero, $f0 /* 0F3B10 7F0BEFE0 44800000 */ mtc1 $zero, $f0
/* 0F3B14 7F0BEFE4 00405025 */ move $t2, $v0 /* 0F3B14 7F0BEFE4 00405025 */ move $t2, $v0
@@ -2818,8 +2818,8 @@ glabel manage_mp_game
/* 0F3B38 7F0BF008 30490003 */ andi $t1, $v0, 3 /* 0F3B38 7F0BF008 30490003 */ andi $t1, $v0, 3
/* 0F3B3C 7F0BF00C 11200019 */ beqz $t1, .L7F0BF074 /* 0F3B3C 7F0BF00C 11200019 */ beqz $t1, .L7F0BF074
/* 0F3B40 7F0BF010 000C5880 */ sll $t3, $t4, 2 /* 0F3B40 7F0BF010 000C5880 */ sll $t3, $t4, 2
/* 0F3B44 7F0BF014 3C188008 */ lui $t8, %hi(ptr_BONDdata_p1) /* 0F3B44 7F0BF014 3C188008 */ lui $t8, %hi(players)
/* 0F3B48 7F0BF018 27189EE0 */ addiu $t8, %lo(ptr_BONDdata_p1) # addiu $t8, $t8, -0x6120 /* 0F3B48 7F0BF018 27189EE0 */ addiu $t8, %lo(players) # addiu $t8, $t8, -0x6120
/* 0F3B4C 7F0BF01C 00007080 */ sll $t6, $zero, 2 /* 0F3B4C 7F0BF01C 00007080 */ sll $t6, $zero, 2
/* 0F3B50 7F0BF020 0000C8C0 */ sll $t9, $zero, 3 /* 0F3B50 7F0BF020 0000C8C0 */ sll $t9, $zero, 3
/* 0F3B54 7F0BF024 0320C823 */ subu $t9, $t9, $zero /* 0F3B54 7F0BF024 0320C823 */ subu $t9, $t9, $zero
@@ -2845,10 +2845,10 @@ glabel manage_mp_game
/* 0F3B9C 7F0BF06C 00AF2821 */ addu $a1, $a1, $t7 /* 0F3B9C 7F0BF06C 00AF2821 */ addu $a1, $a1, $t7
/* 0F3BA0 7F0BF070 10E2002C */ beq $a3, $v0, .L7F0BF124 /* 0F3BA0 7F0BF070 10E2002C */ beq $a3, $v0, .L7F0BF124
.L7F0BF074: .L7F0BF074:
/* 0F3BA4 7F0BF074 3C188008 */ lui $t8, %hi(ptr_BONDdata_p1) /* 0F3BA4 7F0BF074 3C188008 */ lui $t8, %hi(players)
/* 0F3BA8 7F0BF078 0007C8C0 */ sll $t9, $a3, 3 /* 0F3BA8 7F0BF078 0007C8C0 */ sll $t9, $a3, 3
/* 0F3BAC 7F0BF07C 0327C823 */ subu $t9, $t9, $a3 /* 0F3BAC 7F0BF07C 0327C823 */ subu $t9, $t9, $a3
/* 0F3BB0 7F0BF080 27189EE0 */ addiu $t8, %lo(ptr_BONDdata_p1) # addiu $t8, $t8, -0x6120 /* 0F3BB0 7F0BF080 27189EE0 */ addiu $t8, %lo(players) # addiu $t8, $t8, -0x6120
/* 0F3BB4 7F0BF084 00077080 */ sll $t6, $a3, 2 /* 0F3BB4 7F0BF084 00077080 */ sll $t6, $a3, 2
/* 0F3BB8 7F0BF088 01D81821 */ addu $v1, $t6, $t8 /* 0F3BB8 7F0BF088 01D81821 */ addu $v1, $t6, $t8
/* 0F3BBC 7F0BF08C 0019C900 */ sll $t9, $t9, 4 /* 0F3BBC 7F0BF08C 0019C900 */ sll $t9, $t9, 4
@@ -2904,8 +2904,8 @@ glabel manage_mp_game
/* 0F3C6C 7F0BF13C 000F7900 */ sll $t7, $t7, 4 /* 0F3C6C 7F0BF13C 000F7900 */ sll $t7, $t7, 4
/* 0F3C70 7F0BF140 01EE1821 */ addu $v1, $t7, $t6 /* 0F3C70 7F0BF140 01EE1821 */ addu $v1, $t7, $t6
/* 0F3C74 7F0BF144 906F0068 */ lbu $t7, 0x68($v1) /* 0F3C74 7F0BF144 906F0068 */ lbu $t7, 0x68($v1)
/* 0F3C78 7F0BF148 3C188008 */ lui $t8, %hi(ptr_BONDdata_p1) /* 0F3C78 7F0BF148 3C188008 */ lui $t8, %hi(players)
/* 0F3C7C 7F0BF14C 27189EE0 */ addiu $t8, %lo(ptr_BONDdata_p1) # addiu $t8, $t8, -0x6120 /* 0F3C7C 7F0BF14C 27189EE0 */ addiu $t8, %lo(players) # addiu $t8, $t8, -0x6120
/* 0F3C80 7F0BF150 000CC880 */ sll $t9, $t4, 2 /* 0F3C80 7F0BF150 000CC880 */ sll $t9, $t4, 2
/* 0F3C84 7F0BF154 15E00003 */ bnez $t7, .L7F0BF164 /* 0F3C84 7F0BF154 15E00003 */ bnez $t7, .L7F0BF164
/* 0F3C88 7F0BF158 03382021 */ addu $a0, $t9, $t8 /* 0F3C88 7F0BF158 03382021 */ addu $a0, $t9, $t8
@@ -3458,7 +3458,7 @@ glabel manage_mp_game
/* 0F4440 7F0BF8D0 1481FFEF */ bne $a0, $at, .Ljp7F0BF890 /* 0F4440 7F0BF8D0 1481FFEF */ bne $a0, $at, .Ljp7F0BF890
/* 0F4444 7F0BF8D4 24630001 */ addiu $v1, $v1, 1 /* 0F4444 7F0BF8D4 24630001 */ addiu $v1, $v1, 1
.Ljp7F0BF8D8: .Ljp7F0BF8D8:
/* 0F4448 7F0BF8D8 0FC26C01 */ jal get_num_players /* 0F4448 7F0BF8D8 0FC26C01 */ jal getPlayerCount
/* 0F444C 7F0BF8DC 00000000 */ nop /* 0F444C 7F0BF8DC 00000000 */ nop
/* 0F4450 7F0BF8E0 28410002 */ slti $at, $v0, 2 /* 0F4450 7F0BF8E0 28410002 */ slti $at, $v0, 2
/* 0F4454 7F0BF8E4 1420014C */ bnez $at, .Ljp7F0BFE18 /* 0F4454 7F0BF8E4 1420014C */ bnez $at, .Ljp7F0BFE18
@@ -3474,14 +3474,14 @@ glabel manage_mp_game
/* 0F447C 7F0BF90C 00000000 */ nop /* 0F447C 7F0BF90C 00000000 */ nop
/* 0F4480 7F0BF910 AFA00190 */ sw $zero, 0x190($sp) /* 0F4480 7F0BF910 AFA00190 */ sw $zero, 0x190($sp)
/* 0F4484 7F0BF914 AFA0018C */ sw $zero, 0x18c($sp) /* 0F4484 7F0BF914 AFA0018C */ sw $zero, 0x18c($sp)
/* 0F4488 7F0BF918 0FC26C01 */ jal get_num_players /* 0F4488 7F0BF918 0FC26C01 */ jal getPlayerCount
/* 0F448C 7F0BF91C AFA00188 */ sw $zero, 0x188($sp) /* 0F448C 7F0BF91C AFA00188 */ sw $zero, 0x188($sp)
/* 0F4490 7F0BF920 8FA30190 */ lw $v1, 0x190($sp) /* 0F4490 7F0BF920 8FA30190 */ lw $v1, 0x190($sp)
/* 0F4494 7F0BF924 8FA5018C */ lw $a1, 0x18c($sp) /* 0F4494 7F0BF924 8FA5018C */ lw $a1, 0x18c($sp)
/* 0F4498 7F0BF928 1840001B */ blez $v0, .Ljp7F0BF998 /* 0F4498 7F0BF928 1840001B */ blez $v0, .Ljp7F0BF998
/* 0F449C 7F0BF92C 8FA60188 */ lw $a2, 0x188($sp) /* 0F449C 7F0BF92C 8FA60188 */ lw $a2, 0x188($sp)
/* 0F44A0 7F0BF930 3C0E8008 */ lui $t6, %hi(ptr_BONDdata_p1) # $t6, 0x8008 /* 0F44A0 7F0BF930 3C0E8008 */ lui $t6, %hi(players) # $t6, 0x8008
/* 0F44A4 7F0BF934 25CE9F50 */ addiu $t6, %lo(ptr_BONDdata_p1) # addiu $t6, $t6, -0x60b0 /* 0F44A4 7F0BF934 25CE9F50 */ addiu $t6, %lo(players) # addiu $t6, $t6, -0x60b0
/* 0F44A8 7F0BF938 0003C880 */ sll $t9, $v1, 2 /* 0F44A8 7F0BF938 0003C880 */ sll $t9, $v1, 2
/* 0F44AC 7F0BF93C 032E2021 */ addu $a0, $t9, $t6 /* 0F44AC 7F0BF93C 032E2021 */ addu $a0, $t9, $t6
.Ljp7F0BF940: .Ljp7F0BF940:
@@ -3500,7 +3500,7 @@ glabel manage_mp_game
.Ljp7F0BF970: .Ljp7F0BF970:
/* 0F44E0 7F0BF970 AFA4001C */ sw $a0, 0x1c($sp) /* 0F44E0 7F0BF970 AFA4001C */ sw $a0, 0x1c($sp)
/* 0F44E4 7F0BF974 AFA5018C */ sw $a1, 0x18c($sp) /* 0F44E4 7F0BF974 AFA5018C */ sw $a1, 0x18c($sp)
/* 0F44E8 7F0BF978 0FC26C01 */ jal get_num_players /* 0F44E8 7F0BF978 0FC26C01 */ jal getPlayerCount
/* 0F44EC 7F0BF97C AFA60188 */ sw $a2, 0x188($sp) /* 0F44EC 7F0BF97C AFA60188 */ sw $a2, 0x188($sp)
/* 0F44F0 7F0BF980 8FA30190 */ lw $v1, 0x190($sp) /* 0F44F0 7F0BF980 8FA30190 */ lw $v1, 0x190($sp)
/* 0F44F4 7F0BF984 8FA4001C */ lw $a0, 0x1c($sp) /* 0F44F4 7F0BF984 8FA4001C */ lw $a0, 0x1c($sp)
@@ -3533,7 +3533,7 @@ glabel manage_mp_game
/* 0F4558 7F0BF9E8 01C4082A */ slt $at, $t6, $a0 /* 0F4558 7F0BF9E8 01C4082A */ slt $at, $t6, $a0
/* 0F455C 7F0BF9EC 14200013 */ bnez $at, .Ljp7F0BFA3C /* 0F455C 7F0BF9EC 14200013 */ bnez $at, .Ljp7F0BFA3C
/* 0F4560 7F0BF9F0 00000000 */ nop /* 0F4560 7F0BF9F0 00000000 */ nop
/* 0F4564 7F0BF9F4 0FC26C01 */ jal get_num_players /* 0F4564 7F0BF9F4 0FC26C01 */ jal getPlayerCount
/* 0F4568 7F0BF9F8 AFA0017C */ sw $zero, 0x17c($sp) /* 0F4568 7F0BF9F8 AFA0017C */ sw $zero, 0x17c($sp)
/* 0F456C 7F0BF9FC 1840000F */ blez $v0, .Ljp7F0BFA3C /* 0F456C 7F0BF9FC 1840000F */ blez $v0, .Ljp7F0BFA3C
/* 0F4570 7F0BFA00 00000000 */ nop /* 0F4570 7F0BFA00 00000000 */ nop
@@ -3546,7 +3546,7 @@ glabel manage_mp_game
/* 0F4588 7F0BFA18 00402025 */ move $a0, $v0 /* 0F4588 7F0BFA18 00402025 */ move $a0, $v0
/* 0F458C 7F0BFA1C 8FAF017C */ lw $t7, 0x17c($sp) /* 0F458C 7F0BFA1C 8FAF017C */ lw $t7, 0x17c($sp)
/* 0F4590 7F0BFA20 25F80001 */ addiu $t8, $t7, 1 /* 0F4590 7F0BFA20 25F80001 */ addiu $t8, $t7, 1
/* 0F4594 7F0BFA24 0FC26C01 */ jal get_num_players /* 0F4594 7F0BFA24 0FC26C01 */ jal getPlayerCount
/* 0F4598 7F0BFA28 AFB8017C */ sw $t8, 0x17c($sp) /* 0F4598 7F0BFA28 AFB8017C */ sw $t8, 0x17c($sp)
/* 0F459C 7F0BFA2C 8FB9017C */ lw $t9, 0x17c($sp) /* 0F459C 7F0BFA2C 8FB9017C */ lw $t9, 0x17c($sp)
/* 0F45A0 7F0BFA30 0322082A */ slt $at, $t9, $v0 /* 0F45A0 7F0BFA30 0322082A */ slt $at, $t9, $v0
@@ -3608,16 +3608,16 @@ glabel manage_mp_game
/* 0F4670 7F0BFB00 8F3983A4 */ lw $t9, %lo(clock_timer)($t9) /* 0F4670 7F0BFB00 8F3983A4 */ lw $t9, %lo(clock_timer)($t9)
/* 0F4674 7F0BFB04 1320003A */ beqz $t9, .Ljp7F0BFBF0 /* 0F4674 7F0BFB04 1320003A */ beqz $t9, .Ljp7F0BFBF0
/* 0F4678 7F0BFB08 00000000 */ nop /* 0F4678 7F0BFB08 00000000 */ nop
/* 0F467C 7F0BFB0C 0FC26C01 */ jal get_num_players /* 0F467C 7F0BFB0C 0FC26C01 */ jal getPlayerCount
/* 0F4680 7F0BFB10 00000000 */ nop /* 0F4680 7F0BFB10 00000000 */ nop
/* 0F4684 7F0BFB14 00403825 */ move $a3, $v0 /* 0F4684 7F0BFB14 00403825 */ move $a3, $v0
/* 0F4688 7F0BFB18 00002825 */ move $a1, $zero /* 0F4688 7F0BFB18 00002825 */ move $a1, $zero
/* 0F468C 7F0BFB1C 00003025 */ move $a2, $zero /* 0F468C 7F0BFB1C 00003025 */ move $a2, $zero
/* 0F4690 7F0BFB20 18400029 */ blez $v0, .Ljp7F0BFBC8 /* 0F4690 7F0BFB20 18400029 */ blez $v0, .Ljp7F0BFBC8
/* 0F4694 7F0BFB24 00002025 */ move $a0, $zero /* 0F4694 7F0BFB24 00002025 */ move $a0, $zero
/* 0F4698 7F0BFB28 3C038008 */ lui $v1, %hi(ptr_BONDdata_p1) # $v1, 0x8008 /* 0F4698 7F0BFB28 3C038008 */ lui $v1, %hi(players) # $v1, 0x8008
/* 0F469C 7F0BFB2C 44800000 */ mtc1 $zero, $f0 /* 0F469C 7F0BFB2C 44800000 */ mtc1 $zero, $f0
/* 0F46A0 7F0BFB30 24639F50 */ addiu $v1, %lo(ptr_BONDdata_p1) # addiu $v1, $v1, -0x60b0 /* 0F46A0 7F0BFB30 24639F50 */ addiu $v1, %lo(players) # addiu $v1, $v1, -0x60b0
.Ljp7F0BFB34: .Ljp7F0BFB34:
/* 0F46A4 7F0BFB34 8C620000 */ lw $v0, ($v1) /* 0F46A4 7F0BFB34 8C620000 */ lw $v0, ($v1)
/* 0F46A8 7F0BFB38 8C4F00D8 */ lw $t7, 0xd8($v0) /* 0F46A8 7F0BFB38 8C4F00D8 */ lw $t7, 0xd8($v0)
@@ -3680,7 +3680,7 @@ glabel manage_mp_game
/* 0F4774 7F0BFC04 8DEF83A4 */ lw $t7, %lo(clock_timer)($t7) /* 0F4774 7F0BFC04 8DEF83A4 */ lw $t7, %lo(clock_timer)($t7)
/* 0F4778 7F0BFC08 11E00083 */ beqz $t7, .Ljp7F0BFE18 /* 0F4778 7F0BFC08 11E00083 */ beqz $t7, .Ljp7F0BFE18
/* 0F477C 7F0BFC0C 00000000 */ nop /* 0F477C 7F0BFC0C 00000000 */ nop
/* 0F4780 7F0BFC10 0FC26C01 */ jal get_num_players /* 0F4780 7F0BFC10 0FC26C01 */ jal getPlayerCount
/* 0F4784 7F0BFC14 00000000 */ nop /* 0F4784 7F0BFC14 00000000 */ nop
/* 0F4788 7F0BFC18 44800000 */ mtc1 $zero, $f0 /* 0F4788 7F0BFC18 44800000 */ mtc1 $zero, $f0
/* 0F478C 7F0BFC1C 00405025 */ move $t2, $v0 /* 0F478C 7F0BFC1C 00405025 */ move $t2, $v0
@@ -3696,8 +3696,8 @@ glabel manage_mp_game
/* 0F47B0 7F0BFC40 30490003 */ andi $t1, $v0, 3 /* 0F47B0 7F0BFC40 30490003 */ andi $t1, $v0, 3
/* 0F47B4 7F0BFC44 11200019 */ beqz $t1, .Ljp7F0BFCAC /* 0F47B4 7F0BFC44 11200019 */ beqz $t1, .Ljp7F0BFCAC
/* 0F47B8 7F0BFC48 000C5880 */ sll $t3, $t4, 2 /* 0F47B8 7F0BFC48 000C5880 */ sll $t3, $t4, 2
/* 0F47BC 7F0BFC4C 3C188008 */ lui $t8, %hi(ptr_BONDdata_p1) # $t8, 0x8008 /* 0F47BC 7F0BFC4C 3C188008 */ lui $t8, %hi(players) # $t8, 0x8008
/* 0F47C0 7F0BFC50 27189F50 */ addiu $t8, %lo(ptr_BONDdata_p1) # addiu $t8, $t8, -0x60b0 /* 0F47C0 7F0BFC50 27189F50 */ addiu $t8, %lo(players) # addiu $t8, $t8, -0x60b0
/* 0F47C4 7F0BFC54 00007080 */ sll $t6, $zero, 2 /* 0F47C4 7F0BFC54 00007080 */ sll $t6, $zero, 2
/* 0F47C8 7F0BFC58 0000C8C0 */ sll $t9, $zero, 3 /* 0F47C8 7F0BFC58 0000C8C0 */ sll $t9, $zero, 3
/* 0F47CC 7F0BFC5C 0320C823 */ subu $t9, $t9, $zero /* 0F47CC 7F0BFC5C 0320C823 */ subu $t9, $t9, $zero
@@ -3723,10 +3723,10 @@ glabel manage_mp_game
/* 0F4814 7F0BFCA4 00AF2821 */ addu $a1, $a1, $t7 /* 0F4814 7F0BFCA4 00AF2821 */ addu $a1, $a1, $t7
/* 0F4818 7F0BFCA8 10E2002C */ beq $a3, $v0, .Ljp7F0BFD5C /* 0F4818 7F0BFCA8 10E2002C */ beq $a3, $v0, .Ljp7F0BFD5C
.Ljp7F0BFCAC: .Ljp7F0BFCAC:
/* 0F481C 7F0BFCAC 3C188008 */ lui $t8, %hi(ptr_BONDdata_p1) # $t8, 0x8008 /* 0F481C 7F0BFCAC 3C188008 */ lui $t8, %hi(players) # $t8, 0x8008
/* 0F4820 7F0BFCB0 0007C8C0 */ sll $t9, $a3, 3 /* 0F4820 7F0BFCB0 0007C8C0 */ sll $t9, $a3, 3
/* 0F4824 7F0BFCB4 0327C823 */ subu $t9, $t9, $a3 /* 0F4824 7F0BFCB4 0327C823 */ subu $t9, $t9, $a3
/* 0F4828 7F0BFCB8 27189F50 */ addiu $t8, %lo(ptr_BONDdata_p1) # addiu $t8, $t8, -0x60b0 /* 0F4828 7F0BFCB8 27189F50 */ addiu $t8, %lo(players) # addiu $t8, $t8, -0x60b0
/* 0F482C 7F0BFCBC 00077080 */ sll $t6, $a3, 2 /* 0F482C 7F0BFCBC 00077080 */ sll $t6, $a3, 2
/* 0F4830 7F0BFCC0 01D81821 */ addu $v1, $t6, $t8 /* 0F4830 7F0BFCC0 01D81821 */ addu $v1, $t6, $t8
/* 0F4834 7F0BFCC4 0019C900 */ sll $t9, $t9, 4 /* 0F4834 7F0BFCC4 0019C900 */ sll $t9, $t9, 4
@@ -3782,8 +3782,8 @@ glabel manage_mp_game
/* 0F48E4 7F0BFD74 000F7900 */ sll $t7, $t7, 4 /* 0F48E4 7F0BFD74 000F7900 */ sll $t7, $t7, 4
/* 0F48E8 7F0BFD78 01EE1821 */ addu $v1, $t7, $t6 /* 0F48E8 7F0BFD78 01EE1821 */ addu $v1, $t7, $t6
/* 0F48EC 7F0BFD7C 906F0068 */ lbu $t7, 0x68($v1) /* 0F48EC 7F0BFD7C 906F0068 */ lbu $t7, 0x68($v1)
/* 0F48F0 7F0BFD80 3C188008 */ lui $t8, %hi(ptr_BONDdata_p1) # $t8, 0x8008 /* 0F48F0 7F0BFD80 3C188008 */ lui $t8, %hi(players) # $t8, 0x8008
/* 0F48F4 7F0BFD84 27189F50 */ addiu $t8, %lo(ptr_BONDdata_p1) # addiu $t8, $t8, -0x60b0 /* 0F48F4 7F0BFD84 27189F50 */ addiu $t8, %lo(players) # addiu $t8, $t8, -0x60b0
/* 0F48F8 7F0BFD88 000CC880 */ sll $t9, $t4, 2 /* 0F48F8 7F0BFD88 000CC880 */ sll $t9, $t4, 2
/* 0F48FC 7F0BFD8C 15E00003 */ bnez $t7, .Ljp7F0BFD9C /* 0F48FC 7F0BFD8C 15E00003 */ bnez $t7, .Ljp7F0BFD9C
/* 0F4900 7F0BFD90 03382021 */ addu $a0, $t9, $t8 /* 0F4900 7F0BFD90 03382021 */ addu $a0, $t9, $t8
+247 -418
View File
File diff suppressed because it is too large. Load diff
+14 -26
View File
@@ -361,29 +361,14 @@ extern u8 cheat_activated_78;
//CODE.bss:800696F0 //CODE.bss:800696F0
extern s32 array_favweapon[4][2]; extern s32 array_favweapon[4][2];
//CODE.bss:80069710 //CODE.bss:80069710
extern s32 mp_char_cur_select_player1; extern s32 mp_char_cur_select_player[4];
//CODE.bss:80069714
extern s32 mp_char_cur_select_player2;
//CODE.bss:80069718
extern s32 mp_char_cur_select_player3;
//CODE.bss:8006971C
extern s32 mp_char_cur_select_player4;
//CODE.bss:80069720 //CODE.bss:80069720
extern s32 mp_char_prev_select_player1; extern s32 mp_char_prev_select_player[4];
//CODE.bss:80069724
extern s32 mp_char_prev_select_player2;
//CODE.bss:80069728
extern s32 mp_char_prev_select_player3;
//CODE.bss:8006972C
extern s32 mp_char_prev_select_player4;
//CODE.bss:80069730 //CODE.bss:80069730
extern s32 dword_CODE_bss_80069730; extern s32 dword_CODE_bss_80069730[4];
//CODE.bss:80069734
extern s32 dword_CODE_bss_80069734;
//CODE.bss:80069738
extern s32 dword_CODE_bss_80069738;
//CODE.bss:8006973C
extern s32 dword_CODE_bss_8006973C;
//CODE.bss:80069740 //CODE.bss:80069740
extern s32 has_selected_char_player1; extern s32 has_selected_char_player1;
//CODE.bss:80069744 //CODE.bss:80069744
@@ -472,9 +457,9 @@ extern s32 highlight_aimadjustment;
CODE.bss:800697F0 dword_CODE_bss_800697F0:.space 0x130 CODE.bss:800697F0 dword_CODE_bss_800697F0:.space 0x130
*/ */
extern s32 current_menu; extern MENU current_menu;
extern s32 menu_update; extern MENU menu_update;
extern s32 maybe_prev_menu; extern MENU maybe_prev_menu;
extern s32 menu_timer; extern s32 menu_timer;
extern s32 tab_1_selected; extern s32 tab_1_selected;
extern s32 tab_2_selected; extern s32 tab_2_selected;
@@ -489,7 +474,7 @@ extern f32 tab2_bottom_y_coord;
extern s32 selected_folder_num; extern s32 selected_folder_num;
extern s32 selected_folder_num_copy; extern s32 selected_folder_num_copy;
extern s32 gamemode; extern GAMEMODE gamemode;
extern s32 selected_stage; extern s32 selected_stage;
extern s32 briefingpage; extern s32 briefingpage;
extern DIFFICULTY selected_difficulty; extern DIFFICULTY selected_difficulty;
@@ -538,6 +523,8 @@ extern f32 slider_007_mode_health;
extern f32 slider_007_mode_damage; extern f32 slider_007_mode_damage;
extern f32 slider_007_mode_accuracy; extern f32 slider_007_mode_accuracy;
extern struct mission_folder_setup mission_folder_setup_entries[];
/* /*
dword_D_8002A9B0:.word 0xA0000000 dword_D_8002A9B0:.word 0xA0000000
dword_D_8002A9B4:.word 0x96000000 dword_D_8002A9B4:.word 0x96000000
@@ -760,6 +747,7 @@ extern s32 unlock_weapon_select;
extern s32 unlock_handicap; extern s32 unlock_handicap;
extern s32 unlock_control_style; extern s32 unlock_control_style;
extern s32 unlock_aim_sight; extern s32 unlock_aim_sight;
extern struct solo_target_times solo_target_time_array[];
/* /*
dword_D_8002B560:.word 0 dword_D_8002B560:.word 0
solo_target_times <0, 160, 0> solo_target_times <0, 160, 0>
@@ -792,6 +780,6 @@ extern u32 intro_animation_count;
extern u32 objinstance; extern u32 objinstance;
extern u32 ptrobjinstance; extern u32 ptrobjinstance;
extern u32 full_actor_intro; extern u32 full_actor_intro;
void set_menu_to_mode(MENU menu, u32 mode); void set_menu_to_mode(MENU menu, s32 mode);
#endif #endif
+782 -896
View File
File diff suppressed because it is too large. Load diff
+19
View File
@@ -0,0 +1,19 @@
#ifndef MATRIXMATH_H
#define MATRIXMATH_H
#include "ultra64.h"
typedef f32 vec3[3];
// Float version of a graphics matrix, which has higher precision than an Mtx.
// Matrices are stored as Mtxfs then converted to an Mtx when passed to the GPU.
// Mtxs use a union and a long long int to force alignments. Mtxfs are not
// aligned but still use the union for consistency with Mtx.
typedef union {
f32 m[4][4];
s32 unused;
} Mtxf;
void matrix_4x4_rotate_vector_in_place(Mtxf *matrix, vec3 vector);
#endif
+181 -181
View File
File diff suppressed because it is too large. Load diff
+9 -32
View File
@@ -1,4 +1,5 @@
#include "ultra64.h" #include "ultra64.h"
#include "structs.h"
//D:80054600 //D:80054600
const char aGetsubmatrixNoObjinst[] = "getsubmatrix: no objinst!\n"; const char aGetsubmatrixNoObjinst[] = "getsubmatrix: no objinst!\n";
@@ -1072,38 +1073,14 @@ glabel getinstsize
// Also matches with float*s
#ifdef NONMATCHING void interpolate3dVectors(struct float3 *v,struct float3 *w,float k)
void sub_GAME_7F06D07C(void) { {
v->x += (w->x - v->x) * k;
v->y += (w->y - v->y) * k;
v->z += (w->z - v->z) * k;
return;
} }
#else
GLOBAL_ASM(
.text
glabel sub_GAME_7F06D07C
/* 0A1BAC 7F06D07C C4800000 */ lwc1 $f0, ($a0)
/* 0A1BB0 7F06D080 C4A40000 */ lwc1 $f4, ($a1)
/* 0A1BB4 7F06D084 44866000 */ mtc1 $a2, $f12
/* 0A1BB8 7F06D088 C4820004 */ lwc1 $f2, 4($a0)
/* 0A1BBC 7F06D08C 46002181 */ sub.s $f6, $f4, $f0
/* 0A1BC0 7F06D090 C48E0008 */ lwc1 $f14, 8($a0)
/* 0A1BC4 7F06D094 460C3202 */ mul.s $f8, $f6, $f12
/* 0A1BC8 7F06D098 46080280 */ add.s $f10, $f0, $f8
/* 0A1BCC 7F06D09C E48A0000 */ swc1 $f10, ($a0)
/* 0A1BD0 7F06D0A0 C4B00004 */ lwc1 $f16, 4($a1)
/* 0A1BD4 7F06D0A4 46028481 */ sub.s $f18, $f16, $f2
/* 0A1BD8 7F06D0A8 460C9102 */ mul.s $f4, $f18, $f12
/* 0A1BDC 7F06D0AC 46041180 */ add.s $f6, $f2, $f4
/* 0A1BE0 7F06D0B0 E4860004 */ swc1 $f6, 4($a0)
/* 0A1BE4 7F06D0B4 C4A80008 */ lwc1 $f8, 8($a1)
/* 0A1BE8 7F06D0B8 460E4281 */ sub.s $f10, $f8, $f14
/* 0A1BEC 7F06D0BC 460C5402 */ mul.s $f16, $f10, $f12
/* 0A1BF0 7F06D0C0 46107480 */ add.s $f18, $f14, $f16
/* 0A1BF4 7F06D0C4 03E00008 */ jr $ra
/* 0A1BF8 7F06D0C8 E4920008 */ swc1 $f18, 8($a0)
)
#endif
@@ -1485,7 +1462,7 @@ glabel sub_GAME_7F06D490
/* 0A2028 7F06D4F8 51E0000B */ beql $t7, $zero, .L7F06D528 /* 0A2028 7F06D4F8 51E0000B */ beql $t7, $zero, .L7F06D528
/* 0A202C 7F06D4FC 8E380054 */ lw $t8, 0x54($s1) /* 0A202C 7F06D4FC 8E380054 */ lw $t8, 0x54($s1)
/* 0A2030 7F06D500 44060000 */ mfc1 $a2, $f0 /* 0A2030 7F06D500 44060000 */ mfc1 $a2, $f0
/* 0A2034 7F06D504 0FC1B41F */ jal sub_GAME_7F06D07C /* 0A2034 7F06D504 0FC1B41F */ jal interpolate3dVectors
/* 0A2038 7F06D508 24450024 */ addiu $a1, $v0, 0x24 /* 0A2038 7F06D508 24450024 */ addiu $a1, $v0, 0x24
/* 0A203C 7F06D50C C60C0030 */ lwc1 $f12, 0x30($s0) /* 0A203C 7F06D50C C60C0030 */ lwc1 $f12, 0x30($s0)
/* 0A2040 7F06D510 C60E0020 */ lwc1 $f14, 0x20($s0) /* 0A2040 7F06D510 C60E0020 */ lwc1 $f14, 0x20($s0)
+1 -1
View File
@@ -15,7 +15,7 @@ glabel sub_GAME_7F007770
/* 03C2A8 7F007778 AFB30020 */ sw $s3, 0x20($sp) /* 03C2A8 7F007778 AFB30020 */ sw $s3, 0x20($sp)
/* 03C2AC 7F00777C AFB2001C */ sw $s2, 0x1c($sp) /* 03C2AC 7F00777C AFB2001C */ sw $s2, 0x1c($sp)
/* 03C2B0 7F007780 AFB10018 */ sw $s1, 0x18($sp) /* 03C2B0 7F007780 AFB10018 */ sw $s1, 0x18($sp)
/* 03C2B4 7F007784 0FC26919 */ jal get_num_players /* 03C2B4 7F007784 0FC26919 */ jal getPlayerCount
/* 03C2B8 7F007788 AFB00014 */ sw $s0, 0x14($sp) /* 03C2B8 7F007788 AFB00014 */ sw $s0, 0x14($sp)
/* 03C2BC 7F00778C 0FC26C54 */ jal get_cur_playernum /* 03C2BC 7F00778C 0FC26C54 */ jal get_cur_playernum
/* 03C2C0 7F007790 00409825 */ move $s3, $v0 /* 03C2C0 7F007790 00409825 */ move $s3, $v0
+23 -23
View File
@@ -286,7 +286,7 @@ glabel prepare_load_objects
/* 036938 7F001E08 00000000 */ nop /* 036938 7F001E08 00000000 */ nop
/* 03693C 7F001E0C 468041A0 */ cvt.s.w $f6, $f8 /* 03693C 7F001E0C 468041A0 */ cvt.s.w $f6, $f8
/* 036940 7F001E10 460A3103 */ div.s $f4, $f6, $f10 /* 036940 7F001E10 460A3103 */ div.s $f4, $f6, $f10
/* 036944 7F001E14 0FC26919 */ jal get_num_players /* 036944 7F001E14 0FC26919 */ jal getPlayerCount
/* 036948 7F001E18 E6240074 */ swc1 $f4, 0x74($s1) /* 036948 7F001E18 E6240074 */ swc1 $f4, 0x74($s1)
/* 03694C 7F001E1C 28410002 */ slti $at, $v0, 2 /* 03694C 7F001E1C 28410002 */ slti $at, $v0, 2
/* 036950 7F001E20 1420001B */ bnez $at, .L7F001E90 /* 036950 7F001E20 1420001B */ bnez $at, .L7F001E90
@@ -407,7 +407,7 @@ glabel prepare_load_objects
/* 036AF8 7F001FC8 00000000 */ nop /* 036AF8 7F001FC8 00000000 */ nop
/* 036AFC 7F001FCC 8FAE006C */ lw $t6, 0x6c($sp) /* 036AFC 7F001FCC 8FAE006C */ lw $t6, 0x6c($sp)
/* 036B00 7F001FD0 02002025 */ move $a0, $s0 /* 036B00 7F001FD0 02002025 */ move $a0, $s0
/* 036B04 7F001FD4 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 036B04 7F001FD4 0FC0E969 */ jal attachNewChild
/* 036B08 7F001FD8 8DC50018 */ lw $a1, 0x18($t6) /* 036B08 7F001FD8 8DC50018 */ lw $a1, 0x18($t6)
/* 036B0C 7F001FDC 100001D2 */ b .L7F002728 /* 036B0C 7F001FDC 100001D2 */ b .L7F002728
/* 036B10 7F001FE0 8FBF0034 */ lw $ra, 0x34($sp) /* 036B10 7F001FE0 8FBF0034 */ lw $ra, 0x34($sp)
@@ -445,7 +445,7 @@ glabel prepare_load_objects
/* 036B8C 7F00205C E7A60020 */ swc1 $f6, 0x20($sp) /* 036B8C 7F00205C E7A60020 */ swc1 $f6, 0x20($sp)
/* 036B90 7F002060 C44A0014 */ lwc1 $f10, 0x14($v0) /* 036B90 7F002060 C44A0014 */ lwc1 $f10, 0x14($v0)
/* 036B94 7F002064 AFA20064 */ sw $v0, 0x64($sp) /* 036B94 7F002064 AFA20064 */ sw $v0, 0x64($sp)
/* 036B98 7F002068 0FC16642 */ jal sub_GAME_7F059908 /* 036B98 7F002068 0FC16642 */ jal matrix_4x4_7F059908
/* 036B9C 7F00206C E7AA0024 */ swc1 $f10, 0x24($sp) /* 036B9C 7F00206C E7AA0024 */ swc1 $f10, 0x24($sp)
/* 036BA0 7F002070 8FA20064 */ lw $v0, 0x64($sp) /* 036BA0 7F002070 8FA20064 */ lw $v0, 0x64($sp)
/* 036BA4 7F002074 C4440000 */ lwc1 $f4, ($v0) /* 036BA4 7F002074 C4440000 */ lwc1 $f4, ($v0)
@@ -503,7 +503,7 @@ glabel prepare_load_objects
/* 036C68 7F002138 C6040010 */ lwc1 $f4, 0x10($s0) /* 036C68 7F002138 C6040010 */ lwc1 $f4, 0x10($s0)
/* 036C6C 7F00213C E7A40020 */ swc1 $f4, 0x20($sp) /* 036C6C 7F00213C E7A40020 */ swc1 $f4, 0x20($sp)
/* 036C70 7F002140 C6080014 */ lwc1 $f8, 0x14($s0) /* 036C70 7F002140 C6080014 */ lwc1 $f8, 0x14($s0)
/* 036C74 7F002144 0FC16642 */ jal sub_GAME_7F059908 /* 036C74 7F002144 0FC16642 */ jal matrix_4x4_7F059908
/* 036C78 7F002148 E7A80024 */ swc1 $f8, 0x24($sp) /* 036C78 7F002148 E7A80024 */ swc1 $f8, 0x24($sp)
/* 036C7C 7F00214C 8E2C000C */ lw $t4, 0xc($s1) /* 036C7C 7F00214C 8E2C000C */ lw $t4, 0xc($s1)
/* 036C80 7F002150 02002025 */ move $a0, $s0 /* 036C80 7F002150 02002025 */ move $a0, $s0
@@ -1025,7 +1025,7 @@ glabel expand_08_obj_set_guard_MP_weapons
/* 037330 7F002800 24050001 */ li $a1, 1 /* 037330 7F002800 24050001 */ li $a1, 1
.L7F002804: .L7F002804:
/* 037334 7F002804 AFA50018 */ sw $a1, 0x18($sp) /* 037334 7F002804 AFA50018 */ sw $a1, 0x18($sp)
/* 037338 7F002808 0FC26919 */ jal get_num_players /* 037338 7F002808 0FC26919 */ jal getPlayerCount
/* 03733C 7F00280C AFA7002C */ sw $a3, 0x2c($sp) /* 03733C 7F00280C AFA7002C */ sw $a3, 0x2c($sp)
/* 037340 7F002810 28410002 */ slti $at, $v0, 2 /* 037340 7F002810 28410002 */ slti $at, $v0, 2
/* 037344 7F002814 8FA50018 */ lw $a1, 0x18($sp) /* 037344 7F002814 8FA50018 */ lw $a1, 0x18($sp)
@@ -1327,7 +1327,7 @@ glabel sub_GAME_7F002A3C
/* 037698 7F002B68 46062281 */ sub.s $f10, $f4, $f6 /* 037698 7F002B68 46062281 */ sub.s $f10, $f4, $f6
/* 03769C 7F002B6C E7A0001C */ swc1 $f0, 0x1c($sp) /* 03769C 7F002B6C E7A0001C */ swc1 $f0, 0x1c($sp)
/* 0376A0 7F002B70 E7A80020 */ swc1 $f8, 0x20($sp) /* 0376A0 7F002B70 E7A80020 */ swc1 $f8, 0x20($sp)
/* 0376A4 7F002B74 0FC16642 */ jal sub_GAME_7F059908 /* 0376A4 7F002B74 0FC16642 */ jal matrix_4x4_7F059908
/* 0376A8 7F002B78 E7AA0018 */ swc1 $f10, 0x18($sp) /* 0376A8 7F002B78 E7AA0018 */ swc1 $f10, 0x18($sp)
/* 0376AC 7F002B7C 8E0F0014 */ lw $t7, 0x14($s0) /* 0376AC 7F002B7C 8E0F0014 */ lw $t7, 0x14($s0)
/* 0376B0 7F002B80 8FA5003C */ lw $a1, 0x3c($sp) /* 0376B0 7F002B80 8FA5003C */ lw $a1, 0x3c($sp)
@@ -1597,7 +1597,7 @@ glabel sub_GAME_7F002E3C
/* 037A5C 7F002F2C 00000000 */ nop /* 037A5C 7F002F2C 00000000 */ nop
/* 037A60 7F002F30 46809120 */ cvt.s.w $f4, $f18 /* 037A60 7F002F30 46809120 */ cvt.s.w $f4, $f18
/* 037A64 7F002F34 46082183 */ div.s $f6, $f4, $f8 /* 037A64 7F002F34 46082183 */ div.s $f6, $f4, $f8
/* 037A68 7F002F38 0FC26919 */ jal get_num_players /* 037A68 7F002F38 0FC26919 */ jal getPlayerCount
/* 037A6C 7F002F3C E6060074 */ swc1 $f6, 0x74($s0) /* 037A6C 7F002F3C E6060074 */ swc1 $f6, 0x74($s0)
/* 037A70 7F002F40 28410002 */ slti $at, $v0, 2 /* 037A70 7F002F40 28410002 */ slti $at, $v0, 2
/* 037A74 7F002F44 14200004 */ bnez $at, .L7F002F58 /* 037A74 7F002F44 14200004 */ bnez $at, .L7F002F58
@@ -1670,7 +1670,7 @@ glabel sub_GAME_7F002E3C
/* 037B70 7F003040 ADAC001C */ sw $t4, 0x1c($t5) /* 037B70 7F003040 ADAC001C */ sw $t4, 0x1c($t5)
.L7F003044: .L7F003044:
/* 037B74 7F003044 8FA40024 */ lw $a0, 0x24($sp) /* 037B74 7F003044 8FA40024 */ lw $a0, 0x24($sp)
/* 037B78 7F003048 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 037B78 7F003048 0FC0E969 */ jal attachNewChild
/* 037B7C 7F00304C 8E250010 */ lw $a1, 0x10($s1) /* 037B7C 7F00304C 8E250010 */ lw $a1, 0x10($s1)
/* 037B80 7F003050 8E05006C */ lw $a1, 0x6c($s0) /* 037B80 7F003050 8E05006C */ lw $a1, 0x6c($s0)
/* 037B84 7F003054 3C018005 */ lui $at, %hi(D_8004EF58) /* 037B84 7F003054 3C018005 */ lui $at, %hi(D_8004EF58)
@@ -2178,7 +2178,7 @@ glabel sub_GAME_7F003480
/* 03828C 7F00375C C6040010 */ lwc1 $f4, 0x10($s0) /* 03828C 7F00375C C6040010 */ lwc1 $f4, 0x10($s0)
/* 038290 7F003760 E7A40020 */ swc1 $f4, 0x20($sp) /* 038290 7F003760 E7A40020 */ swc1 $f4, 0x20($sp)
/* 038294 7F003764 C6080014 */ lwc1 $f8, 0x14($s0) /* 038294 7F003764 C6080014 */ lwc1 $f8, 0x14($s0)
/* 038298 7F003768 0FC16642 */ jal sub_GAME_7F059908 /* 038298 7F003768 0FC16642 */ jal matrix_4x4_7F059908
/* 03829C 7F00376C E7A80024 */ swc1 $f8, 0x24($sp) /* 03829C 7F00376C E7A80024 */ swc1 $f8, 0x24($sp)
/* 0382A0 7F003770 8FA801D0 */ lw $t0, 0x1d0($sp) /* 0382A0 7F003770 8FA801D0 */ lw $t0, 0x1d0($sp)
/* 0382A4 7F003774 3C0A8004 */ lui $t2, %hi(PitemZ_entries) /* 0382A4 7F003774 3C0A8004 */ lui $t2, %hi(PitemZ_entries)
@@ -2687,7 +2687,7 @@ glabel proplvreset2
/* 03884C 7F003D1C AD410000 */ sw $at, ($t2) /* 03884C 7F003D1C AD410000 */ sw $at, ($t2)
/* 038850 7F003D20 904B0000 */ lbu $t3, ($v0) /* 038850 7F003D20 904B0000 */ lbu $t3, ($v0)
/* 038854 7F003D24 A3A00175 */ sb $zero, 0x175($sp) /* 038854 7F003D24 A3A00175 */ sb $zero, 0x175($sp)
/* 038858 7F003D28 0FC26919 */ jal get_num_players /* 038858 7F003D28 0FC26919 */ jal getPlayerCount
/* 03885C 7F003D2C A3AB0174 */ sb $t3, 0x174($sp) /* 03885C 7F003D2C A3AB0174 */ sb $t3, 0x174($sp)
/* 038860 7F003D30 28410002 */ slti $at, $v0, 2 /* 038860 7F003D30 28410002 */ slti $at, $v0, 2
/* 038864 7F003D34 14200004 */ bnez $at, .L7F003D48 /* 038864 7F003D34 14200004 */ bnez $at, .L7F003D48
@@ -3069,7 +3069,7 @@ glabel proplvreset2
/* 038DD8 7F0042A8 02602025 */ move $a0, $s3 /* 038DD8 7F0042A8 02602025 */ move $a0, $s3
/* 038DDC 7F0042AC 0FC01589 */ jal sub_GAME_7F005624 /* 038DDC 7F0042AC 0FC01589 */ jal sub_GAME_7F005624
/* 038DE0 7F0042B0 02802025 */ move $a0, $s4 /* 038DE0 7F0042B0 02802025 */ move $a0, $s4
/* 038DE4 7F0042B4 0FC26919 */ jal get_num_players /* 038DE4 7F0042B4 0FC26919 */ jal getPlayerCount
/* 038DE8 7F0042B8 00008025 */ move $s0, $zero /* 038DE8 7F0042B8 00008025 */ move $s0, $zero
/* 038DEC 7F0042BC 1840000C */ blez $v0, .L7F0042F0 /* 038DEC 7F0042BC 1840000C */ blez $v0, .L7F0042F0
/* 038DF0 7F0042C0 00000000 */ nop /* 038DF0 7F0042C0 00000000 */ nop
@@ -3080,7 +3080,7 @@ glabel proplvreset2
/* 038E00 7F0042D0 2404000E */ li $a0, 14 /* 038E00 7F0042D0 2404000E */ li $a0, 14
/* 038E04 7F0042D4 0FC01897 */ jal alloc_additional_item_slots /* 038E04 7F0042D4 0FC01897 */ jal alloc_additional_item_slots
/* 038E08 7F0042D8 00402025 */ move $a0, $v0 /* 038E08 7F0042D8 00402025 */ move $a0, $v0
/* 038E0C 7F0042DC 0FC26919 */ jal get_num_players /* 038E0C 7F0042DC 0FC26919 */ jal getPlayerCount
/* 038E10 7F0042E0 26100001 */ addiu $s0, $s0, 1 /* 038E10 7F0042E0 26100001 */ addiu $s0, $s0, 1
/* 038E14 7F0042E4 0202082A */ slt $at, $s0, $v0 /* 038E14 7F0042E4 0202082A */ slt $at, $s0, $v0
/* 038E18 7F0042E8 1420FFF6 */ bnez $at, .L7F0042C4 /* 038E18 7F0042E8 1420FFF6 */ bnez $at, .L7F0042C4
@@ -3094,12 +3094,12 @@ glabel proplvreset2
/* 038E34 7F004304 00000000 */ nop /* 038E34 7F004304 00000000 */ nop
/* 038E38 7F004308 244C0004 */ addiu $t4, $v0, 4 /* 038E38 7F004308 244C0004 */ addiu $t4, $v0, 4
/* 038E3C 7F00430C 240D0001 */ li $t5, 1 /* 038E3C 7F00430C 240D0001 */ li $t5, 1
/* 038E40 7F004310 0FC26919 */ jal get_num_players /* 038E40 7F004310 0FC26919 */ jal getPlayerCount
/* 038E44 7F004314 018DA004 */ sllv $s4, $t5, $t4 /* 038E44 7F004314 018DA004 */ sllv $s4, $t5, $t4
/* 038E48 7F004318 28410002 */ slti $at, $v0, 2 /* 038E48 7F004318 28410002 */ slti $at, $v0, 2
/* 038E4C 7F00431C 14200007 */ bnez $at, .L7F00433C /* 038E4C 7F00431C 14200007 */ bnez $at, .L7F00433C
/* 038E50 7F004320 00000000 */ nop /* 038E50 7F004320 00000000 */ nop
/* 038E54 7F004324 0FC26919 */ jal get_num_players /* 038E54 7F004324 0FC26919 */ jal getPlayerCount
/* 038E58 7F004328 00000000 */ nop /* 038E58 7F004328 00000000 */ nop
/* 038E5C 7F00432C 244E0014 */ addiu $t6, $v0, 0x14 /* 038E5C 7F00432C 244E0014 */ addiu $t6, $v0, 0x14
/* 038E60 7F004330 240F0001 */ li $t7, 1 /* 038E60 7F004330 240F0001 */ li $t7, 1
@@ -3390,7 +3390,7 @@ obj_03_expand:
/* 039288 7F004758 100000E8 */ b other_obj_expand /* 039288 7F004758 100000E8 */ b other_obj_expand
/* 03928C 7F00475C 00000000 */ nop /* 03928C 7F00475C 00000000 */ nop
ammo_box_expand: ammo_box_expand:
/* 039290 7F004760 0FC26919 */ jal get_num_players /* 039290 7F004760 0FC26919 */ jal getPlayerCount
/* 039294 7F004764 24100001 */ li $s0, 1 /* 039294 7F004764 24100001 */ li $s0, 1
/* 039298 7F004768 28410002 */ slti $at, $v0, 2 /* 039298 7F004768 28410002 */ slti $at, $v0, 2
/* 03929C 7F00476C 1420000E */ bnez $at, .L7F0047A8 /* 03929C 7F00476C 1420000E */ bnez $at, .L7F0047A8
@@ -3694,7 +3694,7 @@ other_obj_expand:
/* 0396EC 7F004BBC 0FC1B39E */ jal set_obj_instance_controller_scale /* 0396EC 7F004BBC 0FC1B39E */ jal set_obj_instance_controller_scale
/* 0396F0 7F004BC0 8C850014 */ lw $a1, 0x14($a0) /* 0396F0 7F004BC0 8C850014 */ lw $a1, 0x14($a0)
/* 0396F4 7F004BC4 8E440010 */ lw $a0, 0x10($s2) /* 0396F4 7F004BC4 8E440010 */ lw $a0, 0x10($s2)
/* 0396F8 7F004BC8 0FC0E969 */ jal sub_GAME_7F03A5A4 /* 0396F8 7F004BC8 0FC0E969 */ jal attachNewChild
/* 0396FC 7F004BCC 8E050010 */ lw $a1, 0x10($s0) /* 0396FC 7F004BCC 8E050010 */ lw $a1, 0x10($s0)
/* 039700 7F004BD0 10000084 */ b .L7F004DE4 /* 039700 7F004BD0 10000084 */ b .L7F004DE4
/* 039704 7F004BD4 00000000 */ nop /* 039704 7F004BD4 00000000 */ nop
@@ -4080,7 +4080,7 @@ glabel jpt_8004F02C
/* 03888C 7F003D1C AD410000 */ sw $at, ($t2) /* 03888C 7F003D1C AD410000 */ sw $at, ($t2)
/* 038890 7F003D20 904B0000 */ lbu $t3, ($v0) /* 038890 7F003D20 904B0000 */ lbu $t3, ($v0)
/* 038894 7F003D24 A3A00175 */ sb $zero, 0x175($sp) /* 038894 7F003D24 A3A00175 */ sb $zero, 0x175($sp)
/* 038898 7F003D28 0FC26C01 */ jal get_num_players /* 038898 7F003D28 0FC26C01 */ jal getPlayerCount
/* 03889C 7F003D2C A3AB0174 */ sb $t3, 0x174($sp) /* 03889C 7F003D2C A3AB0174 */ sb $t3, 0x174($sp)
/* 0388A0 7F003D30 28410002 */ slti $at, $v0, 2 /* 0388A0 7F003D30 28410002 */ slti $at, $v0, 2
/* 0388A4 7F003D34 14200004 */ bnez $at, .L7F003D48 /* 0388A4 7F003D34 14200004 */ bnez $at, .L7F003D48
@@ -4462,7 +4462,7 @@ glabel jpt_8004F02C
/* 038E18 7F0042A8 02602025 */ move $a0, $s3 /* 038E18 7F0042A8 02602025 */ move $a0, $s3
/* 038E1C 7F0042AC 0FC01591 */ jal sub_GAME_7F005624 /* 038E1C 7F0042AC 0FC01591 */ jal sub_GAME_7F005624
/* 038E20 7F0042B0 02802025 */ move $a0, $s4 /* 038E20 7F0042B0 02802025 */ move $a0, $s4
/* 038E24 7F0042B4 0FC26C01 */ jal get_num_players /* 038E24 7F0042B4 0FC26C01 */ jal getPlayerCount
/* 038E28 7F0042B8 00008025 */ move $s0, $zero /* 038E28 7F0042B8 00008025 */ move $s0, $zero
/* 038E2C 7F0042BC 1840000C */ blez $v0, .L7F0042F0 /* 038E2C 7F0042BC 1840000C */ blez $v0, .L7F0042F0
/* 038E30 7F0042C0 00000000 */ nop /* 038E30 7F0042C0 00000000 */ nop
@@ -4473,7 +4473,7 @@ glabel jpt_8004F02C
/* 038E40 7F0042D0 2404000E */ li $a0, 14 /* 038E40 7F0042D0 2404000E */ li $a0, 14
/* 038E44 7F0042D4 0FC01897 */ jal alloc_additional_item_slots /* 038E44 7F0042D4 0FC01897 */ jal alloc_additional_item_slots
/* 038E48 7F0042D8 00402025 */ move $a0, $v0 /* 038E48 7F0042D8 00402025 */ move $a0, $v0
/* 038E4C 7F0042DC 0FC26C01 */ jal get_num_players /* 038E4C 7F0042DC 0FC26C01 */ jal getPlayerCount
/* 038E50 7F0042E0 26100001 */ addiu $s0, $s0, 1 /* 038E50 7F0042E0 26100001 */ addiu $s0, $s0, 1
/* 038E54 7F0042E4 0202082A */ slt $at, $s0, $v0 /* 038E54 7F0042E4 0202082A */ slt $at, $s0, $v0
/* 038E58 7F0042E8 1420FFF6 */ bnez $at, .L7F0042C4 /* 038E58 7F0042E8 1420FFF6 */ bnez $at, .L7F0042C4
@@ -4487,12 +4487,12 @@ glabel jpt_8004F02C
/* 038E74 7F004304 00000000 */ nop /* 038E74 7F004304 00000000 */ nop
/* 038E78 7F004308 244C0004 */ addiu $t4, $v0, 4 /* 038E78 7F004308 244C0004 */ addiu $t4, $v0, 4
/* 038E7C 7F00430C 240D0001 */ li $t5, 1 /* 038E7C 7F00430C 240D0001 */ li $t5, 1
/* 038E80 7F004310 0FC26C01 */ jal get_num_players /* 038E80 7F004310 0FC26C01 */ jal getPlayerCount
/* 038E84 7F004314 018DA004 */ sllv $s4, $t5, $t4 /* 038E84 7F004314 018DA004 */ sllv $s4, $t5, $t4
/* 038E88 7F004318 28410002 */ slti $at, $v0, 2 /* 038E88 7F004318 28410002 */ slti $at, $v0, 2
/* 038E8C 7F00431C 14200007 */ bnez $at, .L7F00433C /* 038E8C 7F00431C 14200007 */ bnez $at, .L7F00433C
/* 038E90 7F004320 00000000 */ nop /* 038E90 7F004320 00000000 */ nop
/* 038E94 7F004324 0FC26C01 */ jal get_num_players /* 038E94 7F004324 0FC26C01 */ jal getPlayerCount
/* 038E98 7F004328 00000000 */ nop /* 038E98 7F004328 00000000 */ nop
/* 038E9C 7F00432C 244E0014 */ addiu $t6, $v0, 0x14 /* 038E9C 7F00432C 244E0014 */ addiu $t6, $v0, 0x14
/* 038EA0 7F004330 240F0001 */ li $t7, 1 /* 038EA0 7F004330 240F0001 */ li $t7, 1
@@ -4788,7 +4788,7 @@ obj_03_expand:
/* 0392D8 7F004768 100000E8 */ b other_obj_expand /* 0392D8 7F004768 100000E8 */ b other_obj_expand
/* 0392DC 7F00476C 00000000 */ nop /* 0392DC 7F00476C 00000000 */ nop
ammo_box_expand: ammo_box_expand:
/* 0392E0 7F004770 0FC26C01 */ jal get_num_players /* 0392E0 7F004770 0FC26C01 */ jal getPlayerCount
/* 0392E4 7F004774 24100001 */ li $s0, 1 /* 0392E4 7F004774 24100001 */ li $s0, 1
/* 0392E8 7F004778 28410002 */ slti $at, $v0, 2 /* 0392E8 7F004778 28410002 */ slti $at, $v0, 2
/* 0392EC 7F00477C 1420000E */ bnez $at, .L7F0047B8 /* 0392EC 7F00477C 1420000E */ bnez $at, .L7F0047B8
@@ -5092,7 +5092,7 @@ other_obj_expand:
/* 03973C 7F004BCC 0FC1B51A */ jal set_obj_instance_controller_scale /* 03973C 7F004BCC 0FC1B51A */ jal set_obj_instance_controller_scale
/* 039740 7F004BD0 8C850014 */ lw $a1, 0x14($a0) /* 039740 7F004BD0 8C850014 */ lw $a1, 0x14($a0)
/* 039744 7F004BD4 8E440010 */ lw $a0, 0x10($s2) /* 039744 7F004BD4 8E440010 */ lw $a0, 0x10($s2)
/* 039748 7F004BD8 0FC0EA29 */ jal sub_GAME_7F03A5A4 /* 039748 7F004BD8 0FC0EA29 */ jal attachNewChild
/* 03974C 7F004BDC 8E050010 */ lw $a1, 0x10($s0) /* 03974C 7F004BDC 8E050010 */ lw $a1, 0x10($s0)
/* 039750 7F004BE0 10000084 */ b .L7F004DF4 /* 039750 7F004BE0 10000084 */ b .L7F004DF4
/* 039754 7F004BE4 00000000 */ nop /* 039754 7F004BE4 00000000 */ nop
+6 -6
View File
@@ -37,7 +37,7 @@ glabel display_red_blue_on_radar
/* 0FAC04 7F0C60D4 AFA40088 */ sw $a0, 0x88($sp) /* 0FAC04 7F0C60D4 AFA40088 */ sw $a0, 0x88($sp)
/* 0FAC08 7F0C60D8 0FC26C54 */ jal get_cur_playernum /* 0FAC08 7F0C60D8 0FC26C54 */ jal get_cur_playernum
/* 0FAC0C 7F0C60DC 0040A025 */ move $s4, $v0 /* 0FAC0C 7F0C60DC 0040A025 */ move $s4, $v0
/* 0FAC10 7F0C60E0 0FC26919 */ jal get_num_players /* 0FAC10 7F0C60E0 0FC26919 */ jal getPlayerCount
/* 0FAC14 7F0C60E4 AFA20070 */ sw $v0, 0x70($sp) /* 0FAC14 7F0C60E4 AFA20070 */ sw $v0, 0x70($sp)
/* 0FAC18 7F0C60E8 24010001 */ li $at, 1 /* 0FAC18 7F0C60E8 24010001 */ li $at, 1
/* 0FAC1C 7F0C60EC 14410003 */ bne $v0, $at, .L7F0C60FC /* 0FAC1C 7F0C60EC 14410003 */ bne $v0, $at, .L7F0C60FC
@@ -65,14 +65,14 @@ glabel display_red_blue_on_radar
/* 0FAC68 7F0C6138 10000113 */ b .L7F0C6588 /* 0FAC68 7F0C6138 10000113 */ b .L7F0C6588
/* 0FAC6C 7F0C613C 8FA20088 */ lw $v0, 0x88($sp) /* 0FAC6C 7F0C613C 8FA20088 */ lw $v0, 0x88($sp)
.L7F0C6140: .L7F0C6140:
/* 0FAC70 7F0C6140 0C001145 */ jal get_video2_settings_ulx /* 0FAC70 7F0C6140 0C001145 */ jal viGetViewLeft
/* 0FAC74 7F0C6144 00000000 */ nop /* 0FAC74 7F0C6144 00000000 */ nop
/* 0FAC78 7F0C6148 00028400 */ sll $s0, $v0, 0x10 /* 0FAC78 7F0C6148 00028400 */ sll $s0, $v0, 0x10
/* 0FAC7C 7F0C614C 0010C403 */ sra $t8, $s0, 0x10 /* 0FAC7C 7F0C614C 0010C403 */ sra $t8, $s0, 0x10
/* 0FAC80 7F0C6150 0C001127 */ jal get_video2_settings_width /* 0FAC80 7F0C6150 0C001127 */ jal viGetViewWidth
/* 0FAC84 7F0C6154 03008025 */ move $s0, $t8 /* 0FAC84 7F0C6154 03008025 */ move $s0, $t8
/* 0FAC88 7F0C6158 0050A821 */ addu $s5, $v0, $s0 /* 0FAC88 7F0C6158 0050A821 */ addu $s5, $v0, $s0
/* 0FAC8C 7F0C615C 0C001149 */ jal get_video2_settings_uly /* 0FAC8C 7F0C615C 0C001149 */ jal viGetViewTop
/* 0FAC90 7F0C6160 26B5FFD7 */ addiu $s5, $s5, -0x29 /* 0FAC90 7F0C6160 26B5FFD7 */ addiu $s5, $s5, -0x29
/* 0FAC94 7F0C6164 8FB90074 */ lw $t9, 0x74($sp) /* 0FAC94 7F0C6164 8FB90074 */ lw $t9, 0x74($sp)
/* 0FAC98 7F0C6168 2456001A */ addiu $s6, $v0, 0x1a /* 0FAC98 7F0C6168 2456001A */ addiu $s6, $v0, 0x1a
@@ -217,10 +217,10 @@ glabel display_red_blue_on_radar
/* 0FAEA8 7F0C6378 8FAA0070 */ lw $t2, 0x70($sp) /* 0FAEA8 7F0C6378 8FAA0070 */ lw $t2, 0x70($sp)
.L7F0C637C: .L7F0C637C:
/* 0FAEAC 7F0C637C 00135880 */ sll $t3, $s3, 2 /* 0FAEAC 7F0C637C 00135880 */ sll $t3, $s3, 2
/* 0FAEB0 7F0C6380 3C048008 */ lui $a0, %hi(ptr_BONDdata_p1) /* 0FAEB0 7F0C6380 3C048008 */ lui $a0, %hi(players)
/* 0FAEB4 7F0C6384 126A007A */ beq $s3, $t2, .L7F0C6570 /* 0FAEB4 7F0C6384 126A007A */ beq $s3, $t2, .L7F0C6570
/* 0FAEB8 7F0C6388 008B2021 */ addu $a0, $a0, $t3 /* 0FAEB8 7F0C6388 008B2021 */ addu $a0, $a0, $t3
/* 0FAEBC 7F0C638C 8C849EE0 */ lw $a0, %lo(ptr_BONDdata_p1)($a0) /* 0FAEBC 7F0C638C 8C849EE0 */ lw $a0, %lo(players)($a0)
/* 0FAEC0 7F0C6390 8C8C00D8 */ lw $t4, 0xd8($a0) /* 0FAEC0 7F0C6390 8C8C00D8 */ lw $t4, 0xd8($a0)
/* 0FAEC4 7F0C6394 55800077 */ bnezl $t4, .L7F0C6574 /* 0FAEC4 7F0C6394 55800077 */ bnezl $t4, .L7F0C6574
/* 0FAEC8 7F0C6398 8FB80074 */ lw $t8, 0x74($sp) /* 0FAEC8 7F0C6398 8FB80074 */ lw $t8, 0x74($sp)
+985 -1502
View File
File diff suppressed because it is too large. Load diff
Loaded 100 of 190 files, more files were not shown because too many files have changed in this diff. Show more