This commit is contained in:
CreateSource 2024-04-28 15:06:09 -04:00
commit b52db6425a
14 changed files with 79 additions and 66 deletions

View file

@ -3,6 +3,12 @@
#include "dolphin/types.h"
#define frandBool() (((s32)frand() & 0x1))
#define frand8() (((s32)frand() & 0xFF))
#define frandmods(range) ((s32)frand() % (range))
#define frand16() (((s32)frand() & 0xFFFF))
#define frandmod31(range) (((s32)frand() & 0x7FFFFFFF) % (range))
u32 frand(void);
f32 frandf(void);
u32 frandmod(u32 arg0);

View file

@ -5,6 +5,7 @@
#include "game/hsfman.h"
#include "game/hsfdraw.h"
#include "game/printfunc.h"
#include "game/frand.h"
#include "game/hsfmotion.h"
@ -86,14 +87,14 @@ void ModuleProlog(void)
for(i=0; i<4; i++) {
team_players[GWPlayerCfg[i].group][team_cnt[GWPlayerCfg[i].group]++] = i;
}
if(frand() & 1) {
if(frandBool()) {
GWPlayerCfg[team_players[0][0]].group = 0;
GWPlayerCfg[team_players[0][1]].group = 1;
} else {
GWPlayerCfg[team_players[0][0]].group = 1;
GWPlayerCfg[team_players[0][1]].group = 0;
}
if(frand() & 1) {
if(frandBool()) {
GWPlayerCfg[team_players[1][0]].group = 2;
GWPlayerCfg[team_players[1][1]].group = 3;
} else {

View file

@ -5,6 +5,7 @@
#include "game/objsub.h"
#include "game/chrman.h"
#include "game/hsfman.h"
#include "game/frand.h"
#include "math.h"
#include "rel_sqrt_consts.h"
@ -272,8 +273,7 @@ void fn_1_64C(omObjData* arg0) {
temp_r31->unk_34 = 0;
temp_r31->unk_38 = 0;
temp_r31->unk_28 = 0.0f;
//frand implicit declaration? (probably frandf inline?)
temp_r31->unk_30 = (600.0f / (lbl_1_data_184[temp_r31->unk_02][0] - ((frand() & 0x7FFFFFFF) % lbl_1_data_184[temp_r31->unk_02][1])));
temp_r31->unk_30 = (600.0f / (lbl_1_data_184[temp_r31->unk_02][0] - frandmod31(lbl_1_data_184[temp_r31->unk_02][1])));
temp_r31->unk_2C = temp_r31->unk_30;
arg0->model[0] = CharModelCreate(temp_r31->unk_01, 8);
arg0->model[1] = Hu3DModelCreate(HuDataSelHeapReadNum(lbl_1_data_100[temp_r31->unk_01], MEMORY_DEFAULT_NUM, HEAP_DATA));

View file

@ -12,6 +12,7 @@
#include "game/board/main.h"
#include "game/armem.h"
#include "game/audio.h"
#include "game/frand.h"
#include "rel_sqrt_consts.h"
@ -456,14 +457,14 @@ static void SMGroupGen(s32 index)
for(i=0; i<4; i++) {
team_players[smPlayerCfg[i].group][team_cnt[smPlayerCfg[i].group]++] = i;
}
if(frand() & 1) {
if(frandBool()) {
GWPlayerCfg[team_players[0][0]].group = 0;
GWPlayerCfg[team_players[0][1]].group = 1;
} else {
GWPlayerCfg[team_players[0][0]].group = 1;
GWPlayerCfg[team_players[0][1]].group = 0;
}
if(frand() & 1) {
if(frandBool()) {
GWPlayerCfg[team_players[1][0]].group = 2;
GWPlayerCfg[team_players[1][1]].group = 3;
} else {

View file

@ -4,6 +4,8 @@
#include "game/data.h"
#include "game/gamework_data.h"
#include "game/hsfanim.h"
#include "game/frand.h"
#include "game/hsfman.h"
#include "game/memory.h"
#include "game/minigame_seq.h"
@ -789,10 +791,10 @@ static void fn_1_C25C(void) {
BoardModelVisibilitySet(lbl_1_bss_760[i], 1);
sp11C[i] = sp20;
sp11C[i].y += 600.0f + i * 120;
sp11C[i].x += -25.0f + 50.0f * (frand() & 0xFF) * 0.003921569f;
sp11C[i].z += -25.0f + 50.0f * (frand() & 0xFF) * 0.003921569f;
sp11C[i].x += -25.0f + 50.0f * frand8() * 0.003921569f;
sp11C[i].z += -25.0f + 50.0f * frand8() * 0.003921569f;
sp2C[i].x = sp2C[i].z = 0.0f;
sp2C[i].y = 360.0f * (frand() & 0xFF) * 0.003921569f;
sp2C[i].y = 360.0f * frand8() * 0.003921569f;
BoardModelPosSetV(lbl_1_bss_760[i], &sp11C[i]);
BoardModelScaleSetV(lbl_1_bss_760[i], &sp14);
BoardModelRotSetV(lbl_1_bss_760[i], &sp2C[i]);
@ -1015,7 +1017,7 @@ static void fn_1_D114(ModelData *model, ParticleData *particle, Mtx matrix) {
}
}
if (j != particle->unk_30) {
temp_r26 = frand() & 0xFFFF;
temp_r26 = frand16();
temp_f31 = (-15.0f + 30.0f * (temp_r26 / 65536.0f)) * temp_r28->unk1C;
var_r31->unk08.x = sp8.x + temp_f31;
var_r31->unk08.y = sp8.y;

View file

@ -12,6 +12,8 @@
#include "game/pad.h"
#include "game/process.h"
#include "game/sprite.h"
#include "game/frand.h"
#include "game/window.h"
#include "game/board/audio.h"
#include "game/board/main.h"
@ -873,13 +875,13 @@ static void fn_1_11064(ModelData *model, ParticleData *particle, Mtx matrix) {
}
}
if (var_r28 != particle->unk_30) {
temp_f30 = 0.003921569f * (frand() & 0xFF) * 360.0f;
temp_f29 = 0.003921569f * (frand() & 0xFF) * 70.0f * temp_f31;
temp_f30 = 0.003921569f * frand8() * 360.0f;
temp_f29 = 0.003921569f * frand8() * 70.0f * temp_f31;
var_r31->unk34.x = lbl_1_bss_7F0->trans.x + temp_f29 * sin(temp_f30 * M_PI / 180.0);
var_r31->unk34.z = lbl_1_bss_7F0->trans.z + temp_f29 * cos(temp_f30 * M_PI / 180.0);
var_r31->unk34.y = lbl_1_bss_7F0->trans.y + temp_f31 * (-30.0f + 0.003921569f * (frand() & 0xFF) * 60.0f);
var_r31->unk08.x = 0.5f + 0.003921569f * (frand() & 0xFF) * 3.0f;
var_r31->unk08.y = 0.3f + 0.003921569f * (frand() & 0xFF) * 2.0f;
var_r31->unk34.y = lbl_1_bss_7F0->trans.y + temp_f31 * (-30.0f + 0.003921569f * frand8() * 60.0f);
var_r31->unk08.x = 0.5f + 0.003921569f * frand8() * 3.0f;
var_r31->unk08.y = 0.3f + 0.003921569f * frand8() * 2.0f;
var_r31->unk40.a = 0xB4;
var_r31->unk2C = 15.0f * temp_f31;
}
@ -915,19 +917,19 @@ static void fn_1_11484(ModelData *model, ParticleData *particle, Mtx matrix) {
if (particle->unk_00 == 0) {
var_r31 = particle->unk_48;
for (var_r28 = 0; var_r28 < particle->unk_30; var_r28++, var_r31++) {
temp_f30 = 0.003921569f * (frand() & 0xFF) * 360.0f;
temp_f31 = 0.003921569f * (frand() & 0xFF) * 50.0f;
temp_f30 = 0.003921569f * frand8() * 360.0f;
temp_f31 = 0.003921569f * frand8() * 50.0f;
var_r31->unk08.x = temp_f31 * cos(temp_f30 * M_PI / 180.0);
var_r31->unk08.y = 2.0f + 0.003921569f * (frand() & 0xFF) * 4.0f;
var_r31->unk08.y = 2.0f + 0.003921569f * frand8() * 4.0f;
var_r31->unk08.z = temp_f31 * sin(temp_f30 * M_PI / 180.0);
temp_f29 = 60.0f + 20.0f * (frand() & 0xFF) * 0.003921569f;
temp_f31 = 4.0f + 5.0f * (frand() & 0xFF) * 0.003921569f;
temp_f29 = 60.0f + 20.0f * frand8() * 0.003921569f;
temp_f31 = 4.0f + 5.0f * frand8() * 0.003921569f;
var_r31->unk14.x = temp_f31 * sin(temp_f30 * M_PI / 180.0) * cos(temp_f29 * M_PI / 180.0);
var_r31->unk14.y = temp_f31 * sin(temp_f29 * M_PI / 180.0);
var_r31->unk14.z = temp_f31 * cos(temp_f30 * M_PI / 180.0) * cos(temp_f29 * M_PI / 180.0);
var_r31->unk20 = 1.0f;
var_r31->unk40.a = 0xB4;
var_r31->unk2C = 9.0f + 0.003921569f * (frand() & 0xFF) * 4.0f;
var_r31->unk2C = 9.0f + 0.003921569f * frand8() * 4.0f;
}
particle->unk_00 = 1;
}

View file

@ -1,4 +1,5 @@
#include "REL/w02Dll.h"
#include "game/frand.h"
// Temporary defines
#define BOARD_ITEM_MINI 0x0
@ -76,8 +77,6 @@ s8 BoardComPreferItemCheck(s32, s8, s8, s8);
extern void BoardComKeySetLeft();
extern void BoardComKeySetRight();
extern void CharModelDataClose(s16);
extern u32 frand();
extern u32 frandmod(u32);
// function is probably global. only inlined in rels?
inline s32 get_current_board(void) {
@ -269,7 +268,7 @@ void fn_1_990(void) {
currPlayer = GWSystem.player_curr;
BoardWinCreateChoice(2, 0x130011U, 4, 0);
if (GWPlayer[currPlayer].com) {
if ((s32) (frand() & 1) != 0) {
if (frandBool() != 0) {
BoardComKeySetLeft();
} else {
BoardComKeySetRight();

View file

@ -18,6 +18,7 @@
#include "game/hsfdraw.h"
#include "game/hsfmotion.h"
#include "game/pad.h"
#include "game/frand.h"
typedef struct someBits {
/* 0x00 */ struct {
@ -62,7 +63,6 @@ extern u16 HuPadBtnDown[4];
//function signatures
s32 BoardVecDAngleCalcRange(float *value, float min, float range);
s32 frand(void);
void fn_1_BE30(ModelData *model, ParticleData *particle, Mtx matrix);
void fn_1_BDAC(void);
@ -960,13 +960,13 @@ void fn_1_BE30(ModelData *model, ParticleData *particle, Mtx matrix) {
}
}
if (j != particle->unk_30) {
temp_f30 = 360.0f * (0.003921569f * (frand() & 0xFF));
temp_f29 = temp_f31 * (20.0f + (60.0f * (0.003921569f * (frand() & 0xFF))));
temp_f30 = 360.0f * (0.003921569f * frand8());
temp_f29 = temp_f31 * (20.0f + (60.0f * (0.003921569f * frand8())));
var_r31->unk34.x = (sp8.x + (temp_f29 * sin((M_PI * temp_f30) / 180.0)));
var_r31->unk34.z = (sp8.z + (temp_f29 * cos((M_PI * temp_f30) / 180.0)));
var_r31->unk34.y = (sp8.y + (temp_f31 * (-30.0f + (40.0f * (0.003921569f * (frand() & 0xFF))))));
var_r31->unk08.x = (0.5f + (3.0f * (0.003921569f * (frand() & 0xFF))));
var_r31->unk08.y = (0.3f + (2.0f * (0.003921569f * (frand() & 0xFF))));
var_r31->unk34.y = (sp8.y + (temp_f31 * (-30.0f + (40.0f * (0.003921569f * frand8())))));
var_r31->unk08.x = (0.5f + (3.0f * (0.003921569f * frand8())));
var_r31->unk08.y = (0.3f + (2.0f * (0.003921569f * frand8())));
var_r31->unk40.a = 180;
var_r31->unk2C = (15.0f * temp_f31);
}

View file

@ -18,6 +18,7 @@
#include "game/board/space.h"
#include "game/board/ui.h"
#include "game/board/window.h"
#include "game/frand.h"
#include "dolphin.h"
#include "math.h"
@ -361,7 +362,7 @@ static void fn_1_2C10(void) {
temp_r31->unk18 = 0.0f;
BoardModelAlphaSet(temp_r31->unk04, temp_r31->unk18);
BoardModelVisibilitySet(temp_r31->unk04, 0);
temp_r31->unk14 = 0.003921569f * (frand() & 0xFF) * 360.0f;
temp_r31->unk14 = 0.003921569f * frand8() * 360.0f;
temp_r31->unk08 = -1;
temp_r31->unk00 = 0;
temp_r31->unk06 = i;
@ -747,7 +748,7 @@ static s32 fn_1_3C9C(void) {
var_r21--;
} else {
var_r21 = frandmod(10) + 15;
if ((frand() & 1) || var_r18 == 3) {
if (frandBool() || var_r18 == 3) {
var_r19 = 0x100;
} else {
OSReport("com sel chg: %d \n", var_r29);
@ -1170,19 +1171,19 @@ static void fn_1_5A2C(ModelData *model, ParticleData *particle, Mtx matrix) {
}
}
if (j != particle->unk_30) {
var_r31->unk08.x = 0.003921569f * (frand() & 0xFF) * 360.0f;
var_r31->unk08.y = 1.0f + 0.003921569f * (frand() & 0xFF) * 1.5f;
var_r31->unk08.x = 0.003921569f * frand8() * 360.0f;
var_r31->unk08.y = 1.0f + 0.003921569f * frand8() * 1.5f;
var_r31->unk08.z = 240.0f;
var_r31->unk40.r = 0x40;
var_r31->unk40.g = 0xD2;
var_r31->unk40.b = 0xFF;
var_r31->unk20 = 2.0f + 0.003921569f * (frand() & 0xFF) * 8.0f;
var_r31->unk24 = 2.0f + 0.003921569f * (frand() & 0xFF) * 6.0f;
var_r31->unk28 = 1.0f + 0.003921569f * (frand() & 0xFF) * 3.0f;
var_r31->unk34.x = -100.0f + 0.003921569f * (frand() & 0xFF) * 200.0f;
var_r31->unk34.y = 0.003921569f * (frand() & 0xFF) * 10.0f;
var_r31->unk34.z = -100.0f + 0.003921569f * (frand() & 0xFF) * 200.0f;
var_r31->unk2C = 7.0f + 0.003921569f * (frand() & 0xFF) * 3.0f;
var_r31->unk20 = 2.0f + 0.003921569f * frand8() * 8.0f;
var_r31->unk24 = 2.0f + 0.003921569f * frand8() * 6.0f;
var_r31->unk28 = 1.0f + 0.003921569f * frand8() * 3.0f;
var_r31->unk34.x = -100.0f + 0.003921569f * frand8() * 200.0f;
var_r31->unk34.y = 0.003921569f * frand8() * 10.0f;
var_r31->unk34.z = -100.0f + 0.003921569f * frand8() * 200.0f;
var_r31->unk2C = 7.0f + 0.003921569f * frand8() * 3.0f;
}
}
}

View file

@ -372,7 +372,7 @@ void fn_1_5648(void) {
for (var_r31 = 0; var_r31 < 3; var_r31++) {
BoardModelRotGet(lbl_1_bss_6C[var_r31], &sp8);
sp8.y = 0.003921569f * (360.0f * (int)(frand() & 0xFF));
sp8.y = 0.003921569f * (360.0f * frand8());
BoardModelRotSetV(lbl_1_bss_6C[var_r31], &sp8);
}
loop_3:

View file

@ -348,7 +348,7 @@ void fn_1_E40(void) {
fn_1_96B4();
BoardWinCreateChoice(2, 0x27000F, 7, 0);
if (GWPlayer[temp_r31].com != 0) {
if (((s32)frand() & 1) != 0) {
if (frandBool() != 0) {
BoardComKeySetLeft();
} else {
BoardComKeySetRight();

View file

@ -1,6 +1,7 @@
#include "REL/w05Dll.h"
#include "game/hsfdraw.h"
#include "game/frand.h"
#include "game/board/model.h"
#include "game/board/player.h"
@ -211,7 +212,7 @@ void fn_1_3514(void) {
HuAudFXPlay(0x48A);
BoardModelMotionStart(lbl_1_bss_4E[lbl_1_bss_48], 2, 0);
var_r31 = BoardSpaceLinkFlagSearch(0, GWPlayer[lbl_1_bss_4C].space_curr, 0x100);
if ((frand() & 1) != 0) {
if (frandBool() != 0) {
var_r31 = BoardSpaceLinkFlagSearch(0, var_r31, 0x200);
} else {
var_r31 = BoardSpaceLinkFlagSearch(0, var_r31, 0x400);

View file

@ -10,6 +10,7 @@
#include "game/process.h"
#include "game/sprite.h"
#include "game/window.h"
#include "game/frand.h"
#include "game/board/audio.h"
#include "game/board/com.h"
#include "game/board/main.h"
@ -1172,13 +1173,13 @@ static void fn_1_4460(ModelData *model, ParticleData *particle, Mtx matrix) {
}
}
if (j != particle->unk_30) {
temp_f30 = 0.003921569f * (frand() & 0xFF) * 360.0f;
temp_f29 = var_f31 * (20.0f + 0.003921569f * (frand() & 0xFF) * 60.0f);
temp_f30 = 0.003921569f * frand8() * 360.0f;
temp_f29 = var_f31 * (20.0f + 0.003921569f * frand8() * 60.0f);
var_r31->unk34.x = sp8.x + temp_f29 * sin(temp_f30 * M_PI / 180.0);
var_r31->unk34.z = sp8.z + temp_f29 * cos(temp_f30 * M_PI / 180.0);
var_r31->unk34.y = sp8.y + var_f31 * (-30.0f + 0.003921569f * (frand() & 0xFF) * 40.0f);
var_r31->unk08.x = 0.5f + 0.003921569f * (frand() & 0xFF) * 3.0f;
var_r31->unk08.y = 0.3f + 0.003921569f * (frand() & 0xFF) * 2.0f;
var_r31->unk34.y = sp8.y + var_f31 * (-30.0f + 0.003921569f * frand8() * 40.0f);
var_r31->unk08.x = 0.5f + 0.003921569f * frand8() * 3.0f;
var_r31->unk08.y = 0.3f + 0.003921569f * frand8() * 2.0f;
var_r31->unk40.a = 0xB4;
var_r31->unk2C = 15.0f * var_f31;
}

View file

@ -24,6 +24,7 @@
#include "game/board/ui.h"
#include "game/board/window.h"
#include "game/board/view.h"
#include "game/frand.h"
typedef struct {
/* 0x00 */ s16 unk00;
@ -52,8 +53,6 @@ typedef struct {
/* 0x04 */ Vec unk10;
} UnkGenieCameraStruct; // Size 0x1C
extern u32 frandmod(u32);
static void ItemProcess(void);
static void RestoreProcess(void);
static void ItemDestroy(void);
@ -699,7 +698,7 @@ static void ExecItemHammer(void) {
temp_r27 = ItemGetTarget();
suitMdl = BoardModelCreate(itemMdlTbl[currItem], NULL, 0);
BoardModelLayerSet(suitMdl, 2);
var_r30 = frand() & 1;
var_r30 = frandBool();
if (var_r30 != 0) {
BoardModelMotionTimeSet(suitMdl, 1.5f);
} else {
@ -1125,12 +1124,12 @@ static void ExecItemSwap(void) {
for (var_r31 = 0; var_r31 < 60; var_r31++) {
for (var_r30 = 0; var_r30 < var_r28 / 2; var_r30++) {
sp6C = sp1A4[var_r30];
sp6C.x += 3.0 * sin((frand() % 360) * M_PI / 180.0);
sp6C.y += 3.0 * sin((frand() % 360) * M_PI / 180.0);
sp6C.x += 3.0 * sin((frandmods(360)) * M_PI / 180.0);
sp6C.y += 3.0 * sin((frandmods(360)) * M_PI / 180.0);
BoardModelPosSetV(sp54[var_r30], &sp6C);
sp6C = sp180[var_r30];
sp6C.x += 3.0 * sin((frand() % 360) * M_PI / 180.0);
sp6C.y += 3.0 * sin((frand() % 360) * M_PI / 180.0);
sp6C.x += 3.0 * sin((frandmods(360)) * M_PI / 180.0);
sp6C.y += 3.0 * sin((frandmods(360)) * M_PI / 180.0);
BoardModelPosSetV(sp54[var_r30 + 3], &sp6C);
}
HuPrcSleep(2);
@ -1362,7 +1361,7 @@ static void ExecItemWhistle(void) {
temp_r19 = GWBoardGet();
temp_r21 = BoardModelMotionCreate(temp_r28, callAttackMotTbl[temp_r19]);
temp_r20 = BoardModelMotionCreate(temp_r28, callAttackMotTbl2[temp_r19]);
var_f31 = 0.003921569f * (frand() & 0xFF) * 360.0f;
var_f31 = 0.003921569f * frand8() * 360.0f;
spA8.x = spA8.y = spA8.z = 0.5f;
for (var_r31 = 0; var_r31 < 4; var_r31++) {
sp20[var_r31] = BoardModelCreate(DATA_MAKE_NUM(DATADIR_BGUEST, 39), NULL, 1);
@ -1962,10 +1961,10 @@ static void LampParticleUpdate(ModelData *model, ParticleData *particle, Mtx mat
sp8 = 12.0f;
var_r31->unk08.x = 12.0 * cos((i * 110.0f + 35.0f) * M_PI / 180.0);
var_r31->unk08.y = 12.0 * sin((i * 110.0f + 35.0f) * M_PI / 180.0);
var_r31->unk08.z = 3.0f + (frand() & 0xFF) * 5.0f * 0.003921569f;
var_r31->unk08.z = 3.0f + frand8() * 5.0f * 0.003921569f;
var_r31->unk14.y = 255.0f;
var_r31->unk2C = 25.0f;
temp_f30 = 175.0f + (frand() & 0xFF) * 0x50 * 0.003921569f;
temp_f30 = 175.0f + frand8() * 0x50 * 0.003921569f;
var_r31->unk40.r = var_r31->unk40.g = var_r31->unk40.b = temp_f30;
var_r31->unk00_s16 = 0;
}
@ -1983,7 +1982,7 @@ static void LampParticleUpdate(ModelData *model, ParticleData *particle, Mtx mat
var_r31->unk14.y -= 2.8333333f;
if (var_r31->unk14.y <= 120.0f) {
var_r31->unk14.y = 200.0f;
temp_f31 = (frand() & 0xFF) * 180.0f * 0.003921569f;
temp_f31 = frand8() * 180.0f * 0.003921569f;
var_r31->unk08.x = 6.0 * cos(temp_f31 * M_PI / 180.0);
var_r31->unk08.y = -4.0f;
var_r31->unk08.z = 6.0 * sin(temp_f31 * M_PI / 180.0);
@ -2014,18 +2013,18 @@ static void GenieParticleUpdate(ModelData *model, ParticleData *particle, Mtx ma
if (particle->unk_34 == 0) {
var_r31 = particle->unk_48;
for (i = 0; i < particle->unk_30; i++, var_r31++) {
var_r31->unk34.x = -50.0f + (frand() & 0xFF) * 100.0f * 0.003921569f;
var_r31->unk34.y = -50.0f + (frand() & 0xFF) * 100.0f * 0.003921569f;
var_r31->unk34.z = -10.0f + (frand() & 0xFF) * 20.0f * 0.003921569f;
temp_f31 = 0.5f + (frand() & 0xFF) * 3.0f * 0.003921569f;
var_r31->unk34.x = -50.0f + frand8() * 100.0f * 0.003921569f;
var_r31->unk34.y = -50.0f + frand8() * 100.0f * 0.003921569f;
var_r31->unk34.z = -10.0f + frand8() * 20.0f * 0.003921569f;
temp_f31 = 0.5f + frand8() * 3.0f * 0.003921569f;
var_r31->unk08.x = temp_f31 * cos((i * 110.0f + 35.0f) * M_PI / 180.0);
var_r31->unk08.y = temp_f31 * sin((i * 110.0f + 35.0f) * M_PI / 180.0);
var_r31->unk08.z = 0.0f;
var_r31->unk14.y = 255.0f;
temp_f30 = 125.0f + (frand() & 0xFF) * 0x64 * 0.003921569f;
temp_f30 = 125.0f + frand8() * 0x64 * 0.003921569f;
var_r31->unk40.r = var_r31->unk40.g = var_r31->unk40.b = temp_f30;
var_r31->unk00 = 0;
var_r31->unk2C = 80.0f + (frand() & 0xFF) * 60.0f * 0.003921569f;
var_r31->unk2C = 80.0f + frand8() * 60.0f * 0.003921569f;
}
}
var_r31 = particle->unk_48;