]> git.sur5r.net Git - cc65/blobdiff - libsrc/geos/dlgbox/dlgboxfileselect.s
Return 0 if color not found
[cc65] / libsrc / geos / dlgbox / dlgboxfileselect.s
index 8efc4477272b941914175f8262441de7c688fd47..92f97848ed5236d3e1e42768970384f676b95c5b 100644 (file)
@@ -1,6 +1,6 @@
 
 ;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
 ;
 ; 25.12.99
 
@@ -8,20 +8,16 @@
 
                .export _DlgBoxFileSelect
                .import popa, popax
+               .import _DoDlgBox
 
                .include "../inc/jumptab.inc"
                .include "../inc/geossym.inc"
                .include "../inc/const.inc"
                .include "../inc/geosmac.ca65.inc"
 
+.code
+
 _DlgBoxFileSelect:
-;          sta r5L
-;          stx r5H
-;          jsr popa
-;          sta r7L
-;          jsr popax
-;          sta r10L
-;          stx r10H
 
                sta tmp_r5
                stx tmp_r5+1
@@ -38,10 +34,7 @@ DB_FS_reload:
 
                lda #<paramStrFileSelect
                ldx #>paramStrFileSelect
-               sta r0L
-               stx r0H
-               jsr DoDlgBox
-               lda r0L
+               jsr _DoDlgBox
                cmp #DISK
                bne DB_FS_Fin
                jsr OpenDisk
@@ -49,6 +42,8 @@ DB_FS_reload:
                beq DB_FS_reload
 DB_FS_Fin:     rts
 
+.rodata
+
 paramStrFileSelect:
                .byte DEF_DB_POS | 1
                .byte DBGETFILES, 4, 4
@@ -57,6 +52,8 @@ paramStrFileSelect:
                .byte CANCEL, DBI_X_2, DBI_Y_0+64+3
                .byte NULL
 
-tmp_r5:                .word 0
-tmp_r7L:       .byte 0
-tmp_r10:       .word 0
+.bss
+
+tmp_r5:                .res 2
+tmp_r7L:       .res 1
+tmp_r10:       .res 2