aboutsummaryrefslogtreecommitdiff
path: root/engines/teenagent/objects.cpp
diff options
context:
space:
mode:
authorD G Turner2012-09-24 02:51:26 +0100
committerD G Turner2012-09-24 02:51:26 +0100
commitc9185c9b11bff71c49ab07d4fbf1d2c7a801b9b8 (patch)
treef455f970d6b661553e5d8f3d0e4d084092bb1ce9 /engines/teenagent/objects.cpp
parent86475a0b0687e4a90f8d9601f5ed7a40177b8491 (diff)
downloadscummvm-rg350-c9185c9b11bff71c49ab07d4fbf1d2c7a801b9b8.tar.gz
scummvm-rg350-c9185c9b11bff71c49ab07d4fbf1d2c7a801b9b8.tar.bz2
scummvm-rg350-c9185c9b11bff71c49ab07d4fbf1d2c7a801b9b8.zip
TEENAGENT: Cleanup Object classes.
This removes the underscores in various variables as per project coding standard.
Diffstat (limited to 'engines/teenagent/objects.cpp')
-rw-r--r--engines/teenagent/objects.cpp41
1 files changed, 20 insertions, 21 deletions
diff --git a/engines/teenagent/objects.cpp b/engines/teenagent/objects.cpp
index 171d991114..5dad9ab99d 100644
--- a/engines/teenagent/objects.cpp
+++ b/engines/teenagent/objects.cpp
@@ -53,7 +53,6 @@ void Rect::render(Graphics::Surface *surface, uint8 color) const {
surface->vLine(right, bottom, top, color);
}
-
void Object::load(byte *src) {
_base = src;
@@ -61,39 +60,39 @@ void Object::load(byte *src) {
rect.load(src);
src += 8;
- actor_rect.load(src);
+ actorRect.load(src);
src += 8;
- actor_orientation = *src++;
+ actorOrientation = *src++;
enabled = *src++;
name = (const char *)src;
- description = parse_description((const char *)src);
+ description = parseDescription((const char *)src);
}
void Object::save() const {
assert(_base != NULL);
rect.save();
- actor_rect.save();
- _base[17] = actor_orientation;
+ actorRect.save();
+ _base[17] = actorOrientation;
_base[18] = enabled;
}
-void Object::setName(const Common::String &new_name) {
+void Object::setName(const Common::String &newName) {
assert(_base != 0);
- strcpy((char *)(_base + 19), new_name.c_str());
- name = new_name;
+ strcpy((char *)(_base + 19), newName.c_str());
+ name = newName;
}
void Object::dump(int level) const {
debugC(level, kDebugObject, "object: %u %u [%u,%u,%u,%u], actor: [%u,%u,%u,%u], orientation: %u, name: %s", id, enabled,
rect.left, rect.top, rect.right, rect.bottom,
- actor_rect.left, actor_rect.top, actor_rect.right, actor_rect.bottom,
- actor_orientation, name.c_str()
+ actorRect.left, actorRect.top, actorRect.right, actorRect.bottom,
+ actorOrientation, name.c_str()
);
}
-Common::String Object::parse_description(const char *name) {
+Common::String Object::parseDescription(const char *name) {
const char *desc = name + strlen(name) + 1;
if (*desc == 0)
return Common::String();
@@ -126,23 +125,23 @@ void InventoryObject::load(byte *src) {
id = *src++;
animated = *src++;
name = (const char *)src;
- description = Object::parse_description((const char *)src);
+ description = Object::parseDescription((const char *)src);
}
void UseHotspot::load(byte *src) {
Common::MemoryReadStream in(src, 9);
- inventory_id = in.readByte();
- object_id = in.readByte();
+ inventoryId = in.readByte();
+ objectId = in.readByte();
orientation = in.readByte();
- actor_x = in.readUint16LE();
- actor_y = in.readUint16LE();
+ actorX = in.readUint16LE();
+ actorY = in.readUint16LE();
callback = in.readUint16LE();
}
void UseHotspot::dump(int level) const {
debugC(level, kDebugObject,
- "hotspot: inv_id: %02x, obj_id: %02x, orientation?: %02x, actor position: (%d,%d), callback: %04x",
- inventory_id, object_id, orientation, actor_x, actor_y, callback
+ "hotspot: invId: %02x, objId: %02x, orientation: %02x, actor position: (%d,%d), callback: %04x",
+ inventoryId, objectId, orientation, actorX, actorY, callback
);
}
@@ -150,7 +149,7 @@ void Walkbox::dump(int level) const {
debugC(level, kDebugObject, "walkbox %02x %02x [%d, %d, %d, %d] top: %u, right: %u, bottom: %u, left: %u",
type, orientation,
rect.left, rect.top, rect.right, rect.bottom,
- side_hint[0], side_hint[1], side_hint[2], side_hint[3]);
+ sideHint[0], sideHint[1], sideHint[2], sideHint[3]);
}
void Walkbox::load(byte *src) {
@@ -161,7 +160,7 @@ void Walkbox::load(byte *src) {
rect.load(src);
src += 8;
for (byte i = 0; i < 4; ++i)
- side_hint[i] = *src++;
+ sideHint[i] = *src++;
}
void Walkbox::save() const {