diff options
author | dannye <corrnondacqb@yahoo.com> | 2015-07-26 23:34:43 -0500 |
---|---|---|
committer | dannye <corrnondacqb@yahoo.com> | 2015-07-27 00:00:21 -0500 |
commit | 408f9b3141e7436f0092533e92c357dd0b9f3021 (patch) | |
tree | d7b98a1a2a9aeef8c507be2ed58de45f7ae592d6 /macros.asm | |
parent | d7c5c8cf22c857830aae4da285c91e5e58c2cc02 (diff) | |
parent | 90482175c354ecfa18191eab97296a479d2e0ad5 (diff) |
Merge branch 'master' of https://github.com/luckytyphlosion/pokered
Diffstat (limited to 'macros.asm')
-rw-r--r-- | macros.asm | 60 |
1 files changed, 60 insertions, 0 deletions
@@ -633,3 +633,63 @@ EAST_MAP_CONNECTION: MACRO db 0 ; x alignment dw wOverworldMap + 7 + \2_WIDTH ; window (position of the upper left block after entering the map) ENDM + +tmlearn: MACRO +if 0 == \1 +tm1 = 0 +tm1_ = 0 +else +tm1 = %111 & (\1 - 1) +tm1_ = 1 +endc +if 2 <= _NARG +tm2 = %111 & (\2 - 1) +tm2_ = 1 +else +tm2 = 0 +tm2_ = 0 +endc +if 3 <= _NARG +tm3 = %111 & (\3 - 1) +tm3_ = 1 +else +tm3 = 0 +tm3_ = 0 +endc +if 4 <= _NARG +tm4 = %111 & (\4 - 1) +tm4_ = 1 +else +tm4 = 0 +tm4_ = 0 +endc +if 5 <= _NARG +tm5 = %111 & (\5 - 1) +tm5_ = 1 +else +tm5 = 0 +tm5_ = 0 +endc +if 6 <= _NARG +tm6 = %111 & (\6 - 1) +tm6_ = 1 +else +tm6 = 0 +tm6_ = 0 +endc +if 7 <= _NARG +tm7 = %111 & (\7 - 1) +tm7_ = 1 +else +tm7 = 0 +tm7_ = 0 +endc +if 8 <= _NARG +tm8 = %111 & (\8 - 1) +tm8_ = 1 +else +tm8 = 0 +tm8_ = 0 +endc +db tm8_ << tm8 | tm7_ << tm7 | tm6_ << tm6 | tm5_ << tm5 | tm4_ << tm4 | tm3_ << tm3 | tm2_ << tm2 | tm1_ << tm1 +ENDM
\ No newline at end of file |