From 1f2b5988c1ef7f9f4e3b63167807a4c7f3de4034 Mon Sep 17 00:00:00 2001 From: Kenta Yoshimura Date: Tue, 9 Apr 2019 08:04:15 +0900 Subject: [PATCH] Define alwaysinline to PIXEL functions. --- tile.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tile.cpp b/tile.cpp index a45a0196..b9cf8ca4 100644 --- a/tile.cpp +++ b/tile.cpp @@ -20,7 +20,7 @@ namespace { struct BPProgressive { enum { Pitch = 1 }; - static uint32 Get(uint32 StartLine) { return StartLine; } + static alwaysinline uint32 Get(uint32 StartLine) { return StartLine; } }; // Interlace: Only draw every other line, so we'll redefine bpstart_t and Pitch to do so. @@ -28,7 +28,7 @@ namespace { struct BPInterlace { enum { Pitch = 2 }; - static uint32 Get(uint32 StartLine) { return StartLine * 2 + BG.InterlaceLine; } + static alwaysinline uint32 Get(uint32 StartLine) { return StartLine * 2 + BG.InterlaceLine; } }; // The 1x1 pixel plotter, for speedhacking modes. @@ -38,7 +38,7 @@ namespace { enum { Pitch = BPSTART::Pitch }; typedef BPSTART bpstart_t; - static void Draw(int N, int M, uint32 Offset, uint32 OffsetInLine, uint8 Pix, uint8 Z1, uint8 Z2) + static alwaysinline void Draw(int N, int M, uint32 Offset, uint32 OffsetInLine, uint8 Pix, uint8 Z1, uint8 Z2) { (void) OffsetInLine; if (Z1 > GFX.DB[Offset + N] && (M)) @@ -59,7 +59,7 @@ namespace { enum { Pitch = BPSTART::Pitch }; typedef BPSTART bpstart_t; - static void Draw(int N, int M, uint32 Offset, uint32 OffsetInLine, uint8 Pix, uint8 Z1, uint8 Z2) + static alwaysinline void Draw(int N, int M, uint32 Offset, uint32 OffsetInLine, uint8 Pix, uint8 Z1, uint8 Z2) { (void) OffsetInLine; if (Z1 > GFX.DB[Offset + 2 * N] && (M)) @@ -89,7 +89,7 @@ namespace { enum { Pitch = BPSTART::Pitch }; typedef BPSTART bpstart_t; - static void Draw(int N, int M, uint32 Offset, uint32 OffsetInLine, uint8 Pix, uint8 Z1, uint8 Z2) + static alwaysinline void Draw(int N, int M, uint32 Offset, uint32 OffsetInLine, uint8 Pix, uint8 Z1, uint8 Z2) { if (Z1 > GFX.DB[Offset + 2 * N] && (M)) {