0 Members and 2 Guests are viewing this topic.
arrays filled with "switches"(basically if it's on, 1. If it's off, 0) will help you a lot. Also, something dynamic, like chests, could be drawn over tilemap based on the "event switch" is 0 or 1.
saveSScreen equ 86EChasm_prgm_size equ 89EChbstCounter equ 89EEhflags equ 89F0h
#define b_(bit) bit&7#define f_(flag) -flag/$10 - 4#define bit_(flag) bit b_(flag), (ix + f_(flag))#define set_(flag) set b_(flag), (ix + f_(flag))#define res_(flag) res b_(flag), (ix + f_(flag))#macro toggle_(flag) ld a, (ix + f_(flag)) xor 1 << b_(flag) ld (ix + f_(flag)), a#endmacro
flag0 equ $00flag1 equ $01blah equ $02blahh equ $03flag4 equ $04flag5 equ $05flag6 equ $06flag7 equ $07flag8 equ $10
set_(flag1)
Brushes: .dw grass .dw path .dw door_bookshop .dw sign_hanginggrass: .db %00000000 .db 0path: .db %00000000 .db 1door_bookshop: .db %01000010 .db 24 .db 1 ;action#, 1 = change map .db 5,7,1 ;starting x/y coords, map#sign_hanging: .db %10000110 .db 32 .db 14 .db 12 .db 0 .dw text1
sign_hanging: .db %10000110 ;action when hit with 2nd, variable height, nonpassable .db 32 ;sprite id .db 14 ;how far behind the sprite we can walk .db 12 ;sprite mask .db 0 ;action id, 0 = draw text, 1 = change map .dw text1 ;action data, in this case text label
sign_hanging: .db %10011110 ;change sprite/event based on event id .db 0 ;event id .db 32 ;sprite id .db 75 ;sprite id if event has run .db 14 ;how far behind the sprite we can walk .db 12 ;sprite mask .db 0 ;action id, 0 = draw text, 1 = change map .dw text1 ;action data, in this case text label .db 1 ;action id if event has been run .db 4,4,1 ;new action data