mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-04 21:50:35 -04:00
Moved to git
Assembla's decision to remove Trac incited us to ditch them entirely. Further, the repository no longer includes binaries or libraries; these can be downloaded from niotso.org/pub/ and updated with the included update-libraries script.
This commit is contained in:
parent
6b0b0c1d9c
commit
227617b540
33 changed files with 368 additions and 95 deletions
52
Tools/TSOSimulatorClient/TSOEdithEditor/TSOEdithEditor.cpp
Normal file
52
Tools/TSOSimulatorClient/TSOEdithEditor/TSOEdithEditor.cpp
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
TSOEdithEditor - TSOEdithEditorD.dll injector
|
||||
TSOEdithEditor.cpp - Copyright (c) 2012 Niotso Project <http://niotso.org/>
|
||||
Author(s): Fatbag <X-Fi6@phppoll.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include "TSOEdithEditor.hpp"
|
||||
|
||||
int main(){
|
||||
HMODULE dllmodule = LoadLibrary("TSOEdithEditorD.dll");
|
||||
if(dllmodule == NULL){
|
||||
printf("TSOEdithEditor: Error: Failed to load DLL \"TSOEdithEditorD.dll\".");
|
||||
return -1;
|
||||
}
|
||||
|
||||
cEdithEditorCOMDirector * (__stdcall *GZDllGetGZCOMDirector)(void) =
|
||||
(cEdithEditorCOMDirector * (__stdcall *)(void)) GetProcAddress(dllmodule, "GZDllGetGZCOMDirector");
|
||||
if(GZDllGetGZCOMDirector == NULL){
|
||||
printf("TSOEdithEditor: Error: Failed to find GZDllGetGZCOMDirector() in TSOEdithEditorD.dll.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("TSOEdithEditor: Calling GZDllGetGZCOMDirector() ...\n");
|
||||
cEdithEditorCOMDirector * Edith = GZDllGetGZCOMDirector();
|
||||
printf("TSOEdithEditor: Finished calling GZDllGetGZCOMDirector().\nThe value returned was: %p.\n", (void *) Edith);
|
||||
|
||||
while(true){
|
||||
char buffer[8];
|
||||
printf("\nCall a function (0, 1, 2, ...) or q to exit. ");
|
||||
fgets(buffer, 8, stdin);
|
||||
if(buffer[0] == 'q') break;
|
||||
Edith->Object1.vtable5[atoi(buffer)]();
|
||||
}
|
||||
|
||||
printf("TSOEdithEditor: Exiting.\n");
|
||||
FreeLibrary(dllmodule);
|
||||
return 0;
|
||||
}
|
68
Tools/TSOSimulatorClient/TSOEdithEditor/TSOEdithEditor.hpp
Normal file
68
Tools/TSOSimulatorClient/TSOEdithEditor/TSOEdithEditor.hpp
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
TSOEdithEditor - TSOEdithEditorD.dll injector
|
||||
TSOEdithEditor.hpp - Copyright (c) 2012 Fatbag <X-Fi6@phppoll.org>
|
||||
Author(s): Fatbag <X-Fi6@phppoll.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <basetyps.h>
|
||||
#pragma pack(0)
|
||||
|
||||
DECLARE_INTERFACE(cUnknownObject1)
|
||||
{
|
||||
DWORD Zero1;
|
||||
DWORD Zero2;
|
||||
void * vtable5;
|
||||
char ** Strings1;
|
||||
char ** Strings2;
|
||||
char ** Strings3;
|
||||
DWORD Zero3;
|
||||
DWORD Zero4;
|
||||
DWORD Zero5;
|
||||
void ** Pointer1; //12 bytes
|
||||
void ** Pointer2; //4 bytes
|
||||
void ** Pointer3;
|
||||
DWORD Flags;
|
||||
DWORD * Pointer4; //4 bytes
|
||||
void * Pointer5;
|
||||
void * Pointer6;
|
||||
DWORD Unknown11;
|
||||
DWORD Unknown12;
|
||||
};
|
||||
|
||||
DECLARE_INTERFACE(cEdithEditorCOMDirector)
|
||||
{
|
||||
void * vtable2;
|
||||
void * vtable1;
|
||||
cUnknownObject1 Object1;
|
||||
void * vtable4;
|
||||
void * vtable3;
|
||||
cUnknownObject1 Object2;
|
||||
cUnknownObject1 Object3;
|
||||
|
||||
DWORD Zero1;
|
||||
DWORD Zero2;
|
||||
DWORD Zero3;
|
||||
DWORD Zero4;
|
||||
DWORD Zero5;
|
||||
DWORD Zero6;
|
||||
DWORD Zero7;
|
||||
DWORD Zero8;
|
||||
DWORD Zero9;
|
||||
DWORD Zero10;
|
||||
DWORD Unknown1;
|
||||
DWORD Pointer1;
|
||||
DWORD Pointer2;
|
||||
DWORD Zero11;
|
||||
};
|
1
Tools/TSOSimulatorClient/TSOEdithEditor/compile.bat
Normal file
1
Tools/TSOSimulatorClient/TSOEdithEditor/compile.bat
Normal file
|
@ -0,0 +1 @@
|
|||
gcc -Wall -Wextra -Wabi -pedantic -m32 -o TSOEdithEditor.exe TSOEdithEditor.cpp -mconsole
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TSOSimulatorClient - TSOSimulatorClientD.dll injector
|
||||
iff2html.c - Copyright (c) 2012 Niotso Project <http://niotso.org/>
|
||||
TSOSimulatorClient.cpp - Copyright (c) 2012 Niotso Project <http://niotso.org/>
|
||||
Author(s): Fatbag <X-Fi6@phppoll.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
|
@ -26,20 +26,20 @@ int main(){
|
|||
printf("TSOSimulatorClient: Error: Failed to load DLL \"TSOSimulatorClientD.dll\".");
|
||||
return -1;
|
||||
}
|
||||
|
||||
GZCOMDirector * (__stdcall *GZDllGetGZCOMDirector)(void) =
|
||||
(GZCOMDirector * (__stdcall *)(void)) GetProcAddress(dllmodule, "GZDllGetGZCOMDirector");
|
||||
|
||||
cTSOSimulatorClientDCOMDirector * (__stdcall *GZDllGetGZCOMDirector)(void) =
|
||||
(cTSOSimulatorClientDCOMDirector * (__stdcall *)(void)) GetProcAddress(dllmodule, "GZDllGetGZCOMDirector");
|
||||
if(GZDllGetGZCOMDirector == NULL){
|
||||
printf("TSOSimulatorClient: Error: Failed to find GZDllGetGZCOMDirector() in TSOSimulatorClientD.dll.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
printf("TSOSimulatorClient: Calling GZDllGetGZCOMDirector() ...\n");
|
||||
GZCOMDirector * Simulator = GZDllGetGZCOMDirector();
|
||||
cTSOSimulatorClientDCOMDirector * Simulator = GZDllGetGZCOMDirector();
|
||||
printf("TSOSimulatorClient: Finished calling GZDllGetGZCOMDirector().\nThe value returned was: %p.\n", (void *) Simulator);
|
||||
|
||||
|
||||
printf("%s\n%s\n%s\n", Simulator->Object1.Strings1[0], Simulator->Object1.Strings2[0], Simulator->Object1.Strings3[0]);
|
||||
|
||||
|
||||
printf("TSOSimulatorClient: Exiting.\n");
|
||||
FreeLibrary(dllmodule);
|
||||
return 0;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/*
|
||||
TSOSimulatorClient - TSOSimulatorClientD.dll injector
|
||||
TSOSimulatorClient.hpp - Copyright (c) 2012 Fatbag <X-Fi6@phppoll.org>
|
||||
Author(s): Fatbag <X-Fi6@phppoll.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -17,7 +19,7 @@
|
|||
#include <basetyps.h>
|
||||
#pragma pack(0)
|
||||
|
||||
DECLARE_INTERFACE(UnknownObject1_t)
|
||||
DECLARE_INTERFACE(cUnknownObject1)
|
||||
{
|
||||
DWORD Zero1;
|
||||
DWORD Zero2;
|
||||
|
@ -39,15 +41,15 @@ DECLARE_INTERFACE(UnknownObject1_t)
|
|||
DWORD Unknown12;
|
||||
};
|
||||
|
||||
DECLARE_INTERFACE(GZCOMDirector)
|
||||
DECLARE_INTERFACE(cTSOSimulatorClientDCOMDirector)
|
||||
{
|
||||
void * vtable2;
|
||||
void * vtable1;
|
||||
UnknownObject1_t Object1;
|
||||
cUnknownObject1 Object1;
|
||||
void * vtable4;
|
||||
void * vtable3;
|
||||
UnknownObject1_t Object2;
|
||||
UnknownObject1_t Object3;
|
||||
cUnknownObject1 Object2;
|
||||
cUnknownObject1 Object3;
|
||||
|
||||
DWORD Zero1;
|
||||
DWORD Zero2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue