wwww
Revision | 90b16acddca3e382ba996a92c9358dc899ef5599 (tree) |
---|---|
Zeit | 2016-08-22 06:28:51 |
Autor | sparky4 <sparky4@cock...> |
Commiter | sparky4 |
branch is in the master swap branch code added to swap the files out
@@ -24,7 +24,9 @@ | ||
24 | 24 | #include "src/lib/16_timer.h" |
25 | 25 | #include "src/lib/wcpu/wcpu.h" |
26 | 26 | #include "src/lib/16_sprite.h" |
27 | -#include "src/lib/16_head.h" | |
27 | +#include "src/lib/16_ca.h" | |
28 | +#include "src/lib/16_mm.h" | |
29 | +//#include "src/lib/16_head.h"//included already | |
28 | 30 | |
29 | 31 | //#define FADE |
30 | 32 | #define MODEX //this is for mode x initiating |
@@ -35,10 +37,8 @@ global_game_variables_t gvar; | ||
35 | 37 | static map_t map; |
36 | 38 | player_t player[MaxPlayers]; |
37 | 39 | map_view_t mv[4]; |
38 | -static unsigned char palette[768]; | |
39 | -int fd; | |
40 | +byte *ppal; | |
40 | 41 | //word pn=0; //i forgot ww |
41 | -//static planar_buf_t huge *pp; | |
42 | 42 | float t; |
43 | 43 | sword bakapee; |
44 | 44 | pan_t pan; |
@@ -53,7 +53,7 @@ boolean panswitch=0; | ||
53 | 53 | word pg; |
54 | 54 | //#ifdef FADE |
55 | 55 | static word paloffset=0; |
56 | - byte *dpal, *default_pal; | |
56 | + byte *dpal; | |
57 | 57 | //#endif |
58 | 58 | byte *gpal; |
59 | 59 | byte *ptr; |
@@ -61,19 +61,21 @@ boolean panswitch=0; | ||
61 | 61 | |
62 | 62 | void main(int argc, char *argv[]) |
63 | 63 | { |
64 | - mminfo_t mm; mminfotype mmi; | |
65 | 64 | struct sprite sp; |
66 | - | |
65 | + __segment sega; | |
66 | + void __based(sega)* bigbuffer; | |
67 | + | |
67 | 68 | byte *mesg=malloc(sizeof(dword)); |
68 | 69 | int i; |
69 | 70 | |
70 | 71 | if(argv[1]) bakapee = atoi(argv[1]); |
71 | 72 | else bakapee = 1; |
72 | 73 | |
73 | -/* mm.mmstarted = 0; | |
74 | + gvar.mm.mmstarted=0; | |
75 | + gvar.bigbuffer=bigbuffer; | |
74 | 76 | |
75 | - MM_Startup(&mm, &mmi); | |
76 | - CA_Startup(&gvar);*/ | |
77 | + MM_Startup(&gvar.mm, &gvar.mmi); | |
78 | + CA_Startup(&gvar); | |
77 | 79 | // DOSLIB: check our environment |
78 | 80 | probe_dos(); |
79 | 81 |
@@ -148,17 +150,6 @@ void main(int argc, char *argv[]) | ||
148 | 150 | }*/ |
149 | 151 | player[0].spri = &sp; |
150 | 152 | |
151 | - fd = open("data/spri/chikyuu.pal",O_RDONLY|O_BINARY); | |
152 | - if (fd >= 0) { | |
153 | - unsigned int i; | |
154 | - | |
155 | - read(fd,palette,768); | |
156 | - close(fd); | |
157 | - | |
158 | - vga_palette_lseek(0); | |
159 | - for (i=0;i < 256;i++) vga_palette_write(palette[(i*3)+0]>>2,palette[(i*3)+1]>>2,palette[(i*3)+2]>>2); | |
160 | - } | |
161 | - | |
162 | 153 | #endif |
163 | 154 | /* input! */ |
164 | 155 | IN_Startup(); |
@@ -168,8 +159,6 @@ void main(int argc, char *argv[]) | ||
168 | 159 | #ifdef MODEX |
169 | 160 | #ifdef FADE |
170 | 161 | dpal = modexNewPal(); |
171 | - default_pal = modexNewPal(); | |
172 | - *default_pal = *dpal; | |
173 | 162 | modexPalSave(dpal); |
174 | 163 | modexFadeOff(4, dpal); |
175 | 164 | #endif |
@@ -180,7 +169,8 @@ void main(int argc, char *argv[]) | ||
180 | 169 | modexPalBlack(); //reset the palette~ |
181 | 170 | #endif |
182 | 171 | #endif |
183 | - modexPalUpdate1(palette); | |
172 | + modexLoadPalFile("data/spri/chikyuu.pal", &ppal); | |
173 | + modexPalUpdate1(ppal); | |
184 | 174 | #ifdef MODEX |
185 | 175 | #ifdef FADE |
186 | 176 | gpal = modexNewPal(); |
@@ -285,11 +275,11 @@ void main(int argc, char *argv[]) | ||
285 | 275 | #ifdef FADE |
286 | 276 | if(IN_KeyDown(24)){ modexPalUpdate0(gpal); paloffset=0; modexpdump(mv[0].page); modexpdump(mv[1].page); IN_UserInput(1,1); } |
287 | 277 | if(IN_KeyDown(22)){ |
288 | - paloffset=0; modexPalBlack(); modexPalUpdate(player[0].data, &paloffset, 0, 0); | |
289 | - printf("1paloffset = %d\n", paloffset/3); | |
290 | - modexPalUpdate(map.tiles->data, &paloffset, 0, 0); | |
291 | - printf("2paloffset = %d\n", paloffset/3); | |
292 | - modexpdump(mv[0].page); modexpdump(mv[1].page); | |
278 | +// paloffset=0; modexPalBlack(); modexPalUpdate(player[0].data, &paloffset, 0, 0); | |
279 | +// printf("1paloffset = %d\n", paloffset/3); | |
280 | +// modexPalUpdate(map.tiles->data, &paloffset, 0, 0); | |
281 | +// printf("2paloffset = %d\n", paloffset/3); | |
282 | +// modexpdump(mv[0].page); modexpdump(mv[1].page); | |
293 | 283 | IN_UserInput(1,1); |
294 | 284 | } |
295 | 285 | #endif |
@@ -335,7 +325,7 @@ void main(int argc, char *argv[]) | ||
335 | 325 | }*/ |
336 | 326 | |
337 | 327 | //9 |
338 | - if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(default_pal); IN_UserInput(1,1); } | |
328 | + if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); } | |
339 | 329 | //if(IN_KeyDown(11)){ modexPalOverscan(15); } |
340 | 330 | if((player[0].q==1) && !(player[0].x%TILEWH==0 && player[0].y%TILEWH==0)) break; //incase things go out of sync! |
341 | 331 | } |
@@ -351,6 +341,9 @@ void main(int argc, char *argv[]) | ||
351 | 341 | VGAmodeX(0, 1, &gvar); |
352 | 342 | #endif |
353 | 343 | IN_Shutdown(); |
344 | + MM_FreePtr(&bigbuffer, &gvar.mm); | |
345 | + CA_Shutdown(&gvar); | |
346 | + MM_Shutdown(&gvar.mm); | |
354 | 347 | printf("\nProject 16 scroll.exe. This is just a test file!\n"); |
355 | 348 | printf("version %s\n", VERSION); |
356 | 349 | printf("tx: %d ", mv[0].tx); |
@@ -44,7 +44,6 @@ global_game_variables_t gvar; | ||
44 | 44 | void |
45 | 45 | main(int argc, char *argv[]) |
46 | 46 | { |
47 | - mminfo_t mm; mminfotype mmi; | |
48 | 47 | #ifdef __WATCOMC__ |
49 | 48 | __segment sega; |
50 | 49 | void __based(sega)* bigbuffer; |
@@ -71,7 +70,7 @@ main(int argc, char *argv[]) | ||
71 | 70 | #ifdef FILERL |
72 | 71 | bakapee = malloc(64); |
73 | 72 | #endif |
74 | - mm.mmstarted=0; | |
73 | + gvar.mm.mmstarted=0; | |
75 | 74 | |
76 | 75 | #ifdef FILERL |
77 | 76 | // printf("filename!: "); |
@@ -89,7 +88,7 @@ main(int argc, char *argv[]) | ||
89 | 88 | //screen.height += (16*2); |
90 | 89 | |
91 | 90 | // printf("main()=%Fp start MM\n", *argv[0]); |
92 | - MM_Startup(&mm, &mmi); | |
91 | + MM_Startup(&gvar.mm, &gvar.mmi); | |
93 | 92 | //PM_Startup(); |
94 | 93 | //PM_UnlockMainMem(); |
95 | 94 | CA_Startup(&gvar); |
@@ -103,13 +102,13 @@ main(int argc, char *argv[]) | ||
103 | 102 | #ifdef FILERL |
104 | 103 | // bakapeehandle = open(bakapee,O_RDONLY | O_BINARY, S_IREAD); |
105 | 104 | // printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer)); |
106 | -// if(CA_FarRead(bakapeehandle,(void far *)&bigbuffer,sizeof(bigbuffer),&mm)) | |
105 | +// if(CA_FarRead(bakapeehandle,(void far *)&bigbuffer,sizeof(bigbuffer),&gvar.mm)) | |
107 | 106 | #ifdef FILEREAD |
108 | 107 | printf(" read\n"); |
109 | - if(CA_ReadFile(bakapee, &bigbuffer, &mm)) | |
108 | + if(CA_ReadFile(bakapee, &bigbuffer, &gvar.mm)) | |
110 | 109 | #else |
111 | 110 | printf(" load\n"); |
112 | - if(CA_LoadFile(bakapee, &bigbuffer, &mm, &mmi)) | |
111 | + if(CA_LoadFile(bakapee, &bigbuffer, &gvar.mm, &gvar.mmi)) | |
113 | 112 | #endif |
114 | 113 | baka=1; |
115 | 114 | else |
@@ -130,18 +129,18 @@ main(int argc, char *argv[]) | ||
130 | 129 | getch(); |
131 | 130 | //++++modexEnter(); |
132 | 131 | //++++modexShowPage(&screen); |
133 | - MM_ShowMemory(&gvar, &mm); | |
132 | + MM_ShowMemory(&gvar, &gvar.mm); | |
134 | 133 | //getch(); |
135 | - MM_DumpData(&mm); | |
134 | + MM_DumpData(&gvar.mm); | |
136 | 135 | //++++modexLeave(); |
137 | - //++++MM_Report(&mm, &mmi); | |
136 | + //++++MM_Report(&gvar.mm, &gvar.mmi); | |
138 | 137 | // printf(" stop!\n"); |
139 | 138 | #ifdef FILERL |
140 | - MM_FreePtr(&bigbuffer, &mm); | |
139 | + MM_FreePtr(&bigbuffer, &gvar.mm); | |
141 | 140 | #endif |
142 | 141 | //PM_Shutdown(); |
143 | 142 | CA_Shutdown(&gvar); |
144 | - MM_Shutdown(&mm); | |
143 | + MM_Shutdown(&gvar.mm); | |
145 | 144 | // printf(" done!\n"); |
146 | 145 | #ifdef FILERL |
147 | 146 | free(bakapee); |
@@ -149,11 +148,11 @@ main(int argc, char *argv[]) | ||
149 | 148 | else printf("\npoo!\n"); |
150 | 149 | #endif |
151 | 150 | printf("========================================\n"); |
152 | - printf("near= %Fp ", mm.nearheap); | |
153 | - printf("far= %Fp", mm.farheap); | |
151 | + printf("near= %Fp ", gvar.mm.nearheap); | |
152 | + printf("far= %Fp", gvar.mm.farheap); | |
154 | 153 | printf("\n"); |
155 | - printf("&near= %Fp ", &(mm.nearheap)); | |
156 | - printf("&far= %Fp", &(mm.farheap)); | |
154 | + printf("&near= %Fp ", &(gvar.mm.nearheap)); | |
155 | + printf("&far= %Fp", &(gvar.mm.farheap)); | |
157 | 156 | printf("\n"); |
158 | 157 | printf("bigb= %Fp ", bigbuffer); |
159 | 158 | //printf("bigbr= %04x", bigbuffer); |
@@ -30,7 +30,8 @@ | ||
30 | 30 | #include <string.h> |
31 | 31 | #include "src/lib/16_head.h" |
32 | 32 | #include "src/lib/16_timer.h" |
33 | -#include "src/lib/bitmap.h" | |
33 | +#include "src/lib/16_sprite.h" | |
34 | +#include "src/lib/bitmap.h" //old format | |
34 | 35 | #ifdef __WATCOMC__ |
35 | 36 | #include "src/lib/16_dbg.h" |
36 | 37 | #endif |
@@ -230,7 +231,8 @@ typedef struct | ||
230 | 231 | //0000 planar_buf_t huge *data; //supposively the sprite sheet data |
231 | 232 | // planar_buf_t data; //supposively the sprite sheet data |
232 | 233 | ////0000---- |
233 | - bitmap_t *data; //supposively the sprite sheet data | |
234 | + struct sprite *spri; //supposively the sprite sheet data | |
235 | + bitmap_t *data; //supposively the sprite sheet data//old format | |
234 | 236 | sword hp; //hitpoints of the player |
235 | 237 | int persist_aniframe; /* gonna be increased to 1 before being used, so 0 is ok for default */ |
236 | 238 | CursorInfo info; |
@@ -1,310 +0,0 @@ | ||
1 | -/* Catacomb Apocalypse Source Code | |
2 | - * Copyright (C) 1993-2014 Flat Rock Software | |
3 | - * | |
4 | - * This program is free software; you can redistribute it and/or modify | |
5 | - * it under the terms of the GNU General Public License as published by | |
6 | - * the Free Software Foundation; either version 2 of the License, or | |
7 | - * (at your option) any later version. | |
8 | - * | |
9 | - * This program is distributed in the hope that it will be useful, | |
10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | - * GNU General Public License for more details. | |
13 | - * | |
14 | - * You should have received a copy of the GNU General Public License along | |
15 | - * with this program; if not, write to the Free Software Foundation, Inc., | |
16 | - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 | - */ | |
18 | - | |
19 | -// | |
20 | -// ID Engine | |
21 | -// ID_IN.h - Header file for Input Manager | |
22 | -// v1.0d1w | |
23 | -// By Jason Blochowiak | |
24 | -// Open Watcom port by sparky4 | |
25 | -// | |
26 | - | |
27 | -#ifndef __16_IN__ | |
28 | -#define __16_IN__ | |
29 | - | |
30 | -#include <string.h> | |
31 | -#include "src/lib/16_head.h" | |
32 | -#include "src/lib/16_timer.h" | |
33 | -#include "src/lib/16_sprite.h" | |
34 | -#ifdef __WATCOMC__ | |
35 | -#include "src/lib/16_dbg.h" | |
36 | -#endif | |
37 | -#ifdef __DEBUG__ | |
38 | -//#define __DEBUG_InputMgr__ | |
39 | -#endif | |
40 | - | |
41 | -#ifdef __DEBUG_InputMgr__ | |
42 | -//#define TESTKEYIN | |
43 | -//#define TESTCONTROLNOISY | |
44 | -#endif | |
45 | - | |
46 | -extern boolean testkeyin,testcontrolnoisy; | |
47 | - | |
48 | -//if else for gfxtesting and direction | |
49 | -//player[pn].d == 2 || | |
50 | -//player[pn].d != 2 || | |
51 | -#define DIRECTIONIFELSE (player[pn].info.dir == 2) | |
52 | -//#define NDIRECTIONIFELSE (player[pn].info.dir != 2) | |
53 | - | |
54 | -#define KeyInt 9 // The keyboard ISR number | |
55 | - | |
56 | -// Stuff for the joystick | |
57 | -#define JoyScaleMax 32768 | |
58 | -#define JoyScaleShift 8 | |
59 | -#define MaxJoyValue 5000 | |
60 | - | |
61 | -#define MaxPlayers 4 | |
62 | -#define MaxKbds 2 | |
63 | -#define MaxJoys 2 | |
64 | -#define MaxPads 2 | |
65 | -#define NumCodes 128 | |
66 | - | |
67 | -typedef byte ScanCode; | |
68 | -#define sc_None 0 | |
69 | -#define sc_Bad 0xff | |
70 | -#define sc_Return 0x1c | |
71 | -#define sc_Enter sc_Return | |
72 | -#define sc_Escape 0x01 | |
73 | -#define sc_Space 0x39 | |
74 | -#define sc_BackSpace 0x0e | |
75 | -#define sc_Tab 0x0f | |
76 | -#define sc_Alt 0x38 | |
77 | -#define sc_Control 0x1d | |
78 | -#define sc_CapsLock 0x3a | |
79 | -#define sc_LShift 0x2a | |
80 | -#define sc_RShift 0x36 | |
81 | -#define sc_UpArrow 0x48 | |
82 | -#define sc_DownArrow 0x50 | |
83 | -#define sc_LeftArrow 0x4b | |
84 | -#define sc_RightArrow 0x4d | |
85 | -#define sc_Insert 0x52 | |
86 | -#define sc_Delete 0x53 | |
87 | -#define sc_Home 0x47 | |
88 | -#define sc_End 0x4f | |
89 | -#define sc_PgUp 0x49 | |
90 | -#define sc_PgDn 0x51 | |
91 | -#define sc_F1 0x3b | |
92 | -#define sc_F2 0x3c | |
93 | -#define sc_F3 0x3d | |
94 | -#define sc_F4 0x3e | |
95 | -#define sc_F5 0x3f | |
96 | -#define sc_F6 0x40 | |
97 | -#define sc_F7 0x41 | |
98 | -#define sc_F8 0x42 | |
99 | -#define sc_F9 0x43 | |
100 | -#define sc_F10 0x44 | |
101 | -#define sc_F11 0x57 | |
102 | -#define sc_F12 0x59 | |
103 | - | |
104 | -#define sc_1 0x02 | |
105 | -#define sc_2 0x03 | |
106 | -#define sc_3 0x04 | |
107 | -#define sc_4 0x05 | |
108 | -#define sc_5 0x06 | |
109 | -#define sc_6 0x07 | |
110 | -#define sc_7 0x08 | |
111 | -#define sc_8 0x09 | |
112 | -#define sc_9 0x0a | |
113 | -#define sc_0 0x0b | |
114 | - | |
115 | -#define sc_A 0x1e | |
116 | -#define sc_B 0x30 | |
117 | -#define sc_C 0x2e | |
118 | -#define sc_D 0x20 | |
119 | -#define sc_E 0x12 | |
120 | -#define sc_F 0x21 | |
121 | -#define sc_G 0x22 | |
122 | -#define sc_H 0x23 | |
123 | -#define sc_I 0x17 | |
124 | -#define sc_J 0x24 | |
125 | -#define sc_K 0x25 | |
126 | -#define sc_L 0x26 | |
127 | -#define sc_M 0x32 | |
128 | -#define sc_N 0x31 | |
129 | -#define sc_O 0x18 | |
130 | -#define sc_P 0x19 | |
131 | -#define sc_Q 0x10 | |
132 | -#define sc_R 0x13 | |
133 | -#define sc_S 0x1f | |
134 | -#define sc_T 0x14 | |
135 | -#define sc_U 0x16 | |
136 | -#define sc_V 0x2f | |
137 | -#define sc_W 0x11 | |
138 | -#define sc_X 0x2d | |
139 | -#define sc_Y 0x15 | |
140 | -#define sc_Z 0x2c | |
141 | - | |
142 | -#define key_None 0 | |
143 | -#define key_Return 0x0d | |
144 | -#define key_Enter key_Return | |
145 | -#define key_Escape 0x1b | |
146 | -#define key_Space 0x20 | |
147 | -#define key_BackSpace 0x08 | |
148 | -#define key_Tab 0x09 | |
149 | -#define key_Delete 0x7f | |
150 | - | |
151 | -#define key_LSuper 0x5b | |
152 | -#define key_RSuper 0x5c | |
153 | -#define key_Menu 0x5d | |
154 | - | |
155 | -// Stuff for the mouse | |
156 | -#define MReset 0 | |
157 | -#define MButtons 3 | |
158 | -#define MDelta 11 | |
159 | - | |
160 | -#define MouseInt 0x33 | |
161 | -#ifdef DEMO0 | |
162 | -typedef enum { | |
163 | - demo_Off,demo_Record,demo_Playback,demo_PlayDone | |
164 | - } Demo; | |
165 | -#endif | |
166 | -typedef enum { | |
167 | - //ctrl_None, // MDM (GAMERS EDGE) - added | |
168 | - ctrl_Keyboard, | |
169 | - ctrl_Keyboard1 = ctrl_Keyboard,ctrl_Keyboard2, | |
170 | - ctrl_Joystick, | |
171 | - ctrl_Joystick1 = ctrl_Joystick,ctrl_Joystick2, | |
172 | - ctrl_Mouse, | |
173 | - } ControlType; | |
174 | -typedef enum { | |
175 | - motion_Left = -1,motion_Up = -1, | |
176 | - motion_None = 0, | |
177 | - motion_Right = 1,motion_Down = 1 | |
178 | - } Motion; | |
179 | -typedef enum { | |
180 | - dir_North,//dir_NorthEast, | |
181 | - dir_West,//dir_Nortinest, | |
182 | - dir_None, | |
183 | - dir_East,//,dir_SouthEast, | |
184 | - dir_South,//dir_Soutinest, | |
185 | - } Direction; | |
186 | -typedef struct { | |
187 | - boolean near button0,button1,button2,button3; | |
188 | - int near x,y; | |
189 | - Motion near xaxis,yaxis; | |
190 | - Direction near dir; | |
191 | - } CursorInfo; | |
192 | - | |
193 | -typedef struct { | |
194 | - ScanCode near button0,button1, | |
195 | - //upleft, | |
196 | - up, | |
197 | - down, | |
198 | - left, | |
199 | - right | |
200 | - //upright, | |
201 | - //downleft, | |
202 | - //,downright | |
203 | - ; | |
204 | - } KeyboardDef; | |
205 | -typedef struct { | |
206 | - word near joyMinX,joyMinY, | |
207 | - threshMinX,threshMinY, | |
208 | - threshMaxX,threshMaxY, | |
209 | - joyMaxX,joyMaxY, | |
210 | - joyMultXL,joyMultYL, | |
211 | - joyMultXH,joyMultYH; | |
212 | - } JoystickDef; | |
213 | - | |
214 | -typedef struct | |
215 | -{ | |
216 | - int x; //player exact position on the viewable map | |
217 | - int y; //player exact position on the viewable map | |
218 | - int tx; //player tile position on the viewable map | |
219 | - int ty; //player tile position on the viewable map | |
220 | - int triggerx; //player's trigger box tile position on the viewable map | |
221 | - int triggery; //player's trigger box tile position on the viewable map | |
222 | - int sheetsetx; //NOT USED YET! player sprite sheet set on the image x | |
223 | - int sheetsety; //NOT USED YET! player sprite sheet set on the image y | |
224 | - byte d; //direction to render sprite!! wwww | |
225 | - byte q; //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www | |
226 | - byte near pdir; //previous direction~ | |
227 | - //byte near kd[2]; //array of arrow key pressed | |
228 | - word speed; //player speed! | |
229 | - word spt; //speed per tile | |
230 | -//0000 planar_buf_t huge *data; //supposively the sprite sheet data | |
231 | -// planar_buf_t data; //supposively the sprite sheet data | |
232 | -////0000---- | |
233 | - struct sprite *spri; //supposively the sprite sheet data | |
234 | - sword hp; //hitpoints of the player | |
235 | - int persist_aniframe; /* gonna be increased to 1 before being used, so 0 is ok for default */ | |
236 | - CursorInfo info; | |
237 | - ControlType Controls; | |
238 | -} player_t; | |
239 | - | |
240 | -/* | |
241 | -============================================================================= | |
242 | - | |
243 | - GLOBAL VARIABLES | |
244 | - | |
245 | -============================================================================= | |
246 | -*/ | |
247 | -/*extern struct inconfig | |
248 | -{ | |
249 | - boolean MousePresent; | |
250 | - boolean JoysPresent[MaxJoys]; | |
251 | - boolean Keyboard[NumCodes]; | |
252 | - boolean Paused; | |
253 | - char LastASCII; | |
254 | - ScanCode LastScan; | |
255 | - | |
256 | - KeyboardDef KbdDefs[MaxKbds]; | |
257 | - JoystickDef JoyDefs[MaxJoys]; | |
258 | -} inpu;*/ | |
259 | - | |
260 | -#ifdef DEMO0 | |
261 | - static Demo DemoMode = demo_Off; | |
262 | - static byte /*_seg*/ *DemoBuffer; | |
263 | - static word DemoOffset,DemoSize; | |
264 | -#endif | |
265 | - | |
266 | -// Internal routines | |
267 | -extern void interrupt INL_KeyService(); | |
268 | -extern void Mouse(int x); | |
269 | -//static void INL_GetMouseDelta(int *x,int *y); | |
270 | -//static word INL_GetMouseButtons(void); | |
271 | -extern void IN_GetJoyAbs(word joy,word *xp,word *yp); | |
272 | -//static void INL_GetJoyDelta(word joy,int *dx,int *dy,boolean adaptive); | |
273 | -//static word INL_GetJoyButtons(word joy); | |
274 | -extern word IN_GetJoyButtonsDB(word joy); | |
275 | -//static void INL_StartKbd(void); | |
276 | -//static void INL_ShutKbd(void); | |
277 | -//static boolean INL_StartMouse(void); | |
278 | -//static void INL_ShutMouse(void); | |
279 | -//static void INL_SetJoyScale(word joy); | |
280 | -extern void IN_SetupJoy(word joy,word minx,word maxx,word miny,word maxy); | |
281 | -//static boolean INL_StartJoy(word joy); | |
282 | -//static void INL_ShutJoy(word joy); | |
283 | -extern void IN_Startup(); | |
284 | -extern void IN_Default(boolean gotit,player_t *player,ControlType nt); | |
285 | -extern void IN_Shutdown(); | |
286 | -extern void IN_SetKeyHook(void (*hook)()); | |
287 | -extern void IN_ClearKeysDown(); | |
288 | -//static void INL_AdjustCursor(CursorInfo *info,word buttons,int dx,int dy); | |
289 | -extern void IN_ReadCursor(CursorInfo *info); | |
290 | -extern void near IN_ReadControl(int pn,player_t *player); | |
291 | -extern void IN_SetControlType(word pn,player_t *player,ControlType type); | |
292 | -#if DEMO0 | |
293 | -extern boolean IN_StartDemoRecord(word bufsize); | |
294 | -extern void IN_StartDemoPlayback(byte /*__segment*/ *buffer,word bufsize); | |
295 | -extern void IN_StopDemo(void); | |
296 | -extern void IN_FreeDemoBuffer(void); | |
297 | -#endif | |
298 | -extern byte *IN_GetScanName(ScanCode scan); | |
299 | -extern ScanCode IN_WaitForKey(); | |
300 | -extern char IN_WaitForASCII(); | |
301 | -extern void IN_AckBack(); | |
302 | -extern void IN_Ack(); | |
303 | -extern boolean IN_IsUserInput(); | |
304 | -extern boolean IN_UserInput(dword delay,boolean clear); | |
305 | -extern boolean IN_KeyDown(byte code); | |
306 | -extern void IN_ClearKey(byte code); | |
307 | -extern boolean IN_qb(byte kee); | |
308 | -void IN_initplayer(player_t *player, word pn); | |
309 | - | |
310 | -#endif |
@@ -184,8 +184,8 @@ typedef struct | ||
184 | 184 | byte *pee; // message for fps |
185 | 185 | handle_t handle; //handles for file logging |
186 | 186 | kurokku_t kurokku; //clock struct |
187 | - mminfo_t mm; | |
188 | - mminfotype mmi; | |
187 | + mminfo_t mm; mminfotype mmi; | |
188 | + void *bigbuffer; | |
189 | 189 | } global_game_variables_t; |
190 | 190 | |
191 | 191 | #endif /* _TYPEDEFSTRUCT_H_ */ |
@@ -34,7 +34,6 @@ static map_t map; | ||
34 | 34 | player_t player[MaxPlayers]; |
35 | 35 | map_view_t mv[4]; |
36 | 36 | //word pn=0; //i forgot ww |
37 | -//static planar_buf_t huge *pp; | |
38 | 37 | float t; |
39 | 38 | sword bakapee; |
40 | 39 | pan_t pan; |
@@ -49,7 +48,7 @@ boolean panswitch=0; | ||
49 | 48 | word pg; |
50 | 49 | //#ifdef FADE |
51 | 50 | static word paloffset=0; |
52 | - byte *dpal, *default_pal; | |
51 | + byte *dpal; | |
53 | 52 | //#endif |
54 | 53 | byte *gpal; |
55 | 54 | byte *ptr; |
@@ -92,13 +91,8 @@ void main(int argc, char *argv[]) | ||
92 | 91 | _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); |
93 | 92 | |
94 | 93 | pan.pn=1; |
95 | - //player[0].data = &pp; | |
96 | 94 | |
97 | - //printf("starting timer "); | |
98 | 95 | start_timer(&gvar); |
99 | - //printf("ok\n"); | |
100 | - | |
101 | -// atexit(qclean()); | |
102 | 96 | |
103 | 97 | /* create the map */ |
104 | 98 | fprintf(stderr, "testing map load~ "); |
@@ -132,8 +126,6 @@ void main(int argc, char *argv[]) | ||
132 | 126 | #ifdef MODEX |
133 | 127 | #ifdef FADE |
134 | 128 | dpal = modexNewPal(); |
135 | - default_pal = modexNewPal(); | |
136 | - *default_pal = *dpal; | |
137 | 129 | modexPalSave(dpal); |
138 | 130 | modexFadeOff(4, dpal); |
139 | 131 | #endif |
@@ -310,7 +302,7 @@ void main(int argc, char *argv[]) | ||
310 | 302 | }*/ |
311 | 303 | |
312 | 304 | //9 |
313 | - if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(default_pal); IN_UserInput(1,1); } | |
305 | + if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); } | |
314 | 306 | //if(IN_KeyDown(11)){ modexPalOverscan(15); } |
315 | 307 | if((player[0].q==1) && !(player[0].x%TILEWH==0 && player[0].y%TILEWH==0)) break; //incase things go out of sync! |
316 | 308 | } |
@@ -3,10 +3,6 @@ mv src/scroll.c src/scroll_.c | ||
3 | 3 | mv src/_scroll.c src/scroll.c |
4 | 4 | mv src/scroll_.c src/_scroll.c |
5 | 5 | |
6 | -mv src/lib/16_in.h src/lib/16_in_.h | |
7 | -mv src/lib/_16_in.h src/lib/16_in.h | |
8 | -mv src/lib/16_in_.h src/lib/_16_in.h | |
9 | - | |
10 | 6 | mv src/lib/scroll16.c src/lib/scroll1_.c |
11 | 7 | mv src/lib/_croll16.c src/lib/scroll16.c |
12 | 8 | mv src/lib/scroll1_.c src/lib/_croll16.c |