Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
random.c File Reference
#include "engine/game.h"
#include <libpad.h>
Include dependency graph for random.c:

Go to the source code of this file.

Functions

void seedRandom (s32 seed)
 Starts random() at entry seed of RANDOM_TABLE.
 
s32 random (void)
 The next entry of RANDOM_TABLE, 0 to RANDOM_COUNT - 1.
 

Variables

u16 RANDOM_TABLE [0x1000]
 The 4096 numbers random() walks through, 0-0xFFF.
 
Random RANDOM = { 0, seedRandom, random }
 

Function Documentation

◆ seedRandom()

void seedRandom ( s32  seed)

Starts random() at entry seed of RANDOM_TABLE.

Definition at line 5 of file random.c.

◆ random()

s32 random ( void  )

The next entry of RANDOM_TABLE, 0 to RANDOM_COUNT - 1.

Definition at line 10 of file random.c.

Variable Documentation

◆ RANDOM_TABLE

u16 RANDOM_TABLE[0x1000]

The 4096 numbers random() walks through, 0-0xFFF.

Definition at line 18 of file random.c.

Referenced by random().

◆ RANDOM

Random RANDOM = { 0, seedRandom, random }

Definition at line 533 of file random.c.

Referenced by CARDGAME_jitterSprite(), CARDGAME_shufflePile(), CARDGAME_startFirstPick(), confuseFighters(), FIELDSTG_hidePrize(), FIELDSTG_rollBattleSteps(), FIELDSTG_runGauge(), FIELDSTG_startAreaBattle(), FIELDSTG_updateHiddenSpots(), FIGHTSTG_adjustDamage(), FIGHTSTG_computeMagicDamage(), FIGHTSTG_getEventDelay(), FIGHTSTG_getHeal(), FIGHTSTG_pickEnemySwitch(), FIGHTSTG_raiseOneStatus(), FIGHTSTG_randomStage(), FIGHTSTG_rollCounter(), FIGHTSTG_rollCritical(), FIGHTSTG_rollDrain(), FIGHTSTG_rollHit(), FIGHTSTG_rollMagicCritical(), FIGHTSTG_rollMagicHit(), FIGHTSTG_rollPoison(), FIGHTSTG_rollSleep(), FIGHTSTG_rollStatusRaise(), FIGHTSTG_rollSteal(), FIGHTSTG_runItemScript(), FIGHTSTG_startRestriction(), FIGHTSTG_testConfusion(), FIGHTSTG_testEnemyCondition(), FIGHTSTG_testParalysis(), FIGHTSTG_testRunAway(), FIGHTSTG_testWakeUp(), FIGHTSTG_updateCameraShots(), FIGHTSTG_updateConfusedMenu(), FIGHTSTG_updateEnemyTurn(), FIGHTSTG_updateFace(), main(), moveWanderer(), moveWanderPair(), newGame(), pickEvenFighterPrize(), pickOddFighterPrize(), queueFirstTurns(), random(), releaseFlyers(), rollStatus(), rollTechChance(), seedRandom(), startNextShot(), STCRDSHP_openPack(), STDWTITL_tickBackground(), STFGTREP_raiseStats(), STGTRAIN_lowerStat(), STGTRAIN_playTraining(), STGTRAIN_raiseMaxHpMp(), STGTRAIN_raiseResistance(), STGTRAIN_raiseStat(), STSTATUS_useItem(), updateEffect(), updateWanderer(), updateWanderPair(), WFIGHTMN_endBattle(), and WFIGHTMN_rollAmbush().