[Scummvm-cvs-logs] SF.net SVN: scummvm:[44224] scummvm/trunk/engines/cine
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Sep 21 01:34:49 CEST 2009
Revision: 44224
http://scummvm.svn.sourceforge.net/scummvm/?rev=44224&view=rev
Author: lordhoto
Date: 2009-09-20 23:34:48 +0000 (Sun, 20 Sep 2009)
Log Message:
-----------
Changed some type names to match our coding guidelines.
Modified Paths:
--------------
scummvm/trunk/engines/cine/gfx.cpp
scummvm/trunk/engines/cine/gfx.h
scummvm/trunk/engines/cine/object.cpp
scummvm/trunk/engines/cine/object.h
scummvm/trunk/engines/cine/script.h
scummvm/trunk/engines/cine/script_fw.cpp
scummvm/trunk/engines/cine/script_os.cpp
Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp 2009-09-20 23:25:39 UTC (rev 44223)
+++ scummvm/trunk/engines/cine/gfx.cpp 2009-09-20 23:34:48 UTC (rev 44224)
@@ -134,7 +134,7 @@
* \param obj Object info
* \param fillColor Sprite color
*/
-void FWRenderer::fillSprite(const objectStruct &obj, uint8 color) {
+void FWRenderer::fillSprite(const ObjectStruct &obj, uint8 color) {
const byte *data = animDataTable[obj.frame].data();
int x, y, width, height;
@@ -150,7 +150,7 @@
* \param obj Object info
* \param fillColor Sprite color
*/
-void FWRenderer::incrustMask(const objectStruct &obj, uint8 color) {
+void FWRenderer::incrustMask(const ObjectStruct &obj, uint8 color) {
const byte *data = animDataTable[obj.frame].data();
int x, y, width, height;
@@ -166,7 +166,7 @@
* \param obj Object info
* \param mask External mask
*/
-void FWRenderer::drawMaskedSprite(const objectStruct &obj, const byte *mask) {
+void FWRenderer::drawMaskedSprite(const ObjectStruct &obj, const byte *mask) {
const byte *data = animDataTable[obj.frame].data();
int x, y, width, height;
@@ -183,7 +183,7 @@
/*! \brief Draw color sprite
* \param obj Object info
*/
-void FWRenderer::drawSprite(const objectStruct &obj) {
+void FWRenderer::drawSprite(const ObjectStruct &obj) {
const byte *mask = animDataTable[obj.frame].mask();
drawMaskedSprite(obj, mask);
}
@@ -191,7 +191,7 @@
/*! \brief Draw color sprite on background
* \param obj Object info
*/
-void FWRenderer::incrustSprite(const objectStruct &obj) {
+void FWRenderer::incrustSprite(const ObjectStruct &obj) {
const byte *data = animDataTable[obj.frame].data();
const byte *mask = animDataTable[obj.frame].mask();
int x, y, width, height;
@@ -333,9 +333,9 @@
// Draw the filled rectangle
//
// Since the Amiga version uses a transparent boxes we need to decide whether:
- // - we draw a box, that should be the case then both width and height is greater than 1
- // - we draw a line, that should be the case then either width or height is 1
- // When we draw a box and we're running an Amiga version we do use the special code to make
+ // - we draw a box, that should be the case when both width and height is greater than 1
+ // - we draw a line, that should be the case when either width or height is 1
+ // When we draw a box and we're running an Amiga version we do use special code to make
// the boxes transparent.
// When on the other hand we are drawing a line or are not running an Amiga version, we will
// always use the code, which simply fills the rect.
@@ -457,7 +457,7 @@
*/
void FWRenderer::renderOverlay(const Common::List<overlay>::iterator &it) {
int idx, len, width;
- objectStruct *obj;
+ ObjectStruct *obj;
AnimData *sprite;
byte *mask;
@@ -937,7 +937,7 @@
* \param obj Object info
* \param fillColor Sprite color
*/
-void OSRenderer::incrustMask(const objectStruct &obj, uint8 color) {
+void OSRenderer::incrustMask(const ObjectStruct &obj, uint8 color) {
const byte *data = animDataTable[obj.frame].data();
int x, y, width, height;
@@ -954,7 +954,7 @@
/*! \brief Draw color sprite
* \param obj Object info
*/
-void OSRenderer::drawSprite(const objectStruct &obj) {
+void OSRenderer::drawSprite(const ObjectStruct &obj) {
const byte *data = animDataTable[obj.frame].data();
int x, y, width, height, transColor;
@@ -970,7 +970,7 @@
/*! \brief Draw color sprite
* \param obj Object info
*/
-void OSRenderer::incrustSprite(const objectStruct &obj) {
+void OSRenderer::incrustSprite(const ObjectStruct &obj) {
const byte *data = animDataTable[obj.frame].data();
int x, y, width, height, transColor;
@@ -1036,7 +1036,7 @@
*/
void OSRenderer::renderOverlay(const Common::List<overlay>::iterator &it) {
int len, idx, width, height;
- objectStruct *obj;
+ ObjectStruct *obj;
AnimData *sprite;
byte *mask;
byte color;
Modified: scummvm/trunk/engines/cine/gfx.h
===================================================================
--- scummvm/trunk/engines/cine/gfx.h 2009-09-20 23:25:39 UTC (rev 44223)
+++ scummvm/trunk/engines/cine/gfx.h 2009-09-20 23:34:48 UTC (rev 44224)
@@ -85,9 +85,9 @@
int _changePal; ///< Load active palette to video backend on next frame
bool _showCollisionPage; ///< Should we show the collision page instead of the back buffer? Used for debugging.
- void fillSprite(const objectStruct &obj, uint8 color = 0);
- void drawMaskedSprite(const objectStruct &obj, const byte *mask);
- virtual void drawSprite(const objectStruct &obj);
+ void fillSprite(const ObjectStruct &obj, uint8 color = 0);
+ void drawMaskedSprite(const ObjectStruct &obj, const byte *mask);
+ virtual void drawSprite(const ObjectStruct &obj);
void drawCommand();
void drawMessage(const char *str, int x, int y, int width, int color);
@@ -120,8 +120,8 @@
void blit();
void setCommand(Common::String cmd);
- virtual void incrustMask(const objectStruct &obj, uint8 color = 0);
- virtual void incrustSprite(const objectStruct &obj);
+ virtual void incrustMask(const ObjectStruct &obj, uint8 color = 0);
+ virtual void incrustSprite(const ObjectStruct &obj);
virtual void loadBg16(const byte *bg, const char *name, unsigned int idx = 0);
virtual void loadCt16(const byte *ct, const char *name);
@@ -160,7 +160,7 @@
protected:
- void drawSprite(const objectStruct &obj);
+ void drawSprite(const ObjectStruct &obj);
int drawChar(char character, int x, int y);
void drawBackground();
void renderOverlay(const Common::List<overlay>::iterator &it);
@@ -176,8 +176,8 @@
void clear();
- void incrustMask(const objectStruct &obj, uint8 color = 0);
- void incrustSprite(const objectStruct &obj);
+ void incrustMask(const ObjectStruct &obj, uint8 color = 0);
+ void incrustSprite(const ObjectStruct &obj);
void loadBg16(const byte *bg, const char *name, unsigned int idx = 0);
void loadCt16(const byte *ct, const char *name);
Modified: scummvm/trunk/engines/cine/object.cpp
===================================================================
--- scummvm/trunk/engines/cine/object.cpp 2009-09-20 23:25:39 UTC (rev 44223)
+++ scummvm/trunk/engines/cine/object.cpp 2009-09-20 23:34:48 UTC (rev 44224)
@@ -35,12 +35,12 @@
namespace Cine {
-Common::Array<objectStruct> objectTable;
+Common::Array<ObjectStruct> objectTable;
Common::List<overlay> overlayList;
/*! \brief Resets all elements in the object table. */
void resetObjectTable() {
- for (Common::Array<objectStruct>::iterator it = objectTable.begin(); it != objectTable.end(); it++) {
+ for (Common::Array<ObjectStruct>::iterator it = objectTable.begin(); it != objectTable.end(); it++) {
it->clear();
}
}
@@ -259,8 +259,8 @@
uint16 compareObjectParamRanges(uint16 objIdx1, uint16 xAdd1, uint16 yAdd1, uint16 maskAdd1, uint16 objIdx2, uint16 xAdd2, uint16 yAdd2, uint16 maskAdd2) {
assert(objIdx1 < NUM_MAX_OBJECT && objIdx2 < NUM_MAX_OBJECT);
- const objectStruct &obj1 = objectTable[objIdx1];
- const objectStruct &obj2 = objectTable[objIdx2];
+ const ObjectStruct &obj1 = objectTable[objIdx1];
+ const ObjectStruct &obj2 = objectTable[objIdx2];
if (compareRanges(obj1.x, obj1.x + xAdd1, obj2.x, obj2.x + xAdd2) &&
compareRanges(obj1.y, obj1.y + yAdd1, obj2.y, obj2.y + yAdd2) &&
Modified: scummvm/trunk/engines/cine/object.h
===================================================================
--- scummvm/trunk/engines/cine/object.h 2009-09-20 23:25:39 UTC (rev 44223)
+++ scummvm/trunk/engines/cine/object.h 2009-09-20 23:34:48 UTC (rev 44224)
@@ -30,7 +30,7 @@
namespace Cine {
-struct objectStruct {
+struct ObjectStruct {
int16 x;
int16 y;
uint16 mask;
@@ -63,7 +63,7 @@
#define NUM_MAX_OBJECT 255
#define NUM_MAX_VAR 255
-extern Common::Array<objectStruct> objectTable;
+extern Common::Array<ObjectStruct> objectTable;
extern Common::List<overlay> overlayList;
void resetObjectTable();
Modified: scummvm/trunk/engines/cine/script.h
===================================================================
--- scummvm/trunk/engines/cine/script.h 2009-09-20 23:25:39 UTC (rev 44223)
+++ scummvm/trunk/engines/cine/script.h 2009-09-20 23:34:48 UTC (rev 44224)
@@ -44,10 +44,10 @@
class FWScript;
-typedef int (FWScript::*opFunc)();
+typedef int (FWScript::*OpFunc)();
struct Opcode {
- const opFunc proc;
+ const OpFunc proc;
const char *args;
};
@@ -320,7 +320,7 @@
*/
class FWScriptInfo {
protected:
- virtual opFunc opcodeHandler(byte opcode) const;
+ virtual OpFunc opcodeHandler(byte opcode) const;
public:
virtual ~FWScriptInfo() {}
@@ -338,7 +338,7 @@
*/
class OSScriptInfo : public FWScriptInfo {
protected:
- virtual opFunc opcodeHandler(byte opcode) const;
+ virtual OpFunc opcodeHandler(byte opcode) const;
public:
virtual ~OSScriptInfo() {}
Modified: scummvm/trunk/engines/cine/script_fw.cpp
===================================================================
--- scummvm/trunk/engines/cine/script_fw.cpp 2009-09-20 23:25:39 UTC (rev 44223)
+++ scummvm/trunk/engines/cine/script_fw.cpp 2009-09-20 23:34:48 UTC (rev 44224)
@@ -672,7 +672,7 @@
while (!ret) {
_line = _pos;
byte opcode = getNextByte();
- opFunc handler = _info->opcodeHandler(opcode);
+ OpFunc handler = _info->opcodeHandler(opcode);
if (handler) {
ret = (this->*handler)();
@@ -713,7 +713,7 @@
/*! \brief Get opcode handler pointer
* \param opcode Opcode to look for in opcode table
*/
-opFunc FWScriptInfo::opcodeHandler(byte opcode) const {
+OpFunc FWScriptInfo::opcodeHandler(byte opcode) const {
if (opcode == 0 || opcode > FWScript::_numOpcodes) {
return NULL;
}
Modified: scummvm/trunk/engines/cine/script_os.cpp
===================================================================
--- scummvm/trunk/engines/cine/script_os.cpp 2009-09-20 23:25:39 UTC (rev 44223)
+++ scummvm/trunk/engines/cine/script_os.cpp 2009-09-20 23:34:48 UTC (rev 44224)
@@ -308,7 +308,7 @@
/*! \brief Get opcode handler pointer
* \param opcode Opcode to look for in opcode table
*/
-opFunc OSScriptInfo::opcodeHandler(byte opcode) const {
+OpFunc OSScriptInfo::opcodeHandler(byte opcode) const {
if (opcode == 0 || opcode > OSScript::_numOpcodes) {
return NULL;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list