aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2011-10-21 17:27:34 +0200
committerStrangerke2011-10-22 06:30:04 +0200
commit727afcf4bd65fbdf1af9de2eab6657ccf653d5bf (patch)
tree8fc030e217d8a4c23bbb764a44867f69b070680b /engines
parent18521c6673121c8a1fc18028f6d5fc96a840ad05 (diff)
downloadscummvm-rg350-727afcf4bd65fbdf1af9de2eab6657ccf653d5bf.tar.gz
scummvm-rg350-727afcf4bd65fbdf1af9de2eab6657ccf653d5bf.tar.bz2
scummvm-rg350-727afcf4bd65fbdf1af9de2eab6657ccf653d5bf.zip
CGE: Add some doxygen comments
Diffstat (limited to 'engines')
-rw-r--r--engines/cge/cge_main.cpp9
-rw-r--r--engines/cge/snail.cpp25
-rw-r--r--engines/cge/walk.cpp8
3 files changed, 38 insertions, 4 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 51cf3bb621..1c2759bd97 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -847,6 +847,9 @@ void System::tick() {
_time = kSystemRate;
}
+/**
+ * Switch greyscale mode on/off
+ */
void CGEEngine::switchColorMode() {
debugC(1, kCGEDebugEngine, "CGEEngine::switchColorMode()");
@@ -855,6 +858,9 @@ void CGEEngine::switchColorMode() {
_vga->setColors(_vga->_sysPal, 64);
}
+/**
+ * Switch music on/off
+ */
void CGEEngine::switchMusic() {
debugC(1, kCGEDebugEngine, "CGEEngine::switchMusic()");
@@ -867,6 +873,9 @@ void CGEEngine::switchMusic() {
_midiPlayer->killMidi();
}
+/**
+ * Shutdown game
+ */
void CGEEngine::startCountDown() {
debugC(1, kCGEDebugEngine, "CGEEngine::startCountDown()");
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index 966a372be4..cbc463ced2 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -1002,7 +1002,6 @@ void CGEEngine::snSetZ(Sprite *spr, int z) {
if (spr) {
spr->_z = z;
- //SNPOST_(SNZTRIM, -1, 0, spr);
snZTrim(spr);
}
}
@@ -1098,6 +1097,11 @@ void CGEEngine::snKeep(Sprite *spr, int stp) {
selectPocket(-1);
}
+/**
+ * Remove an object from the inventory and (if specified) trigger an animation
+ * @param spr Inventory item
+ * @param stp Animation
+ */
void CGEEngine::snGive(Sprite *spr, int stp) {
debugC(1, kCGEDebugEngine, "CGEEngine::snGive(spr, %d)", stp);
@@ -1149,8 +1153,13 @@ void CGEEngine::snLevel(Sprite *spr, int lev) {
_maxScene = _maxSceneArr[_lev];
}
-void CGEEngine::snFlag(int indx, bool v) {
- _flag[indx] = v;
+/**
+ * Set a flag to a value
+ * @param indx Flag index
+ * @param val Flag value
+ */
+void CGEEngine::snFlag(int indx, bool val) {
+ _flag[indx] = val;
}
void CGEEngine::snSetRef(Sprite *spr, int nr) {
@@ -1193,12 +1202,22 @@ void CGEEngine::snLight(bool in) {
_dark = !in;
}
+/**
+ * Set an horizontal boundary
+ * @param scene Scene number
+ * @param barX Horizontal boundary value
+ */
void CGEEngine::snHBarrier(const int scene, const int barX) {
debugC(1, kCGEDebugEngine, "CGEEngine::snHBarrier(%d, %d)", scene, barX);
_barriers[(scene > 0) ? scene : _now]._horz = barX;
}
+/**
+ * Set a vertical boundary
+ * @param scene Scene number
+ * @param barY Vertical boundary value
+ */
void CGEEngine::snVBarrier(const int scene, const int barY) {
debugC(1, kCGEDebugEngine, "CGEEngine::snVBarrier(%d, %d)", scene, barY);
diff --git a/engines/cge/walk.cpp b/engines/cge/walk.cpp
index 31ea1909d8..22c06a17c1 100644
--- a/engines/cge/walk.cpp
+++ b/engines/cge/walk.cpp
@@ -126,7 +126,10 @@ int Walk::distance(Sprite *spr) {
return dz - 1;
}
-
+/**
+ * Turn the character to a given direction
+ * @param d Direction
+ */
void Walk::turn(Dir d) {
Dir dir = (_dir == kDirNone) ? kDirSouth : _dir;
if (d != _dir) {
@@ -135,6 +138,9 @@ void Walk::turn(Dir d) {
}
}
+/**
+ * Stop the character and reset his direction
+ */
void Walk::park() {
if (_time == 0)
_time++;