mirror of
https://github.com/dwsJason/gslaplay.git
synced 2024-11-26 17:49:39 +00:00
Fix issue with menu bar corruption, after you stop playing an animation
This commit is contained in:
parent
1161e5cb9d
commit
e09867f2aa
87
asm/shell.s
87
asm/shell.s
@ -6,6 +6,8 @@
|
|||||||
*
|
*
|
||||||
* Updated for Merlin 32 07/11/2020
|
* Updated for Merlin 32 07/11/2020
|
||||||
*
|
*
|
||||||
|
* play.s contains the interesting bits of the code
|
||||||
|
*
|
||||||
|
|
||||||
* OA-F "damnmenu" to find menu definitions
|
* OA-F "damnmenu" to find menu definitions
|
||||||
*
|
*
|
||||||
@ -32,9 +34,6 @@ vidmode = $8080 ;Video mode for QD II (320) ($8000)
|
|||||||
|
|
||||||
tool equ $e10000
|
tool equ $e10000
|
||||||
|
|
||||||
iobuff equ $80
|
|
||||||
|
|
||||||
textlength equ 38 ;max length of text
|
|
||||||
|
|
||||||
startup ent
|
startup ent
|
||||||
mx %00
|
mx %00
|
||||||
@ -70,17 +69,6 @@ SetRes sep $30 ; 8-bit mode
|
|||||||
;
|
;
|
||||||
stz <banks_count
|
stz <banks_count
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PushLong #0 ;result space
|
|
||||||
lda ProgID ;user ID
|
|
||||||
pha
|
|
||||||
pea #$0 ;reference by handle
|
|
||||||
PushLong #startref
|
|
||||||
ldx #$1801 ;startuptools
|
|
||||||
jsl $e10000
|
|
||||||
PullLong stref
|
|
||||||
|
|
||||||
;-------------------------------------------------------------------------------
|
;-------------------------------------------------------------------------------
|
||||||
PushLong #0 ; Compact Memory
|
PushLong #0 ; Compact Memory
|
||||||
PushLong #$8fffff
|
PushLong #$8fffff
|
||||||
@ -93,6 +81,21 @@ SetRes sep $30 ; 8-bit mode
|
|||||||
jsl tool ; DisposeHandle
|
jsl tool ; DisposeHandle
|
||||||
ldx #$1F02
|
ldx #$1F02
|
||||||
jsl tool ; CompactMem
|
jsl tool ; CompactMem
|
||||||
|
|
||||||
|
;-------------------------------------------------------------------------------
|
||||||
|
;
|
||||||
|
; Startup Way too many Tools
|
||||||
|
;
|
||||||
|
|
||||||
|
PushLong #0 ;result space
|
||||||
|
lda ProgID ;user ID
|
||||||
|
pha
|
||||||
|
pea #$0 ;reference by handle
|
||||||
|
PushLong #startref
|
||||||
|
ldx #$1801 ;startuptools
|
||||||
|
jsl $e10000
|
||||||
|
PullLong stref
|
||||||
|
|
||||||
;-------------------------------------------------------------------------------
|
;-------------------------------------------------------------------------------
|
||||||
; I'm pretty sure one of the tools is allocating this out from under me
|
; I'm pretty sure one of the tools is allocating this out from under me
|
||||||
;
|
;
|
||||||
@ -140,23 +143,20 @@ backhandle dw 0,0
|
|||||||
*
|
*
|
||||||
|
|
||||||
DoMenu
|
DoMenu
|
||||||
ldx #$0001
|
; ldx #$0001
|
||||||
lda #$0000
|
; lda #$0000
|
||||||
jsr getmem
|
; jsr getmem
|
||||||
bcc :ov3
|
; bcc :ov3
|
||||||
brl ShutDown
|
; brl ShutDown
|
||||||
:ov3 ;handle in a and x
|
;:ov3 ;handle in a and x
|
||||||
jsl dereference
|
; jsl dereference
|
||||||
|
;
|
||||||
sta p:rbuf ; set up Disk I/O buffer
|
; sta p:rbuf ; set up Disk I/O buffer
|
||||||
sta iobuff
|
; txa
|
||||||
txa
|
; sta p:rbuf+2
|
||||||
sta p:rbuf+2
|
;
|
||||||
sta iobuff+2
|
; ; A contains bank address to add
|
||||||
|
; jsr AddBank
|
||||||
; A contains bank address to add
|
|
||||||
jsr AddBank
|
|
||||||
|
|
||||||
|
|
||||||
* PushLong #0
|
* PushLong #0
|
||||||
* PushPtr ExampleM
|
* PushPtr ExampleM
|
||||||
@ -193,7 +193,6 @@ DoMenu
|
|||||||
|
|
||||||
_InitCursor
|
_InitCursor
|
||||||
|
|
||||||
;JSR DoAbout ; Show this to the user before we get going...
|
|
||||||
JSR DoOpen
|
JSR DoOpen
|
||||||
|
|
||||||
* Command Processor
|
* Command Processor
|
||||||
@ -222,6 +221,7 @@ GetEvent
|
|||||||
sbc #250 ;Reduce to 0 and
|
sbc #250 ;Reduce to 0 and
|
||||||
asl ; double to find
|
asl ; double to find
|
||||||
tax ; index into table.
|
tax ; index into table.
|
||||||
|
|
||||||
jsr (Cmds,X)
|
jsr (Cmds,X)
|
||||||
|
|
||||||
PushWord #0
|
PushWord #0
|
||||||
@ -410,7 +410,7 @@ Cmds
|
|||||||
|
|
||||||
da DoAbout ;This starts OUR items. (#256)
|
da DoAbout ;This starts OUR items. (#256)
|
||||||
|
|
||||||
da DoOpen
|
da DoOpenFromMenu
|
||||||
da ShutDown
|
da ShutDown
|
||||||
|
|
||||||
*
|
*
|
||||||
@ -503,6 +503,7 @@ AboutTemplate
|
|||||||
adrl 0
|
adrl 0
|
||||||
:Item1Txt str ' Ok '
|
:Item1Txt str ' Ok '
|
||||||
|
|
||||||
|
DoOpenFromMenu
|
||||||
DoOpen
|
DoOpen
|
||||||
pea #30 ;x of upper left corner
|
pea #30 ;x of upper left corner
|
||||||
pea #40 ;y of upper left corner
|
pea #40 ;y of upper left corner
|
||||||
@ -754,7 +755,7 @@ PlayAnimation mx %00
|
|||||||
; Pointer to the INITial Frame Data
|
; Pointer to the INITial Frame Data
|
||||||
lda <banks_data
|
lda <banks_data
|
||||||
and #$00FF
|
and #$00FF
|
||||||
sta $FE
|
sta <pData+2
|
||||||
|
|
||||||
ldx #28 ; Header of file + Header of INIT Frame
|
ldx #28 ; Header of file + Header of INIT Frame
|
||||||
|
|
||||||
@ -819,6 +820,7 @@ PlayAnimation mx %00
|
|||||||
; Redraw the Screen
|
; Redraw the Screen
|
||||||
;
|
;
|
||||||
Tool $2a0f ; DrawMenuBar
|
Tool $2a0f ; DrawMenuBar
|
||||||
|
|
||||||
PushLong #0
|
PushLong #0
|
||||||
Tool $390E ; RefreshDesktop
|
Tool $390E ; RefreshDesktop
|
||||||
|
|
||||||
@ -835,12 +837,12 @@ EndOfAnimFrame ent
|
|||||||
:check_key
|
:check_key
|
||||||
pha
|
pha
|
||||||
PushWord #$000A ; only mousedown, or keydown
|
PushWord #$000A ; only mousedown, or keydown
|
||||||
PushPtr TaskRecord
|
PushPtr :TaskRecord ; NOTE: using our own local record
|
||||||
_TaskMaster
|
_TaskMaster
|
||||||
pla
|
pla
|
||||||
beq :no_action
|
beq :no_action
|
||||||
|
|
||||||
lda tType
|
lda :tType
|
||||||
cmp #1
|
cmp #1
|
||||||
beq :mousedown
|
beq :mousedown
|
||||||
cmp #3
|
cmp #3
|
||||||
@ -870,6 +872,17 @@ EndOfAnimFrame ent
|
|||||||
; Animation has been interrupted
|
; Animation has been interrupted
|
||||||
sec
|
sec
|
||||||
rtl
|
rtl
|
||||||
|
;
|
||||||
|
; We don't want to corrupt the original TaskRecord
|
||||||
|
;
|
||||||
|
:TaskRecord
|
||||||
|
:tType ds 2 ;Event code
|
||||||
|
:tMessage ds 4 ;Type of Event
|
||||||
|
:tWhen ds 4 ;Time since startup
|
||||||
|
:tWhere ds 4 ;Mouse Location
|
||||||
|
:tMod ds 2 ;Event modifier
|
||||||
|
:TaskData ds 4 ;Taskmaster Data
|
||||||
|
:TaskMask adrl $00001FFF ;Taskmaster Handle All
|
||||||
|
|
||||||
DoUndo
|
DoUndo
|
||||||
DoCut
|
DoCut
|
||||||
@ -925,4 +938,4 @@ FreeBanks mx %00
|
|||||||
:done
|
:done
|
||||||
rts
|
rts
|
||||||
|
|
||||||
rts
|
********************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user