[asm] game_pawn.asm
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- ;--------------------------------------------------------
- ; File Created by SDCC : free open source ANSI-C Compiler
- ; Version 4.1.12 #12748 (MINGW64)
- ;--------------------------------------------------------
- .module game_pawn
- .optsdcc -mz80
- ;--------------------------------------------------------
- ; Public variables in this module
- ;--------------------------------------------------------
- .globl _Mem_Set
- .globl _VDP_SetSpriteColorSM1
- .globl _VDP_Peek_16K
- .globl _VDP_WriteVRAM_16K
- .globl _g_Game_DrawPattern
- .globl _g_Game_DrawX
- .globl _g_Game_DrawY
- .globl _g_SLTSL
- .globl _g_GRPACY
- .globl _g_GRPACX
- .globl _g_LOGOPR
- .globl _g_CMASK
- .globl _g_CLOC
- .globl _g_FNKSTR
- .globl _g_ATRBYT
- .globl _g_BDRCLR
- .globl _g_BAKCLR
- .globl _g_FORCLR
- .globl _g_CSRX
- .globl _g_CSRY
- .globl _g_MLTPAT
- .globl _g_MLTATR
- .globl _g_MLTCGP
- .globl _g_MLTCOL
- .globl _g_MLTNAM
- .globl _g_GRPPAT
- .globl _g_GRPATR
- .globl _g_GRPCGP
- .globl _g_GRPCOL
- .globl _g_GRPNAM
- .globl _g_T32PAT
- .globl _g_T32ATR
- .globl _g_T32CGP
- .globl _g_T32COL
- .globl _g_T32NAM
- .globl _g_TXTPAT
- .globl _g_TXTATR
- .globl _g_TXTCGP
- .globl _g_TXTCOL
- .globl _g_TXTNAM
- .globl _g_CLMLST
- .globl _g_CRTCNT
- .globl _g_LINLEN
- .globl _g_LINL32
- .globl _g_LINL40
- .globl _g_SVFFFD
- .globl _g_RG27SAV
- .globl _g_RG26SAV
- .globl _g_RG25SAV
- .globl _g_SVFFF8
- .globl _g_MINROM
- .globl _g_RG23SAV
- .globl _g_RG22SAV
- .globl _g_RG21SAV
- .globl _g_RG20SAV
- .globl _g_RG19SAV
- .globl _g_RG18SAV
- .globl _g_RG17SAV
- .globl _g_RG16SAV
- .globl _g_RG15SAV
- .globl _g_RG14SAV
- .globl _g_RG13SAV
- .globl _g_RG12SAV
- .globl _g_RG11SAV
- .globl _g_RG10SAV
- .globl _g_RG09SAV
- .globl _g_RG08SAV
- .globl _g_PROCNM
- .globl _g_SLTWRK
- .globl _g_SLTATR
- .globl _g_SLTTBL
- .globl _g_EXPTBL
- .globl _g_MNROM
- .globl _g_DRWANG
- .globl _g_DRWSCL
- .globl _g_DRWFLG
- .globl _g_GYPOS
- .globl _g_GXPOS
- .globl _g_BRDATR
- .globl _g_CASPRV
- .globl _g_OLDSCR
- .globl _g_SCRMOD
- .globl _g_FLBMEM
- .globl _g_KANAMD
- .globl _g_KANAST
- .globl _g_CAPST
- .globl _g_CSTYLE
- .globl _g_CSRSW
- .globl _g_INSFLG
- .globl _g_ESCCNT
- .globl _g_GRPHED
- .globl _g_WINWID
- .globl _g_LOWLIM
- .globl _g_INTCNT
- .globl _g_INTVAL
- .globl _g_JIFFY
- .globl _g_PADX
- .globl _g_PADY
- .globl _g_INTFLG
- .globl _g_RTYCNT
- .globl _g_TRPTBL
- .globl _g_HIMEM
- .globl _g_BOTTOM
- .globl _g_PATWRK
- .globl _g_LINWRK
- .globl _g_KEYBUF
- .globl _g_NEWKEY
- .globl _g_OLDKEY
- .globl _g_CLIKFL
- .globl _g_ONGSBF
- .globl _g_FNKFLG
- .globl _g_FNKSWI
- .globl _g_CODSAV
- .globl _g_FSTPOS
- .globl _g_LINTTB
- .globl _g_BASROM
- .globl _g_ENSTOP
- .globl _g_VCBC
- .globl _g_VCBB
- .globl _g_VCBA
- .globl _g_PLYCNT
- .globl _g_MUSICF
- .globl _g_QUEUEN
- .globl _g_MCLPTR
- .globl _g_MCLLEN
- .globl _g_SAVVOL
- .globl _g_VOICEN
- .globl _g_SAVSP
- .globl _g_PRSCNT
- .globl _g_LSTMOD
- .globl _g_LSTCOM
- .globl _g_COMMSK
- .globl _g_ESTBLS
- .globl _g_FLAGS
- .globl _g_ERRORS
- .globl _g_DATCNT
- .globl _g_DEVNUM
- .globl _g_OLDINT
- .globl _g_OLDSTT
- .globl _g_MEXBIh
- .globl _g_RSIQLN
- .globl _g_RSFCB
- .globl _g_TOCNT
- .globl _g_RSTMP
- .globl _g_YSAVE
- .globl _g_XSAVE
- .globl _g_NORUSE
- .globl _g_MODE
- .globl _g_ROMA
- .globl _g_CHRCNT
- .globl _g_EXBRSA
- .globl _g_AVCSAV
- .globl _g_ACPAGE
- .globl _g_DPPAGE
- .globl _g_RS2IQ
- .globl _g_VOICCQ
- .globl _g_VOICBQ
- .globl _g_VOICAQ
- .globl _g_QUEBAK
- .globl _g_QUETAB
- .globl _g_ASPCT2
- .globl _g_ASPCT1
- .globl _g_HEADER
- .globl _g_HIGH
- .globl _g_LOW
- .globl _g_CS240
- .globl _g_CS120
- .globl _g_GETPNT
- .globl _g_PUTPNT
- .globl _g_REPCNT
- .globl _g_SCNCNT
- .globl _g_FRCNEW
- .globl _g_QUEUES
- .globl _g_MINUPD
- .globl _g_MAXUPD
- .globl _g_TRGFLG
- .globl _g_STATFL
- .globl _g_RG7SAV
- .globl _g_RG6SAV
- .globl _g_RG5SAV
- .globl _g_RG4SAV
- .globl _g_RG3SAV
- .globl _g_RG2SAV
- .globl _g_RG1SAV
- .globl _g_RG0SAV
- .globl _g_CNSDFG
- .globl _g_CLIKSW
- .globl _g_USRTAB
- .globl _g_CLPRIM
- .globl _g_WRPRIM
- .globl _g_RDPRIM
- .globl _GamePawn_Initialize
- .globl _GamePawn_SetPosition
- .globl _GamePawn_SetAction
- .globl _GamePawn_Update
- .globl _GamePawn_Draw
- .globl _GamePawn_SetTargetPosition
- .globl _GamePawn_InitializePhysics
- ;--------------------------------------------------------
- ; special function registers
- ;--------------------------------------------------------
- ;--------------------------------------------------------
- ; ram data
- ;--------------------------------------------------------
- .area _DATA
- _g_LINL40 = 0xf3ae
- _g_LINL32 = 0xf3af
- _g_LINLEN = 0xf3b0
- _g_CRTCNT = 0xf3b1
- _g_CLMLST = 0xf3b2
- _g_TXTNAM = 0xf3b3
- _g_TXTCOL = 0xf3b5
- _g_TXTCGP = 0xf3b7
- _g_TXTATR = 0xf3b9
- _g_TXTPAT = 0xf3bb
- _g_T32NAM = 0xf3bd
- _g_T32COL = 0xf3bf
- _g_T32CGP = 0xf3c1
- _g_T32ATR = 0xf3c3
- _g_T32PAT = 0xf3c5
- _g_GRPNAM = 0xf3c7
- _g_GRPCOL = 0xf3c9
- _g_GRPCGP = 0xf3cb
- _g_GRPATR = 0xf3cd
- _g_GRPPAT = 0xf3cf
- _g_MLTNAM = 0xf3d1
- _g_MLTCOL = 0xf3d3
- _g_MLTCGP = 0xf3d5
- _g_MLTATR = 0xf3d7
- _g_MLTPAT = 0xf3d9
- _g_CSRY = 0xf3dc
- _g_CSRX = 0xf3dd
- _g_FORCLR = 0xf3e9
- _g_BAKCLR = 0xf3ea
- _g_BDRCLR = 0xf3eb
- _g_ATRBYT = 0xf3f2
- _g_FNKSTR = 0xf87f
- _g_CLOC = 0xf92a
- _g_CMASK = 0xf92c
- _g_LOGOPR = 0xfb02
- _g_GRPACX = 0xfcb7
- _g_GRPACY = 0xfcb9
- _g_SLTSL = 0xffff
- _g_Game_DrawY::
- .ds 1
- _g_Game_DrawX::
- .ds 1
- _g_Game_DrawPattern::
- .ds 1
- ;--------------------------------------------------------
- ; ram data
- ;--------------------------------------------------------
- .area _INITIALIZED
- ;--------------------------------------------------------
- ; absolute external ram data
- ;--------------------------------------------------------
- .area _DABS (ABS)
- ;--------------------------------------------------------
- ; global & static initialisations
- ;--------------------------------------------------------
- .area _HOME
- .area _GSINIT
- .area _GSFINAL
- .area _GSINIT
- ;--------------------------------------------------------
- ; Home
- ;--------------------------------------------------------
- .area _HOME
- .area _HOME
- ;--------------------------------------------------------
- ; code
- ;--------------------------------------------------------
- .area _CODE
- ;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)
- ; ---------------------------------
- ; Function GamePawn_Initialize
- ; ---------------------------------
- _GamePawn_Initialize::
- push ix
- ld ix,#0
- add ix,sp
- push af
- push af
- ld c, l
- ld b, h
- inc sp
- inc sp
- push de
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:23: Mem_Set(0x00, pawn, sizeof(Game_Pawn));
- ld e, c
- ld d, b
- push bc
- ld hl, #0x0017
- push hl
- xor a, a
- call _Mem_Set
- pop bc
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:24: pawn->SpriteList = sprtList;
- ld l, c
- ld h, b
- ld a, -4 (ix)
- ld (hl), a
- inc hl
- ld a, -3 (ix)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:25: pawn->SpriteNum = sprtNum;
- ld e, c
- ld d, b
- inc de
- inc de
- ld a, 4 (ix)
- ld (de), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:26: pawn->SpriteID = sprtID;
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, b
- ; spillPairReg hl
- ; spillPairReg hl
- inc hl
- inc hl
- inc hl
- ld a, 5 (ix)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:27: pawn->ActionList = actList;
- ld hl, #0x0004
- add hl, bc
- ld a, 6 (ix)
- ld (hl), a
- inc hl
- ld a, 7 (ix)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:30: GamePawn_SetAction(pawn, 0);
- push de
- xor a, a
- push af
- inc sp
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, b
- ; spillPairReg hl
- ; spillPairReg hl
- call _GamePawn_SetAction
- pop de
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:33: u8 sprtIdx = sprtID;
- ld a, 5 (ix)
- ld -2 (ix), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:35: loop(i, pawn->SpriteNum)
- pop bc
- push bc
- ld -1 (ix), #0x00
- 00105$:
- ld a, (de)
- ld l, a
- ; spillPairReg hl
- ; spillPairReg hl
- ld a, -1 (ix)
- sub a, l
- jr NC, 00107$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:37: VDP_SetSpriteColorSM1(sprtIdx, sprt->Color);
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, b
- ; spillPairReg hl
- ; spillPairReg hl
- inc hl
- inc hl
- inc hl
- ld l, (hl)
- ; spillPairReg hl
- push bc
- push de
- ld a, -2 (ix)
- call _VDP_SetSpriteColorSM1
- pop de
- pop bc
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:39: if((sprt->Flag & PAWN_SPRITE_ODD) == 0)
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, b
- ; spillPairReg hl
- ; spillPairReg hl
- inc hl
- inc hl
- inc hl
- inc hl
- bit 1, (hl)
- jr NZ, 00102$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:40: sprtIdx++;
- inc -2 (ix)
- 00102$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:42: sprt++;
- inc bc
- inc bc
- inc bc
- inc bc
- inc bc
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:35: loop(i, pawn->SpriteNum)
- inc -1 (ix)
- jp 00105$
- 00107$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:45: }
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:49: void GamePawn_SetPosition(Game_Pawn* pawn, u8 x, u8 y)
- ; ---------------------------------
- ; Function GamePawn_SetPosition
- ; ---------------------------------
- _GamePawn_SetPosition::
- ex de, hl
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:51: pawn->PositionX = x;
- ld hl, #0x0006
- add hl, de
- ld iy, #2
- add iy, sp
- ld a, 0 (iy)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:52: pawn->PositionY = y;
- ld hl, #0x0007
- add hl, de
- ld a, 1 (iy)
- inc iy
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:53: pawn->TargetX = x;
- ld hl, #0x000e
- add hl, de
- ld a, -1 (iy)
- dec iy
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:54: pawn->TargetY = y;
- ld hl, #0x000f
- add hl, de
- ld a, 1 (iy)
- inc iy
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:55: pawn->Update |= PAWN_UPDATE_POSITION;
- ld hl, #0x000c
- add hl, de
- set 0, (hl)
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:56: }
- pop hl
- pop af
- jp (hl)
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:61: void GamePawn_SetAction(Game_Pawn* pawn, u8 id)
- ; ---------------------------------
- ; Function GamePawn_SetAction
- ; ---------------------------------
- _GamePawn_SetAction::
- dec sp
- ld c, l
- ld b, h
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:63: if(pawn->ActionId != id)
- ld hl, #0x0008
- add hl, bc
- ex de, hl
- ld a, (de)
- ld iy, #0
- add iy, sp
- ld 0 (iy), a
- ld a, 3 (iy)
- sub a, 0 (iy)
- jr Z, 00103$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:65: pawn->ActionId = id;
- ld a, 3 (iy)
- inc iy
- inc iy
- inc iy
- ld (de), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:66: pawn->AnimTimer = 0;
- ld hl, #0x000b
- add hl, bc
- ld (hl), #0x00
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:67: pawn->AnimStep = 0;
- ld hl, #0x000a
- add hl, bc
- ld (hl), #0x00
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:68: pawn->Update |= PAWN_UPDATE_PATTERN;
- ld hl, #0x000c
- add hl, bc
- set 1, (hl)
- ld a, (hl)
- 00103$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:70: }
- inc sp
- pop hl
- inc sp
- jp (hl)
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:74: void GamePawn_Update(Game_Pawn* pawn)
- ; ---------------------------------
- ; Function GamePawn_Update
- ; ---------------------------------
- _GamePawn_Update::
- push ix
- ld ix,#0
- add ix,sp
- ld iy, #-24
- add iy, sp
- ld sp, iy
- ld -2 (ix), l
- ld -1 (ix), h
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:76: const Game_Action* act = &pawn->ActionList[pawn->ActionId];
- ld a, -2 (ix)
- ld -4 (ix), a
- ld a, -1 (ix)
- ld -3 (ix), a
- ld l, -4 (ix)
- ld h, -3 (ix)
- ld de, #0x0004
- add hl, de
- ld a, (hl)
- ld -8 (ix), a
- inc hl
- ld a, (hl)
- ld -7 (ix), a
- ld a, -2 (ix)
- ld -4 (ix), a
- ld a, -1 (ix)
- ld -3 (ix), a
- ld l, -4 (ix)
- ld h, -3 (ix)
- ld de, #0x0008
- add hl, de
- ld a, (hl)
- ld -3 (ix), a
- ld -4 (ix), a
- ld -3 (ix), #0x00
- ld a, -4 (ix)
- ld -6 (ix), a
- ld a, -3 (ix)
- ld -5 (ix), a
- ld b, #0x02
- 00295$:
- sla -6 (ix)
- rl -5 (ix)
- djnz 00295$
- ld a, -8 (ix)
- add a, -6 (ix)
- ld -4 (ix), a
- ld a, -7 (ix)
- adc a, -5 (ix)
- ld -3 (ix), a
- ld a, -4 (ix)
- ld -15 (ix), a
- ld a, -3 (ix)
- ld -14 (ix), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:79: if(pawn->AnimTimer >= act->FrameList[pawn->AnimStep].Duration)
- ld a, -2 (ix)
- add a, #0x0b
- ld -13 (ix), a
- ld a, -1 (ix)
- adc a, #0x00
- ld -12 (ix), a
- ld l, -13 (ix)
- ld h, -12 (ix)
- ld a, (hl)
- ld -11 (ix), a
- ld l, -15 (ix)
- ld h, -14 (ix)
- ld a, (hl)
- ld -10 (ix), a
- inc hl
- ld a, (hl)
- ld -9 (ix), a
- ld a, -2 (ix)
- add a, #0x0a
- ld -8 (ix), a
- ld a, -1 (ix)
- adc a, #0x00
- ld -7 (ix), a
- ld l, -8 (ix)
- ld h, -7 (ix)
- ld a, (hl)
- ld -3 (ix), a
- ld -4 (ix), a
- ld -3 (ix), #0x00
- ld a, -4 (ix)
- ld -6 (ix), a
- ld a, -3 (ix)
- ld -5 (ix), a
- ld b, #0x02
- 00296$:
- sla -6 (ix)
- rl -5 (ix)
- djnz 00296$
- ld a, -10 (ix)
- add a, -6 (ix)
- ld -4 (ix), a
- ld a, -9 (ix)
- adc a, -5 (ix)
- ld -3 (ix), a
- ld l, -4 (ix)
- ld h, -3 (ix)
- inc hl
- ld a,-11 (ix)
- sub a,(hl)
- jr C, 00102$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:81: pawn->AnimTimer = 0;
- ld l, -13 (ix)
- ld h, -12 (ix)
- ld (hl), #0x00
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:82: pawn->AnimStep++;
- ld l,-8 (ix)
- ld h,-7 (ix)
- inc (hl)
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:83: pawn->Update |= PAWN_UPDATE_PATTERN;
- ld l, -2 (ix)
- ld h, -1 (ix)
- ld de, #0x000c
- add hl, de
- set 1, (hl)
- 00102$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:87: if(pawn->AnimStep >= act->FrameNum)
- ld l, -8 (ix)
- ld h, -7 (ix)
- ld a, (hl)
- ld l, -15 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, -14 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- inc hl
- inc hl
- ld c, (hl)
- sub a, c
- jr C, 00107$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:89: if(act->Loop) // restart action
- ld l, -15 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, -14 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- inc hl
- inc hl
- inc hl
- ld a, (hl)
- and a,#0x01
- jr Z, 00104$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:91: pawn->AnimTimer = 0;
- ld l, -13 (ix)
- ld h, -12 (ix)
- ld (hl), #0x00
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:92: pawn->AnimStep = 0;
- ld l, -8 (ix)
- ld h, -7 (ix)
- ld (hl), #0x00
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:93: pawn->Update |= PAWN_UPDATE_PATTERN;
- ld l, -2 (ix)
- ld h, -1 (ix)
- ld de, #0x000c
- add hl, de
- set 1, (hl)
- jp 00107$
- 00104$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:97: GamePawn_SetAction(pawn, 0);
- xor a, a
- push af
- inc sp
- ld l, -2 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, -1 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- call _GamePawn_SetAction
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:98: return;
- jp 00133$
- 00107$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:103: const Game_Frame* frame = &act->FrameList[pawn->AnimStep];
- ld l, -15 (ix)
- ld h, -14 (ix)
- ld a, (hl)
- ld -4 (ix), a
- inc hl
- ld a, (hl)
- ld -3 (ix), a
- ld l, -8 (ix)
- ld h, -7 (ix)
- ld a, (hl)
- ld -5 (ix), a
- ld -6 (ix), a
- ld -5 (ix), #0x00
- ld b, #0x02
- 00297$:
- sla -6 (ix)
- rl -5 (ix)
- djnz 00297$
- ld a, -4 (ix)
- add a, -6 (ix)
- ld -8 (ix), a
- ld a, -3 (ix)
- adc a, -5 (ix)
- ld -7 (ix), a
- ld a, -8 (ix)
- ld -4 (ix), a
- ld a, -7 (ix)
- ld -3 (ix), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:104: if(frame->Event != 0)
- ld a, -4 (ix)
- ld -6 (ix), a
- ld a, -3 (ix)
- ld -5 (ix), a
- ld l, -6 (ix)
- ld h, -5 (ix)
- inc hl
- inc hl
- ld a, (hl)
- ld -6 (ix), a
- inc hl
- ld a, (hl)
- ld -5 (ix), a
- or a, -6 (ix)
- jr Z, 00109$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:105: frame->Event();
- ld l, -6 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, -5 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- call ___sdcc_call_hl
- 00109$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:108: pawn->AnimFrame = frame->Id;
- ld a, -2 (ix)
- add a, #0x09
- ld c, a
- ld a, -1 (ix)
- adc a, #0x00
- ld b, a
- ld l, -4 (ix)
- ld h, -3 (ix)
- ld a, (hl)
- ld (bc), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:109: pawn->AnimTimer++;
- ld l,-13 (ix)
- ld h,-12 (ix)
- inc (hl)
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:110: pawn->Counter++;
- ld l, -2 (ix)
- ld h, -1 (ix)
- ld de, #0x000d
- add hl, de
- inc (hl)
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:113: if(pawn->Update & PAWN_UPDATE_COLLISION)
- ld a, -2 (ix)
- add a, #0x0c
- ld -24 (ix), a
- ld a, -1 (ix)
- adc a, #0x00
- ld -23 (ix), a
- pop hl
- push hl
- bit 4, (hl)
- jp Z,00133$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:116: if(pawn->TargetY > pawn->PositionY) // Go down
- ld a, -2 (ix)
- add a, #0x0f
- ld -22 (ix), a
- ld a, -1 (ix)
- adc a, #0x00
- ld -21 (ix), a
- ld l, -22 (ix)
- ld h, -21 (ix)
- ld a, (hl)
- ld -20 (ix), a
- ld a, -2 (ix)
- add a, #0x07
- ld -19 (ix), a
- ld a, -1 (ix)
- adc a, #0x00
- ld -18 (ix), a
- ld l, -19 (ix)
- ld h, -18 (ix)
- ld a, (hl)
- ld -17 (ix), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:118: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
- ld a, -2 (ix)
- add a, #0x0e
- ld -16 (ix), a
- ld a, -1 (ix)
- adc a, #0x00
- ld -15 (ix), a
- ld a, -2 (ix)
- add a, #0x10
- ld -14 (ix), a
- ld a, -1 (ix)
- adc a, #0x00
- ld -13 (ix), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:119: u8 cellY = (pawn->TargetY + pawn->BoundY) / 8;
- ld a, -20 (ix)
- ld -12 (ix), a
- ld -11 (ix), #0x00
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:120: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
- ld hl, (_g_ScreenLayoutLow)
- ld -10 (ix), l
- ld -9 (ix), h
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:121: if(pawn->CollisionCB(tile))
- ld a, -2 (ix)
- add a, #0x15
- ld -8 (ix), a
- ld a, -1 (ix)
- adc a, #0x00
- ld -7 (ix), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:150: if(pawn->TargetX > pawn->PositionX) // Go right
- ld l, -16 (ix)
- ld h, -15 (ix)
- ld a, (hl)
- ld -4 (ix), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:152: u8 cellX = (pawn->TargetX + pawn->BoundX) / 8;
- ld l, -14 (ix)
- ld h, -13 (ix)
- ld a, (hl)
- ld -3 (ix), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:118: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
- ld a, -4 (ix)
- ld -6 (ix), a
- ld -5 (ix), #0x00
- ld a, -3 (ix)
- ld -4 (ix), a
- ld -3 (ix), #0x00
- xor a, a
- rlca
- and a,#0x01
- ld c, a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:116: if(pawn->TargetY > pawn->PositionY) // Go down
- ld a, -17 (ix)
- sub a, -20 (ix)
- jp NC, 00120$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:118: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
- ld e, -4 (ix)
- ld d, -3 (ix)
- ld a, c
- or a, a
- jr Z, 00135$
- ld e, -4 (ix)
- ld d, -3 (ix)
- inc de
- 00135$:
- sra d
- rr e
- ld a, -6 (ix)
- add a, e
- ld c, a
- ld a, -5 (ix)
- adc a, d
- ld b, a
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, b
- ; spillPairReg hl
- ; spillPairReg hl
- bit 7, b
- jr Z, 00136$
- ld hl, #0x0007
- add hl, bc
- 00136$:
- sra h
- rr l
- sra h
- rr l
- sra h
- rr l
- ld -3 (ix), l
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:119: u8 cellY = (pawn->TargetY + pawn->BoundY) / 8;
- ld a, -2 (ix)
- add a, #0x11
- ld c, a
- ld a, -1 (ix)
- adc a, #0x00
- ld b, a
- ld a, (bc)
- ld e, a
- ld d, #0x00
- ld a, -12 (ix)
- add a, e
- ld e, a
- ld a, -11 (ix)
- adc a, d
- ld d, a
- ld l, e
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, d
- ; spillPairReg hl
- ; spillPairReg hl
- bit 7, d
- jr Z, 00137$
- ld hl, #0x0007
- add hl, de
- 00137$:
- sra h
- rr l
- sra h
- rr l
- sra h
- rr l
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:120: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
- ld -4 (ix), l
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, #0x00
- ; spillPairReg hl
- ; spillPairReg hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- ld e, -10 (ix)
- ld d, -9 (ix)
- add hl, de
- ld e, -3 (ix)
- ld d, #0x00
- add hl, de
- push bc
- call _VDP_Peek_16K
- pop bc
- ld -3 (ix), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:121: if(pawn->CollisionCB(tile))
- ld l, -8 (ix)
- ld h, -7 (ix)
- ld e, (hl)
- inc hl
- ld d, (hl)
- push bc
- ld a, -3 (ix)
- ex de, hl
- call ___sdcc_call_hl
- pop bc
- or a, a
- jp Z, 00121$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:123: pawn->PhysicsCB(PAWN_PHYSICS_COL_DOWN, tile);
- ld e, -2 (ix)
- ld d, -1 (ix)
- ld hl, #19
- add hl, de
- ld e, (hl)
- inc hl
- ld d, (hl)
- push bc
- ld l, -3 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- xor a, a
- push de
- pop iy
- call ___sdcc_call_iy
- pop bc
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:124: pawn->TargetY = (cellY * 8) - pawn->BoundY;
- ld a, -4 (ix)
- add a, a
- add a, a
- add a, a
- push af
- ld a, (bc)
- ld c, a
- pop af
- sub a, c
- pop bc
- pop hl
- push hl
- push bc
- ld (hl), a
- jp 00121$
- 00120$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:127: else if(pawn->TargetY < pawn->PositionY) // Go up
- ld a, -20 (ix)
- sub a, -17 (ix)
- jp NC, 00117$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:129: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
- ld e, -4 (ix)
- ld d, -3 (ix)
- ld a, c
- or a, a
- jr Z, 00138$
- ld e, -4 (ix)
- ld d, -3 (ix)
- inc de
- 00138$:
- sra d
- rr e
- ld l, -6 (ix)
- ld h, -5 (ix)
- add hl, de
- ld c, l
- ld b, h
- bit 7, h
- jr Z, 00139$
- ld bc, #0x7
- add hl,bc
- ld c, l
- ld a,h
- ld b,a
- 00139$:
- sra b
- rr c
- sra b
- rr c
- sra b
- rr c
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:130: u8 cellY = (pawn->TargetY) / 8;
- ld l, -12 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, -11 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- bit 7, -11 (ix)
- jr Z, 00140$
- ld l, -12 (ix)
- ld h, -11 (ix)
- ld de, #0x0007
- add hl, de
- 00140$:
- sra h
- rr l
- sra h
- rr l
- sra h
- rr l
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:131: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
- ld -3 (ix), l
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, #0x00
- ; spillPairReg hl
- ; spillPairReg hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- ld e, -10 (ix)
- ld d, -9 (ix)
- add hl, de
- ld b, #0x00
- add hl, bc
- call _VDP_Peek_16K
- ld c, a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:132: if(pawn->CollisionCB(tile))
- ld l, -8 (ix)
- ld h, -7 (ix)
- ld b, (hl)
- inc hl
- ld h, (hl)
- ; spillPairReg hl
- push bc
- ld a, c
- ld l, b
- ; spillPairReg hl
- ; spillPairReg hl
- call ___sdcc_call_hl
- pop bc
- or a, a
- jp Z, 00121$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:134: pawn->PhysicsCB(PAWN_PHYSICS_COL_UP, tile);
- ld e, -2 (ix)
- ld d, -1 (ix)
- ld hl, #19
- add hl, de
- ld e, (hl)
- inc hl
- ld d, (hl)
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- ld a, #0x01
- push de
- pop iy
- call ___sdcc_call_iy
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:135: pawn->TargetY = (cellY * 8) + 8;
- ld a, -3 (ix)
- add a, a
- add a, a
- add a, a
- add a, #0x08
- pop bc
- pop hl
- push hl
- push bc
- ld (hl), a
- jp 00121$
- 00117$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:140: u8 cellX = (pawn->TargetX + (pawn->BoundX / 2)) / 8;
- ld e, -4 (ix)
- ld d, -3 (ix)
- ld a, c
- or a, a
- jr Z, 00141$
- ld e, -4 (ix)
- ld d, -3 (ix)
- inc de
- 00141$:
- sra d
- rr e
- ld l, -6 (ix)
- ld h, -5 (ix)
- add hl, de
- ld c, l
- ld b, h
- bit 7, h
- jr Z, 00142$
- ld bc, #0x7
- add hl,bc
- ld c, l
- ld a,h
- ld b,a
- 00142$:
- sra b
- rr c
- sra b
- rr c
- sra b
- rr c
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:141: u8 cellY = (pawn->TargetY + pawn->BoundY) / 8;
- ld e, -2 (ix)
- ld d, -1 (ix)
- ld hl, #17
- add hl, de
- ld e, (hl)
- ld d, #0x00
- ld l, -12 (ix)
- ld h, -11 (ix)
- add hl, de
- ld e, l
- ld d, h
- bit 7, h
- jr Z, 00143$
- ld de, #0x7
- add hl, de
- ld e, l
- ld a,h
- ld d,a
- 00143$:
- sra d
- rr e
- sra d
- rr e
- sra d
- rr e
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:142: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
- ld l, e
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, #0x00
- ; spillPairReg hl
- ; spillPairReg hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- ld e, -10 (ix)
- ld d, -9 (ix)
- add hl, de
- ld b, #0x00
- add hl, bc
- call _VDP_Peek_16K
- ld c, a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:143: if(!pawn->CollisionCB(tile))
- ld l, -8 (ix)
- ld h, -7 (ix)
- ld e, (hl)
- inc hl
- ld d, (hl)
- push bc
- ld a, c
- ex de, hl
- call ___sdcc_call_hl
- pop bc
- or a, a
- jr NZ, 00121$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:145: pawn->PhysicsCB(PAWN_PHYSICS_FALL, tile);
- ld e, -2 (ix)
- ld d, -1 (ix)
- ld hl, #19
- add hl, de
- ld e, (hl)
- inc hl
- ld d, (hl)
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- ld a, #0x04
- push de
- pop iy
- call ___sdcc_call_iy
- 00121$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:150: if(pawn->TargetX > pawn->PositionX) // Go right
- ld l, -16 (ix)
- ld h, -15 (ix)
- ld a, (hl)
- ld -6 (ix), a
- ld a, -2 (ix)
- add a, #0x06
- ld -5 (ix), a
- ld a, -1 (ix)
- adc a, #0x00
- ld -4 (ix), a
- ld l, -5 (ix)
- ld h, -4 (ix)
- ld a, (hl)
- ld -3 (ix), a
- sub a, -6 (ix)
- jp NC, 00129$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:152: u8 cellX = (pawn->TargetX + pawn->BoundX) / 8;
- ld c, -6 (ix)
- ld b, #0x00
- ld l, -14 (ix)
- ld h, -13 (ix)
- ld l, (hl)
- ; spillPairReg hl
- ld h, #0x00
- ; spillPairReg hl
- ; spillPairReg hl
- add hl, bc
- ; spillPairReg hl
- ; spillPairReg hl
- ld c,l
- ld b,h
- ; spillPairReg hl
- ; spillPairReg hl
- bit 7, b
- jr Z, 00144$
- ld hl, #0x0007
- add hl, bc
- 00144$:
- sra h
- rr l
- sra h
- rr l
- sra h
- rr l
- ld -3 (ix), l
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:153: u8 cellY = (pawn->TargetY + (pawn->BoundY / 2)) / 8;
- ld l, -22 (ix)
- ld h, -21 (ix)
- ld c, (hl)
- ld b, #0x00
- ld e, -2 (ix)
- ld d, -1 (ix)
- ld hl, #17
- add hl, de
- ld e, (hl)
- ld d, #0x00
- ld l, e
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, d
- ; spillPairReg hl
- ; spillPairReg hl
- bit 7, d
- jr Z, 00145$
- ex de, hl
- inc hl
- 00145$:
- sra h
- rr l
- add hl, bc
- ; spillPairReg hl
- ; spillPairReg hl
- ld e, l
- ld d, h
- ; spillPairReg hl
- ; spillPairReg hl
- bit 7, d
- jr Z, 00146$
- ld hl, #0x0007
- add hl, de
- 00146$:
- sra h
- rr l
- sra h
- rr l
- sra h
- rr l
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:154: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
- ld h, #0x00
- ; spillPairReg hl
- ; spillPairReg hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- ld bc, (_g_ScreenLayoutLow)
- add hl, bc
- ld c, -3 (ix)
- ld b, #0x00
- add hl, bc
- call _VDP_Peek_16K
- ld e, a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:155: if(pawn->CollisionCB(tile))
- ld l, -8 (ix)
- ld h, -7 (ix)
- ld c, (hl)
- inc hl
- ld h, (hl)
- ; spillPairReg hl
- push de
- ld a, e
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- call ___sdcc_call_hl
- pop de
- or a, a
- jp Z, 00130$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:157: pawn->PhysicsCB(PAWN_PHYSICS_COL_RIGHT, tile);
- ld c, -2 (ix)
- ld b, -1 (ix)
- ld hl, #19
- add hl, bc
- ld c, (hl)
- inc hl
- ld b, (hl)
- ld l, e
- ; spillPairReg hl
- ; spillPairReg hl
- ld a, #0x02
- push bc
- pop iy
- call ___sdcc_call_iy
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:158: pawn->TargetX = (cellX * 8) - pawn->BoundX;
- ld a, -3 (ix)
- add a, a
- add a, a
- add a, a
- ld l, -14 (ix)
- ld h, -13 (ix)
- ld c, (hl)
- sub a, c
- ld l, -16 (ix)
- ld h, -15 (ix)
- ld (hl), a
- jp 00130$
- 00129$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:161: else if(pawn->TargetX < pawn->PositionX) // Go left
- ld a, -6 (ix)
- sub a, -3 (ix)
- jp NC, 00130$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:163: u8 cellX = (pawn->TargetX) / 8;
- ld c, -6 (ix)
- ld b, #0x00
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, b
- ; spillPairReg hl
- ; spillPairReg hl
- bit 7, b
- jr Z, 00147$
- ld hl, #0x0007
- add hl, bc
- 00147$:
- sra h
- rr l
- sra h
- rr l
- sra h
- rr l
- ld -3 (ix), l
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:164: u8 cellY = (pawn->TargetY + (pawn->BoundY / 2)) / 8;
- ld l, -22 (ix)
- ld h, -21 (ix)
- ld c, (hl)
- ld b, #0x00
- ld e, -2 (ix)
- ld d, -1 (ix)
- ld hl, #17
- add hl, de
- ld e, (hl)
- ld d, #0x00
- ld l, e
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, d
- ; spillPairReg hl
- ; spillPairReg hl
- bit 7, d
- jr Z, 00148$
- ex de, hl
- inc hl
- 00148$:
- sra h
- rr l
- add hl, bc
- ; spillPairReg hl
- ; spillPairReg hl
- ld e, l
- ld d, h
- ; spillPairReg hl
- ; spillPairReg hl
- bit 7, d
- jr Z, 00149$
- ld hl, #0x0007
- add hl, de
- 00149$:
- sra h
- rr l
- sra h
- rr l
- sra h
- rr l
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:165: u8 tile = VDP_Peek_16K(g_ScreenLayoutLow + (cellY * 32) + cellX);
- ld h, #0x00
- ; spillPairReg hl
- ; spillPairReg hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- ld bc, (_g_ScreenLayoutLow)
- add hl, bc
- ld c, -3 (ix)
- ld b, #0x00
- add hl, bc
- call _VDP_Peek_16K
- ld e, a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:166: if(pawn->CollisionCB(tile))
- ld l, -8 (ix)
- ld h, -7 (ix)
- ld c, (hl)
- inc hl
- ld h, (hl)
- ; spillPairReg hl
- push de
- ld a, e
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- call ___sdcc_call_hl
- pop de
- or a, a
- jr Z, 00130$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:168: pawn->PhysicsCB(PAWN_PHYSICS_COL_LEFT, tile);
- ld c, -2 (ix)
- ld b, -1 (ix)
- ld hl, #19
- add hl, bc
- ld c, (hl)
- inc hl
- ld b, (hl)
- ld l, e
- ; spillPairReg hl
- ; spillPairReg hl
- ld a, #0x03
- push bc
- pop iy
- call ___sdcc_call_iy
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:169: pawn->TargetX = (cellX * 8) + 8;
- ld a, -3 (ix)
- add a, a
- add a, a
- add a, a
- add a, #0x08
- ld l, -16 (ix)
- ld h, -15 (ix)
- ld (hl), a
- 00130$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:173: pawn->PositionX = pawn->TargetX;
- ld l, -16 (ix)
- ld h, -15 (ix)
- ld a, (hl)
- ld l, -5 (ix)
- ld h, -4 (ix)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:174: pawn->PositionY = pawn->TargetY;
- ld l, -22 (ix)
- ld h, -21 (ix)
- ld a, (hl)
- ld l, -19 (ix)
- ld h, -18 (ix)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:175: pawn->Update |= PAWN_UPDATE_POSITION;
- pop hl
- push hl
- ld a, (hl)
- set 0, a
- pop hl
- push hl
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:176: pawn->Update &= ~PAWN_UPDATE_COLLISION;
- res 4, a
- pop hl
- push hl
- ld (hl), a
- 00133$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:179: }
- ld sp, ix
- pop ix
- ret
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:187: void GamePawn_Draw(Game_Pawn* pawn)
- ; ---------------------------------
- ; Function GamePawn_Draw
- ; ---------------------------------
- _GamePawn_Draw::
- push ix
- ld ix,#0
- add ix,sp
- ld iy, #-19
- add iy, sp
- ld sp, iy
- ld c, l
- ld b, h
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:189: if(pawn->Update == 0)
- ld hl, #0x000c
- add hl, bc
- ex (sp), hl
- pop hl
- push hl
- ld a, (hl)
- or a, a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:190: return;
- jp Z,00121$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:192: const Game_Sprite* sprt = pawn->SpriteList;
- ld a, (bc)
- ld -3 (ix), a
- inc bc
- ld a, (bc)
- ld -2 (ix), a
- dec bc
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:193: u16 dest = g_SpriteAtributeLow + (pawn->SpriteID * 4);
- ld l, c
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, b
- ; spillPairReg hl
- ; spillPairReg hl
- inc hl
- inc hl
- inc hl
- ld l, (hl)
- ; spillPairReg hl
- ld h, #0x00
- ; spillPairReg hl
- ; spillPairReg hl
- add hl, hl
- add hl, hl
- ld de, (_g_SpriteAtributeLow)
- add hl, de
- ld -17 (ix), l
- ld -16 (ix), h
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:194: loop(i, pawn->SpriteNum)
- ld -15 (ix), c
- ld -14 (ix), b
- ld -13 (ix), c
- ld -12 (ix), b
- ld -11 (ix), c
- ld -10 (ix), b
- ld hl, #0x000d
- add hl, bc
- ld -9 (ix), l
- ld -8 (ix), h
- ld a, -9 (ix)
- ld -7 (ix), a
- ld a, -8 (ix)
- ld -6 (ix), a
- ld -5 (ix), c
- ld -4 (ix), b
- ld -1 (ix), #0x00
- 00119$:
- ld l, -5 (ix)
- ld h, -4 (ix)
- inc hl
- inc hl
- ld a,-1 (ix)
- sub a,(hl)
- jp NC, 00117$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:196: if(sprt->Flag & PAWN_SPRITE_EVEN) // Skip odd frames
- ld c, -3 (ix)
- ld b, -2 (ix)
- ld hl, #4
- add hl, bc
- ld c, (hl)
- bit 0, c
- jr Z, 00112$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:198: if((pawn->Counter & 1) != 0)
- ld l, -7 (ix)
- ld h, -6 (ix)
- ld a, (hl)
- rrca
- jp C,00116$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:201: pawn->Update |= PAWN_UPDATE_PATTERN;
- pop hl
- push hl
- ld a, (hl)
- set 1, a
- pop hl
- push hl
- ld (hl), a
- jp 00113$
- 00112$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:203: else if(sprt->Flag & PAWN_SPRITE_ODD) // Skip even frames
- bit 1, c
- jr Z, 00113$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:205: if((pawn->Counter & 1) == 0)
- ld l, -9 (ix)
- ld h, -8 (ix)
- ld a, (hl)
- rrca
- jp NC,00116$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:208: pawn->Update |= PAWN_UPDATE_PATTERN;
- pop hl
- push hl
- ld a, (hl)
- set 1, a
- pop hl
- push hl
- ld (hl), a
- 00113$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:211: g_Game_DrawY = pawn->PositionY + sprt->OffsetY;
- ld l, -13 (ix)
- ld h, -12 (ix)
- ld de, #0x0007
- add hl, de
- ld c, (hl)
- ld e, -3 (ix)
- ld d, -2 (ix)
- inc de
- ld a, (de)
- add a, c
- ld (_g_Game_DrawY+0), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:212: g_Game_DrawX = pawn->PositionX + sprt->OffsetX;
- ld l, -11 (ix)
- ld h, -10 (ix)
- ld de, #0x0006
- add hl, de
- ld c, (hl)
- ld l, -3 (ix)
- ld h, -2 (ix)
- ld a, (hl)
- add a, c
- ld (_g_Game_DrawX+0), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:213: u8 size = 2;
- ld c, #0x02
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:215: if(pawn->Update & PAWN_UPDATE_PATTERN)
- pop hl
- push hl
- bit 1, (hl)
- jr Z, 00115$
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:217: g_Game_DrawPattern = pawn->AnimFrame + sprt->DataOffset;
- ld l, -15 (ix)
- ld h, -14 (ix)
- ld de, #0x0009
- add hl, de
- ld a, (hl)
- ld l, -3 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, -2 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- inc hl
- inc hl
- ld c, (hl)
- add a, c
- ld (_g_Game_DrawPattern+0), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:218: size++;
- ld c, #0x03
- 00115$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:221: VDP_WriteVRAM((u8*)&g_Game_DrawY, dest, g_SpriteAtributeHigh, size);
- ld b, #0x00
- push bc
- ld l, -17 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- ld h, -16 (ix)
- ; spillPairReg hl
- ; spillPairReg hl
- push hl
- ld hl, #_g_Game_DrawY
- push hl
- call _VDP_WriteVRAM_16K
- ld hl, #6
- add hl, sp
- ld sp, hl
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:222: dest += 4;
- ld c, -17 (ix)
- ld b, -16 (ix)
- inc bc
- inc bc
- inc bc
- inc bc
- ld -17 (ix), c
- ld -16 (ix), b
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:224: SkipDrawing:
- 00116$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:225: sprt++;
- ld a, -3 (ix)
- add a, #0x05
- ld -3 (ix), a
- jr NC, 00170$
- inc -2 (ix)
- 00170$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:194: loop(i, pawn->SpriteNum)
- inc -1 (ix)
- jp 00119$
- 00117$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:227: pawn->Update = 0;
- pop hl
- push hl
- ld (hl), #0x00
- 00121$:
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:228: }
- ld sp, ix
- pop ix
- ret
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:234: void GamePawn_SetTargetPosition(Game_Pawn* pawn, u8 x, u8 y)
- ; ---------------------------------
- ; Function GamePawn_SetTargetPosition
- ; ---------------------------------
- _GamePawn_SetTargetPosition::
- ex de, hl
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:236: pawn->TargetX = x;
- ld hl, #0x000e
- add hl, de
- ld iy, #2
- add iy, sp
- ld a, 0 (iy)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:237: pawn->TargetY = y;
- ld hl, #0x000f
- add hl, de
- ld a, 1 (iy)
- inc iy
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:238: pawn->Update |= PAWN_UPDATE_COLLISION;
- ld hl, #0x000c
- add hl, de
- set 4, (hl)
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:239: }
- pop hl
- pop af
- jp (hl)
- ;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)
- ; ---------------------------------
- ; Function GamePawn_InitializePhysics
- ; ---------------------------------
- _GamePawn_InitializePhysics::
- push ix
- ld ix,#0
- add ix,sp
- ld c, l
- ld b, h
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:245: pawn->PhysicsCB = pcb;
- ld hl, #0x0013
- add hl, bc
- ld (hl), e
- inc hl
- ld (hl), d
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:246: pawn->CollisionCB = ccb;
- ld hl, #0x0015
- add hl, bc
- ld a, 4 (ix)
- ld (hl), a
- inc hl
- ld a, 5 (ix)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:247: pawn->BoundX = boundX;
- ld hl, #0x0010
- add hl, bc
- ld a, 6 (ix)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:248: pawn->BoundY = boundY;
- ld hl, #0x0011
- add hl, bc
- ld a, 7 (ix)
- ld (hl), a
- ;D:\Dev\Private\MSX\MSXgl\engine\src\game_pawn.c:249: }
- pop ix
- pop hl
- pop af
- pop af
- jp (hl)
- .area _CODE
- .area _INITIALIZER
- .area _CABS (ABS)
Editor
You can edit this paste and save as new: