blobwarsAttrition/src/world/world.h

127 lines
4.3 KiB
C
Raw Normal View History

2018-01-26 20:14:18 +01:00
/*
Copyright (C) 2018 Parallel Realities
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
2018-01-27 11:58:47 +01:00
#include "../common.h"
2018-02-02 09:00:27 +01:00
2018-02-19 20:12:55 +01:00
enum
{
SHOW_NONE,
SHOW_WIDGETS,
SHOW_STATS,
2018-02-20 09:14:35 +01:00
SHOW_TROPHIES,
SHOW_QUIT
2018-02-19 20:12:55 +01:00
};
2018-03-01 08:52:50 +01:00
extern void addKeysFromStash(void);
extern void addRandomWeapon(int x, int y);
extern void addTeleportStars(Entity *e);
extern void animateSprites(void);
extern void blitRect(SDL_Texture *texture, int x, int y, SDL_Rect *srcRect, int center);
extern void blitScaled(SDL_Texture *texture, int x, int y, int w, int h, int center);
2018-02-03 00:01:51 +01:00
extern float cameraChase(Entity *e, int maxSpeed);
2018-02-02 20:10:12 +01:00
extern void cameraTrack(Entity *e);
2018-03-01 08:52:50 +01:00
extern void clearControl(int type);
extern void clearControls(void);
extern void clearScreen(void);
extern void clipCamera(void);
extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
2018-03-01 08:52:50 +01:00
extern Entity *createEntity(char *typeStr);
extern void destroyEntities(void);
extern void destroyObjectives(void);
extern void destroyParticles(void);
extern void destroyQuadtree(void);
extern void destroyTriggers(void);
extern void doBob(void);
2018-02-02 20:10:12 +01:00
extern void doEntities(void);
extern void doEntitiesStatic(void);
2018-02-02 20:10:12 +01:00
extern void doHud(void);
2018-03-01 08:52:50 +01:00
extern void doLocationTriggers(void);
extern void doParticles(void);
extern void doPlayer(void);
extern void doStats(void);
extern void doTrophies(void);
extern void doWidgets(void);
2018-02-03 00:01:51 +01:00
extern void drawEntities(int plane);
2018-02-03 17:22:04 +01:00
extern void drawHud(void);
2018-03-01 08:52:50 +01:00
extern void drawMap(void);
2018-02-07 23:49:42 +01:00
extern void drawMissionStatus(void);
2018-03-01 08:52:50 +01:00
extern void drawOutlineRect(int x, int y, int w, int h, int r, int g, int b, int a);
extern void drawParticles(int plane);
extern void drawRect(int x, int y, int w, int h, int r, int g, int b, int a);
extern void drawStats(void);
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
2018-03-01 08:52:50 +01:00
extern void drawTrophies(void);
extern void drawWidgetFrame(void);
2018-02-15 19:04:37 +01:00
extern void drawWidgets(void);
2018-03-01 08:52:50 +01:00
extern void dropCarriedItems(void);
extern void dropRandomCherry(int x, int y);
extern void endSectionTransition(void);
extern int getDistance(int x1, int y1, int x2, int y2);
extern Atlas *getImageFromAtlas(char *filename);
extern int getMissionStatus(char *id);
extern Entity *getRandomObjectiveEntity(void);
extern Texture *getTexture(const char *filename);
2018-02-15 23:56:22 +01:00
extern Widget *getWidget(char *name, char *group);
2018-03-01 08:52:50 +01:00
extern void hideAllWidgets(void);
extern void initEffects(void);
2018-02-17 17:53:18 +01:00
extern void initEntities(void);
2018-03-01 08:52:50 +01:00
extern void initHud(void);
extern void initItems(void);
extern void initMap(void);
extern void initObjectives(void);
extern void initOptions(void (*callback)(void));
extern void initParticles(void);
2018-02-18 10:29:26 +01:00
extern void initPostMission(void);
2018-03-01 08:52:50 +01:00
extern void initQuadtree(Quadtree *root);
extern void initRadar(void);
2018-03-02 09:30:39 +01:00
extern void initStatsDisplay(void);
2018-03-01 08:52:50 +01:00
extern void initWeapons(void);
extern int isAcceptControl(void);
extern int isControl(int type);
extern int isLiquid(int x, int y);
extern int isOnScreen(Entity *e);
extern int isSolid(int x, int y);
extern int isWalkable(int x, int y);
2018-03-09 19:26:44 +01:00
extern float limit(float i, float a, float b);
2018-02-20 09:14:35 +01:00
extern void limitTextWidth(int width);
2018-03-01 08:52:50 +01:00
extern void loadMusic(char *filename);
extern void loadWorld(char *id);
extern void pauseSound(int pause);
extern void playBattleSound(int snd, int ch, int x, int y);
extern void playMusic(int loop);
extern void playSound(int snd, int ch);
extern double randF(void);
extern void resetAtCheckpoint(void);
2018-02-25 13:12:31 +01:00
extern void retryMission(void);
extern void returnToHub(void);
extern void returnToTitle(void);
2018-03-01 08:52:50 +01:00
extern int rrnd(int low, int high);
extern void showWidgetGroup(char *group);
extern void startSectionTransition(void);
extern void stopMusic(void);
2018-02-02 20:10:12 +01:00
2018-02-03 00:01:51 +01:00
extern App app;
2018-03-02 23:21:45 +01:00
extern Camera camera;
extern Colors colors;
2018-02-02 20:10:12 +01:00
extern Dev dev;
2018-02-08 23:25:10 +01:00
extern Entity *self;
2018-02-02 20:10:12 +01:00
extern Game game;
2018-02-02 09:00:27 +01:00
extern World world;