mirror of
https://github.com/pret/pokestadium.git
synced 2026-09-11 04:45:33 -05:00
fragment16
This commit is contained in:
@@ -26,7 +26,7 @@ typedef struct {
|
||||
} block_param_form; // size = 0x10
|
||||
|
||||
typedef union {
|
||||
/* 0x00 */ struct {
|
||||
struct {
|
||||
/* 0x00 */ u32 country;
|
||||
/* 0x04 */ u8 fmt_type;
|
||||
/* 0x05 */ u8 disk_type;
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
|
||||
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
|
||||
|
||||
#define ROUND_MAX(x) (((x) > 0.0f ? 0.5f : -0.5f) + (x))
|
||||
#define ROUND_MAX(x) ((x) + ((x) > 0.0f ? 0.5f : -0.5f))
|
||||
|
||||
#define ABS(x) ((x) < 0 ? -(x) : (x))
|
||||
#define ABS_ALT(x) ((x) >= 0 ? (x) : -(x))
|
||||
@@ -72,7 +72,7 @@
|
||||
func_80004258(ASSET_ID(vram), rom##_ROM_START, rom##_ROM_END, arg0) \
|
||||
)
|
||||
|
||||
#define ASSET_LOAD2(vram, rom, arg0, arg1) (\
|
||||
#define ASSET_LOAD2(rom, arg0, arg1) (\
|
||||
func_800044F4(rom##_ROM_START, rom##_ROM_END, arg0, arg1) \
|
||||
)
|
||||
#endif
|
||||
|
||||
83
include/prevent_bss_reordering.h
Normal file
83
include/prevent_bss_reordering.h
Normal file
@@ -0,0 +1,83 @@
|
||||
#ifndef PREVENT_BSS_REORDERING_H
|
||||
#define PREVENT_BSS_REORDERING_H
|
||||
|
||||
/**
|
||||
* To determine variable order for .bss, the compiler sorts variables by their
|
||||
* "name index" mod 256, where name index is something that, with -g, gets
|
||||
* incremented by struct and variable declarations, typedefs, and file markers,
|
||||
* among else. (Without -g, only variable declarations affects the index.)
|
||||
* This file contains enough dummy declarations to bump the index by 128.
|
||||
* Including it, or removing the include, should fix bss reordering problems
|
||||
* for a file, assuming the name index distance between its first and last bss
|
||||
* variable is at most 128.
|
||||
* Note that if a variable is declared "extern" within a header file, the name
|
||||
* index is taken at that point of the extern declaration. Thus, this include
|
||||
* must come before any such header.
|
||||
*/
|
||||
|
||||
struct Dummy0 { int x; };
|
||||
struct Dummy1 { int x; };
|
||||
struct Dummy2 { int x; };
|
||||
struct Dummy3 { int x; };
|
||||
struct Dummy4 { int x; };
|
||||
struct Dummy5 { int x; };
|
||||
struct Dummy6 { int x; };
|
||||
struct Dummy7 { int x; };
|
||||
struct Dummy8 { int x; };
|
||||
struct Dummy9 { int x; };
|
||||
struct Dummy10 { int x; };
|
||||
struct Dummy11 { int x; };
|
||||
struct Dummy12 { int x; };
|
||||
struct Dummy13 { int x; };
|
||||
struct Dummy14 { int x; };
|
||||
struct Dummy15 { int x; };
|
||||
struct Dummy16 { int x; };
|
||||
struct Dummy17 { int x; };
|
||||
struct Dummy18 { int x; };
|
||||
struct Dummy19 { int x; };
|
||||
struct Dummy20 { int x; };
|
||||
struct Dummy21 { int x; };
|
||||
struct Dummy22 { int x; };
|
||||
struct Dummy23 { int x; };
|
||||
struct Dummy24 { int x; };
|
||||
struct Dummy25 { int x; };
|
||||
struct Dummy26 { int x; };
|
||||
struct Dummy27 { int x; };
|
||||
struct Dummy28 { int x; };
|
||||
struct Dummy29 { int x; };
|
||||
struct Dummy30 { int x; };
|
||||
struct Dummy31 { int x; };
|
||||
struct Dummy32 { int x; };
|
||||
struct Dummy33 { int x; };
|
||||
struct Dummy34 { int x; };
|
||||
struct Dummy35 { int x; };
|
||||
struct Dummy36 { int x; };
|
||||
struct Dummy37 { int x; };
|
||||
struct Dummy38 { int x; };
|
||||
struct Dummy39 { int x; };
|
||||
struct Dummy40 { int x; };
|
||||
struct Dummy41 { int x; };
|
||||
struct Dummy42 { int x; };
|
||||
struct Dummy43 { int x; };
|
||||
struct Dummy44 { int x; };
|
||||
struct Dummy45 { int x; };
|
||||
struct Dummy46 { int x; };
|
||||
struct Dummy47 { int x; };
|
||||
struct Dummy48 { int x; };
|
||||
struct Dummy49 { int x; };
|
||||
struct Dummy50 { int x; };
|
||||
struct Dummy51 { int x; };
|
||||
struct Dummy52 { int x; };
|
||||
struct Dummy53 { int x; };
|
||||
struct Dummy54 { int x; };
|
||||
struct Dummy55 { int x; };
|
||||
struct Dummy56 { int x; };
|
||||
struct Dummy57 { int x; };
|
||||
struct Dummy58 { int x; };
|
||||
struct Dummy59 { int x; };
|
||||
struct Dummy60 { int x; };
|
||||
struct Dummy61 { int x; };
|
||||
struct Dummy62 { int x; };
|
||||
typedef int Dummy63;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user