# Movement code list. Many thanks to Michael1 for finding the ASM and making # this page: http://pkhack.fobby.net/misc/txt/movement_parser.txt. # Last updated by AnyoneEB at 2004-12-11.1526-0500 # # Notes: # The wait timer is at $1372,*$8A. # The temp var is at $1516,*$8A. # &short C09AF9_tbl(X) is defined as take the byte X and find the X'th entry # in the two-byte pointer table at $C09AF9, index the pointer by the value # of $88, and return the (C++) reference at that two byte pointer (bank byte # should always be $7e, which is WRAM). 08 XX XX YY,"Write $XXXX to $107A,*$88. Write $YY to $10B6,*$88."; 12 XX XX YY,"Write byte $YY to $XXXX"; 15 XX XX YY YY,"Write word $YYYY to $XXXX"; 16 XX XX,"If temp var is 0, jump to $XXXX and subtract 3 (2?) from $12E6,*$8A (conditional return from sub)."; 17 XX XX,"If temp var is not 0, jump to $XXXX and subtract 3 (2?) from $12E6,*$8A (conditional return from sub)."; 1a XX XX,"Put pos to return to in ($84),($12E6,*$8A), add 2 to $12E6,*$8A to support nested subs, jump (gosub) to $XXXX"; 1d XX XX,"Set temp var to $XXXX"; 1e XX XX,"Store value at $XXXX in WRAM in temp var"; 1f XX,"Write temp var to C09AF9_tbl(X)"; 20 XX,"Write C09AF9_tbl(X) to temp var"; 21 XX,"Put C09AF9_tbl($XX) into the wait timer"; 22 XX XX,"Put $XXXX into $11E2,*$88"; 23 XX XX,"Put $XXXX into $11A6,*$88"; 25 XX XX,"Put $XXXX into $121E,*$88"; 26 XX,"Put C09AF9_tbl($XX) into $10F2,*$88"; 42 XX XX XX,"JSR to $XXXXXX; push before and pop after postion and temp var (position incremented before jump)"; 44,"Set the wait timer to the temp var (ASM specifically skips if temp var is zero, but I think that does not affect the effect)";