Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #310 from stefanbeller/master

CMake list: correct variable names for undefined build.
  • Loading branch information...
commit 6531a6838ab11a1250f98af1e6fffc0919ca40df 2 parents 4efea1b + 90c853d
@clintbellanger authored
View
3  .travis.yml
@@ -2,10 +2,9 @@ language: cpp
compiler:
- gcc
- clang
- - /usr/lib/gcc-snapshot/bin/gcc
before_install:
- sudo apt-get update -qq
- - sudo apt-get install -qq libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev cppcheck gcc-snapshot
+ - sudo apt-get install -qq libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev cppcheck
script: cmake . && make
after_script: cppcheck --verbose --enable=all --std=posix --std=c++11 --quiet `git ls-files src/\*.cpp`
notifications:
View
8 CMakeLists.txt
@@ -32,10 +32,10 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-pg")
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-pg")
else()
- set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -pg")
- set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-pg")
- set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-pg")
- set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-pg")
+ set(CMAKE_CXX_FLAGS "-g3 -pg")
+ set(CMAKE_EXE_LINKER_FLAGS "-pg")
+ set(CMAKE_SHARED_LINKER_FLAGS "-pg")
+ set(CMAKE_MODULE_LINKER_FLAGS "-pg")
endif()
set(BINDIR "games" CACHE STRING "Directory from CMAKE_INSTALL_PREFIX where game executable will be installed.")
View
3  src/Avatar.h
@@ -57,7 +57,8 @@ enum AvatarState {
AVATAR_SHOOT = 7
};
-struct Layer_gfx {
+class Layer_gfx {
+public:
std::string gfx;
std::string type;
Layer_gfx()
View
2  src/BehaviorStandard.h
@@ -24,7 +24,7 @@ FLARE. If not, see http://www.gnu.org/licenses/
// forward declarations
class Enemy;
-struct Point;
+class Point;
class BehaviorStandard : public EnemyBehavior {
private:
View
3  src/CombatText.h
@@ -43,7 +43,8 @@ FLARE. If not, see http://www.gnu.org/licenses/
class WidgetLabel;
-struct Combat_Text_Item {
+class Combat_Text_Item {
+public:
WidgetLabel *label;
int lifespan;
Point pos;
View
3  src/EffectManager.h
@@ -39,7 +39,8 @@ class Hazard;
class MapCollision;
class PowerManager;
-struct Effect{
+class Effect{
+public:
int id;
int icon;
int ticks;
View
3  src/EnemyGroupManager.h
@@ -27,7 +27,8 @@ FLARE. If not, see http://www.gnu.org/licenses/
#include <iostream>
-struct Enemy_Level {
+class Enemy_Level {
+public:
std::string type;
int level;
std::string rarity;
View
3  src/FontEngine.h
@@ -39,7 +39,8 @@ const int JUSTIFY_CENTER = 2;
const SDL_Color FONT_WHITE = {255,255,255,0};
const SDL_Color FONT_BLACK = {0,0,0,0};
-struct FontStyle {
+class FontStyle {
+public:
std::string name;
std::string path;
int ptsize;
View
3  src/GameStatePlay.h
@@ -50,7 +50,8 @@ class PowerManager;
class QuestLog;
class WidgetLabel;
-struct Title{
+class Title{
+public:
std::string title;
int level;
int power;
View
5 src/ItemManager.h
@@ -68,7 +68,8 @@ const int ITEM_QUALITY_EPIC = 3;
const int ITEM_MAX_BONUSES = 8;
-struct Set_bonus {
+class Set_bonus {
+public:
int requirement;
std::string bonus_stat;
int bonus_val;
@@ -206,7 +207,7 @@ class ItemManager {
SDL_Color color_penalty;
SDL_Color color_requirements_not_met;
SDL_Color color_flavor;
-
+
public:
ItemManager();
~ItemManager();
View
3  src/LootManager.h
@@ -46,7 +46,8 @@ class MapRenderer;
class MenuInventory;
class WidgetTooltip;
-struct CurrencyRange {
+class CurrencyRange {
+public:
std::string filename;
int low;
int high;
View
3  src/MenuCharacter.h
@@ -47,7 +47,8 @@ const int CSTAT_OFFENSE = 4;
const int CSTAT_DEFENSE = 5;
const int CSTAT_COUNT = 6;
-struct CharStat {
+class CharStat {
+public:
WidgetLabel *label;
WidgetLabel *value;
SDL_Rect hover;
View
3  src/MenuPowers.h
@@ -41,7 +41,8 @@ class PowerManager;
class StatBlock;
class TooltipData;
-struct Power_Menu_Cell {
+class Power_Menu_Cell {
+public:
short id;
short tab;
Point pos;
View
3  src/PowerManager.h
@@ -79,7 +79,8 @@ const int TRIGGER_HALFDEATH = 2;
const int TRIGGER_JOINCOMBAT = 3;
const int TRIGGER_DEATH = 4;
-struct PostEffect {
+class PostEffect {
+public:
int id;
int magnitude;
int duration;
View
3  src/Settings.cpp
@@ -39,8 +39,9 @@ using namespace std;
#define log2(x) logf(x)/logf(2)
#endif
-struct ConfigEntry
+class ConfigEntry
{
+public:
const char * name;
const type_info * type;
const char * default_val;
View
1  src/StatBlock.cpp
@@ -397,7 +397,6 @@ void StatBlock::recalc_alt() {
if (hero) {
// calculate primary stats
- offense_additional = defense_additional = physical_additional = mental_additional = 0;
offense_additional = effects.bonus_offense;
defense_additional = effects.bonus_defense;
physical_additional = effects.bonus_physical;
View
3  src/StatBlock.h
@@ -69,7 +69,8 @@ const int ENEMY_POWER = 15; // enemy performing a power. anim/sfx based on power
const int MAX_CHARACTER_LEVEL = 32;
-struct EnemyLoot {
+class EnemyLoot {
+public:
int id;
int chance;
View
6 src/TileSet.h
@@ -40,7 +40,8 @@ FLARE. If not, see http://www.gnu.org/licenses/
* The offset is measured from upper left corner to the logical midpoint
* of the tile at groundlevel.
*/
-struct Tile_Def {
+class Tile_Def {
+public:
SDL_Rect src;
Point offset;
Tile_Def() {
@@ -49,7 +50,8 @@ struct Tile_Def {
}
};
-struct Tile_Anim {
+class Tile_Anim {
+public:
// Number of frames in this animation. if 0 no animation.
// 1 makes no sense as it would produce astatic animation.
unsigned short frames;
View
9 src/Utils.h
@@ -33,18 +33,21 @@ FLARE. If not, see http://www.gnu.org/licenses/
#include <string>
#include <stdint.h>
-struct Point {
+class Point {
+public:
int x,y;
Point() : x(0), y(0) {}
Point(int _x, int _y) : x(_x), y(_y) {}
};
-struct FPoint {
+class FPoint {
+public:
float x,y;
};
// message passing struct for various sprites rendered map inline
-struct Renderable {
+class Renderable {
+public:
SDL_Surface *sprite; // image to be used
SDL_Rect src; // location on the sprite in pixel coordinates.
View
3  src/WidgetLabel.h
@@ -35,7 +35,8 @@ const int VALIGN_CENTER = 0;
const int VALIGN_TOP = 1;
const int VALIGN_BOTTOM = 2;
-struct LabelInfo {
+class LabelInfo {
+public:
int x,y;
int justify,valign;
bool hidden;
Please sign in to comment.
Something went wrong with that request. Please try again.