Permalink
Browse files

Hardcode GAMEEXT.

git-svn-id: svn+ssh://jay/var/svn/wolf/trunk@96 32837ae5-38f0-4cfd-8401-3ff76d8497c4
  • Loading branch information...
1 parent aeaf849 commit de44c886f9215e4ddba6d63c051f1831366b2010 paul committed Aug 11, 2007
Showing with 40 additions and 22 deletions.
  1. +5 −1 Makefile
  2. +1 −1 build_grstarts.c
  3. +2 −2 build_huffman.c
  4. +7 −4 build_mapheaders.c
  5. +2 −3 build_pagemap.c
  6. +2 −2 build_pal4bit.c
  7. +5 −3 build_pictable.c
  8. +1 −1 build_romchunk.c
  9. +3 −1 version.h
  10. +2 −0 vi_comm.c
  11. +1 −1 vi_comm.h
  12. +2 −0 wl_main.c
  13. +7 −3 wl_menu.c
View
@@ -104,12 +104,16 @@ romchunk.c: build_romchunk.c grstarts.c pagemap.c
gcc build_romchunk.c grstarts.c pagemap.c -o build_romchunk -lm
./build_romchunk > romchunk.c
+sprites.h: build_sprites.c pagemap.c pal4bit.c
+ gcc build_sprites.c pagemap.c pal4bit.c -o build_sprites
+ ./build_sprites > sprites.h
+
clean:
rm -rf swolf3d xwolf3d sdlwolf3d *.o *.il build_tables tables.c \
build_huffman huffman.h build_mapheaders mapheaders.c \
build_pagemap pagemap.c build_grstarts grstarts.c \
build_pictable pictable.c build_pal4bit pal4bit.c \
- build_romchunk romchunk.c
+ build_romchunk romchunk.c build_sprites sprites.h
distclean: clean
rm -rf *~ DEADJOE
View
@@ -4,7 +4,7 @@ int main()
{
byte d[(NUMCHUNKS + 1) * 3];
int i;
- FILE *f = fopen("vgahead.wl6", "rb");
+ FILE *f = fopen("vgahead." GAMEEXT, "rb");
if (!f)
return 1;
fread(d, 3, NUMCHUNKS + 1, f);
View
@@ -1,11 +1,11 @@
-#include <stdio.h>
+#include "wl_def.h"
int main()
{
unsigned char data[1024];
int i;
unsigned char *p;
- FILE *f = fopen("vgadict.wl6", "rb");
+ FILE *f = fopen("vgadict." GAMEEXT, "rb");
if (!f)
return 1;
fread(data, 4, 256, f);
View
@@ -1,5 +1,4 @@
-#include <stdio.h>
-#include <stdint.h>
+#include "wl_def.h"
int main()
{
@@ -13,7 +12,7 @@ int main()
int i;
uint16_t rlew;
unsigned char *p;
- FILE *f = fopen("maphead.wl6", "rb");
+ FILE *f = fopen("maphead." GAMEEXT, "rb");
fread(&rlew, 2, 1, f);
if (!f)
return 1;
@@ -23,9 +22,13 @@ int main()
printf("#include \"wl_def.h\"\n");
printf("const word RLEWtag = 0x%x;\n", rlew);
printf("const maptype mapheaderseg[60] = {\n");
- f = fopen("gamemaps.wl6", "rb");
+ f = fopen("gamemaps." GAMEEXT, "rb");
for (i = 0; i < 60; i++)
{
+ if (!offsets[i]) {
+ printf ("{{0, 0}, {0,0}},\n");
+ continue;
+ }
fseek(f, offsets[i], SEEK_SET);
fread(&data, 2, 11, f);
printf("{{%d, %d}, {%d, %d}},\n",
View
@@ -1,13 +1,12 @@
-#include <stdio.h>
-#include <stdint.h>
+#include "wl_def.h"
int main()
{
uint16_t header[3];
uint32_t offsets[1024];
uint32_t size;
int i;
- FILE *f = fopen("vswap.wl6", "rb");
+ FILE *f = fopen("vswap." GAMEEXT, "rb");
if (!f)
return 1;
fread(header, 2, 3, f);
View
@@ -6,15 +6,15 @@ int main()
int val;
printf("#include \"wl_def.h\"\n");
- printf("#ifdef LUMINARY\n");
+ //printf("#ifdef LUMINARY\n");
printf("const byte pal4bit[256] = {\n");
for (i = 0; i < 256; i++) {
val = gamepal[i * 3] + gamepal[i * 3 + 1] + gamepal[i * 3 + 2];
val = (val / 3) >> 2;
printf("0x%02x,\n", val);
}
printf("};\n");
- printf("#endif\n");
+ //printf("#endif\n");
return 0;
}
View
@@ -42,7 +42,7 @@ int main()
int i;
int size;
int compressed;
- FILE *f = fopen("vgagraph.wl6", "rb");
+ FILE *f = fopen("vgagraph." GAMEEXT, "rb");
if (!f)
return 1;
@@ -59,8 +59,10 @@ int main()
CAL_HuffExpand(source, p, size, grhuffman);
printf("#include \"wl_def.h\"\n");
- printf("const pictabletype pictable[%d] = {\n", size / 4);
- for (i = 0; i < size / 4; i++)
+ printf("const pictabletype pictable[NUMPICS] = {\n", NUMPICS);
+ if (size / 4 < NUMPICS)
+ printf("#error NUMPICS > %d\n", size / 4);
+ for (i = 0; i < NUMPICS; i++)
{
printf("{%d,%d},\n", p[0] | (p[1] << 8), p[2] | (p[3] << 8));
p += 4;
View
@@ -76,7 +76,7 @@ int main()
int i;
int j;
byte buf[4096];
- FILE *f = fopen ("vswap.wl6", "rb");
+ FILE *f = fopen ("vswap." GAMEEXT, "rb");
if (!f)
return 1;
View
@@ -17,7 +17,7 @@
*/
#ifndef WMODE
-#define WMODE 1
+#define WMODE 0
#endif
/* define WOLF92 if you have full version of Wolfenstein 3D dated 1992 */
@@ -54,7 +54,9 @@
#if WMODE == 0
/* #define SPEAR */
/* #define SPEARDEMO */
+#ifndef EMBEDDED
#define UPLOAD
+#endif
#define GAMENAME "Wolfenstein 3D Shareware"
#define GAMEEXT "wl1"
#define GAMETYPE "WL1\0"
View
@@ -224,8 +224,10 @@ void IN_Startup(void)
INL_StartKbd();
+#ifdef ENABLE_JOYSTICK
for (i = 0;i < MaxJoys;i++)
JoysPresent[i] = checkjoys ? INL_StartJoy(i) : false;
+#endif
IN_Started = true;
}
View
@@ -5,8 +5,8 @@
extern byte *gfxbuf;
-#ifdef LUMINARY
extern const byte pal4bit[256];
+#ifdef LUMINARY
#define ROMAREA __attribute__((section(".romchunk")))
#else
#define ROMAREA
View
@@ -346,10 +346,12 @@ myint ReadConfig()
if (v != 0xFFFFFFFF) {
}
}
+#ifndef EMBEDDED
#ifdef UPLOAD
MainMenu[readthis].active = 1;
MainItems.curpos = 0;
#endif
+#endif
configokay = 1;
}
View
@@ -2582,7 +2582,9 @@ void DrawOutline(myint x,myint y,myint w,myint h,myint color1,myint color2)
////////////////////////////////////////////////////////////////////
void SetupControlPanel()
{
+#ifndef EMBEDDED
myint which;
+#endif
//
// CACHE GRAPHICS & SOUNDS
@@ -2647,7 +2649,7 @@ void SetupControlPanel()
}
} while(_findnext(hand, &f) != -1);
#else
-#ifndef __arm__
+#ifndef EMBEDDED
glob_t globbuf;
myint x;
@@ -3374,12 +3376,14 @@ void CheckForEpisodes()
// ENGLISH
//
/* Hardcode release. */
- strcpy(extension, "wl6");
+ strcpy(extension, GAMEEXT);
+#ifndef UPLOAD
NewEmenuActive[2] =
NewEmenuActive[4] =
NewEmenuActive[6] =
NewEmenuActive[8] =
- NewEmenuActive[10] =
+ NewEmenuActive[10] = 1;
+#endif
#endif

0 comments on commit de44c88

Please sign in to comment.