123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- // Jovian Hersemeule
- #include <iostream>
- #include <fstream>
- #include <vector>
- #include <SDL/SDL.h>
- #include <SDL/SDL_gfxPrimitives.h>
- #include "SnapFile.h"
- #define MULTI_DEFAULT 50
- #define NAME_DEFAULT "Sans Nom"
- #define FOLDER "Niveaux/"
- #define EXT ".lvl"
- class Editor
- {
- public:
- Editor();
- ~Editor();
- bool init(); // Recquire SDL initiated
- void addPlot( int ex, int ey );
- void removePlot();
- void zoomIn();
- void zoomOut();
- void draw( int ix, int iy );
- void save();
- void load();
- void toggleHelp();
- protected:
- int m_multi; // Zoom
- Uint32 m_last_save;
- bool m_help;
- unsigned int m_leftPoint; // Optimise drawing
- const std::string m_index;
- std::string m_name;
- SDL_Surface* m_screen;
- std::vector<float> m_vx;
- std::vector<float> m_vy;
- };
|