aboutsummaryrefslogtreecommitdiff
path: root/akos.cpp
diff options
context:
space:
mode:
authorJames Brown2002-04-24 04:26:09 +0000
committerJames Brown2002-04-24 04:26:09 +0000
commit280136f13aeeb5c30961253ca0a6e327ba91700a (patch)
tree9112ccafbbd84d440d807b2b0c3bef958d5a649a /akos.cpp
parent20e9ad5e2339a777c6fde7c8897bf5c256e2883b (diff)
downloadscummvm-rg350-280136f13aeeb5c30961253ca0a6e327ba91700a.tar.gz
scummvm-rg350-280136f13aeeb5c30961253ca0a6e327ba91700a.tar.bz2
scummvm-rg350-280136f13aeeb5c30961253ca0a6e327ba91700a.zip
Fix Indy4/MI2 crash due to VirtScroll code.
Cleanup \N's - For gods sake fix your CVS client :) svn-id: r4067
Diffstat (limited to 'akos.cpp')
-rw-r--r--akos.cpp39
1 files changed, 13 insertions, 26 deletions
diff --git a/akos.cpp b/akos.cpp
index 314094b32b..5af2800623 100644
--- a/akos.cpp
+++ b/akos.cpp
@@ -53,7 +53,6 @@ int Scumm::akos_findManyDirection(int16 ManyDirection, uint16 facing)
--temp;
--direction;
-
} while (temp);
return (temp);
@@ -221,9 +220,7 @@ bool Scumm::akos_drawCostumeChannel(AkosRenderer * ar, int chan)
if (code != AKC_ComplexChan) {
off = ar->akof + (code & 0xFFF);
- assert((code & 0xFFF) * 6 <
- READ_BE_UINT32_UNALIGNED((byte *)ar->akof - 4) - 8);
-
+ assert((code & 0xFFF) * 6 < READ_BE_UINT32_UNALIGNED((byte *)ar->akof - 4) - 8);
assert((code & 0x7000) == 0);
ar->srcptr = ar->akcd + READ_LE_UINT32(&off->akcd);
@@ -582,14 +579,14 @@ void Scumm::akos_codec1(AkosRenderer * ar)
bool masking;
int step;
+
/* implement custom scale table */
- if(isGlobInMemory(rtString,_vars[VAR_CUSTOMSCALETABLE]))
- {
+
+
+ if(isGlobInMemory(rtString,_vars[VAR_CUSTOMSCALETABLE])) {
ar->v1.scaletable = getStringAddressVar(VAR_CUSTOMSCALETABLE);
- }
- else
- {
+ } else {
ar->v1.scaletable = default_scale_table;
}
@@ -657,7 +654,6 @@ void Scumm::akos_codec1(AkosRenderer * ar)
if (x_left >= (int)ar->outwidth) {
tmp_x = j;
skip++;
-
}
if (ar->v1.scaletable[j--] < ar->scale_x)
x_left--;
@@ -897,34 +893,30 @@ void Scumm::akos_codec1_ignorePakCols(AkosRenderer * ar, int num)
void Scumm::akos_codec5(AkosRenderer * ar)
{
+
VirtScreen *vs;
BompDrawData bdd;
-
+
int mirror;
int moveX;
int moveY;
int left;
int var_20;
int max_width;
+
int right;
int top;
int bottom;
vs = &virtscr[0];
-
//setBlastObjectMode(ar->shadow_mode); // not implemented yet
-
mirror = ar->mirror;
-
moveX=ar->move_x_cur;
moveY=ar->move_y_cur;
- if (!mirror)
- {
+ if (!mirror) {
left = (ar->x - moveX - ar->width) + 1;
- }
- else
- {
+ } else {
left = ar->x + moveX -1;
}
@@ -937,7 +929,6 @@ void Scumm::akos_codec5(AkosRenderer * ar)
if(left < 0)
left = 0;
-
if(left > max_width)
left -= left - max_width;
@@ -1095,12 +1086,8 @@ bool Scumm::akos_increaseAnim(Actor * a, int chan, byte *aksq, uint16 *akfo,
switch (code) {
case AKC_StartAnimInActor:
- akos_queCommand(4,
- derefActorSafe(getAnimVar(a, GB(2)),
- "akos_increaseAnim:29"), getAnimVar(a,
- GB
- (3)),
- 0);
+ akos_queCommand(4, derefActorSafe(getAnimVar(a, GB(2)),
+ "akos_increaseAnim:29"), getAnimVar(a, GB(3)), 0);
continue;
case AKC_Random: