From ba91de90fc6de6198ed1bbcdaa46a51c8ec7a636 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 18 Mar 2021 20:11:26 -0500 Subject: [PATCH] [nostalgia/core] Move setTile implementation out of header --- src/nostalgia/core/gfx.cpp | 4 ++++ src/nostalgia/core/gfx.hpp | 10 ++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/nostalgia/core/gfx.cpp b/src/nostalgia/core/gfx.cpp index 40abbd858..64e38a008 100644 --- a/src/nostalgia/core/gfx.cpp +++ b/src/nostalgia/core/gfx.cpp @@ -141,4 +141,8 @@ char charMap[128] = { 0, // ~ }; +void setSprite(Context *c, const Sprite &s) { + setSprite(c, s.idx, s.x, s.y, s.tileIdx, s.spriteShape, s.spriteSize, s.flipX); +} + } diff --git a/src/nostalgia/core/gfx.hpp b/src/nostalgia/core/gfx.hpp index d05d46490..17869b197 100644 --- a/src/nostalgia/core/gfx.hpp +++ b/src/nostalgia/core/gfx.hpp @@ -107,14 +107,12 @@ void puts(Context *ctx, int column, int row, const char *str); void setTile(Context *ctx, int layer, int column, int row, uint8_t tile); -void clearTileLayer(Context*, int layer); +void clearTileLayer(Context *ctx, int layer); -void hideSprite(Context*, unsigned); +void hideSprite(Context *ctx, unsigned); -void setSprite(Context*, unsigned idx, unsigned x, unsigned y, unsigned tileIdx, unsigned spriteShape = 0, unsigned spriteSize = 0, unsigned flipX = 0); +void setSprite(Context *ctx, unsigned idx, unsigned x, unsigned y, unsigned tileIdx, unsigned spriteShape = 0, unsigned spriteSize = 0, unsigned flipX = 0); -inline void setSprite(Context *c, const Sprite &s) { - setSprite(c, s.idx, s.x, s.y, s.tileIdx, s.spriteShape, s.spriteSize, s.flipX); -} +void setSprite(Context *ctx, const Sprite &s); }