1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-10 16:32:31 +00:00

Remove unused files

This commit is contained in:
fgenesis 2016-05-05 20:05:38 +02:00
commit 51baa76816
51 changed files with 13 additions and 4111 deletions

View file

@ -1,59 +0,0 @@
/*
Copyright (C) 2007, 2010 - Bit-Blot
This file is part of Aquaria.
Aquaria is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "Element.h"
#include "../BBGE/Core.h"
BoxElement::BoxElement(int width, int height) : Element(BOX)
{
blendEnabled = false;
this->width = width;
this->height = height;
height+=2;
ww = width/2 + 2;
hh = height/2 + 10;
this->color = 0;
cull = true;
//cull = false;
}
/*
bool BoxElement::isOnScreen()
{
// HACK: biased towards being fast for rows
//if (alpha.x < 1.0f) return false;
//if (!cull) return true;
if (this->position.y + hh >= core->screenCullY1
&& this->position.y - hh <= core->screenCullY2)
{
if (this->position.x + ww >= core->screenCullX1
&& this->position.x - ww <= core->screenCullX2)
{
return true;
}
}
return false;
}
*/

View file

@ -1,56 +0,0 @@
/*
Copyright (C) 2007, 2010 - Bit-Blot
This file is part of Aquaria.
Aquaria is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "GridRender.h"
BubbleRender::BubbleRender() : RenderObject()
{
bubble.setTexture("particles/bubble");
bubble.alpha = 0.5;
bubble.scale = Vector(0.5,0.5);
cull = false;
}
void BubbleRender::rebuild()
{
bubbles.clear();
for (int x = dsq->game->cameraMin.x; x < dsq->game->cameraMax.x; x+=64)
{
for (int y = dsq->game->cameraMin.y; y < dsq->game->cameraMax.y; y+=64)
{
bubbles.push_back(Vector(x,y) + Vector(rand()%16-32, rand()%16-32));
}
}
}
void BubbleRender::onRender()
{
for (int i = 0; i < bubbles.size(); i++)
{
if (bubbles[i].x > core->screenCullX1 && bubbles[i].x < core->screenCullX2)
{
if (bubbles[i].y > core->screenCullY1 && bubbles[i].y < core->screenCullY2)
{
bubble.position = bubbles[i];
bubble.render();
}
}
}
}

View file

@ -33,7 +33,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Shot.h"
#include "GridRender.h"
#include "AutoMap.h"
#include "PackRead.h"
#include "RoundedRect.h"
#include "TTFFont.h"

View file

@ -1,62 +0,0 @@
/*
Copyright (C) 2007, 2010 - Bit-Blot
This file is part of Aquaria.
Aquaria is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "DSQ.h"
void FFTNotes::load()
{
data.clear();
std::ifstream in("data/FFTNotes.txt");
std::string read;
while (std::getline(in, read))
{
std::istringstream is(read);
int n=0, v=0;
is >> n;
while (is >> v)
{
data[v] = n+1;
}
}
in.close();
}
int FFTNotes::getNoteFromFFT(int fft, int octave)
{
if (fft == 0)
return -1;
int v = data[fft]-1;
/*
std::ostringstream os;
os << "fftv: " << v;
debugLog(os.str());
*/
if (v == (octave+1)*10)
{
v = 7;
}
if (v > (octave+1)*10 || v < octave*10)
{
v = -1;
}
if (v != -1)
v -= octave*10; // : )
return v;
}

View file

@ -2099,14 +2099,14 @@ void Game::clearDynamicGrid(unsigned char maskbyte /* = OT_MASK_BLACK */)
{
// just to be sure in case the grid/type sizes change,
// otherwise there is a chance to write a few bytes over the end of the buffer -- FG
compile_assert(sizeof(grid) % sizeof(uint32) == 0);
compile_assert(sizeof(grid) % sizeof(unsigned) == 0);
unsigned char *gridstart = &grid[0][0];
uint32 *gridend = (uint32*)(gridstart + sizeof(grid));
uint32 *gridptr = (uint32*)gridstart;
unsigned *gridend = (unsigned*)(gridstart + sizeof(grid));
unsigned *gridptr = (unsigned*)gridstart;
// mask out specific bytes
// use full uint32 rounds instead of single-bytes to speed things up.
const uint32 mask = maskbyte | (maskbyte << 8) | (maskbyte << 16) | (maskbyte << 24);
const unsigned mask = maskbyte | (maskbyte << 8) | (maskbyte << 16) | (maskbyte << 24);
do
{
*gridptr &= mask;

View file

@ -3517,8 +3517,8 @@ void SceneEditor::prevEntityType()
void SceneEditor::dumpObs()
{
TileVector tv;
unsigned char *data = new unsigned char[MAX_GRID * MAX_GRID * sizeof(uint32)];
uint32 *ptr = (uint32*)data;
unsigned char *data = new unsigned char[MAX_GRID * MAX_GRID * sizeof(unsigned)];
unsigned *ptr = (unsigned*)data;
for(tv.y = MAX_GRID - 1; ; --tv.y)
{
for(tv.x = 0; tv.x < MAX_GRID; ++tv.x)

View file

@ -1,70 +0,0 @@
/*
Copyright (C) 2007, 2010 - Bit-Blot
This file is part of Aquaria.
Aquaria is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "States.h"
StarRenderer::StarRenderer(int num, int range) : RenderObject()
{
stars.resize(num);
int rh = range/2;
for (int i = 0; i < stars.size(); i++)
{
stars[i] = Vector((rand()%range)-rh, (rand()%range)-rh, (rand()%range)-rh);
}
//rotation.interpolateTo(Vector(0,360,0), 30, -1);
//position.interpolateTo(Vector(0,0,-100), 10, -1);
}
void StarRenderer::render()
{
#ifdef BBGE_BUILD_OPENGL
core->enable3D();
glLoadIdentity();
glTranslatef(position.x, position.y, position.z);
glRotatef(rotation.x, 1, 0, 0);
glRotatef(rotation.y, 0, 1, 0);
glRotatef(rotation.z, 0, 0, 1);
glPointSize(1);
glBindTexture(GL_TEXTURE_2D, 0);
glBegin(GL_POINTS);
for (int i = 0; i < stars.size(); i++)
{
float c = 1.0f-fabsf(stars[i].z)/50.0f;
glColor3f(c,c,c);
glVertex3f(stars[i].x, stars[i].y, stars[i].z);
}
glEnd();
core->enable2D(core->getVirtualWidth());
/*
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
*/
#endif
}
void StarRenderer::onRender()
{
}

View file

@ -1,104 +0,0 @@
/*
Copyright (C) 2007, 2010 - Bit-Blot
This file is part of Aquaria.
Aquaria is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "WaterFont.h"
#include "DSQ.h"
#include "Game.h"
#include "Avatar.h"
#include "../BBGE/Particles.h"
WaterFont::WaterFont() : BitmapText(&dsq->font)
{
pTime = 0;
setBitmapFontEffect(BFE_SHADOWBLUR);
setFontSize(26);
}
//const float interval = 0.015;
void spawnWaterFontParticle(RenderObject *me, Vector position, int size, float life, int layer)
{
float t = life;
int angle = rand()%360;
int spd = 10;
PauseQuad *q = new PauseQuad;
q->setTexture("particles/spark");
q->setBlendType(RenderObject::BLEND_ADD);
q->color.ensureData();
q->color.data->path.addPathNode(Vector(1,1,1),0);
q->color.data->path.addPathNode(Vector(0.1,0.75,1),0.3);
q->color.data->path.addPathNode(Vector(0.05,0.5,1),0.8);
q->color.data->path.addPathNode(Vector(0,0,1),1.0);
q->color.startPath(t);
//q->color = Vector(1, 0.5, 0);
q->alpha.ensureData();
q->alpha.data->path.addPathNode(0, 0);
q->alpha.data->path.addPathNode(0.2, 0.5);
q->alpha.data->path.addPathNode(0, 1.0);
q->alpha.startPath(t);
q->velocity = Vector(sinf(angle)*spd,cosf(angle)*spd);
//q->velocity += vel;
q->setLife(1.0);
q->setDecayRate(1.0f/t);
q->rotation.z = rand()%360;
q->setWidthHeight(size, size);
q->position = position;
q->cull = false;
//q->influenced = 16;
dsq->game->addRenderObject(q, layer);
//me->addChild(q);
//me->renderBeforeParent = false;
//me->parentManagedPointer = true;
//q->update(interval);
}
//const float interval = 0.012;
const float interval = 0.08;
void WaterFont::onUpdate(float dt)
{
BitmapText::onUpdate(dt);
Vector sp(position.x-alignWidth*0.5f-15, 5+position.y+5);
Vector ep(position.x+alignWidth*0.5f+15, 5+position.y+10);
pTime += dt;
while (pTime > interval)
{
int dist = alignWidth / 40;
for (int i = 0; i < dist; i++)
{
Vector p(rand()%(int(ep.x-sp.x))+sp.x, rand()%(int(ep.y-sp.y))+sp.y);
/*
std::ostringstream os;
os << "p(" << p.x << ", " << p.y << ")";
debugLog(os.str());
*/
Vector d(rand()%200-100,rand()%200-100);
d *= 0.01f;
spawnWaterFontParticle(this, p, 64, 1.2, LR_PARTICLES);
}
pTime -= interval;
}
}

View file

@ -1,35 +0,0 @@
/*
Copyright (C) 2007, 2010 - Bit-Blot
This file is part of Aquaria.
Aquaria is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef WATERFONT_H
#define WATERFONT_H
#include "../BBGE/BitmapFont.h"
class WaterFont : public BitmapText
{
public:
WaterFont();
protected:
float pTime;
void onUpdate(float dt);
};
#endif