mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
format
This commit is contained in:
parent
2cbb8e5712
commit
8a2bb470a9
@ -792,7 +792,7 @@ typedef struct EffectBlueprint {
|
||||
/* 0x08 */ void (*init)(EffectInstance* effectInst);
|
||||
/* 0x0C */ void (*update)(EffectInstance* effectInst);
|
||||
/* 0x10 */ void (*renderWorld)(EffectInstance* effectInst);
|
||||
/* 0x14 */ void (*unk_14)(EffectInstance* effectInst);
|
||||
/* 0x14 */ void (*unk_14)(EffectInstance* effectInst);
|
||||
} EffectBlueprint; // size = 0x18
|
||||
|
||||
typedef struct Effect {
|
||||
@ -802,7 +802,7 @@ typedef struct Effect {
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
/* 0x10 */ void (*update)(EffectInstance* effectInst);
|
||||
/* 0x14 */ void (*renderWorld)(EffectInstance* effectInst);
|
||||
/* 0x18 */ void (*unk_18)(EffectInstance* effectInst);
|
||||
/* 0x18 */ void (*unk_18)(EffectInstance* effectInst);
|
||||
/* 0x1C */ void* unk_1C;
|
||||
} Effect; // size = 0x20
|
||||
|
||||
@ -1652,9 +1652,10 @@ typedef struct struct802E1400 {
|
||||
/* 0x034 */ struct802E2BA4* unk_34;
|
||||
/* 0x038 */ f32 unk_38;
|
||||
/* 0x03C */ union {
|
||||
/* */ s16 s;
|
||||
/* */ s8 b[2];
|
||||
/* */ } unk_3C;
|
||||
/* */ s16 s;
|
||||
/* */ s8 b[2];
|
||||
/* */
|
||||
} unk_3C;
|
||||
/* 0x03E */ char unk_3E[0x4D];
|
||||
/* 0x08B */ u8 unk_8B[24];
|
||||
/* 0x0A3 */ char unk_A3; // padding?
|
||||
|
@ -31,7 +31,7 @@ typedef struct MapConfig {
|
||||
} tattle;
|
||||
} MapConfig; // size = 0x40
|
||||
|
||||
typedef s32 (*MapInit)(void);
|
||||
typedef s32(*MapInit)(void);
|
||||
|
||||
#define MAP_ID_MAX_LEN 7 ///< "xxx_yyy" excluding null terminator.
|
||||
typedef struct Map {
|
||||
|
@ -65,9 +65,9 @@
|
||||
#ifndef __GNUC_VA_LIST
|
||||
#define __GNUC_VA_LIST
|
||||
#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__)
|
||||
typedef char *__gnuc_va_list;
|
||||
typedef char* __gnuc_va_list;
|
||||
#else
|
||||
typedef void *__gnuc_va_list;
|
||||
typedef void* __gnuc_va_list;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -86,28 +86,28 @@ typedef void *__gnuc_va_list;
|
||||
(((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
|
||||
#endif
|
||||
|
||||
#define va_start(AP, LASTARG) \
|
||||
#define va_start(AP, LASTARG) \
|
||||
(AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG)))
|
||||
|
||||
#undef va_end
|
||||
void va_end (__gnuc_va_list); /* Defined in libgcc.a */
|
||||
#define va_end(AP) ((void)0)
|
||||
void va_end(__gnuc_va_list); /* Defined in libgcc.a */
|
||||
#define va_end(AP) ((void)0)
|
||||
|
||||
/* We cast to void * and then to TYPE * because this avoids
|
||||
a warning about increasing the alignment requirement. */
|
||||
|
||||
#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__)
|
||||
/* This is for little-endian machines; small args are padded upward. */
|
||||
#define va_arg(AP, TYPE) \
|
||||
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
|
||||
#define va_arg(AP, TYPE) \
|
||||
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
|
||||
*((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE))))
|
||||
#else /* big-endian */
|
||||
/* This is for big-endian machines; small args are padded downward. */
|
||||
#define va_arg(AP, TYPE) \
|
||||
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
|
||||
*((TYPE *) (void *) ((char *) (AP) \
|
||||
- ((sizeof (TYPE) < __va_rounded_size (char) \
|
||||
? sizeof (TYPE) : __va_rounded_size (TYPE))))))
|
||||
#define va_arg(AP, TYPE) \
|
||||
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
|
||||
*((TYPE *) (void *) ((char *) (AP) \
|
||||
- ((sizeof (TYPE) < __va_rounded_size (char) \
|
||||
? sizeof (TYPE) : __va_rounded_size (TYPE))))))
|
||||
#endif /* big-endian */
|
||||
|
||||
/* Copy __gnuc_va_list into another variable of this type. */
|
||||
@ -136,7 +136,7 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
|
||||
/* Define va_list, if desired, from __gnuc_va_list. */
|
||||
/* We deliberately do not define va_list when called from
|
||||
stdio.h, because ANSI C says that stdio.h is not supposed to define
|
||||
va_list. stdio.h needs to have access to that data type,
|
||||
va_list. stdio.h needs to have access to that data type,
|
||||
but must not use that name. It should use the name __gnuc_va_list,
|
||||
which is safe because it is reserved for the implementation. */
|
||||
|
||||
|
@ -16,17 +16,17 @@
|
||||
#if defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float)
|
||||
|
||||
typedef struct {
|
||||
/* Pointer to FP regs. */
|
||||
char *__fp_regs;
|
||||
/* Number of FP regs remaining. */
|
||||
int __fp_left;
|
||||
/* Pointer to GP regs followed by stack parameters. */
|
||||
char *__gp_regs;
|
||||
/* Pointer to FP regs. */
|
||||
char* __fp_regs;
|
||||
/* Number of FP regs remaining. */
|
||||
int __fp_left;
|
||||
/* Pointer to GP regs followed by stack parameters. */
|
||||
char* __gp_regs;
|
||||
} __gnuc_va_list;
|
||||
|
||||
#else /* ! (defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float)) */
|
||||
|
||||
typedef char * __gnuc_va_list;
|
||||
typedef char* __gnuc_va_list;
|
||||
|
||||
#endif /* ! (defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float)) */
|
||||
#endif /* not __GNUC_VA_LIST */
|
||||
@ -38,26 +38,26 @@ typedef char * __gnuc_va_list;
|
||||
#ifndef _VA_MIPS_H_ENUM
|
||||
#define _VA_MIPS_H_ENUM
|
||||
enum {
|
||||
__no_type_class = -1,
|
||||
__void_type_class,
|
||||
__integer_type_class,
|
||||
__char_type_class,
|
||||
__enumeral_type_class,
|
||||
__boolean_type_class,
|
||||
__pointer_type_class,
|
||||
__reference_type_class,
|
||||
__offset_type_class,
|
||||
__real_type_class,
|
||||
__complex_type_class,
|
||||
__function_type_class,
|
||||
__method_type_class,
|
||||
__record_type_class,
|
||||
__union_type_class,
|
||||
__array_type_class,
|
||||
__string_type_class,
|
||||
__set_type_class,
|
||||
__file_type_class,
|
||||
__lang_type_class
|
||||
__no_type_class = -1,
|
||||
__void_type_class,
|
||||
__integer_type_class,
|
||||
__char_type_class,
|
||||
__enumeral_type_class,
|
||||
__boolean_type_class,
|
||||
__pointer_type_class,
|
||||
__reference_type_class,
|
||||
__offset_type_class,
|
||||
__real_type_class,
|
||||
__complex_type_class,
|
||||
__function_type_class,
|
||||
__method_type_class,
|
||||
__record_type_class,
|
||||
__union_type_class,
|
||||
__array_type_class,
|
||||
__string_type_class,
|
||||
__set_type_class,
|
||||
__file_type_class,
|
||||
__lang_type_class
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -93,28 +93,28 @@ enum {
|
||||
#if defined (__mips_eabi)
|
||||
#if ! defined (__mips_soft_float) && ! defined (__mips_single_float)
|
||||
#ifdef __mips64
|
||||
#define va_start(__AP, __LASTARG) \
|
||||
(__AP.__gp_regs = ((char *) __builtin_next_arg (__LASTARG) \
|
||||
- (__builtin_args_info (2) < 8 \
|
||||
? (8 - __builtin_args_info (2)) * __va_reg_size \
|
||||
: 0)), \
|
||||
__AP.__fp_left = 8 - __builtin_args_info (3), \
|
||||
#define va_start(__AP, __LASTARG) \
|
||||
(__AP.__gp_regs = ((char *) __builtin_next_arg (__LASTARG) \
|
||||
- (__builtin_args_info (2) < 8 \
|
||||
? (8 - __builtin_args_info (2)) * __va_reg_size \
|
||||
: 0)), \
|
||||
__AP.__fp_left = 8 - __builtin_args_info (3), \
|
||||
__AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * __va_reg_size)
|
||||
#else /* ! defined (__mips64) */
|
||||
#define va_start(__AP, __LASTARG) \
|
||||
(__AP.__gp_regs = ((char *) __builtin_next_arg (__LASTARG) \
|
||||
- (__builtin_args_info (2) < 8 \
|
||||
? (8 - __builtin_args_info (2)) * __va_reg_size \
|
||||
: 0)), \
|
||||
__AP.__fp_left = (8 - __builtin_args_info (3)) / 2, \
|
||||
__AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * 8, \
|
||||
#define va_start(__AP, __LASTARG) \
|
||||
(__AP.__gp_regs = ((char *) __builtin_next_arg (__LASTARG) \
|
||||
- (__builtin_args_info (2) < 8 \
|
||||
? (8 - __builtin_args_info (2)) * __va_reg_size \
|
||||
: 0)), \
|
||||
__AP.__fp_left = (8 - __builtin_args_info (3)) / 2, \
|
||||
__AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * 8, \
|
||||
__AP.__fp_regs = (char *) ((int) __AP.__fp_regs & -8))
|
||||
#endif /* ! defined (__mips64) */
|
||||
#else /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float) ) */
|
||||
#define va_start(__AP, __LASTARG) \
|
||||
(__AP = ((__gnuc_va_list) __builtin_next_arg (__LASTARG) \
|
||||
- (__builtin_args_info (2) >= 8 ? 0 \
|
||||
: (8 - __builtin_args_info (2)) * __va_reg_size)))
|
||||
#define va_start(__AP, __LASTARG) \
|
||||
(__AP = ((__gnuc_va_list) __builtin_next_arg (__LASTARG) \
|
||||
- (__builtin_args_info (2) >= 8 ? 0 \
|
||||
: (8 - __builtin_args_info (2)) * __va_reg_size)))
|
||||
#endif /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float) ) */
|
||||
#else /* ! defined (__mips_eabi) */
|
||||
#define va_start(__AP, __LASTARG) \
|
||||
@ -131,33 +131,33 @@ enum {
|
||||
#if defined (__mips_eabi)
|
||||
#if ! defined (__mips_soft_float) && ! defined (__mips_single_float)
|
||||
#ifdef __mips64
|
||||
#define va_start(__AP) \
|
||||
(__AP.__gp_regs = ((char *) __builtin_next_arg () \
|
||||
- (__builtin_args_info (2) < 8 \
|
||||
? (8 - __builtin_args_info (2)) * __va_reg_size \
|
||||
: __va_reg_size)), \
|
||||
__AP.__fp_left = 8 - __builtin_args_info (3), \
|
||||
#define va_start(__AP) \
|
||||
(__AP.__gp_regs = ((char *) __builtin_next_arg () \
|
||||
- (__builtin_args_info (2) < 8 \
|
||||
? (8 - __builtin_args_info (2)) * __va_reg_size \
|
||||
: __va_reg_size)), \
|
||||
__AP.__fp_left = 8 - __builtin_args_info (3), \
|
||||
__AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * __va_reg_size)
|
||||
#else /* ! defined (__mips64) */
|
||||
#define va_start(__AP) \
|
||||
(__AP.__gp_regs = ((char *) __builtin_next_arg () \
|
||||
- (__builtin_args_info (2) < 8 \
|
||||
? (8 - __builtin_args_info (2)) * __va_reg_size \
|
||||
: __va_reg_size)), \
|
||||
__AP.__fp_left = (8 - __builtin_args_info (3)) / 2, \
|
||||
__AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * 8, \
|
||||
#define va_start(__AP) \
|
||||
(__AP.__gp_regs = ((char *) __builtin_next_arg () \
|
||||
- (__builtin_args_info (2) < 8 \
|
||||
? (8 - __builtin_args_info (2)) * __va_reg_size \
|
||||
: __va_reg_size)), \
|
||||
__AP.__fp_left = (8 - __builtin_args_info (3)) / 2, \
|
||||
__AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * 8, \
|
||||
__AP.__fp_regs = (char *) ((int) __AP.__fp_regs & -8))
|
||||
#endif /* ! defined (__mips64) */
|
||||
#else /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */
|
||||
#define va_start(__AP) \
|
||||
(__AP = ((__gnuc_va_list) __builtin_next_arg () \
|
||||
- (__builtin_args_info (2) >= 8 ? __va_reg_size \
|
||||
: (8 - __builtin_args_info (2)) * __va_reg_size)))
|
||||
#define va_start(__AP) \
|
||||
(__AP = ((__gnuc_va_list) __builtin_next_arg () \
|
||||
- (__builtin_args_info (2) >= 8 ? __va_reg_size \
|
||||
: (8 - __builtin_args_info (2)) * __va_reg_size)))
|
||||
#endif /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */
|
||||
/* Need alternate code for _MIPS_SIM_ABI64. */
|
||||
#elif defined(_MIPS_SIM) && (_MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32)
|
||||
#define va_start(__AP) \
|
||||
(__AP = (__gnuc_va_list) __builtin_next_arg () \
|
||||
#define va_start(__AP) \
|
||||
(__AP = (__gnuc_va_list) __builtin_next_arg () \
|
||||
+ (__builtin_args_info (2) >= 8 ? -8 : 0))
|
||||
#else
|
||||
#define va_start(__AP) __AP = (char *) &__builtin_va_alist
|
||||
@ -165,67 +165,67 @@ enum {
|
||||
#endif /* ! _STDARG_H */
|
||||
|
||||
#ifndef va_end
|
||||
void va_end (__gnuc_va_list); /* Defined in libgcc.a */
|
||||
void va_end(__gnuc_va_list); /* Defined in libgcc.a */
|
||||
#endif
|
||||
#define va_end(__AP) ((void)0)
|
||||
#define va_end(__AP) ((void)0)
|
||||
|
||||
#if defined (__mips_eabi)
|
||||
|
||||
#if ! defined (__mips_soft_float) && ! defined (__mips_single_float)
|
||||
#ifdef __mips64
|
||||
#define __va_next_addr(__AP, __type) \
|
||||
((__builtin_classify_type (*(__type *) 0) == __real_type_class \
|
||||
&& __AP.__fp_left > 0) \
|
||||
? (--__AP.__fp_left, (__AP.__fp_regs += 8) - 8) \
|
||||
#define __va_next_addr(__AP, __type) \
|
||||
((__builtin_classify_type (*(__type *) 0) == __real_type_class \
|
||||
&& __AP.__fp_left > 0) \
|
||||
? (--__AP.__fp_left, (__AP.__fp_regs += 8) - 8) \
|
||||
: (__AP.__gp_regs += __va_reg_size) - __va_reg_size)
|
||||
#else
|
||||
#define __va_next_addr(__AP, __type) \
|
||||
((__builtin_classify_type (*(__type *) 0) == __real_type_class \
|
||||
&& __AP.__fp_left > 0) \
|
||||
? (--__AP.__fp_left, (__AP.__fp_regs += 8) - 8) \
|
||||
: (((__builtin_classify_type (* (__type *) 0) < __record_type_class \
|
||||
&& __alignof__ (__type) > 4) \
|
||||
#define __va_next_addr(__AP, __type) \
|
||||
((__builtin_classify_type (*(__type *) 0) == __real_type_class \
|
||||
&& __AP.__fp_left > 0) \
|
||||
? (--__AP.__fp_left, (__AP.__fp_regs += 8) - 8) \
|
||||
: (((__builtin_classify_type (* (__type *) 0) < __record_type_class \
|
||||
&& __alignof__ (__type) > 4) \
|
||||
? __AP.__gp_regs = (char *) (((int) __AP.__gp_regs + 8 - 1) & -8) \
|
||||
: (char *) 0), \
|
||||
(__builtin_classify_type (* (__type *) 0) >= __record_type_class \
|
||||
? (__AP.__gp_regs += __va_reg_size) - __va_reg_size \
|
||||
: ((__AP.__gp_regs += __va_rounded_size (__type)) \
|
||||
- __va_rounded_size (__type)))))
|
||||
: (char *) 0), \
|
||||
(__builtin_classify_type (* (__type *) 0) >= __record_type_class \
|
||||
? (__AP.__gp_regs += __va_reg_size) - __va_reg_size \
|
||||
: ((__AP.__gp_regs += __va_rounded_size (__type)) \
|
||||
- __va_rounded_size (__type)))))
|
||||
#endif
|
||||
#else /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */
|
||||
#ifdef __mips64
|
||||
#define __va_next_addr(__AP, __type) \
|
||||
#define __va_next_addr(__AP, __type) \
|
||||
((__AP += __va_reg_size) - __va_reg_size)
|
||||
#else
|
||||
#define __va_next_addr(__AP, __type) \
|
||||
(((__builtin_classify_type (* (__type *) 0) < __record_type_class \
|
||||
&& __alignof__ (__type) > 4) \
|
||||
? __AP = (char *) (((int) __AP + 8 - 1) & -8) \
|
||||
: (char *) 0), \
|
||||
(__builtin_classify_type (* (__type *) 0) >= __record_type_class \
|
||||
? (__AP += __va_reg_size) - __va_reg_size \
|
||||
: ((__AP += __va_rounded_size (__type)) \
|
||||
#define __va_next_addr(__AP, __type) \
|
||||
(((__builtin_classify_type (* (__type *) 0) < __record_type_class \
|
||||
&& __alignof__ (__type) > 4) \
|
||||
? __AP = (char *) (((int) __AP + 8 - 1) & -8) \
|
||||
: (char *) 0), \
|
||||
(__builtin_classify_type (* (__type *) 0) >= __record_type_class \
|
||||
? (__AP += __va_reg_size) - __va_reg_size \
|
||||
: ((__AP += __va_rounded_size (__type)) \
|
||||
- __va_rounded_size (__type))))
|
||||
#endif
|
||||
#endif /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */
|
||||
|
||||
#ifdef __MIPSEB__
|
||||
#define va_arg(__AP, __type) \
|
||||
((__va_rounded_size (__type) <= __va_reg_size) \
|
||||
? *(__type *) (void *) (__va_next_addr (__AP, __type) \
|
||||
+ __va_reg_size \
|
||||
- sizeof (__type)) \
|
||||
: (__builtin_classify_type (*(__type *) 0) >= __record_type_class \
|
||||
? **(__type **) (void *) (__va_next_addr (__AP, __type) \
|
||||
+ __va_reg_size \
|
||||
- sizeof (char *)) \
|
||||
#define va_arg(__AP, __type) \
|
||||
((__va_rounded_size (__type) <= __va_reg_size) \
|
||||
? *(__type *) (void *) (__va_next_addr (__AP, __type) \
|
||||
+ __va_reg_size \
|
||||
- sizeof (__type)) \
|
||||
: (__builtin_classify_type (*(__type *) 0) >= __record_type_class \
|
||||
? **(__type **) (void *) (__va_next_addr (__AP, __type) \
|
||||
+ __va_reg_size \
|
||||
- sizeof (char *)) \
|
||||
: *(__type *) (void *) __va_next_addr (__AP, __type)))
|
||||
#else
|
||||
#define va_arg(__AP, __type) \
|
||||
((__va_rounded_size (__type) <= __va_reg_size) \
|
||||
? *(__type *) (void *) __va_next_addr (__AP, __type) \
|
||||
: (__builtin_classify_type (* (__type *) 0) >= __record_type_class \
|
||||
? **(__type **) (void *) __va_next_addr (__AP, __type) \
|
||||
#define va_arg(__AP, __type) \
|
||||
((__va_rounded_size (__type) <= __va_reg_size) \
|
||||
? *(__type *) (void *) __va_next_addr (__AP, __type) \
|
||||
: (__builtin_classify_type (* (__type *) 0) >= __record_type_class \
|
||||
? **(__type **) (void *) __va_next_addr (__AP, __type) \
|
||||
: *(__type *) (void *) __va_next_addr (__AP, __type)))
|
||||
#endif
|
||||
|
||||
@ -241,11 +241,11 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
|
||||
#ifdef __MIPSEB__
|
||||
#define va_arg(__AP, __type) \
|
||||
((__type *) (void *) (__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
|
||||
+ __va_rounded_size (__type))))[-1]
|
||||
+ __va_rounded_size (__type))))[-1]
|
||||
#else
|
||||
#define va_arg(__AP, __type) \
|
||||
((__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
|
||||
+ __va_rounded_size (__type))), \
|
||||
((__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
|
||||
+ __va_rounded_size (__type))), \
|
||||
*(__type *) (void *) (__AP - __va_rounded_size (__type)))
|
||||
#endif
|
||||
|
||||
@ -253,19 +253,19 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
|
||||
|
||||
#ifdef __MIPSEB__
|
||||
/* For big-endian machines. */
|
||||
#define va_arg(__AP, __type) \
|
||||
((__AP = (char *) ((__alignof__ (__type) > 4 \
|
||||
? ((int)__AP + 8 - 1) & -8 \
|
||||
: ((int)__AP + 4 - 1) & -4) \
|
||||
+ __va_rounded_size (__type))), \
|
||||
#define va_arg(__AP, __type) \
|
||||
((__AP = (char *) ((__alignof__ (__type) > 4 \
|
||||
? ((int)__AP + 8 - 1) & -8 \
|
||||
: ((int)__AP + 4 - 1) & -4) \
|
||||
+ __va_rounded_size (__type))), \
|
||||
*(__type *) (void *) (__AP - __va_rounded_size (__type)))
|
||||
#else
|
||||
/* For little-endian machines. */
|
||||
#define va_arg(__AP, __type) \
|
||||
((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4 \
|
||||
? ((int)__AP + 8 - 1) & -8 \
|
||||
: ((int)__AP + 4 - 1) & -4) \
|
||||
+ __va_rounded_size(__type))))[-1]
|
||||
#define va_arg(__AP, __type) \
|
||||
((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4 \
|
||||
? ((int)__AP + 8 - 1) & -8 \
|
||||
: ((int)__AP + 4 - 1) & -4) \
|
||||
+ __va_rounded_size(__type))))[-1]
|
||||
#endif
|
||||
#endif
|
||||
#endif /* ! defined (__mips_eabi) */
|
||||
|
@ -65,7 +65,7 @@
|
||||
#ifdef _ANSI_STDARG_H_
|
||||
#define _VA_LIST_
|
||||
#endif
|
||||
#define _ANSI_STDARG_H_
|
||||
#define _ANSI_STDARG_H_
|
||||
|
||||
#undef va_alist
|
||||
#undef va_dcl
|
||||
@ -97,15 +97,15 @@
|
||||
#ifndef __GNUC_VA_LIST
|
||||
#define __GNUC_VA_LIST
|
||||
#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX)
|
||||
typedef char *__gnuc_va_list;
|
||||
typedef char* __gnuc_va_list;
|
||||
#else
|
||||
typedef void *__gnuc_va_list;
|
||||
typedef void* __gnuc_va_list;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define va_start(AP) AP=(char *) &__builtin_va_alist
|
||||
|
||||
#define va_end(AP) ((void)0)
|
||||
#define va_end(AP) ((void)0)
|
||||
|
||||
#if defined(sysV68)
|
||||
#define __va_rounded_size(TYPE) \
|
||||
@ -117,16 +117,16 @@ typedef void *__gnuc_va_list;
|
||||
|
||||
#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__)
|
||||
/* This is for little-endian machines; small args are padded upward. */
|
||||
#define va_arg(AP, TYPE) \
|
||||
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
|
||||
#define va_arg(AP, TYPE) \
|
||||
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
|
||||
*((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE))))
|
||||
#else /* big-endian */
|
||||
/* This is for big-endian machines; small args are padded downward. */
|
||||
#define va_arg(AP, TYPE) \
|
||||
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
|
||||
*((TYPE *) (void *) ((char *) (AP) \
|
||||
- ((sizeof (TYPE) < __va_rounded_size (char) \
|
||||
? sizeof (TYPE) : __va_rounded_size (TYPE))))))
|
||||
#define va_arg(AP, TYPE) \
|
||||
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
|
||||
*((TYPE *) (void *) ((char *) (AP) \
|
||||
- ((sizeof (TYPE) < __va_rounded_size (char) \
|
||||
? sizeof (TYPE) : __va_rounded_size (TYPE))))))
|
||||
#endif /* big-endian */
|
||||
|
||||
/* Copy __gnuc_va_list into another variable of this type. */
|
||||
|
@ -152,7 +152,7 @@ s32 func_802E17A8(Entity* entity) {
|
||||
f32 phi_f4;
|
||||
s32 phi_s2 = 0;
|
||||
|
||||
switch(temp_s0->unk_10) {
|
||||
switch (temp_s0->unk_10) {
|
||||
case 0: // switch 1
|
||||
temp_f6 = temp_s0->unk_14.z * 0.3;
|
||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0;
|
||||
@ -230,7 +230,7 @@ s32 func_802E17A8(Entity* entity) {
|
||||
|
||||
entity->scale.z = entity->scale.x;
|
||||
|
||||
switch(temp_s0->unk_11) {
|
||||
switch (temp_s0->unk_11) {
|
||||
|
||||
case 0: // switch 2
|
||||
temp_f6 = temp_s0->unk_14.z * -0.5;
|
||||
@ -334,7 +334,7 @@ void func_802E1EDC(Entity* entity) {
|
||||
f32 phi_f4;
|
||||
s32 phi_s2 = 0;
|
||||
|
||||
switch(temp_s0->unk_10) {
|
||||
switch (temp_s0->unk_10) {
|
||||
case 0:
|
||||
temp_f6 = temp_s0->unk_14.z * 0.3;
|
||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0;
|
||||
@ -551,7 +551,7 @@ void func_802E2BA4(s32 entityIndex) {
|
||||
y_inv = -entity->position.y;
|
||||
z_inv = -entity->position.z;
|
||||
phi_fp = temp_s4->unk_34;
|
||||
for(i = 0; i < 24; i++) {
|
||||
for (i = 0; i < 24; i++) {
|
||||
if (temp_s4->unk_3C.s == 0xFF) {
|
||||
gDPSetRenderMode(temp_s2++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gDPSetCombineMode(temp_s2++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
|
@ -200,12 +200,12 @@ extern s32 D_802E9E80;
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
s32 func_802E3BA4(Entity* entity) {
|
||||
u8 bVar1;
|
||||
s32 bVar2;
|
||||
s32 iVar3;
|
||||
s32 uVar4;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
u8 bVar1;
|
||||
s32 bVar2;
|
||||
s32 iVar3;
|
||||
s32 uVar4;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
|
||||
if ((entity->alpha == 0) && ((entity->unk_06 & 1) != 0)) {
|
||||
return 0;
|
||||
}
|
||||
@ -213,13 +213,13 @@ s32 func_802E3BA4(Entity* entity) {
|
||||
bVar1 = entity->unk_06;
|
||||
if ((bVar1 & 4) != 0) {
|
||||
s32 type = get_entity_type(entity->listIndex);
|
||||
if((type == 0xC)) {
|
||||
if ((type == 0xC)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if((type >= 0xC)) {
|
||||
if((type < 0x1b)) {
|
||||
if((type > 0x14)) {
|
||||
|
||||
if ((type >= 0xC)) {
|
||||
if ((type < 0x1b)) {
|
||||
if ((type > 0x14)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -232,8 +232,8 @@ s32 func_802E3BA4(Entity* entity) {
|
||||
return 1;
|
||||
}
|
||||
if ((bVar1 & 0x80) != 0) {
|
||||
func_8010FD68(entity);
|
||||
return 1;
|
||||
func_8010FD68(entity);
|
||||
return 1;
|
||||
}
|
||||
|
||||
bVar2 = FALSE;
|
||||
@ -256,9 +256,9 @@ s32 func_802E3BA4(Entity* entity) {
|
||||
}
|
||||
}
|
||||
|
||||
switch(get_entity_type(entity->listIndex)) {
|
||||
switch (get_entity_type(entity->listIndex)) {
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
case 0x15:
|
||||
case 0x18:
|
||||
if (bVar2) {
|
||||
@ -273,8 +273,8 @@ s32 func_802E3BA4(Entity* entity) {
|
||||
if (!bVar2) {
|
||||
return 1;
|
||||
}
|
||||
func_8010FBC0(entity,&D_802E9E80);
|
||||
play_sound_at_position(0x14f, 0, entity->position.x, entity->position.y ,entity->position.z);
|
||||
func_8010FBC0(entity, &D_802E9E80);
|
||||
play_sound_at_position(0x14f, 0, entity->position.x, entity->position.y, entity->position.z);
|
||||
break;
|
||||
case 0x16:
|
||||
case 0x19:
|
||||
@ -288,28 +288,28 @@ s32 func_802E3BA4(Entity* entity) {
|
||||
if (!bVar2) {
|
||||
return 1;
|
||||
}
|
||||
func_8010FBC0(entity,&D_802E9E80);
|
||||
play_sound_at_position(0x150, 0, entity->position.x, entity->position.y ,entity->position.z);
|
||||
func_8010FBC0(entity, &D_802E9E80);
|
||||
play_sound_at_position(0x150, 0, entity->position.x, entity->position.y, entity->position.z);
|
||||
break;
|
||||
case 0x17:
|
||||
case 0x1a:
|
||||
if (gPlayerData.hammerLevel < '\x02') {
|
||||
return 1;
|
||||
}
|
||||
func_8010FBC0(entity,&D_802E9E80);
|
||||
play_sound_at_position(0x151, 0, entity->position.x, entity->position.y ,entity->position.z);
|
||||
func_8010FBC0(entity, &D_802E9E80);
|
||||
play_sound_at_position(0x151, 0, entity->position.x, entity->position.y, entity->position.z);
|
||||
break;
|
||||
case 0x1b:
|
||||
case 0x1c:
|
||||
case 0x1d:
|
||||
case 0x1e:
|
||||
case 0x1f:
|
||||
func_80110678(entity);
|
||||
func_8010FD68(entity);
|
||||
return 1;
|
||||
func_80110678(entity);
|
||||
func_8010FD68(entity);
|
||||
return 1;
|
||||
case 0xb:
|
||||
func_80110678(entity);
|
||||
break;
|
||||
func_80110678(entity);
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ INCLUDE_ASM(s32, "code_1b40_len_20b0", gfx_draw_frame);
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
void load_engine_data(void) {
|
||||
GameStatus *phi_s0;
|
||||
GameStatus* phi_s0;
|
||||
s32 i;
|
||||
|
||||
dma_copy(D_000FEE30, D_000FEE30_end, D_802DBD40);
|
||||
@ -98,8 +98,7 @@ void load_engine_data(void) {
|
||||
poll_rumble();
|
||||
|
||||
phi_s0 = GAME_STATUS;
|
||||
for(i = 0; i < 4; i++)
|
||||
{
|
||||
for (i = 0; i < 4; i++) {
|
||||
phi_s0->unk_50[i] = 3;
|
||||
phi_s0->unk_48[i] = 0xC;
|
||||
}
|
||||
|
@ -41,13 +41,13 @@ s32 render_effects(void) {
|
||||
s32 i;
|
||||
|
||||
curEffectInst = &D_800B4398[0];
|
||||
for(i = 0; i < ARRAY_COUNT(D_800B4398); i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) {
|
||||
if ((curEffectInst[i] != NULL) && ((curEffectInst[i]->flags & 1) != 0) && ((curEffectInst[i]->flags & 8) != 0)) {
|
||||
if(GAME_STATUS->isBattle) {
|
||||
if((curEffectInst[i]->flags & 4) != 0) {
|
||||
if (GAME_STATUS->isBattle) {
|
||||
if ((curEffectInst[i]->flags & 4) != 0) {
|
||||
curEffectInst[i]->effect->renderWorld(curEffectInst[i]);
|
||||
}
|
||||
} else if((curEffectInst[i]->flags & 4) == 0) {
|
||||
} else if ((curEffectInst[i]->flags & 4) == 0) {
|
||||
curEffectInst[i]->effect->renderWorld(curEffectInst[i]);
|
||||
}
|
||||
}
|
||||
@ -57,13 +57,13 @@ s32 render_effects(void) {
|
||||
INCLUDE_ASM(s32, "code_341d0", func_80059F94);
|
||||
|
||||
EffectInstance* func_8005A2BC(EffectBlueprint* effectBp) {
|
||||
EffectInstance *newEffectInst;
|
||||
EffectInstance* newEffectInst;
|
||||
Effect* curEffect;
|
||||
s32 i;
|
||||
EffectInstance** temp = &D_800B4398[0];
|
||||
|
||||
// Search for an unused instance
|
||||
for(i = 0; i < ARRAY_COUNT(D_800B4398); i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) {
|
||||
if (temp[i] == NULL) {
|
||||
break;
|
||||
}
|
||||
@ -80,7 +80,7 @@ EffectInstance* func_8005A2BC(EffectBlueprint* effectBp) {
|
||||
newEffectInst->flags = 1;
|
||||
|
||||
// Look for a loaded effect of the proper index
|
||||
for(i = 0; i < ARRAY_COUNT(D_800A4000); i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_800A4000); i++) {
|
||||
if ((curEffect->flags & EFFECT_LOADED) && (curEffect->effectIndex == effectBp->effectIndex)) {
|
||||
break;
|
||||
}
|
||||
@ -124,7 +124,7 @@ void remove_effect(EffectInstance* arg0) {
|
||||
s32 i;
|
||||
EffectInstance** temp = &D_800B4398[0];
|
||||
|
||||
for(i = 0; i < ARRAY_COUNT(D_800B4398); i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) {
|
||||
if (temp[i] == arg0) {
|
||||
break;
|
||||
}
|
||||
@ -147,10 +147,10 @@ void remove_all_effects(void) {
|
||||
s32 i;
|
||||
EffectInstance** temp = &D_800B4398[0];
|
||||
|
||||
for(i = 0; i < ARRAY_COUNT(D_800B4398); i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) {
|
||||
EffectInstance* temp2 = temp[i];
|
||||
if (temp2 != NULL && temp2->flags & 4) {
|
||||
if(temp2->unk_0C != NULL) {
|
||||
if (temp2->unk_0C != NULL) {
|
||||
general_heap_free(temp2->unk_0C);
|
||||
}
|
||||
general_heap_free(temp2);
|
||||
@ -166,7 +166,7 @@ extern TlbMappablePage D_80197000;
|
||||
extern EffectTableEntry D_8007F210[135];
|
||||
|
||||
s32 play_effect(s32 effectIndex) {
|
||||
|
||||
|
||||
EffectTableEntry* effectTable = &D_8007F210[0];
|
||||
EffectTableEntry* effectEntry;
|
||||
Effect* curEffect;
|
||||
@ -176,7 +176,7 @@ s32 play_effect(s32 effectIndex) {
|
||||
effectEntry = &effectTable[effectIndex];
|
||||
|
||||
// Look for a loaded effect matching the desired index
|
||||
for(i = 0, curEffect = &D_800A4000[0]; i < ARRAY_COUNT(D_800A4000); i++) {
|
||||
for (i = 0, curEffect = &D_800A4000[0]; i < ARRAY_COUNT(D_800A4000); i++) {
|
||||
if ((curEffect->flags & EFFECT_LOADED) && (curEffect->effectIndex == effectIndex)) {
|
||||
break;
|
||||
}
|
||||
@ -192,7 +192,7 @@ s32 play_effect(s32 effectIndex) {
|
||||
}
|
||||
|
||||
// If a loaded effect wasn't found, look for the first empty space
|
||||
for(i = 0, curEffect = &D_800A4000[0]; i < ARRAY_COUNT(D_800A4000); i++) {
|
||||
for (i = 0, curEffect = &D_800A4000[0]; i < ARRAY_COUNT(D_800A4000); i++) {
|
||||
if (!(curEffect->flags & EFFECT_LOADED)) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user