diff --git a/Aquaria/Beam.cpp b/Aquaria/Beam.cpp index 00dd262..6f31c6b 100644 --- a/Aquaria/Beam.cpp +++ b/Aquaria/Beam.cpp @@ -48,7 +48,7 @@ Beam::Beam(Vector pos, float angle) : Quad() beamWidth = 16; } -void Beam::setBeamWidth(int w) +void Beam::setBeamWidth(float w) { beamWidth = w; } diff --git a/Aquaria/CollideEntity.cpp b/Aquaria/CollideEntity.cpp index 313239b..2f854c5 100644 --- a/Aquaria/CollideEntity.cpp +++ b/Aquaria/CollideEntity.cpp @@ -205,7 +205,7 @@ void CollideEntity::updateMovement(float dt) if (vel.x != 0 || vel.y != 0) { - const int hw = collideRadius; + const float hw = collideRadius; bool freeRange = false; if (isv(EV_COLLIDELEVEL,1)) diff --git a/Aquaria/Game.cpp b/Aquaria/Game.cpp index 0516171..759c608 100644 --- a/Aquaria/Game.cpp +++ b/Aquaria/Game.cpp @@ -2716,7 +2716,7 @@ void Game::setTimerText(float time) timerText->setText(os.str()); } -void Game::generateCollisionMask(Quad *q, int overrideCollideRadius) +void Game::generateCollisionMask(Quad *q, float overrideCollideRadius /* = 0 */) { #ifdef BBGE_BUILD_OPENGL if (q->texture) @@ -8151,7 +8151,7 @@ bool Game::collideCircleVsCircle(Entity *a, Entity *b) return (a->position - b->position).isLength2DIn(a->collideRadius + b->collideRadius); } -bool Game::collideHairVsCircle(Entity *a, int num, const Vector &pos2, int radius, float perc, int *colSegment) +bool Game::collideHairVsCircle(Entity *a, int num, const Vector &pos2, float radius, float perc, int *colSegment) { if (perc == 0) perc = 1; @@ -10879,7 +10879,7 @@ Vector Game::getClosestPointOnLine(Vector a, Vector b, Vector p) return a + V; } -bool Game::collideCircleWithGrid(const Vector& position, int r) +bool Game::collideCircleWithGrid(const Vector& position, float r) { Vector tile = position; TileVector t(tile); diff --git a/Aquaria/Game.h b/Aquaria/Game.h index ecdd013..db33fa1 100644 --- a/Aquaria/Game.h +++ b/Aquaria/Game.h @@ -670,9 +670,9 @@ public: void registerSporeDrop(const Vector &pos, int t); bool collideBoxWithGrid(const Vector& position, int w, int h); - bool collideCircleWithGrid(const Vector& position, int r); + bool collideCircleWithGrid(const Vector& position, float r); - bool collideHairVsCircle(Entity *a, int num, const Vector &pos2, int radius, float perc=0, int *colSegment=0); + bool collideHairVsCircle(Entity *a, int num, const Vector &pos2, float radius, float perc=0, int *colSegment=0); bool collideCircleVsCircle(Entity *a, Entity *b); Bone *collideSkeletalVsCircle(Entity *skeletal, Entity *circle); @@ -823,7 +823,7 @@ public: void setTimerTextAlpha(float a, float t); void setTimerText(float time); - void generateCollisionMask(Quad *q, int overrideCollideRadius=0); + void generateCollisionMask(Quad *q, float overrideCollideRadius=0); std::string sceneNatureForm; std::string fromScene, toNode; int toFlip; diff --git a/Aquaria/Path.cpp b/Aquaria/Path.cpp index cae5aaf..58e2959 100644 --- a/Aquaria/Path.cpp +++ b/Aquaria/Path.cpp @@ -56,7 +56,7 @@ Path::Path() spiritFreeze = true; } -void Path::clampPosition(Vector *pos, int radius) +void Path::clampPosition(Vector *pos, float radius) { if (pathShape == PATHSHAPE_CIRCLE) { diff --git a/Aquaria/Path.h b/Aquaria/Path.h index c664d97..7c85d83 100644 --- a/Aquaria/Path.h +++ b/Aquaria/Path.h @@ -76,7 +76,7 @@ public: ~Path(); void destroy(); void init(); - void clampPosition(Vector *pos, int rad=0); + void clampPosition(Vector *pos, float rad=0); void song(SongType song); void songNote(int note); void songNoteDone(int note, float len); diff --git a/Aquaria/ScriptedEntity.cpp b/Aquaria/ScriptedEntity.cpp index f31a88f..5b6a7fa 100644 --- a/Aquaria/ScriptedEntity.cpp +++ b/Aquaria/ScriptedEntity.cpp @@ -227,7 +227,7 @@ void ScriptedEntity::setupEntity(const std::string &tex, int lcode) this->layer = dsq->getEntityLayerToLayer(lcode); } -void ScriptedEntity::setupBasicEntity(const std::string& texture, int health, int manaBall, int exp, int money, int collideRadius, int state, int w, int h, int expType, bool hitEntity, int updateCull, int layer) +void ScriptedEntity::setupBasicEntity(const std::string& texture, int health, int manaBall, int exp, int money, float collideRadius, int state, int w, int h, int expType, bool hitEntity, int updateCull, int layer) { //this->updateCull = updateCull; updateCull = -1; diff --git a/Aquaria/ScriptedEntity.h b/Aquaria/ScriptedEntity.h index 4118547..54e94d1 100644 --- a/Aquaria/ScriptedEntity.h +++ b/Aquaria/ScriptedEntity.h @@ -37,7 +37,7 @@ public: void resetTimer(float t); void setEntityLayer(int layer); void setupEntity(const std::string &tex, int layer=0); - void setupBasicEntity(const std::string& texture, int health, int manaBall, int exp, int money, int collideRadius, int state, int w, int h, int expType, bool hitEntity, int updateCull, int layer); + void setupBasicEntity(const std::string& texture, int health, int manaBall, int exp, int money, float collideRadius, int state, int w, int h, int expType, bool hitEntity, int updateCull, int layer); void initSegments(int numSegments, int minDist, int maxDist, std::string bodyTex, std::string tailTex, int w, int h, float taper, bool reverseSegments); void registerNewPart(RenderObject *r, const std::string &name); typedef std::map PartMap; diff --git a/Aquaria/Shot.h b/Aquaria/Shot.h index 32f0da5..4ab6b6f 100644 --- a/Aquaria/Shot.h +++ b/Aquaria/Shot.h @@ -166,9 +166,9 @@ public: void setDamage(float dmg); void setFirer(Entity *e); - void setBeamWidth(int w); + void setBeamWidth(float w); protected: - int beamWidth; + float beamWidth; void onRender(); void onEndOfLife(); void onUpdate(float dt); diff --git a/BBGE/RenderObject.h b/BBGE/RenderObject.h index e755478..1925570 100644 --- a/BBGE/RenderObject.h +++ b/BBGE/RenderObject.h @@ -289,13 +289,13 @@ public: //D3DXMATRIX matrix; #endif - int collideRadius; + float collideRadius; Vector collidePosition; std::vector collisionMask; std::vector transformedCollisionMask; CollideRects collisionRects; - int collisionMaskRadius; + float collisionMaskRadius; float alphaMod; diff --git a/BBGE/SkeletalSprite.cpp b/BBGE/SkeletalSprite.cpp index ea0a5d3..d7abec1 100644 --- a/BBGE/SkeletalSprite.cpp +++ b/BBGE/SkeletalSprite.cpp @@ -1079,7 +1079,7 @@ Bone *SkeletalSprite::getBoneByIdx(int idx) return 0; } -Bone *SkeletalSprite::initBone(int idx, std::string gfx, int pidx, int rbp, std::string name, int cr, bool fh, bool fv, const Vector &cp) +Bone *SkeletalSprite::initBone(int idx, std::string gfx, int pidx, int rbp, std::string name, float cr, bool fh, bool fv, const Vector &cp) { Bone *b = new Bone; b->boneIdx = idx; diff --git a/BBGE/SkeletalSprite.h b/BBGE/SkeletalSprite.h index b170765..6841106 100644 --- a/BBGE/SkeletalSprite.h +++ b/BBGE/SkeletalSprite.h @@ -270,7 +270,7 @@ protected: int selectedBone; friend class AnimationLayer; std::vector animLayers; - Bone* initBone(int idx, std::string gfx, int pidx, int rbp=0, std::string name="", int cr=0, bool fh=false, bool fv=false, const Vector &cp=Vector(0,0,0)); + Bone* initBone(int idx, std::string gfx, int pidx, int rbp=0, std::string name="", float cr=0, bool fh=false, bool fv=false, const Vector &cp=Vector(0,0,0)); void deleteBones(); void onUpdate(float dt); };