Rename types

master
Marrub 2017-10-04 23:19:27 -04:00
parent 348c4f2adb
commit de2d0b2bf6
18 changed files with 95 additions and 96 deletions

View File

@ -13,10 +13,10 @@
// //
// G_Missile_Fire // G_Missile_Fire
// //
void G_Missile_Fire(enum G_mslty type, unsigned owner, fixed x, fixed y, fixed z, ulfra yaw) void G_Missile_Fire(enum G_msltype type, unsigned owner, fixed x, fixed y, fixed z, ulfra yaw)
{ {
G_entit ot = {owner}; G_entity ot = {owner};
G_missl th = {DGE_MissileEntity_Create(0)}; G_missile th = {DGE_MissileEntity_Create(0)};
th.subtype = subtype_missile; th.subtype = subtype_missile;
th.x = ot.x + x; th.x = ot.x + x;

View File

@ -7,7 +7,7 @@
// Types ---------------------------------------------------------------------| // Types ---------------------------------------------------------------------|
enum G_mslty enum G_msltype
{ {
missile_p_basicL, missile_p_basicL,
missile_p_basicR, missile_p_basicR,
@ -15,6 +15,6 @@ enum G_mslty
// Extern Functions ----------------------------------------------------------| // Extern Functions ----------------------------------------------------------|
void G_Missile_Fire(enum G_mslty type, unsigned owner, fixed x, fixed y, fixed z, ulfra yaw); void G_Missile_Fire(enum G_msltype type, unsigned owner, fixed x, fixed y, fixed z, ulfra yaw);
#endif #endif

View File

@ -52,7 +52,7 @@
_Noreturn static void G_ObjDef_throw (struct G_dodst *st, char const *emsg); _Noreturn static void G_ObjDef_throw (struct G_dodst *st, char const *emsg);
[[__optional_args(1)]] [[__optional_args(1)]]
static M_token *G_ObjDef_expect (struct G_dodst *st, M_tokty t, char const *exp); static M_token *G_ObjDef_expect (struct G_dodst *st, M_toktype t, char const *exp);
[[__optional_args(1)]] [[__optional_args(1)]]
static struct G_odarg G_ObjDef_getArgs (struct G_dodst *st, char const *arg); static struct G_odarg G_ObjDef_getArgs (struct G_dodst *st, char const *arg);
@ -107,8 +107,8 @@ typedef struct G_otdcl
typedef struct G_etdcl typedef struct G_etdcl
{ {
G_entty type; G_enttype type;
G_anims anim; G_anims anim;
M_Vec_decl(struct G_manim, anims); M_Vec_decl(struct G_manim, anims);
char name[32]; char name[32];
size_t keyhash; size_t keyhash;
@ -126,15 +126,15 @@ typedef struct G_frdcl
typedef struct G_andcl typedef struct G_andcl
{ {
M_Vec_decl(G_frame, frame); M_Vec_decl(G_frame, frame);
G_anima anim; G_anim anim;
char name[32]; char name[32];
size_t keyhash; size_t keyhash;
struct G_andcl *next, **prev; struct G_andcl *next, **prev;
} G_andcl; } G_andcl;
typedef struct G_manim typedef struct G_manim
{ {
G_anima anim; G_anim anim;
char name[32]; char name[32];
size_t keyhash; size_t keyhash;
struct G_manim *next, **prev; struct G_manim *next, **prev;
@ -189,7 +189,7 @@ static enum M_tkprc G_ObjDef_tokProcess(M_token *tok, void *udata)
// //
// G_ObjDef_expect // G_ObjDef_expect
// //
static M_token *G_ObjDef_expect(G_dodst *st, M_tokty t, char const *exp) static M_token *G_ObjDef_expect(G_dodst *st, M_toktype t, char const *exp)
{ {
M_token *tok; M_token *tok;
if((tok = st->getToken())->type != t) { if((tok = st->getToken())->type != t) {
@ -267,7 +267,7 @@ static void G_ObjDef_getEntAnim(G_dodst *st, G_etdcl *decl)
// //
// G_ObjDef_getEntProp // G_ObjDef_getEntProp
// //
static void G_ObjDef_getEntProp(G_dodst *st, G_entty *type, char const *id) static void G_ObjDef_getEntProp(G_dodst *st, G_enttype *type, char const *id)
{ {
if(strcmp(id, "subtype") == 0) if(strcmp(id, "subtype") == 0)
{ {
@ -421,7 +421,7 @@ static void G_ObjDef_parseAnimDef(G_dodst *st)
while(!st->drop(tok_bracec)) while(!st->drop(tok_bracec))
G_ObjDef_parseAnim(st, decl); G_ObjDef_parseAnim(st, decl);
decl->anim = (G_anima){decl->frameV, decl->frameC}; decl->anim = (G_anim){decl->frameV, decl->frameC};
if(ins) { if(ins) {
decl->keyhash = M_StrHash(decl->name); decl->keyhash = M_StrHash(decl->name);
@ -553,7 +553,7 @@ void G_ObjDef_AddType(char const *name, mword subtype, mword ext, DGE_CallbackTy
// //
// G_ObjDef_GetType // G_ObjDef_GetType
// //
G_entty const *G_ObjDef_GetType(char const *name) G_enttype const *G_ObjDef_GetType(char const *name)
{ {
G_etdcl const *decl = G_enttypes.find(name); G_etdcl const *decl = G_enttypes.find(name);
return decl ? &decl->type : NULL; return decl ? &decl->type : NULL;
@ -562,7 +562,7 @@ G_entty const *G_ObjDef_GetType(char const *name)
// //
// G_ObjDef_GetTAni // G_ObjDef_GetTAni
// //
G_anima const *G_ObjDef_GetTAni(G_entty const *type, char const *name) G_anim const *G_ObjDef_GetTAni(G_enttype const *type, char const *name)
{ {
G_manim *anim = ((G_etdcl *)type)->anim.find(name); G_manim *anim = ((G_etdcl *)type)->anim.find(name);
return anim ? &anim->anim : NULL; return anim ? &anim->anim : NULL;
@ -571,7 +571,7 @@ G_anima const *G_ObjDef_GetTAni(G_entty const *type, char const *name)
// //
// G_ObjDef_GetAnim // G_ObjDef_GetAnim
// //
G_anima const *G_ObjDef_GetAnim(char const *name) G_anim const *G_ObjDef_GetAnim(char const *name)
{ {
G_andcl *an = G_animsmap.find(name); G_andcl *an = G_animsmap.find(name);
return an ? &an->anim : NULL; return an ? &an->anim : NULL;

View File

@ -26,24 +26,24 @@
// Extern Functions ----------------------------------------------------------| // Extern Functions ----------------------------------------------------------|
struct G_entty const *G_ObjDef_GetType(char const *name); struct G_enttype const *G_ObjDef_GetType(char const *name);
struct G_anima const *G_ObjDef_GetTAni(struct G_entty const *type, char const *name); struct G_anim const *G_ObjDef_GetTAni(struct G_enttype const *type, char const *name);
// Types ---------------------------------------------------------------------| // Types ---------------------------------------------------------------------|
typedef struct G_frame // Frame typedef struct G_frame
{ {
integ time; integ time;
M_texid sprite; M_texid sprite;
} G_frame; } G_frame;
typedef struct G_anima // Animation typedef struct G_anim
{ {
G_frame const *frame; G_frame const *frame;
msize count; msize count;
} G_anima; } G_anim;
typedef struct G_entty // Entity Type typedef struct G_enttype
{ {
__prop getAnim {call: G_ObjDef_GetTAni(this)} __prop getAnim {call: G_ObjDef_GetTAni(this)}
@ -56,11 +56,11 @@ typedef struct G_entty // Entity Type
mword subtype; mword subtype;
mword ext; mword ext;
DGE_CallbackType task; DGE_CallbackType task;
} G_entty; } G_enttype;
// Extern Functions ----------------------------------------------------------| // Extern Functions ----------------------------------------------------------|
G_anima const *G_ObjDef_GetAnim(char const *name); G_anim const *G_ObjDef_GetAnim(char const *name);
void G_ObjDef_Init(void); void G_ObjDef_Init(void);
void G_ObjDef_Load(char const *fname); void G_ObjDef_Load(char const *fname);
void G_ObjDef_AddType(char const *name, mword subtype, mword ext, DGE_CallbackType fptr); void G_ObjDef_AddType(char const *name, mword subtype, mword ext, DGE_CallbackType fptr);

View File

@ -15,7 +15,7 @@
// //
void G_RenderThinker_Animate(unsigned id) void G_RenderThinker_Animate(unsigned id)
{ {
G_rthnk th = {id}; G_renderth th = {id};
if(th.ftime > 0) if(th.ftime > 0)
th.ftime = th.ftime - 1; th.ftime = th.ftime - 1;
@ -37,9 +37,9 @@ void G_RenderThinker_Animate(unsigned id)
// //
// G_RenderThinker_AnimSet // G_RenderThinker_AnimSet
// //
void G_RenderThinker_AnimSet(unsigned id, G_anima const *anim) void G_RenderThinker_AnimSet(unsigned id, G_anim const *anim)
{ {
G_rthnk th = {id}; G_renderth th = {id};
if(anim && th.curanim != anim) if(anim && th.curanim != anim)
{ {
@ -52,9 +52,9 @@ void G_RenderThinker_AnimSet(unsigned id, G_anima const *anim)
// //
// G_RenderThinker_AnimSetForced // G_RenderThinker_AnimSetForced
// //
void G_RenderThinker_AnimSetForced(unsigned id, G_anima const *anim) void G_RenderThinker_AnimSetForced(unsigned id, G_anim const *anim)
{ {
G_rthnk th = {id}; G_renderth th = {id};
th.curanim = anim; th.curanim = anim;
th.frame = 0; th.frame = 0;
@ -64,11 +64,11 @@ void G_RenderThinker_AnimSetForced(unsigned id, G_anima const *anim)
// //
// G_Entity_Create // G_Entity_Create
// //
void G_Entity_Create(G_mfdat *info) void G_Entity_Create(G_mapdata *info)
{ {
G_entty const *type = G_ObjDef_GetType(info->ent.name); G_enttype const *type = G_ObjDef_GetType(info->ent.name);
G_entit ent = {DGE_Entity_Create(type ? type->ext : 0)}; G_entity ent = {DGE_Entity_Create(type ? type->ext : 0)};
ent.x = info->ent.x; ent.x = info->ent.x;
ent.y = info->ent.y; ent.y = info->ent.y;
@ -89,7 +89,7 @@ void G_Entity_Create(G_mfdat *info)
// //
// G_Sector_Create // G_Sector_Create
// //
void G_Sector_Create(G_mfdat *info) void G_Sector_Create(G_mapdata *info)
{ {
DGE_Sector sec = {DGE_Sector_Create(4, 0)}; DGE_Sector sec = {DGE_Sector_Create(4, 0)};

View File

@ -24,9 +24,9 @@
G_propMemIEM(RenderThinker, ofs, t, name) G_propMemIEM(RenderThinker, ofs, t, name)
#define G_RenderThinker_propExt() \ #define G_RenderThinker_propExt() \
G_propMemGEM(RenderThinker, unsigned, frame) \ G_propMemGEM(RenderThinker, unsigned, frame) \
G_propMemGEM(RenderThinker, unsigned, ftime) \ G_propMemGEM(RenderThinker, unsigned, ftime) \
G_propMemGEM(RenderThinker, G_anima const *, curanim) \ G_propMemGEM(RenderThinker, G_anim const *, curanim) \
__prop animate {__call: G_RenderThinker_Animate(->id)} \ __prop animate {__call: G_RenderThinker_Animate(->id)} \
__prop setAnim {__call: G_RenderThinker_AnimSet(->id)} \ __prop setAnim {__call: G_RenderThinker_AnimSet(->id)} \
__prop fsetAnim {__call: G_RenderThinker_AnimSetForced(->id)} __prop fsetAnim {__call: G_RenderThinker_AnimSetForced(->id)}
@ -36,13 +36,13 @@
// Extern Functions ----------------------------------------------------------| // Extern Functions ----------------------------------------------------------|
void G_RenderThinker_Animate(unsigned id); void G_RenderThinker_Animate (unsigned id);
void G_RenderThinker_AnimSet(unsigned id, G_anima const *anim); void G_RenderThinker_AnimSet (unsigned id, G_anim const *anim);
void G_RenderThinker_AnimSetForced(unsigned id, G_anima const *anim); void G_RenderThinker_AnimSetForced(unsigned id, G_anim const *anim);
// Types ---------------------------------------------------------------------| // Types ---------------------------------------------------------------------|
enum G_subty enum G_subtype
{ {
subtype_none, subtype_none,
subtype_missile, subtype_missile,
@ -53,36 +53,36 @@ enum G_subty
#define G_RenderThinker_props() DGE_RenderThinkerProps() \ #define G_RenderThinker_props() DGE_RenderThinkerProps() \
G_RenderThinker_propExt() G_RenderThinker_propExt()
typedef struct G_rthnk // Render Thinker typedef struct G_renderth
{ {
int id; int id;
G_RenderThinker_props() G_RenderThinker_props()
} G_rthnk; } G_renderth;
#define G_Entity_props() DGE_EntityProps() \ #define G_Entity_props() DGE_EntityProps() \
G_RenderThinker_propExt() \ G_RenderThinker_propExt() \
G_Entity_propExt() G_Entity_propExt()
typedef struct G_entit // Entity typedef struct G_entity
{ {
int id; int id;
G_Entity_props() G_Entity_props()
} G_entit; } G_entity;
#define G_Missile_props() DGE_MissileEntityProps() \ #define G_Missile_props() DGE_MissileEntityProps() \
G_RenderThinker_propExt() \ G_RenderThinker_propExt() \
G_Entity_propExt() G_Entity_propExt()
typedef struct G_missl // Missile typedef struct G_missile
{ {
int id; int id;
G_Missile_props() G_Missile_props()
} G_missl; } G_missile;
// Extern Functions ----------------------------------------------------------| // Extern Functions ----------------------------------------------------------|
void G_Entity_Create(union G_mfdat *info); void G_Entity_Create(union G_mapdata *info);
void G_Sector_Create(union G_mfdat *info); void G_Sector_Create(union G_mapdata *info);
#endif #endif

View File

@ -23,7 +23,7 @@ int G_Player_Count;
// //
// G_Player_applyVelocity // G_Player_applyVelocity
// //
static void G_Player_applyVelocity(G_entty const *ty, G_playr th) static void G_Player_applyVelocity(G_enttype const *ty, G_player th)
{ {
DGE_Point3R ax = DGE_Input_GetAxis(1); DGE_Point3R ax = DGE_Input_GetAxis(1);
accum vx = (accum)ax.x, vy = (accum)ax.y; accum vx = (accum)ax.x, vy = (accum)ax.y;
@ -54,10 +54,10 @@ static void G_Player_applyVelocity(G_entty const *ty, G_playr th)
// G_Player_Think // G_Player_Think
// //
DGE_Callback DGE_Callback
void G_Player_Think(G_entty const *ty, unsigned id) void G_Player_Think(G_enttype const *ty, unsigned id)
{ {
G_playr th = {id}; G_player th = {id};
G_rthnk shot = {DGE_RenderThinker_Create(0)}; G_renderth shot = {DGE_RenderThinker_Create(0)};
shot.rsx = 30; shot.rsx = 30;
shot.rsy = 24; shot.rsy = 24;

View File

@ -24,20 +24,19 @@ enum
G_Player_propMem(unsigned, lives) \ G_Player_propMem(unsigned, lives) \
G_Player_propMem(DGE_Accum, lvx) \ G_Player_propMem(DGE_Accum, lvx) \
G_Player_propMem(unsigned, nextfire) G_Player_propMem(unsigned, nextfire)
typedef struct G_playr // Player typedef struct G_player
{ {
int id; int id;
G_Player_props() G_Player_props()
} G_playr; } G_player;
// Extern Objects ------------------------------------------------------------| // Extern Objects ------------------------------------------------------------|
extern int G_Player_Count; extern int G_Player_Count;
extern G_playr G_Player_InGame[G_Player_max];
// Extern Functions ----------------------------------------------------------| // Extern Functions ----------------------------------------------------------|
DGE_Callback void G_Player_Think(G_entty const *ty, unsigned id); DGE_Callback void G_Player_Think(G_enttype const *ty, unsigned id);
#endif #endif

View File

@ -26,7 +26,7 @@ unsigned long G_Time;
static void G_Stage_readSector(FILE *fp, G_stage *s, hword *size, mword time) static void G_Stage_readSector(FILE *fp, G_stage *s, hword *size, mword time)
{ {
*size -= 4 * 6; *size -= 4 * 6;
G_mfsec sec; G_mapsector sec;
sec.x = M_IO_ReadLE4k(fp); sec.x = M_IO_ReadLE4k(fp);
sec.y = M_IO_ReadLE4k(fp); sec.y = M_IO_ReadLE4k(fp);
sec.w = M_IO_ReadLE4k(fp); sec.w = M_IO_ReadLE4k(fp);
@ -34,7 +34,7 @@ static void G_Stage_readSector(FILE *fp, G_stage *s, hword *size, mword time)
sec.f = M_IO_ReadLE4k(fp); sec.f = M_IO_ReadLE4k(fp);
sec.c = M_IO_ReadLE4k(fp); sec.c = M_IO_ReadLE4k(fp);
M_Vec_grow(s->map, 1); M_Vec_grow(s->map, 1);
M_Vec_next(s->map) = (G_mfptr){time, {.sec = sec}, G_Sector_Create}; M_Vec_next(s->map) = (G_mapobj){time, {.sec = sec}, G_Sector_Create};
} }
// //
@ -43,13 +43,13 @@ static void G_Stage_readSector(FILE *fp, G_stage *s, hword *size, mword time)
static void G_Stage_readEntity(FILE *fp, G_stage *s, hword *size, mword time, char *name) static void G_Stage_readEntity(FILE *fp, G_stage *s, hword *size, mword time, char *name)
{ {
*size -= 4 * 3; *size -= 4 * 3;
G_mfent ent; G_mapentity ent;
ent.x = M_IO_ReadLE4k(fp); ent.x = M_IO_ReadLE4k(fp);
ent.y = M_IO_ReadLE4k(fp); ent.y = M_IO_ReadLE4k(fp);
ent.z = M_IO_ReadLE4k(fp); ent.z = M_IO_ReadLE4k(fp);
M_strbufcpy(ent.name, name); M_strbufcpy(ent.name, name);
M_Vec_grow(s->map, 1); M_Vec_grow(s->map, 1);
M_Vec_next(s->map) = (G_mfptr){time, {.ent = ent}, G_Entity_Create}; M_Vec_next(s->map) = (G_mapobj){time, {.ent = ent}, G_Entity_Create};
} }
// Extern Functions ----------------------------------------------------------| // Extern Functions ----------------------------------------------------------|

View File

@ -8,36 +8,36 @@
// Types ---------------------------------------------------------------------| // Types ---------------------------------------------------------------------|
typedef struct G_mfsec typedef struct G_mapsector
{ {
fixed x, y; fixed x, y;
fixed w, h; fixed w, h;
fixed f, c; fixed f, c;
} G_mfsec; } G_mapsector;
typedef struct G_mfent typedef struct G_mapentity
{ {
fixed x, y, z; fixed x, y, z;
char name[32]; char name[32];
} G_mfent; } G_mapentity;
typedef union G_mfdat typedef union G_mapdata
{ {
G_mfsec sec; G_mapsector sec;
G_mfent ent; G_mapentity ent;
} G_mfdat; } G_mapdata;
typedef struct G_mfptr typedef struct G_mapobj
{ {
mword time; mword time;
G_mfdat data; G_mapdata data;
void (*proc)(G_mfdat *data); void (*proc)(G_mapdata *data);
} G_mfptr; } G_mapobj;
typedef struct G_stage typedef struct G_stage
{ {
M_Vec_decl(G_mfptr, map); M_Vec_decl(G_mapobj, map);
} G_stage; } G_stage;
// Extern Objects ------------------------------------------------------------| // Extern Objects ------------------------------------------------------------|

View File

@ -17,7 +17,7 @@ static jmp_buf ejmp;
// //
// Expect // Expect
// //
static M_token *Expect(M_tkbuf *tb, M_tokty t) static M_token *Expect(M_tkbuf *tb, M_toktype t)
{ {
M_token *tok = M_TokBuf_Get(tb); M_token *tok = M_TokBuf_Get(tb);
if(tok->type != t) { if(tok->type != t) {

View File

@ -9,7 +9,7 @@
// //
// I_GUI_auto // I_GUI_auto
// //
static void I_GUI_auto(I_gictx *g, I_objid id, int xl, int yl, int xu, int yu) static void I_GUI_auto(I_guictx *g, I_objid id, int xl, int yl, int xu, int yu)
{ {
if(M_AABBPoint(xl, yl, xu, yu, g->cr.x, g->cr.y)) { if(M_AABBPoint(xl, yl, xu, yu, g->cr.x, g->cr.y)) {
g->hot = id; g->hot = id;
@ -22,7 +22,7 @@ static void I_GUI_auto(I_gictx *g, I_objid id, int xl, int yl, int xu, int yu)
// //
// I_GUI_Begin // I_GUI_Begin
// //
void I_GUI_Begin(I_gictx *g) void I_GUI_Begin(I_guictx *g)
{ {
g->hot = 0; g->hot = 0;
} }
@ -30,7 +30,7 @@ void I_GUI_Begin(I_gictx *g)
// //
// I_GUI_End // I_GUI_End
// //
void I_GUI_End(I_gictx *g) void I_GUI_End(I_guictx *g)
{ {
// Set last left/right clicks. // Set last left/right clicks.
g->llc = g->lc; g->llc = g->lc;
@ -43,7 +43,7 @@ void I_GUI_End(I_gictx *g)
// //
// I_GUI_ButtonFId // I_GUI_ButtonFId
// //
bool I_GUI_ButtonFId(I_gictx *g, I_objid id, int x, int y, char const *text) bool I_GUI_ButtonFId(I_guictx *g, I_objid id, int x, int y, char const *text)
{ {
int const xl = x , yl = y; int const xl = x , yl = y;
int const xu = x + 90, yu = y + 30; int const xu = x + 90, yu = y + 30;

View File

@ -12,12 +12,12 @@
// Extern Functions ----------------------------------------------------------| // Extern Functions ----------------------------------------------------------|
void I_GUI_Begin(struct I_gictx *g); void I_GUI_Begin(struct I_guictx *g);
void I_GUI_End (struct I_gictx *g); void I_GUI_End (struct I_guictx *g);
// Types ---------------------------------------------------------------------| // Types ---------------------------------------------------------------------|
typedef struct I_gictx typedef struct I_guictx
{ {
__prop begin {call: I_GUI_Begin(this)} __prop begin {call: I_GUI_Begin(this)}
__prop end {call: I_GUI_End (this)} __prop end {call: I_GUI_End (this)}
@ -31,10 +31,10 @@ typedef struct I_gictx
bool rc, lrc; bool rc, lrc;
bool open; bool open;
} I_gictx; } I_guictx;
// Types ---------------------------------------------------------------------| // Types ---------------------------------------------------------------------|
bool I_GUI_ButtonFId(struct I_gictx *g, I_objid id, int x, int y, char const *text); bool I_GUI_ButtonFId(struct I_guictx *g, I_objid id, int x, int y, char const *text);
#endif #endif

View File

@ -113,7 +113,7 @@ M_token *M_TokBuf_ReGet(M_tkbuf *tb)
// //
// M_TokBuf_Drop // M_TokBuf_Drop
// //
bool M_TokBuf_Drop(M_tkbuf *tb, M_tokty t) bool M_TokBuf_Drop(M_tkbuf *tb, M_toktype t)
{ {
if(M_TokBuf_Get(tb)->type != t) if(M_TokBuf_Get(tb)->type != t)
{M_TokBuf_UnGet(tb); return false;} {M_TokBuf_UnGet(tb); return false;}

View File

@ -13,7 +13,7 @@ void M_TokBuf_Dtor(struct M_tkbuf *tb);
M_token *M_TokBuf_Get(struct M_tkbuf *tb); M_token *M_TokBuf_Get(struct M_tkbuf *tb);
M_token *M_TokBuf_UnGet(struct M_tkbuf *tb); M_token *M_TokBuf_UnGet(struct M_tkbuf *tb);
M_token *M_TokBuf_ReGet(struct M_tkbuf *tb); M_token *M_TokBuf_ReGet(struct M_tkbuf *tb);
bool M_TokBuf_Drop(struct M_tkbuf *tb, M_tokty t); bool M_TokBuf_Drop(struct M_tkbuf *tb, M_toktype t);
// Types ---------------------------------------------------------------------| // Types ---------------------------------------------------------------------|

View File

@ -10,7 +10,7 @@
// Types ---------------------------------------------------------------------| // Types ---------------------------------------------------------------------|
typedef enum M_tokty typedef enum M_toktype
{ {
tok_null, // No token tok_null, // No token
@ -86,12 +86,12 @@ typedef enum M_tokty
tok_eof, // End of file tok_eof, // End of file
tok_max tok_max
} M_tokty; } M_toktype;
typedef struct M_token typedef struct M_token
{ {
M_tokty type; M_toktype type;
int line; int line;
M_Vec_decl(char, text); M_Vec_decl(char, text);
} M_token; } M_token;

View File

@ -15,9 +15,9 @@
// G_TestObj_Think // G_TestObj_Think
// //
DGE_Callback DGE_Callback
void G_TestObj_Think(G_entty const *ty, unsigned id) void G_TestObj_Think(G_enttype const *ty, unsigned id)
{ {
G_entit th = {id}; G_entity th = {id};
DGE_Object_RefAdd(id); DGE_Object_RefAdd(id);

View File

@ -12,7 +12,7 @@
// Static Functions ----------------------------------------------------------| // Static Functions ----------------------------------------------------------|
_Noreturn static void R_ResDec_throw (struct R_rdcst *st, char const *emsg); _Noreturn static void R_ResDec_throw (struct R_rdcst *st, char const *emsg);
static M_token *R_ResDec_expect(struct R_rdcst *st, M_tokty t, char const *exp); static M_token *R_ResDec_expect(struct R_rdcst *st, M_toktype t, char const *exp);
// Types ---------------------------------------------------------------------| // Types ---------------------------------------------------------------------|
@ -39,7 +39,7 @@ _Noreturn static void R_ResDec_throw(R_rdcst *st, char const *emsg)
// //
// R_ResDec_expect // R_ResDec_expect
// //
static M_token *R_ResDec_expect(R_rdcst *st, M_tokty t, char const *exp) static M_token *R_ResDec_expect(R_rdcst *st, M_toktype t, char const *exp)
{ {
M_token *tok; M_token *tok;
if((tok = st->tb.get())->type != t) if((tok = st->tb.get())->type != t)