- bug fixes to stabilize the windows build
This commit is contained in:
parent
f06f86904c
commit
9bc6d33f1d
|
@ -379,7 +379,7 @@ void Ai::update() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//process ai rules
|
//process ai rules
|
||||||
for(int ruleIdx = 0; ruleIdx < aiRules.size(); ++ruleIdx) {
|
for(unsigned int ruleIdx = 0; ruleIdx < aiRules.size(); ++ruleIdx) {
|
||||||
AiRule *rule = aiRules[ruleIdx];
|
AiRule *rule = aiRules[ruleIdx];
|
||||||
if(rule == NULL) {
|
if(rule == NULL) {
|
||||||
throw megaglest_runtime_error("rule == NULL");
|
throw megaglest_runtime_error("rule == NULL");
|
||||||
|
@ -582,7 +582,7 @@ vector<int> Ai::findUnitsHarvestingResourceType(const ResourceType *rt) {
|
||||||
Command *command= unit->getCurrCommand();
|
Command *command= unit->getCurrCommand();
|
||||||
const BuildCommandType *bct= dynamic_cast<const BuildCommandType*>(command->getCommandType());
|
const BuildCommandType *bct= dynamic_cast<const BuildCommandType*>(command->getCommandType());
|
||||||
if(bct != NULL) {
|
if(bct != NULL) {
|
||||||
for(unsigned int j = 0; j < bct->getBuildingCount(); ++j) {
|
for(int j = 0; j < bct->getBuildingCount(); ++j) {
|
||||||
const UnitType *ut = bct->getBuilding(j);
|
const UnitType *ut = bct->getBuilding(j);
|
||||||
if(ut != NULL) {
|
if(ut != NULL) {
|
||||||
const Resource *r = ut->getCost(rt);
|
const Resource *r = ut->getCost(rt);
|
||||||
|
|
|
@ -837,7 +837,7 @@ bool AiInterface::isFreeCells(const Vec2i &pos, int size, Field field){
|
||||||
}
|
}
|
||||||
|
|
||||||
void AiInterface::removeEnemyWarningPositionFromList(Vec2i &checkPos) {
|
void AiInterface::removeEnemyWarningPositionFromList(Vec2i &checkPos) {
|
||||||
for(int i = enemyWarningPositionList.size() - 1; i <= 0; --i) {
|
for(int i = enemyWarningPositionList.size() - 1; i >= 0; --i) {
|
||||||
Vec2i &pos = enemyWarningPositionList[i];
|
Vec2i &pos = enemyWarningPositionList[i];
|
||||||
|
|
||||||
if(checkPos == pos) {
|
if(checkPos == pos) {
|
||||||
|
|
|
@ -462,7 +462,7 @@ bool PathFinder::addToOpenSet(Unit *unit, Node *node,const Vec2i finalPos, Vec2i
|
||||||
direction PathFinder::directionOfMove(Vec2i to, Vec2i from) const {
|
direction PathFinder::directionOfMove(Vec2i to, Vec2i from) const {
|
||||||
if (from.x == to.x) {
|
if (from.x == to.x) {
|
||||||
if (from.y == to.y)
|
if (from.y == to.y)
|
||||||
return -1;
|
return 0;
|
||||||
else if (from.y < to.y)
|
else if (from.y < to.y)
|
||||||
return 4;
|
return 4;
|
||||||
else // from.y > to.y
|
else // from.y > to.y
|
||||||
|
|
|
@ -4862,7 +4862,6 @@ int Game::getUpdateLoops() {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return speed;
|
return speed;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::showLoseMessageBox() {
|
void Game::showLoseMessageBox() {
|
||||||
|
|
|
@ -451,7 +451,6 @@ string Lang::getScenarioString(const string &s) {
|
||||||
}
|
}
|
||||||
return "???" + s + "???";
|
return "???" + s + "???";
|
||||||
}
|
}
|
||||||
return "???" + s + "???";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
string Lang::getTechTreeString(const string &s,const char *defaultValue) {
|
string Lang::getTechTreeString(const string &s,const char *defaultValue) {
|
||||||
|
|
|
@ -367,6 +367,28 @@ private:
|
||||||
vbo_fowTexCoords(0), vbo_surfTexCoords(0),
|
vbo_fowTexCoords(0), vbo_surfTexCoords(0),
|
||||||
vbo_indices(0), indexCount(0),
|
vbo_indices(0), indexCount(0),
|
||||||
textureHandle(th),textureCRC(0) {}
|
textureHandle(th),textureCRC(0) {}
|
||||||
|
|
||||||
|
inline Layer & operator=(Layer &obj) {
|
||||||
|
this->vertices = obj.vertices;
|
||||||
|
this->normals = obj.normals;
|
||||||
|
this->fowTexCoords = obj.fowTexCoords;
|
||||||
|
this->surfTexCoords = obj.surfTexCoords;
|
||||||
|
this->indices = obj.indices;
|
||||||
|
this->cellToIndicesMap = obj.cellToIndicesMap;
|
||||||
|
this->rowsToRenderCache = obj.rowsToRenderCache;
|
||||||
|
this->vbo_vertices = obj.vbo_vertices;
|
||||||
|
this->vbo_normals = obj.vbo_normals;
|
||||||
|
this->vbo_fowTexCoords = obj.vbo_fowTexCoords;
|
||||||
|
this->vbo_surfTexCoords = obj.vbo_surfTexCoords;
|
||||||
|
this->vbo_indices = obj.vbo_indices;
|
||||||
|
this->indexCount = obj.indexCount;
|
||||||
|
this->textureHandle = obj.textureHandle;
|
||||||
|
this->texturePath = obj.texturePath;
|
||||||
|
this->textureCRC = obj.textureCRC;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
~Layer();
|
~Layer();
|
||||||
void load_vbos(bool vboEnabled);
|
void load_vbos(bool vboEnabled);
|
||||||
void render(VisibleQuadContainerCache &qCache);
|
void render(VisibleQuadContainerCache &qCache);
|
||||||
|
@ -382,7 +404,7 @@ private:
|
||||||
vbo_fowTexCoords, vbo_surfTexCoords,
|
vbo_fowTexCoords, vbo_surfTexCoords,
|
||||||
vbo_indices;
|
vbo_indices;
|
||||||
int indexCount;
|
int indexCount;
|
||||||
const int textureHandle;
|
int textureHandle;
|
||||||
string texturePath;
|
string texturePath;
|
||||||
uint32 textureCRC;
|
uint32 textureCRC;
|
||||||
};
|
};
|
||||||
|
|
|
@ -571,8 +571,6 @@ void Intro::update() {
|
||||||
|
|
||||||
AutoTest::getInstance().updateIntro(program);
|
AutoTest::getInstance().updateIntro(program);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mouse2d= (mouse2d+1) % Renderer::maxMouse2dAnim;
|
mouse2d= (mouse2d+1) % Renderer::maxMouse2dAnim;
|
||||||
|
|
|
@ -394,6 +394,7 @@ Unit::Unit(int id, UnitPathInterface *unitpath, const Vec2i &pos,
|
||||||
rotationZ=.0f;
|
rotationZ=.0f;
|
||||||
rotationX=.0f;
|
rotationX=.0f;
|
||||||
|
|
||||||
|
this->fire= NULL;
|
||||||
this->unitPath = unitpath;
|
this->unitPath = unitpath;
|
||||||
this->unitPath->setMap(map);
|
this->unitPath->setMap(map);
|
||||||
|
|
||||||
|
@ -470,8 +471,6 @@ Unit::Unit(int id, UnitPathInterface *unitpath, const Vec2i &pos,
|
||||||
currField = fLand;
|
currField = fLand;
|
||||||
}
|
}
|
||||||
|
|
||||||
fire= NULL;
|
|
||||||
|
|
||||||
computeTotalUpgrade();
|
computeTotalUpgrade();
|
||||||
|
|
||||||
//starting skill
|
//starting skill
|
||||||
|
@ -520,8 +519,8 @@ Unit::~Unit() {
|
||||||
Renderer::getInstance().cleanupParticleSystems(fireParticleSystems,rsGame);
|
Renderer::getInstance().cleanupParticleSystems(fireParticleSystems,rsGame);
|
||||||
// Must set this to null of it will be used below in stopDamageParticles()
|
// Must set this to null of it will be used below in stopDamageParticles()
|
||||||
|
|
||||||
if(Renderer::getInstance().validateParticleSystemStillExists(fire,rsGame) == false) {
|
if(Renderer::getInstance().validateParticleSystemStillExists(this->fire,rsGame) == false) {
|
||||||
fire = NULL;
|
this->fire = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,6 +570,13 @@ Unit::~Unit() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ParticleSystem * Unit::getFire() const {
|
||||||
|
if(Renderer::getInstance().validateParticleSystemStillExists(this->fire,rsGame) == false) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return this->fire;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef LEAK_CHECK_UNITS
|
#ifdef LEAK_CHECK_UNITS
|
||||||
void Unit::dumpMemoryList() {
|
void Unit::dumpMemoryList() {
|
||||||
printf("===== START report of Unfreed Unit pointers =====\n");
|
printf("===== START report of Unfreed Unit pointers =====\n");
|
||||||
|
@ -2029,12 +2035,12 @@ bool Unit::update() {
|
||||||
rotationX=.0f;
|
rotationX=.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Renderer::getInstance().validateParticleSystemStillExists(fire,rsGame) == false) {
|
if(Renderer::getInstance().validateParticleSystemStillExists(this->fire,rsGame) == false) {
|
||||||
fire = NULL;
|
this->fire = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fire != NULL) {
|
if (this->fire != NULL) {
|
||||||
fire->setPos(getCurrVector());
|
this->fire->setPos(getCurrVector());
|
||||||
}
|
}
|
||||||
for(UnitParticleSystems::iterator it= unitParticleSystems.begin(); it != unitParticleSystems.end(); ++it) {
|
for(UnitParticleSystems::iterator it= unitParticleSystems.begin(); it != unitParticleSystems.end(); ++it) {
|
||||||
if(Renderer::getInstance().validateParticleSystemStillExists((*it),rsGame) == true) {
|
if(Renderer::getInstance().validateParticleSystemStillExists((*it),rsGame) == true) {
|
||||||
|
@ -3185,14 +3191,14 @@ void Unit::stopDamageParticles(bool force) {
|
||||||
if(force == true || (hp > type->getTotalMaxHp(&totalUpgrade) / 2) ) {
|
if(force == true || (hp > type->getTotalMaxHp(&totalUpgrade) / 2) ) {
|
||||||
//printf("Checking to stop damageparticles for unit [%s - %d] hp = %d\n",this->getType()->getName().c_str(),this->getId(),hp);
|
//printf("Checking to stop damageparticles for unit [%s - %d] hp = %d\n",this->getType()->getName().c_str(),this->getId(),hp);
|
||||||
|
|
||||||
if(Renderer::getInstance().validateParticleSystemStillExists(fire,rsGame) == false) {
|
if(Renderer::getInstance().validateParticleSystemStillExists(this->fire,rsGame) == false) {
|
||||||
fire = NULL;
|
this->fire = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// stop fire
|
// stop fire
|
||||||
if(fire != NULL) {
|
if(this->fire != NULL) {
|
||||||
fire->fade();
|
this->fire->fade();
|
||||||
fire = NULL;
|
this->fire = NULL;
|
||||||
}
|
}
|
||||||
// stop additional particles
|
// stop additional particles
|
||||||
|
|
||||||
|
@ -3358,7 +3364,7 @@ void Unit::startDamageParticles() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// start fire
|
// start fire
|
||||||
if(type->getProperty(UnitType::pBurnable) && fire == NULL) {
|
if(type->getProperty(UnitType::pBurnable) && this->fire == NULL) {
|
||||||
FireParticleSystem *fps = new FireParticleSystem(200);
|
FireParticleSystem *fps = new FireParticleSystem(200);
|
||||||
const Game *game = Renderer::getInstance().getGame();
|
const Game *game = Renderer::getInstance().getGame();
|
||||||
fps->setSpeed(2.5f / game->getWorld()->getUpdateFps(this->getFactionIndex()));
|
fps->setSpeed(2.5f / game->getWorld()->getUpdateFps(this->getFactionIndex()));
|
||||||
|
@ -3366,7 +3372,7 @@ void Unit::startDamageParticles() {
|
||||||
fps->setRadius(type->getSize()/3.f);
|
fps->setRadius(type->getSize()/3.f);
|
||||||
fps->setTexture(CoreData::getInstance().getFireTexture());
|
fps->setTexture(CoreData::getInstance().getFireTexture());
|
||||||
fps->setParticleSize(type->getSize()/3.f);
|
fps->setParticleSize(type->getSize()/3.f);
|
||||||
fire= fps;
|
this->fire= fps;
|
||||||
fireParticleSystems.push_back(fps);
|
fireParticleSystems.push_back(fps);
|
||||||
|
|
||||||
Renderer::getInstance().manageParticleSystem(fps, rsGame);
|
Renderer::getInstance().manageParticleSystem(fps, rsGame);
|
||||||
|
@ -3809,13 +3815,13 @@ void Unit::saveGame(XmlNode *rootNode) {
|
||||||
// Faction *faction;
|
// Faction *faction;
|
||||||
// ParticleSystem *fire;
|
// ParticleSystem *fire;
|
||||||
int linkFireIndex = -1;
|
int linkFireIndex = -1;
|
||||||
if(fire != NULL && Renderer::getInstance().validateParticleSystemStillExists(fire,rsGame) == true) {
|
if(this->fire != NULL && Renderer::getInstance().validateParticleSystemStillExists(this->fire,rsGame) == true) {
|
||||||
//fire->saveGame(unitNode);
|
//fire->saveGame(unitNode);
|
||||||
bool fireInSystemList = false;
|
bool fireInSystemList = false;
|
||||||
if(fireParticleSystems.empty() == false) {
|
if(fireParticleSystems.empty() == false) {
|
||||||
for(unsigned int i = 0; i < fireParticleSystems.size(); ++i) {
|
for(unsigned int i = 0; i < fireParticleSystems.size(); ++i) {
|
||||||
ParticleSystem *ps= fireParticleSystems[i];
|
ParticleSystem *ps= fireParticleSystems[i];
|
||||||
if(ps == fire) {
|
if(ps == this->fire) {
|
||||||
linkFireIndex = i;
|
linkFireIndex = i;
|
||||||
fireInSystemList = true;
|
fireInSystemList = true;
|
||||||
break;
|
break;
|
||||||
|
@ -3823,7 +3829,7 @@ void Unit::saveGame(XmlNode *rootNode) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fireInSystemList == false) {
|
if(fireInSystemList == false) {
|
||||||
fire->saveGame(unitNode);
|
this->fire->saveGame(unitNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TotalUpgrade totalUpgrade;
|
// TotalUpgrade totalUpgrade;
|
||||||
|
|
|
@ -521,7 +521,7 @@ public:
|
||||||
inline float getRotation() const {return rotation;}
|
inline float getRotation() const {return rotation;}
|
||||||
float getRotationX() const;
|
float getRotationX() const;
|
||||||
float getRotationZ() const;
|
float getRotationZ() const;
|
||||||
inline ParticleSystem *getFire() const {return fire;}
|
ParticleSystem *getFire() const;
|
||||||
inline int getKills() const {return kills;}
|
inline int getKills() const {return kills;}
|
||||||
inline int getEnemyKills() const {return enemyKills;}
|
inline int getEnemyKills() const {return enemyKills;}
|
||||||
inline const Level *getLevel() const {return level;}
|
inline const Level *getLevel() const {return level;}
|
||||||
|
|
|
@ -2166,12 +2166,16 @@ bool World::showWorldForPlayer(int factionIndex, bool excludeFogOfWarCheck) cons
|
||||||
|
|
||||||
//computes the fog of war texture, contained in the minimap
|
//computes the fog of war texture, contained in the minimap
|
||||||
void World::computeFow(int factionIdxToTick) {
|
void World::computeFow(int factionIdxToTick) {
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s] Line: %d in frame: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,getFrameCount());
|
||||||
|
|
||||||
bool showPerfStats = Config::getInstance().getBool("ShowPerfStats","false");
|
bool showPerfStats = Config::getInstance().getBool("ShowPerfStats","false");
|
||||||
Chrono chronoPerf;
|
Chrono chronoPerf;
|
||||||
char perfBuf[8096]="";
|
char perfBuf[8096]="";
|
||||||
std::vector<string> perfList;
|
std::vector<string> perfList;
|
||||||
if(showPerfStats) chronoPerf.start();
|
if(showPerfStats) chronoPerf.start();
|
||||||
|
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s] Line: %d in frame: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,getFrameCount());
|
||||||
|
|
||||||
minimap.resetFowTex();
|
minimap.resetFowTex();
|
||||||
|
|
||||||
if(showPerfStats) {
|
if(showPerfStats) {
|
||||||
|
@ -2179,8 +2183,10 @@ void World::computeFow(int factionIdxToTick) {
|
||||||
perfList.push_back(perfBuf);
|
perfList.push_back(perfBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s] Line: %d in frame: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,getFrameCount());
|
||||||
//reset cells
|
//reset cells
|
||||||
if(factionIdxToTick == -1 || factionIdxToTick == this->thisFactionIndex) {
|
if(factionIdxToTick == -1 || factionIdxToTick == this->thisFactionIndex) {
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s] Line: %d in frame: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,getFrameCount());
|
||||||
for(int i = 0; i < map.getSurfaceW(); ++i) {
|
for(int i = 0; i < map.getSurfaceW(); ++i) {
|
||||||
for(int j = 0; j < map.getSurfaceH(); ++j) {
|
for(int j = 0; j < map.getSurfaceH(); ++j) {
|
||||||
for(int k = 0; k < GameConstants::maxPlayers + GameConstants::specialFactions; ++k) {
|
for(int k = 0; k < GameConstants::maxPlayers + GameConstants::specialFactions; ++k) {
|
||||||
|
@ -2214,8 +2220,10 @@ void World::computeFow(int factionIdxToTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s] Line: %d in frame: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,getFrameCount());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s] Line: %d in frame: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,getFrameCount());
|
||||||
// Deal with observers
|
// Deal with observers
|
||||||
for(int i = 0; i < map.getSurfaceW(); ++i) {
|
for(int i = 0; i < map.getSurfaceW(); ++i) {
|
||||||
for(int j = 0; j < map.getSurfaceH(); ++j) {
|
for(int j = 0; j < map.getSurfaceH(); ++j) {
|
||||||
|
@ -2249,8 +2257,10 @@ void World::computeFow(int factionIdxToTick) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s] Line: %d in frame: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,getFrameCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s] Line: %d in frame: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,getFrameCount());
|
||||||
if(showPerfStats) {
|
if(showPerfStats) {
|
||||||
sprintf(perfBuf,"In [%s::%s] Line: %d took msecs: " MG_I64_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chronoPerf.getMillis());
|
sprintf(perfBuf,"In [%s::%s] Line: %d took msecs: " MG_I64_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chronoPerf.getMillis());
|
||||||
perfList.push_back(perfBuf);
|
perfList.push_back(perfBuf);
|
||||||
|
@ -2276,15 +2286,20 @@ void World::computeFow(int factionIdxToTick) {
|
||||||
//fire
|
//fire
|
||||||
for(int i=0; i<getFactionCount(); ++i) {
|
for(int i=0; i<getFactionCount(); ++i) {
|
||||||
if(factionIdxToTick == -1 || factionIdxToTick == this->thisFactionIndex) {
|
if(factionIdxToTick == -1 || factionIdxToTick == this->thisFactionIndex) {
|
||||||
|
bool cellVisibleForFaction = showWorldForPlayer(thisFactionIndex);
|
||||||
for(int j=0; j<getFaction(i)->getUnitCount(); ++j){
|
for(int j=0; j<getFaction(i)->getUnitCount(); ++j){
|
||||||
Unit *unit= getFaction(i)->getUnit(j);
|
Unit *unit= getFaction(i)->getUnit(j);
|
||||||
|
|
||||||
//fire
|
//fire
|
||||||
ParticleSystem *fire= unit->getFire();
|
ParticleSystem *fire= unit->getFire();
|
||||||
if(fire != NULL) {
|
if(fire != NULL) {
|
||||||
bool cellVisible = showWorldForPlayer(thisFactionIndex);
|
bool cellVisible = cellVisibleForFaction;
|
||||||
if(cellVisible == false) {
|
if(cellVisible == false) {
|
||||||
cellVisible = map.getSurfaceCell(Map::toSurfCoords(unit->getPos()))->isVisible(thisTeamIndex);
|
Vec2i sCoords = Map::toSurfCoords(unit->getPos());
|
||||||
|
SurfaceCell *sc = map.getSurfaceCell(sCoords);
|
||||||
|
if(sc != NULL) {
|
||||||
|
cellVisible = sc->isVisible(thisTeamIndex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fire->setActive(cellVisible);
|
fire->setActive(cellVisible);
|
||||||
|
|
|
@ -463,8 +463,9 @@ bool VideoPlayer::hasBackEndVideoPlayer() {
|
||||||
|
|
||||||
#ifdef HAS_LIBVLC
|
#ifdef HAS_LIBVLC
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoPlayer::cleanupPlayer() {
|
void VideoPlayer::cleanupPlayer() {
|
||||||
|
|
|
@ -77,7 +77,7 @@ static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) {
|
||||||
|
|
||||||
|
|
||||||
removeFile(fullFilePath);
|
removeFile(fullFilePath);
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(out && out->stream == NULL) {
|
if(out && out->stream == NULL) {
|
||||||
|
@ -94,7 +94,7 @@ static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) {
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"===> FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"===> FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugError,"===> FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
SystemFlags::OutputDebug(SystemFlags::debugError,"===> FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
||||||
return -1; /* failure, can't open file to write */
|
return 0; /* failure, can't open file to write */
|
||||||
}
|
}
|
||||||
|
|
||||||
out->isValidXfer = true;
|
out->isValidXfer = true;
|
||||||
|
@ -103,7 +103,7 @@ static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) {
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> #2 FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> #2 FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"===> #2 FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"===> #2 FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugError,"===> #2 FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
SystemFlags::OutputDebug(SystemFlags::debugError,"===> #2 FTP Client thread FAILED to open file for writing [%s]\n",fullFilePath.c_str());
|
||||||
return -1; /* failure, can't open file to write */
|
return 0; /* failure, can't open file to write */
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t result = fwrite(buffer, size, nmemb, out->stream);
|
size_t result = fwrite(buffer, size, nmemb, out->stream);
|
||||||
|
|
|
@ -963,7 +963,7 @@ void Socket::disconnectSocket() {
|
||||||
sock = INVALID_SOCKET;
|
sock = INVALID_SOCKET;
|
||||||
#else
|
#else
|
||||||
::closesocket(sock);
|
::closesocket(sock);
|
||||||
sock = -1;
|
sock = INVALID_SOCKET;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
safeMutex.ReleaseLock();
|
safeMutex.ReleaseLock();
|
||||||
|
@ -2036,7 +2036,7 @@ void BroadCastClientSocketThread::execute() {
|
||||||
bcfd = INVALID_SOCKET;
|
bcfd = INVALID_SOCKET;
|
||||||
#else
|
#else
|
||||||
::closesocket(bcfd);
|
::closesocket(bcfd);
|
||||||
bcfd = -1;
|
bcfd = INVALID_SOCKET;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2331,7 +2331,7 @@ Socket *ServerSocket::accept(bool errorOnFail) {
|
||||||
newSock = INVALID_SOCKET;
|
newSock = INVALID_SOCKET;
|
||||||
#else
|
#else
|
||||||
::closesocket(newSock);
|
::closesocket(newSock);
|
||||||
newSock = -1;
|
newSock = INVALID_SOCKET;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -2773,7 +2773,7 @@ void BroadCastSocketThread::execute() {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
bcfd[idx] = INVALID_SOCKET;
|
bcfd[idx] = INVALID_SOCKET;
|
||||||
#else
|
#else
|
||||||
bcfd[idx] = -1;
|
bcfd[idx] = INVALID_SOCKET;
|
||||||
#endif
|
#endif
|
||||||
//if(strlen(subnetmask[idx]) > 0) {
|
//if(strlen(subnetmask[idx]) > 0) {
|
||||||
bcfd[idx] = socket( AF_INET, SOCK_DGRAM, 0 );
|
bcfd[idx] = socket( AF_INET, SOCK_DGRAM, 0 );
|
||||||
|
@ -2867,7 +2867,7 @@ void BroadCastSocketThread::execute() {
|
||||||
bcfd[idx] = INVALID_SOCKET;
|
bcfd[idx] = INVALID_SOCKET;
|
||||||
#else
|
#else
|
||||||
::closesocket(bcfd[idx]);
|
::closesocket(bcfd[idx]);
|
||||||
bcfd[idx] = -1;
|
bcfd[idx] = INVALID_SOCKET;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ Q5 = -2.0109921195e-07f; /* 0xb457edbb */
|
||||||
Simple x;
|
Simple x;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
Simple y,hi,lo,c,t,e,hxs,hfx,r1;
|
Simple y,hi,lo,c=0,t,e,hxs,hfx,r1;
|
||||||
int32_t k,xsb;
|
int32_t k,xsb;
|
||||||
u_int32_t hx;
|
u_int32_t hx;
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,8 @@ static Simple zero = 0.0f;
|
||||||
Simple x;
|
Simple x;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
Simple hfsq,f,c,s,z,R,u;
|
Simple hfsq,f=0,c=0,s,z,R,u;
|
||||||
int32_t k,hx,hu,ax;
|
int32_t k,hx,hu=0,ax;
|
||||||
|
|
||||||
GET_FLOAT_WORD(hx,x);
|
GET_FLOAT_WORD(hx,x);
|
||||||
ax = hx&0x7fffffff;
|
ax = hx&0x7fffffff;
|
||||||
|
|
Loading…
Reference in New Issue