Commit 4108ac3e authored by gerstrong@gmail.com's avatar gerstrong@gmail.com

More cleanups

parent c851a7b2
......@@ -1607,14 +1607,13 @@ void CInput::flushEvents()
m_EventList.clear();
}
static const int w = 480, h = 320;
#define KSHOWHIDECTRLS (-10)
//#if defined(MOUSEWRAPPER)
#if SDL_VERSION_ATLEAST(2, 0, 0)
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
static const int w = 480, h = 320;
static TouchButton* getPhoneButtons(stInputCommand InputCommand[NUM_INPUTS][MAX_COMMANDS]) {
static TouchButton phoneButtons[] = {
......@@ -1642,10 +1641,11 @@ static TouchButton* getPhoneButtons(stInputCommand InputCommand[NUM_INPUTS][MAX_
}
#endif
static const int phoneButtonN = 15;
typedef std::set<int> MouseIndexSet;
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
static const int phoneButtonN = 15;
static Uint32 phoneButtonLasttime[phoneButtonN] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
static MouseIndexSet phoneButton_MouseIndex[phoneButtonN];
......
......@@ -143,6 +143,8 @@ static inline void scale3x_8_def_whole(scale3x_uint8* restrict dst0, scale3x_uin
}
}
#ifndef USE_SCALE_RANDOMWRITE
static inline void scale3x_8_def_border(scale3x_uint8* restrict dst, const scale3x_uint8* restrict src0, const scale3x_uint8* restrict src1, const scale3x_uint8* restrict src2, unsigned count)
{
assert(count >= 2);
......@@ -245,6 +247,8 @@ static inline void scale3x_8_def_center(scale3x_uint8* restrict dst, const scale
}
}
#endif
static inline void scale3x_16_def_whole(scale3x_uint16* restrict dst0, scale3x_uint16* restrict dst1, scale3x_uint16* restrict dst2, const scale3x_uint16* restrict src0, const scale3x_uint16* restrict src1, const scale3x_uint16* restrict src2, unsigned count)
{
assert(count >= 2);
......@@ -336,6 +340,8 @@ static inline void scale3x_16_def_whole(scale3x_uint16* restrict dst0, scale3x_u
}
}
#ifndef USE_SCALE_RANDOMWRITE
static inline void scale3x_16_def_border(scale3x_uint16* restrict dst, const scale3x_uint16* restrict src0, const scale3x_uint16* restrict src1, const scale3x_uint16* restrict src2, unsigned count)
{
assert(count >= 2);
......@@ -438,6 +444,8 @@ static inline void scale3x_16_def_center(scale3x_uint16* restrict dst, const sca
}
}
#endif
static inline void scale3x_32_def_whole(scale3x_uint32* restrict dst0, scale3x_uint32* restrict dst1, scale3x_uint32* restrict dst2, const scale3x_uint32* restrict src0, const scale3x_uint32* restrict src1, const scale3x_uint32* restrict src2, unsigned count)
{
assert(count >= 2);
......@@ -580,6 +588,8 @@ static inline void scale3x_32_def_border(scale3x_uint32* restrict dst, const sca
}
}
#ifndef USE_SCALE_RANDOMWRITE
static inline void scale3x_32_def_center(scale3x_uint32* restrict dst, const scale3x_uint32* restrict src0, const scale3x_uint32* restrict src1, const scale3x_uint32* restrict src2, unsigned count)
{
assert(count >= 2);
......@@ -631,6 +641,8 @@ static inline void scale3x_32_def_center(scale3x_uint32* restrict dst, const sca
}
}
#endif
/**
* Scale by a factor of 3 a row of pixels of 8 bits.
* The function is implemented in C.
......
......@@ -462,7 +462,7 @@ void CSpriteObject::processFalling()
// In order to avoid, that they can't get out, pull them out of there!
}
void CSpriteObject::getShotByRay(object_t &obj_type)
void CSpriteObject::getShotByRay(object_t &)
{
if( !mInvincible && mHealthPoints>0)
{
......@@ -504,7 +504,7 @@ void CSpriteObject::kill_intersecting_tile(int mpx, int mpy, CSpriteObject &theO
// Just kills the object
void CSpriteObject::kill()
void CSpriteObject::kill(const bool, const bool)
{
if ( exists && canbezapped )
{
......
......@@ -265,7 +265,10 @@ class CSpriteObject
bool hitdetectWithTilePropertyHor(const Uint16 Property, const int lxl, const int lxr, const int ly, const int res);
bool hitdetectWithTilePropertyVert(const Uint16 Property, const int lx, const int lyu, const int lyd, const int res);
bool hitdetectWithTileProperty(const int Property, const int x, const int y);
virtual void kill();
virtual void kill(const bool force = false,
const bool noDieProcess = false);
void blink(Uint16 frametime);
// Collision parts
......@@ -330,7 +333,7 @@ class CSpriteObject
virtual void processFalling();
virtual void getTouchedBy(CSpriteObject&) {}
virtual bool isNearby(CSpriteObject&) { return true; }
virtual void getShotByRay(object_t &obj_type);
virtual void getShotByRay(object_t &);
void kill_intersecting_tile(int mpx, int mpy, CSpriteObject &theObject);
CMap *getMapPtr() { return mpMap; }
......
......@@ -137,31 +137,31 @@ public:
/**
* Pushes the players by the given object Reference
*/
void push( CGalaxySpriteObject &theObject );
* Pushes the players by the given object Reference
*/
void push( CGalaxySpriteObject &theObject );
/**
* Overloaded getActionStatus which uses the episodes' map
*/
bool getActionStatus(int16_t ActionNumber);
/**
* Overloaded getActionStatus which uses the episodes' map
*/
bool getActionStatus(int16_t ActionNumber) override;
/**
* returns the Sprite ID from the given action
*/
int getSpriteIDFromAction(const int16_t ActionNumber);
/**
* returns the Sprite ID from the given action
*/
int getSpriteIDFromAction(const int16_t ActionNumber);
/**
* Overloaded setActionForce which uses the action for the player
*/
void setActionForce(const size_t ActionNumber);
/**
* Overloaded setActionForce which uses the action for the player
*/
void setActionForce(const size_t ActionNumber) override;
/**
* \brief The Player will get 1 UP when that function is launched
*/
void getAnotherLife(const int lc_x, const int lc_y, const bool display, const bool alt);
/**
* \brief The Player will get 1 UP when that function is launched
*/
void getAnotherLife(const int lc_x, const int lc_y, const bool display, const bool alt);
virtual void pumpEvent(const CEvent *evPtr);
virtual void pumpEvent(const CEvent *evPtr) override;
/**
* \description Camera of the player gets performed here...
......@@ -172,11 +172,11 @@ public:
* @brief Player can always be visible and active, even if he is not seen.
* @return
*/
bool calcVisibility();
bool calcVisibility() override;
/**
* \description Read the Input of the Player and sets the variables accordingly
*/
/**
* \description Read the Input of the Player and sets the variables accordingly
*/
virtual void processInput();
......@@ -217,7 +217,7 @@ public:
* @param noDieProcess Do not show any dying animation kill him directly
*/
virtual void kill(const bool force = false,
const bool noDieProcess = false);
const bool noDieProcess = false) override;
/**
* Happens when usually the Dopefish eats Keen
......
......@@ -7,7 +7,6 @@
#include "sdl/audio/Audio.h"
#include "sdl/audio/base/Sampling.h"
#include "sdl/audio/music/COGGPlayer.h"
#include "sdl/audio/music/CIMFPlayer.h"
#include "CMusic.h"
#include <base/GsLogging.h>
......
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