mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-26 06:38:04 -04:00
WIP Compilation
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#include <actors.h>
|
||||
#include <code_800029B0.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
|
||||
/**
|
||||
* @brief Render the banana actor
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param banana
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param banana
|
||||
*/
|
||||
void render_actor_banana(Camera *camera, UNUSED Mat4 arg1, struct BananaActor *banana) {
|
||||
UNUSED s32 pad[2];
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#include <actors.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
|
||||
/**
|
||||
* @brief Render the red shell actor
|
||||
*
|
||||
* @param camera
|
||||
* @param matrix
|
||||
* @param shell
|
||||
*
|
||||
* @param camera
|
||||
* @param matrix
|
||||
* @param shell
|
||||
*/
|
||||
void render_actor_red_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) {
|
||||
gDPLoadTLUT_pal256(gDisplayListHead++, &gTLUTRedShell); // set texture
|
||||
@@ -15,10 +15,10 @@ void render_actor_red_shell(Camera *camera, Mat4 matrix, struct ShellActor *shel
|
||||
|
||||
/**
|
||||
* @brief Render the blue shell actor
|
||||
*
|
||||
* @param camera
|
||||
* @param matrix
|
||||
* @param shell
|
||||
*
|
||||
* @param camera
|
||||
* @param matrix
|
||||
* @param shell
|
||||
*/
|
||||
void render_actor_blue_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) {
|
||||
gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_blue_shell); // set texture
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <actors.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <main.h>
|
||||
#include <defines.h>
|
||||
#include "courses/toads_turnpike/course_data.h"
|
||||
@@ -8,9 +8,9 @@
|
||||
* @brief Renders the box truck actor.
|
||||
* Actor used in Toad's Turnpike.
|
||||
* His update are made in vehicle.
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
*/
|
||||
void render_actor_box_truck(Camera *arg0, struct Actor *arg1) {
|
||||
UNUSED s32 pad[6];
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#include <camera.h>
|
||||
#include <actors.h>
|
||||
#include <main.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include "courses/moo_moo_farm/course_data.h"
|
||||
|
||||
/**
|
||||
* @brief Renders the cow actor.
|
||||
* Actor used in Moo Moo Farm.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_cow(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
if (is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f) < 0) { return; }
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#include <actors.h>
|
||||
#include <code_800029B0.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <main.h>
|
||||
|
||||
/**
|
||||
* @brief Renders the fake item box actor.
|
||||
*
|
||||
* @param camera
|
||||
* @param fakeItemBox
|
||||
*
|
||||
* @param camera
|
||||
* @param fakeItemBox
|
||||
*/
|
||||
void render_actor_fake_item_box(Camera *camera, struct FakeItemBox *fakeItemBox) {
|
||||
Vec3s someRot;
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#include "courses/choco_mountain/course_data.h"
|
||||
|
||||
void func_8029CF0C(struct ActorSpawnData *spawnData, struct FallingRock *rock) {
|
||||
s32 segment = SEGMENT_NUMBER2(spawnData);
|
||||
s32 offset = SEGMENT_OFFSET(spawnData);
|
||||
struct ActorSpawnData *temp_v0 = (struct ActorSpawnData *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
|
||||
struct ActorSpawnData *temp_v0 = (struct ActorSpawnData *) spawnData;
|
||||
Vec3s sp24 = {60, 120, 180};
|
||||
temp_v0 += rock->unk_06;
|
||||
rock->respawnTimer = sp24[rock->unk_06]; // * 2
|
||||
@@ -20,14 +18,12 @@ void func_8029CF0C(struct ActorSpawnData *spawnData, struct FallingRock *rock) {
|
||||
/**
|
||||
* @brief Spawns falling rocks.
|
||||
* Used in Choco Mountain.
|
||||
*
|
||||
* @param spawnData
|
||||
*
|
||||
* @param spawnData
|
||||
*/
|
||||
void spawn_falling_rocks(struct ActorSpawnData *spawnData) {
|
||||
s32 addr = SEGMENT_NUMBER2(spawnData);
|
||||
s32 offset = SEGMENT_OFFSET(spawnData);
|
||||
// Casting this to prevent warning does not work.
|
||||
struct ActorSpawnData *temp_s0 = (struct ActorSpawnData *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[addr] + offset);
|
||||
struct ActorSpawnData *temp_s0 = spawnData;
|
||||
struct FallingRock *temp_v1;
|
||||
Vec3f startingPos;
|
||||
Vec3f startingVelocity;
|
||||
@@ -52,8 +48,8 @@ void spawn_falling_rocks(struct ActorSpawnData *spawnData) {
|
||||
/**
|
||||
* @brief Updates the falling rock actor.
|
||||
* Actor used in Choco Mountain.
|
||||
*
|
||||
* @param rock
|
||||
*
|
||||
* @param rock
|
||||
*/
|
||||
void update_actor_falling_rocks(struct FallingRock *rock) {
|
||||
Vec3f unkVec;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include <actors.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <main.h>
|
||||
#include <assets/common_data.h>
|
||||
|
||||
/**
|
||||
* @brief Renders the green shell actor.
|
||||
*
|
||||
* @param camera
|
||||
* @param matrix
|
||||
* @param shell
|
||||
*
|
||||
* @param camera
|
||||
* @param matrix
|
||||
* @param shell
|
||||
*/
|
||||
void render_actor_green_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) {
|
||||
gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_green_shell); // set texture
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include <actors.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <main.h>
|
||||
#include "courses/dks_jungle_parkway/course_data.h"
|
||||
|
||||
/**
|
||||
* @brief Renders the kiwano fruit actor.
|
||||
* Actor used in DK's Jungle Parkway.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param actor
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param actor
|
||||
*/
|
||||
void render_actor_kiwano_fruit(UNUSED Camera *camera, Mat4 arg1, struct Actor *actor) {
|
||||
uintptr_t addr;
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <actor_types.h>
|
||||
#include "camera.h"
|
||||
#include "main.h"
|
||||
#include "actors.h"
|
||||
#include "courses/all_course_data.h"
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
|
||||
/**
|
||||
* @brief Renders the paddle boat actor.
|
||||
* Actor used in DK's Jungle Parkway.
|
||||
*
|
||||
* @param arg0
|
||||
* @param boat
|
||||
* @param arg2
|
||||
* @param pathCounter
|
||||
*
|
||||
* @param arg0
|
||||
* @param boat
|
||||
* @param arg2
|
||||
* @param pathCounter
|
||||
*/
|
||||
void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED Mat4 arg2, u16 pathCounter) {
|
||||
UNUSED s32 pad[3];
|
||||
@@ -25,7 +25,7 @@ void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED
|
||||
f32 temp;
|
||||
|
||||
if ((pathCounter > 20) && (pathCounter < 25)) { return; }
|
||||
|
||||
|
||||
temp = is_within_render_distance(arg0->pos, boat->pos, arg0->rot[1], 90000.0f, gCameraZoom[arg0 - camera1], 9000000.0f);
|
||||
|
||||
if (temp < 0.0f) { return; }
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <actor_types.h>
|
||||
|
||||
/**
|
||||
* @brief Updates the paddle boat actor.
|
||||
* Actor used in DK's Jungle Parkway.
|
||||
* Rotate only the paddle wheel, for position and rotation of the boat it's in vehicle.
|
||||
*
|
||||
* @param boat
|
||||
*
|
||||
* @param boat
|
||||
*/
|
||||
void update_actor_paddle_boat(struct PaddleWheelBoat *boat) {
|
||||
boat->wheelRot += 0x38E;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#include <actors.h>
|
||||
#include <main.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include "courses/mario_raceway/course_data.h"
|
||||
#include "courses/royal_raceway/course_data.h"
|
||||
|
||||
/**
|
||||
* @brief Renders the piranha plant actor.
|
||||
* Actor used in Mario Raceway and Royal Raceway.
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_piranha_plant(Camera *arg0, Mat4 arg1, struct PiranhaPlant *arg2) {
|
||||
UNUSED s32 pad;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include <actors.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <main.h>
|
||||
#include "courses/kalimari_desert/course_data.h"
|
||||
|
||||
/**
|
||||
* @brief Renders the railroad crossing actor.
|
||||
* Actor used in Kalimari Desert.
|
||||
*
|
||||
* @param arg0
|
||||
* @param rr_crossing
|
||||
*
|
||||
* @param arg0
|
||||
* @param rr_crossing
|
||||
*/
|
||||
void render_actor_railroad_crossing(Camera *arg0, struct RailroadCrossing *rr_crossing) {
|
||||
UNUSED Vec3s sp80 = {0, 0, 0};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <actors.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <main.h>
|
||||
#include <defines.h>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
* @brief Renders the school bus actor.
|
||||
* Actor used in Toad's Turnpike.
|
||||
* His update are made in vehicle.
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
*/
|
||||
void render_actor_school_bus(Camera *arg0, struct Actor *arg1) {
|
||||
UNUSED s32 pad[6];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <actors.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <main.h>
|
||||
#include "courses/kalimari_desert/course_data.h"
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
* @brief Renders the train engine actor.
|
||||
* Actor used in Kalimari Desert.
|
||||
* His update position are made in vehicle.
|
||||
*
|
||||
* @param camera
|
||||
* @param actor
|
||||
*
|
||||
* @param camera
|
||||
* @param actor
|
||||
*/
|
||||
void render_actor_train_engine(Camera *camera, struct TrainCar *actor) {
|
||||
UNUSED s32 pad[2];
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include <actors.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <main.h>
|
||||
#include <assets/common_data.h>
|
||||
#include "courses/all_course_data.h"
|
||||
|
||||
/**
|
||||
* @brief Renders the tree actor in Mario rawceay.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_tree_mario_raceway(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
@@ -36,10 +36,10 @@ void render_actor_tree_mario_raceway(Camera *camera, Mat4 arg1, struct Actor *ar
|
||||
|
||||
/**
|
||||
* @brief Renders the tree actor in Yoshi Valley.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_tree_yoshi_valley(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
@@ -66,10 +66,10 @@ void render_actor_tree_yoshi_valley(Camera *camera, Mat4 arg1, struct Actor *arg
|
||||
|
||||
/**
|
||||
* @brief Renders the tree actor in Royal Raceway.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_tree_royal_raceway(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
@@ -96,10 +96,10 @@ void render_actor_tree_royal_raceway(Camera *camera, Mat4 arg1, struct Actor *ar
|
||||
|
||||
/**
|
||||
* @brief Renders the tree actor in Moo Moo Farm.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_tree_moo_moo_farm(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
@@ -154,10 +154,10 @@ void func_80299864(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
|
||||
/**
|
||||
* @brief Renders the tree actor in Bowser's Castle.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_tree_bowser_castle(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
@@ -184,10 +184,10 @@ void render_actor_tree_bowser_castle(Camera *camera, Mat4 arg1, struct Actor *ar
|
||||
|
||||
/**
|
||||
* @brief Renders the bush actor in Bowser's Castle.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_bush_bowser_castle(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
@@ -214,10 +214,10 @@ void render_actor_bush_bowser_castle(Camera *camera, Mat4 arg1, struct Actor *ar
|
||||
|
||||
/**
|
||||
* @brief Renders the tree actor in Frappe Snowland.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_tree_frappe_snowland(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
@@ -243,10 +243,10 @@ void render_actor_tree_frappe_snowland(Camera *camera, Mat4 arg1, struct Actor *
|
||||
|
||||
/**
|
||||
* @brief Renders the a first variant of cactus in Kalimari Desert.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_tree_cactus1_kalimari_desert(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
@@ -272,10 +272,10 @@ void render_actor_tree_cactus1_kalimari_desert(Camera *camera, Mat4 arg1, struct
|
||||
|
||||
/**
|
||||
* @brief Renders the a second variant of cactus in Kalimari Desert.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_tree_cactus2_kalimari_desert(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
@@ -301,10 +301,10 @@ void render_actor_tree_cactus2_kalimari_desert(Camera *camera, Mat4 arg1, struct
|
||||
|
||||
/**
|
||||
* @brief Renders the a third variant of cactus in Kalimari Desert.
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*
|
||||
* @param camera
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
*/
|
||||
void render_actor_tree_cactus3_kalimari_desert(Camera *camera, Mat4 arg1, struct Actor *arg2) {
|
||||
f32 temp_f0;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include <actors.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <main.h>
|
||||
#include "courses/wario_stadium/course_data.h"
|
||||
|
||||
/**
|
||||
* @brief Renders the Wario sign actor.
|
||||
* Used in Wario Stadium.
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
*/
|
||||
void render_actor_wario_sign(Camera *arg0, struct Actor *arg1) {
|
||||
Mat4 sp38;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include <PR/ultratypes.h>
|
||||
#include <libultra/types.h>
|
||||
#include <macros.h>
|
||||
|
||||
#include "data.h"
|
||||
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
#include "audio/seqplayer.h"
|
||||
@@ -30,7 +30,7 @@ void sequence_channel_process_sound(struct SequenceChannel *seqChannel, s32 reca
|
||||
layer->noteFreqScale = layer->freqScale * seqChannel->freqScale;
|
||||
layer->noteVelocity = layer->velocitySquare * seqChannel->appliedVolume;
|
||||
layer->notePan = (seqChannel->pan + layer->pan * (0x80 - seqChannel->panChannelWeight)) >> 7;
|
||||
layer->notePropertiesNeedInit = FALSE;
|
||||
layer->notePropertiesNeedInit = false;
|
||||
} else {
|
||||
if (seqChannel->changes.as_bitfields.freqScale) {
|
||||
layer->noteFreqScale = layer->freqScale * seqChannel->freqScale;
|
||||
@@ -52,7 +52,7 @@ void sequence_player_process_sound(struct SequencePlayer *seqPlayer) {
|
||||
|
||||
if (seqPlayer->fadeRemainingFrames != 0) {
|
||||
seqPlayer->fadeVolume += seqPlayer->fadeVelocity;
|
||||
seqPlayer->recalculateVolume = TRUE;
|
||||
seqPlayer->recalculateVolume = true;
|
||||
|
||||
if (seqPlayer->fadeVolume > US_FLOAT2(1)) {
|
||||
seqPlayer->fadeVolume = US_FLOAT2(1);
|
||||
@@ -75,13 +75,13 @@ void sequence_player_process_sound(struct SequencePlayer *seqPlayer) {
|
||||
|
||||
// Process channels
|
||||
for (i = 0; i < CHANNELS_MAX; i++) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqPlayer->channels[i]) == TRUE
|
||||
&& seqPlayer->channels[i]->enabled == TRUE) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqPlayer->channels[i]) == true
|
||||
&& seqPlayer->channels[i]->enabled == true) {
|
||||
sequence_channel_process_sound(seqPlayer->channels[i], seqPlayer->recalculateVolume);
|
||||
}
|
||||
}
|
||||
|
||||
seqPlayer->recalculateVolume = FALSE;
|
||||
seqPlayer->recalculateVolume = false;
|
||||
}
|
||||
|
||||
f32 get_portamento_freq_scale(struct Portamento *p) {
|
||||
@@ -176,7 +176,7 @@ void note_vibrato_init(struct Note *note) {
|
||||
|
||||
vib = ¬e->vibratoState;
|
||||
|
||||
vib->active = TRUE;
|
||||
vib->active = true;
|
||||
vib->time = 0;
|
||||
|
||||
vib->curve = gWaveSamples[2];
|
||||
|
||||
+20
-18
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include <defines.h>
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "code_800029B0.h"
|
||||
#include "code_80005FD0.h"
|
||||
#include "code_80091750.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
s8 D_8018EF10;
|
||||
UnkStruct8018EF18 D_8018EF18[16];
|
||||
@@ -31,7 +32,7 @@ u8 sSoundBankFreeListFront[SOUND_BANK_COUNT];
|
||||
u8 sNumSoundsInBank[SOUND_BANK_COUNT];
|
||||
u8 D_80192AB8[SOUND_BANK_COUNT][8][8];
|
||||
u8 D_80192C38;
|
||||
ubool8 sSoundBankDisabled[SOUND_BANK_COUNT];
|
||||
bool sSoundBankDisabled[SOUND_BANK_COUNT];
|
||||
struct ChannelVolumeScaleFade D_80192C48[SOUND_BANK_COUNT];
|
||||
struct_D_80192CA8_entry D_80192CA8[3][5];
|
||||
u8 D_80192CC6[3];
|
||||
@@ -244,7 +245,7 @@ void audio_reset_session_eu(OSMesg presetId) {
|
||||
osRecvMesg(D_800EA3B4, &mesg, 0);
|
||||
osSendMesg(D_800EA3B0, presetId, 0);
|
||||
osRecvMesg(D_800EA3B4, &mesg, 1);
|
||||
if (mesg != presetId) {
|
||||
if (mesg.data32 != presetId.data32) {
|
||||
osRecvMesg(D_800EA3B4, &mesg, 1);
|
||||
}
|
||||
}
|
||||
@@ -931,7 +932,8 @@ void func_800C2A2C(u32 arg0) {
|
||||
break;
|
||||
case 15:
|
||||
D_800EA1C0 = (arg0 & 0xFF00) >> 8;
|
||||
audio_reset_session_eu((void *) test);
|
||||
// UTODO: Stubbed
|
||||
// audio_reset_session_eu((void *) test);
|
||||
D_800EA1F4[0] = test;
|
||||
func_800CBBE8(0x46020000U, why);
|
||||
func_800C5C40();
|
||||
@@ -963,14 +965,14 @@ u16 func_800C3508(u8 player) {
|
||||
}
|
||||
|
||||
u8 func_800C357C(s32 arg0) {
|
||||
u8 var_v1;
|
||||
bool var_v1;
|
||||
u8 i;
|
||||
|
||||
i = D_800EA1E8;
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
for(i = D_800EA1E8; i < (s32) D_800EA1E4; i++) {
|
||||
if ((u32) arg0 == D_80192CD0[i]) {
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
i = D_800EA1E4;
|
||||
}
|
||||
}
|
||||
@@ -1237,9 +1239,9 @@ void func_800C4084(u16 bankMask) {
|
||||
|
||||
for (bank = 0; bank < SOUND_BANK_COUNT; bank++) {
|
||||
if (bankMask & 1) {
|
||||
sSoundBankDisabled[bank] = TRUE;
|
||||
sSoundBankDisabled[bank] = true;
|
||||
} else {
|
||||
sSoundBankDisabled[bank] = FALSE;
|
||||
sSoundBankDisabled[bank] = false;
|
||||
}
|
||||
bankMask = bankMask >> 1;
|
||||
}
|
||||
@@ -1258,7 +1260,7 @@ void play_sound(u32 soundBits, Vec3f *position, u8 cameraId, f32 *arg3, f32 *arg
|
||||
struct Sound *temp_v0;
|
||||
|
||||
bank = soundBits >> 0x1C;
|
||||
if (sSoundBankDisabled[bank] == FALSE) {
|
||||
if (sSoundBankDisabled[bank] == false) {
|
||||
temp_v0 = &sSoundRequests[sSoundRequestCount];
|
||||
temp_v0->soundBits = soundBits;
|
||||
temp_v0->position = position;
|
||||
@@ -1276,37 +1278,37 @@ void func_800C41CC(u8 arg0, struct SoundCharacteristics *arg1) {
|
||||
struct Sound *sound;
|
||||
|
||||
for (soundId = sNumProcessedSoundRequests; soundId != sSoundRequestCount; soundId++) {
|
||||
found = FALSE;
|
||||
found = false;
|
||||
sound = &sSoundRequests[soundId];
|
||||
switch (arg0) {
|
||||
case 0:
|
||||
if ((sound->soundBits & 0xF0000000) == (arg1->soundBits & 0xF0000000)) {
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (((sound->soundBits & 0xF0000000) == (arg1->soundBits & 0xF0000000)) && (sound->position == arg1->unk00)) {
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (sound->position == arg1->unk00) {
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if ((sound->position == arg1->unk00) && (sound->soundBits == arg1->soundBits)) {
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if ((sound->cameraId == arg1->cameraId) && (sound->soundBits == arg1->soundBits)) {
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (sound->soundBits == arg1->soundBits) {
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1806,7 +1808,7 @@ void sound_init(void) {
|
||||
sSoundBankUsedListBack[var_v0] = 0;
|
||||
sSoundBankFreeListFront[var_v0] = 1;
|
||||
sNumSoundsInBank[var_v0] = 0;
|
||||
sSoundBankDisabled[var_v0] = FALSE;
|
||||
sSoundBankDisabled[var_v0] = false;
|
||||
D_80192C48[var_v0].current = 1.0f;
|
||||
D_80192C48[var_v0].remainingFrames = 0;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ extern u8 sSoundBankFreeListFront[SOUND_BANK_COUNT];
|
||||
extern u8 sNumSoundsInBank[SOUND_BANK_COUNT];
|
||||
extern u8 D_80192AB8[SOUND_BANK_COUNT][8][8];
|
||||
extern u8 D_80192C38;
|
||||
extern u8 sSoundBankDisabled[SOUND_BANK_COUNT];
|
||||
extern bool sSoundBankDisabled[SOUND_BANK_COUNT];
|
||||
extern struct ChannelVolumeScaleFade D_80192C48[SOUND_BANK_COUNT];
|
||||
extern struct_D_80192CA8_entry D_80192CA8[3][5];
|
||||
extern u8 D_80192CC6[3];
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
#include "audio/data.h"
|
||||
@@ -126,8 +126,8 @@ void discard_bank(s32 bankId) {
|
||||
if (note->priority >= NOTE_PRIORITY_MIN) {
|
||||
// eu_stubbed_printf_3("Kill Voice %d (ID %d) %d\n", note->waveId, bankId, note->priority);
|
||||
// eu_stubbed_printf_0("Warning: Running Sequence's data disappear!\n");
|
||||
note->parentLayer->enabled = FALSE; // is 0x48, should be 0x44
|
||||
note->parentLayer->finished = TRUE;
|
||||
note->parentLayer->enabled = false; // is 0x48, should be 0x44
|
||||
note->parentLayer->finished = true;
|
||||
}
|
||||
note_disable(note);
|
||||
audio_list_remove(¬e->listItem);
|
||||
@@ -380,7 +380,7 @@ void *alloc_bank_or_seq(struct SoundMultiPool *arg0, s32 arg1, s32 size, s32 arg
|
||||
pool = &arg0->temporary.pool;
|
||||
if (tp->entries[tp->nextSide].id != (s8)-1) {
|
||||
table[tp->entries[tp->nextSide].id] = SOUND_LOAD_STATUS_NOT_LOADED;
|
||||
if (isSound == TRUE) {
|
||||
if (isSound == true) {
|
||||
discard_bank(tp->entries[tp->nextSide].id);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef AUDIO_HEAP_H
|
||||
#define AUDIO_HEAP_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <libultra/types.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef AUDIO_INTERNAL_H
|
||||
#define AUDIO_INTERNAL_H
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
#include <libultraship.h>
|
||||
#include "common_structs.h"
|
||||
|
||||
#define SEQUENCE_PLAYERS 4
|
||||
#define SEQUENCE_CHANNELS 48
|
||||
@@ -226,7 +226,7 @@ struct SequencePlayer {
|
||||
/*0x11C, 0x124*/ OSIoMesg bankDmaIoMesg;
|
||||
/*0x130, 0x13C*/ u8 *bankDmaCurrMemAddr;
|
||||
/*0x138, 0x140*/ uintptr_t bankDmaCurrDevAddr;
|
||||
/*0x13C, 0x144*/ ssize_t bankDmaRemaining;
|
||||
/*0x13C, 0x144*/ size_t bankDmaRemaining;
|
||||
}; // size = 0x140, 0x148 on EU, 0x14C on SH
|
||||
|
||||
struct AdsrSettings {
|
||||
|
||||
+15
-14
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
#include "audio/load.h"
|
||||
@@ -126,8 +126,8 @@ void audio_dma_copy_async(uintptr_t devAddr, void *vAddr, size_t nbytes, OSMesgQ
|
||||
* Performs a partial asynchronous (normal priority) DMA copy. This is limited
|
||||
* to 0x1000 bytes transfer at once.
|
||||
*/
|
||||
void audio_dma_partial_copy_async(uintptr_t *devAddr, u8 **vAddr, ssize_t *remaining, OSMesgQueue *queue, OSIoMesg *mesg) {
|
||||
ssize_t transfer = (*remaining >= 0x1000 ? 0x1000 : *remaining);
|
||||
void audio_dma_partial_copy_async(uintptr_t *devAddr, u8 **vAddr, size_t *remaining, OSMesgQueue *queue, OSIoMesg *mesg) {
|
||||
size_t transfer = (*remaining >= 0x1000 ? 0x1000 : *remaining);
|
||||
*remaining -= transfer;
|
||||
osInvalDCache(*vAddr, transfer);
|
||||
osPiStartDma(mesg, OS_MESG_PRI_NORMAL, OS_READ, *devAddr, *vAddr, transfer, queue);
|
||||
@@ -164,13 +164,13 @@ void decrease_sample_dma_ttls() {
|
||||
}
|
||||
|
||||
void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) {
|
||||
s32 hasDma = FALSE;
|
||||
s32 hasDma = false;
|
||||
struct SharedDma *dma;
|
||||
uintptr_t dmaDevAddr;
|
||||
u32 transfer;
|
||||
u32 i;
|
||||
u32 dmaIndex;
|
||||
ssize_t bufferPos;
|
||||
size_t bufferPos;
|
||||
UNUSED u32 pad;
|
||||
|
||||
if (arg2 != 0 || *dmaIndexRef >= sSampleDmaListSize1) {
|
||||
@@ -199,7 +199,7 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) {
|
||||
// TTL 60 is pretty large.
|
||||
dmaIndex = sSampleDmaReuseQueue2[sSampleDmaReuseQueueTail2++];
|
||||
dma = &sSampleDmas[dmaIndex];
|
||||
hasDma = TRUE;
|
||||
hasDma = true;
|
||||
}
|
||||
} else {
|
||||
dma = &sSampleDmas[*dmaIndexRef];
|
||||
@@ -231,7 +231,7 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) {
|
||||
// be empty, since TTL 2 is so small.
|
||||
dmaIndex = sSampleDmaReuseQueue1[sSampleDmaReuseQueueTail1++];
|
||||
dma = &sSampleDmas[dmaIndex];
|
||||
hasDma = TRUE;
|
||||
hasDma = true;
|
||||
}
|
||||
|
||||
transfer = dma->bufSize;
|
||||
@@ -539,7 +539,7 @@ struct AudioBank *bank_load_async(s32 bankId, s32 arg1, struct SequencePlayer *s
|
||||
seqPlayer->bankDmaRemaining = alloc;
|
||||
if (1) { }
|
||||
osCreateMesgQueue(&seqPlayer->bankDmaMesgQueue, &seqPlayer->bankDmaMesg, 1);
|
||||
seqPlayer->bankDmaInProgress = TRUE;
|
||||
seqPlayer->bankDmaInProgress = true;
|
||||
audio_dma_partial_copy_async(&seqPlayer->bankDmaCurrDevAddr, &seqPlayer->bankDmaCurrMemAddr, &seqPlayer->bankDmaRemaining, &seqPlayer->bankDmaMesgQueue, &seqPlayer->bankDmaIoMesg);
|
||||
if (gBankLoadStatus[bankId] != 5) {
|
||||
gBankLoadStatus[bankId] = 1;
|
||||
@@ -590,7 +590,7 @@ void *sequence_dma_async(s32 seqId, s32 arg1, struct SequencePlayer *seqPlayer)
|
||||
audio_dma_copy_immediate(seqData, ptr, 0x00000040U);
|
||||
mesgQueue = &seqPlayer->seqDmaMesgQueue;
|
||||
osCreateMesgQueue(mesgQueue, &seqPlayer->seqDmaMesg, 1);
|
||||
seqPlayer->seqDmaInProgress = TRUE;
|
||||
seqPlayer->seqDmaInProgress = true;
|
||||
audio_dma_copy_async((uintptr_t) (seqData + 0x40), (u8*) ptr + 0x40, seqLength - 0x40, mesgQueue, &seqPlayer->seqDmaIoMesg);
|
||||
if (gSeqLoadStatus[seqId] != 5) {
|
||||
gSeqLoadStatus[seqId] = 1;
|
||||
@@ -612,7 +612,7 @@ u8 get_missing_bank(u32 seqId, s32 *nonNullCount, s32 *nullCount) {
|
||||
for (i = gAlBankSets[offset++], ret = 0; i != 0; i--) {
|
||||
bankId = gAlBankSets[offset++];
|
||||
|
||||
if (IS_BANK_LOAD_COMPLETE(bankId) == TRUE) {
|
||||
if (IS_BANK_LOAD_COMPLETE(bankId) == true) {
|
||||
temp = get_bank_or_seq(1, 2, bankId);
|
||||
} else {
|
||||
temp = NULL;
|
||||
@@ -639,7 +639,7 @@ struct AudioBank *load_banks_immediate(s32 seqId, u8 *outDefaultBank) {
|
||||
for (i = gAlBankSets[offset++]; i != 0; i--) {
|
||||
bankId = gAlBankSets[offset++];
|
||||
|
||||
if (IS_BANK_LOAD_COMPLETE(bankId) == TRUE) {
|
||||
if (IS_BANK_LOAD_COMPLETE(bankId) == true) {
|
||||
ret = get_bank_or_seq(1, 2, bankId);
|
||||
} else {
|
||||
ret = NULL;
|
||||
@@ -672,7 +672,7 @@ void preload_sequence(u32 seqId, u8 preloadMask) {
|
||||
|
||||
if (preloadMask & PRELOAD_SEQUENCE) {
|
||||
//! @bug should be IS_SEQ_LOAD_COMPLETE
|
||||
if (IS_BANK_LOAD_COMPLETE(seqId) == TRUE) {
|
||||
if (IS_BANK_LOAD_COMPLETE(seqId) == true) {
|
||||
sequenceData = get_bank_or_seq(0, 2, seqId);
|
||||
} else {
|
||||
sequenceData = NULL;
|
||||
@@ -753,7 +753,7 @@ void load_sequence_internal(u32 player, u32 seqId, s32 loadAsync) {
|
||||
init_sequence_player(player);
|
||||
seqPlayer->scriptState.depth = 0;
|
||||
seqPlayer->delay = 0;
|
||||
seqPlayer->enabled = TRUE;
|
||||
seqPlayer->enabled = true;
|
||||
seqPlayer->seqData = sequenceData;
|
||||
seqPlayer->scriptState.pc = sequenceData;
|
||||
}
|
||||
@@ -796,7 +796,8 @@ void audio_init(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (osTvType) { /* irregular */
|
||||
// UTODO: Which is the correct one?
|
||||
switch (0) { /* irregular */
|
||||
case 0:
|
||||
D_803B7178 = 20.03042f;
|
||||
gRefreshRate = 0x00000032;
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
#ifndef AUDIO_LOAD_H
|
||||
#define AUDIO_LOAD_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <libultra/types.h>
|
||||
#include "audio/internal.h"
|
||||
#include "PR/libaudio.h"
|
||||
|
||||
#define AUDIO_FRAME_DMA_QUEUE_SIZE 0x40
|
||||
|
||||
@@ -23,7 +24,7 @@ struct SharedDma {
|
||||
|
||||
void audio_dma_copy_immediate(u8* devAddr, void *vAddr, size_t nbytes);
|
||||
void audio_dma_copy_async(uintptr_t, void*, size_t, OSMesgQueue*, OSIoMesg*);
|
||||
void audio_dma_partial_copy_async(uintptr_t*, u8**, ssize_t*, OSMesgQueue*, OSIoMesg*);
|
||||
void audio_dma_partial_copy_async(uintptr_t*, u8**, size_t*, OSMesgQueue*, OSIoMesg*);
|
||||
void decrease_sample_dma_ttls(void);
|
||||
void *dma_sample_data(uintptr_t, u32, s32, u8*);
|
||||
void func_800BB030(s32);
|
||||
|
||||
+23
-23
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
#include "audio/internal.h"
|
||||
@@ -28,26 +28,26 @@ void note_set_vel_pan_reverb(struct Note *note, f32 velocity, u8 pan, u8 reverbV
|
||||
|
||||
sub->headsetPanLeft = gHeadsetPanQuantization[smallPanIndex];
|
||||
sub->headsetPanRight = gHeadsetPanQuantization[ARRAY_COUNT(gHeadsetPanQuantization) - 1 - smallPanIndex];
|
||||
sub->stereoStrongRight = FALSE;
|
||||
sub->stereoStrongLeft = FALSE;
|
||||
sub->usesHeadsetPanEffects = TRUE;
|
||||
sub->stereoStrongRight = false;
|
||||
sub->stereoStrongLeft = false;
|
||||
sub->usesHeadsetPanEffects = true;
|
||||
|
||||
volLeft = gHeadsetPanVolume[pan];
|
||||
volRight = gHeadsetPanVolume[127 - pan];
|
||||
} else if (sub->stereoHeadsetEffects && gAudioLibSoundMode == SOUND_MODE_STEREO) {
|
||||
strongRight = FALSE;
|
||||
strongLeft = FALSE;
|
||||
strongRight = false;
|
||||
strongLeft = false;
|
||||
sub->headsetPanRight = 0;
|
||||
sub->headsetPanLeft = 0;
|
||||
|
||||
sub->usesHeadsetPanEffects = FALSE;
|
||||
sub->usesHeadsetPanEffects = false;
|
||||
|
||||
volLeft = gStereoPanVolume[pan];
|
||||
volRight = gStereoPanVolume[127 - pan];
|
||||
if (pan < 0x20) {
|
||||
strongLeft = TRUE;
|
||||
strongLeft = true;
|
||||
} else if (pan > 0x60) {
|
||||
strongRight = TRUE;
|
||||
strongRight = true;
|
||||
}
|
||||
|
||||
sub->stereoStrongRight = strongRight;
|
||||
@@ -76,14 +76,14 @@ void note_set_vel_pan_reverb(struct Note *note, f32 velocity, u8 pan, u8 reverbV
|
||||
//! @bug for the change to UQ0.7, the if statement should also have been changed accordingly
|
||||
if (sub->reverbVol != reverbVol) {
|
||||
sub->reverbVol = reverbVol;
|
||||
sub->envMixerNeedsInit = TRUE;
|
||||
sub->envMixerNeedsInit = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (sub->needsInit) {
|
||||
sub->envMixerNeedsInit = TRUE;
|
||||
sub->envMixerNeedsInit = true;
|
||||
} else {
|
||||
sub->envMixerNeedsInit = FALSE;
|
||||
sub->envMixerNeedsInit = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ struct AudioBankSound *instrument_get_audio_bank_sound(struct Instrument *instru
|
||||
struct Instrument *get_instrument_inner(s32 bankId, s32 instId) {
|
||||
struct Instrument *inst;
|
||||
|
||||
if (IS_BANK_LOAD_COMPLETE(bankId) == FALSE) {
|
||||
if (IS_BANK_LOAD_COMPLETE(bankId) == false) {
|
||||
stubbed_printf("Audio: voiceman: No bank error %d\n", bankId);
|
||||
gAudioErrorFlags = bankId + 0x10000000;
|
||||
return NULL;
|
||||
@@ -155,7 +155,7 @@ struct Instrument *get_instrument_inner(s32 bankId, s32 instId) {
|
||||
struct Drum *get_drum(s32 bankId, s32 drumId) {
|
||||
struct Drum *drum;
|
||||
|
||||
if (IS_BANK_LOAD_COMPLETE(bankId) == FALSE) {
|
||||
if (IS_BANK_LOAD_COMPLETE(bankId) == false) {
|
||||
stubbed_printf("Audio: voiceman: No bank error %d\n", bankId);
|
||||
gAudioErrorFlags = bankId + 0x10000000;
|
||||
return NULL;
|
||||
@@ -196,16 +196,16 @@ void note_init(struct Note *note) {
|
||||
}
|
||||
|
||||
void note_disable(struct Note *note) {
|
||||
if (note->noteSubEu.needsInit == TRUE) {
|
||||
note->noteSubEu.needsInit = FALSE;
|
||||
if (note->noteSubEu.needsInit == true) {
|
||||
note->noteSubEu.needsInit = false;
|
||||
} else {
|
||||
note_set_vel_pan_reverb(note, 0, 0x40, 0);
|
||||
}
|
||||
note->priority = NOTE_PRIORITY_DISABLED;
|
||||
note->parentLayer = NO_LAYER;
|
||||
note->prevParentLayer = NO_LAYER;
|
||||
note->noteSubEu.enabled = FALSE;
|
||||
note->noteSubEu.finished = FALSE;
|
||||
note->noteSubEu.enabled = false;
|
||||
note->noteSubEu.finished = false;
|
||||
}
|
||||
|
||||
void process_notes(void) {
|
||||
@@ -625,7 +625,7 @@ void note_init_for_layer(struct Note *note, struct SequenceChannelLayer *seqLaye
|
||||
note->prevParentLayer = NO_LAYER;
|
||||
note->parentLayer = seqLayer;
|
||||
note->priority = seqLayer->seqChannel->notePriority;
|
||||
seqLayer->notePropertiesNeedInit = TRUE;
|
||||
seqLayer->notePropertiesNeedInit = true;
|
||||
seqLayer->status = SOUND_LOAD_STATUS_DISCARDABLE; // "loaded"
|
||||
seqLayer->note = note;
|
||||
seqLayer->seqChannel->noteUnused = note;
|
||||
@@ -639,9 +639,9 @@ void note_init_for_layer(struct Note *note, struct SequenceChannelLayer *seqLaye
|
||||
sub->sound.audioBankSound = seqLayer->sound;
|
||||
|
||||
if (instId >= 0x80) {
|
||||
sub->isSyntheticWave = TRUE;
|
||||
sub->isSyntheticWave = true;
|
||||
} else {
|
||||
sub->isSyntheticWave = FALSE;
|
||||
sub->isSyntheticWave = false;
|
||||
}
|
||||
|
||||
if (sub->isSyntheticWave) {
|
||||
@@ -693,7 +693,7 @@ struct Note *alloc_note_from_active(struct NotePool *pool, struct SequenceChanne
|
||||
func_800BD8F4(aNote, seqLayer);
|
||||
audio_list_push_back(&pool->releasing, &aNote->listItem);
|
||||
}
|
||||
|
||||
|
||||
return aNote;
|
||||
}
|
||||
|
||||
@@ -781,7 +781,7 @@ void note_init_all(void) {
|
||||
note->adsrVolScale = 0;
|
||||
note->adsr.state = ADSR_STATE_DISABLED;
|
||||
note->adsr.action = 0;
|
||||
note->vibratoState.active = FALSE;
|
||||
note->vibratoState.active = false;
|
||||
note->portamento.cur = 0.0f;
|
||||
note->portamento.speed = 0.0f;
|
||||
// This only works if NoteSynthesisBuffers are size 0xA0. See internal.h
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef AUDIO_PLAYBACK_H
|
||||
#define AUDIO_PLAYBACK_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <libultra/types.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
||||
+12
-12
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <PR/ucode.h>
|
||||
|
||||
@@ -168,7 +168,7 @@ void eu_process_audio_cmd(struct EuAudioCmd *cmd) {
|
||||
break;
|
||||
|
||||
case 0x83:
|
||||
if (gSequencePlayers[cmd->u.s.bankId].enabled != FALSE) {
|
||||
if (gSequencePlayers[cmd->u.s.bankId].enabled != false) {
|
||||
if (cmd->u2.as_s32 == 0) {
|
||||
sequence_player_disable(&gSequencePlayers[cmd->u.s.bankId]);
|
||||
}
|
||||
@@ -184,15 +184,15 @@ void eu_process_audio_cmd(struct EuAudioCmd *cmd) {
|
||||
|
||||
case 0xf1:
|
||||
for (i = 0; i < 4; i++) {
|
||||
gSequencePlayers[i].muted = TRUE;
|
||||
gSequencePlayers[i].recalculateVolume = TRUE;
|
||||
gSequencePlayers[i].muted = true;
|
||||
gSequencePlayers[i].recalculateVolume = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xf2:
|
||||
for (i = 0; i < 4; i++) {
|
||||
gSequencePlayers[i].muted = FALSE;
|
||||
gSequencePlayers[i].recalculateVolume = TRUE;
|
||||
gSequencePlayers[i].muted = false;
|
||||
gSequencePlayers[i].recalculateVolume = true;
|
||||
}
|
||||
break;
|
||||
case 0xF3:
|
||||
@@ -297,7 +297,7 @@ void func_800CBCB0(u32 arg0) {
|
||||
switch (cmd->u.s.op) {
|
||||
case 0x41:
|
||||
seqPlayer->fadeVolumeScale = cmd->u2.as_f32;
|
||||
seqPlayer->recalculateVolume = TRUE;
|
||||
seqPlayer->recalculateVolume = true;
|
||||
break;
|
||||
|
||||
case 0x47:
|
||||
@@ -313,25 +313,25 @@ void func_800CBCB0(u32 arg0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (seqPlayer->enabled != FALSE && cmd->u.s.arg2 < 0x10) {
|
||||
else if (seqPlayer->enabled != false && cmd->u.s.arg2 < 0x10) {
|
||||
chan = seqPlayer->channels[cmd->u.s.arg2];
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(chan)) {
|
||||
switch (cmd->u.s.op) {
|
||||
case 1:
|
||||
chan->volumeScale = cmd->u2.as_f32;
|
||||
chan->changes.as_bitfields.volume = TRUE;
|
||||
chan->changes.as_bitfields.volume = true;
|
||||
break;
|
||||
case 2:
|
||||
chan->volume = cmd->u2.as_f32;
|
||||
chan->changes.as_bitfields.volume = TRUE;
|
||||
chan->changes.as_bitfields.volume = true;
|
||||
break;
|
||||
case 3:
|
||||
chan->newPan = cmd->u2.as_s8;
|
||||
chan->changes.as_bitfields.pan = TRUE;
|
||||
chan->changes.as_bitfields.pan = true;
|
||||
break;
|
||||
case 4:
|
||||
chan->freqScale = cmd->u2.as_f32;
|
||||
chan->changes.as_bitfields.freqScale = TRUE;
|
||||
chan->changes.as_bitfields.freqScale = true;
|
||||
break;
|
||||
case 5:
|
||||
chan->reverbVol = cmd->u2.as_s8;
|
||||
|
||||
+65
-65
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
#include "audio/data.h"
|
||||
@@ -52,14 +52,14 @@ char seqplayer_unused_string25[] = "Group:Undefined Command\n";
|
||||
void sequence_channel_init(struct SequenceChannel *seqChannel) {
|
||||
s32 i;
|
||||
|
||||
seqChannel->enabled = FALSE;
|
||||
seqChannel->finished = FALSE;
|
||||
seqChannel->stopScript = FALSE;
|
||||
seqChannel->stopSomething2 = FALSE;
|
||||
seqChannel->hasInstrument = FALSE;
|
||||
seqChannel->stereoHeadsetEffects = FALSE;
|
||||
seqChannel->enabled = false;
|
||||
seqChannel->finished = false;
|
||||
seqChannel->stopScript = false;
|
||||
seqChannel->stopSomething2 = false;
|
||||
seqChannel->hasInstrument = false;
|
||||
seqChannel->stereoHeadsetEffects = false;
|
||||
seqChannel->transposition = 0;
|
||||
seqChannel->largeNotes = FALSE;
|
||||
seqChannel->largeNotes = false;
|
||||
seqChannel->bookOffset = 0;
|
||||
seqChannel->changes.as_u8 = 0xff;
|
||||
seqChannel->scriptState.depth = 0;
|
||||
@@ -86,7 +86,7 @@ void sequence_channel_init(struct SequenceChannel *seqChannel) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
seqChannel->soundScriptIO[i] = -1;
|
||||
}
|
||||
seqChannel->unused = FALSE;
|
||||
seqChannel->unused = false;
|
||||
init_note_lists(&seqChannel->notePool);
|
||||
}
|
||||
|
||||
@@ -109,11 +109,11 @@ s32 seq_channel_set_layer(struct SequenceChannel *seqChannel, s32 layerIndex) {
|
||||
layer->seqChannel = seqChannel;
|
||||
layer->adsr = seqChannel->adsr;
|
||||
layer->adsr.releaseRate = 0;
|
||||
layer->enabled = TRUE;
|
||||
layer->stopSomething = FALSE;
|
||||
layer->continuousNotes = FALSE;
|
||||
layer->finished = FALSE;
|
||||
layer->ignoreDrumPan = FALSE;
|
||||
layer->enabled = true;
|
||||
layer->stopSomething = false;
|
||||
layer->continuousNotes = false;
|
||||
layer->finished = false;
|
||||
layer->ignoreDrumPan = false;
|
||||
layer->portamento.mode = 0;
|
||||
layer->scriptState.depth = 0;
|
||||
layer->status = SOUND_LOAD_STATUS_NOT_LOADED;
|
||||
@@ -134,8 +134,8 @@ s32 seq_channel_set_layer(struct SequenceChannel *seqChannel, s32 layerIndex) {
|
||||
void seq_channel_layer_disable(struct SequenceChannelLayer *layer) {
|
||||
if (layer != NULL) {
|
||||
seq_channel_layer_note_decay(layer);
|
||||
layer->enabled = FALSE;
|
||||
layer->finished = TRUE;
|
||||
layer->enabled = false;
|
||||
layer->finished = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,8 +156,8 @@ void sequence_channel_disable(struct SequenceChannel *seqChannel) {
|
||||
}
|
||||
|
||||
note_pool_clear(&seqChannel->notePool);
|
||||
seqChannel->enabled = FALSE;
|
||||
seqChannel->finished = TRUE;
|
||||
seqChannel->enabled = false;
|
||||
seqChannel->finished = true;
|
||||
}
|
||||
|
||||
struct SequenceChannel *allocate_sequence_channel(void) {
|
||||
@@ -177,12 +177,12 @@ void sequence_player_init_channels(struct SequencePlayer *seqPlayer, u16 channel
|
||||
for (i = 0; i < CHANNELS_MAX; i++) {
|
||||
if (channelBits & 1) {
|
||||
seqChannel = seqPlayer->channels[i];
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqChannel) == TRUE && seqChannel->seqPlayer == seqPlayer) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqChannel) == true && seqChannel->seqPlayer == seqPlayer) {
|
||||
sequence_channel_disable(seqChannel);
|
||||
seqChannel->seqPlayer = NULL;
|
||||
}
|
||||
seqChannel = allocate_sequence_channel();
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqChannel) == FALSE) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqChannel) == false) {
|
||||
//eu_stubbed_printf_0("Audio:Track:Warning: No Free Notetrack\n");
|
||||
gAudioErrorFlags = i + 0x10000;
|
||||
seqPlayer->channels[i] = seqChannel;
|
||||
@@ -207,7 +207,7 @@ void sequence_player_disable_channels(struct SequencePlayer *seqPlayer, u16 chan
|
||||
for (i = 0; i < CHANNELS_MAX; i++) {
|
||||
if (channelBits & 1) {
|
||||
seqChannel = seqPlayer->channels[i];
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqChannel) == TRUE) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqChannel) == true) {
|
||||
if (seqChannel->seqPlayer == seqPlayer) {
|
||||
sequence_channel_disable(seqChannel);
|
||||
seqChannel->seqPlayer = NULL;
|
||||
@@ -225,12 +225,12 @@ void sequence_player_disable_channels(struct SequencePlayer *seqPlayer, u16 chan
|
||||
void sequence_channel_enable(struct SequencePlayer *seqPlayer, u8 channelIndex, void *script) {
|
||||
struct SequenceChannel *seqChannel = seqPlayer->channels[channelIndex];
|
||||
s32 i;
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqChannel) == FALSE) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqChannel) == false) {
|
||||
//stubbed_printf("SEQID %d,BANKID %d\n", seqPlayer->seqId, seqPlayer->defaultBank[0]);
|
||||
//stubbed_printf("ERR:SUBTRACK %d NOT ALLOCATED\n", channelIndex);
|
||||
} else {
|
||||
seqChannel->enabled = TRUE;
|
||||
seqChannel->finished = FALSE;
|
||||
seqChannel->enabled = true;
|
||||
seqChannel->finished = false;
|
||||
seqChannel->scriptState.depth = 0;
|
||||
seqChannel->scriptState.pc = script;
|
||||
seqChannel->delay = 0;
|
||||
@@ -245,8 +245,8 @@ void sequence_channel_enable(struct SequencePlayer *seqPlayer, u8 channelIndex,
|
||||
void sequence_player_disable(struct SequencePlayer *seqPlayer) {
|
||||
sequence_player_disable_channels(seqPlayer, 0xffff);
|
||||
note_pool_clear(&seqPlayer->notePool);
|
||||
seqPlayer->finished = TRUE;
|
||||
seqPlayer->enabled = FALSE;
|
||||
seqPlayer->finished = true;
|
||||
seqPlayer->enabled = false;
|
||||
|
||||
if (IS_SEQ_LOAD_COMPLETE(seqPlayer->seqId) && gSeqLoadStatus[seqPlayer->seqId] != 5) {
|
||||
gSeqLoadStatus[seqPlayer->seqId] = SOUND_LOAD_STATUS_DISCARDABLE;
|
||||
@@ -347,8 +347,8 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
f32 temp_f12;
|
||||
f32 temp_f2;
|
||||
|
||||
sameSound = TRUE;
|
||||
if (layer->enabled == FALSE) {
|
||||
sameSound = true;
|
||||
if (layer->enabled == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
layer->delay--;
|
||||
if (!layer->stopSomething && layer->delay <= layer->duration) {
|
||||
seq_channel_layer_note_decay(layer);
|
||||
layer->stopSomething = TRUE;
|
||||
layer->stopSomething = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -379,7 +379,7 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
|
||||
seqChannel = layer->seqChannel;
|
||||
seqPlayer = seqChannel->seqPlayer;
|
||||
layer->notePropertiesNeedInit = TRUE;
|
||||
layer->notePropertiesNeedInit = true;
|
||||
|
||||
for (;;) {
|
||||
state = &layer->scriptState;
|
||||
@@ -455,9 +455,9 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
case 0xc4: // layer_somethingon
|
||||
case 0xc5: // layer_somethingoff
|
||||
if (cmd == 0xc4) {
|
||||
layer->continuousNotes = TRUE;
|
||||
layer->continuousNotes = true;
|
||||
} else {
|
||||
layer->continuousNotes = FALSE;
|
||||
layer->continuousNotes = false;
|
||||
}
|
||||
seq_channel_layer_note_decay(layer);
|
||||
break;
|
||||
@@ -525,7 +525,7 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
break;
|
||||
|
||||
case 0xcc:
|
||||
layer->ignoreDrumPan = TRUE;
|
||||
layer->ignoreDrumPan = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -545,11 +545,11 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
|
||||
if (cmd == 0xc0) { // layer_delay
|
||||
layer->delay = m64_read_compressed_u16(state);
|
||||
layer->stopSomething = TRUE;
|
||||
layer->stopSomething = true;
|
||||
} else {
|
||||
layer->stopSomething = FALSE;
|
||||
layer->stopSomething = false;
|
||||
|
||||
if (seqChannel->largeNotes == TRUE) {
|
||||
if (seqChannel->largeNotes == true) {
|
||||
switch (cmd & 0xc0) {
|
||||
case 0x00: // layer_note0 (play percentage, velocity, duration)
|
||||
sp3A = m64_read_compressed_u16(state);
|
||||
@@ -602,7 +602,7 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
if ((seqPlayer->muted && (seqChannel->muteBehavior & MUTE_BEHAVIOR_STOP_NOTES) != 0)
|
||||
|| seqChannel->stopSomething2
|
||||
) {
|
||||
layer->stopSomething = TRUE;
|
||||
layer->stopSomething = true;
|
||||
|
||||
} else {
|
||||
s32 temp = layer->instOrWave;
|
||||
@@ -617,7 +617,7 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
|
||||
drum = get_drum(seqChannel->bankId, cmd);
|
||||
if (drum == NULL) {
|
||||
layer->stopSomething = TRUE;
|
||||
layer->stopSomething = true;
|
||||
layer->delayUnused = layer->delay;
|
||||
return;
|
||||
} else {
|
||||
@@ -634,7 +634,7 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
cmd += seqPlayer->transposition + seqChannel->transposition + layer->transposition;
|
||||
|
||||
if (cmd >= 0x80) {
|
||||
layer->stopSomething = TRUE;
|
||||
layer->stopSomething = true;
|
||||
} else {
|
||||
if (layer->instOrWave == 0xffu) {
|
||||
instrument = seqChannel->instrument;
|
||||
@@ -706,30 +706,30 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
}
|
||||
}
|
||||
|
||||
if (layer->stopSomething == TRUE) {
|
||||
if (layer->stopSomething == true) {
|
||||
if (layer->note != NULL || layer->continuousNotes) {
|
||||
seq_channel_layer_note_decay(layer);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
cmd = FALSE;
|
||||
cmd = false;
|
||||
if (!layer->continuousNotes) {
|
||||
cmd = TRUE;
|
||||
cmd = true;
|
||||
} else if (layer->note == NULL || layer->status == SOUND_LOAD_STATUS_NOT_LOADED) {
|
||||
cmd = TRUE;
|
||||
} else if (sameSound == FALSE) {
|
||||
cmd = true;
|
||||
} else if (sameSound == false) {
|
||||
seq_channel_layer_note_decay(layer);
|
||||
cmd = TRUE;
|
||||
cmd = true;
|
||||
}
|
||||
else if (layer != layer->note->parentLayer) {
|
||||
cmd = TRUE;
|
||||
cmd = true;
|
||||
}
|
||||
else if (layer->sound == NULL) {
|
||||
init_synthetic_wave(layer->note, layer);
|
||||
}
|
||||
|
||||
if (cmd != FALSE) {
|
||||
if (cmd != false) {
|
||||
layer->note = alloc_note(layer);
|
||||
}
|
||||
|
||||
@@ -764,11 +764,11 @@ void set_instrument(struct SequenceChannel *seqChannel, u8 instId) {
|
||||
} else {
|
||||
if ((seqChannel->instOrWave = get_instrument(seqChannel, instId, &seqChannel->instrument, &seqChannel->adsr)) == 0)
|
||||
{
|
||||
seqChannel->hasInstrument = FALSE;
|
||||
seqChannel->hasInstrument = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
seqChannel->hasInstrument = TRUE;
|
||||
seqChannel->hasInstrument = true;
|
||||
}
|
||||
|
||||
void sequence_channel_set_volume(struct SequenceChannel *seqChannel, u8 volume) {
|
||||
@@ -1215,16 +1215,16 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) {
|
||||
struct M64ScriptState *state;
|
||||
s32 temp32;
|
||||
|
||||
if (seqPlayer->enabled == FALSE) {
|
||||
if (seqPlayer->enabled == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (seqPlayer->bankDmaInProgress == TRUE) {
|
||||
if (seqPlayer->bankDmaInProgress == true) {
|
||||
if (osRecvMesg(&seqPlayer->bankDmaMesgQueue, NULL, 0) == -1) {
|
||||
return;
|
||||
}
|
||||
if (seqPlayer->bankDmaRemaining == 0) {
|
||||
seqPlayer->bankDmaInProgress = FALSE;
|
||||
seqPlayer->bankDmaInProgress = false;
|
||||
func_800BB584(seqPlayer->loadingBankId);
|
||||
if (gBankLoadStatus[seqPlayer->loadingBankId] != 5) {
|
||||
gBankLoadStatus[seqPlayer->loadingBankId] = 2;
|
||||
@@ -1237,11 +1237,11 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (seqPlayer->seqDmaInProgress == TRUE) {
|
||||
if (seqPlayer->seqDmaInProgress == true) {
|
||||
if (osRecvMesg(&seqPlayer->seqDmaMesgQueue, NULL, 0) == -1) {
|
||||
return;
|
||||
}
|
||||
seqPlayer->seqDmaInProgress = FALSE;
|
||||
seqPlayer->seqDmaInProgress = false;
|
||||
if (gSeqLoadStatus[seqPlayer->seqId] != 5) {
|
||||
gSeqLoadStatus[seqPlayer->seqId] = 2;
|
||||
}
|
||||
@@ -1249,9 +1249,9 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) {
|
||||
|
||||
// If discarded, bail out.
|
||||
temp32 = 2; // I beg your pardon?
|
||||
if (IS_SEQ_LOAD_COMPLETE(seqPlayer->seqId) == FALSE
|
||||
if (IS_SEQ_LOAD_COMPLETE(seqPlayer->seqId) == false
|
||||
|| (
|
||||
IS_BANK_LOAD_COMPLETE(seqPlayer->defaultBank[0]) == FALSE)) {
|
||||
IS_BANK_LOAD_COMPLETE(seqPlayer->defaultBank[0]) == false)) {
|
||||
sequence_player_disable(seqPlayer);
|
||||
return;
|
||||
}
|
||||
@@ -1457,7 +1457,7 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) {
|
||||
break;
|
||||
|
||||
case 0xd4: // seq_mute
|
||||
seqPlayer->muted = TRUE;
|
||||
seqPlayer->muted = true;
|
||||
break;
|
||||
|
||||
case 0xd3: // seq_setmutebhv
|
||||
@@ -1534,7 +1534,7 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) {
|
||||
}
|
||||
|
||||
for (i = 0; i < CHANNELS_MAX; i++) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqPlayer->channels[i]) == TRUE) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(seqPlayer->channels[i]) == true) {
|
||||
sequence_channel_process_script(seqPlayer->channels[i]);
|
||||
}
|
||||
}
|
||||
@@ -1543,7 +1543,7 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) {
|
||||
void process_sequences(UNUSED s32 iterationsRemaining) {
|
||||
s32 i;
|
||||
for (i = 0; i < SEQUENCE_PLAYERS; i++) {
|
||||
if (gSequencePlayers[i].enabled == TRUE) {
|
||||
if (gSequencePlayers[i].enabled == true) {
|
||||
sequence_player_process_sequence(&gSequencePlayers[i]);
|
||||
sequence_player_process_sound(&gSequencePlayers[i]);
|
||||
}
|
||||
@@ -1577,7 +1577,7 @@ void init_sequence_players(void) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSequenceChannels); i++) {
|
||||
gSequenceChannels[i].seqPlayer = NULL;
|
||||
gSequenceChannels[i].enabled = FALSE;
|
||||
gSequenceChannels[i].enabled = false;
|
||||
/**
|
||||
* @bug Size of wrong array. Zeroes out second half of gSequenceChannels[0],
|
||||
* all of gSequenceChannels[1..31], and part of gSequenceLayers[0].
|
||||
@@ -1597,7 +1597,7 @@ void init_sequence_players(void) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSequenceLayers); i++) {
|
||||
gSequenceLayers[i].seqChannel = NULL;
|
||||
gSequenceLayers[i].enabled = FALSE;
|
||||
gSequenceLayers[i].enabled = false;
|
||||
}
|
||||
|
||||
for (i = 0; i < SEQUENCE_PLAYERS; i++) {
|
||||
@@ -1607,10 +1607,10 @@ void init_sequence_players(void) {
|
||||
|
||||
gSequencePlayers[i].seqVariationEu[0] = -1;
|
||||
gSequencePlayers[i].muteBehavior = MUTE_BEHAVIOR_STOP_SCRIPT | MUTE_BEHAVIOR_STOP_NOTES | MUTE_BEHAVIOR_SOFTEN;
|
||||
gSequencePlayers[i].enabled = FALSE;
|
||||
gSequencePlayers[i].muted = FALSE;
|
||||
gSequencePlayers[i].bankDmaInProgress = FALSE;
|
||||
gSequencePlayers[i].seqDmaInProgress = FALSE;
|
||||
gSequencePlayers[i].enabled = false;
|
||||
gSequencePlayers[i].muted = false;
|
||||
gSequencePlayers[i].bankDmaInProgress = false;
|
||||
gSequencePlayers[i].seqDmaInProgress = false;
|
||||
init_note_lists(&gSequencePlayers[i].notePool);
|
||||
init_sequence_player(i);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef AUDIO_SEQPLAYER_H
|
||||
#define AUDIO_SEQPLAYER_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <libultra/types.h>
|
||||
|
||||
#include "audio/internal.h"
|
||||
|
||||
|
||||
+14
-10
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include "audio/synthesis.h"
|
||||
#include "audio/heap.h"
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "audio/seqplayer.h"
|
||||
#include "audio/internal.h"
|
||||
//#include "audio/external.h"
|
||||
#include "PR/abi.h"
|
||||
#include <libultra/abi.h>
|
||||
|
||||
#define aSetLoadBufferPair(pkt, c, off) \
|
||||
aSetBuffer(pkt, 0, c + DMEM_ADDR_WET_LEFT_CH, 0, DEFAULT_LEN_1CH - c); \
|
||||
@@ -127,7 +127,7 @@ void func_800B6FB4(s32 updateIndexStart, s32 noteIndex) {
|
||||
|
||||
for (i = updateIndexStart + 1; i < gAudioBufferParameters.updatesPerFrame; i++) {
|
||||
if (!gNoteSubsEu[gMaxSimultaneousNotes * i + noteIndex].needsInit) {
|
||||
gNoteSubsEu[gMaxSimultaneousNotes * i + noteIndex].enabled = FALSE;
|
||||
gNoteSubsEu[gMaxSimultaneousNotes * i + noteIndex].enabled = false;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@@ -144,9 +144,9 @@ void synthesis_load_note_subs_eu(s32 updateIndex) {
|
||||
dest = &gNoteSubsEu[gMaxSimultaneousNotes * updateIndex + i];
|
||||
if (src->enabled) {
|
||||
*dest = *src;
|
||||
src->needsInit = FALSE;
|
||||
src->needsInit = false;
|
||||
} else {
|
||||
dest->enabled = FALSE;
|
||||
dest->enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,8 @@ Acmd *synthesis_execute(Acmd *acmd, s32 *writtenCmds, s16 *aiBuf, s32 bufLen) {
|
||||
process_sequences(i - 1);
|
||||
synthesis_load_note_subs_eu(gAudioBufferParameters.updatesPerFrame - i);
|
||||
}
|
||||
aSegment(cmd++, 0, 0);
|
||||
// UTODO: Stubbed
|
||||
// aSegment(cmd++, 0, 0);
|
||||
aiBufPtr = (u32 *) aiBuf;
|
||||
for (i = gAudioBufferParameters.updatesPerFrame; i > 0; i--) {
|
||||
if (i == 1) {
|
||||
@@ -307,7 +308,7 @@ Acmd *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, Acmd *acmd, s32 upda
|
||||
}
|
||||
for (; i < notePos; i++) {
|
||||
temp = updateIndex * gMaxSimultaneousNotes;
|
||||
if (IS_BANK_LOAD_COMPLETE(gNoteSubsEu[temp + noteIndices[i]].bankId) == TRUE) {
|
||||
if (IS_BANK_LOAD_COMPLETE(gNoteSubsEu[temp + noteIndices[i]].bankId)) {
|
||||
acmd = synthesis_process_note(noteIndices[i],
|
||||
&gNoteSubsEu[temp + noteIndices[i]],
|
||||
&gNotes[noteIndices[i]].synthesisState,
|
||||
@@ -319,7 +320,8 @@ Acmd *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, Acmd *acmd, s32 upda
|
||||
|
||||
temp = bufLen * 2;
|
||||
aSetBuffer(acmd++, 0, 0, DMEM_ADDR_TEMP, temp);
|
||||
aInterleave(acmd++, DMEM_ADDR_LEFT_CH, DMEM_ADDR_RIGHT_CH);
|
||||
// UTODO: Stubbed
|
||||
// aInterleave(acmd++, DMEM_ADDR_LEFT_CH, DMEM_ADDR_RIGHT_CH);
|
||||
aSaveBuffer(acmd++, DMEM_ADDR_TEMP, VIRTUAL_TO_PHYSICAL2(aiBuf), temp * 2);
|
||||
return acmd;
|
||||
}
|
||||
@@ -672,14 +674,16 @@ GLOBAL_ASM("asm/non_matchings/audio/synthesis/synthesis_process_note.s")
|
||||
Acmd *load_wave_samples(Acmd *acmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamplesToLoad) {
|
||||
s32 a3;
|
||||
s32 repeats;
|
||||
aLoadBuffer(acmd++, VIRTUAL_TO_PHYSICAL2(noteSubEu->sound.samples), 0x1A0, 128);
|
||||
// UTODO: Stubbed
|
||||
// aLoadBuffer(acmd++, VIRTUAL_TO_PHYSICAL2(noteSubEu->sound.samples), 0x1A0, 128);
|
||||
|
||||
synthesisState->samplePosInt &= 0x3f;
|
||||
a3 = 64 - synthesisState->samplePosInt;
|
||||
if (a3 < nSamplesToLoad) {
|
||||
repeats = (nSamplesToLoad - a3 + 63) / 64;
|
||||
if (repeats != 0) {
|
||||
aDMEMMove2(acmd++, repeats, 0x1A0, 0x1A0 + 128, 128);
|
||||
// UTODO: Stubbed
|
||||
// aDMEMMove2(acmd++, repeats, 0x1A0, 0x1A0 + 128, 128);
|
||||
}
|
||||
}
|
||||
return acmd;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define AUDIO_SYNTHESIS_H
|
||||
|
||||
#include "audio/internal.h"
|
||||
#include "PR/abi.h"
|
||||
#include <libultra/gbi.h>
|
||||
|
||||
#define DEFAULT_LEN_1CH 0x180
|
||||
#define DEFAULT_LEN_2CH 0x300
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
#ifndef BUFFERS_H
|
||||
#define BUFFERS_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <libultra/types.h>
|
||||
#include <mk64.h>
|
||||
#include "common_structs.h"
|
||||
|
||||
@@ -52,7 +52,7 @@ typedef struct {
|
||||
* Appears to be a combination of 2 different palettes:
|
||||
* kart_palette contains the palette for all non-wheel elements of the kart (including the driver).
|
||||
* wheel_palette contains the palette for the wheels.
|
||||
*
|
||||
*
|
||||
* kart palette sets a defined palette based on the character while
|
||||
* wheels palette sets a dynamic palette as you drive around with the kart.
|
||||
*
|
||||
@@ -74,7 +74,7 @@ extern struct_D_802DFB80 D_802DFB80[][2][8];
|
||||
|
||||
/**
|
||||
* It would be nice to define D_802F1F80 as "struct_D_802F1F80 D_802F1F80[2][4][8]".
|
||||
* But due to register allocation issues in load_kart_palette / func_80026B4C
|
||||
* But due to register allocation issues in load_kart_palette / func_80026B4C
|
||||
* we have to define it in a different manner to match those functions.
|
||||
* If AVOID_UB is defined, the struct is properly defined with their correct pointers.
|
||||
**/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include "buffers.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include "gfx_output_buffer.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GFX_OUTPUT_BUFFER_H
|
||||
#define GFX_OUTPUT_BUFFER_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <libultra/types.h>
|
||||
|
||||
// 0x1f000 bytes, aligned to a 0x1000-byte boundary through sm64.ld. (This results
|
||||
// in a bunch of unused space: ~0x100 in JP, ~0x300 in US.)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <segments.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef RANDOM_H
|
||||
#define RANDOM_H
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
|
||||
extern u16 gRandomSeed16;
|
||||
extern u8 randomSeedPadding[];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
f32 gSineTable[] = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <common_structs.h>
|
||||
#include <defines.h>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
#define CODE_800029B0_H
|
||||
|
||||
#include <macros.h>
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <actor_types.h>
|
||||
#include "camera.h"
|
||||
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include "math_util.h"
|
||||
#include "code_80004740.h"
|
||||
#include "memory.h"
|
||||
#include <main.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include "code_80057C60.h"
|
||||
|
||||
Vec3s D_80162D70;
|
||||
@@ -91,7 +91,7 @@ void func_80004A1C(animation_type_1 *arg0, s16 *arg1, animation_type_3_triplet a
|
||||
}
|
||||
sp8C[someIndex] = arg1[arg2[someIndex].some_offset + some_offset];
|
||||
}
|
||||
|
||||
|
||||
mtxf_translate_rotate2(sp4C, sp94, sp8C);
|
||||
func_80004740(&gGfxPool->mtxHud[gMatrixHudCount], sp4C);
|
||||
D_80162D7A += 1;
|
||||
@@ -172,6 +172,6 @@ s16 func_80004DFC(animation_type_1 *arg0, animation_type_2 **arg1, s16 arg2, s16
|
||||
s16 func_80004EAC(void *addr, s16 offset) {
|
||||
uintptr_t *item = segmented_to_virtual(addr);
|
||||
struct stru_80004EAC *temp = (struct stru_80004EAC *) segmented_to_virtual((void *) item[offset]);
|
||||
|
||||
|
||||
return temp->unk8 - 1;
|
||||
}
|
||||
|
||||
+63
-67
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
|
||||
@@ -1204,19 +1204,19 @@ s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
|
||||
D_80163128[playerId] = -1;
|
||||
D_80163150[playerId] = -1;
|
||||
if (gModeSelection == 1) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (arg1 < 0) {
|
||||
return TRUE;
|
||||
return true;
|
||||
} else if (arg1 >= 4) {
|
||||
arg1 = 3;
|
||||
}
|
||||
if (D_80163330[playerId] == 1) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
player = &gPlayers[playerId];
|
||||
if (player->type & 0x4000) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
arg1_times_8 = arg1 * 8;
|
||||
temp_a3 = &D_800DCBB4[gCurrentCourseId][arg1_times_8];
|
||||
@@ -1233,9 +1233,9 @@ s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
|
||||
D_80163150[playerId] = temp_a3[0];
|
||||
}
|
||||
if (D_80163150[playerId] < temp_a2 && player->unk_094 / 18.0f * 216.0f >= 20.0f) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
progress = D_80164450[playerId] - D_80164450[D_80163478];
|
||||
rank = gGPCurrentRaceRankByPlayerId[2 + (D_80163478 * 4)];
|
||||
@@ -1253,9 +1253,9 @@ s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
|
||||
}
|
||||
D_80163150[playerId] = (gCCSelection + 1) * var_a0_2;
|
||||
if (D_80163150[playerId] < progress && player->unk_094 / 18.0f * 216.0f >= 20.0f) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
} else {
|
||||
var_a1_4 = D_80164450[(s16) *D_80163344] - D_80164450[playerId];
|
||||
if (var_a1_4 < 0) {
|
||||
@@ -1279,7 +1279,7 @@ s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
|
||||
}
|
||||
D_80164538[playerId] = var_t1;
|
||||
if (var_t1 < 0 || var_t1 >= 8) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (arg1_times_8 < 24) {
|
||||
temp_a3 = &temp_a3[var_t1];
|
||||
@@ -1290,9 +1290,9 @@ s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
|
||||
}
|
||||
D_80163128[playerId] = var_a1_4;
|
||||
if (D_80163150[playerId] < var_a1_4) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -2217,22 +2217,22 @@ void func_8000BBD8(u16 waypointIndex, f32 arg1, s16 pathIndex) {
|
||||
|
||||
path1 = &D_80164560[pathIndex][waypointIndex];
|
||||
path2 = &D_80164570[pathIndex][waypointIndex];
|
||||
|
||||
|
||||
x1 = (f32) path1->posX;
|
||||
z1 = (f32) path1->posZ;
|
||||
|
||||
|
||||
x2 = (f32) path2->posX;
|
||||
z2 = (f32) path2->posZ;
|
||||
|
||||
|
||||
waypointIndex += 1;
|
||||
waypointIndex = waypointIndex % gWaypointCountByPathIndex[pathIndex];
|
||||
|
||||
|
||||
path1 = &D_80164560[pathIndex][waypointIndex];
|
||||
path2 = &D_80164570[pathIndex][waypointIndex];
|
||||
|
||||
|
||||
x3 = (f32) path1->posX;
|
||||
z3 = (f32) path1->posZ;
|
||||
|
||||
|
||||
x4 = (f32) path2->posX;
|
||||
z4 = (f32) path2->posZ;
|
||||
|
||||
@@ -3015,13 +3015,13 @@ void func_8000DF8C(s32 bombKartId) {
|
||||
Player *var_v0;
|
||||
|
||||
bombKart = &gBombKarts[bombKartId];
|
||||
|
||||
|
||||
sp7E = bombKart->state;
|
||||
|
||||
if (sp7E == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (((bombKart->unk_4A != 1) || (gCurrentCourseId == COURSE_AWARD_CEREMONY))) {
|
||||
var_f22 = bombKart->bombPos[0];
|
||||
var_f20 = bombKart->bombPos[1];
|
||||
@@ -3357,10 +3357,10 @@ void func_8000F124(void) {
|
||||
for (j = 0; j < 2; j++) {
|
||||
D_80163348[j] = 0;
|
||||
}
|
||||
|
||||
|
||||
if (gDemoMode == 1) { return; }
|
||||
if (gModeSelection != GRAND_PRIX) { return; }
|
||||
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
|
||||
while(1) {
|
||||
@@ -3370,7 +3370,7 @@ void func_8000F124(void) {
|
||||
if (gPlayerCount < 1) { break; }
|
||||
|
||||
var_a1 = 0;
|
||||
|
||||
|
||||
for (j = 0; j < gPlayerCount; j++) {
|
||||
if (gCharacterSelections[j] == D_80163348[i]) {
|
||||
var_a1 = 1;
|
||||
@@ -3405,7 +3405,7 @@ void func_8000F2DC(void) {
|
||||
D_80163368[1] = (s32) ptr->unk2;
|
||||
D_80163368[2] = (s32) ptr->unk4;
|
||||
D_80163368[3] = (s32) ptr->unk6;
|
||||
|
||||
|
||||
temp = ptr->unk8;
|
||||
D_80163598 = get_next_available_memory_addr(temp * 4);
|
||||
|
||||
@@ -3480,7 +3480,7 @@ void func_8000F628(void) {
|
||||
for (i = 0; i < NUM_PLAYERS; i++) {
|
||||
Player *player = &gPlayerOne[i];
|
||||
|
||||
|
||||
|
||||
D_80163050[i] = 0;
|
||||
D_80162FF8[i] = 0;
|
||||
D_80163010[i] = 0;
|
||||
@@ -3534,7 +3534,7 @@ void func_8000F628(void) {
|
||||
D_80163380[i] = 6;
|
||||
if (gPlayers[i].type & PLAYER_HUMAN) {
|
||||
D_80163330[i] = 3;
|
||||
|
||||
|
||||
} else {
|
||||
D_80163330[i] = 0;
|
||||
}
|
||||
@@ -3558,7 +3558,7 @@ void func_8000F628(void) {
|
||||
D_80163344[i] = D_80164478[D_80163348[i]];
|
||||
D_80163330[ D_80163344[i] ] = 1;
|
||||
D_8016334C[ D_80163344[i] ] = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((D_8018EE08 == 1) && (gCurrentCourseId != COURSE_AWARD_CEREMONY)) {
|
||||
@@ -3570,12 +3570,12 @@ void func_8000F628(void) {
|
||||
D_80163344[0] = cameras->playerId;
|
||||
D_80163330[D_80163344[0]] = 1;
|
||||
D_8016334C[D_80163344[0]] = 0;
|
||||
|
||||
|
||||
for (i = 1; i < 2; i++) {
|
||||
D_80163344[i] = cameras[i].playerId;
|
||||
D_80163330[D_80163344[i]] = 1;
|
||||
D_8016334C[D_80163344[i]] = i;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3951,21 +3951,21 @@ s32 func_80011014(TrackWaypoint *pathDest, TrackWaypoint *path, s32 numPathPoint
|
||||
z3 = (f32) point3->posZ;
|
||||
|
||||
temp = 0.05 / (sqrtf(((x2 - x1) * (x2 - x1)) + ((z2 - z1) * (z2 - z1))) + (sqrtf(((x3 - x2) * (x3 - x2)) + ((z3 - z2) * (z3 - z2)))));
|
||||
|
||||
|
||||
for (j = 0.0f; j <= 1.0 ; j += temp) {
|
||||
|
||||
temp_f2_3 = (f32) ((1.0 - j) * 0.5 * (1.0 - j));
|
||||
z1_3 = (f32) (((1.0 - j) * j) + 0.5);
|
||||
temp_f16 = (f32) (j * 0.5 * j);
|
||||
|
||||
|
||||
temp_f24_2 = (temp_f2_3 * x1) + (z1_3 * x2) + (temp_f16 * x3);
|
||||
x1_2 = (temp_f2_3 * z1) + (z1_3 * z2) + (temp_f16 * z3);
|
||||
|
||||
|
||||
var_f30 += sqrtf(((temp_f24_2 - temp_f20) * (temp_f24_2 - temp_f20)) + ((x1_2 - temp_f22) * (x1_2 - temp_f22)));
|
||||
|
||||
|
||||
temp_f20 = temp_f24_2;
|
||||
temp_f22 = x1_2;
|
||||
|
||||
|
||||
if ((var_f30 > 20.0f) || ((i == 0) && (j == 0.0))) {
|
||||
if (gIsMirrorMode) {
|
||||
//temp_f12 = -temp_f24_2;
|
||||
@@ -3983,7 +3983,7 @@ s32 func_80011014(TrackWaypoint *pathDest, TrackWaypoint *path, s32 numPathPoint
|
||||
if (var_f20_2 < -500.0) {
|
||||
var_f20_2 = var_f28;
|
||||
} else {
|
||||
|
||||
|
||||
switch (gCurrentCourseId) {
|
||||
case 13:
|
||||
if (var_f20_2 < (var_f28 - 15.0)) {
|
||||
@@ -4072,11 +4072,11 @@ s32 func_8001168C(PathNoY *pathDest, TrackWaypoint *pathSrc, s32 numWaypoints) {
|
||||
|
||||
UNUSED s32 pad2;
|
||||
f32 temp_f24;
|
||||
|
||||
|
||||
f32 spA8;
|
||||
f32 temp_f26;
|
||||
f32 spA0;
|
||||
|
||||
|
||||
f32 temp_f2_3;
|
||||
|
||||
TrackWaypoint *point1;
|
||||
@@ -4304,9 +4304,7 @@ void func_80011EC0(s32 arg0, Player *player, s32 arg2, UNUSED u16 arg3) {
|
||||
void func_800120C8(void) {
|
||||
s32 i;
|
||||
PathNoY *temp;
|
||||
TrackWaypoint *waypoint = (TrackWaypoint *) VIRTUAL_TO_PHYSICAL2(
|
||||
gSegmentTable[SEGMENT_NUMBER2(d_course_kalimari_desert_track_unknown_waypoints)]
|
||||
+ SEGMENT_OFFSET(d_course_kalimari_desert_track_unknown_waypoints));
|
||||
TrackWaypoint *waypoint = (TrackWaypoint *) d_course_kalimari_desert_track_unknown_waypoints;
|
||||
|
||||
for (i = 0; ; i++) {
|
||||
if ((u16)waypoint[i].posX == 0x8000) {
|
||||
@@ -4320,11 +4318,9 @@ void func_800120C8(void) {
|
||||
}
|
||||
|
||||
void func_80012190(void) {
|
||||
TrackWaypoint *tree;
|
||||
TrackWaypoint *tree = d_frappe_snowland_tree;
|
||||
s32 i;
|
||||
|
||||
tree = (TrackWaypoint *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[SEGMENT_NUMBER2(d_frappe_snowland_tree)] + (SEGMENT_OFFSET(d_frappe_snowland_tree)));
|
||||
|
||||
for (i = 0; ; i++) {
|
||||
if ((u16)tree[i].posX == 0x8000) {
|
||||
break;
|
||||
@@ -4491,29 +4487,29 @@ void func_800127E0(void) {
|
||||
ptr1 = &gTrainList[i].tender;
|
||||
ptr2 = &D_80163598[waypointOffset];
|
||||
func_80012780(ptr1, ptr2, waypointOffset);
|
||||
|
||||
|
||||
waypointOffset += 4;
|
||||
ptr1 = &gTrainList[i].locomotive;
|
||||
ptr2 = &D_80163598[waypointOffset];
|
||||
func_80012780(ptr1, ptr2, waypointOffset);
|
||||
|
||||
|
||||
// Only use locomotive unless overwritten below.
|
||||
gTrainList[i].numCars = LOCOMOTIVE_ONLY;
|
||||
}
|
||||
|
||||
|
||||
// Spawn all rolling stock in single player mode.
|
||||
switch (gScreenModeSelection) {
|
||||
case SCREEN_MODE_1P: // single player
|
||||
for (i = 0; i < NUM_TRAINS; i++) {
|
||||
gTrainList[i].tender.isActive = 1;
|
||||
|
||||
|
||||
// Same line required for matching...
|
||||
for (j = 0; j < NUM_PASSENGER_CAR_ENTRIES; j++) { gTrainList[i].passengerCars[j].isActive = 1; }
|
||||
|
||||
|
||||
gTrainList[i].numCars = NUM_TENDERS + NUM_PASSENGER_CAR_ENTRIES;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
// Spawn locomotive, tender, and one passenger car in versus 2/3 player mode.
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: // multiplayer fall-through
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
@@ -4525,9 +4521,9 @@ void func_800127E0(void) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
D_80162FCC = 0;
|
||||
}
|
||||
|
||||
@@ -4683,12 +4679,12 @@ void func_80013054(void) {
|
||||
temp_f18 = 0.72017354f;
|
||||
temp_f12 = 0.42299348f;
|
||||
|
||||
if (((temp_f12 - 0.1) < temp_f16)
|
||||
if (((temp_f12 - 0.1) < temp_f16)
|
||||
&& (temp_f16 < ((((f64) gTrainList[i].numCars) * 0.01) + (temp_f12 + 0.01)))) {
|
||||
|
||||
isCrossingTriggeredByIndex[0] = 1;
|
||||
}
|
||||
if (((temp_f18 - 0.1) < temp_f16)
|
||||
if (((temp_f18 - 0.1) < temp_f16)
|
||||
&& (temp_f16 < ((((f64) gTrainList[i].numCars) * 0.01) + (temp_f18 + 0.01)))) {
|
||||
|
||||
isCrossingTriggeredByIndex[1] = 1;
|
||||
@@ -4710,9 +4706,9 @@ void func_800131DC(s32 playerId) {
|
||||
if ((!(D_801631E0[playerId] != 0))
|
||||
|| (func_800061DC(gPlayers[playerId].pos, 1000.0f, 0))) {
|
||||
|
||||
if ((isCrossingTriggeredByIndex[1] == 1)
|
||||
if ((isCrossingTriggeredByIndex[1] == 1)
|
||||
&& ((D_801637BC[1]) > 240)) {
|
||||
|
||||
|
||||
if ((D_80162FCE > 176) && (D_80162FCE < 182)) {
|
||||
D_801634D8[playerId] = 1;
|
||||
}
|
||||
@@ -4740,7 +4736,7 @@ void func_800132F4(void) {
|
||||
var_a1->position[2] = temp_a2->z;
|
||||
var_a1->waypointIndex = i * 0xB4;
|
||||
var_a1->actorIndex = -1;
|
||||
|
||||
|
||||
if (gPlayerCount >= 3) {
|
||||
var_a1->isActive = 0;
|
||||
} else {
|
||||
@@ -5031,7 +5027,7 @@ void func_80013F7C(s32 playerId, Player *player, VehicleStuff *vehicle, f32 arg3
|
||||
f32 temp_f12;
|
||||
f32 temp_f14;
|
||||
f32 temp_f22;
|
||||
|
||||
|
||||
s32 i;
|
||||
|
||||
f32 spC4;
|
||||
@@ -5040,7 +5036,7 @@ void func_80013F7C(s32 playerId, Player *player, VehicleStuff *vehicle, f32 arg3
|
||||
|
||||
if (((D_801631E0[playerId] != 1) || ((
|
||||
((player->type & PLAYER_HUMAN) != 0)) && !(player->type & PLAYER_KART_AI))) && !(player->effects & 0x01000000)) {
|
||||
|
||||
|
||||
spC4 = player->pos[0];
|
||||
spC0 = player->pos[1];
|
||||
spBC = player->pos[2];
|
||||
@@ -5052,7 +5048,7 @@ void func_80013F7C(s32 playerId, Player *player, VehicleStuff *vehicle, f32 arg3
|
||||
|
||||
if (((temp_f12) > -100.0) && ((temp_f12) < 100.0)) {
|
||||
if ((temp_f22 > -20.0) && (temp_f22 < 20.0)) {
|
||||
|
||||
|
||||
if (((temp_f14) > -100.0) && ((temp_f14) < 100.0)) {
|
||||
if (func_80006018(vehicle->position[0], vehicle->position[2], vehicle->velocity[0], vehicle->velocity[2], arg3, arg4, spC4, spBC) == (s32) 1) {
|
||||
player->soundEffects |= REVERSE_SOUND_EFFECT;
|
||||
@@ -5081,12 +5077,12 @@ void func_80013F7C(s32 playerId, Player *player, VehicleStuff *vehicle, f32 arg3
|
||||
if (((temp_f12) > -200.0) && ((temp_f12) < 200.0) && ((temp_f22 > -20.0)) && (temp_f22 < 20.0) && (
|
||||
((temp_f14) > -200.0)) && ((temp_f14) < 200.0)) {
|
||||
if (!(vehicle->someFlagsTheSequel & ((1 << playerId)))) {
|
||||
|
||||
|
||||
s32 var_s1 = 0;
|
||||
u16 path = gWaypointCountByPathIndex[0];
|
||||
u16 path = gWaypointCountByPathIndex[0];
|
||||
s32 t1;
|
||||
s32 t2;
|
||||
|
||||
|
||||
switch (D_8016347A) {
|
||||
case 0:
|
||||
t1 = func_80007BF8(vehicle->waypointIndex, gNearestWaypointByPlayerId[playerId], 10, 0, path);
|
||||
@@ -5115,9 +5111,9 @@ void func_80013F7C(s32 playerId, Player *player, VehicleStuff *vehicle, f32 arg3
|
||||
break;
|
||||
}
|
||||
if (var_s1 == 1) {
|
||||
|
||||
|
||||
u32 soundBits2 = SOUND_ARG_LOAD(0x19, 0x01, 0x70, 0x3B);
|
||||
|
||||
|
||||
switch (soundBits) {
|
||||
case SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x05):
|
||||
soundBits2 = SOUND_ARG_LOAD(0x19, 0x01, 0x70, 0x3B);
|
||||
@@ -6500,7 +6496,7 @@ void func_80019890(s32 playerId, s32 cameraId) {
|
||||
Camera *camera = camera1;
|
||||
camera += cameraId;
|
||||
camera->playerId = playerId;
|
||||
|
||||
|
||||
D_801646C0[cameraId] = 0;
|
||||
pathIndex = gPathIndexByPlayerId[playerId];
|
||||
|
||||
@@ -6863,7 +6859,7 @@ void func_8001A588(UNUSED u16 *localD_80152300, Camera *camera, Player *player,
|
||||
func_8001A518((s32) playerId, gGPCurrentRaceRankByPlayerId[playerId], 0);
|
||||
}
|
||||
if ((gModeSelection != TIME_TRIALS) && (cameraIndex == 1) && (((D_801646C8 == 260)) || (D_801646C8 == 261))) {
|
||||
|
||||
|
||||
var_v1 = 0;
|
||||
if (gPlayerCount == 2) {
|
||||
func_8001A518((s32) playerId, gGPCurrentRaceRankByPlayerId[playerId], 1);
|
||||
@@ -6986,7 +6982,7 @@ void kart_ai_decisions_branch_item(UNUSED s32 arg0, s16 *arg1, s32 arg2) {
|
||||
case ITEM_MUSHROOM:
|
||||
value = 0x1D;
|
||||
break;
|
||||
case ITEM_DOUBLE_MUSHROOM:
|
||||
case ITEM_DOUBLE_MUSHROOM:
|
||||
break;
|
||||
case ITEM_TRIPLE_MUSHROOM:
|
||||
break;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include "math_util.h"
|
||||
|
||||
+70
-70
@@ -3,9 +3,9 @@
|
||||
* @warning there are too many variables here
|
||||
*/
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "camera.h"
|
||||
@@ -113,7 +113,7 @@ s32 D_80165754;
|
||||
ThwompSpawn *gThowmpSpawnList;
|
||||
|
||||
Vec4s D_80165760;
|
||||
UNUSED s16 D_80165768;
|
||||
UNUSED s16 D_80165768;
|
||||
s8 D_8016576A;
|
||||
Vec4s D_80165770;
|
||||
UNUSED s32 D_80165778;
|
||||
@@ -151,21 +151,21 @@ s8 D_801657E2;
|
||||
s8 D_801657E3;
|
||||
s8 D_801657E4;
|
||||
s8 D_801657E5;
|
||||
bool8 D_801657E6;
|
||||
bool D_801657E6;
|
||||
u8 D_801657E7;
|
||||
bool8 D_801657E8;
|
||||
bool D_801657E8;
|
||||
UNUSED s32 D_801657EC;
|
||||
bool8 D_801657F0;
|
||||
bool D_801657F0;
|
||||
UNUSED s32 D_801657F4;
|
||||
bool8 D_801657F8;
|
||||
bool D_801657F8;
|
||||
s32 D_801657FC;
|
||||
s8 D_80165800[2];
|
||||
s32 D_80165804;
|
||||
s8 D_80165808;
|
||||
s32 D_8016580C;
|
||||
bool8 D_80165810;
|
||||
bool D_80165810;
|
||||
s32 D_80165814;
|
||||
bool8 D_80165818;
|
||||
bool D_80165818;
|
||||
s32 D_8016581C;
|
||||
s8 D_80165820;
|
||||
UNUSED s32 D_80165824;
|
||||
@@ -971,7 +971,7 @@ void func_80058F78(void) {
|
||||
render_hud_timer(PLAYER_ONE);
|
||||
draw_simplified_lap_count(PLAYER_ONE);
|
||||
func_8004EB38(0);
|
||||
if (D_801657E6 != FALSE) {
|
||||
if (D_801657E6 != false) {
|
||||
func_8004ED40(0);
|
||||
}
|
||||
}
|
||||
@@ -1044,10 +1044,10 @@ void func_800591B4(void) {
|
||||
|
||||
if (gIsHUDVisible != 0) {
|
||||
if (D_801657D8 == 0) {
|
||||
if (D_801657F0 != FALSE) {
|
||||
if (D_801657F0 != false) {
|
||||
func_800514BC();
|
||||
}
|
||||
if ((!gDemoMode) && (D_801657E8 != FALSE)) {
|
||||
if ((!gDemoMode) && (D_801657E8 != false)) {
|
||||
if (D_80165800[0] != 0) {
|
||||
func_8004EE54(0);
|
||||
if (gModeSelection != BATTLE) {
|
||||
@@ -1224,7 +1224,7 @@ void randomize_seed_from_controller(s32 arg0) {
|
||||
}
|
||||
|
||||
void func_8005994C(void) {
|
||||
D_8018D214 = TRUE;
|
||||
D_8018D214 = true;
|
||||
}
|
||||
|
||||
void func_8005995C(void) {
|
||||
@@ -1233,7 +1233,7 @@ void func_8005995C(void) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
if ((D_80165890 != 0) && (player->type & PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
player->currentItemCopy = ITEM_MUSHROOM;
|
||||
|
||||
|
||||
playerHUD[i].unk_75 = 2;
|
||||
}
|
||||
if ((player->type & PLAYER_INVISIBLE_OR_BOMB) && (player->currentItemCopy == ITEM_NONE)) {
|
||||
@@ -1258,7 +1258,7 @@ void func_80059A88(s32 playerId) {
|
||||
void func_80059AC8(void) {
|
||||
s32 i;
|
||||
|
||||
if (gIsGamePaused == FALSE) {
|
||||
if (gIsGamePaused == false) {
|
||||
func_8008C1D8(&D_80165678);
|
||||
gRaceFrameCounter++;
|
||||
for (i = 0; i < NUM_PLAYERS; i++) {
|
||||
@@ -1311,16 +1311,16 @@ void func_80059C50(void) {
|
||||
}
|
||||
|
||||
void func_80059D00(void) {
|
||||
|
||||
|
||||
func_8005A99C();
|
||||
func_8005A3C0();
|
||||
func_8005A380();
|
||||
|
||||
if (D_801657AE == 0) {
|
||||
switch (gScreenModeSelection) {
|
||||
switch (gScreenModeSelection) {
|
||||
case SCREEN_MODE_1P:
|
||||
randomize_seed_from_controller(PLAYER_ONE);
|
||||
if (D_8018D214 == FALSE) {
|
||||
if (D_8018D214 == false) {
|
||||
func_80059820(PLAYER_ONE);
|
||||
func_8005B914();
|
||||
if (!gDemoMode) {
|
||||
@@ -1420,7 +1420,7 @@ void func_8005A070(void) {
|
||||
gMatrixHudCount = 0;
|
||||
D_801655C0 = 0;
|
||||
func_80041D34();
|
||||
if (gIsGamePaused == FALSE) {
|
||||
if (gIsGamePaused == false) {
|
||||
func_8005C728();
|
||||
if (gGamestate == ENDING) {
|
||||
func_80086604();
|
||||
@@ -1497,7 +1497,7 @@ void func_8005A380(void) {
|
||||
}
|
||||
|
||||
void func_8005A3C0(void) {
|
||||
bool b = FALSE;
|
||||
bool b = false;
|
||||
if ((gGamestate != ENDING) && (gGamestate != CREDITS_SEQUENCE) && !D_8018D204) {
|
||||
switch (gPlayerCountSelection1) {
|
||||
case 1:
|
||||
@@ -1506,38 +1506,38 @@ void func_8005A3C0(void) {
|
||||
D_801657E4 = 0;
|
||||
}
|
||||
if (D_801657E4 == 2) {
|
||||
D_801657E8 = FALSE;
|
||||
D_801657E6 = FALSE;
|
||||
D_801657F0 = TRUE;
|
||||
D_801657E8 = false;
|
||||
D_801657E6 = false;
|
||||
D_801657F0 = true;
|
||||
} else if (D_801657E4 == 1) {
|
||||
D_801657E8 = FALSE;
|
||||
D_801657E6 = TRUE;
|
||||
D_801657F0 = FALSE;
|
||||
D_801657E8 = false;
|
||||
D_801657E6 = true;
|
||||
D_801657F0 = false;
|
||||
} else {
|
||||
D_801657E8 = TRUE;
|
||||
D_801657E6 = FALSE;
|
||||
D_801657F0 = FALSE;
|
||||
D_801657E8 = true;
|
||||
D_801657E6 = false;
|
||||
D_801657F0 = false;
|
||||
}
|
||||
b = TRUE;
|
||||
b = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (gModeSelection != BATTLE) {
|
||||
if (gControllerOne->buttonPressed & R_CBUTTONS) {
|
||||
D_80165800[0] = (D_80165800[0] + 1) & 1;
|
||||
b = TRUE;
|
||||
b = true;
|
||||
}
|
||||
if (gControllerTwo->buttonPressed & R_CBUTTONS) {
|
||||
D_80165800[1] = (D_80165800[1] + 1) & 1;
|
||||
b = TRUE;
|
||||
b = true;
|
||||
}
|
||||
if (D_80165800[0] && D_80165800[1]) {
|
||||
D_801657F0 = FALSE;
|
||||
D_801657F0 = false;
|
||||
} else {
|
||||
D_801657F0 = TRUE;
|
||||
D_801657F0 = true;
|
||||
}
|
||||
if (gDemoMode) {
|
||||
D_801657F0 = FALSE;
|
||||
D_801657F0 = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1549,7 +1549,7 @@ void func_8005A3C0(void) {
|
||||
D_801657F0 = (D_801657F0 + 1) & 1;
|
||||
}
|
||||
D_801657E4 = (D_801657E4 + 1) & 1;
|
||||
b = TRUE;
|
||||
b = true;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
@@ -1563,7 +1563,7 @@ void func_8005A3C0(void) {
|
||||
if (gModeSelection != BATTLE) {
|
||||
D_801657F0 = (D_801657F0 + 1) & 1;
|
||||
}
|
||||
b = TRUE;
|
||||
b = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1664,7 +1664,7 @@ void func_8005A99C(void) {
|
||||
func_8005AA34();
|
||||
}
|
||||
if (gPlayerCountSelection1 == 3) {
|
||||
D_801657E8 = TRUE;
|
||||
D_801657E8 = true;
|
||||
}
|
||||
gIsHUDVisible = (s32) 1;
|
||||
D_8018D170 = (s32) 1;
|
||||
@@ -2862,7 +2862,7 @@ void func_8005D898(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s8 arg3, UN
|
||||
|
||||
if (player->unk_22A == 1) {
|
||||
func_8005D800(&player->unk_258[10 + arg1], 0xFFFF00, 0x70);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (player->unk_22A >= 2) {
|
||||
@@ -4197,7 +4197,7 @@ void func_80062C74(Player *player, s16 arg1, UNUSED s32 arg2, UNUSED s32 arg3) {
|
||||
|
||||
void func_80062F98(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) {
|
||||
f32 temp_f0;
|
||||
|
||||
|
||||
temp_f0 = player->unk_258[10 + arg1].unk_018 / 10.0f;
|
||||
++player->unk_258[10 + arg1].unk_01E;
|
||||
player->unk_258[10 + arg1].unk_000[1] += temp_f0;
|
||||
@@ -4443,7 +4443,7 @@ void func_80063D58(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) {
|
||||
} else {
|
||||
player->unk_258[10 + arg1].unk_000[1] += 0.4;
|
||||
}
|
||||
|
||||
|
||||
if (player->unk_258[10 + arg1].unk_03E <= 0) {
|
||||
player->unk_258[10 + arg1].unk_03E = 0;
|
||||
}
|
||||
@@ -4513,7 +4513,7 @@ void func_800643A8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) {
|
||||
player->unk_258[10 + arg1].unk_01E = 0;
|
||||
player->unk_258[10 + arg1].unk_012 = 0;
|
||||
}
|
||||
|
||||
|
||||
player->unk_258[10 + arg1].unk_00C += 0.2;
|
||||
player->unk_258[10 + arg1].unk_03E -= 8;
|
||||
if (player->unk_258[10 + arg1].unk_03E <= 0) {
|
||||
@@ -4598,11 +4598,11 @@ void func_800648E4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) {
|
||||
player->unk_258[30 + arg1].unk_00C -= 0.06;
|
||||
player->unk_258[30 + arg1].unk_000[1] += 0.1;
|
||||
player->unk_258[30 + arg1].unk_03E -= 12;
|
||||
|
||||
|
||||
if (player->unk_258[30 + arg1].unk_03E <= 0) {
|
||||
player->unk_258[30 + arg1].unk_03E = 0;
|
||||
}
|
||||
|
||||
|
||||
if (player->unk_258[30 + arg1].unk_01E == 10) {
|
||||
player->unk_258[30 + arg1].unk_01C = 0;
|
||||
player->unk_258[30 + arg1].unk_01E = 0;
|
||||
@@ -4624,7 +4624,7 @@ void func_80064988(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) {
|
||||
void func_800649F4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) {
|
||||
f32 temp;
|
||||
temp = player->unk_258[30 + arg1].unk_018;
|
||||
|
||||
|
||||
player->unk_258[30 + arg1].unk_000[2] = player->unk_21C + (((-temp) * player->unk_258[30 + arg1].unk_01E) * coss(player->unk_258[30 + arg1].unk_020));
|
||||
player->unk_258[30 + arg1].unk_000[0] = player->unk_218 + (((-temp) * player->unk_258[30 + arg1].unk_01E) * sins(player->unk_258[30 + arg1].unk_020));
|
||||
player->unk_258[30 + arg1].unk_000[1] = player->pos[1] + player->unk_258[30 + arg1].unk_014;
|
||||
@@ -4636,7 +4636,7 @@ void func_800649F4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) {
|
||||
player->unk_258[30 + arg1].unk_01C = 0;
|
||||
player->unk_258[30 + arg1].unk_012 = 0;
|
||||
}
|
||||
|
||||
|
||||
if (player->unk_258[30 + arg1].unk_01E >= 9) {
|
||||
player->unk_258[30 + arg1].unk_03E -= 0x10;
|
||||
if (player->unk_258[30 + arg1].unk_03E <= 0) {
|
||||
@@ -4659,7 +4659,7 @@ void func_80064B30(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) {
|
||||
player->unk_258[30 + arg1].unk_01C = 0;
|
||||
player->unk_258[30 + arg1].unk_012 = 0;
|
||||
}
|
||||
|
||||
|
||||
player->unk_258[30 + arg1].unk_038 += 1820;
|
||||
if (player->unk_258[30 + arg1].unk_01E >= 6) {
|
||||
player->unk_258[30 + arg1].unk_03E -= 16;
|
||||
@@ -4676,7 +4676,7 @@ void func_80064C74(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) {
|
||||
} else {
|
||||
player->unk_258[30 + arg1].unk_020 -= 2184;
|
||||
}
|
||||
|
||||
|
||||
player->unk_258[30 + arg1].unk_000[2] = player->pos[2] + (coss(player->unk_258[30 + arg1].unk_020 - player->rotation[1] - player->unk_0C0) * 5.0f);
|
||||
player->unk_258[30 + arg1].unk_000[0] = player->pos[0] + (sins(player->unk_258[30 + arg1].unk_020 - player->rotation[1] - player->unk_0C0) * 5.0f);
|
||||
player->unk_258[30 + arg1].unk_000[1] = player->pos[1] - 1.0f;
|
||||
@@ -4700,14 +4700,14 @@ void func_80064DEC(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) {
|
||||
|
||||
player->unk_258[20 + arg3].unk_000[1] = player->pos[1];
|
||||
++player->unk_258[20 + arg3].unk_01E;
|
||||
|
||||
|
||||
if (player->unk_258[20 + arg3].unk_01E == 9) {
|
||||
player->unk_0B6 &= ~0x0040;
|
||||
player->unk_258[20 + arg3].unk_01C = 0;
|
||||
player->unk_258[20 + arg3].unk_01E = 0;
|
||||
player->unk_258[20 + arg3].unk_012 = 0;
|
||||
}
|
||||
|
||||
|
||||
player->unk_258[20 + arg3].unk_00C += 0.8;
|
||||
if (player->unk_258[20 + arg3].unk_00C >= (f64) 2.5) {
|
||||
player->unk_258[20 + arg3].unk_00C = 2.5f;
|
||||
@@ -4735,7 +4735,7 @@ void func_80064EA4(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) {
|
||||
void func_80064F88(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) {
|
||||
++player->unk_258[20 + arg3].unk_01E;
|
||||
player->unk_258[20 + arg3].unk_00C += 0.15;
|
||||
|
||||
|
||||
if (1.2 <= player->unk_258[20 + arg3].unk_00C) {
|
||||
player->unk_258[20 + arg3].unk_00C = 1.2f;
|
||||
}
|
||||
@@ -4755,7 +4755,7 @@ void func_80065030(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) {
|
||||
if (player->unk_258[20 + arg3].unk_00C >= (f64) 1.5) {
|
||||
player->unk_258[20 + arg3].unk_00C = 1.5f;
|
||||
}
|
||||
|
||||
|
||||
if (player->unk_258[20 + arg3].unk_01E >= 12) {
|
||||
player->unk_0B6 &= ~0x0100;
|
||||
player->unk_258[20 + arg3].unk_01C = 0;
|
||||
@@ -5789,7 +5789,7 @@ void render_battle_balloon(Player *player, s8 arg1, s16 arg2, s8 arg3) {
|
||||
gDPSetTextureLUT(gDisplayListHead++, G_TT_RGBA16);
|
||||
|
||||
func_8004B614(primRed, primGreen, primBlue, envRed, envGreen, envBlue, 0x000000D8);
|
||||
|
||||
|
||||
gDPSetRenderMode(gDisplayListHead++, AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
||||
gDPLoadTextureBlock(gDisplayListHead++, D_8018D4BC, G_IM_FMT_CI, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPVertex(gDisplayListHead++, gBalloonVertexPlane1, 4, 0);
|
||||
@@ -6055,39 +6055,39 @@ void func_8006C9B8(Player *player, s16 arg1, s8 arg2, s8 arg3) {
|
||||
case 1:
|
||||
func_800644E8(player, arg1, arg2, arg3);
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
func_800649F4(player, arg1, arg2, arg3);
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
func_80064C74(player, arg1, arg2, arg3);
|
||||
break;
|
||||
|
||||
|
||||
case 4:
|
||||
func_800647C8(player, arg1, arg2, arg3);
|
||||
break;
|
||||
|
||||
|
||||
case 5:
|
||||
func_80064B30(player, arg1, arg2, arg3);
|
||||
break;
|
||||
|
||||
|
||||
case 6:
|
||||
func_800648E4(player, arg1, arg2, arg3);
|
||||
break;
|
||||
|
||||
|
||||
case 7:
|
||||
func_80064988(player, arg1, arg2, arg3);
|
||||
break;
|
||||
|
||||
|
||||
case 8:
|
||||
func_80064C74(player, arg1, arg2, arg3);
|
||||
break;
|
||||
|
||||
|
||||
case 9:
|
||||
func_80064664(player, arg1, arg2, arg3);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -6174,7 +6174,7 @@ void func_8006CEC0(Player *arg0, s16 arg1, s8 arg2, s8 arg3) {
|
||||
} else if (((arg0->effects & 0x40000000) == 0x40000000) && (arg0->unk_0B0 < 0x32)) {
|
||||
func_80061094(arg0, arg1, sp20, arg2, arg3);
|
||||
return;
|
||||
} else if ((arg0->type & 0x4000) == 0x4000) {
|
||||
} else if ((arg0->type & 0x4000) == 0x4000) {
|
||||
if ((arg0->unk_0DE & 8) == 8) {
|
||||
func_80060F50(arg0, arg1, sp20, arg2, arg3);
|
||||
return;
|
||||
@@ -6449,7 +6449,7 @@ void func_8006DD3C(Player* arg0, s8 arg1, s8 arg2) {
|
||||
}
|
||||
|
||||
void func_8006E058(void) {
|
||||
switch (gActiveScreenMode) {
|
||||
switch (gActiveScreenMode) {
|
||||
case SCREEN_MODE_1P:
|
||||
switch (gModeSelection) {
|
||||
case GRAND_PRIX:
|
||||
@@ -6469,7 +6469,7 @@ void func_8006E058(void) {
|
||||
if ((gPlayerTwo->type & 0x100) == 0x100) {
|
||||
func_8006E420(gPlayerTwo, 1, 0);
|
||||
}
|
||||
|
||||
|
||||
if ((gPlayerThree->type & 0x100) == 0x100) {
|
||||
func_8006E420(gPlayerThree, 2, 0);
|
||||
break;
|
||||
@@ -6480,7 +6480,7 @@ void func_8006E058(void) {
|
||||
case BATTLE:
|
||||
func_8006E420(gPlayerOne, 0, 0);
|
||||
func_8006E420(gPlayerTwo, 1, 0);
|
||||
|
||||
|
||||
if (gPlayerCountSelection1 >= 3) {
|
||||
func_8006E420(gPlayerThree, 2, 0);
|
||||
}
|
||||
@@ -6496,7 +6496,7 @@ void func_8006E058(void) {
|
||||
break;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
switch (gModeSelection) {
|
||||
switch (gModeSelection) {
|
||||
case GRAND_PRIX:
|
||||
func_8006E420(gPlayerOne, 0, 0);
|
||||
func_8006E420(gPlayerTwo, 1, 0);
|
||||
@@ -6508,7 +6508,7 @@ void func_8006E058(void) {
|
||||
func_8006E420(gPlayerEight, 7, 0);
|
||||
|
||||
break;
|
||||
case VERSUS:
|
||||
case VERSUS:
|
||||
case BATTLE:
|
||||
func_8006E420(gPlayerOne, 0, 0);
|
||||
func_8006E420(gPlayerTwo, 1, 0);
|
||||
@@ -6516,7 +6516,7 @@ void func_8006E058(void) {
|
||||
break;
|
||||
case TIME_TRIALS:
|
||||
func_8006E420(gPlayerOne, 0, 0);
|
||||
|
||||
|
||||
if ((gPlayerTwo->type & 0x8000) == 0x8000) {
|
||||
func_8006E420(gPlayerTwo, 1, 0);
|
||||
break;
|
||||
@@ -6548,7 +6548,7 @@ void func_8006E420(Player* player, s8 arg1, s8 arg2) {
|
||||
if ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) {
|
||||
func_8006D194(player, arg1, arg2);
|
||||
}
|
||||
|
||||
|
||||
for (temp_s0 = 0; temp_s0 < 10; ++temp_s0) {
|
||||
func_8006CEC0(player, temp_s0, arg1, arg2);
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) || (gGamestate == ENDING)) {
|
||||
|
||||
+6
-6
@@ -333,20 +333,20 @@ extern s8 D_801657E2;
|
||||
extern s8 D_801657E3;
|
||||
extern s8 D_801657E4;
|
||||
extern s8 D_801657E5;
|
||||
extern bool8 D_801657E6;
|
||||
extern bool D_801657E6;
|
||||
extern u8 D_801657E7;
|
||||
extern bool8 D_801657E8;
|
||||
extern bool8 D_801657F0;
|
||||
extern bool8 D_801657F8;
|
||||
extern bool D_801657E8;
|
||||
extern bool D_801657F0;
|
||||
extern bool D_801657F8;
|
||||
extern s32 D_801657FC;
|
||||
|
||||
extern s8 D_80165800[2];
|
||||
extern s32 D_80165804;
|
||||
extern s8 D_80165808;
|
||||
extern s32 D_8016580C;
|
||||
extern bool8 D_80165810;
|
||||
extern bool D_80165810;
|
||||
extern s32 D_80165814;
|
||||
extern bool8 D_80165818;
|
||||
extern bool D_80165818;
|
||||
extern s32 D_8016581C;
|
||||
extern s8 D_80165820;
|
||||
extern s8 D_80165828;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include "code_80057C60.h"
|
||||
|
||||
@@ -152,13 +152,13 @@ s32 D_8018D3D4;
|
||||
s32 D_8018D3D8;
|
||||
s32 D_8018D3DC;
|
||||
//! some alpha
|
||||
s32 D_8018D3E0;
|
||||
s32 D_8018D3E0;
|
||||
//! some red
|
||||
s32 D_8018D3E4;
|
||||
s32 D_8018D3E4;
|
||||
//! some green
|
||||
s32 D_8018D3E8;
|
||||
s32 D_8018D3E8;
|
||||
//! some blue
|
||||
s32 D_8018D3EC;
|
||||
s32 D_8018D3EC;
|
||||
s32 D_8018D3F0;
|
||||
s32 D_8018D3F4;
|
||||
s32 D_8018D3F8;
|
||||
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <memory.h>
|
||||
#include <defines.h>
|
||||
@@ -67,7 +67,7 @@ void reset_object_variable(void) {
|
||||
|
||||
void func_8006EB10(void) {
|
||||
s32 i;
|
||||
|
||||
|
||||
for (i = 0; i < gObjectParticle1_SIZE; i++) {
|
||||
gObjectParticle1[i] = NULL_OBJECT_ID;
|
||||
}
|
||||
@@ -638,10 +638,10 @@ void init_clouds(CloudData *cloudList) {
|
||||
|
||||
/**
|
||||
* This function is part of the spawning for the "stars" in some stages
|
||||
*
|
||||
*
|
||||
* arg2 is a pointer to some type of spawn data for the stars, although it not super clear
|
||||
* what types each element is. It seems like its a bunch of u16's, so maybe a Vec4su?
|
||||
*
|
||||
*
|
||||
* The stars in Wario's Stadium, Toad's Turnpike, and Rainbow Road are not part of the skybox.
|
||||
* They are instead objects that seemingly hover in the air around the player
|
||||
* They have no true x/y/z position, instead they seem to be kept in a position relative to the
|
||||
@@ -694,7 +694,7 @@ void func_8007055C(void) {
|
||||
if (gPlayerCount == 1) {
|
||||
var_s4 = 0x32;
|
||||
} else {
|
||||
var_s4 = 0x19;
|
||||
var_s4 = 0x19;
|
||||
}
|
||||
for (var_s0 = 0; var_s0 < var_s4; var_s0++) {
|
||||
find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]);
|
||||
@@ -1278,7 +1278,7 @@ void init_hud_three_four_player(void) {
|
||||
playerHUD[PLAYER_TWO].lapY = 0x60;
|
||||
playerHUD[PLAYER_TWO].unk_6C = 0xC8;
|
||||
playerHUD[PLAYER_TWO].unk_6E = 0xC8;
|
||||
|
||||
|
||||
playerHUD[PLAYER_THREE].itemBoxX = -0x36;
|
||||
playerHUD[PLAYER_THREE].itemBoxY = 0x2D;
|
||||
playerHUD[PLAYER_THREE].slideItemBoxX = 0;
|
||||
@@ -1293,7 +1293,7 @@ void init_hud_three_four_player(void) {
|
||||
playerHUD[PLAYER_THREE].lapY = 0xD4;
|
||||
playerHUD[PLAYER_THREE].unk_6C = 0xDE;
|
||||
playerHUD[PLAYER_THREE].unk_6E = 0xC0;
|
||||
|
||||
|
||||
playerHUD[PLAYER_FOUR].itemBoxX = 0x175;
|
||||
playerHUD[PLAYER_FOUR].itemBoxY = 0x2D;
|
||||
playerHUD[PLAYER_FOUR].slideItemBoxX = 0;
|
||||
|
||||
+112
-112
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <common_structs.h>
|
||||
#include <mk64.h>
|
||||
@@ -45,9 +45,9 @@ void func_80086F60(s32 objectIndex) {
|
||||
}
|
||||
|
||||
bool func_80086FA4(s32 objectIndex) {
|
||||
bool ret = FALSE;
|
||||
bool ret = false;
|
||||
if (gObjectList[objectIndex].unk_0AE == 0) {
|
||||
ret = TRUE;
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -66,7 +66,7 @@ s32 func_80087060(s32 objectIndex, s32 arg1) {
|
||||
s32 sp1C;
|
||||
|
||||
sp1C = 0;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != false) {
|
||||
set_object_flag_status_true(objectIndex, 8);
|
||||
gObjectList[objectIndex].unk_0B0 = arg1;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ s32 func_80087104(s32 objectIndex, u16 arg1) {
|
||||
s32 sp24;
|
||||
|
||||
sp24 = 0;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != false) {
|
||||
set_object_flag_status_true(objectIndex, 8);
|
||||
gObjectList[objectIndex].unk_0B0 = random_int(arg1);
|
||||
}
|
||||
@@ -98,7 +98,7 @@ s32 func_800871AC(s32 objectIndex, s32 arg1) {
|
||||
s32 sp24;
|
||||
|
||||
sp24 = 0;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != false) {
|
||||
set_object_flag_status_true(objectIndex, 8);
|
||||
gObjectList[objectIndex].unk_0B0 = (s16) arg1;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ s32 func_8008789C(s32 objectIndex, s32 arg1) {
|
||||
s32 sp24;
|
||||
|
||||
sp24 = 0;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != false) {
|
||||
set_object_flag_status_true(objectIndex, 8);
|
||||
func_8008751C(objectIndex);
|
||||
gObjectList[objectIndex].unk_0B0 = arg1;
|
||||
@@ -237,7 +237,7 @@ s32 func_80087954(s32 objectIndex, s32 arg1) {
|
||||
s32 sp24;
|
||||
|
||||
sp24 = 0;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != false) {
|
||||
set_object_flag_status_true(objectIndex, 8);
|
||||
func_80087620(objectIndex);
|
||||
gObjectList[objectIndex].unk_0B0 = arg1;
|
||||
@@ -258,8 +258,8 @@ bool func_80087A0C(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, s16 arg4) {
|
||||
s16 temp_v0;
|
||||
bool sp2C;
|
||||
|
||||
sp2C = FALSE;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
|
||||
sp2C = false;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != false) {
|
||||
set_object_flag_status_true(objectIndex, 8);
|
||||
temp_v0 = arg2 - arg1;
|
||||
temp_a0 = arg4 - arg3;
|
||||
@@ -272,7 +272,7 @@ bool func_80087A0C(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, s16 arg4) {
|
||||
gObjectList[objectIndex].unk_0B0--;
|
||||
if (gObjectList[objectIndex].unk_0B0 < 0) {
|
||||
set_object_flag_status_false(objectIndex, 8);
|
||||
sp2C = TRUE;
|
||||
sp2C = true;
|
||||
} else {
|
||||
object_add_velocity_offset_xz(objectIndex);
|
||||
}
|
||||
@@ -283,7 +283,7 @@ s32 func_80087B84(s32 objectIndex, f32 arg1, f32 arg2) {
|
||||
s32 sp24;
|
||||
|
||||
sp24 = 0;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != false) {
|
||||
set_object_flag_status_true(objectIndex, 8);
|
||||
gObjectList[objectIndex].velocity[1] = -arg1;
|
||||
}
|
||||
@@ -300,7 +300,7 @@ s32 func_80087C48(s32 objectIndex, f32 arg1, f32 arg2, s32 arg3) {
|
||||
s32 sp24;
|
||||
|
||||
sp24 = 0;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != false) {
|
||||
set_object_flag_status_true(objectIndex, 8);
|
||||
gObjectList[objectIndex].velocity[1] = arg1;
|
||||
gObjectList[objectIndex].unk_0B0 = (s16) arg3;
|
||||
@@ -340,7 +340,7 @@ bool func_80087E08(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s32
|
||||
bool sp2C;
|
||||
UNUSED s32 pad;
|
||||
|
||||
sp2C = FALSE;
|
||||
sp2C = false;
|
||||
if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) {
|
||||
set_object_flag_status_true(objectIndex, 8);
|
||||
gObjectList[objectIndex].offset[2] = 0.0f;
|
||||
@@ -356,7 +356,7 @@ bool func_80087E08(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s32
|
||||
if (gObjectList[objectIndex].unk_0B0 < 0) {
|
||||
set_object_flag_status_false(objectIndex, 8);
|
||||
func_80086FD4(objectIndex);
|
||||
sp2C = TRUE;
|
||||
sp2C = true;
|
||||
} else {
|
||||
gObjectList[objectIndex].velocity[1] -= arg2;
|
||||
object_add_velocity_offset_xyz(objectIndex);
|
||||
@@ -585,10 +585,10 @@ void func_800887C0(s32 objectIndex) {
|
||||
|
||||
/**
|
||||
* @brief Returns the distance between the object and the player.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @return UNUSED
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @return UNUSED
|
||||
*/
|
||||
UNUSED s32 get_horizontal_distance_to_player(s32 objectIndex, Player *player) {
|
||||
s32 x;
|
||||
@@ -601,10 +601,10 @@ UNUSED s32 get_horizontal_distance_to_player(s32 objectIndex, Player *player) {
|
||||
|
||||
/**
|
||||
* @brief Returns the distance between the object and the player.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @return UNUSED
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @return UNUSED
|
||||
*/
|
||||
UNUSED s32 get_distance_to_player(s32 objectIndex, Player *player) {
|
||||
s32 x;
|
||||
@@ -619,10 +619,10 @@ UNUSED s32 get_distance_to_player(s32 objectIndex, Player *player) {
|
||||
|
||||
/**
|
||||
* @brief Returns the distance between the object and the camera.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @return UNUSED
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @return UNUSED
|
||||
*/
|
||||
u32 get_horizontal_distance_to_camera(s32 objectIndex, Camera *camera) {
|
||||
s32 x;
|
||||
@@ -635,10 +635,10 @@ u32 get_horizontal_distance_to_camera(s32 objectIndex, Camera *camera) {
|
||||
|
||||
/**
|
||||
* @brief Returns the distance between the object and the camera.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @return UNUSED
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @return UNUSED
|
||||
*/
|
||||
UNUSED s32 get_distance_to_camera(s32 objectIndex, Camera *camera) {
|
||||
s32 x;
|
||||
@@ -653,36 +653,36 @@ UNUSED s32 get_distance_to_camera(s32 objectIndex, Camera *camera) {
|
||||
|
||||
/**
|
||||
* @brief Returns if the object is closer than the distance to the player.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @param distance
|
||||
* @return true
|
||||
* @return false
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool is_within_horizontal_distance_of_player(s32 objectIndex, Player *player, f32 distance) {
|
||||
f32 x;
|
||||
f32 y;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[0] - player->pos[0];
|
||||
y = gObjectList[objectIndex].pos[2] - player->pos[2];
|
||||
if (((x * x) + (y * y)) <= (distance * distance)) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns if the object is between the distance_min and distance_max to the player.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @param distance_min
|
||||
* @param distance_max
|
||||
* @return true
|
||||
* @return false
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @param distance_min
|
||||
* @param distance_max
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool is_in_bounds_to_player(s32 objectIndex, Player *player, f32 distance_min, f32 distance_max) {
|
||||
f32 x;
|
||||
@@ -690,24 +690,24 @@ bool is_in_bounds_to_player(s32 objectIndex, Player *player, f32 distance_min, f
|
||||
f32 z;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[0] - player->pos[0];
|
||||
z = gObjectList[objectIndex].pos[2] - player->pos[2];
|
||||
distance = (x * x) + (z * z);
|
||||
if (((distance_min * distance_min) <= distance) && (distance <= (distance_max * distance_max))) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns if the object is closer than the distance to the player.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @param distance
|
||||
* @return true
|
||||
* @return false
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @param distance
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool is_within_distance_to_player(s32 objectIndex, Player *player, f32 distance) {
|
||||
f32 x;
|
||||
@@ -715,47 +715,47 @@ bool is_within_distance_to_player(s32 objectIndex, Player *player, f32 distance)
|
||||
f32 y;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[0] - player->pos[0];
|
||||
y = gObjectList[objectIndex].pos[1] - player->pos[1];
|
||||
z = gObjectList[objectIndex].pos[2] - player->pos[2];
|
||||
if (((x * x) + (y * y) + (z * z)) <= (distance * distance)) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns if the object is between the distance_min and distance_max to the camera.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @param distance
|
||||
* @return true
|
||||
* @return false
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @param distance
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool is_within_horizontal_distance_to_camera(s32 objectIndex, Camera *camera, f32 distance) {
|
||||
f32 x;
|
||||
f32 y;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[0] - camera->pos[0];
|
||||
y = gObjectList[objectIndex].pos[2] - camera->pos[2];
|
||||
if (((x * x) + (y * y)) <= (distance * distance)) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns if the object is between the distance_min and distance_max to the camera.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @param distance_min
|
||||
* @param distance_max
|
||||
* @return UNUSED
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @param distance_min
|
||||
* @param distance_max
|
||||
* @return UNUSED
|
||||
*/
|
||||
UNUSED bool is_within_bounds_to_camera(s32 objectIndex, Camera *camera, f32 distance_min, f32 distance_max) {
|
||||
f32 x;
|
||||
@@ -763,23 +763,23 @@ UNUSED bool is_within_bounds_to_camera(s32 objectIndex, Camera *camera, f32 dist
|
||||
f32 z;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[0] - camera->pos[0];
|
||||
z = gObjectList[objectIndex].pos[2] - camera->pos[2];
|
||||
distance = (x * x) + (z * z);
|
||||
if (((distance_min * distance_min) <= distance) && (distance <= (distance_max * distance_max))) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns if the object is closer than the distance to the camera.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @param distance
|
||||
* @return UNUSED
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param camera
|
||||
* @param distance
|
||||
* @return UNUSED
|
||||
*/
|
||||
UNUSED bool is_within_distance_to_camera(s32 objectIndex, Camera *camera, f32 distance) {
|
||||
f32 x;
|
||||
@@ -787,23 +787,23 @@ UNUSED bool is_within_distance_to_camera(s32 objectIndex, Camera *camera, f32 di
|
||||
f32 y;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[0] - camera->pos[0];
|
||||
y = gObjectList[objectIndex].pos[1] - camera->pos[1];
|
||||
z = gObjectList[objectIndex].pos[2] - camera->pos[2];
|
||||
if (((x * x) + (y * y) + (z * z)) <= (distance * distance)) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns if the object collided with the player.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @return true
|
||||
* @return false
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool has_collided_horizontally_with_player(s32 objectIndex, Player *player) {
|
||||
f32 x;
|
||||
@@ -811,23 +811,23 @@ bool has_collided_horizontally_with_player(s32 objectIndex, Player *player) {
|
||||
f32 z;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[0] - player->pos[0];
|
||||
z = gObjectList[objectIndex].pos[2] - player->pos[2];
|
||||
distance = gObjectList[objectIndex].boundingBoxSize + player->boundingBoxSize;
|
||||
if (((x * x) + (z * z)) <= (distance * distance)) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns if the object collided with the player.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @return true
|
||||
* @return false
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool has_collided_with_player(s32 objectIndex, Player *player) {
|
||||
f32 x;
|
||||
@@ -836,45 +836,45 @@ bool has_collided_with_player(s32 objectIndex, Player *player) {
|
||||
f32 y;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[0] - player->pos[0];
|
||||
y = gObjectList[objectIndex].pos[1] - player->pos[1];
|
||||
z = gObjectList[objectIndex].pos[2] - player->pos[2];
|
||||
distance = gObjectList[objectIndex].boundingBoxSize + player->boundingBoxSize;
|
||||
if (((x * x) + (y * y) + (z * z)) <= (distance * distance)) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns if the object collided with the player.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @param distance
|
||||
* @return UNUSED
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @param distance
|
||||
* @return UNUSED
|
||||
*/
|
||||
UNUSED bool has_collided_with_player_1d(s32 objectIndex, Player *player, f32 distance) {
|
||||
f32 x;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[1] - player->pos[1];
|
||||
if ((x * x) <= (distance * distance)) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns if the object collided with the player and is closer than the distance in the y axis.
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @param distance_y
|
||||
* @return true
|
||||
* @return false
|
||||
*
|
||||
* @param objectIndex
|
||||
* @param player
|
||||
* @param distance_y
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool has_collided_with_player_and_within_height(s32 objectIndex, Player *player, f32 distance_y) {
|
||||
f32 x;
|
||||
@@ -883,7 +883,7 @@ bool has_collided_with_player_and_within_height(s32 objectIndex, Player *player,
|
||||
f32 y;
|
||||
bool var_v1;
|
||||
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
x = gObjectList[objectIndex].pos[0] - player->pos[0];
|
||||
y = gObjectList[objectIndex].pos[1] - player->pos[1];
|
||||
z = gObjectList[objectIndex].pos[2] - player->pos[2];
|
||||
@@ -893,7 +893,7 @@ bool has_collided_with_player_and_within_height(s32 objectIndex, Player *player,
|
||||
y = -y;
|
||||
}
|
||||
if ((((x * x) + (z * z)) <= (distance * distance)) && (y <= distance_y)) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
@@ -914,13 +914,13 @@ UNUSED bool func_80088F94(s32 objectIndex, Player *player, f32 arg2) {
|
||||
bool var_v1;
|
||||
|
||||
distance = gObjectList[objectIndex].pos[1] - player->unk_074;
|
||||
var_v1 = FALSE;
|
||||
var_v1 = false;
|
||||
// abs(distance)
|
||||
if (distance < 0.0f) {
|
||||
distance = -distance;
|
||||
}
|
||||
if (distance <= arg2) {
|
||||
var_v1 = TRUE;
|
||||
var_v1 = true;
|
||||
}
|
||||
return var_v1;
|
||||
}
|
||||
@@ -1238,7 +1238,7 @@ s32 func_8008A060(s32 objectIndex, Camera *camera, u16 arg2) {
|
||||
|
||||
var_v1 = 0;
|
||||
temp_t3 = (((u16)camera->rot[1] - gObjectList[objectIndex].direction_angle[1]) + (arg2 >> 1));
|
||||
|
||||
|
||||
//! @warning Always true
|
||||
if ((temp_t3 >= 0) && (arg2 >= temp_t3)) {
|
||||
var_v1 = 1;
|
||||
@@ -1266,10 +1266,10 @@ bool is_object_visible_on_camera(s32 objectIndex, Camera *camera, u16 angle) {
|
||||
u16 temp_t2;
|
||||
s32 var_t0;
|
||||
|
||||
var_t0 = FALSE;
|
||||
var_t0 = false;
|
||||
temp_t2 = (get_angle_between_xy(camera->pos[0], gObjectList[objectIndex].pos[0], camera->pos[2], gObjectList[objectIndex].pos[2]) + ((s32) angle / 2)) - camera->rot[1];
|
||||
if ((temp_t2 >= 0) && (angle >= temp_t2)) {
|
||||
var_t0 = TRUE;
|
||||
var_t0 = true;
|
||||
}
|
||||
return var_t0;
|
||||
}
|
||||
|
||||
+2
-4
@@ -16,10 +16,8 @@ void func_800914A0(void) {
|
||||
UNUSED void func_800914E0(void) {
|
||||
UNUSED Vec3f sp64 = {0.0f, -20.0f, 150.0f};
|
||||
UNUSED Vec3f sp58 = {0.0f, -6.0f, 4.0f};
|
||||
uintptr_t segment = SEGMENT_NUMBER2(D_8015F718[0]);
|
||||
uintptr_t offset = SEGMENT_OFFSET(D_8015F718[0]);
|
||||
Camera *camera = &cameras[0];
|
||||
struct ActorSpawnData *sp48 = (struct ActorSpawnData *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
|
||||
struct ActorSpawnData *sp48 = D_8015F718[0];
|
||||
struct ActorSpawnData *tempData;
|
||||
|
||||
s16 temp3 = (s16) D_80152308;
|
||||
@@ -31,7 +29,7 @@ UNUSED void func_800914E0(void) {
|
||||
camera->up[0] = 0;
|
||||
camera->up[1] = 1;
|
||||
camera->up[2] = 0;
|
||||
|
||||
|
||||
if(1) {} // waa?
|
||||
|
||||
temp = temp2 - temp3;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef CODE_80091440_H
|
||||
#define CODE_80091440_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include <libultraship.h>
|
||||
|
||||
void func_80091440(s8);
|
||||
void func_800914A0(void);
|
||||
|
||||
+30
-30
@@ -1,9 +1,9 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include <defines.h>
|
||||
#include <segments.h>
|
||||
#include <PR/ultratypes.h>
|
||||
#include <libultra/types.h>
|
||||
#include <sounds.h>
|
||||
#include "code_800029B0.h"
|
||||
#include "code_80091750.h"
|
||||
@@ -1498,7 +1498,7 @@ void func_80091EE4(void) {
|
||||
if ((D_8018EDFB != 0) && (tmp == 0)) {
|
||||
temp_s2 = (gCupSelection * 4) + gCupCourseSelection;
|
||||
func_800B6708();
|
||||
|
||||
|
||||
for (temp_s0 = 0; temp_s0 < 2; ++temp_s0) {
|
||||
if ((D_8018EE10[temp_s0].ghostDataSaved != 0) && (temp_s2 == D_8018EE10[temp_s0].courseIndex)) {
|
||||
func_800B64EC(temp_s0);
|
||||
@@ -1612,7 +1612,7 @@ void func_80092290(s32 arg0, s32 *arg1, s32 *arg2) {
|
||||
if ((arg0 < 4) || (arg0 >= 6)) { return; }
|
||||
|
||||
idx = (((arg0 * 4) + ((gGlobalTimer % 2) * 2)) - 6);
|
||||
|
||||
|
||||
*arg2 += 16;
|
||||
if (*arg2 >= 256) {
|
||||
*arg2 = 0;
|
||||
@@ -2739,7 +2739,7 @@ Gfx *draw_flash_select_case(UNUSED Gfx *displayListHead, s32 ulx, s32 uly, s32 l
|
||||
if (greyscale > 0xFF) { // set max greyscale to 0xFF
|
||||
greyscale = 0xFF;
|
||||
}
|
||||
|
||||
|
||||
#if AVOID_UB
|
||||
return gDisplayListHead = draw_box_fill(gDisplayListHead, ulx, uly, lrx, lry, greyscale, greyscale, greyscale, 0xFF);
|
||||
#else
|
||||
@@ -2832,7 +2832,7 @@ void func_80095AE0(Mtx2 *arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||
arg0->u.i[1][1] = sp10.s[0];
|
||||
arg0->u.i[2][2] = 1;
|
||||
arg0->u.i[3][0] = spC.s[0];
|
||||
arg0->u.i[3][1] = sp8.s[0];
|
||||
arg0->u.i[3][1] = sp8.s[0];
|
||||
arg0->u.i[3][3] = 1;
|
||||
arg0->u.f[0][0] = sp14.s[1];
|
||||
arg0->u.f[1][1] = sp10.s[1];
|
||||
@@ -2964,7 +2964,7 @@ Gfx *func_80095E10(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4,
|
||||
|
||||
arg8 += var_t0;
|
||||
}
|
||||
|
||||
|
||||
arg8 = sp7C;
|
||||
arg9 += temp_lo;
|
||||
}
|
||||
@@ -3062,7 +3062,7 @@ Gfx *func_800963F0(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, f32 arg4,
|
||||
|
||||
argA += var_t0 * arg4;
|
||||
}
|
||||
|
||||
|
||||
argA = sp7C;
|
||||
argB += temp_lo * arg5;
|
||||
}
|
||||
@@ -3162,7 +3162,7 @@ Gfx *func_80096CD8(Gfx *displayListHead, s32 arg1, s32 arg2, u32 width, u32 arg4
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gSPTextureRectangle(displayListHead++, var_s1_3 * 4, var_fp * 4, (var_s1_3 + var_a1) * 4, (var_fp + var_v0) * 4, 0, (var_s1_3 * 32) & 0xFFFF, (var_fp * 32) & 0xFFFF, 1024, 1024);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3256,14 +3256,14 @@ Gfx *func_80097274(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4,
|
||||
} else {
|
||||
var_s2 = var_t0;
|
||||
}
|
||||
|
||||
gDPLoadMultiTile(displayListHead++, arg1, 0, G_TX_RENDERTILE, arg2, G_IM_SIZ_16b,
|
||||
argB, argC, var_a1_2, var_s3, var_a1_2 + var_s2, var_s3 + var_s4, 0,
|
||||
|
||||
gDPLoadMultiTile(displayListHead++, arg1, 0, G_TX_RENDERTILE, arg2, G_IM_SIZ_16b,
|
||||
argB, argC, var_a1_2, var_s3, var_a1_2 + var_s2, var_s3 + var_s4, 0,
|
||||
G_TX_WRAP, G_TX_WRAP, sp68, sp64, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
|
||||
gDPLoadMultiTile(displayListHead++, D_0B002A00 + random_int(128) * 2, 256, G_TX_RENDERTILE+1, arg2, G_IM_SIZ_16b,
|
||||
argB, argC, var_a1_2, var_s3, var_a1_2 + var_s2, var_s3 + var_s4, 0,
|
||||
gDPLoadMultiTile(displayListHead++, D_0B002A00 + random_int(128) * 2, 256, G_TX_RENDERTILE+1, arg2, G_IM_SIZ_16b,
|
||||
argB, argC, var_a1_2, var_s3, var_a1_2 + var_s2, var_s3 + var_s4, 0,
|
||||
G_TX_WRAP, G_TX_WRAP, sp68, sp64, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gSPTextureRectangle(displayListHead++, arg8 * 4, arg9 * 4, (arg8 + var_s2) * 4, (arg9 + var_s4) * 4, 0,
|
||||
@@ -3271,7 +3271,7 @@ Gfx *func_80097274(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4,
|
||||
|
||||
arg8 += var_t0;
|
||||
}
|
||||
|
||||
|
||||
arg8 = sp7C;
|
||||
arg9 += temp_lo;
|
||||
}
|
||||
@@ -3522,9 +3522,9 @@ void func_80099110(void) {
|
||||
|
||||
/**
|
||||
* Differs from memory.c with `+ 0x8` instead of `| 0x8`
|
||||
*
|
||||
* @param addr
|
||||
* @return void*
|
||||
*
|
||||
* @param addr
|
||||
* @return void*
|
||||
*/
|
||||
void *segmented_to_virtual_dupe(const void *addr) {
|
||||
size_t segment = (uintptr_t) addr >> 24;
|
||||
@@ -3816,9 +3816,9 @@ void func_80099AEC(void) {
|
||||
var_s4 = 0;
|
||||
var_s1 = D_8018E060;
|
||||
temp_s2 = var_s1->texture;
|
||||
|
||||
|
||||
if (temp_s2 == NULL) return;
|
||||
|
||||
|
||||
huh = temp_s2->size;
|
||||
if (huh != 0) {
|
||||
var_s0 = huh;
|
||||
@@ -3915,9 +3915,9 @@ void func_80099EC4(void) {
|
||||
var_s4 = 0;
|
||||
var_s1 = D_8018E0E8;
|
||||
temp_s2 = var_s1->mk64Texture;
|
||||
|
||||
|
||||
if (temp_s2 == NULL) return;
|
||||
|
||||
|
||||
huh = temp_s2->size;
|
||||
if (huh != 0) {
|
||||
var_s0 = huh;
|
||||
@@ -4401,11 +4401,11 @@ Gfx *func_8009B9D0(Gfx *displayListHead, MkTexture *textures) {
|
||||
bool found;
|
||||
s32 index;
|
||||
|
||||
found = FALSE;
|
||||
found = false;
|
||||
for (index = 0; index < D_8018E768_SIZE; index++) {
|
||||
if (D_8018E768[index].textures == segmented_to_virtual_dupe(textures)) {
|
||||
displayList = D_8018E768[index].displayList;
|
||||
found = TRUE;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -6443,7 +6443,7 @@ void func_800A08D8(u8 arg0, s32 column, s32 row) {
|
||||
s32 func_800A095C(char *someString, s32 len, s32 column, s32 row) {
|
||||
s32 tempColumn;
|
||||
s32 nonTerminatorCount;
|
||||
|
||||
|
||||
nonTerminatorCount = 0;
|
||||
tempColumn = column;
|
||||
for (; len != 0; len--, tempColumn += 8) {
|
||||
@@ -8003,7 +8003,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
|
||||
void func_800A6034(struct_8018D9E0_entry *arg0) {
|
||||
char *text;
|
||||
|
||||
if (D_801657E8 != TRUE) {
|
||||
if (D_801657E8 != true) {
|
||||
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, arg0->unk1C);
|
||||
text = gCupNames[D_800DC540];
|
||||
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_2);
|
||||
@@ -10014,7 +10014,7 @@ struct_8018D9E0_entry *func_800AAE68(void) {
|
||||
}
|
||||
|
||||
// Something VERY wrong has occurred
|
||||
while(TRUE);
|
||||
while(true);
|
||||
escape:
|
||||
return entry;
|
||||
}
|
||||
@@ -10034,7 +10034,7 @@ struct_8018D9E0_entry *func_800AAEB4(s32 arg0) {
|
||||
}
|
||||
|
||||
// Something VERY wrong has occurred
|
||||
while(TRUE);
|
||||
while(true);
|
||||
escape:
|
||||
return entry;
|
||||
}
|
||||
@@ -10044,7 +10044,7 @@ escape:
|
||||
* search for. If no entry with that "type" is found, this
|
||||
* function will enter a `while(1)` loop, hard-locking the
|
||||
* game.
|
||||
*
|
||||
*
|
||||
* In practice this never appears to happen, but that is
|
||||
* probably as much a matter of luck as it is good
|
||||
* reasoning on the original author(s) part.
|
||||
@@ -10058,7 +10058,7 @@ struct_8018D9E0_entry *find_8018D9E0_entry_dupe(s32 arg0) {
|
||||
}
|
||||
|
||||
// Something VERY wrong has occurred
|
||||
while(TRUE);
|
||||
while(true);
|
||||
escape:
|
||||
return entry;
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
|
||||
@@ -91,7 +91,7 @@ void func_800AFC54(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4[3]) {
|
||||
|
||||
a1 = &arg0[arg1];
|
||||
a2 = &arg0[arg2];
|
||||
a3 = &arg0[arg3];
|
||||
a3 = &arg0[arg3];
|
||||
|
||||
saved1 = a2->v.ob[0];
|
||||
saved2 = a2->v.ob[1];
|
||||
@@ -185,7 +185,7 @@ void func_800AFF58(Vtx *arg0) {
|
||||
UNUSED u32 pad88[26];
|
||||
s32 i, j;
|
||||
s16 sp40[12][3];
|
||||
|
||||
|
||||
for (i = 0, j = 0; i < ARRAY_COUNT(sp40); i++, j += 4) {
|
||||
func_800AFC54(&arg0[j], 1, 2, 0, sp40[i]);
|
||||
}
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include <stdarg.h>
|
||||
@@ -99,11 +99,11 @@ GLOBAL_ASM("asm/non_matchings/crash_screen/crash_screen_draw_square.s")
|
||||
* Line 1: threadId - address of faulted instruction - error code
|
||||
* Line 2: Address in the return address register
|
||||
* Line 3: Machine code of faulted instruction
|
||||
*
|
||||
*
|
||||
* The R4300i manual discusses exceptions in more depth.
|
||||
*
|
||||
* @param framebuffer
|
||||
* @param faulted thread
|
||||
*
|
||||
* @param framebuffer
|
||||
* @param faulted thread
|
||||
**/
|
||||
|
||||
// 0xRGBA
|
||||
@@ -203,16 +203,16 @@ void thread9_crash_screen(UNUSED void *arg0)
|
||||
osSetEventMesg(10, &D_80162D40, (OSMesg) 16);
|
||||
sButtonSequenceIndex = 0;
|
||||
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
osRecvMesg(&D_80162D40, &mesg, 1);
|
||||
thread = get_faulted_thread();
|
||||
|
||||
|
||||
if (thread) {
|
||||
// Run only on the first iteration.
|
||||
if (sCounter == 0) {
|
||||
crash_screen_draw_square(pFramebuffer);
|
||||
#ifndef DEBUG
|
||||
while(TRUE)
|
||||
while(true)
|
||||
{
|
||||
read_controllers();
|
||||
|
||||
@@ -235,9 +235,9 @@ void thread9_crash_screen(UNUSED void *arg0)
|
||||
#else
|
||||
crash_screen_draw_info(pFramebuffer, thread);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
if (sCounter < 5) {
|
||||
if (sCounter < 5) {
|
||||
sCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef CRASH_SCREEN_H
|
||||
#define CRASH_SCREEN_H
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
extern u16 *pFramebuffer;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <macros.h>
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/types.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include "data_segment2.h"
|
||||
#include <assets/startup_logo.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef SOME_DATA_H
|
||||
#define SOME_DATA_H
|
||||
|
||||
#include "PR/gbi.h"
|
||||
#include <libultra/gbi.h>
|
||||
#include "spline.h"
|
||||
#include "data/other_textures.h"
|
||||
#include "objects.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef DATA_SEGMENT2_H
|
||||
#define DATA_SEGMENT2_H
|
||||
|
||||
#include <PR/gbi.h>
|
||||
#include <libultra/gbi.h>
|
||||
|
||||
extern Vtx D_02007B38[];
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
#include <segments.h>
|
||||
#include <sounds.h>
|
||||
#include "buffers/trig_tables.h"
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <vehicles.h>
|
||||
#include <waypoints.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include <stdarg.h>
|
||||
@@ -126,9 +126,9 @@ void crash_screen_print(s32 x, s32 y, const char *fmt, ...) {
|
||||
|
||||
void crash_screen_sleep(s32 ms) {
|
||||
u64 cycles = ms * 1000LL * osClockRate / 1000000ULL;
|
||||
osSetTime(0);
|
||||
while (osGetTime() < cycles) {
|
||||
}
|
||||
// osSetTime(0);
|
||||
// while (osGetTime() < cycles) {
|
||||
// }
|
||||
}
|
||||
|
||||
void crash_screen_print_float_reg(s32 x, s32 y, s32 regNum, void *addr) {
|
||||
@@ -215,6 +215,6 @@ void crash_screen_draw(OSThread* thread) {
|
||||
crash_screen_print_float_reg(120, 210, 26, &tc->fp26.f.f_even);
|
||||
crash_screen_print_float_reg(210, 210, 28, &tc->fp28.f.f_even);
|
||||
crash_screen_print_float_reg(30, 220, 30, &tc->fp30.f.f_even);
|
||||
osViBlack(FALSE);
|
||||
osViBlack(false);
|
||||
osViSwapBuffer(pFramebuffer);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CRASH_SCREEN_ENHANCEMENT_H
|
||||
#define CRASH_SCREEN_ENHANCEMENT_H
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
void crash_screen_draw(OSThread* thread);
|
||||
|
||||
+13
-13
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <debug.h>
|
||||
#include "debug.inc.c"
|
||||
#include <libc/stdio.h>
|
||||
@@ -82,14 +82,14 @@ static u32 variable_to_u64(variableWatchAttributes *attribute) {
|
||||
u32 variable;
|
||||
|
||||
switch (attribute->variableSize) {
|
||||
case sizeof(u8):
|
||||
case sizeof(u8):
|
||||
variable = *((u8*) attribute->variablePointer);
|
||||
break;
|
||||
case sizeof(u16):
|
||||
case sizeof(u16):
|
||||
variable = *((u16*) attribute->variablePointer);
|
||||
break;
|
||||
case sizeof(u32):
|
||||
case sizeof(u64):
|
||||
case sizeof(u64):
|
||||
variable = *((u32*) attribute->variablePointer); // no floating point rounding
|
||||
break;
|
||||
default:
|
||||
@@ -103,7 +103,7 @@ static void round_up_float(u32 *variable, u8 variableSize) {
|
||||
switch (variableSize) {
|
||||
case sizeof(u64):
|
||||
case sizeof(u32):
|
||||
*variable = (u32) (*(f32*) &*variable);
|
||||
*variable = (u32) (*(f32*) &*variable);
|
||||
break;
|
||||
default:
|
||||
sDisplayListState = BAD;
|
||||
@@ -131,7 +131,7 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
|
||||
switch (variableSize) {
|
||||
case sizeof(u8):
|
||||
signedVariable = (s8) variable;
|
||||
if (signedVariable < 0) {
|
||||
if (signedVariable < 0) {
|
||||
signedVariable = -signedVariable;
|
||||
variable = (u8) signedVariable;
|
||||
*bufferedString = '-';
|
||||
@@ -150,7 +150,7 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
|
||||
case sizeof(u32):
|
||||
case sizeof(u64):
|
||||
signedVariable = (s32) variable;
|
||||
if (signedVariable < 0) {
|
||||
if (signedVariable < 0) {
|
||||
signedVariable = -signedVariable;
|
||||
variable = (u32) signedVariable;
|
||||
*bufferedString = '-';
|
||||
@@ -164,11 +164,11 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
|
||||
|
||||
// convert u64 into a string but it gets put in reverse
|
||||
if (base != HEXIDECIMAL) {
|
||||
do {
|
||||
do {
|
||||
stringLength++;
|
||||
*bufferedString = variable % base + '0';
|
||||
bufferedString++;
|
||||
variable /= base;
|
||||
variable /= base;
|
||||
} while (variable != 0);
|
||||
} else {
|
||||
do {
|
||||
@@ -186,8 +186,8 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
|
||||
} while (variable != 0);
|
||||
}
|
||||
|
||||
bufferedString -= stringLength;
|
||||
upperIndex = stringLength - 1;
|
||||
bufferedString -= stringLength;
|
||||
upperIndex = stringLength - 1;
|
||||
|
||||
// flip string 4321 --> 1234
|
||||
for (lowerIndex = 0; lowerIndex < stringLength >> 1; lowerIndex++) {
|
||||
@@ -228,7 +228,7 @@ static void u64_to_string(variableWatchAttributes *attribute, u32 variable, u8 b
|
||||
|
||||
static u32 _strlen(const char *str) {
|
||||
u32 len;
|
||||
|
||||
|
||||
len = 0;
|
||||
for (; *str != '\0'; str++) {
|
||||
len++;
|
||||
@@ -245,7 +245,7 @@ static void _memcpy(char *destStr, const char *copyStr, u32 copySize) {
|
||||
*destStr = *copyStr;
|
||||
destStr++;
|
||||
copyStr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <debug.h>
|
||||
#include "all_variables.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
extern s32 gGlobalTimer;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Edit this to edit what displays on the screen while the DVDL is active.
|
||||
* The Size of the structure array is calculated at compile time.
|
||||
*/
|
||||
@@ -14,42 +14,42 @@ variableWatchAttributes gMainVariableWatchList[] = {
|
||||
{
|
||||
"Global Timer: ",
|
||||
&gGlobalTimer,
|
||||
sizeof(gGlobalTimer),
|
||||
sizeof(gGlobalTimer),
|
||||
DISPLAY_DECIMAL_NUMBER | DISPLAY_SIGNED_NUMBER,
|
||||
0, 0
|
||||
},
|
||||
{
|
||||
"Actors: ",
|
||||
&gNumActors,
|
||||
sizeof(gNumActors),
|
||||
sizeof(gNumActors),
|
||||
DISPLAY_DECIMAL_NUMBER,
|
||||
0, 0
|
||||
},
|
||||
{
|
||||
"Player Type: ",
|
||||
&gPlayers[0].type,
|
||||
sizeof(gPlayerOne->type),
|
||||
sizeof(gPlayerOne->type),
|
||||
DISPLAY_HEXIDECIMAL_NUMBER,
|
||||
0, 0
|
||||
},
|
||||
{
|
||||
"X ",
|
||||
&gPlayers[0].pos[0],
|
||||
sizeof(gPlayerOne->pos[0]),
|
||||
sizeof(gPlayerOne->pos[0]),
|
||||
DISPLAY_FLOAT_NUMBER,
|
||||
0, 0
|
||||
},
|
||||
{
|
||||
"Y ",
|
||||
&gPlayers[0].pos[1],
|
||||
sizeof(gPlayerOne->pos[1]),
|
||||
sizeof(gPlayerOne->pos[1]),
|
||||
DISPLAY_FLOAT_NUMBER,
|
||||
0, 0
|
||||
},
|
||||
{
|
||||
"Z ",
|
||||
&gPlayers[0].pos[2],
|
||||
sizeof(gPlayerOne->pos[2]),
|
||||
sizeof(gPlayerOne->pos[2]),
|
||||
DISPLAY_FLOAT_NUMBER,
|
||||
0, 0
|
||||
},
|
||||
|
||||
+43
-43
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <decode.h>
|
||||
#include <mk64.h>
|
||||
@@ -186,14 +186,14 @@ void clean_effect(Player *player, s8 arg1) {
|
||||
if ((player->effects & 0x400) == 0x400) {
|
||||
func_8008C6D0(player, arg1);
|
||||
}
|
||||
|
||||
|
||||
if (((player->effects & 0x80) == 0x80) || (player->effects & 0x40) == 0x40) {
|
||||
func_8008C8C4(player, arg1);
|
||||
}
|
||||
if ((player->effects & 0x800) == 0x800) {
|
||||
func_8008D0E4(player, arg1);
|
||||
}
|
||||
if ((player->unk_044 & 0x4000) != 0) {
|
||||
if ((player->unk_044 & 0x4000) != 0) {
|
||||
func_8008D3B0(player, arg1);
|
||||
}
|
||||
if ((player->effects & BOOST_EFFECT) == BOOST_EFFECT) {
|
||||
@@ -311,7 +311,7 @@ void func_8008C73C(Player *player, s8 arg1) {
|
||||
D_80165190[3][arg1] = 1;
|
||||
D_80165280[arg1] = player->currentSpeed;
|
||||
gTimerBoostTripleACombo[arg1] = 0;
|
||||
gIsPlayerTripleAButtonCombo[arg1] = FALSE;
|
||||
gIsPlayerTripleAButtonCombo[arg1] = false;
|
||||
gCountASwitch[arg1] = 0;
|
||||
gFrameSinceLastACombo[arg1] = 0;
|
||||
D_8018D920[arg1] = 0;
|
||||
@@ -340,7 +340,7 @@ void func_8008C8C4(Player* player, s8 playerId) {
|
||||
|
||||
player->unk_046 &= 0xFFBF;
|
||||
|
||||
if ((gIsPlayerTripleAButtonCombo[playerId] == TRUE) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
if ((gIsPlayerTripleAButtonCombo[playerId] == true) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
player->currentSpeed = (f32) (player->currentSpeed + 100.0f);
|
||||
}
|
||||
if ((gModeSelection == VERSUS) && ((player->type & PLAYER_KART_AI) == PLAYER_KART_AI) && (!gDemoMode) && ((player->unk_0CA & 2) == 0) && (gGPCurrentRaceRankByPlayerId[playerId] != 0)) {
|
||||
@@ -394,7 +394,7 @@ void func_8008C9EC(Player *player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == TRUE) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == true) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
gTimerBoostTripleACombo[arg1] = 0x00000078;
|
||||
if (player->currentSpeed <= 90.0f) {
|
||||
player->currentSpeed = 90.0f;
|
||||
@@ -410,7 +410,7 @@ void func_8008CDC0(Player* player, s8 arg1) {
|
||||
player->unk_0B8 = 3.0f;
|
||||
player->unk_0AC = 1;
|
||||
player->effects &= ~0x10;
|
||||
|
||||
|
||||
if (((player->unk_07C >> 0x10) >= 0x14) || ((player->unk_07C >> 0x10) < -0x13) || (((player->unk_094 / 18.0f) * 216.0f) <= 30.0f) || ((player->effects & 8) != 0) || (((player->type & PLAYER_HUMAN) == 0) && ((player->effects & 0x1000) == 0))) {
|
||||
func_8008C73C(player, arg1);
|
||||
}
|
||||
@@ -548,7 +548,7 @@ void apply_boost_sound_effect(Player* player, s8 arg1) {
|
||||
player->soundEffects &= ~BOOST_SOUND_EFFECT;
|
||||
player->unk_DB4.unk0 = 0;
|
||||
player->unk_DB4.unk8 = 8.0f;
|
||||
|
||||
|
||||
if (D_8015F890 != 1) {
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800C9250(arg1);
|
||||
@@ -575,7 +575,7 @@ void apply_boost_effect(Player* player) {
|
||||
} else {
|
||||
move_f32_towards(&player->boostPower, 0.0f, 0.1f);
|
||||
}
|
||||
|
||||
|
||||
if (player->boostPower <= 1.0f) {
|
||||
player->effects &= ~BOOST_EFFECT;
|
||||
}
|
||||
@@ -613,7 +613,7 @@ void func_8008D570(Player *player, s8 arg1) {
|
||||
|
||||
void func_8008D698(Player* player, s8 arg1) {
|
||||
s16 temp;
|
||||
|
||||
|
||||
if (player->unk_0B2 == 0) {
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
temp = 0;
|
||||
@@ -758,7 +758,7 @@ void apply_hit_effect(Player* player, s8 arg1) {
|
||||
player->currentSpeed = 0.0f;
|
||||
if ((player->unk_110.unk3C[2] >= 600.0f) || ((player->effects & 0x1000) != 0)) { D_8018D990[arg1] = 3; } // placed block on same line to match
|
||||
|
||||
switch (D_8018D990[arg1]) {
|
||||
switch (D_8018D990[arg1]) {
|
||||
case 0:
|
||||
player->unk_DB4.unk10 = 4.5f;
|
||||
if (player->unk_238 < 0x3D) {
|
||||
@@ -792,7 +792,7 @@ void apply_hit_effect(Player* player, s8 arg1) {
|
||||
player->unk_DB4.unk10 = 4.5f;
|
||||
player->pos[1] += 0.13;
|
||||
++player->unk_238;
|
||||
|
||||
|
||||
if ((player->unk_046 & 0x80) != 0) {
|
||||
if (player->unk_238 >= 0x32) {
|
||||
D_8018D990[arg1] = 2;
|
||||
@@ -868,9 +868,9 @@ void apply_hit_rotating_sound_effect(Player* player, s8 arg1) {
|
||||
player->unk_0AE = player->rotation[1];
|
||||
player->unk_0B2 = 2;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_07C = 0;
|
||||
player->unk_07C = 0;
|
||||
player->unk_078 = 0;
|
||||
|
||||
|
||||
D_80165190[0][arg1] = 1;
|
||||
D_80165190[1][arg1] = 1;
|
||||
D_80165190[2][arg1] = 1;
|
||||
@@ -942,18 +942,18 @@ void apply_lightning_effect(Player *player, s8 arg1) {
|
||||
void remove_lightning_effect(Player* player, UNUSED s8 arg1) {
|
||||
move_f32_towards(&player->size, 1.0f, 0.1f);
|
||||
move_f32_towards(&player->boundingBoxSize, gKartBoundingBoxSizeTable[player->characterId], 0.1f);
|
||||
|
||||
|
||||
player->effects &= ~LIGHTNING_EFFECT;
|
||||
player->size = 1.0f;
|
||||
player->boundingBoxSize = gKartBoundingBoxSizeTable[player->characterId];
|
||||
player->unk_DB4.unk10 = 3.0f;
|
||||
player->unk_DB4.unk2 = 0;
|
||||
player->effects |= 0x08000000;
|
||||
|
||||
|
||||
if ((player->effects & 0x20000) == 0x20000) {
|
||||
player->rotation[1] = player->unk_0AE;
|
||||
}
|
||||
|
||||
|
||||
player->effects &= ~0x20000;
|
||||
}
|
||||
|
||||
@@ -985,7 +985,7 @@ void func_8008E4A4(Player* player, s8 arg1) {
|
||||
player->unk_042 = 0;
|
||||
player->type &= ~0x80;
|
||||
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == TRUE) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == true) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
player->currentSpeed += 100.0f;
|
||||
}
|
||||
if (gModeSelection == BATTLE) {
|
||||
@@ -1008,7 +1008,7 @@ void func_8008E4A4(Player* player, s8 arg1) {
|
||||
if (gModeSelection == BATTLE) {
|
||||
func_8006B8B4(player, arg1);
|
||||
}
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == TRUE) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == true) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
player->currentSpeed += 100.0f;
|
||||
}
|
||||
|
||||
@@ -1055,7 +1055,7 @@ void apply_reverse_sound_effect(Player *player, s8 arg1)
|
||||
player->soundEffects &= ~(REVERSE_SOUND_EFFECT | 0x80000);
|
||||
player->unk_0B6 |= 0x40;
|
||||
gTimerBoostTripleACombo[arg1] = 0;
|
||||
gIsPlayerTripleAButtonCombo[arg1] = FALSE;
|
||||
gIsPlayerTripleAButtonCombo[arg1] = false;
|
||||
gCountASwitch[arg1] = 0;
|
||||
gFrameSinceLastACombo[arg1] = 0;
|
||||
}
|
||||
@@ -1096,7 +1096,7 @@ void apply_hit_by_item_effect(Player *player, s8 arg1) {
|
||||
D_80165190[2][arg1] = 1;
|
||||
player->unk_042 = 0;
|
||||
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == TRUE) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == true) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
player->currentSpeed += 100.0f;
|
||||
}
|
||||
|
||||
@@ -1116,7 +1116,7 @@ void apply_hit_by_item_effect(Player *player, s8 arg1) {
|
||||
D_80165190[2][arg1] = 1;
|
||||
D_80165190[3][arg1] = 1;
|
||||
player->unk_042 = 0;
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == TRUE) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
if ((gIsPlayerTripleAButtonCombo[arg1] == true) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
player->currentSpeed += 100.0f;
|
||||
}
|
||||
|
||||
@@ -1142,20 +1142,20 @@ void apply_hit_by_item_sound_effect(Player* player, s8 arg1) {
|
||||
player->unk_236 = 4;
|
||||
player->unk_042 = 0;
|
||||
player->unk_0E0 = 0;
|
||||
|
||||
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008005);
|
||||
func_800C9060(arg1, SOUND_ACTION_EXPLOSION);
|
||||
} else {
|
||||
func_800098FC(arg1, player);
|
||||
}
|
||||
|
||||
|
||||
player->effects |= HIT_BY_ITEM_EFFECT;
|
||||
player->unk_0B6 |= 0x40;
|
||||
player->soundEffects &= ~0x01000002;
|
||||
|
||||
gTimerBoostTripleACombo[arg1] = 0;
|
||||
gIsPlayerTripleAButtonCombo[arg1] = FALSE;
|
||||
gIsPlayerTripleAButtonCombo[arg1] = false;
|
||||
gCountASwitch[arg1] = 0;
|
||||
gFrameSinceLastACombo[arg1] = 0;
|
||||
}
|
||||
@@ -1247,7 +1247,7 @@ void apply_boost_ramp_wood_effect(Player* player) {
|
||||
} else {
|
||||
move_f32_towards(&player->boostPower, 300.0f, 0.1f);
|
||||
}
|
||||
|
||||
|
||||
if (player->boostPower <= 1.0f) {
|
||||
player->effects &= ~BOOST_RAMP_WOOD_EFFECT;
|
||||
player->boostPower = 0.0f;
|
||||
@@ -1268,10 +1268,10 @@ void func_8008F104(Player* player, s8 arg1) {
|
||||
player->unk_0B2 = 2;
|
||||
player->unk_0C0 = 0;
|
||||
player->unk_07C = 0;
|
||||
player->effects |= 0x4000;
|
||||
player->effects |= 0x4000;
|
||||
player->unk_078 = 0;
|
||||
D_8018D920[arg1] = -0x8000;
|
||||
|
||||
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) && ((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008003);
|
||||
}
|
||||
@@ -1358,13 +1358,13 @@ void func_8008F494(Player* player, s8 arg1) {
|
||||
|
||||
clean_effect(player, arg1);
|
||||
func_8008F86C(player, arg1);
|
||||
|
||||
|
||||
player->unk_0A8 = 0;
|
||||
player->effects |= 0x10000;
|
||||
player->effects &= ~0x10;
|
||||
player->unk_236 = 0x1E;
|
||||
player->unk_042 = 0;
|
||||
|
||||
|
||||
if (((player->type & PLAYER_HUMAN) != 0) &&
|
||||
((player->type & PLAYER_INVISIBLE_OR_BOMB) == 0) &&
|
||||
((player->unk_0CA & 2) == 0) &&
|
||||
@@ -1380,7 +1380,7 @@ void func_8008F5A4(Player* player, s8 arg1) {
|
||||
func_8006B8B4(player, arg1);
|
||||
player->unk_044 &= ~0x8000;
|
||||
}
|
||||
|
||||
|
||||
player->unk_206 = 0;
|
||||
player->slopeAccel = 0;
|
||||
player->effects &= ~0x10000;
|
||||
@@ -1453,7 +1453,7 @@ void apply_boo_effect(Player* arg0, s8 arg1) {
|
||||
tmp = ((s32) gCourseTimer) - D_8018D950[arg1];
|
||||
if (tmp < 7) {
|
||||
arg0->unk_0C6 -= 2;
|
||||
|
||||
|
||||
if (arg0->unk_0C6 < 0x61) {
|
||||
arg0->unk_0C6 = 0x60;
|
||||
}
|
||||
@@ -1489,7 +1489,7 @@ void apply_boo_sound_effect(Player* player, s8 arg1) {
|
||||
|
||||
if ((player->type & PLAYER_HUMAN) != 0) {
|
||||
player->unk_044 |= 0x200;
|
||||
|
||||
|
||||
for (temp_v1 = 0; temp_v1 < 10; ++temp_v1) {
|
||||
player->unk_258[temp_v1].unk_01C = 0;
|
||||
player->unk_258[temp_v1].unk_01E = 0;
|
||||
@@ -1549,7 +1549,7 @@ void func_8008FC64(Player* player, s8 arg1) {
|
||||
player->soundEffects &= 0xFBFFFFFF;
|
||||
player->soundEffects |= 0x08000000;
|
||||
player->type |= PLAYER_UNKNOWN_0x40;
|
||||
|
||||
|
||||
func_8008FDA8(player, arg1);
|
||||
func_800569F4(arg1);
|
||||
}
|
||||
@@ -1567,7 +1567,7 @@ void func_8008FCDC(Player* player, s8 arg1) {
|
||||
|
||||
void func_8008FD4C(Player* player, UNUSED s8 arg1) {
|
||||
s16 temp_v0;
|
||||
|
||||
|
||||
player->soundEffects |= 0x04000000;
|
||||
player->unk_044 |= 0x200;
|
||||
|
||||
@@ -1590,7 +1590,7 @@ void func_8008FDA8(Player* player, UNUSED s8 arg1) {
|
||||
|
||||
void func_8008FDF4(Player* player, UNUSED s8 arg1) {
|
||||
clean_effect(player, arg1);
|
||||
|
||||
|
||||
player->effects &= ~0x10;
|
||||
player->kartHopJerk = D_800E37F0[player->characterId];
|
||||
player->kartHopAcceleration = 0.0f;
|
||||
@@ -1649,9 +1649,9 @@ void func_8008FF08(Player *player, s8 playerId) {
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
waypoint = gNearestWaypointByPlayerId[playerId];
|
||||
#ifdef VERSION_EU
|
||||
if (((waypoint >= 0xF0) && (waypoint < 0x11E)) ||
|
||||
if (((waypoint >= 0xF0) && (waypoint < 0x11E)) ||
|
||||
((gCopyNearestWaypointByPlayerId[playerId] >= 0xF0) && (gCopyNearestWaypointByPlayerId[playerId] < 0x11E)))
|
||||
#else
|
||||
#else
|
||||
if ((waypoint >= 0xF0) && (waypoint < 0x105))
|
||||
#endif
|
||||
{
|
||||
@@ -1791,7 +1791,7 @@ void func_80090778(Player* player) {
|
||||
|
||||
clean_effect(player, playerIndex);
|
||||
func_8008F86C(player, playerIndex);
|
||||
|
||||
|
||||
player->unk_DB4.unk0 = 0;
|
||||
player->unk_0C2 = 0;
|
||||
player->unk_DB4.unk8 = 0.0f;
|
||||
@@ -2009,7 +2009,7 @@ void func_80090970(Player *player, s8 playerId, s8 arg2) {
|
||||
bool prevent_item_use(Player *player) {
|
||||
s32 phi_v0 = 0;
|
||||
if ((((((player->unk_0CA & 2) == 2) || ((player->unk_0CA & 8) == 8)) || ((player->type & PLAYER_UNKNOWN_0x40) != 0)) || ((player->type & PLAYER_CINEMATIC_MODE) != 0)) || ((player->type & PLAYER_EXISTS) == 0)) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (player->currentItemCopy) {
|
||||
@@ -2018,7 +2018,7 @@ bool prevent_item_use(Player *player) {
|
||||
case ITEM_TRIPLE_MUSHROOM:
|
||||
case ITEM_SUPER_MUSHROOM:
|
||||
if ((player->effects & 8) != 0) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
phi_v0 = EFFECT_BLACKLIST_USE_ITEM;
|
||||
goto prevent_item_use_label;
|
||||
@@ -2029,9 +2029,9 @@ bool prevent_item_use(Player *player) {
|
||||
prevent_item_use_label:
|
||||
default:
|
||||
if ((player->effects & phi_v0) != 0) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
@@ -16,7 +16,7 @@ void setup_camera_podium_ceremony(void) {
|
||||
|
||||
camera = &cameras[0];
|
||||
func_80283648(camera);
|
||||
|
||||
|
||||
x_dist = camera->lookAt[0] - camera->pos[0];
|
||||
y_dist = camera->lookAt[1] - camera->pos[1];
|
||||
z_dist = camera->lookAt[2] - camera->pos[2];
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Camera moves via splines.
|
||||
*/
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <segments.h>
|
||||
#include <common_structs.h>
|
||||
@@ -113,9 +113,9 @@ s32 f32_lerp(f32 *dest, f32 src, f32 lerp) {
|
||||
if (lerp > 1.0f) {
|
||||
lerp = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
*dest = *dest + ((src - *dest) * lerp);
|
||||
|
||||
|
||||
if (src == *dest) {
|
||||
return 0;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ UNUSED s32 func_80282200(Vec3s arg0, s16 arg1, s16 arg2) {
|
||||
temp_v0 += arg1;
|
||||
arg0[0] = temp_v0;
|
||||
}
|
||||
|
||||
|
||||
if (arg1 == arg0[0]) {
|
||||
return 0;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ UNUSED s32 func_80282200(Vec3s arg0, s16 arg1, s16 arg2) {
|
||||
// Calculates fade in/out
|
||||
s32 set_transition_colour_fade_alpha_ending(f32 *arg0, f32 arg1, f32 arg2) {
|
||||
f32 temp_f0 = arg1 - *arg0;
|
||||
|
||||
|
||||
if (arg2 < 0.0f) {
|
||||
arg2 = -1.0f * arg2;
|
||||
}
|
||||
@@ -309,7 +309,7 @@ s32 move_point_along_spline(Vec3f p, f32 *arg1, struct struct_80283430 spline[],
|
||||
}
|
||||
|
||||
func_80282700(u, p, arg1, controlPoints[0], controlPoints[1], controlPoints[2], controlPoints[3]);
|
||||
|
||||
|
||||
if (spline[*splineSegment + 1].unk2 != 0) {
|
||||
firstSpeed = 1.0f / spline[*splineSegment + 1].unk2;
|
||||
}
|
||||
@@ -356,10 +356,10 @@ void func_80282C40(struct struct_80283430 *arg0, struct struct_80282C40 *arg1, s
|
||||
s32 i = 0;
|
||||
s32 j = 0;
|
||||
func_80282BE4(&arg0[j], arg1[j].unk0, arg1[j].unk3, arg1[j].unk4, arg1[j].unk6, arg2);
|
||||
|
||||
|
||||
j++;
|
||||
goto dummy_label_888430;
|
||||
while(TRUE) {
|
||||
while(true) {
|
||||
do {
|
||||
|
||||
dummy_label_888430: ;
|
||||
@@ -372,7 +372,7 @@ dummy_label_888430: ;
|
||||
func_80282BE4(&arg0[j], arg1->unk0, arg1[i].unk3, arg1[i].unk4, arg1[i].unk6, arg2);
|
||||
func_80282BE4(&arg0[j + 1], arg1->unk0, 0, arg1[i].unk4, arg1[i].unk6, arg2);
|
||||
func_80282BE4(&arg0[j + 2], arg1->unk0, 0, arg1[i].unk4, arg1[i].unk6, arg2);
|
||||
func_80282BE4(&arg0[j + 3], -1, 0, arg1[i].unk4, arg1[i].unk6, arg2);
|
||||
func_80282BE4(&arg0[j + 3], -1, 0, arg1[i].unk4, arg1[i].unk6, arg2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -727,7 +727,7 @@ void func_80283BF0(UNUSED struct CinematicCamera *camera) {
|
||||
func_800C8EF8(0x1A);
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
void func_80283C14(UNUSED struct CinematicCamera *camera) {
|
||||
func_800C8EF8(0x1B);
|
||||
}
|
||||
@@ -1584,7 +1584,7 @@ void func_802847CC(struct CinematicCamera *camera) {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gCutsceneShotTimer == sp2C) {
|
||||
if (gCutsceneShotTimer == sp2C) {
|
||||
if (D_80286A04[D_800DC5E4].unk0 != 2) {
|
||||
func_80280268(D_80286A04[D_800DC5E4 + 1].unk1);
|
||||
}
|
||||
@@ -1631,7 +1631,7 @@ void play_cutscene(struct CinematicCamera *camera) {
|
||||
#undef CUTSCENE
|
||||
|
||||
if ((cutsceneDuration != 0) && ((gCutsceneShotTimer & 0xC000) == 0)) {
|
||||
|
||||
|
||||
if (gCutsceneShotTimer < 16383) {
|
||||
gCutsceneShotTimer++;
|
||||
}
|
||||
@@ -1651,12 +1651,12 @@ void play_cutscene(struct CinematicCamera *camera) {
|
||||
reset_spline();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Scene transition
|
||||
*
|
||||
*
|
||||
* Sliding black borders that open horizontally to display scene.
|
||||
* Used at the beginning of award ceremony and throughout credits.
|
||||
*/
|
||||
@@ -1681,4 +1681,3 @@ void transition_sliding_borders(void) {
|
||||
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
|
||||
set_transition_colour_fade_alpha_ending(&D_802856C0, D_802856B8, D_802856BC / D_802856B4);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
#include <debug.h>
|
||||
#include <PR/gu.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include <main.h>
|
||||
@@ -50,7 +49,7 @@ void func_80280038(void) {
|
||||
func_802A53A4();
|
||||
init_rdp();
|
||||
func_80057FC4(0);
|
||||
|
||||
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH);
|
||||
guPerspective(&gGfxPool->mtxPersp[0], &perspNorm, gCameraZoom[0], gScreenAspect, D_80150150, D_8015014C, 1.0f);
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
@@ -83,7 +82,7 @@ void func_80280268(s32 arg0) {
|
||||
|
||||
void credits_loop(void) {
|
||||
Camera *camera = &cameras[0];
|
||||
|
||||
|
||||
f32 temp_f12;
|
||||
f32 temp;
|
||||
f32 temp_f14;
|
||||
@@ -140,7 +139,7 @@ void load_credits(void) {
|
||||
load_course(gCurrentCourseId);
|
||||
D_8015F730 = gNextFreeMemoryAddress;
|
||||
set_segment_base_addr(0xB, (void *) decompress_segments((u8 *) CEREMONY_DATA_ROM_START, (u8 *) CEREMONY_DATA_ROM_END));
|
||||
|
||||
|
||||
gCourseMinX = -0x15A1;
|
||||
gCourseMinY = -0x15A1;
|
||||
gCourseMinZ = -0x15A1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
#include <segments.h>
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "menus.h"
|
||||
#include "render_courses.h"
|
||||
|
||||
#define bcopy memcpy
|
||||
|
||||
u8 defaultCharacterIds[] = {
|
||||
1, 2, 3, 4, 5, 6, 7, 0
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <PR/gu.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
|
||||
#include "code_80281C40.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef CODE_80281C40_H
|
||||
#define CODE_80281C40_h
|
||||
#define CODE_80281C40_H
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CREDITS_H
|
||||
#define CREDITS_H
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
#include <libultra/types.h>
|
||||
|
||||
#define SLIDE_RIGHT 0
|
||||
#define SLIDE_LEFT 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <libultraship.h>
|
||||
#include <libultra/gbi.h>
|
||||
#include "courses/royal_raceway/course_displaylists.inc.h"
|
||||
|
||||
// Init RDP - RSP (Ceremony)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <PR/gu.h>
|
||||
#include <mk64.h>
|
||||
#include <debug.h>
|
||||
#include <common_structs.h>
|
||||
@@ -90,7 +89,7 @@ void set_initial_position(CeremonyActor *actor) {
|
||||
actor->pos[0] = params->unk2[0];
|
||||
actor->pos[1] = params->unk2[1];
|
||||
actor->pos[2] = params->unk2[2];
|
||||
|
||||
|
||||
// Place value in the high bits of s16.
|
||||
// Example: 85, 0b01010101 -> 0b0101010100000000
|
||||
actor->unkA = params->unk8 << 8;
|
||||
@@ -149,7 +148,7 @@ u16 random_u16_credits(void) {
|
||||
|
||||
temp1 = ((temp1 & 0x00FF) << 1) ^ sRandomSeed16;
|
||||
temp2 = (temp1 >> 1) ^ 0xFF80;
|
||||
|
||||
|
||||
if ((temp1 & 1) == 0) {
|
||||
if (temp2 == 43605) {
|
||||
sRandomSeed16 = 0;
|
||||
@@ -356,7 +355,7 @@ void spawn_firework_cone(s32 arg0, s32 arg1, s32 arg2) {
|
||||
cone->pos[0] = random_who_knows(0.0f) + arg0;
|
||||
cone->pos[1] = random_who_knows((f32) (D_802874B0[11] + 100)) + (f32) arg1;
|
||||
cone->pos[2] = random_who_knows((f32) (D_802874B0[12] + 700)) + (f32) arg2;
|
||||
|
||||
|
||||
num = 1.1f;
|
||||
|
||||
// Wrap the counter from zero to three
|
||||
@@ -393,7 +392,7 @@ void spawn_timer(void) {
|
||||
} else if (D_802874D8.actorTimer == 2) {
|
||||
spawn_balloons(-0xC6C, (s32) ((f32) D_802874B0[10] + 210.0f), -0x1EF);
|
||||
}
|
||||
|
||||
|
||||
D_802874D8.actorTimer += 1;
|
||||
}
|
||||
|
||||
@@ -475,7 +474,7 @@ void podium_ceremony_loop(void) {
|
||||
func_80281D00();
|
||||
func_80281540();
|
||||
#if DVDL
|
||||
display_dvdl();
|
||||
display_dvdl();
|
||||
#endif
|
||||
gDPFullSync(gDisplayListHead++);
|
||||
gSPEndDisplayList(gDisplayListHead++);
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include "PR/gu.h"
|
||||
#include "main.h"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include "main.h"
|
||||
#include "buffers.h"
|
||||
|
||||
+15
-15
@@ -1,7 +1,7 @@
|
||||
#ifndef GCC
|
||||
#define D_800DC510_AS_U16
|
||||
#endif
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <PR/os.h>
|
||||
#include <PR/ucode.h>
|
||||
#include <macros.h>
|
||||
@@ -230,7 +230,7 @@ void thread1_idle(void *arg) {
|
||||
osViSetMode(&osViModeTable[OS_VI_MPAL_LAN1]);
|
||||
}
|
||||
#endif
|
||||
osViBlack(TRUE);
|
||||
osViBlack(true);
|
||||
osViSetSpecialFeatures(OS_VI_GAMMA_OFF);
|
||||
osCreatePiManager(OS_PRIORITY_PIMGR, &gPIMesgQueue, gPIMesgBuf, ARRAY_COUNT(gPIMesgBuf));
|
||||
wasSoftReset = (s16) osResetType;
|
||||
@@ -241,7 +241,7 @@ void thread1_idle(void *arg) {
|
||||
osSetThreadPri(NULL, 0);
|
||||
|
||||
// Halt
|
||||
while (TRUE);
|
||||
while (true);
|
||||
}
|
||||
|
||||
void setup_mesg_queues(void) {
|
||||
@@ -306,9 +306,9 @@ void init_controllers(void) {
|
||||
osSetEventMesg(OS_EVENT_SI, &gSIEventMesgQueue, (OSMesg) 0x33333333);
|
||||
osContInit(&gSIEventMesgQueue, &gControllerBits, gControllerStatuses);
|
||||
if ((gControllerBits & 1) == 0) {
|
||||
sIsController1Unplugged = TRUE;
|
||||
sIsController1Unplugged = true;
|
||||
} else {
|
||||
sIsController1Unplugged = FALSE;
|
||||
sIsController1Unplugged = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ void setup_game_memory(void) {
|
||||
init_segment_racing();
|
||||
gHeapEndPtr = SEG_RACING;
|
||||
set_segment_base_addr(0, (void *) SEG_START);
|
||||
|
||||
|
||||
// Memory pool size of 0xAB630
|
||||
initialize_memory_pool(MEMORY_POOL_START, MEMORY_POOL_END);
|
||||
|
||||
@@ -529,7 +529,7 @@ void setup_game_memory(void) {
|
||||
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
|
||||
|
||||
set_segment_base_addr(2, (void *) load_data(SEG_DATA_START, SEG_DATA_END));
|
||||
|
||||
|
||||
commonCourseDataSize = COMMON_TEXTURES_SIZE;
|
||||
commonCourseDataSize = ALIGN16(commonCourseDataSize);
|
||||
|
||||
@@ -613,14 +613,14 @@ void race_logic_loop(void) {
|
||||
D_8015F788 = 0;
|
||||
render_player_one_1p_screen();
|
||||
if (!gEnableDebugMode) {
|
||||
D_800DC514 = FALSE;
|
||||
D_800DC514 = false;
|
||||
} else {
|
||||
if (D_800DC514) {
|
||||
|
||||
if ((gControllerOne->buttonPressed & R_TRIG) &&
|
||||
(gControllerOne->button & A_BUTTON) &&
|
||||
(gControllerOne->button & B_BUTTON)) {
|
||||
D_800DC514 = FALSE;
|
||||
D_800DC514 = false;
|
||||
}
|
||||
|
||||
rotY = camera1->rot[1];
|
||||
@@ -641,7 +641,7 @@ void race_logic_loop(void) {
|
||||
if ((gControllerOne->buttonPressed & L_TRIG) &&
|
||||
(gControllerOne->button & A_BUTTON) &&
|
||||
(gControllerOne->button & B_BUTTON)) {
|
||||
D_800DC514 = TRUE;
|
||||
D_800DC514 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -872,7 +872,7 @@ void game_state_handler(void) {
|
||||
(gControllerOne->button & Z_TRIG) &&
|
||||
(gControllerOne->button & A_BUTTON)) {
|
||||
gGamestateNext = CREDITS_SEQUENCE;
|
||||
} else if ((gControllerOne->button & L_TRIG) &&
|
||||
} else if ((gControllerOne->button & L_TRIG) &&
|
||||
(gControllerOne->button & R_TRIG) &&
|
||||
(gControllerOne->button & Z_TRIG) &&
|
||||
(gControllerOne->button & B_BUTTON)) {
|
||||
@@ -1080,7 +1080,7 @@ void thread3_video(UNUSED void *arg0) {
|
||||
create_thread(&gGameLoopThread, 5, &thread5_game_loop, 0, gGameLoopThreadStack + ARRAY_COUNT(gGameLoopThreadStack), 10);
|
||||
osStartThread(&gGameLoopThread);
|
||||
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
osRecvMesg(&gIntrMesgQueue, &msg, OS_MESG_BLOCK);
|
||||
switch ((u32) msg) {
|
||||
case MESG_VI_VBLANK:
|
||||
@@ -1147,7 +1147,7 @@ void update_gamestate(void) {
|
||||
gCurrentlyLoadedCourseId = COURSE_NULL;
|
||||
break;
|
||||
case RACING:
|
||||
/**
|
||||
/**
|
||||
* @bug Reloading this segment makes random_u16() deterministic for player spawn order.
|
||||
* In laymens terms, random_u16() outputs the same value every time.
|
||||
*/
|
||||
@@ -1189,7 +1189,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
read_controllers();
|
||||
func_800C5CB8();
|
||||
|
||||
while(TRUE) {
|
||||
while(true) {
|
||||
func_800CB2C4();
|
||||
|
||||
// Update the gamestate if it has changed (racing, menus, credits, etc.).
|
||||
@@ -1215,7 +1215,7 @@ void thread4_audio(UNUSED void *arg) {
|
||||
osCreateMesgQueue(&sSoundMesgQueue, sSoundMesgBuf, ARRAY_COUNT(sSoundMesgBuf));
|
||||
set_vblank_handler(1, &sSoundVblankHandler, &sSoundMesgQueue, (OSMesg) 512);
|
||||
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
OSMesg msg;
|
||||
struct SPTask *spTask;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
#include "mk64.h"
|
||||
#include "common_structs.h"
|
||||
|
||||
// Message IDs
|
||||
#define MESG_SP_COMPLETE 100
|
||||
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <common_structs.h>
|
||||
#include "math_util_2.h"
|
||||
@@ -30,9 +30,9 @@ UNUSED void operator_xor(s32 *arg0, s32 arg1) {
|
||||
UNUSED bool func_80040E84(s32 *arg0, s32 arg1) {
|
||||
bool phi_v1;
|
||||
|
||||
phi_v1 = FALSE;
|
||||
phi_v1 = false;
|
||||
if ((*arg0 & arg1) != 0) {
|
||||
phi_v1 = TRUE;
|
||||
phi_v1 = true;
|
||||
}
|
||||
return phi_v1;
|
||||
}
|
||||
@@ -455,10 +455,10 @@ bool is_particle_on_screen(Vec3f arg0, Camera *arg1, u16 arg2) {
|
||||
u16 temp_t9;
|
||||
s32 ret;
|
||||
|
||||
ret = FALSE;
|
||||
ret = false;
|
||||
temp_t9 = (get_angle_between_xy(arg1->pos[0], arg0[0], arg1->pos[2], arg0[2]) + (arg2 / 2)) - arg1->rot[1];
|
||||
if ((temp_t9 >= 0) && (arg2 >= temp_t9)) {
|
||||
ret = TRUE;
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -502,7 +502,7 @@ void mtfx_translation_x_y(Mat4 arg0, s32 x, s32 y) {
|
||||
* 1 0 0 x
|
||||
* 0 1 0 y
|
||||
* 0 0 1 0
|
||||
* 0 0 0 1
|
||||
* 0 0 0 1
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -944,10 +944,10 @@ void vec3f_rotate_x_y(Vec3f dest, Vec3f pos, Vec3s rot) {
|
||||
|
||||
/**
|
||||
* @brief set the matrix to a transformation matrix
|
||||
*
|
||||
*
|
||||
* @param translate or position
|
||||
* @param orientation
|
||||
* @param scale
|
||||
* @param orientation
|
||||
* @param scale
|
||||
*/
|
||||
void rsp_set_matrix_transformation(Vec3f translate, Vec3su orientation, f32 scale) {
|
||||
Mat4 matrix;
|
||||
|
||||
+24
-24
@@ -1,4 +1,4 @@
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
#include <common_structs.h>
|
||||
@@ -30,7 +30,7 @@ f32 D_8018EDD8;
|
||||
f32 D_8018EDDC;
|
||||
s32 D_8018EDE0;
|
||||
s8 gCharacterGridSelections[4]; // map from player id to current grid position
|
||||
bool8 D_8018EDE8[4]; // map player id to isCharSelected on CSS
|
||||
bool D_8018EDE8[4]; // map player id to isCharSelected on CSS
|
||||
s8 D_8018EDEC;
|
||||
s8 gMainMenuSelectionDepth;
|
||||
s8 D_8018EDEE; // grid screen state?
|
||||
@@ -240,7 +240,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) {
|
||||
case 0x17:
|
||||
case 0x18:
|
||||
{
|
||||
sp2C = FALSE;
|
||||
sp2C = false;
|
||||
if ((btnAndStick & D_JPAD) && (D_8018EDEC < 0x18)) {
|
||||
D_8018EDEC += 1;
|
||||
play_sound2(SOUND_MENU_CURSOR_MOVE);
|
||||
@@ -248,7 +248,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) {
|
||||
sp38->unk24 += 4.0;
|
||||
}
|
||||
sp38->unk8 = 1;
|
||||
sp2C = TRUE;
|
||||
sp2C = true;
|
||||
}
|
||||
if ((btnAndStick & U_JPAD) && (D_8018EDEC >= 0x16)) {
|
||||
D_8018EDEC -= 1;
|
||||
@@ -256,7 +256,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) {
|
||||
if (sp38->unk24 < 4.2) {
|
||||
sp38->unk24 += 4.0;
|
||||
}
|
||||
sp2C = TRUE;
|
||||
sp2C = true;
|
||||
sp38->unk8 = -1;
|
||||
}
|
||||
if (sp2C && gSoundMode != sp38->cursor) {
|
||||
@@ -1008,7 +1008,7 @@ void splash_menu_act(struct Controller *controller, u16 arg1) {
|
||||
u16 i;
|
||||
s32 sp28;
|
||||
|
||||
sp28 = TRUE;
|
||||
sp28 = true;
|
||||
btnAndStick = controller->buttonPressed | controller->stickPressed;
|
||||
|
||||
if (func_800B4520() == 0) {
|
||||
@@ -1018,7 +1018,7 @@ void splash_menu_act(struct Controller *controller, u16 arg1) {
|
||||
switch (gDebugMenuSelection) {
|
||||
case DEBUG_MENU_DISABLED:
|
||||
{
|
||||
sp28 = FALSE;
|
||||
sp28 = false;
|
||||
if ((gMenuDelayTimer >= 0x2E) && (btnAndStick & (A_BUTTON | START_BUTTON))) {
|
||||
func_8009E1C0();
|
||||
func_800CA330(0x19);
|
||||
@@ -1035,7 +1035,7 @@ void splash_menu_act(struct Controller *controller, u16 arg1) {
|
||||
if (gEnableDebugMode) {
|
||||
gEnableDebugMode = DEBUG_MODE;
|
||||
} else {
|
||||
gEnableDebugMode = TRUE;
|
||||
gEnableDebugMode = true;
|
||||
}
|
||||
}
|
||||
if (btnAndStick & D_JPAD) {
|
||||
@@ -1398,15 +1398,15 @@ void main_menu_act(struct Controller *controller, u16 arg1) {
|
||||
}
|
||||
// L800B3068
|
||||
if (btnAndStick & D_JPAD) {
|
||||
sp24 = FALSE;
|
||||
sp24 = false;
|
||||
if (func_800B555C()) {
|
||||
if (sp28 < D_800F2B60[gPlayerCount + 4][D_800E86AC[gPlayerCount - 1] + 1]) {
|
||||
sp24 = TRUE;
|
||||
sp24 = true;
|
||||
}
|
||||
} else {
|
||||
// L800B30D4
|
||||
if (sp28 < D_800F2B60[gPlayerCount][D_800E86AC[gPlayerCount - 1] + 1]) {
|
||||
sp24 = TRUE;
|
||||
sp24 = true;
|
||||
}
|
||||
}
|
||||
// L800B3110
|
||||
@@ -1500,10 +1500,10 @@ bool is_character_spot_free(s32 gridId) {
|
||||
s32 i;
|
||||
for (i = 0; i < ARRAY_COUNT(gCharacterGridSelections); i++) {
|
||||
if (gridId == gCharacterGridSelections[i]) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
@@ -1533,7 +1533,7 @@ void player_select_menu_act(struct Controller *controller, u16 arg1) {
|
||||
// L800B3630
|
||||
if (btnAndStick & B_BUTTON) {
|
||||
if (D_8018EDE8[arg1]) {
|
||||
D_8018EDE8[arg1] = FALSE;
|
||||
D_8018EDE8[arg1] = false;
|
||||
play_sound2(SOUND_MENU_GO_BACK);
|
||||
} else {
|
||||
func_8009E208();
|
||||
@@ -1542,17 +1542,17 @@ void player_select_menu_act(struct Controller *controller, u16 arg1) {
|
||||
}
|
||||
// L800B3684
|
||||
if ((btnAndStick & A_BUTTON) && !D_8018EDE8[arg1]) {
|
||||
D_8018EDE8[arg1] = TRUE;
|
||||
D_8018EDE8[arg1] = true;
|
||||
func_800C90F4(
|
||||
arg1,
|
||||
(((uintptr_t)D_800F2BAC[gCharacterGridSelections[arg1] - 1]) << 4) + 0x2900800EU
|
||||
);
|
||||
}
|
||||
// L800B36F4
|
||||
selected = FALSE;
|
||||
selected = false;
|
||||
for (i = 0; i < ARRAY_COUNT(gCharacterGridSelections); i++) {
|
||||
if (gCharacterGridSelections[i] && D_8018EDE8[i]) {
|
||||
selected = TRUE;
|
||||
selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1658,7 +1658,7 @@ void player_select_menu_act(struct Controller *controller, u16 arg1) {
|
||||
// L800B3AA4
|
||||
if (btnAndStick & B_BUTTON) {
|
||||
D_8018EDEE = 1;
|
||||
D_8018EDE8[arg1] = FALSE;
|
||||
D_8018EDE8[arg1] = false;
|
||||
play_sound2(SOUND_MENU_GO_BACK);
|
||||
} else if (btnAndStick & A_BUTTON) {
|
||||
func_8009E1C0();
|
||||
@@ -1906,7 +1906,7 @@ void func_800B3F74(s32 menuSelection) {
|
||||
} else {
|
||||
gCharacterGridSelections[i] = 0;
|
||||
}
|
||||
D_8018EDE8[i] = FALSE;
|
||||
D_8018EDE8[i] = false;
|
||||
gCharacterSelections[i] = i;
|
||||
}
|
||||
play_sound2(SOUND_MENU_SELECT_PLAYER);
|
||||
@@ -1917,7 +1917,7 @@ void func_800B3F74(s32 menuSelection) {
|
||||
gGamestateNext = 0;
|
||||
func_800C8EAC(2);
|
||||
for (i = 0; i < ARRAY_COUNT(D_8018EDE8); i++) {
|
||||
D_8018EDE8[i] = FALSE;
|
||||
D_8018EDE8[i] = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1927,9 +1927,9 @@ void func_800B3F74(s32 menuSelection) {
|
||||
D_8018EDEE = 3;
|
||||
for (i = 0; i < ARRAY_COUNT(D_8018EDE8); i++) {
|
||||
if (gPlayerCount > i) {
|
||||
D_8018EDE8[i] = TRUE;
|
||||
D_8018EDE8[i] = true;
|
||||
} else {
|
||||
D_8018EDE8[i] = FALSE;
|
||||
D_8018EDE8[i] = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1990,9 +1990,9 @@ void func_800B44BC(void) {
|
||||
bool func_800B4520(void) {
|
||||
|
||||
if ((D_8018E7B0 == 2) || (D_8018E7B0 == 3) || (D_8018E7B0 == 4) || (D_8018E7B0 == 7)) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
UNUSED void func_800B4560(s32 arg0, s32 arg1) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef MENUS_H
|
||||
#define MENUS_H
|
||||
|
||||
#include "PR/os.h"
|
||||
#include "common_structs.h"
|
||||
#include <defines.h>
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ s32 _Printf(char *(*prout)(char *, const char *, size_t), char *dst, const char
|
||||
u8 sp4c[0x20]; // probably a buffer?
|
||||
s32 sp48, sp44, sp40, sp3c, sp38, sp34, sp30, sp2c, sp28, sp24;
|
||||
sp78.size = 0;
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
fmt_ptr = (u8 *) fmt;
|
||||
#ifdef VERSION_SH
|
||||
// new version: don't point fmt_ptr beyond NUL character
|
||||
|
||||
@@ -22,7 +22,7 @@ void __osDevMgrMain(void *args) {
|
||||
mb = NULL;
|
||||
ret = 0;
|
||||
sp34 = (OSMgrArgs *) args;
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
osRecvMesg(sp34->cmdQueue, (OSMesg) &mb, OS_MESG_BLOCK);
|
||||
if (mb->piHandle != NULL && mb->piHandle->type == 2
|
||||
&& (mb->piHandle->transferInfo.cmdType == 0
|
||||
@@ -41,7 +41,7 @@ void __osDevMgrMain(void *args) {
|
||||
osRecvMesg(sp34->accessQueue, &dummy, OS_MESG_BLOCK);
|
||||
__osResetGlobalIntMask(0x00100401); // remove magic constant!
|
||||
__osEPiRawWriteIo(mb->piHandle, 0x05000510, (sp24->bmCtlShadow | 0x80000000));
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
osRecvMesg(sp34->eventQueue, &em, OS_MESG_BLOCK);
|
||||
sp30 = osSendMesg(mb->hdr.retQueue, mb, OS_MESG_NOBLOCK);
|
||||
if (sp2c != 1 || mb->piHandle->transferInfo.errStatus != 0) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "ultra64.h"
|
||||
#include <libultraship.h>
|
||||
#include "osint.h"
|
||||
#include "piint.h"
|
||||
#include "libultra_internal.h"
|
||||
|
||||
+13
-13
@@ -57,7 +57,7 @@ s32 __osRepairPackId(OSPfs *pfs, __OSPackId *badid, __OSPackId *newid)
|
||||
pfs->activebank = j;
|
||||
ERRCK(__osPfsSelectBank(pfs))
|
||||
//! @todo fix magic number
|
||||
ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)&temp));
|
||||
ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)&temp));
|
||||
temp[0] = j | 0x80;
|
||||
for (i = 1; i < ARRLEN(temp); i++)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ s32 __osRepairPackId(OSPfs *pfs, __OSPackId *badid, __OSPackId *newid)
|
||||
temp[i] = ~temp[i];
|
||||
}
|
||||
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, 0, (u8*)temp, FALSE)); //oddr 0, don't force
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, 0, (u8*)temp, false)); //oddr 0, don't force
|
||||
ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)&comp));
|
||||
|
||||
for (i = 0; i < ARRLEN(temp); i++)
|
||||
@@ -82,7 +82,7 @@ s32 __osRepairPackId(OSPfs *pfs, __OSPackId *badid, __OSPackId *newid)
|
||||
ERRCK(__osContRamRead(pfs->queue, pfs->channel, 0, (u8*)temp));
|
||||
if (temp[0] != 128)
|
||||
//! @todo remove magic constant
|
||||
break;
|
||||
break;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ s32 __osRepairPackId(OSPfs *pfs, __OSPackId *badid, __OSPackId *newid)
|
||||
index[3] = 6;
|
||||
for (i = 0; i < ARRLEN(index); i++)
|
||||
{
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, index[i], (u8*)newid, TRUE));
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, index[i], (u8*)newid, true));
|
||||
}
|
||||
ERRCK(__osContRamRead(pfs->queue, pfs->channel, 1, (u8*)temp));
|
||||
for (i = 0; i < ARRLEN(temp); i++)
|
||||
@@ -142,7 +142,7 @@ s32 __osCheckPackId(OSPfs *pfs, __OSPackId *temp)
|
||||
{
|
||||
if (j != i)
|
||||
{
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, index[j], (u8*)temp, TRUE));
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, index[j], (u8*)temp, true));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -176,7 +176,7 @@ s32 __osGetId(OSPfs *pfs)
|
||||
}
|
||||
}
|
||||
//! @todo remove magic constant
|
||||
if ((id->deviceid & 1) == 0)
|
||||
if ((id->deviceid & 1) == 0)
|
||||
{
|
||||
ERRCK(__osRepairPackId(pfs, id, &newid));
|
||||
id = &newid;
|
||||
@@ -190,7 +190,7 @@ s32 __osGetId(OSPfs *pfs)
|
||||
pfs->version = id->version;
|
||||
pfs->banks = id->banks;
|
||||
//! @todo loads of magic constants..
|
||||
pfs->inode_start_page = pfs->banks * 2 + 3;
|
||||
pfs->inode_start_page = pfs->banks * 2 + 3;
|
||||
pfs->dir_size = 16;
|
||||
pfs->inode_table = 8;
|
||||
pfs->minode_table = pfs->banks * PFS_ONE_PAGE + 8;
|
||||
@@ -247,11 +247,11 @@ s32 __osPfsRWInode(OSPfs *pfs, __OSInode *inode, u8 flag, u8 bank)
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
//! @todo don't like this =/ //maybe &inode->inode_table[j*PFS_ONE_PAGE].ipage or something
|
||||
addr = ((u8 *)inode->inode_page + j * 32);
|
||||
addr = ((u8 *)inode->inode_page + j * 32);
|
||||
if (flag == PFS_WRITE)
|
||||
{
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->inode_table + bank * 8 + j, addr, FALSE);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->minode_table + bank * 8 + j, addr, FALSE);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->inode_table + bank * 8 + j, addr, false);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->minode_table + bank * 8 + j, addr, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -275,7 +275,7 @@ s32 __osPfsRWInode(OSPfs *pfs, __OSInode *inode, u8 flag, u8 bank)
|
||||
for (j = 0; j < PFS_ONE_PAGE; j++)
|
||||
{
|
||||
addr = ((u8 *)inode->inode_page + j * 32);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->inode_table + bank * PFS_ONE_PAGE + j, addr, FALSE);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->inode_table + bank * PFS_ONE_PAGE + j, addr, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -283,7 +283,7 @@ s32 __osPfsRWInode(OSPfs *pfs, __OSInode *inode, u8 flag, u8 bank)
|
||||
for (j = 0; j < PFS_ONE_PAGE; j++)
|
||||
{
|
||||
addr = ((u8 *)inode->inode_page + j * 32);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->minode_table + bank * PFS_ONE_PAGE + j, addr, FALSE);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->minode_table + bank * PFS_ONE_PAGE + j, addr, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,6 +300,6 @@ s32 __osPfsSelectBank(OSPfs *pfs)
|
||||
{
|
||||
temp[i] = pfs->activebank;
|
||||
}
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, 1024, (u8*)temp, FALSE);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, 1024, (u8*)temp, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef _CONTROLLER_H
|
||||
#define _CONTROLLER_H
|
||||
#include "PR/os_internal.h"
|
||||
#include "PR/os.h"
|
||||
#include <libultraship.h>
|
||||
#include "PR/rcp.h"
|
||||
|
||||
//should go somewhere else but
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
/* Minor modifications */
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#define FTOFRAC8(x) ((int) MIN(((x) * (128.0)), 127.0) & 0xff)
|
||||
|
||||
void guLookAtReflectF(float mf[4][4], LookAt *l, float xEye, float yEye, float zEye, float xAt,
|
||||
|
||||
+1
-2
@@ -30,7 +30,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <PR/gu.h>
|
||||
#include <libultraship.h>
|
||||
|
||||
void guMtxCatF(float mf[4][4], float nf[4][4], float res[4][4])
|
||||
{
|
||||
@@ -60,4 +60,3 @@ void guMtxXFMF(float mf[4][4], float x, float y, float z, float *ox, float *oy,
|
||||
*oy = mf[0][1]*x + mf[1][1]*y + mf[2][1]*z + mf[3][1];
|
||||
*oz = mf[0][2]*x + mf[1][2]*y + mf[2][2]*z + mf[3][2];
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -30,8 +30,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "libultra_internal.h"
|
||||
#include <PR/gu.h>
|
||||
#include <libultraship.h>
|
||||
|
||||
void guMtxXFMF(Mtx *, float, float, float, float *, float *, float *);
|
||||
void guMtxCatF(float mf[4][4], float nf[4][4], float res[4][4]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef _LIBAUDIO_INTERNAL_H_
|
||||
#define _LIBAUDIO_INTERNAL_H_
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#define AL_BANK_VERSION 0x4231 /* 'B1' */
|
||||
|
||||
typedef u8 ALPan;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef _LIBULTRA_INTERNAL_H_
|
||||
#define _LIBULTRA_INTERNAL_H_
|
||||
#include <ultra64.h>
|
||||
#include <libultraship.h>
|
||||
#include <PR/os_thread.h>
|
||||
#include "macros.h"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "PR/R4300.h"
|
||||
#include "PR/rcp.h"
|
||||
#include "PR/os_pi.h"
|
||||
#include "PR/os.h"
|
||||
#include <libultraship.h>
|
||||
|
||||
OSPiHandle CartRomHandle;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define OS_PI_MGR_MESG_BUFF_SIZE 1
|
||||
|
||||
//! @todo In libreultra this is in an include
|
||||
#ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
extern OSPiHandle *CartRomHandle;
|
||||
extern OSPiHandle *LeoDiskHandle;
|
||||
#endif
|
||||
@@ -39,7 +39,7 @@ void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgC
|
||||
osSetThreadPri(NULL, pri);
|
||||
}
|
||||
int_disabled = __osDisableInt();
|
||||
__osPiDevMgr.initialized = TRUE;
|
||||
__osPiDevMgr.initialized = true;
|
||||
__osPiDevMgr.mgrThread = &piMgrThread;
|
||||
__osPiDevMgr.cmdQueue = cmdQ;
|
||||
__osPiDevMgr.eventQueue = &__osPiMesgQueue;
|
||||
|
||||
@@ -41,7 +41,7 @@ void osCreateViManager(OSPri pri) {
|
||||
osSetThreadPri(NULL, pri);
|
||||
}
|
||||
int_disabled = __osDisableInt();
|
||||
viMgrMainArgs.initialized = TRUE;
|
||||
viMgrMainArgs.initialized = true;
|
||||
viMgrMainArgs.mgrThread = &viMgrThread;
|
||||
viMgrMainArgs.cmdQueue = &__osViMesgQueue;
|
||||
viMgrMainArgs.eventQueue = &__osViMesgQueue;
|
||||
@@ -67,7 +67,7 @@ void viMgrMain(void *vargs) {
|
||||
u32 sp28; // always 0
|
||||
u32 sp24; // time related
|
||||
mesg = NULL;
|
||||
sp28 = FALSE;
|
||||
sp28 = false;
|
||||
context = __osViGetCurrentContext();
|
||||
|
||||
if ((retrace = context->retraceCount) == 0) {
|
||||
@@ -76,7 +76,7 @@ void viMgrMain(void *vargs) {
|
||||
|
||||
args = (OSMgrArgs *) vargs;
|
||||
|
||||
while (TRUE) {
|
||||
while (true) {
|
||||
osRecvMesg(args->eventQueue, &mesg, OS_MESG_BLOCK);
|
||||
switch (*(u16 *) mesg) {
|
||||
case 13:
|
||||
|
||||
@@ -33,7 +33,7 @@ void osInitialize(void) {
|
||||
UNUSED u32 eu_sp34;
|
||||
UNUSED u32 eu_sp30;
|
||||
UNUSED u32 sp2c;
|
||||
D_80194040 = TRUE;
|
||||
D_80194040 = true;
|
||||
__osSetSR(__osGetSR() | 0x20000000);
|
||||
__osSetFpcCsr(0x01000800);
|
||||
while (__osSiRawReadIo(PIF_ADDR_START, &sp34)) {
|
||||
|
||||
@@ -29,7 +29,7 @@ s32 osPfsAllocateFile(OSPfs *pfs, u16 company_code, u32 game_code, u8 *game_name
|
||||
return PFS_ERR_INVALID;
|
||||
|
||||
file_size_in_pages = (file_size_in_bytes + 255) / (BLOCKSIZE * PFS_ONE_PAGE);
|
||||
if ((pfs->status & PFS_INITIALIZED) == FALSE)
|
||||
if ((pfs->status & PFS_INITIALIZED) == false)
|
||||
return PFS_ERR_INVALID;
|
||||
|
||||
PFS_CHECK_ID;
|
||||
@@ -99,7 +99,7 @@ s32 osPfsAllocateFile(OSPfs *pfs, u16 company_code, u32 game_code, u8 *game_name
|
||||
dir.game_name[j] = *game_name++;
|
||||
for (j = 0; j < ARRLEN(dir.ext_name); j++)
|
||||
dir.ext_name[j] = *ext_name++;
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, *file_no + pfs->dir_table, (u8*)&dir, FALSE));
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, *file_no + pfs->dir_table, (u8*)&dir, false));
|
||||
return ret;
|
||||
}
|
||||
return PFS_ERR_INVALID;
|
||||
@@ -171,7 +171,7 @@ static s32 __osClearPage(OSPfs *pfs, int page_no, u8 *data, u8 bank)
|
||||
ERRCK(__osPfsSelectBank(pfs));
|
||||
for (i = 0; i < PFS_ONE_PAGE; i++)
|
||||
{
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, page_no * PFS_ONE_PAGE + i, data, FALSE);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, page_no * PFS_ONE_PAGE + i, data, false);
|
||||
if (ret != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ s32 osPfsChecker(OSPfs *pfs)
|
||||
tmp_dir.status = DIR_STATUS_EMPTY;
|
||||
tmp_dir.data_sum = 0;
|
||||
SET_ACTIVEBANK_TO_ZERO;
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tmp_dir, FALSE));
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tmp_dir, false));
|
||||
fixed++;
|
||||
}
|
||||
else
|
||||
@@ -73,7 +73,7 @@ s32 osPfsChecker(OSPfs *pfs)
|
||||
tmp_dir.data_sum = 0;
|
||||
|
||||
SET_ACTIVEBANK_TO_ZERO;
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tmp_dir, FALSE));
|
||||
ERRCK(__osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tmp_dir, false));
|
||||
fixed++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ s32 osPfsDeleteFile(OSPfs *pfs, u16 company_code, u32 game_code, u8 *game_name,
|
||||
{
|
||||
ERRCK(__osPfsRWInode(pfs, &inode, OS_READ, bank));
|
||||
//! @todo magic constant
|
||||
ERRCK(__osPfsReleasePages(pfs, &inode, startpage, &sum, bank, &last_page, 1));
|
||||
ERRCK(__osPfsReleasePages(pfs, &inode, startpage, &sum, bank, &last_page, 1));
|
||||
ERRCK(__osPfsRWInode(pfs, &inode, OS_WRITE, bank));
|
||||
if (last_page.ipage == 1)
|
||||
break;
|
||||
@@ -56,7 +56,7 @@ s32 osPfsDeleteFile(OSPfs *pfs, u16 company_code, u32 game_code, u8 *game_name,
|
||||
dir.ext_name[k] = 0;
|
||||
}
|
||||
dir.status = DIR_STATUS_EMPTY;
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + file_no, (u8*)&dir, FALSE);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + file_no, (u8*)&dir, false);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ s32 __osPfsReleasePages(OSPfs *pfs, __OSInode *inode, u8 start_page, u16 *sum, u
|
||||
return PFS_ERR_INCONSISTENT;
|
||||
*last_page = next_page;
|
||||
//! @todo magic number
|
||||
if (flag == 1)
|
||||
if (flag == 1)
|
||||
inode->inode_page[start_page].ipage = 3;
|
||||
|
||||
ERRCK(__osBlockSum(pfs, start_page, sum, bank));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user