Difference between revisions of "FF7/Field/Script/Opcodes/7F RDMSD"

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Synergy Blades
 
m (3 revisions imported)
 
(2 intermediate revisions by 2 users not shown)
Line 12: Line 12:
 
==== Arguments ====
 
==== Arguments ====
  
* '''const UByte''' ''B'': Source bank, or zero if ''S'' is specified as a literal value.
+
* '''const UByte''' ''B'': Bank in which the seed value is stored, or zero if ''S'' is specified as a literal value.
 
* '''const UByte''' ''S'': Seed for the random generator, or address for the seed if ''B'' is non-zero.
 
* '''const UByte''' ''S'': Seed for the random generator, or address for the seed if ''B'' is non-zero.
  

Latest revision as of 05:17, 23 May 2019

  • Opcode: 0x7F
  • Short name: RDMSD
  • Long name: Seed Random Generator

Memory layout

0x7F B S

Arguments

  • const UByte B: Bank in which the seed value is stored, or zero if S is specified as a literal value.
  • const UByte S: Seed for the random generator, or address for the seed if B is non-zero.

Description

Seeds the random number generator used by RANDOM. The lower four bits of the arguments are used as the seed value by altering the offset used to take a value from the table of pseudo-random numbers.