aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-04-08 17:06:49 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-04-08 17:06:49 -0400
commit35c7d107799047b22b2c80a6d765719c1c5c6a76 (patch)
tree07ae034224881aa3e5d8a99259301d4b9bedf969
parent0b89dd1d4ada50e2299af967dc10af2daf95bba1 (diff)
downloadgemworm-35c7d107799047b22b2c80a6d765719c1c5c6a76.zip
gemworm-35c7d107799047b22b2c80a6d765719c1c5c6a76.tar.gz
Removing all support for PC GEM. Long time coming...
-rw-r--r--makefile24
-rw-r--r--readme.txt19
-rw-r--r--scores.c6
-rw-r--r--util.h5
-rw-r--r--worm.c43
-rw-r--r--wormpc.dfnbin324 -> 0 bytes
-rw-r--r--wormpc.h24
-rw-r--r--wormpc.rscbin2086 -> 0 bytes
8 files changed, 9 insertions, 112 deletions
diff --git a/makefile b/makefile
deleted file mode 100644
index 3a7add1..0000000
--- a/makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-# Note: you need the GEM library and includes accessible to
-# Turbo C for this to work
-
-CC=tcc
-CFLAGS=-ms -DPCGEM -DNEEDGSX -Id:\dos\tmp\newkit2\inc
-CLIBS=stcgem.lib
-TARGET=worm.app
-
-clean:
- del *.obj
- del *.app
-
-player.obj: player.c player.h field.h
- $(CC) $(CFLAGS) -c player.c
-
-field.obj: field.c player.h field.h util.h
- $(CC) $(CFLAGS) -c field.c
-
-scores.obj: scores.c scores.h
- $(CC) $(CFLAGS) -c scores.c
-
-all: worm.c player.h field.h wormpc.h util.h scores.h player.obj field.obj scores.obj
- $(CC) $(CFLAGS) -e$(TARGET) worm.c player.obj field.obj scores.obj $(CLIBS)
- \ No newline at end of file
diff --git a/readme.txt b/readme.txt
index 62cf0e7..8742b5f 100644
--- a/readme.txt
+++ b/readme.txt
@@ -14,8 +14,8 @@ the worm eats more, he continues to grow. You mustn't bump into yourself
or the walls, though, or your worm will die! Simple!
The program is written as a GEM programming demonstration, and probably
-contains numerous bugs, coding issues, etc. It has been designed to
-compile on either the PC or Atari.
+contains numerous bugs, coding issues, etc. While originally designed to
+compile on either the PC or Atari, the game now only works on the Atari.
Game Play
=========
@@ -35,18 +35,9 @@ Compiling
=========
If you have downloaded the source code, the game can be easily compiled
-for either the PC or Atari.
-
- - PC -
-
- The program has been designed to compile using Turbo C 2 from
- Borland. To compile with GEM bindings, you'll need to install
- the GEM Programmer's Toolkit first. A makefile is included to
- build the game.
-
- - Atari -
-
- The program is also designed to compile with AHCC from whoever
+for the Atari.
+
+ The program is designed to compile with AHCC from whoever
is maintaining that nowadays. The project used to be built with
Pure C, but the project file is now strictly AHCC (you could
make a Pure C project file, though). The appropriate AHCC
diff --git a/scores.c b/scores.c
index aa3975c..4ef8f28 100644
--- a/scores.c
+++ b/scores.c
@@ -19,12 +19,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef PCGEM
-#include "wormpc.h"
-#else
-#include "wormst.h"
-#endif
-
#define SCOREFILE "worm.hi"
struct score {
diff --git a/util.h b/util.h
index cdfc798..ef2f749 100644
--- a/util.h
+++ b/util.h
@@ -53,12 +53,7 @@ static void set_resource_string(OBJECT *tree, short obj, const char *string)
long addr;
/* What a freakin' nightmare... */
-#ifdef PCGEM
- addr = tree[obj].ob_spec;
-#else
addr = tree[obj].ob_spec.index;
-#endif
-
strcpy((char *)addr, string);
}
diff --git a/worm.c b/worm.c
index f2859ec..ff1518d 100644
--- a/worm.c
+++ b/worm.c
@@ -39,32 +39,13 @@
#endif /* __GNUC__ */
/* The proper resource header is dependent upon system */
-#ifdef PCGEM
-#include "wormpc.h"
-#else
#include "wormst.h"
-#endif
#include "util.h"
#include "field.h"
#include "player.h"
#include "scores.h"
-/* Sometimes you may need to compile in some missing global
- * arrays used within the gem libraries
- */
-#ifdef PCGEM
-#ifdef NEEDGSX
-GLOBAL WORD contrl[11]; /* control inputs */
-GLOBAL WORD intin[80]; /* max string length */
-GLOBAL WORD ptsin[256]; /* polygon fill points */
-GLOBAL WORD intout[45]; /* open workstation output */
-GLOBAL WORD ptsout[12];
-#endif
-#else
-#define FAR
-#endif
-
WORD app_wflags = NAME | CLOSER | MOVER | SIZER;
WORD app_accid;
WORD app_appid;
@@ -75,16 +56,12 @@ WORD app_vh; /* VDI handle */
char *app_title = "Worm";
GRECT app_wdw; /* xywh of working area */
-OBJECT FAR *app_menu;
-OBJECT FAR *about_box;
-OBJECT FAR *scores_box;
-OBJECT FAR *newscore_box;
+OBJECT *app_menu;
+OBJECT *about_box;
+OBJECT *scores_box;
+OBJECT *newscore_box;
-#ifdef PCGEM
-#define RCS_FILE "wormpc.rsc"
-#else
#define RCS_FILE "wormst.rsc"
-#endif
#define MOVEDELAY 300
@@ -118,12 +95,7 @@ TEDINFO *eted;
if(res == BOK) {
/* save! */
-#ifdef PCGEM
- eted = (TEDINFO *)(newscore_box[TINITIALS].ob_spec);
-#else
eted = (TEDINFO *)(newscore_box[TINITIALS].ob_spec.index);
-#endif
-
add_high_score((char *)eted->te_ptext, score);
}
@@ -176,16 +148,11 @@ int open_window(int new)
if(app_wh<=0)
return -1;
-#ifdef PCGEM
- wind_set(app_wh, WF_NAME, FPOFF(app_title), FPSEG(app_title), 0, 0);
-#else
-
#ifdef MGEMLIB
wind_set(app_wh, WF_NAME, HIWORD(app_title), LOWORD(app_title), 0, 0);
#else
wind_set(app_wh, WF_NAME, app_title);
#endif
-#endif
if(new == 1) {
/* Get the desktop */
@@ -244,9 +211,7 @@ WORD txtwidth,txtheight;
rsrc_gaddr(R_TREE,NEWSCORE,&newscore_box);
/* Make the application name nicer on Atari GEM */
-#ifndef PCGEM
menu_register(app_accid, "Worm!");
-#endif
return open_window(1);
}
diff --git a/wormpc.dfn b/wormpc.dfn
deleted file mode 100644
index 0eb9273..0000000
--- a/wormpc.dfn
+++ /dev/null
Binary files differ
diff --git a/wormpc.h b/wormpc.h
deleted file mode 100644
index 1a38d2b..0000000
--- a/wormpc.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#define RCMENU 0 /* TREE */
-#define MNEW 16 /* OBJECT in TREE #0 */
-#define MQUIT 19 /* OBJECT in TREE #0 */
-#define ABOUT 1 /* TREE */
-#define MPAUSE 17 /* OBJECT in TREE #0 */
-#define MSCORES 20 /* OBJECT in TREE #0 */
-#define BEXIT 12 /* OBJECT in TREE #1 */
-#define NEWSCORE 2 /* TREE */
-#define TINITIALS 1 /* OBJECT in TREE #2 */
-#define BOK 2 /* OBJECT in TREE #2 */
-#define BCANCEL 3 /* OBJECT in TREE #2 */
-#define HISCORES 3 /* TREE */
-#define BHIOK 12 /* OBJECT in TREE #3 */
-#define THI1 2 /* OBJECT in TREE #3 */
-#define THI2 3 /* OBJECT in TREE #3 */
-#define THI3 4 /* OBJECT in TREE #3 */
-#define THI4 5 /* OBJECT in TREE #3 */
-#define THI5 6 /* OBJECT in TREE #3 */
-#define THI6 7 /* OBJECT in TREE #3 */
-#define THI7 8 /* OBJECT in TREE #3 */
-#define THI8 9 /* OBJECT in TREE #3 */
-#define THI9 10 /* OBJECT in TREE #3 */
-#define THI10 11 /* OBJECT in TREE #3 */
-
diff --git a/wormpc.rsc b/wormpc.rsc
deleted file mode 100644
index 07d1c1a..0000000
--- a/wormpc.rsc
+++ /dev/null
Binary files differ