Commit 1df07954 authored by gerstrong@gmail.com's avatar gerstrong@gmail.com

Virtual pad fixes. Cleanups

parent 51ffeefd
v2.3.3:
-------
- Tweaked Game menu design
- Optimized compilation process
- Reduce some compiler warnings
- Overall code modernization
- AI improvements thanks to our issue reporters
- Collision improvements with switches
v2.3.1:
-------
- More Python support for mods
......
......@@ -611,3 +611,5 @@ void spawnObj(const CSpriteObject *obj)
}
ObjMove::~ObjMove()
{}
......@@ -73,7 +73,7 @@ struct ObjMove
ObjMove(const Vector2D<int>& Vector) : m_Vec(Vector) {}
ObjMove(const int offx, const int offy) : m_Vec(offx, offy) {}
virtual ~ObjMove() {}
virtual ~ObjMove();
};
// Event that will be used to move the objects in the game together with another object.
......
#if defined(VIRTUALPAD)
#include "vgamepadsimple.h"
#include <base/video/CVideoDriver.h>
......@@ -631,3 +633,4 @@ bool VirtualKeenControl::mouseState(const Vector2D<float> &Pos, const bool down)
return true;
}
#endif
#if defined(VIRTUALPAD)
#ifndef VGAMEPADSIMPLE_H
#define VGAMEPADSIMPLE_H
......@@ -134,3 +136,5 @@ public:
};
#endif // VGAMEPADSIMPLE_H
#endif // VIRTUALPAD
......@@ -19,6 +19,7 @@ VPadSettingsMenu::VPadSettingsMenu(const GsControl::Style &style) :
GameMenu(GsRect<float>(0.075f, 0.24f, 0.85f, 0.4f), style )
{
#if defined (VIRTUALPAD)
if( gVideoDriver.VGamePadEnabled() )
{
VirtualKeenControl *vkc = dynamic_cast<VirtualKeenControl*>(gInput.mpVirtPad.get());
......@@ -31,6 +32,7 @@ GameMenu(GsRect<float>(0.075f, 0.24f, 0.85f, 0.4f), style )
mpMenuDialog->addControl( mpSize );
}
#endif
setMenuLabel("KEYBMENULABEL");
......@@ -46,9 +48,11 @@ void VPadSettingsMenu::ponder(const float /*deltaT*/)
{
GameMenu::ponder(0);
#if defined (VIRTUALPAD)
const auto iSize = mpSize->getSelection();
gVideoDriver.getVidConfig().mVPadSize = iSize;
#endif
}
......
......@@ -29,8 +29,8 @@ CFlag::CFlag(CMap *pmap, const Vector2D<Uint32> &Location,
const Vector2D<Uint32> &dest,
const int sprVar, bool newAction, const bool canLock ) :
CGalaxySpriteObject(pmap, FOE_ID, Location.x, Location.y, sprVar),
m_destination(dest),
m_baseframe(0)
m_destination(dest)
//m_baseframe(0)
{
solid = false;
honorPriority = false;
......
......@@ -58,7 +58,7 @@ namespace galaxy {
private:
// Where the flag/sign will pop in
Vector2D<Uint32> m_destination;
Uint16 m_baseframe;
// Uint16 m_baseframe;
void (CFlag::*processState)();
std::map< size_t, void (CFlag::*)() > mActionMap;
......
......@@ -12,7 +12,7 @@
namespace galaxy {
const int LINDSEY_MOVE_SPEED = 20;
const int LINDSEY_MOVE_TIME = 60;
//const int LINDSEY_MOVE_TIME = 60;
CLindsey::CLindsey(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
CGalaxySpriteObject(pmap, foeID, x, y, 0),
......
......@@ -23,7 +23,7 @@ A_SLUG_STUNNED = 3,
A_SLUG_STUNNED_ALT = 4
};
const int SLUG_MOVE_SPEED = 1;
//const int SLUG_MOVE_SPEED = 1;
const int SLUG_MOVE_TIMER = 8;
CPoisonSlug::CPoisonSlug(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) :
......@@ -84,7 +84,9 @@ void CPoisonSlug::processCrawling()
m_timer = 0;
setAction( A_SLUG_POOING );
playSound( SOUND_SLUG_DEFECATE );
CSlugSlime *slime = new CSlugSlime(mpMap, 0, getXMidPos(), getYDownPos()-(1<<(CSF-1)), 0);
CSlugSlime *slime = new CSlugSlime(mpMap, 0,
getXMidPos(),
getYDownPos()-(1<<(CSF-1)), 0);
gEventManager.add( new EventSpawnObject( slime ) );
xDirection = -xDirection;
......
......@@ -24,8 +24,7 @@ namespace galaxy {
constexpr int WALK_SPEED = 25;
CMastersShot::CMastersShot(CMap *pmap, const Uint16 foeID, const Uint32 x, const Uint32 y) :
CStunnable(pmap, foeID, x, y),
mTimer(0)
CStunnable(pmap, foeID, x, y)
{
// Adapt this AI
......@@ -50,7 +49,7 @@ void CMastersShot::processWalking()
}
bool CMastersShot::isNearby(CSpriteObject &theObject)
bool CMastersShot::isNearby(CSpriteObject &)
{
if( !getProbability(10) )
return false;
......
......@@ -27,7 +27,7 @@ public:
void processWalking();
//void processTurn();
bool isNearby(CSpriteObject &theObject);
bool isNearby(CSpriteObject &);
int checkSolidD( int x1, int x2, int y2, const bool push_mode );
......@@ -38,8 +38,8 @@ public:
*/
void getTouchedBy(CSpriteObject &theObject);
private:
int mTimer;
//private:
// int mTimer;
};
}
......
......@@ -25,10 +25,7 @@ constexpr int MAX_BOUNCES = 2;
constexpr int MAX_BOUNCE_INERTIA = 120;
CSpindred::CSpindred(CMap *pmap, const Uint16 foeID, const Uint32 x, const Uint32 y) :
CStunnable(pmap, foeID, x, y),
mTimer(0),
mInverseGravity(false),
mBounces(0)
CStunnable(pmap, foeID, x, y)
{
// Adapt this AI
......
......@@ -29,9 +29,9 @@ public:
void getTouchedBy(CSpriteObject &theObject);
private:
int mTimer;
bool mInverseGravity;
int mBounces;
int mTimer = 0;
bool mInverseGravity = false;
int mBounces = 0;
};
}
......
......@@ -21,9 +21,9 @@ public:
bool calcVisibility();
virtual bool isNearby(CVorticonSpriteObject &) { return true; }
//virtual bool isNearby(CVorticonSpriteObject &) { return true; }
virtual void getTouchedBy(CVorticonSpriteObject &) {}
//virtual void getTouchedBy(CVorticonSpriteObject &) {}
object_t m_type; // yorp, vorticon, etc.
......
......@@ -57,7 +57,7 @@ mounted(nullptr)
}
void CMessie::getTouchedBy(CVorticonSpriteObject &theObject)
void CMessie::getTouchedBy(CSpriteObject &theObject)
{
// This is not valid. Only if nessie is mounted or unmounted
if(CPlayer *Player = dynamic_cast<CPlayer*>(&theObject))
......
......@@ -30,8 +30,8 @@ public:
// Constructor
CMessie(CMap *p_map, Uint32 x, Uint32 y);
void getTouchedBy(CVorticonSpriteObject &theObject);
bool tryMounting(CPlayer &player);
void getTouchedBy(CSpriteObject &theObject) override;
bool tryMounting(CPlayer &player);
bool tryToUnmount();
void process();
void move_nessie();
......
#ifndef CG_VERSION_H
#define CG_VERSION_H
#define CGVERSION "2.3.2-Release"
#define CGVERSIONCODE 232000
#define CGVERSION "2.3.3-Release"
#define CGVERSIONCODE 233000
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment