This commit is contained in:
Thomas 2022-01-11 15:13:01 +01:00
parent f23ef91875
commit b6b1bfb649
No known key found for this signature in database
GPG Key ID: E538821A6CDFDAD7
3 changed files with 2 additions and 4 deletions

View File

@ -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:

View File

@ -5,7 +5,7 @@ void PixelManager::loadSprites(vector<Task>& 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 {