/[james]/archive/heeheehee/GameLib
ViewVC logotype

Contents of /archive/heeheehee/GameLib

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (show annotations) (download)
Mon Feb 10 22:41:48 2003 UTC (21 years, 9 months ago) by james
File size: 4616 byte(s)
Initial import.

1 REM > <HeeHeeHee$Dir>.GameLib
2
3 DEF PROCAmnesia_Init(Size%)
4 LOCAL Block%
5 DIM Block% Size%
6 SYS"Amnesia_Init", Block%, Size%, 0
7 ENDPROC
8
9 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
10
11 DEF PROCAmnesia_ClaimTable(Table%, Flags%, Objects%, Size%)
12 SYS"Amnesia_ClaimTable", Table%, Flags%,, Objects%, Size%
13 ENDPROC
14
15 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
16
17 DEF PROCAmnesia_SetGravity(X_Gravity%, Y_Gravity%)
18 SYS"Amnesia_SetGravity", X_Gravity%, Y_Gravity%
19 ENDPROC
20
21 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
22
23 DEF PROCAmnesia_SetWindow(Window%, MinX%, MinY%, MaxX%, MaxY%)
24 SYS"Amnesia_SetWindow", Window%, MinX%, MinY%, MaxX%, MaxY%
25 ENDPROC
26
27 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
28
29 DEF PROCAmnesia_SetPlotOffset(X_Offset%, Y_Offset%)
30 SYS"Amnesia_SetPlotOffset", X_Offset%, Y_Offset%
31 ENDPROC
32
33 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
34
35 DEF PROCAmnesia_MakeObject(Table%, Sprite%, Flags%, X%, Y%)
36 IF FNAmnesia_MakeObject(Table%, Sprite%, Flags%, X%, Y%)
37 ENDPROC
38
39 DEF FNAmnesia_MakeObject(Table%, Sprite%, Flags%, X%, Y%)
40 LOCAL Object%
41
42 SYS"Amnesia_MakeObject", Table%, Sprite%, Flags%, X%, Y% TO , Object%
43 IF Object% = 0 THEN ERROR 1, "Could not create object in table " + STR$Table%
44 =Object%
45
46 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
47
48 DEF PROCFastSpr_Load(FSP%, Name$)
49 LOCAL Addr%
50 SYS"FastSpr_GetPointer", FSP% TO Addr%
51 SYS"Amnesia_LoadFile", Addr%, Name$, 0
52 ENDPROC
53
54 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
55
56 DEF PROCFastSpr_SetClipWindow(MinX%, MinY%, MaxX%, MaxY%)
57 SYS"FastSpr_SetClipWindow", MinX%, MinY%, MaxX%, MaxY%
58 ENDPROC
59
60 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
61
62 DEF PROCFastSpr_SetBackdrop(Colour%)
63 SYS"FastSpr_SetBackdrop", Colour%
64 ENDPROC
65
66 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
67
68 DEF PROCFastSpr_Plot(Sprite%, X%, Y%)
69 SYS"FastSpr_Plot", Sprite%, X%, Y%
70 ENDPROC
71
72 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
73
74 DEF PROCFastSpr_Bank(Bank%)
75 SYS"FastSpr_ScreenBank", Bank% - 1
76 ENDPROC
77
78 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
79
80 DEF PROCGameLib_Show(Pale%, Text$)
81 LOCAL Colo%, Hand%
82 SYS"FastSpr_SetClipWindow", 0, 0, 320, 256
83 SYS"OS_Byte", 113, 2
84 SYS"OS_Byte", 112, 1
85 SYS"ColourTrans_ReturnColourNumber", Pale% TO Colo%
86 SYS"FastSpr_SetBackdrop", Colo%
87 SYS"FastSpr_ScreenBank", 0
88 SYS"FastSpr_ClearWindow"
89 SYS"Font_FindFont",, "Homerton.Bold", 32 * 16, 32 * 16 TO Hand%
90 SYS"ColourTrans_SetFontColours",, Pale%, &FFFFFF00, 14
91 B%!00 = 0
92 B%!04 = 0
93 B%!08 = 0
94 B%!12 = 0
95 B%!16 = -1
96 SYS"Font_ScanString",, Text$, %1000000001000100000, -1, -1, B%
97 SYS"Font_Paint",, Text$, %1000000000, 640 * 400 - (B%!28 - B%!20) / 2, 512 * 400 - (B%!32 - B%!24) / 2
98 SYS"Font_LoseFont", Hand%
99 SYS"OS_Byte", 113, 1
100 Pale_Global% = Pale%
101 Fade_Pale% = (Pale% >> 8) AND &00FFFFFF
102 Row% = 0
103 ENDPROC
104
105 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
106
107 DEF PROCGameLib_Text(Text$)
108 SYS"Font_FindFont",, "Homerton.Bold", 32 * 16, 32 * 16 TO Hand%
109 SYS"ColourTrans_SetFontColours",, Pale_Global%, &FFFFFF00, 14
110 SYS"Font_Paint",, Text$, %1000000000, 100 * 400, (900 - (Row% * 100)) * 400
111 SYS"Font_LoseFont", Hand%
112 Row% += 1
113 ENDPROC
114
115 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
116
117 DEF PROCGameLib_Fade
118 LOCAL Colo%
119 Numb% = Fade_Pale%
120 REPEAT
121 BB% = Numb% AND &FF0000
122 GG% = Numb% AND &00FF00
123 RR% = Numb% AND &0000FF
124 IF BB% > 0 THEN BB% -= &020000: IF BB% < 0 THEN BB% = 0
125 IF GG% > 0 THEN GG% -= &000200: IF GG% < 0 THEN GG% = 0
126 IF RR% > 0 THEN RR% -= &000002: IF RR% < 0 THEN RR% = 0
127 Numb% = BB% + GG% + RR%
128 SYS"ColourTrans_ReturnColourNumber", Numb% << 8 TO Colo%
129 SYS"FastSpr_SetBackdrop", Colo%
130 SYS"FastSpr_ClearWindow"
131 UNTIL Numb% = 0
132 ENDPROC
133
134 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
135
136 DEF PROCGameLib_Error
137 ON ERROR ON ERROR OFF: REPORT: PRINT ERL: END
138
139 SYS"Wimp_Initialise", 200, &4B534154, "Throwback"
140 SYS"XOS_SWINumberFromString",, "DDEUtils_ThrowbackStart" TO ;PFlg%
141 IF (PFlg% AND 1) = 0 THEN
142 T$ = "<HeeHeeHee$Dir>.!RunImage"
143 T% = INSTR(REPORT$, "in """)
144 IF T% THEN T$ = MID$(REPORT$, T% + 4, LEN(REPORT$) - T% - 4)
145 SYS"DDEUtils_ThrowbackStart"
146 SYS"DDEUtils_ThrowbackSend", 0,, T$
147 SYS"DDEUtils_ThrowbackSend", 1,, T$, ERL, 1, REPORT$+" (Code &"+STR$~ERR+")"
148 SYS"DDEUtils_ThrowbackEnd"
149 ENDIF
150
151 ERROR 0, REPORT$ + " (" + STR$ERL + ")"
152 END

  ViewVC Help
Powered by ViewVC 1.1.26