summaryrefslogtreecommitdiff
path: root/src/T2DLL/GlobalFunc.h
blob: f0a35898b0dff27762f7b2a377147f30da2adebe (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef T2DLL_GLOBALFUNC_H
#define T2DLL_GLOBALFUNC_H
#include "../common.h"

// these are horrible kludges used by LoadStringTable
#define INSTANCE_EXE ((HINSTANCE) 1)
#define INSTANCE_WORLD ((HINSTANCE) 2)
#define INSTANCE_ANY ((HINSTANCE) 3)

struct ACTPALETTEENTRY {
    BYTE red, green, blue;
};

struct SUBPLUGINFSENTRY {
	int spfse_m0;
	int spfse_m4;
	int spfse_m8;
	int spfse_mC; // size?
};

AFX_API_EXPORT char *strtokEx(char * inStr, const char * inSep, char ** ioLast);
AFX_API_EXPORT void InsetRect(RECT * ioRect, int inX, int inY);
AFX_API_EXPORT void SetPt(POINT * outPt, int inX, int inY);
AFX_API_EXPORT HBITMAP Create256DIBitmap(HDC inDC, int inWidth, int inHeight);
AFX_API_EXPORT LOGPALETTE *ConvACTPalette(ACTPALETTEENTRY * inPalette);
AFX_API_EXPORT LOGPALETTE *LoadACTPaletteEntries(HINSTANCE inModule, int inResID);
AFX_API_EXPORT void FFSetStaticForce(int inX, int inY);
AFX_API_EXPORT CString GetInstallSource();
AFX_API_EXPORT CString GetInstallSourceDrive();
AFX_API_EXPORT T2TowerDoc *GetCurrentT2TowerDoc();
AFX_API_EXPORT HINSTANCE GetWorldModuleHandle();
AFX_API_EXPORT CString GetModuleName(HINSTANCE inModule);
AFX_API_EXPORT unsigned int TickCount();
AFX_API_EXPORT BOOL DispatchOptionEvent(OPTIONEVENTTYPE inEventType, void * inData);
AFX_API_EXPORT CFile *OpenSubPluginFS(const char * inPath, int inID1, int inID2, SUBPLUGINFSENTRY * outEntry);
AFX_API_EXPORT void __Rep0(const char * inFileName, int inLineNum, const char * inMessage);
AFX_API_EXPORT void __Rep1(const char * inFileName, int inLineNum, const char * inMessage, unsigned long inArg1);
AFX_API_EXPORT void __Rep2(const char * inFileName, int inLineNum, const char * inMessage, unsigned long inArg1, unsigned long inArg2);
AFX_API_EXPORT void GetTowerDirectory(char * outStr);
AFX_API_EXPORT CString GetTowerDirectory();
AFX_API_EXPORT CString LoadString(HINSTANCE inModule, int inID, int inMaxSize);
AFX_API_EXPORT CString LoadStringTable(HINSTANCE inModule, int inID1, int inID2);
AFX_API_EXPORT void CopyPalette(LOGPALETTE *inSrc, LOGPALETTE *inDst, int inSrcIndex, int inDstIndex, int inCount);
AFX_API_EXPORT void WriteMachineProfileString(const char * inKey, const char * inName, const char * inValue);
AFX_API_EXPORT void WriteMachineProfileInt(const char * inKey, const char * inName, int inValue);
AFX_API_EXPORT CString GetMachineProfileString(const char * inKey, const char * inName, const char * inDefaultValue);
AFX_API_EXPORT int GetMachineProfileInt(const char * inKey, const char * inName, int inDefaultValue);
#endif