Data
 Prev: 6332 Up: Map Next: 634C
6333: Banknote animation table
Used by the routine at 634C. This animation table contains 5 entries of 5 bytes each, which are used to determine how far up, down or to the right the banknote should move next. The algorithm used is as follows:
Step Description
1 Determine which entry to use based on the banknote's height above the ground
2 Generate a random number, R, between 0x00 and 0xFF
3 Find the index, J, of the first byte in the entry that is greater than R (J=0-4, or 5 if there is no such byte)
4 Increment the banknote's x-coordinate if J<=2, or leave it alone if J>2
5 Increment the banknote's y-coordinate if J=0 or 3, decrement it if J=1 or 4, or leave it alone if J=2 or 5
The first entry is used when the banknote's height above the ground is -1. This can only happen when the banknote is below but adjacent to the sidewalk, having recently moved right from a spot at a height of 0 above the road. The probabilities with which the banknote's x- and y-coordinates will be adjusted are as follows:
x x+1 y-1 y y+1
1/4 3/4 255/256 1/256 0
6333 DEFB \$00,\$C0,\$C0,\$C0,\$FF J will be 1 (with probability 3/4), 4 (63/256) or 5 (1/256)
The next entry is used when the banknote's height above the ground is 0 (i.e. it is on the road or sidewalk).
x x+1 y-1 y y+1
3/16 13/16 7/32 25/32 0
6338 DEFB \$00,\$30,\$D0,\$D0,\$D8 J will be 1 (with probability 3/16), 2 (5/8), 4 (1/32) or 5 (5/32)
The next entry is used when the banknote's height above the ground is 1.
x x+1 y-1 y y+1
3/8 5/8 1/8 15/32 13/32
633D DEFB \$48,\$58,\$A0,\$C0,\$D0 J will be 0 (with probability 9/32), 1 (1/16), 2 (9/32), 3 (1/8), 4 (1/16) or 5 (3/16)
The next entry is used when the banknote's height above the ground is 2.
x x+1 y-1 y y+1
3/8 5/8 0 1/4 3/4
6342 DEFB \$80,\$80,\$A0,\$E0,\$E0 J will be 0 (with probability 1/2), 2 (1/8), 3 (1/4) or 5 (1/8)
The final entry is used when the banknote's height above the ground is 3. This can only happen when the banknote is above the road, having recently moved right from a spot at a height of 2 above the sidewalk.
x x+1 y-1 y y+1
1/4 3/4 0 1/256 255/256
6347 DEFB \$C0,\$C0,\$C0,\$FF,\$FF J will be 0 (with probability 3/4), 3 (63/256) or 5 (1/256)
 Prev: 6332 Up: Map Next: 634C