mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
Replaced StormLib .lib files with source code.
Some modifications to handle backslashes and forward slashes, along with some optimizations to speed up OTR generation.
This commit is contained in:
parent
941c19f2c3
commit
b3e299dbde
378 changed files with 93684 additions and 29 deletions
46
StormLib/storm_dll/storm_test.cpp
Normal file
46
StormLib/storm_dll/storm_test.cpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*****************************************************************************/
|
||||
/* Storm_test.cpp Copyright (c) Ladislav Zezula 2014 */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Test module for storm.dll (original Blizzard MPQ dynalic library */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Date Ver Who Comment */
|
||||
/* -------- ---- --- ------- */
|
||||
/* 24.08.14 1.00 Lad The first version of Storm_test.cpp */
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _CRT_NON_CONFORMING_SWPRINTFS
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
#define STORM_ALTERNATE_NAMES // Use Storm* prefix for functions
|
||||
#include "storm_dll.h" // Header file for Storm.dll
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Main
|
||||
|
||||
int main()
|
||||
{
|
||||
LPCSTR szArchiveName = "e:\\war3.mpq";
|
||||
HANDLE hMpq = NULL;
|
||||
HANDLE hFile = NULL;
|
||||
BYTE Buffer[0x100];
|
||||
DWORD dwBytesRead = 0;
|
||||
|
||||
if(StormOpenArchive(szArchiveName, 0, 0, &hMpq))
|
||||
{
|
||||
if(StormOpenFileEx(hMpq, "(1)TheDeathSheep.w3m", 0, &hFile))
|
||||
{
|
||||
dwBytesRead = StormGetFileSize(hFile, NULL);
|
||||
StormReadFile(hFile, Buffer, sizeof(Buffer), &dwBytesRead, NULL);
|
||||
StormCloseFile(hFile);
|
||||
}
|
||||
|
||||
StormCloseArchive(hMpq);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue