summaryrefslogtreecommitdiff
path: root/src/T2DLL/GlobalFunc.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
committerAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
commitc0c336500955a23e344651e5412c9d9d441ef4ee (patch)
tree790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/GlobalFunc.h
parent37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff)
downloadt2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz
t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r--src/T2DLL/GlobalFunc.h75
1 files changed, 46 insertions, 29 deletions
diff --git a/src/T2DLL/GlobalFunc.h b/src/T2DLL/GlobalFunc.h
index 9375677..0b8fd2f 100644
--- a/src/T2DLL/GlobalFunc.h
+++ b/src/T2DLL/GlobalFunc.h
@@ -1,7 +1,15 @@
#pragma once
#include "common.h"
-struct ACTPALETTEENTRY;
+// 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;
@@ -9,32 +17,41 @@ struct SUBPLUGINFSENTRY {
int spfse_mC; // size?
};
-char *strtokEx(char *, const char *, char **);
-void InsetRect(RECT *, int, int);
-void SetPt(POINT *, int, int);
-HBITMAP Create256DIBitmap(HDC, int, int);
-LOGPALETTE *ConvACTPalette(ACTPALETTEENTRY *);
-LOGPALETTE *LoadACTPaletteEntries(HINSTANCE, int);
-void FFSetStaticForce(int, int);
-CString GetInstallSource();
-CString GetInstallSourceDrive();
-T2TowerDoc *GetCurrentT2TowerDoc();
-HINSTANCE GetWorldModuleHandle();
-CString GetModuleName(HINSTANCE);
-unsigned int TickCount();
-int DispatchOptionEvent(OPTIONEVENTTYPE, void *);
-CFile *OpenSubPluginFS(const char *, int, int, SUBPLUGINFSENTRY *);
-void __Rep0(const char *, int, const char *);
-void __Rep1(const char *, int, const char *, unsigned long);
-void __Rep2(const char *, int, const char *, unsigned long, unsigned long);
-void GetTowerDirectory(char *);
-CString GetTowerDirectory();
-CString LoadStringA(HINSTANCE, int, int);
-CString LoadStringTable(HINSTANCE, int, int);
-void CopyPalette(LOGPALETTE *, LOGPALETTE *, int, int, int);
-void WriteMachineProfileString(const char *, const char *, const char *);
-void WriteMachineProfileInt(const char *, const char *, int);
-CString GetMachineProfileString(const char *, const char *, const char *);
-int GetMachineProfileInt(const char *, const char *, int);
+char *AFX_EXT_API strtokEx(char * inStr, const char * inSep, char ** ioLast);
+void AFX_EXT_API InsetRect(RECT * ioRect, int inX, int inY);
+void AFX_EXT_API SetPt(POINT * outPt, int inX, int inY);
+HBITMAP AFX_EXT_API Create256DIBitmap(HDC inDC, int inWidth, int inHeight);
+LOGPALETTE *AFX_EXT_API ConvACTPalette(ACTPALETTEENTRY * inPalette);
+LOGPALETTE *AFX_EXT_API LoadACTPaletteEntries(HINSTANCE inModule, int inResID);
+void AFX_EXT_API FFSetStaticForce(int inX, int inY);
+CString AFX_EXT_API GetInstallSource();
+CString AFX_EXT_API GetInstallSourceDrive();
+T2TowerDoc *AFX_EXT_API GetCurrentT2TowerDoc();
+HINSTANCE AFX_EXT_API GetWorldModuleHandle();
+CString AFX_EXT_API GetModuleName(HINSTANCE inModule);
+unsigned int AFX_EXT_API TickCount();
+BOOL AFX_EXT_API DispatchOptionEvent(OPTIONEVENTTYPE inEventType, void * inData);
+CFile *AFX_EXT_API OpenSubPluginFS(const char * inPath, int inID1, int inID2, SUBPLUGINFSENTRY * outEntry);
+void AFX_EXT_API __Rep0(const char * inFileName, int inLineNum, const char * inMessage);
+void AFX_EXT_API __Rep1(const char * inFileName, int inLineNum, const char * inMessage, unsigned long inArg1);
+void AFX_EXT_API __Rep2(const char * inFileName, int inLineNum, const char * inMessage, unsigned long inArg1, unsigned long inArg2);
+void AFX_EXT_API GetTowerDirectory(char * outStr);
+CString AFX_EXT_API GetTowerDirectory();
+CString AFX_EXT_API LoadString(HINSTANCE inModule, int inID, int inMaxSize);
+CString AFX_EXT_API LoadStringTable(HINSTANCE inModule, int inID1, int inID2);
+void AFX_EXT_API CopyPalette(LOGPALETTE *inSrc, LOGPALETTE *inDst, int inSrcIndex, int inDstIndex, int inCount);
+void AFX_EXT_API WriteMachineProfileString(const char * inKey, const char * inName, const char * inValue);
+void AFX_EXT_API WriteMachineProfileInt(const char * inKey, const char * inName, int inValue);
+CString AFX_EXT_API GetMachineProfileString(const char * inKey, const char * inName, const char * inDefaultValue);
+int AFX_EXT_API GetMachineProfileInt(const char * inKey, const char * inName, int inDefaultValue);
-DLL_EXPORT CT2App *gT2App;
+extern AFX_EXT_DATA T2SoundPlayer *Sounds;
+extern AFX_EXT_DATA CT2App *gT2App;
+extern AFX_EXT_DATA int gCommonColor[20];
+extern AFX_EXT_DATA BOOL FFEnable;
+extern AFX_EXT_DATA DWORD FFBaseForce;
+extern AFX_EXT_DATA IDirectInput *FFgpdi;
+extern AFX_EXT_DATA IDirectInputDevice2W *FFJoystick;
+extern AFX_EXT_DATA IDirectInputEffect *FFBuild;
+extern AFX_EXT_DATA IDirectInputEffect *FFStatic;
+extern AFX_EXT_DATA T2TowerDoc *g_TowerDoc;