diff options
| author | Michael Ball | 2019-10-27 11:59:25 -0700 | 
|---|---|---|
| committer | Bastien Bouclet | 2019-11-05 05:51:45 +0100 | 
| commit | 78de5724047f56bd3ecbfb9ab423bb6c943f6589 (patch) | |
| tree | 907d06ec001443f28c97d2d39d0acaf4c2b6aee2 /backends/platform/3ds/sprite.cpp | |
| parent | b342d42ff9b881aa4a719a7079d94fff37705dd6 (diff) | |
| download | scummvm-rg350-78de5724047f56bd3ecbfb9ab423bb6c943f6589.tar.gz scummvm-rg350-78de5724047f56bd3ecbfb9ab423bb6c943f6589.tar.bz2 scummvm-rg350-78de5724047f56bd3ecbfb9ab423bb6c943f6589.zip | |
3DS: Implement magnify mode toggle on L and move keyboard to Y/DRIGHT
Diffstat (limited to 'backends/platform/3ds/sprite.cpp')
| -rw-r--r-- | backends/platform/3ds/sprite.cpp | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/backends/platform/3ds/sprite.cpp b/backends/platform/3ds/sprite.cpp index 1f2c72e2d3..bbccf94fe6 100644 --- a/backends/platform/3ds/sprite.cpp +++ b/backends/platform/3ds/sprite.cpp @@ -42,6 +42,8 @@ Sprite::Sprite()  	, actualHeight(0)  	, posX(0)  	, posY(0) +	, offsetX(0) +	, offsetY(0)  	, scaleX(1.f)  	, scaleY(1.f)  { @@ -85,7 +87,6 @@ void Sprite::create(uint16 width, uint16 height, const Graphics::PixelFormat &f)  	memcpy(vertices, tmp, sizeof(vertex) * 4);  } -  void Sprite::free() {  	linearFree(vertices);  	linearFree(pixels); @@ -138,12 +139,18 @@ void Sprite::setPosition(int x, int y) {  	}  } +void Sprite::setOffset(uint16 x, uint16 y) { +	offsetX = x; +	offsetY = y; +	dirtyMatrix = true; +} +  C3D_Mtx* Sprite::getMatrix() {  	if (dirtyMatrix) {  		dirtyMatrix = false;  		Mtx_Identity(&modelview);  		Mtx_Scale(&modelview, scaleX, scaleY, 1.f); -		Mtx_Translate(&modelview, posX, posY, 0, true); +		Mtx_Translate(&modelview, posX - offsetX, posY - offsetY, 0, true);  	}  	return &modelview;  } | 
