Code analysis suggestions implemented.
This commit is contained in:
parent
c8dba733d0
commit
36fb89e556
@ -1,6 +1,7 @@
|
||||
#include "Ability.h"
|
||||
|
||||
PrecastData::PrecastData(){};
|
||||
PrecastData::PrecastData()
|
||||
:castTime(0),range(0),size(0){};
|
||||
PrecastData::PrecastData(float castTime)
|
||||
:castTime(castTime),range(0),size(0){precastTargetingRequired=true;};
|
||||
PrecastData::PrecastData(float castTime,float range,float size)
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
const float DamageNumber::MOVE_UP_TIME=0.4;
|
||||
|
||||
DamageNumber::DamageNumber(){
|
||||
DamageNumber::DamageNumber()
|
||||
:damage(0){
|
||||
}
|
||||
|
||||
DamageNumber::DamageNumber(vf2d pos,int damage):
|
||||
|
@ -15,7 +15,7 @@ struct TileCollisionData{
|
||||
};
|
||||
|
||||
struct TilesetData{
|
||||
Renderable*tileset;
|
||||
Renderable*tileset=nullptr;
|
||||
std::map<int,XMLTag>foregroundTiles;
|
||||
std::map<int,XMLTag>upperForegroundTiles;
|
||||
std::map<int,TileCollisionData>collision;
|
||||
|
@ -11,7 +11,8 @@ INCLUDE_ANIMATION_DATA
|
||||
|
||||
std::map<int,MonsterData>MONSTER_DATA;
|
||||
|
||||
MonsterData::MonsterData(){}
|
||||
MonsterData::MonsterData()
|
||||
:atk(0),collisionDmg(0),hp(0),id(0),moveSpd(0),size(0),strategy(0){}
|
||||
MonsterData::MonsterData(int id,std::string name,int hp,int atk,std::vector<std::string>animations,float moveSpd,float size,int strategy,int collisionDmg):
|
||||
id(id),name(name),hp(hp),atk(atk),moveSpd(moveSpd),size(size),strategy(strategy),animations(animations),collisionDmg(collisionDmg){}
|
||||
|
||||
|
@ -12,7 +12,7 @@ struct Pathfinding{
|
||||
int x; // Nodes position in 2D space
|
||||
int y;
|
||||
std::vector<sNode*> vecNeighbours; // Connections to neighbours
|
||||
sNode* parent; // Node connecting to this node that offers shortest parent
|
||||
sNode* parent=nullptr; // Node connecting to this node that offers shortest parent
|
||||
};
|
||||
|
||||
sNode *nodes = nullptr;
|
||||
|
@ -18,7 +18,7 @@ struct XMLTag{
|
||||
};
|
||||
|
||||
struct MapTag{
|
||||
int width,height;
|
||||
int width=0,height=0;
|
||||
vi2d playerSpawnLocation;
|
||||
friend std::ostream& operator << (std::ostream& os, MapTag& rhs);
|
||||
};
|
||||
|
@ -113,7 +113,8 @@ class TSXParser{
|
||||
}
|
||||
std::cout<<"\n"<<"=============\n";
|
||||
}
|
||||
TSXParser::TSXParser(std::string file){
|
||||
TSXParser::TSXParser(std::string file)
|
||||
:previousTagID(-1){
|
||||
std::ifstream f(file,std::ios::in);
|
||||
|
||||
std::string accumulator="";
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 1038
|
||||
#define VERSION_BUILD 1041
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
1296
Crawler/pge.html
1296
Crawler/pge.html
File diff suppressed because one or more lines are too long
BIN
Crawler/pge.wasm
BIN
Crawler/pge.wasm
Binary file not shown.
Binary file not shown.
0
x64/Release/Crawler.exe.lastcodeanalysissucceeded
Normal file
0
x64/Release/Crawler.exe.lastcodeanalysissucceeded
Normal file
Loading…
x
Reference in New Issue
Block a user