aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/actors.cpp34
-rw-r--r--engines/tinsel/actors.h2
-rw-r--r--engines/tinsel/background.cpp4
-rw-r--r--engines/tinsel/background.h2
-rw-r--r--engines/tinsel/bg.cpp2
-rw-r--r--engines/tinsel/bmv.cpp20
-rw-r--r--engines/tinsel/bmv.h4
-rw-r--r--engines/tinsel/dialogs.cpp8
-rw-r--r--engines/tinsel/faders.cpp68
-rw-r--r--engines/tinsel/faders.h2
-rw-r--r--engines/tinsel/font.cpp4
-rw-r--r--engines/tinsel/graphics.cpp48
-rw-r--r--engines/tinsel/graphics.h2
-rw-r--r--engines/tinsel/object.cpp8
-rw-r--r--engines/tinsel/object.h4
-rw-r--r--engines/tinsel/palette.cpp180
-rw-r--r--engines/tinsel/palette.h42
-rw-r--r--engines/tinsel/pid.h6
-rw-r--r--engines/tinsel/rince.cpp10
-rw-r--r--engines/tinsel/rince.h6
-rw-r--r--engines/tinsel/saveload.cpp2
-rw-r--r--engines/tinsel/savescn.cpp2
-rw-r--r--engines/tinsel/scene.cpp2
-rw-r--r--engines/tinsel/sysvar.cpp4
-rw-r--r--engines/tinsel/sysvar.h4
-rw-r--r--engines/tinsel/text.cpp8
-rw-r--r--engines/tinsel/text.h6
-rw-r--r--engines/tinsel/tinlib.cpp26
-rw-r--r--engines/tinsel/tinlib.h2
29 files changed, 256 insertions, 256 deletions
diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp
index 7a1f9fbf55..1d25723a35 100644
--- a/engines/tinsel/actors.cpp
+++ b/engines/tinsel/actors.cpp
@@ -108,7 +108,7 @@ struct ACTORINFO {
bool bEscOn;
int escEvent;
- COLORREF textColour; // Text colour
+ COLORREF textColor; // Text color
SCNHANDLE playFilm; // revert to this after talks
SCNHANDLE talkFilm; // this be deleted in the future!
@@ -140,7 +140,7 @@ typedef TAGACTOR *PTAGACTOR;
static ACTORINFO *actorInfo = NULL;
-static COLORREF defaultColour = 0; // Text colour
+static COLORREF defaultColor = 0; // Text color
static bool bActorsOn = false;
@@ -479,13 +479,13 @@ void DropActors() {
for (int i = 0; i < NumActors; i++) {
if (TinselV2) {
- // Save text colour
- COLORREF tColour = actorInfo[i].textColour;
+ // Save text color
+ COLORREF tColor = actorInfo[i].textColor;
memset(&actorInfo[i], 0, sizeof(ACTORINFO));
- // Restor text colour
- actorInfo[i].textColour = tColour;
+ // Restor text color
+ actorInfo[i].textColor = tColor;
// Clear extra arrays
memset(zFactors, 0, NumActors);
@@ -1278,7 +1278,7 @@ void SetMoverZ(PMOVER pMover, int y, int32 zFactor) {
/**
* Stores actor's attributes.
- * Currently only the speech colours.
+ * Currently only the speech colors.
*/
void storeActorAttr(int ano, int r1, int g1, int b1) {
assert((ano > 0 && ano <= NumActors) || ano == -1); // illegal actor number
@@ -1288,36 +1288,36 @@ void storeActorAttr(int ano, int r1, int g1, int b1) {
if (b1 > MAX_INTENSITY) b1 = MAX_INTENSITY; // }
if (ano == -1)
- defaultColour = TINSEL_RGB(r1, g1, b1);
+ defaultColor = TINSEL_RGB(r1, g1, b1);
else
- actorInfo[ano - 1].textColour = TINSEL_RGB(r1, g1, b1);
+ actorInfo[ano - 1].textColor = TINSEL_RGB(r1, g1, b1);
}
/**
- * Called from ActorRGB() - Stores actor's speech colour.
+ * Called from ActorRGB() - Stores actor's speech color.
*/
-void SetActorRGB(int ano, COLORREF colour) {
+void SetActorRGB(int ano, COLORREF color) {
assert(ano >= 0 && ano <= NumActors);
if (ano)
- actorInfo[ano - 1].textColour = TO_LE_32(colour);
+ actorInfo[ano - 1].textColor = TO_LE_32(color);
else
- defaultColour = TO_LE_32(colour);
+ defaultColor = TO_LE_32(color);
}
/**
- * Get the actor's stored speech colour.
+ * Get the actor's stored speech color.
* @param ano Actor Id
*/
COLORREF GetActorRGB(int ano) {
// Not used in JAPAN version
assert((ano >= -1) && (ano <= NumActors)); // illegal actor number
- if ((ano == -1) || !actorInfo[ano - 1].textColour)
- return defaultColour;
+ if ((ano == -1) || !actorInfo[ano - 1].textColor)
+ return defaultColor;
else
- return actorInfo[ano - 1].textColour;
+ return actorInfo[ano - 1].textColor;
}
/**
diff --git a/engines/tinsel/actors.h b/engines/tinsel/actors.h
index fbad5d9955..2be42b00e6 100644
--- a/engines/tinsel/actors.h
+++ b/engines/tinsel/actors.h
@@ -109,7 +109,7 @@ void ActorEvent(int ano, TINSEL_EVENT event, PLR_EVENT be);
void storeActorAttr(int ano, int r1, int g1, int b1);
COLORREF GetActorRGB(int ano);
-void SetActorRGB(int ano, COLORREF colour);
+void SetActorRGB(int ano, COLORREF color);
void SetActorZfactor(int ano, uint32 zFactor);
uint32 GetActorZfactor(int ano);
diff --git a/engines/tinsel/background.cpp b/engines/tinsel/background.cpp
index f895ecd2da..50b7ff90f5 100644
--- a/engines/tinsel/background.cpp
+++ b/engines/tinsel/background.cpp
@@ -51,8 +51,8 @@ void InitBackground(const BACKGND *pBgnd) {
// set current background
pCurBgnd = pBgnd;
- // init background sky colour
- SetBgndColour(pBgnd->rgbSkyColour);
+ // init background sky color
+ SetBgndColor(pBgnd->rgbSkyColor);
// start of playfield array
pPlayfield = pBgnd->fieldArray;
diff --git a/engines/tinsel/background.h b/engines/tinsel/background.h
index d0b27e6e40..774a7b286d 100644
--- a/engines/tinsel/background.h
+++ b/engines/tinsel/background.h
@@ -60,7 +60,7 @@ struct PLAYFIELD {
/** multi-playfield background structure - a backgnd is a container of playfields */
struct BACKGND {
- COLORREF rgbSkyColour; ///< background sky colour
+ COLORREF rgbSkyColor; ///< background sky color
Common::Point ptInitWorld; ///< initial world position
Common::Rect rcScrollLimits; ///< scroll limits
int refreshRate; ///< background update process refresh rate
diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp
index 68653b16f4..747fdfe93c 100644
--- a/engines/tinsel/bg.cpp
+++ b/engines/tinsel/bg.cpp
@@ -158,7 +158,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
FadeInFast(NULL);
bDoFadeIn = false;
} else if (TinselV2)
- PokeInTagColour();
+ PokeInTagColor();
for (;;) {
for (int i = 0; i < bgReels; i++) {
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp
index b5b84ceaee..bbccb079b6 100644
--- a/engines/tinsel/bmv.cpp
+++ b/engines/tinsel/bmv.cpp
@@ -81,7 +81,7 @@ namespace Tinsel {
#define BIT0 0x01
#define CD_XSCR 0x04 // Screen has a scroll offset
-#define CD_CMAP 0x08 // Colour map is included
+#define CD_CMAP 0x08 // Color map is included
#define CD_CMND 0x10 // Command is included
#define CD_AUDIO 0x20 // Audio data is included
#define CD_EXTEND 0x40 // Extended modes "A"-"z"
@@ -350,7 +350,7 @@ BMVPlayer::BMVPlayer() {
memset(texts, 0, sizeof(texts));
- talkColour = 0;
+ talkColor = 0;
bigProblemCount = 0;
bIsText = 0;
movieTick = 0;
@@ -382,8 +382,8 @@ void BMVPlayer::MoviePalette(int paletteOffset) {
UpdateDACqueue(1, 255, &moviePal[1]);
// Don't clobber talk
- if (talkColour != 0)
- SetTextPal(talkColour);
+ if (talkColor != 0)
+ SetTextPal(talkColor);
}
void BMVPlayer::InitialiseMovieSound() {
@@ -490,7 +490,7 @@ void BMVPlayer::BmvDrawText(bool bDraw) {
|-------------------------------------------------------|
\*-----------------------------------------------------*/
-void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColour, int duration) {
+void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColor, int duration) {
SCNHANDLE hFont;
int index;
@@ -502,8 +502,8 @@ void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, CO
} else {
// It's a 'talk'
- if (pTalkColour != NULL)
- SetTextPal(*pTalkColour);
+ if (pTalkColor != NULL)
+ SetTextPal(*pTalkColor);
hFont = GetTalkFontHandle();
index = 1;
}
@@ -541,13 +541,13 @@ int BMVPlayer::MovieCommand(char cmd, int commandOffset) {
} else {
if (_vm->_config->_useSubtitles) {
TALK_CMD *pCmd = (TALK_CMD *)(bigBuffer + commandOffset);
- talkColour = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b);
+ talkColor = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b);
MovieText(nullContext, (int16)READ_LE_UINT16(&pCmd->stringId),
(int16)READ_LE_UINT16(&pCmd->x),
(int16)READ_LE_UINT16(&pCmd->y),
0,
- &talkColour,
+ &talkColor,
pCmd->duration);
}
return sz_CMD_TALK_pkt;
@@ -693,7 +693,7 @@ void BMVPlayer::InitialiseBMV() {
bFileEnd = false;
blobsInBuffer = 0;
memset(texts, 0, sizeof(texts));
- talkColour = 0;
+ talkColor = 0;
bigProblemCount = 0;
movieTick = 0;
diff --git a/engines/tinsel/bmv.h b/engines/tinsel/bmv.h
index 99a43e0740..d90d68fc13 100644
--- a/engines/tinsel/bmv.h
+++ b/engines/tinsel/bmv.h
@@ -96,7 +96,7 @@ class BMVPlayer {
int dieFrame;
} texts[2];
- COLORREF talkColour;
+ COLORREF talkColor;
int bigProblemCount;
@@ -143,7 +143,7 @@ private:
void MovieAudio(int audioOffset, int blobs);
void FettleMovieText();
void BmvDrawText(bool bDraw);
- void MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColour, int duration);
+ void MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColor, int duration);
int MovieCommand(char cmd, int commandOffset);
int FollowingPacket(int thisPacket, bool bReallyImportant);
void LoadSlots(int number);
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index 73cad7a68f..64e54ada72 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -449,7 +449,7 @@ static bool bMoveOnUnHide; // Set before start of conversation
//----- Data pertinant to configure (incl. load/save game) -----
-#define COL_MAINBOX TBLUE1 // Base blue colour
+#define COL_MAINBOX TBLUE1 // Base blue color
#define COL_BOX TBLUE1
#define COL_HILIGHT TBLUE4
@@ -1639,7 +1639,7 @@ static void Select(int i, bool force) {
switch (cd.box[i].boxType) {
case RGROUP:
iconArray[HL2] = RectangleObject(BgPal(),
- (TinselV2 ? HighlightColour() : COL_HILIGHT), cd.box[i].w, cd.box[i].h);
+ (TinselV2 ? HighlightColor() : COL_HILIGHT), cd.box[i].w, cd.box[i].h);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), iconArray[HL2]);
MultiSetAniXY(iconArray[HL2],
InvD[ino].inventoryX + cd.box[i].xpos,
@@ -2277,7 +2277,7 @@ static void InvBoxes(bool InBody, int curX, int curY) {
cd.box[cd.pointBox].boxType == AATBUT ||
cd.box[cd.pointBox].boxType == AABUT) {
iconArray[HL1] = RectangleObject(BgPal(),
- (TinselV2 ? HighlightColour() : COL_HILIGHT),
+ (TinselV2 ? HighlightColor() : COL_HILIGHT),
cd.box[cd.pointBox].w, cd.box[cd.pointBox].h);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), iconArray[HL1]);
MultiSetAniXY(iconArray[HL1],
@@ -2736,7 +2736,7 @@ static void AddBox(int *pi, const int i) {
break;
// Give us a box
- iconArray[*pi] = RectangleObject(BgPal(), TinselV2 ? BoxColour() : COL_BOX,
+ iconArray[*pi] = RectangleObject(BgPal(), TinselV2 ? BoxColor() : COL_BOX,
cd.box[i].w, cd.box[i].h);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), iconArray[*pi]);
MultiSetAniXY(iconArray[*pi], x, y);
diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp
index a82285b12f..99a8b9ff14 100644
--- a/engines/tinsel/faders.cpp
+++ b/engines/tinsel/faders.cpp
@@ -37,7 +37,7 @@ namespace Tinsel {
/** structure used by the "FadeProcess" process */
struct FADE {
- const long *pColourMultTable; // list of fixed point colour multipliers - terminated with negative entry
+ const long *pColorMultTable; // list of fixed point color multipliers - terminated with negative entry
PALQ *pPalQ; // palette queue entry to fade
};
@@ -46,42 +46,42 @@ struct FADE {
//const long fadein[] = {0, 0x1000, 0x3000, 0x5000, 0x7000, 0x9000, 0xb000, 0xd000, 0x10000L, -1};
/**
- * Scale 'colour' by the fixed point colour multiplier 'colourMult'
- * @param colour Colour to scale
- * @param colourMult Fixed point multiplier
+ * Scale 'color' by the fixed point color multiplier 'colorMult'
+ * @param color Color to scale
+ * @param colorMult Fixed point multiplier
*/
-static COLORREF ScaleColour(COLORREF colour, uint32 colourMult) {
+static COLORREF ScaleColor(COLORREF color, uint32 colorMult) {
// apply multiplier to RGB components
- uint32 red = ((TINSEL_GetRValue(colour) * colourMult) << 8) >> 24;
- uint32 green = ((TINSEL_GetGValue(colour) * colourMult) << 8) >> 24;
- uint32 blue = ((TINSEL_GetBValue(colour) * colourMult) << 8) >> 24;
+ uint32 red = ((TINSEL_GetRValue(color) * colorMult) << 8) >> 24;
+ uint32 green = ((TINSEL_GetGValue(color) * colorMult) << 8) >> 24;
+ uint32 blue = ((TINSEL_GetBValue(color) * colorMult) << 8) >> 24;
- // return new colour
+ // return new color
return TINSEL_RGB(red, green, blue);
}
/**
- * Applies the fixed point multiplier 'mult' to all colours in
- * 'pOrig' to produce 'pNew'. Each colour in the palette will be
+ * Applies the fixed point multiplier 'mult' to all colors in
+ * 'pOrig' to produce 'pNew'. Each color in the palette will be
* multiplied by 'mult'.
* @param pNew Pointer to new palette
* @param pOrig Pointer to original palette
- * @param numColours Number of colours in the above palettes
+ * @param numColors Number of colors in the above palettes
* @param mult Fixed point multiplier
*/
-static void FadePalette(COLORREF *pNew, COLORREF *pOrig, int numColours, uint32 mult) {
- for (int i = 0; i < numColours; i++, pNew++, pOrig++) {
+static void FadePalette(COLORREF *pNew, COLORREF *pOrig, int numColors, uint32 mult) {
+ for (int i = 0; i < numColors; i++, pNew++, pOrig++) {
if (!TinselV2)
// apply multiplier to RGB components
- *pNew = ScaleColour(*pOrig, mult);
- else if (i == (TalkColour() - 1)) {
- *pNew = GetTalkColourRef();
- *pNew = ScaleColour(*pNew, mult);
- } else if (SysVar(SV_TAGCOLOUR) && i == (SysVar(SV_TAGCOLOUR) - 1)) {
+ *pNew = ScaleColor(*pOrig, mult);
+ else if (i == (TalkColor() - 1)) {
+ *pNew = GetTalkColorRef();
+ *pNew = ScaleColor(*pNew, mult);
+ } else if (SysVar(SV_TAGCOLOR) && i == (SysVar(SV_TAGCOLOR) - 1)) {
*pNew = GetTagColorRef();
- *pNew = ScaleColour(*pNew, mult);
+ *pNew = ScaleColor(*pNew, mult);
} else {
- *pNew = ScaleColour(*pOrig, mult);
+ *pNew = ScaleColor(*pOrig, mult);
}
}
}
@@ -94,8 +94,8 @@ static void FadePalette(COLORREF *pNew, COLORREF *pOrig, int numColours, uint32
static void FadeProcess(CORO_PARAM, const void *param) {
// COROUTINE
CORO_BEGIN_CONTEXT;
- COLORREF fadeRGB[MAX_COLOURS]; // local copy of palette
- const long *pColMult; // pointer to colour multiplier table
+ COLORREF fadeRGB[MAX_COLORS]; // local copy of palette
+ const long *pColMult; // pointer to color multiplier table
PALETTE *pPalette; // pointer to palette
CORO_END_CONTEXT(_ctx);
@@ -111,19 +111,19 @@ static void FadeProcess(CORO_PARAM, const void *param) {
// get pointer to palette - reduce pointer indirection a bit
_ctx->pPalette = (PALETTE *)LockMem(pFade->pPalQ->hPal);
- for (_ctx->pColMult = pFade->pColourMultTable; *_ctx->pColMult >= 0; _ctx->pColMult++) {
+ for (_ctx->pColMult = pFade->pColorMultTable; *_ctx->pColMult >= 0; _ctx->pColMult++) {
// go through all multipliers in table - until a negative entry
// fade palette using next multiplier
if (TinselV2)
FadePalette(_ctx->fadeRGB, pFade->pPalQ->palRGB,
- pFade->pPalQ->numColours, (uint32) *_ctx->pColMult);
+ pFade->pPalQ->numColors, (uint32) *_ctx->pColMult);
else
FadePalette(_ctx->fadeRGB, _ctx->pPalette->palRGB,
- FROM_LE_32(_ctx->pPalette->numColours), (uint32) *_ctx->pColMult);
+ FROM_LE_32(_ctx->pPalette->numColors), (uint32) *_ctx->pColMult);
// send new palette to video DAC
- UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_LE_32(_ctx->pPalette->numColours), _ctx->fadeRGB);
+ UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_LE_32(_ctx->pPalette->numColors), _ctx->fadeRGB);
// allow time for video DAC to be updated
CORO_SLEEP(1);
@@ -139,7 +139,7 @@ static void FadeProcess(CORO_PARAM, const void *param) {
/**
* Generic palette fader/unfader. Creates a 'FadeProcess' process
* for each palette that is to fade.
- * @param multTable Fixed point colour multiplier table
+ * @param multTable Fixed point color multiplier table
* @param noFadeTable List of palettes not to fade
*/
static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) {
@@ -175,7 +175,7 @@ static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) {
FADE fade;
// fill in FADE struct
- fade.pColourMultTable = multTable;
+ fade.pColorMultTable = multTable;
fade.pPalQ = pPal;
// create a fader process for this palette
@@ -210,7 +210,7 @@ void FadeOutFast(SCNHANDLE noFadeTable[]) {
}
/**
- * Fades a list of palettes from black to their current colours.
+ * Fades a list of palettes from black to their current colors.
* 'noFadeTable' is a NULL terminated list of palettes not to fade.
*/
void FadeInMedium(SCNHANDLE noFadeTable[]) {
@@ -223,7 +223,7 @@ void FadeInMedium(SCNHANDLE noFadeTable[]) {
}
/**
- * Fades a list of palettes from black to their current colours.
+ * Fades a list of palettes from black to their current colors.
* @param noFadeTable A NULL terminated list of palettes not to fade.
*/
void FadeInFast(SCNHANDLE noFadeTable[]) {
@@ -234,10 +234,10 @@ void FadeInFast(SCNHANDLE noFadeTable[]) {
Fader(fadein, noFadeTable);
}
-void PokeInTagColour() {
- if (SysVar(SV_TAGCOLOUR)) {
+void PokeInTagColor() {
+ if (SysVar(SV_TAGCOLOR)) {
const COLORREF c = GetActorRGB(-1);
- UpdateDACqueue(SysVar(SV_TAGCOLOUR), c);
+ UpdateDACqueue(SysVar(SV_TAGCOLOR), c);
}
}
diff --git a/engines/tinsel/faders.h b/engines/tinsel/faders.h
index e77bff2661..b30a26d893 100644
--- a/engines/tinsel/faders.h
+++ b/engines/tinsel/faders.h
@@ -50,7 +50,7 @@ void FadeOutMedium(SCNHANDLE noFadeTable[]);
void FadeOutFast(SCNHANDLE noFadeTable[]);
void FadeInMedium(SCNHANDLE noFadeTable[]);
void FadeInFast(SCNHANDLE noFadeTable[]);
-void PokeInTagColour();
+void PokeInTagColor();
} // End of namespace Tinsel
diff --git a/engines/tinsel/font.cpp b/engines/tinsel/font.cpp
index 4c76d12400..f57a6d5d54 100644
--- a/engines/tinsel/font.cpp
+++ b/engines/tinsel/font.cpp
@@ -118,10 +118,10 @@ void FettleFontPal(SCNHANDLE fontPal) {
else
pImg->hImgPal = 0;
- if (TinselV2 && SysVar(SV_TAGCOLOUR)) {
+ if (TinselV2 && SysVar(SV_TAGCOLOR)) {
const COLORREF c = GetActorRGB(-1);
SetTagColorRef(c);
- UpdateDACqueue(SysVar(SV_TAGCOLOUR), c);
+ UpdateDACqueue(SysVar(SV_TAGCOLOR), c);
}
}
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index aefc6e6144..0b550f50f3 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -41,7 +41,7 @@ namespace Tinsel {
#define CHAR_WIDTH 4
#define CHAR_HEIGHT 4
-extern uint8 transPalette[MAX_COLOURS];
+extern uint8 transPalette[MAX_COLORS];
//----------------- SUPPORT FUNCTIONS ---------------------
@@ -175,14 +175,14 @@ static void t0WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
x += clipAmount;
if (repeatFlag) {
- // Repeat of a given colour
- uint8 colour = (numBytes >> 8) & 0xff;
+ // Repeat of a given color
+ uint8 color = (numBytes >> 8) & 0xff;
int runLength = (numBytes & 0xff) - clipAmount;
int rptLength = MAX(MIN(runLength, pObj->width - rightClip - x), 0);
if (yClip == 0) {
- if (colour != 0)
- memset(tempDest, colour, rptLength);
+ if (color != 0)
+ memset(tempDest, color, rptLength);
tempDest += rptLength;
}
@@ -470,18 +470,18 @@ static void t2WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
x+= clipAmount;
int runLength = numBytes - clipAmount;
- uint8 colour = *srcP++;
+ uint8 color = *srcP++;
- if ((yClip == 0) && (runLength > 0) && (colour != 0)) {
+ if ((yClip == 0) && (runLength > 0) && (color != 0)) {
runLength = MIN(runLength, pObj->width - rightClip - x);
if (runLength > 0) {
// Non-transparent run length
- colour += pObj->constant;
+ color += pObj->constant;
if (horizFlipped)
- Common::set_to(tempP - runLength + 1, tempP + 1, colour);
+ Common::set_to(tempP - runLength + 1, tempP + 1, color);
else
- Common::set_to(tempP, tempP + runLength, colour);
+ Common::set_to(tempP, tempP + runLength, color);
}
}
@@ -521,7 +521,7 @@ static void t2WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
}
/**
- * Fill the destination area with a constant colour
+ * Fill the destination area with a constant color
*/
static void WrtConst(DRAWOBJECT *pObj, uint8 *destP, bool applyClipping) {
if (applyClipping) {
@@ -595,11 +595,11 @@ static void WrtAll(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool applyClippi
*/
static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
bool applyClipping, bool horizFlipped, int packingType) {
- uint8 numColours = 0;
- uint8 *colourTable = NULL;
+ uint8 numColors = 0;
+ uint8 *colorTable = NULL;
int topClip = 0;
int xOffset = 0;
- int numBytes, colour;
+ int numBytes, color;
int v;
if (_vm->getLanguage() == Common::RU_RUS) {
@@ -625,10 +625,10 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
}
if (packingType == 3) {
- // Variable colours
- numColours = *srcP++;
- colourTable = srcP;
- srcP += numColours;
+ // Variable colors
+ numColors = *srcP++;
+ colorTable = srcP;
+ srcP += numColors;
}
for (int y = 0; y < pObj->height; ++y) {
@@ -646,7 +646,7 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
int x = 0;
while (x < pObj->width) {
- // Get next run size and colour to use
+ // Get next run size and color to use
for (;;) {
if (xOffset > 0) {
x += xOffset;
@@ -663,9 +663,9 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
v = *srcP++;
numBytes = v & 0xf; // No. bytes 1-15
if (packingType == 3)
- colour = colourTable[v >> 4];
+ color = colorTable[v >> 4];
else
- colour = pObj->baseCol + (v >> 4);
+ color = pObj->baseCol + (v >> 4);
if (numBytes != 0)
break;
@@ -693,7 +693,7 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
while (numBytes-- > 0) {
if ((topClip == 0) && (x < (pObj->width - rightClip))) {
- *tempP = colour;
+ *tempP = color;
if (horizFlipped) --tempP; else ++tempP;
}
++x;
@@ -830,7 +830,7 @@ void DrawObject(DRAWOBJECT *pObj) {
int packType = pObj->flags >> 14;
if (packType == 0) {
- // No colour packing
+ // No color packing
switch (typeId) {
case 0x01:
case 0x11:
@@ -865,7 +865,7 @@ void DrawObject(DRAWOBJECT *pObj) {
} else {
// 1 = 16 from 240
// 2 = 16 from 224
- // 3 = variable colour
+ // 3 = variable color
if (packType == 1) pObj->baseCol = 0xF0;
else if (packType == 2) pObj->baseCol = 0xE0;
diff --git a/engines/tinsel/graphics.h b/engines/tinsel/graphics.h
index 8b8bb6488d..de16082441 100644
--- a/engines/tinsel/graphics.h
+++ b/engines/tinsel/graphics.h
@@ -43,7 +43,7 @@ struct DRAWOBJECT {
int transOffset; // transparent character offset
int flags; // object flags - see above for list
PALQ *pPal; // objects palette Q position
- int constant; // which colour in palette for monochrome objects
+ int constant; // which color in palette for monochrome objects
int width; // width of object
int height; // height of object
SCNHANDLE hBits; // image bitmap handle
diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp
index bf31cdfa25..1aac68c7f0 100644
--- a/engines/tinsel/object.cpp
+++ b/engines/tinsel/object.cpp
@@ -482,11 +482,11 @@ void AnimateObject(OBJECT *pAniObj, SCNHANDLE hNewImg) {
* Creates a rectangle object of the given dimensions and returns
* a pointer to the object.
* @param hPal Palette for the rectangle object
- * @param colour Which colour offset from the above palette
+ * @param color Which color offset from the above palette
* @param width Width of rectangle
* @param height Height of rectangle
*/
-OBJECT *RectangleObject(SCNHANDLE hPal, int colour, int width, int height) {
+OBJECT *RectangleObject(SCNHANDLE hPal, int color, int width, int height) {
// template for initialising the rectangle object
static const OBJ_INIT rectObj = {0, DMA_CONST, OID_EFFECTS, 0, 0, 0};
PALQ *pPalQ; // palette queue pointer
@@ -503,8 +503,8 @@ OBJECT *RectangleObject(SCNHANDLE hPal, int colour, int width, int height) {
// assign palette to object
pRect->pPal = pPalQ;
- // set colour in the palette
- pRect->constant = colour;
+ // set color in the palette
+ pRect->constant = color;
// set rectangle width
pRect->width = width;
diff --git a/engines/tinsel/object.h b/engines/tinsel/object.h
index a000dee72c..9f10c06cd2 100644
--- a/engines/tinsel/object.h
+++ b/engines/tinsel/object.h
@@ -87,7 +87,7 @@ struct OBJECT {
Common::Rect rcPrev; ///< previous screen coordinates of object bounding rectangle
int flags; ///< object flags - see above for list
PALQ *pPal; ///< objects palette Q position
- int constant; ///< which colour in palette for monochrome objects
+ int constant; ///< which color in palette for monochrome objects
int width; ///< width of object
int height; ///< height of object
SCNHANDLE hBits; ///< image bitmap handle
@@ -184,7 +184,7 @@ void HideObject( // Hides a object by giving it a "NullImage" image pointer
OBJECT *RectangleObject( // create a rectangle object of the given dimensions
SCNHANDLE hPal, // palette for the rectangle object
- int colour, // which colour offset from the above palette
+ int color, // which color offset from the above palette
int width, // width of rectangle
int height); // height of rectangle
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index a0ceec54eb..2d2ebd6f60 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -41,12 +41,12 @@ namespace Tinsel {
struct VIDEO_DAC_Q {
union {
SCNHANDLE hRGBarray; ///< handle of palette or
- COLORREF *pRGBarray; ///< list of palette colours
+ COLORREF *pRGBarray; ///< list of palette colors
COLORREF singleRGB;
} pal;
bool bHandle; ///< when set - use handle of palette
int destDACindex; ///< start index of palette in video DAC
- int numColours; ///< number of colours in "hRGBarray"
+ int numColors; ///< number of colors in "hRGBarray"
};
@@ -67,13 +67,13 @@ static VIDEO_DAC_Q vidDACdata[VDACQLENGTH];
/** video DAC transfer Q head pointer */
static VIDEO_DAC_Q *pDAChead;
-/** colour index of the 4 colours used for the translucent palette */
+/** color index of the 4 colors used for the translucent palette */
#define COL_HILIGHT TBLUE1
/** the translucent palette lookup table */
-uint8 transPalette[MAX_COLOURS]; // used in graphics.cpp
+uint8 transPalette[MAX_COLORS]; // used in graphics.cpp
-uint8 ghostPalette[MAX_COLOURS];
+uint8 ghostPalette[MAX_COLORS];
static int translucentIndex = 228;
@@ -111,7 +111,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) {
}
// Check for correspondent color
- for (uint i = 0; (i < FROM_LE_32(pal->numColours)) && !colorFound; i++) {
+ for (uint i = 0; (i < FROM_LE_32(pal->numColors)) && !colorFound; i++) {
// get R G B values in the same way as psx format converters
uint16 psxEquivalent = TINSEL_PSX_RGB(TINSEL_GetRValue(pal->palRGB[i]) >> 3, TINSEL_GetGValue(pal->palRGB[i]) >> 3, TINSEL_GetBValue(pal->palRGB[i]) >> 3);
@@ -138,15 +138,15 @@ void PalettesToVideoDAC() {
// while Q is not empty
while (pDAChead != pDACtail) {
const PALETTE *pPalette; // pointer to hardware palette
- const COLORREF *pColours; // pointer to list of RGB triples
+ const COLORREF *pColors; // pointer to list of RGB triples
#ifdef DEBUG
// make sure palette does not overlap
- assert(pDACtail->destDACindex + pDACtail->numColours <= MAX_COLOURS);
+ assert(pDACtail->destDACindex + pDACtail->numColors <= MAX_COLORS);
#else
// make sure palette does not overlap
- if (pDACtail->destDACindex + pDACtail->numColours > MAX_COLOURS)
- pDACtail->numColours = MAX_COLOURS - pDACtail->destDACindex;
+ if (pDACtail->destDACindex + pDACtail->numColors > MAX_COLORS)
+ pDACtail->numColors = MAX_COLORS - pDACtail->destDACindex;
#endif
if (pDACtail->bHandle) {
@@ -156,23 +156,23 @@ void PalettesToVideoDAC() {
pPalette = (const PALETTE *)LockMem(pDACtail->pal.hRGBarray);
// get RGB pointer
- pColours = pPalette->palRGB;
- } else if (pDACtail->numColours == 1) {
+ pColors = pPalette->palRGB;
+ } else if (pDACtail->numColors == 1) {
// we are using a single color palette
- pColours = &pDACtail->pal.singleRGB;
+ pColors = &pDACtail->pal.singleRGB;
} else {
// we are using a palette pointer
- pColours = pDACtail->pal.pRGBarray;
+ pColors = pDACtail->pal.pRGBarray;
}
- for (int i = 0; i < pDACtail->numColours; ++i) {
- pal[i * 3 + 0] = TINSEL_GetRValue(pColours[i]);
- pal[i * 3 + 1] = TINSEL_GetGValue(pColours[i]);
- pal[i * 3 + 2] = TINSEL_GetBValue(pColours[i]);
+ for (int i = 0; i < pDACtail->numColors; ++i) {
+ pal[i * 3 + 0] = TINSEL_GetRValue(pColors[i]);
+ pal[i * 3 + 1] = TINSEL_GetGValue(pColors[i]);
+ pal[i * 3 + 2] = TINSEL_GetBValue(pColors[i]);
}
// update the system palette
- g_system->getPaletteManager()->setPalette(pal, pDACtail->destDACindex, pDACtail->numColours);
+ g_system->getPaletteManager()->setPalette(pal, pDACtail->destDACindex, pDACtail->numColors);
// update tail pointer
pDACtail++;
@@ -216,15 +216,15 @@ void PaletteStats() {
/**
* Places a palette in the video DAC queue.
* @param posInDAC Position in video DAC
- * @param numColours Number of colours in palette
+ * @param numColors Number of colors in palette
* @param hPalette Handle to palette
*/
-void UpdateDACqueueHandle(int posInDAC, int numColours, SCNHANDLE hPalette) {
+void UpdateDACqueueHandle(int posInDAC, int numColors, SCNHANDLE hPalette) {
// check Q overflow
assert(pDAChead < vidDACdata + VDACQLENGTH);
pDAChead->destDACindex = posInDAC & ~PALETTE_MOVED; // set index in video DAC
- pDAChead->numColours = numColours; // set number of colours
+ pDAChead->numColors = numColors; // set number of colors
pDAChead->pal.hRGBarray = hPalette; // set handle of palette
pDAChead->bHandle = true; // we are using a palette handle
@@ -240,19 +240,19 @@ void UpdateDACqueueHandle(int posInDAC, int numColours, SCNHANDLE hPalette) {
/**
* Places a palette in the video DAC queue.
* @param posInDAC Position in video DAC
- * @param numColours Number of colours in palette
- * @param pColours List of RGB triples
+ * @param numColors Number of colors in palette
+ * @param pColors List of RGB triples
*/
-void UpdateDACqueue(int posInDAC, int numColours, COLORREF *pColours) {
+void UpdateDACqueue(int posInDAC, int numColors, COLORREF *pColors) {
// check Q overflow
assert(pDAChead < vidDACdata + NUM_PALETTES);
pDAChead->destDACindex = posInDAC & ~PALETTE_MOVED; // set index in video DAC
- pDAChead->numColours = numColours; // set number of colours
- if (numColours == 1)
- pDAChead->pal.singleRGB = *pColours; // set single color of which the "palette" consists
+ pDAChead->numColors = numColors; // set number of colors
+ if (numColors == 1)
+ pDAChead->pal.singleRGB = *pColors; // set single color of which the "palette" consists
else
- pDAChead->pal.pRGBarray = pColours; // set addr of palette
+ pDAChead->pal.pRGBarray = pColors; // set addr of palette
pDAChead->bHandle = false; // we are not using a palette handle
// update head pointer
@@ -275,7 +275,7 @@ void UpdateDACqueue(int posInDAC, COLORREF color) {
assert(pDAChead < vidDACdata + NUM_PALETTES);
pDAChead->destDACindex = posInDAC & ~PALETTE_MOVED; // set index in video DAC
- pDAChead->numColours = 1; // set number of colours
+ pDAChead->numColors = 1; // set number of colors
pDAChead->pal.singleRGB = color; // set single color of which the "palette" consists
pDAChead->bHandle = false; // we are not using a palette handle
@@ -294,7 +294,7 @@ void UpdateDACqueue(int posInDAC, COLORREF color) {
*/
PALQ *AllocPalette(SCNHANDLE hNewPal) {
PALQ *pPrev, *p; // walks palAllocData
- int iDAC; // colour index in video DAC
+ int iDAC; // color index in video DAC
PALQ *pNxtPal; // next PALQ struct in palette allocator
PALETTE *pNewPal;
@@ -311,7 +311,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
}
// search all structs in palette allocator - find a free slot
- iDAC = FGND_DAC_INDEX; // init DAC index to first available foreground colour
+ iDAC = FGND_DAC_INDEX; // init DAC index to first available foreground color
for (p = palAllocData; p < palAllocData + NUM_PALETTES; p++) {
if (p->hPal == 0) {
@@ -319,11 +319,11 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
p->objCount = 1; // init number of objects using palette
p->posInDAC = iDAC; // set palettes start pos in video DAC
p->hPal = hNewPal; // set hardware palette data
- p->numColours = FROM_LE_32(pNewPal->numColours); // set number of colours in palette
+ p->numColors = FROM_LE_32(pNewPal->numColors); // set number of colors in palette
if (TinselV2)
- // Copy all the colours
- memcpy(p->palRGB, pNewPal->palRGB, p->numColours * sizeof(COLORREF));
+ // Copy all the colors
+ memcpy(p->palRGB, pNewPal->palRGB, p->numColors * sizeof(COLORREF));
#ifdef DEBUG
// one more palette in use
@@ -333,30 +333,30 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
// Q the change to the video DAC
if (TinselV2)
- UpdateDACqueue(p->posInDAC, p->numColours, p->palRGB);
+ UpdateDACqueue(p->posInDAC, p->numColors, p->palRGB);
else
- UpdateDACqueueHandle(p->posInDAC, p->numColours, p->hPal);
+ UpdateDACqueueHandle(p->posInDAC, p->numColors, p->hPal);
// move all palettes after this one down (if necessary)
for (pPrev = p, pNxtPal = pPrev + 1; pNxtPal < palAllocData + NUM_PALETTES; pNxtPal++) {
if (pNxtPal->hPal != 0) {
// palette slot is in use
- if (pNxtPal->posInDAC >= pPrev->posInDAC + pPrev->numColours)
+ if (pNxtPal->posInDAC >= pPrev->posInDAC + pPrev->numColors)
// no need to move palettes down
break;
// move palette down - indicate change
pNxtPal->posInDAC = (pPrev->posInDAC
- + pPrev->numColours) | PALETTE_MOVED;
+ + pPrev->numColors) | PALETTE_MOVED;
// Q the palette change in position to the video DAC
if (!TinselV2)
UpdateDACqueueHandle(pNxtPal->posInDAC,
- pNxtPal->numColours,
+ pNxtPal->numColors,
pNxtPal->hPal);
else if (!pNxtPal->bFading)
UpdateDACqueue(pNxtPal->posInDAC,
- pNxtPal->numColours,
+ pNxtPal->numColors,
pNxtPal->palRGB);
// update previous palette to current palette
@@ -369,7 +369,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
}
// set new DAC index
- iDAC = p->posInDAC + p->numColours;
+ iDAC = p->posInDAC + p->numColors;
}
// no free palettes
@@ -431,43 +431,43 @@ void SwapPalette(PALQ *pPalQ, SCNHANDLE hNewPal) {
// validate palette Q pointer
assert(pPalQ >= palAllocData && pPalQ <= palAllocData + NUM_PALETTES - 1);
- if (pPalQ->numColours >= (int)FROM_LE_32(pNewPal->numColours)) {
+ if (pPalQ->numColors >= (int)FROM_LE_32(pNewPal->numColors)) {
// new palette will fit the slot
// install new palette
pPalQ->hPal = hNewPal;
if (TinselV2) {
- pPalQ->numColours = FROM_LE_32(pNewPal->numColours);
+ pPalQ->numColors = FROM_LE_32(pNewPal->numColors);
- // Copy all the colours
- memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColours) * sizeof(COLORREF));
+ // Copy all the colors
+ memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColors) * sizeof(COLORREF));
if (!pPalQ->bFading)
// Q the change to the video DAC
- UpdateDACqueue(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColours), pPalQ->palRGB);
+ UpdateDACqueue(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), pPalQ->palRGB);
} else {
// Q the change to the video DAC
- UpdateDACqueueHandle(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColours), hNewPal);
+ UpdateDACqueueHandle(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), hNewPal);
}
} else {
- // # colours are different - will have to update all following palette entries
+ // # colors are different - will have to update all following palette entries
assert(!TinselV2); // Fatal error for Tinsel 2
PALQ *pNxtPalQ; // next palette queue position
for (pNxtPalQ = pPalQ + 1; pNxtPalQ < palAllocData + NUM_PALETTES; pNxtPalQ++) {
- if (pNxtPalQ->posInDAC >= pPalQ->posInDAC + pPalQ->numColours)
+ if (pNxtPalQ->posInDAC >= pPalQ->posInDAC + pPalQ->numColors)
// no need to move palettes down
break;
// move palette down
pNxtPalQ->posInDAC = (pPalQ->posInDAC
- + pPalQ->numColours) | PALETTE_MOVED;
+ + pPalQ->numColors) | PALETTE_MOVED;
// Q the palette change in position to the video DAC
UpdateDACqueueHandle(pNxtPalQ->posInDAC,
- pNxtPalQ->numColours,
+ pNxtPalQ->numColors,
pNxtPalQ->hPal);
// update previous palette to current palette
@@ -501,12 +501,12 @@ PALQ *GetNextPalette(PALQ *pStrtPal) {
}
/**
- * Sets the current background colour.
- * @param colour Colour to set the background to
+ * Sets the current background color.
+ * @param color Color to set the background to
*/
-void SetBgndColour(COLORREF colour) {
- // update background colour struct by queuing the change to the video DAC
- UpdateDACqueue(BGND_DAC_INDEX, colour);
+void SetBgndColor(COLORREF color) {
+ // update background color struct by queuing the change to the video DAC
+ UpdateDACqueue(BGND_DAC_INDEX, color);
}
/**
@@ -544,23 +544,23 @@ void CreateTranslucentPalette(SCNHANDLE hPalette) {
// get a pointer to the palette
PALETTE *pPal = (PALETTE *)LockMem(hPalette);
- // leave background colour alone
+ // leave background color alone
transPalette[0] = 0;
- for (uint i = 0; i < FROM_LE_32(pPal->numColours); i++) {
- // get the RGB colour model values
+ for (uint i = 0; i < FROM_LE_32(pPal->numColors); i++) {
+ // get the RGB color model values
uint8 red = TINSEL_GetRValue(pPal->palRGB[i]);
uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
uint8 blue = TINSEL_GetBValue(pPal->palRGB[i]);
- // calculate the Value field of the HSV colour model
+ // calculate the Value field of the HSV color model
unsigned val = (red > green) ? red : green;
val = (val > blue) ? val : blue;
- // map the Value field to one of the 4 colours reserved for the translucent palette
+ // map the Value field to one of the 4 colors reserved for the translucent palette
val /= 63;
transPalette[i + 1] = (uint8)((val == 0) ? 0 : val +
- (TinselV2 ? TranslucentColour() : COL_HILIGHT) - 1);
+ (TinselV2 ? TranslucentColor() : COL_HILIGHT) - 1);
}
}
@@ -572,20 +572,20 @@ void CreateGhostPalette(SCNHANDLE hPalette) {
PALETTE *pPal = (PALETTE *)LockMem(hPalette);
int i;
- // leave background colour alone
+ // leave background color alone
ghostPalette[0] = 0;
- for (i = 0; i < (int)FROM_LE_32(pPal->numColours); i++) {
- // get the RGB colour model values
+ for (i = 0; i < (int)FROM_LE_32(pPal->numColors); i++) {
+ // get the RGB color model values
uint8 red = TINSEL_GetRValue(pPal->palRGB[i]);
uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
uint8 blue = TINSEL_GetBValue(pPal->palRGB[i]);
- // calculate the Value field of the HSV colour model
+ // calculate the Value field of the HSV color model
unsigned val = (red > green) ? red : green;
val = (val > blue) ? val : blue;
- // map the Value field to one of the 4 colours reserved for the translucent palette
+ // map the Value field to one of the 4 colors reserved for the translucent palette
val /= 64;
assert(/*val >= 0 &&*/ val <= 3);
ghostPalette[i + 1] = (uint8)(val + SysVar(ISV_GHOST_BASE));
@@ -594,25 +594,25 @@ void CreateGhostPalette(SCNHANDLE hPalette) {
/**
- * Returns an adjusted colour RGB
- * @param colour Colour to scale
+ * Returns an adjusted color RGB
+ * @param color Color to scale
*/
-static COLORREF DimColour(COLORREF colour, int factor) {
+static COLORREF DimColor(COLORREF color, int factor) {
uint32 red, green, blue;
if (factor == 10) {
// No change
- return colour;
+ return color;
} else if (factor == 0) {
// No brightness
return 0;
} else {
// apply multiplier to RGB components
- red = TINSEL_GetRValue(colour) * factor / 10;
- green = TINSEL_GetGValue(colour) * factor / 10;
- blue = TINSEL_GetBValue(colour) * factor / 10;
+ red = TINSEL_GetRValue(color) * factor / 10;
+ green = TINSEL_GetGValue(color) * factor / 10;
+ blue = TINSEL_GetBValue(color) * factor / 10;
- // return new colour
+ // return new color
return TINSEL_RGB(red, green, blue);
}
}
@@ -620,10 +620,10 @@ static COLORREF DimColour(COLORREF colour, int factor) {
/**
* DimPartPalette
*/
-void DimPartPalette(SCNHANDLE hDimPal, int startColour, int length, int brightness) {
+void DimPartPalette(SCNHANDLE hDimPal, int startColor, int length, int brightness) {
PALQ *pPalQ;
PALETTE *pDimPal;
- int iColour;
+ int iColor;
pPalQ = FindPalette(hDimPal);
assert(pPalQ);
@@ -631,42 +631,42 @@ void DimPartPalette(SCNHANDLE hDimPal, int startColour, int length, int brightne
// get pointer to dim palette
pDimPal = (PALETTE *)LockMem(hDimPal);
- // Adjust for the fact that palettes don't contain colour 0
- startColour -= 1;
+ // Adjust for the fact that palettes don't contain color 0
+ startColor -= 1;
// Check some other things
- if (startColour + length > pPalQ->numColours)
- error("DimPartPalette(): colour overrun");
+ if (startColor + length > pPalQ->numColors)
+ error("DimPartPalette(): color overrun");
- for (iColour = startColour; iColour < startColour + length; iColour++) {
- pPalQ->palRGB[iColour] = DimColour(pDimPal->palRGB[iColour], brightness);
+ for (iColor = startColor; iColor < startColor + length; iColor++) {
+ pPalQ->palRGB[iColor] = DimColor(pDimPal->palRGB[iColor], brightness);
}
if (!pPalQ->bFading) {
// Q the change to the video DAC
- UpdateDACqueue(pPalQ->posInDAC + startColour, length, &pPalQ->palRGB[startColour]);
+ UpdateDACqueue(pPalQ->posInDAC + startColor, length, &pPalQ->palRGB[startColor]);
}
}
-int TranslucentColour() {
+int TranslucentColor() {
return translucentIndex;
}
-int HighlightColour() {
+int HighlightColor() {
UpdateDACqueue(talkIndex, (COLORREF)SysVar(SYS_HighlightRGB));
return talkIndex;
}
-int TalkColour() {
+int TalkColor() {
return TinselV2 ? talkIndex : TALKFONT_COL;
}
-void SetTalkColourRef(COLORREF colRef) {
+void SetTalkColorRef(COLORREF colRef) {
talkColRef = colRef;
}
-COLORREF GetTalkColourRef() {
+COLORREF GetTalkColorRef() {
return talkColRef;
}
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index 9743ee53aa..694eff504d 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -42,14 +42,14 @@ typedef uint32 COLORREF;
#define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10)))
enum {
- MAX_COLOURS = 256, ///< maximum number of colours - for VGA 256
+ MAX_COLORS = 256, ///< maximum number of colors - for VGA 256
BITS_PER_PIXEL = 8, ///< number of bits per pixel for VGA 256
MAX_INTENSITY = 255, ///< the biggest value R, G or B can have
NUM_PALETTES = 32, ///< number of palettes
// Discworld has some fixed apportioned bits in the palette.
- BGND_DAC_INDEX = 0, ///< index of background colour in Video DAC
- FGND_DAC_INDEX = 1, ///< index of first foreground colour in Video DAC
+ BGND_DAC_INDEX = 0, ///< index of background color in Video DAC
+ FGND_DAC_INDEX = 1, ///< index of first foreground color in Video DAC
TBLUE1 = 228, ///< Blue used in translucent rectangles
TBLUE2 = 229, ///< Blue used in translucent rectangles
TBLUE3 = 230, ///< Blue used in translucent rectangles
@@ -57,7 +57,7 @@ enum {
TALKFONT_COL = 233
};
-// some common colours
+// some common colors
#define BLACK (TINSEL_RGB(0, 0, 0))
#define WHITE (TINSEL_RGB(MAX_INTENSITY, MAX_INTENSITY, MAX_INTENSITY))
@@ -73,8 +73,8 @@ enum {
/** hardware palette structure */
struct PALETTE {
- int32 numColours; ///< number of colours in the palette
- COLORREF palRGB[MAX_COLOURS]; ///< actual palette colours
+ int32 numColors; ///< number of colors in the palette
+ COLORREF palRGB[MAX_COLORS]; ///< actual palette colors
} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
@@ -85,10 +85,10 @@ struct PALQ {
SCNHANDLE hPal; ///< handle to palette data struct
int objCount; ///< number of objects using this palette
int posInDAC; ///< palette position in the video DAC
- int numColours; ///< number of colours in the palette
+ int numColors; ///< number of colors in the palette
// Discworld 2 fields
bool bFading; // Whether or not fading
- COLORREF palRGB[MAX_COLOURS]; // actual palette colours
+ COLORREF palRGB[MAX_COLORS]; // actual palette colors
};
#define PALETTE_MOVED 0x8000 // when this bit is set in the "posInDAC"
@@ -114,13 +114,13 @@ void PalettesToVideoDAC(); // Update the video DAC with palettes currently the t
void UpdateDACqueueHandle(
int posInDAC, // position in video DAC
- int numColours, // number of colours in palette
+ int numColors, // number of colors in palette
SCNHANDLE hPalette); // handle to palette
void UpdateDACqueue( // places a palette in the video DAC queue
int posInDAC, // position in video DAC
- int numColours, // number of colours in palette
- COLORREF *pColours); // list of RGB tripples
+ int numColors, // number of colors in palette
+ COLORREF *pColors); // list of RGB tripples
void UpdateDACqueue(int posInDAC, COLORREF color);
@@ -140,10 +140,10 @@ void SwapPalette( // swaps palettes at the specified palette queue position
PALQ *GetNextPalette( // returns the next palette in the queue
PALQ *pStrtPal); // queue position to start from - when NULL will start from beginning of queue
-COLORREF GetBgndColour(); // returns current background colour
+COLORREF GetBgndColor(); // returns current background color
-void SetBgndColour( // sets current background colour
- COLORREF colour); // colour to set the background to
+void SetBgndColor( // sets current background color
+ COLORREF color); // color to set the background to
void FadingPalette(PALQ *pPalQ, bool bFading);
@@ -155,22 +155,22 @@ void NoFadingPalettes(); // All fading processes have just been killed
void DimPartPalette(
SCNHANDLE hPal,
- int startColour,
+ int startColor,
int length,
int brightness); // 0 = black, 10 == 100%
-int TranslucentColour();
+int TranslucentColor();
-#define BoxColour TranslucentColour
+#define BoxColor TranslucentColor
-int HighlightColour();
+int HighlightColor();
-int TalkColour();
+int TalkColor();
-void SetTalkColourRef(COLORREF colRef);
+void SetTalkColorRef(COLORREF colRef);
-COLORREF GetTalkColourRef();
+COLORREF GetTalkColorRef();
void SetTagColorRef(COLORREF colRef);
diff --git a/engines/tinsel/pid.h b/engines/tinsel/pid.h
index 786ccc6327..d6f87bdf98 100644
--- a/engines/tinsel/pid.h
+++ b/engines/tinsel/pid.h
@@ -32,11 +32,11 @@ namespace Tinsel {
#define PID_DESTROY 0x8000 // process id of any process that is to be destroyed between scenes
#define PID_EFFECTS (0x0010 | PID_DESTROY) // generic special effects process id
-#define PID_FLASH (PID_EFFECTS + 1) // flash colour process
-#define PID_CYCLE (PID_EFFECTS + 2) // cycle colour range process
+#define PID_FLASH (PID_EFFECTS + 1) // flash color process
+#define PID_CYCLE (PID_EFFECTS + 2) // cycle color range process
#define PID_MORPH (PID_EFFECTS + 3) // morph process
#define PID_FADER (PID_EFFECTS + 4) // fader process
-#define PID_FADE_BGND (PID_EFFECTS + 5) // fade background colour process
+#define PID_FADE_BGND (PID_EFFECTS + 5) // fade background color process
#define PID_BACKGND (0x0020 | PID_DESTROY) // background update process id
diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp
index 6ea1dd7464..c0878b6849 100644
--- a/engines/tinsel/rince.cpp
+++ b/engines/tinsel/rince.cpp
@@ -60,8 +60,8 @@ static MOVER Movers[MAX_MOVERS]; // FIXME: Avoid non-const global vars
/**
* Called from ActorPalette(), normally once just after the beginning of time.
*/
-void StoreMoverPalette(PMOVER pMover, int startColour, int length) {
- pMover->startColour = startColour;
+void StoreMoverPalette(PMOVER pMover, int startColor, int length) {
+ pMover->startColor = startColor;
pMover->paletteLength = length;
}
@@ -88,7 +88,7 @@ static void CheckBrightness(PMOVER pMover) {
pMover->brightness--; // ramp down
DimPartPalette(BgPal(),
- pMover->startColour,
+ pMover->startColor,
pMover->paletteLength,
pMover->brightness);
}
@@ -107,7 +107,7 @@ void MoverBrightness(PMOVER pMover, int brightness) {
assert(BgPal());
// Do it all immediately
- DimPartPalette(BgPal(), pMover->startColour, pMover->paletteLength, brightness);
+ DimPartPalette(BgPal(), pMover->startColor, pMover->paletteLength, brightness);
// The actor is probably hidden at this point,
pMover->brightness = brightness;
@@ -924,7 +924,7 @@ void SaveMovers(SAVED_MOVER *sMoverInfo) {
if (TinselV2) {
sMoverInfo[i].bHidden = Movers[i].bHidden;
sMoverInfo[i].brightness = Movers[i].brightness;
- sMoverInfo[i].startColour = Movers[i].startColour;
+ sMoverInfo[i].startColor = Movers[i].startColor;
sMoverInfo[i].paletteLength = Movers[i].paletteLength;
}
diff --git a/engines/tinsel/rince.h b/engines/tinsel/rince.h
index 57eac00fa4..b7b621af47 100644
--- a/engines/tinsel/rince.h
+++ b/engines/tinsel/rince.h
@@ -119,7 +119,7 @@ struct MOVER {
int32 zOverride;
bool bHidden;
int brightness; // Current brightness
- int startColour;
+ int startColor;
int paletteLength;
HPOLYGON hRpath; // Recent path
};
@@ -140,7 +140,7 @@ void MoverProcessCreate(int X, int Y, int id, PMOVER pMover);
enum AR_FUNCTION { AR_NORMAL, AR_PUSHREEL, AR_POPREEL, AR_WALKREEL };
-void StoreMoverPalette(PMOVER pMover, int startColour, int length);
+void StoreMoverPalette(PMOVER pMover, int startColor, int length);
void MoverBrightness(PMOVER pMover, int brightness);
@@ -204,7 +204,7 @@ struct SAVED_MOVER {
bool bActive;
bool bHidden;
int brightness;
- int startColour;
+ int startColor;
int paletteLength;
};
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 3182593a88..7a6b5877e8 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -183,7 +183,7 @@ static void syncSavedMover(Common::Serializer &s, SAVED_MOVER &sm) {
s.syncAsByte(sm.bHidden);
s.syncAsSint32LE(sm.brightness);
- s.syncAsSint32LE(sm.startColour);
+ s.syncAsSint32LE(sm.startColor);
s.syncAsSint32LE(sm.paletteLength);
}
}
diff --git a/engines/tinsel/savescn.cpp b/engines/tinsel/savescn.cpp
index a3fe393b79..ef0f5cdc25 100644
--- a/engines/tinsel/savescn.cpp
+++ b/engines/tinsel/savescn.cpp
@@ -226,7 +226,7 @@ static void SortMAProcess(CORO_PARAM, const void *) {
}
ActorPalette(rsd->SavedMoverInfo[_ctx->i].actorID,
- rsd->SavedMoverInfo[_ctx->i].startColour, rsd->SavedMoverInfo[_ctx->i].paletteLength);
+ rsd->SavedMoverInfo[_ctx->i].startColor, rsd->SavedMoverInfo[_ctx->i].paletteLength);
if (rsd->SavedMoverInfo[_ctx->i].brightness != BOGUS_BRIGHTNESS)
ActorBrightness(rsd->SavedMoverInfo[_ctx->i].actorID, rsd->SavedMoverInfo[_ctx->i].brightness);
diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp
index 67e0ea9ffd..80f4c585a7 100644
--- a/engines/tinsel/scene.cpp
+++ b/engines/tinsel/scene.cpp
@@ -381,7 +381,7 @@ void PrimeBackground() {
// structure for background
static const BACKGND backgnd = {
- BLACK, // sky colour
+ BLACK, // sky color
Common::Point(0, 0), // initial world pos
Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), // scroll limits
0, // no background update process
diff --git a/engines/tinsel/sysvar.cpp b/engines/tinsel/sysvar.cpp
index 7003d34feb..ed4c99a560 100644
--- a/engines/tinsel/sysvar.cpp
+++ b/engines/tinsel/sysvar.cpp
@@ -77,7 +77,7 @@ static int systemVars[SV_TOPVALID] = {
2, // Speech Delay
2, // Music dim factor
- 0, // if set, default actor's text colour gets poked in here
+ 0, // if set, default actor's text color gets poked in here
0, // user 1
0, // user 2
@@ -103,7 +103,7 @@ static int systemVars[SV_TOPVALID] = {
0, // ISV_GHOST_ACTOR
0, // ISV_GHOST_BASE
- 0 // ISV_GHOST_COLOUR
+ 0 // ISV_GHOST_COLOR
};
static SCNHANDLE systemStrings[SS_MAX_VALID]; // FIXME: Avoid non-const global vars
diff --git a/engines/tinsel/sysvar.h b/engines/tinsel/sysvar.h
index e407e6ffa3..4cdb1364b4 100644
--- a/engines/tinsel/sysvar.h
+++ b/engines/tinsel/sysvar.h
@@ -60,7 +60,7 @@ typedef enum { SV_DEFAULT_INV,
SV_SPEECHDELAY, // Delay 'twixt text/animation and sample
SV_MUSICDIMFACTOR, // dimVolume = volume - volume/SV_MDF
- SV_TAGCOLOUR, // if set, default actor's text colour gets poked in here
+ SV_TAGCOLOR, // if set, default actor's text color gets poked in here
SV_USER1,
SV_USER2,
@@ -85,7 +85,7 @@ typedef enum { SV_DEFAULT_INV,
ISV_NO_BLOCKING,
ISV_GHOST_ACTOR,
ISV_GHOST_BASE,
- ISV_GHOST_COLOUR,
+ ISV_GHOST_COLOR,
SV_TOPVALID } SYSVARS;
diff --git a/engines/tinsel/text.cpp b/engines/tinsel/text.cpp
index d2939281eb..6df7992946 100644
--- a/engines/tinsel/text.cpp
+++ b/engines/tinsel/text.cpp
@@ -100,14 +100,14 @@ int JustifyText(char *szStr, int xPos, const FONT *pFont, int mode) {
* of the list is returned.
* @param pList Object list to add text to
* @param szStr String to output
- * @param colour Colour for monochrome text
+ * @param color Color for monochrome text
* @param xPos X position of string
* @param yPos Y position of string
* @param hFont Which font to use
* @param mode Mode flags for the string
* @param sleepTime Sleep time between each character (if non-zero)
*/
-OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour,
+OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int color,
int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime) {
int xJustify; // x position of text after justification
int yOffset; // offset to next line of text
@@ -183,8 +183,8 @@ OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour,
if (mode & TXT_ABSOLUTE)
pChar->flags |= DMA_ABS;
- // set characters colour - only effective for mono fonts
- pChar->constant = colour;
+ // set characters color - only effective for mono fonts
+ pChar->constant = color;
// get Y animation offset
GetAniOffset(hImg, pChar->flags, &aniX, &aniY);
diff --git a/engines/tinsel/text.h b/engines/tinsel/text.h
index a849e286ec..58cc32a593 100644
--- a/engines/tinsel/text.h
+++ b/engines/tinsel/text.h
@@ -72,7 +72,7 @@ struct FONT {
struct TEXTOUT {
OBJECT *pList; ///< object list to add text to
char *szStr; ///< string to output
- int colour; ///< colour for monochrome text
+ int color; ///< color for monochrome text
int xPos; ///< x position of string
int yPos; ///< y position of string
SCNHANDLE hFont; ///< which font to use
@@ -91,14 +91,14 @@ struct TEXTOUT {
* of the list is returned.
* @param pList object list to add text to
* @param szStr string to output
- * @param colour colour for monochrome text
+ * @param color color for monochrome text
* @param xPos x position of string
* @param yPos y position of string
* @param hFont which font to use
* @param mode mode flags for the string
* @param sleepTime Sleep time between each character (if non-zero)
*/
-OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour,
+OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int color,
int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime = 0);
OBJECT *ObjectTextOutIndirect( // output a string of text
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index fda6958814..bf90110b3c 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -426,11 +426,11 @@ static void ScrollMonitorProcess(CORO_PARAM, const void *param) {
/**
* NOT A LIBRARY FUNCTION
*
- * Poke supplied colour into the DAC queue.
+ * Poke supplied color into the DAC queue.
*/
void SetTextPal(COLORREF col) {
- SetTalkColourRef(col);
- UpdateDACqueue(TalkColour(), col);
+ SetTalkColorRef(col);
+ UpdateDACqueue(TalkColor(), col);
}
/**
@@ -522,7 +522,7 @@ void TinGetVersion(WHICH_VER which, char *buffer, int length) {
/**
* Set actor's attributes.
- * - currently only the text colour.
+ * - currently only the text color.
*/
static void ActorAttr(int actor, int r1, int g1, int b1) {
storeActorAttr(actor, r1, g1, b1);
@@ -553,11 +553,11 @@ static int ActorDirection(int actor) {
/**
* Set actor's palette details for path brightnesses
*/
-void ActorPalette(int actor, int startColour, int length) {
+void ActorPalette(int actor, int startColor, int length) {
PMOVER pMover = GetMover(actor);
assert(pMover);
- StoreMoverPalette(pMover, startColour, length);
+ StoreMoverPalette(pMover, startColor, length);
}
/**
@@ -568,10 +568,10 @@ static void ActorPriority(int actor, int zFactor) {
}
/**
- * Set actor's text colour.
+ * Set actor's text color.
*/
-static void ActorRGB(int actor, COLORREF colour) {
- SetActorRGB(actor, colour);
+static void ActorRGB(int actor, COLORREF color) {
+ SetActorRGB(actor, color);
}
/**
@@ -1196,9 +1196,9 @@ static int GetInvLimit(int invno) {
/**
* Ghost
*/
-static void Ghost(int actor, int tColour, int tPalOffset) {
+static void Ghost(int actor, int tColor, int tPalOffset) {
SetSysVar(ISV_GHOST_ACTOR, actor);
- SetSysVar(ISV_GHOST_COLOUR, tColour);
+ SetSysVar(ISV_GHOST_COLOR, tColor);
SetSysVar(ISV_GHOST_BASE, tPalOffset);
CreateGhostPalette(BgPal());
}
@@ -3595,12 +3595,12 @@ static void TalkPaletteIndex(unsigned index) {
/**
* Set talk font's palette entry.
*/
-static void TalkRGB(COLORREF colour, int myescEvent) {
+static void TalkRGB(COLORREF color, int myescEvent) {
// Don't do it if it's not wanted
if (myescEvent && myescEvent != GetEscEvents())
return;
- SetTextPal(colour);
+ SetTextPal(color);
}
/**
diff --git a/engines/tinsel/tinlib.h b/engines/tinsel/tinlib.h
index 11e59f380d..7bd2a19d55 100644
--- a/engines/tinsel/tinlib.h
+++ b/engines/tinsel/tinlib.h
@@ -48,7 +48,7 @@ void TinGetVersion(WHICH_VER which, char *buffer, int length);
// Library functions in TINLIB.C
void ActorBrightness(int actor, int brightness);
-void ActorPalette(int actor, int startColour, int length);
+void ActorPalette(int actor, int startColor, int length);
void Control(int param);
void HookScene(SCNHANDLE scene, int entrance, int transition);
void NewScene(CORO_PARAM, SCNHANDLE scene, int entrance, int transition);