<p>
<tt/char TestPoint (struct pixel *myPixel)/
<p>
-This function tests if given pixel is set and returns true or false.
+This function tests if given pixel is set and returns <tt/true/ (non-zero) or <tt/false/ (zero).
<sect2>Character and string output
location. If it is nonzero - an error occured. See <tt/gdisk.h/ for the list of possible errorcodes.
You need to include <tt/errno.h/ to get <tt/__oserror/, together with standard <tt/errno/. The
latter gives less verbose, but still usable information and can be used with <tt/strerror/.
+Probably you will get more information using <tt/stroserror/ in similar way.
<p>
For passing parameters use almost always pointer to your data e.g. <tt/ReadBuff (&myTrSe)/.
<tt/char CmpString (char *s1, char *s2)/
<p>
This function compares string <tt/s1/ to <tt/s2/ for equality - this is case sensitive, and both
-strings have to have the same length. It returns either <tt/true/ or <tt/false/.
+strings have to have the same length. It returns either <tt/true/ (non-zero) or <tt/false/ (zero).
<sect2>CopyFString and CmpFString
<p>
;
; 27.10.2001
; 06.03.2002
+; 02.01.2003
; unsigned char wherex (void);
; unsigned char wherey (void);
.export _wherex, _wherey
.importzp cursor_c, cursor_r
- .include "../inc/jumptab.inc"
-
_wherex: lda cursor_c
+ ldx #0
rts
_wherey: lda cursor_r
+ ldx #0
rts
lda ptr1
ldx ptr1+1
jsr _FindFile ; try to find the file
+ tax
bne @error
lda dirEntryBuf + OFF_DE_TR_SC ; tr&se for ReadByte (r1)
bne @L2
inc ptr3+1
-@L2: txa ; was there error ?
+@L2: lda __oserror ; was there error ?
beq @L3
cmp #BFR_OVERFLOW ; EOF?
bne @error
;
DONE:
+ jsr GETERROR ; clear error (if any)
+
lda #0
jsr SETVIEWPAGE ; switch into viewpage 0
;
SETPALETTE:
+ jsr GETERROR ; clear error (if any)
+
ldy #PALETTESIZE - 1
@L1: lda (ptr1),y ; Copy the palette
and #$0F ; Make a valid color
findbambit.o freeblock.o getblock.o getdirhead.o getptrcurdknm.o newdisk.o\
nxtblkalloc.o opendisk.o purgeturbo.o putblock.o putdirhead.o readblock.o\
readbuff.o setnextfree.o setgeosdisk.o writeblock.o writebuff.o verwriteblock.o\
- gettrse.o\
+ gettrse.o setoserror.o\
dio_openclose.o dio_cts.o dio_stc.o dio_read.o dio_write.o dio_writev.o\
dio_params.o
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char BlkAlloc (struct tr_se output[], int length);
- .import popax, __oserror
+ .import popax, setoserror
.export _BlkAlloc
.include "../inc/jumptab.inc"
sta r4L
stx r4H
jsr BlkAlloc
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char ChangeDiskDevice (char newDriveNumber);
- .import __oserror
+ .import setoserror
.export _ChangeDiskDevice
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_ChangeDiskDevice:
jsr ChangeDiskDevice
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char ChkDkGEOS (void);
- .import __oserror
+ .import setoserror
.export _ChkDkGEOS
.include "../inc/jumptab.inc"
_ChkDkGEOS:
jsr ChkDkGEOS
- stx __oserror
+ jsr setoserror
lda isGEOS
rts
; sectnum_t - 16bit
;
- .import dio_params, __oserror
+ .import dio_params, setoserror
.export _dio_write
.include "../inc/geossym.inc"
.include "../inc/jumptab.inc"
jsr dio_params
jsr WriteBlock
- stx __oserror
- txa
- rts
+ jmp setoserror
.endproc
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char FindBAMBit (struct tr_se *TS);
; (might be called inUSE (if (!inUSE(block))))
.import gettrse
+ .import return0, return1
.export _FindBAMBit
.include "../inc/jumptab.inc"
stx r6H
jsr FindBAMBit
bne inUse
- lda #0
- rts
-inUse: lda #$ff
- rts
+ jmp return0
+inUse: jmp return1
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char FreeBlock (struct tr_se *TS);
- .import gettrse, __oserror
+ .import gettrse, setoserror
.export _FreeBlock
.include "../inc/jumptab.inc"
sta r6L
stx r6H
jsr FreeBlock
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char GetBlock (struct tr_se *myTS, char *buffer);
- .import popax, __oserror
+ .import popax, setoserror
.import gettrse
.export _GetBlock
sta r1L
stx r1H
jsr GetBlock
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char GetDirHead (void);
- .import __oserror
+ .import setoserror
.export _GetDirHead
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
-
+
_GetDirHead:
jsr GetDirHead
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char NewDisk (void);
- .import __oserror
+ .import setoserror
.export _NewDisk
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_NewDisk:
jsr NewDisk
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char NxtBlkAlloc (struct tr_se *startTS, struct tr_se output[], int length );
- .import popax, __oserror
+ .import popax, setoserror
.import gettrse
.importzp ptr4
.export _NxtBlkAlloc
sta r3L
stx r3H
jsr NxtBlkAlloc
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char OpenDisk (void);
- .import __oserror
+ .import setoserror
.export _OpenDisk
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_OpenDisk:
jsr OpenDisk
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char PutBlock (struct tr_se *myTS, char *buffer);
- .import popax, __oserror
+ .import popax, setoserror
.import gettrse
.export _PutBlock
sta r1L
stx r1H
jsr PutBlock
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.99, 2.1.2003
; char PutDirHead (void);
- .import __oserror
+ .import setoserror
.export _PutDirHead
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_PutDirHead:
jsr PutDirHead
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char ReadBlock (struct tr_se myTS, char *buffer);
- .import popax, __oserror
+ .import popax, setoserror
.import gettrse
.export _ReadBlock
sta r1L
stx r1H
jsr ReadBlock
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 26.10.99
+; 26.10.1999, 2.1.2003
; char ReadBuff (struct tr_se);
- .import __oserror
+ .import setoserror
.import gettrse
.export _ReadBuff
sta r1L
stx r1H
jsr ReadBuff
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char SetGEOSDisk (void);
- .import __oserror
+ .import setoserror
.export _SetGEOSDisk
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_SetGEOSDisk:
jsr SetGEOSDisk
- stx __oserror
- txa
- rts
+ jmp setoserror
--- /dev/null
+
+;
+; Maciej 'YTM/Elysium' Witkowiak
+;
+; 2.1.2003
+;
+
+ .export setoserror
+ .import __oserror
+
+setoserror:
+ stx __oserror
+ txa
+ ldx #0 ; X is cleared (high byte for promoting char to int)
+ tay ; Y register is used just to save flags state
+ rts
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char VerWriteBlock (struct tr_se *myTS, char *buffer);
- .import popax, __oserror
+ .import popax, setoserror
.import gettrse
.export _VerWriteBlock
sta r1L
stx r1H
jsr VerWriteBlock
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char WriteBlock (struct tr_se *myTS, char *buffer);
- .import popax, __oserror
+ .import popax, setoserror
.import gettrse
.export _WriteBlock
sta r1L
stx r1H
jsr WriteBlock
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 26.10.99
+; 26.10.1999, 2.1.2003
; char WriteBuff (struct tr_se*);
- .import __oserror
+ .import setoserror
.import gettrse
.export _WriteBuff
sta r1L
stx r1H
jsr WriteBuff
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char DoDlgBox (char *myParamString);
sta r0L
stx r0H
jsr DoDlgBox
+ ldx #0
lda r0L
rts
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char AppendRecord (void);
- .import __oserror
+ .import setoserror
.export _AppendRecord
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_AppendRecord:
jsr AppendRecord
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char CloseRecordFile (void);
- .import __oserror
+ .import setoserror
.export _CloseRecordFile
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_CloseRecordFile:
jsr CloseRecordFile
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char DeleteFile (char *myName);
- .import __oserror
+ .import setoserror
.export _DeleteFile
.include "../inc/jumptab.inc"
sta r0L
stx r0H
jsr DeleteFile
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char DeleteRecord (void);
- .import __oserror
+ .import setoserror
.export _DeleteRecord
.include "../inc/jumptab.inc"
_DeleteRecord:
jsr DeleteRecord
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char FindFile (char *myName);
- .import __oserror
+ .import setoserror
.export _FindFile
.include "../inc/jumptab.inc"
sta r6L
stx r6H
jsr FindFile
- stx __oserror
- txa
- rts
+ jmp setoserror
;
; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99, 30.7.2000
+; 25.12.1999, 2.1.2003
; char FindFTypes (char *buffer, char fileType, char fileMax, char *Class);
.export _FindFTypes
- .import popax, popa, __oserror
+ .import popax, popa, setoserror
.include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
sta r6L
stx r6H
jsr FindFTypes
- stx __oserror
+ jsr setoserror
; return (fileMax - r7H)
lda tmpFileMax
sec
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char FollowChain (struct tr_se *myTrSe, char *buffer);
.export _FollowChain
- .import popax, __oserror
+ .import popax, setoserror
.import gettrse
.include "../inc/jumptab.inc"
sta r1L
stx r1H
jsr FollowChain
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char FreeFile (struct trse myTrSe[]);
- .import __oserror
+ .import setoserror
.export _FreeFile
.include "../inc/jumptab.inc"
sta r9L
stx r9H
jsr FreeFile
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char GetFHdrInfo (struct filehandle *myFile);
- .import __oserror
+ .import setoserror
.export _GetFHdrInfo
.include "../inc/jumptab.inc"
sta r9L
stx r9H
jsr GetFHdrInfo
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char InsertRecord (void);
- .import __oserror
+ .import setoserror
.export _InsertRecord
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
-
+
_InsertRecord:
jsr InsertRecord
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char NextRecord (void);
- .import __oserror
+ .import setoserror
.export _NextRecord
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
-
+
_NextRecord:
jsr NextRecord
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char OpenRecordFile (char *myName);
- .import __oserror
+ .import setoserror
.export _OpenRecordFile
.include "../inc/jumptab.inc"
sta r0L
stx r0H
jsr OpenRecordFile
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char PointRecord (char recordNum);
- .import __oserror
+ .import setoserror
.export _PointRecord
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_PointRecord:
jsr PointRecord
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char PreviousRecord (void);
- .import __oserror
+ .import setoserror
.export _PreviousRecord
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_PreviousRecord:
jsr PreviousRecord
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char ReadByte (void);
.export _ReadByte
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_ReadByte:
jsr ReadByte
stx __oserror
+ ldx #0
rts
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char ReadFile (struct tr_se *myTS, char *buffer, int length);
.export _ReadFile
- .import popax, __oserror
+ .import popax, setoserror
.import gettrse
.include "../inc/jumptab.inc"
sta r1L
stx r1H
jsr ReadFile
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char ReadRecord (char *buffer, int length);
.export _ReadRecord
- .import popax, __oserror
+ .import popax, setoserror
.include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
sta r7L
stx r7H
jsr ReadRecord
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char RenameFile (char *source, char *target);
.export _RenameFile
- .import popax, __oserror
+ .import popax, setoserror
.include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
-
+
_RenameFile:
sta r0L
stx r0H
sta r6L
stx r6H
jsr RenameFile
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char SaveFile (struct fileheader *myHeader);
- .import __oserror
+ .import setoserror
.export _SaveFile
.include "../inc/jumptab.inc"
sta r9L
stx r9H
jsr SaveFile
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char UpdateRecordFile (void);
- .import __oserror
+ .import setoserror
.export _UpdateRecordFile
.include "../inc/jumptab.inc"
- .include "../inc/geossym.inc"
_UpdateRecordFile:
jsr UpdateRecordFile
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 25.12.99
+; 25.12.1999, 2.1.2003
; char WriteRecord (char *buffer, int length);
.export _WriteRecord
- .import popax, __oserror
+ .import popax, setoserror
.include "../inc/jumptab.inc"
.include "../inc/geossym.inc"
sta r7L
stx r7H
jsr WriteRecord
- stx __oserror
- txa
- rts
+ jmp setoserror
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char GetCharWidth (char character);
.include "../inc/jumptab.inc"
-_GetCharWidth = GetCharWidth
+_GetCharWidth:
+ jsr GetCharWidth
+ ldx #0
+ rts
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 29.10.99
+; 29.10.1999, 2.1.2003
; char TestPoint (struct pixel *mypixel);
.import PointRegs
+ .import return0, return1
.export _TestPoint
.include "../inc/jumptab.inc"
jsr PointRegs
jsr TestPoint
bcc goFalse
- lda #$ff
- rts
-goFalse: lda #0
- rts
+ jmp return1
+goFalse: jmp return0
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 22.12.99
+; 22.12.1999, 2.1.2003
; char CmpString (char *dest, char* source);
.import DoubleSPop
+ .import return0, return1
.export _CmpString
.include "../inc/jumptab.inc"
_CmpString:
jsr DoubleSPop
- jmp CmpString
+ jsr CmpString
+ bne L1
+ jmp return0
+L1: jmp return1
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char VerifyRAM (char REUBank, int length, char *reuaddy, char *cpuaddy);
jsr REURegs
jsr VerifyRAM
txa
+ ldx #0
rts
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char GetNextChar (void);
; note that if it returns 0 (FALSE) then no characters are available
.include "../inc/jumptab.inc"
-_GetNextChar = GetNextChar
\ No newline at end of file
+_GetNextChar:
+ jsr GetNextChar
+ ldx #0
+ tay ; preserve Z flag
+ rts
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 21.12.99
+; 21.12.1999, 2.1.2003
; char IsMseInRegion (struct window *mywindow);
.import RectRegs
+ .import return0, return1
.export _IsMseInRegion
_IsMseInRegion:
jsr RectRegs
- jmp IsMseInRegion
+ jsr IsMseInRegion
+ bne L1
+ jmp return0
+L1: jmp return1
stx mouseRight+1
_mse_initend:
lda #0
+ tax
; --------------------------------------------------------------------------
;
; void mouse_done (void);
;
_mouse_buttons:
+ ldx #0
lda pressFlag
and #SET_MOUSE
lsr
.include "../inc/geossym2.inc"
get_ostype:
+ ldx #0
lda version
and #%11110000
cmp #$10
modeend: stx tmp1
ora tmp1
+ ldx #0
plp ; restore interrupt state
rts
;
-; Maciej 'YTM/Alliance' Witkowiak
+; Maciej 'YTM/Elysium' Witkowiak
;
-; 30.10.99
+; 30.10.1999, 2.1.2003
-; int GetRandom (void);
+; char GetRandom (void);
.export _GetRandom
.include "../inc/jumptab.inc"
-_GetRandom = GetRandom
+_GetRandom:
+ jsr GetRandom
+ ldx #0
+ rts