50 lines
1.6 KiB
C++
50 lines
1.6 KiB
C++
#ifndef GUARD_PIXELMANAGER_H
|
|
#define GUARD_PIXELMANAGER_H
|
|
|
|
#include <string>
|
|
#include "mingl/mingl.h"
|
|
#include "mingl/shape/line.h"
|
|
#include "mingl/shape/triangle.h"
|
|
#include "mingl/shape/rectangle.h"
|
|
#include "mingl/shape/circle.h"
|
|
#include "mingl/gui/sprite.h"
|
|
#include "utils.h"
|
|
#include "playMode.h"
|
|
|
|
using namespace std;
|
|
using namespace nsGraphics;
|
|
|
|
class PixelManager{
|
|
public:
|
|
MinGL& window;
|
|
|
|
nsGui::Sprite background = nsGui::Sprite("./assets/bg.sl2"); // you cant create an empty sprite for some reasons
|
|
|
|
explicit PixelManager(MinGL&);
|
|
|
|
void drawInvaderA(const Position& baseVector, unsigned size, const RGBAcolor& color) const;
|
|
void drawInvaderB(const Position& baseVector, unsigned size, const RGBAcolor& color) const;
|
|
void drawInvaderC(const Position& baseVector, unsigned size, const RGBAcolor& color) const;
|
|
void drawPlayer(unsigned x, unsigned width, const nsGraphics::RGBAcolor& color) const;
|
|
void drawTorpedo(const Position& baseVector, unsigned width, const nsGraphics::RGBAcolor& color) const;
|
|
void drawMissile(const Position& baseVector, unsigned width, const nsGraphics::RGBAcolor& color) const;
|
|
void drawBackground() const;
|
|
|
|
PlayMode showInitialMenu() const;
|
|
bool showDeathMenu() const;
|
|
unsigned getScreenHeight() const;
|
|
unsigned getScreenWidth() const;
|
|
void startFrame() const;
|
|
void endFrame() const;
|
|
|
|
void askPlayerNameMenu(playerID pID, string& name) const;
|
|
|
|
// y will be negative sometimes, so not unsigned
|
|
void displayGodBench(int y) const;
|
|
|
|
void displayGodRightHand(const Position& pos) const;
|
|
void displayGodLeftHand(const Position& pos) const;
|
|
};
|
|
|
|
|
|
#endif |