diff options
author | Vincent Hamm | 2002-03-06 09:40:21 +0000 |
---|---|---|
committer | Vincent Hamm | 2002-03-06 09:40:21 +0000 |
commit | 474c9e333b81280e2c450f07e81eb1cc19ea89b5 (patch) | |
tree | a1bfb15807fb807855953d385f2313117cdf88a9 /akos.cpp | |
parent | c7d58aca8485eff7309af22eefee6398ce136159 (diff) | |
download | scummvm-rg350-474c9e333b81280e2c450f07e81eb1cc19ea89b5.tar.gz scummvm-rg350-474c9e333b81280e2c450f07e81eb1cc19ea89b5.tar.bz2 scummvm-rg350-474c9e333b81280e2c450f07e81eb1cc19ea89b5.zip |
Reimplemented the preliminary Dig features. Implemented actor with many direction. Fixed bomp bug
svn-id: r3661
Diffstat (limited to 'akos.cpp')
-rw-r--r-- | akos.cpp | 35 |
1 files changed, 31 insertions, 4 deletions
@@ -35,10 +35,39 @@ bool Scumm::akos_hasManyDirections(Actor *a) { return 0; } +int Scumm::akos_findManyDirection(int16 ManyDirection, uint16 facing) +{ + int32 direction; + int32 temp; + int32 temp_facing; + temp=many_direction_tab[ManyDirection]; + direction=temp + ManyDirection * 8; + do{ + if(facing>=many_direction_tab[direction+1]) + { + if(facing<=many_direction_tab[direction+2]) + { + return(temp); + } + } + + --temp; + --direction; + + }while(temp); + + return(temp); +} + int Scumm::akos_frameToAnim(Actor *a, int frame) { - if (akos_hasManyDirections(a)) { - error("akos_frameToAnim: hasManyDirections not supported"); + bool ManyDirection; + + ManyDirection = akos_hasManyDirections(a); + + if (ManyDirection){ + frame*=many_direction_tab[ManyDirection]; + return akos_findManyDirection(ManyDirection, a->facing) + frame; } else { return newDirToOldDir(a->facing) + frame * 4; } @@ -1082,11 +1111,9 @@ bool Scumm::akos_compare(int a, int b, byte cmd) { } int Scumm::getAnimVar(Actor *a, byte var) { - assert(var>=0 && var<=15); return a->animVariable[var]; } void Scumm::setAnimVar(Actor *a, byte var, int value) { - assert(var>=0 && var<=15); a->animVariable[var] = value; } |