ratcatcher/edit.h

65 lines
1.4 KiB
C

// location of tile palette in editor
#define PALX 640
#define PALY 0
#define PALW (EDITMAPW-PALX)
#define PALH (EDITMAPH/2)-1
#define EDITTEXT 12
#define EDITLINE (EDITTEXT + 1)
#define PALTEXTSIZE 10 // size of helper text on palette
// MAP
#define EDITMAPW 640 // TODO: fix
#define EDITMAPH 480
//
#define EDITORW 800
#define EDITORH EDITMAPH + (EDITTEXT*4)
// location of sprite palette in editor
#define SPALX 640
#define SPALY PALH
#define SPALW (EDITORW-PALX)
#define SPALH (EDITORH/2)-1
#define STATUSX 0
#define STATUSY EDITMAPH
#define STATUSPAD 10
#define LLISTPADY 2
#define LLISTX 50
// level states
#define LS_EDIT 0
#define LS_SAVE 1
#define LS_WAYPOINTS 2
// Editor specific functions
void draweditorlevel(void);
void drawl3(void);
void draweditortile(SDL_Surface *where, int x, int y);
void draweditortile3(SDL_Surface *where, int x, int y);
void drawtilehint(SDL_Surface *where, tiletype_t *tt, double x, double y);
void drawpalette(void);
void drawsprites(void);
int savelevel(int lnum);
void cleanup(void);
void usage(void);
void clearlevel(void);
void filllevel(void);
int isplacabletile(int tid);
int isplacablesprite(int sid);
int writetext(SDL_Surface *where, int x, int y, char *text, int size, SDL_Color *col);
void drawstatus(void);
void setmod(int yesno);
void drawlevellist(void);
void newlevel(void);
void setstatustext(char *text, SDL_Color *col);