Code analysis suggestions implemented.

pull/28/head
sigonasr2 1 year ago
parent c8dba733d0
commit 36fb89e556
  1. 3
      Crawler/Ability.cpp
  2. 3
      Crawler/DamageNumber.cpp
  3. 2
      Crawler/Map.h
  4. 3
      Crawler/MonsterData.cpp
  5. 2
      Crawler/Pathfinding.h
  6. 2
      Crawler/TMXParser.h
  7. 3
      Crawler/TSXParser.h
  8. 2
      Crawler/Version.h
  9. 1296
      Crawler/pge.html
  10. BIN
      Crawler/pge.wasm
  11. BIN
      x64/Release/Crawler.exe
  12. 0
      x64/Release/Crawler.exe.lastcodeanalysissucceeded

@ -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

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save