mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Move code non-specific to Duke Nukem 3D from astub.c to a new m32common.c.
DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4561 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
16cd8b8aaa
commit
a7fb2721e4
6 changed files with 1926 additions and 1864 deletions
|
@ -217,7 +217,7 @@ EDUKE32_TARGET:=$(EDUKE32)
|
|||
MAPSTER32_TARGET:=$(MAPSTER32)
|
||||
|
||||
COMMON_OBJS=rev
|
||||
COMMON_EDITOR_OBJS=m32def m32exec m32vars mathutil rev
|
||||
COMMON_EDITOR_OBJS=m32common m32def m32exec m32vars mathutil rev
|
||||
|
||||
DUKE3D_OBJS=game actors anim common config demo gamedef gameexec gamevars global input menus namesdyn net player premap savegame sector rts osdfuncs osdcmds grpscan sounds soundsdyn $(MACT_OBJ)
|
||||
DUKE3D_EDITOR_OBJS=astub common grpscan sounds_mapster32
|
||||
|
|
|
@ -224,6 +224,7 @@ DUKE3D_OBJS=$(DUKE3D_OBJ)\game.$o \
|
|||
DUKE3D_EDITOR_OBJS=$(DUKE3D_OBJ)\astub.$o \
|
||||
$(DUKE3D_OBJ)\common.$o \
|
||||
$(DUKE3D_OBJ)\mathutil.$o \
|
||||
$(DUKE3D_OBJ)\m32common.$o \
|
||||
$(DUKE3D_OBJ)\m32def.$o \
|
||||
$(DUKE3D_OBJ)\m32vars.$o \
|
||||
$(DUKE3D_OBJ)\m32exec.$o \
|
||||
|
|
|
@ -117,6 +117,8 @@ extern uint8_t graysectbitmap[MAXSECTORS>>3];
|
|||
extern uint8_t graywallbitmap[MAXWALLS>>3];
|
||||
extern int32_t autogray, showinnergray;
|
||||
|
||||
extern void drawgradient(void);
|
||||
|
||||
#ifdef YAX_ENABLE
|
||||
int32_t yax_is121(int16_t bunchnum, int16_t getfloor);
|
||||
#endif
|
||||
|
@ -133,6 +135,28 @@ extern int32_t kopen4loadfrommod(const char *filename, char searchfirst);
|
|||
extern int32_t map_revision;
|
||||
extern int32_t map_undoredo(int32_t dir);
|
||||
extern void map_undoredo_free(void);
|
||||
extern void create_map_snapshot(void);
|
||||
|
||||
typedef struct mapundo_
|
||||
{
|
||||
int32_t revision;
|
||||
int32_t num[3]; // numsectors, numwalls, numsprites
|
||||
|
||||
// These exist temporarily as sector/wall/sprite data, but are compressed
|
||||
// most of the time. +4 bytes refcount at the beginning.
|
||||
char *sws[3]; // sector, wall, sprite
|
||||
|
||||
uint32_t crc[3];
|
||||
|
||||
struct mapundo_ *next; // 'redo' loads this
|
||||
struct mapundo_ *prev; // 'undo' loads this
|
||||
} mapundo_t;
|
||||
extern mapundo_t *mapstate;
|
||||
|
||||
extern void FuncMenu(void);
|
||||
#ifdef LUNATIC
|
||||
extern void LuaFuncMenu(void);
|
||||
#endif
|
||||
|
||||
// editor side view
|
||||
extern int32_t m32_sideview;
|
||||
|
@ -200,6 +224,7 @@ extern const char *GetSaveBoardFilename(const char *fn);
|
|||
extern int32_t corruptlevel, numcorruptthings, corruptthings[MAXCORRUPTTHINGS];
|
||||
extern int32_t autocorruptcheck;
|
||||
extern int32_t corruptcheck_noalreadyrefd;
|
||||
extern int32_t corrupt_tryfix_alt;
|
||||
extern int32_t CheckMapCorruption(int32_t printfromlev, uint64_t tryfixing);
|
||||
|
||||
extern int32_t fixmaponsave_sprites;
|
||||
|
@ -225,14 +250,32 @@ void fade_editor_screen(int32_t keepcol);
|
|||
extern int32_t getnumber_internal1(char ch, int32_t *danumptr, int32_t maxnumber, char sign);
|
||||
extern int32_t getnumber_autocomplete(const char *namestart, char ch, int32_t *danum, int32_t flags);
|
||||
|
||||
// always CRLF for us
|
||||
#ifdef _WIN32
|
||||
# define OURNEWL "\n"
|
||||
#else
|
||||
# define OURNEWL "\r\n"
|
||||
#endif
|
||||
|
||||
#ifdef YAX_ENABLE
|
||||
extern const char *yupdownwall[2];
|
||||
extern const char *YUPDOWNWALL[2];
|
||||
#endif
|
||||
|
||||
int32_t _getnumber256(const char *namestart, int32_t num, int32_t maxnumber, char sign, const char *(func)(int32_t));
|
||||
#define getnumber256(namestart, num, maxnumber, sign) _getnumber256(namestart, num, maxnumber, sign, NULL)
|
||||
int32_t _getnumber16(const char *namestart, int32_t num, int32_t maxnumber, char sign, const char *(func)(int32_t));
|
||||
#define getnumber16(namestart, num, maxnumber, sign) _getnumber16(namestart, num, maxnumber, sign, NULL)
|
||||
void printmessage256(int32_t x, int32_t y, const char *name);
|
||||
void message(const char *fmt, ...) ATTRIBUTE((format(printf,1,2)));
|
||||
void silentmessage(const char *fmt, ...) ATTRIBUTE((format(printf,1,2)));
|
||||
extern int32_t AskIfSure(const char *text);
|
||||
|
||||
extern char getmessage[162], getmessageleng;
|
||||
extern int32_t getmessagetimeoff;
|
||||
|
||||
extern int32_t mouseaction;
|
||||
|
||||
const char* getstring_simple(const char *querystr, const char *defaultstr, int32_t maxlen, int32_t completion);
|
||||
|
||||
// like snprintf, but pads the output buffer with 'fill' at the end
|
||||
|
@ -271,6 +314,7 @@ extern uint8_t hlsectorbitmap[MAXSECTORS>>3];
|
|||
|
||||
void test_map(int32_t mode);
|
||||
|
||||
extern void M32RunScript(const char *s);
|
||||
|
||||
////////// tag labeling system //////////
|
||||
// max (strlen+1), i.e. array length to allocate for a tag label:
|
||||
|
|
File diff suppressed because it is too large
Load diff
1877
polymer/eduke32/source/m32common.c
Normal file
1877
polymer/eduke32/source/m32common.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -57,13 +57,11 @@ static char helpon=0;
|
|||
//static char onwater=0;
|
||||
static uint8_t onnames=4, usedcount=1;
|
||||
static int16_t cursprite;
|
||||
int32_t mousxplc, mousyplc;
|
||||
static int32_t ppointhighlight;
|
||||
//static int32_t counter=0;
|
||||
static uint8_t nosprites=0,purpleon=0,skill=4;
|
||||
static uint8_t framerateon=1,shadepreview=0;
|
||||
|
||||
int32_t autosave=180;
|
||||
static int32_t autosavetimer;
|
||||
|
||||
static void SearchSectors(int32_t dir);
|
||||
|
@ -73,10 +71,6 @@ static inline void SpriteName(int16_t spritenum, char *lo2);
|
|||
static void EditSpriteData(int16_t spritenum);
|
||||
static void EditWallData(int16_t wallnum);
|
||||
static void EditSectorData(int16_t sectnum);
|
||||
static void FuncMenu(void);
|
||||
#ifdef LUNATIC
|
||||
static void LuaFuncMenu(void);
|
||||
#endif
|
||||
|
||||
#define BASEPALCOUNT 6
|
||||
|
||||
|
@ -94,9 +88,6 @@ static int32_t g_firstFogPal;
|
|||
static int32_t updownunits=1024;
|
||||
|
||||
|
||||
static char getmessage[162], getmessageleng;
|
||||
static int32_t getmessagetimeoff; //, charsperline;
|
||||
|
||||
//int32_t intro=0;
|
||||
|
||||
static int32_t acurpalette=0;
|
||||
|
|
Loading…
Reference in a new issue