aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/3ds/sprite.cpp
diff options
context:
space:
mode:
authorThomas Edvalson2016-04-19 03:22:32 -0400
committerThomas Edvalson2016-04-19 03:22:32 -0400
commite8dcfc3a4efeeaffad0380e88223fabbc12e1423 (patch)
treefe58902ccbc752cb44c60e51b6704255b48df64a /backends/platform/3ds/sprite.cpp
parent1ea737bbd87b27c1acf068f20845611a44adb98d (diff)
downloadscummvm-rg350-e8dcfc3a4efeeaffad0380e88223fabbc12e1423.tar.gz
scummvm-rg350-e8dcfc3a4efeeaffad0380e88223fabbc12e1423.tar.bz2
scummvm-rg350-e8dcfc3a4efeeaffad0380e88223fabbc12e1423.zip
3DS: Fix code styling, add license header, remove unused portdefs.h
Diffstat (limited to 'backends/platform/3ds/sprite.cpp')
-rw-r--r--backends/platform/3ds/sprite.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/backends/platform/3ds/sprite.cpp b/backends/platform/3ds/sprite.cpp
index 0d5780ef12..a0aee385a9 100644
--- a/backends/platform/3ds/sprite.cpp
+++ b/backends/platform/3ds/sprite.cpp
@@ -19,9 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include "backends/platform/3ds/sprite.h"
-#include <algorithm>
+#include "common/util.h"
#include <3ds.h>
static uint nextHigher2(uint v) {
@@ -37,18 +37,18 @@ static uint nextHigher2(uint v) {
}
Sprite::Sprite()
-: dirtyPixels(true)
-, dirtyMatrix(true)
-, actualWidth(0)
-, actualHeight(0)
-, posX(0)
-, posY(0)
-, scaleX(1.f)
-, scaleY(1.f)
+ : dirtyPixels(true)
+ , dirtyMatrix(true)
+ , actualWidth(0)
+ , actualHeight(0)
+ , posX(0)
+ , posY(0)
+ , scaleX(1.f)
+ , scaleY(1.f)
{
Mtx_Identity(&modelview);
- vertices = (vertex*)linearAlloc(sizeof(vertex) * 4);
+ vertices = (vertex *)linearAlloc(sizeof(vertex) * 4);
}
Sprite::~Sprite() {
@@ -61,8 +61,8 @@ void Sprite::create(uint16 width, uint16 height, const Graphics::PixelFormat &f)
actualWidth = width;
actualHeight = height;
format = f;
- w = std::max(nextHigher2(width), 64u);
- h = std::max(nextHigher2(height), 64u);;
+ w = MAX(nextHigher2(width), 64u);
+ h = MAX(nextHigher2(height), 64u);;
pitch = w * format.bytesPerPixel;
dirtyPixels = true;
@@ -110,7 +110,7 @@ void Sprite::render() {
}
C3D_TexBind(0, &texture);
- C3D_BufInfo* bufInfo = C3D_GetBufInfo();
+ C3D_BufInfo *bufInfo = C3D_GetBufInfo();
BufInfo_Init(bufInfo);
BufInfo_Add(bufInfo, vertices, sizeof(vertex), 2, 0x10);
C3D_DrawArrays(GPU_TRIANGLE_STRIP, 0, 4);