[Scummvm-git-logs] scummvm master -> bafa5304426611a3c4dcf6ea0635544fc5906982

sev- noreply at scummvm.org
Fri Oct 28 22:36:22 UTC 2022


This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
60e3d445ab SAGA2: Rename enums in bevel.h
bf7edc017a SAGA2: Eliminate some C-isms
df6d4b91c4 SAGA2: Rename enums in gdraw.h
a748812220 SAGA2: Rename enums in grabinfo.h
6ddf448fc8 SAGA2: Rename enums in gtextbox.h
adc959719c SAGA2: Rename enums in idtypes.h
d75b2df977 SAGA2: Rename enums in input.h
bafa530442 SAGA2: Rename enums in intrface.h


Commit: 60e3d445ab53d0bd51355e88dbb1222c0bf2fc7f
    https://github.com/scummvm/scummvm/commit/60e3d445ab53d0bd51355e88dbb1222c0bf2fc7f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-28T23:34:23+02:00

Commit Message:
SAGA2: Rename enums in bevel.h

Changed paths:
    engines/saga2/gbevel.h
    engines/saga2/msgbox.cpp
    engines/saga2/panel.cpp


diff --git a/engines/saga2/gbevel.h b/engines/saga2/gbevel.h
index 7ce67c5dc5d..dfcb6250cad 100644
--- a/engines/saga2/gbevel.h
+++ b/engines/saga2/gbevel.h
@@ -36,88 +36,40 @@ namespace Saga2 {
 
 enum bevelPens {
 
-	transpPen = 0,                          // transparent pen for mouse
+	kTranspPen = 0,                          // transparent pen for mouse
 
 	//  color pens
 
-	blackPen,                               // black
-	whitePen,                               // white
+	kBlackPen,                               // black
+	kWhitePen,                               // white
 
 	//  Background pens
 
-	backPen,                                // background fill
-	backLtPen,                              // background highlight
-	backDkPen,                              // background shadow
+	kBackPen,                                // background fill
+	kBackLtPen,                              // background highlight
+	kBackDkPen,                              // background shadow
 
 	//  Button pens
 
-	buttonPen,                              // button fill color
-	buttonLtPen,                            // button highlight
-	buttonDkPen,                            // button shadow
+	kButtonPen,                              // button fill color
+	kButtonLtPen,                            // button highlight
+	kButtonDkPen,                            // button shadow
 
 	//  UI highlighting pens
 
-	hilitePen,                              // text highlight color
+	kHilitePen,                              // text highlight color
 
-	cStdPenCount
+	kCStdPenCount
 };
 
-//  Pen array definition
-
-extern gPen         mainPens[];         // the array of pens
-
-#if 0
-#define transpPen   mainPens[0]       // transparent pen for mouse
-
-//  color pens
-
-#define blackPen    mainPens[1]       // black
-#define whitePen    mainPens[2]       // white
-
-//  Background pens
-
-#define backPen     mainPens[3]       // background fill
-#define backLtPen   mainPens[4]       // background highlight
-#define backDkPen   mainPens[5]       // background shadow
-
-//  Button pens
-
-#define buttonPen   mainPens[6]       // button fill color
-#define buttonLtPen mainPens[7]       // button highlight
-#define buttonDkPen mainPens[8]       // button shadow
-
-#define transpPen   mainPens[0]       // transparent pen for mouse
-
-//  color pens
-
-#define blackPen    mainPens[1]       // black
-#define whitePen    mainPens[2]       // white
-
-//  Background pens
-
-#define backPen     mainPens[3]       // background fill
-#define backLtPen   mainPens[4]       // background highlight
-#define backDkPen   mainPens[5]       // background shadow
-
-//  Button pens
-
-#define buttonPen   mainPens[6]       // button fill color
-#define buttonLtPen mainPens[7]       // button highlight
-#define buttonDkPen mainPens[8]       // button shadow
-
-//  Text pens
-
-#define hilitePen   mainPens[9]       // text highlight color
-#endif
-
 /* ===================================================================== *
                               Bevel Boxes
  * ===================================================================== */
 
 enum bevelOptions {
-	bevelRecessed   = (1 << 0),         // bevel is pushed in
-	bevelFilled     = (1 << 1),         // bevel filled with approp. color
-	bevelInverted   = (1 << 2)          // pushed in w/slightly diff. look
+	kBevelRecessed   = (1 << 0),         // bevel is pushed in
+	kBevelFilled     = (1 << 1),         // bevel filled with approp. color
+	kBevelInverted   = (1 << 2)          // pushed in w/slightly diff. look
 };
 
 void DrawBevelFrame(gPort &port, const Rect16 &r, uint16 flags);
diff --git a/engines/saga2/msgbox.cpp b/engines/saga2/msgbox.cpp
index 63ae2821ff6..81b12a3adc8 100644
--- a/engines/saga2/msgbox.cpp
+++ b/engines/saga2/msgbox.cpp
@@ -309,18 +309,18 @@ void SimpleWindow::DrawOutlineFrame(gPort &port, const Rect16 &r, int16 fillColo
 		int16       bottom = r.y + r.height - 2,
 		            right  = r.x + r.width - 2;
 
-		port.setIndirectColor(whitePen);
+		port.setIndirectColor(kWhitePen);
 		port.vLine(r.x + 1, r.y + 1, r.height - 3);
 		port.hLine(r.x + 2, r.y + 1, r.width  - 3);
 
-		port.setIndirectColor(blackPen);
+		port.setIndirectColor(kBlackPen);
 		port.frameRect(r, 1);
 
-		port.setIndirectColor(buttonDkPen);
+		port.setIndirectColor(kButtonDkPen);
 		port.hLine(r.x + 1,   bottom, r.width - 2);
 		port.vLine(right, r.y + 1,    r.height - 2);
 
-		port.setIndirectColor(buttonPen);
+		port.setIndirectColor(kButtonPen);
 		port.setPixel(r.x + 1, bottom);
 		port.setPixel(right,   r.y + 1);
 
diff --git a/engines/saga2/panel.cpp b/engines/saga2/panel.cpp
index eb03b61d037..bbfa2bc2093 100644
--- a/engines/saga2/panel.cpp
+++ b/engines/saga2/panel.cpp
@@ -232,12 +232,12 @@ void gPanel::drawTitle(enum text_positions placement) {
 	SAVE_GPORT_STATE(port);                  // save pen color, etc.
 
 	if (_imageLabel) {
-		port.setIndirectColor(blackPen);     // pen color black
+		port.setIndirectColor(kBlackPen);     // pen color black
 		port.setMode(drawModeColor);         // draw as glyph
 		port.bltPixels(*img, 0, 0, r.x, r.y, r.width, r.height);
 	} else {
 		port.setMode(drawModeMatte);         // draw as glyph
-		port.setIndirectColor(blackPen);     // pen color black
+		port.setIndirectColor(kBlackPen);     // pen color black
 		port.setStyle(textStyleUnderBar);    // set style to do underbars
 		port.moveTo(r.x, r.y);           // move to new text pos
 


Commit: bf7edc017af766e711cb5a1c141b82852afe61c4
    https://github.com/scummvm/scummvm/commit/bf7edc017af766e711cb5a1c141b82852afe61c4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-28T23:40:11+02:00

Commit Message:
SAGA2: Eliminate some C-isms

Changed paths:
    engines/saga2/gdraw.cpp
    engines/saga2/gdraw.h
    engines/saga2/gtextbox.h
    engines/saga2/msgbox.cpp
    engines/saga2/panel.cpp
    engines/saga2/panel.h


diff --git a/engines/saga2/gdraw.cpp b/engines/saga2/gdraw.cpp
index 5f78018c0c0..43d09e18fe9 100644
--- a/engines/saga2/gdraw.cpp
+++ b/engines/saga2/gdraw.cpp
@@ -81,7 +81,7 @@ void gPort::setState(gPenState &state) {
 	setBgColor(state.bgPen);
 	setOutlineColor(state.olPen);
 	setShadowColor(state.shPen);
-	setMode((enum draw_modes) state.drawMode);
+	setMode((DrawModes)state.drawMode);
 }
 
 /****** gdraw.cpp/gPort::getState *********************************
diff --git a/engines/saga2/gdraw.h b/engines/saga2/gdraw.h
index 6bc98c33a2c..fc349aa76b5 100644
--- a/engines/saga2/gdraw.h
+++ b/engines/saga2/gdraw.h
@@ -148,7 +148,7 @@ struct gPenState {
    gPort: Facilitates redering operations on PixelMaps
  * ============================================================================ */
 
-enum draw_modes {
+enum DrawModes {
 	drawModeMatte = 0,                      // use transparency
 	drawModeColor,                          // solid color, use transparency
 	drawModeReplace,                        // don't use transparency
@@ -157,7 +157,7 @@ enum draw_modes {
 	numDrawModes
 };
 
-enum text_styles {
+enum {
 	textStyleOutline    = (1 << 0),         // outline the characters
 	textStyleShadow     = (1 << 1),         // drop shadow the characters
 	textStyleUnderScore = (1 << 2),         // underscore all chars
@@ -168,7 +168,7 @@ enum text_styles {
 	textStyleItalics    = (1 << 7)          // italic
 };
 
-enum text_positions {
+enum TextPositions {
 	textPosLeft         = (1 << 0),
 	textPosRight        = (1 << 1),
 	textPosHigh         = (1 << 2),
@@ -192,7 +192,7 @@ public:
 	                _olPen,                  // text outline pen
 	                _shPen;                  // text shadow pen
 	gPen            *_penMap;                // indirect pen map
-	enum draw_modes _drawMode;               // current drawing mode
+	DrawModes       _drawMode;               // current drawing mode
 	Point16         _penPos;                 // current pen position
 	gFont           *_font;                  // current font
 	int16           _textSpacing;            // extra space between characters
@@ -253,7 +253,7 @@ public:
 
 	//  modes & styles
 
-	void setMode(enum draw_modes mode) {
+	void setMode(DrawModes mode) {
 		_drawMode = mode;
 	}
 	void setStyle(int style)               {
diff --git a/engines/saga2/gtextbox.h b/engines/saga2/gtextbox.h
index 7706b44673c..2bfb6107a6a 100644
--- a/engines/saga2/gtextbox.h
+++ b/engines/saga2/gtextbox.h
@@ -29,7 +29,7 @@
 namespace Saga2 {
 
 enum textBoxFlags {
-	//  First 4 flags are the text_positions flags for label placement
+	//  First 4 flags are the TextPositions flags for label placement
 	textBoxAlignRight   = (1 << 4),
 	textBoxAlignCenter  = (1 << 5),
 	textBoxNoFilter     = (1 << 6),     // let non-edit keys come through
diff --git a/engines/saga2/msgbox.cpp b/engines/saga2/msgbox.cpp
index 81b12a3adc8..884afa7d977 100644
--- a/engines/saga2/msgbox.cpp
+++ b/engines/saga2/msgbox.cpp
@@ -416,7 +416,7 @@ void SimpleButton::drawClipped(
 	                               box,
 	                               buttonColor);
 
-	drawTitle((enum text_positions)0);
+	drawTitle((TextPositions)0);
 	g_vm->_pointer->show(port, _extent);              // show mouse pointer
 }
 
diff --git a/engines/saga2/panel.cpp b/engines/saga2/panel.cpp
index bbfa2bc2093..4de93deeadb 100644
--- a/engines/saga2/panel.cpp
+++ b/engines/saga2/panel.cpp
@@ -153,7 +153,7 @@ bool gPanel::isActive() {
 	return (this == g_vm->_toolBase->_activePanel);
 }
 
-void gPanel::notify(enum gEventType type, int32 value) {
+void gPanel::notify(gEventType type, int32 value) {
 	gEvent          ev;
 
 	ev.panel = this;
@@ -185,7 +185,7 @@ void gPanel::invalidate(Rect16 *) {
 }
 
 
-void gPanel::drawTitle(enum text_positions placement) {
+void gPanel::drawTitle(TextPositions placement) {
 	gPort           &port = _window._windowPort;
 	Rect16          r = _extent;
 	const gPixelMap *img = nullptr;
diff --git a/engines/saga2/panel.h b/engines/saga2/panel.h
index fbfc8674bff..5aa623c7cf5 100644
--- a/engines/saga2/panel.h
+++ b/engines/saga2/panel.h
@@ -92,7 +92,7 @@ enum gEventType {
 
 struct gEvent {
 	gPanel          *panel;                 // where event came from
-	enum gEventType eventType;              // type of event that occurred
+	gEventType      eventType;              // type of event that occurred
 	Point16         mouse;                  // mouse position
 	int32           value;                  // new value of control
 	gWindow         *window;                // active window
@@ -157,11 +157,11 @@ protected:
 	virtual void timerTick(gPanelMessage &msg);
 	virtual void onMouseHintDelay();
 
-	void notify(enum gEventType, int32 value);
+	void notify(gEventType, int32 value);
 	void notify(gEvent &ev) {
 		if (_command) _command(ev);
 	}
-	void drawTitle(enum text_positions placement);
+	void drawTitle(TextPositions placement);
 
 
 public:


Commit: df6d4b91c4526a0a24b0c5076ee98ad4a95ae08f
    https://github.com/scummvm/scummvm/commit/df6d4b91c4526a0a24b0c5076ee98ad4a95ae08f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-28T23:43:53+02:00

Commit Message:
SAGA2: Rename enums in gdraw.h

Changed paths:
    engines/saga2/automap.cpp
    engines/saga2/button.cpp
    engines/saga2/contain.cpp
    engines/saga2/display.cpp
    engines/saga2/document.cpp
    engines/saga2/floating.cpp
    engines/saga2/gdraw.cpp
    engines/saga2/gdraw.h
    engines/saga2/gpointer.cpp
    engines/saga2/gtext.cpp
    engines/saga2/gtextbox.cpp
    engines/saga2/intrface.cpp
    engines/saga2/messager.cpp
    engines/saga2/mouseimg.cpp
    engines/saga2/msgbox.cpp
    engines/saga2/panel.cpp
    engines/saga2/playmode.cpp
    engines/saga2/speech.cpp
    engines/saga2/sprite.cpp
    engines/saga2/uidialog.cpp
    engines/saga2/vbacksav.cpp
    engines/saga2/vwdraw.cpp


diff --git a/engines/saga2/automap.cpp b/engines/saga2/automap.cpp
index a04da31ef65..d0fe8b45dc5 100644
--- a/engines/saga2/automap.cpp
+++ b/engines/saga2/automap.cpp
@@ -418,7 +418,7 @@ void AutoMap::drawClipped(
 	createSmallMap();
 
 	//  Blit the pixelmap to the main screen
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 	port.bltPixels(*_tPort._map,
 	               0, 0,
 	               _extent.x, _extent.y,
diff --git a/engines/saga2/button.cpp b/engines/saga2/button.cpp
index 789fa4e39d2..07fe3fb3402 100644
--- a/engines/saga2/button.cpp
+++ b/engines/saga2/button.cpp
@@ -330,7 +330,7 @@ void GfxSpriteImage::drawClipped(gPort &port,
 	//  Render the sprite into the bitmap image sequence
 	ExpandColorMappedSprite(map, _sprPtr, _objColors);
 
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 	port.bltPixels(map, 0, 0,
 	               _extent.x - offset.x, _extent.y - offset.y,
 	               map._size.x, map._size.y);
diff --git a/engines/saga2/contain.cpp b/engines/saga2/contain.cpp
index bbecf4aac01..25dd959a573 100644
--- a/engines/saga2/contain.cpp
+++ b/engines/saga2/contain.cpp
@@ -404,9 +404,9 @@ void ContainerView::drawSelector(gPort &port, Point16 &pos) {
 	port.moveTo(Point16(pos.x - ((3 * (num - 3)) + 1),  pos.y + 7));
 	port.setFont(&Helv11Font);
 	port.setColor(11);                   // set color to white
-	port.setStyle(textStyleThickOutline);
+	port.setStyle(kTextStyleThickOutline);
 	port.setOutlineColor(24);                // set outline color to black
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 
 	port.drawText(buf);
 }
@@ -433,9 +433,9 @@ void ContainerView::drawQuantity(
 		port.moveTo(x - 1,  y + 22);
 		port.setFont(&Helv11Font);
 		port.setColor(11);                   // set color to white
-		port.setStyle(textStyleThickOutline);
+		port.setStyle(kTextStyleThickOutline);
 		port.setOutlineColor(24);                // set outline color to black
-		port.setMode(drawModeMatte);
+		port.setMode(kDrawModeMatte);
 
 		port.drawText(buf);
 	}
diff --git a/engines/saga2/display.cpp b/engines/saga2/display.cpp
index 13d60b2c8d0..60861f13a14 100644
--- a/engines/saga2/display.cpp
+++ b/engines/saga2/display.cpp
@@ -249,7 +249,7 @@ void reDrawScreen() {
  * ===================================================================== */
 
 void blackOut() {
-	g_vm->_mainPort._drawMode = drawModeReplace;
+	g_vm->_mainPort._drawMode = kDrawModeReplace;
 	g_vm->_mainPort.setColor(0);            //  fill screen with color
 	g_vm->_mainPort.fillRect(Rect16(0, 0, 640, 480));
 	g_vm->_pal->lightsOut();
diff --git a/engines/saga2/document.cpp b/engines/saga2/document.cpp
index 212b32493b2..bbe6e9c2922 100644
--- a/engines/saga2/document.cpp
+++ b/engines/saga2/document.cpp
@@ -628,7 +628,7 @@ void CDocument::renderText() {
 			}
 		}
 
-		port.setMode(drawModeMatte);
+		port.setMode(kDrawModeMatte);
 
 		g_vm->_pointer->hide();
 
diff --git a/engines/saga2/floating.cpp b/engines/saga2/floating.cpp
index 51e2ba41a3a..1f4603ecb94 100644
--- a/engines/saga2/floating.cpp
+++ b/engines/saga2/floating.cpp
@@ -508,13 +508,13 @@ void LabeledButton::drawClipped(
 	gImageButton::drawClipped(port, offset, r);
 
 	textOrigin.x = origin.x + ((_extent.width -
-	                            TextWidth(textFont, _title, -1, textStyleUnderBar)) >> 1);
+	                            TextWidth(textFont, _title, -1, kTextStyleUnderBar)) >> 1);
 	textOrigin.y = origin.y + ((_extent.height - textFont->height) >> 1);
 
 	port.setColor(2);
 	port.moveTo(textOrigin);
 	port.setFont(textFont);
-	port.setStyle(textStyleUnderBar);
+	port.setStyle(kTextStyleUnderBar);
 	port.drawText(_title, -1);
 }
 
@@ -640,7 +640,7 @@ void updateWindowSection(const Rect16 &r) {
 		return;
 
 	tempPort.setMap(&tempMap);
-	tempPort.setMode(drawModeReplace);
+	tempPort.setMode(kDrawModeReplace);
 
 	//  Compute the intersection of the animated area with the clip
 	//  rectangle. If they overlap, then copy part of the animated
@@ -686,13 +686,13 @@ void updateWindowSection(const Rect16 &r) {
 	}
 	//  Now, blit the temporary bitmap to the main screen.
 
-	g_vm->_mainPort.setMode(drawModeReplace);
+	g_vm->_mainPort.setMode(kDrawModeReplace);
 	g_vm->_pointer->hide(g_vm->_mainPort, clip);
 	g_vm->_mainPort.bltPixels(tempMap,
 	                   0, 0,
 	                   clip.x, clip.y, clip.width, clip.height);
 	g_vm->_pointer->show(g_vm->_mainPort, clip);
-	g_vm->_mainPort.setMode(drawModeMatte);
+	g_vm->_mainPort.setMode(kDrawModeMatte);
 	delete[] tempMap._data;
 }
 
diff --git a/engines/saga2/gdraw.cpp b/engines/saga2/gdraw.cpp
index 43d09e18fe9..03e678d4855 100644
--- a/engines/saga2/gdraw.cpp
+++ b/engines/saga2/gdraw.cpp
@@ -135,7 +135,7 @@ void gPort::getState(gPenState &state) {
 *
 *   FUNCTION
 *       Fill a rectangular area with a solid color.
-*       drawModeComplement is supported; All other draw modes cause
+*       kDrawModeComplement is supported; All other draw modes cause
 *       a solid filling of pixels.
 *
 *   INPUTS
@@ -170,7 +170,7 @@ void gPort::fillRect(const Rect16 r) {
 	if (!sect.empty()) {                    // if result is non-empty
 		uint8 *addr = _baseRow + sect.y * _rowMod + sect.x;
 
-		if (_drawMode == drawModeComplement) { // Complement drawing mode
+		if (_drawMode == kDrawModeComplement) { // Complement drawing mode
 			for (int h = sect.height;
 			        h > 0;
 			        h--,
@@ -258,7 +258,7 @@ void gPort::frameRect(const Rect16 r, int16 thick) {
 *   FUNCTION
 *       This function draws a 1-pixel-thick horizontal line starting
 *       from the coordinates at (x,y) and extending for "width" pixels.
-*       drawModeComplement is supported.
+*       kDrawModeComplement is supported.
 *
 *       Calling this function is faster that the general "line" routine.
 *       It is used in many of the GTools bevel-drawing functions.
@@ -292,7 +292,7 @@ void gPort::hLine(int16 x, int16 y, int16 width) {
 	sect.y += _origin.y;
 
 	if (!sect.empty()) {                        // if result is non-empty
-		if (_drawMode == drawModeComplement) {
+		if (_drawMode == kDrawModeComplement) {
 			uint8 *addr = _baseRow + (y + _origin.y) * _rowMod + x + _origin.x;
 
 			while (sect.width--) *addr++ ^= _fgPen;
@@ -320,7 +320,7 @@ void gPort::hLine(int16 x, int16 y, int16 width) {
 *   FUNCTION
 *       This function draws a 1-pixel-thick vertical line starting
 *       from the coordinates at (x,y) and extending downward for
-*       "height" pixels. drawModeComplement is supported.
+*       "height" pixels. kDrawModeComplement is supported.
 *
 *       Calling this function is faster that the general "line" routine.
 *       It is used in many of the GTools bevel-drawing functions.
@@ -355,7 +355,7 @@ void gPort::vLine(int16 x, int16 y, int16 height) {
 
 	//  And now, draw the line
 
-	if (_drawMode == drawModeComplement) {
+	if (_drawMode == kDrawModeComplement) {
 		for (addr = _baseRow + (y + _origin.y) * _rowMod + x + _origin.x;
 		        y < bottom;
 		        y++) {
@@ -393,7 +393,7 @@ void gPort::vLine(int16 x, int16 y, int16 height) {
 *   FUNCTION
 *       This is the general bresenham line-drawing function. It draws
 *       from a source point to a destination point. The pen position
-*       is not affected. Clipping and drawModeComplement are supported.
+*       is not affected. Clipping and kDrawModeComplement are supported.
 *
 *     INPUTS
 *       (first form)
@@ -483,7 +483,7 @@ void gPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 			for (i = xAbs + 1; i > 0; i--) {
 				if (x1 >= _clip.x && x1 < clipRight
 				        && y1 >= _clip.y && y1 < clipBottom) {
-					if (_drawMode == drawModeComplement)
+					if (_drawMode == kDrawModeComplement)
 						*addr ^= _fgPen;
 					else *addr = _fgPen;
 				}
@@ -504,7 +504,7 @@ void gPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 			for (i = yAbs + 1; i > 0; i--) {
 				if (x1 >= _clip.x && x1 < clipRight
 				        && y1 >= _clip.y && y1 < clipBottom) {
-					if (_drawMode == drawModeComplement)
+					if (_drawMode == kDrawModeComplement)
 						*addr ^= _fgPen;
 					else *addr = _fgPen;
 				}
@@ -525,7 +525,7 @@ void gPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 			errTerm = yAbs - (xAbs >> 1);
 
 			for (i = xAbs + 1; i > 0; i--) {
-				if (_drawMode == drawModeComplement)
+				if (_drawMode == kDrawModeComplement)
 					*addr ^= _fgPen;
 				else *addr = _fgPen;
 
@@ -543,7 +543,7 @@ void gPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 			errTerm = xAbs - (yAbs >> 1);
 
 			for (i = yAbs + 1; i > 0; i--) {
-				if (_drawMode == drawModeComplement)
+				if (_drawMode == kDrawModeComplement)
 					*addr ^= _fgPen;
 				else *addr = _fgPen;
 
@@ -620,7 +620,7 @@ void gPort::bltPixels(
 		           + (sect.y + _origin.y) * _rowMod
 		           + sect.x + _origin.x;
 
-		if (_drawMode == drawModeMatte) {        // Matte drawing mode
+		if (_drawMode == kDrawModeMatte) {        // Matte drawing mode
 			for (int h = sect.height; h > 0; h--, src_line += src._size.x, dst_line += _rowMod) {
 				uint8   *src_ptr = src_line,
 				*dst_ptr = dst_line;
@@ -632,7 +632,7 @@ void gPort::bltPixels(
 						dst_ptr++, src_ptr++;
 				}
 			}
-		} else if (_drawMode == drawModeColor) { // Color drawing mode
+		} else if (_drawMode == kDrawModeColor) { // Color drawing mode
 			// Draws single color, except where
 			for (int h = sect.height;           // src pixels are transparent
 			        h > 0;
@@ -651,11 +651,11 @@ void gPort::bltPixels(
 						dst_ptr++;
 				}
 			}
-		} else if (_drawMode == drawModeReplace) { // Replacement drawing mode
+		} else if (_drawMode == kDrawModeReplace) { // Replacement drawing mode
             for (int h = sect.height; h > 0; h--, src_line += src._size.x, dst_line += _rowMod) {
 				memcpy(dst_line, src_line, sect.width);
             }
-		} else if (_drawMode == drawModeComplement) { // Complement drawing mode
+		} else if (_drawMode == kDrawModeComplement) { // Complement drawing mode
 			// Inverts pixels, except where
 			for (int h = sect.height;           // src is transparent
 			        h > 0;
diff --git a/engines/saga2/gdraw.h b/engines/saga2/gdraw.h
index fc349aa76b5..1232e75b133 100644
--- a/engines/saga2/gdraw.h
+++ b/engines/saga2/gdraw.h
@@ -149,30 +149,30 @@ struct gPenState {
  * ============================================================================ */
 
 enum DrawModes {
-	drawModeMatte = 0,                      // use transparency
-	drawModeColor,                          // solid color, use transparency
-	drawModeReplace,                        // don't use transparency
-	drawModeComplement,                     // blit in complement mode
+	kDrawModeMatte = 0,                      // use transparency
+	kDrawModeColor,                          // solid color, use transparency
+	kDrawModeReplace,                        // don't use transparency
+	kDrawModeComplement,                     // blit in complement mode
 
-	numDrawModes
+	kNumDrawModes
 };
 
 enum {
-	textStyleOutline    = (1 << 0),         // outline the characters
-	textStyleShadow     = (1 << 1),         // drop shadow the characters
-	textStyleUnderScore = (1 << 2),         // underscore all chars
-	textStyleUnderBar   = (1 << 3),         // underscore char after a '_'
-	textStyleHiLiteBar  = (1 << 4),         // highlight char after a '_'
-	textStyleThickOutline = (1 << 5),       // extra-thick outline
-	textStyleBold       = (1 << 6),         // bold
-	textStyleItalics    = (1 << 7)          // italic
+	kTextStyleOutline    = (1 << 0),         // outline the characters
+	kTextStyleShadow     = (1 << 1),         // drop shadow the characters
+	kTextStyleUnderScore = (1 << 2),         // underscore all chars
+	kTextStyleUnderBar   = (1 << 3),         // underscore char after a '_'
+	kTextStyleHiLiteBar  = (1 << 4),         // highlight char after a '_'
+	kTextStyleThickOutline = (1 << 5),       // extra-thick outline
+	kTextStyleBold       = (1 << 6),         // bold
+	kTextStyleItalics    = (1 << 7)          // italic
 };
 
 enum TextPositions {
-	textPosLeft         = (1 << 0),
-	textPosRight        = (1 << 1),
-	textPosHigh         = (1 << 2),
-	textPosLow          = (1 << 3)
+	kTextPosLeft         = (1 << 0),
+	kTextPosRight        = (1 << 1),
+	kTextPosHigh         = (1 << 2),
+	kTextPosLow          = (1 << 3)
 };
 
 class gPort {
@@ -205,7 +205,7 @@ public:
 
 		_rowMod = 0;
 		_penMap = nullptr;
-		_drawMode = drawModeMatte;
+		_drawMode = kDrawModeMatte;
 		_font = nullptr;
 		_textSpacing = 0;
 		_textStyles = 0;
diff --git a/engines/saga2/gpointer.cpp b/engines/saga2/gpointer.cpp
index 6542b358aef..76ed0c3361a 100644
--- a/engines/saga2/gpointer.cpp
+++ b/engines/saga2/gpointer.cpp
@@ -43,7 +43,7 @@ gMousePointer::gMousePointer(gDisplayPort &port) {
 
 	//  set up the backsave port
 	_savePort.setMap(&_saveMap);
-	_savePort.setMode(drawModeReplace);
+	_savePort.setMode(kDrawModeReplace);
 
 	_videoPort = &port;
 
diff --git a/engines/saga2/gtext.cpp b/engines/saga2/gtext.cpp
index b925315571a..9f3b70a6b06 100644
--- a/engines/saga2/gtext.cpp
+++ b/engines/saga2/gtext.cpp
@@ -28,7 +28,7 @@
 
 namespace Saga2 {
 
-#define textStyleBar    (textStyleUnderBar|textStyleHiLiteBar)
+#define textStyleBar    (kTextStyleUnderBar|kTextStyleHiLiteBar)
 
 /* ============================================================================ *
                             Text Blitting Routines
@@ -300,18 +300,18 @@ void gPort::drawStringChars(
 
 	// draw drop-shadow, if any
 
-	if (_textStyles & textStyleShadow) {
+	if (_textStyles & kTextStyleShadow) {
 		x = xpos - 1;
 		s = str;
 
-		if (_textStyles & textStyleOutline) { // if outlining
+		if (_textStyles & kTextStyleOutline) { // if outlining
 			for (i = 0; i < len; i++) {
 				drawchar = *s++;            // draw thick drop shadow
 				x += _font->charKern[drawchar];
 				DrawChar3x3Outline(_font, drawchar, x, buffer, _shPen, drowMod);
 				x += _font->charSpace[drawchar] + _textSpacing;
 			}
-		} else if (_textStyles & textStyleThickOutline) { // if outlining
+		} else if (_textStyles & kTextStyleThickOutline) { // if outlining
 			for (i = 0; i < len; i++) {
 				drawchar = *s++;                // draw thick drop shadow
 				x += _font->charKern[drawchar];
@@ -331,7 +331,7 @@ void gPort::drawStringChars(
 
 	// draw outline, if any
 
-	if (_textStyles & textStyleOutline) { // if outlining
+	if (_textStyles & kTextStyleOutline) { // if outlining
 		x = xpos;
 		s = str;
 
@@ -342,7 +342,7 @@ void gPort::drawStringChars(
 			                   _olPen, drowMod);
 			x += _font->charSpace[drawchar] + _textSpacing;
 		}
-	} else if (_textStyles & textStyleThickOutline) { // if thick outlining
+	} else if (_textStyles & kTextStyleThickOutline) { // if thick outlining
 		x = xpos;
 		s = str;
 
@@ -359,7 +359,7 @@ void gPort::drawStringChars(
 
 	x = xpos;
 	s = str;
-	underscore = _textStyles & textStyleUnderScore ? true : false;
+	underscore = _textStyles & kTextStyleUnderScore ? true : false;
 
 	for (i = 0; i < len; i++) {
 		int16       last_x = x;
@@ -369,9 +369,9 @@ void gPort::drawStringChars(
 		if (drawchar == '_' && underbar) {
 			len--;
 			drawchar = *s++;
-			if (_textStyles & textStyleUnderBar)
+			if (_textStyles & kTextStyleUnderBar)
 				underscore = true;
-			if (_textStyles & textStyleHiLiteBar)
+			if (_textStyles & kTextStyleHiLiteBar)
 				color = _bgPen;
 		}
 		x += _font->charKern[drawchar];
@@ -386,7 +386,7 @@ void gPort::drawStringChars(
 				*put++ = color;
 			}
 
-			if (!(_textStyles & textStyleUnderScore))
+			if (!(_textStyles & kTextStyleUnderScore))
 				underscore = false;
 		}
 	}
@@ -475,13 +475,13 @@ int16 gPort::drawClippedString(
 	//  Adjust the size and positioning of the temp map due
 	//  to text style effects.
 
-	if (_textStyles & textStyleOutline) {
+	if (_textStyles & kTextStyleOutline) {
 		xoff = yoff = 1;
 		xpos--;
 		ypos--;
 		tempMap._size.x += 2;
 		tempMap._size.y += 2;
-	} else if (_textStyles & textStyleThickOutline) {
+	} else if (_textStyles & kTextStyleThickOutline) {
 		xoff = yoff = 2;
 		xpos -= 2;
 		ypos -= 2;
@@ -489,12 +489,12 @@ int16 gPort::drawClippedString(
 		tempMap._size.y += 4;
 	}
 
-	if (_textStyles & (textStyleShadow | textStyleUnderScore | textStyleUnderBar)) {
+	if (_textStyles & (kTextStyleShadow | kTextStyleUnderScore | kTextStyleUnderBar)) {
 		tempMap._size.x += 1;
 		tempMap._size.y += 1;
 	}
 
-	if (_textStyles & textStyleItalics) {
+	if (_textStyles & kTextStyleItalics) {
 		int n = (_font->height - _font->baseLine - 1) / 2;
 
 		if (n > 0) xpos += n;
@@ -511,7 +511,7 @@ int16 gPort::drawClippedString(
 		//  not doing a transparent blit.
 
 		memset(tempMap._data,
-		       (_drawMode == drawModeReplace) ? _bgPen : 0,
+		       (_drawMode == kDrawModeReplace) ? _bgPen : 0,
 		       tempMap.bytes());
 
 		//  Draw the characters into the buffer
@@ -520,7 +520,7 @@ int16 gPort::drawClippedString(
 
 		//  apply slant if italics
 
-		if (_textStyles & textStyleItalics) {
+		if (_textStyles & kTextStyleItalics) {
 			int n = (_font->height - _font->baseLine - 1) / 2;
 			int shift = (n > 0 ? n : 0);
 			int flag = (_font->height - _font->baseLine - 1) & 1;
@@ -657,13 +657,13 @@ void gPort::drawText(
 *                   string both horizontally and vertically; However,
 *                   the following flags will modify this:
 *
-*       /i/         textPosLeft -- draw text left-justified.
+*       /i/         kTextPosLeft -- draw text left-justified.
 *
-*       /i/         textPosRight -- draw text right-justified.
+*       /i/         kTextPosRight -- draw text right-justified.
 *
-*       /i/         textPosHigh -- draw text flush with top edge.
+*       /i/         kTextPosHigh -- draw text flush with top edge.
 *
-*       /i/         textPosLow -- draw text flush with bottom edge.
+*       /i/         kTextPosLow -- draw text flush with bottom edge.
 *
 *       borderSpace A Point16 object, which indicates how much space
 *                   (in both x and y) to place between the text and
@@ -695,25 +695,25 @@ void gPort::drawTextInBox(
 	height = _font->height;
 	width  = TextWidth(_font, str, length, _textStyles);
 
-	if (_textStyles & (textStyleUnderScore | textStyleUnderBar)) {
+	if (_textStyles & (kTextStyleUnderScore | kTextStyleUnderBar)) {
 		if (_font->baseLine + 2 >= _font->height)
 			height++;
 	}
 
 	//  Calculate x position of text string
 
-	if (pos & textPosLeft)
+	if (pos & kTextPosLeft)
 		x = r.x + borders.x;
-	else if (pos & textPosRight)
+	else if (pos & kTextPosRight)
 		x = r.x + r.width - width - borders.x;
 	else
 		x = r.x + (r.width - width) / 2;
 
 	//  Calculate y position of text string
 
-	if (pos & textPosHigh)
+	if (pos & kTextPosHigh)
 		y = r.y + borders.y;
-	else if (pos & textPosLow)
+	else if (pos & kTextPosLow)
 		y = r.y + r.height - height - borders.y;
 	else
 		y = r.y + (r.height - height) / 2;
@@ -778,15 +778,15 @@ int16 TextWidth(gFont *font, const char *s, int16 length, int16 styles) {
 		count += font->charKern[chr] + font->charSpace[chr];
 	}
 
-	if (styles & textStyleItalics) {
+	if (styles & kTextStyleItalics) {
 		count += (font->baseLine + 1) / 2 +
 		         (font->height - font->baseLine - 1) / 2;
 	}
-	if (styles & textStyleOutline)
+	if (styles & kTextStyleOutline)
 		count += 2;
-	else if (styles & textStyleThickOutline)
+	else if (styles & kTextStyleThickOutline)
 		count += 4;
-	if (styles & textStyleShadow)
+	if (styles & kTextStyleShadow)
 		count += 1;
 
 	return count;
diff --git a/engines/saga2/gtextbox.cpp b/engines/saga2/gtextbox.cpp
index aab60aadb1f..8c5117b13c9 100644
--- a/engines/saga2/gtextbox.cpp
+++ b/engines/saga2/gtextbox.cpp
@@ -973,7 +973,7 @@ void gTextBox::drawContents() {
 
 		//  Blit the pixelmap to the main screen
 
-		port.setMode(drawModeMatte);
+		port.setMode(kDrawModeMatte);
 		port.bltPixels(*tPort._map, 0, 0,
 		               _editRect.x + 1, _editRect.y + 1,
 		               _editRect.width, _editRect.height);
@@ -1010,7 +1010,7 @@ void gTextBox::drawClipped() {
 
 	if (_editing) {
 		drawContents();                         // draw the string
-		drawTitle(textPosLeft);                  // draw the title
+		drawTitle(kTextPosLeft);                  // draw the title
 	} else if (_displayOnly && _hilit) {
 		drawContents();
 	} else {
@@ -1047,14 +1047,14 @@ void gTextBox::drawAll(gPort &port,
 
 		if (_endLine != _oldMark  || _fullRedraw) {
 			// setup the tempPort
-			tempPort.setMode(drawModeMatte);
+			tempPort.setMode(kDrawModeMatte);
 
 			// if the text is going to change
 			tempPort.setColor(_fontColorBack);
 			tempPort.fillRect(workRect);
 
 			// draw as glyph
-			tempPort.setMode(drawModeMatte);
+			tempPort.setMode(kDrawModeMatte);
 
 			// pen color black
 			tempPort.setColor(_fontColorFore);
@@ -1089,7 +1089,7 @@ void gTextBox::drawAll(gPort &port,
 
 			//  Blit the pixelmap to the main screen
 
-			port.setMode(drawModeMatte);
+			port.setMode(kDrawModeMatte);
 
 			port.bltPixels(*tempPort._map, 0, 0,
 			               _extent.x + 1, _extent.y + 1,
diff --git a/engines/saga2/intrface.cpp b/engines/saga2/intrface.cpp
index 3dda52c1973..34dc2e98ab0 100644
--- a/engines/saga2/intrface.cpp
+++ b/engines/saga2/intrface.cpp
@@ -429,7 +429,7 @@ void CPlaqText::draw() {
 	_oldFont = port._font;
 
 	// setup the port
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 	port.setFont(_buttonFont);
 
 	g_vm->_pointer->hide(port, _extent);              // hide mouse pointer
@@ -929,7 +929,7 @@ void CManaIndicator::draw() {
 	SAVE_GPORT_STATE(port);
 
 	// setup the port
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 
 	g_vm->_pointer->hide(port, _extent);              // hide mouse pointer
 	drawClipped(port, Point16(0, 0), Rect16(0, 0, xSize, ySize));
@@ -952,7 +952,7 @@ void CManaIndicator::drawClipped(gPort &port,
 		if (!_extent.overlap(clipRect)) return;
 
 		// draw the saved image to the port
-		port.setMode(drawModeMatte);
+		port.setMode(kDrawModeMatte);
 		port.bltPixels(_savedMap, 0, 0,
 		               _extent.x - offset.x, _extent.y - offset.y,
 		               xSize, ySize);
@@ -993,7 +993,7 @@ void CManaIndicator::drawClipped(gPort &port,
 	memset(tempMap._data, 0, tempMap.bytes());
 
 	// draw as glyph
-	tempPort.setMode(drawModeMatte);
+	tempPort.setMode(kDrawModeMatte);
 
 	// draw each star and ring with color remap
 	for (uint16 i = 0; i < numManaTypes; i++) {
@@ -1070,7 +1070,7 @@ void CManaIndicator::drawClipped(gPort &port,
 	TBlit(&_savedMap, tempPort._map, 0, 0);
 
 	//  Blit the pixelmap to the main screen
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 	port.bltPixels(*tempPort._map, 0, 0,
 	               _extent.x - offset.x, _extent.y - offset.y,
 	               xSize, ySize);
@@ -1352,7 +1352,7 @@ void writePlaqText(gPort            &port,
 	va_end(argptr);
 
 	SAVE_GPORT_STATE(port);
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 	port.setFont(font);
 
 	workRect = r;
@@ -1403,7 +1403,7 @@ void writePlaqTextPos(gPort         &port,
 	va_end(argptr);
 
 	SAVE_GPORT_STATE(port);
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 	port.setFont(font);
 
 	drawPos = pos;
@@ -2613,9 +2613,9 @@ void gArmorIndicator::drawClipped(gPort &port,
 			// draw the armor numebrs
 			port.setFont(&Helv11Font);
 			port.setColor(11);                   // set color to white
-			port.setStyle(textStyleThickOutline);
+			port.setStyle(kTextStyleThickOutline);
 			port.setOutlineColor(24);                // set outline color to black
-			port.setMode(drawModeMatte);
+			port.setMode(kDrawModeMatte);
 
 			if (_attr.damageAbsorbtion == 0 && _attr.defenseBonus == 0)
 				Common::sprintf_s(buf, "-");
@@ -2624,13 +2624,13 @@ void gArmorIndicator::drawClipped(gPort &port,
 			else Common::sprintf_s(buf, "%d", _attr.damageAbsorbtion);
 
 			port.drawTextInBox(buf, -1, Rect16(pos.x, pos.y, _extent.width, _extent.height),
-			                   textPosRight | textPosHigh, Point16(0,  2));
+			                   kTextPosRight | kTextPosHigh, Point16(0,  2));
 
 			if (_attr.damageAbsorbtion == 0 && _attr.defenseBonus == 0)
 				Common::sprintf_s(buf, "-");
 			else Common::sprintf_s(buf, "%d", _attr.defenseBonus);
 			port.drawTextInBox(buf, -1, Rect16(pos.x, pos.y, _extent.width, _extent.height),
-			                   textPosRight | textPosLow, Point16(0,  2));
+			                   kTextPosRight | kTextPosLow, Point16(0,  2));
 		}
 	}
 }
diff --git a/engines/saga2/messager.cpp b/engines/saga2/messager.cpp
index 152e22ef9e7..c5cbe55ac36 100644
--- a/engines/saga2/messager.cpp
+++ b/engines/saga2/messager.cpp
@@ -79,7 +79,7 @@ int StatusLineMessager::dumpit(char *s, size_t size) {
 	_textPort->fillRect(r);
 	_textPort->setColor(_atColor);
 	_textPort->setStyle(0);
-	_textPort->drawTextInBox(s, size, r, textPosLeft, Point16(2, 1));
+	_textPort->drawTextInBox(s, size, r, kTextPosLeft, Point16(2, 1));
 
 	return 0;
 }
diff --git a/engines/saga2/mouseimg.cpp b/engines/saga2/mouseimg.cpp
index f328482f524..2dbf7a652d3 100644
--- a/engines/saga2/mouseimg.cpp
+++ b/engines/saga2/mouseimg.cpp
@@ -311,11 +311,11 @@ void setNewText(char *text) {
 
 	//  Intialize the text image port
 	textImagePort.setMap(textImage);
-	textImagePort.setMode(drawModeReplace);
+	textImagePort.setMode(kDrawModeReplace);
 	textImagePort.setColor(11);
 	textImagePort.setOutlineColor(24);
 	textImagePort.setFont(mainFont);
-	textImagePort.setStyle(textStyleOutline);
+	textImagePort.setStyle(kTextStyleOutline);
 	textImagePort.moveTo(1, 1);
 
 	//  Draw the text
diff --git a/engines/saga2/msgbox.cpp b/engines/saga2/msgbox.cpp
index 884afa7d977..26c72471ee5 100644
--- a/engines/saga2/msgbox.cpp
+++ b/engines/saga2/msgbox.cpp
@@ -238,7 +238,7 @@ void SimpleWindow::drawClipped(
     const Rect16  &r) {
 	Rect16          box = _extent;
 	//gFont             *buttonFont=&Onyx10Font;
-	int16           textPos = textPosHigh;
+	int16           textPos = kTextPosHigh;
 	//textPallete       pal( 33+9, 36+9, 41+9, 34+9, 40+9, 43+9 );
 	textPallete     pal(33 + 9, 33 + 9, 41 + 9, 33 + 9, 33 + 9, 41 + 9);
 
diff --git a/engines/saga2/panel.cpp b/engines/saga2/panel.cpp
index 4de93deeadb..d560491554d 100644
--- a/engines/saga2/panel.cpp
+++ b/engines/saga2/panel.cpp
@@ -198,27 +198,27 @@ void gPanel::drawTitle(TextPositions placement) {
 		r.width = img->_size.x;
 		r.height = img->_size.y;
 	} else {
-		r.width = TextWidth(mainFont, _title, -1, textStyleUnderBar);
+		r.width = TextWidth(mainFont, _title, -1, kTextStyleUnderBar);
 		r.height = mainFont->height;
 	}
 
 	switch (placement) {
-	case textPosLeft:
+	case kTextPosLeft:
 		r.x -= r.width + 2;
 		r.y += (_extent.height - r.height) / 2 + 1;
 		break;
 
-	case textPosRight:
+	case kTextPosRight:
 		r.x += _extent.width + 3;
 		r.y += (_extent.height - r.height) / 2 + 1;
 		break;
 
-	case textPosHigh:
+	case kTextPosHigh:
 		r.x += (_extent.width - r.width) / 2;
 		r.y -= r.height + 1;
 		break;
 
-	case textPosLow:
+	case kTextPosLow:
 		r.x += (_extent.width - r.width) / 2;
 		r.y += _extent.height + 2;
 		break;
@@ -233,12 +233,12 @@ void gPanel::drawTitle(TextPositions placement) {
 
 	if (_imageLabel) {
 		port.setIndirectColor(kBlackPen);     // pen color black
-		port.setMode(drawModeColor);         // draw as glyph
+		port.setMode(kDrawModeColor);         // draw as glyph
 		port.bltPixels(*img, 0, 0, r.x, r.y, r.width, r.height);
 	} else {
-		port.setMode(drawModeMatte);         // draw as glyph
+		port.setMode(kDrawModeMatte);         // draw as glyph
 		port.setIndirectColor(kBlackPen);     // pen color black
-		port.setStyle(textStyleUnderBar);    // set style to do underbars
+		port.setStyle(kTextStyleUnderBar);    // set style to do underbars
 		port.moveTo(r.x, r.y);           // move to new text pos
 
 		g_vm->_pointer->hide(*globalPort, r);        // hide the pointer
diff --git a/engines/saga2/playmode.cpp b/engines/saga2/playmode.cpp
index b67e5f8784d..d0ba6d8e639 100644
--- a/engines/saga2/playmode.cpp
+++ b/engines/saga2/playmode.cpp
@@ -316,7 +316,7 @@ void drawCompressedImage(gPort &port, const Point16 pos, void *image) {
 	} else
 		map._data = (uint8 *)hdr->data;
 
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 
 	port.bltPixels(map, 0, 0,
 	               pos.x, pos.y,
@@ -348,7 +348,7 @@ void drawCompressedImageGhosted(gPort &port, const Point16 pos, void *image) {
 		for (x = (y & 1); x < map._size.x; x += 2) row[x] = 0;
 	}
 
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 	port.bltPixels(map, 0, 0,
 	               pos.x, pos.y,
 	               map._size.x, map._size.y);
diff --git a/engines/saga2/speech.cpp b/engines/saga2/speech.cpp
index 36d6b1956eb..50145032b9f 100644
--- a/engines/saga2/speech.cpp
+++ b/engines/saga2/speech.cpp
@@ -293,11 +293,11 @@ bool Speech::setupActive() {
 //		throw gError( "Could Not Set Talk Animation");
 
 	// Set up temp gport for blitting to bitmap
-	_textPort.setStyle(textStyleThickOutline);    // extra Thick Outline
+	_textPort.setStyle(kTextStyleThickOutline);    // extra Thick Outline
 	_textPort.setOutlineColor(_outlineColor);      // outline black
 	_textPort.setFont(&Amber13Font);              // speech font
 	_textPort.setColor(_penColor);                 // color of letters
-	_textPort.setMode(drawModeMatte);             // insure transparency
+	_textPort.setMode(kDrawModeMatte);             // insure transparency
 
 	setWidth();
 
@@ -494,7 +494,7 @@ bool Speech::displayText() {
 		return false;
 
 	//  Blit to the port
-	g_vm->_backPort.setMode(drawModeMatte);
+	g_vm->_backPort.setMode(kDrawModeMatte);
 	g_vm->_backPort.bltPixels(_speechImage,
 	                   0, 0,
 	                   p.x + fineScroll.x,
diff --git a/engines/saga2/sprite.cpp b/engines/saga2/sprite.cpp
index a421f27c967..5813c4ade06 100644
--- a/engines/saga2/sprite.cpp
+++ b/engines/saga2/sprite.cpp
@@ -332,7 +332,7 @@ void DrawSprite(
 	unpackSprite(&sprMap, sp->data, sp->dataSize);
 
 	//  Blit to the port
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 	port.bltPixels(sprMap,
 	               0, 0,
 	               destPoint.x + sp->offset.x,
@@ -372,7 +372,7 @@ void DrawColorMappedSprite(
 	    colorTable);
 
 	//  Blit to the port
-	port.setMode(drawModeMatte);
+	port.setMode(kDrawModeMatte);
 	port.bltPixels(sprReMap,
 	               0, 0,
 	               destPoint.x + sp->offset.x,
diff --git a/engines/saga2/uidialog.cpp b/engines/saga2/uidialog.cpp
index b1e6e373c7a..ba1c4c406ea 100644
--- a/engines/saga2/uidialog.cpp
+++ b/engines/saga2/uidialog.cpp
@@ -893,7 +893,7 @@ int16 OptionsDialog(bool disableSaveResume) {
 	                         textStrings[0], &Plate18Font, 0, pal, 0, nullptr);
 
 	for (int i = 1; i < kNumOptionsTexts; i++) {
-		new CPlaqText(*win, *optionsTextRects[i], textStrings[i], &SmallFont, textPosLeft, pal, 0, nullptr);
+		new CPlaqText(*win, *optionsTextRects[i], textStrings[i], &SmallFont, kTextPosLeft, pal, 0, nullptr);
 	}
 
 	win->setDecorations(optionsDecorations,
diff --git a/engines/saga2/vbacksav.cpp b/engines/saga2/vbacksav.cpp
index 89d222b8091..3196ab0fc36 100644
--- a/engines/saga2/vbacksav.cpp
+++ b/engines/saga2/vbacksav.cpp
@@ -45,7 +45,7 @@ gBackSave::gBackSave(const Rect16 &extent) {
 	//  Initialize the graphics port
 
 	setMap(&_savedPixels);
-	setMode(drawModeReplace);
+	setMode(kDrawModeReplace);
 
 	_saved = false;
 }
diff --git a/engines/saga2/vwdraw.cpp b/engines/saga2/vwdraw.cpp
index 1695fb79b06..0d118505434 100644
--- a/engines/saga2/vwdraw.cpp
+++ b/engines/saga2/vwdraw.cpp
@@ -41,7 +41,7 @@ void gDisplayPort::fillRect(const Rect16 r) {
 	sect.y += _origin.y;
 
 	if (!sect.empty()) {                    // if result is non-empty
-		if (_drawMode == drawModeComplement) // Complement drawing mode
+		if (_drawMode == kDrawModeComplement) // Complement drawing mode
 			_protoPage.invertRect(sect, _fgPen);
 		else
 			_protoPage.fillRect(sect, _fgPen);     // regular drawing mode
@@ -76,16 +76,16 @@ void gDisplayPort::bltPixels(
 		sect.y += _origin.y;
 
 		switch (_drawMode) {
-		case drawModeMatte:                     // use transparency
+		case kDrawModeMatte:                     // use transparency
 			_protoPage.writeTransPixels(sect, src_line, src._size.x);
 			break;
-		case drawModeReplace:                   // don't use transparency
+		case kDrawModeReplace:                   // don't use transparency
 			_protoPage.writePixels(sect, src_line, src._size.x);
 			break;
-		case drawModeColor:                     // solid color, use transparency
+		case kDrawModeColor:                     // solid color, use transparency
 			_protoPage.writeColorPixels(sect, src_line, src._size.x, _fgPen);
 			break;
-		case drawModeComplement:                // blit in complement mode
+		case kDrawModeComplement:                // blit in complement mode
 			_protoPage.writeComplementPixels(sect, src_line, src._size.x, _fgPen);
 			break;
 		default:
@@ -246,7 +246,7 @@ void gDisplayPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 		bank = offset >> 16;
 
 		_protoPage.setWriteBank(bank);
-		if (drawMode == drawModeComplement) _protoPage.setReadBank(bank);
+		if (drawMode == kDrawModeComplement) _protoPage.setReadBank(bank);
 		offset &= 0x0000ffff;
 
 		if (xAbs > yAbs) {
@@ -256,7 +256,7 @@ void gDisplayPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 					break;
 				}
 
-				if (drawMode == drawModeComplement) {
+				if (drawMode == kDrawModeComplement) {
 					svgaWriteAddr[offset]
 					    = svgaReadAddr[offset] ^ _fgPen;
 				} else svgaWriteAddr[offset] = _fgPen;
@@ -274,12 +274,12 @@ void gDisplayPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 				if (offset >= cBytesPerBank) {
 					offset -= cBytesPerBank;
 					_protoPage.setWriteBank(++bank);
-					if (drawMode == drawModeComplement)
+					if (drawMode == kDrawModeComplement)
 						_protoPage.setReadBank(bank);
 				} else if (offset < 0) {
 					offset += cBytesPerBank;
 					_protoPage.setWriteBank(--bank);
-					if (drawMode == drawModeComplement)
+					if (drawMode == kDrawModeComplement)
 						_protoPage.setReadBank(bank);
 				}
 			}
@@ -290,7 +290,7 @@ void gDisplayPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 					break;
 				}
 
-				if (drawMode == drawModeComplement) {
+				if (drawMode == kDrawModeComplement) {
 					svgaWriteAddr[offset]
 					    = svgaReadAddr[offset] ^ _fgPen;
 				} else svgaWriteAddr[offset] = _fgPen;
@@ -308,12 +308,12 @@ void gDisplayPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 				if (offset >= cBytesPerBank) {
 					offset -= cBytesPerBank;
 					_protoPage.setWriteBank(++bank);
-					if (drawMode == drawModeComplement)
+					if (drawMode == kDrawModeComplement)
 						_protoPage.setReadBank(bank);
 				} else if (offset < 0) {
 					offset += cBytesPerBank;
 					_protoPage.setWriteBank(--bank);
-					if (drawMode == drawModeComplement)
+					if (drawMode == kDrawModeComplement)
 						_protoPage.setReadBank(bank);
 				}
 			}
@@ -324,14 +324,14 @@ void gDisplayPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 		bank = offset >> 16;
 
 		_protoPage.setWriteBank(bank);
-		if (drawMode == drawModeComplement) _protoPage.setReadBank(bank);
+		if (drawMode == kDrawModeComplement) _protoPage.setReadBank(bank);
 		offset &= 0x0000ffff;
 
 		if (xAbs > yAbs) {
 			errTerm = yAbs - (xAbs >> 1);
 
 			for (i = xAbs + 1; i > 0; i--) {
-				if (drawMode == drawModeComplement) {
+				if (drawMode == kDrawModeComplement) {
 					svgaWriteAddr[offset]
 					    = svgaReadAddr[offset] ^ _fgPen;
 				} else svgaWriteAddr[offset] = _fgPen;
@@ -349,12 +349,12 @@ void gDisplayPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 				if (offset >= cBytesPerBank) {
 					offset -= cBytesPerBank;
 					_protoPage.setWriteBank(++bank);
-					if (drawMode == drawModeComplement)
+					if (drawMode == kDrawModeComplement)
 						_protoPage.setReadBank(bank);
 				} else if (offset < 0) {
 					offset += cBytesPerBank;
 					_protoPage.setWriteBank(--bank);
-					if (drawMode == drawModeComplement)
+					if (drawMode == kDrawModeComplement)
 						_protoPage.setReadBank(bank);
 				}
 			}
@@ -362,7 +362,7 @@ void gDisplayPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 			errTerm = xAbs - (yAbs >> 1);
 
 			for (i = yAbs + 1; i > 0; i--) {
-				if (drawMode == drawModeComplement) {
+				if (drawMode == kDrawModeComplement) {
 					svgaWriteAddr[offset]
 					    = svgaReadAddr[offset] ^ _fgPen;
 				} else svgaWriteAddr[offset] = _fgPen;
@@ -380,12 +380,12 @@ void gDisplayPort::line(int16 x1, int16 y1, int16 x2, int16 y2) {
 				if (offset >= cBytesPerBank) {
 					offset -= cBytesPerBank;
 					_protoPage.setWriteBank(++bank);
-					if (drawMode == drawModeComplement)
+					if (drawMode == kDrawModeComplement)
 						_protoPage.setReadBank(bank);
 				} else if (offset < 0) {
 					offset += cBytesPerBank;
 					_protoPage.setWriteBank(--bank);
-					if (drawMode == drawModeComplement)
+					if (drawMode == kDrawModeComplement)
 						_protoPage.setReadBank(bank);
 				}
 			}


Commit: a748812220e5cdd453744adce8a947f39ff5cd4e
    https://github.com/scummvm/scummvm/commit/a748812220e5cdd453744adce8a947f39ff5cd4e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-28T23:52:24+02:00

Commit Message:
SAGA2: Rename enums in grabinfo.h

Changed paths:
    engines/saga2/contain.cpp
    engines/saga2/display.cpp
    engines/saga2/floating.cpp
    engines/saga2/grabinfo.cpp
    engines/saga2/grabinfo.h
    engines/saga2/intrface.cpp
    engines/saga2/modal.cpp
    engines/saga2/objproto.cpp
    engines/saga2/playmode.cpp
    engines/saga2/speech.cpp
    engines/saga2/tilemode.cpp


diff --git a/engines/saga2/contain.cpp b/engines/saga2/contain.cpp
index 25dd959a573..875335c904a 100644
--- a/engines/saga2/contain.cpp
+++ b/engines/saga2/contain.cpp
@@ -578,7 +578,7 @@ bool ContainerView::pointerHit(gPanelMessage &msg) {
 		if (mouseObject != nullptr) {
 			g_vm->_cnm->_alreadyDone = true;    // if object then no doubleClick
 
-			if (g_vm->_mouseInfo->getIntent() == GrabInfo::Drop) {
+			if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntDrop) {
 				if (mouseSet & ProtoObj::isTangible) {
 					dropPhysical(msg, mouseObject, slotObject, g_vm->_mouseInfo->getMoveCount());
 				}
@@ -593,7 +593,7 @@ bool ContainerView::pointerHit(gPanelMessage &msg) {
 					// !!!! bad state, reset cursor
 					g_vm->_mouseInfo->replaceObject();
 				}
-			} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::Use) {
+			} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntUse) {
 				if (mouseSet & ProtoObj::isTangible) {
 					usePhysical(msg, mouseObject, slotObject);
 				} else if ((mouseSet & ProtoObj::isSpell) ||
diff --git a/engines/saga2/display.cpp b/engines/saga2/display.cpp
index 60861f13a14..05b3c636525 100644
--- a/engines/saga2/display.cpp
+++ b/engines/saga2/display.cpp
@@ -109,7 +109,7 @@ void niceScreenStartup() {
 	g_vm->_mouseInfo->replaceObject();
 	g_vm->_mouseInfo->clearGauge();
 	g_vm->_mouseInfo->setText(nullptr);
-	g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+	g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 	resetInputDevices();
 }
 
diff --git a/engines/saga2/floating.cpp b/engines/saga2/floating.cpp
index 1f4603ecb94..c546f24d26f 100644
--- a/engines/saga2/floating.cpp
+++ b/engines/saga2/floating.cpp
@@ -592,7 +592,7 @@ bool FloatingWindow::open() {
 	g_vm->_mouseInfo->replaceObject();
 	g_vm->_mouseInfo->clearGauge();
 	g_vm->_mouseInfo->setText(nullptr);
-	g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+	g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 
 	return gWindow::open();
 }
diff --git a/engines/saga2/grabinfo.cpp b/engines/saga2/grabinfo.cpp
index 9d262a4ca0d..808a3a9ebce 100644
--- a/engines/saga2/grabinfo.cpp
+++ b/engines/saga2/grabinfo.cpp
@@ -46,7 +46,7 @@ GrabInfo::GrabInfo() {
 	_grabId      = Nothing;
 	_grabObj     = nullptr;
 	_intentDoable = true;
-	_intention   = WalkTo;
+	_intention   = kIntWalkTo;
 
 	_textBuf[0] = '\0';
 	_displayGauge = false;
@@ -81,7 +81,7 @@ void GrabInfo::grabObject(ObjectID objid,  Intent in, int16 count) {
 
 //	Make the object pointer into the mouse pointer
 void GrabInfo::grabObject(GameObject *obj,  Intent in, int16 count) {
-	char        objText[bufSize];
+	char        objText[kBufSize];
 
 	assert(!obj->isMoving());
 
@@ -105,7 +105,7 @@ void GrabInfo::grabObject(GameObject *obj,  Intent in, int16 count) {
 	setIntent(in);
 
 	//  Display the name of the grabbed object under the mouse cursor
-	_grabObj->objCursorText(objText, bufSize, _moveCount);
+	_grabObj->objCursorText(objText, kBufSize, _moveCount);
 	setMouseText(objText);
 
 	clearMouseGauge();
@@ -126,7 +126,7 @@ void GrabInfo::copyObject(ObjectID objid,  Intent in, int16 count) {
 //  it does not actually copy it
 //	Make the object pointer into the mouse pointer
 void GrabInfo::copyObject(GameObject *obj,  Intent in, int16 count) {
-	char        objText[bufSize];
+	char        objText[kBufSize];
 
 	// set the number of items
 	setMoveCount(count);
@@ -145,7 +145,7 @@ void GrabInfo::copyObject(GameObject *obj,  Intent in, int16 count) {
 	setIntent(in);
 
 	//  Display the name of the grabbed object under the mouse cursor
-	_grabObj->objCursorText(objText, bufSize, _moveCount);
+	_grabObj->objCursorText(objText, kBufSize, _moveCount);
 	setMouseText(objText);
 
 	clearMouseGauge();
@@ -157,9 +157,9 @@ uint8 GrabInfo::setIntent(uint8 in) {
 	//  If intention isn't being changed, return immediately
 	if (_intention != (Intent)in) {
 		//  Intention has changed to None
-		if (in == (uint8)None && _intention != None) g_vm->_pointer->hide();
+		if (in == (uint8)kIntNone && _intention != kIntNone) g_vm->_pointer->hide();
 		//  Intention has changed from None
-		else if (in != (uint8)None && _intention == None) g_vm->_pointer->show();
+		else if (in != (uint8)kIntNone && _intention == kIntNone) g_vm->_pointer->show();
 
 		_intention = (Intent)in;
 		//  Set new cursor
@@ -229,29 +229,29 @@ void GrabInfo::clearIcon() {
 void GrabInfo::setCursor() {
 	if (_intentDoable) {
 		switch (_intention) {
-		case None:
+		case kIntNone:
 			//  If _intention has been changed to none then the
 			//  pointer has already been hidden.
 			break;
-		case WalkTo:
+		case kIntWalkTo:
 			setMouseImage(kMouseArrowImage, 0, 0);
 			break;
-		case Open:
+		case kIntOpen:
 			setMouseImage(kMouseArrowImage, 0, 0);
 			break;
-		case PickUp:
+		case kIntPickUp:
 			setMouseImage(kMouseGrabPtrImage, -7, -7);
 			break;
-		case Drop:
+		case kIntDrop:
 			setMouseImage(_pointerMap, _pointerOffset.x, _pointerOffset.y);
 			break;
-		case Use:
+		case kIntUse:
 			setMouseImage(kMouseUsePtrImage, -7, -7);
 			break;
-		case Attack:
+		case kIntAttack:
 			setMouseImage(kMouseAttakPtrImage, -11, -11);
 			break;
-		case Cast:
+		case kIntCast:
 			setMouseImage(kMouseAttakPtrImage, -11, -11);
 			break;
 		default:
@@ -270,7 +270,7 @@ void GrabInfo::placeObject(const Location &loc) {
 	_grabObj    = nullptr;
 	_grabId     = Nothing;
 	_intentDoable = true;
-	setIntent(WalkTo);
+	setIntent(kIntWalkTo);
 	clearIcon();
 
 	//  Display the saved text
@@ -305,7 +305,7 @@ void GrabInfo::replaceObject() {
 	_grabObj    = nullptr;
 	_grabId     = Nothing;
 	_intentDoable = true;
-	setIntent(WalkTo);
+	setIntent(kIntWalkTo);
 	clearIcon();
 
 	//  Display the saved text
@@ -324,7 +324,7 @@ void GrabInfo::replaceObject() {
 //  text pointer will simply be saved.
 void GrabInfo::setText(const char *txt) {
 	if ((txt != nullptr) && strlen(txt)) {
-		Common::strlcpy(_textBuf, txt, bufSize);
+		Common::strlcpy(_textBuf, txt, kBufSize);
 		if (_grabObj == nullptr)
 			setMouseText(_textBuf);
 	} else {
diff --git a/engines/saga2/grabinfo.h b/engines/saga2/grabinfo.h
index e11d436507e..b2b8ee9dbf6 100644
--- a/engines/saga2/grabinfo.h
+++ b/engines/saga2/grabinfo.h
@@ -37,22 +37,22 @@ class GrabInfo {
 public:
 
 	enum Intent {
-		None,
-		WalkTo,
-		PickUp,
-		Open,
-		Drop,
-		Use,
-		Attack,
-		Cast,               // for spells
-
-		IntentCounts        // dummy to count enum
+		kIntNone,
+		kIntWalkTo,
+		kIntPickUp,
+		kIntOpen,
+		kIntDrop,
+		kIntUse,
+		kIntAttack,
+		kIntCast,               // for spells
+
+		kIntIntentCounts        // dummy to count enum
 	};
 
 private:
 
 	enum {
-		bufSize = 60
+		kBufSize = 60
 	};
 
 protected:
@@ -75,7 +75,7 @@ protected:
 
 	int16       _moveCount;              // number of items being moved in cursor
 
-	char        _textBuf[bufSize];
+	char        _textBuf[kBufSize];
 
 	// internal grab commonality
 	void setIcon();
@@ -100,11 +100,11 @@ public:
 	}
 
 	// put object into mouse ptr
-	void    grabObject(ObjectID objid,  Intent in = Drop, int16 count = 1);
-	void    grabObject(GameObject *obj, Intent in = Drop, int16 count = 1);
+	void    grabObject(ObjectID objid,  Intent in = kIntDrop, int16 count = 1);
+	void    grabObject(GameObject *obj, Intent in = kIntDrop, int16 count = 1);
 
-	void    copyObject(ObjectID objid,  Intent in = Drop, int16 count = 1);
-	void    copyObject(GameObject *obj, Intent in = Drop, int16 count = 1);
+	void    copyObject(ObjectID objid,  Intent in = kIntDrop, int16 count = 1);
+	void    copyObject(GameObject *obj, Intent in = kIntDrop, int16 count = 1);
 
 	// non-destructive reads of the state
 	uint8       getIntent()       {
diff --git a/engines/saga2/intrface.cpp b/engines/saga2/intrface.cpp
index 34dc2e98ab0..4d4317b5444 100644
--- a/engines/saga2/intrface.cpp
+++ b/engines/saga2/intrface.cpp
@@ -2082,7 +2082,7 @@ APPFUNC(cmdPortrait) {
 				int16   intent = g_vm->_mouseInfo->getIntent();
 
 				g_vm->_mouseInfo->replaceObject();
-				if (intent == GrabInfo::Use) {
+				if (intent == GrabInfo::kIntUse) {
 					//  If we are using an intangible object (spell) then consider
 					//  the owner of the spell to be the center actor for the rest
 					//  of this action.
@@ -2098,7 +2098,7 @@ APPFUNC(cmdPortrait) {
 					    *centerActorPtr,
 					    *mouseObject,
 					    *pa->getActor());
-				} else if (intent == GrabInfo::Drop) {
+				} else if (intent == GrabInfo::kIntDrop) {
 					MotionTask::dropObjectOnObject(
 					    *centerActorPtr,
 					    *mouseObject,
@@ -2108,7 +2108,7 @@ APPFUNC(cmdPortrait) {
 
 //				( ( gGenericControl * )ev.panel )->disableDblClick();
 				//  clickActionDone = true;
-			} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::Use) {
+			} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntUse) {
 				g_vm->_mouseInfo->replaceObject();
 //				clickActionDone = true;
 			}
diff --git a/engines/saga2/modal.cpp b/engines/saga2/modal.cpp
index 557965c4787..c2dde9491b0 100644
--- a/engines/saga2/modal.cpp
+++ b/engines/saga2/modal.cpp
@@ -79,7 +79,7 @@ bool ModalWindow::open() {
 	g_vm->_mouseInfo->replaceObject();
 	g_vm->_mouseInfo->clearGauge();
 	g_vm->_mouseInfo->setText(nullptr);
-	g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+	g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 
 	_prevModeStackCtr = GameMode::getStack(_prevModeStackPtr);
 
diff --git a/engines/saga2/objproto.cpp b/engines/saga2/objproto.cpp
index 16b723fe587..25fe9e78b08 100644
--- a/engines/saga2/objproto.cpp
+++ b/engines/saga2/objproto.cpp
@@ -1008,7 +1008,7 @@ uint16 InventoryProto::containmentSet() {
 }
 
 bool InventoryProto::takeAction(ObjectID dObj, ObjectID enactor, int16 num) {
-	g_vm->_mouseInfo->copyObject(dObj, GrabInfo::Drop, num);
+	g_vm->_mouseInfo->copyObject(dObj, GrabInfo::kIntDrop, num);
 	return true;
 }
 
@@ -1431,7 +1431,7 @@ uint16 PhysicalContainerProto::bulkCapacity(GameObject *) {
 //  Put key into mouse with intention to use
 bool KeyProto::setUseCursor(ObjectID dObj) {
 	assert(g_vm->_mouseInfo->getObjectId() == Nothing);
-	g_vm->_mouseInfo->copyObject(GameObject::objectAddress(dObj), GrabInfo::Use);
+	g_vm->_mouseInfo->copyObject(GameObject::objectAddress(dObj), GrabInfo::kIntUse);
 	return true;
 }
 
@@ -2404,7 +2404,7 @@ uint8 ShieldProto::getDamageSound(const ObjectSoundFXs &soundFXs) {
 //  Put tool into mouse with intention to use
 bool ToolProto::setUseCursor(ObjectID dObj) {
 	assert(g_vm->_mouseInfo->getObjectId() == Nothing);
-	g_vm->_mouseInfo->copyObject(GameObject::objectAddress(dObj), GrabInfo::Use);
+	g_vm->_mouseInfo->copyObject(GameObject::objectAddress(dObj), GrabInfo::kIntUse);
 	return true;
 }
 
@@ -2633,7 +2633,7 @@ bool SkillProto::useAction(ObjectID dObj, ObjectID enactor) {
 		Actor   *attackerPtr = (Actor *) GameObject::objectAddress(enactor);
 		return castUntargetedSpell(attackerPtr, this);
 	}
-	g_vm->_mouseInfo->copyObject(dObj, GrabInfo::Use);
+	g_vm->_mouseInfo->copyObject(dObj, GrabInfo::kIntUse);
 	return true;
 }
 
diff --git a/engines/saga2/playmode.cpp b/engines/saga2/playmode.cpp
index d0ba6d8e639..1d608948034 100644
--- a/engines/saga2/playmode.cpp
+++ b/engines/saga2/playmode.cpp
@@ -226,7 +226,7 @@ void PlayModeSetup() {
 
 	//  Set up mouse cursor
 	g_vm->_mouseInfo = new GrabInfo;
-	g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+	g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 
 	//  Start by displaying first frame stright off, no delay
 	frameAlarm.set(0);
diff --git a/engines/saga2/speech.cpp b/engines/saga2/speech.cpp
index 50145032b9f..6f38d90fbdf 100644
--- a/engines/saga2/speech.cpp
+++ b/engines/saga2/speech.cpp
@@ -397,7 +397,7 @@ bool Speech::setupActive() {
 
 	if (speechButtonCount > 0) {
 		//  REM: Also set pointer to arrow shape.
-		g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+		g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 		speakButtonControls->enable(true);
 
 		speechList.SetLock(false);
diff --git a/engines/saga2/tilemode.cpp b/engines/saga2/tilemode.cpp
index 27ed752638a..7baf4e2b44a 100644
--- a/engines/saga2/tilemode.cpp
+++ b/engines/saga2/tilemode.cpp
@@ -413,7 +413,7 @@ static void evalMouseState() {
 		//  on whether the mouse is pointing at another object
 		//  and if so, whether the other object is within the
 		//  use range of the center actor
-		if (g_vm->_mouseInfo->getIntent() == GrabInfo::Use) {
+		if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntUse) {
 			assert(obj != nullptr);
 
 			if (mObj->containmentSet() & (ProtoObj::isSkill | ProtoObj::isSpell)) {
@@ -457,9 +457,9 @@ static void evalMouseState() {
 					if (a->inAttackRange(obj->getLocation())
 					        && (a->inRange(obj->getLocation(), 8)
 					            ||  lineOfSight(a, obj, terrainTransparent)))
-						g_vm->_mouseInfo->setIntent(GrabInfo::Attack);
+						g_vm->_mouseInfo->setIntent(GrabInfo::kIntAttack);
 					else {
-						g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+						g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 						walkToPos.set(obj->getLocation().u,
 						              obj->getLocation().v,
 						              obj->getLocation().z);
@@ -472,7 +472,7 @@ static void evalMouseState() {
 					//  finished can initiate a new action, if so, set
 					//  the intention to walk to the mouse pointer
 					if (interruptable) {
-						g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+						g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 						if (tileMapControl->isSticky())
 							setMouseImage(kMouseAutoWalkImage, -8, -8);
 						walkToPos = tilePickPos;
@@ -483,7 +483,7 @@ static void evalMouseState() {
 			{
 				//  Set the intention to walk to the mouse
 				//  pointer
-				g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+				g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 				if (tileMapControl->isSticky())
 					setMouseImage(kMouseAutoWalkImage, -8, -8);
 				walkToPos = tilePickPos;
@@ -503,10 +503,10 @@ static void evalMouseState() {
 					if (a->inAttackRange(obj->getLocation())
 					        && (a->inRange(obj->getLocation(), 8)
 					            ||  lineOfSight(a, obj, terrainTransparent))) {
-						g_vm->_mouseInfo->setIntent(GrabInfo::Attack);
+						g_vm->_mouseInfo->setIntent(GrabInfo::kIntAttack);
 						g_vm->_mouseInfo->setDoable(true);
 					} else {
-						g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+						g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 						walkToPos.set(obj->getLocation().u,
 						              obj->getLocation().v,
 						              obj->getLocation().z);
@@ -522,15 +522,15 @@ static void evalMouseState() {
 
 						g_vm->_mouseInfo->setIntent(
 						    !a->isDead()
-						    ?   GrabInfo::WalkTo
-						    :   GrabInfo::Open);
+						    ?   GrabInfo::kIntWalkTo
+						    :   GrabInfo::kIntOpen);
 						walkToPos.set(obj->getLocation().u,
 						              obj->getLocation().v,
 						              obj->getLocation().z);
 					} else {
 						g_vm->_mouseInfo->setIntent(obj->isCarryable()
-						                    ? GrabInfo::PickUp
-						                    : GrabInfo::Open);
+						                    ? GrabInfo::kIntPickUp
+						                    : GrabInfo::kIntOpen);
 						g_vm->_mouseInfo->setDoable(
 						    interruptable
 						    &&  a->inReach(obj->getLocation())
@@ -543,7 +543,7 @@ static void evalMouseState() {
 			{
 				//  Simply set the intention to walk to the mouse
 				//  pointer
-				g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+				g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 				if (tileMapControl->isSticky())
 					setMouseImage(kMouseAutoWalkImage, -8, -8);
 				walkToPos = tilePickPos;
@@ -559,7 +559,7 @@ static void evalMouseState() {
 		//  Since the mouse is being dragged, initiate
 		//  the effects of the mouse drag
 
-		if (g_vm->_mouseInfo->getIntent() == GrabInfo::WalkTo) {
+		if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntWalkTo) {
 			if (g_vm->_mouseInfo->getDoable()
 			        &&  !navigationDelayed) {
 				MotionTask  *mt = a->_moveTask;
@@ -573,7 +573,7 @@ static void evalMouseState() {
 					updateAlarm.set(ticksPerSecond / 2);
 				}
 			}
-		} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::Attack) {
+		} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntAttack) {
 			if (g_vm->_mouseInfo->getDoable())
 				a->attack(GameObject::objectAddress(pickedObject));
 		}
@@ -1034,7 +1034,7 @@ static APPFUNC(cmdClickTileMap) {
 			mousePressed = false;
 
 			if (g_vm->_mouseInfo->getObject() == nullptr)
-				g_vm->_mouseInfo->setIntent(GrabInfo::WalkTo);
+				g_vm->_mouseInfo->setIntent(GrabInfo::kIntWalkTo);
 			g_vm->_mouseInfo->setDoable(true);
 
 			//  Remove any mouse text
@@ -1077,12 +1077,12 @@ static APPFUNC(cmdClickTileMap) {
 						int16   intent = g_vm->_mouseInfo->getIntent();
 
 						g_vm->_mouseInfo->replaceObject();
-						if (intent == GrabInfo::Use) {
+						if (intent == GrabInfo::kIntUse) {
 							MotionTask::useObjectOnObject(
 							    *centerActorPtr,
 							    *mouseObject,
 							    *GameObject::objectAddress(pickedObject));
-						} else if (intent == GrabInfo::Drop) {
+						} else if (intent == GrabInfo::kIntDrop) {
 							MotionTask::dropObjectOnObject(
 							    *centerActorPtr,
 							    *mouseObject,
@@ -1092,7 +1092,7 @@ static APPFUNC(cmdClickTileMap) {
 
 						((gGenericControl *)ev.panel)->disableDblClick();
 						clickActionDone = true;
-					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::Use) {
+					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntUse) {
 						g_vm->_mouseInfo->replaceObject();
 						clickActionDone = true;
 					}
@@ -1100,12 +1100,12 @@ static APPFUNC(cmdClickTileMap) {
 					//  we dropped the object onto active terrain
 
 					if (g_vm->_mouseInfo->getDoable()) {
-						if (g_vm->_mouseInfo->getIntent() == GrabInfo::Drop
-						        ||  g_vm->_mouseInfo->getIntent() == GrabInfo::Use) {
+						if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntDrop
+						        ||  g_vm->_mouseInfo->getIntent() == GrabInfo::kIntUse) {
 							int16   intent = g_vm->_mouseInfo->getIntent();
 
 							g_vm->_mouseInfo->replaceObject();
-							if (intent == GrabInfo::Drop) {
+							if (intent == GrabInfo::kIntDrop) {
 								MotionTask::dropObjectOnTAI(
 								    *centerActorPtr,
 								    *mouseObject,
@@ -1131,14 +1131,14 @@ static APPFUNC(cmdClickTileMap) {
 							((gGenericControl *)ev.panel)->disableDblClick();
 							clickActionDone = true;
 						}
-					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::Use) {
+					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntUse) {
 						g_vm->_mouseInfo->replaceObject();
 						clickActionDone = true;
 					}
 				} else if (pickedObject == Nothing) {
 					//  we dropped the object on the ground
 
-					if (g_vm->_mouseInfo->getIntent() == GrabInfo::Drop
+					if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntDrop
 					        &&  g_vm->_mouseInfo->getDoable()) {
 						g_vm->_mouseInfo->replaceObject();
 						MotionTask::dropObject(
@@ -1148,7 +1148,7 @@ static APPFUNC(cmdClickTileMap) {
 						    g_vm->_mouseInfo->getMoveCount());
 						((gGenericControl *)ev.panel)->disableDblClick();
 						clickActionDone = true;
-					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::Use
+					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntUse
 					           &&  g_vm->_mouseInfo->getDoable()) {
 						// New for spells - this enables objects to be used on a
 						//   general location (for area spells etc)
@@ -1158,7 +1158,7 @@ static APPFUNC(cmdClickTileMap) {
 						    *mouseObject,
 						    Location(tilePickPos, currentWorld->thisID()));
 						clickActionDone = true;
-					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::Use) {
+					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntUse) {
 						g_vm->_mouseInfo->replaceObject();
 						clickActionDone = true;
 					}
@@ -1172,8 +1172,8 @@ static APPFUNC(cmdClickTileMap) {
 					if (actorIDToPlayerID(pickedObject, pID) && !isBrotherDead(pID)) {
 						setCenterBrother(pID);
 						clickActionDone = true;
-					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::PickUp
-					           ||  g_vm->_mouseInfo->getIntent() == GrabInfo::Open) {
+					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntPickUp
+					           ||  g_vm->_mouseInfo->getIntent() == GrabInfo::kIntOpen) {
 						GameObject  *pickedObjPtr =
 						    GameObject::objectAddress(pickedObject);
 						int16       quantity = 1;
@@ -1187,7 +1187,7 @@ static APPFUNC(cmdClickTileMap) {
 
 						if (pickedObjPtr->take(centerActorID, quantity))
 							clickActionDone = true;
-					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::Attack) {
+					} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntAttack) {
 						centerActorPtr->attack(
 						    GameObject::objectAddress(pickedObject));
 						((gGenericControl *)ev.panel)->disableDblClick();
@@ -1197,7 +1197,7 @@ static APPFUNC(cmdClickTileMap) {
 			//  We're not pointing at an object and the mouse cursor
 			//  does not have an object
 			else {
-				if (g_vm->_mouseInfo->getIntent() == GrabInfo::WalkTo
+				if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntWalkTo
 				        &&  g_vm->_mouseInfo->getDoable()) {
 					if (pickedTAI == nullptr) {
 						navigateDirect(walkToPos, false);
@@ -1222,7 +1222,7 @@ static APPFUNC(cmdClickTileMap) {
 			dblClick = false;
 		else {
 			if (pathFindAlarm.check()) { // mouse click was too long for path find
-				if (g_vm->_mouseInfo->getIntent() == GrabInfo::WalkTo) {
+				if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntWalkTo) {
 					Actor   *a = getCenterActor();
 
 					if (a->_moveTask && a->_moveTask->isWalk())
@@ -1266,8 +1266,8 @@ static APPFUNC(cmdClickTileMap) {
 					ActorProto  *proto = (ActorProto *)obj->proto();
 
 					proto->greetActor(pickedObject, getCenterActorID());
-				} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::PickUp
-				           ||  g_vm->_mouseInfo->getIntent() == GrabInfo::Open
+				} else if (g_vm->_mouseInfo->getIntent() == GrabInfo::kIntPickUp
+				           ||  g_vm->_mouseInfo->getIntent() == GrabInfo::kIntOpen
 				           || (isActor(pickedObject) && ((Actor *)obj)->isDead())) {
 					GameObject  *pickedObjPtr =
 					    GameObject::objectAddress(pickedObject);


Commit: 6ddf448fc82cf1302933243edc190d71d75079f4
    https://github.com/scummvm/scummvm/commit/6ddf448fc82cf1302933243edc190d71d75079f4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-28T23:54:31+02:00

Commit Message:
SAGA2: Rename enums in gtextbox.h

Changed paths:
    engines/saga2/gtextbox.cpp
    engines/saga2/gtextbox.h


diff --git a/engines/saga2/gtextbox.cpp b/engines/saga2/gtextbox.cpp
index 8c5117b13c9..6d82ae5ac71 100644
--- a/engines/saga2/gtextbox.cpp
+++ b/engines/saga2/gtextbox.cpp
@@ -120,16 +120,16 @@ extern gFont        *mainFont;
 *       flag        Various flags which control operation of the
 *                   text box:
 *
-*       /i/         textBoxAlignRight causes the text to
+*       /i/         kTextBoxAlignRight causes the text to
 *                   be right-justified within the box.
 *
-*       /i/         textBoxAlignCenter causes the text to be centered within the box.
+*       /i/         kTextBoxAlignCenter causes the text to be centered within the box.
 *
-*       /i/         textBoxNoFilter indicates that non-edit keys
+*       /i/         kTextBoxNoFilter indicates that non-edit keys
 *                   (such as ESC and TAB) should be passed on to the
 *                   application's AppFunc.
 *
-*       /i/         textBoxStayActive tells the text box not to
+*       /i/         kTextBoxStayActive tells the text box not to
 *                   deactivate when the user hits return.
 *
 *       id          A 16-bit Application-specific ID for this panel.
@@ -670,7 +670,7 @@ bool gTextBox::keyStroke(gPanelMessage &msg) {
 	if (key == Common::ASCII_RETURN) { // return key
 		if (_editing) {
 			commitEdit();
-			if (!(_flags & textBoxStayActive))
+			if (!(_flags & kTextBoxStayActive))
 				deactivate();                       // deactivate the text box
 		}
 
@@ -695,7 +695,7 @@ bool gTextBox::keyStroke(gPanelMessage &msg) {
 			(*_onEscape)(ev);
 		}
 
-		if (_flags & textBoxNoFilter)
+		if (_flags & kTextBoxNoFilter)
 			return false;
 		return true;
 	} else if (_editing) {
@@ -776,7 +776,7 @@ bool gTextBox::keyStroke(gPanelMessage &msg) {
 			return false;
 
 		default:
-			if (_flags & textBoxNoFilter)
+			if (_flags & kTextBoxNoFilter)
 				return false;
 
 			if (key >= Common::KEYCODE_SPACE &&     // 32 (First printable character)
diff --git a/engines/saga2/gtextbox.h b/engines/saga2/gtextbox.h
index 2bfb6107a6a..12401ed8097 100644
--- a/engines/saga2/gtextbox.h
+++ b/engines/saga2/gtextbox.h
@@ -30,11 +30,11 @@ namespace Saga2 {
 
 enum textBoxFlags {
 	//  First 4 flags are the TextPositions flags for label placement
-	textBoxAlignRight   = (1 << 4),
-	textBoxAlignCenter  = (1 << 5),
-	textBoxNoFilter     = (1 << 6),     // let non-edit keys come through
-	textBoxStayActive   = (1 << 7),
-	textBoxNoBevel      = (1 << 8)
+	kTextBoxAlignRight   = (1 << 4),
+	kTextBoxAlignCenter  = (1 << 5),
+	kTextBoxNoFilter     = (1 << 6),     // let non-edit keys come through
+	kTextBoxStayActive   = (1 << 7),
+	kTextBoxNoBevel      = (1 << 8)
 };
 
 // edit box defines


Commit: adc959719c3f3ad920fd9cc086f27c4e54a04fa9
    https://github.com/scummvm/scummvm/commit/adc959719c3f3ad920fd9cc086f27c4e54a04fa9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-28T23:58:46+02:00

Commit Message:
SAGA2: Rename enums in idtypes.h

Changed paths:
    engines/saga2/assign.cpp
    engines/saga2/idtypes.h
    engines/saga2/task.cpp
    engines/saga2/task.h


diff --git a/engines/saga2/assign.cpp b/engines/saga2/assign.cpp
index 24bfe2d2076..9b01ef82d8d 100644
--- a/engines/saga2/assign.cpp
+++ b/engines/saga2/assign.cpp
@@ -237,7 +237,8 @@ int16 PatrolRouteAssignment::type() const {
 //	of a task which the assignment had created.
 
 void PatrolRouteAssignment::handleTaskCompletion(TaskResult result) {
-	if (result == taskSucceeded) _flags |= kRouteCompleted;
+	if (result == kTaskSucceeded)
+		_flags |= kRouteCompleted;
 }
 
 //----------------------------------------------------------------------
@@ -246,7 +247,8 @@ void PatrolRouteAssignment::handleTaskCompletion(TaskResult result) {
 bool PatrolRouteAssignment::isValid() {
 	//  If the route has already been completed, then the assignment is
 	//  no longer valid
-	if (_flags & kRouteCompleted) return false;
+	if (_flags & kRouteCompleted)
+		return false;
 
 	return ActorAssignment::isValid();
 }
diff --git a/engines/saga2/idtypes.h b/engines/saga2/idtypes.h
index 332f4382131..3ca045fe9b6 100644
--- a/engines/saga2/idtypes.h
+++ b/engines/saga2/idtypes.h
@@ -196,9 +196,9 @@ extern const StaticActiveItemID NoActiveItem;
 
 //  Task evaluation return types
 enum TaskResult {
-	taskFailed      = -1,   //  Task has ended in failure
-	taskNotDone     =  0,   //  Task has not ended yet
-	taskSucceeded   =  1    //  Task has ended in success
+	kTaskFailed      = -1,   //  Task has ended in failure
+	kTaskNotDone     =  0,   //  Task has not ended yet
+	kTaskSucceeded   =  1    //  Task has ended in success
 };
 
 typedef int16   TaskID;
diff --git a/engines/saga2/task.cpp b/engines/saga2/task.cpp
index 43c85275ae6..06aec511f68 100644
--- a/engines/saga2/task.cpp
+++ b/engines/saga2/task.cpp
@@ -295,7 +295,7 @@ void TaskStackList::updateTaskStacks() {
 			TaskResult  result;
 
 			//  Update the task stack and delete it if it is done
-			if ((result = ts->update()) != taskNotDone) {
+			if ((result = ts->update()) != kTaskNotDone) {
 				Actor *a = ts->getActor();
 				assert(a != nullptr);
 
@@ -827,7 +827,7 @@ void WanderTask::abortTask() {
 
 TaskResult WanderTask::evaluate() {
 	//  Wandering is never done.  It must be stopped manually.
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -863,7 +863,7 @@ TaskResult WanderTask::handleWander() {
 	        ||  !actorMotion->isWander())
 		MotionTask::wander(*_stack->getActor());
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -1042,7 +1042,7 @@ TaskResult TetheredWanderTask::handleWander() {
 		}
 	}
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 /* ===================================================================== *
@@ -1117,10 +1117,10 @@ TaskResult GotoTask::evaluate() {
 	//  Determine if we have reach the target.
 	if (_stack->getActor()->getLocation() == destination()) {
 		abortTask();
-		return taskSucceeded;
+		return kTaskSucceeded;
 	}
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -1129,7 +1129,7 @@ TaskResult GotoTask::update() {
 	//  Check to see if we have reached the target
 	{
 		TaskResult  result = evaluate();
-		if (result != taskNotDone) return result;
+		if (result != kTaskNotDone) return result;
 	}
 
 	Actor *const   a = _stack->getActor();
@@ -1198,10 +1198,10 @@ TaskResult GotoTask::update() {
 			if (_wander != nullptr)  _wander->update();
 		}
 
-		return taskNotDone;
+		return kTaskNotDone;
 	}
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 /* ===================================================================== *
@@ -1711,7 +1711,7 @@ void GoAwayFromTask::abortTask() {
 
 TaskResult GoAwayFromTask::evaluate() {
 	//  Going away is never done, it must be stopped manually
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -1756,7 +1756,7 @@ TaskResult GoAwayFromTask::update() {
 			_goTask->update();
 	}
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 /* ===================================================================== *
@@ -2002,7 +2002,7 @@ TaskResult HuntTask::evaluate() {
 		return atTargetEvaluate();
 	} else
 		//  If we haven't reached the target, we know we're not done
-		return taskNotDone;
+		return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -2010,7 +2010,7 @@ TaskResult HuntTask::evaluate() {
 TaskResult HuntTask::update() {
 	Actor       *a = _stack->getActor();
 
-	if (a->_moveTask && a->_moveTask->isPrivledged()) return taskNotDone;
+	if (a->_moveTask && a->_moveTask->isPrivledged()) return kTaskNotDone;
 
 	//  Reevaluate the target
 	evaluateTarget();
@@ -2056,7 +2056,7 @@ TaskResult HuntTask::update() {
 
 		//  If we're not at the target, we know the hunt task is not
 		//  done
-		return taskNotDone;
+		return kTaskNotDone;
 	}
 }
 
@@ -2237,14 +2237,14 @@ void HuntToBeNearLocationTask::atTargetabortTask() {}
 
 TaskResult HuntToBeNearLocationTask::atTargetEvaluate() {
 	//  If we're at the target, we're done
-	return taskSucceeded;
+	return kTaskSucceeded;
 }
 
 //----------------------------------------------------------------------
 
 TaskResult HuntToBeNearLocationTask::atTargetUpdate() {
 	//  If we're at the target, we're done
-	return taskSucceeded;
+	return kTaskSucceeded;
 }
 
 /* ===================================================================== *
@@ -2446,14 +2446,14 @@ void HuntToBeNearObjectTask::atTargetabortTask() {}
 
 TaskResult HuntToBeNearObjectTask::atTargetEvaluate() {
 	//  If we're at the target, we're done
-	return taskSucceeded;
+	return kTaskSucceeded;
 }
 
 //----------------------------------------------------------------------
 
 TaskResult HuntToBeNearObjectTask::atTargetUpdate() {
 	//  If we're at the target, we're done
-	return taskSucceeded;
+	return kTaskSucceeded;
 }
 
 /* ===================================================================== *
@@ -2575,16 +2575,16 @@ void HuntToPossessTask::atTargetabortTask() {}
 
 TaskResult HuntToPossessTask::atTargetEvaluate() {
 	if (_currentTarget && _stack->getActor()->isContaining(_currentTarget))
-		return taskSucceeded;
+		return kTaskSucceeded;
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
 
 TaskResult HuntToPossessTask::atTargetUpdate() {
 	//  Hunt to possess in not implemented yet
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 /* ===================================================================== *
@@ -2853,7 +2853,7 @@ TaskResult HuntToBeNearActorTask::atTargetEvaluate() {
 
 	//  If we're not TOO close, we're done
 	if (_stack->getActor()->inRange(_targetLoc, tooClose))
-		return taskNotDone;
+		return kTaskNotDone;
 
 	if (_goAway != nullptr) {
 		_goAway->abortTask();
@@ -2861,7 +2861,7 @@ TaskResult HuntToBeNearActorTask::atTargetEvaluate() {
 		_goAway = nullptr;
 	}
 
-	return taskSucceeded;
+	return kTaskSucceeded;
 }
 
 //----------------------------------------------------------------------
@@ -2879,7 +2879,7 @@ TaskResult HuntToBeNearActorTask::atTargetUpdate() {
 		} else
 			_goAway->update();
 
-		return taskNotDone;
+		return kTaskNotDone;
 	}
 
 	//  Delete the go away task if it exists
@@ -2889,7 +2889,7 @@ TaskResult HuntToBeNearActorTask::atTargetUpdate() {
 		_goAway = nullptr;
 	}
 
-	return taskSucceeded;
+	return kTaskSucceeded;
 }
 
 /* ===================================================================== *
@@ -3172,7 +3172,7 @@ void HuntToKillTask::atTargetabortTask() {
 
 TaskResult HuntToKillTask::atTargetEvaluate() {
 	//  This task is never done and must be aborted manually
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -3188,7 +3188,7 @@ TaskResult HuntToKillTask::atTargetUpdate() {
 		_flags |= evalWeapon;
 	}
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -3351,13 +3351,13 @@ void HuntToGiveTask::atTargetabortTask() {}
 //----------------------------------------------------------------------
 
 TaskResult HuntToGiveTask::atTargetEvaluate() {
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
 
 TaskResult HuntToGiveTask::atTargetUpdate() {
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 /* ===================================================================== *
@@ -3631,7 +3631,7 @@ void BandTask::atTargetabortTask() {
 //----------------------------------------------------------------------
 
 TaskResult BandTask::atTargetEvaluate() {
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -3647,7 +3647,7 @@ TaskResult BandTask::atTargetUpdate() {
 			_attend->update();
 	}
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -3872,7 +3872,7 @@ void FollowPatrolRouteTask::abortTask() {
 TaskResult FollowPatrolRouteTask::evaluate() {
 	//  Simply check the patrol iterator to determine if there are
 	//  any more waypoints
-	return *_patrolIter == Nowhere ? taskSucceeded : taskNotDone;
+	return *_patrolIter == Nowhere ? kTaskSucceeded : kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -3900,7 +3900,7 @@ TaskResult FollowPatrolRouteTask::handleFollowPatrolRoute() {
 	TilePoint   currentWayPoint = *_patrolIter,
 	            actorLoc = _stack->getActor()->getLocation();
 
-	if (currentWayPoint == Nowhere) return taskSucceeded;
+	if (currentWayPoint == Nowhere) return kTaskSucceeded;
 
 	//  Determine if the actor has reached the waypoint tile position
 	if ((actorLoc.u >> kTileUVShift)
@@ -3919,18 +3919,18 @@ TaskResult FollowPatrolRouteTask::handleFollowPatrolRoute() {
 		//  return success
 		if (_lastWayPointNum != -1
 		        &&  _patrolIter.wayPointNum() == _lastWayPointNum)
-			return taskSucceeded;
+			return kTaskSucceeded;
 
 		//  If there are no more way points in the patrol route, return
 		//  success
 		if ((currentWayPoint = *++_patrolIter) == Nowhere)
-			return taskSucceeded;
+			return kTaskSucceeded;
 
 		//  We are at a way point so randomly determine if we should
 		//  pause for a while.
 		if (g_vm->_rnd->getRandomNumber(3) == 0) {
 			pause();
-			return taskNotDone;
+			return kTaskNotDone;
 		}
 	}
 
@@ -3943,7 +3943,7 @@ TaskResult FollowPatrolRouteTask::handleFollowPatrolRoute() {
 		if (_gotoWayPoint != nullptr) _gotoWayPoint->update();
 	}
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -3952,7 +3952,7 @@ TaskResult FollowPatrolRouteTask::handleFollowPatrolRoute() {
 TaskResult FollowPatrolRouteTask::handlePaused() {
 	TaskResult      result;
 
-	if ((result = evaluate()) == taskNotDone) {
+	if ((result = evaluate()) == kTaskNotDone) {
 		if (_counter == 0)
 			followPatrolRoute();
 		else
@@ -4029,7 +4029,7 @@ void AttendTask::abortTask() {
 
 TaskResult AttendTask::evaluate() {
 	//  Attending must be stopped manually
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -4045,7 +4045,7 @@ TaskResult AttendTask::update() {
 			MotionTask::turnTowards(*a, _attendLoc);
 	}
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -4137,7 +4137,7 @@ TaskResult TaskStack::evaluate() {
 
 		return stackBottom->evaluate();
 	} else
-		return taskNotDone;
+		return kTaskNotDone;
 }
 
 //----------------------------------------------------------------------
@@ -4148,14 +4148,14 @@ TaskResult TaskStack::update() {
 
 	//  If the actor is currently uniterruptable then this task is _paused
 	if (!_actor->isInterruptable())
-		return taskNotDone;
+		return kTaskNotDone;
 
 	if (_stackBottomID != NoTask) {
 		Task    *stackBottom = getTaskAddress(_stackBottomID);
 
 		//  Determine if it is time to reevaluate the tasks
 		if (--_evalCount == 0) {
-			if ((result = stackBottom->evaluate()) != taskNotDone) {
+			if ((result = stackBottom->evaluate()) != kTaskNotDone) {
 				delete stackBottom;
 				_stackBottomID = NoTask;
 
@@ -4165,16 +4165,16 @@ TaskResult TaskStack::update() {
 		}
 
 		//  Update the tasks
-		if ((result = stackBottom->update()) != taskNotDone) {
+		if ((result = stackBottom->update()) != kTaskNotDone) {
 			delete stackBottom;
 			_stackBottomID = NoTask;
 
 			return result;
 		}
 	} else
-		return taskFailed;
+		return kTaskFailed;
 
-	return taskNotDone;
+	return kTaskNotDone;
 }
 
 } // end of namespace Saga2
diff --git a/engines/saga2/task.h b/engines/saga2/task.h
index 1260cb930b4..5fce350ee94 100644
--- a/engines/saga2/task.h
+++ b/engines/saga2/task.h
@@ -211,7 +211,7 @@ protected:
 
 	//  Update function used while task is paused
 	TaskResult handlePaused() {
-		return taskNotDone;
+		return kTaskNotDone;
 	}
 
 	//  Set this task into the paused state


Commit: d75b2df97797e4517b1ac6dc6403360677c3d8d2
    https://github.com/scummvm/scummvm/commit/d75b2df97797e4517b1ac6dc6403360677c3d8d2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-29T00:01:10+02:00

Commit Message:
SAGA2: Rename enums in input.h

Changed paths:
    engines/saga2/gtextbox.cpp
    engines/saga2/input.h
    engines/saga2/panel.cpp
    engines/saga2/tilemode.cpp


diff --git a/engines/saga2/gtextbox.cpp b/engines/saga2/gtextbox.cpp
index 6d82ae5ac71..0da773a8c2e 100644
--- a/engines/saga2/gtextbox.cpp
+++ b/engines/saga2/gtextbox.cpp
@@ -703,14 +703,14 @@ bool gTextBox::keyStroke(gPanelMessage &msg) {
 		case Common::KEYCODE_LEFT:
 			if (_anchorPos > 0)
 				_anchorPos--;
-			if (!(msg._qualifier & qualifierShift))
+			if (!(msg._qualifier & kQualifierShift))
 				_cursorPos = _anchorPos;
 			break;
 
 		case Common::KEYCODE_RIGHT:
 			if (_anchorPos < _currentLen[_index])
 				_anchorPos++;
-			if (!(msg._qualifier & qualifierShift))
+			if (!(msg._qualifier & kQualifierShift))
 				_cursorPos = _anchorPos;
 			break;
 
@@ -725,7 +725,7 @@ bool gTextBox::keyStroke(gPanelMessage &msg) {
 			break;
 
 		case Common::KEYCODE_z: // Alt-Z
-			if (msg._qualifier & (qualifierControl | qualifierAlt)) {
+			if (msg._qualifier & (kQualifierControl | kQualifierAlt)) {
 				if (_undoBuffer) {
 					_cursorPos = _anchorPos = _currentLen[_index] = _undoLen;
 					memcpy(_fieldStrings[_index], _undoBuffer, _currentLen[_index] + 1);
diff --git a/engines/saga2/input.h b/engines/saga2/input.h
index 454739a233c..3e30e304850 100644
--- a/engines/saga2/input.h
+++ b/engines/saga2/input.h
@@ -31,12 +31,12 @@
 namespace Saga2 {
 
 enum keyQualifiers {
-	qualifierShift  = (1 << 0),
-	qualifierControl = (1 << 1),
-	qualifierAlt    = (1 << 2),
+	kQualifierShift  = (1 << 0),
+	kQualifierControl = (1 << 1),
+	kQualifierAlt    = (1 << 2),
 
 	// special qualifiers used internally
-	spQualifierFunc = (1 << 7)              // indicates function key
+	kSpQualifierFunc = (1 << 7)              // indicates function key
 };
 
 const int           homeKey     = (0x47 << 8),
diff --git a/engines/saga2/panel.cpp b/engines/saga2/panel.cpp
index d560491554d..037e54f57f2 100644
--- a/engines/saga2/panel.cpp
+++ b/engines/saga2/panel.cpp
@@ -1008,13 +1008,13 @@ void gToolBase::handleKeyStroke(Common::Event &event) {
 	uint16 qualifier = 0;
 
 	if (event.kbd.flags & Common::KBD_SHIFT)
-		qualifier |= qualifierShift;
+		qualifier |= kQualifierShift;
 
 	if (event.kbd.flags & Common::KBD_CTRL)
-		qualifier |= qualifierControl;
+		qualifier |= kQualifierControl;
 
 	if (event.kbd.flags & Common::KBD_ALT)
-		qualifier |= qualifierAlt;
+		qualifier |= kQualifierAlt;
 
 	_msg._pickAbsPos  = _pickPos;
 	_msg._pointerEnter = 0;
diff --git a/engines/saga2/tilemode.cpp b/engines/saga2/tilemode.cpp
index 7baf4e2b44a..57e0a8252a7 100644
--- a/engines/saga2/tilemode.cpp
+++ b/engines/saga2/tilemode.cpp
@@ -934,11 +934,11 @@ void TileModeHandleKey(int16 key, int16 qual) {
 
 	case 'a':
 		if (uiKeysEnabled)
-			toggleAgression(getCenterActorPlayerID(), qual & qualifierShift);
+			toggleAgression(getCenterActorPlayerID(), qual & kQualifierShift);
 		break;
 	case 'b':
 		if (uiKeysEnabled)
-			toggleBanding(getCenterActorPlayerID(), qual & qualifierShift);
+			toggleBanding(getCenterActorPlayerID(), qual & kQualifierShift);
 		break;
 	case '\t':
 		if (uiKeysEnabled)


Commit: bafa5304426611a3c4dcf6ea0635544fc5906982
    https://github.com/scummvm/scummvm/commit/bafa5304426611a3c4dcf6ea0635544fc5906982
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-29T00:35:07+02:00

Commit Message:
SAGA2: Rename enums in intrface.h

Changed paths:
    engines/saga2/intrface.cpp
    engines/saga2/intrface.h


diff --git a/engines/saga2/intrface.cpp b/engines/saga2/intrface.cpp
index 4d4317b5444..2570fb198e6 100644
--- a/engines/saga2/intrface.cpp
+++ b/engines/saga2/intrface.cpp
@@ -398,7 +398,7 @@ CPlaqText::CPlaqText(gPanelList     &list,
                      int16         ident,
                      AppFunc       *cmd)
 	: gControl(list, box, msg, ident, cmd) {
-	if (strlen(msg) < bufSize) {
+	if (strlen(msg) < kBufSize) {
 		Common::strcpy_s(_lineBuf, msg);
 	} else {
 		*_lineBuf = '\0';
@@ -486,7 +486,7 @@ void CPortrait::setPortrait(uint16 brotherID) {
 	assert(brotherID < _numViews + 1);
 
 	// tell button to select and display new image
-	if (brotherID == uiIndiv) {
+	if (brotherID == kUiIndiv) {
 		WriteStatusF(4, " Brother id %d", brotherID);
 
 		_indivButton->setCurrent(_currentState[brotherID]);
@@ -650,8 +650,8 @@ void CStatusLine::experationCheck() {
 		_minWaitAlarm.set(_lineQueue[_queueTail].frameTime / 5);
 
 		// copy upto the buffer's size in chars
-		Common::strlcpy(_lineBuf, _lineQueue[_queueTail].text, bufSize);
-		_lineBuf[bufSize - 1] = '\0';
+		Common::strlcpy(_lineBuf, _lineQueue[_queueTail].text,kBufSize);
+		_lineBuf[kBufSize - 1] = '\0';
 
 		//  free the queue text buffer
 		delete[] _lineQueue[_queueTail].text;
@@ -688,10 +688,10 @@ CMassWeightIndicator::CMassWeightIndicator(gPanelList *panel, const Point16 &pos
 	_massPiePos      = _backImagePos;
 	_bulkPiePos      = _backImagePos;
 
-	_massPiePos.x    += massPieXOffset;
-	_massPiePos.y    += massPieYOffset;
-	_bulkPiePos.x    += bulkPieXOffset;
-	_bulkPiePos.y    += bulkPieYOffset;
+	_massPiePos.x    += kMassPieXOffset;
+	_massPiePos.y    += kMassPieYOffset;
+	_bulkPiePos.x    += kBulkPieXOffset;
+	_bulkPiePos.y    += kBulkPieYOffset;
 
 	_bRedraw         = true; // this MUST be true or the indicators will not draw the first time
 
@@ -713,7 +713,7 @@ CMassWeightIndicator::CMassWeightIndicator(gPanelList *panel, const Point16 &pos
 	// attach controls to the indivControls panel
 	// these butttons will get deactivated along with the panel
 	_pieMass = new GfxCompImage(*panel,
-	                                       Rect16(_massPiePos.x, _massPiePos.y, pieXSize, pieYSize),
+	                                       Rect16(_massPiePos.x, _massPiePos.y, kPieXSize, kPieYSize),
 	                                       _pieIndImag,
 	                                       numPieIndImages,
 	                                       0,
@@ -721,7 +721,7 @@ CMassWeightIndicator::CMassWeightIndicator(gPanelList *panel, const Point16 &pos
 	                                       cmdMassInd);
 
 	_pieBulk = new GfxCompImage(*panel,
-	                                       Rect16(_bulkPiePos.x, _bulkPiePos.y, pieXSize, pieYSize),
+	                                       Rect16(_bulkPiePos.x, _bulkPiePos.y, kPieXSize, kPieYSize),
 	                                       _pieIndImag,
 	                                       numPieIndImages,
 	                                       0,
@@ -730,9 +730,9 @@ CMassWeightIndicator::CMassWeightIndicator(gPanelList *panel, const Point16 &pos
 
 	// mass/bulk back image
 	new GfxCompImage(*panel,
-	                             Rect16(_backImagePos.x, _backImagePos.y, backImageXSize, backImageYSize),
+	                             Rect16(_backImagePos.x, _backImagePos.y, kBackImageXSize, kBackImageYSize),
 	                             _massBulkImag,
-	                             uiIndiv,
+	                             kUiIndiv,
 	                             nullptr);
 
 	// release resource context
@@ -805,7 +805,7 @@ void CMassWeightIndicator::update() {
  * ===================================================================== */
 
 // setup the mana color tables
-static uint8 manaColorMap[CManaIndicator::numManaTypes][CManaIndicator::numManaColors + 9] = {
+static uint8 manaColorMap[CManaIndicator::kManaNumManaTypes][CManaIndicator::kResNumManaColors + 9] = {
 	// each row has 9 leading zero's to acount for windows colors
 	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x74, 0x73, 0x72, 0x80, 0x84, 0x83, 0x82, 0x82, 0x81, 0x81, 0xF4, 0xE9 }, // Red
 
@@ -822,7 +822,7 @@ static uint8 manaColorMap[CManaIndicator::numManaTypes][CManaIndicator::numManaC
 
 
 CManaIndicator::CManaIndicator(gPanelList &list) : GfxCompImage(list,
-	        Rect16(x, y, xSize, ySize),
+	        Rect16(kAreaX, kAreaY, kAreaXSize, kAreaYSize),
 	        nullptr,
 	        0,
 	        cmdManaInd) {
@@ -832,38 +832,38 @@ CManaIndicator::CManaIndicator(gPanelList &list) : GfxCompImage(list,
 	_resContext  = resFile->newContext(MKTAG('M', 'A', 'N', 'A'), "mana context");
 
 	// load star images
-	_starImages = loadImageRes(_resContext, starResNum, numStars, 'S', 'T', 'A');
+	_starImages = loadImageRes(_resContext, kResStarResNum, kResNumStars, 'S', 'T', 'A');
 
 	// load in the ring images
-	_ringImages = loadImageRes(_resContext, ringResNum, numRings, 'R', 'N', 'G');
+	_ringImages = loadImageRes(_resContext, kResRingResNum, kResNumRings, 'R', 'N', 'G');
 
 	_backImage = g_vm->_imageCache->requestImage(_resContext, MKTAG('B', 'A', 'C', 'K'));
 
 	_wellImage = g_vm->_imageCache->requestImage(_resContext, MKTAG('W', 'E', 'L', 'L'));
 
 	// hmm this could be cleaner...
-	_starRingEndPos[0] = Point16(redEndX,    redEndY);
-	_starRingEndPos[1] = Point16(orangeEndX, orangeEndY);
-	_starRingEndPos[2] = Point16(yellowEndX, yellowEndY);
-	_starRingEndPos[3] = Point16(greenEndX,  greenEndY);
-	_starRingEndPos[4] = Point16(blueEndX,   blueEndY);
-	_starRingEndPos[5] = Point16(violetEndX, violetEndY);
-
-	_starSizes[0] = Point16(star1XSize, star1YSize);
-	_starSizes[1] = Point16(star2XSize, star2YSize);
-	_starSizes[2] = Point16(star3XSize, star3YSize);
-	_starSizes[3] = Point16(star4XSize, star4YSize);
-	_starSizes[4] = Point16(star5XSize, star5YSize);
-	_starSizes[5] = Point16(star6XSize, star6YSize);
-	_starSizes[6] = Point16(star7XSize, star7YSize);
-
-	_ringSizes[0] = Point16(ring1XSize, ring1YSize);
-	_ringSizes[1] = Point16(ring2XSize, ring2YSize);
-	_ringSizes[2] = Point16(ring3XSize, ring3YSize);
-	_ringSizes[3] = Point16(ring4XSize, ring4YSize);
-	_ringSizes[4] = Point16(ring5XSize, ring5YSize);
-	_ringSizes[5] = Point16(ring6XSize, ring6YSize);
-	_ringSizes[6] = Point16(ring7XSize, ring7YSize);
+	_starRingEndPos[0] = Point16(kManaRedEndX,    kManaRedEndY);
+	_starRingEndPos[1] = Point16(kManaOrangeEndX, kManaOrangeEndY);
+	_starRingEndPos[2] = Point16(kManaYellowEndX, kManaYellowEndY);
+	_starRingEndPos[3] = Point16(kManaGreenEndX,  kManaGreenEndY);
+	_starRingEndPos[4] = Point16(kManaBlueEndX,   kManaBlueEndY);
+	_starRingEndPos[5] = Point16(kManaVioletEndX, kManaVioletEndY);
+
+	_starSizes[0] = Point16(kStar1XSize, kStar1YSize);
+	_starSizes[1] = Point16(kStar2XSize, kStar2YSize);
+	_starSizes[2] = Point16(kStar3XSize, kStar3YSize);
+	_starSizes[3] = Point16(kStar4XSize, kStar4YSize);
+	_starSizes[4] = Point16(kStar5XSize, kStar5YSize);
+	_starSizes[5] = Point16(kStar6XSize, kStar6YSize);
+	_starSizes[6] = Point16(kStar7XSize, kStar7YSize);
+
+	_ringSizes[0] = Point16(kRing1XSize, kRing1YSize);
+	_ringSizes[1] = Point16(kRing2XSize, kRing2YSize);
+	_ringSizes[2] = Point16(kRing3XSize, kRing3YSize);
+	_ringSizes[3] = Point16(kRing4XSize, kRing4YSize);
+	_ringSizes[4] = Point16(kRing5XSize, kRing5YSize);
+	_ringSizes[5] = Point16(kRing6XSize, kRing6YSize);
+	_ringSizes[6] = Point16(kRing7XSize, kRing7YSize);
 
 
 	// get rid of resource context
@@ -871,20 +871,20 @@ CManaIndicator::CManaIndicator(gPanelList &list) : GfxCompImage(list,
 	_resContext = nullptr;
 
 	// set update checks to nominal values
-	for (uint16 i = 0; i < numManaTypes; i++) {
+	for (uint16 i = 0; i < kManaNumManaTypes; i++) {
 		_currentMana[i]        = -1;
 		_currentBaseMana[i]    = -1;
 	}
 
 	// init the save map
-	_savedMap._size = Extent16(xSize, ySize);
+	_savedMap._size = Extent16(kAreaXSize, kAreaYSize);
 	_savedMap._data = new uint8[_savedMap.bytes()];
 }
 
 CManaIndicator::~CManaIndicator() {
 	// release images
-	unloadImageRes(_starImages, numStars);
-	unloadImageRes(_ringImages, numRings);
+	unloadImageRes(_starImages, kResNumStars);
+	unloadImageRes(_ringImages, kResNumRings);
 
 	// release back image
 	g_vm->_imageCache->releaseImage(_backImage);
@@ -903,18 +903,18 @@ CManaIndicator::~CManaIndicator() {
 //  -------
 
 Rect16 CManaIndicator::getManaRegionRect(int8 nRegion) {
-	assert(nRegion >= 0 && nRegion < numManaRegions);
-
-	int boxSizeX = xSize / 3;
-	int boxSizeY = ySize / 2;
-
-	static Rect16 manaRegionRects[numManaRegions] = {
-		Rect16(x, y, boxSizeX, boxSizeY),
-		Rect16(x + boxSizeX, y, boxSizeX, boxSizeY),
-		Rect16(x + boxSizeX * 2, y, boxSizeX, boxSizeY),
-		Rect16(x, y + boxSizeY, boxSizeX, boxSizeY),
-		Rect16(x + boxSizeX, y + boxSizeY, boxSizeX, boxSizeY),
-		Rect16(x + boxSizeX * 2, y + boxSizeY, boxSizeX, boxSizeY)
+	assert(nRegion >= 0 && nRegion < kManaNumManaRegions);
+
+	int boxSizeX = kAreaXSize / 3;
+	int boxSizeY = kAreaYSize / 2;
+
+	static Rect16 manaRegionRects[kManaNumManaRegions] = {
+		Rect16(kAreaX, kAreaY, boxSizeX, boxSizeY),
+		Rect16(kAreaX + boxSizeX, kAreaY, boxSizeX, boxSizeY),
+		Rect16(kAreaX + boxSizeX * 2, kAreaY, boxSizeX, boxSizeY),
+		Rect16(kAreaX, kAreaY + boxSizeY, boxSizeX, boxSizeY),
+		Rect16(kAreaX + boxSizeX, kAreaY + boxSizeY, boxSizeX, boxSizeY),
+		Rect16(kAreaX + boxSizeX * 2, kAreaY + boxSizeY, boxSizeX, boxSizeY)
 	};
 
 	return manaRegionRects[nRegion];
@@ -932,7 +932,7 @@ void CManaIndicator::draw() {
 	port.setMode(kDrawModeMatte);
 
 	g_vm->_pointer->hide(port, _extent);              // hide mouse pointer
-	drawClipped(port, Point16(0, 0), Rect16(0, 0, xSize, ySize));
+	drawClipped(port, Point16(0, 0), Rect16(0, 0, kAreaXSize, kAreaYSize));
 	g_vm->_pointer->show(port, _extent);              // show mouse pointer
 
 
@@ -955,7 +955,7 @@ void CManaIndicator::drawClipped(gPort &port,
 		port.setMode(kDrawModeMatte);
 		port.bltPixels(_savedMap, 0, 0,
 		               _extent.x - offset.x, _extent.y - offset.y,
-		               xSize, ySize);
+		               kAreaXSize, kAreaYSize);
 
 		// draw the frame
 		drawCompressedImage(port, Point16(_extent.x - offset.x, _extent.y - offset.y), _backImage);
@@ -972,20 +972,20 @@ void CManaIndicator::drawClipped(gPort &port,
 	gPixelMap   ringMap, starMap, mixMap, tempMap;
 
 
-	if (!NewTempPort(tempPort, xSize, ySize))
+	if (!NewTempPort(tempPort, kAreaXSize, kAreaYSize))
 		return;
 
 	// set the blit surface to a flat black
 	memset(tempPort._map->_data, 24, tempPort._map->bytes());
 
 	// draw the well
-	drawCompressedImage(tempPort, Point16(wellX, wellY), _wellImage);
+	drawCompressedImage(tempPort, Point16(kWellX, kWellY), _wellImage);
 
 	// make a mixing plane and blank it
-	mixMap._size = Extent16(xSize, ySize);
+	mixMap._size = Extent16(kAreaXSize, kAreaYSize);
 	mixMap._data = new uint8[mixMap.bytes()]();
 	// make a temp plane and blank it
-	tempMap._size = Extent16(xSize, ySize);
+	tempMap._size = Extent16(kAreaXSize, kAreaYSize);
 	tempMap._data = new uint8[tempMap.bytes()]();
 
 	// clear out the blit surfaces
@@ -996,7 +996,7 @@ void CManaIndicator::drawClipped(gPort &port,
 	tempPort.setMode(kDrawModeMatte);
 
 	// draw each star and ring with color remap
-	for (uint16 i = 0; i < numManaTypes; i++) {
+	for (uint16 i = 0; i < kManaNumManaTypes; i++) {
 		// get the header for the image pointer passed
 		ImageHeader *starHdr = (ImageHeader *)_starImages[_manaLines[i].starImageIndex];
 		ImageHeader *ringHdr = (ImageHeader *)_ringImages[_manaLines[i].ringImageIndex];
@@ -1073,7 +1073,7 @@ void CManaIndicator::drawClipped(gPort &port,
 	port.setMode(kDrawModeMatte);
 	port.bltPixels(*tempPort._map, 0, 0,
 	               _extent.x - offset.x, _extent.y - offset.y,
-	               xSize, ySize);
+	               kAreaXSize, kAreaYSize);
 
 	// now blit the frame on top of it all.
 	drawCompressedImage(port, Point16(_extent.x - offset.x, _extent.y - offset.y), _backImage);
@@ -1100,7 +1100,7 @@ bool CManaIndicator::needUpdate(PlayerActor *player) {
 
 	// this could do more array checking, but
 	// the number of mana type should remain stable
-	for (i = 0; i < numManaTypes; i++) {
+	for (i = 0; i < kManaNumManaTypes; i++) {
 		manaAmount      = stats->mana(i);
 		baseManaAmount  = baseStatsRef.mana(i);
 
@@ -1127,7 +1127,7 @@ bool CManaIndicator::update(PlayerActor *player) {
 
 	// this could do more array checking, but
 	// the number of mana type should remain stable
-	for (i = 0; i < numManaTypes; i++) {
+	for (i = 0; i < kManaNumManaTypes; i++) {
 		manaAmount      = stats->mana(i);
 		baseManaAmount  = baseStatsRef.mana(i);
 
@@ -1164,7 +1164,7 @@ void CManaIndicator::getManaLineInfo(uint16 index,
                                      int16 manaAmount,
                                      int16 baseManaAmount,
                                      manaLineInfo *info) {
-	Point16 basePos = Point16(xSize / 2, ySize / 2);
+	Point16 basePos = Point16(kAreaXSize / 2, kAreaYSize / 2);
 
 	// div zero prevention
 	if (manaAmount == 0) manaAmount = 1;
@@ -1175,16 +1175,16 @@ void CManaIndicator::getManaLineInfo(uint16 index,
 	//  Calculate the positions of the mana stars, and which images to use.
 	manaInfo.starPos        = LERP(basePos,
 	                               _starRingEndPos[index],
-	                               (int32)maxLevel,
+	                               (int32)kManaMaxLevel,
 	                               (int32)manaAmount);
 
 	manaInfo.ringPos        = LERP(basePos,
 	                               _starRingEndPos[index],
-	                               (int32)maxLevel,
+	                               (int32)kManaMaxLevel,
 	                               (int32)baseManaAmount);
 
-	manaInfo.starImageIndex = clamp(0,     manaAmount * numStars / maxLevel, numStars - 1);
-	manaInfo.ringImageIndex = clamp(0, baseManaAmount * numStars / maxLevel, numRings - 1);
+	manaInfo.starImageIndex = clamp(0,     manaAmount * kResNumStars / kManaMaxLevel, kResNumStars - 1);
+	manaInfo.ringImageIndex = clamp(0, baseManaAmount * kResNumStars / kManaMaxLevel, kResNumRings - 1);
 
 	// now do centering correct for images
 	manaInfo.starPos.x -= _starSizes[manaInfo.starImageIndex].x / 2;
@@ -1207,43 +1207,43 @@ CHealthIndicator::CHealthIndicator(AppFunc *cmd) {
 	_healthRes = resFile->newContext(imageGroupID, "health imagery context");
 
 	// load in health star imagery
-	_starImag = loadButtonRes(_healthRes, starStart, starNum, 'S', 'T', 'A');
+	_starImag = loadButtonRes(_healthRes, kHealthStarStart, kHealthStarNum, 'S', 'T', 'A');
 
 	// load in the health star border
-	_starFrameImag    = g_vm->_imageCache->requestImage(_healthRes, MKTAG('B', 'T', 'N', starFrameResNum));
+	_starFrameImag    = g_vm->_imageCache->requestImage(_healthRes, MKTAG('B', 'T', 'N', kHealthStarFrameResNum));
 
 	// set the image indexes to nominal startup values
-	for (i = 0; i < numControls + 1; i++) {
+	for (i = 0; i < kHealthNumControls + 1; i++) {
 		_imageIndexMemory[i] = -1;
 	}
 
 	// setup the id's for each of the stars
-	_starIDs[0] = uiJulian;
-	_starIDs[1] = uiPhillip;
-	_starIDs[2] = uiKevin;
+	_starIDs[0] = kUiJulian;
+	_starIDs[1] = kUiPhillip;
+	_starIDs[2] = kUiKevin;
 
 
 	// health controls for the trio view
 	// deallocated with panel
-	for (i = 0; i < numControls; i++) {
+	for (i = 0; i < kHealthNumControls; i++) {
 		_starBtns[i] = new GfxCompImage(*trioControls,
-		                           Rect16(starXPos,
-		                                  starYPos + starYOffset * i,
-		                                  starXSize,
-		                                  starYSize),
+		                           Rect16(kHealthStarXPos,
+		                                  kHealthStarYPos + kHealthStarYOffset * i,
+		                                  kHealthStarXSize,
+		                                  kHealthStarYSize),
 		                           _starImag,
-		                           starNum,
-		                           starInitial,
+		                           kHealthStarNum,
+		                           kHealthStarInitial,
 		                           _starIDs[i],
 		                           cmd);
 
 
 		// image control for the star border/frame trio mode
 		new GfxCompImage(*trioControls,
-		                             Rect16(frameXPos,
-		                                    frameYPos + starYOffset * i,
-		                                    frameXSize,
-		                                    frameYSize),
+		                             Rect16(kHealthFrameXPos,
+		                                    kHealthFrameYPos + kHealthStarYOffset * i,
+		                                    kHealthFrameXSize,
+		                                    kHealthFrameYSize),
 		                             _starFrameImag,
 		                             0,
 		                             nullptr);
@@ -1253,22 +1253,22 @@ CHealthIndicator::CHealthIndicator(AppFunc *cmd) {
 	// health control for individual mode
 	// deallocated with panel
 	_indivStarBtn = new GfxCompImage(*indivControls,
-	                          Rect16(starXPos,
-	                                 starYPos,
-	                                 starXSize,
-	                                 starYSize),
+	                          Rect16(kHealthStarXPos,
+	                                 kHealthStarYPos,
+	                                 kHealthStarXSize,
+	                                 kHealthStarYSize),
 	                          _starImag,
-	                          starNum,
-	                          starInitial,
-	                          uiIndiv,
+	                          kHealthStarNum,
+	                          kHealthStarInitial,
+	                          kUiIndiv,
 	                          cmd);
 
 	// image control for the star border/frame indiv mode
 	new GfxCompImage(*indivControls,
-	                             Rect16(frameXPos,
-	                                    frameYPos,
-	                                    frameXSize,
-	                                    frameYSize),
+	                             Rect16(kHealthFrameXPos,
+	                                    kHealthFrameYPos,
+	                                    kHealthFrameXSize,
+	                                    kHealthFrameYSize),
 	                             _starFrameImag,
 	                             0,
 	                             nullptr);
@@ -1283,7 +1283,7 @@ CHealthIndicator::CHealthIndicator(AppFunc *cmd) {
 
 CHealthIndicator::~CHealthIndicator() {
 	// release star imagery
-	unloadImageRes(_starImag, starNum);
+	unloadImageRes(_starImag, kHealthStarNum);
 
 	// release star frame imagery
 	g_vm->_imageCache->releaseImage(_starFrameImag);
@@ -1299,7 +1299,7 @@ void CHealthIndicator::updateStar(GfxCompImage *starCtl, int32 bro, int32 baseVi
 	// prevent div zero
 	if (baseVitality == 0) baseVitality = 1;
 
-	maxStar = clamp(0, baseVitality / 10 + 14, starLevels - 1);
+	maxStar = clamp(0, baseVitality / 10 + 14, kHealthStarLevels - 1);
 //	imageIndex = (int16)( sqrt( sqrt( (double)curVitality ) ) * maxStar) / sqrt( sqrt( (double)baseVitality ) );
 	imageIndex = (int16)(sqrt((double)MAX((int32)0, curVitality)) * maxStar) / sqrt((double)baseVitality);
 
@@ -1315,13 +1315,13 @@ void CHealthIndicator::updateStar(GfxCompImage *starCtl, int32 bro, int32 baseVi
 void CHealthIndicator::update() {
 	if (g_vm->_indivControlsFlag) {
 		// get the stats for the selected brother
-		int16 baseVitality  = g_vm->_playerList[translatePanID(uiIndiv)]->getBaseStats().vitality;
-		int16 currVitality  = g_vm->_playerList[translatePanID(uiIndiv)]->getEffStats()->vitality;
+		int16 baseVitality  = g_vm->_playerList[translatePanID(kUiIndiv)]->getBaseStats().vitality;
+		int16 currVitality  = g_vm->_playerList[translatePanID(kUiIndiv)]->getEffStats()->vitality;
 
-		updateStar(_indivStarBtn, uiIndiv, baseVitality, currVitality);
+		updateStar(_indivStarBtn, kUiIndiv, baseVitality, currVitality);
 	} else {
 
-		for (uint16 i = 0; i < numControls; i++) {
+		for (uint16 i = 0; i < kHealthNumControls; i++) {
 			// get the stats for the selected brother
 			int16 baseVitality  = g_vm->_playerList[i]->getBaseStats().vitality;
 			int16 currVitality  = g_vm->_playerList[i]->getEffStats()->vitality;
@@ -1523,7 +1523,7 @@ void SetupUserControls() {
 	hResContext *imageRes;
 
 	// brother panel id's
-	uint16  brotherIDs[kNumViews]   =  { uiJulian, uiPhillip, uiKevin };
+	uint16  brotherIDs[kNumViews]   =  { kUiJulian, kUiPhillip, kUiKevin };
 
 	// portrait resource indexes
 	int16   portResNum[]    = { 0, 0, 0 };
@@ -1618,22 +1618,22 @@ void SetupUserControls() {
 
 	// portrait button
 	indivPortBtn = new GfxMultCompButton(*indivControls, views[0][index++],
-	                          portImag[0], numPortImages, 0, false, uiIndiv, cmdPortrait);
+	                          portImag[0], numPortImages, 0, false, kUiIndiv, cmdPortrait);
 	indivPortBtn->setMousePoll(true);
 
 	// aggressive button
 	indivAggressBtn  = new GfxOwnerSelCompButton(*indivControls, views[0][index++],
-	                              aggressImag, numBtnImages, uiIndiv, cmdAggressive);
+	                              aggressImag, numBtnImages, kUiIndiv, cmdAggressive);
 
 	indivArmorInd    = new gArmorIndicator(*indivControls, views[0][index++],
-	                              armorImag, uiIndiv, cmdArmor);
+	                              armorImag, kUiIndiv, cmdArmor);
 	// center on brother
 	indivCenterBtn   = new GfxOwnerSelCompButton(*indivControls, views[0][index++],
-	                              centerImag, numBtnImages, uiIndiv, cmdCenter);
+	                              centerImag, numBtnImages, kUiIndiv, cmdCenter);
 
 	// banding
 	indivBandingBtn  = new GfxOwnerSelCompButton(*indivControls, views[0][index++],
-	                              bandingImag, numBtnImages, uiIndiv, cmdBand);
+	                              bandingImag, numBtnImages, kUiIndiv, cmdBand);
 
 	// name plates that go under the portraits
 	indivNamePlate  = new GfxCompImage(*indivControls, views[0][index++],
@@ -1651,15 +1651,15 @@ void SetupUserControls() {
 
 
 	// mental container button
-	menConBtn = new GfxCompButton(*indivControls, menConBtnRect, menConBtnImag, numBtnImages, uiIndiv, cmdBrain);
+	menConBtn = new GfxCompButton(*indivControls, menConBtnRect, menConBtnImag, numBtnImages, kUiIndiv, cmdBrain);
 
 	// brother selection _buttons >>> need to replace these with sticky _buttons
-	julBtn = new GfxOwnerSelCompButton(*indivControls, julBtnRect, julBtnImag, numBtnImages, uiJulian, cmdBroChange);
-	phiBtn = new GfxOwnerSelCompButton(*indivControls, phiBtnRect, phiBtnImag, numBtnImages, uiPhillip, cmdBroChange);
-	kevBtn = new GfxOwnerSelCompButton(*indivControls, kevBtnRect, kevBtnImag, numBtnImages, uiKevin, cmdBroChange);
+	julBtn = new GfxOwnerSelCompButton(*indivControls, julBtnRect, julBtnImag, numBtnImages, kUiJulian, cmdBroChange);
+	phiBtn = new GfxOwnerSelCompButton(*indivControls, phiBtnRect, phiBtnImag, numBtnImages, kUiPhillip, cmdBroChange);
+	kevBtn = new GfxOwnerSelCompButton(*indivControls, kevBtnRect, kevBtnImag, numBtnImages, kUiKevin, cmdBroChange);
 
 	// frame for brother _buttons
-	broBtnFrame = new GfxCompImage(*indivControls, broBtnRect, broBtnFrameImag, uiIndiv, nullptr);
+	broBtnFrame = new GfxCompImage(*indivControls, broBtnRect, broBtnFrameImag, kUiIndiv, nullptr);
 
 	// make the mana indicator
 	ManaIndicator = new CManaIndicator(*indivControls);
@@ -1843,7 +1843,7 @@ void setIndivBtns(uint16 brotherID) {    // top = 0, mid = 1, bot = 2
 	//_indivStarBtn->setCurrent( ( uint16 )_starBtns[brotherID]->getCurrent() );
 	indivPortBtn->setImages(portImag[brotherID]);
 	indivNamePlate->setImage(namePlateImages[brotherID]);
-	Portrait->set(uiIndiv, Portrait->getCurrentState(brotherID));
+	Portrait->set(kUiIndiv, Portrait->getCurrentState(brotherID));
 	indivBandingBtn->select(bandingBtns[brotherID]->isSelected());
 	indivBandingBtn->ghost(bandingBtns[brotherID]->isGhosted());
 	indivAggressBtn->select(aggressBtns[brotherID]->isSelected());
@@ -1877,7 +1877,7 @@ void setTrioBtns() {
 	// reset any value that might have changed in idividual mode
 	centerBtns[indivBrother]->select(indivCenterBtn->isSelected());
 	bandingBtns[indivBrother]->select(indivBandingBtn->isSelected());
-	Portrait->set(indivBrother, Portrait->getCurrentState(uiIndiv));
+	Portrait->set(indivBrother, Portrait->getCurrentState(kUiIndiv));
 	aggressBtns[indivBrother]->select(indivAggressBtn->isSelected());
 
 	armorInd[indivBrother]->setValue(indivBrother);
@@ -1916,7 +1916,7 @@ void setCenterBrother(uint16 whichBrother) {
 
 uint16 translatePanID(uint16 panID) {
 	// individual mode brother id translation
-	if (panID == uiIndiv) {
+	if (panID == kUiIndiv) {
 		panID = indivBrother;
 	}
 
@@ -1928,7 +1928,7 @@ void updateBrotherPortrait(uint16 brotherID, int16 pType) {
 		Portrait->set(brotherID, (PortraitType)pType);
 
 		if (brotherID == indivBrother)
-			Portrait->set(uiIndiv, (PortraitType)pType);
+			Portrait->set(kUiIndiv, (PortraitType)pType);
 	}
 }
 
@@ -1961,27 +1961,27 @@ void updateBrotherBandingButton(uint16 brotherID, bool banded) {
 
 void updateBrotherRadioButtons(uint16 brotherID) {
 	if (g_vm->_userControlsSetup) {
-		bool    jul = (uiJulian == brotherID);
-		bool    phi = (uiPhillip == brotherID);
-		bool    kev = (uiKevin == brotherID);
+		bool    jul = (kUiJulian == brotherID);
+		bool    phi = (kUiPhillip == brotherID);
+		bool    kev = (kUiKevin == brotherID);
 
 		// set the selection _buttons to the correct states
 		julBtn->select(jul);
 		phiBtn->select(phi);
 		kevBtn->select(kev);
 
-		julBtn->ghost(isBrotherDead(uiJulian));
-		phiBtn->ghost(isBrotherDead(uiPhillip));
-		kevBtn->ghost(isBrotherDead(uiKevin));
+		julBtn->ghost(isBrotherDead(kUiJulian));
+		phiBtn->ghost(isBrotherDead(kUiPhillip));
+		kevBtn->ghost(isBrotherDead(kUiKevin));
 
 		// set the center brother _buttons
-		centerBtns[uiJulian]->select(jul);
-		centerBtns[uiPhillip]->select(phi);
-		centerBtns[uiKevin]->select(kev);
+		centerBtns[kUiJulian]->select(jul);
+		centerBtns[kUiPhillip]->select(phi);
+		centerBtns[kUiKevin]->select(kev);
 
-		centerBtns[uiJulian]->ghost(isBrotherDead(uiJulian));
-		centerBtns[uiPhillip]->ghost(isBrotherDead(uiPhillip));
-		centerBtns[uiKevin]->ghost(isBrotherDead(uiKevin));
+		centerBtns[kUiJulian]->ghost(isBrotherDead(kUiJulian));
+		centerBtns[kUiPhillip]->ghost(isBrotherDead(kUiPhillip));
+		centerBtns[kUiKevin]->ghost(isBrotherDead(kUiKevin));
 
 		if (brotherID == indivBrother) {
 			indivCenterBtn->select(true);
@@ -2112,12 +2112,12 @@ APPFUNC(cmdPortrait) {
 				g_vm->_mouseInfo->replaceObject();
 //				clickActionDone = true;
 			}
-		} else if (panID != uiIndiv) {
+		} else if (panID != kUiIndiv) {
 			if (!isBrotherDead(panID)) {
 				setCenterBrother(panID);
 				setControlPanelsToIndividualMode(panID);
 			}
-		} else if (panID == uiIndiv) {
+		} else if (panID == kUiIndiv) {
 			setControlPanelsToTrioMode();
 		}
 		break;
@@ -2154,13 +2154,13 @@ APPFUNC(cmdPortrait) {
 				Portrait->getStateString(state, stateBufSize, brotherID);
 
 				switch (brotherID) {
-				case uiJulian:
+				case kUiJulian:
 					Common::sprintf_s(buf, "%s %s", JULIAN_BROSTATE, state);
 					break;
-				case uiPhillip:
+				case kUiPhillip:
 					Common::sprintf_s(buf, "%s %s", PHILLIP_BROSTATE, state);
 					break;
-				case uiKevin:
+				case kUiKevin:
 					Common::sprintf_s(buf, "%s %s", KEVIN_BROSTATE, state);
 					break;
 				}
@@ -2344,13 +2344,13 @@ APPFUNC(cmdBroChange) {
 			Portrait->getStateString(state, stateBufSize, brotherID);
 
 			switch (brotherID) {
-			case uiJulian:
+			case kUiJulian:
 				Common::sprintf_s(buf, "%s %s", JULIAN_BROSTATE, state);
 				break;
-			case uiPhillip:
+			case kUiPhillip:
 				Common::sprintf_s(buf, "%s %s", PHILLIP_BROSTATE, state);
 				break;
-			case uiKevin:
+			case kUiKevin:
 				Common::sprintf_s(buf, "%s %s", KEVIN_BROSTATE, state);
 				break;
 			}
diff --git a/engines/saga2/intrface.h b/engines/saga2/intrface.h
index 76c4f709286..52635f3658e 100644
--- a/engines/saga2/intrface.h
+++ b/engines/saga2/intrface.h
@@ -141,10 +141,10 @@ struct ResName {
 };
 
 enum uiBrotherName {
-	uiJulian = 0,
-	uiPhillip,
-	uiKevin,
-	uiIndiv
+	kUiJulian = 0,
+	kUiPhillip,
+	kUiKevin,
+	kUiIndiv
 };
 
 // compressed button resource indexes
@@ -183,11 +183,11 @@ class CPlaqText : public gControl {
 protected:
 
 	enum {
-		bufSize = 128
+		kBufSize = 128
 	};
 
 
-	char            _lineBuf[bufSize]; // text to render on button
+	char            _lineBuf[kBufSize]; // text to render on button
 	textPallete     _textFacePal;    // contains info about coloring for multi-depth text rendering
 	Rect16          _textRect;       // rect for the text
 	int16           _textPosition;
@@ -300,16 +300,16 @@ public:
 private:
 	enum {
 		// background image coords
-		backImageXSize  = 88,
-		backImageYSize  = 43,
+		kBackImageXSize  = 88,
+		kBackImageYSize  = 43,
 
 		// pie image coords
-		massPieXOffset  = 8,
-		massPieYOffset  = 9,
-		bulkPieXOffset  = 53,
-		bulkPieYOffset  = 9,
-		pieXSize        = 28,
-		pieYSize        = 26
+		kMassPieXOffset  = 8,
+		kMassPieYOffset  = 9,
+		kBulkPieXOffset  = 53,
+		kBulkPieYOffset  = 9,
+		kPieXSize        = 28,
+		kPieYSize        = 26
 	};
 
 	// xy positions of this indicator
@@ -367,113 +367,113 @@ public:
 
 	// sizes of the mana star images
 	enum startSize {
-		star1XSize = 10,
-		star1YSize = 9,
-		star2XSize = 16,
-		star2YSize = 15,
-		star3XSize = 20,
-		star3YSize = 19,
-		star4XSize = 28,
-		star4YSize = 27,
-		star5XSize = 32,
-		star5YSize = 31,
-		star6XSize = 36,
-		star6YSize = 35,
-		star7XSize = 46,
-		star7YSize = 45
+		kStar1XSize = 10,
+		kStar1YSize = 9,
+		kStar2XSize = 16,
+		kStar2YSize = 15,
+		kStar3XSize = 20,
+		kStar3YSize = 19,
+		kStar4XSize = 28,
+		kStar4YSize = 27,
+		kStar5XSize = 32,
+		kStar5YSize = 31,
+		kStar6XSize = 36,
+		kStar6YSize = 35,
+		kStar7XSize = 46,
+		kStar7YSize = 45
 	};
 
 	// sizes of the rings
 	enum ringSize {
-		ring1XSize = 8,
-		ring1YSize = 7,
-		ring2XSize = 12,
-		ring2YSize = 11,
-		ring3XSize = 16,
-		ring3YSize = 15,
-		ring4XSize = 22,
-		ring4YSize = 21,
-		ring5XSize = 26,
-		ring5YSize = 25,
-		ring6XSize = 32,
-		ring6YSize = 31,
-		ring7XSize = 40,
-		ring7YSize = 39
+		kRing1XSize = 8,
+		kRing1YSize = 7,
+		kRing2XSize = 12,
+		kRing2YSize = 11,
+		kRing3XSize = 16,
+		kRing3YSize = 15,
+		kRing4XSize = 22,
+		kRing4YSize = 21,
+		kRing5XSize = 26,
+		kRing5YSize = 25,
+		kRing6XSize = 32,
+		kRing6YSize = 31,
+		kRing7XSize = 40,
+		kRing7YSize = 39
 	};
 
 	// area of control
 	enum area {
-		x       = 475,
-		y       = 315,
-		xSize   = 152,
-		ySize   = 135
+		kAreaX       = 475,
+		kAreaY       = 315,
+		kAreaXSize   = 152,
+		kAreaYSize   = 135
 	};
 
 	// coordinates
 	enum {
-		centerX     = x + xSize / 2,
-		centerY     = y + ySize / 2,
-		wellXSize   = 108,
-		wellYSize   = 123,
-		wellX       = (xSize / 2 - wellXSize / 2) + 1,
-		wellY       = ySize / 2 - wellYSize / 2
+		kCenterX     = kAreaX + kAreaXSize / 2,
+		kCenterY     = kAreaY + kAreaYSize / 2,
+		kWellXSize   = 108,
+		kWellYSize   = 123,
+		kWellX       = (kAreaXSize / 2 - kWellXSize / 2) + 1,
+		kWellY       = kAreaYSize / 2 - kWellYSize / 2
 	};
 
 	// manas end points
 
 	enum manaEndCoordsBase { // based on quadrants
-		xOffset = 9,
-		yOffset = -10,
-
-		upperLeftX  = 16    + xOffset,
-		upperLeftY  = 45    + yOffset,
-		upperMidX   = 70    + xOffset,
-		upperMidY   = 13    + yOffset,
-		upperRightX = 122   + xOffset,
-		upperRightY = 45    + yOffset,
-		lowerLeftX  = 16    + xOffset,
-		lowerLeftY  = 106   + yOffset,
-		lowerMidX   = 70    + xOffset,
-		lowerMidY   = 135   + yOffset,
-		lowerRightX = 122   + xOffset,
-		lowerRightY = 106   + yOffset
+		kManaXOffset = 9,
+		kManaYOffset = -10,
+
+		kManaUpperLeftX  = 16    + kManaXOffset,
+		kManaUpperLeftY  = 45    + kManaYOffset,
+		kManaUpperMidX   = 70    + kManaXOffset,
+		kManaUpperMidY   = 13    + kManaYOffset,
+		kManaUpperRightX = 122   + kManaXOffset,
+		kManaUpperRightY = 45    + kManaYOffset,
+		kManaLowerLeftX  = 16    + kManaXOffset,
+		kManaLowerLeftY  = 106   + kManaYOffset,
+		kManaLowerMidX   = 70    + kManaXOffset,
+		kManaLowerMidY   = 135   + kManaYOffset,
+		kManaLowerRightX = 122   + kManaXOffset,
+		kManaLowerRightY = 106   + kManaYOffset
 	};
 
 	enum manaEndCoords {
-		redEndX         = upperLeftX,   //a // these are just dup tags
-		redEndY         = upperLeftY,   //b
-		orangeEndX      = upperMidX,    //c
-		orangeEndY      = upperMidY,
-		yellowEndX      = upperRightX,  //d
-		yellowEndY      = upperRightY,  //b
-		greenEndX       = lowerLeftX,   //a
-		greenEndY       = lowerLeftY,   //e
-		blueEndX        = lowerMidX,    //c
-		blueEndY        = lowerMidY,
-		violetEndX      = lowerRightX,  //d
-		violetEndY      = lowerRightY,  //e
-		numXYCoords     = 12,
-		numManaTypes    = numXYCoords / 2
+		kManaRedEndX         = kManaUpperLeftX,   //a // these are just dup tags
+		kManaRedEndY         = kManaUpperLeftY,   //b
+		kManaOrangeEndX      = kManaUpperMidX,    //c
+		kManaOrangeEndY      = kManaUpperMidY,
+		kManaYellowEndX      = kManaUpperRightX,  //d
+		kManaYellowEndY      = kManaUpperRightY,  //b
+		kManaGreenEndX       = kManaLowerLeftX,   //a
+		kManaGreenEndY       = kManaLowerLeftY,   //e
+		kManaBlueEndX        = kManaLowerMidX,    //c
+		kManaBlueEndY        = kManaLowerMidY,
+		kManaVioletEndX      = kManaLowerRightX,  //d
+		kManaVioletEndY      = kManaLowerRightY,  //e
+		kManaNumXYCoords     = 12,
+		kManaNumManaTypes    = kManaNumXYCoords / 2
 	};
 
 	// mana star display offset from well center
 	enum startOffset {
-		startOffset = 12
+		kManaStartOffset = 12
 	};
 
 	// mana information
 	enum manainfo {
-		maxLevel = 200,
-		numManaRegions = numManaTypes
+		kManaMaxLevel = 200,
+		kManaNumManaRegions = kManaNumManaTypes
 	};
 
 	// resource data
 	enum resourceInfo {
-		numStars        = 7,
-		numRings        = 7,
-		starResNum      = 0,
-		ringResNum      = 0,
-		numManaColors   = 13
+		kResNumStars        = 7,
+		kResNumRings        = 7,
+		kResStarResNum      = 0,
+		kResRingResNum      = 0,
+		kResNumManaColors   = 13
 	};
 
 	// this describes a star
@@ -502,17 +502,17 @@ private:
 	gPixelMap   _savedMap;
 
 	// array of manaLine infos for blitting
-	manaLineInfo _manaLines[numManaTypes];
+	manaLineInfo _manaLines[kManaNumManaTypes];
 
 	// array of ring and star end positions
 	// this is initialized via constructor
-	Point16 _starRingEndPos[numManaTypes];
+	Point16 _starRingEndPos[kManaNumManaTypes];
 
-	Point16 _starSizes[numStars];
-	Point16 _ringSizes[numRings];
+	Point16 _starSizes[kResNumStars];
+	Point16 _ringSizes[kResNumRings];
 
 	// these are checks against redundent updates
-	int32   _currentMana[numManaTypes], _currentBaseMana[numManaTypes];
+	int32   _currentMana[kManaNumManaTypes], _currentBaseMana[kManaNumManaTypes];
 protected:
 
 	// these do line and position calculations
@@ -540,7 +540,7 @@ public:
 	//  -------
 	Rect16  getManaRegionRect(int8 region);
 	int     getNumManaRegions() {
-		return numManaRegions;
+		return kManaNumManaRegions;
 	}
 
 	// drawing routines
@@ -558,32 +558,32 @@ private:
 	static const char *_hintText;
 
 	enum {
-		starFrameResNum     = 14,
-		starFrameNum        = 1,
-		starStart           = 0,
-		starNum             = 23,
-		starInitial         = 0,
-		starLevels          = 24,
-		numControls         = kNumViews
+		kHealthStarFrameResNum     = 14,
+		kHealthStarFrameNum        = 1,
+		kHealthStarStart           = 0,
+		kHealthStarNum             = 23,
+		kHealthStarInitial         = 0,
+		kHealthStarLevels          = 24,
+		kHealthNumControls         = kNumViews
 	};
 
 	enum {
-		starXPos    = 572,
-		starYPos    = 21,
-		starXSize   = 32,
-		starYSize   = 32,
-		starYOffset = 150,
-		frameXPos   = 571,
-		frameYPos   = 20,
-		frameXSize  = 32,
-		frameYSize  = 32
+		kHealthStarXPos    = 572,
+		kHealthStarYPos    = 21,
+		kHealthStarXSize   = 32,
+		kHealthStarYSize   = 32,
+		kHealthStarYOffset = 150,
+		kHealthFrameXPos   = 571,
+		kHealthFrameYPos   = 20,
+		kHealthFrameXSize  = 32,
+		kHealthFrameYSize  = 32
 	};
 
 	// resource handle
 	hResContext *_healthRes;
 
 	// buttons
-	GfxCompImage          *_starBtns[numControls];
+	GfxCompImage          *_starBtns[kHealthNumControls];
 	GfxCompImage          *_indivStarBtn;
 
 	// array of pointer to the star imagery




More information about the Scummvm-git-logs mailing list