Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My demos in Windows XP...
#5
MystikShadows, thanks again for your reply! Smile

If DirectQB is not the culprit of my fourth demo then maybe that old asm mouse program is it:

Quote:DECLARE SUB Delay (Time AS SINGLE)
DECLARE FUNCTION MouseButtons% ()
DECLARE FUNCTION MouseChoice% ()
DECLARE SUB MouseHide ()
DECLARE SUB MouseInit ()
DECLARE FUNCTION MouseSlct% (x AS INTEGER, y AS INTEGER, xchoice AS INTEGER, ychoice AS INTEGER, interval AS INTEGER)
DECLARE SUB MouseShow ()
DECLARE FUNCTION MousePX% ()
DECLARE FUNCTION MousePY% ()

DIM SHARED A(34) AS INTEGER
DIM SHARED mx%, my%

'Loading machine codes for working with the mouse
DEF SEG = VARSEG(A%(0))
FOR i% = 0 TO 63
READ d%
POKE VARPTR(A%(0)) + i%, d%
NEXT i%
DEF SEG
DATA 00,00
DATA 00,00
DATA 00,00
' Mashine codes : Assembler commands
DATA &HB8,00,00 : 'mov ax,000h
DATA &HCD,&H33 : 'int 33h
DATA &H3D,&HFF,&HFF : 'cmp ax,0FFFFh
DATA &H75,&H0D : 'jne @@notPresent
DATA &H0E : 'push cs
DATA &H07 : 'pop es
DATA &HBA,&H24,&H00 : 'mov dx,offset MouseHandler
DATA &HB9,&HFF,&HFF : 'mov cx,0FFFFh
DATA &HB8,&H0C,&H00 : 'mov ax,000Ch
DATA &HCD,&H33 : 'int 33h
: '@@NotPresent:
DATA &HCB : 'ret
DATA &HB8,00,00 : 'mov ax,0000h
DATA &HCD,&H33 : 'int 33h
DATA &HCB : 'ret
DATA &H2E,&H89,&H0E,00,00 : 'mov [cs:mouseX],cx
DATA &H2E,&H89,&H16,02,00 : 'mov [cs:mouseY],dx
DATA &H2E,&H89,&H1E,04,00 : 'mov [cs:mouseButtons],bx
DATA &HCB : 'ret
DATA &HB8,01,00 : 'mov ax,0001h
DATA &HCD,&H33 : 'int 33h
DATA &HCB : 'ret
DATA &HB8,02,00 : 'mov ax,0002h
DATA &HCD,&H33 : 'int 33h
DATA &HCB : 'ret

SCREEN 13

MouseInit

MouseShow

DO

Choice = MouseSlct(0, 0, 16, 10, 20)
IF MouseButtons% = 1 THEN
END
EXIT DO
END IF

LOOP

SUB Delay (Time AS SINGLE)

Waiter = TIMER

DO
IF TIMER > Waiter + Time THEN EXIT DO
LOOP

END SUB

DEFINT A-Z
FUNCTION MouseButtons%
MouseButtons% = A%(2)
END FUNCTION

FUNCTION MouseChoice%
mx% = (MousePX% / 2): my% = MousePY%
MouseChoice% = 1
END FUNCTION

SUB MouseHide
DEF SEG = VARSEG(A%(0))
CALL ABSOLUTE(VARPTR(A%(0)) + &H3A)
DEF SEG
END SUB

SUB MouseInit
DEF SEG = VARSEG(A%(0))
CALL ABSOLUTE(VARPTR(A%(0)) + 6)
DEF SEG
END SUB

FUNCTION MousePX%
MousePX% = A%(0)
END FUNCTION

FUNCTION MousePY%
MousePY% = A%(1)
END FUNCTION

SUB MouseReset
DEF SEG = VARSEG(A%(0))
CALL ABSOLUTE(VARPTR(A%(1)) + &H1E)
DEF SEG
END SUB

SUB MouseShow
DEF SEG = VARSEG(A%(0))
CALL ABSOLUTE(VARPTR(A%(0)) + &H34)
DEF SEG
END SUB

FUNCTION MouseSlct% (x AS INTEGER, y AS INTEGER, xchoice AS INTEGER, ychoice AS INTEGER, interval AS INTEGER)

Delay (.25)

MouseShow

DO
IF (MouseChoice% <> 0) THEN
IF (MouseButtons% = 1) THEN
IF (mx% > x AND my% > y) AND (mx% < x + xchoice * interval AND my% < y + ychoice * interval) THEN
MouseHide
MouseSlct% = INT((mx% - x) / interval) + INT((my% - y) / interval) * xchoice + 1
EXIT DO
END IF
ELSEIF (MouseButtons% = 2) THEN
MouseHide
MouseSlct% = 0
EXIT DO
END IF
END IF
LOOP

END FUNCTION

SUB Wait4Click

Delay (.25)

MouseShow

DO
IF (MouseChoice% <> 0) THEN
IF (MouseButtons% <> 0) THEN
MouseHide
EXIT DO
END IF
END IF
LOOP

END SUB

Please try it and give me some feedback,

I also put the link of my fourth and last demo here just in case you want to test it:

http://www.cam.org/~clay/krpg/krpged43.zip

Thanks in advance,

P.S. I'm tired now so I'll see you tomorrow...
Reply


Messages In This Thread
My demos in Windows XP... - by Clay Dragon - 07-26-2005, 06:39 AM
My demos in Windows XP... - by MystikShadows - 07-26-2005, 07:25 AM
My demos in Windows XP... - by Clay Dragon - 07-26-2005, 07:59 AM
My demos in Windows XP... - by MystikShadows - 07-26-2005, 08:03 AM
My demos in Windows XP... - by Clay Dragon - 07-26-2005, 08:40 AM
My demos in Windows XP... - by Ralph - 07-26-2005, 08:14 PM
My demos in Windows XP... - by MystikShadows - 07-26-2005, 09:47 PM
My demos in Windows XP... - by Clay Dragon - 07-26-2005, 10:12 PM
My demos in Windows XP... - by MystikShadows - 07-26-2005, 10:28 PM
My demos in Windows XP... - by Clay Dragon - 07-27-2005, 01:31 AM
My demos in Windows XP... - by Ralph - 07-27-2005, 04:32 AM
My demos in Windows XP... - by Clay Dragon - 07-27-2005, 04:59 AM
My demos in Windows XP... - by MystikShadows - 07-27-2005, 05:17 AM
My demos in Windows XP... - by DrV - 07-27-2005, 05:54 PM
My demos in Windows XP... - by DrV - 07-27-2005, 06:03 PM
My demos in Windows XP... - by anarky - 07-27-2005, 06:31 PM
My demos in Windows XP... - by Clay Dragon - 07-27-2005, 08:41 PM
My demos in Windows XP... - by Clay Dragon - 07-28-2005, 06:14 AM
My demos in Windows XP... - by Ralph - 07-29-2005, 06:25 AM
My demos in Windows XP... - by DrV - 07-29-2005, 05:57 PM
My demos in Windows XP... - by Ralph - 07-29-2005, 06:46 PM
My demos in Windows XP... - by Clay Dragon - 07-31-2005, 02:03 AM
My demos in Windows XP... - by MystikShadows - 07-31-2005, 05:22 AM
My demos in Windows XP... - by Clay Dragon - 07-31-2005, 06:03 AM
My demos in Windows XP... - by MystikShadows - 07-31-2005, 06:07 AM
My demos in Windows XP... - by Clay Dragon - 07-31-2005, 08:39 AM
My demos in Windows XP... - by Clay Dragon - 08-01-2005, 08:46 AM
My demos in Windows XP... - by Ryan - 09-13-2005, 08:56 PM
My demos in Windows XP... - by Clay Dragon - 09-15-2005, 11:26 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)