Clean trailing whitespace (#1038)

* Add missing newlines

* Remove trailing whitepace
This commit is contained in:
Marijn van der Werf 2023-04-29 15:28:06 +02:00 committed by GitHub
parent a1918c3328
commit 30aa49d4a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
211 changed files with 1218 additions and 1218 deletions

View File

@ -26,7 +26,7 @@ Install build dependencies:
``` ```
> **NOTE:** On Mac, if you get an error that looks like > **NOTE:** On Mac, if you get an error that looks like
> >
>```sh >```sh
>Error: Cannot install md5sha1sum because conflicting formulae are installed. >Error: Cannot install md5sha1sum because conflicting formulae are installed.
> coreutils: because both install `md5sum` and `sha1sum` binaries > coreutils: because both install `md5sum` and `sha1sum` binaries

View File

@ -26,13 +26,13 @@ extern "C" {
#define IMAGIC 0732 #define IMAGIC 0732
/* colormap of images */ /* colormap of images */
#define CM_NORMAL 0 /* file contains rows of values which #define CM_NORMAL 0 /* file contains rows of values which
* are either RGB values (zsize == 3) * are either RGB values (zsize == 3)
* or greyramp values (zsize == 1) */ * or greyramp values (zsize == 1) */
#define CM_DITHERED 1 #define CM_DITHERED 1
#define CM_SCREEN 2 /* file contains data which is a screen #define CM_SCREEN 2 /* file contains data which is a screen
* image; getrow returns buffer which * image; getrow returns buffer which
* can be displayed directly with * can be displayed directly with
* writepixels */ * writepixels */
#define CM_COLORMAP 3 /* a colormap file */ #define CM_COLORMAP 3 /* a colormap file */
@ -64,7 +64,7 @@ typedef struct {
unsigned short zsize; unsigned short zsize;
unsigned long min; unsigned long min;
unsigned long max; unsigned long max;
unsigned long wastebytes; unsigned long wastebytes;
char name[80]; char name[80];
unsigned long colormap; unsigned long colormap;
@ -91,7 +91,7 @@ IMAGE *icreate();
* IMAGE *fiopen(int f, char *mode, unsigned int type, unsigned int dim, * IMAGE *fiopen(int f, char *mode, unsigned int type, unsigned int dim,
* unsigned int xsize, unsigned int ysize, unsigned int zsize); * unsigned int xsize, unsigned int ysize, unsigned int zsize);
* *
* ...while iopen and fiopen can take an extended set of parameters, the * ...while iopen and fiopen can take an extended set of parameters, the
* last five are optional, so a more correct prototype would be: * last five are optional, so a more correct prototype would be:
* *
*/ */
@ -99,7 +99,7 @@ IMAGE *iopen(char *file, char *mode, ...);
IMAGE *fiopen(int f, char *mode, ...); IMAGE *fiopen(int f, char *mode, ...);
/* /*
* *
* unsigned short *ibufalloc(IMAGE *image); * unsigned short *ibufalloc(IMAGE *image);
* int ifilbuf(IMAGE *image); * int ifilbuf(IMAGE *image);
* int iflush(IMAGE *image); * int iflush(IMAGE *image);

View File

@ -424,10 +424,10 @@
#endif /* _LANGUAGE_ASSEMBLY */ #endif /* _LANGUAGE_ASSEMBLY */
/* /*
* floating-point status register * floating-point status register
*/ */
#define FPCSR_FS 0x01000000 /* flush denorm to zero */ #define FPCSR_FS 0x01000000 /* flush denorm to zero */
#define FPCSR_C 0x00800000 /* condition bit */ #define FPCSR_C 0x00800000 /* condition bit */
#define FPCSR_CE 0x00020000 /* cause: unimplemented operation */ #define FPCSR_CE 0x00020000 /* cause: unimplemented operation */
#define FPCSR_CV 0x00010000 /* cause: invalid operation */ #define FPCSR_CV 0x00010000 /* cause: invalid operation */
#define FPCSR_CZ 0x00008000 /* cause: division by zero */ #define FPCSR_CZ 0x00008000 /* cause: division by zero */

View File

@ -24,10 +24,10 @@
/* /*
* Header file for the Audio Binary Interface. * Header file for the Audio Binary Interface.
* This is included in the Media Binary Interface file * This is included in the Media Binary Interface file
* mbi.h. * mbi.h.
* *
* This file follows the framework used for graphics. * This file follows the framework used for graphics.
* *
*/ */
/* Audio commands: */ /* Audio commands: */
@ -205,7 +205,7 @@ typedef struct {
unsigned int pad2:16; unsigned int pad2:16;
unsigned int addr; unsigned int addr;
} Asetloop; } Asetloop;
/* /*
* Generic Acmd Packet * Generic Acmd Packet
*/ */
@ -385,7 +385,7 @@ typedef short ENVMIX_STATE[40];
_a->words.w0 = _SHIFTL(A_SETLOOP, 24, 8); \ _a->words.w0 = _SHIFTL(A_SETLOOP, 24, 8); \
_a->words.w1 = (unsigned int)(a); \ _a->words.w1 = (unsigned int)(a); \
} }
#define aDMEMMove(pkt, i, o, c) \ #define aDMEMMove(pkt, i, o, c) \
{ \ { \
Acmd *_a = (Acmd *)pkt; \ Acmd *_a = (Acmd *)pkt; \

View File

@ -1,11 +1,11 @@
/*--------------------------------------------------------------------- /*---------------------------------------------------------------------
Copyright (C) 1997, Nintendo. Copyright (C) 1997, Nintendo.
File gs2dex.h File gs2dex.h
Coded by Yoshitaka Yasumoto. Jul 31, 1997. Coded by Yoshitaka Yasumoto. Jul 31, 1997.
Modified by Modified by
Comments Header file for S2DEX ucode. Comments Header file for S2DEX ucode.
$Id: gs2dex.h,v 1.21 1998/05/28 00:14:49 has Exp $ $Id: gs2dex.h,v 1.21 1998/05/28 00:14:49 has Exp $
---------------------------------------------------------------------*/ ---------------------------------------------------------------------*/
@ -40,12 +40,12 @@ extern "C" {
/* Non scalable background plane */ /* Non scalable background plane */
typedef struct { typedef struct {
u16 imageX; /* x-coordinate of upper-left position of texture (u10.5) */ u16 imageX; /* x-coordinate of upper-left position of texture (u10.5) */
u16 imageW; /* width of the texture (u10.2) */ u16 imageW; /* width of the texture (u10.2) */
s16 frameX; /* upper-left position of transferred frame (s10.2) */ s16 frameX; /* upper-left position of transferred frame (s10.2) */
u16 frameW; /* width of transferred frame (u10.2) */ u16 frameW; /* width of transferred frame (u10.2) */
u16 imageY; /* y-coordinate of upper-left position of texture (u10.5) */ u16 imageY; /* y-coordinate of upper-left position of texture (u10.5) */
u16 imageH; /* height of the texture (u10.2) */ u16 imageH; /* height of the texture (u10.2) */
s16 frameY; /* upper-left position of transferred frame (s10.2) */ s16 frameY; /* upper-left position of transferred frame (s10.2) */
u16 frameH; /* height of transferred frame (u10.2) */ u16 frameH; /* height of transferred frame (u10.2) */
@ -58,7 +58,7 @@ typedef struct {
u16 imageFlip; /* right & left image inversion (Inverted by G_BG_FLAG_FLIPS) */ 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. */ /* 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. u16 tmemW; /* TMEM width and Word size of frame 1 line.
At LoadBlock, GS_PIX2TMEM(imageW/4,imageSiz) At LoadBlock, GS_PIX2TMEM(imageW/4,imageSiz)
At LoadTile GS_PIX2TMEM(frameW/4,imageSiz)+1 */ At LoadTile GS_PIX2TMEM(frameW/4,imageSiz)+1 */
u16 tmemH; /* height of TMEM loadable at a time (s13.2) 4 times value u16 tmemH; /* height of TMEM loadable at a time (s13.2) 4 times value
@ -67,24 +67,24 @@ typedef struct {
u16 tmemLoadSH; /* SH value u16 tmemLoadSH; /* SH value
At LoadBlock, tmemSize/2-1 At LoadBlock, tmemSize/2-1
At LoadTile, tmemW*16-1 */ At LoadTile, tmemW*16-1 */
u16 tmemLoadTH; /* TH value or Stride value u16 tmemLoadTH; /* TH value or Stride value
At LoadBlock, GS_CALC_DXT(tmemW) At LoadBlock, GS_CALC_DXT(tmemW)
At LoadTile, tmemH-1 */ At LoadTile, tmemH-1 */
u16 tmemSizeW; /* skip value of imagePtr for image 1-line u16 tmemSizeW; /* skip value of imagePtr for image 1-line
At LoadBlock, tmemW*2 At LoadBlock, tmemW*2
At LoadTile, GS_PIX2TMEM(imageW/4,imageSiz)*2 */ At LoadTile, GS_PIX2TMEM(imageW/4,imageSiz)*2 */
u16 tmemSize; /* skip value of imagePtr for 1-loading u16 tmemSize; /* skip value of imagePtr for 1-loading
= tmemSizeW*tmemH */ = tmemSizeW*tmemH */
} uObjBg_t; /* 40 bytes */ } uObjBg_t; /* 40 bytes */
/* Scalable background plane */ /* Scalable background plane */
typedef struct { typedef struct {
u16 imageX; /* x-coordinate of upper-left position of texture (u10.5) */ u16 imageX; /* x-coordinate of upper-left position of texture (u10.5) */
u16 imageW; /* width of texture (u10.2) */ u16 imageW; /* width of texture (u10.2) */
s16 frameX; /* upper-left position of transferred frame (s10.2) */ s16 frameX; /* upper-left position of transferred frame (s10.2) */
u16 frameW; /* width of transferred frame (u10.2) */ u16 frameW; /* width of transferred frame (u10.2) */
u16 imageY; /* y-coordinate of upper-left position of texture (u10.5) */ u16 imageY; /* y-coordinate of upper-left position of texture (u10.5) */
u16 imageH; /* height of texture (u10.2) */ u16 imageH; /* height of texture (u10.2) */
s16 frameY; /* upper-left position of transferred frame (s10.2) */ s16 frameY; /* upper-left position of transferred frame (s10.2) */
u16 frameH; /* height of transferred frame (u10.2) */ u16 frameH; /* height of transferred frame (u10.2) */
@ -99,9 +99,9 @@ typedef struct {
u16 scaleW; /* scale value of X-direction (u5.10) */ u16 scaleW; /* scale value of X-direction (u5.10) */
u16 scaleH; /* scale value of Y-direction (u5.10) */ u16 scaleH; /* scale value of Y-direction (u5.10) */
s32 imageYorig; /* start point of drawing on image (s20.5) */ s32 imageYorig; /* start point of drawing on image (s20.5) */
u8 padding[4]; u8 padding[4];
} uObjScaleBg_t; /* 40 bytes */ } uObjScaleBg_t; /* 40 bytes */
typedef union { typedef union {
@ -126,7 +126,7 @@ typedef struct {
u16 imageH; /* u10.5 height of u10.5 texture (length of T-direction) */ u16 imageH; /* u10.5 height of u10.5 texture (length of T-direction) */
u16 paddingY; /* Unused - Always 0 */ u16 paddingY; /* Unused - Always 0 */
u16 imageStride; /* folding width of texel (In units of 64bit word) */ u16 imageStride; /* folding width of texel (In units of 64bit word) */
u16 imageAdrs; /* texture header position in TMEM (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 imageFmt; /* format of texel - G_IM_FMT_* */
u8 imageSiz; /* size of texel - G_IM_SIZ_* */ u8 imageSiz; /* size of texel - G_IM_SIZ_* */
u8 imagePal; /* pallet number (0-7) */ u8 imagePal; /* pallet number (0-7) */
@ -362,7 +362,7 @@ typedef struct {
#define G_RM_AA_XLU_SPRITE2 G_RM_AA_XLU_SURF2 #define G_RM_AA_XLU_SPRITE2 G_RM_AA_XLU_SURF2
/*===========================================================================* /*===========================================================================*
* External functions * External functions
*===========================================================================*/ *===========================================================================*/
extern u64 gspS2DEX_fifoTextStart[], gspS2DEX_fifoTextEnd[]; extern u64 gspS2DEX_fifoTextStart[], gspS2DEX_fifoTextEnd[];
extern u64 gspS2DEX_fifoDataStart[], gspS2DEX_fifoDataEnd[]; extern u64 gspS2DEX_fifoDataStart[], gspS2DEX_fifoDataEnd[];

View File

@ -61,12 +61,12 @@ extern "C" {
* for the microcode. * for the microcode.
*/ */
/* /*
* object state field: rendState * object state field: rendState
* *
* This flag word is built up out of the bits from a * This flag word is built up out of the bits from a
* subset of the G_SETGEOMETRYMODE flags from gbi.h. * subset of the G_SETGEOMETRYMODE flags from gbi.h.
* *
* When each of these bits is '1', the comments below explain * When each of these bits is '1', the comments below explain
* the effect on the triangles. * the effect on the triangles.
*/ */
@ -83,7 +83,7 @@ extern "C" {
* texture tile. * texture tile.
*/ */
/* /*
* object state field: flag * object state field: flag
* *
* This is a group of what would be pad bits. We use them for some * This is a group of what would be pad bits. We use them for some
@ -105,7 +105,7 @@ extern long long int gspTurbo3D_fifoTextStart[], gspTurbo3D_fifoTextEnd[];
extern long long int gspTurbo3D_fifoDataStart[], gspTurbo3D_fifoDataEnd[]; extern long long int gspTurbo3D_fifoDataStart[], gspTurbo3D_fifoDataEnd[];
/* /*
* This is the global state structure. It's definition carefully * This is the global state structure. It's definition carefully
* matches the ucode, so if this structure changes, you must also change * matches the ucode, so if this structure changes, you must also change
* the ucode. * the ucode.
*/ */
@ -188,8 +188,8 @@ typedef union {
* *
* NOTE: The triangle list MUST be aligned to an 8-byte boundary. * NOTE: The triangle list MUST be aligned to an 8-byte boundary.
* Since this structure is only 4 bytes, we are REQUIRING that * Since this structure is only 4 bytes, we are REQUIRING that
* this structure only be used as an array of triangles, and we * this structure only be used as an array of triangles, and we
* depend on the MIPS C compiler (which always aligns arrays to * depend on the MIPS C compiler (which always aligns arrays to
* 8-byte boundaries). THIS IS DANGEROUS!!!! * 8-byte boundaries). THIS IS DANGEROUS!!!!
* *
*/ */
@ -244,10 +244,10 @@ typedef union {
* requires the RDP othermode command to be cached by the host, * requires the RDP othermode command to be cached by the host,
* therefore we provide a different interface in libultra to help cache * therefore we provide a different interface in libultra to help cache
* this in the gt state (this word is just bits, you could pack them * this in the gt state (this word is just bits, you could pack them
* on your own). * on your own).
* *
* gtStateSetOthermode() accomplishs this, taking as arguments * gtStateSetOthermode() accomplishs this, taking as arguments
* the state, one of the following mode enums, and a piece of data * the state, one of the following mode enums, and a piece of data
* (othermode parameters from gbi.h). * (othermode parameters from gbi.h).
* *
* By definition, the othermode word from the gt state structure is sent * By definition, the othermode word from the gt state structure is sent
@ -255,11 +255,11 @@ typedef union {
* othermode is *always* sent. * othermode is *always* sent.
* *
* Stated another way, NONE of the gbi RDP othermode commands equivalent * Stated another way, NONE of the gbi RDP othermode commands equivalent
* to those listed here are allowed in the rdpCmd[] field of the * to those listed here are allowed in the rdpCmd[] field of the
* gt state structure. * gt state structure.
* *
* Notice also that many of these commands do not make sense for * Notice also that many of these commands do not make sense for
* the turbo ucode (they control features not supported, like mip-mapping). * the turbo ucode (they control features not supported, like mip-mapping).
* They are only included here for completeness. * They are only included here for completeness.
* *
*/ */
@ -288,7 +288,7 @@ typedef enum {
*/ */
extern void gtStateSetOthermode(Gfx *om, gtStateOthermode_t mode, int data); extern void gtStateSetOthermode(Gfx *om, gtStateOthermode_t mode, int data);
/* /*
* This call dumps a turbo display list for use with gbi2mem and RSPSIM * This call dumps a turbo display list for use with gbi2mem and RSPSIM
*/ */
#define GT_DUMPTURBO_HANGAFTER 64 #define GT_DUMPTURBO_HANGAFTER 64

View File

@ -1,7 +1,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. Copyright (C) 1998 Nintendo.
$RCSfile: leo.h,v $ $RCSfile: leo.h,v $
$Revision: 1.29 $ $Revision: 1.29 $
$Date: 1998/12/21 07:30:15 $ $Date: 1998/12/21 07:30:15 $
@ -107,7 +107,7 @@ typedef struct
u8 sleep_time; u8 sleep_time;
u32 reserve3; u32 reserve3;
} modeselect; } modeselect;
} data; } data;
} LEOCmd; } LEOCmd;
@ -179,7 +179,7 @@ typedef struct
#define LEO_ERROR_NO_SEEK_COMPLETE 21 #define LEO_ERROR_NO_SEEK_COMPLETE 21
#define LEO_ERROR_WRITE_FAULT 22 #define LEO_ERROR_WRITE_FAULT 22
#define LEO_ERROR_UNRECOVERED_READ_ERROR 23 #define LEO_ERROR_UNRECOVERED_READ_ERROR 23
#define LEO_ERROR_NO_REFERENCE_POSITION_FOUND 24 #define LEO_ERROR_NO_REFERENCE_POSITION_FOUND 24
#define LEO_ERROR_TRACK_FOLLOWING_ERROR 25 #define LEO_ERROR_TRACK_FOLLOWING_ERROR 25
#define LEO_ERROR_TRACKING_OR_SPDL_SERVO_FAILURE 25 #define LEO_ERROR_TRACKING_OR_SPDL_SERVO_FAILURE 25
#define LEO_ERROR_INVALID_COMMAND_OPERATION_CODE 31 #define LEO_ERROR_INVALID_COMMAND_OPERATION_CODE 31

View File

@ -107,7 +107,7 @@ extern s32 LeoResetClear(void);
#define LEO_SENSE_NO_SEEK_COMPLETE 21 #define LEO_SENSE_NO_SEEK_COMPLETE 21
#define LEO_SENSE_WRITE_FAULT 22 #define LEO_SENSE_WRITE_FAULT 22
#define LEO_SENSE_UNRECOVERED_READ_ERROR 23 #define LEO_SENSE_UNRECOVERED_READ_ERROR 23
#define LEO_SENSE_NO_REFERENCE_POSITION_FOUND 24 #define LEO_SENSE_NO_REFERENCE_POSITION_FOUND 24
#define LEO_SENSE_TRACK_FOLLOWING_ERROR 25 #define LEO_SENSE_TRACK_FOLLOWING_ERROR 25
#define LEO_SENSE_TRACKING_OR_SPDL_SERVO_FAILURE 25 #define LEO_SENSE_TRACKING_OR_SPDL_SERVO_FAILURE 25
#define LEO_SENSE_INVALID_COMMAND_OPERATION_CODE 31 #define LEO_SENSE_INVALID_COMMAND_OPERATION_CODE 31

View File

@ -29,7 +29,7 @@ extern "C" {
#include <PR/ultratypes.h> #include <PR/ultratypes.h>
#include <PR/mbi.h> #include <PR/mbi.h>
/* /*
* Synthesis driver stuff * Synthesis driver stuff
*/ */
@ -59,10 +59,10 @@ typedef struct {
ALHeap *heap; ALHeap *heap;
struct ALParam_s *paramList; struct ALParam_s *paramList;
struct N_ALMainBus_s *mainBus; struct N_ALMainBus_s *mainBus;
struct N_ALAuxBus_s *auxBus; struct N_ALAuxBus_s *auxBus;
s32 numPVoices; s32 numPVoices;
s32 maxAuxBusses; s32 maxAuxBusses;
s32 outputRate; s32 outputRate;
s32 maxOutSamples; s32 maxOutSamples;
s32 sv_dramout; s32 sv_dramout;
s32 sv_first; s32 sv_first;

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os.h,v $ $RCSfile: os.h,v $
$Revision: 1.167 $ $Revision: 1.167 $
$Date: 1999/01/18 13:17:43 $ $Date: 1999/01/18 13:17:43 $
@ -81,8 +81,8 @@ extern "C" {
#define OS_MIN_STACKSIZE 72 #define OS_MIN_STACKSIZE 72
/* /*
* Leo Disk * Leo Disk
*/ */
/* transfer mode */ /* transfer mode */

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_ai.h,v $ $RCSfile: os_ai.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:04 $ $Date: 1998/10/09 08:01:04 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_cache.h,v $ $RCSfile: os_cache.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:04 $ $Date: 1998/10/09 08:01:04 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_cont.h,v $ $RCSfile: os_cont.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:05 $ $Date: 1998/10/09 08:01:05 $
@ -47,7 +47,7 @@ extern "C" {
*/ */
/* /*
* Structure for controllers * Structure for controllers
*/ */
typedef struct { typedef struct {
@ -96,7 +96,7 @@ typedef struct {
#ifdef _HW_VERSION_1 #ifdef _HW_VERSION_1
#define CONT_FRAME_ERROR 0x2 #define CONT_FRAME_ERROR 0x2
#define CONT_COLLISION_ERROR 0x1 #define CONT_COLLISION_ERROR 0x1
#endif #endif
/* Controller type */ /* Controller type */

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_convert.h,v $ $RCSfile: os_convert.h,v $
$Revision: 1.2 $ $Revision: 1.2 $
$Date: 1999/04/21 02:53:11 $ $Date: 1999/04/21 02:53:11 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_debug.h,v $ $RCSfile: os_debug.h,v $
$Revision: 1.4 $ $Revision: 1.4 $
$Date: 1999/06/30 03:04:08 $ $Date: 1999/06/30 03:04:08 $
@ -45,7 +45,7 @@ extern "C" {
*/ */
/* /*
* Structure for Profiler * Structure for Profiler
*/ */
typedef struct { typedef struct {
u16 *histo_base; /* histogram base */ u16 *histo_base; /* histogram base */

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_eeprom.h,v $ $RCSfile: os_eeprom.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:06 $ $Date: 1998/10/09 08:01:06 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_error.h,v $ $RCSfile: os_error.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:06 $ $Date: 1998/10/09 08:01:06 $

View File

@ -1,7 +1,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. Copyright (C) 1998 Nintendo.
$RCSfile: os_gbpak.h,v $ $RCSfile: os_gbpak.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:07 $ $Date: 1998/10/09 08:01:07 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_gio.h,v $ $RCSfile: os_gio.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:08 $ $Date: 1998/10/09 08:01:08 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_host.h,v $ $RCSfile: os_host.h,v $
$Revision: 1.3 $ $Revision: 1.3 $
$Date: 1999/06/24 09:23:06 $ $Date: 1999/06/24 09:23:06 $

View File

@ -12,7 +12,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_internal_debug.h,v $ $RCSfile: os_internal_debug.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:09 $ $Date: 1998/10/09 08:01:09 $

View File

@ -12,7 +12,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_internal_error.h,v $ $RCSfile: os_internal_error.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:10 $ $Date: 1998/10/09 08:01:10 $

View File

@ -12,7 +12,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_internal_exception.h,v $ $RCSfile: os_internal_exception.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:10 $ $Date: 1998/10/09 08:01:10 $

View File

@ -12,7 +12,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_internal_gio.h,v $ $RCSfile: os_internal_gio.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:11 $ $Date: 1998/10/09 08:01:11 $

View File

@ -12,7 +12,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_internal_host.h,v $ $RCSfile: os_internal_host.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:11 $ $Date: 1998/10/09 08:01:11 $

View File

@ -12,7 +12,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_internal_rsp.h,v $ $RCSfile: os_internal_rsp.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:12 $ $Date: 1998/10/09 08:01:12 $

View File

@ -12,7 +12,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_internal_si.h,v $ $RCSfile: os_internal_si.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:13 $ $Date: 1998/10/09 08:01:13 $

View File

@ -12,7 +12,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_internal_thread.h,v $ $RCSfile: os_internal_thread.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:13 $ $Date: 1998/10/09 08:01:13 $

View File

@ -12,7 +12,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_internal_tlb.h,v $ $RCSfile: os_internal_tlb.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:14 $ $Date: 1998/10/09 08:01:14 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_libc.h,v $ $RCSfile: os_libc.h,v $
$Revision: 1.3 $ $Revision: 1.3 $
$Date: 1999/07/13 01:43:47 $ $Date: 1999/07/13 01:43:47 $

View File

@ -1,7 +1,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. Copyright (C) 1998 Nintendo.
$RCSfile: os_motor.h,v $ $RCSfile: os_motor.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:15 $ $Date: 1998/10/09 08:01:15 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_rdp.h,v $ $RCSfile: os_rdp.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:16 $ $Date: 1998/10/09 08:01:16 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_reg.h,v $ $RCSfile: os_reg.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:17 $ $Date: 1998/10/09 08:01:17 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_rsp.h,v $ $RCSfile: os_rsp.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:17 $ $Date: 1998/10/09 08:01:17 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_si.h,v $ $RCSfile: os_si.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:18 $ $Date: 1998/10/09 08:01:18 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_time.h,v $ $RCSfile: os_time.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:19 $ $Date: 1998/10/09 08:01:19 $
@ -47,7 +47,7 @@ extern "C" {
*/ */
/* /*
* Structure for time value * Structure for time value
*/ */
typedef u64 OSTime; typedef u64 OSTime;

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_tlb.h,v $ $RCSfile: os_tlb.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:20 $ $Date: 1998/10/09 08:01:20 $

View File

@ -1,7 +1,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. Copyright (C) 1998 Nintendo.
$RCSfile: os_version.h,v $ $RCSfile: os_version.h,v $
$Revision: 1.2 $ $Revision: 1.2 $
$Date: 1999/06/17 01:33:01 $ $Date: 1999/06/17 01:33:01 $

View File

@ -21,7 +21,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI) Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_vi.h,v $ $RCSfile: os_vi.h,v $
$Revision: 1.1 $ $Revision: 1.1 $
$Date: 1998/10/09 08:01:20 $ $Date: 1998/10/09 08:01:20 $
@ -69,7 +69,7 @@ typedef struct {
typedef struct { typedef struct {
u32 origin; u32 origin;
u32 yScale; u32 yScale;
u32 vStart; u32 vStart;
u32 vBurst; u32 vBurst;
u32 vIntr; u32 vIntr;
} OSViFieldRegs; } OSViFieldRegs;

View File

@ -1,7 +1,7 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. Copyright (C) 1998 Nintendo.
$RCSfile: os_voice.h,v $ $RCSfile: os_voice.h,v $
$Revision: 1.2 $ $Revision: 1.2 $
$Date: 1999/07/13 08:36:42 $ $Date: 1999/07/13 08:36:42 $
@ -40,7 +40,7 @@ typedef struct { /* Voice Recognition System */
u16 answer[5]; u16 answer[5];
u16 distance[5]; u16 distance[5];
} OSVoiceData; } OSVoiceData;
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */ #endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */

View File

@ -23,7 +23,7 @@
/* /*
* Defines for the GIO card in the Nintendo Development Station * Defines for the GIO card in the Nintendo Development Station
* *
* The RAM on the GIO card acts as ROM for the game * The RAM on the GIO card acts as ROM for the game
* Interrupts available between the game and the Indy host * Interrupts available between the game and the Indy host
* *
@ -62,7 +62,7 @@
#else #else
#define RAMROM_BOOTSTRAP_OFFSET 0x400 #define RAMROM_BOOTSTRAP_OFFSET 0x400
#define RAMROM_GAME_OFFSET 0x2000 #define RAMROM_GAME_OFFSET 0x2000
#endif #endif
#define RAMROM_CLOCKRATE_OFFSET 0x4 #define RAMROM_CLOCKRATE_OFFSET 0x4
#define RAMROM_CLOCKRATE_MASK 0xfffffff0 #define RAMROM_CLOCKRATE_MASK 0xfffffff0
#define RAMROM_BOOTADDR_OFFSET 0x8 #define RAMROM_BOOTADDR_OFFSET 0x8

View File

@ -37,7 +37,7 @@
#define RDB_TYPE_HtoG_DEBUG 14 #define RDB_TYPE_HtoG_DEBUG 14
#define RDB_TYPE_HtoG_DEBUG_CT 15 #define RDB_TYPE_HtoG_DEBUG_CT 15
#define RDB_TYPE_HtoG_DATA 16 #define RDB_TYPE_HtoG_DATA 16
#define RDB_TYPE_HtoG_DATA_DONE 17 #define RDB_TYPE_HtoG_DATA_DONE 17
#define RDB_TYPE_HtoG_REQ_RAMROM 18 #define RDB_TYPE_HtoG_REQ_RAMROM 18
#define RDB_TYPE_HtoG_FREE_RAMROM 19 #define RDB_TYPE_HtoG_FREE_RAMROM 19
#define RDB_TYPE_HtoG_KDEBUG 20 #define RDB_TYPE_HtoG_KDEBUG 20

View File

@ -40,20 +40,20 @@ extern "C" {
/*************************************** /***************************************
* *
* Global defines * Global defines
* *
*/ */
/* Alignment sizes */ /* Alignment sizes */
#define ALIGNSZ (sizeof(long long)) /* 8 bytes */ #define ALIGNSZ (sizeof(long long)) /* 8 bytes */
#define ALIGNOFFST (ALIGNSZ-1) #define ALIGNOFFST (ALIGNSZ-1)
/* size for storing index to free buffer */ /* size for storing index to free buffer */
#define BUF_CTRL_SIZE ALIGNSZ #define BUF_CTRL_SIZE ALIGNSZ
/* Max bufcount = 32K */ /* Max bufcount = 32K */
#define MAX_BUFCOUNT 0x8000 #define MAX_BUFCOUNT 0x8000
/* code for last free buffer */ /* code for last free buffer */
#define BUF_FREE_WO_NEXT 0x8000 #define BUF_FREE_WO_NEXT 0x8000
/* /*
* Global defines for alignment size (default is 8-byte alignment) * Global defines for alignment size (default is 8-byte alignment)
@ -82,15 +82,15 @@ extern "C" {
* *
*/ */
/* /*
* Structure for region header/control area * Structure for region header/control area
*/ */
typedef struct _Region_s { typedef struct _Region_s {
u8 *r_startBufferAddress; /* start address to data buffer */ u8 *r_startBufferAddress; /* start address to data buffer */
u8 *r_endAddress; /* end address of region */ u8 *r_endAddress; /* end address of region */
s32 r_bufferSize; /* size of buffers for this region */ s32 r_bufferSize; /* size of buffers for this region */
s32 r_bufferCount; /* up to 32K entries; MSB is used for s32 r_bufferCount; /* up to 32K entries; MSB is used for
setting end-of-list/used */ setting end-of-list/used */
u16 r_freeList; /* point to array index of first u16 r_freeList; /* point to array index of first
available memory buffer */ available memory buffer */
u16 r_alignSize; /* alignment size (# of bytes) */ u16 r_alignSize; /* alignment size (# of bytes) */
} OSRegion; } OSRegion;
@ -107,10 +107,10 @@ typedef struct _Region_s {
* *
*/ */
extern void *osCreateRegion(void *, u32, u32, u32); extern void *osCreateRegion(void *, u32, u32, u32);
extern void *osMalloc(void *); extern void *osMalloc(void *);
extern void osFree(void *, void *); extern void osFree(void *, void *);
extern s32 osGetRegionBufCount(void *); extern s32 osGetRegionBufCount(void *);
extern s32 osGetRegionBufSize(void *); extern s32 osGetRegionBufSize(void *);
#ifdef _LANGUAGE_C_PLUS_PLUS #ifdef _LANGUAGE_C_PLUS_PLUS

View File

@ -50,7 +50,7 @@ extern "C" {
* - pointer to ucode * - pointer to ucode
* - size of ucode * - size of ucode
* - pointer to initial DMEM data * - pointer to initial DMEM data
* - size of initial DMEM data * - size of initial DMEM data
* - pointer to DRAM stack * - pointer to DRAM stack
* - size of DRAM stack (max) * - size of DRAM stack (max)
* - pointer to output buffer * - pointer to output buffer
@ -131,7 +131,7 @@ typedef u32 OSYieldResult;
#define OS_TASK_USR3 0x0080 #define OS_TASK_USR3 0x0080
/* /*
* Size of Yield buffer. The taskHdrPtr->t.yield_data_ptr must point to a * Size of Yield buffer. The taskHdrPtr->t.yield_data_ptr must point to a
* buffer of this size. (The size is in bytes). ONLY If the task will NEVER * buffer of this size. (The size is in bytes). ONLY If the task will NEVER
* yield it may be a null pointer. The buffer must be aligned to a 64 bit * yield it may be a null pointer. The buffer must be aligned to a 64 bit
* boundary. The taskHdrPtr->t.yield_data_ptr must be set to point to the * boundary. The taskHdrPtr->t.yield_data_ptr must be set to point to the

View File

@ -58,7 +58,7 @@ extern "C" {
* fixed per release. * fixed per release.
*/ */
#define SP_UCODE_DATA_SIZE 2048 #define SP_UCODE_DATA_SIZE 2048
/************************************************************************** /**************************************************************************
* *
@ -67,7 +67,7 @@ extern "C" {
*/ */
/* /*
* Symbols generated by "rsp2elf", included by "makerom" that indicate * Symbols generated by "rsp2elf", included by "makerom" that indicate
* the location and size of the SP microcode objects. The ucode objects * the location and size of the SP microcode objects. The ucode objects
* are loaded as part of the codesegment (arbitrary, could do other * are loaded as part of the codesegment (arbitrary, could do other
* ways) * ways)

View File

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------* /*---------------------------------------------------------------------*
Copyright (C) 1998, Nintendo. Copyright (C) 1998, Nintendo.
File ucode_debug.h File ucode_debug.h
Coded by Yoshitaka Yasumoto. Nov 15, 1998. Coded by Yoshitaka Yasumoto. Nov 15, 1998.
$Id: ucode_debug.h,v 1.1 1998/12/25 01:06:21 has Exp $ $Id: ucode_debug.h,v 1.1 1998/12/25 01:06:21 has Exp $
*---------------------------------------------------------------------*/ *---------------------------------------------------------------------*/
#ifndef _UCODE_DEBUG_H_ #ifndef _UCODE_DEBUG_H_

View File

@ -39,7 +39,7 @@ extern "C" {
#define OS_LOG_MAGIC 0x20736a73 #define OS_LOG_MAGIC 0x20736a73
#define OS_LOG_FLOAT(x) (*(int *) &(x)) #define OS_LOG_FLOAT(x) (*(int *) &(x))
#define OS_LOG_VERSION 1 #define OS_LOG_VERSION 1
typedef struct { typedef struct {
u32 magic; /* log identifier */ u32 magic; /* log identifier */
u32 len; /* length of log data + log structure */ u32 len; /* length of log data + log structure */

File diff suppressed because it is too large Load Diff

View File

@ -65,7 +65,7 @@
#ifdef _ANSI_STDARG_H_ #ifdef _ANSI_STDARG_H_
#define _VA_LIST_ #define _VA_LIST_
#endif #endif
#define _ANSI_STDARG_H_ #define _ANSI_STDARG_H_
#undef va_alist #undef va_alist
#undef va_dcl #undef va_dcl

View File

@ -1207,7 +1207,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt
case POPUP_MENU_UPGRADE_PARTNER: case POPUP_MENU_UPGRADE_PARTNER:
for (j = 0; j < ARRAY_COUNT(D_80109890); j++) { for (j = 0; j < ARRAY_COUNT(D_80109890); j++) {
id = PopupMenu_PartnerLevelHEID; id = PopupMenu_PartnerLevelHEID;
if (gPopupMenu->enabled[i]) { if (gPopupMenu->enabled[i]) {
hud_element_set_script(id, D_80109890[j]); hud_element_set_script(id, D_80109890[j]);
} else { } else {
@ -1233,13 +1233,13 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt
y += LINE_HEIGHT; y += LINE_HEIGHT;
if (i == 0) { if (i == 0) {
y += offset; y += offset;
} }
} }
} }
x = baseX + 24; x = baseX + 24;
y = baseY + D_8010D658 + 8; y = baseY + D_8010D658 + 8;
offset = 0; offset = 0;
if (gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) { if (gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) {
y = baseY + D_8010D658 + 6; y = baseY + D_8010D658 + 6;
offset = 2; offset = 2;
@ -1321,7 +1321,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt
} }
break; break;
} }
v0 = (PopupMenu_SelectedIndex - PopupMenu_FirstDisplayIndex) * LINE_HEIGHT; v0 = (PopupMenu_SelectedIndex - PopupMenu_FirstDisplayIndex) * LINE_HEIGHT;
x = baseX + 8; x = baseX + 8;
y = baseY + 9 + v0; y = baseY + 9 + v0;
@ -1603,7 +1603,7 @@ void func_800F4D28(s32* userData, s32 x, s32 y) {
} }
hud_element_draw_clipped(hudElement); hud_element_draw_clipped(hudElement);
hudElement = PopupMenu_TimesHEID; hudElement = PopupMenu_TimesHEID;
hud_element_set_render_pos(hudElement, x + 26, y + 11); hud_element_set_render_pos(hudElement, x + 26, y + 11);
hud_element_set_alpha(hudElement, PopupMenu_Alpha); hud_element_set_alpha(hudElement, PopupMenu_Alpha);

View File

@ -11,10 +11,10 @@ API_CALLABLE(func_802A10A4_77F2E4) {
s32 i; s32 i;
for (i = 0; i < 20; i++) { for (i = 0; i < 20; i++) {
fx_floating_cloud_puff(0, fx_floating_cloud_puff(0,
(playerActorState->goalPos.x + (f32) rand_int(30)) - 15.0f, (playerActorState->goalPos.x + (f32) rand_int(30)) - 15.0f,
(playerActorState->goalPos.y + (f32) rand_int(20)) - 15.0f, (playerActorState->goalPos.y + (f32) rand_int(20)) - 15.0f,
playerActorState->goalPos.z + 5.0f, 1.0f, 25); playerActorState->goalPos.z + 5.0f, 1.0f, 25);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;

View File

@ -8,7 +8,7 @@
#include "battle/common/move/JumpSupport.inc.c" #include "battle/common/move/JumpSupport.inc.c"
s32 N(DifficultyTable)[] = { s32 N(DifficultyTable)[] = {
7, 6, 5, 4, 3, 2, 1, 0 7, 6, 5, 4, 3, 2, 1, 0
}; };
s32 N(BaseHitChance) = 200; s32 N(BaseHitChance) = 200;

View File

@ -1529,7 +1529,7 @@ void btl_cam_use_preset_impl(s32 id) {
BattleCam_BoomLength = 200; BattleCam_BoomLength = 200;
BattleCam_BoomPitch = 8; BattleCam_BoomPitch = 8;
BattleCam_MoveTimeLeft = 20; BattleCam_MoveTimeLeft = 20;
BattleCam_BoomZOffset = 15; BattleCam_BoomZOffset = 15;
BattleCam_BoomYaw = 0; BattleCam_BoomYaw = 0;
preset = &CamPreset_F; preset = &CamPreset_F;

View File

@ -6,7 +6,7 @@ API_CALLABLE(N(SetAngleClamped)) {
f32 x1 = evt_get_float_variable(script, *args++); f32 x1 = evt_get_float_variable(script, *args++);
f32 z1 = evt_get_float_variable(script, *args++); f32 z1 = evt_get_float_variable(script, *args++);
f32 x2 = evt_get_float_variable(script, *args++); f32 x2 = evt_get_float_variable(script, *args++);
f32 z2 = evt_get_float_variable(script, *args++); f32 z2 = evt_get_float_variable(script, *args++);
f32 angle = clamp_angle(atan2(x1, z1, x2, z2)); f32 angle = clamp_angle(atan2(x1, z1, x2, z2));
evt_set_float_variable(script, var, angle); evt_set_float_variable(script, var, angle);

View File

@ -16,7 +16,7 @@ API_CALLABLE(N(UnkActorPosFunc)) {
} else { } else {
play_movement_dust_effects(1, actor->state.currentPos.x, actor->state.currentPos.y, actor->state.currentPos.z, actor->state.angle); play_movement_dust_effects(1, actor->state.currentPos.x, actor->state.currentPos.y, actor->state.currentPos.z, actor->state.angle);
} }
actorState->speed /= 1.5; actorState->speed /= 1.5;
actor->currentPos.x = actorState->currentPos.x; actor->currentPos.x = actorState->currentPos.x;
actor->currentPos.y = actorState->currentPos.y; actor->currentPos.y = actorState->currentPos.y;

View File

@ -21,7 +21,7 @@ API_CALLABLE(N(UnkActorSizeFunc)) {
if (targetActorSizeY < targetActorSizeX) { if (targetActorSizeY < targetActorSizeX) {
targetActorLargerDimension = targetActorSizeX; targetActorLargerDimension = targetActorSizeX;
} }
script->varTable[3] = targetActorLargerDimension + 126; script->varTable[3] = targetActorLargerDimension + 126;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -38,7 +38,7 @@ void explosion_main(s32 type, f32 x, f32 y, f32 z) {
bpPtr->renderWorld = explosion_render; bpPtr->renderWorld = explosion_render;
bpPtr->unk_14 = NULL; bpPtr->unk_14 = NULL;
bpPtr->effectID = EFFECT_EXPLOSION; bpPtr->effectID = EFFECT_EXPLOSION;
effect = shim_create_effect_instance(bpPtr); effect = shim_create_effect_instance(bpPtr);
effect->numParts = numParts; effect->numParts = numParts;

View File

@ -80,7 +80,7 @@ void flower_splash_main(f32 posX, f32 posY, f32 posZ, f32 angle) {
part->scale.x = 1.0f; part->scale.x = 1.0f;
part->scale.y = 1.0f; part->scale.y = 1.0f;
part->scale.z = 1.0f; part->scale.z = 1.0f;
part->primAlpha = 255; part->primAlpha = 255;
part->timeLeft = 60; part->timeLeft = 60;

View File

@ -72,7 +72,7 @@ void flower_trail_main(s32 triggeredByNpc, f32 posX, f32 posY, f32 posZ, f32 ang
part->alive = TRUE; part->alive = TRUE;
part->triggeredByNpc = triggeredByNpc; part->triggeredByNpc = triggeredByNpc;
part->unk_7C = 0.0f; part->unk_7C = 0.0f;
part->pos.x = posX; part->pos.x = posX;
part->pos.y = posY; part->pos.y = posY;
part->pos.z = posZ; part->pos.z = posZ;

View File

@ -36,7 +36,7 @@ void gather_energy_pink_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 scale,
effect->numParts = numParts; effect->numParts = numParts;
data = effect->data.gatherEnergyPink = shim_general_heap_malloc(sizeof(*data)); data = effect->data.gatherEnergyPink = shim_general_heap_malloc(sizeof(*data));
ASSERT (data != NULL); ASSERT (data != NULL);
data->unk_00 = type; data->unk_00 = type;
data->unk_28 = duration; data->unk_28 = duration;
data->unk_2C = 0; data->unk_2C = 0;
@ -63,7 +63,7 @@ void gather_energy_pink_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 scale,
data->unk_50 = 0; data->unk_50 = 0;
data->unk_54 = 0; data->unk_54 = 0;
if (type == 1) { if (type == 1) {
data->unk_3C = 96; data->unk_3C = 96;
data->unk_20 = scale; data->unk_20 = scale;

View File

@ -71,7 +71,7 @@ void ice_pillar_update(EffectInstance* effect) {
s32 timeLeft; s32 timeLeft;
s32 lifeTime; s32 lifeTime;
s32 i; s32 i;
if (effect->flags & 0x10) { if (effect->flags & 0x10) {
effect->flags &= ~0x10; effect->flags &= ~0x10;
data->timeLeft = 16; data->timeLeft = 16;
@ -85,16 +85,16 @@ void ice_pillar_update(EffectInstance* effect) {
if (data->timeLeft < 0) { if (data->timeLeft < 0) {
shim_load_effect(EFFECT_ICE_SHARD); shim_load_effect(EFFECT_ICE_SHARD);
for (i = 0; i < 20; i++) { for (i = 0; i < 20; i++) {
EffectInstance* iceShard; EffectInstance* iceShard;
iceShard = ice_shard_main( iceShard = ice_shard_main(
(i % 2) + 2, (i % 2) + 2,
(data->pos.x + shim_rand_int(20)) - 10.0f, (data->pos.x + shim_rand_int(20)) - 10.0f,
data->pos.y + (shim_rand_int(40) * data->scale), data->pos.y + (shim_rand_int(40) * data->scale),
data->pos.z + 3.0f, data->pos.z + 3.0f,
(data->scale * ((shim_rand_int(10) * 0.7 * 0.1) + 0.3)), (data->scale * ((shim_rand_int(10) * 0.7 * 0.1) + 0.3)),
i + 30 i + 30
); );
iceShard->data.iceShard->animFrame = shim_rand_int(10) * 0.1; iceShard->data.iceShard->animFrame = shim_rand_int(10) * 0.1;
@ -152,7 +152,7 @@ void ice_pillar_appendGfx(void* effect) {
s32 alpha = data->prim.a; s32 alpha = data->prim.a;
Matrix4f sp10, sp50; Matrix4f sp10, sp50;
Camera* camera; Camera* camera;
gDPPipeSync(gMainGfxPos++); gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
@ -162,7 +162,7 @@ void ice_pillar_appendGfx(void* effect) {
shim_guMtxCatF(sp50, sp10, sp10); shim_guMtxCatF(sp50, sp10, sp10);
shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->prim.r, data->prim.g, data->prim.b, alpha); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->prim.r, data->prim.g, data->prim.b, alpha);

View File

@ -304,23 +304,23 @@ void shockwave_appendGfx(void* effect) {
envG2 = envG >> 2; envG2 = envG >> 2;
envB2 = envB >> 2; envB2 = envB >> 2;
} }
gDPPipeSync(gMainGfxPos++); gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
gSPDisplayList(gMainGfxPos++, dlist2); gSPDisplayList(gMainGfxPos++, dlist2);
shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f,
data->pos.x, data->pos.y, data->pos.z); data->pos.x, data->pos.y, data->pos.z);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
primA = data->alpha; primA = data->alpha;
savedGfxPos = gMainGfxPos; savedGfxPos = gMainGfxPos;
gMainGfxPos++; gMainGfxPos++;
savedGfxPos2 = gMainGfxPos; savedGfxPos2 = gMainGfxPos;
data++; data++;
for (i = 1; i < ((EffectInstance*) effect)->numParts; i++, data++) { for (i = 1; i < ((EffectInstance*) effect)->numParts; i++, data++) {
if (data->unk_4C >= 0) { if (data->unk_4C >= 0) {
@ -336,7 +336,7 @@ void shockwave_appendGfx(void* effect) {
gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, (s32) data->unk_3C, 0x00FC, (s32) data->unk_3C + 0x7C); gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, (s32) data->unk_3C, 0x00FC, (s32) data->unk_3C + 0x7C);
gDPSetTileSize(gMainGfxPos++, 1, 0, (s32) data->unk_44, 0x007C, (s32) data->unk_44 + 0x7C); gDPSetTileSize(gMainGfxPos++, 1, 0, (s32) data->unk_44, 0x007C, (s32) data->unk_44 + 0x7C);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, dlist); gSPDisplayList(gMainGfxPos++, dlist);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);

View File

@ -33,13 +33,13 @@ EffectInstance* sun_main(s32 shineFromRight, f32 offsetX, f32 offsetY, f32 offse
bp.unk_00 = 0; bp.unk_00 = 0;
bp.unk_14 = NULL; bp.unk_14 = NULL;
bp.effectID = EFFECT_SUN; bp.effectID = EFFECT_SUN;
effect = shim_create_effect_instance(&bp); effect = shim_create_effect_instance(&bp);
effect->numParts = numParts; effect->numParts = numParts;
data = effect->data.sun = shim_general_heap_malloc(sizeof(*data)); data = effect->data.sun = shim_general_heap_malloc(sizeof(*data));
ASSERT(data != NULL); ASSERT(data != NULL);
data->shineFromRight = shineFromRight; data->shineFromRight = shineFromRight;
data->lifeTime = 0; data->lifeTime = 0;
if (duration <= 0) { if (duration <= 0) {
@ -64,7 +64,7 @@ EffectInstance* sun_main(s32 shineFromRight, f32 offsetX, f32 offsetY, f32 offse
} }
data->targetAlpha = 255; data->targetAlpha = 255;
data->alpha = 0; data->alpha = 0;
return effect; return effect;
} }
@ -83,7 +83,7 @@ void sun_update(EffectInstance* effect) {
if (data->timeLeft < 1000) { if (data->timeLeft < 1000) {
data->timeLeft--; data->timeLeft--;
} }
data->lifeTime++; data->lifeTime++;
if (data->lifeTime > 90*60*60) { if (data->lifeTime > 90*60*60) {
data->lifeTime = 256; data->lifeTime = 256;
@ -92,7 +92,7 @@ void sun_update(EffectInstance* effect) {
shim_remove_effect(effect); shim_remove_effect(effect);
return; return;
} }
time = data->lifeTime; time = data->lifeTime;
if (data->timeLeft < 16) { if (data->timeLeft < 16) {
data->alpha -= 16; data->alpha -= 16;
@ -105,7 +105,7 @@ void sun_update(EffectInstance* effect) {
} else if (data->targetAlpha > 255) { } else if (data->targetAlpha > 255) {
data->targetAlpha = 255; data->targetAlpha = 255;
} }
if (data->alpha > data->targetAlpha) { if (data->alpha > data->targetAlpha) {
data->alpha -= 8; data->alpha -= 8;
if (data->alpha < data->targetAlpha) { if (data->alpha < data->targetAlpha) {
@ -154,21 +154,21 @@ void sun_appendGfx(void* argEffect) {
s32 offsetS; s32 offsetS;
s32 fromRight; s32 fromRight;
s32 i; s32 i;
data = effect->data.sun; data = effect->data.sun;
alpha = data->alpha; alpha = data->alpha;
fromRight = data->shineFromRight; fromRight = data->shineFromRight;
if (alpha != 0) { if (alpha != 0) {
gDPPipeSync(gMainGfxPos++); gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x9, VIRTUAL_TO_PHYSICAL(effect->graphics->data)); gSPSegment(gMainGfxPos++, 0x9, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
if (!fromRight) { if (!fromRight) {
shim_guOrthoF(mtx, -1600.0f, 1600.0f, -1200.0f, 1200.0f, -100.0f, 100.0f, 1.0f); shim_guOrthoF(mtx, -1600.0f, 1600.0f, -1200.0f, 1200.0f, -100.0f, 100.0f, 1.0f);
} else { } else {
shim_guOrthoF(mtx, 1600.0f, -1600.0f, -1200.0f, 1200.0f, -100.0f, 100.0f, 1.0f); shim_guOrthoF(mtx, 1600.0f, -1600.0f, -1200.0f, 1200.0f, -100.0f, 100.0f, 1.0f);
} }
shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]); shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
@ -176,7 +176,7 @@ void sun_appendGfx(void* argEffect) {
shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]); shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primColor.r, data->primColor.g, data->primColor.b, alpha >> 1); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primColor.r, data->primColor.g, data->primColor.b, alpha >> 1);
gDPSetEnvColor(gMainGfxPos++, data->envColor.r, data->envColor.g, data->envColor.b, data->envColor.a); gDPSetEnvColor(gMainGfxPos++, data->envColor.r, data->envColor.g, data->envColor.b, data->envColor.a);
gSPDisplayList(gMainGfxPos++, D_E0120794[0]); gSPDisplayList(gMainGfxPos++, D_E0120794[0]);

View File

@ -226,7 +226,7 @@ void water_block_appendGfx(void *effect) {
Vtx* var_fp; Vtx* var_fp;
s32 temp_s0; s32 temp_s0;
s32 i; s32 i;
gDPPipeSync(gMainGfxPos++); gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data)); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
shim_guTranslateF(sp20, data->pos.x, data->pos.y, data->pos.z); shim_guTranslateF(sp20, data->pos.x, data->pos.y, data->pos.z);
@ -239,7 +239,7 @@ void water_block_appendGfx(void *effect) {
gMainGfxPos = &gMainGfxPos[80]; gMainGfxPos = &gMainGfxPos[80];
temp_s0 = gGameStatusPtr->frameCounter * 4; temp_s0 = gGameStatusPtr->frameCounter * 4;
for (var_s6 = D_E00B4CF0, i = 0, var_fp = spA8; i < 40; i++, var_s6++, var_fp++) { for (var_s6 = D_E00B4CF0, i = 0, var_fp = spA8; i < 40; i++, var_s6++, var_fp++) {
f32 x = var_s6->unk_00 * 10; f32 x = var_s6->unk_00 * 10;
f32 y = var_s6->unk_01 * 10; f32 y = var_s6->unk_01 * 10;
@ -257,7 +257,7 @@ void water_block_appendGfx(void *effect) {
var_fp->v.ob[0] = x; var_fp->v.ob[0] = x;
var_fp->v.ob[1] = y; var_fp->v.ob[1] = y;
var_fp->v.ob[2] = z; var_fp->v.ob[2] = z;
var_fp->v.tc[0] = var_s6->unk_04; var_fp->v.tc[0] = var_s6->unk_04;
var_fp->v.tc[1] = var_s6->unk_06; var_fp->v.tc[1] = var_s6->unk_06;
@ -289,14 +289,14 @@ void water_block_appendGfx(void *effect) {
gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, spA4 * 0.3); gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, spA4 * 0.3);
gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH); gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH);
gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK); gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK);
gSPVertex(gMainGfxPos++, spA8, 30, 0); gSPVertex(gMainGfxPos++, spA8, 30, 0);
gSPDisplayList(gMainGfxPos++, D_090004D8_3B70C8); gSPDisplayList(gMainGfxPos++, D_090004D8_3B70C8);
gSPVertex(gMainGfxPos++, &spA8[28], 12, 0); gSPVertex(gMainGfxPos++, &spA8[28], 12, 0);
gSPDisplayList(gMainGfxPos++, D_09000538_3B7128) gSPDisplayList(gMainGfxPos++, D_09000538_3B7128)
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
} }

View File

@ -175,7 +175,7 @@ void water_splash_appendGfx(void* effect) {
s32 temp_fp = data->unk_04.y; s32 temp_fp = data->unk_04.y;
Camera* currentCamera = &gCameras[gCurrentCameraID]; Camera* currentCamera = &gCameras[gCurrentCameraID];
s32 i; s32 i;
gDPPipeSync(gMainGfxPos++); gDPPipeSync(gMainGfxPos++);
gSPSegment(gMainGfxPos++, 0x09, OS_K0_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPSegment(gMainGfxPos++, 0x09, OS_K0_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
shim_guTranslateF(sp10, sp94, temp_fp, data->unk_04.z); shim_guTranslateF(sp10, sp94, temp_fp, data->unk_04.z);
@ -185,7 +185,7 @@ void water_splash_appendGfx(void* effect) {
gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(gMainGfxPos++, currentCamera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPMatrix(gMainGfxPos++, currentCamera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMainGfxPos++, D_09000100_3BCB90); gSPDisplayList(gMainGfxPos++, D_09000100_3BCB90);
data++; data++;
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) { for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) {
s32 temp_t2 = (s32)data->unk_04.x + sp94; s32 temp_t2 = (s32)data->unk_04.x + sp94;
@ -196,17 +196,17 @@ void water_splash_appendGfx(void* effect) {
} else { } else {
temp_t2 = temp_t2 & 0x7F; temp_t2 = temp_t2 & 0x7F;
} }
if (temp_t3 > 0) { if (temp_t3 > 0) {
temp_t3 = -(temp_t3 & 0x3F); temp_t3 = -(temp_t3 & 0x3F);
} else { } else {
temp_t3 = temp_t3 & 0x3F; temp_t3 = temp_t3 & 0x3F;
} }
gDPLoadMultiTile(gMainGfxPos++, OS_K0_TO_PHYSICAL(nuGfxCfb_ptr), 0x100, 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0, gDPLoadMultiTile(gMainGfxPos++, OS_K0_TO_PHYSICAL(nuGfxCfb_ptr), 0x100, 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0,
temp_t2 + 0xA0, temp_t3 + 0x78, temp_t2 + 0xBF, temp_t3 + 0x97, 0, temp_t2 + 0xA0, temp_t3 + 0x78, temp_t2 + 0xBF, temp_t3 + 0x97, 0,
G_TX_WRAP, G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); G_TX_WRAP, G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);
shim_guTranslateF(sp10, data->unk_04.x, data->unk_04.y, data->unk_04.z); shim_guTranslateF(sp10, data->unk_04.x, data->unk_04.y, data->unk_04.z);
shim_guScaleF(sp50, data->unk_34, data->unk_34, data->unk_34); shim_guScaleF(sp50, data->unk_34, data->unk_34, data->unk_34);
shim_guMtxCatF(sp50, sp10, sp10); shim_guMtxCatF(sp50, sp10, sp10);

View File

@ -165,7 +165,7 @@ void whirlwind_appendGfx(void* effect) {
s32 i; s32 i;
EffectInstance* eff = (EffectInstance*)effect; EffectInstance* eff = (EffectInstance*)effect;
WhirlwindFXData* data = eff->data.whirlwind; WhirlwindFXData* data = eff->data.whirlwind;
spA0 = data->unk_10; spA0 = data->unk_10;
primAlpha = data->primAlpha >> 1; primAlpha = data->primAlpha >> 1;
spB8 = data->unk_34; spB8 = data->unk_34;
@ -206,7 +206,7 @@ void whirlwind_appendGfx(void* effect) {
// Reserve 0x88 bytes (17 commands, including this one) for a separate dynamically generated display list // Reserve 0x88 bytes (17 commands, including this one) for a separate dynamically generated display list
gSPBranchList(gMainGfxPos, &gMainGfxPos[17]); gSPBranchList(gMainGfxPos, &gMainGfxPos[17]);
// Get a reference to the dynamically generated display list // Get a reference to the dynamically generated display list
triangleDisplayList = ++gMainGfxPos; triangleDisplayList = ++gMainGfxPos;

View File

@ -999,7 +999,7 @@ void imgfx_appendGfx_mesh(ImgFXState* state, Matrix4f mtx) {
primAlpha = state->ints.hologram.alphaAmt * ifxImgAlpha; primAlpha = state->ints.hologram.alphaAmt * ifxImgAlpha;
// color: blend texure and noise // color: blend texure and noise
// alpha: texure * prim // alpha: texure * prim
gDPSetCombineMode(gMainGfxPos++, PM_CC_IMGFX_HOLOGRAM, PM_CC_IMGFX_HOLOGRAM); gDPSetCombineMode(gMainGfxPos++, PM_CC_IMGFX_HOLOGRAM, PM_CC_IMGFX_HOLOGRAM);
gDPSetPrimColor(gMainGfxPos++, 0, 0, gDPSetPrimColor(gMainGfxPos++, 0, 0,
state->ints.hologram.noiseAmt, state->ints.hologram.noiseAmt,
state->ints.hologram.noiseAmt, state->ints.hologram.noiseAmt,

View File

@ -17,7 +17,7 @@ u8 __osContAddressCrc(u16 addr) {
} else if (temp & 0x20) { } else if (temp & 0x20) {
temp ^= 0x15; temp ^= 0x15;
} }
i >>= 1; i >>= 1;
} }

View File

@ -10,8 +10,8 @@ s32 contRmbForceStopEndMesg(NUSiCommonMesg* mesg);
u32 nuContRmbSearchTime = 300; u32 nuContRmbSearchTime = 300;
s32 (*D_80093CE4[])(NUSiCommonMesg*) = { s32 (*D_80093CE4[])(NUSiCommonMesg*) = {
contRmbRetrace, contRmbCheckMesg, contRmbStartMesg, contRmbStopMesg, contRmbForceStopMesg, contRmbForceStopEndMesg, contRmbRetrace, contRmbCheckMesg, contRmbStartMesg, contRmbStopMesg, contRmbForceStopMesg, contRmbForceStopEndMesg,
NULL NULL
}; };

View File

@ -38,10 +38,10 @@ void __osViInit(void) {
} else { } else {
__osViNext->modep = &osViModeNtscLan1; __osViNext->modep = &osViModeNtscLan1;
} }
__osViNext->state = VI_STATE_BLACK; __osViNext->state = VI_STATE_BLACK;
__osViNext->control = __osViNext->modep->comRegs.ctrl; __osViNext->control = __osViNext->modep->comRegs.ctrl;
while (IO_READ(VI_CURRENT_REG) > 10) { //wait for vsync? while (IO_READ(VI_CURRENT_REG) > 10) { //wait for vsync?
} }

View File

@ -82,9 +82,9 @@ void _Ldtob(_Pft* px, char code) {
} }
} else if (xexp > 0) { } else if (xexp > 0) {
f64 factor = 1; f64 factor = 1;
xexp &= ~3; xexp &= ~3;
for (n = xexp, i = 0; n > 0; n >>= 1, i++) { for (n = xexp, i = 0; n > 0; n >>= 1, i++) {
if (n & 1) { if (n & 1) {
factor *= pows[i]; factor *= pows[i];
@ -95,15 +95,15 @@ void _Ldtob(_Pft* px, char code) {
} }
{ {
int gen = px->prec + ((code == 'f') ? 10 + xexp : 6); int gen = px->prec + ((code == 'f') ? 10 + xexp : 6);
if (gen > 0x13) { if (gen > 0x13) {
gen = 0x13; gen = 0x13;
} }
for (*p++ = '0'; gen > 0 && 0 < ldval; p += 8) { for (*p++ = '0'; gen > 0 && 0 < ldval; p += 8) {
int j; int j;
int lo = ldval; int lo = ldval;
if ((gen -= 8) > 0) { if ((gen -= 8) > 0) {
ldval = (ldval - lo) * 1e8; ldval = (ldval - lo) * 1e8;
} }
@ -112,7 +112,7 @@ void _Ldtob(_Pft* px, char code) {
ldiv_t qr = ldiv(lo, 10); ldiv_t qr = ldiv(lo, 10);
*--p = qr.rem + '0', lo = qr.quot; *--p = qr.rem + '0', lo = qr.quot;
} }
while (--j >= 0) { while (--j >= 0) {
*--p = '0'; *--p = '0';
} }
@ -125,7 +125,7 @@ void _Ldtob(_Pft* px, char code) {
} }
nsig = px->prec + ((code == 'f') ? xexp + 1 : ((code == 'e' || code == 'E') ? 1 : 0)); nsig = px->prec + ((code == 'f') ? xexp + 1 : ((code == 'e' || code == 'E') ? 1 : 0));
if (gen < nsig) { if (gen < nsig) {
nsig = gen; nsig = gen;
} }
@ -141,7 +141,7 @@ void _Ldtob(_Pft* px, char code) {
if (drop == '9') { if (drop == '9') {
++p[n]; ++p[n];
} }
if (n < 0) { if (n < 0) {
--p, ++nsig, ++xexp; --p, ++nsig, ++xexp;
} }

View File

@ -36,7 +36,7 @@ void _Litob(_Pft *args, char type) {
while (args->v.ll > 0 && i > 0) { while (args->v.ll > 0 && i > 0) {
lldiv_t qr = lldiv(args->v.ll, base); lldiv_t qr = lldiv(args->v.ll, base);
args->v.ll = qr.quot; args->v.ll = qr.quot;
buff[--i] = digs[qr.rem]; buff[--i] = digs[qr.rem];
} }
@ -51,7 +51,7 @@ void _Litob(_Pft *args, char type) {
if (args->prec < 0 && (args->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) { if (args->prec < 0 && (args->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) {
i = args->width - args->n0 - args->nz0 - args->n1; i = args->width - args->n0 - args->nz0 - args->n1;
if (i > 0) { if (i > 0) {
args->nz0 += i; args->nz0 += i;
} }

View File

@ -44,7 +44,7 @@ int _Printf(outfun prout, char *arg, const char *fmt, va_list args) {
static const char fchar[] = {' ', '+', '-', '#', '0', '\0'}; static const char fchar[] = {' ', '+', '-', '#', '0', '\0'};
static const int fbit[] = {FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0}; static const int fbit[] = {FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0};
char ac[32]; char ac[32];
x.nchar = 0; x.nchar = 0;
for (;;) { for (;;) {
@ -53,15 +53,15 @@ int _Printf(outfun prout, char *arg, const char *fmt, va_list args) {
for (c = *s; c != 0 && c != '%';) { for (c = *s; c != 0 && c != '%';) {
c = *++s; c = *++s;
} }
PUT(fmt, s - fmt); PUT(fmt, s - fmt);
if (c == 0) { if (c == 0) {
return x.nchar; return x.nchar;
} }
fmt = ++s; fmt = ++s;
for (x.flags = 0; (t = strchr(fchar, *s)) != NULL; s++) { for (x.flags = 0; (t = strchr(fchar, *s)) != NULL; s++) {
x.flags |= fbit[t - fchar]; x.flags |= fbit[t - fchar];
} }
@ -88,7 +88,7 @@ int _Printf(outfun prout, char *arg, const char *fmt, va_list args) {
} }
x.qual = strchr("hlL", *s) ? *s++ : '\0'; x.qual = strchr("hlL", *s) ? *s++ : '\0';
if (x.qual == 'l' && *s == 'l') { if (x.qual == 'l' && *s == 'l') {
x.qual = 'L'; x.qual = 'L';
++s; ++s;
@ -96,22 +96,22 @@ int _Printf(outfun prout, char *arg, const char *fmt, va_list args) {
_Putfld(&x, &args, *s, ac); _Putfld(&x, &args, *s, ac);
x.width -= x.n0 + x.nz0 + x.n1 + x.nz1 + x.n2 + x.nz2; x.width -= x.n0 + x.nz0 + x.n1 + x.nz1 + x.n2 + x.nz2;
if (!(x.flags & FLAGS_MINUS)) { if (!(x.flags & FLAGS_MINUS)) {
PAD(spaces, x.width); PAD(spaces, x.width);
} }
PUT(ac, x.n0); PUT(ac, x.n0);
PAD(zeroes, x.nz0); PAD(zeroes, x.nz0);
PUT(x.s, x.n1); PUT(x.s, x.n1);
PAD(zeroes, x.nz1); PAD(zeroes, x.nz1);
PUT(x.s + x.n1, x.n2); PUT(x.s + x.n1, x.n2);
PAD(zeroes, x.nz2); PAD(zeroes, x.nz2);
if (x.flags & FLAGS_MINUS) { if (x.flags & FLAGS_MINUS) {
PAD(spaces, x.width); PAD(spaces, x.width);
} }
fmt = s + 1; fmt = s + 1;
} }
return 0; return 0;
@ -219,11 +219,11 @@ static void _Putfld(_Pft *x, va_list *args, char type, char *buff) {
case 's': case 's':
x->s = va_arg(*args, char *); x->s = va_arg(*args, char *);
x->n1 = strlen(x->s); x->n1 = strlen(x->s);
if (x->prec >= 0 && x->n1 > x->prec) { if (x->prec >= 0 && x->n1 > x->prec) {
x->n1 = x->prec; x->n1 = x->prec;
} }
break; break;
case '%': case '%':
buff[x->n0++] = '%'; buff[x->n0++] = '%';

View File

@ -441,7 +441,7 @@ void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
break; break;
} }
} }
// get number of total power increments // get number of total power increments
powFullBars = playerData->maxStarPower; powFullBars = playerData->maxStarPower;
powIncrements = 8 * powFullBars; powIncrements = 8 * powFullBars;
@ -530,7 +530,7 @@ void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
hud_element_draw_next(powHudElemID); hud_element_draw_next(powHudElemID);
} }
powIncIdx++; powIncIdx++;
if (curIncrement >= powIncrements) { if (curIncrement >= powIncrements) {
break; break;
} }

View File

@ -8,7 +8,7 @@ BSS f32 D_802B6770_E27C80;
void action_update_ride(void) { void action_update_ride(void) {
PartnerStatus* partnerStatus = &gPartnerStatus; PartnerStatus* partnerStatus = &gPartnerStatus;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
playerStatus->flags &= ~(PS_FLAG_ACTION_STATE_CHANGED | PS_FLAG_ARMS_RAISED | PS_FLAG_AIRBORNE); playerStatus->flags &= ~(PS_FLAG_ACTION_STATE_CHANGED | PS_FLAG_ARMS_RAISED | PS_FLAG_AIRBORNE);
playerStatus->actionSubstate = 0; playerStatus->actionSubstate = 0;

View File

@ -6,7 +6,7 @@ FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o799);
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o800); FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o800);
FoliageDropList N(Tree1_Drops) = { FoliageDropList N(Tree1_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COIN, .itemID = ITEM_COIN,

View File

@ -227,4 +227,4 @@ CreditsEntry N(Credits_Jobs)[] = {
.perCharDelayOut = 0, .perCharDelayOut = 0,
.next = -1, .next = -1,
}, },
}; };

View File

@ -580,4 +580,4 @@ CreditsEntry N(Credits_Names)[] = {
.perCharDelayOut = 0, .perCharDelayOut = 0,
.next = -1, .next = -1,
}, },
}; };

View File

@ -6,7 +6,7 @@ FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o170);
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o157); FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o157);
FoliageDropList N(Tree1_Drops) = { FoliageDropList N(Tree1_Drops) = {
.count = 2, .count = 2,
.drops = { .drops = {
{ {
.itemID = ITEM_RED_BERRY, .itemID = ITEM_RED_BERRY,

View File

@ -6,7 +6,7 @@ FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o133);
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o132); FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o132);
FoliageDropList N(Tree1_Drops) = { FoliageDropList N(Tree1_Drops) = {
.count = 2, .count = 2,
.drops = { .drops = {
{ {
.itemID = ITEM_BLUE_BERRY, .itemID = ITEM_BLUE_BERRY,

View File

@ -3,7 +3,7 @@
#include "model.h" #include "model.h"
s32 N(WavePhase) = { s32 N(WavePhase) = {
0 0
}; };
// unused wavy distortion effect for edge water -- unclear how it would have been used // unused wavy distortion effect for edge water -- unclear how it would have been used

View File

@ -6,7 +6,7 @@ FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o47, MODEL_o48,
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o88); FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o88);
FoliageDropList N(Tree1_Drops) = { FoliageDropList N(Tree1_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_JAMMIN_JELLY, .itemID = ITEM_JAMMIN_JELLY,

View File

@ -16,7 +16,7 @@ EvtScript N(EVS_SetupMusic) = {
EVT_END EVT_END
}; };
EvtScript N(EVS_PushFlowerSong) = { EvtScript N(EVS_PushFlowerSong) = {
EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 3) EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 3)
EVT_RETURN EVT_RETURN
EVT_END EVT_END

View File

@ -1,14 +1,14 @@
#include "flo_21.h" #include "flo_21.h"
s32 N(UnusedScaleVectors)[] = { s32 N(UnusedScaleVectors)[] = {
EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0),
EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0),
EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0),
EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1),
EVT_FLOAT(1.1), EVT_FLOAT(1.1),
EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1),
EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.1), EVT_FLOAT(1.1),
EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0),
EVT_FLOAT(1.0), EVT_FLOAT(1.0),
EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0),
EVT_FLOAT(0.9), EVT_FLOAT(0.9), EVT_FLOAT(0.9), EVT_FLOAT(0.9),
EVT_FLOAT(0.9), EVT_FLOAT(0.9), EVT_FLOAT(0.9), EVT_FLOAT(0.9),

View File

@ -6,7 +6,7 @@ FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o125, MODEL_o12
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o124); FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o124);
FoliageDropList N(Tree1_Drops) = { FoliageDropList N(Tree1_Drops) = {
.count = 2, .count = 2,
.drops = { .drops = {
{ {
.itemID = ITEM_BUBBLE_BERRY, .itemID = ITEM_BUBBLE_BERRY,

View File

@ -6,7 +6,7 @@ FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o43, MODEL_o44,
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o42); FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o42);
FoliageDropList N(Tree1_Drops) = { FoliageDropList N(Tree1_Drops) = {
.count = 2, .count = 2,
.drops = { .drops = {
{ {
.itemID = ITEM_YELLOW_BERRY, .itemID = ITEM_YELLOW_BERRY,

View File

@ -20,7 +20,7 @@ enum {
AB_HOS_Unused_F = AreaByte(15), AB_HOS_Unused_F = AreaByte(15),
}; };
enum { enum {
AF_HOS06_BadgeHints = AreaFlag(3), AF_HOS06_BadgeHints = AreaFlag(3),
AF_HOS06_SuperBlocksHints = AreaFlag(100), AF_HOS06_SuperBlocksHints = AreaFlag(100),
AF_HOS06_StarPieceHints = AreaFlag(116), AF_HOS06_StarPieceHints = AreaFlag(116),

View File

@ -34,7 +34,7 @@ s32 N(ChestItems)[] = {
ITEM_SHOOTING_STAR, ITEM_SHOOTING_STAR,
ITEM_DEEP_FOCUS1, ITEM_DEEP_FOCUS1,
ITEM_LAST_STAND, ITEM_LAST_STAND,
ITEM_JAMMIN_JELLY, ITEM_JAMMIN_JELLY,
}; };
// end modified Chest.inc.c // end modified Chest.inc.c

View File

@ -23,7 +23,7 @@ API_CALLABLE(N(IsLastEnemy)) {
} }
} }
} }
if (livingEncounters != 1) { if (livingEncounters != 1) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} else { } else {

View File

@ -24,13 +24,13 @@ void N(func_80241610_990DF0)(void) {
ImgFXTexture ifxImg; ImgFXTexture ifxImg;
SpriteRasterInfo spriteRaster; SpriteRasterInfo spriteRaster;
Matrix4f transformMtx, tempMtx; Matrix4f transformMtx, tempMtx;
gSPViewport(gMainGfxPos++, &cam->vp); gSPViewport(gMainGfxPos++, &cam->vp);
if (!(cam->flags & CAMERA_FLAG_ORTHO)) { if (!(cam->flags & CAMERA_FLAG_ORTHO)) {
gSPPerspNormalize(gMainGfxPos++, cam->perspNorm); gSPPerspNormalize(gMainGfxPos++, cam->perspNorm);
} }
guMtxF2L(cam->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCameraID]); guMtxF2L(cam->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCameraID]);
gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID],
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gDPPipeSync(gMainGfxPos++); gDPPipeSync(gMainGfxPos++);
@ -47,7 +47,7 @@ void N(func_80241610_990DF0)(void) {
gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT); gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT);
gDPSetCombineKey(gMainGfxPos++, G_CK_NONE); gDPSetCombineKey(gMainGfxPos++, G_CK_NONE);
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
guTranslateF(transformMtx, ambush->pos.x, ambush->pos.y, ambush->pos.z); guTranslateF(transformMtx, ambush->pos.x, ambush->pos.y, ambush->pos.z);
guRotateF(tempMtx, ambush->rot.y + gCameras[gCurrentCameraID].currentYaw + ambush->renderYaw, 0.0f, 1.0f, 0.0f); guRotateF(tempMtx, ambush->rot.y + gCameras[gCurrentCameraID].currentYaw + ambush->renderYaw, 0.0f, 1.0f, 0.0f);
guMtxCatF(tempMtx, transformMtx, transformMtx); guMtxCatF(tempMtx, transformMtx, transformMtx);
@ -60,7 +60,7 @@ void N(func_80241610_990DF0)(void) {
guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]); guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, OS_PHYSICAL_TO_K0(&gDisplayContext->matrixStack[gMatrixListPos++]), gSPMatrix(gMainGfxPos++, OS_PHYSICAL_TO_K0(&gDisplayContext->matrixStack[gMatrixListPos++]),
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (ambush->useBitingAnim) { if (ambush->useBitingAnim) {
if ((gGameStatusPtr->frameCounter % 10) < 5) { if ((gGameStatusPtr->frameCounter % 10) < 5) {
ambush->rasterIndex = 0; ambush->rasterIndex = 0;
@ -76,7 +76,7 @@ void N(func_80241610_990DF0)(void) {
ifxImg.xOffset = -(spriteRaster.width / 2); ifxImg.xOffset = -(spriteRaster.width / 2);
ifxImg.yOffset = (spriteRaster.height / 2); ifxImg.yOffset = (spriteRaster.height / 2);
ifxImg.alpha = 255; ifxImg.alpha = 255;
imgfx_update(ambush->imgfxIdx, IMGFX_SET_TINT, ambush->color.r, ambush->color.g, ambush->color.b, ambush->color.a, 0); imgfx_update(ambush->imgfxIdx, IMGFX_SET_TINT, ambush->color.r, ambush->color.g, ambush->color.b, ambush->color.a, 0);
imgfx_appendGfx_component(ambush->imgfxIdx, &ifxImg, 0, transformMtx); imgfx_appendGfx_component(ambush->imgfxIdx, &ifxImg, 0, transformMtx);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
@ -86,7 +86,7 @@ API_CALLABLE(N(func_80241BA8_991388)) {
StoneChompAmbushIsk13* ambush; StoneChompAmbushIsk13* ambush;
SpriteRasterInfo rasterInfo; SpriteRasterInfo rasterInfo;
Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID);
ambush = heap_malloc(sizeof(*ambush)); ambush = heap_malloc(sizeof(*ambush));
ambush->useBitingAnim = FALSE; ambush->useBitingAnim = FALSE;
ambush->spriteIndex = SPR_StoneChomp; ambush->spriteIndex = SPR_StoneChomp;
@ -110,7 +110,7 @@ API_CALLABLE(N(func_80241BA8_991388)) {
ambush->color.b = 255.0f; ambush->color.b = 255.0f;
ambush->color.a = 0.0f; ambush->color.a = 0.0f;
ambush->imgfxIdx = 0; ambush->imgfxIdx = 0;
ambush->workerID = create_worker_frontUI(NULL, N(func_80241610_990DF0)); ambush->workerID = create_worker_frontUI(NULL, N(func_80241610_990DF0));
evt_set_variable(script, MV_AmbushPtr, (s32) ambush); evt_set_variable(script, MV_AmbushPtr, (s32) ambush);
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -128,7 +128,7 @@ API_CALLABLE(N(func_80241D38_991518)) {
s32 y = evt_get_float_variable(script, *args++); s32 y = evt_get_float_variable(script, *args++);
s32 z = evt_get_float_variable(script, *args++); s32 z = evt_get_float_variable(script, *args++);
StoneChompAmbushIsk13* ambush = (StoneChompAmbushIsk13*) evt_get_variable(script, MV_AmbushPtr); StoneChompAmbushIsk13* ambush = (StoneChompAmbushIsk13*) evt_get_variable(script, MV_AmbushPtr);
ambush->pos.x = x; ambush->pos.x = x;
ambush->pos.y = y + ambush->height * SPRITE_WORLD_SCALE_D * 0.5; ambush->pos.y = y + ambush->height * SPRITE_WORLD_SCALE_D * 0.5;
ambush->pos.z = z; ambush->pos.z = z;
@ -141,7 +141,7 @@ API_CALLABLE(N(func_80241E34_991614)) {
s32 y = evt_get_float_variable(script, *args++); s32 y = evt_get_float_variable(script, *args++);
s32 z = evt_get_float_variable(script, *args++); s32 z = evt_get_float_variable(script, *args++);
StoneChompAmbushIsk13* ambush = (StoneChompAmbushIsk13*) evt_get_variable(script, MV_AmbushPtr); StoneChompAmbushIsk13* ambush = (StoneChompAmbushIsk13*) evt_get_variable(script, MV_AmbushPtr);
ambush->rot.x = x; ambush->rot.x = x;
ambush->rot.y = y; ambush->rot.y = y;
ambush->rot.z = z; ambush->rot.z = z;
@ -155,7 +155,7 @@ API_CALLABLE(N(func_80241EF8_9916D8)) {
f32 g = evt_get_float_variable(script, *args++); f32 g = evt_get_float_variable(script, *args++);
f32 b = evt_get_float_variable(script, *args++); f32 b = evt_get_float_variable(script, *args++);
f32 a = evt_get_float_variable(script, *args++); f32 a = evt_get_float_variable(script, *args++);
if (r < 0.0f) { if (r < 0.0f) {
r = 0.0f; r = 0.0f;
} }

View File

@ -47,7 +47,7 @@ void N(func_80241610_993D40)(void) {
gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT); gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT);
gDPSetCombineKey(gMainGfxPos++, G_CK_NONE); gDPSetCombineKey(gMainGfxPos++, G_CK_NONE);
gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
guTranslateF(transformMtx, ambush->pos.x, ambush->pos.y, ambush->pos.z); guTranslateF(transformMtx, ambush->pos.x, ambush->pos.y, ambush->pos.z);
guRotateF(tempMtx, ambush->rot.y + gCameras[gCurrentCameraID].currentYaw + ambush->renderYaw, 0.0f, 1.0f, 0.0f); guRotateF(tempMtx, ambush->rot.y + gCameras[gCurrentCameraID].currentYaw + ambush->renderYaw, 0.0f, 1.0f, 0.0f);
guMtxCatF(tempMtx, transformMtx, transformMtx); guMtxCatF(tempMtx, transformMtx, transformMtx);
@ -60,7 +60,7 @@ void N(func_80241610_993D40)(void) {
guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]); guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMainGfxPos++, OS_PHYSICAL_TO_K0(&gDisplayContext->matrixStack[gMatrixListPos++]), gSPMatrix(gMainGfxPos++, OS_PHYSICAL_TO_K0(&gDisplayContext->matrixStack[gMatrixListPos++]),
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
spr_get_npc_raster_info(&spriteRaster, ambush->spriteIndex, ambush->rasterIndex); spr_get_npc_raster_info(&spriteRaster, ambush->spriteIndex, ambush->rasterIndex);
ifxImg.raster = spriteRaster.raster; ifxImg.raster = spriteRaster.raster;
ifxImg.palette = spriteRaster.defaultPal; ifxImg.palette = spriteRaster.defaultPal;
@ -69,7 +69,7 @@ void N(func_80241610_993D40)(void) {
ifxImg.xOffset = -(spriteRaster.width / 2); ifxImg.xOffset = -(spriteRaster.width / 2);
ifxImg.yOffset = spriteRaster.height; ifxImg.yOffset = spriteRaster.height;
ifxImg.alpha = 255; ifxImg.alpha = 255;
imgfx_appendGfx_component(ambush->imgfxIdx, &ifxImg, 0, transformMtx); imgfx_appendGfx_component(ambush->imgfxIdx, &ifxImg, 0, transformMtx);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
} }
@ -78,7 +78,7 @@ API_CALLABLE(N(func_80241AF0_994220)) {
StoneChompAmbushIsk14* ambush = &N(ChompAmbush); StoneChompAmbushIsk14* ambush = &N(ChompAmbush);
SpriteRasterInfo rasterInfo; SpriteRasterInfo rasterInfo;
Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID); Npc* npc = get_npc_unsafe(script->owner1.enemy->npcID);
ambush->spriteIndex = SPR_StoneChomp; ambush->spriteIndex = SPR_StoneChomp;
ambush->rasterIndex = 0; ambush->rasterIndex = 0;
spr_get_npc_raster_info(&rasterInfo, ambush->spriteIndex, ambush->rasterIndex); spr_get_npc_raster_info(&rasterInfo, ambush->spriteIndex, ambush->rasterIndex);

View File

@ -7,7 +7,7 @@ MAP_RODATA_PAD(1,entity);
API_CALLABLE(N(MonitorPlayerAltitude)) { API_CALLABLE(N(MonitorPlayerAltitude)) {
s32 result = -1; s32 result = -1;
if (gPlayerStatus.lastGoodPosition.y > 200.0) { if (gPlayerStatus.lastGoodPosition.y > 200.0) {
result = 0; result = 0;
} }

View File

@ -3,7 +3,7 @@
API_CALLABLE(N(MonitorPlayerAltitude)) { API_CALLABLE(N(MonitorPlayerAltitude)) {
s32 status = -1; s32 status = -1;
if (gPlayerStatus.lastGoodPosition.y > -100.0) { if (gPlayerStatus.lastGoodPosition.y > -100.0) {
status = 0; status = 0;
} }
@ -13,7 +13,7 @@ API_CALLABLE(N(MonitorPlayerAltitude)) {
if (status >= 0) { if (status >= 0) {
evt_set_variable(script, MV_PlayerCliffLevel, status); evt_set_variable(script, MV_PlayerCliffLevel, status);
} }
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }

View File

@ -5,7 +5,7 @@
FoliageModelList N(Bush1_BushModels) = FOLIAGE_MODEL_LIST(MODEL_k4); FoliageModelList N(Bush1_BushModels) = FOLIAGE_MODEL_LIST(MODEL_k4);
FoliageDropList N(Bush1_Drops) = { FoliageDropList N(Bush1_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COIN, .itemID = ITEM_COIN,
@ -33,7 +33,7 @@ SearchBushConfig N(SearchBush_Bush1) = {
FoliageModelList N(Bush2_BushModels) = FOLIAGE_MODEL_LIST(MODEL_k5); FoliageModelList N(Bush2_BushModels) = FOLIAGE_MODEL_LIST(MODEL_k5);
FoliageDropList N(Bush2_Drops) = { FoliageDropList N(Bush2_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COIN, .itemID = ITEM_COIN,
@ -61,7 +61,7 @@ SearchBushConfig N(SearchBush_Bush2) = {
FoliageModelList N(Bush3_BushModels) = FOLIAGE_MODEL_LIST(MODEL_k6); FoliageModelList N(Bush3_BushModels) = FOLIAGE_MODEL_LIST(MODEL_k6);
FoliageDropList N(Bush3_Drops) = { FoliageDropList N(Bush3_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COIN, .itemID = ITEM_COIN,
@ -89,7 +89,7 @@ SearchBushConfig N(SearchBush_Bush3) = {
FoliageModelList N(Bush4_BushModels) = FOLIAGE_MODEL_LIST(MODEL_k7); FoliageModelList N(Bush4_BushModels) = FOLIAGE_MODEL_LIST(MODEL_k7);
FoliageDropList N(Bush4_Drops) = { FoliageDropList N(Bush4_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_EGG, .itemID = ITEM_EGG,

View File

@ -8,7 +8,7 @@ s32 N(TrackSections)[NUM_SECTIONS] = {
MODEL_field_c, MODEL_field_c,
MODEL_field_d, MODEL_field_d,
MODEL_field_e, MODEL_field_e,
MODEL_field_f, MODEL_field_f,
}; };
s32 N(SectionOffsets)[][NUM_SECTIONS + 1] = { s32 N(SectionOffsets)[][NUM_SECTIONS + 1] = {
@ -31,18 +31,18 @@ s32 N(SectionOffsets)[][NUM_SECTIONS + 1] = {
API_CALLABLE(N(GetSectionPosOffsets)) { API_CALLABLE(N(GetSectionPosOffsets)) {
s32 value = script->varTable[0]; s32 value = script->varTable[0];
s32 index, i; s32 index, i;
for (i = 0; i < ARRAY_COUNT(N(SectionOffsets)); i++) { for (i = 0; i < ARRAY_COUNT(N(SectionOffsets)); i++) {
if (value < N(SectionOffsets)[i][0]) { if (value < N(SectionOffsets)[i][0]) {
break; break;
} }
} }
index = i - 1; index = i - 1;
for (i = 0; i < NUM_SECTIONS; i++) { for (i = 0; i < NUM_SECTIONS; i++) {
script->varTable[i + 5] = N(SectionOffsets)[index][i + 1]; script->varTable[i + 5] = N(SectionOffsets)[index][i + 1];
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -7,7 +7,7 @@ FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o241, MODEL_o24
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o240); FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o240);
FoliageDropList N(Tree1_Drops) = { FoliageDropList N(Tree1_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,

View File

@ -19,7 +19,7 @@ FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o85, MODEL_o86)
FoliageModelList N(Tree2_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o84); FoliageModelList N(Tree2_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o84);
FoliageDropList N(Tree2_Drops) = { FoliageDropList N(Tree2_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,
@ -45,7 +45,7 @@ FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o79, MODEL_o80)
FoliageModelList N(Tree3_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o78); FoliageModelList N(Tree3_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o78);
FoliageDropList N(Tree3_Drops) = { FoliageDropList N(Tree3_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,
@ -71,7 +71,7 @@ FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o82, MODEL_o83)
FoliageModelList N(Tree4_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o81); FoliageModelList N(Tree4_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o81);
FoliageDropList N(Tree4_Drops) = { FoliageDropList N(Tree4_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,
@ -97,7 +97,7 @@ FoliageModelList N(Tree5_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o88, MODEL_o89)
FoliageModelList N(Tree5_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o87); FoliageModelList N(Tree5_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o87);
FoliageDropList N(Tree5_Drops) = { FoliageDropList N(Tree5_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,
@ -123,7 +123,7 @@ FoliageModelList N(Tree6_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o104, MODEL_o10
FoliageModelList N(Tree6_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o103); FoliageModelList N(Tree6_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o103);
FoliageDropList N(Tree6_Drops) = { FoliageDropList N(Tree6_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,
@ -149,7 +149,7 @@ FoliageModelList N(Tree7_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o113, MODEL_o11
FoliageModelList N(Tree7_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o112); FoliageModelList N(Tree7_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o112);
FoliageDropList N(Tree7_DropsA) = { FoliageDropList N(Tree7_DropsA) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_STAR_PIECE, .itemID = ITEM_STAR_PIECE,
@ -162,7 +162,7 @@ FoliageDropList N(Tree7_DropsA) = {
}; };
FoliageDropList N(Tree7_DropsB) = { FoliageDropList N(Tree7_DropsB) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,

View File

@ -19,7 +19,7 @@ FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o260, MODEL_o26
FoliageModelList N(Tree2_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o259); FoliageModelList N(Tree2_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o259);
FoliageDropList N(Tree2_Drops) = { FoliageDropList N(Tree2_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,
@ -46,7 +46,7 @@ FoliageModelList N(Tree3_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o280);
FoliageDropList N(Tree3_Drops) = { FoliageDropList N(Tree3_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,

View File

@ -31,7 +31,7 @@ MAP_STATIC_PAD(1,key_item);
s32 N(RedYoshiKidLetters)[] = { s32 N(RedYoshiKidLetters)[] = {
ITEM_LETTER_CHAIN_YOSHI_KID, ITEM_LETTER_CHAIN_YOSHI_KID,
ITEM_NONE ITEM_NONE
}; };
EvtScript N(EVS_LetterPrompt_RedYoshiKid) = { EvtScript N(EVS_LetterPrompt_RedYoshiKid) = {
@ -47,7 +47,7 @@ EvtScript N(EVS_LetterPrompt_RedYoshiKid) = {
s32 N(KoloradoLetters)[] = { s32 N(KoloradoLetters)[] = {
ITEM_LETTER_TO_KOLORADO, ITEM_LETTER_TO_KOLORADO,
ITEM_NONE ITEM_NONE
}; };
EvtScript N(EVS_LetterPrompt_Kolorado) = { EvtScript N(EVS_LetterPrompt_Kolorado) = {
@ -620,7 +620,7 @@ EvtScript N(EVS_NpcInit_Raven) = {
s32 N(VolcanoVaseList)[] = { s32 N(VolcanoVaseList)[] = {
ITEM_VOLCANO_VASE, ITEM_VOLCANO_VASE,
-1 -1
}; };
EvtScript N(EVS_NpcInteract_Kolorado) = { EvtScript N(EVS_NpcInteract_Kolorado) = {

View File

@ -6,7 +6,7 @@ FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o351, MODEL_o35
FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o350); FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o350);
FoliageDropList N(Tree1_Drops) = { FoliageDropList N(Tree1_Drops) = {
.count = 1, .count = 1,
.drops = { .drops = {
{ {
.itemID = ITEM_COCONUT, .itemID = ITEM_COCONUT,

Some files were not shown because too many files have changed in this diff Show More