summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2MoverPlugin.cpp
blob: 2c5a6ad6228747b9dc00edc341f04281e65f3839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "StdAfx.h"
#include "CResFile.h"
#include "T2MoverPlugin.h"

T2MoverPlugin::T2MoverPlugin(DWORD type, T2PluginSpecifier& specifier)
    : T2EquipPlugin(type, specifier)
{
}

/*virtual*/ T2MoverPlugin::~T2MoverPlugin() {
}

BOOL T2MoverPlugin::LoadAllTemplatePlugin(T2WorldDef* worldDef, T2TemplatePluginDB*) {
    LoadT2MoverDef(worldDef);
    return true;
}

typedef T2TemplatePlugin *(MSVC_STDCALL* ConstructTemplatePluginType) (T2PluginSpecifier *, CResFile *, T2WorldDef *, T2MoverPlugin *);

void T2MoverPlugin::LoadT2MoverDef(T2WorldDef* worldDef) {
    ConstructTemplatePluginType theFunc = (ConstructTemplatePluginType) GetProcAddress((HMODULE) mModuleHandle, "ConstructTemplatePlugin");
#line 26
    _ASSERT(theFunc);

    CResFile file;
    file.OpenResource(mModuleHandle, 1, 'MvDf');
    T2TemplatePlugin *theDef = theFunc(&mSpecifier, &file, worldDef, this);

    mTemplatePlugin = theDef;
}