[Scummvm-git-logs] scummvm master -> 70d5b13fc03b61de9d5994fcb1aba0a2f12666cf
bluegr
noreply at scummvm.org
Sun Jul 28 18:59:43 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
70d5b13fc0 JANITORIAL: CHAMBER: Fix typos in code
Commit: 70d5b13fc03b61de9d5994fcb1aba0a2f12666cf
https://github.com/scummvm/scummvm/commit/70d5b13fc03b61de9d5994fcb1aba0a2f12666cf
Author: Hubert Maier (raziel- at users.noreply.github.com)
Date: 2024-07-28T21:59:41+03:00
Commit Message:
JANITORIAL: CHAMBER: Fix typos in code
Changed paths:
engines/chamber/input.cpp
engines/chamber/script.cpp
diff --git a/engines/chamber/input.cpp b/engines/chamber/input.cpp
index 1ca566924f2..da5ff89d743 100644
--- a/engines/chamber/input.cpp
+++ b/engines/chamber/input.cpp
@@ -50,8 +50,8 @@ byte buttons_repeat = 0;
byte buttons;
byte right_button;
byte key_direction_old;
-byte accell_countdown;
-uint16 accelleration = 1;
+byte accel_countdown;
+uint16 acceleration = 1;
byte mouseButtons = 0;
void pollDiscrete(void);
@@ -101,23 +101,23 @@ byte pollMouse(void) {
byte pollKeyboard(void) {
byte direction = key_direction;
if (direction && direction == key_direction_old) {
- if (++accell_countdown == 10) {
- accelleration++;
- accell_countdown = 0;
+ if (++accel_countdown == 10) {
+ acceleration++;
+ accel_countdown = 0;
}
} else {
- accelleration = 1;
- accell_countdown = 0;
+ acceleration = 1;
+ accel_countdown = 0;
}
key_direction_old = direction;
if (direction & 0x0F) {
if (direction == 1) {
- cursor_x += accelleration;
+ cursor_x += acceleration;
if (cursor_x >= 304) /*TODO: >*/
cursor_x = 304;
} else {
- cursor_x -= accelleration;
+ cursor_x -= acceleration;
if ((int16)cursor_x < 0)
cursor_x = 0;
}
@@ -125,11 +125,11 @@ byte pollKeyboard(void) {
if (direction & 0xF0) {
if (direction == 0x10) {
- cursor_y += accelleration;
+ cursor_y += acceleration;
if (cursor_y >= 184) /*TODO: >*/
cursor_y = 184;
} else {
- cursor_y -= accelleration;
+ cursor_y -= acceleration;
if ((int8)cursor_y < 0)
cursor_y = 0;
}
diff --git a/engines/chamber/script.cpp b/engines/chamber/script.cpp
index ebe725e1a58..2dcc9a50105 100644
--- a/engines/chamber/script.cpp
+++ b/engines/chamber/script.cpp
@@ -1860,7 +1860,7 @@ uint16 SCR_30_Fight(void) {
byte *old_script, *old_script_end = script_end_ptr;
pers_t *pers = (pers_t *)(script_vars[kScrPool8_CurrentPers]);
- byte strenght, win, rnd;
+ byte strength, win, rnd;
script_ptr++;
old_script = script_ptr;
@@ -1904,12 +1904,12 @@ uint16 SCR_30_Fight(void) {
/*check fight outcome*/
- strenght = 0;
+ strength = 0;
script_byte_vars.fight_status = 0;
if (script_byte_vars.extreme_violence == 0) {
- static byte character_strenght[] = {
+ static byte character_strength[] = {
1, /*THE MASTER OF ORDEALS*/
3, /*PROTOZORQ*/
1, /*VORT*/
@@ -1929,23 +1929,23 @@ uint16 SCR_30_Fight(void) {
1 /*ZORQ*/
};
- strenght = character_strenght[pers->name - 42];
+ strength = character_strength[pers->name - 42];
/*check if can decrease*/
- if (strenght != 1 && (pers->flags & PERSFLG_80))
- strenght--;
+ if (strength != 1 && (pers->flags & PERSFLG_80))
+ strength--;
if (script_byte_vars.zapstiks_owned != 0 || script_byte_vars.bvar_66 != 0)
- strenght--;
+ strength--;
}
/*check if can increase*/
- if (strenght != 5) {
+ if (strength != 5) {
if ((pers->item >= kItemDagger1 && pers->item <= kItemDagger4)
|| (pers->item >= kItemZapstik1 && pers->item <= kItemZapstik13) /*TODO: ignore kItemZapstik14?*/
|| pers->item == kItemBlade || pers->item == kItemChopper
|| ((pers->index >> 3) == 6))
- strenght++;
+ strength++;
}
/*
@@ -1963,18 +1963,18 @@ uint16 SCR_30_Fight(void) {
rnd = script_byte_vars.rand_value;
#ifdef CHEAT
- strenght = 1;
+ strength = 1;
#endif
- if (strenght >= 2) {
- if (strenght == 2) {
+ if (strength >= 2) {
+ if (strength == 2) {
if (rnd >= 205)
win = getRand() < 128 ? (0x40 | 0x10 | 1) : (0x40 | 0x10 | 2);
- } else if (strenght == 4 && rnd < 100) {
+ } else if (strength == 4 && rnd < 100) {
win = getRand() < 128 ? (0x40 | 0x10 | 1) : (0x40 | 0x10 | 2);
} else {
win = 2;
- if (strenght == 3) {
+ if (strength == 3) {
if (rnd < 128) /*TODO: check me, maybe original bug (checks against wrong reg?)*/
win = getRand() < 51 ? (0x80 | 0x10 | 1) : (0x80 | 0x10 | 2);
else
@@ -3235,7 +3235,7 @@ uint16 CMD_2_PsiPowers(void) {
/*
Open normal inventory box
*/
-uint16 CMD_3_Posessions(void) {
+uint16 CMD_3_Possessions(void) {
updateUndrawCursor(CGA_SCREENBUFFER);
inv_bgcolor = 0x55;
openInventory(ITEMFLG_OWNED, ITEMFLG_OWNED);
@@ -4143,7 +4143,7 @@ cmdhandler_t command_handlers[] = {
0,
CMD_1_RoomObjects,
CMD_2_PsiPowers,
- CMD_3_Posessions,
+ CMD_3_Possessions,
CMD_4_EnergyLevel,
CMD_5_Wait,
CMD_6_Load,
More information about the Scummvm-git-logs
mailing list