Browse Source

Source: MINIWIN headers support

pull/4/head
nomdenom 8 years ago
parent
commit
11493e3dac
  1. 4
      3rdParty/Storm/Source/storm.h
  2. 5
      Source/codec.cpp
  3. 2
      Source/engine.cpp
  4. 2
      Source/nthread.cpp
  5. 7
      types.h

4
3rdParty/Storm/Source/storm.h vendored

@ -3,10 +3,14 @@
#ifndef __BLIZZARD_STORM_HEADER
#define __BLIZZARD_STORM_HEADER
#ifndef MINIWIN
#include <windows.h>
#include <winuser.h>
#include <winsock.h>
#include <ddraw.h>
#else
#include "miniwin.h"
#endif
// Note to self: Linker error => forgot a return value in cpp

5
Source/codec.cpp

@ -2,6 +2,11 @@
#include "../types.h"
#ifdef MINIWIN
#define srand srand_miniwin
#define rand rand_miniwin
#endif
int __fastcall codec_decode(void *pbSrcDst, int size, char *pszPassword)
{
unsigned int v3; // ebx

2
Source/engine.cpp

@ -1859,6 +1859,7 @@ int __fastcall random(BYTE idx, int v)
return (GetRndSeed() >> 16) % v;
}
#ifndef MINIWIN
struct engine_cpp_init_2
{
engine_cpp_init_2()
@ -1867,6 +1868,7 @@ struct engine_cpp_init_2
mem_atexit_mutex();
}
} _engine_cpp_init_2;
#endif
void __cdecl mem_init_mutex()
{

2
Source/nthread.cpp

@ -35,6 +35,7 @@ struct nthread_cpp_init_1
// 47F164: using guessed type int nthread_inf;
// 679700: using guessed type int nthread_cpp_init_value;
#ifndef MINIWIN
struct nthread_cpp_init_2
{
nthread_cpp_init_2()
@ -43,6 +44,7 @@ struct nthread_cpp_init_2
nthread_cleanup_mutex_atexit();
}
} _nthread_cpp_init_2;
#endif
void __cdecl nthread_init_mutex()
{

7
types.h

@ -3,10 +3,14 @@
#ifndef _TYPES_H
#define _TYPES_H
#define WIN32_LEAN_AND_MEAN
#include "resource.h"
#ifdef MINIWIN
#include "miniwin.h"
#else
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>
#include <stdio.h>
@ -18,6 +22,7 @@
#include <process.h>
#include <shlobj.h>
#include <shellapi.h>
#endif
#ifdef __GNUC__
#include <ctype.h>

Loading…
Cancel
Save