ratcatcher/shared.h

59 lines
1.8 KiB
C

#ifndef __SHARED_H
#define __SHARED_H
#include <SDL_image.h>
#include "defs.h"
/* functions */
int loadlevel(int wnum, int lnum);
void setdefaults(sprite_t *s);
int loadtiletypes(char *filename);
sprite_t *addsprite(int id,int x, int y, char *name);
tiletype_t *gettileat(int pixx,int pixy, int *tilex, int *tiley);
int loadimagesets(void);
int isbullet(int id);
void flip(void);
void killsprite(sprite_t *s);
void drawsprite(sprite_t *s);
int gettileframecount(int tid);
int isfruit(int id);
int isflower(int id);
int iseffect(int id);
int needscollisions(int id);
int candoslopes(int sid);
int flowertogem(int id);
inline void drawpixel16(SDL_Surface *screen, int x, int y, SDL_Color c);
inline void drawpixel32(SDL_Surface *screen, int x, int y, SDL_Color c);
inline void drawbox16(SDL_Surface *screen, int x1,int y1,int x2,int y2,SDL_Color *c,SDL_Color *fc);
void drawline16(SDL_Surface *screen, int x1, int y1, int x2, int y2, SDL_Color c);
int getcolor(SDL_Surface *dest, int x, int y, SDL_Color *col);
/*
int chartomonster(char ch);
char monstertochar(int id);
*/
tiletype_t *gettile(int uniqid);
int getuniq(int tileid);
void drawtile(SDL_Surface *s, int x, int y);
void initglobals(void);
void killtext(text_t *t);
int ismonster(int id);
void puffin(int willbecome, int x, int y, char *name, int delay);
SDL_Surface *loadspriteimage(int spriteid, int frame, char *filename);
int getpoints(int id);
int randompowerup(void);
int loadlevellist(void);
int savelevellist(void);
int ispermenant(int pid);
int isbosslevel(int lev);
int isnettable(int monid);
int isboss(int monid);
int getbosshealth(int mid);
void getpixelrgb(SDL_Surface *where, int x, int y, SDL_Color *clr);
void doblit(SDL_Surface *src, SDL_Surface *dst, SDL_Rect *dstarea);
// for doco
void setfruitinfo(void);
void setinfo(int id, char *name, char *desc, char *file);
void dumpinfo(void);
#endif