papermario
Decompilation of Paper Mario
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
43F0.c File Reference

Macros

#define ROM_CHUNK_SIZE   0x2000
 

Functions

void dma_write_block (Addr dramAddr, u32 devAddr, s32 size)
 
f32 length2D (f32 x, f32 y)
 
HeapNode_heap_create (HeapNode *addr, u32 size)
 
void * _heap_malloc (HeapNode *head, u32 size)
 
void * _heap_malloc_tail (HeapNode *head, u32 size)
 
u32 _heap_free (HeapNode *heapNodeList, void *addrToFree)
 
void * _heap_realloc (HeapNode *heapNodeList, void *addr, u32 newSize)
 
f32 cosine (s16 arg0)
 
s32 sign (s32 val)
 
char * int_to_string (s32 integer, char *dest, s32 base)
 
void mem_clear (void *data, s32 numBytes)
 
void transform_point (Matrix4f mtx, f32 inX, f32 inY, f32 inZ, f32 inS, f32 *outX, f32 *outY, f32 *outZ, f32 *outW)
 
void copy_matrix (Matrix4f src, Matrix4f dest)
 
u32 dma_copy (Addr romStart, Addr romEnd, void *vramDest)
 
s32 dma_write (Addr romStart, Addr romEnd, void *vramDest)
 
u32 advance_rng (void)
 
f32 rand_float (void)
 
s32 rand_int_internal (u32 max)
 
s32 rand_int (s32 max)
 
f32 signF (f32 val)
 
s32 round (f32 x)
 
f32 clamp_angle (f32 theta)
 
f32 get_clamped_angle_diff (f32 a, f32 b)
 
f32 atan2 (f32 startX, f32 startZ, f32 endX, f32 endZ)
 
f32 get_player_normal_yaw (void)
 
f32 get_player_normal_pitch (void)
 
f32 dist2D (f32 ax, f32 ay, f32 bx, f32 by)
 
f32 dist3D (f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz)
 
void add_vec2D_polar (f32 *x, f32 *y, f32 r, f32 theta)
 
u16 _wrap_trig_lookup_value (f32 theta)
 
void sin_cos_rad (f32 theta, f32 *outSinTheta, f32 *outCosTheta)
 
f32 sin_rad (f32 theta)
 
f32 cos_rad (f32 theta)
 
void sin_cos_deg (f32 theta, f32 *outSinTheta, f32 *outCosTheta)
 
f32 sin_deg (f32 theta)
 
f32 cos_deg (f32 theta)
 
f32 update_lerp (s32 easing, f32 start, f32 end, s32 elapsed, s32 duration)
 
void appendGfx_startup_prim_rect (u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom)
 
void startup_draw_prim_rect_COPY (s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b, u16 a)
 
void startup_draw_prim_rect (s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b, u16 a)
 

Variables

u16 heap_nextMallocID = 0
 
f32 sCosineTable []
 
u8 sIntegerDigits []
 
u32 gRandSeed = 1
 
f32 sAtanFactors []
 
Gfx D_80074580 []
 

Macro Definition Documentation

◆ ROM_CHUNK_SIZE

#define ROM_CHUNK_SIZE   0x2000

Referenced by dma_copy(), and dma_write().

Function Documentation

◆ _heap_create()

◆ _heap_free()

u32 _heap_free ( HeapNode * heapNodeList,
void * addrToFree )

◆ _heap_malloc()

◆ _heap_malloc_tail()

void * _heap_malloc_tail ( HeapNode * head,
u32 size )

◆ _heap_realloc()

void * _heap_realloc ( HeapNode * heapNodeList,
void * addr,
u32 newSize )

◆ _wrap_trig_lookup_value()

u16 _wrap_trig_lookup_value ( f32 theta)

◆ add_vec2D_polar()

◆ advance_rng()

u32 advance_rng ( void )

Referenced by rand_float(), and rand_int_internal().

◆ appendGfx_startup_prim_rect()

void appendGfx_startup_prim_rect ( u8 r,
u8 g,
u8 b,
u8 a,
u16 left,
u16 top,
u16 right,
u16 bottom )

◆ atan2()

f32 atan2 ( f32 startX,
f32 startZ,
f32 endX,
f32 endZ )

◆ clamp_angle()

f32 clamp_angle ( f32 theta)

◆ copy_matrix()

void copy_matrix ( Matrix4f src,
Matrix4f dest )

◆ cos_deg()

f32 cos_deg ( f32 theta)

◆ cos_rad()

◆ cosine()

◆ dist2D()

◆ dist3D()

f32 dist3D ( f32 ax,
f32 ay,
f32 az,
f32 bx,
f32 by,
f32 bz )

Referenced by update_triggers().

◆ dma_copy()

◆ dma_write()

s32 dma_write ( Addr romStart,
Addr romEnd,
void * vramDest )

◆ dma_write_block()

void dma_write_block ( Addr dramAddr,
u32 devAddr,
s32 size )

Referenced by dma_write().

◆ get_clamped_angle_diff()

◆ get_player_normal_pitch()

f32 get_player_normal_pitch ( void )

◆ get_player_normal_yaw()

f32 get_player_normal_yaw ( void )

◆ int_to_string()

char * int_to_string ( s32 integer,
char * dest,
s32 base )

Referenced by draw_number(), and set_message_int_var().

◆ length2D()

f32 length2D ( f32 x,
f32 y )

Referenced by ArcsinDeg().

◆ mem_clear()

void mem_clear ( void * data,
s32 numBytes )

◆ rand_float()

f32 rand_float ( void )

◆ rand_int()

s32 rand_int ( s32 max)

◆ rand_int_internal()

s32 rand_int_internal ( u32 max)

Referenced by rand_int().

◆ round()

s32 round ( f32 x)

Referenced by atan2().

◆ sign()

◆ signF()

f32 signF ( f32 val)

Referenced by FireBarAI_Callback().

◆ sin_cos_deg()

void sin_cos_deg ( f32 theta,
f32 * outSinTheta,
f32 * outCosTheta )

◆ sin_cos_rad()

◆ sin_deg()

f32 sin_deg ( f32 theta)

◆ sin_rad()

f32 sin_rad ( f32 theta)

Referenced by action_hammer_play_hit_fx(), action_update_hit_lava(), action_update_parasol(), action_update_spin(), action_update_use_spinning_flower(), action_update_use_tweester(), add_part_decor_steam(), add_tongue_deformation(), add_xz_vec3f(), add_xz_vec3f_copy1(), add_xz_vec3f_copy2(), appendGfx_background_texture(), apply_constraints_to_lead_amount(), btl_state_update_9(), btl_state_update_end_player_turn(), btl_state_update_end_turn(), btl_state_update_partner_menu(), btl_state_update_peach_menu(), btl_state_update_player_menu(), btl_state_update_twink_menu(), btl_state_update_victory(), build_gfx_floor(), build_gfx_thread(), ChompChainAddPolarPos(), ChompChainGetPolarX(), create_camera_leadplayer_matrix(), Entity_BoardedFloor_update_fragments(), entity_BombableRock_update_fragments(), entity_Chest_close(), entity_Chest_open(), entity_GiantChest_give_equipment(), entity_GiantChest_open(), entity_HeartBlockContent__anim_heal(), entity_HiddenPanel_flip_over(), entity_inactive_block_hit_anim(), entity_inactive_block_recoil_anim(), entity_Padlock_push_player(), entity_StarBoxLauncher_launch(), entity_TrumpetPlant_create_effect(), entity_TrumpetPlant_spawn_coin(), entity_Tweester_move(), entity_WoodenCrate_update_fragments(), func_802BC3E4_E2ED14(), gfx_build_bubble_flower(), imgfx_mesh_make_wavy(), interp_lookat_pos(), npc_do_other_npc_collision(), npc_do_player_collision(), npc_move_heading(), npc_raycast_down_around(), npc_raycast_down_sides(), npc_raycast_up_corners(), play_movement_dust_effects(), player_raycast_up_corners(), setup_gfx_fountain_stars(), setup_gfx_fountain_water(), setup_gfx_geyser(), sfx_compute_spatialized_sound_params_ignore_depth(), spawn_cloud_surface_effects(), spawn_flower_surface_effects(), spawn_hedge_surface_effects(), spawn_snow_surface_effects(), spawn_water_surface_effects(), sync_held_position(), unkVtxFunc001(), update_camera_interp_pos(), update_camera_no_interp(), update_camera_unused_ahead(), update_camera_unused_confined(), update_camera_unused_radial(), update_item_entity_collectable(), update_lerp(), update_lerp_battle(), virtual_entity_move_polar(), and worker_update_phonograph_hud().

◆ startup_draw_prim_rect()

void startup_draw_prim_rect ( s16 left,
s16 top,
s16 right,
s16 bottom,
u16 r,
u16 g,
u16 b,
u16 a )

Referenced by state_drawUI_startup().

◆ startup_draw_prim_rect_COPY()

void startup_draw_prim_rect_COPY ( s16 left,
s16 top,
s16 right,
s16 bottom,
u16 r,
u16 g,
u16 b,
u16 a )

◆ transform_point()

void transform_point ( Matrix4f mtx,
f32 inX,
f32 inY,
f32 inZ,
f32 inS,
f32 * outX,
f32 * outY,
f32 * outZ,
f32 * outW )

◆ update_lerp()

Variable Documentation

◆ D_80074580

Gfx D_80074580[]
Initial value:
= {
gsDPPipeSync(),
gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_OFF),
gsDPSetCycleType(G_CYC_1CYCLE),
gsDPSetTexturePersp(G_TP_NONE),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPSetTextureFilter(G_TF_POINT),
gsDPSetTextureLUT(G_TT_NONE),
gsDPSetTextureConvert(G_TC_FILT),
gsSPEndDisplayList(),
}

Referenced by appendGfx_startup_prim_rect().

◆ gRandSeed

u32 gRandSeed = 1

Referenced by advance_rng(), and boot_main().

◆ heap_nextMallocID

u16 heap_nextMallocID = 0

Referenced by _heap_malloc().

◆ sAtanFactors

f32 sAtanFactors[]
Initial value:
= {
1.0f, 1.273187f, 1.27303f, 1.272768f, 1.272402f, 1.271932f, 1.271358f, 1.270681f, 1.269902f, 1.269021f, 1.268038f,
1.266956f, 1.265774f, 1.264494f, 1.263116f, 1.261643f, 1.260075f, 1.258413f, 1.256659f, 1.254815f, 1.252881f,
1.250859f, 1.248752f, 1.24656f, 1.244285f, 1.241929f, 1.239494f, 1.236981f, 1.234393f, 1.231731f, 1.228997f,
1.226192f, 1.22332f, 1.220382f, 1.217379f, 1.214315f, 1.211189f, 1.208006f, 1.204766f, 1.201471f, 1.198124f,
1.194727f, 1.191281f, 1.187787f, 1.18425f, 1.180669f, 1.177047f, 1.173386f, 1.169687f, 1.165952f, 1.162184f,
1.158384f, 1.154553f, 1.150693f, 1.146806f, 1.142893f, 1.138957f, 1.134998f, 1.131018f, 1.127019f, 1.123002f,
1.118969f, 1.11492f, 1.110858f, 1.106783f, 1.102697f, 1.098601f, 1.094496f, 1.090384f, 1.086266f, 1.082142f,
1.078014f, 1.073883f, 1.06975f, 1.065616f, 1.061482f, 1.057348f, 1.053216f, 1.049087f, 1.04496f, 1.040838f,
1.036721f, 1.03261f, 1.028504f, 1.024406f, 1.020316f, 1.016234f, 1.01216f, 1.008097f, 1.004043f, 1.0f
}

Referenced by atan2().

◆ sCosineTable

f32 sCosineTable[]
Initial value:
= {
0.0f, 0.017452f, 0.034899f, 0.052336f, 0.069756f, 0.087156f, 0.104528f, 0.121869f, 0.139173f,
0.156434f, 0.173648f, 0.190809f, 0.207912f, 0.224951f, 0.241922f, 0.258819f, 0.275637f, 0.292372f, 0.309017f,
0.325568f, 0.34202f, 0.358368f, 0.374607f, 0.390731f, 0.406737f, 0.422618f, 0.438371f, 0.45399f, 0.469472f,
0.48481f, 0.5f, 0.515038f, 0.529919f, 0.544639f, 0.559193f, 0.573576f, 0.587785f, 0.601815f, 0.615661f, 0.62932f,
0.642788f, 0.656059f, 0.669131f, 0.681998f, 0.694658f, 0.707107f, 0.71934f, 0.731354f, 0.743145f, 0.75471f,
0.766044f, 0.777146f, 0.788011f, 0.798636f, 0.809017f, 0.819152f, 0.829038f, 0.838671f, 0.848048f, 0.857167f,
0.866025f, 0.87462f, 0.882948f, 0.891007f, 0.898794f, 0.906308f, 0.913545f, 0.920505f, 0.927184f, 0.93358f,
0.939693f, 0.945519f, 0.951057f, 0.956305f, 0.961262f, 0.965926f, 0.970296f, 0.97437f, 0.978148f, 0.981627f,
0.984808f, 0.987688f, 0.990268f, 0.992546f, 0.994522f, 0.996195f, 0.997564f, 0.99863f, 0.999391f, 0.999848f, 1.0f
}

Referenced by cosine().

◆ sIntegerDigits

u8 sIntegerDigits[]
Initial value:
= {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}

Referenced by int_to_string().