#ifndef __EDITORWIDGET_H__
#define __EDITORWIDGET_H__
-#include <QtGui>
+#include <QtWidgets>
#include <stdint.h>
-#include <vector>
-
-#define BOARDSIZE 128
-
-struct Point
-{
- Point(int xx = 0, int yy = 0) { x = xx; y = yy; }
- int x, y;
-};
-
-struct Level
-{
- uint8_t board[BOARDSIZE][BOARDSIZE];
- char name[41];
- Point corner; // Corner dimensions on screen
- Point cursor; // Cursor location
-// This stuff will go into the save file, but we don't need it here...
-// Point size; // Actual dimensions of the level
-// Point boardCorner; // Where on the gird the UL corner of the level is
-};
+#include "boards.h"
class EditorWidget: public QWidget
{
bool Load(void);
bool Save(void);
void SetNameOnCurrentLevel(const char *);
+ void AddNewLevelAtCurrentPosition(void);
+ static void GetSizeAndCorner(Level *, Point &, Point &);
private:
- void GetSizeAndCorner(Level *, Point &, Point &);
+ void CountBoxesAndSpots(int &, int &);
+ void ShiftLevel(int, int);
void ResizeGrid(void);
void Pause(int);
public:
- std::vector<Level> levelStorage;
uint32_t currentLevel;
private: