]> git.sur5r.net Git - cc65/commitdiff
Moved the 'mousesprite' files from 'geos-cbm' to 'geos-common' which are believed...
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 4 Feb 2012 17:51:17 +0000 (17:51 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 4 Feb 2012 17:51:17 +0000 (17:51 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5443 b7a2c559-68d2-44c3-8de9-860c34a00d81

32 files changed:
libsrc/geos-cbm/Makefile
libsrc/geos-cbm/mousesprite/Makefile [deleted file]
libsrc/geos-cbm/mousesprite/clearmousemode.s [deleted file]
libsrc/geos-cbm/mousesprite/disablsprite.s [deleted file]
libsrc/geos-cbm/mousesprite/drawsprite.s [deleted file]
libsrc/geos-cbm/mousesprite/enablsprite.s [deleted file]
libsrc/geos-cbm/mousesprite/getnextchar.s [deleted file]
libsrc/geos-cbm/mousesprite/inittextprompt.s [deleted file]
libsrc/geos-cbm/mousesprite/ismseinregion.s [deleted file]
libsrc/geos-cbm/mousesprite/mouse.s [deleted file]
libsrc/geos-cbm/mousesprite/mouseoff.s [deleted file]
libsrc/geos-cbm/mousesprite/mouseup.s [deleted file]
libsrc/geos-cbm/mousesprite/possprite.s [deleted file]
libsrc/geos-cbm/mousesprite/promptoff.s [deleted file]
libsrc/geos-cbm/mousesprite/prompton.s [deleted file]
libsrc/geos-cbm/mousesprite/startmousemode.s [deleted file]
libsrc/geos-common/Makefile
libsrc/geos-common/mousesprite/Makefile [new file with mode: 0644]
libsrc/geos-common/mousesprite/clearmousemode.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/disablsprite.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/drawsprite.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/enablsprite.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/getnextchar.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/inittextprompt.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/ismseinregion.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/mouse.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/mouseoff.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/mouseup.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/possprite.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/promptoff.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/prompton.s [new file with mode: 0644]
libsrc/geos-common/mousesprite/startmousemode.s [new file with mode: 0644]

index 59d914fc69eedf7acc1f8708e78f8c852c615df2..057e07363a88f0f58ebd6793b352daaa814cce10 100644 (file)
@@ -50,7 +50,6 @@ DIRS =        common          \
        disk            \
        file            \
        memory          \
-       mousesprite     \
        process         \
        runtime         \
        system
diff --git a/libsrc/geos-cbm/mousesprite/Makefile b/libsrc/geos-cbm/mousesprite/Makefile
deleted file mode 100644 (file)
index f76ea33..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# makefile for CC65 runtime library
-#
-
-#--------------------------------------------------------------------------
-# Object files
-
-S_OBJS +=      startmousemode.o        \
-               clearmousemode.o        \
-               mouseup.o               \
-               mouseoff.o              \
-               drawsprite.o            \
-               possprite.o             \
-               enablsprite.o           \
-               disablsprite.o          \
-               ismseinregion.o         \
-               inittextprompt.o        \
-               promptoff.o             \
-               prompton.o              \
-               getnextchar.o           \
-               mouse.o
diff --git a/libsrc/geos-cbm/mousesprite/clearmousemode.s b/libsrc/geos-cbm/mousesprite/clearmousemode.s
deleted file mode 100644 (file)
index 17186cc..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 30.10.99
-
-; void ClearMouseMode (void);
-
-           .export _ClearMouseMode
-
-           .include "jumptab.inc"
-
-_ClearMouseMode = ClearMouseMode
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/disablsprite.s b/libsrc/geos-cbm/mousesprite/disablsprite.s
deleted file mode 100644 (file)
index 37625d3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 30.10.99
-
-; void DisablSprite (char spritenum);
-
-           .export _DisablSprite
-
-           .include "jumptab.inc"
-           .include "geossym.inc"
-
-_DisablSprite:
-           sta r3L
-           jmp DisablSprite
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/drawsprite.s b/libsrc/geos-cbm/mousesprite/drawsprite.s
deleted file mode 100644 (file)
index c5a071e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 30.10.99
-
-;
-; void DrawSprite (char spritenum, char *tab63 );
-;
-
-           .import popa
-           .export _DrawSprite
-
-           .include "jumptab.inc"
-           .include "geossym.inc"
-
-_DrawSprite:
-
-           sta r4L
-           stx r4H
-           jsr popa
-           sta r3L
-           jmp DrawSprite
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/enablsprite.s b/libsrc/geos-cbm/mousesprite/enablsprite.s
deleted file mode 100644 (file)
index 7c83284..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 30.10.99
-
-; void EnablSprite (char spritenum);
-
-           .export _EnablSprite
-
-           .include "jumptab.inc"
-           .include "geossym.inc"
-
-_EnablSprite:
-           sta r3L
-           jmp EnablSprite
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/getnextchar.s b/libsrc/geos-cbm/mousesprite/getnextchar.s
deleted file mode 100644 (file)
index 0ddbf1e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.1999, 2.1.2003
-
-; char GetNextChar (void);
-;      note that if it returns 0 (FALSE) then no characters are available
-
-           .export _GetNextChar
-
-           .include "jumptab.inc"
-
-_GetNextChar:
-           jsr GetNextChar
-           ldx #0
-           tay                 ; preserve Z flag
-           rts
diff --git a/libsrc/geos-cbm/mousesprite/inittextprompt.s b/libsrc/geos-cbm/mousesprite/inittextprompt.s
deleted file mode 100644 (file)
index 21c2135..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 21.12.99
-
-; void InitTextPrompt (char height);
-
-           .export _InitTextPrompt
-
-           .include "jumptab.inc"
-
-_InitTextPrompt        = InitTextPrompt
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/ismseinregion.s b/libsrc/geos-cbm/mousesprite/ismseinregion.s
deleted file mode 100644 (file)
index 554ca58..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 21.12.1999, 2.1.2003
-
-; char IsMseInRegion (struct window *mywindow);
-
-           .import _InitDrawWindow
-
-           .export _IsMseInRegion
-           
-           .include "jumptab.inc"
-
-_IsMseInRegion:
-           jsr _InitDrawWindow
-           jsr IsMseInRegion
-           ldx #0
-           rts
diff --git a/libsrc/geos-cbm/mousesprite/mouse.s b/libsrc/geos-cbm/mousesprite/mouse.s
deleted file mode 100644 (file)
index 1889c4f..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-;
-; Maciej 'YTM/Elysium' Witkowiak
-;
-; 2.7.2001
-;
-; Wrapper for GEOS standard input device interface
-;
-                                        
-       .export         _mouse_init, _mouse_done
-       .export         _mouse_hide, _mouse_show
-       .export         _mouse_box
-       .export         _mouse_pos, _mouse_info
-       .export         _mouse_move, _mouse_buttons
-
-               .import         popsreg, addysp1
-       .importzp       sp, sreg, ptr1
-
-       .include "const.inc"
-       .include "jumptab.inc"
-       .include "geossym.inc"
-
-
-.code
-
-; --------------------------------------------------------------------------
-;
-; unsigned char __fastcall__ mouse_init (unsigned char type);
-;
-
-_mouse_init:
-       jsr     StartMouseMode
-       jsr     MouseOff
-
-       lda     #0
-       sta     mouseTop
-       sta     mouseLeft
-       sta     mouseLeft+1
-.ifdef  __GEOS_CBM__
-       lda     #199
-       sta     mouseBottom
-       lda     graphMode
-       bpl     _mse_screen320
-
-       lda     #<639                   ; 80 columns on C128
-       ldx     #>639
-       bne     _mse_storex
-_mse_screen320:
-       lda     #<319                   ; 40 columns on C64/C128
-       ldx     #>319
-_mse_storex:
-.else
-       lda     #191
-       sta     mouseBottom
-       lda     #<559
-       ldx     #>559
-.endif
-       sta     mouseRight
-       stx     mouseRight+1
-_mse_initend:
-       lda     #0
-       tax
-; --------------------------------------------------------------------------
-;
-; void mouse_done (void);
-;
-_mouse_done:
-       rts
-
-; --------------------------------------------------------------------------
-;
-; void mouse_hide (void);
-;
-
-_mouse_hide = MouseOff
-
-; --------------------------------------------------------------------------
-;
-; void mouse_show (void);
-;
-
-_mouse_show = MouseUp
-
-; --------------------------------------------------------------------------
-;
-; void __fastcall__ mouse_box (int minx, int miny, int maxx, int maxy);
-;
-
-_mouse_box:
-       ldy     #0                      ; Stack offset
-
-       sta     mouseBottom
-
-       lda     (sp),y
-       sta     mouseRight
-       iny
-       lda     (sp),y
-       sta     mouseRight+1            ; maxx
-
-       iny
-       lda     (sp),y
-       sta     mouseTop
-       iny                             ; Skip high byte
-
-       iny
-       lda     (sp),y
-       sta     mouseLeft
-       iny
-       lda     (sp),y
-       sta     mouseLeft+1             ; minx
-
-       jmp     addysp1                 ; Drop params, return
-
-; --------------------------------------------------------------------------
-;
-; void __fastcall__ mouse_pos (struct mouse_pos* pos);
-; /* Return the current mouse position */
-;
-
-_mouse_pos:
-               sta     ptr1
-       stx     ptr1+1                  ; Remember the argument pointer
-
-       ldy     #0                      ; Structure offset
-
-        php
-        sei                            ; Disable interrupts
-
-               lda     mouseXPos               ; Transfer the position
-       sta     (ptr1),y
-       lda     mouseXPos+1
-       iny
-       sta     (ptr1),y
-       lda     mouseYPos
-       iny
-       sta     (ptr1),y
-       lda     #$00
-       iny
-       sta     (ptr1),y
-
-       plp                             ; Reenable interrupts
-       rts                             ; Done
-
-; --------------------------------------------------------------------------
-;
-; void __fastcall__ mouse_info (struct mouse_info* info);
-; /* Return the state of the mouse buttons and the position of the mouse */
-;
-
-_mouse_info:
-
-; We're cheating here to keep the code smaller: The first fields of the
-; mouse_info struct are identical to the mouse_pos struct, so we will just
-; call _mouse_pos to initialize the struct pointer and fill the position
-; fields.
-
-        jsr    _mouse_pos
-
-; Fill in the button state
-
-       jsr     _mouse_buttons          ; Will not touch ptr1
-       iny
-       sta     (ptr1),y
-
-       rts
-
-; --------------------------------------------------------------------------
-;
-; void __fastcall__ mouse_move (int x, int y);
-;
-
-_mouse_move:
-       jsr     popsreg                 ; Get X
-        php
-        sei                            ; Disable interrupts
-       sta     mouseYPos
-       lda     sreg
-       ldx     sreg+1
-       sta     mouseXPos
-       stx     mouseXPos+1
-       plp                             ; Enable interrupts
-       rts
-
-; --------------------------------------------------------------------------
-;
-; unsigned char mouse_buttons (void);
-;
-
-_mouse_buttons:
-       ldx     #0
-       lda     pressFlag
-       and     #SET_MOUSE
-       lsr
-       rts
-
diff --git a/libsrc/geos-cbm/mousesprite/mouseoff.s b/libsrc/geos-cbm/mousesprite/mouseoff.s
deleted file mode 100644 (file)
index 84f3470..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 30.10.99
-
-; void MouseOff (void);
-
-           .export _MouseOff
-
-           .include "jumptab.inc"
-
-_MouseOff = MouseOff
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/mouseup.s b/libsrc/geos-cbm/mousesprite/mouseup.s
deleted file mode 100644 (file)
index 08f831c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 30.10.99
-
-; void MouseUp (void);
-
-           .export _MouseUp
-
-           .include "jumptab.inc"
-
-_MouseUp = MouseUp
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/possprite.s b/libsrc/geos-cbm/mousesprite/possprite.s
deleted file mode 100644 (file)
index 1ffda37..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 30.10.99
-
-;
-; void PosSprite (char spritenum, struct pixel *position );
-;
-
-           .importzp ptr4
-           .import popa
-           .export _PosSprite
-
-           .include "jumptab.inc"
-           .include "geossym.inc"
-
-_PosSprite:
-           sta ptr4
-           stx ptr4+1
-           ldy #0
-           lda (ptr4),y
-           sta r4L
-           iny
-           lda (ptr4),y
-           sta r4H
-           iny
-           lda (ptr4),y
-           sta r5L
-           jsr popa
-           sta r3L
-           jmp PosSprite
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/promptoff.s b/libsrc/geos-cbm/mousesprite/promptoff.s
deleted file mode 100644 (file)
index 11088cb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 21.12.99
-
-; void PromptOff (void);
-
-           .export _PromptOff
-
-           .include "jumptab.inc"
-
-_PromptOff = PromptOff
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/prompton.s b/libsrc/geos-cbm/mousesprite/prompton.s
deleted file mode 100644 (file)
index 3de1b01..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 21.12.99
-
-; void PromptOn (struct pixel *);
-
-           .importzp ptr4
-           .export _PromptOn
-
-           .include "jumptab.inc"
-           .include "geossym.inc"
-
-_PromptOn:
-           sta ptr4
-           stx ptr4+1
-           ldy #0
-promptLp:   lda (ptr4),y
-           sta stringX,y
-           iny
-           cpy #3
-           bne promptLp
-           jmp PromptOn
\ No newline at end of file
diff --git a/libsrc/geos-cbm/mousesprite/startmousemode.s b/libsrc/geos-cbm/mousesprite/startmousemode.s
deleted file mode 100644 (file)
index cefde42..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-;
-; Maciej 'YTM/Alliance' Witkowiak
-;
-; 30.10.99
-
-; void StartMouseMode (void);
-
-           .export _StartMouseMode
-
-           .include "jumptab.inc"
-
-_StartMouseMode:
-           clc
-           jmp StartMouseMode
\ No newline at end of file
index be86b288f7d158605568b21b6789931cdbbbe0e3..7751ec811329575e17d0ca26b3543ca5e18ecbae 100644 (file)
@@ -33,7 +33,8 @@ DIRS =        dlgbox          \
        file            \
        graph           \
        memory          \
-       menuicon
+       menuicon        \
+       mousesprite
 
 #--------------------------------------------------------------------------
 # Directives
diff --git a/libsrc/geos-common/mousesprite/Makefile b/libsrc/geos-common/mousesprite/Makefile
new file mode 100644 (file)
index 0000000..f76ea33
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# makefile for CC65 runtime library
+#
+
+#--------------------------------------------------------------------------
+# Object files
+
+S_OBJS +=      startmousemode.o        \
+               clearmousemode.o        \
+               mouseup.o               \
+               mouseoff.o              \
+               drawsprite.o            \
+               possprite.o             \
+               enablsprite.o           \
+               disablsprite.o          \
+               ismseinregion.o         \
+               inittextprompt.o        \
+               promptoff.o             \
+               prompton.o              \
+               getnextchar.o           \
+               mouse.o
diff --git a/libsrc/geos-common/mousesprite/clearmousemode.s b/libsrc/geos-common/mousesprite/clearmousemode.s
new file mode 100644 (file)
index 0000000..17186cc
--- /dev/null
@@ -0,0 +1,13 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 30.10.99
+
+; void ClearMouseMode (void);
+
+           .export _ClearMouseMode
+
+           .include "jumptab.inc"
+
+_ClearMouseMode = ClearMouseMode
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/disablsprite.s b/libsrc/geos-common/mousesprite/disablsprite.s
new file mode 100644 (file)
index 0000000..37625d3
--- /dev/null
@@ -0,0 +1,16 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 30.10.99
+
+; void DisablSprite (char spritenum);
+
+           .export _DisablSprite
+
+           .include "jumptab.inc"
+           .include "geossym.inc"
+
+_DisablSprite:
+           sta r3L
+           jmp DisablSprite
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/drawsprite.s b/libsrc/geos-common/mousesprite/drawsprite.s
new file mode 100644 (file)
index 0000000..c5a071e
--- /dev/null
@@ -0,0 +1,23 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 30.10.99
+
+;
+; void DrawSprite (char spritenum, char *tab63 );
+;
+
+           .import popa
+           .export _DrawSprite
+
+           .include "jumptab.inc"
+           .include "geossym.inc"
+
+_DrawSprite:
+
+           sta r4L
+           stx r4H
+           jsr popa
+           sta r3L
+           jmp DrawSprite
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/enablsprite.s b/libsrc/geos-common/mousesprite/enablsprite.s
new file mode 100644 (file)
index 0000000..7c83284
--- /dev/null
@@ -0,0 +1,16 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 30.10.99
+
+; void EnablSprite (char spritenum);
+
+           .export _EnablSprite
+
+           .include "jumptab.inc"
+           .include "geossym.inc"
+
+_EnablSprite:
+           sta r3L
+           jmp EnablSprite
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/getnextchar.s b/libsrc/geos-common/mousesprite/getnextchar.s
new file mode 100644 (file)
index 0000000..0ddbf1e
--- /dev/null
@@ -0,0 +1,18 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.1999, 2.1.2003
+
+; char GetNextChar (void);
+;      note that if it returns 0 (FALSE) then no characters are available
+
+           .export _GetNextChar
+
+           .include "jumptab.inc"
+
+_GetNextChar:
+           jsr GetNextChar
+           ldx #0
+           tay                 ; preserve Z flag
+           rts
diff --git a/libsrc/geos-common/mousesprite/inittextprompt.s b/libsrc/geos-common/mousesprite/inittextprompt.s
new file mode 100644 (file)
index 0000000..21c2135
--- /dev/null
@@ -0,0 +1,13 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 21.12.99
+
+; void InitTextPrompt (char height);
+
+           .export _InitTextPrompt
+
+           .include "jumptab.inc"
+
+_InitTextPrompt        = InitTextPrompt
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/ismseinregion.s b/libsrc/geos-common/mousesprite/ismseinregion.s
new file mode 100644 (file)
index 0000000..554ca58
--- /dev/null
@@ -0,0 +1,19 @@
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 21.12.1999, 2.1.2003
+
+; char IsMseInRegion (struct window *mywindow);
+
+           .import _InitDrawWindow
+
+           .export _IsMseInRegion
+           
+           .include "jumptab.inc"
+
+_IsMseInRegion:
+           jsr _InitDrawWindow
+           jsr IsMseInRegion
+           ldx #0
+           rts
diff --git a/libsrc/geos-common/mousesprite/mouse.s b/libsrc/geos-common/mousesprite/mouse.s
new file mode 100644 (file)
index 0000000..1889c4f
--- /dev/null
@@ -0,0 +1,194 @@
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 2.7.2001
+;
+; Wrapper for GEOS standard input device interface
+;
+                                        
+       .export         _mouse_init, _mouse_done
+       .export         _mouse_hide, _mouse_show
+       .export         _mouse_box
+       .export         _mouse_pos, _mouse_info
+       .export         _mouse_move, _mouse_buttons
+
+               .import         popsreg, addysp1
+       .importzp       sp, sreg, ptr1
+
+       .include "const.inc"
+       .include "jumptab.inc"
+       .include "geossym.inc"
+
+
+.code
+
+; --------------------------------------------------------------------------
+;
+; unsigned char __fastcall__ mouse_init (unsigned char type);
+;
+
+_mouse_init:
+       jsr     StartMouseMode
+       jsr     MouseOff
+
+       lda     #0
+       sta     mouseTop
+       sta     mouseLeft
+       sta     mouseLeft+1
+.ifdef  __GEOS_CBM__
+       lda     #199
+       sta     mouseBottom
+       lda     graphMode
+       bpl     _mse_screen320
+
+       lda     #<639                   ; 80 columns on C128
+       ldx     #>639
+       bne     _mse_storex
+_mse_screen320:
+       lda     #<319                   ; 40 columns on C64/C128
+       ldx     #>319
+_mse_storex:
+.else
+       lda     #191
+       sta     mouseBottom
+       lda     #<559
+       ldx     #>559
+.endif
+       sta     mouseRight
+       stx     mouseRight+1
+_mse_initend:
+       lda     #0
+       tax
+; --------------------------------------------------------------------------
+;
+; void mouse_done (void);
+;
+_mouse_done:
+       rts
+
+; --------------------------------------------------------------------------
+;
+; void mouse_hide (void);
+;
+
+_mouse_hide = MouseOff
+
+; --------------------------------------------------------------------------
+;
+; void mouse_show (void);
+;
+
+_mouse_show = MouseUp
+
+; --------------------------------------------------------------------------
+;
+; void __fastcall__ mouse_box (int minx, int miny, int maxx, int maxy);
+;
+
+_mouse_box:
+       ldy     #0                      ; Stack offset
+
+       sta     mouseBottom
+
+       lda     (sp),y
+       sta     mouseRight
+       iny
+       lda     (sp),y
+       sta     mouseRight+1            ; maxx
+
+       iny
+       lda     (sp),y
+       sta     mouseTop
+       iny                             ; Skip high byte
+
+       iny
+       lda     (sp),y
+       sta     mouseLeft
+       iny
+       lda     (sp),y
+       sta     mouseLeft+1             ; minx
+
+       jmp     addysp1                 ; Drop params, return
+
+; --------------------------------------------------------------------------
+;
+; void __fastcall__ mouse_pos (struct mouse_pos* pos);
+; /* Return the current mouse position */
+;
+
+_mouse_pos:
+               sta     ptr1
+       stx     ptr1+1                  ; Remember the argument pointer
+
+       ldy     #0                      ; Structure offset
+
+        php
+        sei                            ; Disable interrupts
+
+               lda     mouseXPos               ; Transfer the position
+       sta     (ptr1),y
+       lda     mouseXPos+1
+       iny
+       sta     (ptr1),y
+       lda     mouseYPos
+       iny
+       sta     (ptr1),y
+       lda     #$00
+       iny
+       sta     (ptr1),y
+
+       plp                             ; Reenable interrupts
+       rts                             ; Done
+
+; --------------------------------------------------------------------------
+;
+; void __fastcall__ mouse_info (struct mouse_info* info);
+; /* Return the state of the mouse buttons and the position of the mouse */
+;
+
+_mouse_info:
+
+; We're cheating here to keep the code smaller: The first fields of the
+; mouse_info struct are identical to the mouse_pos struct, so we will just
+; call _mouse_pos to initialize the struct pointer and fill the position
+; fields.
+
+        jsr    _mouse_pos
+
+; Fill in the button state
+
+       jsr     _mouse_buttons          ; Will not touch ptr1
+       iny
+       sta     (ptr1),y
+
+       rts
+
+; --------------------------------------------------------------------------
+;
+; void __fastcall__ mouse_move (int x, int y);
+;
+
+_mouse_move:
+       jsr     popsreg                 ; Get X
+        php
+        sei                            ; Disable interrupts
+       sta     mouseYPos
+       lda     sreg
+       ldx     sreg+1
+       sta     mouseXPos
+       stx     mouseXPos+1
+       plp                             ; Enable interrupts
+       rts
+
+; --------------------------------------------------------------------------
+;
+; unsigned char mouse_buttons (void);
+;
+
+_mouse_buttons:
+       ldx     #0
+       lda     pressFlag
+       and     #SET_MOUSE
+       lsr
+       rts
+
diff --git a/libsrc/geos-common/mousesprite/mouseoff.s b/libsrc/geos-common/mousesprite/mouseoff.s
new file mode 100644 (file)
index 0000000..84f3470
--- /dev/null
@@ -0,0 +1,13 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 30.10.99
+
+; void MouseOff (void);
+
+           .export _MouseOff
+
+           .include "jumptab.inc"
+
+_MouseOff = MouseOff
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/mouseup.s b/libsrc/geos-common/mousesprite/mouseup.s
new file mode 100644 (file)
index 0000000..08f831c
--- /dev/null
@@ -0,0 +1,13 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 30.10.99
+
+; void MouseUp (void);
+
+           .export _MouseUp
+
+           .include "jumptab.inc"
+
+_MouseUp = MouseUp
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/possprite.s b/libsrc/geos-common/mousesprite/possprite.s
new file mode 100644 (file)
index 0000000..1ffda37
--- /dev/null
@@ -0,0 +1,32 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 30.10.99
+
+;
+; void PosSprite (char spritenum, struct pixel *position );
+;
+
+           .importzp ptr4
+           .import popa
+           .export _PosSprite
+
+           .include "jumptab.inc"
+           .include "geossym.inc"
+
+_PosSprite:
+           sta ptr4
+           stx ptr4+1
+           ldy #0
+           lda (ptr4),y
+           sta r4L
+           iny
+           lda (ptr4),y
+           sta r4H
+           iny
+           lda (ptr4),y
+           sta r5L
+           jsr popa
+           sta r3L
+           jmp PosSprite
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/promptoff.s b/libsrc/geos-common/mousesprite/promptoff.s
new file mode 100644 (file)
index 0000000..11088cb
--- /dev/null
@@ -0,0 +1,13 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 21.12.99
+
+; void PromptOff (void);
+
+           .export _PromptOff
+
+           .include "jumptab.inc"
+
+_PromptOff = PromptOff
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/prompton.s b/libsrc/geos-common/mousesprite/prompton.s
new file mode 100644 (file)
index 0000000..3de1b01
--- /dev/null
@@ -0,0 +1,24 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 21.12.99
+
+; void PromptOn (struct pixel *);
+
+           .importzp ptr4
+           .export _PromptOn
+
+           .include "jumptab.inc"
+           .include "geossym.inc"
+
+_PromptOn:
+           sta ptr4
+           stx ptr4+1
+           ldy #0
+promptLp:   lda (ptr4),y
+           sta stringX,y
+           iny
+           cpy #3
+           bne promptLp
+           jmp PromptOn
\ No newline at end of file
diff --git a/libsrc/geos-common/mousesprite/startmousemode.s b/libsrc/geos-common/mousesprite/startmousemode.s
new file mode 100644 (file)
index 0000000..cefde42
--- /dev/null
@@ -0,0 +1,15 @@
+
+;
+; Maciej 'YTM/Alliance' Witkowiak
+;
+; 30.10.99
+
+; void StartMouseMode (void);
+
+           .export _StartMouseMode
+
+           .include "jumptab.inc"
+
+_StartMouseMode:
+           clc
+           jmp StartMouseMode
\ No newline at end of file