command[CONTROL::PAUSE] = 0;
}
-bool Config::isControl(CONTROL::TYPE type)
+bool Config::isControl(CONTROL::TYPE type) const
{
return command[type];
}
void populate();
void populate(int *data);
- bool isControl(CONTROL::TYPE type);
+ bool isControl(CONTROL::TYPE type) const;
void resetControl(CONTROL::TYPE type);
void doPause();
}
}
-int Engine::getMouseX()
+int Engine::getMouseX() const
{
return mouseX;
}
-int Engine::getMouseY()
+int Engine::getMouseY() const
{
return mouseY;
}
Math::limitInt(&playerPosY, limitUp, limitDown);
}
-int Engine::getFrameLoop()
+int Engine::getFrameLoop() const
{
return frameLoop;
}
time2 = SDL_GetTicks();
}
-float Engine::getTimeDifference()
+float Engine::getTimeDifference() const
{
return timeDifference;
}
Engine();
void destroy();
void getInput();
- int getMouseX();
- int getMouseY();
+ int getMouseX() const;
+ int getMouseY() const;
void setMouse(int x, int y);
bool userAccepts();
bool loadData(const char *filename);
void reportFontFailure();
void setPlayerPosition(int x, int y, int limitLeft, int limitRight, int limitUp, int limitDown);
- int getFrameLoop();
+ int getFrameLoop() const;
void doFrameLoop();
void doTimeDifference();
- float getTimeDifference();
+ float getTimeDifference() const;
void resetTimeDifference();
void setInfoMessage(const char *message, int priority, int type);
void deleteWidgets();
checkPointY = (int)y;
}
-void Game::getCheckPoint(float *x, float *y)
+void Game::getCheckPoint(float *x, float *y) const
{
*x = checkPointX;
*y = checkPointY;
return 0;
}
-int Game::getTotalBulletsFired()
+int Game::getTotalBulletsFired() const
{
return bulletsFired[0] + bulletsFired[1] + bulletsFired[2] + bulletsFired[3] + bulletsFired[4];
}
void destroy();
void incrementMissionTime();
void setCheckPoint(float x, float y);
- void getCheckPoint(float *x, float *y);
+ void getCheckPoint(float *x, float *y) const;
void setObjectiveCheckPoint();
void useObjectiveCheckPoint();
void doCombo();
void incBulletsFired();
void incBulletsHit();
int getWeaponAccuracy(int weapon);
- int getTotalBulletsFired();
+ int getTotalBulletsFired() const;
int getTotalAccuracy();
int getMostUsedWeapon();
void totalUpStats();
SDL_SetColorKey(sprite, (SDL_SRCCOLORKEY|SDL_RLEACCEL), SDL_MapRGB(sprite->format, 0, 0, 0));
}
-bool Graphics::canShowMedalMessage()
+bool Graphics::canShowMedalMessage() const
{
return (medalMessageTimer <= 0);
}
}
}
-int Graphics::getWaterAnim()
+int Graphics::getWaterAnim() const
{
return waterAnim;
}
-int Graphics::getSlimeAnim()
+int Graphics::getSlimeAnim() const
{
return slimeAnim;
}
-int Graphics::getLavaAnim()
+int Graphics::getLavaAnim() const
{
return lavaAnim;
}
Sprite *getSpriteHead();
void setTransparent(SDL_Surface *sprite);
void updateScreen();
- bool canShowMedalMessage();
+ bool canShowMedalMessage() const;
void delay(int time);
void RGBtoHSV(float r, float g, float b, float *h, float *s, float *v);
void HSVtoRGB(float *r, float *g, float *b, float h, float s, float v);
Sprite *addSprite(const char *name);
Sprite *getSprite(const char *name, bool required);
void animateSprites();
- int getWaterAnim();
- int getSlimeAnim();
- int getLavaAnim();
+ int getWaterAnim() const;
+ int getSlimeAnim() const;
+ int getLavaAnim() const;
int getLavaAnim(int current);
void loadBackground(const char *filename);
void putPixel(int x, int y, Uint32 pixel, SDL_Surface *dest);
return false;
}
-unsigned int Pak::getUncompressedSize()
+unsigned int Pak::getUncompressedSize() const
{
return (unsigned int)currentFile->fSize;
}
void setPakFile(const char *pakFilename);
bool unpack(const char *filename, unsigned char **buffer);
bool fileExists(const char *filename);
- unsigned int getUncompressedSize();
+ unsigned int getUncompressedSize() const;
};
strlcpy(this->name, name, sizeof this->name);
}
-int Weapon::getSpeed(int face)
+int Weapon::getSpeed(int face) const
{
return (dx - ((dx * 2) * face));
}
Weapon();
void setName(const char *name);
- int getSpeed(int face);
+ int getSpeed(int face) const;
};