[asm] game_pawn.asm

Viewer

copydownloadembedprintName: game_pawn.asm
  1. ;--------------------------------------------------------
  2. ; File Created by SDCC : free open source ANSI-C Compiler
  3. ; Version 4.1.12 #12748 (MINGW64)
  4. ;--------------------------------------------------------
  5.         .module game_pawn
  6.         .optsdcc -mz80
  7.        
  8. ;--------------------------------------------------------
  9. ; Public variables in this module
  10. ;--------------------------------------------------------
  11.         .globl _Mem_Set
  12.         .globl _VDP_SetSpriteColorSM1
  13.         .globl _VDP_Peek_16K
  14.         .globl _VDP_WriteVRAM_16K
  15.         .globl _g_Game_DrawPattern
  16.         .globl _g_Game_DrawX
  17.         .globl _g_Game_DrawY
  18.         .globl _g_SLTSL
  19.         .globl _g_GRPACY
  20.         .globl _g_GRPACX
  21.         .globl _g_LOGOPR
  22.         .globl _g_CMASK
  23.         .globl _g_CLOC
  24.         .globl _g_FNKSTR
  25.         .globl _g_ATRBYT
  26.         .globl _g_BDRCLR
  27.         .globl _g_BAKCLR
  28.         .globl _g_FORCLR
  29.         .globl _g_CSRX
  30.         .globl _g_CSRY
  31.         .globl _g_MLTPAT
  32.         .globl _g_MLTATR
  33.         .globl _g_MLTCGP
  34.         .globl _g_MLTCOL
  35.         .globl _g_MLTNAM
  36.         .globl _g_GRPPAT
  37.         .globl _g_GRPATR
  38.         .globl _g_GRPCGP
  39.         .globl _g_GRPCOL
  40.         .globl _g_GRPNAM
  41.         .globl _g_T32PAT
  42.         .globl _g_T32ATR
  43.         .globl _g_T32CGP
  44.         .globl _g_T32COL
  45.         .globl _g_T32NAM
  46.         .globl _g_TXTPAT
  47.         .globl _g_TXTATR
  48.         .globl _g_TXTCGP
  49.         .globl _g_TXTCOL
  50.         .globl _g_TXTNAM
  51.         .globl _g_CLMLST
  52.         .globl _g_CRTCNT
  53.         .globl _g_LINLEN
  54.         .globl _g_LINL32
  55.         .globl _g_LINL40
  56.         .globl _g_SVFFFD
  57.         .globl _g_RG27SAV
  58.         .globl _g_RG26SAV
  59.         .globl _g_RG25SAV
  60.         .globl _g_SVFFF8
  61.         .globl _g_MINROM
  62.         .globl _g_RG23SAV
  63.         .globl _g_RG22SAV
  64.         .globl _g_RG21SAV
  65.         .globl _g_RG20SAV
  66.         .globl _g_RG19SAV
  67.         .globl _g_RG18SAV
  68.         .globl _g_RG17SAV
  69.         .globl _g_RG16SAV
  70.         .globl _g_RG15SAV
  71.         .globl _g_RG14SAV
  72.         .globl _g_RG13SAV
  73.         .globl _g_RG12SAV
  74.         .globl _g_RG11SAV
  75.         .globl _g_RG10SAV
  76.         .globl _g_RG09SAV
  77.         .globl _g_RG08SAV
  78.         .globl _g_PROCNM
  79.         .globl _g_SLTWRK
  80.         .globl _g_SLTATR
  81.         .globl _g_SLTTBL
  82.         .globl _g_EXPTBL
  83.         .globl _g_MNROM
  84.         .globl _g_DRWANG
  85.         .globl _g_DRWSCL
  86.         .globl _g_DRWFLG
  87.         .globl _g_GYPOS
  88.         .globl _g_GXPOS
  89.         .globl _g_BRDATR
  90.         .globl _g_CASPRV
  91.         .globl _g_OLDSCR
  92.         .globl _g_SCRMOD
  93.         .globl _g_FLBMEM
  94.         .globl _g_KANAMD
  95.         .globl _g_KANAST
  96.         .globl _g_CAPST
  97.         .globl _g_CSTYLE
  98.         .globl _g_CSRSW
  99.         .globl _g_INSFLG
  100.         .globl _g_ESCCNT
  101.         .globl _g_GRPHED
  102.         .globl _g_WINWID
  103.         .globl _g_LOWLIM
  104.         .globl _g_INTCNT
  105.         .globl _g_INTVAL
  106.         .globl _g_JIFFY
  107.         .globl _g_PADX
  108.         .globl _g_PADY
  109.         .globl _g_INTFLG
  110.         .globl _g_RTYCNT
  111.         .globl _g_TRPTBL
  112.         .globl _g_HIMEM
  113.         .globl _g_BOTTOM
  114.         .globl _g_PATWRK
  115.         .globl _g_LINWRK
  116.         .globl _g_KEYBUF
  117.         .globl _g_NEWKEY
  118.         .globl _g_OLDKEY
  119.         .globl _g_CLIKFL
  120.         .globl _g_ONGSBF
  121.         .globl _g_FNKFLG
  122.         .globl _g_FNKSWI
  123.         .globl _g_CODSAV
  124.         .globl _g_FSTPOS
  125.         .globl _g_LINTTB
  126.         .globl _g_BASROM
  127.         .globl _g_ENSTOP
  128.         .globl _g_VCBC
  129.         .globl _g_VCBB
  130.         .globl _g_VCBA
  131.         .globl _g_PLYCNT
  132.         .globl _g_MUSICF
  133.         .globl _g_QUEUEN
  134.         .globl _g_MCLPTR
  135.         .globl _g_MCLLEN
  136.         .globl _g_SAVVOL
  137.         .globl _g_VOICEN
  138.         .globl _g_SAVSP
  139.         .globl _g_PRSCNT
  140.         .globl _g_LSTMOD
  141.         .globl _g_LSTCOM
  142.         .globl _g_COMMSK
  143.         .globl _g_ESTBLS
  144.         .globl _g_FLAGS
  145.         .globl _g_ERRORS
  146.         .globl _g_DATCNT
  147.         .globl _g_DEVNUM
  148.         .globl _g_OLDINT
  149.         .globl _g_OLDSTT
  150.         .globl _g_MEXBIh
  151.         .globl _g_RSIQLN
  152.         .globl _g_RSFCB
  153.         .globl _g_TOCNT
  154.         .globl _g_RSTMP
  155.         .globl _g_YSAVE
  156.         .globl _g_XSAVE
  157.         .globl _g_NORUSE
  158.         .globl _g_MODE
  159.         .globl _g_ROMA
  160.         .globl _g_CHRCNT
  161.         .globl _g_EXBRSA
  162.         .globl _g_AVCSAV
  163.         .globl _g_ACPAGE
  164.         .globl _g_DPPAGE
  165.         .globl _g_RS2IQ
  166.         .globl _g_VOICCQ
  167.         .globl _g_VOICBQ
  168.         .globl _g_VOICAQ
  169.         .globl _g_QUEBAK
  170.         .globl _g_QUETAB
  171.         .globl _g_ASPCT2
  172.         .globl _g_ASPCT1
  173.         .globl _g_HEADER
  174.         .globl _g_HIGH
  175.         .globl _g_LOW
  176.         .globl _g_CS240
  177.         .globl _g_CS120
  178.         .globl _g_GETPNT
  179.         .globl _g_PUTPNT
  180.         .globl _g_REPCNT
  181.         .globl _g_SCNCNT
  182.         .globl _g_FRCNEW
  183.         .globl _g_QUEUES
  184.         .globl _g_MINUPD
  185.         .globl _g_MAXUPD
  186.         .globl _g_TRGFLG
  187.         .globl _g_STATFL
  188.         .globl _g_RG7SAV
  189.         .globl _g_RG6SAV
  190.         .globl _g_RG5SAV
  191.         .globl _g_RG4SAV
  192.         .globl _g_RG3SAV
  193.         .globl _g_RG2SAV
  194.         .globl _g_RG1SAV
  195.         .globl _g_RG0SAV
  196.         .globl _g_CNSDFG
  197.         .globl _g_CLIKSW
  198.         .globl _g_USRTAB
  199.         .globl _g_CLPRIM
  200.         .globl _g_WRPRIM
  201.         .globl _g_RDPRIM
  202.         .globl _GamePawn_Initialize
  203.         .globl _GamePawn_SetPosition
  204.         .globl _GamePawn_SetAction
  205.         .globl _GamePawn_Update
  206.         .globl _GamePawn_Draw
  207.         .globl _GamePawn_SetTargetPosition
  208.         .globl _GamePawn_InitializePhysics
  209. ;--------------------------------------------------------
  210. ; special function registers
  211. ;--------------------------------------------------------
  212. ;--------------------------------------------------------
  213. ; ram data
  214. ;--------------------------------------------------------
  215.         .area _DATA
  216. _g_LINL40       =       0xf3ae
  217. _g_LINL32       =       0xf3af
  218. _g_LINLEN       =       0xf3b0
  219. _g_CRTCNT       =       0xf3b1
  220. _g_CLMLST       =       0xf3b2
  221. _g_TXTNAM       =       0xf3b3
  222. _g_TXTCOL       =       0xf3b5
  223. _g_TXTCGP       =       0xf3b7
  224. _g_TXTATR       =       0xf3b9
  225. _g_TXTPAT       =       0xf3bb
  226. _g_T32NAM       =       0xf3bd
  227. _g_T32COL       =       0xf3bf
  228. _g_T32CGP       =       0xf3c1
  229. _g_T32ATR       =       0xf3c3
  230. _g_T32PAT       =       0xf3c5
  231. _g_GRPNAM       =       0xf3c7
  232. _g_GRPCOL       =       0xf3c9
  233. _g_GRPCGP       =       0xf3cb
  234. _g_GRPATR       =       0xf3cd
  235. _g_GRPPAT       =       0xf3cf
  236. _g_MLTNAM       =       0xf3d1
  237. _g_MLTCOL       =       0xf3d3
  238. _g_MLTCGP       =       0xf3d5
  239. _g_MLTATR       =       0xf3d7
  240. _g_MLTPAT       =       0xf3d9
  241. _g_CSRY =       0xf3dc
  242. _g_CSRX =       0xf3dd
  243. _g_FORCLR       =       0xf3e9
  244. _g_BAKCLR       =       0xf3ea
  245. _g_BDRCLR       =       0xf3eb
  246. _g_ATRBYT       =       0xf3f2
  247. _g_FNKSTR       =       0xf87f
  248. _g_CLOC =       0xf92a
  249. _g_CMASK        =       0xf92c
  250. _g_LOGOPR       =       0xfb02
  251. _g_GRPACX       =       0xfcb7
  252. _g_GRPACY       =       0xfcb9
  253. _g_SLTSL        =       0xffff
  254. _g_Game_DrawY::
  255.         .ds 1
  256. _g_Game_DrawX::
  257.         .ds 1
  258. _g_Game_DrawPattern::
  259.         .ds 1
  260. ;--------------------------------------------------------
  261. ; ram data
  262. ;--------------------------------------------------------
  263.         .area _INITIALIZED
  264. ;--------------------------------------------------------
  265. ; absolute external ram data
  266. ;--------------------------------------------------------
  267.         .area _DABS (ABS)
  268. ;--------------------------------------------------------
  269. ; global & static initialisations
  270. ;--------------------------------------------------------
  271.         .area _HOME
  272.         .area _GSINIT
  273.         .area _GSFINAL
  274.         .area _GSINIT
  275. ;--------------------------------------------------------
  276. ; Home
  277. ;--------------------------------------------------------
  278.         .area _HOME
  279.         .area _HOME
  280. ;--------------------------------------------------------
  281. ; code
  282. ;--------------------------------------------------------
  283.         .area _CODE
  284. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:20: void GamePawn_Initialize(Game_Pawn* pawn, const Game_Sprite* sprtList, u8 sprtNum, u8 sprtID, const Game_Action* actList)
  285. ;       ---------------------------------
  286. ; Function GamePawn_Initialize
  287. ; ---------------------------------
  288. _GamePawn_Initialize::
  289.         push    ix
  290.         ld      ix,#0
  291.         add     ix,sp
  292.         push    af
  293.         push    af
  294.         ld      c, l
  295.         ld      b, h
  296.         inc     sp
  297.         inc     sp
  298.         push    de
  299. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:23: Mem_Set(0x00, pawn, sizeof(Game_Pawn));
  300.         ld      e, c
  301.         ld      d, b
  302.         push    bc
  303.         ld      hl, #0x0017
  304.         push    hl
  305.         xor     a, a
  306.         call    _Mem_Set
  307.         pop     bc
  308. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:24: pawn->SpriteList = sprtList;
  309.         ld      l, c
  310.         ld      h, b
  311.         ld      a, -4 (ix)
  312.         ld      (hl), a
  313.         inc     hl
  314.         ld      a, -3 (ix)
  315.         ld      (hl), a
  316. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:25: pawn->SpriteNum = sprtNum;
  317.         ld      e, c
  318.         ld      d, b
  319.         inc     de
  320.         inc     de
  321.         ld      a, 4 (ix)
  322.         ld      (de), a
  323. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:26: pawn->SpriteID = sprtID;
  324.         ld      l, c
  325. ;       spillPairReg hl
  326. ;       spillPairReg hl
  327.         ld      h, b
  328. ;       spillPairReg hl
  329. ;       spillPairReg hl
  330.         inc     hl
  331.         inc     hl
  332.         inc     hl
  333.         ld      a, 5 (ix)
  334.         ld      (hl), a
  335. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:27: pawn->ActionList = actList;
  336.         ld      hl, #0x0004
  337.         add     hl, bc
  338.         ld      a, 6 (ix)
  339.         ld      (hl), a
  340.         inc     hl
  341.         ld      a, 7 (ix)
  342.         ld      (hl), a
  343. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:30: GamePawn_SetAction(pawn, 0);
  344.         push    de
  345.         xor     a, a
  346.         push    af
  347.         inc     sp
  348.         ld      l, c
  349. ;       spillPairReg hl
  350. ;       spillPairReg hl
  351.         ld      h, b
  352. ;       spillPairReg hl
  353. ;       spillPairReg hl
  354.         call    _GamePawn_SetAction
  355.         pop     de
  356. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:33: u8 sprtIdx = sprtID;
  357.         ld      a, 5 (ix)
  358.         ld      -2 (ix), a
  359. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:35: loop(i, pawn->SpriteNum)
  360.         pop     bc
  361.         push    bc
  362.         ld      -1 (ix), #0x00
  363. 00105$:
  364.         ld      a, (de)
  365.         ld      l, a
  366. ;       spillPairReg hl
  367. ;       spillPairReg hl
  368.         ld      a, -1 (ix)
  369.         sub     a, l
  370.         jr      NC, 00107$
  371. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:37: VDP_SetSpriteColorSM1(sprtIdx, sprt->Color);
  372.         ld      l, c
  373. ;       spillPairReg hl
  374. ;       spillPairReg hl
  375.         ld      h, b
  376. ;       spillPairReg hl
  377. ;       spillPairReg hl
  378.         inc     hl
  379.         inc     hl
  380.         inc     hl
  381.         ld      l, (hl)
  382. ;       spillPairReg hl
  383.         push    bc
  384.         push    de
  385.         ld      a, -2 (ix)
  386.         call    _VDP_SetSpriteColorSM1
  387.         pop     de
  388.         pop     bc
  389. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:39: if((sprt->Flag & PAWN_SPRITE_ODD) == 0)
  390.         ld      l, c
  391. ;       spillPairReg hl
  392. ;       spillPairReg hl
  393.         ld      h, b
  394. ;       spillPairReg hl
  395. ;       spillPairReg hl
  396.         inc     hl
  397.         inc     hl
  398.         inc     hl
  399.         inc     hl
  400.         bit     1, (hl)
  401.         jr      NZ, 00102$
  402. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:40: sprtIdx++;
  403.         inc     -2 (ix)
  404. 00102$:
  405. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:42: sprt++;
  406.         inc     bc
  407.         inc     bc
  408.         inc     bc
  409.         inc     bc
  410.         inc     bc
  411. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:35: loop(i, pawn->SpriteNum)
  412.         inc     -1 (ix)
  413.         jp      00105$
  414. 00107$:
  415. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:45: }
  416. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:49: void GamePawn_SetPosition(Game_Pawn* pawn, u8 x, u8 y)
  417. ;       ---------------------------------
  418. ; Function GamePawn_SetPosition
  419. ; ---------------------------------
  420. _GamePawn_SetPosition::
  421.         ex      de, hl
  422. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:51: pawn->PositionX = x;
  423.         ld      hl, #0x0006
  424.         add     hl, de
  425.         ld      iy, #2
  426.         add     iy, sp
  427.         ld      a, 0 (iy)
  428.         ld      (hl), a
  429. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:52: pawn->PositionY = y;
  430.         ld      hl, #0x0007
  431.         add     hl, de
  432.         ld      a, 1 (iy)
  433.         inc     iy
  434.         ld      (hl), a
  435. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:53: pawn->TargetX = x;
  436.         ld      hl, #0x000e
  437.         add     hl, de
  438.         ld      a, -1 (iy)
  439.         dec     iy
  440.         ld      (hl), a
  441. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:54: pawn->TargetY = y;
  442.         ld      hl, #0x000f
  443.         add     hl, de
  444.         ld      a, 1 (iy)
  445.         inc     iy
  446.         ld      (hl), a
  447. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:55: pawn->Update |= PAWN_UPDATE_POSITION;
  448.         ld      hl, #0x000c
  449.         add     hl, de
  450.         set     0, (hl)
  451. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:56: }
  452.         pop     hl
  453.         pop     af
  454.         jp      (hl)
  455. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:61: void GamePawn_SetAction(Game_Pawn* pawn, u8 id)
  456. ;       ---------------------------------
  457. ; Function GamePawn_SetAction
  458. ; ---------------------------------
  459. _GamePawn_SetAction::
  460.         dec     sp
  461.         ld      c, l
  462.         ld      b, h
  463. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:63: if(pawn->ActionId != id)
  464.         ld      hl, #0x0008
  465.         add     hl, bc
  466.         ex      de, hl
  467.         ld      a, (de)
  468.         ld      iy, #0
  469.         add     iy, sp
  470.         ld      0 (iy), a
  471.         ld      a, 3 (iy)
  472.         sub     a, 0 (iy)
  473.         jr      Z, 00103$
  474. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:65: pawn->ActionId = id;
  475.         ld      a, 3 (iy)
  476.         inc     iy
  477.         inc     iy
  478.         inc     iy
  479.         ld      (de), a
  480. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:66: pawn->AnimTimer = 0;
  481.         ld      hl, #0x000b
  482.         add     hl, bc
  483.         ld      (hl), #0x00
  484. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:67: pawn->AnimStep = 0;
  485.         ld      hl, #0x000a
  486.         add     hl, bc
  487.         ld      (hl), #0x00
  488. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:68: pawn->Update |= PAWN_UPDATE_PATTERN;
  489.         ld      hl, #0x000c
  490.         add     hl, bc
  491.         set     1, (hl)
  492.         ld      a, (hl)
  493. 00103$:
  494. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:70: }
  495.         inc     sp
  496.         pop     hl
  497.         inc     sp
  498.         jp      (hl)
  499. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:74: void GamePawn_Update(Game_Pawn* pawn)
  500. ;       ---------------------------------
  501. ; Function GamePawn_Update
  502. ; ---------------------------------
  503. _GamePawn_Update::
  504.         push    ix
  505.         ld      ix,#0
  506.         add     ix,sp
  507.         ld      iy, #-24
  508.         add     iy, sp
  509.         ld      sp, iy
  510.         ld      -2 (ix), l
  511.         ld      -1 (ix), h
  512. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:76: const Game_Action* act = &pawn->ActionList[pawn->ActionId];
  513.         ld      a, -2 (ix)
  514.         ld      -4 (ix), a
  515.         ld      a, -1 (ix)
  516.         ld      -3 (ix), a
  517.         ld      l, -4 (ix)
  518.         ld      h, -3 (ix)
  519.         ld      de, #0x0004
  520.         add     hl, de
  521.         ld      a, (hl)
  522.         ld      -8 (ix), a
  523.         inc     hl
  524.         ld      a, (hl)
  525.         ld      -7 (ix), a
  526.         ld      a, -2 (ix)
  527.         ld      -4 (ix), a
  528.         ld      a, -1 (ix)
  529.         ld      -3 (ix), a
  530.         ld      l, -4 (ix)
  531.         ld      h, -3 (ix)
  532.         ld      de, #0x0008
  533.         add     hl, de
  534.         ld      a, (hl)
  535.         ld      -3 (ix), a
  536.         ld      -4 (ix), a
  537.         ld      -3 (ix), #0x00
  538.         ld      a, -4 (ix)
  539.         ld      -6 (ix), a
  540.         ld      a, -3 (ix)
  541.         ld      -5 (ix), a
  542.         ld      b, #0x02
  543. 00295$:
  544.         sla     -6 (ix)
  545.         rl      -5 (ix)
  546.         djnz    00295$
  547.         ld      a, -8 (ix)
  548.         add     a, -6 (ix)
  549.         ld      -4 (ix), a
  550.         ld      a, -7 (ix)
  551.         adc     a, -5 (ix)
  552.         ld      -3 (ix), a
  553.         ld      a, -4 (ix)
  554.         ld      -15 (ix), a
  555.         ld      a, -3 (ix)
  556.         ld      -14 (ix), a
  557. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:79: if(pawn->AnimTimer >= act->FrameList[pawn->AnimStep].Duration)
  558.         ld      a, -2 (ix)
  559.         add     a, #0x0b
  560.         ld      -13 (ix), a
  561.         ld      a, -1 (ix)
  562.         adc     a, #0x00
  563.         ld      -12 (ix), a
  564.         ld      l, -13 (ix)
  565.         ld      h, -12 (ix)
  566.         ld      a, (hl)
  567.         ld      -11 (ix), a
  568.         ld      l, -15 (ix)
  569.         ld      h, -14 (ix)
  570.         ld      a, (hl)
  571.         ld      -10 (ix), a
  572.         inc     hl
  573.         ld      a, (hl)
  574.         ld      -9 (ix), a
  575.         ld      a, -2 (ix)
  576.         add     a, #0x0a
  577.         ld      -8 (ix), a
  578.         ld      a, -1 (ix)
  579.         adc     a, #0x00
  580.         ld      -7 (ix), a
  581.         ld      l, -8 (ix)
  582.         ld      h, -7 (ix)
  583.         ld      a, (hl)
  584.         ld      -3 (ix), a
  585.         ld      -4 (ix), a
  586.         ld      -3 (ix), #0x00
  587.         ld      a, -4 (ix)
  588.         ld      -6 (ix), a
  589.         ld      a, -3 (ix)
  590.         ld      -5 (ix), a
  591.         ld      b, #0x02
  592. 00296$:
  593.         sla     -6 (ix)
  594.         rl      -5 (ix)
  595.         djnz    00296$
  596.         ld      a, -10 (ix)
  597.         add     a, -6 (ix)
  598.         ld      -4 (ix), a
  599.         ld      a, -9 (ix)
  600.         adc     a, -5 (ix)
  601.         ld      -3 (ix), a
  602.         ld      l, -4 (ix)
  603.         ld      h, -3 (ix)
  604.         inc     hl
  605.         ld      a,-11 (ix)
  606.         sub     a,(hl)
  607.         jr      C, 00102$
  608. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:81: pawn->AnimTimer = 0;
  609.         ld      l, -13 (ix)
  610.         ld      h, -12 (ix)
  611.         ld      (hl), #0x00
  612. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:82: pawn->AnimStep++;
  613.         ld      l,-8 (ix)
  614.         ld      h,-7 (ix)
  615.         inc     (hl)
  616. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:83: pawn->Update |= PAWN_UPDATE_PATTERN;
  617.         ld      l, -2 (ix)
  618.         ld      h, -1 (ix)
  619.         ld      de, #0x000c
  620.         add     hl, de
  621.         set     1, (hl)
  622. 00102$:
  623. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:87: if(pawn->AnimStep >= act->FrameNum)
  624.         ld      l, -8 (ix)
  625.         ld      h, -7 (ix)
  626.         ld      a, (hl)
  627.         ld      l, -15 (ix)
  628. ;       spillPairReg hl
  629. ;       spillPairReg hl
  630.         ld      h, -14 (ix)
  631. ;       spillPairReg hl
  632. ;       spillPairReg hl
  633.         inc     hl
  634.         inc     hl
  635.         ld      c, (hl)
  636.         sub     a, c
  637.         jr      C, 00107$
  638. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:89: if(act->Loop) // restart action
  639.         ld      l, -15 (ix)
  640. ;       spillPairReg hl
  641. ;       spillPairReg hl
  642.         ld      h, -14 (ix)
  643. ;       spillPairReg hl
  644. ;       spillPairReg hl
  645.         inc     hl
  646.         inc     hl
  647.         inc     hl
  648.         ld      a, (hl)
  649.         and     a,#0x01
  650.         jr      Z, 00104$
  651. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:91: pawn->AnimTimer = 0;
  652.         ld      l, -13 (ix)
  653.         ld      h, -12 (ix)
  654.         ld      (hl), #0x00
  655. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:92: pawn->AnimStep = 0;
  656.         ld      l, -8 (ix)
  657.         ld      h, -7 (ix)
  658.         ld      (hl), #0x00
  659. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:93: pawn->Update |= PAWN_UPDATE_PATTERN;
  660.         ld      l, -2 (ix)
  661.         ld      h, -1 (ix)
  662.         ld      de, #0x000c
  663.         add     hl, de
  664.         set     1, (hl)
  665.         jp      00107$
  666. 00104$:
  667. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:97: GamePawn_SetAction(pawn, 0);
  668.         xor     a, a
  669.         push    af
  670.         inc     sp
  671.         ld      l, -2 (ix)
  672. ;       spillPairReg hl
  673. ;       spillPairReg hl
  674.         ld      h, -1 (ix)
  675. ;       spillPairReg hl
  676. ;       spillPairReg hl
  677.         call    _GamePawn_SetAction
  678. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:98: return;
  679.         jp      00133$
  680. 00107$:
  681. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:103: const Game_Frame* frame = &act->FrameList[pawn->AnimStep];
  682.         ld      l, -15 (ix)
  683.         ld      h, -14 (ix)
  684.         ld      a, (hl)
  685.         ld      -4 (ix), a
  686.         inc     hl
  687.         ld      a, (hl)
  688.         ld      -3 (ix), a
  689.         ld      l, -8 (ix)
  690.         ld      h, -7 (ix)
  691.         ld      a, (hl)
  692.         ld      -5 (ix), a
  693.         ld      -6 (ix), a
  694.         ld      -5 (ix), #0x00
  695.         ld      b, #0x02
  696. 00297$:
  697.         sla     -6 (ix)
  698.         rl      -5 (ix)
  699.         djnz    00297$
  700.         ld      a, -4 (ix)
  701.         add     a, -6 (ix)
  702.         ld      -8 (ix), a
  703.         ld      a, -3 (ix)
  704.         adc     a, -5 (ix)
  705.         ld      -7 (ix), a
  706.         ld      a, -8 (ix)
  707.         ld      -4 (ix), a
  708.         ld      a, -7 (ix)
  709.         ld      -3 (ix), a
  710. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:104: if(frame->Event != 0)
  711.         ld      a, -4 (ix)
  712.         ld      -6 (ix), a
  713.         ld      a, -3 (ix)
  714.         ld      -5 (ix), a
  715.         ld      l, -6 (ix)
  716.         ld      h, -5 (ix)
  717.         inc     hl
  718.         inc     hl
  719.         ld      a, (hl)
  720.         ld      -6 (ix), a
  721.         inc     hl
  722.         ld      a, (hl)
  723.         ld      -5 (ix), a
  724.         or      a, -6 (ix)
  725.         jr      Z, 00109$
  726. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:105: frame->Event();
  727.         ld      l, -6 (ix)
  728. ;       spillPairReg hl
  729. ;       spillPairReg hl
  730.         ld      h, -5 (ix)
  731. ;       spillPairReg hl
  732. ;       spillPairReg hl
  733.         call    ___sdcc_call_hl
  734. 00109$:
  735. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:108: pawn->AnimFrame = frame->Id;
  736.         ld      a, -2 (ix)
  737.         add     a, #0x09
  738.         ld      c, a
  739.         ld      a, -1 (ix)
  740.         adc     a, #0x00
  741.         ld      b, a
  742.         ld      l, -4 (ix)
  743.         ld      h, -3 (ix)
  744.         ld      a, (hl)
  745.         ld      (bc), a
  746. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:109: pawn->AnimTimer++;
  747.         ld      l,-13 (ix)
  748.         ld      h,-12 (ix)
  749.         inc     (hl)
  750. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:110: pawn->Counter++;
  751.         ld      l, -2 (ix)
  752.         ld      h, -1 (ix)
  753.         ld      de, #0x000d
  754.         add     hl, de
  755.         inc     (hl)
  756. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:113: if(pawn->Update & PAWN_UPDATE_COLLISION)
  757.         ld      a, -2 (ix)
  758.         add     a, #0x0c
  759.         ld      -24 (ix), a
  760.         ld      a, -1 (ix)
  761.         adc     a, #0x00
  762.         ld      -23 (ix), a
  763.         pop     hl
  764.         push    hl
  765.         bit     4, (hl)
  766.         jp      Z,00133$
  767. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:116: if(pawn->TargetY > pawn->PositionY) // Go down
  768.         ld      a, -2 (ix)
  769.         add     a, #0x0f
  770.         ld      -22 (ix), a
  771.         ld      a, -1 (ix)
  772.         adc     a, #0x00
  773.         ld      -21 (ix), a
  774.         ld      l, -22 (ix)
  775.         ld      h, -21 (ix)
  776.         ld      a, (hl)
  777.         ld      -20 (ix), a
  778.         ld      a, -2 (ix)
  779.         add     a, #0x07
  780.         ld      -19 (ix), a
  781.         ld      a, -1 (ix)
  782.         adc     a, #0x00
  783.         ld      -18 (ix), a
  784.         ld      l, -19 (ix)
  785.         ld      h, -18 (ix)
  786.         ld      a, (hl)
  787.         ld      -17 (ix), a
  788. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:118: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
  789.         ld      a, -2 (ix)
  790.         add     a, #0x0e
  791.         ld      -16 (ix), a
  792.         ld      a, -1 (ix)
  793.         adc     a, #0x00
  794.         ld      -15 (ix), a
  795.         ld      a, -2 (ix)
  796.         add     a, #0x10
  797.         ld      -14 (ix), a
  798.         ld      a, -1 (ix)
  799.         adc     a, #0x00
  800.         ld      -13 (ix), a
  801. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:119: u8 cellY = (pawn->TargetY + pawn->BoundY) / 8;           
  802.         ld      a, -20 (ix)
  803.         ld      -12 (ix), a
  804.         ld      -11 (ix), #0x00
  805. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:120: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
  806.         ld      hl, (_g_ScreenLayoutLow)
  807.         ld      -10 (ix), l
  808.         ld      -9 (ix), h
  809. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:121: if(pawn->CollisionCB(tile))
  810.         ld      a, -2 (ix)
  811.         add     a, #0x15
  812.         ld      -8 (ix), a
  813.         ld      a, -1 (ix)
  814.         adc     a, #0x00
  815.         ld      -7 (ix), a
  816. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:150: if(pawn->TargetX > pawn->PositionX) // Go right
  817.         ld      l, -16 (ix)
  818.         ld      h, -15 (ix)
  819.         ld      a, (hl)
  820.         ld      -4 (ix), a
  821. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:152: u8 cellX = (pawn->TargetX + pawn->BoundX) / 8;
  822.         ld      l, -14 (ix)
  823.         ld      h, -13 (ix)
  824.         ld      a, (hl)
  825.         ld      -3 (ix), a
  826. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:118: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
  827.         ld      a, -4 (ix)
  828.         ld      -6 (ix), a
  829.         ld      -5 (ix), #0x00
  830.         ld      a, -3 (ix)
  831.         ld      -4 (ix), a
  832.         ld      -3 (ix), #0x00
  833.         xor     a, a
  834.         rlca
  835.         and     a,#0x01
  836.         ld      c, a
  837. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:116: if(pawn->TargetY > pawn->PositionY) // Go down
  838.         ld      a, -17 (ix)
  839.         sub     a, -20 (ix)
  840.         jp      NC, 00120$
  841. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:118: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
  842.         ld      e, -4 (ix)
  843.         ld      d, -3 (ix)
  844.         ld      a, c
  845.         or      a, a
  846.         jr      Z, 00135$
  847.         ld      e, -4 (ix)
  848.         ld      d, -3 (ix)
  849.         inc     de
  850. 00135$:
  851.         sra     d
  852.         rr      e
  853.         ld      a, -6 (ix)
  854.         add     a, e
  855.         ld      c, a
  856.         ld      a, -5 (ix)
  857.         adc     a, d
  858.         ld      b, a
  859.         ld      l, c
  860. ;       spillPairReg hl
  861. ;       spillPairReg hl
  862.         ld      h, b
  863. ;       spillPairReg hl
  864. ;       spillPairReg hl
  865.         bit     7, b
  866.         jr      Z, 00136$
  867.         ld      hl, #0x0007
  868.         add     hl, bc
  869. 00136$:
  870.         sra     h
  871.         rr      l
  872.         sra     h
  873.         rr      l
  874.         sra     h
  875.         rr      l
  876.         ld      -3 (ix), l
  877. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:119: u8 cellY = (pawn->TargetY + pawn->BoundY) / 8;           
  878.         ld      a, -2 (ix)
  879.         add     a, #0x11
  880.         ld      c, a
  881.         ld      a, -1 (ix)
  882.         adc     a, #0x00
  883.         ld      b, a
  884.         ld      a, (bc)
  885.         ld      e, a
  886.         ld      d, #0x00
  887.         ld      a, -12 (ix)
  888.         add     a, e
  889.         ld      e, a
  890.         ld      a, -11 (ix)
  891.         adc     a, d
  892.         ld      d, a
  893.         ld      l, e
  894. ;       spillPairReg hl
  895. ;       spillPairReg hl
  896.         ld      h, d
  897. ;       spillPairReg hl
  898. ;       spillPairReg hl
  899.         bit     7, d
  900.         jr      Z, 00137$
  901.         ld      hl, #0x0007
  902.         add     hl, de
  903. 00137$:
  904.         sra     h
  905.         rr      l
  906.         sra     h
  907.         rr      l
  908.         sra     h
  909.         rr      l
  910. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:120: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
  911.         ld      -4 (ix), l
  912. ;       spillPairReg hl
  913. ;       spillPairReg hl
  914.         ld      h, #0x00
  915. ;       spillPairReg hl
  916. ;       spillPairReg hl
  917.         add     hl, hl
  918.         add     hl, hl
  919.         add     hl, hl
  920.         add     hl, hl
  921.         add     hl, hl
  922.         ld      e, -10 (ix)
  923.         ld      d, -9 (ix)
  924.         add     hl, de
  925.         ld      e, -3 (ix)
  926.         ld      d, #0x00
  927.         add     hl, de
  928.         push    bc
  929.         call    _VDP_Peek_16K
  930.         pop     bc
  931.         ld      -3 (ix), a
  932. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:121: if(pawn->CollisionCB(tile))
  933.         ld      l, -8 (ix)
  934.         ld      h, -7 (ix)
  935.         ld      e, (hl)
  936.         inc     hl
  937.         ld      d, (hl)
  938.         push    bc
  939.         ld      a, -3 (ix)
  940.         ex      de, hl
  941.         call    ___sdcc_call_hl
  942.         pop     bc
  943.         or      a, a
  944.         jp      Z, 00121$
  945. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:123: pawn->PhysicsCB(PAWN_PHYSICS_COL_DOWN, tile);
  946.         ld      e, -2 (ix)
  947.         ld      d, -1 (ix)
  948.         ld      hl, #19
  949.         add     hl, de
  950.         ld      e, (hl)
  951.         inc     hl
  952.         ld      d, (hl)
  953.         push    bc
  954.         ld      l, -3 (ix)
  955. ;       spillPairReg hl
  956. ;       spillPairReg hl
  957.         xor     a, a
  958.         push    de
  959.         pop     iy
  960.         call    ___sdcc_call_iy
  961.         pop     bc
  962. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:124: pawn->TargetY = (cellY * 8) - pawn->BoundY;
  963.         ld      a, -4 (ix)
  964.         add     a, a
  965.         add     a, a
  966.         add     a, a
  967.         push    af
  968.         ld      a, (bc)
  969.         ld      c, a
  970.         pop     af
  971.         sub     a, c
  972.         pop     bc
  973.         pop     hl
  974.         push    hl
  975.         push    bc
  976.         ld      (hl), a
  977.         jp      00121$
  978. 00120$:
  979. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:127: else if(pawn->TargetY < pawn->PositionY) // Go up
  980.         ld      a, -20 (ix)
  981.         sub     a, -17 (ix)
  982.         jp      NC, 00117$
  983. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:129: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
  984.         ld      e, -4 (ix)
  985.         ld      d, -3 (ix)
  986.         ld      a, c
  987.         or      a, a
  988.         jr      Z, 00138$
  989.         ld      e, -4 (ix)
  990.         ld      d, -3 (ix)
  991.         inc     de
  992. 00138$:
  993.         sra     d
  994.         rr      e
  995.         ld      l, -6 (ix)
  996.         ld      h, -5 (ix)
  997.         add     hl, de
  998.         ld      c, l
  999.         ld      b, h
  1000.         bit     7, h
  1001.         jr      Z, 00139$
  1002.         ld      bc, #0x7
  1003.         add     hl,bc
  1004.         ld      c, l
  1005.         ld      a,h
  1006.         ld      b,a
  1007. 00139$:
  1008.         sra     b
  1009.         rr      c
  1010.         sra     b
  1011.         rr      c
  1012.         sra     b
  1013.         rr      c
  1014. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:130: u8 cellY = (pawn->TargetY) / 8;            
  1015.         ld      l, -12 (ix)
  1016. ;       spillPairReg hl
  1017. ;       spillPairReg hl
  1018.         ld      h, -11 (ix)
  1019. ;       spillPairReg hl
  1020. ;       spillPairReg hl
  1021.         bit     7, -11 (ix)
  1022.         jr      Z, 00140$
  1023.         ld      l, -12 (ix)
  1024.         ld      h, -11 (ix)
  1025.         ld      de, #0x0007
  1026.         add     hl, de
  1027. 00140$:
  1028.         sra     h
  1029.         rr      l
  1030.         sra     h
  1031.         rr      l
  1032.         sra     h
  1033.         rr      l
  1034. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:131: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
  1035.         ld      -3 (ix), l
  1036. ;       spillPairReg hl
  1037. ;       spillPairReg hl
  1038.         ld      h, #0x00
  1039. ;       spillPairReg hl
  1040. ;       spillPairReg hl
  1041.         add     hl, hl
  1042.         add     hl, hl
  1043.         add     hl, hl
  1044.         add     hl, hl
  1045.         add     hl, hl
  1046.         ld      e, -10 (ix)
  1047.         ld      d, -9 (ix)
  1048.         add     hl, de
  1049.         ld      b, #0x00
  1050.         add     hl, bc
  1051.         call    _VDP_Peek_16K
  1052.         ld      c, a
  1053. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:132: if(pawn->CollisionCB(tile))
  1054.         ld      l, -8 (ix)
  1055.         ld      h, -7 (ix)
  1056.         ld      b, (hl)
  1057.         inc     hl
  1058.         ld      h, (hl)
  1059. ;       spillPairReg hl
  1060.         push    bc
  1061.         ld      a, c
  1062.         ld      l, b
  1063. ;       spillPairReg hl
  1064. ;       spillPairReg hl
  1065.         call    ___sdcc_call_hl
  1066.         pop     bc
  1067.         or      a, a
  1068.         jp      Z, 00121$
  1069. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:134: pawn->PhysicsCB(PAWN_PHYSICS_COL_UP, tile);
  1070.         ld      e, -2 (ix)
  1071.         ld      d, -1 (ix)
  1072.         ld      hl, #19
  1073.         add     hl, de
  1074.         ld      e, (hl)
  1075.         inc     hl
  1076.         ld      d, (hl)
  1077.         ld      l, c
  1078. ;       spillPairReg hl
  1079. ;       spillPairReg hl
  1080.         ld      a, #0x01
  1081.         push    de
  1082.         pop     iy
  1083.         call    ___sdcc_call_iy
  1084. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:135: pawn->TargetY = (cellY * 8) + 8;
  1085.         ld      a, -3 (ix)
  1086.         add     a, a
  1087.         add     a, a
  1088.         add     a, a
  1089.         add     a, #0x08
  1090.         pop     bc
  1091.         pop     hl
  1092.         push    hl
  1093.         push    bc
  1094.         ld      (hl), a
  1095.         jp      00121$
  1096. 00117$:
  1097. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:140: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
  1098.         ld      e, -4 (ix)
  1099.         ld      d, -3 (ix)
  1100.         ld      a, c
  1101.         or      a, a
  1102.         jr      Z, 00141$
  1103.         ld      e, -4 (ix)
  1104.         ld      d, -3 (ix)
  1105.         inc     de
  1106. 00141$:
  1107.         sra     d
  1108.         rr      e
  1109.         ld      l, -6 (ix)
  1110.         ld      h, -5 (ix)
  1111.         add     hl, de
  1112.         ld      c, l
  1113.         ld      b, h
  1114.         bit     7, h
  1115.         jr      Z, 00142$
  1116.         ld      bc, #0x7
  1117.         add     hl,bc
  1118.         ld      c, l
  1119.         ld      a,h
  1120.         ld      b,a
  1121. 00142$:
  1122.         sra     b
  1123.         rr      c
  1124.         sra     b
  1125.         rr      c
  1126.         sra     b
  1127.         rr      c
  1128. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:141: u8 cellY = (pawn->TargetY + pawn->BoundY) / 8;           
  1129.         ld      e, -2 (ix)
  1130.         ld      d, -1 (ix)
  1131.         ld      hl, #17
  1132.         add     hl, de
  1133.         ld      e, (hl)
  1134.         ld      d, #0x00
  1135.         ld      l, -12 (ix)
  1136.         ld      h, -11 (ix)
  1137.         add     hl, de
  1138.         ld      e, l
  1139.         ld      d, h
  1140.         bit     7, h
  1141.         jr      Z, 00143$
  1142.         ld      de, #0x7
  1143.         add     hl, de
  1144.         ld      e, l
  1145.         ld      a,h
  1146.         ld      d,a
  1147. 00143$:
  1148.         sra     d
  1149.         rr      e
  1150.         sra     d
  1151.         rr      e
  1152.         sra     d
  1153.         rr      e
  1154. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:142: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
  1155.         ld      l, e
  1156. ;       spillPairReg hl
  1157. ;       spillPairReg hl
  1158.         ld      h, #0x00
  1159. ;       spillPairReg hl
  1160. ;       spillPairReg hl
  1161.         add     hl, hl
  1162.         add     hl, hl
  1163.         add     hl, hl
  1164.         add     hl, hl
  1165.         add     hl, hl
  1166.         ld      e, -10 (ix)
  1167.         ld      d, -9 (ix)
  1168.         add     hl, de
  1169.         ld      b, #0x00
  1170.         add     hl, bc
  1171.         call    _VDP_Peek_16K
  1172.         ld      c, a
  1173. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:143: if(!pawn->CollisionCB(tile))
  1174.         ld      l, -8 (ix)
  1175.         ld      h, -7 (ix)
  1176.         ld      e, (hl)
  1177.         inc     hl
  1178.         ld      d, (hl)
  1179.         push    bc
  1180.         ld      a, c
  1181.         ex      de, hl
  1182.         call    ___sdcc_call_hl
  1183.         pop     bc
  1184.         or      a, a
  1185.         jr      NZ, 00121$
  1186. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:145: pawn->PhysicsCB(PAWN_PHYSICS_FALL, tile);
  1187.         ld      e, -2 (ix)
  1188.         ld      d, -1 (ix)
  1189.         ld      hl, #19
  1190.         add     hl, de
  1191.         ld      e, (hl)
  1192.         inc     hl
  1193.         ld      d, (hl)
  1194.         ld      l, c
  1195. ;       spillPairReg hl
  1196. ;       spillPairReg hl
  1197.         ld      a, #0x04
  1198.         push    de
  1199.         pop     iy
  1200.         call    ___sdcc_call_iy
  1201. 00121$:
  1202. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:150: if(pawn->TargetX > pawn->PositionX) // Go right
  1203.         ld      l, -16 (ix)
  1204.         ld      h, -15 (ix)
  1205.         ld      a, (hl)
  1206.         ld      -6 (ix), a
  1207.         ld      a, -2 (ix)
  1208.         add     a, #0x06
  1209.         ld      -5 (ix), a
  1210.         ld      a, -1 (ix)
  1211.         adc     a, #0x00
  1212.         ld      -4 (ix), a
  1213.         ld      l, -5 (ix)
  1214.         ld      h, -4 (ix)
  1215.         ld      a, (hl)
  1216.         ld      -3 (ix), a
  1217.         sub     a, -6 (ix)
  1218.         jp      NC, 00129$
  1219. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:152: u8 cellX = (pawn->TargetX + pawn->BoundX) / 8;
  1220.         ld      c, -6 (ix)
  1221.         ld      b, #0x00
  1222.         ld      l, -14 (ix)
  1223.         ld      h, -13 (ix)
  1224.         ld      l, (hl)
  1225. ;       spillPairReg hl
  1226.         ld      h, #0x00
  1227. ;       spillPairReg hl
  1228. ;       spillPairReg hl
  1229.         add     hl, bc
  1230. ;       spillPairReg hl
  1231. ;       spillPairReg hl
  1232.         ld      c,l
  1233.         ld      b,h
  1234. ;       spillPairReg hl
  1235. ;       spillPairReg hl
  1236.         bit     7, b
  1237.         jr      Z, 00144$
  1238.         ld      hl, #0x0007
  1239.         add     hl, bc
  1240. 00144$:
  1241.         sra     h
  1242.         rr      l
  1243.         sra     h
  1244.         rr      l
  1245.         sra     h
  1246.         rr      l
  1247.         ld      -3 (ix), l
  1248. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:153: u8 cellY = (pawn->TargetY + (pawn->BoundY / 2)) / 8;           
  1249.         ld      l, -22 (ix)
  1250.         ld      h, -21 (ix)
  1251.         ld      c, (hl)
  1252.         ld      b, #0x00
  1253.         ld      e, -2 (ix)
  1254.         ld      d, -1 (ix)
  1255.         ld      hl, #17
  1256.         add     hl, de
  1257.         ld      e, (hl)
  1258.         ld      d, #0x00
  1259.         ld      l, e
  1260. ;       spillPairReg hl
  1261. ;       spillPairReg hl
  1262.         ld      h, d
  1263. ;       spillPairReg hl
  1264. ;       spillPairReg hl
  1265.         bit     7, d
  1266.         jr      Z, 00145$
  1267.         ex      de, hl
  1268.         inc     hl
  1269. 00145$:
  1270.         sra     h
  1271.         rr      l
  1272.         add     hl, bc
  1273. ;       spillPairReg hl
  1274. ;       spillPairReg hl
  1275.         ld      e, l
  1276.         ld      d, h
  1277. ;       spillPairReg hl
  1278. ;       spillPairReg hl
  1279.         bit     7, d
  1280.         jr      Z, 00146$
  1281.         ld      hl, #0x0007
  1282.         add     hl, de
  1283. 00146$:
  1284.         sra     h
  1285.         rr      l
  1286.         sra     h
  1287.         rr      l
  1288.         sra     h
  1289.         rr      l
  1290. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:154: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
  1291.         ld      h, #0x00
  1292. ;       spillPairReg hl
  1293. ;       spillPairReg hl
  1294.         add     hl, hl
  1295.         add     hl, hl
  1296.         add     hl, hl
  1297.         add     hl, hl
  1298.         add     hl, hl
  1299.         ld      bc, (_g_ScreenLayoutLow)
  1300.         add     hl, bc
  1301.         ld      c, -3 (ix)
  1302.         ld      b, #0x00
  1303.         add     hl, bc
  1304.         call    _VDP_Peek_16K
  1305.         ld      e, a
  1306. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:155: if(pawn->CollisionCB(tile))
  1307.         ld      l, -8 (ix)
  1308.         ld      h, -7 (ix)
  1309.         ld      c, (hl)
  1310.         inc     hl
  1311.         ld      h, (hl)
  1312. ;       spillPairReg hl
  1313.         push    de
  1314.         ld      a, e
  1315.         ld      l, c
  1316. ;       spillPairReg hl
  1317. ;       spillPairReg hl
  1318.         call    ___sdcc_call_hl
  1319.         pop     de
  1320.         or      a, a
  1321.         jp      Z, 00130$
  1322. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:157: pawn->PhysicsCB(PAWN_PHYSICS_COL_RIGHT, tile);
  1323.         ld      c, -2 (ix)
  1324.         ld      b, -1 (ix)
  1325.         ld      hl, #19
  1326.         add     hl, bc
  1327.         ld      c, (hl)
  1328.         inc     hl
  1329.         ld      b, (hl)
  1330.         ld      l, e
  1331. ;       spillPairReg hl
  1332. ;       spillPairReg hl
  1333.         ld      a, #0x02
  1334.         push    bc
  1335.         pop     iy
  1336.         call    ___sdcc_call_iy
  1337. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:158: pawn->TargetX = (cellX * 8) - pawn->BoundX;
  1338.         ld      a, -3 (ix)
  1339.         add     a, a
  1340.         add     a, a
  1341.         add     a, a
  1342.         ld      l, -14 (ix)
  1343.         ld      h, -13 (ix)
  1344.         ld      c, (hl)
  1345.         sub     a, c
  1346.         ld      l, -16 (ix)
  1347.         ld      h, -15 (ix)
  1348.         ld      (hl), a
  1349.         jp      00130$
  1350. 00129$:
  1351. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:161: else if(pawn->TargetX < pawn->PositionX) // Go left
  1352.         ld      a, -6 (ix)
  1353.         sub     a, -3 (ix)
  1354.         jp      NC, 00130$
  1355. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:163: u8 cellX = (pawn->TargetX) / 8;
  1356.         ld      c, -6 (ix)
  1357.         ld      b, #0x00
  1358.         ld      l, c
  1359. ;       spillPairReg hl
  1360. ;       spillPairReg hl
  1361.         ld      h, b
  1362. ;       spillPairReg hl
  1363. ;       spillPairReg hl
  1364.         bit     7, b
  1365.         jr      Z, 00147$
  1366.         ld      hl, #0x0007
  1367.         add     hl, bc
  1368. 00147$:
  1369.         sra     h
  1370.         rr      l
  1371.         sra     h
  1372.         rr      l
  1373.         sra     h
  1374.         rr      l
  1375.         ld      -3 (ix), l
  1376. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:164: u8 cellY = (pawn->TargetY + (pawn->BoundY / 2)) / 8;           
  1377.         ld      l, -22 (ix)
  1378.         ld      h, -21 (ix)
  1379.         ld      c, (hl)
  1380.         ld      b, #0x00
  1381.         ld      e, -2 (ix)
  1382.         ld      d, -1 (ix)
  1383.         ld      hl, #17
  1384.         add     hl, de
  1385.         ld      e, (hl)
  1386.         ld      d, #0x00
  1387.         ld      l, e
  1388. ;       spillPairReg hl
  1389. ;       spillPairReg hl
  1390.         ld      h, d
  1391. ;       spillPairReg hl
  1392. ;       spillPairReg hl
  1393.         bit     7, d
  1394.         jr      Z, 00148$
  1395.         ex      de, hl
  1396.         inc     hl
  1397. 00148$:
  1398.         sra     h
  1399.         rr      l
  1400.         add     hl, bc
  1401. ;       spillPairReg hl
  1402. ;       spillPairReg hl
  1403.         ld      e, l
  1404.         ld      d, h
  1405. ;       spillPairReg hl
  1406. ;       spillPairReg hl
  1407.         bit     7, d
  1408.         jr      Z, 00149$
  1409.         ld      hl, #0x0007
  1410.         add     hl, de
  1411. 00149$:
  1412.         sra     h
  1413.         rr      l
  1414.         sra     h
  1415.         rr      l
  1416.         sra     h
  1417.         rr      l
  1418. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:165: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
  1419.         ld      h, #0x00
  1420. ;       spillPairReg hl
  1421. ;       spillPairReg hl
  1422.         add     hl, hl
  1423.         add     hl, hl
  1424.         add     hl, hl
  1425.         add     hl, hl
  1426.         add     hl, hl
  1427.         ld      bc, (_g_ScreenLayoutLow)
  1428.         add     hl, bc
  1429.         ld      c, -3 (ix)
  1430.         ld      b, #0x00
  1431.         add     hl, bc
  1432.         call    _VDP_Peek_16K
  1433.         ld      e, a
  1434. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:166: if(pawn->CollisionCB(tile))
  1435.         ld      l, -8 (ix)
  1436.         ld      h, -7 (ix)
  1437.         ld      c, (hl)
  1438.         inc     hl
  1439.         ld      h, (hl)
  1440. ;       spillPairReg hl
  1441.         push    de
  1442.         ld      a, e
  1443.         ld      l, c
  1444. ;       spillPairReg hl
  1445. ;       spillPairReg hl
  1446.         call    ___sdcc_call_hl
  1447.         pop     de
  1448.         or      a, a
  1449.         jr      Z, 00130$
  1450. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:168: pawn->PhysicsCB(PAWN_PHYSICS_COL_LEFT, tile);
  1451.         ld      c, -2 (ix)
  1452.         ld      b, -1 (ix)
  1453.         ld      hl, #19
  1454.         add     hl, bc
  1455.         ld      c, (hl)
  1456.         inc     hl
  1457.         ld      b, (hl)
  1458.         ld      l, e
  1459. ;       spillPairReg hl
  1460. ;       spillPairReg hl
  1461.         ld      a, #0x03
  1462.         push    bc
  1463.         pop     iy
  1464.         call    ___sdcc_call_iy
  1465. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:169: pawn->TargetX = (cellX * 8) + 8;
  1466.         ld      a, -3 (ix)
  1467.         add     a, a
  1468.         add     a, a
  1469.         add     a, a
  1470.         add     a, #0x08
  1471.         ld      l, -16 (ix)
  1472.         ld      h, -15 (ix)
  1473.         ld      (hl), a
  1474. 00130$:
  1475. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:173: pawn->PositionX = pawn->TargetX;
  1476.         ld      l, -16 (ix)
  1477.         ld      h, -15 (ix)
  1478.         ld      a, (hl)
  1479.         ld      l, -5 (ix)
  1480.         ld      h, -4 (ix)
  1481.         ld      (hl), a
  1482. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:174: pawn->PositionY = pawn->TargetY;
  1483.         ld      l, -22 (ix)
  1484.         ld      h, -21 (ix)
  1485.         ld      a, (hl)
  1486.         ld      l, -19 (ix)
  1487.         ld      h, -18 (ix)
  1488.         ld      (hl), a
  1489. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:175: pawn->Update |= PAWN_UPDATE_POSITION;
  1490.         pop     hl
  1491.         push    hl
  1492.         ld      a, (hl)
  1493.         set     0, a
  1494.         pop     hl
  1495.         push    hl
  1496.         ld      (hl), a
  1497. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:176: pawn->Update &= ~PAWN_UPDATE_COLLISION;
  1498.         res     4, a
  1499.         pop     hl
  1500.         push    hl
  1501.         ld      (hl), a
  1502. 00133$:
  1503. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:179: }
  1504.         ld      sp, ix
  1505.         pop     ix
  1506.         ret
  1507. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:187: void GamePawn_Draw(Game_Pawn* pawn)
  1508. ;       ---------------------------------
  1509. ; Function GamePawn_Draw
  1510. ; ---------------------------------
  1511. _GamePawn_Draw::
  1512.         push    ix
  1513.         ld      ix,#0
  1514.         add     ix,sp
  1515.         ld      iy, #-19
  1516.         add     iy, sp
  1517.         ld      sp, iy
  1518.         ld      c, l
  1519.         ld      b, h
  1520. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:189: if(pawn->Update == 0)
  1521.         ld      hl, #0x000c
  1522.         add     hl, bc
  1523.         ex      (sp), hl
  1524.         pop     hl
  1525.         push    hl
  1526.         ld      a, (hl)
  1527.         or      a, a
  1528. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:190: return;
  1529.         jp      Z,00121$
  1530. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:192: const Game_Sprite* sprt = pawn->SpriteList;
  1531.         ld      a, (bc)
  1532.         ld      -3 (ix), a
  1533.         inc     bc
  1534.         ld      a, (bc)
  1535.         ld      -2 (ix), a
  1536.         dec     bc
  1537. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:193: u16 dest = g_SpriteAtributeLow + (pawn->SpriteID * 4);
  1538.         ld      l, c
  1539. ;       spillPairReg hl
  1540. ;       spillPairReg hl
  1541.         ld      h, b
  1542. ;       spillPairReg hl
  1543. ;       spillPairReg hl
  1544.         inc     hl
  1545.         inc     hl
  1546.         inc     hl
  1547.         ld      l, (hl)
  1548. ;       spillPairReg hl
  1549.         ld      h, #0x00
  1550. ;       spillPairReg hl
  1551. ;       spillPairReg hl
  1552.         add     hl, hl
  1553.         add     hl, hl
  1554.         ld      de, (_g_SpriteAtributeLow)
  1555.         add     hl, de
  1556.         ld      -17 (ix), l
  1557.         ld      -16 (ix), h
  1558. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:194: loop(i, pawn->SpriteNum)
  1559.         ld      -15 (ix), c
  1560.         ld      -14 (ix), b
  1561.         ld      -13 (ix), c
  1562.         ld      -12 (ix), b
  1563.         ld      -11 (ix), c
  1564.         ld      -10 (ix), b
  1565.         ld      hl, #0x000d
  1566.         add     hl, bc
  1567.         ld      -9 (ix), l
  1568.         ld      -8 (ix), h
  1569.         ld      a, -9 (ix)
  1570.         ld      -7 (ix), a
  1571.         ld      a, -8 (ix)
  1572.         ld      -6 (ix), a
  1573.         ld      -5 (ix), c
  1574.         ld      -4 (ix), b
  1575.         ld      -1 (ix), #0x00
  1576. 00119$:
  1577.         ld      l, -5 (ix)
  1578.         ld      h, -4 (ix)
  1579.         inc     hl
  1580.         inc     hl
  1581.         ld      a,-1 (ix)
  1582.         sub     a,(hl)
  1583.         jp      NC, 00117$
  1584. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:196: if(sprt->Flag & PAWN_SPRITE_EVEN) // Skip odd frames
  1585.         ld      c, -3 (ix)
  1586.         ld      b, -2 (ix)
  1587.         ld      hl, #4
  1588.         add     hl, bc
  1589.         ld      c, (hl)
  1590.         bit     0, c
  1591.         jr      Z, 00112$
  1592. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:198: if((pawn->Counter & 1) != 0)
  1593.         ld      l, -7 (ix)
  1594.         ld      h, -6 (ix)
  1595.         ld      a, (hl)
  1596.         rrca
  1597.         jp      C,00116$
  1598. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:201: pawn->Update |= PAWN_UPDATE_PATTERN;
  1599.         pop     hl
  1600.         push    hl
  1601.         ld      a, (hl)
  1602.         set     1, a
  1603.         pop     hl
  1604.         push    hl
  1605.         ld      (hl), a
  1606.         jp      00113$
  1607. 00112$:
  1608. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:203: else if(sprt->Flag & PAWN_SPRITE_ODD) // Skip even frames
  1609.         bit     1, c
  1610.         jr      Z, 00113$
  1611. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:205: if((pawn->Counter & 1) == 0)
  1612.         ld      l, -9 (ix)
  1613.         ld      h, -8 (ix)
  1614.         ld      a, (hl)
  1615.         rrca
  1616.         jp      NC,00116$
  1617. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:208: pawn->Update |= PAWN_UPDATE_PATTERN;
  1618.         pop     hl
  1619.         push    hl
  1620.         ld      a, (hl)
  1621.         set     1, a
  1622.         pop     hl
  1623.         push    hl
  1624.         ld      (hl), a
  1625. 00113$:
  1626. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:211: g_Game_DrawY = pawn->PositionY + sprt->OffsetY;
  1627.         ld      l, -13 (ix)
  1628.         ld      h, -12 (ix)
  1629.         ld      de, #0x0007
  1630.         add     hl, de
  1631.         ld      c, (hl)
  1632.         ld      e, -3 (ix)
  1633.         ld      d, -2 (ix)
  1634.         inc     de
  1635.         ld      a, (de)
  1636.         add     a, c
  1637.         ld      (_g_Game_DrawY+0), a
  1638. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:212: g_Game_DrawX = pawn->PositionX + sprt->OffsetX;
  1639.         ld      l, -11 (ix)
  1640.         ld      h, -10 (ix)
  1641.         ld      de, #0x0006
  1642.         add     hl, de
  1643.         ld      c, (hl)
  1644.         ld      l, -3 (ix)
  1645.         ld      h, -2 (ix)
  1646.         ld      a, (hl)
  1647.         add     a, c
  1648.         ld      (_g_Game_DrawX+0), a
  1649. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:213: u8 size = 2;
  1650.         ld      c, #0x02
  1651. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:215: if(pawn->Update & PAWN_UPDATE_PATTERN)
  1652.         pop     hl
  1653.         push    hl
  1654.         bit     1, (hl)
  1655.         jr      Z, 00115$
  1656. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:217: g_Game_DrawPattern = pawn->AnimFrame + sprt->DataOffset;
  1657.         ld      l, -15 (ix)
  1658.         ld      h, -14 (ix)
  1659.         ld      de, #0x0009
  1660.         add     hl, de
  1661.         ld      a, (hl)
  1662.         ld      l, -3 (ix)
  1663. ;       spillPairReg hl
  1664. ;       spillPairReg hl
  1665.         ld      h, -2 (ix)
  1666. ;       spillPairReg hl
  1667. ;       spillPairReg hl
  1668.         inc     hl
  1669.         inc     hl
  1670.         ld      c, (hl)
  1671.         add     a, c
  1672.         ld      (_g_Game_DrawPattern+0), a
  1673. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:218: size++;
  1674.         ld      c, #0x03
  1675. 00115$:
  1676. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:221: VDP_WriteVRAM((u8*)&g_Game_DrawY, dest, g_SpriteAtributeHigh, size);
  1677.         ld      b, #0x00
  1678.         push    bc
  1679.         ld      l, -17 (ix)
  1680. ;       spillPairReg hl
  1681. ;       spillPairReg hl
  1682.         ld      h, -16 (ix)
  1683. ;       spillPairReg hl
  1684. ;       spillPairReg hl
  1685.         push    hl
  1686.         ld      hl, #_g_Game_DrawY
  1687.         push    hl
  1688.         call    _VDP_WriteVRAM_16K
  1689.         ld      hl, #6
  1690.         add     hl, sp
  1691.         ld      sp, hl
  1692. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:222: dest += 4;
  1693.         ld      c, -17 (ix)
  1694.         ld      b, -16 (ix)
  1695.         inc     bc
  1696.         inc     bc
  1697.         inc     bc
  1698.         inc     bc
  1699.         ld      -17 (ix), c
  1700.         ld      -16 (ix), b
  1701. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:224: SkipDrawing:
  1702. 00116$:
  1703. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:225: sprt++;
  1704.         ld      a, -3 (ix)
  1705.         add     a, #0x05
  1706.         ld      -3 (ix), a
  1707.         jr      NC, 00170$
  1708.         inc     -2 (ix)
  1709. 00170$:
  1710. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:194: loop(i, pawn->SpriteNum)
  1711.         inc     -1 (ix)
  1712.         jp      00119$
  1713. 00117$:
  1714. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:227: pawn->Update = 0;
  1715.         pop     hl
  1716.         push    hl
  1717.         ld      (hl), #0x00
  1718. 00121$:
  1719. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:228: }
  1720.         ld      sp, ix
  1721.         pop     ix
  1722.         ret
  1723. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:234: void GamePawn_SetTargetPosition(Game_Pawn* pawn, u8 x, u8 y) 
  1724. ;       ---------------------------------
  1725. ; Function GamePawn_SetTargetPosition
  1726. ; ---------------------------------
  1727. _GamePawn_SetTargetPosition::
  1728.         ex      de, hl
  1729. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:236: pawn->TargetX = x;
  1730.         ld      hl, #0x000e
  1731.         add     hl, de
  1732.         ld      iy, #2
  1733.         add     iy, sp
  1734.         ld      a, 0 (iy)
  1735.         ld      (hl), a
  1736. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:237: pawn->TargetY = y;
  1737.         ld      hl, #0x000f
  1738.         add     hl, de
  1739.         ld      a, 1 (iy)
  1740.         inc     iy
  1741.         ld      (hl), a
  1742. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:238: pawn->Update |= PAWN_UPDATE_COLLISION;
  1743.         ld      hl, #0x000c
  1744.         add     hl, de
  1745.         set     4, (hl)
  1746. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:239: }
  1747.         pop     hl
  1748.         pop     af
  1749.         jp      (hl)
  1750. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:243: void GamePawn_InitializePhysics(Game_Pawn* pawn, Game_PhysicsCB pcb, Game_CollisionCB ccb, u8 boundX, u8 boundY)
  1751. ;       ---------------------------------
  1752. ; Function GamePawn_InitializePhysics
  1753. ; ---------------------------------
  1754. _GamePawn_InitializePhysics::
  1755.         push    ix
  1756.         ld      ix,#0
  1757.         add     ix,sp
  1758.         ld      c, l
  1759.         ld      b, h
  1760. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:245: pawn->PhysicsCB = pcb; 
  1761.         ld      hl, #0x0013
  1762.         add     hl, bc
  1763.         ld      (hl), e
  1764.         inc     hl
  1765.         ld      (hl), d
  1766. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:246: pawn->CollisionCB = ccb;
  1767.         ld      hl, #0x0015
  1768.         add     hl, bc
  1769.         ld      a, 4 (ix)
  1770.         ld      (hl), a
  1771.         inc     hl
  1772.         ld      a, 5 (ix)
  1773.         ld      (hl), a
  1774. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:247: pawn->BoundX = boundX;
  1775.         ld      hl, #0x0010
  1776.         add     hl, bc
  1777.         ld      a, 6 (ix)
  1778.         ld      (hl), a
  1779. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:248: pawn->BoundY = boundY;
  1780.         ld      hl, #0x0011
  1781.         add     hl, bc
  1782.         ld      a, 7 (ix)
  1783.         ld      (hl), a
  1784. ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:249: }
  1785.         pop     ix
  1786.         pop     hl
  1787.         pop     af
  1788.         pop     af
  1789.         jp      (hl)
  1790.         .area _CODE
  1791.         .area _INITIALIZER
  1792.         .area _CABS (ABS)
  1793.  

Editor

You can edit this paste and save as new:


File Description
  • game_pawn.asm
  • Paste Code
  • 15 Feb-2022
  • 39.54 Kb
You can Share it: