Putting together JSON format next?
This commit is contained in:
@@ -87,7 +87,29 @@ public:
|
||||
int grid_rows = 128;
|
||||
int grid_cols = 128;
|
||||
|
||||
int grid[128][128];
|
||||
int** grid;
|
||||
|
||||
void InitGrid()
|
||||
{
|
||||
grid = new int*[grid_rows];
|
||||
|
||||
for (int i = 0; i < grid_rows; i++)
|
||||
grid[i] = new int[grid_cols];
|
||||
|
||||
for (int x = 0; x < grid_rows; x++) {
|
||||
for (int y = 0; y < grid_cols; y++) {
|
||||
grid[x][y] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DeleteGrid()
|
||||
{
|
||||
for (int i = 0; i < grid_rows; i++)
|
||||
delete[] grid[i];
|
||||
|
||||
delete[] grid;
|
||||
}
|
||||
|
||||
int selected_quad = 0;
|
||||
|
||||
@@ -112,6 +134,10 @@ public:
|
||||
int CellToIndex(Vector2i cell, int width);
|
||||
|
||||
EditorApp();
|
||||
~EditorApp() override
|
||||
{
|
||||
DeleteGrid();
|
||||
}
|
||||
|
||||
/// Loads the test.lvl file into the editor.
|
||||
/// @note Placeholder until FileDialogs are added.
|
||||
|
@@ -1,8 +1,7 @@
|
||||
//
|
||||
// Created by dawsh on 5/12/25.
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#ifndef LAYER_HPP
|
||||
#define LAYER_HPP
|
||||
|
||||
#endif //LAYER_HPP
|
||||
class Layer {
|
||||
public:
|
||||
|
||||
};
|
@@ -12,8 +12,12 @@ public:
|
||||
int cols;
|
||||
int cell_width;
|
||||
int cell_height;
|
||||
TileCell cells[][];
|
||||
TileCell** cells;
|
||||
|
||||
TileLayer(int rows, int cols, int cell_width, int cell_height)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected:
|
||||
private:
|
||||
|
Reference in New Issue
Block a user