More cleanups
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 4.2)
|
|
||||||
|
|
||||||
project(Editor)
|
|
||||||
|
|
||||||
set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/editor.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/playerEditor.cpp)
|
|
||||||
|
|
||||||
add_library(Editor SHARED ${SOURCES})
|
|
||||||
target_include_directories(Editor PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/headers)
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
class Editor
|
|
||||||
{
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
public:
|
|
||||||
};
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
|
||||||
#include <string.h>
|
|
||||||
#include <memory>
|
|
||||||
#include <vector>
|
|
||||||
#include "Extern/json.hpp"
|
|
||||||
#include "Creature.h"
|
|
||||||
|
|
||||||
struct PlayerE : Creature
|
|
||||||
{
|
|
||||||
|
|
||||||
int id;
|
|
||||||
int level;
|
|
||||||
std::vector<Stat> stats;
|
|
||||||
std::string name;
|
|
||||||
std::string description;
|
|
||||||
|
|
||||||
void Init();
|
|
||||||
void LevelUp();
|
|
||||||
void Die();
|
|
||||||
void TakeDamage(int damageType, float damage);
|
|
||||||
float GetHealth();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class PlayerEditor
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
Player *toEdit;
|
|
||||||
std::vector<PlayerE> players;
|
|
||||||
|
|
||||||
std::vector<std::string> commands;
|
|
||||||
public:
|
|
||||||
void Create();
|
|
||||||
void Edit();
|
|
||||||
|
|
||||||
bool Save();
|
|
||||||
};
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#include "playerEditor.h"
|
|
||||||
|
|
||||||
void Create()
|
|
||||||
{
|
|
||||||
if (toEdit == nullptr)
|
|
||||||
{
|
|
||||||
toEdit = new PlayerE();
|
|
||||||
}
|
|
||||||
players.push_back(toEdit);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Edit()
|
|
||||||
{
|
|
||||||
|
|
||||||
printf("Options: %s\n");
|
|
||||||
for (auto command : commands.begin())'
|
|
||||||
{
|
|
||||||
printf("%s\n", command.c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
#include "object.h"
|
|
||||||
Reference in New Issue
Block a user