[Scummvm-git-logs] scummvm master -> d02daaeb2b3453bff5ba2bdfcdb8730c8c30eaf0
bluegr
bluegr at gmail.com
Mon May 3 21:17:54 UTC 2021
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:
d02daaeb2b SCUMM: Remove direct use of Graphics::Surface from ARM code (#2931)
Commit: d02daaeb2b3453bff5ba2bdfcdb8730c8c30eaf0
https://github.com/scummvm/scummvm/commit/d02daaeb2b3453bff5ba2bdfcdb8730c8c30eaf0
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-05-04T00:17:52+03:00
Commit Message:
SCUMM: Remove direct use of Graphics::Surface from ARM code (#2931)
Changed paths:
engines/scumm/akos.cpp
engines/scumm/base-costume.h
engines/scumm/costume.cpp
engines/scumm/proc3ARM.s
graphics/surface.h
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 2c0dc3804b..65bbfe7e76 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -994,6 +994,8 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) {
if (_draw_bottom < rect.bottom)
_draw_bottom = rect.bottom;
+ v1.width = _out.w;
+ v1.height = _out.h;
v1.destptr = (byte *)_out.getBasePtr(v1.x, v1.y);
codec1_genericDecode(v1);
diff --git a/engines/scumm/base-costume.h b/engines/scumm/base-costume.h
index 1e633bdec6..cbc93f7672 100644
--- a/engines/scumm/base-costume.h
+++ b/engines/scumm/base-costume.h
@@ -112,6 +112,8 @@ public:
int x;
int y;
const byte *scaletable;
+ int height;
+ int width;
int skip_width;
byte *destptr;
const byte *mask_ptr;
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 3d525dda14..7ba7c477f1 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -300,6 +300,8 @@ byte ClassicCostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) {
return 2;
}
+ v1.width = _out.w;
+ v1.height = _out.h;
v1.destptr = (byte *)_out.getBasePtr(v1.x, v1.y);
v1.mask_ptr = _vm->getMaskBuffer(0, v1.y, _zbuf);
@@ -422,7 +424,7 @@ void ClassicCostumeRenderer::procC64(Codec1 &v1, int actor) {
extern "C" int ClassicProc3RendererShadowARM(int _scaleY,
ClassicCostumeRenderer::Codec1 *v1,
- Graphics::Surface *_out,
+ int pitch,
const byte *src,
int height,
int _scaleX,
@@ -449,7 +451,7 @@ void ClassicCostumeRenderer::proc3(Codec1 &v1) {
{
_scaleIndexX = ClassicProc3RendererShadowARM(_scaleY,
&v1,
- &_out,
+ _out.pitch,
_srcptr,
_height,
_scaleX,
diff --git a/engines/scumm/proc3ARM.s b/engines/scumm/proc3ARM.s
index 70892faef2..b67be5b74f 100644
--- a/engines/scumm/proc3ARM.s
+++ b/engines/scumm/proc3ARM.s
@@ -62,7 +62,7 @@
@ r0 = _scaleY
@ r1 = v1
- @ r2 = _out
+ @ r2 = pitch
@ r3 = src
@ <> = _height
@ <> = _scaleX
@@ -77,21 +77,20 @@ _ClassicProc3RendererShadowARM:
@ shadowed = true
@ unscaled = false
STMFD r13!,{r3-r11,r14}
- LDRH r6,[r2,#2]
- LDRH r7,[r2] @ r7 = _out.w
- LDRH r8,[r2,#4] @ r8 = _out.pitch
- ADD r6,r6,#1 @ r6 = _out.h+1
SUB r13,r13,#space
STR r3,[r13,#src]
- STR r8,[r13,#pitch]
- LDMIA r1,{r3,r4,r5,r8,r9,r10,r11}
+ STR r2,[r13,#pitch]
+ LDMIA r1,{r3,r4,r5,r6,r7,r8,r9,r10,r11}
@ r3 = v1.x
@ r4 = v1.y
@ r5 = scaletable
+ @ r6 = height
+ @ r7 = width
@ r8 = skip_width
@ r9 = destptr
@ r10= mask_ptr
@ r11= scaleXstep
+ ADD r6,r6,#1 @ r6 = _out.h+1
LDR r2, [r13,#_scaleIndexY]
LDR r12,[r13,#_scaleIndexX]
STR r4, [r13,#v1_y]
@@ -102,9 +101,9 @@ _ClassicProc3RendererShadowARM:
STR r2, [r13,#scaleIdxYPtr]
STR r8, [r13,#v1_skip_width]
- LDRB r8, [r1,#29] @ r8 = shr
- LDRB r14,[r1,#31] @ r14= replen
- LDRB r1, [r1,#30] @ r1 = repcolor
+ LDRB r8, [r1,#37] @ r8 = shr
+ LDRB r14,[r1,#39] @ r14= replen
+ LDRB r1, [r1,#38] @ r1 = repcolor
STR r8, [r13,#v1_shr]
STR r9, [r13,#v1_destptr]
STR r10,[r13,#v1_mask_ptr]
diff --git a/graphics/surface.h b/graphics/surface.h
index 810296bcc7..8ae981c716 100644
--- a/graphics/surface.h
+++ b/graphics/surface.h
@@ -52,13 +52,6 @@ struct TransformStruct;
* operations, font rendering, etc.
*/
struct Surface {
- /*
- * IMPORTANT implementation-specific detail:
- *
- * ARM code relies on the layout of the first 3 of these fields. Do not
- * change them.
- */
-
/**
* Width of the surface.
*/
More information about the Scummvm-git-logs
mailing list