[Scummvm-cvs-logs] CVS: residual bitmap.cpp,1.26,1.27 bitmap.h,1.9,1.10 costume.cpp,1.17,1.18 costume.h,1.10,1.11 driver_gl.cpp,1.18,1.19 engine.cpp,1.44,1.45 engine.h,1.13,1.14 keyframe.cpp,1.6,1.7 keyframe.h,1.3,1.4 lab.cpp,1.9,1.10 lab.h,1.5,1.6 localize.cpp,1.4,1.5 localize.h,1.4,1.5 lua.cpp,1.78,1.79 lua.h,1.4,1.5 material.cpp,1.9,1.10 material.h,1.5,1.6 registry.cpp,1.7,1.8 registry.h,1.3,1.4 resource.cpp,1.13,1.14 resource.h,1.9,1.10 scene.cpp,1.27,1.28 scene.h,1.18,1.19 sound.cpp,1.10,1.11 sound.h,1.7,1.8 textsplit.cpp,1.7,1.8 textsplit.h,1.4,1.5
Pawel Kolodziejski
aquadran at users.sourceforge.net
Thu Dec 9 23:27:03 CET 2004
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32094
Modified Files:
bitmap.cpp bitmap.h costume.cpp costume.h driver_gl.cpp
engine.cpp engine.h keyframe.cpp keyframe.h lab.cpp lab.h
localize.cpp localize.h lua.cpp lua.h material.cpp material.h
registry.cpp registry.h resource.cpp resource.h scene.cpp
scene.h sound.cpp sound.h textsplit.cpp textsplit.h
Log Message:
changed to proper convetion naming
Index: bitmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/bitmap.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- bitmap.cpp 9 Dec 2004 23:55:43 -0000 1.26
+++ bitmap.cpp 10 Dec 2004 07:26:02 -0000 1.27
@@ -36,17 +36,17 @@
error("Invalid magic loading bitmap\n");
int codec = READ_LE_UINT32(data + 8);
- _num_images = READ_LE_UINT32(data + 16);
+ _numImages = READ_LE_UINT32(data + 16);
_x = READ_LE_UINT32(data + 20);
_y = READ_LE_UINT32(data + 24);
_format = READ_LE_UINT32(data + 32);
_width = READ_LE_UINT32(data + 128);
_height = READ_LE_UINT32(data + 132);
- _curr_image = 1;
+ _currImage = 1;
- _data = new char *[_num_images];
+ _data = new char *[_numImages];
int pos = 0x88;
- for (int i = 0; i < _num_images; i++) {
+ for (int i = 0; i < _numImages; i++) {
_data[i] = new char[2 * _width * _height];
if (codec == 0) {
memcpy(_data[i], data + pos, 2 * _width * _height);
@@ -69,14 +69,14 @@
}
void Bitmap::draw() const {
- if (_curr_image == 0)
+ if (_currImage == 0)
return;
g_driver->drawBitmap(this);
}
Bitmap::~Bitmap() {
- for (int i = 0; i < _num_images; i++)
+ for (int i = 0; i < _numImages; i++)
delete[] _data[i];
delete[] _data;
Index: bitmap.h
===================================================================
RCS file: /cvsroot/scummvm/residual/bitmap.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- bitmap.h 9 Dec 2004 23:55:43 -0000 1.9
+++ bitmap.h 10 Dec 2004 07:26:02 -0000 1.10
@@ -30,27 +30,27 @@
void draw() const;
// Set which image in an animated bitmap to use
- void setNumber(int n) { _curr_image = n; }
+ void setNumber(int n) { _currImage = n; }
- int numImages() const { return _num_images; }
- int currentImage() const { return _curr_image; }
+ int numImages() const { return _numImages; }
+ int currentImage() const { return _currImage; }
int width() const { return _width; }
int height() const { return _height; }
int x() const { return _x; }
int y() const { return _y; }
- char *getData() { return _data[_curr_image]; }
+ char *getData() { return _data[_currImage]; }
~Bitmap();
//private:
char **_data;
- int _num_images, _curr_image;
+ int _numImages, _currImage;
int _width, _height, _x, _y;
int _format;
- int _num_tex;
- GLuint *_tex_ids;
+ int _numTex;
+ GLuint *_texIds;
bool _hasTransparency;
};
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/costume.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- costume.cpp 9 Dec 2004 23:55:43 -0000 1.17
+++ costume.cpp 10 Dec 2004 07:26:02 -0000 1.18
@@ -608,11 +608,11 @@
for (int i = 0; i < _numTracks; i++) {
int compID, numKeys;
ts.scanString(" %d %d", 2, &compID, &numKeys);
- _tracks[i]._compID = compID;
- _tracks[i]._numKeys = numKeys;
- _tracks[i]._keys = new TrackKey[numKeys];
+ _tracks[i].compID = compID;
+ _tracks[i].numKeys = numKeys;
+ _tracks[i].keys = new TrackKey[numKeys];
for (int j = 0; j < numKeys; j++) {
- ts.scanString(" %d %d", 2, &_tracks[i]._keys[j]._time, &_tracks[i]._keys[j]._value);
+ ts.scanString(" %d %d", 2, &_tracks[i].keys[j].time, &_tracks[i].keys[j].value);
}
}
}
@@ -639,7 +639,7 @@
_hasPlayed = false;
for (int i = 0; i < _numTracks; i++) {
- Component *comp = _owner->_components[_tracks[i]._compID];
+ Component *comp = _owner->_components[_tracks[i].compID];
if (comp != NULL)
comp->reset();
}
@@ -647,15 +647,15 @@
void Costume::Chore::setKeys(int startTime, int stopTime) {
for (int i = 0; i < _numTracks; i++) {
- Component *comp = _owner->_components[_tracks[i]._compID];
+ Component *comp = _owner->_components[_tracks[i].compID];
if (comp == NULL)
continue;
- for (int j = 0; j < _tracks[i]._numKeys; j++) {
- if (_tracks[i]._keys[j]._time > stopTime)
+ for (int j = 0; j < _tracks[i].numKeys; j++) {
+ if (_tracks[i].keys[j].time > stopTime)
break;
- if (_tracks[i]._keys[j]._time > startTime)
- comp->setKey(_tracks[i]._keys[j]._value);
+ if (_tracks[i].keys[j].time > startTime)
+ comp->setKey(_tracks[i].keys[j].value);
}
}
}
@@ -754,12 +754,12 @@
}
void Costume::setHead(int joint1, int joint2, int joint3, float maxRoll, float maxPitch, float maxYaw) {
- _head._joint1 = joint1;
- _head._joint2 = joint2;
- _head._joint3 = joint3;
- _head._maxRoll = maxRoll;
- _head._maxPitch = maxPitch;
- _head._maxYaw = maxYaw;
+ _head.joint1 = joint1;
+ _head.joint2 = joint2;
+ _head.joint3 = joint3;
+ _head.maxRoll = maxRoll;
+ _head.maxPitch = maxPitch;
+ _head.maxYaw = maxYaw;
}
void Costume::setPosRotate(Vector3d pos, float pitch, float yaw, float roll) {
Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/residual/costume.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- costume.h 9 Dec 2004 23:55:43 -0000 1.10
+++ costume.h 10 Dec 2004 07:26:02 -0000 1.11
@@ -78,22 +78,22 @@
Component **_components;
struct TrackKey {
- int _time, _value;
+ int time, value;
};
struct ChoreTrack {
- int _compID;
- int _numKeys;
- TrackKey *_keys;
+ int compID;
+ int numKeys;
+ TrackKey *keys;
};
struct Head {
- int _joint1;
- int _joint2;
- int _joint3;
- float _maxRoll;
- float _maxPitch;
- float _maxYaw;
+ int joint1;
+ int joint2;
+ int joint3;
+ float maxRoll;
+ float maxPitch;
+ float maxYaw;
} _head;
class Chore {
Index: driver_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- driver_gl.cpp 9 Dec 2004 23:55:43 -0000 1.18
+++ driver_gl.cpp 10 Dec 2004 07:26:02 -0000 1.19
@@ -413,14 +413,14 @@
void Driver::createBitmap(Bitmap *bitmap) {
if (bitmap->_format == 1) {
bitmap->_hasTransparency = false;
- bitmap->_num_tex = ((bitmap->_width + (BITMAP_TEXTURE_SIZE - 1)) / BITMAP_TEXTURE_SIZE) *
+ bitmap->_numTex = ((bitmap->_width + (BITMAP_TEXTURE_SIZE - 1)) / BITMAP_TEXTURE_SIZE) *
((bitmap->_height + (BITMAP_TEXTURE_SIZE - 1)) / BITMAP_TEXTURE_SIZE);
- bitmap->_tex_ids = new GLuint[bitmap->_num_tex * bitmap->_num_images];
- glGenTextures(bitmap->_num_tex * bitmap->_num_images, bitmap->_tex_ids);
+ bitmap->_texIds = new GLuint[bitmap->_numTex * bitmap->_numImages];
+ glGenTextures(bitmap->_numTex * bitmap->_numImages, bitmap->_texIds);
byte *texData = new byte[4 * bitmap->_width * bitmap->_height];
- for (int pic = 0; pic < bitmap->_num_images; pic++) {
+ for (int pic = 0; pic < bitmap->_numImages; pic++) {
// Convert data to 32-bit RGBA format
byte *texDataPtr = texData;
uint16 *bitmapData = reinterpret_cast<uint16 *>(bitmap->_data[pic]);
@@ -440,8 +440,8 @@
}
}
- for (int i = 0; i < bitmap->_num_tex; i++) {
- glBindTexture(GL_TEXTURE_2D, bitmap->_tex_ids[bitmap->_num_tex * pic + i]);
+ for (int i = 0; i < bitmap->_numTex; i++) {
+ glBindTexture(GL_TEXTURE_2D, bitmap->_texIds[bitmap->_numTex * pic + i]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
@@ -452,13 +452,13 @@
glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
glPixelStorei(GL_UNPACK_ROW_LENGTH, bitmap->_width);
- int cur_tex_idx = bitmap->_num_tex * pic;
+ int cur_tex_idx = bitmap->_numTex * pic;
for (int y = 0; y < bitmap->_height; y += BITMAP_TEXTURE_SIZE) {
for (int x = 0; x < bitmap->_width; x += BITMAP_TEXTURE_SIZE) {
int width = (x + BITMAP_TEXTURE_SIZE >= bitmap->_width) ? (bitmap->_width - x) : BITMAP_TEXTURE_SIZE;
int height = (y + BITMAP_TEXTURE_SIZE >= bitmap->_height) ? (bitmap->_height - y) : BITMAP_TEXTURE_SIZE;
- glBindTexture(GL_TEXTURE_2D, bitmap->_tex_ids[cur_tex_idx]);
+ glBindTexture(GL_TEXTURE_2D, bitmap->_texIds[cur_tex_idx]);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE,
texData + (y * 4 * bitmap->_width) + (4 * x));
cur_tex_idx++;
@@ -470,7 +470,7 @@
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
delete [] texData;
} else {
- for (int pic = 0; pic < bitmap->_num_images; pic++) {
+ for (int pic = 0; pic < bitmap->_numImages; pic++) {
uint16 *zbufPtr = reinterpret_cast<uint16 *>(bitmap->_data[pic]);
for (int i = 0; i < (bitmap->_width * bitmap->_height); i++) {
uint16 val = READ_LE_UINT16(bitmap->_data[pic] + 2 * i);
@@ -488,7 +488,7 @@
}
}
}
- bitmap->_tex_ids = NULL;
+ bitmap->_texIds = NULL;
}
}
@@ -514,10 +514,10 @@
glDepthMask(GL_FALSE);
glEnable(GL_SCISSOR_TEST);
glScissor(bitmap->_x, 480 - (bitmap->_y + bitmap->_height), bitmap->_width, bitmap->_height);
- int cur_tex_idx = bitmap->_num_tex * (bitmap->_curr_image - 1);
+ int cur_tex_idx = bitmap->_numTex * (bitmap->_currImage - 1);
for (int y = bitmap->_y; y < (bitmap->_y + bitmap->_height); y += BITMAP_TEXTURE_SIZE) {
for (int x = bitmap->_x; x < (bitmap->_x + bitmap->_width); x += BITMAP_TEXTURE_SIZE) {
- glBindTexture(GL_TEXTURE_2D, bitmap->_tex_ids[cur_tex_idx]);
+ glBindTexture(GL_TEXTURE_2D, bitmap->_texIds[cur_tex_idx]);
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0);
glVertex2i(x, y);
@@ -542,22 +542,22 @@
if ((!ZBUFFER_GLOBAL) || SCREENBLOCKS_GLOBAL)
return;
- g_driver->drawDepthBitmap(bitmap->_x, bitmap->_y, bitmap->_width, bitmap->_height, bitmap->_data[bitmap->_curr_image - 1]);
+ g_driver->drawDepthBitmap(bitmap->_x, bitmap->_y, bitmap->_width, bitmap->_height, bitmap->_data[bitmap->_currImage - 1]);
}
}
void Driver::destroyBitmap(Bitmap *bitmap) {
- if (bitmap->_tex_ids) {
- glDeleteTextures(bitmap->_num_tex * bitmap->_num_images, bitmap->_tex_ids);
- delete[] bitmap->_tex_ids;
+ if (bitmap->_texIds) {
+ glDeleteTextures(bitmap->_numTex * bitmap->_numImages, bitmap->_texIds);
+ delete[] bitmap->_texIds;
}
}
void Driver::createMaterial(Material *material, const char *data, const CMap *cmap) {
- material->_textures = new GLuint[material->_num_images];
- glGenTextures(material->_num_images, material->_textures);
+ material->_textures = new GLuint[material->_numImages];
+ glGenTextures(material->_numImages, material->_textures);
char *texdata = new char[material->_width * material->_height * 4];
- for (int i = 0; i < material->_num_images; i++) {
+ for (int i = 0; i < material->_numImages; i++) {
char *texdatapos = texdata;
for (int y = 0; y < material->_height; y++) {
for (int x = 0; x < material->_width; x++) {
@@ -585,14 +585,14 @@
}
void Driver::selectMaterial(const Material *material) {
- glBindTexture(GL_TEXTURE_2D, material->_textures[material->_curr_image]);
+ glBindTexture(GL_TEXTURE_2D, material->_textures[material->_currImage]);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glScalef(1.0f / material->_width, 1.0f / material->_height, 1);
}
void Driver::destroyMaterial(Material *material) {
- glDeleteTextures(material->_num_images, material->_textures);
+ glDeleteTextures(material->_numImages, material->_textures);
delete[] material->_textures;
}
Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/engine.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- engine.cpp 9 Dec 2004 23:55:43 -0000 1.44
+++ engine.cpp 10 Dec 2004 07:26:03 -0000 1.45
@@ -125,7 +125,7 @@
if (_currScene != NULL) {
// Update actor costumes
- for (actor_list_type::iterator i = _actors.begin(); i != _actors.end(); i++) {
+ for (ActorListType::iterator i = _actors.begin(); i != _actors.end(); i++) {
Actor *a = *i;
if (_currScene != NULL && a->inSet(_currScene->name()) && a->visible())
a->update();
@@ -166,7 +166,7 @@
_currScene->setupCamera();
// Draw actors
- for (actor_list_type::iterator i = _actors.begin(); i != _actors.end(); i++) {
+ for (ActorListType::iterator i = _actors.begin(); i != _actors.end(); i++) {
Actor *a = *i;
if (_currScene != NULL && a->inSet(_currScene->name()) && a->visible())
a->draw();
@@ -175,7 +175,7 @@
}
// Draw text
- for (text_list_type::iterator i = _textObjects.begin(); i != _textObjects.end(); i++) {
+ for (TextListType::iterator i = _textObjects.begin(); i != _textObjects.end(); i++) {
(*i)->draw();
}
@@ -198,11 +198,11 @@
}
lua_beginblock();
- set_frameTime(_frameTime);
+ setFrameTime(_frameTime);
lua_endblock();
lua_beginblock();
- set_movieTime(_movieTime);
+ setMovieTime(_movieTime);
lua_endblock();
if (SHOWFPS_GLOBAL) {
Index: engine.h
===================================================================
RCS file: /cvsroot/scummvm/residual/engine.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- engine.h 9 Dec 2004 23:55:43 -0000 1.13
+++ engine.h 10 Dec 2004 07:26:03 -0000 1.14
@@ -112,22 +112,22 @@
Scene *currScene() { return _currScene; }
const char *sceneName() const { return _currScene->name(); }
- typedef std::list<Actor *> actor_list_type;
- actor_list_type::const_iterator actorsBegin() const {
+ typedef std::list<Actor *> ActorListType;
+ ActorListType::const_iterator actorsBegin() const {
return _actors.begin();
}
- actor_list_type::const_iterator actorsEnd() const {
+ ActorListType::const_iterator actorsEnd() const {
return _actors.end();
}
void setSelectedActor(Actor *a) { _selectedActor = a; }
Actor *selectedActor() { return _selectedActor; }
- typedef std::list<TextObject *> text_list_type;
- text_list_type::const_iterator textsBegin() const {
+ typedef std::list<TextObject *> TextListType;
+ TextListType::const_iterator textsBegin() const {
return _textObjects.begin();
}
- text_list_type::const_iterator textsEnd() const {
+ TextListType::const_iterator textsEnd() const {
return _textObjects.end();
}
void registerTextObject(TextObject *a) { _textObjects.push_back(a); }
@@ -166,9 +166,9 @@
bool _controlsEnabled[SDLK_EXTRA_LAST];
- actor_list_type _actors;
+ ActorListType _actors;
Actor *_selectedActor;
- text_list_type _textObjects;
+ TextListType _textObjects;
};
#endif
Index: keyframe.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/keyframe.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- keyframe.cpp 9 Dec 2004 23:55:43 -0000 1.6
+++ keyframe.cpp 10 Dec 2004 07:26:03 -0000 1.7
@@ -41,8 +41,8 @@
_numMarkers = READ_LE_UINT32(data + 68);
_markers = new Marker[_numMarkers];
for (int i = 0; i < _numMarkers; i++) {
- _markers[i]._frame = get_float(data + 72 + 4 * i);
- _markers[i]._val = READ_LE_UINT32(data + 104 + 4 * i);
+ _markers[i].frame = get_float(data + 72 + 4 * i);
+ _markers[i].val = READ_LE_UINT32(data + 104 + 4 * i);
}
_nodes = new KeyframeNode *[_numJoints];
@@ -70,7 +70,7 @@
ts.scanString("markers %d", 1, &_numMarkers);
_markers = new Marker[_numMarkers];
for (int i = 0; i < _numMarkers; i++)
- ts.scanString("%f %d", 2, &_markers[i]._frame, &_markers[i]._val);
+ ts.scanString("%f %d", 2, &_markers[i].frame, &_markers[i].val);
} else {
_numMarkers = 0;
_markers = NULL;
Index: keyframe.h
===================================================================
RCS file: /cvsroot/scummvm/residual/keyframe.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- keyframe.h 9 Dec 2004 23:55:43 -0000 1.3
+++ keyframe.h 10 Dec 2004 07:26:03 -0000 1.4
@@ -41,8 +41,8 @@
int _numMarkers;
struct Marker {
- float _frame;
- int _val;
+ float frame;
+ int val;
};
Marker *_markers;
@@ -61,6 +61,7 @@
~KeyframeNode();
void animate(Model::HierNode &node, float frame, int priority) const;
+
char _meshName[32];
int _numEntries;
KeyframeEntry *_entries;
Index: lab.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lab.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- lab.cpp 9 Dec 2004 23:55:43 -0000 1.9
+++ lab.cpp 10 Dec 2004 07:26:03 -0000 1.10
@@ -56,8 +56,8 @@
std::string fname = string_table + fname_offset;
std::transform(fname.begin(), fname.end(), fname.begin(), tolower);
- _file_map.insert(std::make_pair(fname, LabEntry(start, size)));
- _file_map.size();
+ _fileMap.insert(std::make_pair(fname, LabEntry(start, size)));
+ _fileMap.size();
}
delete [] string_table;
@@ -65,12 +65,12 @@
}
bool Lab::fileExists(const char *filename) const {
- return find_filename(filename) != _file_map.end();
+ return findFilename(filename) != _fileMap.end();
}
Block *Lab::getFileBlock(const char *filename) const {
- file_map_type::const_iterator i = find_filename(filename);
- if (i == _file_map.end())
+ FileMapType::const_iterator i = findFilename(filename);
+ if (i == _fileMap.end())
return NULL;
std::fseek(_f, i->second.offset, SEEK_SET);
@@ -86,8 +86,8 @@
}
std::FILE *Lab::openNewStream(const char *filename) const {
- file_map_type::const_iterator i = find_filename(filename);
- if (i == _file_map.end())
+ FileMapType::const_iterator i = findFilename(filename);
+ if (i == _fileMap.end())
return NULL;
std::fseek(_f, i->second.offset, SEEK_SET);
@@ -96,22 +96,22 @@
}
int Lab::fileLength(const char *filename) const {
- file_map_type::const_iterator i = find_filename(filename);
- if (i == _file_map.end())
+ FileMapType::const_iterator i = findFilename(filename);
+ if (i == _fileMap.end())
return -1;
return i->second.len;
}
-Lab::file_map_type::const_iterator Lab::find_filename(const char *filename) const {
+Lab::FileMapType::const_iterator Lab::findFilename(const char *filename) const {
std::string s = filename;
std::transform(s.begin(), s.end(), s.begin(), tolower);
- return _file_map.find(s);
+ return _fileMap.find(s);
}
void Lab::close() {
if (_f != NULL)
std::fclose(_f);
_f = NULL;
- _file_map.clear();
+ _fileMap.clear();
}
Index: lab.h
===================================================================
RCS file: /cvsroot/scummvm/residual/lab.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- lab.h 9 Dec 2004 23:55:43 -0000 1.5
+++ lab.h 10 Dec 2004 07:26:03 -0000 1.6
@@ -59,10 +59,10 @@
};
std::FILE *_f;
- typedef std::map<std::string, LabEntry> file_map_type;
- file_map_type _file_map;
+ typedef std::map<std::string, LabEntry> FileMapType;
+ FileMapType _fileMap;
- file_map_type::const_iterator find_filename(const char *filename) const;
+ FileMapType::const_iterator findFilename(const char *filename) const;
};
#endif
Index: localize.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/localize.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- localize.cpp 9 Dec 2004 23:55:43 -0000 1.4
+++ localize.cpp 10 Dec 2004 07:26:03 -0000 1.5
@@ -94,7 +94,7 @@
return str;
std::string key(str + 1, slash2 - str - 1);
- string_map::const_iterator i = _entries.find(key);
+ StringMap::const_iterator i = _entries.find(key);
if (i == _entries.end())
return str;
Index: localize.h
===================================================================
RCS file: /cvsroot/scummvm/residual/localize.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- localize.h 9 Dec 2004 23:55:43 -0000 1.4
+++ localize.h 10 Dec 2004 07:26:03 -0000 1.5
@@ -33,8 +33,8 @@
static Localizer *_instance;
- typedef std::map<std::string, std::string> string_map;
- string_map _entries;
+ typedef std::map<std::string, std::string> StringMap;
+ StringMap _entries;
};
#endif
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- lua.cpp 9 Dec 2004 23:55:43 -0000 1.78
+++ lua.cpp 10 Dec 2004 07:26:03 -0000 1.79
@@ -658,7 +658,7 @@
static void GetVisibleThings() {
lua_Object result = lua_createtable();
Actor *sel = Engine::instance()->selectedActor();
- for (Engine::actor_list_type::const_iterator i = Engine::instance()->actorsBegin(); i != Engine::instance()->actorsEnd(); i++) {
+ for (Engine::ActorListType::const_iterator i = Engine::instance()->actorsBegin(); i != Engine::instance()->actorsEnd(); i++) {
if (!(*i)->inSet(Engine::instance()->sceneName()))
continue;
if (sel->angleTo(*(*i)) < 90) {
@@ -911,14 +911,14 @@
Mixer::instance()->setImuseSeq(seq);
}
-void set_frameTime(float frameTime) {
+void setFrameTime(float frameTime) {
lua_pushobject(lua_getglobal("system"));
lua_pushstring("frameTime");
lua_pushnumber(frameTime);
lua_settable();
}
-void set_movieTime(float movieTime) {
+void setMovieTime(float movieTime) {
lua_pushobject(lua_getglobal("system"));
lua_pushstring("movieTime");
lua_pushnumber(movieTime);
@@ -1006,7 +1006,7 @@
textID = lua_getstring(lua_getparam(1));
- for (Engine::text_list_type::const_iterator i = Engine::instance()->textsBegin();
+ for (Engine::TextListType::const_iterator i = Engine::instance()->textsBegin();
i != Engine::instance()->textsEnd(); i++) {
TextObject *textO = *i;
@@ -1063,7 +1063,7 @@
lua_Object tableObj = lua_getparam(2);
TextObject *modifyObject = NULL;
- for (Engine::text_list_type::const_iterator i = Engine::instance()->textsBegin(); i != Engine::instance()->textsEnd(); i++) {
+ for (Engine::TextListType::const_iterator i = Engine::instance()->textsBegin(); i != Engine::instance()->textsEnd(); i++) {
TextObject *textO = *i;
if (strstr(textO->name(), textID)) {
Index: lua.h
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- lua.h 6 Oct 2004 18:59:23 -0000 1.4
+++ lua.h 10 Dec 2004 07:26:03 -0000 1.5
@@ -30,10 +30,10 @@
int bundle_dofile(const char *filename);
// Set system.frameTime
-void set_frameTime(float frameTime);
+void setFrameTime(float frameTime);
// Set smush.movieTime
-void set_movieTime(float movieTime);
+void setMovieTime(float movieTime);
// Get the event handler function with the given name, pushing the handler
// object if appropriate
Index: material.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/material.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- material.cpp 9 Dec 2004 23:55:43 -0000 1.9
+++ material.cpp 10 Dec 2004 07:26:03 -0000 1.10
@@ -27,16 +27,16 @@
if (len < 4 || memcmp(data, "MAT ", 4) != 0)
error("invalid magic loading texture\n");
- _num_images = READ_LE_UINT32(data + 12);
- _curr_image = 0;
- _width = READ_LE_UINT32(data + 76 + _num_images * 40);
- _height = READ_LE_UINT32(data + 80 + _num_images * 40);
+ _numImages = READ_LE_UINT32(data + 12);
+ _currImage = 0;
+ _width = READ_LE_UINT32(data + 76 + _numImages * 40);
+ _height = READ_LE_UINT32(data + 80 + _numImages * 40);
if ((_width == 0) || (_height == 0)) {
warning("bad texture size (%dx%d) for texture %s\n", _width, _height, filename);
}
- data += 100 + _num_images * 40;
+ data += 100 + _numImages * 40;
g_driver->createMaterial(this, data, &cmap);
}
Index: material.h
===================================================================
RCS file: /cvsroot/scummvm/residual/material.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- material.h 9 Dec 2004 23:55:43 -0000 1.5
+++ material.h 10 Dec 2004 07:26:03 -0000 1.6
@@ -34,15 +34,15 @@
void select() const;
// Set which image in an animated texture to use
- void setNumber(int n) { _curr_image = n; }
+ void setNumber(int n) { _currImage = n; }
- int numImages() const { return _num_images; }
- int currentImage() const { return _curr_image; }
+ int numImages() const { return _numImages; }
+ int currentImage() const { return _currImage; }
~Material();
//private:
- int _num_images, _curr_image;
+ int _numImages, _currImage;
int _width, _height;
GLuint *_textures;
};
Index: registry.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/registry.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- registry.cpp 9 Dec 2004 23:55:43 -0000 1.7
+++ registry.cpp 10 Dec 2004 07:26:03 -0000 1.8
@@ -54,7 +54,7 @@
}
const char *Registry::get(const char *key) const {
- group::const_iterator i = _settings.find(key);
+ Group::const_iterator i = _settings.find(key);
if (i == _settings.end())
return NULL;
else
@@ -88,7 +88,7 @@
return;
}
- for (group::iterator i = _settings.begin(); i != _settings.end(); i++)
+ for (Group::iterator i = _settings.begin(); i != _settings.end(); i++)
std::fprintf(f, "%s=%s\n", i->first.c_str(), i->second.c_str());
std::fclose(f);
Index: registry.h
===================================================================
RCS file: /cvsroot/scummvm/residual/registry.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- registry.h 9 Dec 2004 23:55:43 -0000 1.3
+++ registry.h 10 Dec 2004 07:26:03 -0000 1.4
@@ -35,8 +35,8 @@
static Registry *_instance;
- typedef std::map<std::string, std::string> group;
- group _settings;
+ typedef std::map<std::string, std::string> Group;
+ Group _settings;
bool _dirty;
};
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/resource.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- resource.cpp 9 Dec 2004 23:55:43 -0000 1.13
+++ resource.cpp 10 Dec 2004 07:26:03 -0000 1.14
@@ -142,7 +142,7 @@
Bitmap *ResourceLoader::loadBitmap(const char *filename) {
std::string fname = filename;
makeLower(fname);
- cache_type::iterator i = _cache.find(fname);
+ CacheType::iterator i = _cache.find(fname);
if (i != _cache.end()) {
return dynamic_cast<Bitmap *>(i->second);
}
@@ -162,7 +162,7 @@
CMap *ResourceLoader::loadColormap(const char *filename) {
std::string fname = filename;
makeLower(fname);
- cache_type::iterator i = _cache.find(fname);
+ CacheType::iterator i = _cache.find(fname);
if (i != _cache.end()) {
return dynamic_cast<CMap *>(i->second);
@@ -191,7 +191,7 @@
KeyframeAnim *ResourceLoader::loadKeyframe(const char *filename) {
std::string fname = filename;
makeLower(fname);
- cache_type::iterator i = _cache.find(fname);
+ CacheType::iterator i = _cache.find(fname);
if (i != _cache.end()) {
return dynamic_cast<KeyframeAnim *>(i->second);
}
@@ -210,7 +210,7 @@
LipSynch *result;
makeLower(fname);
- cache_type::iterator i = _cache.find(fname);
+ CacheType::iterator i = _cache.find(fname);
if (i != _cache.end()) {
return dynamic_cast<LipSynch *>(i->second);
}
@@ -231,7 +231,7 @@
Material *ResourceLoader::loadMaterial(const char *filename, const CMap &c) {
std::string fname = filename;
makeLower(fname);
- cache_type::iterator i = _cache.find(fname);
+ CacheType::iterator i = _cache.find(fname);
if (i != _cache.end()) {
return dynamic_cast<Material *>(i->second);
}
@@ -248,7 +248,7 @@
Model *ResourceLoader::loadModel(const char *filename, const CMap &c) {
std::string fname = filename;
makeLower(fname);
- cache_type::iterator i = _cache.find(fname);
+ CacheType::iterator i = _cache.find(fname);
if (i != _cache.end()) {
return dynamic_cast<Model *>(i->second);
}
@@ -265,7 +265,7 @@
Sound *ResourceLoader::loadSound(const char *filename) {
std::string fname = filename;
makeLower(fname);
- cache_type::iterator i = _cache.find(fname);
+ CacheType::iterator i = _cache.find(fname);
if (i != _cache.end()) {
return dynamic_cast<Sound *>(i->second);
}
@@ -282,7 +282,7 @@
void ResourceLoader::uncache(const char *filename) {
std::string fname = filename;
makeLower(fname);
- cache_type::iterator i = _cache.find(fname);
+ CacheType::iterator i = _cache.find(fname);
if (i != _cache.end())
_cache.erase(i);
}
Index: resource.h
===================================================================
RCS file: /cvsroot/scummvm/residual/resource.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- resource.h 9 Dec 2004 23:55:43 -0000 1.9
+++ resource.h 10 Dec 2004 07:26:03 -0000 1.10
@@ -118,8 +118,8 @@
const Lab *findFile(const char *filename) const;
- typedef std::map<std::string, Resource *> cache_type;
- cache_type _cache;
+ typedef std::map<std::string, Resource *> CacheType;
+ CacheType _cache;
// Shut up pointless g++ warning
friend class dummy;
Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- scene.cpp 9 Dec 2004 23:55:43 -0000 1.27
+++ scene.cpp 10 Dec 2004 07:26:03 -0000 1.28
@@ -104,14 +104,14 @@
_name = buf;
ts.scanString(" background %256s", 1, buf);
- _bkgnd_bm = ResourceLoader::instance()->loadBitmap(buf);
+ _bkgndBm = ResourceLoader::instance()->loadBitmap(buf);
// ZBuffer is optional
if (!ts.checkString("zbuffer")) {
- _bkgnd_zbm = NULL;
+ _bkgndZBm = NULL;
} else {
ts.scanString(" zbuffer %256s", 1, buf);
- _bkgnd_zbm = ResourceLoader::instance()->loadBitmap(buf);
+ _bkgndZBm = ResourceLoader::instance()->loadBitmap(buf);
}
ts.scanString(" position %f %f %f", 3, &_pos.x(), &_pos.y(), &_pos.z());
@@ -164,8 +164,8 @@
if (!SCREENBLOCKS_GLOBAL)
return;
- if (_currSetup->_bkgnd_zbm)
- screenBlocksInit(_currSetup->_bkgnd_zbm->getData() );
+ if (_currSetup->_bkgndZBm)
+ screenBlocksInit(_currSetup->_bkgndZBm->getData() );
else
screenBlocksInitEmpty();
}
Index: scene.h
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- scene.h 9 Dec 2004 23:55:43 -0000 1.18
+++ scene.h 10 Dec 2004 07:26:03 -0000 1.19
@@ -39,14 +39,14 @@
~Scene();
void drawBackground() const {
- if (_currSetup->_bkgnd_zbm != NULL) // Some screens have no zbuffer mask (eg, Alley)
- _currSetup->_bkgnd_zbm->draw();
+ if (_currSetup->_bkgndZBm != NULL) // Some screens have no zbuffer mask (eg, Alley)
+ _currSetup->_bkgndZBm->draw();
- if (_currSetup->_bkgnd_bm == NULL) {
+ if (_currSetup->_bkgndBm == NULL) {
error("Null background for setup %s in %s", _currSetup->_name.c_str(), _name.c_str());
return;
}
- _currSetup->_bkgnd_bm->draw();
+ _currSetup->_bkgndBm->draw();
}
void drawBitmaps(ObjectState::Position stage);
void setupCamera() {
@@ -79,7 +79,7 @@
void load(TextSplitter &ts);
void setupCamera() const;
std::string _name;
- ResPtr<Bitmap> _bkgnd_bm, _bkgnd_zbm;
+ ResPtr<Bitmap> _bkgndBm, _bkgndZBm;
Vector3d _pos, _interest;
float _roll, _fov, _nclip, _fclip;
};
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/sound.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- sound.cpp 9 Dec 2004 23:55:43 -0000 1.10
+++ sound.cpp 10 Dec 2004 07:26:03 -0000 1.11
@@ -285,7 +285,7 @@
}
void Mixer::stopSfx(Sound *s) {
- for (sound_list::iterator i = _sfxSounds.begin(); i != _sfxSounds.end(); ) {
+ for (SoundList::iterator i = _sfxSounds.begin(); i != _sfxSounds.end(); ) {
if (*i == s)
i = _sfxSounds.erase(i);
else
@@ -294,7 +294,7 @@
}
void Mixer::stopVoice(Sound *s) {
- for (sound_list::iterator i = _voiceSounds.begin(); i != _voiceSounds.end(); ) {
+ for (SoundList::iterator i = _voiceSounds.begin(); i != _voiceSounds.end(); ) {
if (*i == s)
i = _voiceSounds.erase(i);
else
@@ -363,7 +363,7 @@
}
Sound *Mixer::findSfx(const char *filename) {
- for (sound_list::iterator i = _sfxSounds.begin(); i != _sfxSounds.end(); i++) {
+ for (SoundList::iterator i = _sfxSounds.begin(); i != _sfxSounds.end(); i++) {
if (std::strcmp((*i)->filename(), filename) == 0)
return *i;
}
@@ -376,14 +376,14 @@
void Mixer::getAudio(int16 *data, int numSamples) {
memset(data, 0, numSamples * 2);
- for (sound_list::iterator i = _voiceSounds.begin(); i != _voiceSounds.end(); ) {
+ for (SoundList::iterator i = _voiceSounds.begin(); i != _voiceSounds.end(); ) {
(*i)->mix(data, numSamples);
if ((*i)->done())
i = _voiceSounds.erase(i);
else
i++;
}
- for (sound_list::iterator i = _sfxSounds.begin(); i != _sfxSounds.end(); ) {
+ for (SoundList::iterator i = _sfxSounds.begin(); i != _sfxSounds.end(); ) {
(*i)->mix(data, numSamples);
if ((*i)->done())
i = _sfxSounds.erase(i);
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/residual/sound.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sound.h 9 Dec 2004 23:55:43 -0000 1.7
+++ sound.h 10 Dec 2004 07:26:03 -0000 1.8
@@ -66,8 +66,8 @@
~Mixer();
static Mixer *_instance;
- typedef std::list<ResPtr<Sound> > sound_list;
- sound_list _voiceSounds, _sfxSounds;
+ typedef std::list<ResPtr<Sound> > SoundList;
+ SoundList _voiceSounds, _sfxSounds;
ResPtr<Sound> _musicSound, _seqSound;
friend void mixerCallback(void *userdata, uint8 *stream, int len);
Index: textsplit.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/textsplit.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- textsplit.cpp 9 Dec 2004 23:55:43 -0000 1.7
+++ textsplit.cpp 10 Dec 2004 07:26:03 -0000 1.8
@@ -47,7 +47,7 @@
_data = new char[len + 1];
std::memcpy(_data, data, len);
_data[len] = '\0';
- _curr_line = _data;
+ _currLine = _data;
processLine();
}
@@ -89,29 +89,29 @@
if (eof())
return;
- _next_line = std::strchr(_curr_line, '\n');
- if (_next_line != NULL) {
- *_next_line = '\0';
- _next_line++;
+ _nextLine = std::strchr(_currLine, '\n');
+ if (_nextLine != NULL) {
+ *_nextLine = '\0';
+ _nextLine++;
}
// Cut off comments
- char *comment_start = std::strchr(_curr_line, '#');
+ char *comment_start = std::strchr(_currLine, '#');
if (comment_start != NULL)
*comment_start = '\0';
// Cut off trailing whitespace (including '\r')
- char *strend = std::strchr(_curr_line, '\0');
- while (strend > _curr_line && std::isspace(strend[-1]))
+ char *strend = std::strchr(_currLine, '\0');
+ while (strend > _currLine && std::isspace(strend[-1]))
strend--;
*strend = '\0';
// Skip blank lines
- if (*_curr_line == '\0')
+ if (*_currLine == '\0')
nextLine();
// Convert to lower case
if (!eof())
- for (char *s = _curr_line; *s != '\0'; s++)
+ for (char *s = _currLine; *s != '\0'; s++)
*s = std::tolower(*s);
}
Index: textsplit.h
===================================================================
RCS file: /cvsroot/scummvm/residual/textsplit.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- textsplit.h 9 Dec 2004 23:55:43 -0000 1.4
+++ textsplit.h 10 Dec 2004 07:26:03 -0000 1.5
@@ -29,14 +29,14 @@
TextSplitter(const char *data, int len);
char *nextLine() {
- _curr_line = _next_line;
+ _currLine = _nextLine;
processLine();
- return _curr_line;
+ return _currLine;
}
- char *currentLine() { return _curr_line; }
- const char *currentLine() const { return _curr_line; }
- bool eof() const { return _curr_line == NULL; }
+ char *currentLine() { return _currLine; }
+ const char *currentLine() const { return _currLine; }
+ bool eof() const { return _currLine == NULL; }
// Check if the current line contains 'needle'
bool TextSplitter::checkString(const char *needle);
@@ -57,7 +57,7 @@
~TextSplitter() { delete[] _data; }
private:
- char *_data, *_curr_line, *_next_line;
+ char *_data, *_currLine, *_nextLine;
void processLine();
};
More information about the Scummvm-git-logs
mailing list