mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-04 04:31:04 +00:00
1 line
17 KiB
Plaintext
1 line
17 KiB
Plaintext
|
************************************************************************
* *
* GAME SYSTEM //e *
* --------------- *
* *
* (c) Atreid Concept SA Version 0.2 02/03/91 *
************************************************************************
************************************************************************
GSInit anop
rts
************************************************************************
ReadMouse anop ;a --> 0 : pas d'info souris
anop ;a --> $80
anop ;==> Mx--> coor X My--> coor Y
anop ; MBut--> bouton
RMDone rts
Mx ds 1
My ds 1
MBut ds 1
MBut2 ds 1
************************************************************************
PaintRect anop ;GSTemp1 = coor. x / 7
anop ;GSTemp1+1= coor. y
anop ;GSTemp2 = dep relatif x / 7
anop ;GSTemp2+1= dep relatif y
anop ;GSTemp3 = couleur
ldx #0
PR1 anop
ldy GSTemp1+1 ;coor y
lda Adrlo,y
clc
adc GSTemp1 ;coor x
sta <$50
lda Adrhi,y
clc
adc PageHGR
sta <$51
lda GSTemp3 ;couleur
ldy #0
PR2 anop
sta ($50),y
iny
cpy GSTemp2 ;dep x
bne PR2
inc GSTemp1+1
inx
cpx GSTemp2+1 ;dep y
bne PR1
rts
************************************************************************
ClearHGR anop ;a=0 : hgr 1 a=1: hgr2
cmp #0
bne ClearHGR2
lda #$20
sta ClearHGRLoop+2
bne ClearHGR0
ClearHGR2 anop
lda #$40
sta ClearHGRLoop+2
ClearHGR0 lda #0
tay
ClearHGRLoop sta $2000
inc ClearHGRLoop+1
bne ClearHGRLoop
inc ClearHGRLoop+2
iny
cpy #32
bne ClearHGRLoop
rts
************************************************************************
Swap anop ;a=0 : hgr 1 a=1: hgr2
cmp #0
bne SwapHgr2
lda #0
sta $c054
rts
SwapHGR2 anop
lda #0
sta $c055
rts
************************************************************************
WaitUser anop ;--> a= caractere tape
anop ; 0 si clic ou fire
lda #0
lda $c024
sta $c010 ;echantillonne clavier
WULoop anop
jsr Random ;amorce...
lda $C000 ;teste touche
bmi WUDone1
lda $C061 ;teste fire 0
bmi WUDone
lda $C062 ;teste fire 1
bmi WUDone
lda $C027 ;teste clic souris
bpl WULoop
and #%00000010
bne WULoop2
lda $C024
lda $C024
bmi WULoop
bpl WUDone
WULoop2 anop
lda $C024
jmp WULoop
WUDone anop
lda #0
rts
WU
|