aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/dreamgen.cpp
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-16 00:20:30 +0400
committerVladimir Menshakov2011-06-16 00:20:30 +0400
commite0efde7cf65e0f22d5afa830339fb1dc6ca91479 (patch)
tree05dcc4ec22131e7175d2bef18a5e0294c18dd7fe /engines/dreamweb/dreamgen.cpp
parentc1b9adb69122d86665079c619a535095d7fe1507 (diff)
downloadscummvm-rg350-e0efde7cf65e0f22d5afa830339fb1dc6ca91479.tar.gz
scummvm-rg350-e0efde7cf65e0f22d5afa830339fb1dc6ca91479.tar.bz2
scummvm-rg350-e0efde7cf65e0f22d5afa830339fb1dc6ca91479.zip
DREAMWEB: optimized consequtive movsb/w and stosb/w
Diffstat (limited to 'engines/dreamweb/dreamgen.cpp')
-rw-r--r--engines/dreamweb/dreamgen.cpp101
1 files changed, 11 insertions, 90 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index cbdb25256c..f76a3a5b58 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -4204,38 +4204,7 @@ void clearwork(Context &context) {
context.di = 0;
context.cx = (200*320)/64;
clearloop:
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
+ context._stosw(32);
if (--context.cx) goto clearloop;
}
@@ -4366,70 +4335,27 @@ loop124:
context.bh = 14;
context.bh = 4;
firstbitofblock:
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
+ context._movsw(8);
context._add(context.di, (320)-16);
context._dec(context.bh);
if (!context.flags.z()) goto firstbitofblock;
context.bh = 12;
loop125:
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
- context._movsw();
+ context._movsw(8);
context.ax = 0x0dfdf;
- context._stosw();
- context._stosw();
+ context._stosw(2);
context._add(context.di, (320)-20);
context._dec(context.bh);
if (!context.flags.z()) goto loop125;
context._add(context.di, 4);
context.ax = 0x0dfdf;
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
+ context._stosw(8);
context._add(context.di, (320)-16);
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
+ context._stosw(8);
context._add(context.di, (320)-16);
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
+ context._stosw(8);
context._add(context.di, (320)-16);
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
- context._stosw();
+ context._stosw(8);
zeroblock:
context.si = context.pop();
context.di = context.pop();
@@ -4811,9 +4737,7 @@ void fadetowhite(Context &context) {
while(context.cx--) context._stosb();
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3)+768);
context.al = 0;
- context._stosb();
- context._stosb();
- context._stosb();
+ context._stosb(3);
paltostartpal(context);
context.data.byte(kFadedirection) = 1;
context.data.byte(kFadecount) = 63;
@@ -4830,9 +4754,7 @@ void fadefromwhite(Context &context) {
while(context.cx--) context._stosb();
context.di = (0+(180*10)+32+60+(32*32)+(11*10*3));
context.al = 0;
- context._stosb();
- context._stosb();
- context._stosb();
+ context._stosb(3);
paltoendpal(context);
context.data.byte(kFadedirection) = 1;
context.data.byte(kFadecount) = 63;
@@ -17179,8 +17101,7 @@ void clearchanges(Context &context) {
context.es = context.cs;
context.di = 8011;
context.al = 1;
- context._stosb();
- context._stosb();
+ context._stosb(2);
context.al = 0;
context._stosb();
context.al = 1;