Browse Source

Load mpq in read only mode

This solves issues for people that have the mpq on read only media.
pull/17/head
Anders Jenbo 7 years ago
parent
commit
eac3f0ec7f
  1. 2
      3rdParty/Storm/Source/storm.h
  2. 4
      Stub/init.cpp

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

@ -393,6 +393,8 @@ SNetSendMessage(
#define SNPLAYER_ALL -1
#define SNPLAYER_OTHERS -2
#define MPQ_FLAG_READ_ONLY 1
/* SNetSendTurn @ 128
*

4
Stub/init.cpp

@ -86,10 +86,10 @@ void __cdecl init_archives()
{
DUMMY(); // We will need to remove the find_file_in_std_directories funct when it comes to mobile
SFileOpenArchive(find_file_in_std_directories("diabdat.mpq").c_str(), 1000, 0, &diabdat_mpq);
SFileOpenArchive(find_file_in_std_directories("diabdat.mpq").c_str(), 1000, MPQ_FLAG_READ_ONLY, &diabdat_mpq);
assert(diabdat_mpq);
SFileOpenArchive("patch_rt.mpq", 1000, 0, &patch_rt_mpq);
SFileOpenArchive("patch_rt.mpq", 1000, MPQ_FLAG_READ_ONLY, &patch_rt_mpq);
}
void GetAvailableHeroes()

Loading…
Cancel
Save