Add assemblers to game loop, added tile list
This commit is contained in:
parent
720114468c
commit
2c39045b00
|
@ -1,3 +1,4 @@
|
|||
*.o
|
||||
*.list
|
||||
*.map
|
||||
bin/
|
||||
|
|
21
src/main.asm
21
src/main.asm
|
@ -38,8 +38,13 @@ ckconv: cmp #02 ; Check if it is one of the three conveyor positions
|
|||
beq upconv
|
||||
cmp #06
|
||||
beq upconv2 ; Jump if it needs to be reset
|
||||
ckasmb:
|
||||
inx
|
||||
ckasmb: cmp #14
|
||||
beq upassm
|
||||
cmp #16
|
||||
beq upassm
|
||||
cmp #18
|
||||
beq upassm2
|
||||
footer: inx
|
||||
cpx #100
|
||||
bne update1
|
||||
rts
|
||||
|
@ -47,12 +52,20 @@ ckasmb:
|
|||
upconv: clc ; Add 2 to the tile type, moving it forward 1.
|
||||
adc #02
|
||||
sta World,x
|
||||
jmp ckasmb
|
||||
jmp footer
|
||||
|
||||
upconv2:lda #02 ; Set the tile type back to 2, reseting it.
|
||||
sta World,x
|
||||
jmp ckasmb
|
||||
jmp footer
|
||||
|
||||
upassm: clc
|
||||
adc #02
|
||||
sta World,x
|
||||
jmp footer
|
||||
|
||||
upassm2:lda #14
|
||||
sta World,x
|
||||
jmp footer
|
||||
|
||||
_delay: ; Delay loop just adds a bunch of numbers
|
||||
lda #00 ; together to waste time.
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
; Each time a new tile is created, it's label is added to the TILES section to be
|
||||
; referenced to in the world array and drawn in the drawing loop.
|
||||
|
||||
TILES:
|
||||
TILES: ; A list of all of them is in the .inc file.
|
||||
.word GRASS, CONVEYOR1_1, CONVEYOR1_2, CONVEYOR1_3
|
||||
.word INSERTER1_1, INSERTER1_2, INSERTER1_3,ASSEMBLER1_1
|
||||
.word ASSEMBLER1_2, ASSEMBLER1_3
|
||||
|
|
|
@ -1 +1,14 @@
|
|||
.import TILES
|
||||
.import TILES
|
||||
|
||||
; TILES listing
|
||||
;
|
||||
; 00 - Grass
|
||||
; 02 - Conveyor 1 1
|
||||
; 04 - Conveyor 1 2
|
||||
; 06 - Conveyor 1 3
|
||||
; 08 - Inserter 1 1
|
||||
; 10 - Inserter 1 2
|
||||
; 12 - Inserter 1 3
|
||||
; 14 - Assembler1 1
|
||||
; 16 - Assembler1 2
|
||||
; 18 - Assembler1 3
|
Loading…
Reference in New Issue