scummvm/engine/objectstate.h

78 lines
1.9 KiB
C
Raw Normal View History

2006-04-02 14:20:45 +00:00
/* Residual - Virtual machine to run LucasArts' 3D adventure games
*
* Residual is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the AUTHORS
* file distributed with this source distribution.
2006-04-02 14:20:45 +00:00
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library 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
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*
* $URL$
* $Id$
*
*/
2005-01-01 10:23:18 +00:00
#ifndef OSTATE_H
#define OSTATE_H
#include "common/vector3d.h"
#include "engine/resource.h"
#include "engine/bitmap.h"
2005-01-01 12:27:57 +00:00
#include <string>
#include <list>
class ObjectState {
public:
enum Position {
OBJSTATE_BACKGROUND = 0,
OBJSTATE_UNDERLAY = 1,
OBJSTATE_OVERLAY = 2,
OBJSTATE_STATE = 3
// TODO: Find out what ObjectState 6 is supposed to be
// OBJSTATE_UNKNOWN = 6
};
2004-03-22 11:23:37 +00:00
2004-12-09 23:55:43 +00:00
ObjectState(int setupID, ObjectState::Position pos, const char *bitmap, const char *zbitmap, bool visible);
~ObjectState();
2005-04-08 12:09:17 +00:00
2004-12-09 23:55:43 +00:00
int setupID() const { return _setupID; }
Position pos() const { return _pos; }
void setPos(Position pos) { _pos = pos; }
2004-03-22 11:23:37 +00:00
const char *bitmapFilename() const {
2004-12-09 23:55:43 +00:00
return _bitmap->filename();
2004-03-22 11:23:37 +00:00
}
void setNumber(int val) {
2004-12-09 23:55:43 +00:00
_bitmap->setNumber(val);
if (_zbitmap)
_zbitmap->setNumber(val);
}
2004-03-22 11:23:37 +00:00
void draw() {
2004-12-09 23:55:43 +00:00
_bitmap->draw();
if (_zbitmap)
_zbitmap->draw();
2004-03-22 11:23:37 +00:00
}
private:
2004-12-09 23:55:43 +00:00
int _setupID;
Position _pos;
ResPtr<Bitmap> _bitmap, _zbitmap;
};
#endif