mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-04 13:47:04 -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
|
@ -12,7 +12,7 @@ if(WIN32)
|
|||
windows/Dialog/AddToArchive.cpp
|
||||
windows/Dialog/NewArchive.cpp
|
||||
)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Libraries/FileHandler/libpng)
|
||||
include_directories(${LIBPNG_INCLUDE_DIR})
|
||||
add_executable(FARDive WIN32 ${FARDIVE_SOURCES})
|
||||
target_link_libraries(FARDive ole32 uxtheme FileHandler_shared)
|
||||
endif()
|
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;
|
||||
|
|
|
@ -9,7 +9,7 @@ set(IFF2HTML_SOURCES
|
|||
../../Libraries/FileHandler/bmp/read_bmp.c
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Libraries/FileHandler)
|
||||
include_directories(${FILEHANDLER_INCLUDE_DIR} ${LIBPNG_INCLUDE_DIR})
|
||||
|
||||
add_executable(iff2html ${IFF2HTML_SOURCES})
|
||||
target_link_libraries(iff2html iff_static libpng_static zlib_static m)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <iff/iff.h>
|
||||
#include <bmp/read_bmp.h>
|
||||
#include <setjmp.h>
|
||||
#include <libpng/png.h>
|
||||
#include <png.h>
|
||||
#include "opngreduc.h"
|
||||
|
||||
int WritePNG(const char * OutName, const IFFChunk * ChunkData, int ZBuffer,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#ifndef OPNGREDUC_H
|
||||
#define OPNGREDUC_H
|
||||
|
||||
#include <libpng/png.h>
|
||||
#include <png.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
1
Tools/inputtest/Readme.txt
Normal file
1
Tools/inputtest/Readme.txt
Normal file
|
@ -0,0 +1 @@
|
|||
This is for testing Windows input messages, at the moment.
|
1
Tools/inputtest/compile.bat
Normal file
1
Tools/inputtest/compile.bat
Normal file
|
@ -0,0 +1 @@
|
|||
gcc -Wall -Wextra -Wabi -pedantic -m32 -o inputtest.exe inputtest.cpp -mconsole
|
96
Tools/inputtest/inputtest.cpp
Normal file
96
Tools/inputtest/inputtest.cpp
Normal file
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
inputtest - Windows input testing
|
||||
inputtest.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>
|
||||
|
||||
static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
|
||||
switch(uMsg){
|
||||
|
||||
case WM_KEYDOWN:
|
||||
printf("[WM_KEYDOWN] key = %u, lParam = %lu\n", wParam, lParam);
|
||||
return 0;
|
||||
case WM_KEYUP:
|
||||
printf("[WM_KEYUP] key = %u, lParam = %lu\n", wParam, lParam);
|
||||
return 0;
|
||||
case WM_CHAR:
|
||||
printf("[WM_CHAR] key = %u, lParam = %lu\n", wParam, lParam);
|
||||
return 0;
|
||||
case WM_DEADCHAR:
|
||||
printf("[WM_DEADCHAR] key = %u, lParam = %lu\n", wParam, lParam);
|
||||
return 0;
|
||||
case WM_SYSKEYDOWN:
|
||||
printf("[WM_SYSKEYDOWN] key = %u, lParam = %lu\n", wParam, lParam);
|
||||
return 0;
|
||||
case WM_SYSKEYUP:
|
||||
printf("[WM_SYSKEYUP] key = %u, lParam = %lu\n", wParam, lParam);
|
||||
return 0;
|
||||
case WM_SYSDEADCHAR:
|
||||
printf("[WM_SYSDEADCHAR] key = %u, lParam = %lu\n", wParam, lParam);
|
||||
return 0;
|
||||
case WM_HOTKEY:
|
||||
printf("[WM_HOTKEY] keys1 = %u, keys2 = %lu\n", wParam, lParam);
|
||||
return 0;
|
||||
case WM_APPCOMMAND:
|
||||
printf("[WM_APPCOMMAND] cmd = %u, device = %u, keys = %u\n", GET_APPCOMMAND_LPARAM(lParam), GET_DEVICE_LPARAM(lParam), GET_KEYSTATE_LPARAM(lParam));
|
||||
return 0;
|
||||
|
||||
case WM_CLOSE:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
printf("Received message %u with wParam = %u, lParam = %lu\n", uMsg, wParam, lParam);
|
||||
return DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
const WNDCLASS wc = {
|
||||
0, //style
|
||||
WndProc, //lpfnWndProc
|
||||
0, //cbClsExtra
|
||||
0, //cbWndExtra
|
||||
hInstance, //hInstance
|
||||
(HICON) LoadImage(NULL, IDI_APPLICATION, //hIcon
|
||||
IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTSIZE),
|
||||
(HCURSOR) LoadImage(NULL, IDC_ARROW, //hCursor
|
||||
IMAGE_CURSOR, 0, 0, LR_SHARED | LR_DEFAULTSIZE),
|
||||
(HBRUSH) COLOR_WINDOW, //hbrBackground
|
||||
NULL, //lpszMenuName
|
||||
"INPUTTEST" //lpszClassName
|
||||
};
|
||||
|
||||
RegisterClass(&wc);
|
||||
|
||||
// Create the main window.
|
||||
const HWND hWnd = CreateWindowEx(WS_EX_APPWINDOW, "INPUTTEST", "Input test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, 0, 0, hInstance, NULL);
|
||||
|
||||
SetForegroundWindow(hWnd);
|
||||
SetFocus(hWnd);
|
||||
|
||||
MSG msg;
|
||||
while(GetMessage(&msg, NULL, 0, 0)){
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -7,7 +7,7 @@ set(TSOSCAN_SOURCES
|
|||
stats.c
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Libraries/FileHandler)
|
||||
include_directories(${FILEHANDLER_INCLUDE_DIR})
|
||||
|
||||
add_executable(tsoscan ${TSOSCAN_SOURCES})
|
||||
target_link_libraries(tsoscan iff_static)
|
Loading…
Add table
Add a link
Reference in a new issue