menu dev
This commit is contained in:
1 parent
0d9d77769c
commit
6e610664b0
14 files changed
+848
-731
No files matched your search
Executable
+43
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"Space":[
|
||||
{
|
||||
"name": "galaxy_1",
|
||||
"position":{
|
||||
"x_coord": 0.5,
|
||||
"y_coord": 0.5
|
||||
},
|
||||
"texture": "galaxy_1.png",
|
||||
"scale": 1.0,
|
||||
"Stars": [
|
||||
{
|
||||
"name": "star_1",
|
||||
"position": {
|
||||
"x_coord": 0.2,
|
||||
"y_coord": 0.3
|
||||
},
|
||||
"texture": "star_1.png",
|
||||
"scale": 1.0,
|
||||
"levels": [
|
||||
{
|
||||
"name": "level_1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "star_2",
|
||||
"position": {
|
||||
"x_coord": 0.2,
|
||||
"y_coord": 0.3
|
||||
},
|
||||
"texture": "star_2.png",
|
||||
"scale": 1.0,
|
||||
"levels": [
|
||||
{
|
||||
"name": "level_1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
#include "galaxy.h"
|
||||
|
||||
|
||||
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#ifndef GALAXY_H
|
||||
#define GALAXY_H
|
||||
|
||||
#include "include/Engine.h"
|
||||
|
||||
#include "galaxy_objects.h"
|
||||
|
||||
class Galaxy {
|
||||
public:
|
||||
|
||||
// ====== All objects =======
|
||||
std::vector<StarObject> Stars;
|
||||
// ====== All objects =======
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
|
||||
#include "galaxy_menu.h"
|
||||
|
||||
GalaxyMenu::GalaxyMenu()
|
||||
{
|
||||
}
|
||||
|
||||
GalaxyMenu::~GalaxyMenu()
|
||||
{
|
||||
}
|
||||
|
||||
void GalaxyMenu::InitGalaxyMenu(std::string config) {
|
||||
/*...Read ptree from config...*/
|
||||
}
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#ifndef GALAXY_MENU_H
|
||||
#define GALAXY_MENU_H
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "galaxy.h"
|
||||
|
||||
class GalaxyMenu {
|
||||
public:
|
||||
|
||||
GalaxyMenu();
|
||||
~GalaxyMenu();
|
||||
|
||||
// ======== All objects =========
|
||||
std::vector<Galaxy> galaxies;
|
||||
// ======== All objects =========
|
||||
|
||||
|
||||
// ======== Main Methods ========
|
||||
void InitGalaxyMenu(std::string config);
|
||||
void DrawGalaxyMenu();
|
||||
void UpdateGalaxyMenu();
|
||||
// ======== Main Methods ========
|
||||
|
||||
void InteractWithGalaxy(/*..Vector/Vector/Int..*/); // Prototype for mouse/tap events
|
||||
|
||||
// Params
|
||||
Eigen::Vector2f menuPosition;
|
||||
float menuScale;
|
||||
|
||||
private:
|
||||
|
||||
void readSaveData(); // inner init method
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
#include "galaxy_objects.h"
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#ifndef GALAXY_OBJECTS_H
|
||||
#define GALAXY_OBJECTS_H
|
||||
|
||||
#include "include/Engine.h"
|
||||
#include <string>
|
||||
|
||||
class StarObject {
|
||||
public:
|
||||
|
||||
//StarObject(Eigen::Vector2f pos, std::string id/*star name*/);
|
||||
//~StarObject();
|
||||
|
||||
// :::::::::::::
|
||||
Eigen::Vector2f GetPosition();
|
||||
// :::::::::::::
|
||||
|
||||
// ::#Levels#::
|
||||
std::vector<std::string> levels;
|
||||
|
||||
// ::#Params#::
|
||||
std::string selfTexture;
|
||||
std::string name;
|
||||
Eigen::Vector2f selfPosition;
|
||||
float selfScale;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
+675
-669
File diff suppressed because it is too large.
Load diff
@@ -28,6 +28,7 @@
|
||||
#include "menucode.h"
|
||||
#include "creditscode.h"
|
||||
#include "loadingcode.h"
|
||||
#include "galaxy_menu.h"
|
||||
|
||||
using namespace SE;
|
||||
|
||||
|
||||
@@ -166,23 +166,25 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\game\creditscode.cpp" />
|
||||
<ClCompile Include="..\..\..\game\galaxy.cpp" />
|
||||
<ClCompile Include="..\..\..\game\galaxy_menu.cpp" />
|
||||
<ClCompile Include="..\..\..\game\galaxy_objects.cpp" />
|
||||
<ClCompile Include="..\..\..\game\gamecode.cpp" />
|
||||
<ClCompile Include="..\..\..\game\loadingcode.cpp" />
|
||||
<ClCompile Include="..\..\..\game\main_code.cpp" />
|
||||
<ClCompile Include="..\..\..\game\menucode.cpp" />
|
||||
<ClCompile Include="galaxy.cpp" />
|
||||
<ClCompile Include="galaxy_objects.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\game\creditscode.h" />
|
||||
<ClInclude Include="..\..\..\game\galaxy.h" />
|
||||
<ClInclude Include="..\..\..\game\galaxy_menu.h" />
|
||||
<ClInclude Include="..\..\..\game\galaxy_objects.h" />
|
||||
<ClInclude Include="..\..\..\game\gamecode.h" />
|
||||
<ClInclude Include="..\..\..\game\game_area_interface.h" />
|
||||
<ClInclude Include="..\..\..\game\loadingcode.h" />
|
||||
<ClInclude Include="..\..\..\game\main_code.h" />
|
||||
<ClInclude Include="..\..\..\game\menucode.h" />
|
||||
<ClInclude Include="galaxy.h" />
|
||||
<ClInclude Include="galaxy_objects.h" />
|
||||
<ClInclude Include="main.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
||||
@@ -33,10 +33,13 @@
|
||||
<ClCompile Include="..\..\..\game\loadingcode.cpp">
|
||||
<Filter>Файлы исходного кода</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="galaxy.cpp">
|
||||
<ClCompile Include="..\..\..\game\galaxy.cpp">
|
||||
<Filter>Файлы исходного кода</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="galaxy_objects.cpp">
|
||||
<ClCompile Include="..\..\..\game\galaxy_objects.cpp">
|
||||
<Filter>Файлы исходного кода</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\game\galaxy_menu.cpp">
|
||||
<Filter>Файлы исходного кода</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
@@ -62,10 +65,13 @@
|
||||
<ClInclude Include="..\..\..\game\loadingcode.h">
|
||||
<Filter>Заголовочные файлы</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="galaxy.h">
|
||||
<ClInclude Include="..\..\..\game\galaxy.h">
|
||||
<Filter>Заголовочные файлы</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="galaxy_objects.h">
|
||||
<ClInclude Include="..\..\..\game\galaxy_objects.h">
|
||||
<Filter>Заголовочные файлы</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\game\galaxy_menu.h">
|
||||
<Filter>Заголовочные файлы</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
#ifndef GALAXY_H
|
||||
#define GALAXY_H
|
||||
|
||||
#include "galaxy_objects.h"
|
||||
|
||||
#include "include/Engine.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
class GalaxyMenu {
|
||||
public:
|
||||
|
||||
// ======== All objects =========
|
||||
std::vector<StarObject> Stars;
|
||||
// ======== All objects =========
|
||||
|
||||
|
||||
// ======== Main Methods ========
|
||||
void InitGalaxy();
|
||||
void DrawGalaxy();
|
||||
void UpdateGalaxy();
|
||||
// ======== Main Methods ========
|
||||
|
||||
void InteractWithGalaxy(); // Prototype for mouse/tap events
|
||||
|
||||
|
||||
// :::::::::::
|
||||
float GetGalaxyPosition();
|
||||
// :::::::::::
|
||||
|
||||
private:
|
||||
|
||||
// Params
|
||||
//Vector2f selfPosition;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Whitespace-only changes.
@@ -1,16 +0,0 @@
|
||||
#ifndef GALAXY_OBJECTS_H
|
||||
#define GALAXY_OBJECTS_H
|
||||
|
||||
class StarObject {
|
||||
public:
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user