Code: Select all
lda #$0004
sta NewObjectRequest
jsr start_object_spawner
Code: Select all
lda bullet
sta NewObjectRequest
jsr start_object_spawner
Moderator: Moderators
Code: Select all
lda #$0004
sta NewObjectRequest
jsr start_object_spawner
Code: Select all
lda bullet
sta NewObjectRequest
jsr start_object_spawner
Should be lda #bullet, but other than that the syntax for equates is exactly as you said.Espozo wrote:Is this possible to do in ca65?Code: Select all
lda bullet sta NewObjectRequest jsr start_object_spawner
Code: Select all
.enum ObjectType
cake
waldo
bullet
.endenum
lda #ObjectType::cake ; loads 0
lda #ObjectType::bullet ; loads 2
Serious answers plea... Oh wait, never mind. I was confused because I didn't use a #, which thefox pointed out. You know, what is the game loading if you don't use a #? I tried it and it crashed because it must point to some place I don't want it to. I like that you can do something like that. It's so obvious that it's unobvious, unless there is some sort of "standard" for defining things.KungFuFurby wrote:Sure it is! Simply put in a line somewhere saying...bullet = 4
Code: Select all
.macro Spawn spawntype
lda #spawntype
sta NewObjectRequest
jsr start_objects_spawner
.endmacro
; you can now do this with a 1 line statement
Spawn bullet