Browse Source

[hellfire] gamemenu_save_game / gamemenu_load_game bin exact (#1772)

pull/876/head
qndel 7 years ago committed by Anders Jenbo
parent
commit
7956bf81da
  1. 8
      Source/gamemenu.cpp
  2. 13
      Source/items.cpp
  3. 1
      Source/items.h

8
Source/gamemenu.cpp

@ -123,6 +123,9 @@ void gamemenu_load_game(BOOL bActivate)
DrawAndBlit();
LoadGame(FALSE);
ClrDiabloMsg();
#ifdef HELLFIRE
dword_691CB0 = 0;
#endif
PaletteFadeOut(8);
deathflag = FALSE;
drawpanflag = 255;
@ -154,6 +157,11 @@ void gamemenu_save_game(BOOL bActivate)
ClrDiabloMsg();
drawpanflag = 255;
SetCursor_(CURSOR_HAND);
#ifdef HELLFIRE
if (dword_691CB0 != 0) {
items_427A72();
}
#endif
interface_msg_pump();
SetWindowProc(saveProc);
}

13
Source/items.cpp

@ -2794,6 +2794,19 @@ void RecreateEar(int ii, WORD ic, int iseed, int Id, int dur, int mdur, int ch,
}
#ifdef HELLFIRE
void items_427A72()
{
PkItemStruct id;
if (dword_691CB0) {
if (CornerItemMaybe.IDidx >= 0) {
PackItem(&id, &CornerItemMaybe);
SRegSaveData("Hellfire", off_4A5AC4, 0, (BYTE *)&id, 19);
} else {
SRegSaveData("Hellfire", off_4A5AC4, 0, (BYTE *)"", 1);
}
}
}
void items_427ABA(int x, int y)
{
int i, ii;

1
Source/items.h

@ -93,6 +93,7 @@ void CreateTypeItem(int x, int y, BOOL onlygood, int itype, int imisc, BOOL send
void RecreateItem(int ii, int idx, WORD icreateinfo, int iseed, int ivalue);
void RecreateEar(int ii, WORD ic, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff);
#ifdef HELLFIRE
void items_427A72();
void items_427ABA(int x, int y);
#endif
void SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag);

Loading…
Cancel
Save