From b6b1bfb649cd4d59bb04516e4bca3bee878e17f6 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 11 Jan 2022 15:13:01 +0100 Subject: [PATCH] things --- assets/{hand.si2 => rightHand.si2} | Bin headers/pixelManager/pixelManager.h | 4 +--- src/pixelManager/pixelManager.cpp | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) rename assets/{hand.si2 => rightHand.si2} (100%) diff --git a/assets/hand.si2 b/assets/rightHand.si2 similarity index 100% rename from assets/hand.si2 rename to assets/rightHand.si2 diff --git a/headers/pixelManager/pixelManager.h b/headers/pixelManager/pixelManager.h index c0dabf5..e8048e0 100644 --- a/headers/pixelManager/pixelManager.h +++ b/headers/pixelManager/pixelManager.h @@ -40,9 +40,7 @@ typedef nsGui::GlutFont::GlutFonts Font; * It's MinGL's fault. This is all I have to say */ -// The convention to add another argument seems to just add a number to the macro name -#define ADD_SPRITE_TASK(X) ADD_SPRITE_TASK2(X, X) -#define ADD_SPRITE_TASK2(X, Y) tasks.push_back((X).asyncLoad("assets/"#Y".si2")); +#define ADD_SPRITE_TASK(X) tasks.push_back((X).asyncLoad("assets/"#X".si2")); class PixelManager{ public: diff --git a/src/pixelManager/pixelManager.cpp b/src/pixelManager/pixelManager.cpp index e005f5d..aa84e76 100644 --- a/src/pixelManager/pixelManager.cpp +++ b/src/pixelManager/pixelManager.cpp @@ -5,7 +5,7 @@ void PixelManager::loadSprites(vector& tasks){ ADD_SPRITE_TASK(logo) ADD_SPRITE_TASK(menuBackground) ADD_SPRITE_TASK(gameBackground) - ADD_SPRITE_TASK2(rightHand, hand) + ADD_SPRITE_TASK(rightHand) } void PixelManager::startFrame() const {