Implement built in Extractor for Windows (#2730)

* wip

* const

* split zapd into two targets

* Workingish.

* fix working dir and copy xmls on build (#2)

* dont change current working dir with dialog prompts

* copy asset xmls to target dir

* make zpadlib public

* Messagebox.

* Check for WIN32

* threading

* Cleanups to the exporter and main.

* Multi extraction.

* Fix byteswap header includes.

* Fix another byteswap include.

* fix again.

* stddef size_t

* Add other targets for ZAPDLib

* Non windows.

* IDYES IDNO

* Linux fixes

* hopefully remove switch and wiiu from building extractor

* Please?

* validate roms and add another valid rom

* ifdef out extract.h for switch and wiiu

* Maybe update lux

* Remove ZAPDlib from switch and WiiU

* more rules

* Update soh/soh/Extractor/Extract.cpp

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update ZAPDTR/ZAPD/ExecutableMain.cpp

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update ZAPDTR/ZAPD/CMakeLists.txt

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update ZAPDTR/ZAPD/GameConfig.cpp

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update ZAPDTR/ZAPD/Globals.cpp

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update ZAPDTR/ZAPD/Main.cpp

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update soh/CMakeLists.txt

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update soh/soh/Extractor/Extract.cpp

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update soh/soh/Extractor/Extract.cpp

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update soh/soh/Extractor/Extract.cpp

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* the last fix

* Add context to a comment

---------

Co-authored-by: Adam Bird <archez39@me.com>
Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
This commit is contained in:
louist103
2023-04-25 00:01:17 -04:00
committed by GitHub
parent 44d3f1ccbb
commit aea46e7cb2
15 changed files with 2759 additions and 51 deletions

View File

@@ -10,7 +10,6 @@
#include <libultraship/bridge.h>
#include "soh/CrashHandlerExp.h"
s32 gScreenWidth = SCREEN_WIDTH;
s32 gScreenHeight = SCREEN_HEIGHT;
size_t gSystemHeapSize = 0;
@@ -44,11 +43,21 @@ void Main_LogSystemHeap(void) {
}
#ifdef _WIN32
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, PSTR cmdline, int cmdshow)
#else
int main(int argc, char** argv)
#endif
int SDL_main(int argc, char** argv)
{
AllocConsole();
(void)freopen("CONIN$", "r", stdin);
(void)freopen("CONOUT$", "w", stdout);
(void)freopen("CONOUT$", "w", stderr);
#ifndef _DEBUG
ShowWindow(GetConsoleWindow(), SW_HIDE);
#endif
#else //_WIN32
int main(int argc, char** argv)
{
#endif
GameConsole_Init();
InitOTR();
// TODO: Was moved to below InitOTR because it requires window to be setup. But will be late to catch crashes.