#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