-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
2,795 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Project: gbadoom | ||
# Makefile created by Dev-C++ 4.9.9.2 | ||
|
||
CPP = g++.exe | ||
CC = gcc.exe | ||
WINDRES = windres.exe | ||
RES = gbadoom_private.res | ||
OBJ = main.o $(RES) | ||
LINKOBJ = main.o $(RES) | ||
LIBS = -L"C:/Dev-Cpp/lib" -mwindows ../../Dev-Cpp/lib/libwinmm.a | ||
INCS = -I"C:/Dev-Cpp/include" | ||
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" | ||
BIN = gbadoom.exe | ||
CXXFLAGS = $(CXXINCS) | ||
CFLAGS = $(INCS) | ||
RM = rm -f | ||
|
||
.PHONY: all all-before all-after clean clean-custom | ||
|
||
all: all-before gbadoom.exe all-after | ||
|
||
|
||
clean: clean-custom | ||
${RM} $(OBJ) $(BIN) | ||
|
||
$(BIN): $(OBJ) | ||
$(CC) $(LINKOBJ) -o "gbadoom.exe" $(LIBS) | ||
|
||
main.o: main.c | ||
$(CC) -c main.c -o main.o $(CFLAGS) | ||
|
||
gbadoom_private.res: gbadoom_private.rc gbadoom.rc | ||
$(WINDRES) -i gbadoom_private.rc --input-format=rc -o gbadoom_private.res -O coff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
#ifndef __DEFS_H__ | ||
#define __DEFS_H__ | ||
|
||
#define IMG_WPNX 128 | ||
#define IMG_WPNY 128 | ||
|
||
#define NUM_MAP_LUMPS 11 | ||
|
||
#define OFFS_SOUDS 0x030EE2 | ||
#define OFFS_SNDTAB 0x92ADC | ||
#define OFFS_WAD 0x0942BC | ||
#define OFFS_LEAFTAB 0x06C76D0 | ||
#define OFFS_NAMETAB 0x05D6858 | ||
#define OFFS_FRAME 0x06BEE9C | ||
#define OFFS_MOBJ 0x06C1DDC | ||
#define OFFS_SPRFRM 0x06C3A0C | ||
#define OFFS_SPRDEF 0x06C73F8 | ||
// real sounds start 0x092A5C | ||
#define OFFS_SBAR 0x04FD070 | ||
|
||
#define SNDSIZE 400103 | ||
#define WADSIZE 4623792 | ||
#define MAX_SNDTAB 52 | ||
#define MAX_NAMETAB 91 | ||
#define MAX_FRAMES 337 | ||
#define MAX_MOBJ 81 | ||
|
||
// 0x006A6E1C - anim, switch | ||
|
||
#define MODE_NONE 0 | ||
#define MODE_FLATS 1 | ||
#define MODE_TEXTURES 2 | ||
#define MODE_PATCHES 3 | ||
#define MODE_SPRITES 4 | ||
#define MODE_OTHER 5 | ||
#define MODE_MAPS 6 | ||
#define MODE_SOUNDS 7 | ||
#define MODE_HACKS 8 | ||
#define MODE_SPRNAMES 11 | ||
|
||
#define TYPE_NONE 0 | ||
#define TYPE_SPRITE 1 | ||
#define TYPE_TEXTURE 2 | ||
#define TYPE_FLAT 3 | ||
#define TYPE_PATCH 4 | ||
#define TYPE_MAP 5 | ||
#define TYPE_TEXHACK 6 | ||
|
||
typedef unsigned char byte; | ||
|
||
typedef struct wadhead_s { | ||
int id; | ||
int numlumps; | ||
int offset; | ||
} wadhead_t; | ||
|
||
typedef struct waditem_s { | ||
int offset; | ||
int size; | ||
byte name[8]; | ||
} waditem_t; | ||
|
||
typedef struct item_s { | ||
struct item_s *next; | ||
struct item_s *prev; | ||
int type; | ||
int size; | ||
char name[8]; | ||
byte data[]; | ||
} item_t; | ||
|
||
typedef struct { | ||
int numtextures; | ||
int table[]; | ||
} texhead_t; | ||
|
||
typedef struct { | ||
char name[8]; | ||
int masked; | ||
short width; | ||
short height; | ||
int ignored; | ||
short numpatches; // 1 | ||
short x; | ||
short y; | ||
short num; | ||
short unk[2]; | ||
} texitem_t; | ||
|
||
typedef struct { | ||
short width; | ||
short height; | ||
short id; // 3 | ||
short unk1; | ||
int unk2[2]; | ||
} patchhead_t; | ||
|
||
typedef struct { | ||
short width; | ||
short height; | ||
unsigned short xoffs; | ||
unsigned short yoffs; | ||
} sprhead_t; | ||
|
||
typedef struct { | ||
byte start; | ||
byte num; | ||
unsigned short offs; | ||
} sprdata_t; | ||
|
||
typedef struct { | ||
unsigned int offs; | ||
unsigned int size; // real = size << 4; | ||
int unk2; | ||
int unk3; | ||
} sound_t; | ||
|
||
typedef struct { | ||
char name[8]; | ||
} sprname_t; | ||
|
||
typedef struct | ||
{ | ||
int rotate; | ||
int lump[8]; | ||
byte flip[8]; | ||
} spriteframe_t; | ||
|
||
typedef struct | ||
{ | ||
int numframes; | ||
int offset; | ||
} spritedef_t; | ||
|
||
typedef struct { | ||
unsigned short signature; // 0x4D42 | ||
unsigned int filesize; | ||
unsigned short reserved[2]; // 0 | ||
unsigned int imgstart; | ||
unsigned int headsize; // 40 | ||
unsigned int width; | ||
unsigned int height; | ||
unsigned short planes; // 1 | ||
unsigned short bpp; // 1, 4, 8, 24, 32 | ||
unsigned int compres; // 0 | ||
unsigned int imgsize; | ||
unsigned int etc[4]; | ||
} __attribute__((packed)) bmphead_t; | ||
|
||
typedef struct { | ||
int riff; // 0x46464952 | ||
int size; // soundsize + 36 | ||
int wave; // 0x45564157 | ||
int fmt; // 0x20746d66 | ||
int size2; // 16 | ||
short format; // 1 | ||
short channels; // 1 | ||
int rate; // 8000 | ||
int brate; // 8000 | ||
short align; // 1 | ||
short bits; // 8 | ||
int data; // 0x61746164 | ||
int soundsize; | ||
} __attribute__((packed)) wavhead_t; | ||
|
||
typedef struct | ||
{ | ||
int sprite; | ||
int frame; | ||
int tics; | ||
int action; | ||
int nextstate; | ||
int misc1, misc2; | ||
} state_t; | ||
|
||
typedef struct { | ||
int doomednum; | ||
int spawnstate; | ||
int spawnhealth; | ||
int seestate; | ||
int seesound; | ||
int reactiontime; | ||
int attacksound; | ||
int painstate; | ||
int painchance; | ||
int painsound; | ||
int meleestate; | ||
int missilestate; | ||
int deathstate; | ||
int xdeathstate; | ||
int deathsound; | ||
int speed; | ||
int radius; | ||
int height; | ||
int mass; | ||
int damage; | ||
int activesound; | ||
int flags; | ||
} mobjinfo_t; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
[Project] | ||
FileName=gbadoom.dev | ||
Name=gbadoom | ||
UnitCount=4 | ||
Type=0 | ||
Ver=1 | ||
ObjFiles= | ||
Includes= | ||
Libs= | ||
PrivateResource=gbadoom_private.rc | ||
ResourceIncludes= | ||
MakeIncludes= | ||
Compiler= | ||
CppCompiler= | ||
Linker=../../Dev-Cpp/lib/libwinmm.a_@@_ | ||
IsCpp=0 | ||
Icon= | ||
ExeOutput= | ||
ObjectOutput= | ||
OverrideOutput=0 | ||
OverrideOutputName=gbadoom.exe | ||
HostApplication= | ||
Folders= | ||
CommandLine= | ||
UseCustomMakefile=0 | ||
CustomMakefile= | ||
IncludeVersionInfo=0 | ||
SupportXPThemes=0 | ||
CompilerSet=0 | ||
CompilerSettings=0000000000000000000000 | ||
|
||
[Unit1] | ||
FileName=main.c | ||
CompileCpp=0 | ||
Folder= | ||
Compile=1 | ||
Link=1 | ||
Priority=1000 | ||
OverrideBuildCmd=0 | ||
BuildCmd= | ||
|
||
[Unit2] | ||
FileName=resource.h | ||
CompileCpp=0 | ||
Folder=gbadoom | ||
Compile=1 | ||
Link=1 | ||
Priority=1000 | ||
OverrideBuildCmd=0 | ||
BuildCmd= | ||
|
||
[VersionInfo] | ||
Major=0 | ||
Minor=1 | ||
Release=1 | ||
Build=1 | ||
LanguageID=1033 | ||
CharsetID=1252 | ||
CompanyName= | ||
FileVersion= | ||
FileDescription=Developed using the Dev-C++ IDE | ||
InternalName= | ||
LegalCopyright= | ||
LegalTrademarks= | ||
OriginalFilename= | ||
ProductName= | ||
ProductVersion= | ||
AutoIncBuildNr=0 | ||
|
||
[Unit3] | ||
FileName=gbadoom.rc | ||
Folder=gbadoom | ||
Compile=1 | ||
Link=0 | ||
Priority=1000 | ||
OverrideBuildCmd=0 | ||
BuildCmd= | ||
|
||
[Unit4] | ||
FileName=defs.h | ||
CompileCpp=0 | ||
Folder= | ||
Compile=1 | ||
Link=1 | ||
Priority=1000 | ||
OverrideBuildCmd=0 | ||
BuildCmd= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[Editor_2] | ||
CursorCol=19 | ||
CursorRow=4 | ||
TopLine=1 | ||
LeftChar=1 | ||
Open=1 | ||
Top=0 | ||
[Editors] | ||
Focused=0 | ||
Order=0,3,1,2 | ||
[Editor_0] | ||
Open=1 | ||
Top=1 | ||
CursorCol=4 | ||
CursorRow=129 | ||
TopLine=124 | ||
LeftChar=1 | ||
[Editor_1] | ||
Open=1 | ||
Top=0 | ||
CursorCol=23 | ||
CursorRow=6 | ||
TopLine=1 | ||
LeftChar=1 | ||
[Editor_3] | ||
Open=1 | ||
Top=0 | ||
CursorCol=12 | ||
CursorRow=169 | ||
TopLine=155 | ||
LeftChar=1 |
Oops, something went wrong.