Cleanings. Mostly indent fixes.
This commit is contained in:
parent
f1420f4704
commit
cff70f9fad
15 changed files with 57 additions and 64 deletions
|
@ -108,6 +108,11 @@ Bitmap::Bitmap(const char *data, int w, int h, const char *fname) : Object() {
|
|||
g_driver->createBitmap(this);
|
||||
}
|
||||
|
||||
Bitmap::Bitmap() :
|
||||
Object() {
|
||||
_data = NULL;
|
||||
}
|
||||
|
||||
void Bitmap::draw() const {
|
||||
if (_currImage == 0)
|
||||
return;
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
// Construct a bitmap from the given data.
|
||||
Bitmap(const char *filename, const char *data, int len);
|
||||
Bitmap(const char *data, int width, int height, const char *filename);
|
||||
Bitmap() : Object() { _data = 0; }
|
||||
Bitmap();
|
||||
|
||||
const char *filename() const { return _fname.c_str(); }
|
||||
|
||||
|
|
|
@ -1113,7 +1113,7 @@ void Costume::moveHead() {
|
|||
if (v.isZero()) {
|
||||
return;
|
||||
}
|
||||
// cout<<_lookAt.x()<<" "<<_lookAt.y()<<" "<<_lookAt.z()<<" "<<v.x()<<" "<<v.y()<<" "<<v.z()<<endl;
|
||||
|
||||
float magnitude = sqrt(v.x() * v.x() + v.y() * v.y());
|
||||
float a = v.x() / magnitude;
|
||||
float b = v.y() / magnitude;
|
||||
|
|
|
@ -75,8 +75,6 @@ TextObject::~TextObject() {
|
|||
}
|
||||
|
||||
void TextObject::saveState(SaveGame *state) const {
|
||||
// state->writeLESint32(_created);
|
||||
|
||||
state->writeColor(_fgColor);
|
||||
|
||||
state->writeLESint32(_x);
|
||||
|
@ -96,8 +94,6 @@ void TextObject::saveState(SaveGame *state) const {
|
|||
}
|
||||
|
||||
bool TextObject::restoreState(SaveGame *state) {
|
||||
// _created = state->readLESint32();
|
||||
|
||||
_fgColor = state->readColor();
|
||||
|
||||
_x = state->readLESint32();
|
||||
|
|
|
@ -39,10 +39,7 @@ void Sector::saveState(SaveGame *savedState) const {
|
|||
savedState->writeLESint32(_visible);
|
||||
savedState->writeFloat(_height);
|
||||
|
||||
const char *str = _name.c_str();
|
||||
int32 size = strlen(str);
|
||||
savedState->writeLESint32(size);
|
||||
savedState->write(str, size);
|
||||
savedState->writeString(_name);
|
||||
|
||||
for (int i = 0; i < _numVertices + 1; ++i) {
|
||||
savedState->writeVector3d(_vertices[i]);
|
||||
|
@ -58,12 +55,7 @@ bool Sector::restoreState(SaveGame *savedState) {
|
|||
_visible = savedState->readLESint32();
|
||||
_height = savedState->readFloat();
|
||||
|
||||
int32 size = savedState->readLESint32();
|
||||
char *str = new char[size+1];
|
||||
savedState->read(str, size);
|
||||
str[size]='\0';
|
||||
_name = str;
|
||||
delete[] str;
|
||||
_name = savedState->readString();
|
||||
|
||||
_vertices = new Graphics::Vector3d[_numVertices + 1];
|
||||
for (int i = 0; i < _numVertices + 1; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue