Internals Sequence Table
Internals Sequence Table
(used in load_frame())
For each frame:
image
0-based index
sword
bits 0..5: sword frame (0-based index into the sword table)
bits 6..7: chtab (add 2: 00=2, 01=3, 10=4, 11=5)
dx
delta x from char's position to image's position (+ = forward)
dy
delta y from char's position to image's position (+ = down)
flags
bits 0..4: x-position of weight (backward, that is right on the image)
bit 5: "thin" this frame for collision detection (used in
set_char_collision())
bit 6: needs floor (used in check_on_floor() and check_press())
bit 7: even/odd pixel (used in load_frame_to_obj())
sequence indexes:
See internals_sequence-index.csv
Char:
58=left
198=right
one tile is 14 units wide
|
|load_frame_to_obj()
V
Object:
0=left
280=right
one tile is 28 units wide
|
|calc_screen_x_coord()
V
Screen:
0=left
320=right
one tile is 32 units wide
(struct char_type)
frame
Index of current frame.
The used frame table depends on charid.
x
x-position in the Char coordinate system.
y
y-position
direction
0x00 (>=0): right (image is flipped)
0x56: none (for guards)
0xFF (<0): left (image is not flipped)
curr_col
Current column, 0..9 is in the current room.
curr_row
Current row, 0..2 is in the current room.
action
0: stand
1: run, jump
2: hang, climb
3: in midair
4: in freefall
5: bumped
6: hang straight
7: turn
99: char is hurt by sword
fall_x
x-speed of falling (+ = forward)
fall_y
y-speed of falling (+ = down)
room
Current room.
repeat
(used in safe_step())
0: may step off edge
1: won't step off edge
charid
Who is this?
Its value decides which frame table to use (in load_frame()), and various
things about char's behaviour.
0: kid
1: shadow
2: guard
4: skeleton
5: princess
6: vizier (in intro)
0x18: mouse
sword
0: not holding sword
2: holding sword
alive
<0: is alive
>=0: is dead
curr_seq
Current position (address) in the sequence table.