Skip to content

Commit 419daea

Browse files
Ladislav ZezulaLadislav Zezula
Ladislav Zezula
authored and
Ladislav Zezula
committed
Updated Storm.lib test program
1 parent 33fd0ed commit 419daea

File tree

5 files changed

+26
-7
lines changed

5 files changed

+26
-7
lines changed

storm_dll/Storm_dll.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Microsoft Visual Studio Solution File, Format Version 10.00
22
# Visual Studio 2008
33
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "storm_dll", "storm_dll.vcproj", "{BD600973-C6FA-4CE3-8821-67F6418B7F9C}"
44
EndProject
5+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "storm_test", "storm_test_vs08.vcproj", "{5B0E680A-EC4E-402E-AE0D-18ADD2DC6EBE}"
6+
EndProject
57
Global
68
GlobalSection(SolutionConfigurationPlatforms) = preSolution
79
Debug|Win32 = Debug|Win32
@@ -18,6 +20,14 @@ Global
1820
{BD600973-C6FA-4CE3-8821-67F6418B7F9C}.Release|Win32.Build.0 = Release|Win32
1921
{BD600973-C6FA-4CE3-8821-67F6418B7F9C}.Release|x64.ActiveCfg = Release|x64
2022
{BD600973-C6FA-4CE3-8821-67F6418B7F9C}.Release|x64.Build.0 = Release|x64
23+
{5B0E680A-EC4E-402E-AE0D-18ADD2DC6EBE}.Debug|Win32.ActiveCfg = Debug|Win32
24+
{5B0E680A-EC4E-402E-AE0D-18ADD2DC6EBE}.Debug|Win32.Build.0 = Debug|Win32
25+
{5B0E680A-EC4E-402E-AE0D-18ADD2DC6EBE}.Debug|x64.ActiveCfg = Debug|x64
26+
{5B0E680A-EC4E-402E-AE0D-18ADD2DC6EBE}.Debug|x64.Build.0 = Debug|x64
27+
{5B0E680A-EC4E-402E-AE0D-18ADD2DC6EBE}.Release|Win32.ActiveCfg = Release|Win32
28+
{5B0E680A-EC4E-402E-AE0D-18ADD2DC6EBE}.Release|Win32.Build.0 = Release|Win32
29+
{5B0E680A-EC4E-402E-AE0D-18ADD2DC6EBE}.Release|x64.ActiveCfg = Release|x64
30+
{5B0E680A-EC4E-402E-AE0D-18ADD2DC6EBE}.Release|x64.Build.0 = Release|x64
2131
EndGlobalSection
2232
GlobalSection(SolutionProperties) = preSolution
2333
HideSolutionNode = FALSE

storm_dll/storm.lib

0 Bytes
Binary file not shown.

storm_dll/storm_dll.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
/* 11.04.03 1.00 Lad Added some functions */
1414
/*****************************************************************************/
1515

16-
// We need the Windows data types for the Storm prototypes
17-
#include <windows.h>
18-
1916
#ifndef __STORM_H__
2017
#define __STORM_H__
2118

22-
// Somethimes is necessary to change the function names so they
19+
// We need the Windows data types for the Storm prototypes
20+
#include <windows.h>
21+
22+
// Sometimes is necessary to change the function names so they
2323
// will not conflict with other MPQ tools.
2424
#ifdef STORM_ALTERNATE_NAMES
2525
#define SFILE(Name) Storm##Name
@@ -58,6 +58,7 @@ BOOL WINAPI SCOMP(Decompress)(char * pbOutBuffer, int * pdwOutLength, char * pb
5858
}
5959
#endif
6060

61+
#pragma message("Huhu1")
6162
#if defined(_MSC_VER) && !defined(BUILDING_STORM_CPP)
6263
#pragma comment(lib, "Storm.lib") // Force linking Storm.lib and thus Storm.dll
6364
#endif

storm_dll/storm_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@
1616
#include <crtdbg.h>
1717
#endif
1818

19-
#define STORM_ALTERNATE_NAMES
19+
#define STORM_ALTERNATE_NAMES // Use Storm* prefix for functions
2020
#include "storm_dll.h" // Header file for Storm.dll
2121

2222
//-----------------------------------------------------------------------------
2323
// Main
2424

2525
int main()
2626
{
27-
LPCSTR szArchiveName = "e:\\Multimedia\\MPQs\\1995 - Test MPQs\\MPQ_2016_v1_123.w3x";
27+
LPCSTR szArchiveName = "e:\\war3.mpq";
2828
HANDLE hMpq = NULL;
2929
HANDLE hFile = NULL;
3030
BYTE Buffer[0x100];
3131
DWORD dwBytesRead = 0;
3232

3333
if(StormOpenArchive(szArchiveName, 0, 0, &hMpq))
3434
{
35-
if(StormOpenFileEx(hMpq, "war3map.j", 0, &hFile))
35+
if(StormOpenFileEx(hMpq, "(1)TheDeathSheep.w3m", 0, &hFile))
3636
{
3737
dwBytesRead = StormGetFileSize(hFile, NULL);
3838
StormReadFile(hFile, Buffer, sizeof(Buffer), &dwBytesRead, NULL);

storm_dll/storm_test.vcproj renamed to storm_dll/storm_test_vs08.vcproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,14 @@
345345
>
346346
</File>
347347
</Filter>
348+
<Filter
349+
Name="Header Files"
350+
>
351+
<File
352+
RelativePath=".\storm_dll.h"
353+
>
354+
</File>
355+
</Filter>
348356
</Files>
349357
<Globals>
350358
</Globals>

0 commit comments

Comments
 (0)