Merge branch 'master' of github.com:Thomas776/SAE102-SpaceInvaders
This commit is contained in:
		
						commit
						95bf76d352
					
				@ -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:
 | 
			
		||||
 | 
			
		||||
@ -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 {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user