very basic ThumbnailGenerator

This commit is contained in:
Modnark
2022-10-06 12:18:35 -04:00
parent 71fda54338
commit c1118489e3
11 changed files with 135 additions and 118 deletions

View File

@@ -48,6 +48,7 @@ class Application { // : public GApp {
void setFocus(bool isFocused);
int getMode();
void unSetMode();
void toggleSky();
CameraController cameraController;
UserInput* userInput;
PropertyWindow* _propWindow;
@@ -55,6 +56,7 @@ class Application { // : public GApp {
RenderDevice* getRenderDevice();
void selectInstance(Instance* selectedInstance,PropertyWindow* propWindow);
void setMode(int mode);
SkyRef getSky();
Tool * tool;
void changeTool(Tool *);
@@ -82,6 +84,7 @@ class Application { // : public GApp {
GAppSettings _settings;
double lightProjX, lightProjY, lightProjNear, lightProjFar;
IEBrowser* webBrowser;
bool _hideSky;
protected:
Stopwatch m_graphicsWatch;
Stopwatch m_logicWatch;

View File

@@ -2,6 +2,7 @@
#include "WorkspaceInstance.h"
#include "LevelInstance.h"
#include "PartInstance.h"
#include "ThumbnailGeneratorInstance.h"
#include "SelectionService.h"
#include "rapidxml/rapidxml.hpp"
#include "GuiRootInstance.h"
@@ -23,9 +24,12 @@ public:
bool load(const char* filename,bool clearObjects);
bool readXMLFileStream(std::ifstream* file);
void drawMessage(RenderDevice*);
WorkspaceInstance* getWorkspace();
LevelInstance * getLevel();
XplicitNgine * getEngine();
WorkspaceInstance* getWorkspace();
LevelInstance* getLevel();
XplicitNgine* getEngine();
ThumbnailGeneratorInstance* getThumbnailGenerator();
std::string message;
std::string _loadedFileName;
bool showMessage;
@@ -50,9 +54,10 @@ private:
bool _legacyLoad;
float _modY;
WorkspaceInstance* workspace;
LevelInstance * level;
LevelInstance* level;
GuiRootInstance* guiRoot;
SelectionService* selectionService;
ThumbnailGeneratorInstance * thumbnailGenerator;
bool running;
XplicitNgine * xplicitNgine;
};

View File

@@ -0,0 +1,14 @@
#pragma once
#include "instance.h"
class ThumbnailGeneratorInstance :
public Instance
{
public:
// Constructor / Destructor
ThumbnailGeneratorInstance(void);
~ThumbnailGeneratorInstance(void);
// Functions
std::string click(std::string fileType, int cx, int cy, bool hideSky);
};

View File

@@ -29,6 +29,8 @@ extern bool running;
extern DataModelInstance* g_dataModel;
extern XplicitNgine* g_xplicitNgine;
extern Application* g_usableApp;
extern SkyRef g_sky;
extern RenderDevice g_renderDevice;
extern GFontRef g_fntdominant;
extern GFontRef g_fntlighttrek;