2017-09-23 12:43:54 -07:00
|
|
|
// Copyright © 2017 Project Golan, all rights reserved.
|
2017-10-04 17:14:46 -07:00
|
|
|
// See COPYING for more information.
|
2017-09-23 12:43:54 -07:00
|
|
|
#ifndef g_stage_h
|
|
|
|
#define g_stage_h
|
|
|
|
|
|
|
|
#include "m_darray.h"
|
|
|
|
#include "m_types.h"
|
|
|
|
|
|
|
|
// Types ---------------------------------------------------------------------|
|
|
|
|
|
2017-10-04 20:19:27 -07:00
|
|
|
typedef struct G_mapsector
|
2017-09-23 12:43:54 -07:00
|
|
|
{
|
|
|
|
fixed x, y;
|
|
|
|
fixed w, h;
|
2017-09-23 17:21:07 -07:00
|
|
|
fixed f, c;
|
2017-10-04 20:19:27 -07:00
|
|
|
} G_mapsector;
|
2017-09-23 12:43:54 -07:00
|
|
|
|
2017-10-04 20:19:27 -07:00
|
|
|
typedef struct G_mapentity
|
2017-09-23 12:43:54 -07:00
|
|
|
{
|
2017-09-26 16:27:40 -07:00
|
|
|
fixed x, y, z;
|
2017-09-23 12:43:54 -07:00
|
|
|
char name[32];
|
2017-10-04 20:19:27 -07:00
|
|
|
} G_mapentity;
|
2017-09-23 12:43:54 -07:00
|
|
|
|
2017-10-04 20:19:27 -07:00
|
|
|
typedef union G_mapdata
|
2017-09-23 12:43:54 -07:00
|
|
|
{
|
2017-10-04 20:19:27 -07:00
|
|
|
G_mapsector sec;
|
|
|
|
G_mapentity ent;
|
|
|
|
} G_mapdata;
|
2017-09-23 12:43:54 -07:00
|
|
|
|
2017-10-04 20:19:27 -07:00
|
|
|
typedef struct G_mapobj
|
2017-09-23 12:43:54 -07:00
|
|
|
{
|
|
|
|
mword time;
|
2017-10-04 20:19:27 -07:00
|
|
|
G_mapdata data;
|
2017-09-23 12:43:54 -07:00
|
|
|
|
2017-10-04 20:19:27 -07:00
|
|
|
void (*proc)(G_mapdata *data);
|
|
|
|
} G_mapobj;
|
2017-09-23 12:43:54 -07:00
|
|
|
|
|
|
|
typedef struct G_stage
|
|
|
|
{
|
2017-10-04 20:19:27 -07:00
|
|
|
M_Vec_decl(G_mapobj, map);
|
2017-09-23 12:43:54 -07:00
|
|
|
} G_stage;
|
|
|
|
|
|
|
|
// Extern Objects ------------------------------------------------------------|
|
|
|
|
|
2017-09-29 18:50:07 -07:00
|
|
|
extern __str G_Place;
|
2017-10-04 02:08:20 -07:00
|
|
|
extern __str G_PlaceIntro;
|
2017-09-28 10:51:14 -07:00
|
|
|
extern long unsigned G_Time;
|
2017-09-23 12:43:54 -07:00
|
|
|
|
|
|
|
// Extern Functions ----------------------------------------------------------|
|
|
|
|
|
|
|
|
G_stage G_Stage_LoadMap(char const *fname);
|
2017-09-28 10:51:14 -07:00
|
|
|
void G_Stage_LoadBase(void);
|
|
|
|
void G_Stage_Run(unsigned stagenum);
|
2017-09-23 12:43:54 -07:00
|
|
|
|
|
|
|
#endif
|