2002-12-25 13:04:01 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2005-01-01 16:09:25 +00:00
|
|
|
* Copyright (C) 2002-2005 The ScummVM project
|
2002-12-25 13:04:01 +00:00
|
|
|
*
|
|
|
|
* This program 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.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*/
|
|
|
|
|
2005-06-18 15:44:40 +00:00
|
|
|
#if !defined(NUT_RENDERER_H) && !defined(DISABLE_SCUMM_7_8)
|
2002-12-25 13:04:01 +00:00
|
|
|
#define NUT_RENDERER_H
|
|
|
|
|
|
|
|
#include "common/file.h"
|
2004-08-08 22:10:38 +00:00
|
|
|
#include "graphics/surface.h"
|
2002-12-25 13:04:01 +00:00
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
namespace Scumm {
|
|
|
|
|
2003-10-02 22:42:03 +00:00
|
|
|
class ScummEngine;
|
2002-12-25 20:07:09 +00:00
|
|
|
|
2002-12-25 13:04:01 +00:00
|
|
|
class NutRenderer {
|
2003-06-04 23:32:09 +00:00
|
|
|
protected:
|
2003-10-02 22:42:03 +00:00
|
|
|
ScummEngine *_vm;
|
2002-12-25 13:04:01 +00:00
|
|
|
bool _loaded;
|
2004-10-09 00:47:47 +00:00
|
|
|
int _numChars;
|
2003-06-04 23:32:09 +00:00
|
|
|
struct {
|
2003-09-06 16:42:28 +00:00
|
|
|
int xoffs;
|
|
|
|
int yoffs;
|
2003-06-04 23:32:09 +00:00
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
byte *src;
|
|
|
|
} _chars[256];
|
2002-12-25 13:04:01 +00:00
|
|
|
|
2004-08-08 22:10:38 +00:00
|
|
|
void drawChar(const Graphics::Surface &s, byte c, int x, int y, byte color);
|
|
|
|
void draw2byte(const Graphics::Surface &s, int c, int x, int y, byte color);
|
2002-12-25 13:04:01 +00:00
|
|
|
|
|
|
|
public:
|
2003-10-02 22:42:03 +00:00
|
|
|
NutRenderer(ScummEngine *vm);
|
2003-06-07 00:33:46 +00:00
|
|
|
virtual ~NutRenderer();
|
2005-06-18 15:44:40 +00:00
|
|
|
int getNumChars() const { return _numChars; }
|
2002-12-25 13:04:01 +00:00
|
|
|
|
2004-06-27 21:52:25 +00:00
|
|
|
bool loadFont(const char *filename);
|
2003-06-04 23:32:09 +00:00
|
|
|
|
2003-09-06 16:42:28 +00:00
|
|
|
void drawFrame(byte *dst, int c, int x, int y);
|
2004-08-08 22:10:38 +00:00
|
|
|
void drawShadowChar(const Graphics::Surface &s, int c, int x, int y, byte color, bool showShadow);
|
2003-06-04 23:32:09 +00:00
|
|
|
|
2004-10-09 00:47:47 +00:00
|
|
|
int getCharWidth(byte c) const;
|
|
|
|
int getCharHeight(byte c) const;
|
2002-12-25 13:04:01 +00:00
|
|
|
};
|
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
} // End of namespace Scumm
|
2002-12-25 13:04:01 +00:00
|
|
|
|
|
|
|
#endif
|