diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-06 10:49:52 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-06 10:49:52 +0100 |
commit | 96a63139221587c6be9659c1e07eacd3a8e7f048 (patch) | |
tree | 23aef453ef216c97b762637f553d131646fd5985 /src/Plugins/Food/Burger | |
parent | 27fc86e8c0450a7fe33d76344c4d53e23a70a6c3 (diff) | |
download | t2win-96a63139221587c6be9659c1e07eacd3a8e7f048.tar.gz t2win-96a63139221587c6be9659c1e07eacd3a8e7f048.zip |
add untested Burger code
Diffstat (limited to 'src/Plugins/Food/Burger')
-rw-r--r-- | src/Plugins/Food/Burger/Burger.cpp | 52 | ||||
-rw-r--r-- | src/Plugins/Food/Burger/Burger.h | 6 |
2 files changed, 57 insertions, 1 deletions
diff --git a/src/Plugins/Food/Burger/Burger.cpp b/src/Plugins/Food/Burger/Burger.cpp index 4b81d7b..e18f508 100644 --- a/src/Plugins/Food/Burger/Burger.cpp +++ b/src/Plugins/Food/Burger/Burger.cpp @@ -1,7 +1,59 @@ #include "Burger.h" +#include "T2PluginSpecifier.h" +#include "../Common/FoodDef.h" +#include "../Common/FoodPlugin.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif + +BEGIN_MESSAGE_MAP(CBurgerApp, CWinApp) +END_MESSAGE_MAP() + +CBurgerApp::CBurgerApp() { +} + +CBurgerApp theApp; + +FoodPlugin *sFoodPlugin; +FoodDef *sFoodDef; + +extern "C" void *AFX_EXT_API CALLBACK ConstructProgramPlugin(T2PluginSpecifier *inSpecifier) { + if (!sFoodPlugin) { +#line 88 + sFoodPlugin = new FoodPlugin('TnPl', inSpecifier); + } + + return sFoodPlugin; +} + +extern "C" void *AFX_EXT_API CALLBACK ConstructTemplatePlugin(T2PluginSpecifier *inSpecifier, CResFile *inResFile, T2WorldDef *inWorldDef, T2TenantPlugin *inPlugin) { + if (!sFoodDef) { +#line 101 + sFoodDef = new FoodDef('TnDf', *inSpecifier, inResFile, inWorldDef, inPlugin); + } + + return sFoodDef; +} + +extern "C" void *AFX_EXT_API CALLBACK DestructProgramPlugin() { + delete sFoodPlugin; + sFoodPlugin = NULL; + + delete sFoodDef; + sFoodDef = NULL; + + return NULL; +} + +extern "C" T2PluginSpecifier *AFX_EXT_API CALLBACK GetAttr(T2PluginSpecifier *inSpecifier, CResFile *inResFile, T2WorldDef *inWorldDef, T2TenantPlugin *inPlugin) { +#line 120 + T2PluginSpecifier *specifier = new T2PluginSpecifier; + specifier->mPluginName = "Burgar"; + specifier->mType = 'TnPl'; + specifier->mAttrib = 0xFFFFFFFF; + specifier->mGameLevel = 0; + return specifier; +} diff --git a/src/Plugins/Food/Burger/Burger.h b/src/Plugins/Food/Burger/Burger.h index a99da1b..37b2774 100644 --- a/src/Plugins/Food/Burger/Burger.h +++ b/src/Plugins/Food/Burger/Burger.h @@ -1,5 +1,9 @@ #pragma once #include "common.h" -class Burger { +class CBurgerApp : public CWinApp { +public: + CBurgerApp(); + + DECLARE_MESSAGE_MAP() }; |