1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-16 17:45:52 +00:00

Merge branch 'experimental' into controllerfixup

# Conflicts:
#	Aquaria/AnimationEditor.cpp
#	Aquaria/AquariaComboBox.cpp
#	Aquaria/AquariaMenuItem.h
#	Aquaria/Avatar.cpp
#	Aquaria/BitBlotLogo.cpp
#	Aquaria/Continuity.cpp
#	Aquaria/DSQ.cpp
#	Aquaria/DSQ.h
#	Aquaria/Game.cpp
#	Aquaria/Game.h
#	Aquaria/Intro.cpp
#	Aquaria/RecipeMenuEntry.cpp
#	Aquaria/SceneEditor.cpp
#	Aquaria/States.h
#	Aquaria/UserSettings.cpp
#	BBGE/ActionMapper.cpp
#	BBGE/Base.cpp
#	BBGE/BitmapFont.h
#	BBGE/Core.cpp
#	BBGE/Core.h
#	BBGE/ParticleManager.cpp
#	BBGE/Particles.h
#	BBGE/RenderObject.h
#	BBGE/Shader.cpp
#	BBGE/Shader.h
#	BBGE/SkeletalSprite.h
#	BBGE/Texture.cpp
#	BBGE/Vector.h
This commit is contained in:
fgenesis 2021-01-12 00:26:44 +01:00
commit 03c698320a
11 changed files with 20 additions and 56 deletions

View file

@ -508,11 +508,10 @@ void AnimationEditor::undo()
{ {
if (undoEntry < undoHistory.size()) if (undoEntry < undoHistory.size())
{ {
std::list<SkeletalSprite>::iterator it = undoHistory.begin(); editSprite->animations = undoHistory[undoEntry].animations;
std::advance(it, undoEntry); if(undoEntry > 0) {
editSprite->animations = it->animations;
if(undoEntry)
undoEntry--; undoEntry--;
}
} }
} }
} }
@ -526,9 +525,7 @@ void AnimationEditor::redo()
undoEntry++; undoEntry++;
if (undoEntry < undoHistory.size()) if (undoEntry < undoHistory.size())
{ {
std::list<SkeletalSprite>::iterator it = undoHistory.begin(); editSprite->animations = undoHistory[undoEntry].animations;
std::advance(it, undoEntry);
editSprite->animations = it->animations;
} }
else else
{ {

View file

@ -3,7 +3,7 @@
#include "../BBGE/SkeletalSprite.h" #include "../BBGE/SkeletalSprite.h"
#include "StateManager.h" #include "StateManager.h"
#include <list> #include <deque>
class DebugFont; class DebugFont;
class BitmapText; class BitmapText;
@ -92,7 +92,7 @@ public:
void moveNextWidgets(float dt); void moveNextWidgets(float dt);
std::list<SkeletalSprite> undoHistory; std::deque<SkeletalSprite> undoHistory;
size_t undoEntry; size_t undoEntry;

View file

@ -43,11 +43,6 @@ const float webTime = 8;
const float petPowerTime = 30; const float petPowerTime = 30;
const float lightTime = 60; const float lightTime = 60;
Profile::Profile()
{
name = "save";
}
Continuity::Continuity() Continuity::Continuity()
{ {
toggleMoveMode = false; toggleMoveMode = false;
@ -2627,7 +2622,7 @@ void Continuity::saveFile(int slot, Vector position, unsigned char *scrShotData,
std::string Continuity::getSaveFileName(int slot, const std::string &pfix) std::string Continuity::getSaveFileName(int slot, const std::string &pfix)
{ {
std::ostringstream os; std::ostringstream os;
os << dsq->getSaveDirectory() << "/" << dsq->currentProfile.name << "-" << numToZeroString(slot, 4) << "." << pfix; os << dsq->getSaveDirectory() << "/save-" << numToZeroString(slot, 4) << "." << pfix;
return os.str(); return os.str();
} }

View file

@ -115,13 +115,6 @@ public:
void load(); void load();
}; };
class Profile
{
public:
Profile();
std::string name;
};
enum SaveSlotMode enum SaveSlotMode
{ {
SSM_NONE = -1, SSM_NONE = -1,
@ -265,8 +258,6 @@ public:
typedef std::vector<std::string> StringList; typedef std::vector<std::string> StringList;
StringList profiles; StringList profiles;
Profile currentProfile;
AquariaScreenTransition *screenTransition; AquariaScreenTransition *screenTransition;
Precacher precacher; Precacher precacher;

View file

@ -2109,7 +2109,6 @@ bool Game::saveScene(std::string scene)
std::ostringstream os2; std::ostringstream os2;
os2 << gradBtm.x << " " << gradBtm.y << " " << gradBtm.z; os2 << gradBtm.x << " " << gradBtm.y << " " << gradBtm.z;
level->SetAttribute("gradBtm", os2.str().c_str()); level->SetAttribute("gradBtm", os2.str().c_str());
} }
if (!saveMusic.empty()) if (!saveMusic.empty())
@ -2627,7 +2626,6 @@ void Game::applyState()
firstSchoolFish = true; firstSchoolFish = true;
invincibleOnNested = true; invincibleOnNested = true;
controlHintNotes.clear(); controlHintNotes.clear();
worldMapIndex = -1; worldMapIndex = -1;
@ -3943,7 +3941,6 @@ bool Game::collideCircleVsLineAngle(RenderObject *r, float angle, float startLen
return collision; return collision;
} }
Bone *Game::collideSkeletalVsCircle(Entity *skeletal, Vector pos, float radius) Bone *Game::collideSkeletalVsCircle(Entity *skeletal, Vector pos, float radius)
{ {
float smallestDist = HUGE_VALF; float smallestDist = HUGE_VALF;

View file

@ -131,9 +131,6 @@ public:
int idx; int idx;
}; };
typedef std::vector<Quad*> QuadList;
typedef std::vector<QuadList> QuadArray;
typedef std::vector<Element*> ElementUpdateList; typedef std::vector<Element*> ElementUpdateList;
struct EntitySaveData struct EntitySaveData

View file

@ -96,7 +96,6 @@ std::string getMapTemplateFilename()
return ""; return "";
} }
SceneEditor::SceneEditor() : ActionMapper(), on(false) SceneEditor::SceneEditor() : ActionMapper(), on(false)
{ {
autoSaveFile = 0; autoSaveFile = 0;
@ -2415,18 +2414,17 @@ void SceneEditor::prevElement()
void SceneEditor::doPrevElement() void SceneEditor::doPrevElement()
{ {
size_t oldCur = curElement; size_t oldCur = curElement;
size_t maxn = dsq->game->elementTemplates.size();
if(dsq->game->elementTemplates.size() == 0) { if(curElement)
return;
}
if(curElement > 0) {
curElement--; curElement--;
} else if(maxn)
if (curElement >= game->elementTemplates.size()) curElement = maxn-1;
curElement = dsq->game->elementTemplates.size()-1;
if (dsq->game->elementTemplates[curElement].idx < 1024) if (maxn && curElement >= maxn)
curElement = maxn-1;
if (maxn && dsq->game->elementTemplates[curElement].idx < 1024)
{ {
placer->setTexture(dsq->game->elementTemplates[curElement].gfx); placer->setTexture(dsq->game->elementTemplates[curElement].gfx);
} }

View file

@ -205,15 +205,6 @@ void ParticleManager::nextFree(size_t jump)
free -= size; free -= size;
} }
void ParticleManager::prevFree(size_t jump)
{
if(free < jump) {
free = free + size - jump;
} else {
free -= jump;
}
}
void ParticleManager::setFree(size_t free) void ParticleManager::setFree(size_t free)
{ {
if (free != -1) if (free != -1)
@ -222,8 +213,8 @@ void ParticleManager::setFree(size_t free)
} }
} }
const int spread = 8; static const size_t spread = 8;
const int spreadCheck = 128; static const size_t spreadCheck = 128;
// travel the list until you find an empty or give up // travel the list until you find an empty or give up
Particle *ParticleManager::stomp() Particle *ParticleManager::stomp()

View file

@ -234,7 +234,6 @@ protected:
Particle* stomp(); Particle* stomp();
void nextFree(size_t f=1); void nextFree(size_t f=1);
void prevFree(size_t f=1);
size_t oldFree; size_t oldFree;

View file

@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Quad.h" #include "Quad.h"
#include "SimpleIStringStream.h" #include "SimpleIStringStream.h"
#include <map>
// for 2d system only // for 2d system only
enum AnimationCommand enum AnimationCommand
@ -61,9 +62,7 @@ public:
std::string gfx; std::string gfx;
std::string name; std::string name;
size_t boneIdx; size_t boneIdx;
int pidx; int pidx, rbp;
bool rbp;
std::string prt; std::string prt;
std::vector<Vector> changeStrip; std::vector<Vector> changeStrip;

View file

@ -419,7 +419,7 @@ ImageTGA *Texture::TGAloadMem(void *mem, int size)
ByteBuffer bb(mem, size, ByteBuffer::REUSE); ByteBuffer bb(mem, size, ByteBuffer::REUSE);
ImageTGA *pImageData = NULL; // This stores our important image data ImageTGA *pImageData = NULL; // This stores our important image data
unsigned short width = 0, height = 0;// The dimensions of the image uint16_t width = 0, height = 0; // The dimensions of the image
byte length = 0; // The length in bytes to the pixels byte length = 0; // The length in bytes to the pixels
byte imageType = 0; // The image type (RLE, RGB, Alpha...) byte imageType = 0; // The image type (RLE, RGB, Alpha...)
byte bits = 0; // The bits per pixel for the image (16, 24, 32) byte bits = 0; // The bits per pixel for the image (16, 24, 32)