Skip to content

Commit

Permalink
AGSSpriteFont: added placeholder code to instantiate the Clifftop Gam…
Browse files Browse the repository at this point in the history
…es variants of the renderers

The code is actually not current executed as we still beed to find a way to know
which renderers variants should be instantiated.
  • Loading branch information
criezy committed Jun 25, 2022
1 parent d5a7643 commit f89a2f5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Plugins/AGSSpriteFont/AGSSpriteFont/AGSSpriteFont.cpp
Expand Up @@ -26,6 +26,8 @@
#include "plugin/agsplugin.h"
#include "SpriteFontRenderer.h"
#include "VariableWidthSpriteFont.h"
#include "SpriteFontRendererClifftopGames.h"
#include "VariableWidthSpriteFontClifftopGames.h"


#define DEFAULT_RGB_R_SHIFT_32 16
Expand Down Expand Up @@ -225,10 +227,18 @@ namespace agsspritefont {
void AGS_EngineStartup(IAGSEngine *lpEngine)
{
engine = lpEngine;
// TODO: find a way de know which renderers to instantiate
#if 1
engine->PrintDebugConsole("AGSSpriteFont: Init fixed width renderer");
fontRenderer = new SpriteFontRenderer(engine);
engine->PrintDebugConsole("AGSSpriteFont: Init vari width renderer");
vWidthRenderer = new VariableWidthSpriteFontRenderer(engine);
#else
engine->PrintDebugConsole("AGSSpriteFont: Init fixed width renderer");
fontRenderer = new SpriteFontRendererClifftopGames(engine);
engine->PrintDebugConsole("AGSSpriteFont: Init vari width renderer");
vWidthRenderer = new VariableWidthSpriteFontRendererClifftopGames(engine);
#endif
// Make sure it's got the version with the features we need
if (engine->version < MIN_ENGINE_VERSION)
engine->AbortGame("Plugin needs engine version " STRINGIFY(MIN_ENGINE_VERSION) " or newer.");
Expand Down

0 comments on commit f89a2f5

Please sign in to comment.