Jump to content

nsn

New Members
  • Posts

    3
  • Joined

  • Last visited

nsn's Achievements

Combat Commando

Combat Commando (1/9)

0

Reputation

  1. First redefine your directions to start at 0 - saves a lot of unnecessary code and even more unnecessary religious discussions with LUA programmers Then create a table of pointers to your graphics: TBL_GFX_PTR_LO: .byte <(PlayerDirectionUpGraphic) .byte <(PlayerDirectionDownGraphic) .byte <(PlayerDirectionLeftGraphic) .byte <(PlayerDirectionRightGraphic) we need two bytes for a sprite pointer: PlayerGfxPtr ds 2 each frame we initialise said pointer (first HI- then LO-byte): lda #>(PlayerDirectionUpGraphic) sta PlayerGfxPtr+1 ldy PlayerDirection lda TBL_GFX_PTR_LO,y sta PlayerGfxPtr now, in our kernel, we can load from that pointer: lda (PlayerGfxPtr),y sta GRP0 (I'm writing this code from memory, be wary)
  2. OK, I'll just count frames then thanks for the quick answer!
  3. Hi! I need a second "gesture" in my game (to switch between different display modes), and I don't want players to have to reach for any of the h/w switches on the console - so I want to detect whenever the player presses the fire button for a significant duration (say 500ms?) Are there any best practices to do this? Preferably w/o using a byte of ram for counting frames? I'm using plain assembler, no bAtari basic thanks!
×
×
  • Create New...