How are you accomplishing these graphics? They look super cool, but I read that RPG Maker 2003 is for 2D graphics.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Juju on July 25, 2018, 06:37:36 PM
Looks nice, reminds me of some Mario games for some reason. Gonna make a TTF of it?
.nolist
#include "ti84pce.inc"
.list
.org UserMem-2
.db tExtTok, tAsm84CeCmp
call _boot_ClearVRAM
call _RunIndicOff
ld de, $0050; de holds x coord
ld c, $50; y coord stored in c
mainLoop:
ld a, 1 ; draw
call draw
call keyWait
push af ; dammit I love this trick.
ld a, 0 ; erase
call draw
pop af
call move
ld a, b; if b is zero, we stop.
or a, a
jr z, quit ; relative jump is shorter, byte-wise
jr mainLoop
quit:
call _RunIndicOn
ret
draw: ; draws our singular pixel (I set high goals)
; (whew this is a bit of work, it gave me lots of appreciation for the sprite routines others have made :P)
; we are using 16bpp mode here, so my routines
; (which are gently modified 8bpp routines) can
; probably be optimized
; takes input in a: 1 = draw the pixel, 0 = erase
push bc ; save c onto the stack (as part of bc)
ld b, 160d
mlt bc ; this messes with c
push bc ; thanks, Mateo
pop hl
add hl, hl ; hl * 2
add hl, hl ; hl * 4 (2 bytes/pixel)
add hl, de
add hl, de ; hl += de * 2
ld bc, vRam ; this also messes with c
add hl, bc
ld (hl), $ff ; byte 1
inc hl
or a, a
jr z, _erase
_draw: ; label not needed, included for legibility.
ld (hl), $00 ; byte 2
jr _end
_erase:
ld (hl), $ff ; byte 2
_end:
pop bc ; restore bc (particularly c)
ret
keyWait: ; waits for a key, keycode returned in a
call _GetCSC ; get key codes
or a, a; check scan codes by comparing a with itself (I got this "hack" from various routines, it is super clever)
ret nz ; if a is not zero, return
jr keyWait ; otherwise jump (relative jump saves bytes, according to my highly scientific testing)
move: ; input in a (getCSC code)
; moves the pixel by updating
; de (x coord) and c (y coord)
; nothing overly arcane happens
; I used to check if a was >= 5 or equal to skDel
; but my code caused bugs so I killed it (and the bugs)
ld b, 1 ; we will set b to 0 if we want to quit
chk_Quit: ; label not used, but it increases legibility and does not harm anything (imho)
cp skDel
jp nz, chk_Down
ld b, 0 ; we want to quit
ret
chk_Down:
cp skDown
jp nz, chk_Left
inc c
ret
chk_Left:
cp skLeft
jp nz, chk_Right
dec de
ret
chk_Right:
cp skRight
jp nz, chk_Up
inc de
ret
chk_Up:
cp skUp
ret nz
dec c
ret
Page created in 0.092 seconds with 31 queries.