1
0
Fork 0

Compare commits

...

114 Commits
0.1 ... master

Author SHA1 Message Date
galaxyhaxz 4d2a1e55dd
Update README.md 2018-06-21 23:12:33 -05:00
Tanner Donovan 008f92e536 add install instructions for mac (#49) 2018-06-21 23:08:58 -05:00
Adam Stachowicz a71ff341f6 Enable OSX build for Travis CI (#44) 2018-06-21 21:37:22 -05:00
Cengiz Can 68422d2f39 Makefile should clean *.lib files & as.exe needs linking (#47) 2018-06-21 21:36:04 -05:00
Leonard 7e5bed4fb5 Makefile: Use just one makefile; improvements (#29) 2018-06-21 09:21:09 -05:00
galaxyhaxz 5f31783b0c
Upload Cross-ref spreadsheet 2018-06-21 08:40:58 -05:00
Adam Stachowicz 474c75fb4c Basic support for Travis build (#34) 2018-06-20 20:36:36 -05:00
galaxyhaxz 49a6f4f9fc
Add include guards, prepare for XRef (#28)
Add definitions, other junk.
2018-06-20 05:17:44 -05:00
galaxyhaxz 5772426a7c
Fix required files 2018-06-19 20:40:04 -05:00
galaxyhaxz 007b642e52
Fix makefile for linux 2 2018-06-19 20:33:01 -05:00
galaxyhaxz 67f8485217
Fix makefile for Linux 2018-06-19 20:31:35 -05:00
galaxyhaxz fb10d2e7b2
Added FAQ section, newcomers read (#22)
Update debug document.
2018-06-19 06:11:00 -05:00
galaxyhaxz bf7fe24d0f
Add notes about windowed mode 2018-06-19 03:19:21 -05:00
galaxyhaxz 3baba7633e
Add installing and troubleshooting to readme
Also fixed a typo and missing debug features. Woohoo, god mode!
2018-06-19 02:43:59 -05:00
galaxyhaxz 2ed8daf35d
Final typos of the IPL enum 2018-06-19 02:07:02 -05:00
galaxyhaxz 1012269c1c
Fix typos 2018-06-19 02:05:50 -05:00
galaxyhaxz 7ee880f968
Fixed typos 2018-06-19 02:04:55 -05:00
galaxyhaxz b9ab0d30ba
Fix typos in enum 2018-06-19 02:03:58 -05:00
galaxyhaxz bb01c6f084
Remove the "fear factor" (#21)
Snakes, spiders, Demons, what scares you?
2018-06-18 19:16:32 -05:00
Adam Stachowicz c9e06db3cb Update README.md (#18) 2018-06-18 12:23:12 -05:00
galaxyhaxz be56d934ee
Fix compilers that use DirectX8+ 2018-06-17 19:51:04 -05:00
galaxyhaxz f238649103
Fix decompilation of init
This function could crash if the compiler optimized the stack--fixed
2018-06-17 17:30:12 -05:00
galaxyhaxz 4bd40e4ffe
Mingw makefile fix 2018-06-17 06:38:10 -05:00
galaxyhaxz eb838b6df2
Fixed last known crashing issue, also themes
This one finally fixes it so theme rooms spawn properly
2018-06-17 05:02:32 -05:00
galaxyhaxz d28ae62576
Add note for future reference 2018-06-17 05:01:21 -05:00
galaxyhaxz 67ebc1f2af
No more crashing! 2018-06-17 05:00:52 -05:00
galaxyhaxz 3915a64457
Clean up the readme and add support (#16)
* Update README, appfat, add support
2018-06-16 22:20:35 -05:00
galaxyhaxz f98ee885ce
Fix white pixel glitch in light radius
How funny, just a simple signage issue :P
2018-06-15 20:48:12 -05:00
galaxyhaxz 195096196d
Fix issue #2001 White pixel glitch 2018-06-15 20:47:00 -05:00
galaxyhaxz 2d3f493691
Fix automap zooming and drawing 2018-06-15 15:35:36 -05:00
galaxyhaxz c0ff5066b0
Fix whitespace 2018-06-15 15:34:44 -05:00
galaxyhaxz d6dca67194
Fix whitespace 2018-06-15 15:34:12 -05:00
galaxyhaxz ede77ad7dc
Fix whitepsace 2018-06-15 15:33:45 -05:00
galaxyhaxz 98a129b03a
Fix issue #2005 2018-06-15 15:33:07 -05:00
galaxyhaxz 6eca91b2d8
Better screenshot 2018-06-15 09:26:12 -05:00
galaxyhaxz 083833d589
Fix item swapping deleting the item 2018-06-15 00:47:43 -05:00
galaxyhaxz d3a117adef
Fix issue #2002 2018-06-15 00:46:58 -05:00
galaxyhaxz ade35fb4a4
Fixed decompilation, game can now be played start to finish (#15)
Fix Lazurus seals, dropping items, and Shrine spawning.
2018-06-14 05:53:03 -05:00
galaxyhaxz 0db106a5b4
Add support for Visual C++ 5.10 (#12)
* Update stuff
2018-06-14 02:38:27 -05:00
galaxyhaxz 539e544563
Merge pull request #10 from mewpull/memset32
Implement memset32 and fix compilation errors for storm.h
2018-06-11 03:26:51 -05:00
galaxyhaxz 2f7cab237f
Compatible for both VS and GNU
VS doesn't have stdint.h. (Yeah it's kinda outdated :P)
2018-06-11 03:24:24 -05:00
mewmew a441cc00df Implement memset32 and fix compilation errors for storm.h
Now Golem works on Linux as well.

---

Source/../defs.h: In function ‘void memset32(void*, unsigned int, size_t)’:
Source/../defs.h:35:8: error: expected ‘(’ before ‘{’ token
  __asm {
        ^
Source/../defs.h:36:3: error: ‘mov’ was not declared in this scope
   mov ecx, n

---

Source/../3rdParty/Storm/Source/storm.h:1300:15: error: conflicting declaration of C function ‘int SNetGetProviderCaps(_SNETCAPS*)’
 int __stdcall SNetGetProviderCaps(struct _SNETCAPS *);

---

Source/../3rdParty/Storm/Source/storm.h:1297:18: error: conflicting declaration of C function ‘void* SNetRegisterEventHandler(int, void (__attribute__((__stdcall__)) *)(_SNETEVENT*))’
 void * __stdcall SNetRegisterEventHandler(int,void (__stdcall*)(struct _SNETEVENT *));

---

Source/../3rdParty/Storm/Source/storm.h:1299:15: error: conflicting declaration of C function ‘int SNetInitializeProvider(long unsigned int, _SNETPROGRAMDATA*, _SNETPLAYERDATA*, _SNETUIDATA*, _SNETVERSIONDATA*)’
 int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *);

---

Source/multi.cpp:1046:75: error: cannot convert ‘_SNETPROGRAMDATA*’ to ‘client_info* {aka _client_info*}’ for argument ‘2’ to ‘BOOL SNetInitializeProvider(DWORD, client_info*, user_info*, battle_info*, module_info*)’
2018-06-11 09:09:41 +02:00
galaxyhaxz 4e106c76d4
Merge pull request #9 from galaxyhaxz/work
Fixed most crashes and corrected a few structs
2018-06-10 21:16:29 -05:00
galaxyhaxz bf2b23fc71
Fixed golem, now works perfect 2018-06-10 21:02:50 -05:00
galaxyhaxz 616df28d05
Fixed crashing and inaccurate Cathedral generation 2018-06-10 21:02:12 -05:00
galaxyhaxz 1d11984779
Update TODO 2018-06-10 21:01:22 -05:00
galaxyhaxz 8c850a8997
Stone curse fix 2018-06-10 20:04:15 -05:00
galaxyhaxz a371a5af71
Fixed stone curse and blood burst 2018-06-10 20:03:15 -05:00
galaxyhaxz 9c4c8c6fe1
Update defs.h 2018-06-10 20:02:30 -05:00
galaxyhaxz f0298a95a9
Update towners.cpp 2018-06-10 18:12:44 -05:00
galaxyhaxz 7651c4775a
Update town.cpp 2018-06-10 18:12:15 -05:00
galaxyhaxz 549acaf24c
Update scrollrt.cpp 2018-06-10 18:11:41 -05:00
galaxyhaxz 9cf9797a2f
Update objects.cpp 2018-06-10 18:10:54 -05:00
galaxyhaxz ffc8c38801
Update monster.cpp 2018-06-10 18:10:21 -05:00
galaxyhaxz 297db34515
Update missiles.cpp 2018-06-10 18:09:33 -05:00
galaxyhaxz fdf8fc1c6e
Update items.cpp 2018-06-10 18:08:37 -05:00
galaxyhaxz c5b1141430
Update dead.cpp 2018-06-10 18:08:01 -05:00
galaxyhaxz 02ca1300af
Update structs.h 2018-06-10 18:07:25 -05:00
galaxyhaxz e50f5a1299
Update types.h 2018-06-09 05:25:47 -05:00
galaxyhaxz 9f5253d004
Update DiabloUI.h 2018-06-09 05:25:18 -05:00
galaxyhaxz bad103a5d2
Update DiabloUI.dsp 2018-06-09 05:24:53 -05:00
galaxyhaxz 2f18fd1ad9
Update DiabloUI.cpp 2018-06-09 05:24:21 -05:00
galaxyhaxz 81f360f8bb
Update storm.dsp 2018-06-09 05:23:42 -05:00
galaxyhaxz 1a9cb74ede
Delete StdAfx.h 2018-06-09 05:22:54 -05:00
galaxyhaxz 4d003de66b
Delete StdAfx.cpp 2018-06-09 05:22:45 -05:00
galaxyhaxz ecb2747d24
Delete _storm.h 2018-06-09 05:22:37 -05:00
galaxyhaxz 53c24dd1cd
Delete StdAfx.h 2018-06-09 05:22:17 -05:00
galaxyhaxz 6a6826e647
Delete StdAfx.cpp 2018-06-09 05:22:10 -05:00
galaxyhaxz f24c455401
Delete _DiabloUI.h 2018-06-09 05:22:01 -05:00
galaxyhaxz 73c96c91fa
Fix compiling with linux 2018-06-09 04:39:24 -05:00
galaxyhaxz e4a5b1df75
Fix incorrect decompilation of dwFlags 2018-06-09 04:38:42 -05:00
galaxyhaxz 94a5f173d3
Fix for linux 2018-06-09 04:37:48 -05:00
galaxyhaxz 09824edff2
Update README.md 2018-06-09 03:27:13 -05:00
galaxyhaxz 51b6c0230b
Fix incorrectly decompiled code 2018-06-09 03:22:38 -05:00
galaxyhaxz 4482de4f90
Merge pull request #6 from mewpull/install
Add extended installation instructions for Linux and Windows
2018-06-09 03:16:52 -05:00
galaxyhaxz 4d5e0cc7d5
Merge pull request #8 from galaxyhaxz/work
Linux compiling almost there
2018-06-09 03:15:38 -05:00
galaxyhaxz 0dac197965
Update player.cpp 2018-06-08 22:12:26 -05:00
galaxyhaxz a07a6210fa
Update objects.cpp 2018-06-08 22:11:45 -05:00
galaxyhaxz e0a27589c9
Update missiles.cpp 2018-06-08 22:11:13 -05:00
galaxyhaxz 931e537efc
Update items.cpp 2018-06-08 22:10:25 -05:00
galaxyhaxz b204238a49
Update debug.cpp 2018-06-08 22:09:49 -05:00
galaxyhaxz 654472738d
Update control.cpp 2018-06-08 22:09:16 -05:00
galaxyhaxz 8ab44ba18e
Revert EOL for windows 2018-06-08 21:30:50 -05:00
galaxyhaxz 53da0929d3
Delete storm.def 2018-06-08 21:30:29 -05:00
galaxyhaxz a7fe3b95c0
Revert EOL for windows 2018-06-08 21:29:59 -05:00
galaxyhaxz 4b73a1dd52
Delete diabloui.def 2018-06-08 21:29:34 -05:00
galaxyhaxz a2e61bfb07
Revert flag fix, but still need to fix gmenu.cpp 2018-06-08 21:18:39 -05:00
galaxyhaxz e6ffff51bc
Fix EOL 2018-06-08 21:17:20 -05:00
galaxyhaxz 1e20ab18ed
Fix compatibility with GNU/MSVC 2018-06-08 21:16:12 -05:00
galaxyhaxz e8bc617743
Fix compatibility with GNU/MSVC 2018-06-08 21:14:44 -05:00
galaxyhaxz 0e81dfa087
Fix EOL 2018-06-08 21:12:27 -05:00
galaxyhaxz 84e734e55b
Make compatible with both GNU/MSVC 2018-06-08 21:09:45 -05:00
galaxyhaxz b2f9ed8781
Temporary sign change, fix in future 2018-06-08 21:04:49 -05:00
galaxyhaxz 10a479e36c
Merge pull request #7 from mewpull/dev
Linux compile Take 2 temp
2018-06-08 19:33:19 -05:00
mewmew 445520a31d Copy storm.def and diabloui.def to work with VS and GCC
Updates #5.
2018-06-09 00:16:26 +02:00
mewmew e12630c089 install: add note that pacman is for Arch Linux 2018-06-08 20:19:45 +02:00
mewmew 1a70a033b8 Update name of executable to devilution.exe
This lets it live alongside diablo.exe in the game directory.
2018-06-08 20:01:04 +02:00
mewmew 05577684c4 Add extended installation instructions for Linux and Windows 2018-06-08 19:59:40 +02:00
mewmew 19f78a991a readme: fix screenshots 2018-06-08 12:47:50 +02:00
mewmew 4a866b32db Fix build issue in debug.cpp
Source/debug.cpp:124:41: error: unable to find numeric literal operator ‘operator""i64’
    *(_QWORD *)plr[myplr]._pMemSpells |= 1i64 << (i - 1);
2018-06-08 11:42:23 +02:00
mewmew f5f76f8b8a Fix build on Linux 2018-06-08 11:23:30 +02:00
galaxyhaxz 0da84fd997
Merge pull request #4 from galaxyhaxz/revert-2-master
Revert "Add preliminary support for compiling on Linux"
2018-06-07 22:01:58 -05:00
galaxyhaxz b1ee40f6e7
Revert "Add preliminary support for compiling on Linux" 2018-06-07 22:00:35 -05:00
galaxyhaxz b4765fc121
Merge pull request #3 from mewpull/readme
readme: make screenshot visible in readme
2018-06-07 20:15:39 -05:00
galaxyhaxz 4910d30287
Merge pull request #2 from mewpull/master
Add preliminary support for compiling on Linux
2018-06-07 20:15:16 -05:00
mewmew 3ab25aca73 readme: make screenshot visible in readme 2018-06-08 01:55:30 +02:00
mewmew 1836399875 Fix linking against storm.dll and diabloui.dll
* add aliases for storm exports to handle __stdcall calling convention on Linux
* mark external functions as extern "C"
2018-06-08 01:28:20 +02:00
mewmew bd12b61831 Merge branch 'master' of https://github.com/galaxyhaxz/devilution 2018-06-07 22:45:03 +02:00
mewmew 20fdbf8aa2 Fix compile errors on Linux
Source/../types.h:35:10: fatal error: DiabloUI/_diabloui.h: No such file or directory
 #include "DiabloUI/_diabloui.h"

---

Source/../Source/init.h:43:109: error: fastcall and stdcall attributes are not compatible
 LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

---

Source/missiles.cpp:915:27: error: unable to find numeric literal operator ‘operator""i64’
  *(_QWORD *)&Dirs[0][2] = 0i64;

---

Source/world.cpp:38:1: error: narrowing conversion of ‘3937053354’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing]

---

Source/lighting.cpp:429:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned char’ inside { } [-Wnarrowing]

---

Source/objects.cpp:5459:62: error: unable to find numeric literal operator ‘operator""i64’
      while ( !(plr[v53]._pMemSpells[1] & ((unsigned __int64)(1i64 << v60) >> 32) | plr[v53]._pMemSpells[0] & (unsigned int)(1i64 << v60)) );

---

Source/control.cpp:488:9: error: unable to find numeric literal operator ‘operator""i64’
   v26 = 1i64;

---

Source/objects.cpp:243:1: error: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/gamemenu.cpp:22:1: error: narrowing conversion of ‘2147483648’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing]

---

Source/sound.cpp:41:88: error: narrowing conversion of ‘240’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/quests.cpp:46:1: error: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/player.cpp:4666:8: error: unable to find numeric literal operator ‘operator""i64’
  v14 = 0i64;

---

Source/init.cpp:546:109: error: fastcall and stdcall attributes are not compatible
 LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

---

Source/items.cpp:114:1: error: narrowing conversion of ‘(item_effect_type)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/items.cpp:307:1: error: narrowing conversion of ‘(unique_base_item)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]

---

Source/items.cpp:854:8: error: unable to find numeric literal operator ‘operator""i64’
  v37 = 0i64;

---

Source/items.cpp:471:1: error: narrowing conversion of ‘(item_equip_type)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]
2018-06-07 22:44:03 +02:00
galaxyhaxz 48a871c010
Merge pull request #1 from mewpull/master
readme: update credits to authors of sanctuary
2018-06-07 03:23:02 -05:00
mewmew b88586b810 readme: update credits to authors of sanctuary 2018-06-07 09:32:22 +02:00
galaxyhaxz 2d80291dd3
Update README.md 2018-06-06 22:23:54 -05:00
galaxyhaxz 752846b979
Update README.md 2018-06-06 22:08:45 -05:00
galaxyhaxz 2cb648773c
Update README.md 2018-06-06 22:07:53 -05:00
170 changed files with 2175 additions and 5699 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*.o
*.lib
*.dll
*.exe
*.d

26
.travis.yml Normal file
View File

@ -0,0 +1,26 @@
language: cpp
os:
- linux
- osx
notifications:
email:
on_failure: change # default: always
# Packages for Linux
addons:
apt:
packages:
- mingw-w64
before_install:
# Packages for OSX
- if [ $TRAVIS_OS_NAME = osx ]; then brew install mingw-w64; fi
before_script:
- touch storm.dll
- touch diabloui.dll
script:
- make

4
3rdParty/PKWare/objs.mak vendored Normal file
View File

@ -0,0 +1,4 @@
PKWARE_OBJS=3rdParty/PKWare/explode.o \
3rdParty/PKWare/implode.o
-include *.d

View File

@ -1,8 +0,0 @@
// stdafx.cpp : source file that includes just the standard includes
// storm.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

View File

@ -1,24 +0,0 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__2197EABE_2E6C_4E93_90B8_DA67E0A2C425__INCLUDED_)
#define AFX_STDAFX_H__2197EABE_2E6C_4E93_90B8_DA67E0A2C425__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Insert your headers here
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
// TODO: reference additional headers your program requires here
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__2197EABE_2E6C_4E93_90B8_DA67E0A2C425__INCLUDED_)

View File

@ -1,35 +1,34 @@
# Microsoft Developer Studio Project File - Name="storm" - Package Owner=<4> # Microsoft Developer Studio Project File - Name="Storm" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT ** # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=storm - Win32 Debug CFG=Storm - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run !MESSAGE use the Export Makefile command and run
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "storm.mak". !MESSAGE NMAKE /f "Storm.mak".
!MESSAGE !MESSAGE
!MESSAGE You can specify a configuration when running NMAKE !MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "storm.mak" CFG="storm - Win32 Debug" !MESSAGE NMAKE /f "Storm.mak" CFG="Storm - Win32 Debug"
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "storm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "Storm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "storm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "Storm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "" # PROP Scc_ProjName ""
# PROP Scc_LocalPath "" # PROP Scc_LocalPath ""
CPP=cl.exe CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe
!IF "$(CFG)" == "storm - Win32 Release" !IF "$(CFG)" == "Storm - Win32 Release"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0 # PROP BASE Use_Debug_Libraries 0
@ -41,22 +40,20 @@ RSC=rc.exe
# PROP Output_Dir "WinRel" # PROP Output_Dir "WinRel"
# PROP Intermediate_Dir "WinRel" # PROP Intermediate_Dir "WinRel"
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STORM_EXPORTS" /Yu"stdafx.h" /FD /c # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STORM_EXPORTS" /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:"Storm.def" # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /def:"storm.def"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "storm - Win32 Debug" !ELSEIF "$(CFG)" == "Storm - Win32 Debug"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1 # PROP BASE Use_Debug_Libraries 1
@ -67,60 +64,29 @@ LINK32=link.exe
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "WinDebug" # PROP Output_Dir "WinDebug"
# PROP Intermediate_Dir "WinDebug" # PROP Intermediate_Dir "WinDebug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STORM_EXPORTS" /Yu"stdafx.h" /FD /GZ /c # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STORM_EXPORTS" /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /def:"Storm.def" /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:"storm.def" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF !ENDIF
# Begin Target # Begin Target
# Name "storm - Win32 Release" # Name "Storm - Win32 Release"
# Name "storm - Win32 Debug" # Name "Storm - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# Begin Source File # Begin Source File
SOURCE=.\storm.cpp SOURCE=.\storm.cpp
# End Source File # End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# Begin Source File
SOURCE=.\storm.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# End Target # End Target
# End Project # End Project

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,9 @@ typedef struct _WSIZE
#define GAMESTATE_STARTED 0x08 #define GAMESTATE_STARTED 0x08
#define GAMESTATE_REPLAY 0x80 #define GAMESTATE_REPLAY 0x80
#ifdef __GNUC__
extern "C" {
#endif
BOOL STORMAPI SNetCreateGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, char *GameTemplateData, int GameTemplateSize, int playerCount, char *creatorName, char *a11, int *playerID); BOOL STORMAPI SNetCreateGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, char *GameTemplateData, int GameTemplateSize, int playerCount, char *creatorName, char *a11, int *playerID);
BOOL STORMAPI SNetDestroy(); BOOL STORMAPI SNetDestroy();
@ -160,10 +163,10 @@ SNetGetPlayerName(
* *
* Returns TRUE if the function was called successfully and FALSE otherwise. * Returns TRUE if the function was called successfully and FALSE otherwise.
*/ */
BOOL //BOOL
STORMAPI //STORMAPI
SNetGetProviderCaps( //SNetGetProviderCaps(
PCAPS providerCaps); // PCAPS providerCaps);
/* SNetGetTurnsInTransit @ 115 /* SNetGetTurnsInTransit @ 115
* *
@ -303,14 +306,14 @@ typedef struct _storm_head
* *
* Returns TRUE if the function was called successfully and FALSE otherwise. * Returns TRUE if the function was called successfully and FALSE otherwise.
*/ */
BOOL //BOOL
STORMAPI //STORMAPI
SNetInitializeProvider( //SNetInitializeProvider(
DWORD providerName, // DWORD providerName,
client_info *gameClientInfo, // client_info *gameClientInfo,
user_info *userData, // user_info *userData,
battle_info *bnCallbacks, // battle_info *bnCallbacks,
module_info *moduleData); // module_info *moduleData);
BOOL STORMAPI SNetJoinGame(int id, char *gameName, char *gamePassword, char *playerName, char *userStats, int *playerid); BOOL STORMAPI SNetJoinGame(int id, char *gameName, char *gamePassword, char *playerName, char *userStats, int *playerid);
@ -351,7 +354,7 @@ typedef struct _s_evt
// @TODO: "type" is unknown. // @TODO: "type" is unknown.
HANDLE STORMAPI SNetRegisterEventHandler(int type, void (STORMAPI *sEvent)(PS_EVT)); //HANDLE STORMAPI SNetRegisterEventHandler(int type, void (STORMAPI *sEvent)(PS_EVT));
int STORMAPI SNetSelectGame(int a1, int a2, int a3, int a4, int a5, int *playerid); int STORMAPI SNetSelectGame(int a1, int a2, int a3, int a4, int a5, int *playerid);
@ -1296,4 +1299,9 @@ bool __stdcall SNetSetBasePlayer(int);
int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *); int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *);
int __stdcall SNetGetProviderCaps(struct _SNETCAPS *); int __stdcall SNetGetProviderCaps(struct _SNETCAPS *);
int __stdcall SFileSetFilePointer(HANDLE,int,HANDLE,int); int __stdcall SFileSetFilePointer(HANDLE,int,HANDLE,int);
#ifdef __GNUC__
}
#endif
#endif #endif

494
3rdParty/Storm/Source/storm_gcc.def vendored Normal file
View File

@ -0,0 +1,494 @@
LIBRARY "Storm"
EXPORTS
SNetCreateGame @101 NONAME
SNetCreateGame@40 @101 NONAME
SNetDestroy @102 NONAME
SNetDestroy@0 @102 NONAME
SNetEnumProviders @103 NONAME
;SNetEnumDevices @104 NONAME
SNetEnumGames @105 NONAME
SNetDropPlayer @106 NONAME
SNetDropPlayer@8 @106 NONAME
SNetGetGameInfo @107 NONAME
SNetGetGameInfo@16 @107 NONAME
;SNetGetNetworkLatency @108 NONAME
SNetGetNumPlayers @109 NONAME
SNetGetOwnerTurnsWaiting @110 NONAME
SNetGetOwnerTurnsWaiting@4 @110 NONAME
;SNetGetPerformanceData @111 NONAME
SNetGetPlayerCaps @112 NONAME
SNetGetPlayerName @113 NONAME
SNetGetProviderCaps @114 NONAME
SNetGetProviderCaps@4 @114 NONAME
SNetGetTurnsInTransit @115 NONAME
SNetGetTurnsInTransit@4 @115 NONAME
SNetInitializeDevice @116 NONAME
SNetInitializeProvider @117 NONAME
SNetInitializeProvider@20 @117 NONAME
SNetJoinGame @118 NONAME
SNetLeaveGame @119 NONAME
SNetLeaveGame@4 @119 NONAME
SNetPerformUpgrade @120 NONAME
SNetPerformUpgrade@4 @120 NONAME
SNetReceiveMessage @121 NONAME
SNetReceiveMessage@12 @121 NONAME
SNetReceiveTurns @122 NONAME
SNetReceiveTurns@20 @122 NONAME
SNetRegisterEventHandler @123 NONAME
SNetRegisterEventHandler@8 @123 NONAME
;SNetResetLatencyMeasurements @124 NONAME
SNetSelectGame @125 NONAME
;SNetSelectProvider @126 NONAME
SNetSendMessage @127 NONAME
SNetSendMessage@12 @127 NONAME
SNetSendTurn @128 NONAME
SNetSendTurn@8 @128 NONAME
SNetSetBasePlayer @129 NONAME
SNetSetBasePlayer@4 @129 NONAME
SNetSetGameMode @130 NONAME
SNetUnregisterEventHandler @131 NONAME
SNetUnregisterEventHandler@8 @131 NONAME
SNetEnumGamesEx @133 NONAME
SNetSendServerChatCommand @134 NONAME
;SNetSendDatagram @135 NONAME
;SNetReceiveDatagram @136 NONAME
SNetDisconnectAll @137 NONAME
SNetCreateLadderGame @138 NONAME
SNetReportGameResult @139 NONAME
;SNetCheckDataFile @140 NONAME
SNetSendLeagueCommand @141 NONAME
SNetSendReplayPath @142 NONAME
SNetGetLeagueName @143 NONAME
SNetGetPlayerNames @144 NONAME
SNetLeagueLogout @145 NONAME
SNetGetLeaguePlayerName @146 NONAME
;Ordinal150 @150 NONAME
;Ordinal151 @151 NONAME
;SDlgBeginPaint @201 NONAME
;SDlgBltToWindowI @202 NONAME
;SDlgCheckTimers @203 NONAME
;SDlgCreateDialogIndirectParam @204 NONAME
;SDlgCreateDialogParam @205 NONAME
SDlgDefDialogProc @206 NONAME
SDlgDialogBoxIndirectParam @208 NONAME
;SDlgDialogBoxParam @209 NONAME
;SDlgDrawBitmap @210 NONAME
SDlgEndDialog @211 NONAME
;SDlgEndPaint @212 NONAME
;SDlgKillTimer @213 NONAME
;SDlgSetBaseFont @214 NONAME
;SDlgSetBitmapI @215 NONAME
SDlgSetControlBitmaps @216 NONAME
;SDlgSetCursor @217 NONAME
;SDlgSetSystemCursor @218 NONAME
;SDlgSetTimer @219 NONAME
;SDlgUpdateCursor @220 NONAME
SDlgBltToWindowE @221 NONAME
SDlgSetBitmapE @222 NONAME
;SDlgSetLocale @223 NONAME
Ordinal224 @224 NONAME
;SFileAuthenticateArchive @251 NONAME
SFileCloseArchive @252 NONAME
SFileCloseArchive@4 @252 NONAME
SFileCloseFile @253 NONAME
SFileCloseFile@4 @253 NONAME
;SFileDdaBegin @254 NONAME
SFileDdaBeginEx @255 NONAME
SFileDdaBeginEx@28 @255 NONAME
SFileDdaDestroy @256 NONAME
SFileDdaDestroy@0 @256 NONAME
SFileDdaEnd @257 NONAME
SFileDdaEnd@4 @257 NONAME
SFileDdaGetPos @258 NONAME
SFileDdaGetPos@12 @258 NONAME
;SFileDdaGetVolume @259 NONAME
SFileDdaInitialize @260 NONAME
SFileDdaInitialize@4 @260 NONAME
SFileDdaSetVolume @261 NONAME
SFileDdaSetVolume@12 @261 NONAME
SFileDestroy @262 NONAME
;SFileEnableDirectAccess @263 NONAME
SFileGetFileArchive @264 NONAME
SFileGetFileArchive@8 @264 NONAME
SFileGetFileSize @265 NONAME
SFileGetFileSize@8 @265 NONAME
SFileOpenArchive @266 NONAME
SFileOpenArchive@16 @266 NONAME
SFileOpenFile @267 NONAME
SFileOpenFile@8 @267 NONAME
SFileOpenFileEx @268 NONAME
SFileOpenFileEx@16 @268 NONAME
SFileReadFile @269 NONAME
SFileReadFile@20 @269 NONAME
SFileSetBasePath @270 NONAME
SFileSetBasePath@4 @270 NONAME
SFileSetFilePointer @271 NONAME
SFileSetFilePointer@16 @271 NONAME
SFileSetLocale @272 NONAME
;SFileGetBasePath @273 NONAME
SFileSetIoErrorMode @274 NONAME
SFileGetArchiveName @275 NONAME
SFileGetFileName @276 NONAME
;SFileGetArchiveInfo @277 NONAME
;SFileSetPlatform @278 NONAME
SFileLoadFile @279 NONAME
SFileUnloadFile @280 NONAME
SFileLoadFileEx @281 NONAME
;SFilePrioritizeRequest @282 NONAME
;SFileCancelRequest @283 NONAME
;SFileSetAsyncBudget @284 NONAME
;SFileSetDataChunkSize @285 NONAME
;SFileEnableSeekOptimization @286 NONAME
;SFileReadFileEx @287 NONAME
;SFileFileExists @288 NONAME
;SFileFileExistsEx @289 NONAME
;SFileReadFileEx2 @290 NONAME
;SFileReadFile2 @291 NONAME
;SFileLoadFile2 @292 NONAME
;SFileOpenFileAsArchive @293 NONAME
;SFileGetLocale @294 NONAME
;SFileRegisterLoadNotifyProc @295 NONAME
;SFileGetFileCompressedSize @296 NONAME
;Ordinal297 @297 NONAME
;Ordinal298 @298 NONAME
;SFileAuthenticateArchiveEx @299 NONAME
;SFileOpenPathAsArchive @300 NONAME
StormDestroy @301 NONAME
;StormGetInstance @302 NONAME
;StormGetOption @303 NONAME
;StormSetOption @304 NONAME
;SBltGetSCode @312 NONAME
SBltROP3 @313 NONAME
SBltROP3Clipped @314 NONAME
;SBltROP3Tiled @315 NONAME
SBmpDecodeImage @321 NONAME
SBmpLoadImage @323 NONAME
SBmpSaveImage @324 NONAME
SBmpAllocLoadImage @325 NONAME
;SBmpSaveImageEx @326 NONAME
SCodeCompile @331 NONAME
SCodeDelete @332 NONAME
SCodeExecute @334 NONAME
;SCodeGetPseudocode @335 NONAME
SDrawAutoInitialize @341 NONAME
SDrawCaptureScreen @342 NONAME
;SDrawClearSurface @343 NONAME
SDrawDestroy @344 NONAME
;SDrawFlipPage @345 NONAME
SDrawGetFrameWindow @346 NONAME
SDrawGetFrameWindow@4 @346 NONAME
SDrawGetObjects @347 NONAME
SDrawGetScreenSize @348 NONAME
;SDrawGetServiceLevel @349 NONAME
SDrawLockSurface @350 NONAME
SDrawManualInitialize @351 NONAME
SDrawManualInitialize@32 @351 NONAME
SDrawMessageBox @352 NONAME
SDrawMessageBox@12 @352 NONAME
SDrawPostClose @353 NONAME
SDrawRealizePalette @354 NONAME
;SDrawSelectGdiSurface @355 NONAME
SDrawUnlockSurface @356 NONAME
SDrawUpdatePalette @357 NONAME
SDrawUpdatePalette@16 @357 NONAME
;SDrawUpdateScreen @358 NONAME
;SDrawWaitForVerticalBlank @359 NONAME
SEvtDispatch @372 NONAME
;SEvtRegisterHandler @373 NONAME
;SEvtUnregisterHandler @374 NONAME
;SEvtUnregisterType @375 NONAME
;SEvtPopState @376 NONAME
;SEvtPushState @377 NONAME
;SEvtBreakHandlerChain @378 NONAME
;SGdiBitBlt @381 NONAME
;SGdiCreateFont @382 NONAME
SGdiDeleteObject @383 NONAME
;SGdiDestroy @384 NONAME
SGdiExtTextOut @385 NONAME
SGdiImportFont @386 NONAME
;SGdiLoadFont @387 NONAME
;SGdiRectangle @388 NONAME
SGdiSelectObject @389 NONAME
SGdiSetPitch @390 NONAME
;SGdiTextOut @391 NONAME
;SGdi392 @392 NONAME
Ordinal393 @393 NONAME
;SMem399 @399 NONAME
SMemAlloc @401 NONAME
SMemAlloc@16 @401 NONAME
;SMemDestroy @402 NONAME
SMemFree @403 NONAME
SMemFree@16 @403 NONAME
;SMemGetSize @404 NONAME
SMemReAlloc @405 NONAME
;Storm406 @406 NONAME
;SMsgDispatchMessage @412 NONAME
;SMsgDoMessageLoop @413 NONAME
;SMsgRegisterCommand @414 NONAME
;SMsgRegisterKeyDown @415 NONAME
;SMsgRegisterKeyUp @416 NONAME
;SMsgRegisterMessage @417 NONAME
;SMsgPopRegisterState @418 NONAME
;SMsgPushRegisterState @419 NONAME
;SMsg420 @420 NONAME
SRegLoadData @421 NONAME
SRegLoadData@24 @421 NONAME
SRegLoadString @422 NONAME
SRegLoadString@20 @422 NONAME
SRegLoadValue @423 NONAME
SRegLoadValue@16 @423 NONAME
SRegSaveData @424 NONAME
SRegSaveData@20 @424 NONAME
SRegSaveString @425 NONAME
SRegSaveString@16 @425 NONAME
SRegSaveValue @426 NONAME
SRegSaveValue@16 @426 NONAME
;SRegGetBaseKey @427 NONAME
SRegDeleteValue @428 NONAME
;SReg429 @429 NONAME
;SReg430 @430 NONAME
STransBlt @431 NONAME
STransBltUsingMask @432 NONAME
;STransCreateI @433 NONAME
STransDelete @434 NONAME
STransDuplicate @436 NONAME
STransIntersectDirtyArray @437 NONAME
STransInvertMask @438 NONAME
;STransLoadI @439 NONAME
STransSetDirtyArrayInfo @440 NONAME
;STransUpdateDirtyArray @441 NONAME
STransPointInMask @442 NONAME
STransCombineMasks @443 NONAME
;STransCreateI @444 NONAME
STransCreateE @445 NONAME
;STrans446 @446 NONAME
;STransLoadE @447 NONAME
SVidDestroy @451 NONAME
SVidDestroy@0 @451 NONAME
SVidGetSize @452 NONAME
SVidInitialize @453 NONAME
SVidInitialize@4 @453 NONAME
SVidPlayBegin @454 NONAME
SVidPlayBegin@28 @454 NONAME
;SVidPlayBeginFromMemory @455 NONAME
SVidPlayContinue @456 NONAME
SVidPlayContinueSingle @457 NONAME
SVidPlayEnd @458 NONAME
SVidPlayEnd@4 @458 NONAME
;SVidSetVolume @459 NONAME
;Storm460 @460 NONAME
SErrDisplayError @461 NONAME
SErrGetErrorStr @462 NONAME
SErrGetErrorStr@12 @462 NONAME
SErrGetLastError @463 NONAME
SErrGetLastError@0 @463 NONAME
;SErrRegisterMessageSource @464 NONAME
SErrSetLastError @465 NONAME
SErrSetLastError@4 @465 NONAME
;SErrReportNamedResourceLeak @466 NONAME
;SErrReportResourceLeak @467 NONAME
SErrSuppressErrors @468 NONAME
;SErrRegisterHandler @469 NONAME
;SErrUnregisterHandler @470 NONAME
;Storm471 @471 NONAME
;SCmdGetBool @472 NONAME
;SCmdGetNum @473 NONAME
;SCmdGetString @474 NONAME
;SCmdProcess @475 NONAME
;SCmdRegisterArgList @476 NONAME
;SCmdRegisterArgument @477 NONAME
;SCmdStringExists @478 NONAME
;SCmdProcessCommandLine @479 NONAME
;Ordinal480 @480 NONAME
;SMemFindNextBlock @481 NONAME
;SMemFindNextHeap @482 NONAME
;SMemGetHeapByCaller @483 NONAME
;SMemGetHeapByPtr @484 NONAME
;SMemHeapAlloc @485 NONAME
;SMemHeapCreate @486 NONAME
;SMemHeapDestroy @487 NONAME
;SMemHeapFree @488 NONAME
;SMemHeapRealloc @489 NONAME
;SMemHeapSize @490 NONAME
SMemCopy @491 NONAME
SMemFill @492 NONAME
;SMemMove @493 NONAME
SMemZero @494 NONAME
SMemCmp @495 NONAME
;SMem496 @496 NONAME
;SMemDumpState @497 NONAME
;Ordinal498 @498 NONAME
SStrCopy @501 NONAME
SStrCopy@12 @501 NONAME
SStrHash @502 NONAME
SStrNCat @503 NONAME
;SStrTokenize @504 NONAME
;SStrPack @505 NONAME
SStrLen @506 NONAME
;SStrDup @507 NONAME
SStrCmp @508 NONAME
SStrCmpI @509 NONAME
SStrUpper @510 NONAME
;SMsgBreakHandlerChain @511 NONAME
;SMsgUnregisterCommand @512 NONAME
;SMsgUnregisterKeyDown @513 NONAME
;SMsgUnregisterKeyUp @514 NONAME
;SMsgUnregisterMessage @515 NONAME
;SMsgGetDispatcher @516 NONAME
;SMsgSetDefaultWindow @517 NONAME
;SMsgGetDefaultWindow @518 NONAME
;SMsg519 @519 NONAME
;SRgn521 @521 NONAME
SRgn523 @523 NONAME
SRgnCreateRegion @524 NONAME
SRgnDeleteRegion @525 NONAME
;SRgn527 @527 NONAME
;SRgn528i @528 NONAME
SRgn529i @529 NONAME
;SRgn530i @530 NONAME
;SRgn531i @531 NONAME
;SRgn532i @532 NONAME
;SRgn533i @533 NONAME
;SRgn534 @534 NONAME
;SRgn535f @535 NONAME
;SRgn536f @536 NONAME
;SRgn537f @537 NONAME
;SRgn538f @538 NONAME
;SRgn539f @539 NONAME
;SRgn540f @540 NONAME
;SLogClose @541 NONAME
;SLogCreate @542 NONAME
;SLog543 @543 NONAME
;SLogDump @544 NONAME
;SLogFlush @545 NONAME
;SLogFlushAll @546 NONAME
;SLogPend @547 NONAME
;SLogWrite @548 NONAME
;SLog549 @549 NONAME
;SLogCriticalLog @550 NONAME
;SCompCompress @551 NONAME
;SCompDecompress @552 NONAME
;SLogVWrite @553 NONAME
;Ordinal554 @554 NONAME
;Ordinal555 @555 NONAME
;Ordinal556 @556 NONAME
;Ordinal557 @557 NONAME
;Ordinal558 @558 NONAME
;Ordinal559 @559 NONAME
;Ordinal560 @560 NONAME
;SErrCheckDebugSymbolLibrary @561 NONAME
SErrDisplayErrorFmt @562 NONAME
;SErrIsDisplayingError @563 NONAME
;SErrPrepareAppFatal @564 NONAME
;SErrSetLogTitleString @565 NONAME
;SErrDisplayAppFatal @566 NONAME
SErrCatchUnhandledExceptions @567 NONAME
;Storm568 @568 NONAME
;SStrChr @569 NONAME
;SStrChrR @570 NONAME
SStrChr @571 NONAME
SStrChrR @572 NONAME
;SStrToDouble @573 NONAME
;SStrToFloat @574 NONAME
;SStrToInt @575 NONAME
;SStrToUnsigned @576 NONAME
;SStrToInt64 @577 NONAME
SStrVPrintf @578 NONAME
;SStrLower @579 NONAME
;SStrHash64 @580 NONAME
;SStrPrintf @581 NONAME
;SDrawSetClientRect @582 NONAME
;SDrawGetClientRect @583 NONAME
;SStrStrI @584 NONAME
;SStrStrI @585 NONAME
;SStrStr @586 NONAME
;SStrStr @587 NONAME
;SNet588 @588 NONAME
;SBigAdd @601 NONAME
;SBigAnd @602 NONAME
;SBigCompare @603 NONAME
;SBigCopy @604 NONAME
;SBigDec @605 NONAME
SBigDel @606 NONAME
;SBigDiv @607 NONAME
;SBigFindPrime @608 NONAME
SBigFromBinary @609 NONAME
;SBigFromStr @610 NONAME
;SBigFromStream @611 NONAME
;SBigFromUnsigned @612 NONAME
;SBigGcd @613 NONAME
;SBigInc @614 NONAME
;SBigInvMod @615 NONAME
;SBigIsEven @616 NONAME
;SBigIsOdd @617 NONAME
;SBigIsOne @618 NONAME
;SBigIsPrime @619 NONAME
;SBigIsZero @620 NONAME
;SBigMod @621 NONAME
;SBigMul @622 NONAME
;SBigMulMod @623 NONAME
SBigNew @624 NONAME
;SBigNot @625 NONAME
;SBigOr @626 NONAME
;SBigPow @627 NONAME
SBigPowMod @628 NONAME
;SBigRand @629 NONAME
;SBigSet2Exp @630 NONAME
;SBigSetOne @631 NONAME
;SBigSetZero @632 NONAME
;SBigShl @633 NONAME
;SBigShr @634 NONAME
;SBigSquare @635 NONAME
;SBigSub @636 NONAME
;SBigToBinaryArray @637 NONAME
SBigToBinaryBuffer @638 NONAME
;SBigToBinaryPtr @639 NONAME
;SBigToStrArray @640 NONAME
;SBigToStrBuffer @641 NONAME
;SBigToStrPtr @642 NONAME
;SBigToStreamArray @643 NONAME
;SBigToStreamBuffer @644 NONAME
;SBigToStreamPtr @645 NONAME
;SBigToUnsigned @646 NONAME
;SBigXor @647 NONAME
;SUniConvertUTF16to8Len @901 NONAME
;SUniConvertUTF16to8 @902 NONAME
;SUniConvertUTF8to16Len @903 NONAME
;SUniConvertUTF8to16 @904 NONAME
;SUniS905 @905 NONAME
;SUniS906 @906 NONAME
;SUniFindAfterUTF8Chr @907 NONAME
;SUniFindUTF8ChrStart @908 NONAME
;SUniConvertUTF16To909 @909 NONAME
;SUniConvertUTF16To910 @910 NONAME
;SUniConvertUTF16To911 @911 NONAME
;SUniConvert912 @912 NONAME
;SUniConvert913 @913 NONAME
;SUniConvert914 @914 NONAME
;SUniConvertUTF8ToWin @915 NONAME
; END

View File

@ -1,5 +1,5 @@
# Microsoft Developer Studio Project File - Name="Diablo" - Package Owner=<4> # Microsoft Developer Studio Project File - Name="Diablo" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT ** # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101 # TARGTYPE "Win32 (x86) Application" 0x0101
@ -22,7 +22,6 @@ CFG=Diablo - Win32 Debug
!MESSAGE !MESSAGE
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "" # PROP Scc_ProjName ""
# PROP Scc_LocalPath "" # PROP Scc_LocalPath ""
CPP=cl.exe CPP=cl.exe
@ -40,13 +39,11 @@ RSC=rc.exe
# PROP Use_Debug_Libraries 0 # PROP Use_Debug_Libraries 0
# PROP Output_Dir "Source/WinRel" # PROP Output_Dir "Source/WinRel"
# PROP Intermediate_Dir "Source/WinRel" # PROP Intermediate_Dir "Source/WinRel"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -54,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 DiabloUI/WinRel/diabloui.lib 3rdParty/Storm/Source/WinRel/storm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib version.lib /nologo /subsystem:windows /machine:I386 # ADD LINK32 DiabloUI/WinRel/DiabloUI.lib 3rdParty/Storm/Source/WinRel/Storm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib version.lib /nologo /subsystem:windows /machine:I386
!ELSEIF "$(CFG)" == "Diablo - Win32 Debug" !ELSEIF "$(CFG)" == "Diablo - Win32 Debug"
@ -67,13 +64,11 @@ LINK32=link.exe
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "Source/WinDebug" # PROP Output_Dir "Source/WinDebug"
# PROP Intermediate_Dir "Source/WinDebug" # PROP Intermediate_Dir "Source/WinDebug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -81,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 DiabloUI/WinDebug/diabloui.lib 3rdParty/Storm/Source/WinDebug/storm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib version.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 DiabloUI/WinDebug/DiabloUI.lib 3rdParty/Storm/Source/WinDebug/Storm.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib version.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
!ENDIF !ENDIF
@ -130,10 +125,6 @@ SOURCE=.\Source\diablo.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\Diablo.rc
# End Source File
# Begin Source File
SOURCE=.\Source\doom.cpp SOURCE=.\Source\doom.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -178,10 +169,6 @@ SOURCE=.\Source\error.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\3rdParty\PKWare\explode.cpp
# End Source File
# Begin Source File
SOURCE=.\Source\fault.cpp SOURCE=.\Source\fault.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -202,10 +189,6 @@ SOURCE=.\Source\help.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\3rdParty\PKWare\implode.cpp
# End Source File
# Begin Source File
SOURCE=.\Source\init.cpp SOURCE=.\Source\init.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -377,6 +360,18 @@ SOURCE=.\Source\wave.cpp
SOURCE=.\Source\world.cpp SOURCE=.\Source\world.cpp
# End Source File # End Source File
# End Group # End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\Diablo.ico
# End Source File
# Begin Source File
SOURCE=.\Diablo.rc
# End Source File
# End Group
# Begin Group "Header Files" # Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl" # PROP Default_Filter "h;hpp;hxx;hm;inl"
@ -385,12 +380,16 @@ SOURCE=.\Source\world.cpp
SOURCE=.\resource.h SOURCE=.\resource.h
# End Source File # End Source File
# End Group # End Group
# Begin Group "Resource Files" # Begin Group "PKWare"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File # Begin Source File
SOURCE=.\Diablo.ico SOURCE=.\3rdParty\PKWare\explode.cpp
# End Source File
# Begin Source File
SOURCE=.\3rdParty\PKWare\implode.cpp
# End Source File # End Source File
# End Group # End Group
# End Target # End Target

View File

@ -1,4 +1,4 @@
Microsoft Developer Studio Workspace File, Format Version 6.00 Microsoft Developer Studio Workspace File, Format Version 5.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
############################################################################### ###############################################################################
@ -15,7 +15,7 @@ Package=<4>
Project_Dep_Name DiabloUI Project_Dep_Name DiabloUI
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name storm Project_Dep_Name Storm
End Project Dependency End Project Dependency
}}} }}}
@ -33,7 +33,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "storm"=.\3rdParty\Storm\Source\storm.dsp - Package Owner=<4> Project: "Storm"=.\3rdParty\Storm\Source\Storm.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{

View File

@ -7,10 +7,7 @@
// //
// Generated from the TEXTINCLUDE 2 resource. // Generated from the TEXTINCLUDE 2 resource.
// //
#define APSTUDIO_HIDDEN_SYMBOLS #include "afxres.h"
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
#include "resource.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
@ -31,14 +28,40 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// Icon with lowest ID value placed first to ensure application icon // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems. // remains consistent on all systems.
101 ICON DISCARDABLE "Diablo.ico" IDI_ICON1 ICON DISCARDABLE "Diablo.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Dialog // Dialog
// //
104 DIALOG DISCARDABLE 0, 0, 250, 241 IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 250, 241
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Direct Draw Error" CAPTION "Direct Draw Error"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -61,7 +84,7 @@ BEGIN
-1,7,116,236,18 -1,7,116,236,18
END END
105 DIALOG DISCARDABLE 0, 0, 250, 213 IDD_DIALOG2 DIALOG DISCARDABLE 0, 0, 250, 213
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Out of Memory Error" CAPTION "Out of Memory Error"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -79,7 +102,7 @@ BEGIN
LTEXT "For Windows NT:",-1,7,89,236,9 LTEXT "For Windows NT:",-1,7,89,236,9
END END
106 DIALOG DISCARDABLE 0, 0, 265, 114 IDD_DIALOG3 DIALOG DISCARDABLE 0, 0, 265, 114
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Data File Error" CAPTION "Data File Error"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -92,7 +115,7 @@ BEGIN
LTEXT "unknown file",1000,20,59,210,27 LTEXT "unknown file",1000,20,59,210,27
END END
107 DIALOG DISCARDABLE 0, 0, 250, 161 IDD_DIALOG4 DIALOG DISCARDABLE 0, 0, 250, 161
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Direct Draw Error" CAPTION "Direct Draw Error"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -109,7 +132,7 @@ BEGIN
-1,7,39,236,18 -1,7,39,236,18
END END
108 DIALOG DISCARDABLE 0, 0, 250, 161 IDD_DIALOG5 DIALOG DISCARDABLE 0, 0, 250, 161
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Direct Sound Error" CAPTION "Direct Sound Error"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -125,8 +148,8 @@ BEGIN
LTEXT "If you continue to have problems with DirectX, please contact Microsoft's Technical Support at:", LTEXT "If you continue to have problems with DirectX, please contact Microsoft's Technical Support at:",
-1,7,39,236,18 -1,7,39,236,18
END END
/*
109 DIALOG DISCARDABLE 0, 0, 250, 92 /* IDD_DIALOG6 DIALOG DISCARDABLE 0, 0, 250, 92
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "System warning" CAPTION "System warning"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -139,9 +162,9 @@ BEGIN
LTEXT "Press ""OK"" to proceed, otherwise press ""Cancel"" to exit this program.", LTEXT "Press ""OK"" to proceed, otherwise press ""Cancel"" to exit this program.",
-1,7,53,236,9 -1,7,53,236,9
PUSHBUTTON "&Cancel",2,193,71,50,14 PUSHBUTTON "&Cancel",2,193,71,50,14
END END */
*/
110 DIALOG DISCARDABLE 0, 0, 250, 100 IDD_DIALOG7 DIALOG DISCARDABLE 0, 0, 250, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Out of Disk Space" CAPTION "Out of Disk Space"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -155,7 +178,7 @@ BEGIN
-1,7,52,236,18 -1,7,52,236,18
END END
111 DIALOG DISCARDABLE 0, 0, 250, 161 IDD_DIALOG8 DIALOG DISCARDABLE 0, 0, 250, 161
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Direct Draw Error" CAPTION "Direct Draw Error"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -171,7 +194,7 @@ BEGIN
LTEXT "For Windows 95 and Windows NT",-1,7,41,236,9 LTEXT "For Windows 95 and Windows NT",-1,7,41,236,9
END END
112 DIALOG DISCARDABLE 0, 0, 250, 92 IDD_DIALOG9 DIALOG DISCARDABLE 0, 0, 250, 92
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Data File Error" CAPTION "Data File Error"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -183,7 +206,7 @@ BEGIN
PUSHBUTTON "Exit",2,193,71,50,14 PUSHBUTTON "Exit",2,193,71,50,14
END END
113 DIALOG DISCARDABLE 0, 0, 223, 116 IDD_DIALOG10 DIALOG DISCARDABLE 0, 0, 223, 116
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Windows 2000 Restricted User Advisory" CAPTION "Windows 2000 Restricted User Advisory"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -197,7 +220,7 @@ BEGIN
-1,7,63,209,28 -1,7,63,209,28
END END
114 DIALOG DISCARDABLE 0, 0, 220, 121 IDD_DIALOG11 DIALOG DISCARDABLE 0, 0, 220, 121
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Read-Only Directory Error" CAPTION "Read-Only Directory Error"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
@ -210,35 +233,6 @@ BEGIN
END END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC #ifndef _MAC
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //

View File

@ -1,5 +1,5 @@
# Microsoft Developer Studio Project File - Name="DiabloUI" - Package Owner=<4> # Microsoft Developer Studio Project File - Name="DiabloUI" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT ** # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
@ -17,12 +17,12 @@ CFG=DiabloUI - Win32 Debug
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "DiabloUI - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "DiabloUI - Win32 Release" (based on\
"Win32 (x86) Dynamic-Link Library")
!MESSAGE "DiabloUI - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "DiabloUI - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "" # PROP Scc_ProjName ""
# PROP Scc_LocalPath "" # PROP Scc_LocalPath ""
CPP=cl.exe CPP=cl.exe
@ -41,18 +41,18 @@ RSC=rc.exe
# PROP Output_Dir "WinRel" # PROP Output_Dir "WinRel"
# PROP Intermediate_Dir "WinRel" # PROP Intermediate_Dir "WinRel"
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DIABLOUI_EXPORTS" /Yu"stdafx.h" /FD /c # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DIABLOUI_EXPORTS" /Yu"stdafx.h" /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:"diabloui.def" # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /def:"diabloui.def"
!ELSEIF "$(CFG)" == "DiabloUI - Win32 Debug" !ELSEIF "$(CFG)" == "DiabloUI - Win32 Debug"
@ -65,21 +65,19 @@ LINK32=link.exe
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "WinDebug" # PROP Output_Dir "WinDebug"
# PROP Intermediate_Dir "WinDebug" # PROP Intermediate_Dir "WinDebug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DIABLOUI_EXPORTS" /Yu"stdafx.h" /FD /GZ /c # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DIABLOUI_EXPORTS" /Yu"stdafx.h" /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /def:"diabloui.def" /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:"diabloui.def" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF !ENDIF
@ -87,38 +85,9 @@ LINK32=link.exe
# Name "DiabloUI - Win32 Release" # Name "DiabloUI - Win32 Release"
# Name "DiabloUI - Win32 Debug" # Name "DiabloUI - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File # Begin Source File
SOURCE=.\DiabloUI.cpp SOURCE=.\diabloui.cpp
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\DiabloUI.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File # End Source File
# End Target # End Target
# End Project # End Project

View File

@ -1,24 +0,0 @@
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the DIABLOUI_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// DIABLOUI_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef DIABLOUI_EXPORTS
#define DIABLOUI_API __declspec(dllexport)
#else
#define DIABLOUI_API __declspec(dllimport)
#endif
// This class is exported from the DiabloUI.dll
class DIABLOUI_API CDiabloUI {
public:
CDiabloUI(void);
// TODO: add your methods here.
};
extern DIABLOUI_API int nDiabloUI;
DIABLOUI_API int fnDiabloUI(void);

View File

@ -1,8 +0,0 @@
// stdafx.cpp : source file that includes just the standard includes
// DiabloUI.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

View File

@ -1,24 +0,0 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__00D95503_7CAF_44D4_9FCA_8D0EC8F2FF23__INCLUDED_)
#define AFX_STDAFX_H__00D95503_7CAF_44D4_9FCA_8D0EC8F2FF23__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Insert your headers here
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
// TODO: reference additional headers your program requires here
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__00D95503_7CAF_44D4_9FCA_8D0EC8F2FF23__INCLUDED_)

View File

@ -1,8 +1,15 @@
// DiabloUI.cpp : Defines the entry point for the DLL application. #include <windows.h>
// #include <stdio.h>
#include <ddraw.h>
#include <dsound.h>
#include <io.h>
#include <math.h>
#include <time.h>
#include <process.h>
#include <shlobj.h>
#include "stdafx.h" #include "..\structs.h"
#include "DiabloUI.h" #include "diabloui.h"
BOOL APIENTRY DllMain( HANDLE hModule, BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call, DWORD ul_reason_for_call,
@ -20,38 +27,6 @@ BOOL APIENTRY DllMain( HANDLE hModule,
return TRUE; return TRUE;
} }
// This is an example of an exported variable
DIABLOUI_API int nDiabloUI=0;
// This is an example of an exported function.
DIABLOUI_API int fnDiabloUI(void)
{
return 42;
}
// This is the constructor of a class that has been exported.
// see DiabloUI.h for the class definition
CDiabloUI::CDiabloUI()
{
return;
}
struct _SNETPROGRAMDATA {
int a1;
};
struct _SNETPLAYERDATA {
int a1;
};
struct _SNETUIDATA {
int a1;
};
struct _SNETVERSIONDATA {
int a1;
};
struct _uiheroinfo {
int a1;
};
void __cdecl UiDestroy() { return; } void __cdecl UiDestroy() { return; }
void __stdcall UiTitleDialog(int a1) { return; } void __stdcall UiTitleDialog(int a1) { return; }
void __cdecl UiInitialize() { return; } void __cdecl UiInitialize() { return; }

View File

@ -9,6 +9,10 @@
*/ */
#ifdef __GNUC__
extern "C" {
#endif
void __cdecl UiDestroy(); // { return; } void __cdecl UiDestroy(); // { return; }
void __stdcall UiTitleDialog(int a1); // { return; } void __stdcall UiTitleDialog(int a1); // { return; }
void __cdecl UiInitialize(); // { return; } void __cdecl UiInitialize(); // { return; }
@ -35,3 +39,7 @@ int __stdcall UiSelectGame(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDAT
int __stdcall UiSelectProvider(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *type); // { return 0; } int __stdcall UiSelectProvider(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *type); // { return 0; }
int __stdcall UiCreatePlayerDescription(_uiheroinfo *info, int mode, char *desc); // { return 0; } int __stdcall UiCreatePlayerDescription(_uiheroinfo *info, int mode, char *desc); // { return 0; }
int __stdcall UiSetupPlayerInfo(char *str, _uiheroinfo *info, int mode); // { return 0; } int __stdcall UiSetupPlayerInfo(char *str, _uiheroinfo *info, int mode); // { return 0; }
#ifdef __GNUC__
}
#endif

48
DiabloUI/diabloui_gcc.def Normal file
View File

@ -0,0 +1,48 @@
LIBRARY "DiabloUI"
EXPORTS
UiValidPlayerName @1 NONAME
UiValidPlayerName@4 @1 NONAME
UiAppActivate @2 NONAME
UiAppActivate@4 @2 NONAME
UiArtCallback @3 NONAME
UiAuthCallback @4 NONAME
UiBetaDisclaimer @5 NONAME
UiCategoryCallback @6 NONAME
UiCopyProtError @7 NONAME
UiCreateGameCallback @8 NONAME
UiCreateGameCriteria @9 NONAME
UiCreatePlayerDescription @10 NONAME
UiCreatePlayerDescription@12 @10 NONAME
UiCreditsDialog @11 NONAME
UiCreditsDialog@4 @11 NONAME
UiDestroy @12 NONAME
UiDrawDescCallback @13 NONAME
UiGetDataCallback @14 NONAME
UiGetDefaultStats @15 NONAME
UiInitialize @16 NONAME
UiMainMenuDialog @17 NONAME
UiMainMenuDialog@16 @17 NONAME
UiMessageBoxCallback @18 NONAME
UiOnPaint @19 NONAME
UiProfileCallback @20 NONAME
UiProfileDraw @21 NONAME
UiProfileGetString @22 NONAME
UiProgressDialog @23 NONAME
UiProgressDialog@20 @23 NONAME
UiSelHeroMultDialog @24 NONAME
UiSelHeroMultDialog@28 @24 NONAME
UiSelHeroSingDialog @25 NONAME
UiSelHeroSingDialog@28 @25 NONAME
UiSelectGame @26 NONAME
UiSelectGame@24 @26 NONAME
UiSelectProvider @27 NONAME
UiSelectProvider@24 @27 NONAME
UiSelectRegion @28 NONAME
UiSetBackgroundBitmap @29 NONAME
UiSetSpawned @30 NONAME
UiSetupPlayerInfo @31 NONAME
UiSetupPlayerInfo@12 @31 NONAME
UiSoundCallback @32 NONAME
UiTitleDialog @33 NONAME
UiTitleDialog@4 @33 NONAME

46
Makefile Normal file
View File

@ -0,0 +1,46 @@
# For 32-bit build systems, the executable is just mingw32
MINGW32 ?= i686-w64-mingw32
# Used s.t. we can try to use clang to compile code
_CXX ?= g++
CXX=$(MINGW32)-$(_CXX)
ifeq ($(MINGW32), "mingw32")
DLLTOOL=dlltool
else
DLLTOOL=$(MINGW32)-dlltool
endif
# Clang doesn't understand permissive compilation, we need to "fix" invalid
# casts from a pointer type there using
# static_cast<NEW_TYPE>(reinterpret_cast<uintptr_t>(ptr))
# instead of
# (NEW_TYPE)(ptr)
CXXFLAGS=-std=c++98 -fpermissive -Wno-write-strings
CPPFLAGS=-MMD -MF $*.d
LDLIBS=-lgdi32 -lversion -ldiabloui -lstorm
LDFLAGS=-L./
all: devilution.exe
include 3rdParty/PKWare/objs.mak
include Source/objs.mak
devilution.exe: $(OBJS) $(PKWARE_OBJS) diabloui.lib storm.lib
$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
diabloui.lib: diabloui.dll DiabloUI/diabloui_gcc.def
$(DLLTOOL) -d DiabloUI/diabloui_gcc.def -D $< -l $@
diabloui.dll:
$(error Please copy diabloui.dll (version 1.09b) here)
storm.lib: storm.dll 3rdParty/Storm/Source/storm_gcc.def
$(DLLTOOL) -d 3rdParty/Storm/Source/storm_gcc.def -D $< -l $@
storm.dll:
$(error Please copy storm.dll (version 1.09b) here)
clean:
@$(RM) -v $(OBJS) $(OBJS:.o=.d) $(PKWARE_OBJS) $(PKWARE_OBJS:.o=d) storm.lib diabloui.lib
.PHONY: clean all

115
README.md
View File

@ -1,55 +1,120 @@
[![Build Status](https://travis-ci.org/galaxyhaxz/devilution.svg?branch=master)](https://travis-ci.org/galaxyhaxz/devilution)
# Devilution # Devilution
Diablo devolved - magic behind the 1996 computer game Diablo devolved - magic behind the 1996 computer game
Reverse engineered by GalaXyHaXz in 2018 Reverse engineered by GalaXyHaXz in 2018
[Rough Draft] This readme will be updated and enhanced in the future
# Introduction # Introduction
Diablo was everything but loved by Blizzard. The last update to the game was in 2001, and Blizzard stopped supporting/selling it altogether a few years ago. I took up a mission to fix this problem. Diablo was a game I played extensively as a teenager; but as time passed, it became harder to run the game on newer hardware. The lack of new content also took away from the re-playability. Modding has too many limitations and reversing the game initially sounded like far too much work. Diablo was everything but loved by Blizzard. The last update to the game was in 2001, and Blizzard stopped supporting/selling it altogether a few years ago. I took up a mission to fix this problem. Diablo was a game I played extensively as a teenager; but as time passed, it became difficult to run the game on newer hardware. The lack of new content also took away from the re-playability. The ideal solution would be to modernize the source, but reversing the whole game initially sounded impossible.
Thankfully, there was a little oversight in 1998. Blizzard gave Diablo's source code to two developers: Synergestic Software (to create an expansion), and Climax Studios (to create a Playstation port). Now Sony of Japan has long been known for letting things slide in their QA department. Anything from prototypes to full source code (Beatmania) leaks, and Diablo was no exception. The Japanese port of Diablo was left with both a symbolic+map file, which contained a layout of everything in the game. This includes functions, data, structures, and more! Several beta versions of the port also leaked, which contain more revisions of these files. Thankfully, there was a little oversight in 1998. Blizzard gave Diablo's source code to two developers: Synergestic Software (to create an expansion), and Climax Studios (to create a Playstation port). Now Sony of Japan has long been known for letting things slide in their QA department. Anything from prototypes to full source code leaks (Beatmania), and Diablo was no exception. A symbolic file was accidentally left on the Japanese port, which contained a layout of everything in the game. This includes functions, data, types, and more! A beta version of the port also leaked, which contained yet another one of these files.
To top it all off, a debug build of the PC version is contained right there on your Diablo disc! Hidden in DIABDAT.MPQ->D1221A.MPQ>DIABLO.EXE. This build contains the missing debug functions, as well as many assert strings giving away code information (and most of all file names). Combining these aspects not only makes reversing the game much easier, but it makes it far more accurate. File names, function names, and even line numbers will be fairly close to the real deal. To top it all off, a debug build of the PC version is contained right there on your Diablo disc! Hidden in `DIABDAT.MPQ -> D1221A.MPQ -> DIABLO.EXE`. This build contains debug tools not found in the retail game, and many assert strings giving away code information. Combining these aspects not only makes reversing the game much easier, but it makes it far more accurate. File names, function names, and even line numbers will be fairly close to the real deal.
After four months of hard work, I present to you Devilution! Instead of seeing how Diablo evolved, we'll see it devolved! After four months of hard work, I present to you Devilution! Instead of seeing how Diablo evolved, we'll see it devolved!
# Purpose # Purpose
Having the source code makes things much easier to maintain. For years mod-makers had to rely on tedious code editing and memory injection. A few even went even further and reversed a good chunk of the game (such as Belzebub/The Hell). The problem is that they never released their sources. Usually being a one-man job, they move on with their lives inevitably due to the amount of time/work required or lack of interest. This leaves people with a half-finished mod; one which had countless hours put into it, but left full of bugs and unfinished designs. So we're back to square one. I want something that can and *will* be preserved, one that can be passed from one developer to the next, without the mercy of any one person. Having the source code makes things much easier to maintain. For years mod-makers had to rely on tedious code editing and memory injection. A few even went even further and reversed a good chunk of the game (such as Belzebub/The Hell). The problem is that they never released their sources. Usually being a one-man job, they move on with their lives inevitably due to the amount of time/work required or lack of interest. This leaves people with a half-finished mod; one which had countless hours put into it, but left full of bugs and unfinished potential. So we're back to square one. Devilution aims to fix this, by making the source code of Diablo freely available to all.
Even though the goal of Devilution is to recreate Diablo's source code, it can be forked to update, improve, and mod the all-time classic. As an example, I've uploaded a small mod which makes the UI much more like Diablo 2 in only a few hundred lines of code. The goal of Devilution itself is to recreate the original source code as accurately as possible, in order to ensure that everything is preserved. This goes as far as bugs and badly written code in the original game. However, it becomes a solid base for developers to work with; making it much easier than before to update, fix, and port the game to other platforms.
On top of all that, it allows us to understand and unlock secrets hidden within the game. When you began seeing holes in certain functions or enums, beta elements begin coming together. We can understand better various aspects removed or changed during development, such as cool spells/items removed from the Battle.net Beta and the Demo. As a side goal, Devilution helps document the unused and cut content from the final game. Development of Diablo was rushed near the end--many ideas were scrapped and Multiplayer was quickly hacked in. By examining the source, we can see various quirks of planned development.
# Compiling # Compiling
Development of Diablo began in 1995 on a DOS-based system, so it was likely compiled under Microsoft Visual C++ 2 or 4. The project is currently setup to compile with VC6, which is compatible with newer systems. Simply open up the project workspace and select compile, it takes a few seconds. Place the Diablo.exe in the directory where Diablo was installed. The source is based on patch 1.09b, so the installation will need to be upgraded to that version. If compiling with copy protection, the Diablo CD will need to be present; else, the DIABDAT.MPQ file found on the CD will need to be copied into the installation directory. Development of Diablo began around the time Windows 95 released, for which it was optimized. The compiler used was Microsoft Visual C++ 4.20, which was upgraded to 5.10 in later patches ([ref: spreadsheet](Support/linker.xls)). Compatibility with these tools is retained to help ensure the reversal is as accurate as possible. There are also Makefiles provided to compile with modern tools as well.
There are two configurations: Debug and Release. The Debug version will compile with functions I ported from the 12-21-96 debug release. Most of these are command-line options or in-game hotkeys (such as cheats and testing features). Building with Visual C++ 5.10
- Make sure Service Pack 3 is installed in order to update the linker from 5.00 -> 5.10! Newer versions of Visual Studio work as well, but will upgrade the project.
- Open the project workspace `Diablo.dsw` and select `Build Diablo.exe`. This will build all dependencies and only takes a few seconds.
There are currently three options defined in types.h. You can compile without copy protection, compile with debugger support, and compile with CPU throttling. The last option will sleep the main program loop to keep Diablo from using 100% CPU on modern computers. Building with MinGW(32/64)
- Ensure that the MinGW binary paths have been added to the command line.
- For MinGW32, navigate to the project root and execute `make MINGW32=mingw32`. The process will take longer than Visual Studio.
- For MinGW64, refer to the respective documentation: [Linux](Support/INSTALL_linux.md) | [Windows](Support/INSTALL_windows.md) | [Mac](Support/INSTALL_mac.md). Note that only x86 systems may be targeted for the time being.
Compiling Definitions
- `COPYPROT` (default: on) will define whether or not to use the CD drive for DIABDAT.MPQ
- `DEBUGGER` (default: off) will define whether to skip reloading for direct execution through debuggers
- `SLEEP` (default: off) will define whether to sleep the program to prevent 100% CPU usage
- `_DEBUG` (default: off) will define whether to include debug features (refer to [Debugging Document](Support/debug.md))
# Installing
Once compiled, the Devilution binary will serve as a replacement for `Diablo.exe`. A clean installation of Diablo patched to 1.09(b) is needed to run the game. Either copy Devilution into Diablo's installation folder, or make sure the following files are present:
- `DIABDAT.MPQ` : if `COPYPROT` was defined, then the Diablo CD will be required
- `DiabloUI.dll` : provides module for the title screen interface
- `SmackW32.dll` : provides library for playing Smacker video files
- `Standard.snp` : provides local multiplayer code (Modem/IPX/Serial, Starcraft version adds TCP/IP)
- `Storm.dll` : provides various "standard" functions
To run the game in windowed mode, a DirectDraw wrapper will be needed. Strange Bytes' [DirectDraw patch](http://www.strangebytes.com/index.php/projects/1-diablo-1-windows-7-vista-patch) is recommended. To install, place the `ddraw.dll` into the same location as the Devilution binary.
# Troubleshooting
While Devilution should produce a binary close to the original (compatible with Windows 95/NT), it may cause issues on newer systems. It has been reported to frequently crash on some setups, although for many it appears to be running flawless otherwise. Windows 7, Linux-WINE, and Windows 10 have all reported success.
Note that newer compilers may need to be tweaked to properly produce an executable. Currently this is being worked on to provide multiple Makefiles for a variety of systems. To ensure the best results, either MinGW or Visual Studio 2003/older should be used for the time being.
# F.A.Q.
> Wow, does this mean I can download and play Diablo for free now?
No, you'll need access to the data from the original game. Blizzard has discontinued Diablo, but there's plenty of used copies floating around. (I'm still using an original 1996-disc in 2018 without problems)
> Cool, so I fired your mod up, but there's no 1080p or new features?
Devilution aims to keep the original code unaltered, for documentation purposes.
> So will you ever add cross-platform support or new features in the future?
Yes! However, this will be a **_side project_** based on Devilution. I have yet to announce the project.
> When and what can I expect from the upcoming project?
Honestly I have no idea. More than 1,200 hours went into creating Devilution, and I have other things going on right now. Maybe in 6-12 months? The goal is to create a native Linux port, convert to OpenGL, modernize the UI, etc. you get the drill. There has to be some surprises. ;)
> Ok, so I'm playing Devilution now and all the sudden it crashed. NOW WHAT??
Try to remember as many details about the crash as possible. Inside the Diablo folder should be a log file containing crash information. Open an issue, upload the log, and provide as much information as possible (OS version, etc.).
> I thought I'd fix the crash myself, but after looking at the code its a disaster. Do you speak v2-34-v8?
That is the result of decompiled code. Whenever a program is compiled, much of the source is optimized and stripped away, so it's nearly impossible to decompile it back. Have patience. Everything will be cleaned up eventually. :)
> Will you be reverse engineering Diablo II next? Ooooh please!
Absolutely not. Diablo II is still supported, sold, and maintained by Blizzard. Setting the legal implications aside, there's about 8x as much code, and a chance Blizzard will remaster the game soon anyway. (as of 2018)
> Are you interested in working for me? I have this game I want you to reverse...
Sorry, but no. Money takes the passion out of it. Forgoing that, Diablo was an exception given that symbolic information was readily available. Even then it took countless hours to pick apart such a tiny game.
> I think that's about all, but is Devilution even legal?
That's a tricky question. Under the DMCA, reverse-engineering has exceptions for the purpose of documentation and interoperability. Devilution provides the necessary documentation needed to achieve the latter. However, it falls into an entirely grey area. The real question is whether or not Blizzard deems it necessary to take action.
# Contributing # Contributing
Currently there are a few issues with the decompiled code. Most of them are outlined in the TODO file. If you wish to contribute, small changes to help fix as many issues possible until everything is perfect and identical to the original game. Currently only Diablo.exe has been reversed, I have not yet started on the other files. Those are: Currently there are a few issues with the decompiled code. The focus should be on fixing these issues for now instead of cleaning up the code. Currently only Diablo.exe has been reversed, the other files are:
- Battle.snp: code for battle.net, outdated protocol and not worth the time. - `Battle.snp`: code for battle.net, outdated protocol and not worth the time.
- DiabloUI.dll: code for the main menu, this is entirely Windows specific and poorly written. However, it needs to be reversed to complete the source code. - `DiabloUI.dll`: code for the main menu, this is entirely Windows specific and poorly written. However, it needs to be reversed to complete the source code.
- SmackW32.dll: code for the Smacker video library, not worth the time. - `SmackW32.dll`: code for the Smacker video library, not worth the time.
- Standard.snp: code for local multiplayer, again outdated. Starcraft uses the same format and TCP/IP was added in a later patch. Reversing the UDP portion is desired. - `Standard.snp`: code for local multiplayer, again outdated. Starcraft uses the same format and TCP/IP was added in a later patch. Reversing the UDP portion is desired.
- Storm.dll: we want Diablo to be independent of this library, the main file functions have been reversed as part of StormLib. - `Storm.dll`: we want Diablo to be independent of this library, the main file functions have been reversed as part of StormLib.
- VidSize.exe: changes one byte in registry, ignore. - `VidSize.exe`: changes one byte in registry, ignore.
If you are experienced with reversing, help is needed to document and decompile the user interface (DiabloUI) to help make Diablo cross-plateform. If you are experienced with reversing, help is needed to reverse the user interface (DiabloUI) to help make Diablo cross-platform.
# Modding
Here are some screenshots of a few things I tinkered around with, to demonstrate the relative ease of improving the game:
![Screenshot 1: Monster lifebar+items](https://s33.postimg.cc/6xnnhhlmn/diabuimon.png "Monster lifebar+items")
![Screenshot 2: New trade screen](https://s22.postimg.cc/z8fhuutk1/diabstore.png "New trade screen")
# Credits # Credits
- @mewmew - documenting the Windows-specific Diablo code (engine, mpq, directx) - [sanctuary](https://github.com/sanctuary) - documenting the Windows-specific Diablo code (engine, mpq, directx)
- Ladislav Zezula - decompiling PKWARE library - [BWAPI Team](https://github.com/bwapi) - providing library API to work with Storm
- @fearedbliss - being awe-inspiring - [Ladislav Zezula](https://github.com/ladislav-zezula) - decompiling PKWARE library, decompiling Storm (StormLib)
- Climax Studios - basically giving out an intermediate source code - [fearedbliss](https://github.com/fearedbliss) - being awe-inspiring
- Climax Studios & Sony - secretly helping with their undercover QA :P
- Blizzard North - wait, this was a typo! - Blizzard North - wait, this was a typo!
- Depression - reason to waste four months of my life doing this ;) - Depression - reason to waste four months of my life doing this ;)
# Legal # Legal
This work is being released to the Public Domain. No assets of Diablo are being provided. You must own a copy of Diablo and have access to the assets beforehand in order to use this software. This work is being released to the Public Domain. No assets of Diablo are being provided. You must own a copy of Diablo and have access to the assets beforehand in order to use this software.
Copyright (c) 1996 BLIZZARD ENTERTAINMENT, All rights reserved Battle.net(R) - Copyright (C) 1996 Blizzard Entertainment, Inc. All rights reserved. Battle.net and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.
Diablo and Battle.net are trademarks and Blizzard Entertainment is a trademark of Davidson and Associates, Inc. Diablo(R) - Copyright (C) 1996 Blizzard Entertainment, Inc. All rights reserved. Diablo and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.
This software is in no way associated with or endorsed by Blizzard Entertainment(R).

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -40,13 +31,12 @@ bool __cdecl appfat_cpp_free(void *a1)
} }
*/ */
//----- (0040102A) --------------------------------------------------------
char *__fastcall GetErr(int error_code) char *__fastcall GetErr(int error_code)
{ {
int v1; // edi int v1; // edi
unsigned int v2; // eax unsigned int v2; // eax
signed int v4; // eax signed int v4; // eax
_BYTE *i; // ecx char *i; // ecx
v1 = error_code; v1 = error_code;
v2 = ((unsigned int)error_code >> 16) & 0x1FFF; v2 = ((unsigned int)error_code >> 16) & 0x1FFF;
@ -64,7 +54,7 @@ char *__fastcall GetErr(int error_code)
wsprintfA(sz_error_buf, "unknown error 0x%08x", v1); wsprintfA(sz_error_buf, "unknown error 0x%08x", v1);
} }
v4 = strlen(sz_error_buf); v4 = strlen(sz_error_buf);
for ( i = (unsigned char *)&appfat_terminated + v4 + 3; v4 > 0; *i = 0 ) for ( i = &sz_error_buf[v4-1]; v4 > 0; *i = 0 )
{ {
--v4; --v4;
if ( *--i != '\r' && *i != '\n' ) if ( *--i != '\r' && *i != '\n' )
@ -72,9 +62,7 @@ char *__fastcall GetErr(int error_code)
} }
return sz_error_buf; return sz_error_buf;
} }
// 4B7930: using guessed type int appfat_terminated;
//----- (004010CE) --------------------------------------------------------
void __fastcall GetDDErr(int error_code, char *error_buf, int error_buf_len) void __fastcall GetDDErr(int error_code, char *error_buf, int error_buf_len)
{ {
const char *v3; // eax const char *v3; // eax
@ -504,7 +492,6 @@ LABEL_182:
strncpy(error_buf, v3, error_buf_len); strncpy(error_buf, v3, error_buf_len);
} }
//----- (00401831) --------------------------------------------------------
void __fastcall GetDSErr(int error_code, char *error_buf, int error_buf_len) void __fastcall GetDSErr(int error_code, char *error_buf, int error_buf_len)
{ {
const char *v3; // eax const char *v3; // eax
@ -568,7 +555,6 @@ LABEL_29:
strncpy(error_buf, v3, error_buf_len); strncpy(error_buf, v3, error_buf_len);
} }
//----- (0040193A) --------------------------------------------------------
char *__cdecl GetLastErr() char *__cdecl GetLastErr()
{ {
int v0; // eax int v0; // eax
@ -577,7 +563,6 @@ char *__cdecl GetLastErr()
return GetErr(v0); return GetErr(v0);
} }
//----- (00401947) --------------------------------------------------------
void TermMsg(char *pszFmt, ...) void TermMsg(char *pszFmt, ...)
{ {
va_list arglist; // [esp+8h] [ebp+8h] va_list arglist; // [esp+8h] [ebp+8h]
@ -590,7 +575,6 @@ void TermMsg(char *pszFmt, ...)
exit(1); exit(1);
} }
//----- (00401975) --------------------------------------------------------
void __fastcall MsgBox(char *pszFmt, va_list va) void __fastcall MsgBox(char *pszFmt, va_list va)
{ {
char Text[256]; // [esp+0h] [ebp-100h] char Text[256]; // [esp+0h] [ebp-100h]
@ -601,7 +585,6 @@ void __fastcall MsgBox(char *pszFmt, va_list va)
MessageBoxA(ghMainWnd, Text, "ERROR", MB_TASKMODAL|MB_ICONHAND); MessageBoxA(ghMainWnd, Text, "ERROR", MB_TASKMODAL|MB_ICONHAND);
} }
//----- (004019C7) --------------------------------------------------------
void __cdecl FreeDlg() void __cdecl FreeDlg()
{ {
if ( terminating && cleanup_thread_id != GetCurrentThreadId() ) if ( terminating && cleanup_thread_id != GetCurrentThreadId() )
@ -621,7 +604,6 @@ void __cdecl FreeDlg()
// 4B7A38: using guessed type int cleanup_thread_id; // 4B7A38: using guessed type int cleanup_thread_id;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00401A30) --------------------------------------------------------
void DrawDlg(char *pszFmt, ...) void DrawDlg(char *pszFmt, ...)
{ {
char text[256]; // [esp+0h] [ebp-100h] char text[256]; // [esp+0h] [ebp-100h]
@ -632,7 +614,6 @@ void DrawDlg(char *pszFmt, ...)
SDrawMessageBox(text, "Diablo", MB_TASKMODAL|MB_ICONEXCLAMATION); SDrawMessageBox(text, "Diablo", MB_TASKMODAL|MB_ICONEXCLAMATION);
} }
//----- (00401A65) --------------------------------------------------------
void __fastcall DDErrDlg(int error_code, int log_line_nr, char *log_file_path) void __fastcall DDErrDlg(int error_code, int log_line_nr, char *log_file_path)
{ {
int v3; // esi int v3; // esi
@ -646,7 +627,6 @@ void __fastcall DDErrDlg(int error_code, int log_line_nr, char *log_file_path)
} }
} }
//----- (00401A88) --------------------------------------------------------
void __fastcall DSErrDlg(int error_code, int log_line_nr, char *log_file_path) void __fastcall DSErrDlg(int error_code, int log_line_nr, char *log_file_path)
{ {
int v3; // esi int v3; // esi
@ -660,7 +640,6 @@ void __fastcall DSErrDlg(int error_code, int log_line_nr, char *log_file_path)
} }
} }
//----- (00401AAB) --------------------------------------------------------
void __fastcall CenterDlg(HWND hDlg) void __fastcall CenterDlg(HWND hDlg)
{ {
LONG v1; // esi LONG v1; // esi
@ -687,7 +666,6 @@ void __fastcall CenterDlg(HWND hDlg)
} }
} }
//----- (00401B3D) --------------------------------------------------------
void __fastcall TermDlg(int template_id, int error_code, char *log_file_path, int log_line_nr) void __fastcall TermDlg(int template_id, int error_code, char *log_file_path, int log_line_nr)
{ {
int v4; // ebx int v4; // ebx
@ -711,7 +689,6 @@ void __fastcall TermDlg(int template_id, int error_code, char *log_file_path, in
TermMsg(0); TermMsg(0);
} }
//----- (00401BCA) --------------------------------------------------------
bool __stdcall FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, char *text) bool __stdcall FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, char *text)
{ {
if ( uMsg == WM_INITDIALOG ) if ( uMsg == WM_INITDIALOG )
@ -734,7 +711,6 @@ bool __stdcall FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, char *text)
return 1; return 1;
} }
//----- (00401C0F) --------------------------------------------------------
void __fastcall TextDlg(HWND hDlg, char *text) void __fastcall TextDlg(HWND hDlg, char *text)
{ {
char *v2; // esi char *v2; // esi
@ -747,7 +723,6 @@ void __fastcall TextDlg(HWND hDlg, char *text)
SetDlgItemTextA(v3, 1000, v2); SetDlgItemTextA(v3, 1000, v2);
} }
//----- (00401C2E) --------------------------------------------------------
void __fastcall ErrDlg(template_id template_id, int error_code, char *log_file_path, int log_line_nr) void __fastcall ErrDlg(template_id template_id, int error_code, char *log_file_path, int log_line_nr)
{ {
char *v4; // esi char *v4; // esi
@ -768,7 +743,6 @@ void __fastcall ErrDlg(template_id template_id, int error_code, char *log_file_p
DialogBoxParamA(ghInst, (LPCSTR)v6, ghMainWnd, (DLGPROC)FuncDlg, (LPARAM)dwInitParam); DialogBoxParamA(ghInst, (LPCSTR)v6, ghMainWnd, (DLGPROC)FuncDlg, (LPARAM)dwInitParam);
} }
//----- (00401C9C) --------------------------------------------------------
void __fastcall FileErrDlg(char *error) void __fastcall FileErrDlg(char *error)
{ {
char *v1; // esi char *v1; // esi
@ -782,7 +756,6 @@ void __fastcall FileErrDlg(char *error)
TermMsg(0); TermMsg(0);
} }
//----- (00401CE1) --------------------------------------------------------
void __fastcall DiskFreeDlg(char *error) void __fastcall DiskFreeDlg(char *error)
{ {
char *v1; // esi char *v1; // esi
@ -794,10 +767,9 @@ void __fastcall DiskFreeDlg(char *error)
TermMsg(0); TermMsg(0);
} }
//----- (00401D1D) --------------------------------------------------------
bool __cdecl InsertCDDlg() bool __cdecl InsertCDDlg()
{ {
INT_PTR v0; // edi int v0; // edi
ShowCursor(1); ShowCursor(1);
v0 = DialogBoxParamA(ghInst, (LPCSTR)0x70, ghMainWnd, (DLGPROC)FuncDlg, (LPARAM)&empty_string); v0 = DialogBoxParamA(ghInst, (LPCSTR)0x70, ghMainWnd, (DLGPROC)FuncDlg, (LPARAM)&empty_string);
@ -807,7 +779,6 @@ bool __cdecl InsertCDDlg()
return v0 == 1; return v0 == 1;
} }
//----- (00401D68) --------------------------------------------------------
void __fastcall DirErrDlg(char *error) void __fastcall DirErrDlg(char *error)
{ {
char *v1; // esi char *v1; // esi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __APPFAT_H__
* United States. Use of a copyright notice is precautionary only and #define __APPFAT_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//appfat
extern int appfat_terminated; // weak extern int appfat_terminated; // weak
extern char sz_error_buf[256]; extern char sz_error_buf[256];
extern int terminating; // weak extern int terminating; // weak
@ -35,3 +27,5 @@ void __fastcall FileErrDlg(char *error);
void __fastcall DiskFreeDlg(char *error); void __fastcall DiskFreeDlg(char *error);
bool __cdecl InsertCDDlg(); bool __cdecl InsertCDDlg();
void __fastcall DirErrDlg(char *error); void __fastcall DirErrDlg(char *error);
#endif /* __APPFAT_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -26,7 +17,6 @@ int AutoMapYPos; // weak
int AMPlayerX; // weak int AMPlayerX; // weak
int AMPlayerY; // weak int AMPlayerY; // weak
//----- (00401DA4) --------------------------------------------------------
void __cdecl InitAutomapOnce() void __cdecl InitAutomapOnce()
{ {
automapflag = 0; automapflag = 0;
@ -43,7 +33,6 @@ void __cdecl InitAutomapOnce()
// 4B84C4: using guessed type int AMPlayerX; // 4B84C4: using guessed type int AMPlayerX;
// 4B84C8: using guessed type int AMPlayerY; // 4B84C8: using guessed type int AMPlayerY;
//----- (00401DE8) --------------------------------------------------------
void __cdecl InitAutomap() void __cdecl InitAutomap()
{ {
signed int v0; // edi signed int v0; // edi
@ -133,7 +122,6 @@ void __cdecl InitAutomap()
} }
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (00401EF4) --------------------------------------------------------
void __cdecl StartAutomap() void __cdecl StartAutomap()
{ {
AutoMapXOfs = 0; AutoMapXOfs = 0;
@ -143,7 +131,6 @@ void __cdecl StartAutomap()
// 4B84B0: using guessed type int AutoMapXOfs; // 4B84B0: using guessed type int AutoMapXOfs;
// 4B84B4: using guessed type int AutoMapYOfs; // 4B84B4: using guessed type int AutoMapYOfs;
//----- (00401F0D) --------------------------------------------------------
void __cdecl AutomapUp() void __cdecl AutomapUp()
{ {
--AutoMapXOfs; --AutoMapXOfs;
@ -152,7 +139,6 @@ void __cdecl AutomapUp()
// 4B84B0: using guessed type int AutoMapXOfs; // 4B84B0: using guessed type int AutoMapXOfs;
// 4B84B4: using guessed type int AutoMapYOfs; // 4B84B4: using guessed type int AutoMapYOfs;
//----- (00401F1A) --------------------------------------------------------
void __cdecl AutomapDown() void __cdecl AutomapDown()
{ {
++AutoMapXOfs; ++AutoMapXOfs;
@ -161,7 +147,6 @@ void __cdecl AutomapDown()
// 4B84B0: using guessed type int AutoMapXOfs; // 4B84B0: using guessed type int AutoMapXOfs;
// 4B84B4: using guessed type int AutoMapYOfs; // 4B84B4: using guessed type int AutoMapYOfs;
//----- (00401F27) --------------------------------------------------------
void __cdecl AutomapLeft() void __cdecl AutomapLeft()
{ {
--AutoMapXOfs; --AutoMapXOfs;
@ -170,7 +155,6 @@ void __cdecl AutomapLeft()
// 4B84B0: using guessed type int AutoMapXOfs; // 4B84B0: using guessed type int AutoMapXOfs;
// 4B84B4: using guessed type int AutoMapYOfs; // 4B84B4: using guessed type int AutoMapYOfs;
//----- (00401F34) --------------------------------------------------------
void __cdecl AutomapRight() void __cdecl AutomapRight()
{ {
++AutoMapXOfs; ++AutoMapXOfs;
@ -179,7 +163,6 @@ void __cdecl AutomapRight()
// 4B84B0: using guessed type int AutoMapXOfs; // 4B84B0: using guessed type int AutoMapXOfs;
// 4B84B4: using guessed type int AutoMapYOfs; // 4B84B4: using guessed type int AutoMapYOfs;
//----- (00401F41) --------------------------------------------------------
void __cdecl AutomapZoomIn() void __cdecl AutomapZoomIn()
{ {
if ( AutoMapScale < 200 ) if ( AutoMapScale < 200 )
@ -198,7 +181,6 @@ void __cdecl AutomapZoomIn()
// 4B84C4: using guessed type int AMPlayerX; // 4B84C4: using guessed type int AMPlayerX;
// 4B84C8: using guessed type int AMPlayerY; // 4B84C8: using guessed type int AMPlayerY;
//----- (00401F80) --------------------------------------------------------
void __cdecl AutomapZoomOut() void __cdecl AutomapZoomOut()
{ {
if ( AutoMapScale > 50 ) if ( AutoMapScale > 50 )
@ -217,7 +199,6 @@ void __cdecl AutomapZoomOut()
// 4B84C4: using guessed type int AMPlayerX; // 4B84C4: using guessed type int AMPlayerX;
// 4B84C8: using guessed type int AMPlayerY; // 4B84C8: using guessed type int AMPlayerY;
//----- (00401FBD) --------------------------------------------------------
void __cdecl DrawAutomap() void __cdecl DrawAutomap()
{ {
int v0; // eax int v0; // eax
@ -400,7 +381,6 @@ void __cdecl DrawAutomap()
// 69BD04: using guessed type int questlog; // 69BD04: using guessed type int questlog;
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00402233) --------------------------------------------------------
void __fastcall DrawAutomapType(int screen_x, int screen_y, short automap_type) void __fastcall DrawAutomapType(int screen_x, int screen_y, short automap_type)
{ {
short v3; // al short v3; // al
@ -637,7 +617,6 @@ LABEL_36:
// 4B84C4: using guessed type int AMPlayerX; // 4B84C4: using guessed type int AMPlayerX;
// 4B84C8: using guessed type int AMPlayerY; // 4B84C8: using guessed type int AMPlayerY;
//----- (004029A8) --------------------------------------------------------
void __cdecl DrawAutomapPlr() void __cdecl DrawAutomapPlr()
{ {
int v0; // ebx int v0; // ebx
@ -791,7 +770,6 @@ LABEL_25:
// 4B8968: using guessed type int sbookflag; // 4B8968: using guessed type int sbookflag;
// 69BD04: using guessed type int questlog; // 69BD04: using guessed type int questlog;
//----- (00402D83) --------------------------------------------------------
short __fastcall GetAutomapType(int tx, int ty, bool view) short __fastcall GetAutomapType(int tx, int ty, bool view)
{ {
int v3; // edi int v3; // edi
@ -839,7 +817,6 @@ short __fastcall GetAutomapType(int tx, int ty, bool view)
return v7; return v7;
} }
//----- (00402E4A) --------------------------------------------------------
void __cdecl DrawAutomapGame() void __cdecl DrawAutomapGame()
{ {
int v0; // esi int v0; // esi
@ -876,7 +853,6 @@ void __cdecl DrawAutomapGame()
// 5CF31D: using guessed type char setlevel; // 5CF31D: using guessed type char setlevel;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00402F27) --------------------------------------------------------
void __fastcall SetAutomapView(int x, int y) void __fastcall SetAutomapView(int x, int y)
{ {
signed int v2; // esi signed int v2; // esi
@ -973,7 +949,6 @@ LABEL_35:
// 4B7E40: using guessed type int AMdword_4B7E40; // 4B7E40: using guessed type int AMdword_4B7E40;
// 4B7E44: using guessed type int AMdword_4B7E44; // 4B7E44: using guessed type int AMdword_4B7E44;
//----- (004030DD) --------------------------------------------------------
void __cdecl AutomapZoomReset() void __cdecl AutomapZoomReset()
{ {
AutoMapXOfs = 0; AutoMapXOfs = 0;

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __AUTOMAP_H__
* United States. Use of a copyright notice is precautionary only and #define __AUTOMAP_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//automap
extern short automaptype[512]; extern short automaptype[512];
extern int AMdword_4B7E40; // weak extern int AMdword_4B7E40; // weak
extern int AMdword_4B7E44; // weak extern int AMdword_4B7E44; // weak
@ -41,3 +33,5 @@ short __fastcall GetAutomapType(int tx, int ty, bool view);
void __cdecl DrawAutomapGame(); void __cdecl DrawAutomapGame();
void __fastcall SetAutomapView(int x, int y); void __fastcall SetAutomapView(int x, int y);
void __cdecl AutomapZoomReset(); void __cdecl AutomapZoomReset();
#endif /* __AUTOMAP_H__ */

View File

@ -1,17 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
//----- (0040311B) --------------------------------------------------------
void __cdecl CaptureScreen() void __cdecl CaptureScreen()
{ {
int v4; // edi int v4; // edi
@ -23,7 +13,7 @@ void __cdecl CaptureScreen()
if ( hObject != (HANDLE)-1 ) if ( hObject != (HANDLE)-1 )
{ {
DrawAndBlit(); DrawAndBlit();
IDirectDrawPalette_GetEntries(lpDDPalette, 0, 0, 256, palette); lpDDPalette->GetEntries(0, 0, 256, palette);
RedPalette(palette); RedPalette(palette);
dx_lock_mutex(); dx_lock_mutex();
v4 = CaptureHdr(hObject, 640, 480); v4 = CaptureHdr(hObject, 640, 480);
@ -40,14 +30,13 @@ void __cdecl CaptureScreen()
if ( !v4 ) if ( !v4 )
DeleteFileA(FileName); DeleteFileA(FileName);
Sleep(300); Sleep(300);
IDirectDrawPalette_SetEntries(lpDDPalette, 0, 0, 256, palette); lpDDPalette->SetEntries(0, 0, 256, palette);
} }
} }
// 40311B: could not find valid save-restore pair for ebx // 40311B: could not find valid save-restore pair for ebx
// 40311B: could not find valid save-restore pair for edi // 40311B: could not find valid save-restore pair for edi
// 40311B: could not find valid save-restore pair for esi // 40311B: could not find valid save-restore pair for esi
//----- (00403204) --------------------------------------------------------
bool __fastcall CaptureHdr(HANDLE hFile, short width, int height) bool __fastcall CaptureHdr(HANDLE hFile, short width, int height)
{ {
short v3; // si short v3; // si
@ -71,7 +60,6 @@ bool __fastcall CaptureHdr(HANDLE hFile, short width, int height)
return WriteFile(v4, &Buffer, 0x80u, &lpNumBytes, NULL) && lpNumBytes == 128; return WriteFile(v4, &Buffer, 0x80u, &lpNumBytes, NULL) && lpNumBytes == 128;
} }
//----- (00403294) --------------------------------------------------------
bool __fastcall CapturePal(HANDLE hFile, PALETTEENTRY *palette) bool __fastcall CapturePal(HANDLE hFile, PALETTEENTRY *palette)
{ {
BYTE *v2; // eax BYTE *v2; // eax
@ -97,7 +85,6 @@ bool __fastcall CapturePal(HANDLE hFile, PALETTEENTRY *palette)
return WriteFile(hFile, Buffer, 0x301u, &lpNumBytes, 0) && lpNumBytes == 769; return WriteFile(hFile, Buffer, 0x301u, &lpNumBytes, 0) && lpNumBytes == 769;
} }
//----- (004032FD) --------------------------------------------------------
bool __fastcall CapturePix(HANDLE hFile, short width, short height, short stride, char *pixels) bool __fastcall CapturePix(HANDLE hFile, short width, short height, short stride, char *pixels)
{ {
int v5; // esi int v5; // esi
@ -126,7 +113,6 @@ bool __fastcall CapturePix(HANDLE hFile, short width, short height, short stride
return 0; return 0;
} }
//----- (0040336A) --------------------------------------------------------
char *__fastcall CaptureEnc(char *src, char *dst, int width) char *__fastcall CaptureEnc(char *src, char *dst, int width)
{ {
int v3; // esi int v3; // esi
@ -164,7 +150,6 @@ LABEL_13:
return dst; return dst;
} }
//----- (004033A8) --------------------------------------------------------
HANDLE __fastcall CaptureFile(char *dst_path) HANDLE __fastcall CaptureFile(char *dst_path)
{ {
char *v1; // edi char *v1; // edi
@ -201,7 +186,6 @@ HANDLE __fastcall CaptureFile(char *dst_path)
} }
// 4033A8: using guessed type char var_64[100]; // 4033A8: using guessed type char var_64[100];
//----- (00403470) --------------------------------------------------------
void __fastcall RedPalette(PALETTEENTRY *pal) void __fastcall RedPalette(PALETTEENTRY *pal)
{ {
int i; // eax int i; // eax
@ -215,5 +199,5 @@ void __fastcall RedPalette(PALETTEENTRY *pal)
red[i].peFlags = 0; red[i].peFlags = 0;
} }
IDirectDrawPalette_SetEntries(lpDDPalette, 0, 0, 256, red); lpDDPalette->SetEntries(0, 0, 256, red);
} }

View File

@ -1,13 +1,6 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __CAPTURE_H__
* United States. Use of a copyright notice is precautionary only and #define __CAPTURE_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
void __cdecl CaptureScreen(); void __cdecl CaptureScreen();
bool __fastcall CaptureHdr(HANDLE hFile, short width, int height); bool __fastcall CaptureHdr(HANDLE hFile, short width, int height);
@ -16,3 +9,5 @@ bool __fastcall CapturePix(HANDLE hFile, short width, short height, short stride
char *__fastcall CaptureEnc(char *src, char *dst, int width); char *__fastcall CaptureEnc(char *src, char *dst, int width);
HANDLE __fastcall CaptureFile(char *dst_path); HANDLE __fastcall CaptureFile(char *dst_path);
void __fastcall RedPalette(PALETTEENTRY *pal); void __fastcall RedPalette(PALETTEENTRY *pal);
#endif /* __CAPTURE_H__ */

View File

@ -1,17 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
//----- (004034D9) --------------------------------------------------------
int __fastcall codec_decode(void *pbSrcDst, int size, char *pszPassword) int __fastcall codec_decode(void *pbSrcDst, int size, char *pszPassword)
{ {
unsigned int v3; // ebx unsigned int v3; // ebx
@ -74,7 +64,6 @@ LABEL_14:
} }
// 4034D9: using guessed type char var_98[128]; // 4034D9: using guessed type char var_98[128];
//----- (004035DB) --------------------------------------------------------
void __fastcall codec_init_key(int unused, char *pszPassword) void __fastcall codec_init_key(int unused, char *pszPassword)
{ {
char *v2; // edi char *v2; // edi
@ -134,7 +123,6 @@ void __fastcall codec_init_key(int unused, char *pszPassword)
// 4035DB: using guessed type char var_58[64]; // 4035DB: using guessed type char var_58[64];
// 4035DB: using guessed type char dst[20]; // 4035DB: using guessed type char dst[20];
//----- (004036AC) --------------------------------------------------------
int __fastcall codec_get_encoded_len(int dwSrcBytes) int __fastcall codec_get_encoded_len(int dwSrcBytes)
{ {
if ( dwSrcBytes & 0x3F ) if ( dwSrcBytes & 0x3F )
@ -142,7 +130,6 @@ int __fastcall codec_get_encoded_len(int dwSrcBytes)
return dwSrcBytes + 8; return dwSrcBytes + 8;
} }
//----- (004036BE) --------------------------------------------------------
void __fastcall codec_encode(void *pbSrcDst, int size, int size_64, char *pszPassword) void __fastcall codec_encode(void *pbSrcDst, int size, int size_64, char *pszPassword)
{ {
char *v4; // esi char *v4; // esi

View File

@ -1,15 +1,10 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __CODEC_H__
* United States. Use of a copyright notice is precautionary only and #define __CODEC_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
int __fastcall codec_decode(void *pbSrcDst, int size, char *pszPassword); int __fastcall codec_decode(void *pbSrcDst, int size, char *pszPassword);
void __fastcall codec_init_key(int unused, char *pszPassword); void __fastcall codec_init_key(int unused, char *pszPassword);
int __fastcall codec_get_encoded_len(int dwSrcBytes); int __fastcall codec_get_encoded_len(int dwSrcBytes);
void __fastcall codec_encode(void *pbSrcDst, int size, int size_64, char *pszPassword); void __fastcall codec_encode(void *pbSrcDst, int size, int size_64, char *pszPassword);
#endif /* __CODEC_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -200,7 +191,6 @@ int SpellPages[6][7] =
{ -1, -1, -1, -1, -1, -1, -1 } { -1, -1, -1, -1, -1, -1, -1 }
}; };
//----- (004037D4) --------------------------------------------------------
void __fastcall DrawSpellCel(int xp, int yp, char *Trans, int nCel, int w) void __fastcall DrawSpellCel(int xp, int yp, char *Trans, int nCel, int w)
{ {
char *v5; // ebx char *v5; // ebx
@ -285,7 +275,6 @@ LABEL_12:
while ( v6 != (char *)v18 ); while ( v6 != (char *)v18 );
} }
//----- (0040387E) --------------------------------------------------------
void __fastcall SetSpellTrans(char t) void __fastcall SetSpellTrans(char t)
{ {
signed int v1; // eax signed int v1; // eax
@ -379,7 +368,6 @@ void __fastcall SetSpellTrans(char t)
} }
} }
//----- (004039C7) --------------------------------------------------------
void __cdecl DrawSpell() void __cdecl DrawSpell()
{ {
int v0; // ebp int v0; // ebp
@ -414,7 +402,6 @@ void __cdecl DrawSpell()
DrawSpellCel(629, 631, (char *)pSpellCels, (char)SpellITbl[v3], 56); DrawSpellCel(629, 631, (char *)pSpellCels, (char)SpellITbl[v3], 56);
} }
//----- (00403A8E) --------------------------------------------------------
void __cdecl DrawSpellList() void __cdecl DrawSpellList()
{ {
int v0; // esi int v0; // esi
@ -485,7 +472,7 @@ LABEL_10:
} }
v20 = &spelldata[1].sTownSpell; v20 = &spelldata[1].sTownSpell;
v4 = 1; v4 = 1;
v26 = 1i64; v26 = (__int64)1;
v23 = 1; v23 = 1;
v22 = xp - 216; v22 = xp - 216;
do do
@ -621,7 +608,7 @@ LABEL_66:
LABEL_68: LABEL_68:
v20 += 56; v20 += 56;
++v4; ++v4;
v26 *= 2i64; v26 *= (__int64)2;
v23 = v4; v23 = v4;
} }
while ( (signed int)v20 < (signed int)&spelldata[37].sTownSpell ); while ( (signed int)v20 < (signed int)&spelldata[37].sTownSpell );
@ -639,7 +626,6 @@ LABEL_68:
// 4B8834: using guessed type int pSpell; // 4B8834: using guessed type int pSpell;
// 4B8954: using guessed type int pSplType; // 4B8954: using guessed type int pSplType;
//----- (00403F69) --------------------------------------------------------
void __cdecl SetSpell() void __cdecl SetSpell()
{ {
int v0; // eax int v0; // eax
@ -659,7 +645,6 @@ void __cdecl SetSpell()
// 4B8C98: using guessed type int spselflag; // 4B8C98: using guessed type int spselflag;
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (00403FAC) --------------------------------------------------------
void __fastcall SetSpeedSpell(int slot) void __fastcall SetSpeedSpell(int slot)
{ {
int v1; // esi int v1; // esi
@ -692,7 +677,6 @@ void __fastcall SetSpeedSpell(int slot)
// 4B8834: using guessed type int pSpell; // 4B8834: using guessed type int pSpell;
// 4B8954: using guessed type int pSplType; // 4B8954: using guessed type int pSplType;
//----- (00404017) --------------------------------------------------------
void __fastcall ToggleSpell(int slot) void __fastcall ToggleSpell(int slot)
{ {
int v1; // eax int v1; // eax
@ -753,7 +737,7 @@ void __fastcall ToggleSpell(int slot)
v8 = plr[v3]._pAblSpells[0]; v8 = plr[v3]._pAblSpells[0];
v9 = plr[v3]._pAblSpells[1]; v9 = plr[v3]._pAblSpells[1];
} }
if ( v9 & ((unsigned __int64)(1i64 << ((unsigned char)v2 - 1)) >> 32) | v8 & (unsigned int)(1i64 << ((unsigned char)v2 - 1)) ) if ( v9 & ((unsigned __int64)((__int64)1 << ((unsigned char)v2 - 1)) >> 32) | v8 & (unsigned int)((__int64)1 << ((unsigned char)v2 - 1)) )
{ {
drawpanflag = 255; drawpanflag = 255;
plr[v3]._pRSpell = v12; plr[v3]._pRSpell = v12;
@ -763,7 +747,6 @@ void __fastcall ToggleSpell(int slot)
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (004040DA) --------------------------------------------------------
void __fastcall CPrintString(int No, unsigned char pszStr, int Just) void __fastcall CPrintString(int No, unsigned char pszStr, int Just)
{ {
int *v3; // ebx int *v3; // ebx
@ -962,7 +945,6 @@ LABEL_15:
} }
} }
//----- (00404218) --------------------------------------------------------
void __fastcall AddPanelString(char *str, int just) void __fastcall AddPanelString(char *str, int just)
{ {
strcpy(&panelstr[64 * pnumlines], str); strcpy(&panelstr[64 * pnumlines], str);
@ -972,7 +954,6 @@ void __fastcall AddPanelString(char *str, int just)
pnumlines++; pnumlines++;
} }
//----- (0040424A) --------------------------------------------------------
void __cdecl ClearPanel() void __cdecl ClearPanel()
{ {
pnumlines = 0; pnumlines = 0;
@ -980,7 +961,6 @@ void __cdecl ClearPanel()
} }
// 4B8824: using guessed type int pinfoflag; // 4B8824: using guessed type int pinfoflag;
//----- (00404259) --------------------------------------------------------
void __fastcall DrawPanelBox(int x, int y, int w, int h, int sx, int sy) void __fastcall DrawPanelBox(int x, int y, int w, int h, int sx, int sy)
{ {
char *v6; // esi char *v6; // esi
@ -1014,7 +994,6 @@ void __fastcall DrawPanelBox(int x, int y, int w, int h, int sx, int sy)
while ( v8 ); while ( v8 );
} }
//----- (004042CA) --------------------------------------------------------
void __fastcall SetFlaskHeight(char *buf, int min, int max, int c, int r) void __fastcall SetFlaskHeight(char *buf, int min, int max, int c, int r)
{ {
char *v5; // esi char *v5; // esi
@ -1034,7 +1013,6 @@ void __fastcall SetFlaskHeight(char *buf, int min, int max, int c, int r)
while ( v7 ); while ( v7 );
} }
//----- (0040431B) --------------------------------------------------------
void __fastcall DrawFlask(void *a1, int a2, int a3, void *a4, int a5, int a6) void __fastcall DrawFlask(void *a1, int a2, int a3, void *a4, int a5, int a6)
{ {
char *v6; // esi char *v6; // esi
@ -1067,7 +1045,6 @@ void __fastcall DrawFlask(void *a1, int a2, int a3, void *a4, int a5, int a6)
while ( v8 ); while ( v8 );
} }
//----- (0040435B) --------------------------------------------------------
void __cdecl DrawLifeFlask() void __cdecl DrawLifeFlask()
{ {
signed __int64 v0; // rax signed __int64 v0; // rax
@ -1087,7 +1064,6 @@ void __cdecl DrawLifeFlask()
DrawFlask(pBtmBuff, 640, 640 * v2 + 2029, gpBuffer, 768 * v2 + 383405, 13 - v2); DrawFlask(pBtmBuff, 640, 640 * v2 + 2029, gpBuffer, 768 * v2 + 383405, 13 - v2);
} }
//----- (004043F4) --------------------------------------------------------
void __cdecl UpdateLifeFlask() void __cdecl UpdateLifeFlask()
{ {
signed __int64 v0; // rax signed __int64 v0; // rax
@ -1111,7 +1087,6 @@ LABEL_8:
goto LABEL_8; goto LABEL_8;
} }
//----- (00404475) --------------------------------------------------------
void __cdecl DrawManaFlask() void __cdecl DrawManaFlask()
{ {
int v0; // eax int v0; // eax
@ -1130,7 +1105,6 @@ void __cdecl DrawManaFlask()
DrawFlask(pBtmBuff, 640, 640 * v2 + 2395, gpBuffer, 768 * v2 + 383771, 13 - v2); DrawFlask(pBtmBuff, 640, 640 * v2 + 2395, gpBuffer, 768 * v2 + 383771, 13 - v2);
} }
//----- (004044F6) --------------------------------------------------------
void __cdecl control_update_life_mana() void __cdecl control_update_life_mana()
{ {
int v0; // esi int v0; // esi
@ -1153,7 +1127,6 @@ void __cdecl control_update_life_mana()
plr[v0]._pHPPer = (signed __int64)((double)plr[v0]._pHitPoints / (double)plr[v0]._pMaxHP * 80.0); plr[v0]._pHPPer = (signed __int64)((double)plr[v0]._pHitPoints / (double)plr[v0]._pMaxHP * 80.0);
} }
//----- (0040456A) --------------------------------------------------------
void __cdecl UpdateManaFlask() void __cdecl UpdateManaFlask()
{ {
signed int v0; // edi signed int v0; // edi
@ -1180,7 +1153,6 @@ void __cdecl UpdateManaFlask()
DrawSpell(); DrawSpell();
} }
//----- (00404616) --------------------------------------------------------
void __cdecl InitControlPan() void __cdecl InitControlPan()
{ {
size_t v0; // esi size_t v0; // esi
@ -1293,7 +1265,6 @@ void __cdecl InitControlPan()
// 4B8C98: using guessed type int spselflag; // 4B8C98: using guessed type int spselflag;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00404934) --------------------------------------------------------
void __cdecl ClearCtrlPan() void __cdecl ClearCtrlPan()
{ {
DrawPanelBox(0, sgbPlrTalkTbl + 16, 0x280u, 0x80u, 64, 512); DrawPanelBox(0, sgbPlrTalkTbl + 16, 0x280u, 0x80u, 64, 512);
@ -1301,7 +1272,6 @@ void __cdecl ClearCtrlPan()
} }
// 4B8840: using guessed type int sgbPlrTalkTbl; // 4B8840: using guessed type int sgbPlrTalkTbl;
//----- (00404959) --------------------------------------------------------
void __cdecl DrawCtrlPan() void __cdecl DrawCtrlPan()
{ {
signed int v0; // edi signed int v0; // edi
@ -1335,7 +1305,6 @@ void __cdecl DrawCtrlPan()
// 484368: using guessed type int FriendlyMode; // 484368: using guessed type int FriendlyMode;
// 4B8A7C: using guessed type int numpanbtns; // 4B8A7C: using guessed type int numpanbtns;
//----- (00404A0A) --------------------------------------------------------
void __cdecl DoSpeedBook() void __cdecl DoSpeedBook()
{ {
int v0; // eax int v0; // eax
@ -1430,7 +1399,6 @@ void __cdecl DoSpeedBook()
} }
// 4B8C98: using guessed type int spselflag; // 4B8C98: using guessed type int spselflag;
//----- (00404B52) --------------------------------------------------------
void __cdecl DoPanBtn() void __cdecl DoPanBtn()
{ {
int v0; // edx int v0; // edx
@ -1474,7 +1442,6 @@ void __cdecl DoPanBtn()
// 4B8C90: using guessed type int panbtndown; // 4B8C90: using guessed type int panbtndown;
// 4B8C98: using guessed type int spselflag; // 4B8C98: using guessed type int spselflag;
//----- (00404BEB) --------------------------------------------------------
void __fastcall control_set_button_down(int btn_id) void __fastcall control_set_button_down(int btn_id)
{ {
panbtn[btn_id] = 1; panbtn[btn_id] = 1;
@ -1483,7 +1450,6 @@ void __fastcall control_set_button_down(int btn_id)
} }
// 4B8C90: using guessed type int panbtndown; // 4B8C90: using guessed type int panbtndown;
//----- (00404C00) --------------------------------------------------------
void __cdecl control_check_btn_press() void __cdecl control_check_btn_press()
{ {
int v0; // edx int v0; // edx
@ -1507,7 +1473,6 @@ void __cdecl control_check_btn_press()
} }
} }
//----- (00404C74) --------------------------------------------------------
void __cdecl DoAutoMap() void __cdecl DoAutoMap()
{ {
if ( currlevel || gbMaxPlayers != 1 ) if ( currlevel || gbMaxPlayers != 1 )
@ -1524,7 +1489,6 @@ void __cdecl DoAutoMap()
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00404CA0) --------------------------------------------------------
void __cdecl CheckPanelInfo() void __cdecl CheckPanelInfo()
{ {
int v0; // edi int v0; // edi
@ -1665,7 +1629,6 @@ LABEL_54:
// 4B8C98: using guessed type int spselflag; // 4B8C98: using guessed type int spselflag;
// 4B8CB8: using guessed type char pcursinvitem; // 4B8CB8: using guessed type char pcursinvitem;
//----- (00404FE4) --------------------------------------------------------
void __cdecl CheckBtnUp() void __cdecl CheckBtnUp()
{ {
signed int v0; // esi signed int v0; // esi
@ -1762,7 +1725,6 @@ void __cdecl CheckBtnUp()
// 646D00: using guessed type char qtextflag; // 646D00: using guessed type char qtextflag;
// 69BD04: using guessed type int questlog; // 69BD04: using guessed type int questlog;
//----- (00405181) --------------------------------------------------------
void __cdecl FreeControlPan() void __cdecl FreeControlPan()
{ {
void *v0; // ecx void *v0; // ecx
@ -1832,7 +1794,6 @@ void __cdecl FreeControlPan()
mem_free_dbg(v15); mem_free_dbg(v15);
} }
//----- (00405295) --------------------------------------------------------
int __fastcall control_WriteStringToBuffer(char *str) int __fastcall control_WriteStringToBuffer(char *str)
{ {
signed int v1; // edx signed int v1; // edx
@ -1851,7 +1812,6 @@ int __fastcall control_WriteStringToBuffer(char *str)
return 0; return 0;
} }
//----- (004052C8) --------------------------------------------------------
void __cdecl DrawInfoBox() void __cdecl DrawInfoBox()
{ {
int v0; // ecx int v0; // ecx
@ -1987,7 +1947,6 @@ LABEL_33:
// 4B8CC2: using guessed type char pcursplr; // 4B8CC2: using guessed type char pcursplr;
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (004055BC) --------------------------------------------------------
void __fastcall control_print_info_str(int y, char *str, bool center, int lines) void __fastcall control_print_info_str(int y, char *str, bool center, int lines)
{ {
int v4; // edi int v4; // edi
@ -2045,7 +2004,6 @@ LABEL_14:
} }
// 4B883C: using guessed type int infoclr; // 4B883C: using guessed type int infoclr;
//----- (00405681) --------------------------------------------------------
void __fastcall PrintGameStr(int x, int y, char *str, int color) void __fastcall PrintGameStr(int x, int y, char *str, int color)
{ {
char *v4; // edi char *v4; // edi
@ -2065,7 +2023,6 @@ void __fastcall PrintGameStr(int x, int y, char *str, int color)
} }
} }
//----- (004056D8) --------------------------------------------------------
void __cdecl DrawChr() void __cdecl DrawChr()
{ {
char v0; // al char v0; // al
@ -2316,7 +2273,6 @@ void __cdecl DrawChr()
ADD_PlrStringXY(143, 332, 174, a4, a5[0]); ADD_PlrStringXY(143, 332, 174, a4, a5[0]);
} }
//----- (00406058) --------------------------------------------------------
void __fastcall ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col) void __fastcall ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col)
{ {
int v5; // eax int v5; // eax
@ -2368,7 +2324,6 @@ void __fastcall ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col)
} }
} }
//----- (0040610F) --------------------------------------------------------
void __fastcall MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base) void __fastcall MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base)
{ {
char *v6; // ebx char *v6; // ebx
@ -2420,7 +2375,6 @@ void __fastcall MY_PlrStringXY(int x, int y, int width, char *pszStr, char col,
} }
} }
//----- (004061CA) --------------------------------------------------------
void __cdecl CheckLvlBtn() void __cdecl CheckLvlBtn()
{ {
if ( !lvlbtndown && MouseX >= 40 && MouseX <= 81 && MouseY >= 313 && MouseY <= 335 ) if ( !lvlbtndown && MouseX >= 40 && MouseX <= 81 && MouseY >= 313 && MouseY <= 335 )
@ -2428,7 +2382,6 @@ void __cdecl CheckLvlBtn()
} }
// 4B851C: using guessed type int lvlbtndown; // 4B851C: using guessed type int lvlbtndown;
//----- (00406200) --------------------------------------------------------
void __cdecl ReleaseLvlBtn() void __cdecl ReleaseLvlBtn()
{ {
if ( MouseX >= 40 && MouseX <= 81 && MouseY >= 313 && MouseY <= 335 ) if ( MouseX >= 40 && MouseX <= 81 && MouseY >= 313 && MouseY <= 335 )
@ -2437,7 +2390,6 @@ void __cdecl ReleaseLvlBtn()
} }
// 4B851C: using guessed type int lvlbtndown; // 4B851C: using guessed type int lvlbtndown;
//----- (00406234) --------------------------------------------------------
void __cdecl DrawLevelUpIcon() void __cdecl DrawLevelUpIcon()
{ {
int v0; // esi int v0; // esi
@ -2452,7 +2404,6 @@ void __cdecl DrawLevelUpIcon()
// 4B851C: using guessed type int lvlbtndown; // 4B851C: using guessed type int lvlbtndown;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
//----- (0040627A) --------------------------------------------------------
void __cdecl CheckChrBtns() void __cdecl CheckChrBtns()
{ {
int v0; // esi int v0; // esi
@ -2528,7 +2479,6 @@ LABEL_12:
} }
// 4B87A8: using guessed type int chrbtnactive; // 4B87A8: using guessed type int chrbtnactive;
//----- (00406366) --------------------------------------------------------
void __cdecl ReleaseChrBtns() void __cdecl ReleaseChrBtns()
{ {
signed int v0; // esi signed int v0; // esi
@ -2586,7 +2536,6 @@ LABEL_16:
} }
// 4B87A8: using guessed type int chrbtnactive; // 4B87A8: using guessed type int chrbtnactive;
//----- (00406408) --------------------------------------------------------
void __cdecl DrawDurIcon() void __cdecl DrawDurIcon()
{ {
int v0; // edx int v0; // edx
@ -2610,7 +2559,6 @@ void __cdecl DrawDurIcon()
// 4B8968: using guessed type int sbookflag; // 4B8968: using guessed type int sbookflag;
// 69BD04: using guessed type int questlog; // 69BD04: using guessed type int questlog;
//----- (0040648E) --------------------------------------------------------
int __fastcall DrawDurIcon4Item(ItemStruct *pItem, int x, int c) int __fastcall DrawDurIcon4Item(ItemStruct *pItem, int x, int c)
{ {
int v3; // eax int v3; // eax
@ -2677,7 +2625,6 @@ LABEL_18:
return v4 - 40; return v4 - 40;
} }
//----- (00406508) --------------------------------------------------------
void __cdecl RedBack() void __cdecl RedBack()
{ {
int v0; // eax int v0; // eax
@ -2741,7 +2688,6 @@ void __cdecl RedBack()
// 525728: using guessed type int light4flag; // 525728: using guessed type int light4flag;
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (00406592) --------------------------------------------------------
int __fastcall GetSBookTrans(int ii, unsigned char townok) int __fastcall GetSBookTrans(int ii, unsigned char townok)
{ {
int v2; // edi int v2; // edi
@ -2754,7 +2700,7 @@ int __fastcall GetSBookTrans(int ii, unsigned char townok)
v7 = townok; v7 = townok;
v6 = 1; v6 = 1;
v3 = myplr; v3 = myplr;
if ( ((unsigned __int64)(1i64 << ((unsigned char)ii - 1)) >> 32) & plr[v3]._pISpells[1] | (unsigned int)(1i64 << ((unsigned char)ii - 1)) & plr[v3]._pISpells[0] ) if ( ((unsigned __int64)((__int64)1 << ((unsigned char)ii - 1)) >> 32) & plr[v3]._pISpells[1] | (unsigned int)((__int64)1 << ((unsigned char)ii - 1)) & plr[v3]._pISpells[0] )
v6 = 3; v6 = 3;
result = plr[v3]._pAblSpells[1] & (1 << (ii - 1) >> 31) | plr[v3]._pAblSpells[0] & (1 << (ii - 1)); result = plr[v3]._pAblSpells[1] & (1 << (ii - 1) >> 31) | plr[v3]._pAblSpells[0] & (1 << (ii - 1));
if ( result ) if ( result )
@ -2773,7 +2719,6 @@ int __fastcall GetSBookTrans(int ii, unsigned char townok)
return result; return result;
} }
//----- (00406667) --------------------------------------------------------
void __cdecl DrawSpellBook() void __cdecl DrawSpellBook()
{ {
int v0; // edi int v0; // edi
@ -2798,9 +2743,9 @@ void __cdecl DrawSpellBook()
v1 = plr[myplr]._pISpells[1] | plr[myplr]._pMemSpells[1] | plr[myplr]._pAblSpells[1]; v1 = plr[myplr]._pISpells[1] | plr[myplr]._pMemSpells[1] | plr[myplr]._pAblSpells[1];
do do
{ {
v2 = *(&attribute_inc_rects[3].h + v9 + 7 * sbooktab); v2 = SpellPages[0][v9 + 7 * sbooktab - 1]; // *(&attribute_inc_rects[3].h + v9 + 7 * sbooktab); /* check */
if ( v2 != -1 if ( v2 != -1
&& v1 & ((unsigned __int64)(1i64 << ((unsigned char)v2 - 1)) >> 32) | v0 & (unsigned int)(1i64 << ((unsigned char)v2 - 1)) ) && v1 & ((unsigned __int64)((__int64)1 << ((unsigned char)v2 - 1)) >> 32) | v0 & (unsigned int)((__int64)1 << ((unsigned char)v2 - 1)) )
{ {
v7 = GetSBookTrans(v2, 1u); v7 = GetSBookTrans(v2, 1u);
SetSpellTrans(v7); SetSpellTrans(v7);
@ -2853,7 +2798,6 @@ void __cdecl DrawSpellBook()
} }
// 4B8950: using guessed type int sbooktab; // 4B8950: using guessed type int sbooktab;
//----- (004068F4) --------------------------------------------------------
void __fastcall PrintSBookStr(int x, int y, bool cjustflag, char *pszStr, int bright) void __fastcall PrintSBookStr(int x, int y, bool cjustflag, char *pszStr, int bright)
{ {
char *v5; // ebx char *v5; // ebx
@ -2906,7 +2850,6 @@ LABEL_14:
} }
} }
//----- (004069B6) --------------------------------------------------------
void __cdecl CheckSBook() void __cdecl CheckSBook()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -2929,7 +2872,7 @@ void __cdecl CheckSBook()
v3 = myplr; v3 = myplr;
LODWORD(v6) = plr[myplr]._pAblSpells[0]; LODWORD(v6) = plr[myplr]._pAblSpells[0];
HIDWORD(v6) = plr[myplr]._pAblSpells[1]; HIDWORD(v6) = plr[myplr]._pAblSpells[1];
v4 = 1i64 << ((unsigned char)v2 - 1); v4 = (__int64)1 << ((unsigned char)v2 - 1);
if ( HIDWORD(v4) & (HIDWORD(v6) | plr[myplr]._pISpells[1] | plr[myplr]._pMemSpells[1]) | (unsigned int)v4 & ((unsigned int)v6 | plr[myplr]._pISpells[0] | plr[myplr]._pMemSpells[0]) ) if ( HIDWORD(v4) & (HIDWORD(v6) | plr[myplr]._pISpells[1] | plr[myplr]._pMemSpells[1]) | (unsigned int)v4 & ((unsigned int)v6 | plr[myplr]._pISpells[0] | plr[myplr]._pMemSpells[0]) )
{ {
v5 = 3; v5 = 3;
@ -2951,7 +2894,6 @@ void __cdecl CheckSBook()
// 4B8950: using guessed type int sbooktab; // 4B8950: using guessed type int sbooktab;
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (00406AF8) --------------------------------------------------------
char *__fastcall get_pieces_str(int nGold) char *__fastcall get_pieces_str(int nGold)
{ {
char *result; // eax char *result; // eax
@ -2962,7 +2904,6 @@ char *__fastcall get_pieces_str(int nGold)
return result; return result;
} }
//----- (00406B08) --------------------------------------------------------
void __fastcall DrawGoldSplit(int amount) void __fastcall DrawGoldSplit(int amount)
{ {
int v1; // ebp int v1; // ebp
@ -3001,7 +2942,6 @@ void __fastcall DrawGoldSplit(int amount)
frame_4B8800 = (frame_4B8800 & 7) + 1; frame_4B8800 = (frame_4B8800 & 7) + 1;
} }
//----- (00406C40) --------------------------------------------------------
void __fastcall control_drop_gold(int vkey) void __fastcall control_drop_gold(int vkey)
{ {
char v1; // bl char v1; // bl
@ -3062,7 +3002,6 @@ void __fastcall control_drop_gold(int vkey)
// 4B84DC: using guessed type int dropGoldFlag; // 4B84DC: using guessed type int dropGoldFlag;
// 406C40: using guessed type char var_8[8]; // 406C40: using guessed type char var_8[8];
//----- (00406D6E) --------------------------------------------------------
void __fastcall control_remove_gold(int pnum, int gold_index) void __fastcall control_remove_gold(int pnum, int gold_index)
{ {
int v2; // edi int v2; // edi
@ -3105,7 +3044,6 @@ void __fastcall control_remove_gold(int pnum, int gold_index)
plr[v3]._pGold = v8; plr[v3]._pGold = v8;
} }
//----- (00406E24) --------------------------------------------------------
void __fastcall control_set_gold_curs(int pnum) void __fastcall control_set_gold_curs(int pnum)
{ {
int v1; // ecx int v1; // ecx
@ -3136,7 +3074,6 @@ void __fastcall control_set_gold_curs(int pnum)
SetCursor(*v3 + 12); SetCursor(*v3 + 12);
} }
//----- (00406E6A) --------------------------------------------------------
void __cdecl DrawTalkPan() void __cdecl DrawTalkPan()
{ {
int v0; // esi int v0; // esi
@ -3225,7 +3162,6 @@ LABEL_18:
// 4B8840: using guessed type int sgbPlrTalkTbl; // 4B8840: using guessed type int sgbPlrTalkTbl;
// 4B8960: using guessed type int talkflag; // 4B8960: using guessed type int talkflag;
//----- (00407071) --------------------------------------------------------
char *__fastcall control_print_talk_msg(char *msg, int x, int y, int *a4, int just) char *__fastcall control_print_talk_msg(char *msg, int x, int y, int *a4, int just)
{ {
int v5; // edx int v5; // edx
@ -3262,7 +3198,6 @@ char *__fastcall control_print_talk_msg(char *msg, int x, int y, int *a4, int ju
return v6; return v6;
} }
//----- (004070F3) --------------------------------------------------------
int __cdecl control_check_talk_btn() int __cdecl control_check_talk_btn()
{ {
int v0; // ecx int v0; // ecx
@ -3288,7 +3223,6 @@ int __cdecl control_check_talk_btn()
} }
// 4B8960: using guessed type int talkflag; // 4B8960: using guessed type int talkflag;
//----- (0040714D) --------------------------------------------------------
void __cdecl control_release_talk_btn() void __cdecl control_release_talk_btn()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -3321,7 +3255,6 @@ void __cdecl control_release_talk_btn()
} }
// 4B8960: using guessed type int talkflag; // 4B8960: using guessed type int talkflag;
//----- (004071C0) --------------------------------------------------------
void __cdecl control_reset_talk_msg() void __cdecl control_reset_talk_msg()
{ {
int v0; // edi int v0; // edi
@ -3340,7 +3273,6 @@ void __cdecl control_reset_talk_msg()
NetSendCmdString(v0, sgszTalkMsg); NetSendCmdString(v0, sgszTalkMsg);
} }
//----- (004071FA) --------------------------------------------------------
void __cdecl control_type_message() void __cdecl control_type_message()
{ {
if ( gbMaxPlayers != 1 ) if ( gbMaxPlayers != 1 )
@ -3363,7 +3295,6 @@ void __cdecl control_type_message()
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00407241) --------------------------------------------------------
void __cdecl control_reset_talk() void __cdecl control_reset_talk()
{ {
talkflag = 0; talkflag = 0;
@ -3374,7 +3305,6 @@ void __cdecl control_reset_talk()
// 4B8960: using guessed type int talkflag; // 4B8960: using guessed type int talkflag;
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0040725A) --------------------------------------------------------
int __fastcall control_talk_last_key(int a1) int __fastcall control_talk_last_key(int a1)
{ {
char v1; // bl char v1; // bl
@ -3394,7 +3324,6 @@ int __fastcall control_talk_last_key(int a1)
// 4B8960: using guessed type int talkflag; // 4B8960: using guessed type int talkflag;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0040729A) --------------------------------------------------------
int __fastcall control_presskeys(int a1) int __fastcall control_presskeys(int a1)
{ {
signed int v1; // eax signed int v1; // eax
@ -3433,7 +3362,6 @@ LABEL_15:
// 4B8960: using guessed type int talkflag; // 4B8960: using guessed type int talkflag;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00407304) --------------------------------------------------------
void __cdecl control_press_enter() void __cdecl control_press_enter()
{ {
signed int v0; // esi signed int v0; // esi
@ -3481,7 +3409,6 @@ void __cdecl control_press_enter()
// 4B84CC: using guessed type char sgbNextTalkSave; // 4B84CC: using guessed type char sgbNextTalkSave;
// 4B84CD: using guessed type char sgbTalkSavePos; // 4B84CD: using guessed type char sgbTalkSavePos;
//----- (004073C2) --------------------------------------------------------
void __fastcall control_up_down(char a1) void __fastcall control_up_down(char a1)
{ {
unsigned char v1; // al unsigned char v1; // al

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __CONTROL_H__
* United States. Use of a copyright notice is precautionary only and #define __CONTROL_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//control
extern char sgbNextTalkSave; // weak extern char sgbNextTalkSave; // weak
extern char sgbTalkSavePos; // weak extern char sgbTalkSavePos; // weak
extern void *pDurIcons; extern void *pDurIcons;
@ -145,3 +137,5 @@ extern char *PanBtnHotKey[8];
extern char *PanBtnStr[8]; extern char *PanBtnStr[8];
extern RECT32 attribute_inc_rects[4]; extern RECT32 attribute_inc_rects[4];
extern int SpellPages[6][7]; extern int SpellPages[6][7];
#endif /* __CONTROL_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -397,14 +388,12 @@ int InvItemHeight[180] =
84 84
}; };
//----- (0040740A) --------------------------------------------------------
void __cdecl InitCursor() void __cdecl InitCursor()
{ {
pCursCels = LoadFileInMem("Data\\Inv\\Objcurs.CEL", 0); pCursCels = LoadFileInMem("Data\\Inv\\Objcurs.CEL", 0);
ClearCursor(); ClearCursor();
} }
//----- (00407420) --------------------------------------------------------
void __cdecl FreeCursor() void __cdecl FreeCursor()
{ {
void *v0; // ecx void *v0; // ecx
@ -415,7 +404,6 @@ void __cdecl FreeCursor()
ClearCursor(); ClearCursor();
} }
//----- (00407437) --------------------------------------------------------
void __fastcall SetICursor(int i) void __fastcall SetICursor(int i)
{ {
int v1; // ecx int v1; // ecx
@ -429,7 +417,6 @@ void __fastcall SetICursor(int i)
// 4B8CB4: using guessed type int icursH; // 4B8CB4: using guessed type int icursH;
// 4B8CBC: using guessed type int icursW; // 4B8CBC: using guessed type int icursW;
//----- (0040746B) --------------------------------------------------------
void __fastcall SetCursor(int i) void __fastcall SetCursor(int i)
{ {
int v1; // eax int v1; // eax
@ -442,7 +429,6 @@ void __fastcall SetCursor(int i)
} }
// 4B8C9C: using guessed type int cursH; // 4B8C9C: using guessed type int cursH;
//----- (00407493) --------------------------------------------------------
void __cdecl InitLevelCursor() void __cdecl InitLevelCursor()
{ {
SetCursor(CURSOR_HAND); SetCursor(CURSOR_HAND);
@ -460,7 +446,6 @@ void __cdecl InitLevelCursor()
// 4B8CC2: using guessed type char pcursplr; // 4B8CC2: using guessed type char pcursplr;
// 4B8CCC: using guessed type int dword_4B8CCC; // 4B8CCC: using guessed type int dword_4B8CCC;
//----- (004074D0) --------------------------------------------------------
void __cdecl CheckTown() void __cdecl CheckTown()
{ {
int v0; // ecx int v0; // ecx
@ -504,7 +489,6 @@ void __cdecl CheckTown()
} }
} }
//----- (004075FD) --------------------------------------------------------
void __cdecl CheckRportal() void __cdecl CheckRportal()
{ {
int v0; // ecx int v0; // ecx
@ -552,7 +536,6 @@ void __cdecl CheckRportal()
} }
// 5CF31D: using guessed type char setlevel; // 5CF31D: using guessed type char setlevel;
//----- (00407729) --------------------------------------------------------
void __cdecl CheckCursMove() void __cdecl CheckCursMove()
{ {
int v0; // esi int v0; // esi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __CURSOR_H__
* United States. Use of a copyright notice is precautionary only and #define __CURSOR_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//cursor
extern int cursH; // weak extern int cursH; // weak
extern int icursH28; // idb extern int icursH28; // idb
extern int cursW; // idb extern int cursW; // idb
@ -40,3 +32,5 @@ void __cdecl CheckCursMove();
/* data */ /* data */
extern int InvItemWidth[180]; extern int InvItemWidth[180];
extern int InvItemHeight[180]; extern int InvItemHeight[180];
#endif /* __CURSOR_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -15,7 +6,6 @@ int spurtndx; // weak
DeadStruct dead[31]; DeadStruct dead[31];
int stonendx; int stonendx;
//----- (004084A6) --------------------------------------------------------
void __cdecl InitDead() void __cdecl InitDead()
{ {
int v0; // ebx int v0; // ebx
@ -66,15 +56,15 @@ void __cdecl InitDead()
} }
v16 = 0; v16 = 0;
v4 = v0; v4 = v0;
memset(&dead[v0], misfiledata[16].mAnimCel[0], 8u); memset32(&dead[v0], misfiledata[16].mAnimData[0], 8u);
_LOBYTE(dead[v4]._deadtrans) = 0; _LOBYTE(dead[v4]._deadtrans) = 0;
dead[v4]._deadFrame = 8; dead[v4]._deadFrame = 8;
v5 = misfiledata[18].mAnimCel[0]; v5 = misfiledata[18].mAnimData[0];
dead[v4].field_24 = 128; dead[v4].field_24 = 128;
dead[v4].field_28 = 32; dead[v4].field_28 = 32;
v6 = v0 + 1; v6 = v0 + 1;
spurtndx = v0 + 1; spurtndx = v0 + 1;
memset(&dead[v6], v5, 8u); memset32(&dead[v6], v5, 8u);
_LOBYTE(dead[v6]._deadtrans) = 0; _LOBYTE(dead[v6]._deadtrans) = 0;
stonendx = v0 + 2; stonendx = v0 + 2;
v7 = nummonsters; v7 = nummonsters;
@ -93,7 +83,7 @@ void __cdecl InitDead()
v10 = monster[v9].MType; v10 = monster[v9].MType;
v11 = (char *)(v8 - 8); v11 = (char *)(v8 - 8);
v15 = (int *)8; v15 = (int *)8;
v14 = &v10->Anims[4].Frames[1]; v14 = v10->Anims[4].Frames;
do do
{ {
v12 = v14; v12 = v14;
@ -117,13 +107,11 @@ void __cdecl InitDead()
} }
// 4B8CD8: using guessed type int spurtndx; // 4B8CD8: using guessed type int spurtndx;
//----- (0040865C) --------------------------------------------------------
void __fastcall AddDead(int dx, int dy, char dv, int ddir) void __fastcall AddDead(int dx, int dy, char dv, int ddir)
{ {
dDead[dx][dy] = (dv & 0x1F) + 32 * ddir; dDead[dx][dy] = (dv & 0x1F) + 32 * ddir;
} }
//----- (0040867D) --------------------------------------------------------
void __cdecl SetDead() void __cdecl SetDead()
{ {
int v0; // eax int v0; // eax

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DEAD_H__
* United States. Use of a copyright notice is precautionary only and #define __DEAD_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//dead
extern int spurtndx; // weak extern int spurtndx; // weak
extern DeadStruct dead[31]; extern DeadStruct dead[31];
extern int stonendx; extern int stonendx;
@ -17,3 +9,5 @@ extern int stonendx;
void __cdecl InitDead(); void __cdecl InitDead();
void __fastcall AddDead(int dx, int dy, char dv, int ddir); void __fastcall AddDead(int dx, int dy, char dv, int ddir);
void __cdecl SetDead(); void __cdecl SetDead();
#endif /* __DEAD_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -15,7 +6,6 @@ void *pSquareCel;
char dMonsDbg[17][112][112]; char dMonsDbg[17][112][112];
char dFlagDbg[17][112][112]; char dFlagDbg[17][112][112];
//----- (004086F4) --------------------------------------------------------
void __cdecl LoadDebugGFX() void __cdecl LoadDebugGFX()
{ {
if ( visiondebug ) if ( visiondebug )
@ -23,7 +13,6 @@ void __cdecl LoadDebugGFX()
} }
// 525720: using guessed type int visiondebug; // 525720: using guessed type int visiondebug;
//----- (0040870F) --------------------------------------------------------
void __cdecl FreeDebugGFX() void __cdecl FreeDebugGFX()
{ {
void *v0; // ecx void *v0; // ecx
@ -33,7 +22,6 @@ void __cdecl FreeDebugGFX()
mem_free_dbg(v0); mem_free_dbg(v0);
} }
//----- (00408721) --------------------------------------------------------
void __cdecl CheckDungeonClear() void __cdecl CheckDungeonClear()
{ {
int i; int i;
@ -121,7 +109,7 @@ void __cdecl MaxSpellsCheat()
{ {
if ( spelldata[i].sBookLvl != -1 ) if ( spelldata[i].sBookLvl != -1 )
{ {
*(_QWORD *)plr[myplr]._pMemSpells |= 1i64 << (i - 1); *(_QWORD *)plr[myplr]._pMemSpells |= (__int64)1 << (i - 1);
plr[myplr]._pSplLvl[i] = 10; plr[myplr]._pSplLvl[i] = 10;
} }
} }

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DEBUG_H__
* United States. Use of a copyright notice is precautionary only and #define __DEBUG_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//debug
extern void *pSquareCel; extern void *pSquareCel;
extern char dMonsDbg[17][112][112]; extern char dMonsDbg[17][112][112];
extern char dFlagDbg[17][112][112]; extern char dFlagDbg[17][112][112];
@ -28,3 +20,5 @@ void __fastcall PrintDebugMonster(int m);
void __cdecl GetDebugMonster(); void __cdecl GetDebugMonster();
void __cdecl NextDebugMonster(); void __cdecl NextDebugMonster();
#endif #endif
#endif /* __DEBUG_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -76,7 +67,6 @@ char *spszMsgTbl[4] =
}; // weak }; // weak
char *spszMsgKeyTbl[4] = { "F9", "F10", "F11", "F12" }; // weak char *spszMsgKeyTbl[4] = { "F9", "F10", "F11", "F12" }; // weak
//----- (004087B6) --------------------------------------------------------
struct diablo_cpp_init struct diablo_cpp_init
{ {
diablo_cpp_init() diablo_cpp_init()
@ -87,7 +77,6 @@ struct diablo_cpp_init
// 479BF8: using guessed type int diablo_inf; // 479BF8: using guessed type int diablo_inf;
// 525514: using guessed type int diablo_cpp_init_value; // 525514: using guessed type int diablo_cpp_init_value;
//----- (004087C1) --------------------------------------------------------
void __cdecl FreeGameMem() void __cdecl FreeGameMem()
{ {
void *v0; // ecx void *v0; // ecx
@ -119,7 +108,6 @@ void __cdecl FreeGameMem()
FreeTownerGFX(); FreeTownerGFX();
} }
//----- (00408838) --------------------------------------------------------
int __fastcall diablo_init_menu(int a1, int bSinglePlayer) int __fastcall diablo_init_menu(int a1, int bSinglePlayer)
{ {
int v2; // esi int v2; // esi
@ -158,7 +146,6 @@ LABEL_11:
// 5256E8: using guessed type int dword_5256E8; // 5256E8: using guessed type int dword_5256E8;
// 678640: using guessed type char byte_678640; // 678640: using guessed type char byte_678640;
//----- (004088E2) --------------------------------------------------------
void __fastcall run_game_loop(int uMsg) void __fastcall run_game_loop(int uMsg)
{ {
//int v3; // eax //int v3; // eax
@ -244,7 +231,6 @@ void __fastcall run_game_loop(int uMsg)
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00408A8C) --------------------------------------------------------
void __fastcall start_game(int uMsg) void __fastcall start_game(int uMsg)
{ {
cineflag = 0; cineflag = 0;
@ -264,7 +250,6 @@ void __fastcall start_game(int uMsg)
// 525718: using guessed type char cineflag; // 525718: using guessed type char cineflag;
// 525748: using guessed type char sgbMouseDown; // 525748: using guessed type char sgbMouseDown;
//----- (00408ADB) --------------------------------------------------------
void __cdecl free_game() void __cdecl free_game()
{ {
int i; // esi int i; // esi
@ -285,7 +270,6 @@ void __cdecl free_game()
FreeGameMem(); FreeGameMem();
} }
//----- (00408B1E) --------------------------------------------------------
bool __cdecl diablo_get_not_running() bool __cdecl diablo_get_not_running()
{ {
SetLastError(0); SetLastError(0);
@ -293,7 +277,6 @@ bool __cdecl diablo_get_not_running()
return GetLastError() != ERROR_ALREADY_EXISTS; return GetLastError() != ERROR_ALREADY_EXISTS;
} }
//----- (00408B4A) --------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{ {
HINSTANCE v4; // esi HINSTANCE v4; // esi
@ -359,7 +342,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
return 0; return 0;
} }
//----- (00408CB1) --------------------------------------------------------
void __fastcall diablo_parse_flags(char *args) void __fastcall diablo_parse_flags(char *args)
{ {
#ifdef _DEBUG #ifdef _DEBUG
@ -486,7 +468,6 @@ void __fastcall diablo_parse_flags(char *args)
// 52A548: using guessed type char gbBackBuf; // 52A548: using guessed type char gbBackBuf;
// 52A549: using guessed type char gbEmulate; // 52A549: using guessed type char gbEmulate;
//----- (00408D61) --------------------------------------------------------
void __cdecl diablo_init_screen() void __cdecl diablo_init_screen()
{ {
int v0; // ecx int v0; // ecx
@ -512,7 +493,6 @@ void __cdecl diablo_init_screen()
} }
// 69CEFC: using guessed type int scrollrt_cpp_init_value; // 69CEFC: using guessed type int scrollrt_cpp_init_value;
//----- (00408DB1) --------------------------------------------------------
HWND __fastcall diablo_find_window(LPCSTR lpClassName) HWND __fastcall diablo_find_window(LPCSTR lpClassName)
{ {
HWND result; // eax HWND result; // eax
@ -537,7 +517,6 @@ HWND __fastcall diablo_find_window(LPCSTR lpClassName)
return result; return result;
} }
//----- (00408DF4) --------------------------------------------------------
void __fastcall diablo_reload_process(HMODULE hModule) void __fastcall diablo_reload_process(HMODULE hModule)
{ {
char *i; // eax char *i; // eax
@ -623,7 +602,6 @@ LABEL_23:
} }
} }
//----- (00408FCF) --------------------------------------------------------
int __cdecl PressEscKey() int __cdecl PressEscKey()
{ {
int result; // eax int result; // eax
@ -683,7 +661,6 @@ LABEL_10:
// 646D00: using guessed type char qtextflag; // 646D00: using guessed type char qtextflag;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
//----- (0040905E) --------------------------------------------------------
LRESULT __stdcall DisableInputWndProc(HWND hWnd, int uMsg, int wParam, int lParam) LRESULT __stdcall DisableInputWndProc(HWND hWnd, int uMsg, int wParam, int lParam)
{ {
bool v5; // zf bool v5; // zf
@ -746,7 +723,6 @@ LABEL_23:
} }
// 525748: using guessed type char sgbMouseDown; // 525748: using guessed type char sgbMouseDown;
//----- (00409131) --------------------------------------------------------
int __stdcall GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) int __stdcall GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
if ( uMsg > WM_LBUTTONDOWN ) if ( uMsg > WM_LBUTTONDOWN )
@ -863,7 +839,6 @@ int __stdcall GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
// 525748: using guessed type char sgbMouseDown; // 525748: using guessed type char sgbMouseDown;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (004093B2) --------------------------------------------------------
bool __fastcall LeftMouseDown(int a1) bool __fastcall LeftMouseDown(int a1)
{ {
int v1; // edi int v1; // edi
@ -1068,7 +1043,6 @@ LABEL_98:
// 69BD04: using guessed type int questlog; // 69BD04: using guessed type int questlog;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
//----- (004097EC) --------------------------------------------------------
bool __cdecl TryIconCurs() bool __cdecl TryIconCurs()
{ {
unsigned char v0; // dl unsigned char v0; // dl
@ -1146,7 +1120,6 @@ LABEL_26:
// 4B8CC1: using guessed type char pcursobj; // 4B8CC1: using guessed type char pcursobj;
// 4B8CC2: using guessed type char pcursplr; // 4B8CC2: using guessed type char pcursplr;
//----- (00409963) --------------------------------------------------------
void __cdecl LeftMouseUp() void __cdecl LeftMouseUp()
{ {
gmenu_left_mouse(0); gmenu_left_mouse(0);
@ -1165,7 +1138,6 @@ void __cdecl LeftMouseUp()
// 4B8C90: using guessed type int panbtndown; // 4B8C90: using guessed type int panbtndown;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
//----- (004099A8) --------------------------------------------------------
void __cdecl RightMouseDown() void __cdecl RightMouseDown()
{ {
if ( !gmenu_exception() && sgnTimeoutCurs == CURSOR_NONE && PauseMode != 2 && !plr[myplr]._pInvincible ) if ( !gmenu_exception() && sgnTimeoutCurs == CURSOR_NONE && PauseMode != 2 && !plr[myplr]._pInvincible )
@ -1205,7 +1177,6 @@ void __cdecl RightMouseDown()
// 52575C: using guessed type int doomflag; // 52575C: using guessed type int doomflag;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
//----- (00409A8E) --------------------------------------------------------
bool __fastcall PressSysKey(int wParam) bool __fastcall PressSysKey(int wParam)
{ {
if ( gmenu_exception() || wParam != VK_F10 ) if ( gmenu_exception() || wParam != VK_F10 )
@ -1214,7 +1185,6 @@ bool __fastcall PressSysKey(int wParam)
return 1; return 1;
} }
//----- (00409AB0) --------------------------------------------------------
void __fastcall diablo_hotkey_msg(int dwMsg) void __fastcall diablo_hotkey_msg(int dwMsg)
{ {
int v1; // esi int v1; // esi
@ -1239,14 +1209,12 @@ void __fastcall diablo_hotkey_msg(int dwMsg)
// 48437C: using guessed type char *spszMsgKeyTbl[4]; // 48437C: using guessed type char *spszMsgKeyTbl[4];
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00409B51) --------------------------------------------------------
void __fastcall ReleaseKey(int vkey) void __fastcall ReleaseKey(int vkey)
{ {
if ( vkey == VK_SNAPSHOT ) if ( vkey == VK_SNAPSHOT )
CaptureScreen(); CaptureScreen();
} }
//----- (00409B5C) --------------------------------------------------------
void __fastcall PressKey(int vkey) void __fastcall PressKey(int vkey)
{ {
int v1; // esi int v1; // esi
@ -1491,7 +1459,6 @@ LABEL_101:
// 69BD04: using guessed type int questlog; // 69BD04: using guessed type int questlog;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
//----- (00409F43) --------------------------------------------------------
void __cdecl diablo_pause_game() void __cdecl diablo_pause_game()
{ {
if ( (unsigned char)gbMaxPlayers <= 1u ) if ( (unsigned char)gbMaxPlayers <= 1u )
@ -1513,7 +1480,6 @@ void __cdecl diablo_pause_game()
// 525740: using guessed type int PauseMode; // 525740: using guessed type int PauseMode;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00409F7F) --------------------------------------------------------
void __fastcall PressChar(int vkey) void __fastcall PressChar(int vkey)
{ {
int v1; // ebx int v1; // ebx
@ -1825,7 +1791,6 @@ LABEL_27:
// 69BD04: using guessed type int questlog; // 69BD04: using guessed type int questlog;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
//----- (0040A391) --------------------------------------------------------
void __cdecl LoadLvlGFX() void __cdecl LoadLvlGFX()
{ {
unsigned char *v0; // eax unsigned char *v0; // eax
@ -1886,7 +1851,6 @@ LABEL_14:
} }
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (0040A4B4) --------------------------------------------------------
void __cdecl LoadAllGFX() void __cdecl LoadAllGFX()
{ {
pSpeedCels = DiabloAllocPtr(0x100000); pSpeedCels = DiabloAllocPtr(0x100000);
@ -1898,7 +1862,6 @@ void __cdecl LoadAllGFX()
IncProgress(); IncProgress();
} }
//----- (0040A4E1) --------------------------------------------------------
void __fastcall CreateLevel(int lvldir) void __fastcall CreateLevel(int lvldir)
{ {
int hnd; // cl int hnd; // cl
@ -1943,7 +1906,6 @@ void __fastcall CreateLevel(int lvldir)
} }
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (0040A5A4) --------------------------------------------------------
void __fastcall LoadGameLevel(bool firstflag, int lvldir) void __fastcall LoadGameLevel(bool firstflag, int lvldir)
{ {
int v2; // ebp int v2; // ebp
@ -2181,7 +2143,6 @@ LABEL_72:
// 5CF31D: using guessed type char setlevel; // 5CF31D: using guessed type char setlevel;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0040AAE3) --------------------------------------------------------
void __fastcall game_loop(bool startup) void __fastcall game_loop(bool startup)
{ {
int v1; // ecx int v1; // ecx
@ -2217,7 +2178,6 @@ void __fastcall game_loop(bool startup)
// 525650: using guessed type int gbRunGame; // 525650: using guessed type int gbRunGame;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0040AB33) --------------------------------------------------------
void __cdecl game_logic() void __cdecl game_logic()
{ {
if ( PauseMode != 2 ) if ( PauseMode != 2 )
@ -2275,7 +2235,6 @@ void __cdecl game_logic()
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0040ABE7) --------------------------------------------------------
void __fastcall timeout_cursor(bool timeout) void __fastcall timeout_cursor(bool timeout)
{ {
if ( timeout ) if ( timeout )
@ -2303,7 +2262,6 @@ void __fastcall timeout_cursor(bool timeout)
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
// 525748: using guessed type char sgbMouseDown; // 525748: using guessed type char sgbMouseDown;
//----- (0040AC6B) --------------------------------------------------------
void __cdecl diablo_color_cyc_logic() void __cdecl diablo_color_cyc_logic()
{ {
DWORD v0; // eax DWORD v0; // eax

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DIABLO_H__
* United States. Use of a copyright notice is precautionary only and #define __DIABLO_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//diablo
extern int diablo_cpp_init_value; // weak extern int diablo_cpp_init_value; // weak
extern HWND ghMainWnd; extern HWND ghMainWnd;
extern int glMid1Seed[17]; extern int glMid1Seed[17];
@ -105,3 +97,5 @@ extern int framestart;
extern int FriendlyMode; // weak extern int FriendlyMode; // weak
extern char *spszMsgTbl[4]; // weak extern char *spszMsgTbl[4]; // weak
extern char *spszMsgKeyTbl[4]; // weak extern char *spszMsgKeyTbl[4]; // weak
#endif /* __DIABLO_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -17,7 +8,6 @@ void *pDoomCel;
int doomflag; // weak int doomflag; // weak
int DoomQuestState; // idb int DoomQuestState; // idb
//----- (0040ACAD) --------------------------------------------------------
int __cdecl doom_get_frame_from_time() int __cdecl doom_get_frame_from_time()
{ {
int result; // eax int result; // eax
@ -29,13 +19,11 @@ int __cdecl doom_get_frame_from_time()
return result; return result;
} }
//----- (0040ACC6) --------------------------------------------------------
void __cdecl doom_alloc_cel() void __cdecl doom_alloc_cel()
{ {
pDoomCel = DiabloAllocPtr(229376); pDoomCel = DiabloAllocPtr(229376);
} }
//----- (0040ACD6) --------------------------------------------------------
void __cdecl doom_cleanup() void __cdecl doom_cleanup()
{ {
void *v0; // ecx void *v0; // ecx
@ -45,7 +33,6 @@ void __cdecl doom_cleanup()
mem_free_dbg(v0); mem_free_dbg(v0);
} }
//----- (0040ACE8) --------------------------------------------------------
void __cdecl doom_load_graphics() void __cdecl doom_load_graphics()
{ {
if ( doom_quest_time == 31 ) if ( doom_quest_time == 31 )
@ -64,7 +51,6 @@ void __cdecl doom_load_graphics()
} }
// 525750: using guessed type int doom_quest_time; // 525750: using guessed type int doom_quest_time;
//----- (0040AD34) --------------------------------------------------------
void __cdecl doom_init() void __cdecl doom_init()
{ {
int v0; // eax int v0; // eax
@ -79,7 +65,6 @@ void __cdecl doom_init()
// 525750: using guessed type int doom_quest_time; // 525750: using guessed type int doom_quest_time;
// 52575C: using guessed type int doomflag; // 52575C: using guessed type int doomflag;
//----- (0040AD5E) --------------------------------------------------------
void __cdecl doom_close() void __cdecl doom_close()
{ {
if ( doomflag ) if ( doomflag )
@ -90,7 +75,6 @@ void __cdecl doom_close()
} }
// 52575C: using guessed type int doomflag; // 52575C: using guessed type int doomflag;
//----- (0040AD74) --------------------------------------------------------
void __cdecl doom_draw() void __cdecl doom_draw()
{ {
if ( doomflag ) if ( doomflag )

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DOOM_H__
* United States. Use of a copyright notice is precautionary only and #define __DOOM_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//doom
extern int doom_quest_time; // weak extern int doom_quest_time; // weak
extern int doom_stars_drawn; // weak extern int doom_stars_drawn; // weak
extern void *pDoomCel; extern void *pDoomCel;
@ -23,3 +15,5 @@ void __cdecl doom_load_graphics();
void __cdecl doom_init(); void __cdecl doom_init();
void __cdecl doom_close(); void __cdecl doom_close();
void __cdecl doom_draw(); void __cdecl doom_draw();
#endif /* __DOOM_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -119,7 +110,6 @@ unsigned char PWATERIN[] = { 6, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1
/* rdata */ /* rdata */
unsigned char L5ConvTbl[16] = { 22u, 13u, 1u, 13u, 2u, 13u, 13u, 13u, 4u, 13u, 1u, 13u, 2u, 13u, 16u, 13u }; unsigned char L5ConvTbl[16] = { 22u, 13u, 1u, 13u, 2u, 13u, 13u, 13u, 4u, 13u, 1u, 13u, 2u, 13u, 16u, 13u };
//----- (0040ADD6) --------------------------------------------------------
void __cdecl DRLG_Init_Globals() void __cdecl DRLG_Init_Globals()
{ {
char v0; // al char v0; // al
@ -141,7 +131,6 @@ void __cdecl DRLG_Init_Globals()
// 525728: using guessed type int light4flag; // 525728: using guessed type int light4flag;
// 646A28: using guessed type int lightflag; // 646A28: using guessed type int lightflag;
//----- (0040AE79) --------------------------------------------------------
void __fastcall LoadL1Dungeon(char *sFileName, int vx, int vy) void __fastcall LoadL1Dungeon(char *sFileName, int vx, int vy)
{ {
char *v3; // esi char *v3; // esi
@ -231,7 +220,6 @@ void __fastcall LoadL1Dungeon(char *sFileName, int vx, int vy)
// 5D2458: using guessed type int dminx; // 5D2458: using guessed type int dminx;
// 5D245C: using guessed type int dminy; // 5D245C: using guessed type int dminy;
//----- (0040AF65) --------------------------------------------------------
void __cdecl DRLG_L1Floor() void __cdecl DRLG_L1Floor()
{ {
signed int i; // edi signed int i; // edi
@ -263,7 +251,6 @@ void __cdecl DRLG_L1Floor()
while ( i < 40 ); while ( i < 40 );
} }
//----- (0040AFB3) --------------------------------------------------------
void __cdecl DRLG_L1Pass3() void __cdecl DRLG_L1Pass3()
{ {
int v0; // eax int v0; // eax
@ -347,7 +334,6 @@ void __cdecl DRLG_L1Pass3()
while ( v4 < 40 ); while ( v4 < 40 );
} }
//----- (0040B0A5) --------------------------------------------------------
void __cdecl DRLG_InitL1Vals() void __cdecl DRLG_InitL1Vals()
{ {
int v0; // esi int v0; // esi
@ -427,7 +413,6 @@ LABEL_23:
while ( (signed int)v7 < (signed int)dPiece[1] ); while ( (signed int)v7 < (signed int)dPiece[1] );
} }
//----- (0040B160) --------------------------------------------------------
void __fastcall LoadPreL1Dungeon(char *sFileName, int vx, int vy) void __fastcall LoadPreL1Dungeon(char *sFileName, int vx, int vy)
{ {
unsigned char *v3; // ebx unsigned char *v3; // ebx
@ -523,7 +508,6 @@ void __fastcall LoadPreL1Dungeon(char *sFileName, int vx, int vy)
// 5D2458: using guessed type int dminx; // 5D2458: using guessed type int dminx;
// 5D245C: using guessed type int dminy; // 5D245C: using guessed type int dminy;
//----- (0040B229) --------------------------------------------------------
void __fastcall CreateL5Dungeon(int rseed, int entry) void __fastcall CreateL5Dungeon(int rseed, int entry)
{ {
int v2; // esi int v2; // esi
@ -548,7 +532,6 @@ void __fastcall CreateL5Dungeon(int rseed, int entry)
// 5D2458: using guessed type int dminx; // 5D2458: using guessed type int dminx;
// 5D245C: using guessed type int dminy; // 5D245C: using guessed type int dminy;
//----- (0040B276) --------------------------------------------------------
void __cdecl DRLG_LoadL1SP() void __cdecl DRLG_LoadL1SP()
{ {
setloadflag = 0; setloadflag = 0;
@ -571,7 +554,6 @@ void __cdecl DRLG_LoadL1SP()
// 5276A4: using guessed type int setloadflag; // 5276A4: using guessed type int setloadflag;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0040B2F4) --------------------------------------------------------
void __cdecl DRLG_FreeL1SP() void __cdecl DRLG_FreeL1SP()
{ {
void *v0; // ecx void *v0; // ecx
@ -581,7 +563,6 @@ void __cdecl DRLG_FreeL1SP()
mem_free_dbg(v0); mem_free_dbg(v0);
} }
//----- (0040B306) --------------------------------------------------------
void __fastcall DRLG_L5(int entry) void __fastcall DRLG_L5(int entry)
{ {
signed int v1; // esi signed int v1; // esi
@ -744,7 +725,6 @@ LABEL_34:
DRLG_CheckQuests(setpc_x, setpc_y); DRLG_CheckQuests(setpc_x, setpc_y);
} }
//----- (0040B56F) --------------------------------------------------------
void __fastcall DRLG_PlaceDoor(int x, int y) void __fastcall DRLG_PlaceDoor(int x, int y)
{ {
int v2; // edi int v2; // edi
@ -840,7 +820,6 @@ LABEL_57:
*v8 = -128; *v8 = -128;
} }
//----- (0040B699) --------------------------------------------------------
void __cdecl DRLG_L1Shadows() void __cdecl DRLG_L1Shadows()
{ {
signed int v0; // ebx signed int v0; // ebx
@ -982,7 +961,6 @@ void __cdecl DRLG_L1Shadows()
while ( v10 < 40 ); while ( v10 < 40 );
} }
//----- (0040B881) --------------------------------------------------------
int __fastcall DRLG_PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, bool setview, int noquad, int ldir) int __fastcall DRLG_PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, bool setview, int noquad, int ldir)
{ {
unsigned char *v8; // ebx unsigned char *v8; // ebx
@ -1210,7 +1188,6 @@ LABEL_57:
// 5CF320: using guessed type int LvlViewY; // 5CF320: using guessed type int LvlViewY;
// 5CF324: using guessed type int LvlViewX; // 5CF324: using guessed type int LvlViewX;
//----- (0040BAF6) --------------------------------------------------------
void __cdecl InitL5Dungeon() void __cdecl InitL5Dungeon()
{ {
signed int v0; // edx signed int v0; // edx
@ -1235,7 +1212,6 @@ void __cdecl InitL5Dungeon()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040BB18) --------------------------------------------------------
void __cdecl L5ClearFlags() void __cdecl L5ClearFlags()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -1259,7 +1235,6 @@ void __cdecl L5ClearFlags()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040BB33) --------------------------------------------------------
void __cdecl L5firstRoom() void __cdecl L5firstRoom()
{ {
signed int v0; // ebx signed int v0; // ebx
@ -1357,7 +1332,6 @@ void __cdecl L5firstRoom()
} }
} }
//----- (0040BD66) --------------------------------------------------------
void __fastcall L5drawRoom(int x, int y, int w, int h) void __fastcall L5drawRoom(int x, int y, int w, int h)
{ {
int i; // esi int i; // esi
@ -1381,7 +1355,6 @@ void __fastcall L5drawRoom(int x, int y, int w, int h)
} }
} }
//----- (0040BD9D) --------------------------------------------------------
void __fastcall L5roomGen(int x, int y, int w, int h, bool dir) void __fastcall L5roomGen(int x, int y, int w, int h, bool dir)
{ {
int v5; // eax int v5; // eax
@ -1499,7 +1472,6 @@ void __fastcall L5roomGen(int x, int y, int w, int h, bool dir)
} }
} }
//----- (0040BFA4) --------------------------------------------------------
bool __fastcall L5checkRoom(int x, int y, int width, int height) bool __fastcall L5checkRoom(int x, int y, int width, int height)
{ {
int v4; // eax int v4; // eax
@ -1532,7 +1504,6 @@ LABEL_10:
return 0; return 0;
} }
//----- (0040C008) --------------------------------------------------------
int __cdecl L5GetArea() int __cdecl L5GetArea()
{ {
int rv; // eax int rv; // eax
@ -1560,7 +1531,6 @@ int __cdecl L5GetArea()
return rv; return rv;
} }
//----- (0040C02A) --------------------------------------------------------
void __cdecl L5makeDungeon() void __cdecl L5makeDungeon()
{ {
signed int v0; // edi signed int v0; // edi
@ -1592,7 +1562,6 @@ void __cdecl L5makeDungeon()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040C06E) --------------------------------------------------------
void __cdecl L5makeDmt() void __cdecl L5makeDmt()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -1645,7 +1614,6 @@ void __cdecl L5makeDmt()
while ( v3 <= 77 ); while ( v3 <= 77 );
} }
//----- (0040C0E0) --------------------------------------------------------
void __cdecl L5AddWall() void __cdecl L5AddWall()
{ {
int v0; // edi int v0; // edi
@ -1716,7 +1684,6 @@ void __cdecl L5AddWall()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040C23C) --------------------------------------------------------
int __fastcall L5HWallOk(int i, int j) int __fastcall L5HWallOk(int i, int j)
{ {
int v2; // esi int v2; // esi
@ -1768,7 +1735,6 @@ int __fastcall L5HWallOk(int i, int j)
return result; return result;
} }
//----- (0040C2DC) --------------------------------------------------------
int __fastcall L5VWallOk(int i, int j) int __fastcall L5VWallOk(int i, int j)
{ {
int v2; // ecx int v2; // ecx
@ -1809,7 +1775,6 @@ int __fastcall L5VWallOk(int i, int j)
return result; return result;
} }
//----- (0040C35B) --------------------------------------------------------
void __fastcall L5HorizWall(int i, int j, char p, int dx) void __fastcall L5HorizWall(int i, int j, char p, int dx)
{ {
int v4; // edi int v4; // edi
@ -1888,7 +1853,6 @@ void __fastcall L5HorizWall(int i, int j, char p, int dx)
} }
} }
//----- (0040C449) --------------------------------------------------------
void __fastcall L5VertWall(int i, int j, char p, int dy) void __fastcall L5VertWall(int i, int j, char p, int dy)
{ {
int v4; // edi int v4; // edi
@ -1959,7 +1923,7 @@ void __fastcall L5VertWall(int i, int j, char p, int dy)
_LOWORD(v13) = v9; _LOWORD(v13) = v9;
_LOBYTE(v9) = v19; _LOBYTE(v9) = v19;
v14 = (unsigned int)(dy - 1) >> 2; v14 = (unsigned int)(dy - 1) >> 2;
memset(v12, v13, v14); memset32(v12, v13, v14);
memset(&v12[4 * v14], v13, ((_BYTE)dy - 1) & 3); memset(&v12[4 * v14], v13, ((_BYTE)dy - 1) & 3);
v11 = dy; v11 = dy;
v4 = v18; v4 = v18;
@ -1979,7 +1943,6 @@ void __fastcall L5VertWall(int i, int j, char p, int dy)
} }
} }
//----- (0040C551) --------------------------------------------------------
void __cdecl L5tileFix() void __cdecl L5tileFix()
{ {
signed int v0; // esi signed int v0; // esi
@ -2261,7 +2224,6 @@ void __cdecl L5tileFix()
while ( v35 < 40 ); while ( v35 < 40 );
} }
//----- (0040C8C0) --------------------------------------------------------
void __cdecl DRLG_L5Subs() void __cdecl DRLG_L5Subs()
{ {
signed int v0; // edi signed int v0; // edi
@ -2330,7 +2292,6 @@ LABEL_23:
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040C99D) --------------------------------------------------------
void __cdecl L5FillChambers() void __cdecl L5FillChambers()
{ {
int v0; // edi int v0; // edi
@ -2521,7 +2482,6 @@ LABEL_107:
} }
// 5276A4: using guessed type int setloadflag; // 5276A4: using guessed type int setloadflag;
//----- (0040CD86) --------------------------------------------------------
void __fastcall DRLG_L5GChamber(int sx, int sy, bool topflag, bool bottomflag, bool leftflag, bool rightflag) void __fastcall DRLG_L5GChamber(int sx, int sy, bool topflag, bool bottomflag, bool leftflag, bool rightflag)
{ {
int v6; // eax int v6; // eax
@ -2611,7 +2571,6 @@ void __fastcall DRLG_L5GChamber(int sx, int sy, bool topflag, bool bottomflag, b
dungeon[7][v15 + 7] = 15; dungeon[7][v15 + 7] = 15;
} }
//----- (0040CEC7) --------------------------------------------------------
void __fastcall DRLG_L5GHall(int x1, int y1, int x2, int y2) void __fastcall DRLG_L5GHall(int x1, int y1, int x2, int y2)
{ {
int v4; // eax int v4; // eax
@ -2651,7 +2610,6 @@ void __fastcall DRLG_L5GHall(int x1, int y1, int x2, int y2)
} }
} }
//----- (0040CF17) --------------------------------------------------------
void __fastcall DRLG_L5SetRoom(int rx1, int ry1) void __fastcall DRLG_L5SetRoom(int rx1, int ry1)
{ {
int v2; // edi int v2; // edi
@ -2704,7 +2662,6 @@ void __fastcall DRLG_L5SetRoom(int rx1, int ry1)
// 5CF330: using guessed type int setpc_h; // 5CF330: using guessed type int setpc_h;
// 5CF334: using guessed type int setpc_w; // 5CF334: using guessed type int setpc_w;
//----- (0040CF9C) --------------------------------------------------------
void __cdecl DRLG_L5FloodTVal() void __cdecl DRLG_L5FloodTVal()
{ {
int v0; // ebx int v0; // ebx
@ -2742,7 +2699,6 @@ void __cdecl DRLG_L5FloodTVal()
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (0040D00B) --------------------------------------------------------
void __fastcall DRLG_L5FTVR(int i, int j, int x, int y, int d) void __fastcall DRLG_L5FTVR(int i, int j, int x, int y, int d)
{ {
int v5; // ebx int v5; // ebx
@ -2848,7 +2804,6 @@ void __fastcall DRLG_L5FTVR(int i, int j, int x, int y, int d)
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (0040D1FB) --------------------------------------------------------
void __cdecl DRLG_L5TransFix() void __cdecl DRLG_L5TransFix()
{ {
signed int v0; // esi signed int v0; // esi
@ -2915,7 +2870,6 @@ void __cdecl DRLG_L5TransFix()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040D283) --------------------------------------------------------
void __cdecl DRLG_L5DirtFix() void __cdecl DRLG_L5DirtFix()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -2950,7 +2904,6 @@ void __cdecl DRLG_L5DirtFix()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040D2EF) --------------------------------------------------------
void __cdecl DRLG_L5CornerFix() void __cdecl DRLG_L5CornerFix()
{ {
signed int v0; // esi signed int v0; // esi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DRLG_L1_H__
* United States. Use of a copyright notice is precautionary only and #define __DRLG_L1_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//drlg_l1
extern char L5dungeon[80][80]; extern char L5dungeon[80][80];
extern char mydflags[40][40]; extern char mydflags[40][40];
extern int setloadflag; // weak extern int setloadflag; // weak
@ -72,3 +64,5 @@ extern unsigned char PWATERIN[];
/* rdata */ /* rdata */
extern unsigned char L5ConvTbl[16]; extern unsigned char L5ConvTbl[16];
#endif /* __DRLG_L1_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -244,7 +235,6 @@ int Patterns[100][10] =
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
}; };
//----- (0040D357) --------------------------------------------------------
void __cdecl InitDungeon() void __cdecl InitDungeon()
{ {
signed int v0; // edx signed int v0; // edx
@ -269,7 +259,6 @@ void __cdecl InitDungeon()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040D379) --------------------------------------------------------
void __cdecl L2LockoutFix() void __cdecl L2LockoutFix()
{ {
int i; // ecx int i; // ecx
@ -342,7 +331,6 @@ void __cdecl L2LockoutFix()
} }
} }
//----- (0040D4CC) --------------------------------------------------------
void __cdecl L2DoorFix() void __cdecl L2DoorFix()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -369,7 +357,6 @@ void __cdecl L2DoorFix()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040D501) --------------------------------------------------------
void __fastcall LoadL2Dungeon(char *sFileName, int vx, int vy) void __fastcall LoadL2Dungeon(char *sFileName, int vx, int vy)
{ {
char *v3; // esi char *v3; // esi
@ -550,7 +537,6 @@ void __fastcall LoadL2Dungeon(char *sFileName, int vx, int vy)
mem_free_dbg(ptr); mem_free_dbg(ptr);
} }
//----- (0040D6C1) --------------------------------------------------------
void __cdecl DRLG_L2Pass3() void __cdecl DRLG_L2Pass3()
{ {
int v0; // eax int v0; // eax
@ -634,7 +620,6 @@ void __cdecl DRLG_L2Pass3()
while ( v4 < 40 ); while ( v4 < 40 );
} }
//----- (0040D7B3) --------------------------------------------------------
void __fastcall LoadPreL2Dungeon(char *sFileName, int vx, int vy) void __fastcall LoadPreL2Dungeon(char *sFileName, int vx, int vy)
{ {
char *v3; // esi char *v3; // esi
@ -746,7 +731,6 @@ void __fastcall LoadPreL2Dungeon(char *sFileName, int vx, int vy)
mem_free_dbg(ptr); mem_free_dbg(ptr);
} }
//----- (0040D888) --------------------------------------------------------
void __fastcall CreateL2Dungeon(int rseed, int entry) void __fastcall CreateL2Dungeon(int rseed, int entry)
{ {
int v2; // esi int v2; // esi
@ -802,7 +786,6 @@ LABEL_10:
// 5D245C: using guessed type int dminy; // 5D245C: using guessed type int dminy;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0040D94F) --------------------------------------------------------
void __cdecl DRLG_LoadL2SP() void __cdecl DRLG_LoadL2SP()
{ {
char *v1; // ecx char *v1; // ecx
@ -830,7 +813,6 @@ void __cdecl DRLG_LoadL2SP()
} }
// 5B50D8: using guessed type int setloadflag_2; // 5B50D8: using guessed type int setloadflag_2;
//----- (0040D9A4) --------------------------------------------------------
void __cdecl DRLG_FreeL2SP() void __cdecl DRLG_FreeL2SP()
{ {
char *v0; // ecx char *v0; // ecx
@ -840,7 +822,6 @@ void __cdecl DRLG_FreeL2SP()
mem_free_dbg(v0); mem_free_dbg(v0);
} }
//----- (0040D9B6) --------------------------------------------------------
void __fastcall DRLG_L2(int entry) void __fastcall DRLG_L2(int entry)
{ {
int v1; // esi int v1; // esi
@ -1052,7 +1033,6 @@ LABEL_21:
} }
// 5B50D8: using guessed type int setloadflag_2; // 5B50D8: using guessed type int setloadflag_2;
//----- (0040E074) --------------------------------------------------------
bool __fastcall DRLG_L2PlaceMiniSet(char *miniset, int tmin, int tmax, int cx, int cy, bool setview, int ldir) bool __fastcall DRLG_L2PlaceMiniSet(char *miniset, int tmin, int tmax, int cx, int cy, bool setview, int ldir)
{ {
int v7; // ebx int v7; // ebx
@ -1242,7 +1222,6 @@ bool __fastcall DRLG_L2PlaceMiniSet(char *miniset, int tmin, int tmax, int cx, i
// 5CF320: using guessed type int LvlViewY; // 5CF320: using guessed type int LvlViewY;
// 5CF324: using guessed type int LvlViewX; // 5CF324: using guessed type int LvlViewX;
//----- (0040E2D1) --------------------------------------------------------
void __fastcall DRLG_L2PlaceRndSet(char *miniset, int rndper) void __fastcall DRLG_L2PlaceRndSet(char *miniset, int rndper)
{ {
char *v2; // ebx char *v2; // ebx
@ -1411,7 +1390,6 @@ LABEL_34:
// 5276CC: using guessed type int nSx2; // 5276CC: using guessed type int nSx2;
// 5276D4: using guessed type int nSy2; // 5276D4: using guessed type int nSy2;
//----- (0040E49C) --------------------------------------------------------
void __cdecl DRLG_L2Subs() void __cdecl DRLG_L2Subs()
{ {
signed int v0; // edi signed int v0; // edi
@ -1478,7 +1456,6 @@ void __cdecl DRLG_L2Subs()
// 5276CC: using guessed type int nSx2; // 5276CC: using guessed type int nSx2;
// 5276D4: using guessed type int nSy2; // 5276D4: using guessed type int nSy2;
//----- (0040E59C) --------------------------------------------------------
void __cdecl DRLG_L2Shadows() void __cdecl DRLG_L2Shadows()
{ {
char *v0; // eax char *v0; // eax
@ -1547,7 +1524,6 @@ void __cdecl DRLG_L2Shadows()
} }
// 48489A: using guessed type short word_48489A; // 48489A: using guessed type short word_48489A;
//----- (0040E66B) --------------------------------------------------------
void __fastcall DRLG_L2SetRoom(int rx1, int ry1) void __fastcall DRLG_L2SetRoom(int rx1, int ry1)
{ {
int v2; // edi int v2; // edi
@ -1600,7 +1576,6 @@ void __fastcall DRLG_L2SetRoom(int rx1, int ry1)
// 5CF330: using guessed type int setpc_h; // 5CF330: using guessed type int setpc_h;
// 5CF334: using guessed type int setpc_w; // 5CF334: using guessed type int setpc_w;
//----- (0040E6F0) --------------------------------------------------------
void __cdecl L2TileFix() void __cdecl L2TileFix()
{ {
signed int v0; // edx signed int v0; // edx
@ -1638,7 +1613,6 @@ void __cdecl L2TileFix()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040E74F) --------------------------------------------------------
bool __cdecl CreateDungeon() bool __cdecl CreateDungeon()
{ {
int v0; // esi int v0; // esi
@ -1756,7 +1730,6 @@ LABEL_12:
return v8; return v8;
} }
//----- (0040E8A4) --------------------------------------------------------
void __fastcall CreateRoom(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW) void __fastcall CreateRoom(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW)
{ {
int v9; // esi int v9; // esi
@ -1989,7 +1962,6 @@ LABEL_7:
// 5276CC: using guessed type int nSx2; // 5276CC: using guessed type int nSx2;
// 5276D4: using guessed type int nSy2; // 5276D4: using guessed type int nSy2;
//----- (0040ECF9) --------------------------------------------------------
void __fastcall DefineRoom(int nX1, int nY1, int nX2, int nY2, int ForceHW) void __fastcall DefineRoom(int nX1, int nY1, int nX2, int nY2, int ForceHW)
{ {
int v5; // esi int v5; // esi
@ -2072,7 +2044,6 @@ void __fastcall DefineRoom(int nX1, int nY1, int nX2, int nY2, int ForceHW)
} }
} }
//----- (0040EE1D) --------------------------------------------------------
void __fastcall AddHall(int nX1, int nY1, int nX2, int nY2, int nHd) void __fastcall AddHall(int nX1, int nY1, int nX2, int nY2, int nHd)
{ {
int v5; // edi int v5; // edi
@ -2107,7 +2078,6 @@ void __fastcall AddHall(int nX1, int nY1, int nX2, int nY2, int nHd)
} }
} }
//----- (0040EEAC) --------------------------------------------------------
void __fastcall GetHall(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd) void __fastcall GetHall(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd)
{ {
HALLNODE *v5; // esi HALLNODE *v5; // esi
@ -2125,7 +2095,6 @@ void __fastcall GetHall(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd)
pHallList = v5; pHallList = v5;
} }
//----- (0040EF09) --------------------------------------------------------
void __fastcall ConnectHall(int nX1, int nY1, int nX2, int nY2, int nHd) void __fastcall ConnectHall(int nX1, int nY1, int nX2, int nY2, int nHd)
{ {
int v5; // edi int v5; // edi
@ -2364,7 +2333,6 @@ LABEL_109:
while ( !v34 ); while ( !v34 );
} }
//----- (0040F265) --------------------------------------------------------
void __fastcall CreateDoorType(int nX, int nY) void __fastcall CreateDoorType(int nX, int nY)
{ {
int v2; // eax int v2; // eax
@ -2390,7 +2358,6 @@ void __fastcall CreateDoorType(int nX, int nY)
*v4 = 68; *v4 = 68;
} }
//----- (0040F2BD) --------------------------------------------------------
void __fastcall PlaceHallExt(int nX, int nY) void __fastcall PlaceHallExt(int nX, int nY)
{ {
char *v2; // eax char *v2; // eax
@ -2400,7 +2367,6 @@ void __fastcall PlaceHallExt(int nX, int nY)
*v2 = 44; *v2 = 44;
} }
//----- (0040F2D0) --------------------------------------------------------
void __fastcall DoPatternCheck(int i, int j) void __fastcall DoPatternCheck(int i, int j)
{ {
int v2; // edx int v2; // edx
@ -2507,7 +2473,6 @@ LABEL_25:
} }
} }
//----- (0040F459) --------------------------------------------------------
bool __cdecl DL2_FillVoids() bool __cdecl DL2_FillVoids()
{ {
int i; // eax int i; // eax
@ -2922,7 +2887,6 @@ LABEL_177:
return DL2_NumNoChar() <= 700; return DL2_NumNoChar() <= 700;
} }
//----- (0040F9B1) --------------------------------------------------------
bool __fastcall DL2_Cont(bool x1f, bool y1f, bool x2f, bool y2f) bool __fastcall DL2_Cont(bool x1f, bool y1f, bool x2f, bool y2f)
{ {
bool v4; // zf bool v4; // zf
@ -2952,7 +2916,6 @@ LABEL_11:
return 0; return 0;
} }
//----- (0040F9EE) --------------------------------------------------------
int __cdecl DL2_NumNoChar() int __cdecl DL2_NumNoChar()
{ {
int result; // eax int result; // eax
@ -2980,7 +2943,6 @@ int __cdecl DL2_NumNoChar()
return result; return result;
} }
//----- (0040FA10) --------------------------------------------------------
void __fastcall DL2_DrawRoom(int x1, int y1, int x2, int y2) void __fastcall DL2_DrawRoom(int x1, int y1, int x2, int y2)
{ {
int v4; // ebx int v4; // ebx
@ -3029,7 +2991,6 @@ void __fastcall DL2_DrawRoom(int x1, int y1, int x2, int y2)
} }
} }
//----- (0040FA97) --------------------------------------------------------
void __fastcall DL2_KnockWalls(int x1, int y1, int x2, int y2) void __fastcall DL2_KnockWalls(int x1, int y1, int x2, int y2)
{ {
int v4; // esi int v4; // esi
@ -3085,7 +3046,6 @@ void __fastcall DL2_KnockWalls(int x1, int y1, int x2, int y2)
} }
} }
//----- (0040FB6C) --------------------------------------------------------
void __cdecl DRLG_L2FloodTVal() void __cdecl DRLG_L2FloodTVal()
{ {
int v0; // ebx int v0; // ebx
@ -3123,7 +3083,6 @@ void __cdecl DRLG_L2FloodTVal()
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (0040FBDB) --------------------------------------------------------
void __fastcall DRLG_L2FTVR(int i, int j, int x, int y, int d) void __fastcall DRLG_L2FTVR(int i, int j, int x, int y, int d)
{ {
int v5; // ebx int v5; // ebx
@ -3229,7 +3188,6 @@ void __fastcall DRLG_L2FTVR(int i, int j, int x, int y, int d)
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (0040FDCB) --------------------------------------------------------
void __cdecl DRLG_L2TransFix() void __cdecl DRLG_L2TransFix()
{ {
signed int v0; // esi signed int v0; // esi
@ -3296,7 +3254,6 @@ void __cdecl DRLG_L2TransFix()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040FE53) --------------------------------------------------------
void __cdecl L2DirtFix() void __cdecl L2DirtFix()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -3331,7 +3288,6 @@ void __cdecl L2DirtFix()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040FEBF) --------------------------------------------------------
void __cdecl DRLG_InitL2Vals() void __cdecl DRLG_InitL2Vals()
{ {
int v0; // edi int v0; // edi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DRLG_L2_H__
* United States. Use of a copyright notice is precautionary only and #define __DRLG_L2_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//drlg_l2
extern int nSx1; extern int nSx1;
extern int nSx2; // weak extern int nSx2; // weak
extern int nSy1; extern int nSy1;
@ -177,3 +169,5 @@ extern unsigned char CTRDOOR6[];
extern unsigned char CTRDOOR7[]; extern unsigned char CTRDOOR7[];
extern unsigned char CTRDOOR8[]; extern unsigned char CTRDOOR8[];
extern int Patterns[100][10]; extern int Patterns[100][10];
#endif /* __DRLG_L2_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -84,7 +75,6 @@ unsigned char L3SpawnTbl1[15] = { 0u, 10u, 67u, 5u, 44u, 6u, 9u, 0u, 0u, 28u, 13
unsigned char L3SpawnTbl2[15] = { 0u, 10u, 3u, 5u, 12u, 6u, 9u, 0u, 0u, 12u, 3u, 6u, 9u, 10u, 5u }; /* local spawntable? */ unsigned char L3SpawnTbl2[15] = { 0u, 10u, 3u, 5u, 12u, 6u, 9u, 0u, 0u, 12u, 3u, 6u, 9u, 10u, 5u }; /* local spawntable? */
unsigned char L3PoolSub[15] = { 0u, 35u, 26u, 36u, 25u, 29u, 34u, 7u, 33u, 28u, 27u, 37u, 32u, 31u, 30u }; /* local poolsub? */ unsigned char L3PoolSub[15] = { 0u, 35u, 26u, 36u, 25u, 29u, 34u, 7u, 33u, 28u, 27u, 37u, 32u, 31u, 30u }; /* local poolsub? */
//----- (0040FF81) --------------------------------------------------------
void __cdecl AddFenceDoors() void __cdecl AddFenceDoors()
{ {
signed int v0; // esi signed int v0; // esi
@ -130,7 +120,6 @@ void __cdecl AddFenceDoors()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (0040FFEC) --------------------------------------------------------
void __cdecl FenceDoorFix() void __cdecl FenceDoorFix()
{ {
signed int v0; // edi signed int v0; // edi
@ -202,7 +191,6 @@ void __cdecl FenceDoorFix()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (00410105) --------------------------------------------------------
int __cdecl DRLG_L3Anvil() int __cdecl DRLG_L3Anvil()
{ {
int v0; // esi int v0; // esi
@ -298,7 +286,6 @@ int __cdecl DRLG_L3Anvil()
// 5CF330: using guessed type int setpc_h; // 5CF330: using guessed type int setpc_h;
// 5CF334: using guessed type int setpc_w; // 5CF334: using guessed type int setpc_w;
//----- (00410215) --------------------------------------------------------
void __cdecl FixL3Warp() void __cdecl FixL3Warp()
{ {
int v0; // ecx int v0; // ecx
@ -336,7 +323,6 @@ void __cdecl FixL3Warp()
} }
} }
//----- (0041027D) --------------------------------------------------------
void __cdecl FixL3HallofHeroes() void __cdecl FixL3HallofHeroes()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -393,7 +379,6 @@ void __cdecl FixL3HallofHeroes()
while ( v3 < 40 ); while ( v3 < 40 );
} }
//----- (004102F1) --------------------------------------------------------
void __fastcall DRLG_L3LockRec(int x, int y) void __fastcall DRLG_L3LockRec(int x, int y)
{ {
int v2; // esi int v2; // esi
@ -423,7 +408,6 @@ void __fastcall DRLG_L3LockRec(int x, int y)
} }
// 528380: using guessed type int lockoutcnt; // 528380: using guessed type int lockoutcnt;
//----- (00410344) --------------------------------------------------------
bool __cdecl DRLG_L3Lockout() bool __cdecl DRLG_L3Lockout()
{ {
int v0; // esi int v0; // esi
@ -465,7 +449,6 @@ bool __cdecl DRLG_L3Lockout()
} }
// 528380: using guessed type int lockoutcnt; // 528380: using guessed type int lockoutcnt;
//----- (004103A1) --------------------------------------------------------
void __fastcall CreateL3Dungeon(int rseed, int entry) void __fastcall CreateL3Dungeon(int rseed, int entry)
{ {
int v2; // esi int v2; // esi
@ -511,7 +494,6 @@ void __fastcall CreateL3Dungeon(int rseed, int entry)
// 5D2458: using guessed type int dminx; // 5D2458: using guessed type int dminx;
// 5D245C: using guessed type int dminy; // 5D245C: using guessed type int dminy;
//----- (0041044E) --------------------------------------------------------
void __fastcall DRLG_L3(int entry) void __fastcall DRLG_L3(int entry)
{ {
int x1; // esi int x1; // esi
@ -672,7 +654,6 @@ LABEL_24:
} }
// 528378: using guessed type char lavapool; // 528378: using guessed type char lavapool;
//----- (0041087F) --------------------------------------------------------
void __cdecl InitL3Dungeon() void __cdecl InitL3Dungeon()
{ {
int i; // edx int i; // edx
@ -690,7 +671,6 @@ void __cdecl InitL3Dungeon()
} }
} }
//----- (004108B5) --------------------------------------------------------
int __fastcall DRLG_L3FillRoom(int x1, int y1, int x2, int y2) int __fastcall DRLG_L3FillRoom(int x1, int y1, int x2, int y2)
{ {
int v4; // esi int v4; // esi
@ -805,7 +785,6 @@ LABEL_12:
return 1; return 1;
} }
//----- (004109F0) --------------------------------------------------------
void __fastcall DRLG_L3CreateBlock(int x, int y, int obs, int dir) void __fastcall DRLG_L3CreateBlock(int x, int y, int obs, int dir)
{ {
int v4; // esi int v4; // esi
@ -928,7 +907,6 @@ void __fastcall DRLG_L3CreateBlock(int x, int y, int obs, int dir)
} }
} }
//----- (00410BC0) --------------------------------------------------------
void __fastcall DRLG_L3FloorArea(int x1, int y1, int x2, int y2) void __fastcall DRLG_L3FloorArea(int x1, int y1, int x2, int y2)
{ {
int i; // esi int i; // esi
@ -952,7 +930,6 @@ void __fastcall DRLG_L3FloorArea(int x1, int y1, int x2, int y2)
} }
} }
//----- (00410BF4) --------------------------------------------------------
void __cdecl DRLG_L3FillDiags() void __cdecl DRLG_L3FillDiags()
{ {
signed int v0; // ebx signed int v0; // ebx
@ -999,7 +976,6 @@ LABEL_11:
while ( v0 < 39 ); while ( v0 < 39 );
} }
//----- (00410C65) --------------------------------------------------------
void __cdecl DRLG_L3FillSingles() void __cdecl DRLG_L3FillSingles()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -1029,7 +1005,6 @@ void __cdecl DRLG_L3FillSingles()
while ( v0 < 39 ); while ( v0 < 39 );
} }
//----- (00410CC4) --------------------------------------------------------
void __cdecl DRLG_L3FillStraights() void __cdecl DRLG_L3FillStraights()
{ {
int v0; // esi int v0; // esi
@ -1251,7 +1226,6 @@ void __cdecl DRLG_L3FillStraights()
while ( v17 < 39 ); while ( v17 < 39 );
} }
//----- (00410EDB) --------------------------------------------------------
void __cdecl DRLG_L3Edges() void __cdecl DRLG_L3Edges()
{ {
char *v0; // eax char *v0; // eax
@ -1266,7 +1240,6 @@ void __cdecl DRLG_L3Edges()
while ( (signed int)v0 < (signed int)&dungeon[40][39] ); while ( (signed int)v0 < (signed int)&dungeon[40][39] );
} }
//----- (00410EFC) --------------------------------------------------------
int __cdecl DRLG_L3GetFloorArea() int __cdecl DRLG_L3GetFloorArea()
{ {
int gfa; // eax int gfa; // eax
@ -1284,7 +1257,6 @@ int __cdecl DRLG_L3GetFloorArea()
return gfa; return gfa;
} }
//----- (00410F1F) --------------------------------------------------------
void __cdecl DRLG_L3MakeMegas() void __cdecl DRLG_L3MakeMegas()
{ {
signed int v0; // edi signed int v0; // edi
@ -1336,7 +1308,6 @@ LABEL_9:
while ( (signed int)v5 < (signed int)&dungeon[40][39] ); while ( (signed int)v5 < (signed int)&dungeon[40][39] );
} }
//----- (00410FAD) --------------------------------------------------------
void __cdecl DRLG_L3River() void __cdecl DRLG_L3River()
{ {
signed int v0; // ebx signed int v0; // ebx
@ -1772,7 +1743,6 @@ LABEL_148:
// 410FAD: using guessed type int var_4E8[100]; // 410FAD: using guessed type int var_4E8[100];
// 410FAD: using guessed type int var_358[98]; // 410FAD: using guessed type int var_358[98];
//----- (00411614) --------------------------------------------------------
void __cdecl DRLG_L3Pool() void __cdecl DRLG_L3Pool()
{ {
int v0; // ebx int v0; // ebx
@ -1874,7 +1844,6 @@ void __cdecl DRLG_L3Pool()
} }
// 528378: using guessed type char lavapool; // 528378: using guessed type char lavapool;
//----- (00411772) --------------------------------------------------------
int __fastcall DRLG_L3SpawnEdge(int x, int y, int *totarea) int __fastcall DRLG_L3SpawnEdge(int x, int y, int *totarea)
{ {
int *v3; // ebp int *v3; // ebp
@ -1945,7 +1914,6 @@ LABEL_18:
return 1; return 1;
} }
//----- (0041189C) --------------------------------------------------------
int __fastcall DRLG_L3Spawn(int x, int y, int *totarea) int __fastcall DRLG_L3Spawn(int x, int y, int *totarea)
{ {
int v3; // edi int v3; // edi
@ -1979,7 +1947,6 @@ int __fastcall DRLG_L3Spawn(int x, int y, int *totarea)
return result; return result;
} }
//----- (004119E0) --------------------------------------------------------
void __cdecl DRLG_L3PoolFix() void __cdecl DRLG_L3PoolFix()
{ {
signed int v0; // esi signed int v0; // esi
@ -2042,7 +2009,6 @@ void __cdecl DRLG_L3PoolFix()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (00411A74) --------------------------------------------------------
int __fastcall DRLG_L3PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, bool setview, int ldir) int __fastcall DRLG_L3PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, bool setview, int ldir)
{ {
int v7; // ebx int v7; // ebx
@ -2216,7 +2182,6 @@ int __fastcall DRLG_L3PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, i
// 5CF320: using guessed type int LvlViewY; // 5CF320: using guessed type int LvlViewY;
// 5CF324: using guessed type int LvlViewX; // 5CF324: using guessed type int LvlViewX;
//----- (00411C83) --------------------------------------------------------
void __fastcall DRLG_L3PlaceRndSet(unsigned char *miniset, int rndper) void __fastcall DRLG_L3PlaceRndSet(unsigned char *miniset, int rndper)
{ {
unsigned char *v2; // ebx unsigned char *v2; // ebx
@ -2354,7 +2319,6 @@ LABEL_33:
} }
} }
//----- (00411E0E) --------------------------------------------------------
void __cdecl DRLG_L3Wood() void __cdecl DRLG_L3Wood()
{ {
char *v0; // edi char *v0; // edi
@ -2658,7 +2622,6 @@ LABEL_112:
FenceDoorFix(); FenceDoorFix();
} }
//----- (0041223E) --------------------------------------------------------
bool __fastcall WoodVertU(int i, int y) bool __fastcall WoodVertU(int i, int y)
{ {
int v2; // eax int v2; // eax
@ -2685,7 +2648,6 @@ bool __fastcall WoodVertU(int i, int y)
return result; return result;
} }
//----- (0041228A) --------------------------------------------------------
bool __fastcall WoodVertD(int i, int y) bool __fastcall WoodVertD(int i, int y)
{ {
int v2; // eax int v2; // eax
@ -2712,7 +2674,6 @@ bool __fastcall WoodVertD(int i, int y)
return result; return result;
} }
//----- (004122CE) --------------------------------------------------------
bool __fastcall WoodHorizL(int x, int j) bool __fastcall WoodHorizL(int x, int j)
{ {
int v2; // eax int v2; // eax
@ -2739,7 +2700,6 @@ bool __fastcall WoodHorizL(int x, int j)
return result; return result;
} }
//----- (0041231A) --------------------------------------------------------
bool __fastcall WoodHorizR(int x, int j) bool __fastcall WoodHorizR(int x, int j)
{ {
int v2; // eax int v2; // eax
@ -2766,7 +2726,6 @@ bool __fastcall WoodHorizR(int x, int j)
return result; return result;
} }
//----- (0041235E) --------------------------------------------------------
void __cdecl DRLG_L3Pass3() void __cdecl DRLG_L3Pass3()
{ {
int v0; // eax int v0; // eax
@ -2864,7 +2823,6 @@ void __cdecl DRLG_L3Pass3()
while ( v4 < 40 ); while ( v4 < 40 );
} }
//----- (00412466) --------------------------------------------------------
void __fastcall LoadL3Dungeon(char *sFileName, int vx, int vy) void __fastcall LoadL3Dungeon(char *sFileName, int vx, int vy)
{ {
char *v3; // esi char *v3; // esi
@ -2973,7 +2931,6 @@ void __fastcall LoadL3Dungeon(char *sFileName, int vx, int vy)
// 5D2458: using guessed type int dminx; // 5D2458: using guessed type int dminx;
// 5D245C: using guessed type int dminy; // 5D245C: using guessed type int dminy;
//----- (004125B0) --------------------------------------------------------
void __fastcall LoadPreL3Dungeon(char *sFileName, int vx, int vy) void __fastcall LoadPreL3Dungeon(char *sFileName, int vx, int vy)
{ {
char *v3; // esi char *v3; // esi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DRLG_L3_H__
* United States. Use of a copyright notice is precautionary only and #define __DRLG_L3_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//drlg_l3
extern char lavapool; // weak extern char lavapool; // weak
extern int abyssx; // weak extern int abyssx; // weak
extern int lockoutcnt; // weak extern int lockoutcnt; // weak
@ -91,3 +83,5 @@ extern unsigned char L3ANVIL[244];
extern unsigned char L3SpawnTbl1[15]; /* local spawntable? */ extern unsigned char L3SpawnTbl1[15]; /* local spawntable? */
extern unsigned char L3SpawnTbl2[15]; /* local spawntable? */ extern unsigned char L3SpawnTbl2[15]; /* local spawntable? */
extern unsigned char L3PoolSub[15]; /* local poolsub? */ extern unsigned char L3PoolSub[15]; /* local poolsub? */
#endif /* __DRLG_L3_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -304,7 +295,6 @@ unsigned char L4BTYPES[140] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}; };
//----- (00412655) --------------------------------------------------------
void __cdecl DRLG_LoadL4SP() void __cdecl DRLG_LoadL4SP()
{ {
setloadflag_2 = 0; setloadflag_2 = 0;
@ -322,7 +312,6 @@ void __cdecl DRLG_LoadL4SP()
// 5B50D8: using guessed type int setloadflag_2; // 5B50D8: using guessed type int setloadflag_2;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (004126AD) --------------------------------------------------------
void __cdecl DRLG_FreeL4SP() void __cdecl DRLG_FreeL4SP()
{ {
char *v0; // ecx char *v0; // ecx
@ -332,7 +321,6 @@ void __cdecl DRLG_FreeL4SP()
mem_free_dbg(v0); mem_free_dbg(v0);
} }
//----- (004126BF) --------------------------------------------------------
void __fastcall DRLG_L4SetSPRoom(int rx1, int ry1) void __fastcall DRLG_L4SetSPRoom(int rx1, int ry1)
{ {
int v2; // edi int v2; // edi
@ -385,7 +373,6 @@ void __fastcall DRLG_L4SetSPRoom(int rx1, int ry1)
// 5CF330: using guessed type int setpc_h; // 5CF330: using guessed type int setpc_h;
// 5CF334: using guessed type int setpc_w; // 5CF334: using guessed type int setpc_w;
//----- (00412744) --------------------------------------------------------
void __cdecl L4SaveQuads() void __cdecl L4SaveQuads()
{ {
char *v0; // esi char *v0; // esi
@ -437,7 +424,6 @@ void __cdecl L4SaveQuads()
// 528A34: using guessed type int l4holdx; // 528A34: using guessed type int l4holdx;
// 528A38: using guessed type int l4holdy; // 528A38: using guessed type int l4holdy;
//----- (004127D3) --------------------------------------------------------
void __fastcall DRLG_L4SetRoom(unsigned char *pSetPiece, int rx1, int ry1) void __fastcall DRLG_L4SetRoom(unsigned char *pSetPiece, int rx1, int ry1)
{ {
int v3; // ebx int v3; // ebx
@ -484,7 +470,6 @@ void __fastcall DRLG_L4SetRoom(unsigned char *pSetPiece, int rx1, int ry1)
} }
} }
//----- (00412831) --------------------------------------------------------
void __fastcall DRLG_LoadDiabQuads(bool preflag) void __fastcall DRLG_LoadDiabQuads(bool preflag)
{ {
bool v1; // esi bool v1; // esi
@ -532,7 +517,6 @@ void __fastcall DRLG_LoadDiabQuads(bool preflag)
// 528A34: using guessed type int l4holdx; // 528A34: using guessed type int l4holdx;
// 528A38: using guessed type int l4holdy; // 528A38: using guessed type int l4holdy;
//----- (00412933) --------------------------------------------------------
bool __fastcall IsDURWall(char d) bool __fastcall IsDURWall(char d)
{ {
bool result; // al bool result; // al
@ -544,7 +528,6 @@ bool __fastcall IsDURWall(char d)
return result; return result;
} }
//----- (00412948) --------------------------------------------------------
bool __fastcall IsDLLWall(char dd) bool __fastcall IsDLLWall(char dd)
{ {
bool result; // al bool result; // al
@ -556,7 +539,6 @@ bool __fastcall IsDLLWall(char dd)
return result; return result;
} }
//----- (0041295D) --------------------------------------------------------
void __cdecl L4FixRim() void __cdecl L4FixRim()
{ {
char (*v0)[20]; // eax char (*v0)[20]; // eax
@ -576,7 +558,6 @@ void __cdecl L4FixRim()
} }
// 52A4DC: using guessed type int dword_52A4DC; // 52A4DC: using guessed type int dword_52A4DC;
//----- (0041297B) --------------------------------------------------------
void __cdecl DRLG_L4GeneralFix() void __cdecl DRLG_L4GeneralFix()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -601,7 +582,6 @@ void __cdecl DRLG_L4GeneralFix()
while ( v0 < 39 ); while ( v0 < 39 );
} }
//----- (004129B0) --------------------------------------------------------
void __fastcall CreateL4Dungeon(int rseed, int entry) void __fastcall CreateL4Dungeon(int rseed, int entry)
{ {
int v2; // esi int v2; // esi
@ -626,7 +606,6 @@ void __fastcall CreateL4Dungeon(int rseed, int entry)
// 5D2458: using guessed type int dminx; // 5D2458: using guessed type int dminx;
// 5D245C: using guessed type int dminy; // 5D245C: using guessed type int dminy;
//----- (00412A00) --------------------------------------------------------
void __fastcall DRLG_L4(int entry) void __fastcall DRLG_L4(int entry)
{ {
signed int v1; // ebp signed int v1; // ebp
@ -863,7 +842,6 @@ LABEL_31:
// 5B50D8: using guessed type int setloadflag_2; // 5B50D8: using guessed type int setloadflag_2;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00412DDD) --------------------------------------------------------
void __cdecl DRLG_L4Shadows() void __cdecl DRLG_L4Shadows()
{ {
signed int v0; // esi signed int v0; // esi
@ -905,7 +883,6 @@ void __cdecl DRLG_L4Shadows()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (00412E34) --------------------------------------------------------
void __cdecl InitL4Dungeon() void __cdecl InitL4Dungeon()
{ {
signed int v0; // edx signed int v0; // edx
@ -932,7 +909,6 @@ void __cdecl InitL4Dungeon()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (00412E7B) --------------------------------------------------------
void __cdecl L4makeDmt() void __cdecl L4makeDmt()
{ {
signed int v0; // ecx signed int v0; // ecx
@ -967,7 +943,6 @@ void __cdecl L4makeDmt()
while ( v0 <= 77 ); while ( v0 <= 77 );
} }
//----- (00412ECB) --------------------------------------------------------
void __cdecl L4AddWall() void __cdecl L4AddWall()
{ {
int v0; // edi int v0; // edi
@ -1098,7 +1073,6 @@ void __cdecl L4AddWall()
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (004131C2) --------------------------------------------------------
int __fastcall L4HWallOk(int i, int j) int __fastcall L4HWallOk(int i, int j)
{ {
int v2; // esi int v2; // esi
@ -1154,7 +1128,6 @@ int __fastcall L4HWallOk(int i, int j)
return result; return result;
} }
//----- (00413270) --------------------------------------------------------
int __fastcall L4VWallOk(int i, int j) int __fastcall L4VWallOk(int i, int j)
{ {
int v2; // ecx int v2; // ecx
@ -1205,7 +1178,6 @@ int __fastcall L4VWallOk(int i, int j)
return result; return result;
} }
//----- (0041330B) --------------------------------------------------------
void __fastcall L4HorizWall(int i, int j, int dx) void __fastcall L4HorizWall(int i, int j, int dx)
{ {
int v3; // esi int v3; // esi
@ -1263,7 +1235,6 @@ void __fastcall L4HorizWall(int i, int j, int dx)
*v12 = 59; *v12 = 59;
} }
//----- (004133D6) --------------------------------------------------------
void __fastcall L4VertWall(int i, int j, int dy) void __fastcall L4VertWall(int i, int j, int dy)
{ {
int v3; // edi int v3; // edi
@ -1319,7 +1290,6 @@ void __fastcall L4VertWall(int i, int j, int dy)
*(v10 - 41) = 55; *(v10 - 41) = 55;
} }
//----- (004134B4) --------------------------------------------------------
void __cdecl L4tileFix() void __cdecl L4tileFix()
{ {
signed int v0; // edx signed int v0; // edx
@ -2305,7 +2275,6 @@ void __cdecl L4tileFix()
while ( v135 < 40 ); while ( v135 < 40 );
} }
//----- (004142DD) --------------------------------------------------------
void __cdecl DRLG_L4Subs() void __cdecl DRLG_L4Subs()
{ {
signed int v0; // edi signed int v0; // edi
@ -2370,7 +2339,6 @@ void __cdecl DRLG_L4Subs()
while ( v6 < 40 ); while ( v6 < 40 );
} }
//----- (0041439A) --------------------------------------------------------
void __cdecl L4makeDungeon() void __cdecl L4makeDungeon()
{ {
signed int v0; // ebx signed int v0; // ebx
@ -2489,7 +2457,6 @@ void __cdecl L4makeDungeon()
while ( (signed int)v26 > (signed int)&dung[18][19] ); while ( (signed int)v26 > (signed int)&dung[18][19] );
} }
//----- (004144B1) --------------------------------------------------------
void __cdecl uShape() void __cdecl uShape()
{ {
int v0; // ecx int v0; // ecx
@ -2608,7 +2575,6 @@ void __cdecl uShape()
while ( v11 ); while ( v11 );
} }
//----- (004145E4) --------------------------------------------------------
int __cdecl GetArea() int __cdecl GetArea()
{ {
int result; // eax int result; // eax
@ -2636,7 +2602,6 @@ int __cdecl GetArea()
return result; return result;
} }
//----- (00414606) --------------------------------------------------------
void __cdecl L4firstRoom() void __cdecl L4firstRoom()
{ {
int v0; // esi int v0; // esi
@ -2707,7 +2672,6 @@ LABEL_10:
// 528A48: using guessed type int SP4y2; // 528A48: using guessed type int SP4y2;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00414738) --------------------------------------------------------
void __fastcall L4drawRoom(int x, int y, int width, int height) void __fastcall L4drawRoom(int x, int y, int width, int height)
{ {
int i; // esi int i; // esi
@ -2731,7 +2695,6 @@ void __fastcall L4drawRoom(int x, int y, int width, int height)
} }
} }
//----- (0041476F) --------------------------------------------------------
void __fastcall L4roomGen(int x, int y, int w, int h, int dir) void __fastcall L4roomGen(int x, int y, int w, int h, int dir)
{ {
int v5; // eax int v5; // eax
@ -2845,7 +2808,6 @@ void __fastcall L4roomGen(int x, int y, int w, int h, int dir)
} }
} }
//----- (00414976) --------------------------------------------------------
bool __fastcall L4checkRoom(int x, int y, int width, int height) bool __fastcall L4checkRoom(int x, int y, int width, int height)
{ {
int v4; // esi int v4; // esi
@ -2881,7 +2843,6 @@ LABEL_12:
return 0; return 0;
} }
//----- (004149E2) --------------------------------------------------------
bool __fastcall DRLG_L4PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir) bool __fastcall DRLG_L4PlaceMiniSet(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)
{ {
int v7; // ebx int v7; // ebx
@ -3074,7 +3035,6 @@ bool __fastcall DRLG_L4PlaceMiniSet(unsigned char *miniset, int tmin, int tmax,
// 5CF320: using guessed type int LvlViewY; // 5CF320: using guessed type int LvlViewY;
// 5CF324: using guessed type int LvlViewX; // 5CF324: using guessed type int LvlViewX;
//----- (00414C44) --------------------------------------------------------
void __cdecl DRLG_L4FloodTVal() void __cdecl DRLG_L4FloodTVal()
{ {
int v0; // ebx int v0; // ebx
@ -3112,7 +3072,6 @@ void __cdecl DRLG_L4FloodTVal()
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (00414CB3) --------------------------------------------------------
void __fastcall DRLG_L4FTVR(int i, int j, int x, int y, int d) void __fastcall DRLG_L4FTVR(int i, int j, int x, int y, int d)
{ {
int v5; // ebx int v5; // ebx
@ -3218,7 +3177,6 @@ void __fastcall DRLG_L4FTVR(int i, int j, int x, int y, int d)
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (00414EA3) --------------------------------------------------------
void __cdecl DRLG_L4TransFix() /* check */ void __cdecl DRLG_L4TransFix() /* check */
{ {
signed int v0; // edi signed int v0; // edi
@ -3294,7 +3252,6 @@ void __cdecl DRLG_L4TransFix() /* check */
while ( v0 < 40 ); while ( v0 < 40 );
} }
//----- (00414F5B) --------------------------------------------------------
void __cdecl DRLG_L4Corners() void __cdecl DRLG_L4Corners()
{ {
signed int v0; // edx signed int v0; // edx
@ -3325,7 +3282,6 @@ void __cdecl DRLG_L4Corners()
while ( v0 < 39 ); while ( v0 < 39 );
} }
//----- (00414F90) --------------------------------------------------------
void __cdecl DRLG_L4Pass3() void __cdecl DRLG_L4Pass3()
{ {
int v0; // eax int v0; // eax

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DRLG_L4_H__
* United States. Use of a copyright notice is precautionary only and #define __DRLG_L4_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//drlg_l4
extern int diabquad1x; // weak extern int diabquad1x; // weak
extern int diabquad1y; // weak extern int diabquad1y; // weak
extern int diabquad3x; // idb extern int diabquad3x; // idb
@ -73,3 +65,5 @@ extern unsigned char L4DSTAIRS[52];
extern unsigned char L4PENTA[52]; extern unsigned char L4PENTA[52];
extern unsigned char L4PENTA2[52]; extern unsigned char L4PENTA2[52];
extern unsigned char L4BTYPES[140]; extern unsigned char L4BTYPES[140];
#endif /* __DRLG_L4_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -23,7 +14,6 @@ int dthread_inf = 0x7F800000; // weak
/* rdata */ /* rdata */
static HANDLE sghThread = (HANDLE)0xFFFFFFFF; // idb static HANDLE sghThread = (HANDLE)0xFFFFFFFF; // idb
//----- (0041509D) --------------------------------------------------------
struct dthread_cpp_init_1 struct dthread_cpp_init_1
{ {
dthread_cpp_init_1() dthread_cpp_init_1()
@ -34,7 +24,6 @@ struct dthread_cpp_init_1
// 47A460: using guessed type int dthread_inf; // 47A460: using guessed type int dthread_inf;
// 52A4E0: using guessed type int dthread_cpp_init_value; // 52A4E0: using guessed type int dthread_cpp_init_value;
//----- (004150A8) --------------------------------------------------------
struct dthread_cpp_init_2 struct dthread_cpp_init_2
{ {
dthread_cpp_init_2() dthread_cpp_init_2()
@ -44,25 +33,21 @@ struct dthread_cpp_init_2
} }
} _dthread_cpp_init_2; } _dthread_cpp_init_2;
//----- (004150B2) --------------------------------------------------------
void __cdecl dthread_init_mutex() void __cdecl dthread_init_mutex()
{ {
InitializeCriticalSection(&sgMemCrit); InitializeCriticalSection(&sgMemCrit);
} }
//----- (004150BE) --------------------------------------------------------
void __cdecl dthread_cleanup_mutex_atexit() void __cdecl dthread_cleanup_mutex_atexit()
{ {
atexit(dthread_cleanup_mutex); atexit(dthread_cleanup_mutex);
} }
//----- (004150CA) --------------------------------------------------------
void __cdecl dthread_cleanup_mutex() void __cdecl dthread_cleanup_mutex()
{ {
DeleteCriticalSection(&sgMemCrit); DeleteCriticalSection(&sgMemCrit);
} }
//----- (004150D6) --------------------------------------------------------
void __fastcall dthread_remove_player(int pnum) void __fastcall dthread_remove_player(int pnum)
{ {
int v1; // edi int v1; // edi
@ -78,7 +63,6 @@ void __fastcall dthread_remove_player(int pnum)
LeaveCriticalSection(&sgMemCrit); LeaveCriticalSection(&sgMemCrit);
} }
//----- (00415109) --------------------------------------------------------
void __fastcall dthread_send_delta(int pnum, int cmd, void *pbSrc, int dwLen) void __fastcall dthread_send_delta(int pnum, int cmd, void *pbSrc, int dwLen)
{ {
char v4; // bl char v4; // bl
@ -114,7 +98,6 @@ void __fastcall dthread_send_delta(int pnum, int cmd, void *pbSrc, int dwLen)
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00415186) --------------------------------------------------------
void __cdecl dthread_start() void __cdecl dthread_start()
{ {
char *v0; // eax char *v0; // eax
@ -140,7 +123,6 @@ void __cdecl dthread_start()
// 52A508: using guessed type char byte_52A508; // 52A508: using guessed type char byte_52A508;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (004151F3) --------------------------------------------------------
unsigned int __stdcall dthread_handler(void *a1) unsigned int __stdcall dthread_handler(void *a1)
{ {
char *v1; // eax char *v1; // eax
@ -180,7 +162,6 @@ unsigned int __stdcall dthread_handler(void *a1)
// 52A508: using guessed type char byte_52A508; // 52A508: using guessed type char byte_52A508;
// 679730: using guessed type int gdwDeltaBytesSec; // 679730: using guessed type int gdwDeltaBytesSec;
//----- (004152C0) --------------------------------------------------------
void __cdecl dthread_cleanup() void __cdecl dthread_cleanup()
{ {
char *v0; // eax char *v0; // eax

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DTHREAD_H__
* United States. Use of a copyright notice is precautionary only and #define __DTHREAD_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//dthread
extern int dthread_cpp_init_value; // weak extern int dthread_cpp_init_value; // weak
extern unsigned int glpDThreadId; // idb extern unsigned int glpDThreadId; // idb
extern TMegaPkt *sgpInfoHead; /* may not be right struct */ extern TMegaPkt *sgpInfoHead; /* may not be right struct */
@ -29,3 +21,5 @@ void __cdecl dthread_cleanup();
/* data */ /* data */
extern int dthread_inf; // weak extern int dthread_inf; // weak
#endif /* __DTHREAD_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -26,7 +17,6 @@ HMODULE ghDiabMod; // idb
int dx_inf = 0x7F800000; // weak int dx_inf = 0x7F800000; // weak
//----- (00415367) --------------------------------------------------------
struct dx_cpp_init_1 struct dx_cpp_init_1
{ {
dx_cpp_init_1() dx_cpp_init_1()
@ -37,7 +27,6 @@ struct dx_cpp_init_1
// 47A464: using guessed type int dx_inf; // 47A464: using guessed type int dx_inf;
// 52A514: using guessed type int dx_cpp_init_value; // 52A514: using guessed type int dx_cpp_init_value;
//----- (00415372) --------------------------------------------------------
struct dx_cpp_init_2 struct dx_cpp_init_2
{ {
dx_cpp_init_2() dx_cpp_init_2()
@ -47,25 +36,21 @@ struct dx_cpp_init_2
} }
} _dx_cpp_init_2; } _dx_cpp_init_2;
//----- (0041537C) --------------------------------------------------------
void __cdecl dx_init_mutex() void __cdecl dx_init_mutex()
{ {
InitializeCriticalSection(&sgMemCrit); InitializeCriticalSection(&sgMemCrit);
} }
//----- (00415388) --------------------------------------------------------
void __cdecl dx_cleanup_mutex_atexit() void __cdecl dx_cleanup_mutex_atexit()
{ {
atexit(dx_cleanup_mutex); atexit(dx_cleanup_mutex);
} }
//----- (00415394) --------------------------------------------------------
void __cdecl dx_cleanup_mutex() void __cdecl dx_cleanup_mutex()
{ {
DeleteCriticalSection(&sgMemCrit); DeleteCriticalSection(&sgMemCrit);
} }
//----- (004153A0) --------------------------------------------------------
void __fastcall dx_init(HWND hWnd) void __fastcall dx_init(HWND hWnd)
{ {
HWND v1; // esi HWND v1; // esi
@ -89,7 +74,7 @@ void __fastcall dx_init(HWND hWnd)
if ( v3 ) if ( v3 )
TermDlg(104, v3, "C:\\Src\\Diablo\\Source\\dx.cpp", 149); TermDlg(104, v3, "C:\\Src\\Diablo\\Source\\dx.cpp", 149);
fullscreen = 1; fullscreen = 1;
v4 = IDirectDraw_SetCooperativeLevel(lpDDInterface, v1, DDSCL_EXCLUSIVE|DDSCL_ALLOWREBOOT|DDSCL_FULLSCREEN); v4 = lpDDInterface->SetCooperativeLevel(v1, DDSCL_EXCLUSIVE|DDSCL_ALLOWREBOOT|DDSCL_FULLSCREEN);
if ( v4 == DDERR_EXCLUSIVEMODEALREADYSET ) if ( v4 == DDERR_EXCLUSIVEMODEALREADYSET )
{ {
MI_Dummy(0); // v5 MI_Dummy(0); // v5
@ -98,11 +83,11 @@ void __fastcall dx_init(HWND hWnd)
{ {
TermDlg(104, v4, "C:\\Src\\Diablo\\Source\\dx.cpp", 170); TermDlg(104, v4, "C:\\Src\\Diablo\\Source\\dx.cpp", 170);
} }
if ( IDirectDraw_SetDisplayMode(lpDDInterface, 640, 480, 8) ) if ( lpDDInterface->SetDisplayMode(640, 480, 8) )
{ {
v6 = GetSystemMetrics(SM_CXSCREEN); v6 = GetSystemMetrics(SM_CXSCREEN);
v7 = GetSystemMetrics(SM_CYSCREEN); v7 = GetSystemMetrics(SM_CYSCREEN);
v8 = IDirectDraw_SetDisplayMode(lpDDInterface, v6, v7, 8); v8 = lpDDInterface->SetDisplayMode(v6, v7, 8);
if ( v8 ) if ( v8 )
TermDlg(104, v8, "C:\\Src\\Diablo\\Source\\dx.cpp", 183); TermDlg(104, v8, "C:\\Src\\Diablo\\Source\\dx.cpp", 183);
} }
@ -115,7 +100,6 @@ void __fastcall dx_init(HWND hWnd)
// 484364: using guessed type int fullscreen; // 484364: using guessed type int fullscreen;
// 52A549: using guessed type char gbEmulate; // 52A549: using guessed type char gbEmulate;
//----- (004154B5) --------------------------------------------------------
void __cdecl dx_create_back_buffer() void __cdecl dx_create_back_buffer()
{ {
int v0; // eax int v0; // eax
@ -125,16 +109,16 @@ void __cdecl dx_create_back_buffer()
DDSURFACEDESC v4; // [esp+Ch] [ebp-70h] DDSURFACEDESC v4; // [esp+Ch] [ebp-70h]
DDSCAPS v5; // [esp+78h] [ebp-4h] DDSCAPS v5; // [esp+78h] [ebp-4h]
v0 = IDirectDrawSurface_GetCaps(lpDDSPrimary, &v5); v0 = lpDDSPrimary->GetCaps(&v5);
if ( v0 ) if ( v0 )
DDErrDlg(v0, 59, "C:\\Src\\Diablo\\Source\\dx.cpp"); DDErrDlg(v0, 59, "C:\\Src\\Diablo\\Source\\dx.cpp");
if ( !gbBackBuf ) if ( !gbBackBuf )
{ {
v4.dwSize = 108; v4.dwSize = 108;
v1 = IDirectDrawSurface_Lock(lpDDSPrimary, NULL, &v4, DDLOCK_WRITEONLY|DDLOCK_WAIT, NULL); v1 = lpDDSPrimary->Lock(NULL, &v4, DDLOCK_WRITEONLY|DDLOCK_WAIT, NULL);
if ( !v1 ) if ( !v1 )
{ {
IDirectDrawSurface_Unlock(lpDDSPrimary, NULL); lpDDSPrimary->Unlock(NULL);
sgpBackBuf = DiabloAllocPtr(0x7B000); sgpBackBuf = DiabloAllocPtr(0x7B000);
return; return;
} }
@ -149,16 +133,15 @@ void __cdecl dx_create_back_buffer()
v4.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN; v4.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN;
v4.dwHeight = 656; v4.dwHeight = 656;
v4.ddpfPixelFormat.dwSize = 32; v4.ddpfPixelFormat.dwSize = 32;
v2 = IDirectDrawSurface_GetPixelFormat(lpDDSPrimary, &v4.ddpfPixelFormat); v2 = lpDDSPrimary->GetPixelFormat(&v4.ddpfPixelFormat);
if ( v2 ) if ( v2 )
TermDlg(104, v2, "C:\\Src\\Diablo\\Source\\dx.cpp", 94); TermDlg(104, v2, "C:\\Src\\Diablo\\Source\\dx.cpp", 94);
v3 = IDirectDraw_CreateSurface(lpDDInterface, &v4, &lpDDSBackBuf, NULL); v3 = lpDDInterface->CreateSurface(&v4, &lpDDSBackBuf, NULL);
if ( v3 ) if ( v3 )
TermDlg(104, v3, "C:\\Src\\Diablo\\Source\\dx.cpp", 96); TermDlg(104, v3, "C:\\Src\\Diablo\\Source\\dx.cpp", 96);
} }
// 52A548: using guessed type char gbBackBuf; // 52A548: using guessed type char gbBackBuf;
//----- (004155C2) --------------------------------------------------------
void __cdecl dx_create_primary_surface() void __cdecl dx_create_primary_surface()
{ {
int v0; // eax int v0; // eax
@ -168,12 +151,11 @@ void __cdecl dx_create_primary_surface()
v1.dwSize = 108; v1.dwSize = 108;
v1.dwFlags = DDSD_CAPS; v1.dwFlags = DDSD_CAPS;
v1.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; v1.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
v0 = IDirectDraw_CreateSurface(lpDDInterface, &v1, &lpDDSPrimary, NULL); v0 = lpDDInterface->CreateSurface(&v1, &lpDDSPrimary, NULL);
if ( v0 ) if ( v0 )
TermDlg(104, v0, "C:\\Src\\Diablo\\Source\\dx.cpp", 109); TermDlg(104, v0, "C:\\Src\\Diablo\\Source\\dx.cpp", 109);
} }
//----- (0041561A) --------------------------------------------------------
HRESULT __fastcall dx_DirectDrawCreate(GUID *guid, IDirectDraw **DD, void *unknown) HRESULT __fastcall dx_DirectDrawCreate(GUID *guid, IDirectDraw **DD, void *unknown)
{ {
IDirectDraw **v3; // ebp IDirectDraw **v3; // ebp
@ -202,7 +184,6 @@ HRESULT __fastcall dx_DirectDrawCreate(GUID *guid, IDirectDraw **DD, void *unkno
return ((int (__stdcall *)(GUID *, IDirectDraw **, void *))v5)(v8, v3, unknown); return ((int (__stdcall *)(GUID *, IDirectDraw **, void *))v5)(v8, v3, unknown);
} }
//----- (0041569A) --------------------------------------------------------
void __cdecl dx_lock_mutex() void __cdecl dx_lock_mutex()
{ {
Screen *v0; // eax Screen *v0; // eax
@ -218,7 +199,7 @@ void __cdecl dx_lock_mutex()
if ( sgdwLockCount ) if ( sgdwLockCount )
goto LABEL_9; goto LABEL_9;
v2.dwSize = 108; v2.dwSize = 108;
v1 = IDirectDrawSurface_Lock(lpDDSBackBuf, NULL, &v2, DDLOCK_WAIT, NULL); v1 = lpDDSBackBuf->Lock(NULL, &v2, DDLOCK_WAIT, NULL);
if ( v1 ) if ( v1 )
DDErrDlg(v1, 235, "C:\\Src\\Diablo\\Source\\dx.cpp"); DDErrDlg(v1, 235, "C:\\Src\\Diablo\\Source\\dx.cpp");
v0 = (Screen *)v2.lpSurface; v0 = (Screen *)v2.lpSurface;
@ -234,7 +215,6 @@ LABEL_9:
} }
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00415725) --------------------------------------------------------
void __cdecl dx_unlock_mutex() void __cdecl dx_unlock_mutex()
{ {
Screen *v0; // eax Screen *v0; // eax
@ -251,7 +231,7 @@ void __cdecl dx_unlock_mutex()
screen_buf_end -= (signed int)v0; screen_buf_end -= (signed int)v0;
if ( !sgpBackBuf ) if ( !sgpBackBuf )
{ {
v1 = IDirectDrawSurface_Unlock(lpDDSBackBuf, NULL); v1 = lpDDSBackBuf->Unlock(NULL);
if ( v1 ) if ( v1 )
DDErrDlg(v1, 273, "C:\\Src\\Diablo\\Source\\dx.cpp"); DDErrDlg(v1, 273, "C:\\Src\\Diablo\\Source\\dx.cpp");
} }
@ -260,7 +240,6 @@ void __cdecl dx_unlock_mutex()
} }
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (004157A0) --------------------------------------------------------
void __cdecl dx_cleanup() void __cdecl dx_cleanup()
{ {
void *v0; // ecx void *v0; // ecx
@ -277,7 +256,7 @@ void __cdecl dx_cleanup()
} }
else if ( lpDDSBackBuf ) else if ( lpDDSBackBuf )
{ {
IDirectDrawSurface_Release(lpDDSBackBuf); lpDDSBackBuf->Release();
lpDDSBackBuf = 0; lpDDSBackBuf = 0;
} }
sgdwLockCount = 0; sgdwLockCount = 0;
@ -285,22 +264,21 @@ void __cdecl dx_cleanup()
LeaveCriticalSection(&sgMemCrit); LeaveCriticalSection(&sgMemCrit);
if ( lpDDSPrimary ) if ( lpDDSPrimary )
{ {
IDirectDrawSurface_Release(lpDDSPrimary); lpDDSPrimary->Release();
lpDDSPrimary = 0; lpDDSPrimary = 0;
} }
if ( lpDDPalette ) if ( lpDDPalette )
{ {
IDirectDrawPalette_Release(lpDDPalette); lpDDPalette->Release();
lpDDPalette = 0; lpDDPalette = 0;
} }
if ( lpDDInterface ) if ( lpDDInterface )
{ {
IDirectDraw_Release(lpDDInterface); lpDDInterface->Release();
lpDDInterface = 0; lpDDInterface = 0;
} }
} }
//----- (00415848) --------------------------------------------------------
void __cdecl dx_reinit() void __cdecl dx_reinit()
{ {
int v0; // esi int v0; // esi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __DX_H__
* United States. Use of a copyright notice is precautionary only and #define __DX_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//dx
extern void *sgpBackBuf; extern void *sgpBackBuf;
extern int dx_cpp_init_value; // weak extern int dx_cpp_init_value; // weak
extern IDirectDraw *lpDDInterface; extern IDirectDraw *lpDDInterface;
@ -42,3 +34,5 @@ void __cdecl j_dx_reinit();
/* data */ /* data */
extern int dx_inf; // weak extern int dx_inf; // weak
#endif /* __DX_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -884,7 +875,6 @@ TSFX sgSFX[858] =
{ 1u, "Sfx\\Monsters\\DiabloD.wav", NULL } { 1u, "Sfx\\Monsters\\DiabloD.wav", NULL }
}; };
//----- (004158AE) --------------------------------------------------------
struct effects_cpp_init struct effects_cpp_init
{ {
effects_cpp_init() effects_cpp_init()
@ -895,7 +885,6 @@ struct effects_cpp_init
// 47A468: using guessed type int effects_inf; // 47A468: using guessed type int effects_inf;
// 52A550: using guessed type int effects_cpp_init_value; // 52A550: using guessed type int effects_cpp_init_value;
//----- (004158B9) --------------------------------------------------------
bool __fastcall effect_is_playing(int nSFX) bool __fastcall effect_is_playing(int nSFX)
{ {
TSFX *v1; // eax TSFX *v1; // eax
@ -910,7 +899,6 @@ bool __fastcall effect_is_playing(int nSFX)
return 0; return 0;
} }
//----- (004158E2) --------------------------------------------------------
void __cdecl sfx_stop() void __cdecl sfx_stop()
{ {
if ( sfx_stream ) if ( sfx_stream )
@ -922,7 +910,6 @@ void __cdecl sfx_stop()
} }
} }
//----- (0041590B) --------------------------------------------------------
void __fastcall InitMonsterSND(int monst) void __fastcall InitMonsterSND(int monst)
{ {
signed int v1; // ebx signed int v1; // ebx
@ -973,7 +960,6 @@ void __fastcall InitMonsterSND(int monst)
} }
} }
//----- (004159DB) --------------------------------------------------------
void __cdecl FreeEffects() void __cdecl FreeEffects()
{ {
TSnd **v0; // esi TSnd **v0; // esi
@ -1020,7 +1006,6 @@ void __cdecl FreeEffects()
} }
} }
//----- (00415A45) --------------------------------------------------------
void __fastcall PlayEffect(int i, int mode) void __fastcall PlayEffect(int i, int mode)
{ {
int v2; // edi int v2; // edi
@ -1065,7 +1050,6 @@ void __fastcall PlayEffect(int i, int mode)
// 4A22D5: using guessed type char gbSoundOn; // 4A22D5: using guessed type char gbSoundOn;
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (00415AE1) --------------------------------------------------------
int __fastcall calc_snd_position(int x, int y, int *plVolume, int *plPan) int __fastcall calc_snd_position(int x, int y, int *plVolume, int *plPan)
{ {
int v4; // edi int v4; // edi
@ -1091,7 +1075,6 @@ int __fastcall calc_snd_position(int x, int y, int *plVolume, int *plPan)
return 1; return 1;
} }
//----- (00415B59) --------------------------------------------------------
void __fastcall PlaySFX(int psfx) void __fastcall PlaySFX(int psfx)
{ {
int v1; // eax int v1; // eax
@ -1100,7 +1083,6 @@ void __fastcall PlaySFX(int psfx)
PlaySFX_priv(&sgSFX[v1], 0, 0, 0); PlaySFX_priv(&sgSFX[v1], 0, 0, 0);
} }
//----- (00415B71) --------------------------------------------------------
void __fastcall PlaySFX_priv(TSFX *pSFX, char loc, int x, int y) void __fastcall PlaySFX_priv(TSFX *pSFX, char loc, int x, int y)
{ {
int v4; // edi int v4; // edi
@ -1150,7 +1132,6 @@ void __fastcall PlaySFX_priv(TSFX *pSFX, char loc, int x, int y)
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00415C2A) --------------------------------------------------------
void __fastcall stream_play(TSFX *pSFX, int lVolume, int lPan) void __fastcall stream_play(TSFX *pSFX, int lVolume, int lPan)
{ {
int v3; // esi int v3; // esi
@ -1183,7 +1164,6 @@ void __fastcall stream_play(TSFX *pSFX, int lVolume, int lPan)
} }
} }
//----- (00415C97) --------------------------------------------------------
int __fastcall RndSFX(int psfx) int __fastcall RndSFX(int psfx)
{ {
int v1; // esi int v1; // esi
@ -1218,7 +1198,6 @@ LABEL_19:
return psfx; return psfx;
} }
//----- (00415D01) --------------------------------------------------------
void __fastcall PlaySfxLoc(int psfx, int x, int y) void __fastcall PlaySfxLoc(int psfx, int x, int y)
{ {
int v3; // esi int v3; // esi
@ -1236,7 +1215,6 @@ void __fastcall PlaySfxLoc(int psfx, int x, int y)
PlaySFX_priv(&sgSFX[v4], 1, v3, y); PlaySFX_priv(&sgSFX[v4], 1, v3, y);
} }
//----- (00415D39) --------------------------------------------------------
void __cdecl FreeMonsterSnd() void __cdecl FreeMonsterSnd()
{ {
TSnd **v0; // esi TSnd **v0; // esi
@ -1276,7 +1254,6 @@ void __cdecl FreeMonsterSnd()
} }
} }
//----- (00415D9A) --------------------------------------------------------
void __cdecl sound_stop() void __cdecl sound_stop()
{ {
int i; // edi int i; // edi
@ -1288,7 +1265,6 @@ void __cdecl sound_stop()
} }
} }
//----- (00415DBA) --------------------------------------------------------
void __cdecl sound_update() void __cdecl sound_update()
{ {
//int v0; // ebp //int v0; // ebp
@ -1317,7 +1293,6 @@ void __cdecl sound_update()
} }
// 415DBA: could not find valid save-restore pair for ebp // 415DBA: could not find valid save-restore pair for ebp
//----- (00415DFF) --------------------------------------------------------
void __cdecl effects_cleanup_sfx() void __cdecl effects_cleanup_sfx()
{ {
unsigned int v0; // edi unsigned int v0; // edi
@ -1338,7 +1313,6 @@ void __cdecl effects_cleanup_sfx()
while ( v0 < 858 ); while ( v0 < 858 );
} }
//----- (00415E2A) --------------------------------------------------------
void __cdecl stream_update() void __cdecl stream_update()
{ {
char v0; // bl char v0; // bl
@ -1376,7 +1350,6 @@ void __cdecl stream_update()
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00415E77) --------------------------------------------------------
void __fastcall priv_sound_init(int bLoadMask) void __fastcall priv_sound_init(int bLoadMask)
{ {
unsigned char v1; // bl unsigned char v1; // bl
@ -1410,13 +1383,11 @@ void __fastcall priv_sound_init(int bLoadMask)
} }
} }
//----- (00415ED8) --------------------------------------------------------
void __cdecl sound_init() void __cdecl sound_init()
{ {
priv_sound_init(4); priv_sound_init(4);
} }
//----- (00415EDF) --------------------------------------------------------
void __stdcall effects_play_sound(char *snd_file) void __stdcall effects_play_sound(char *snd_file)
{ {
int v1; // edi int v1; // edi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __EFFECTS_H__
* United States. Use of a copyright notice is precautionary only and #define __EFFECTS_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//effects
extern int effects_cpp_init_value; // weak extern int effects_cpp_init_value; // weak
extern int sfxdelay; // weak extern int sfxdelay; // weak
extern int sfxdnum; extern int sfxdnum;
@ -45,3 +37,5 @@ extern char monster_action_sounds[]; // idb
/* rdata */ /* rdata */
extern TSFX sgSFX[858]; extern TSFX sgSFX[858];
#endif /* __EFFECTS_H__ */

View File

@ -1,19 +1,9 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
int encrypt_table[1280]; int encrypt_table[1280];
//----- (00415F43) --------------------------------------------------------
void __fastcall encrypt_decrypt_block(void *block, int size, int key) // DecryptMPQBlock void __fastcall encrypt_decrypt_block(void *block, int size, int key) // DecryptMPQBlock
{ {
unsigned int v3; // edx unsigned int v3; // edx
@ -43,7 +33,6 @@ void __fastcall encrypt_decrypt_block(void *block, int size, int key) // Decrypt
} }
} }
//----- (00415F8F) --------------------------------------------------------
void __fastcall encrypt_encrypt_block(void *block, int size, int key) // EncryptMPQBlock void __fastcall encrypt_encrypt_block(void *block, int size, int key) // EncryptMPQBlock
{ {
unsigned int v3; // edx unsigned int v3; // edx
@ -73,7 +62,6 @@ void __fastcall encrypt_encrypt_block(void *block, int size, int key) // Encrypt
} }
} }
//----- (00415FDF) --------------------------------------------------------
int __fastcall encrypt_hash(char *s, int type) // HashStringSlash int __fastcall encrypt_hash(char *s, int type) // HashStringSlash
{ {
int v2; // ebp int v2; // ebp
@ -97,7 +85,6 @@ int __fastcall encrypt_hash(char *s, int type) // HashStringSlash
return v4; return v4;
} }
//----- (0041602E) --------------------------------------------------------
void __cdecl encrypt_init_lookup_table() // InitScratchSpace void __cdecl encrypt_init_lookup_table() // InitScratchSpace
{ {
unsigned int v0; // eax unsigned int v0; // eax
@ -128,7 +115,6 @@ void __cdecl encrypt_init_lookup_table() // InitScratchSpace
while ( (signed int)v5 < (signed int)&encrypt_table[256] ); while ( (signed int)v5 < (signed int)&encrypt_table[256] );
} }
//----- (0041609D) --------------------------------------------------------
int __fastcall encrypt_compress(void *buf, int size) // MPQCompress_PKWare int __fastcall encrypt_compress(void *buf, int size) // MPQCompress_PKWare
{ {
unsigned char *v2; // ebx unsigned char *v2; // ebx
@ -171,7 +157,6 @@ int __fastcall encrypt_compress(void *buf, int size) // MPQCompress_PKWare
return (int)v3; return (int)v3;
} }
//----- (00416133) --------------------------------------------------------
unsigned int __cdecl encrypt_pkware_read(char *buf, unsigned int *size, void *param) // ReadPKWare unsigned int __cdecl encrypt_pkware_read(char *buf, unsigned int *size, void *param) // ReadPKWare
{ {
TDataInfo * pInfo = (TDataInfo *)param; TDataInfo * pInfo = (TDataInfo *)param;
@ -187,7 +172,6 @@ unsigned int __cdecl encrypt_pkware_read(char *buf, unsigned int *size, void *pa
return v3; return v3;
} }
//----- (00416167) --------------------------------------------------------
void __cdecl encrypt_pkware_write(char *buf, unsigned int *size, void *param) // WritePKWare void __cdecl encrypt_pkware_write(char *buf, unsigned int *size, void *param) // WritePKWare
{ {
TDataInfo * pInfo = (TDataInfo *)param; TDataInfo * pInfo = (TDataInfo *)param;
@ -196,7 +180,6 @@ void __cdecl encrypt_pkware_write(char *buf, unsigned int *size, void *param) //
pInfo->pbOutBuffEnd += *size; pInfo->pbOutBuffEnd += *size;
} }
//----- (0041618E) --------------------------------------------------------
void __fastcall encrypt_decompress(void *param, int recv_size, int dwMaxBytes) // MPQDecompress_PKWare void __fastcall encrypt_decompress(void *param, int recv_size, int dwMaxBytes) // MPQDecompress_PKWare
{ {
unsigned char *v3; // edi unsigned char *v3; // edi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __ENCRYPT_H__
* United States. Use of a copyright notice is precautionary only and #define __ENCRYPT_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//encrypt
extern int encrypt_table[1280]; extern int encrypt_table[1280];
//int encrypt_52B564[257]; //int encrypt_52B564[257];
@ -21,3 +13,5 @@ int __fastcall encrypt_compress(void *buf, int size);
unsigned int __cdecl encrypt_pkware_read(char *buf, unsigned int *size, void *param); unsigned int __cdecl encrypt_pkware_read(char *buf, unsigned int *size, void *param);
void __cdecl encrypt_pkware_write(char *buf, unsigned int *size, void *param); void __cdecl encrypt_pkware_write(char *buf, unsigned int *size, void *param);
void __fastcall encrypt_decompress(void *param, int recv_size, int dwMaxBytes); void __fastcall encrypt_decompress(void *param, int recv_size, int dwMaxBytes);
#endif /* __ENCRYPT_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -23,7 +14,6 @@ int dword_52B99C; // bool valid - if x/y are in bounds
int engine_inf = 0x7F800000; // weak int engine_inf = 0x7F800000; // weak
//----- (00416201) --------------------------------------------------------
struct engine_cpp_init_1 struct engine_cpp_init_1
{ {
engine_cpp_init_1() engine_cpp_init_1()
@ -34,7 +24,6 @@ struct engine_cpp_init_1
// 47A474: using guessed type int engine_inf; // 47A474: using guessed type int engine_inf;
// 52B968: using guessed type int engine_cpp_init_value; // 52B968: using guessed type int engine_cpp_init_value;
//----- (0041620C) --------------------------------------------------------
void __fastcall CelDrawDatOnly(char *pDecodeTo, char *pRLEBytes, int dwRLESize, int dwRLEWdt) void __fastcall CelDrawDatOnly(char *pDecodeTo, char *pRLEBytes, int dwRLESize, int dwRLEWdt)
{ {
char *v4; // esi char *v4; // esi
@ -97,7 +86,6 @@ LABEL_14:
} }
} }
//----- (00416274) --------------------------------------------------------
void __fastcall CelDecodeOnly(int screen_x, int screen_y, void *pCelBuff, int frame, int frame_width) void __fastcall CelDecodeOnly(int screen_x, int screen_y, void *pCelBuff, int frame, int frame_width)
{ {
if ( gpBuffer ) if ( gpBuffer )
@ -111,7 +99,6 @@ void __fastcall CelDecodeOnly(int screen_x, int screen_y, void *pCelBuff, int fr
} }
} }
//----- (004162B8) --------------------------------------------------------
void __fastcall CelDecDatOnly(char *pBuff, char *pCelBuff, int frame, int frame_width) void __fastcall CelDecDatOnly(char *pBuff, char *pCelBuff, int frame, int frame_width)
{ {
if ( pCelBuff ) if ( pCelBuff )
@ -125,7 +112,6 @@ void __fastcall CelDecDatOnly(char *pBuff, char *pCelBuff, int frame, int frame_
} }
} }
//----- (004162DE) --------------------------------------------------------
void __fastcall CelDrawHdrOnly(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int always_0, int direction) void __fastcall CelDrawHdrOnly(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int always_0, int direction)
{ {
int v7; // edx int v7; // edx
@ -160,7 +146,6 @@ void __fastcall CelDrawHdrOnly(int screen_x, int screen_y, char *pCelBuff, int f
} }
} }
//----- (00416359) --------------------------------------------------------
void __fastcall CelDecodeHdrOnly(char *pBuff, char *pCelBuff, int frame, int frame_width, int always_0, int direction) void __fastcall CelDecodeHdrOnly(char *pBuff, char *pCelBuff, int frame, int frame_width, int always_0, int direction)
{ {
int v6; // esi int v6; // esi
@ -189,7 +174,6 @@ void __fastcall CelDecodeHdrOnly(char *pBuff, char *pCelBuff, int frame, int fra
} }
} }
//----- (004163AC) --------------------------------------------------------
void __fastcall CelDecDatLightOnly(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width) void __fastcall CelDecDatLightOnly(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width)
{ {
char *v4; // esi char *v4; // esi
@ -234,7 +218,6 @@ LABEL_9:
} }
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
//----- (00416423) --------------------------------------------------------
void __fastcall CelDecDatLightEntry(int a1, char *a2, char *a3, char *v6) void __fastcall CelDecDatLightEntry(int a1, char *a2, char *a3, char *v6)
{ {
int v4; // ebx int v4; // ebx
@ -287,7 +270,6 @@ void __fastcall CelDecDatLightEntry(int a1, char *a2, char *a3, char *v6)
} }
} }
//----- (00416488) --------------------------------------------------------
void __fastcall CelDecDatLightTrans(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width) void __fastcall CelDecDatLightTrans(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width)
{ {
char *v4; // esi char *v4; // esi
@ -433,7 +415,6 @@ LABEL_23:
} }
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
//----- (00416565) --------------------------------------------------------
void __fastcall CelDecodeLightOnly(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width) void __fastcall CelDecodeLightOnly(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width)
{ {
int v5; // ebx int v5; // ebx
@ -457,7 +438,6 @@ void __fastcall CelDecodeLightOnly(int screen_x, int screen_y, char *pCelBuff, i
} }
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
//----- (004165BD) --------------------------------------------------------
void __fastcall CelDecodeHdrLightOnly(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int always_0, int direction) void __fastcall CelDecodeHdrLightOnly(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int always_0, int direction)
{ {
int v7; // esi int v7; // esi
@ -500,7 +480,6 @@ void __fastcall CelDecodeHdrLightOnly(int screen_x, int screen_y, char *pCelBuff
} }
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
//----- (0041664B) --------------------------------------------------------
void __fastcall CelDecodeHdrLightTrans(char *pBuff, char *pCelBuff, int frame, int frame_width, int always_0, int direction) void __fastcall CelDecodeHdrLightTrans(char *pBuff, char *pCelBuff, int frame, int frame_width, int always_0, int direction)
{ {
char *v6; // eax char *v6; // eax
@ -546,7 +525,6 @@ void __fastcall CelDecodeHdrLightTrans(char *pBuff, char *pCelBuff, int frame, i
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
// 69CF94: using guessed type int cel_transparency_active; // 69CF94: using guessed type int cel_transparency_active;
//----- (004166BF) --------------------------------------------------------
void __fastcall CelDrawHdrLightRed(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int always_0, int direction, char always_1) void __fastcall CelDrawHdrLightRed(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int always_0, int direction, char always_1)
{ {
char *v8; // esi char *v8; // esi
@ -642,7 +620,6 @@ LABEL_20:
} }
// 525728: using guessed type int light4flag; // 525728: using guessed type int light4flag;
//----- (004167DB) --------------------------------------------------------
void __fastcall Cel2DecDatOnly(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width) void __fastcall Cel2DecDatOnly(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width)
{ {
char *v4; // esi char *v4; // esi
@ -706,7 +683,6 @@ LABEL_17:
} }
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (0041685A) --------------------------------------------------------
void __fastcall Cel2DrawHdrOnly(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int a6, int direction) void __fastcall Cel2DrawHdrOnly(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int a6, int direction)
{ {
int v7; // edx int v7; // edx
@ -741,7 +717,6 @@ void __fastcall Cel2DrawHdrOnly(int screen_x, int screen_y, char *pCelBuff, int
} }
} }
//----- (004168D5) --------------------------------------------------------
void __fastcall Cel2DecodeHdrOnly(char *pBuff, char *pCelBuff, int frame, int frame_width, int a5, int direction) void __fastcall Cel2DecodeHdrOnly(char *pBuff, char *pCelBuff, int frame, int frame_width, int a5, int direction)
{ {
int v6; // edi int v6; // edi
@ -774,7 +749,6 @@ void __fastcall Cel2DecodeHdrOnly(char *pBuff, char *pCelBuff, int frame, int fr
} }
} }
//----- (0041692A) --------------------------------------------------------
void __fastcall Cel2DecDatLightOnly(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width) void __fastcall Cel2DecDatLightOnly(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width)
{ {
char *v4; // esi char *v4; // esi
@ -828,7 +802,6 @@ LABEL_13:
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (004169BC) --------------------------------------------------------
void __fastcall Cel2DecDatLightEntry(int a1, int a2) void __fastcall Cel2DecDatLightEntry(int a1, int a2)
{ {
int v2; // ebx int v2; // ebx
@ -882,7 +855,6 @@ void __fastcall Cel2DecDatLightEntry(int a1, int a2)
} }
} }
//----- (00416A21) --------------------------------------------------------
void __fastcall Cel2DecDatLightTrans(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width) void __fastcall Cel2DecDatLightTrans(char *pDecodeTo, char *pRLEBytes, int frame_content_size, int frame_width)
{ {
char *v4; // esi char *v4; // esi
@ -1037,7 +1009,6 @@ LABEL_26:
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00416B19) --------------------------------------------------------
void __fastcall Cel2DecodeHdrLight(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int a6, int direction) void __fastcall Cel2DecodeHdrLight(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int a6, int direction)
{ {
int v7; // esi int v7; // esi
@ -1084,7 +1055,6 @@ void __fastcall Cel2DecodeHdrLight(int screen_x, int screen_y, char *pCelBuff, i
} }
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
//----- (00416BA9) --------------------------------------------------------
void __fastcall Cel2DecodeLightTrans(char *dst_buf, char *pCelBuff, int frame, int frame_width, int a5, int direction) void __fastcall Cel2DecodeLightTrans(char *dst_buf, char *pCelBuff, int frame, int frame_width, int a5, int direction)
{ {
char *v6; // eax char *v6; // eax
@ -1131,7 +1101,6 @@ void __fastcall Cel2DecodeLightTrans(char *dst_buf, char *pCelBuff, int frame, i
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
// 69CF94: using guessed type int cel_transparency_active; // 69CF94: using guessed type int cel_transparency_active;
//----- (00416C1B) --------------------------------------------------------
void __fastcall Cel2DrawHdrLightRed(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int always_0, int direction, char always_1) void __fastcall Cel2DrawHdrLightRed(int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int always_0, int direction, char always_1)
{ {
char *v8; // esi char *v8; // esi
@ -1234,7 +1203,6 @@ LABEL_21:
// 525728: using guessed type int light4flag; // 525728: using guessed type int light4flag;
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00416D3C) --------------------------------------------------------
void __fastcall CelDecodeRect(char *pBuff, int always_0, int dst_height, int dst_width, char *pCelBuff, int frame, int frame_width) void __fastcall CelDecodeRect(char *pBuff, int always_0, int dst_height, int dst_width, char *pCelBuff, int frame, int frame_width)
{ {
char *v7; // ebx char *v7; // ebx
@ -1301,7 +1269,6 @@ LABEL_14:
} }
} }
//----- (00416DC6) --------------------------------------------------------
void __fastcall CelDecodeClr(char colour, int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int a7, int direction) void __fastcall CelDecodeClr(char colour, int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int a7, int direction)
{ {
char *v8; // ebx char *v8; // ebx
@ -1380,7 +1347,6 @@ LABEL_20:
} }
} }
//----- (00416EC0) --------------------------------------------------------
void __fastcall CelDrawHdrClrHL(char colour, int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int a7, int direction) void __fastcall CelDrawHdrClrHL(char colour, int screen_x, int screen_y, char *pCelBuff, int frame, int frame_width, int a7, int direction)
{ {
char *v8; // ebx char *v8; // ebx
@ -1490,7 +1456,6 @@ LABEL_28:
} }
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00416FEF) --------------------------------------------------------
void __fastcall ENG_set_pixel(int screen_x, int screen_y, char pixel) void __fastcall ENG_set_pixel(int screen_x, int screen_y, char pixel)
{ {
char *v3; // edi char *v3; // edi
@ -1504,7 +1469,6 @@ void __fastcall ENG_set_pixel(int screen_x, int screen_y, char pixel)
} }
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00417034) --------------------------------------------------------
void __fastcall engine_draw_pixel(int x, int y) void __fastcall engine_draw_pixel(int x, int y)
{ {
_BYTE *v2; // eax _BYTE *v2; // eax
@ -1531,7 +1495,6 @@ LABEL_14:
// 52B99C: using guessed type int dword_52B99C; // 52B99C: using guessed type int dword_52B99C;
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (004170BD) --------------------------------------------------------
void __fastcall engine_draw_automap_pixels(int x1, int y1, int x2, int y2, char a5) void __fastcall engine_draw_automap_pixels(int x1, int y1, int x2, int y2, char a5)
{ {
int v5; // edi int v5; // edi
@ -1544,35 +1507,23 @@ void __fastcall engine_draw_automap_pixels(int x1, int y1, int x2, int y2, char
int v12; // edx int v12; // edx
int v13; // eax int v13; // eax
int v14; // esi int v14; // esi
int v15; // edi int v15; // edi MAPDST
__int64 v16; // rax __int64 v16; // rax
int v17; // ebx int v17; // ebx
int v18; // esi int v18; // esi
//int v19; // edx
//int v20; // edx
int v21; // edx
int v22; // edx
int v23; // edx
int v24; // esi int v24; // esi
int v25; // edx
int v26; // ecx int v26; // ecx
int v27; // esi int v27; // esi
int v28; // edx
int v29; // edx int v29; // edx
int v30; // esi int v30; // esi
int v31; // ebx int v31; // ebx
int v32; // edi int v32; // edi
int v33; // ebx int v33; // ebx
int v34; // edx
int v35; // eax int v35; // eax
int v36; // edx
int v37; // edx
//int v38; // edx
int v39; // edi int v39; // edi
int v40; // esi int v40; // esi
int v41; // esi int v41; // esi
int v42; // esi int v42; // esi
//int v43; // edx
int v44; // [esp+Ch] [ebp-18h] int v44; // [esp+Ch] [ebp-18h]
int v45; // [esp+10h] [ebp-14h] int v45; // [esp+10h] [ebp-14h]
int v46; // [esp+14h] [ebp-10h] int v46; // [esp+14h] [ebp-10h]
@ -1585,7 +1536,7 @@ void __fastcall engine_draw_automap_pixels(int x1, int y1, int x2, int y2, char
int v53; // [esp+1Ch] [ebp-8h] int v53; // [esp+1Ch] [ebp-8h]
signed int v54; // [esp+20h] [ebp-4h] signed int v54; // [esp+20h] [ebp-4h]
int xa; // [esp+2Ch] [ebp+8h] int xa; // [esp+2Ch] [ebp+8h]
int x; // [esp+2Ch] [ebp+8h] int x; // [esp+2Ch] [ebp+8h] MAPDST
signed int a4; // [esp+30h] [ebp+Ch] signed int a4; // [esp+30h] [ebp+Ch]
int a5a; // [esp+34h] [ebp+10h] int a5a; // [esp+34h] [ebp+10h]
int a5b; // [esp+34h] [ebp+10h] int a5b; // [esp+34h] [ebp+10h]
@ -1671,7 +1622,7 @@ void __fastcall engine_draw_automap_pixels(int x1, int y1, int x2, int y2, char
v15 += a4; v15 += a4;
engine_draw_pixel(v30, v15); engine_draw_pixel(v30, v15);
v14 = v30 + 1; v14 = v30 + 1;
engine_draw_pixel(v14, v15); /* fix */ engine_draw_pixel(v14, v15);
x -= a4; x -= a4;
engine_draw_pixel(v31, x); engine_draw_pixel(v31, x);
} }
@ -1682,12 +1633,11 @@ void __fastcall engine_draw_automap_pixels(int x1, int y1, int x2, int y2, char
v14 = v30 + 1; v14 = v30 + 1;
engine_draw_pixel(v14, v15); engine_draw_pixel(v14, v15);
engine_draw_pixel(v31, x); engine_draw_pixel(v31, x);
v37 = v36 - a4; /* fix */ x -= a4;
x = v37;
} }
v33 = a5a - 2; v33 = a5a - 2;
a5a = v33; a5a = v33;
engine_draw_pixel(v33, x); /* fix */ engine_draw_pixel(v33, x);
v35 = v44; v35 = v44;
} }
else else
@ -1700,8 +1650,8 @@ void __fastcall engine_draw_automap_pixels(int x1, int y1, int x2, int y2, char
engine_draw_pixel(v31, x - a4); engine_draw_pixel(v31, x - a4);
v33 = a5a - 2; v33 = a5a - 2;
a5a = v33; a5a = v33;
x = v34 - a4; /* fix */ x -= a4;
engine_draw_pixel(v33, v34 - a4); engine_draw_pixel(v33, x);
v35 = 2 * v50; v35 = 2 * v50;
} }
v53 += v35; v53 += v35;
@ -1727,7 +1677,7 @@ void __fastcall engine_draw_automap_pixels(int x1, int y1, int x2, int y2, char
v42 = v14 + 1; v42 = v14 + 1;
engine_draw_pixel(v42, a4 + v15); engine_draw_pixel(v42, a4 + v15);
if ( v54 > 1 ) if ( v54 > 1 )
engine_draw_pixel(v42 + 1, a4 + v15); /* fix */ engine_draw_pixel(v42 + 1, v15);
if ( v54 <= 2 ) if ( v54 <= 2 )
return; return;
if ( v53 > v50 ) if ( v53 > v50 )
@ -1768,7 +1718,7 @@ LABEL_64:
v15 += a4; v15 += a4;
engine_draw_pixel(v18, v15); engine_draw_pixel(v18, v15);
v14 = v18 + 1; v14 = v18 + 1;
engine_draw_pixel(v14, v23); /* fix */ engine_draw_pixel(v14, v15);
x -= a4; x -= a4;
engine_draw_pixel(a5b, x); engine_draw_pixel(a5b, x);
} }
@ -1779,21 +1729,20 @@ LABEL_64:
v14 = v18 + 1; v14 = v18 + 1;
engine_draw_pixel(v14, v15); engine_draw_pixel(v14, v15);
engine_draw_pixel(a5b, x); engine_draw_pixel(a5b, x);
v22 = v21 - a4; /* fix */ x -= a4;
x = v22;
} }
a5a = a5b - 1; a5a = a5b - 1;
engine_draw_pixel(a5a, v22); engine_draw_pixel(a5a, x);
v17 += v44; v17 += v44;
} }
else else
{ {
engine_draw_pixel(v18, v15); engine_draw_pixel(v18, v15);
v14 = v18 + 1; v14 = v18 + 1;
engine_draw_pixel(v14, v15); /* fix */ engine_draw_pixel(v14, v15);
engine_draw_pixel(a5b, x); engine_draw_pixel(a5b, x);
a5a = a5b - 1; a5a = a5b - 1;
engine_draw_pixel(a5a, v15); /* fix */ engine_draw_pixel(a5a, x);
v17 += v52; v17 += v52;
} }
--v47; --v47;
@ -1816,9 +1765,9 @@ LABEL_64:
engine_draw_pixel(v24, v15); engine_draw_pixel(v24, v15);
if ( v54 > 1 ) if ( v54 > 1 )
{ {
v25 = v15 + a4; v15 += a4;
LABEL_36: LABEL_36:
engine_draw_pixel(v24 + 1, v15); /* fix */ engine_draw_pixel(v24 + 1, v15);
} }
LABEL_37: LABEL_37:
if ( v54 <= 2 ) if ( v54 <= 2 )
@ -1829,7 +1778,7 @@ LABEL_37:
v27 = v14 + 1; v27 = v14 + 1;
engine_draw_pixel(v27, a4 + v15); engine_draw_pixel(v27, a4 + v15);
if ( v54 > 1 ) if ( v54 > 1 )
engine_draw_pixel(v27 + 1, v28); /* fix */ engine_draw_pixel(v27 + 1, v15);
if ( v54 > 2 ) if ( v54 > 2 )
{ {
v29 = x - a4; v29 = x - a4;
@ -1844,7 +1793,6 @@ LABEL_65:
// 52B970: using guessed type int dword_52B970; // 52B970: using guessed type int dword_52B970;
// 52B99C: using guessed type int dword_52B99C; // 52B99C: using guessed type int dword_52B99C;
//----- (004174B3) --------------------------------------------------------
int __fastcall GetDirection(int x1, int y1, int x2, int y2) int __fastcall GetDirection(int x1, int y1, int x2, int y2)
{ {
int v4; // esi int v4; // esi
@ -1898,7 +1846,6 @@ int __fastcall GetDirection(int x1, int y1, int x2, int y2)
return result; return result;
} }
//----- (00417518) --------------------------------------------------------
void __fastcall SetRndSeed(int s) void __fastcall SetRndSeed(int s)
{ {
SeedCount = 0; SeedCount = 0;
@ -1909,7 +1856,6 @@ void __fastcall SetRndSeed(int s)
// 52B97C: using guessed type int sglGameSeed; // 52B97C: using guessed type int sglGameSeed;
// 52B998: using guessed type int SeedCount; // 52B998: using guessed type int SeedCount;
//----- (0041752C) --------------------------------------------------------
int __cdecl GetRndSeed() int __cdecl GetRndSeed()
{ {
++SeedCount; ++SeedCount;
@ -1919,7 +1865,6 @@ int __cdecl GetRndSeed()
// 52B97C: using guessed type int sglGameSeed; // 52B97C: using guessed type int sglGameSeed;
// 52B998: using guessed type int SeedCount; // 52B998: using guessed type int SeedCount;
//----- (0041754B) --------------------------------------------------------
int __fastcall random(int idx, int v) int __fastcall random(int idx, int v)
{ {
int v2; // esi int v2; // esi
@ -1934,7 +1879,6 @@ int __fastcall random(int idx, int v)
return v4 % v2; return v4 % v2;
} }
//----- (0041756D) --------------------------------------------------------
struct engine_cpp_init_2 struct engine_cpp_init_2
{ {
engine_cpp_init_2() engine_cpp_init_2()
@ -1944,25 +1888,21 @@ struct engine_cpp_init_2
} }
} _engine_cpp_init_2; } _engine_cpp_init_2;
//----- (00417577) --------------------------------------------------------
void __cdecl mem_init_mutex() void __cdecl mem_init_mutex()
{ {
InitializeCriticalSection(&sgMemCrit); InitializeCriticalSection(&sgMemCrit);
} }
//----- (00417583) --------------------------------------------------------
void __cdecl mem_atexit_mutex() void __cdecl mem_atexit_mutex()
{ {
atexit(mem_free_mutex); atexit(mem_free_mutex);
} }
//----- (0041758F) --------------------------------------------------------
void __cdecl mem_free_mutex() void __cdecl mem_free_mutex()
{ {
DeleteCriticalSection(&sgMemCrit); DeleteCriticalSection(&sgMemCrit);
} }
//----- (0041759B) --------------------------------------------------------
void *__fastcall DiabloAllocPtr(int dwBytes) void *__fastcall DiabloAllocPtr(int dwBytes)
{ {
int v1; // ebx int v1; // ebx
@ -1981,7 +1921,6 @@ void *__fastcall DiabloAllocPtr(int dwBytes)
return v2; return v2;
} }
//----- (004175E8) --------------------------------------------------------
void __fastcall mem_free_dbg(void *ptr) void __fastcall mem_free_dbg(void *ptr)
{ {
void *v1; // edi void *v1; // edi
@ -1995,7 +1934,6 @@ void __fastcall mem_free_dbg(void *ptr)
} }
} }
//----- (00417618) --------------------------------------------------------
unsigned char *__fastcall LoadFileInMem(char *pszName, int *pdwFileLen) unsigned char *__fastcall LoadFileInMem(char *pszName, int *pdwFileLen)
{ {
int *v2; // edi int *v2; // edi
@ -2020,7 +1958,6 @@ unsigned char *__fastcall LoadFileInMem(char *pszName, int *pdwFileLen)
return (unsigned char *)v6; return (unsigned char *)v6;
} }
//----- (00417673) --------------------------------------------------------
void __fastcall LoadFileWithMem(char *pszName, void *buf) void __fastcall LoadFileWithMem(char *pszName, void *buf)
{ {
char *v2; // ebx char *v2; // ebx
@ -2040,7 +1977,6 @@ void __fastcall LoadFileWithMem(char *pszName, void *buf)
WCloseFile(a1); WCloseFile(a1);
} }
//----- (004176D2) --------------------------------------------------------
void __fastcall Cl2ApplyTrans(char *p, char *ttbl, int last_frame) void __fastcall Cl2ApplyTrans(char *p, char *ttbl, int last_frame)
{ {
int v3; // eax int v3; // eax
@ -2092,7 +2028,6 @@ void __fastcall Cl2ApplyTrans(char *p, char *ttbl, int last_frame)
} }
} }
//----- (00417745) --------------------------------------------------------
void __fastcall Cl2DecodeFrm1(int x, int y, char *pCelBuff, int nCel, int width, int dir1, int dir2) void __fastcall Cl2DecodeFrm1(int x, int y, char *pCelBuff, int nCel, int width, int dir1, int dir2)
{ {
char *v8; // edx char *v8; // edx
@ -2126,7 +2061,6 @@ void __fastcall Cl2DecodeFrm1(int x, int y, char *pCelBuff, int nCel, int width,
} }
} }
//----- (004177BF) --------------------------------------------------------
void __fastcall Cl2DecDatFrm1(char *buffer, char *frame_content, int a3, int width) /* fix */ void __fastcall Cl2DecDatFrm1(char *buffer, char *frame_content, int a3, int width) /* fix */
{ {
char *v4; // esi char *v4; // esi
@ -2212,7 +2146,6 @@ void __fastcall Cl2DecDatFrm1(char *buffer, char *frame_content, int a3, int wid
while ( v8 ); while ( v8 );
} }
//----- (00417847) --------------------------------------------------------
void __fastcall Cl2DecodeFrm2(char colour, int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a7, int a8) void __fastcall Cl2DecodeFrm2(char colour, int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a7, int a8)
{ {
int v8; // ebx int v8; // ebx
@ -2245,7 +2178,6 @@ void __fastcall Cl2DecodeFrm2(char colour, int screen_x, int screen_y, char *pCe
} }
} }
//----- (004178C5) --------------------------------------------------------
void __fastcall Cl2DecDatFrm2(char *buffer, char *frame_content, int a3, int frame_width, char colour) void __fastcall Cl2DecDatFrm2(char *buffer, char *frame_content, int a3, int frame_width, char colour)
{ {
char *v5; // esi char *v5; // esi
@ -2343,7 +2275,6 @@ LABEL_12:
while ( v9 ); while ( v9 );
} }
//----- (00417981) --------------------------------------------------------
void __fastcall Cl2DecodeFrm3(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7, char a8) void __fastcall Cl2DecodeFrm3(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7, char a8)
{ {
char *v8; // edi char *v8; // edi
@ -2394,7 +2325,6 @@ void __fastcall Cl2DecodeFrm3(int screen_x, int screen_y, char *pCelBuff, int nC
} }
// 525728: using guessed type int light4flag; // 525728: using guessed type int light4flag;
//----- (00417A44) --------------------------------------------------------
void __fastcall Cl2DecDatLightTbl1(char *a1, char *a2, int a3, int a4, char *unused_lindex) /* check 5th arg */ void __fastcall Cl2DecDatLightTbl1(char *a1, char *a2, int a3, int a4, char *unused_lindex) /* check 5th arg */
{ {
char *v5; // esi char *v5; // esi
@ -2483,7 +2413,6 @@ void __fastcall Cl2DecDatLightTbl1(char *a1, char *a2, int a3, int a4, char *unu
} }
// 52B978: using guessed type int sgnWidth; // 52B978: using guessed type int sgnWidth;
//----- (00417AE9) --------------------------------------------------------
void __fastcall Cl2DecodeLightTbl(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7) void __fastcall Cl2DecodeLightTbl(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7)
{ {
int v7; // esi int v7; // esi
@ -2532,7 +2461,6 @@ void __fastcall Cl2DecodeLightTbl(int screen_x, int screen_y, char *pCelBuff, in
} }
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
//----- (00417B83) --------------------------------------------------------
void __fastcall Cl2DecodeFrm4(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7) void __fastcall Cl2DecodeFrm4(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7)
{ {
int v7; // ebx int v7; // ebx
@ -2570,7 +2498,6 @@ void __fastcall Cl2DecodeFrm4(int screen_x, int screen_y, char *pCelBuff, int nC
} }
} }
//----- (00417BFD) --------------------------------------------------------
void __fastcall Cl2DecDatFrm4(char *buffer, char *a2, int a3, int frame_width) void __fastcall Cl2DecDatFrm4(char *buffer, char *a2, int a3, int frame_width)
{ {
char *v4; // esi char *v4; // esi
@ -2664,7 +2591,6 @@ LABEL_12:
} }
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00417C99) --------------------------------------------------------
void __fastcall Cl2DecodeClrHL(char colour, int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a7, int a8) void __fastcall Cl2DecodeClrHL(char colour, int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a7, int a8)
{ {
int v8; // ebx int v8; // ebx
@ -2704,7 +2630,6 @@ void __fastcall Cl2DecodeClrHL(char colour, int screen_x, int screen_y, char *pC
} }
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00417D28) --------------------------------------------------------
void __fastcall Cl2DecDatClrHL(char *dst_buf, char *frame_content, int a3, int frame_width, char colour) void __fastcall Cl2DecDatClrHL(char *dst_buf, char *frame_content, int a3, int frame_width, char colour)
{ {
char *v5; // esi char *v5; // esi
@ -2810,7 +2735,6 @@ LABEL_15:
} }
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00417DF8) --------------------------------------------------------
void __fastcall Cl2DecodeFrm5(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7, char a8) void __fastcall Cl2DecodeFrm5(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7, char a8)
{ {
char *v8; // edi char *v8; // edi
@ -2861,7 +2785,6 @@ void __fastcall Cl2DecodeFrm5(int screen_x, int screen_y, char *pCelBuff, int nC
} }
// 525728: using guessed type int light4flag; // 525728: using guessed type int light4flag;
//----- (00417EBB) --------------------------------------------------------
void __fastcall Cl2DecDatLightTbl2(char *dst_buf, char *a2, int a3, int frame_width, char *a5) /* check 5th arg */ void __fastcall Cl2DecDatLightTbl2(char *dst_buf, char *a2, int a3, int frame_width, char *a5) /* check 5th arg */
{ {
char *v5; // esi char *v5; // esi
@ -2958,7 +2881,6 @@ LABEL_12:
// 52B978: using guessed type int sgnWidth; // 52B978: using guessed type int sgnWidth;
// 69CF0C: using guessed type int screen_buf_end; // 69CF0C: using guessed type int screen_buf_end;
//----- (00417F78) --------------------------------------------------------
void __fastcall Cl2DecodeFrm6(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7) void __fastcall Cl2DecodeFrm6(int screen_x, int screen_y, char *pCelBuff, int nCel, int frame_width, int a6, int a7)
{ {
int v7; // esi int v7; // esi
@ -3002,7 +2924,6 @@ void __fastcall Cl2DecodeFrm6(int screen_x, int screen_y, char *pCelBuff, int nC
} }
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
//----- (00418012) --------------------------------------------------------
void __fastcall PlayInGameMovie(char *pszMovie) void __fastcall PlayInGameMovie(char *pszMovie)
{ {
char *v1; // esi char *v1; // esi

View File

@ -1,18 +1,10 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __ENGINE_H__
* United States. Use of a copyright notice is precautionary only and #define __ENGINE_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//offset 0 //offset 0
//pCelBuff->pFrameTable[0] //pCelBuff->pFrameTable[0]
//engine
extern int engine_cpp_init_value; // weak extern int engine_cpp_init_value; // weak
extern char byte_52B96C; // automap pixel color 8-bit (palette entry) extern char byte_52B96C; // automap pixel color 8-bit (palette entry)
extern int dword_52B970; // bool flip - if y < x extern int dword_52B970; // bool flip - if y < x
@ -82,3 +74,5 @@ void __fastcall PlayInGameMovie(char *pszMovie);
/* data */ /* data */
extern int engine_inf; // weak extern int engine_inf; // weak
#endif /* __ENGINE_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -64,7 +55,6 @@ char *MsgStrings[44] =
"Arcane knowledge gained!" "Arcane knowledge gained!"
}; };
//----- (0041804E) --------------------------------------------------------
void __fastcall InitDiabloMsg(char e) void __fastcall InitDiabloMsg(char e)
{ {
int i; // edx int i; // edx
@ -96,7 +86,6 @@ LABEL_4:
// 52B9F1: using guessed type char msgflag; // 52B9F1: using guessed type char msgflag;
// 52B9F2: using guessed type char msgcnt; // 52B9F2: using guessed type char msgcnt;
//----- (0041808F) --------------------------------------------------------
void __cdecl ClrDiabloMsg() void __cdecl ClrDiabloMsg()
{ {
msgflag = 0; msgflag = 0;
@ -106,7 +95,6 @@ void __cdecl ClrDiabloMsg()
// 52B9F1: using guessed type char msgflag; // 52B9F1: using guessed type char msgflag;
// 52B9F2: using guessed type char msgcnt; // 52B9F2: using guessed type char msgcnt;
//----- (004180AA) --------------------------------------------------------
void __cdecl DrawDiabloMsg() void __cdecl DrawDiabloMsg()
{ {
int v0; // esi int v0; // esi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __ERROR_H__
* United States. Use of a copyright notice is precautionary only and #define __ERROR_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//error
extern char msgtable[80]; extern char msgtable[80];
extern char msgdelay; // weak extern char msgdelay; // weak
extern char msgflag; // weak extern char msgflag; // weak
@ -21,3 +13,5 @@ void __cdecl DrawDiabloMsg();
/* data */ /* data */
extern char *MsgStrings[44]; extern char *MsgStrings[44];
#endif /* __ERROR_H__ */

View File

@ -1,19 +1,9 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter; // idb LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter; // idb
//----- (004182AD) --------------------------------------------------------
struct exception_cpp_init struct exception_cpp_init
{ {
exception_cpp_init() exception_cpp_init()
@ -23,25 +13,21 @@ struct exception_cpp_init
} }
} _exception_cpp_init; } _exception_cpp_init;
//----- (004182B7) --------------------------------------------------------
void __cdecl exception_install_filter() void __cdecl exception_install_filter()
{ {
exception_set_filter(); exception_set_filter();
} }
//----- (004182C1) --------------------------------------------------------
void __cdecl j_exception_init_filter() void __cdecl j_exception_init_filter()
{ {
atexit(exception_init_filter); atexit(exception_init_filter);
} }
//----- (004182CD) --------------------------------------------------------
void __cdecl exception_init_filter() void __cdecl exception_init_filter()
{ {
exception_set_filter_ptr(); exception_set_filter_ptr();
} }
//----- (004182D7) --------------------------------------------------------
LONG __stdcall TopLevelExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo) LONG __stdcall TopLevelExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo)
{ {
PEXCEPTION_RECORD v1; // esi PEXCEPTION_RECORD v1; // esi
@ -87,16 +73,15 @@ LONG __stdcall TopLevelExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo
return result; return result;
} }
//----- (00418455) --------------------------------------------------------
void __fastcall exception_hex_format(char *a1, char a2) void __fastcall exception_hex_format(char *a1, char a2)
{ {
unsigned int v2; // ebp unsigned int v2; // ebp
char *v3; // edi char *v3; // edi
UINT_PTR v4; // ebx unsigned int v4; // ebx
unsigned int v5; // esi unsigned int v5; // esi
char *v6; // eax char *v6; // eax
int v7; // ST04_4 int v7; // ST04_4
UINT_PTR v8; // esi unsigned int v8; // esi
unsigned char v9; // al unsigned char v9; // al
v2 = a2; v2 = a2;
@ -147,7 +132,6 @@ void __fastcall exception_hex_format(char *a1, char a2)
log_printf("\r\n"); log_printf("\r\n");
} }
//----- (00418518) --------------------------------------------------------
void __fastcall exception_unknown_module(LPCVOID lpAddress, LPSTR lpString1, int iMaxLength, int a4, int a5) void __fastcall exception_unknown_module(LPCVOID lpAddress, LPSTR lpString1, int iMaxLength, int a4, int a5)
{ {
int v6; // eax int v6; // eax
@ -217,7 +201,6 @@ void __fastcall exception_unknown_module(LPCVOID lpAddress, LPSTR lpString1, int
} }
} }
//----- (004185FF) --------------------------------------------------------
void __fastcall exception_call_stack(void *a1, LPVOID lp) void __fastcall exception_call_stack(void *a1, LPVOID lp)
{ {
_DWORD *v2; // ebx _DWORD *v2; // ebx
@ -229,7 +212,7 @@ void __fastcall exception_call_stack(void *a1, LPVOID lp)
v2 = (unsigned int *)lp; v2 = (unsigned int *)lp;
v3 = a1; v3 = a1;
log_printf("Call stack:\r\nAddress Frame Logical addr Module\r\n"); log_printf("Call stack:\r\nAddress Frame Logical addr Module\r\n");
do do
{ {
exception_unknown_module(v3, String1, 260, (int)&a4, (int)&a5); exception_unknown_module(v3, String1, 260, (int)&a4, (int)&a5);
@ -246,7 +229,6 @@ void __fastcall exception_call_stack(void *a1, LPVOID lp)
log_printf("\r\n"); log_printf("\r\n");
} }
//----- (00418688) --------------------------------------------------------
char *__fastcall exception_get_error_type(DWORD dwMessageId, LPSTR lpString1, DWORD nSize) char *__fastcall exception_get_error_type(DWORD dwMessageId, LPSTR lpString1, DWORD nSize)
{ {
CHAR *v3; // esi CHAR *v3; // esi
@ -365,19 +347,16 @@ LABEL_42:
return v3; return v3;
} }
//----- (0041883C) --------------------------------------------------------
void __fastcall exception_set_filter() void __fastcall exception_set_filter()
{ {
lpTopLevelExceptionFilter = SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)TopLevelExceptionFilter); lpTopLevelExceptionFilter = SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)TopLevelExceptionFilter);
} }
//----- (00418853) --------------------------------------------------------
LPTOP_LEVEL_EXCEPTION_FILTER __cdecl exception_set_filter_ptr() LPTOP_LEVEL_EXCEPTION_FILTER __cdecl exception_set_filter_ptr()
{ {
return SetUnhandledExceptionFilter(lpTopLevelExceptionFilter); return SetUnhandledExceptionFilter(lpTopLevelExceptionFilter);
} }
//----- (00418860) --------------------------------------------------------
LPTOP_LEVEL_EXCEPTION_FILTER __cdecl exception_get_filter() LPTOP_LEVEL_EXCEPTION_FILTER __cdecl exception_get_filter()
{ {
return lpTopLevelExceptionFilter; return lpTopLevelExceptionFilter;

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __FAULT_H__
* United States. Use of a copyright notice is precautionary only and #define __FAULT_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//fault
//int dword_52B9F4; //int dword_52B9F4;
extern LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter; // idb extern LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter; // idb
@ -25,3 +17,5 @@ char *__fastcall exception_get_error_type(DWORD dwMessageId, LPSTR lpString1, DW
void __fastcall exception_set_filter(); void __fastcall exception_set_filter();
LPTOP_LEVEL_EXCEPTION_FILTER __cdecl exception_set_filter_ptr(); LPTOP_LEVEL_EXCEPTION_FILTER __cdecl exception_set_filter_ptr();
LPTOP_LEVEL_EXCEPTION_FILTER __cdecl exception_get_filter(); LPTOP_LEVEL_EXCEPTION_FILTER __cdecl exception_get_filter();
#endif /* __FAULT_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -41,7 +32,6 @@ char *music_toggle_names[] = { "Music", "Music Disabled" };
char *sound_toggle_names[] = { "Sound", "Sound Disabled" }; char *sound_toggle_names[] = { "Sound", "Sound Disabled" };
char *color_cycling_toggle_names[] = { "Color Cycling Off", "Color Cycling On" }; char *color_cycling_toggle_names[] = { "Color Cycling Off", "Color Cycling On" };
//----- (00418866) --------------------------------------------------------
void __cdecl gamemenu_previous() void __cdecl gamemenu_previous()
{ {
void (__cdecl *v0)(); // edx void (__cdecl *v0)(); // edx
@ -62,7 +52,6 @@ void __cdecl gamemenu_previous()
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0041888F) --------------------------------------------------------
void __cdecl gamemenu_enable_single() void __cdecl gamemenu_enable_single()
{ {
bool v0; // dl bool v0; // dl
@ -74,19 +63,16 @@ void __cdecl gamemenu_enable_single()
gmenu_enable(sgSingleMenu, v0); gmenu_enable(sgSingleMenu, v0);
} }
//----- (004188C8) --------------------------------------------------------
void __cdecl gamemenu_enable_multi() void __cdecl gamemenu_enable_multi()
{ {
gmenu_enable(&sgMultiMenu[2], deathflag); gmenu_enable(&sgMultiMenu[2], deathflag);
} }
//----- (004188D8) --------------------------------------------------------
void __cdecl gamemenu_off() void __cdecl gamemenu_off()
{ {
gmenu_call_proc(0, 0); gmenu_call_proc(0, 0);
} }
//----- (004188E1) --------------------------------------------------------
void __cdecl gamemenu_handle_previous() void __cdecl gamemenu_handle_previous()
{ {
if ( gmenu_exception() ) if ( gmenu_exception() )
@ -95,7 +81,6 @@ void __cdecl gamemenu_handle_previous()
gamemenu_previous(); gamemenu_previous();
} }
//----- (004188F9) --------------------------------------------------------
void __cdecl gamemenu_new_game() void __cdecl gamemenu_new_game()
{ {
int i; // eax int i; // eax
@ -115,7 +100,6 @@ void __cdecl gamemenu_new_game()
// 525650: using guessed type int gbRunGame; // 525650: using guessed type int gbRunGame;
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0041893B) --------------------------------------------------------
void __cdecl gamemenu_quit_game() void __cdecl gamemenu_quit_game()
{ {
gamemenu_new_game(); gamemenu_new_game();
@ -123,7 +107,6 @@ void __cdecl gamemenu_quit_game()
} }
// 525698: using guessed type int gbRunGameResult; // 525698: using guessed type int gbRunGameResult;
//----- (00418948) --------------------------------------------------------
void __cdecl gamemenu_load_game() void __cdecl gamemenu_load_game()
{ {
LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi
@ -147,7 +130,6 @@ void __cdecl gamemenu_load_game()
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (004189BE) --------------------------------------------------------
void __cdecl gamemenu_save_game() void __cdecl gamemenu_save_game()
{ {
LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi
@ -177,13 +159,11 @@ void __cdecl gamemenu_save_game()
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (00418A42) --------------------------------------------------------
void __cdecl gamemenu_restart_town() void __cdecl gamemenu_restart_town()
{ {
NetSendCmd(1u, CMD_RETOWN); NetSendCmd(1u, CMD_RETOWN);
} }
//----- (00418A4C) --------------------------------------------------------
void __cdecl gamemenu_options() void __cdecl gamemenu_options()
{ {
gamemenu_get_music(); gamemenu_get_music();
@ -193,13 +173,11 @@ void __cdecl gamemenu_options()
gmenu_call_proc(sgOptionMenu, 0); gmenu_call_proc(sgOptionMenu, 0);
} }
//----- (00418A6C) --------------------------------------------------------
void __cdecl gamemenu_get_music() void __cdecl gamemenu_get_music()
{ {
gamemenu_sound_music_toggle(music_toggle_names, sgOptionMenu, sound_get_or_set_music_volume(1)); gamemenu_sound_music_toggle(music_toggle_names, sgOptionMenu, sound_get_or_set_music_volume(1));
} }
//----- (00418A85) --------------------------------------------------------
void __fastcall gamemenu_sound_music_toggle(char **names, TMenuItem *menu_item, int gamma) void __fastcall gamemenu_sound_music_toggle(char **names, TMenuItem *menu_item, int gamma)
{ {
if ( gbSndInited ) if ( gbSndInited )
@ -216,26 +194,22 @@ void __fastcall gamemenu_sound_music_toggle(char **names, TMenuItem *menu_item,
} }
} }
//----- (00418AC6) --------------------------------------------------------
void __cdecl gamemenu_get_sound() void __cdecl gamemenu_get_sound()
{ {
gamemenu_sound_music_toggle(sound_toggle_names, &sgOptionMenu[1], sound_get_or_set_sound_volume(1)); gamemenu_sound_music_toggle(sound_toggle_names, &sgOptionMenu[1], sound_get_or_set_sound_volume(1));
} }
//----- (00418ADF) --------------------------------------------------------
void __cdecl gamemenu_get_color_cycling() void __cdecl gamemenu_get_color_cycling()
{ {
sgOptionMenu[3].pszStr = color_cycling_toggle_names[palette_get_colour_cycling()]; sgOptionMenu[3].pszStr = color_cycling_toggle_names[palette_get_colour_cycling()];
} }
//----- (00418AF4) --------------------------------------------------------
void __cdecl gamemenu_get_gamma() void __cdecl gamemenu_get_gamma()
{ {
gmenu_slider_3(&sgOptionMenu[2], 15); gmenu_slider_3(&sgOptionMenu[2], 15);
gmenu_slider_1(&sgOptionMenu[2], 30, 100, palette_update_gamma(0)); gmenu_slider_1(&sgOptionMenu[2], 30, 100, palette_update_gamma(0));
} }
//----- (00418B1A) --------------------------------------------------------
void __fastcall gamemenu_music_volume(int a1) void __fastcall gamemenu_music_volume(int a1)
{ {
int v1; // esi int v1; // esi
@ -275,13 +249,11 @@ LABEL_11:
// 4A22D4: using guessed type char gbMusicOn; // 4A22D4: using guessed type char gbMusicOn;
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (00418BA3) --------------------------------------------------------
int __fastcall gamemenu_slider_music_sound(TMenuItem *menu_item) int __fastcall gamemenu_slider_music_sound(TMenuItem *menu_item)
{ {
return gmenu_slider_get(menu_item, -1600, 0); return gmenu_slider_get(menu_item, -1600, 0);
} }
//----- (00418BB0) --------------------------------------------------------
void __fastcall gamemenu_sound_volume(int a1) void __fastcall gamemenu_sound_volume(int a1)
{ {
int v1; // ecx int v1; // ecx
@ -324,7 +296,6 @@ void __fastcall gamemenu_sound_volume(int a1)
} }
// 4A22D5: using guessed type char gbSoundOn; // 4A22D5: using guessed type char gbSoundOn;
//----- (00418C30) --------------------------------------------------------
void __fastcall gamemenu_gamma(int a1) void __fastcall gamemenu_gamma(int a1)
{ {
int v1; // eax int v1; // eax
@ -344,13 +315,11 @@ void __fastcall gamemenu_gamma(int a1)
gamemenu_get_gamma(); gamemenu_get_gamma();
} }
//----- (00418C5A) --------------------------------------------------------
int __cdecl gamemenu_slider_gamma() int __cdecl gamemenu_slider_gamma()
{ {
return gmenu_slider_get(&sgOptionMenu[2], 30, 100); return gmenu_slider_get(&sgOptionMenu[2], 30, 100);
} }
//----- (00418C6A) --------------------------------------------------------
void __cdecl gamemenu_color_cycling() void __cdecl gamemenu_color_cycling()
{ {
palette_set_color_cycling(palette_get_colour_cycling() == 0); palette_set_color_cycling(palette_get_colour_cycling() == 0);

View File

@ -1,13 +1,6 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __GAMEMENU_H__
* United States. Use of a copyright notice is precautionary only and #define __GAMEMENU_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
void __cdecl gamemenu_previous(); void __cdecl gamemenu_previous();
void __cdecl gamemenu_enable_single(); void __cdecl gamemenu_enable_single();
@ -39,3 +32,5 @@ extern TMenuItem sgOptionMenu[6];
extern char *music_toggle_names[]; extern char *music_toggle_names[];
extern char *sound_toggle_names[]; extern char *sound_toggle_names[];
extern char *color_cycling_toggle_names[]; extern char *color_cycling_toggle_names[];
#endif /* __GAMEMENU_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -78,7 +69,6 @@ int dminx; // weak
int dminy; // weak int dminy; // weak
short dpiece_defs_map_2[16][112][112]; short dpiece_defs_map_2[16][112][112];
//----- (00418C8B) --------------------------------------------------------
void __cdecl FillSolidBlockTbls() void __cdecl FillSolidBlockTbls()
{ {
unsigned char *v0; // eax unsigned char *v0; // eax
@ -146,7 +136,6 @@ LABEL_13:
} }
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (00418D91) --------------------------------------------------------
void __cdecl gendung_418D91() void __cdecl gendung_418D91()
{ {
signed int v0; // edx signed int v0; // edx
@ -505,7 +494,6 @@ LABEL_66:
// 53CD4C: using guessed type int nlevel_frames; // 53CD4C: using guessed type int nlevel_frames;
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (004191BF) --------------------------------------------------------
void __fastcall gendung_4191BF(int frames) void __fastcall gendung_4191BF(int frames)
{ {
int v1; // edi int v1; // edi
@ -529,7 +517,6 @@ void __fastcall gendung_4191BF(int frames)
} }
} }
//----- (004191FB) --------------------------------------------------------
void __fastcall gendung_4191FB(int a1, int a2) void __fastcall gendung_4191FB(int a1, int a2)
{ {
int v2; // esi int v2; // esi
@ -563,7 +550,6 @@ void __fastcall gendung_4191FB(int a1, int a2)
*(int *)((char *)level_frame_sizes + v2) = v10; *(int *)((char *)level_frame_sizes + v2) = v10;
} }
//----- (0041927A) --------------------------------------------------------
int __fastcall gendung_get_dpiece_num_from_coord(int x, int y) int __fastcall gendung_get_dpiece_num_from_coord(int x, int y)
{ {
__int64 v3; // rax __int64 v3; // rax
@ -574,7 +560,6 @@ int __fastcall gendung_get_dpiece_num_from_coord(int x, int y)
return 12543 - (((signed int)v3 - HIDWORD(v3)) >> 1); return 12543 - (((signed int)v3 - HIDWORD(v3)) >> 1);
} }
//----- (004192C2) --------------------------------------------------------
void __cdecl gendung_4192C2() void __cdecl gendung_4192C2()
{ {
short (*v0)[112][112]; // ebx short (*v0)[112][112]; // ebx
@ -601,7 +586,6 @@ void __cdecl gendung_4192C2()
while ( (signed int)v0 < (signed int)&dpiece_defs_map_2[16][0][0] ); while ( (signed int)v0 < (signed int)&dpiece_defs_map_2[16][0][0] );
} }
//----- (0041930B) --------------------------------------------------------
void __cdecl SetDungeonMicros() void __cdecl SetDungeonMicros()
{ {
signed int v0; // esi signed int v0; // esi
@ -688,7 +672,6 @@ void __cdecl SetDungeonMicros()
// 5C3000: using guessed type int scr_pix_width; // 5C3000: using guessed type int scr_pix_width;
// 5C3004: using guessed type int scr_pix_height; // 5C3004: using guessed type int scr_pix_height;
//----- (0041944A) --------------------------------------------------------
void __cdecl DRLG_InitTrans() void __cdecl DRLG_InitTrans()
{ {
memset(dung_map, 0, 0x3100u); memset(dung_map, 0, 0x3100u);
@ -697,7 +680,6 @@ void __cdecl DRLG_InitTrans()
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (00419477) --------------------------------------------------------
void __fastcall DRLG_MRectTrans(int x1, int y1, int x2, int y2) void __fastcall DRLG_MRectTrans(int x1, int y1, int x2, int y2)
{ {
int v4; // esi int v4; // esi
@ -729,7 +711,6 @@ void __fastcall DRLG_MRectTrans(int x1, int y1, int x2, int y2)
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (004194D0) --------------------------------------------------------
void __fastcall DRLG_RectTrans(int x1, int y1, int x2, int y2) void __fastcall DRLG_RectTrans(int x1, int y1, int x2, int y2)
{ {
int i; // esi int i; // esi
@ -755,13 +736,11 @@ void __fastcall DRLG_RectTrans(int x1, int y1, int x2, int y2)
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (00419515) --------------------------------------------------------
void __fastcall DRLG_CopyTrans(int sx, int sy, int dx, int dy) void __fastcall DRLG_CopyTrans(int sx, int sy, int dx, int dy)
{ {
dung_map[dx][dy] = dung_map[sx][sy]; dung_map[dx][dy] = dung_map[sx][sy];
} }
//----- (00419534) --------------------------------------------------------
void __fastcall DRLG_ListTrans(int num, unsigned char *List) void __fastcall DRLG_ListTrans(int num, unsigned char *List)
{ {
unsigned char *v2; // esi unsigned char *v2; // esi
@ -791,7 +770,6 @@ void __fastcall DRLG_ListTrans(int num, unsigned char *List)
} }
} }
//----- (00419565) --------------------------------------------------------
void __fastcall DRLG_AreaTrans(int num, unsigned char *List) void __fastcall DRLG_AreaTrans(int num, unsigned char *List)
{ {
unsigned char *v2; // esi unsigned char *v2; // esi
@ -824,7 +802,6 @@ void __fastcall DRLG_AreaTrans(int num, unsigned char *List)
} }
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
//----- (004195A2) --------------------------------------------------------
void __cdecl DRLG_InitSetPC() void __cdecl DRLG_InitSetPC()
{ {
setpc_x = 0; setpc_x = 0;
@ -835,7 +812,6 @@ void __cdecl DRLG_InitSetPC()
// 5CF330: using guessed type int setpc_h; // 5CF330: using guessed type int setpc_h;
// 5CF334: using guessed type int setpc_w; // 5CF334: using guessed type int setpc_w;
//----- (004195B9) --------------------------------------------------------
void __cdecl DRLG_SetPC() void __cdecl DRLG_SetPC()
{ {
int v0; // ebx int v0; // ebx
@ -869,7 +845,6 @@ void __cdecl DRLG_SetPC()
// 5CF330: using guessed type int setpc_h; // 5CF330: using guessed type int setpc_h;
// 5CF334: using guessed type int setpc_w; // 5CF334: using guessed type int setpc_w;
//----- (0041960C) --------------------------------------------------------
void __fastcall Make_SetPC(int x, int y, int w, int h) void __fastcall Make_SetPC(int x, int y, int w, int h)
{ {
int v4; // eax int v4; // eax
@ -901,7 +876,6 @@ void __fastcall Make_SetPC(int x, int y, int w, int h)
} }
} }
//----- (0041965B) --------------------------------------------------------
bool __fastcall DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int maxSize, int *width, int *height) bool __fastcall DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int maxSize, int *width, int *height)
{ {
int v7; // esi int v7; // esi
@ -1047,7 +1021,6 @@ LABEL_32:
// 41965B: using guessed type int var_6C[20]; // 41965B: using guessed type int var_6C[20];
// 41965B: using guessed type int var_BC[20]; // 41965B: using guessed type int var_BC[20];
//----- (004197F4) --------------------------------------------------------
void __fastcall DRLG_CreateThemeRoom(int themeIndex) void __fastcall DRLG_CreateThemeRoom(int themeIndex)
{ {
int v1; // esi int v1; // esi
@ -1282,7 +1255,6 @@ LABEL_53:
} }
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (00419C10) --------------------------------------------------------
void __fastcall DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq, int rndSize) void __fastcall DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq, int rndSize)
{ {
int v5; // ebx int v5; // ebx
@ -1383,7 +1355,6 @@ void __fastcall DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int fr
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (00419D92) --------------------------------------------------------
void __cdecl DRLG_HoldThemeRooms() void __cdecl DRLG_HoldThemeRooms()
{ {
int *v0; // esi int *v0; // esi
@ -1440,7 +1411,6 @@ void __cdecl DRLG_HoldThemeRooms()
} }
} }
//----- (00419E1F) --------------------------------------------------------
bool __fastcall SkipThemeRoom(int x, int y) bool __fastcall SkipThemeRoom(int x, int y)
{ {
int i; // ebx int i; // ebx
@ -1467,7 +1437,6 @@ bool __fastcall SkipThemeRoom(int x, int y)
return 0; return 0;
} }
//----- (00419E71) --------------------------------------------------------
void __cdecl InitLevels() void __cdecl InitLevels()
{ {
if ( !leveldebug ) if ( !leveldebug )

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __GENDUNG_H__
* United States. Use of a copyright notice is precautionary only and #define __GENDUNG_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//gendung
extern short level_frame_types[2048]; extern short level_frame_types[2048];
extern int themeCount; extern int themeCount;
extern char nTransTable[2049]; extern char nTransTable[2049];
@ -99,3 +91,5 @@ void __fastcall DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int fr
void __cdecl DRLG_HoldThemeRooms(); void __cdecl DRLG_HoldThemeRooms();
bool __fastcall SkipThemeRoom(int x, int y); bool __fastcall SkipThemeRoom(int x, int y);
void __cdecl InitLevels(); void __cdecl InitLevels();
#endif /* __GENDUNG_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -50,7 +41,6 @@ unsigned char lfontkern[56] =
11, 10, 12, 11, 21, 23 11, 10, 12, 11, 21, 23
}; };
//----- (00419E8B) --------------------------------------------------------
void __cdecl gmenu_draw_pause() void __cdecl gmenu_draw_pause()
{ {
if ( currlevel ) if ( currlevel )
@ -63,7 +53,6 @@ void __cdecl gmenu_draw_pause()
} }
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
//----- (00419EBE) --------------------------------------------------------
void __fastcall gmenu_print_text(int x, int y, char *pszStr) void __fastcall gmenu_print_text(int x, int y, char *pszStr)
{ {
char *v3; // edi char *v3; // edi
@ -85,7 +74,6 @@ void __fastcall gmenu_print_text(int x, int y, char *pszStr)
} }
} }
//----- (00419F17) --------------------------------------------------------
void __cdecl FreeGMenu() void __cdecl FreeGMenu()
{ {
void *v0; // ecx void *v0; // ecx
@ -111,7 +99,6 @@ void __cdecl FreeGMenu()
mem_free_dbg(v4); mem_free_dbg(v4);
} }
//----- (00419F70) --------------------------------------------------------
void __cdecl gmenu_init_menu() void __cdecl gmenu_init_menu()
{ {
byte_634478 = 1; byte_634478 = 1;
@ -130,13 +117,11 @@ void __cdecl gmenu_init_menu()
// 634478: using guessed type char byte_634478; // 634478: using guessed type char byte_634478;
// 63448C: using guessed type int dword_63448C; // 63448C: using guessed type int dword_63448C;
//----- (00419FE8) --------------------------------------------------------
bool __cdecl gmenu_exception() bool __cdecl gmenu_exception()
{ {
return dword_634480 != 0; return dword_634480 != 0;
} }
//----- (00419FF4) --------------------------------------------------------
void __fastcall gmenu_call_proc(TMenuItem *pItem, void (__cdecl *gmFunc)()) void __fastcall gmenu_call_proc(TMenuItem *pItem, void (__cdecl *gmFunc)())
{ {
TMenuItem *v2; // eax TMenuItem *v2; // eax
@ -172,7 +157,6 @@ void __fastcall gmenu_call_proc(TMenuItem *pItem, void (__cdecl *gmFunc)())
// 634464: using guessed type char byte_634464; // 634464: using guessed type char byte_634464;
// 63448C: using guessed type int dword_63448C; // 63448C: using guessed type int dword_63448C;
//----- (0041A04E) --------------------------------------------------------
void __fastcall gmenu_up_down(int a1) void __fastcall gmenu_up_down(int a1)
{ {
TMenuItem *v1; // eax TMenuItem *v1; // eax
@ -202,7 +186,7 @@ void __fastcall gmenu_up_down(int a1)
} }
sgpCurrItem = v1; sgpCurrItem = v1;
LABEL_10: LABEL_10:
if ( v1->dwFlags < 0 ) if ( (v1->dwFlags & 0x80000000) != 0 )
{ {
if ( v2 ) if ( v2 )
PlaySFX(IS_TITLEMOV); PlaySFX(IS_TITLEMOV);
@ -214,7 +198,6 @@ LABEL_10:
// 634464: using guessed type char byte_634464; // 634464: using guessed type char byte_634464;
// 63448C: using guessed type int dword_63448C; // 63448C: using guessed type int dword_63448C;
//----- (0041A0B6) --------------------------------------------------------
void __cdecl gmenu_draw() void __cdecl gmenu_draw()
{ {
int v0; // edi int v0; // edi
@ -244,7 +227,6 @@ void __cdecl gmenu_draw()
// 634474: using guessed type int dword_634474; // 634474: using guessed type int dword_634474;
// 634478: using guessed type char byte_634478; // 634478: using guessed type char byte_634478;
//----- (0041A145) --------------------------------------------------------
void __fastcall gmenu_draw_menu_item(TMenuItem *pItem, int a2) void __fastcall gmenu_draw_menu_item(TMenuItem *pItem, int a2)
{ {
int v2; // edi int v2; // edi
@ -270,10 +252,10 @@ void __fastcall gmenu_draw_menu_item(TMenuItem *pItem, int a2)
{ {
v6 = (v4 >> 1) + 80; v6 = (v4 >> 1) + 80;
CelDecodeOnly(v6, v2 - 10, optbar_cel, 1, 287); CelDecodeOnly(v6, v2 - 10, optbar_cel, 1, 287);
v7 = ((unsigned int)v3->dwFlags >> 12) & 0xFFF; v7 = (v3->dwFlags >> 12) & 0xFFF;
if ( v7 < 2 ) if ( v7 < 2 )
v7 = 2; v7 = 2;
v8 = ((v3->dwFlags & 0xFFFu) << 8) / v7; v8 = ((v3->dwFlags & 0xFFF) << 8) / v7;
v9 = (v5 >> 1) + 82; v9 = (v5 >> 1) + 82;
v10 = v8; v10 = v8;
gmenu_clear_buffer(v9, v2 - 12, v8 + 13, 28); gmenu_clear_buffer(v9, v2 - 12, v8 + 13, 28);
@ -281,7 +263,7 @@ void __fastcall gmenu_draw_menu_item(TMenuItem *pItem, int a2)
v5 = v14; v5 = v14;
} }
v11 = 384 - (v5 >> 1); v11 = 384 - (v5 >> 1);
v12 = -(v3->dwFlags < 0); v12 = -((v3->dwFlags & 0x80000000) != 0);
_LOBYTE(v12) = v12 & 0xF1; _LOBYTE(v12) = v12 & 0xF1;
light_table_index = v12 + 15; light_table_index = v12 + 15;
gmenu_print_text(384 - (v5 >> 1), v2, v3->pszStr); gmenu_print_text(384 - (v5 >> 1), v2, v3->pszStr);
@ -295,7 +277,6 @@ void __fastcall gmenu_draw_menu_item(TMenuItem *pItem, int a2)
// 634478: using guessed type char byte_634478; // 634478: using guessed type char byte_634478;
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
//----- (0041A239) --------------------------------------------------------
void __fastcall gmenu_clear_buffer(int x, int y, int width, int height) void __fastcall gmenu_clear_buffer(int x, int y, int width, int height)
{ {
int v4; // edi int v4; // edi
@ -309,7 +290,6 @@ void __fastcall gmenu_clear_buffer(int x, int y, int width, int height)
} }
} }
//----- (0041A272) --------------------------------------------------------
int __fastcall gmenu_get_lfont(TMenuItem *pItem) int __fastcall gmenu_get_lfont(TMenuItem *pItem)
{ {
char *v2; // eax char *v2; // eax
@ -329,7 +309,6 @@ int __fastcall gmenu_get_lfont(TMenuItem *pItem)
return i - 2; return i - 2;
} }
//----- (0041A2AE) --------------------------------------------------------
int __fastcall gmenu_presskeys(int a1) int __fastcall gmenu_presskeys(int a1)
{ {
int v1; // ecx int v1; // ecx
@ -340,7 +319,7 @@ int __fastcall gmenu_presskeys(int a1)
switch ( a1 ) switch ( a1 )
{ {
case VK_RETURN: case VK_RETURN:
if ( sgpCurrItem->dwFlags < 0 ) if ( (sgpCurrItem->dwFlags & 0x80000000) != 0 )
{ {
PlaySFX(IS_TITLEMOV); PlaySFX(IS_TITLEMOV);
((void (__fastcall *)(signed int))sgpCurrItem->fnMenu)(1); ((void (__fastcall *)(signed int))sgpCurrItem->fnMenu)(1);
@ -372,11 +351,10 @@ LABEL_10:
return 1; return 1;
} }
//----- (0041A32A) --------------------------------------------------------
void __fastcall gmenu_left_right(int a1) void __fastcall gmenu_left_right(int a1)
{ {
int v1; // edx signed int v1; // edx
int v2; // eax unsigned int v2; // eax
int v3; // eax int v3; // eax
v1 = sgpCurrItem->dwFlags; v1 = sgpCurrItem->dwFlags;
@ -402,7 +380,6 @@ void __fastcall gmenu_left_right(int a1)
} }
} }
//----- (0041A37A) --------------------------------------------------------
int __fastcall gmenu_on_mouse_move(LPARAM lParam) int __fastcall gmenu_on_mouse_move(LPARAM lParam)
{ {
int v2; // edx int v2; // edx
@ -422,7 +399,6 @@ int __fastcall gmenu_on_mouse_move(LPARAM lParam)
// 41A37A: could not find valid save-restore pair for esi // 41A37A: could not find valid save-restore pair for esi
// 634464: using guessed type char byte_634464; // 634464: using guessed type char byte_634464;
//----- (0041A3D2) --------------------------------------------------------
bool __fastcall gmenu_valid_mouse_pos(int *plOffset) bool __fastcall gmenu_valid_mouse_pos(int *plOffset)
{ {
*plOffset = 282; *plOffset = 282;
@ -440,7 +416,6 @@ bool __fastcall gmenu_valid_mouse_pos(int *plOffset)
return 1; return 1;
} }
//----- (0041A401) --------------------------------------------------------
int __fastcall gmenu_left_mouse(int a1) int __fastcall gmenu_left_mouse(int a1)
{ {
int result; // eax int result; // eax
@ -462,7 +437,7 @@ int __fastcall gmenu_left_mouse(int a1)
{ {
v3 = v2; v3 = v2;
v4 = &dword_634480[v3]; v4 = &dword_634480[v3];
if ( v4->dwFlags < 0 ) if ( (v4->dwFlags & 0x80000000) != 0 )
{ {
v5 = (unsigned int)gmenu_get_lfont(&dword_634480[v3]) >> 1; v5 = (unsigned int)gmenu_get_lfont(&dword_634480[v3]) >> 1;
if ( MouseX >= 320 - v5 && MouseX <= v5 + 320 ) if ( MouseX >= 320 - v5 && MouseX <= v5 + 320 )
@ -495,7 +470,6 @@ int __fastcall gmenu_left_mouse(int a1)
// 634464: using guessed type char byte_634464; // 634464: using guessed type char byte_634464;
// 63448C: using guessed type int dword_63448C; // 63448C: using guessed type int dword_63448C;
//----- (0041A4B8) --------------------------------------------------------
void __fastcall gmenu_enable(TMenuItem *pMenuItem, bool enable) void __fastcall gmenu_enable(TMenuItem *pMenuItem, bool enable)
{ {
if ( enable ) if ( enable )
@ -504,10 +478,9 @@ void __fastcall gmenu_enable(TMenuItem *pMenuItem, bool enable)
pMenuItem->dwFlags &= 0x7F000000; pMenuItem->dwFlags &= 0x7F000000;
} }
//----- (0041A4C6) --------------------------------------------------------
void __fastcall gmenu_slider_1(TMenuItem *pItem, int min, int max, int gamma) void __fastcall gmenu_slider_1(TMenuItem *pItem, int min, int max, int gamma)
{ {
int v4; // esi unsigned int v4; // esi
int v5; // eax int v5; // eax
v4 = pItem->dwFlags; v4 = pItem->dwFlags;
@ -518,11 +491,10 @@ void __fastcall gmenu_slider_1(TMenuItem *pItem, int min, int max, int gamma)
pItem->dwFlags = v4 | (v5 * (gamma - min) + (max - min - 1) / 2) / (max - min); pItem->dwFlags = v4 | (v5 * (gamma - min) + (max - min - 1) / 2) / (max - min);
} }
//----- (0041A508) --------------------------------------------------------
int __fastcall gmenu_slider_get(TMenuItem *pItem, int min, int max) int __fastcall gmenu_slider_get(TMenuItem *pItem, int min, int max)
{ {
int v3; // eax int v3; // eax
int v4; // ecx unsigned int v4; // ecx
v3 = (pItem->dwFlags >> 12) & 0xFFF; v3 = (pItem->dwFlags >> 12) & 0xFFF;
v4 = pItem->dwFlags & 0xFFF; v4 = pItem->dwFlags & 0xFFF;
@ -531,7 +503,6 @@ int __fastcall gmenu_slider_get(TMenuItem *pItem, int min, int max)
return min + (v4 * (max - min) + (v3 - 1) / 2) / v3; return min + (v4 * (max - min) + (v3 - 1) / 2) / v3;
} }
//----- (0041A545) --------------------------------------------------------
void __fastcall gmenu_slider_3(TMenuItem *pItem, int dwTicks) void __fastcall gmenu_slider_3(TMenuItem *pItem, int dwTicks)
{ {
pItem->dwFlags ^= (pItem->dwFlags ^ (dwTicks << 12)) & 0xFFF000; pItem->dwFlags ^= (pItem->dwFlags ^ (dwTicks << 12)) & 0xFFF000;

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __GMENU_H__
* United States. Use of a copyright notice is precautionary only and #define __GMENU_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//gmenu
extern void *optbar_cel; extern void *optbar_cel;
extern bool byte_634464; // weak extern bool byte_634464; // weak
extern void *PentSpin_cel; extern void *PentSpin_cel;
@ -48,3 +40,5 @@ void __fastcall gmenu_slider_3(TMenuItem *pItem, int dwTicks);
extern unsigned char lfontframe[127]; extern unsigned char lfontframe[127];
extern unsigned char lfontkern[56]; extern unsigned char lfontkern[56];
#endif /* __GMENU_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -20,7 +11,7 @@ int HelpTop; // weak
char gszHelpText[] = char gszHelpText[] =
{ {
"$Keyboard Shortcuts:|" "$Keyboard Shortcuts:|"
"F1: Open Help Screen|" "F1: Open Help Screen|"
"Esc: Display Main Menu|" "Esc: Display Main Menu|"
"Tab: Display Auto-map|" "Tab: Display Auto-map|"
"Space: Hide all info screens|" "Space: Hide all info screens|"
@ -34,7 +25,7 @@ char gszHelpText[] =
"Z: Zoom Game Screen|" "Z: Zoom Game Screen|"
"+ / -: Zoom Automap|" "+ / -: Zoom Automap|"
"1 - 8: Use Belt item|" "1 - 8: Use Belt item|"
"F5, F6, F7, F8: Set hot key for skill or spell|" "F5, F6, F7, F8: Set hot key for skill or spell|"
"Shift + Left Click: Attack without moving|" "Shift + Left Click: Attack without moving|"
"|" "|"
"$Movement:|" "$Movement:|"
@ -87,7 +78,6 @@ char gszHelpText[] =
"&" "&"
}; };
//----- (0041A553) --------------------------------------------------------
void __cdecl InitHelp() void __cdecl InitHelp()
{ {
helpflag = 0; helpflag = 0;
@ -96,7 +86,6 @@ void __cdecl InitHelp()
} }
// 634494: using guessed type int dword_634494; // 634494: using guessed type int dword_634494;
//----- (0041A565) --------------------------------------------------------
void __cdecl DrawHelp() void __cdecl DrawHelp()
{ {
int v0; // edi int v0; // edi
@ -231,7 +220,6 @@ LABEL_48:
// 634490: using guessed type int help_select_line; // 634490: using guessed type int help_select_line;
// 634960: using guessed type int HelpTop; // 634960: using guessed type int HelpTop;
//----- (0041A6FA) --------------------------------------------------------
void __fastcall DrawHelpLine(int always_0, int help_line_nr, char *text, text_color color) void __fastcall DrawHelpLine(int always_0, int help_line_nr, char *text, text_color color)
{ {
signed int v4; // ebx signed int v4; // ebx
@ -257,7 +245,6 @@ void __fastcall DrawHelpLine(int always_0, int help_line_nr, char *text, text_co
} }
} }
//----- (0041A773) --------------------------------------------------------
void __cdecl DisplayHelp() void __cdecl DisplayHelp()
{ {
help_select_line = 0; help_select_line = 0;
@ -267,7 +254,6 @@ void __cdecl DisplayHelp()
// 634490: using guessed type int help_select_line; // 634490: using guessed type int help_select_line;
// 634960: using guessed type int HelpTop; // 634960: using guessed type int HelpTop;
//----- (0041A78F) --------------------------------------------------------
void __cdecl HelpScrollUp() void __cdecl HelpScrollUp()
{ {
if ( help_select_line > 0 ) if ( help_select_line > 0 )
@ -275,7 +261,6 @@ void __cdecl HelpScrollUp()
} }
// 634490: using guessed type int help_select_line; // 634490: using guessed type int help_select_line;
//----- (0041A79F) --------------------------------------------------------
void __cdecl HelpScrollDown() void __cdecl HelpScrollDown()
{ {
if ( help_select_line < HelpTop ) if ( help_select_line < HelpTop )

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __HELP_H__
* United States. Use of a copyright notice is precautionary only and #define __HELP_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//help
extern int help_select_line; // weak extern int help_select_line; // weak
extern int dword_634494; // weak extern int dword_634494; // weak
extern int helpflag; extern int helpflag;
@ -25,3 +17,5 @@ void __cdecl HelpScrollDown();
/* data */ /* data */
extern char gszHelpText[]; extern char gszHelpText[];
#endif /* __HELP_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -31,7 +22,6 @@ int init_inf = 0x7F800000; // weak
char gszVersionNumber[260] = "internal version unknown"; char gszVersionNumber[260] = "internal version unknown";
char gszProductName[260] = "Diablo v1.09"; char gszProductName[260] = "Diablo v1.09";
//----- (0041A7B8) --------------------------------------------------------
struct init_cpp_init struct init_cpp_init
{ {
init_cpp_init() init_cpp_init()
@ -42,7 +32,6 @@ struct init_cpp_init
// 47AE20: using guessed type int init_inf; // 47AE20: using guessed type int init_inf;
// 63497C: using guessed type int init_cpp_init_value; // 63497C: using guessed type int init_cpp_init_value;
//----- (0041A7C3) --------------------------------------------------------
void __fastcall init_cleanup(bool show_cursor) void __fastcall init_cleanup(bool show_cursor)
{ {
int v1; // edi int v1; // edi
@ -77,7 +66,6 @@ void __fastcall init_cleanup(bool show_cursor)
ShowCursor(1); ShowCursor(1);
} }
//----- (0041A84C) --------------------------------------------------------
void __cdecl init_run_office_from_start_menu() void __cdecl init_run_office_from_start_menu()
{ {
HWND v0; // eax HWND v0; // eax
@ -102,7 +90,6 @@ void __cdecl init_run_office_from_start_menu()
} }
// 634CA0: using guessed type int killed_mom_parent; // 634CA0: using guessed type int killed_mom_parent;
//----- (0041A8B9) --------------------------------------------------------
void __fastcall init_run_office(char *dir) void __fastcall init_run_office(char *dir)
{ {
char *v1; // esi char *v1; // esi
@ -151,39 +138,36 @@ void __fastcall init_run_office(char *dir)
} }
} }
//----- (0041AA2C) --------------------------------------------------------
void __fastcall init_disable_screensaver(bool disable) void __fastcall init_disable_screensaver(bool disable)
{ {
bool v1; // al bool v1; // al
BYTE Data; // [esp+4h] [ebp-20h] char Data[16]; // [esp+4h] [ebp-20h]
char v3; // [esp+5h] [ebp-1Fh]
DWORD Type; // [esp+14h] [ebp-10h] DWORD Type; // [esp+14h] [ebp-10h]
DWORD cbData; // [esp+18h] [ebp-Ch] DWORD cbData; // [esp+18h] [ebp-Ch]
HKEY phkResult; // [esp+1Ch] [ebp-8h] HKEY phkResult; // [esp+1Ch] [ebp-8h]
bool v7; // [esp+20h] [ebp-4h] bool v6; // [esp+20h] [ebp-4h]
v7 = disable; v6 = disable;
if ( !RegOpenKeyExA(HKEY_CURRENT_USER, "Control Panel\\Desktop", 0, KEY_READ|KEY_WRITE, &phkResult) ) if ( !RegOpenKeyExA(HKEY_CURRENT_USER, "Control Panel\\Desktop", 0, KEY_READ|KEY_WRITE, &phkResult) )
{ {
if ( v7 ) if ( v6 )
{ {
cbData = 16; cbData = 16;
if ( !RegQueryValueExA(phkResult, "ScreenSaveActive", 0, &Type, &Data, &cbData) ) if ( !RegQueryValueExA(phkResult, "ScreenSaveActive", 0, &Type, (LPBYTE)Data, &cbData) )
screensaver_enabled_prev = Data != '0'; screensaver_enabled_prev = Data[0] != '0';
v1 = 0; v1 = 0;
} }
else else
{ {
v1 = screensaver_enabled_prev; v1 = screensaver_enabled_prev;
} }
v3 = 0; Data[1] = 0;
Data = (v1 != 0) + '0'; Data[0] = (v1 != 0) + '0';
RegSetValueExA(phkResult, "ScreenSaveActive", 0, REG_SZ, &Data, 2u); RegSetValueExA(phkResult, "ScreenSaveActive", 0, REG_SZ, (const BYTE *)Data, 2u);
RegCloseKey(phkResult); RegCloseKey(phkResult);
} }
} }
//----- (0041AAC5) --------------------------------------------------------
void __cdecl init_create_window() void __cdecl init_create_window()
{ {
int nHeight; // eax int nHeight; // eax
@ -227,7 +211,6 @@ void __cdecl init_create_window()
init_disable_screensaver(1); init_disable_screensaver(1);
} }
//----- (0041AC00) --------------------------------------------------------
void __cdecl init_kill_mom_parent() void __cdecl init_kill_mom_parent()
{ {
HWND v0; // eax HWND v0; // eax
@ -241,7 +224,6 @@ void __cdecl init_kill_mom_parent()
} }
// 634CA0: using guessed type int killed_mom_parent; // 634CA0: using guessed type int killed_mom_parent;
//----- (0041AC21) --------------------------------------------------------
HWND __cdecl init_find_mom_parent() HWND __cdecl init_find_mom_parent()
{ {
HWND i; // eax HWND i; // eax
@ -260,7 +242,6 @@ HWND __cdecl init_find_mom_parent()
return v1; return v1;
} }
//----- (0041AC71) --------------------------------------------------------
void __cdecl init_await_mom_parent_exit() void __cdecl init_await_mom_parent_exit()
{ {
DWORD v0; // edi DWORD v0; // edi
@ -275,7 +256,6 @@ void __cdecl init_await_mom_parent_exit()
while ( GetTickCount() - v0 <= 4000 ); while ( GetTickCount() - v0 <= 4000 );
} }
//----- (0041ACA1) --------------------------------------------------------
void __cdecl init_archives() void __cdecl init_archives()
{ {
void *a1; // [esp+8h] [ebp-8h] void *a1; // [esp+8h] [ebp-8h]
@ -308,7 +288,6 @@ void __cdecl init_archives()
patch_rt_mpq = init_test_access(patch_rt_mpq_path, "\\patch_rt.mpq", "DiabloInstall", 2000, 0); patch_rt_mpq = init_test_access(patch_rt_mpq_path, "\\patch_rt.mpq", "DiabloInstall", 2000, 0);
} }
//----- (0041AD72) --------------------------------------------------------
void *__fastcall init_test_access(char *mpq_path, char *mpq_name, char *reg_loc, int flags, bool on_cd) void *__fastcall init_test_access(char *mpq_path, char *mpq_name, char *reg_loc, int flags, bool on_cd)
{ {
char *v5; // esi char *v5; // esi
@ -375,7 +354,6 @@ void *__fastcall init_test_access(char *mpq_path, char *mpq_name, char *reg_loc,
return 0; return 0;
} }
//----- (0041AF22) --------------------------------------------------------
char *__fastcall init_strip_trailing_slash(char *path) char *__fastcall init_strip_trailing_slash(char *path)
{ {
char *result; // eax char *result; // eax
@ -389,7 +367,6 @@ char *__fastcall init_strip_trailing_slash(char *path)
return result; return result;
} }
//----- (0041AF3A) --------------------------------------------------------
int __fastcall init_read_test_file(char *mpq_path, char *mpq_name, int flags, void **archive) int __fastcall init_read_test_file(char *mpq_path, char *mpq_name, int flags, void **archive)
{ {
char *v4; // edi char *v4; // edi
@ -426,7 +403,6 @@ int __fastcall init_read_test_file(char *mpq_path, char *mpq_name, int flags, vo
return 1; return 1;
} }
//----- (0041AFCE) --------------------------------------------------------
void __cdecl init_get_file_info() void __cdecl init_get_file_info()
{ {
int v0; // eax int v0; // eax
@ -459,7 +435,6 @@ void __cdecl init_get_file_info()
} }
} }
//----- (0041B06C) --------------------------------------------------------
LRESULT __stdcall init_palette(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) LRESULT __stdcall init_palette(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{ {
if ( Msg > WM_ERASEBKGND ) if ( Msg > WM_ERASEBKGND )
@ -504,7 +479,6 @@ LRESULT __stdcall init_palette(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0041B105) --------------------------------------------------------
void __fastcall init_activate_window(HWND hWnd, bool activated) void __fastcall init_activate_window(HWND hWnd, bool activated)
{ {
LONG dwNewLong; // eax LONG dwNewLong; // eax
@ -530,7 +504,6 @@ void __fastcall init_activate_window(HWND hWnd, bool activated)
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
// 634980: using guessed type int window_activated; // 634980: using guessed type int window_activated;
//----- (0041B15F) --------------------------------------------------------
LRESULT __stdcall init_redraw_window(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) LRESULT __stdcall init_redraw_window(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{ {
LRESULT result; // eax LRESULT result; // eax
@ -542,8 +515,7 @@ LRESULT __stdcall init_redraw_window(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM
return result; return result;
} }
//----- (0041B184) -------------------------------------------------------- LRESULT (__stdcall *SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
LRESULT (__stdcall *result)(HWND, UINT, WPARAM, LPARAM); // eax LRESULT (__stdcall *result)(HWND, UINT, WPARAM, LPARAM); // eax

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __INIT_H__
* United States. Use of a copyright notice is precautionary only and #define __INIT_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//init
extern _SNETVERSIONDATA fileinfo; extern _SNETVERSIONDATA fileinfo;
extern int init_cpp_init_value; // weak extern int init_cpp_init_value; // weak
extern int window_activated; // weak extern int window_activated; // weak
@ -40,7 +32,7 @@ void __cdecl init_get_file_info();
LRESULT __stdcall init_palette(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); LRESULT __stdcall init_palette(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
void __fastcall init_activate_window(HWND hWnd, bool activated); void __fastcall init_activate_window(HWND hWnd, bool activated);
LRESULT __stdcall init_redraw_window(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); LRESULT __stdcall init_redraw_window(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); LRESULT (__stdcall *SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
/* data */ /* data */
extern int init_inf; // weak extern int init_inf; // weak
@ -49,3 +41,5 @@ extern int init_inf; // weak
extern char gszVersionNumber[260]; extern char gszVersionNumber[260];
extern char gszProductName[260]; extern char gszProductName[260];
#endif /* __INIT_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -20,7 +11,6 @@ int interfac_inf = 0x7F800000; // weak
unsigned char progress_bar_colours[3] = { 138u, 43u, 254u }; unsigned char progress_bar_colours[3] = { 138u, 43u, 254u };
POINT32 progress_bar_screen_pos[3] = { { 53, 37 }, { 53, 421 }, { 53, 37 } }; POINT32 progress_bar_screen_pos[3] = { { 53, 37 }, { 53, 421 }, { 53, 37 } };
//----- (0041B195) --------------------------------------------------------
struct interfac_cpp_init struct interfac_cpp_init
{ {
interfac_cpp_init() interfac_cpp_init()
@ -30,7 +20,6 @@ struct interfac_cpp_init
} _interfac_cpp_init; } _interfac_cpp_init;
// 47AE40: using guessed type int interfac_inf; // 47AE40: using guessed type int interfac_inf;
//----- (0041B1A0) --------------------------------------------------------
void __cdecl interface_msg_pump() void __cdecl interface_msg_pump()
{ {
MSG Msg; // [esp+8h] [ebp-1Ch] MSG Msg; // [esp+8h] [ebp-1Ch]
@ -45,7 +34,6 @@ void __cdecl interface_msg_pump()
} }
} }
//----- (0041B1DF) --------------------------------------------------------
bool __cdecl IncProgress() bool __cdecl IncProgress()
{ {
interface_msg_pump(); interface_msg_pump();
@ -57,7 +45,6 @@ bool __cdecl IncProgress()
return (unsigned int)sgdwProgress >= 0x216; return (unsigned int)sgdwProgress >= 0x216;
} }
//----- (0041B218) --------------------------------------------------------
void __cdecl DrawCutscene() void __cdecl DrawCutscene()
{ {
unsigned int v0; // esi unsigned int v0; // esi
@ -80,7 +67,6 @@ void __cdecl DrawCutscene()
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0041B28D) --------------------------------------------------------
void __fastcall DrawProgress(int screen_x, int screen_y, int progress_id) void __fastcall DrawProgress(int screen_x, int screen_y, int progress_id)
{ {
_BYTE *v3; // eax _BYTE *v3; // eax
@ -97,7 +83,6 @@ void __fastcall DrawProgress(int screen_x, int screen_y, int progress_id)
while ( v4 ); while ( v4 );
} }
//----- (0041B2B6) --------------------------------------------------------
void __fastcall ShowProgress(int uMsg) void __fastcall ShowProgress(int uMsg)
{ {
LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi LRESULT (__stdcall *saveProc)(HWND, UINT, WPARAM, LPARAM); // edi
@ -254,7 +239,6 @@ LABEL_41:
// 6761B8: using guessed type char gbSomebodyWonGameKludge; // 6761B8: using guessed type char gbSomebodyWonGameKludge;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0041B5F5) --------------------------------------------------------
void __cdecl FreeInterface() void __cdecl FreeInterface()
{ {
void *v0; // ecx void *v0; // ecx
@ -264,7 +248,6 @@ void __cdecl FreeInterface()
mem_free_dbg(v0); mem_free_dbg(v0);
} }
//----- (0041B607) --------------------------------------------------------
void __fastcall InitCutscene(int interface_mode) void __fastcall InitCutscene(int interface_mode)
{ {
int v1; // eax int v1; // eax

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __INTERFAC_H__
* United States. Use of a copyright notice is precautionary only and #define __INTERFAC_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//interfac
extern void *sgpBackCel; extern void *sgpBackCel;
extern float interfac_cpp_init_value; extern float interfac_cpp_init_value;
extern int sgdwProgress; extern int sgdwProgress;
@ -29,3 +21,5 @@ void __fastcall InitCutscene(int interface_mode);
extern int interfac_inf; // weak extern int interfac_inf; // weak
extern unsigned char progress_bar_colours[3]; extern unsigned char progress_bar_colours[3];
extern POINT32 progress_bar_screen_pos[3]; extern POINT32 progress_bar_screen_pos[3];
#endif /* __INTERFAC_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -97,7 +88,6 @@ InvXY InvRect[73] =
int AP2x2Tbl[10] = { 8, 28, 6, 26, 4, 24, 2, 22, 0, 20 }; // weak int AP2x2Tbl[10] = { 8, 28, 6, 26, 4, 24, 2, 22, 0, 20 }; // weak
//----- (0041B814) --------------------------------------------------------
void __cdecl FreeInvGFX() void __cdecl FreeInvGFX()
{ {
void *v0; // ecx void *v0; // ecx
@ -107,7 +97,6 @@ void __cdecl FreeInvGFX()
mem_free_dbg(v0); mem_free_dbg(v0);
} }
//----- (0041B826) --------------------------------------------------------
void __cdecl InitInv() void __cdecl InitInv()
{ {
char v0; // al char v0; // al
@ -132,7 +121,6 @@ LABEL_7:
drawsbarflag = 0; drawsbarflag = 0;
} }
//----- (0041B871) --------------------------------------------------------
void __fastcall InvDrawSlotBack(int X, int Y, int W, int H) void __fastcall InvDrawSlotBack(int X, int Y, int W, int H)
{ {
unsigned char *v4; // edi unsigned char *v4; // edi
@ -173,7 +161,6 @@ LABEL_9:
while ( v5 ); while ( v5 );
} }
//----- (0041B8C4) --------------------------------------------------------
void __cdecl DrawInv() void __cdecl DrawInv()
{ {
int v0; // ecx int v0; // ecx
@ -463,7 +450,6 @@ void __cdecl DrawInv()
// 69CF94: using guessed type int cel_transparency_active; // 69CF94: using guessed type int cel_transparency_active;
// 41B8C4: using guessed type int var_A0[40]; // 41B8C4: using guessed type int var_A0[40];
//----- (0041C060) --------------------------------------------------------
void __cdecl DrawInvBelt() void __cdecl DrawInvBelt()
{ {
int v0; // ebx int v0; // ebx
@ -548,7 +534,6 @@ void __cdecl DrawInvBelt()
// 4B8960: using guessed type int talkflag; // 4B8960: using guessed type int talkflag;
// 4B8CB8: using guessed type char pcursinvitem; // 4B8CB8: using guessed type char pcursinvitem;
//----- (0041C23F) --------------------------------------------------------
int __fastcall AutoPlace(int pnum, int ii, int sx, int sy, int saveflag) int __fastcall AutoPlace(int pnum, int ii, int sx, int sy, int saveflag)
{ {
__int64 v5; // rax __int64 v5; // rax
@ -646,7 +631,6 @@ LABEL_16:
return v6; return v6;
} }
//----- (0041C373) --------------------------------------------------------
int __fastcall SpecialAutoPlace(int pnum, int ii, int sx, int sy, int saveflag) int __fastcall SpecialAutoPlace(int pnum, int ii, int sx, int sy, int saveflag)
{ {
__int64 v5; // rax __int64 v5; // rax
@ -759,7 +743,6 @@ LABEL_24:
return v6; return v6;
} }
//----- (0041C4E0) --------------------------------------------------------
int __fastcall GoldAutoPlace(int pnum) int __fastcall GoldAutoPlace(int pnum)
{ {
int v1; // ebp int v1; // ebp
@ -894,7 +877,6 @@ LABEL_28:
return v3; return v3;
} }
//----- (0041C6A9) --------------------------------------------------------
int __fastcall WeaponAutoPlace(int pnum) int __fastcall WeaponAutoPlace(int pnum)
{ {
int v1; // edi int v1; // edi
@ -936,7 +918,6 @@ LABEL_13:
return 0; return 0;
} }
//----- (0041C746) --------------------------------------------------------
int __fastcall SwapItem(ItemStruct *a, ItemStruct *b) int __fastcall SwapItem(ItemStruct *a, ItemStruct *b)
{ {
int v2; // eax int v2; // eax
@ -949,7 +930,6 @@ int __fastcall SwapItem(ItemStruct *a, ItemStruct *b)
return v2 + 12; return v2 + 12;
} }
//----- (0041C783) --------------------------------------------------------
void __fastcall CheckInvPaste(int pnum, int mx, int my) void __fastcall CheckInvPaste(int pnum, int mx, int my)
{ {
int v3; // ebx int v3; // ebx
@ -1019,8 +999,8 @@ void __fastcall CheckInvPaste(int pnum, int mx, int my)
int v67; // [esp+190h] [ebp-Ch] int v67; // [esp+190h] [ebp-Ch]
int v68; // [esp+194h] [ebp-8h] int v68; // [esp+194h] [ebp-8h]
int v69; // [esp+198h] [ebp-4h] int v69; // [esp+198h] [ebp-4h]
char cursor_id; // [esp+1A4h] [ebp+8h] int cursor_id; // [esp+1A4h] [ebp+8h]
char cursor_ida; // [esp+1A4h] [ebp+8h] int cursor_ida; // [esp+1A4h] [ebp+8h]
p = pnum; p = pnum;
v3 = pnum; v3 = pnum;
@ -1607,7 +1587,6 @@ LABEL_89:
// 4B8CBC: using guessed type int icursW; // 4B8CBC: using guessed type int icursW;
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0041D2CF) --------------------------------------------------------
void __fastcall CheckInvSwap(int pnum, int bLoc, int idx, int wCI, int seed, int bId) void __fastcall CheckInvSwap(int pnum, int bLoc, int idx, int wCI, int seed, int bId)
{ {
unsigned char v6; // bl unsigned char v6; // bl
@ -1637,7 +1616,6 @@ void __fastcall CheckInvSwap(int pnum, int bLoc, int idx, int wCI, int seed, int
CalcPlrInv(p, 1u); CalcPlrInv(p, 1u);
} }
//----- (0041D378) --------------------------------------------------------
void __fastcall CheckInvCut(int pnum, int mx, int my) void __fastcall CheckInvCut(int pnum, int mx, int my)
{ {
int v3; // ebp int v3; // ebp
@ -1814,7 +1792,6 @@ LABEL_60:
// 4B84DC: using guessed type int dropGoldFlag; // 4B84DC: using guessed type int dropGoldFlag;
// 4B8C9C: using guessed type int cursH; // 4B8C9C: using guessed type int cursH;
//----- (0041D6EB) --------------------------------------------------------
void __fastcall inv_update_rem_item(int pnum, int iv) void __fastcall inv_update_rem_item(int pnum, int iv)
{ {
unsigned char v2; // dl unsigned char v2; // dl
@ -1827,7 +1804,6 @@ void __fastcall inv_update_rem_item(int pnum, int iv)
CalcPlrInv(pnum, v2); CalcPlrInv(pnum, v2);
} }
//----- (0041D722) --------------------------------------------------------
void __fastcall RemoveInvItem(int pnum, int iv) void __fastcall RemoveInvItem(int pnum, int iv)
{ {
int v2; // edx int v2; // edx
@ -1886,7 +1862,6 @@ void __fastcall RemoveInvItem(int pnum, int iv)
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0041D810) --------------------------------------------------------
void __fastcall RemoveSpdBarItem(int pnum, int iv) void __fastcall RemoveSpdBarItem(int pnum, int iv)
{ {
int v2; // esi int v2; // esi
@ -1905,7 +1880,6 @@ void __fastcall RemoveSpdBarItem(int pnum, int iv)
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0041D86C) --------------------------------------------------------
void __cdecl CheckInvItem() void __cdecl CheckInvItem()
{ {
if ( pcurs < CURSOR_FIRSTITEM ) if ( pcurs < CURSOR_FIRSTITEM )
@ -1914,14 +1888,12 @@ void __cdecl CheckInvItem()
CheckInvPaste(myplr, MouseX, MouseY); CheckInvPaste(myplr, MouseX, MouseY);
} }
//----- (0041D893) --------------------------------------------------------
void __cdecl CheckInvScrn() void __cdecl CheckInvScrn()
{ {
if ( MouseX > 190 && MouseX < 437 && MouseY > 352 && MouseY < 385 ) if ( MouseX > 190 && MouseX < 437 && MouseY > 352 && MouseY < 385 )
CheckInvItem(); CheckInvItem();
} }
//----- (0041D8BF) --------------------------------------------------------
void __fastcall CheckItemStats(int pnum) void __fastcall CheckItemStats(int pnum)
{ {
PlayerStruct *v1; // eax PlayerStruct *v1; // eax
@ -1938,7 +1910,6 @@ void __fastcall CheckItemStats(int pnum)
} }
} }
//----- (0041D90B) --------------------------------------------------------
void __fastcall CheckBookLevel(int pnum) void __fastcall CheckBookLevel(int pnum)
{ {
int v1; // ecx int v1; // ecx
@ -1971,7 +1942,6 @@ void __fastcall CheckBookLevel(int pnum)
} }
} }
//----- (0041D97F) --------------------------------------------------------
void __fastcall CheckQuestItem(int pnum) void __fastcall CheckQuestItem(int pnum)
{ {
int v1; // ecx int v1; // ecx
@ -2107,7 +2077,6 @@ void __fastcall CheckQuestItem(int pnum)
} }
// 52A554: using guessed type int sfxdelay; // 52A554: using guessed type int sfxdelay;
//----- (0041DB65) --------------------------------------------------------
void __fastcall InvGetItem(int pnum, int ii) void __fastcall InvGetItem(int pnum, int ii)
{ {
int v2; // ebp int v2; // ebp
@ -2157,7 +2126,6 @@ void __fastcall InvGetItem(int pnum, int ii)
// 4B84DC: using guessed type int dropGoldFlag; // 4B84DC: using guessed type int dropGoldFlag;
// 4B8CC0: using guessed type char pcursitem; // 4B8CC0: using guessed type char pcursitem;
//----- (0041DC79) --------------------------------------------------------
void __fastcall AutoGetItem(int pnum, int ii) void __fastcall AutoGetItem(int pnum, int ii)
{ {
int v2; // ebx int v2; // ebx
@ -2446,7 +2414,6 @@ LABEL_84:
// 48E9A8: using guessed type int AP2x2Tbl[10]; // 48E9A8: using guessed type int AP2x2Tbl[10];
// 4B84DC: using guessed type int dropGoldFlag; // 4B84DC: using guessed type int dropGoldFlag;
//----- (0041E103) --------------------------------------------------------
int __fastcall FindGetItem(int indx, unsigned short ci, int iseed) int __fastcall FindGetItem(int indx, unsigned short ci, int iseed)
{ {
int i; // ebx int i; // ebx
@ -2466,7 +2433,6 @@ int __fastcall FindGetItem(int indx, unsigned short ci, int iseed)
return ii; return ii;
} }
//----- (0041E158) --------------------------------------------------------
void __fastcall SyncGetItem(int x, int y, int idx, unsigned short ci, int iseed) void __fastcall SyncGetItem(int x, int y, int idx, unsigned short ci, int iseed)
{ {
char v5; // cl char v5; // cl
@ -2511,7 +2477,6 @@ void __fastcall SyncGetItem(int x, int y, int idx, unsigned short ci, int iseed)
} }
} }
//----- (0041E222) --------------------------------------------------------
int __fastcall CanPut(int i, int j) int __fastcall CanPut(int i, int j)
{ {
int v2; // ecx int v2; // ecx
@ -2540,7 +2505,7 @@ int __fastcall CanPut(int i, int j)
v7 = v6 < 0; v7 = v6 < 0;
if ( v6 > 0 ) if ( v6 > 0 )
{ {
if ( _LOBYTE(objectavail[30 * v6 + 113]) ) /* check */ if ( _LOBYTE(object[v6-1]._oSelFlag) ) /* check */
return 0; return 0;
v7 = v6 < 0; v7 = v6 < 0;
} }
@ -2550,7 +2515,7 @@ int __fastcall CanPut(int i, int j)
if ( v8 > 0 ) if ( v8 > 0 )
{ {
v9 = dObject[v2][j + 1]; v9 = dObject[v2][j + 1];
if ( v9 > 0 && _LOBYTE(objectavail[30 * v8 + 113]) && _LOBYTE(objectavail[30 * v9 + 113]) ) if ( v9 > 0 && _LOBYTE(object[v8-1]._oSelFlag) && _LOBYTE(object[v9-1]._oSelFlag) )
return 0; return 0;
} }
if ( !currlevel && (dMonster[0][v3] || dMonster[1][v3 + 1]) ) if ( !currlevel && (dMonster[0][v3] || dMonster[1][v3 + 1]) )
@ -2558,7 +2523,6 @@ int __fastcall CanPut(int i, int j)
return 1; return 1;
} }
//----- (0041E2F9) --------------------------------------------------------
int __cdecl TryInvPut() int __cdecl TryInvPut()
{ {
int result; // eax int result; // eax
@ -2587,7 +2551,6 @@ int __cdecl TryInvPut()
return result; return result;
} }
//----- (0041E3BC) --------------------------------------------------------
void __fastcall DrawInvMsg(char *msg) void __fastcall DrawInvMsg(char *msg)
{ {
char *v1; // esi char *v1; // esi
@ -2602,7 +2565,6 @@ void __fastcall DrawInvMsg(char *msg)
} }
} }
//----- (0041E3E4) --------------------------------------------------------
int __fastcall InvPutItem(int pnum, int x, int y) int __fastcall InvPutItem(int pnum, int x, int y)
{ {
int v3; // edi int v3; // edi
@ -2722,7 +2684,6 @@ int __fastcall InvPutItem(int pnum, int x, int y)
return yc; return yc;
} }
//----- (0041E639) --------------------------------------------------------
int __fastcall SyncPutItem(int pnum, int x, int y, int idx, int icreateinfo, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, unsigned int ibuff) int __fastcall SyncPutItem(int pnum, int x, int y, int idx, int icreateinfo, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, unsigned int ibuff)
{ {
int v13; // ebx int v13; // ebx
@ -2856,7 +2817,6 @@ int __fastcall SyncPutItem(int pnum, int x, int y, int idx, int icreateinfo, int
return ic; return ic;
} }
//----- (0041E8DD) --------------------------------------------------------
int __cdecl CheckInvHLight() int __cdecl CheckInvHLight()
{ {
signed int v0; // ebx signed int v0; // ebx
@ -3005,7 +2965,6 @@ LABEL_36:
} }
// 4B883C: using guessed type int infoclr; // 4B883C: using guessed type int infoclr;
//----- (0041EAEA) --------------------------------------------------------
void __fastcall RemoveScroll(int pnum) void __fastcall RemoveScroll(int pnum)
{ {
int v1; // eax int v1; // eax
@ -3049,7 +3008,6 @@ LABEL_8:
CalcPlrScrolls(p); CalcPlrScrolls(p);
} }
//----- (0041EB8B) --------------------------------------------------------
bool __cdecl UseScroll() bool __cdecl UseScroll()
{ {
int v0; // eax int v0; // eax
@ -3092,7 +3050,6 @@ LABEL_11:
} }
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (0041EC42) --------------------------------------------------------
void __fastcall UseStaffCharge(int pnum) void __fastcall UseStaffCharge(int pnum)
{ {
int v1; // eax int v1; // eax
@ -3112,7 +3069,6 @@ void __fastcall UseStaffCharge(int pnum)
} }
} }
//----- (0041EC7F) --------------------------------------------------------
bool __cdecl UseStaff() bool __cdecl UseStaff()
{ {
int v0; // eax int v0; // eax
@ -3133,7 +3089,6 @@ bool __cdecl UseStaff()
return result; return result;
} }
//----- (0041ECC3) --------------------------------------------------------
void __cdecl StartGoldDrop() void __cdecl StartGoldDrop()
{ {
int v0; // eax int v0; // eax
@ -3153,7 +3108,6 @@ void __cdecl StartGoldDrop()
// 4B8960: using guessed type int talkflag; // 4B8960: using guessed type int talkflag;
// 4B8CB8: using guessed type char pcursinvitem; // 4B8CB8: using guessed type char pcursinvitem;
//----- (0041ED29) --------------------------------------------------------
int __fastcall UseInvItem(int pnum, int cii) int __fastcall UseInvItem(int pnum, int cii)
{ {
int v2; // esi int v2; // esi
@ -3309,7 +3263,6 @@ LABEL_39:
// 52A554: using guessed type int sfxdelay; // 52A554: using guessed type int sfxdelay;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
//----- (0041EFA1) --------------------------------------------------------
void __cdecl DoTelekinesis() void __cdecl DoTelekinesis()
{ {
if ( pcursobj != -1 ) if ( pcursobj != -1 )
@ -3323,7 +3276,6 @@ void __cdecl DoTelekinesis()
// 4B8CC0: using guessed type char pcursitem; // 4B8CC0: using guessed type char pcursitem;
// 4B8CC1: using guessed type char pcursobj; // 4B8CC1: using guessed type char pcursobj;
//----- (0041F013) --------------------------------------------------------
int __fastcall CalculateGold(int pnum) int __fastcall CalculateGold(int pnum)
{ {
int result; // eax int result; // eax
@ -3365,7 +3317,6 @@ int __fastcall CalculateGold(int pnum)
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0041F068) --------------------------------------------------------
int __cdecl DropItemBeforeTrig() int __cdecl DropItemBeforeTrig()
{ {
if ( !TryInvPut() ) if ( !TryInvPut() )

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __INV_H__
* United States. Use of a copyright notice is precautionary only and #define __INV_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//inv
extern int invflag; extern int invflag;
extern void *pInvCels; extern void *pInvCels;
extern int drawsbarflag; // idb extern int drawsbarflag; // idb
@ -63,3 +55,5 @@ extern InvXY InvRect[73];
/* rdata */ /* rdata */
extern int AP2x2Tbl[10]; // weak extern int AP2x2Tbl[10]; // weak
#endif /* __INV_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -120,13 +111,13 @@ PLStruct PL_Suffix[96] =
{ "gore", IPL_DAMMOD, 9, 12, 25, PLT_WEAP, 0, 0, 1, 4100, 5000, 8 }, { "gore", IPL_DAMMOD, 9, 12, 25, PLT_WEAP, 0, 0, 1, 4100, 5000, 8 },
{ "carnage", IPL_DAMMOD, 13, 16, 35, PLT_WEAP, 0, 0, 1, 5100, 10000, 10 }, { "carnage", IPL_DAMMOD, 13, 16, 35, PLT_WEAP, 0, 0, 1, 5100, 10000, 10 },
{ "slaughter", IPL_DAMMOD, 17, 20, 60, PLT_WEAP, 0, 0, 1, 10100, 15000, 13 }, { "slaughter", IPL_DAMMOD, 17, 20, 60, PLT_WEAP, 0, 0, 1, 10100, 15000, 13 },
{ "pain", IPL_GETHIT, 2, 4, 4, PLT_ARMO|PLT_SHLD|PLT_MISC, 1, 0, 0, 0, 0, -4 }, // cursed { "pain", IPL_GETHIT_CURSE, 2, 4, 4, PLT_ARMO|PLT_SHLD|PLT_MISC, 1, 0, 0, 0, 0, -4 },
{ "tears", IPL_GETHIT, 1, 1, 2, PLT_ARMO|PLT_SHLD|PLT_MISC, 1, 0, 0, 0, 0, -2 }, { "tears", IPL_GETHIT_CURSE, 1, 1, 2, PLT_ARMO|PLT_SHLD|PLT_MISC, 1, 0, 0, 0, 0, -2 },
{ "health", IPL_GETHIT_CURSE, 1, 1, 2, PLT_ARMO|PLT_SHLD|PLT_MISC, 16, 0, 1, 200, 200, 2 }, // not cursed { "health", IPL_GETHIT, 1, 1, 2, PLT_ARMO|PLT_SHLD|PLT_MISC, 16, 0, 1, 200, 200, 2 },
{ "protection", IPL_GETHIT_CURSE, 2, 2, 6, PLT_ARMO|PLT_SHLD, 16, 0, 1, 400, 800, 4 }, { "protection", IPL_GETHIT, 2, 2, 6, PLT_ARMO|PLT_SHLD, 16, 0, 1, 400, 800, 4 },
{ "absorption", IPL_GETHIT_CURSE, 3, 3, 12, PLT_ARMO|PLT_SHLD, 16, 0, 1, 1001, 2500, 10 }, { "absorption", IPL_GETHIT, 3, 3, 12, PLT_ARMO|PLT_SHLD, 16, 0, 1, 1001, 2500, 10 },
{ "deflection", IPL_GETHIT_CURSE, 4, 4, 20, PLT_ARMO, 16, 0, 1, 2500, 6500, 15 }, { "deflection", IPL_GETHIT, 4, 4, 20, PLT_ARMO, 16, 0, 1, 2500, 6500, 15 },
{ "osmosis", IPL_GETHIT_CURSE, 5, 6, 50, PLT_ARMO, 16, 0, 1, 7500, 10000, 20 }, { "osmosis", IPL_GETHIT, 5, 6, 50, PLT_ARMO, 16, 0, 1, 7500, 10000, 20 },
{ "frailty", IPL_STR_CURSE, 6, 10, 3, PLT_ARMO|PLT_SHLD|PLT_WEAP|PLT_BOW|PLT_MISC, 1, 0, 0, 0, 0, -3 }, { "frailty", IPL_STR_CURSE, 6, 10, 3, PLT_ARMO|PLT_SHLD|PLT_WEAP|PLT_BOW|PLT_MISC, 1, 0, 0, 0, 0, -3 },
{ "weakness", IPL_STR_CURSE, 1, 5, 1, PLT_ARMO|PLT_SHLD|PLT_WEAP|PLT_BOW|PLT_MISC, 1, 0, 0, 0, 0, -2 }, { "weakness", IPL_STR_CURSE, 1, 5, 1, PLT_ARMO|PLT_SHLD|PLT_WEAP|PLT_BOW|PLT_MISC, 1, 0, 0, 0, 0, -2 },
{ "strength", IPL_STR, 1, 5, 1, PLT_ARMO|PLT_SHLD|PLT_WEAP|PLT_BOW|PLT_MISC, 0, 0, 1, 200, 1000, 2 }, { "strength", IPL_STR, 1, 5, 1, PLT_ARMO|PLT_SHLD|PLT_WEAP|PLT_BOW|PLT_MISC, 0, 0, 1, 200, 1000, 2 },
@ -216,11 +207,11 @@ UItemStruct UniqueItemList[91] =
{ "The Butcher's Cleaver", UITYPE_CLEAVER, 1u, 3u, 3650, IPL_STR, 10, 10, IPL_SETDAM, 4, 24, IPL_SETDUR, 10, 10, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "The Butcher's Cleaver", UITYPE_CLEAVER, 1u, 3u, 3650, IPL_STR, 10, 10, IPL_SETDAM, 4, 24, IPL_SETDUR, 10, 10, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "The Undead Crown", UITYPE_SKCROWN, 1u, 3u, 16650, IPL_RNDSTEALLIFE, 0, 0, IPL_SETAC, 8, 8, IPL_INVCURS, 77, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "The Undead Crown", UITYPE_SKCROWN, 1u, 3u, 16650, IPL_RNDSTEALLIFE, 0, 0, IPL_SETAC, 8, 8, IPL_INVCURS, 77, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Empyrean Band", UITYPE_INFRARING, 1u, 4u, 8000, IPL_ATTRIBS, 2, 2, IPL_LIGHT, 2, 2, IPL_FASTRECOVER, 1, 1, IPL_ABSHALFTRAP, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Empyrean Band", UITYPE_INFRARING, 1u, 4u, 8000, IPL_ATTRIBS, 2, 2, IPL_LIGHT, 2, 2, IPL_FASTRECOVER, 1, 1, IPL_ABSHALFTRAP, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Optic Amulet", UITYPE_OPTAMULET, 1u, 5u, 9750, IPL_LIGHT, 2, 2, IPL_LIGHTRES, 20, 20, IPL_GETHIT_CURSE, 1, 1, IPL_MAG, 5, 5, IPL_INVCURS, 44, 0, IPL_TOHIT, 0, 0 }, { "Optic Amulet", UITYPE_OPTAMULET, 1u, 5u, 9750, IPL_LIGHT, 2, 2, IPL_LIGHTRES, 20, 20, IPL_GETHIT, 1, 1, IPL_MAG, 5, 5, IPL_INVCURS, 44, 0, IPL_TOHIT, 0, 0 },
{ "Ring of Truth", UITYPE_TRING, 1u, 4u, 9100, IPL_LIFE, 10, 10, IPL_GETHIT_CURSE, 1, 1, IPL_ALLRES, 10, 10, IPL_INVCURS, 10, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Ring of Truth", UITYPE_TRING, 1u, 4u, 9100, IPL_LIFE, 10, 10, IPL_GETHIT, 1, 1, IPL_ALLRES, 10, 10, IPL_INVCURS, 10, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Harlequin Crest", UITYPE_HARCREST, 1u, 6u, 4000, IPL_AC_CURSE, 3, 3, IPL_GETHIT_CURSE, 1, 1, IPL_ATTRIBS, 2, 2, IPL_LIFE, 7, 7, IPL_MANA, 7, 7, IPL_INVCURS, 81, 0 }, { "Harlequin Crest", UITYPE_HARCREST, 1u, 6u, 4000, IPL_AC_CURSE, 3, 3, IPL_GETHIT, 1, 1, IPL_ATTRIBS, 2, 2, IPL_LIFE, 7, 7, IPL_MANA, 7, 7, IPL_INVCURS, 81, 0 },
{ "Veil of Steel", UITYPE_STEELVEIL, 1u, 6u, 63800, IPL_ALLRES, 50, 50, IPL_LIGHT_CURSE, 2, 2, IPL_ACP, 60, 60, IPL_MANA_CURSE, 30, 30, IPL_STR, 15, 15, IPL_VIT, 15, 15 }, { "Veil of Steel", UITYPE_STEELVEIL, 1u, 6u, 63800, IPL_ALLRES, 50, 50, IPL_LIGHT_CURSE, 2, 2, IPL_ACP, 60, 60, IPL_MANA_CURSE, 30, 30, IPL_STR, 15, 15, IPL_VIT, 15, 15 },
{ "Arkaine's Valor", UITYPE_ARMOFVAL, 1u, 4u, 42000, IPL_SETAC, 25, 25, IPL_VIT, 10, 10, IPL_GETHIT_CURSE, 3, 3, IPL_FASTRECOVER, 3, 3, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Arkaine's Valor", UITYPE_ARMOFVAL, 1u, 4u, 42000, IPL_SETAC, 25, 25, IPL_VIT, 10, 10, IPL_GETHIT, 3, 3, IPL_FASTRECOVER, 3, 3, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Griswold's Edge", UITYPE_GRISWOLD, 1u, 6u, 42000, IPL_FIREDAM, 1, 10, IPL_TOHIT, 25, 25, IPL_FASTATTACK, 2, 2, IPL_KNOCKBACK, 0, 0, IPL_MANA, 20, 20, IPL_LIFE_CURSE, 20, 20 }, { "Griswold's Edge", UITYPE_GRISWOLD, 1u, 6u, 42000, IPL_FIREDAM, 1, 10, IPL_TOHIT, 25, 25, IPL_FASTATTACK, 2, 2, IPL_KNOCKBACK, 0, 0, IPL_MANA, 20, 20, IPL_LIFE_CURSE, 20, 20 },
{ "Lightforge", UITYPE_MACE, 1u, 6u, 26675, IPL_LIGHT, 4, 4, IPL_DAMP, 150, 150, IPL_TOHIT, 25, 25, IPL_FIREDAM, 10, 20, IPL_INDESTRUCTIBLE, 0, 0, IPL_ATTRIBS, 8, 8 }, { "Lightforge", UITYPE_MACE, 1u, 6u, 26675, IPL_LIGHT, 4, 4, IPL_DAMP, 150, 150, IPL_TOHIT, 25, 25, IPL_FIREDAM, 10, 20, IPL_INDESTRUCTIBLE, 0, 0, IPL_ATTRIBS, 8, 8 },
{ "The Rift Bow", UITYPE_SHORTBOW, 1u, 3u, 1800, IPL_RNDARROWVEL, 0, 0, IPL_DAMMOD, 2, 2, IPL_DEX_CURSE, 3, 3, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "The Rift Bow", UITYPE_SHORTBOW, 1u, 3u, 1800, IPL_RNDARROWVEL, 0, 0, IPL_DAMMOD, 2, 2, IPL_DEX_CURSE, 3, 3, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
@ -253,7 +244,7 @@ UItemStruct UniqueItemList[91] =
{ "Sharp Beak", UITYPE_LARGEAXE, 2u, 4u, 2850, IPL_LIFE, 20, 20, IPL_MAG_CURSE, 10, 10, IPL_MANA_CURSE, 10, 10, IPL_INVCURS, 143, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Sharp Beak", UITYPE_LARGEAXE, 2u, 4u, 2850, IPL_LIFE, 20, 20, IPL_MAG_CURSE, 10, 10, IPL_MANA_CURSE, 10, 10, IPL_INVCURS, 143, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "BloodSlayer", UITYPE_BROADAXE, 3u, 5u, 2500, IPL_DAMP, 100, 100, IPL_3XDAMVDEM, 50, 50, IPL_ATTRIBS_CURSE, 5, 5, IPL_SPLLVLADD, -1, -1, IPL_INVCURS, 144, 0, IPL_TOHIT, 0, 0 }, { "BloodSlayer", UITYPE_BROADAXE, 3u, 5u, 2500, IPL_DAMP, 100, 100, IPL_3XDAMVDEM, 50, 50, IPL_ATTRIBS_CURSE, 5, 5, IPL_SPLLVLADD, -1, -1, IPL_INVCURS, 144, 0, IPL_TOHIT, 0, 0 },
{ "The Celestial Axe", UITYPE_BATTLEAXE, 4u, 4u, 14100, IPL_NOMINSTR, 0, 0, IPL_TOHIT, 15, 15, IPL_LIFE, 15, 15, IPL_STR_CURSE, 15, 15, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "The Celestial Axe", UITYPE_BATTLEAXE, 4u, 4u, 14100, IPL_NOMINSTR, 0, 0, IPL_TOHIT, 15, 15, IPL_LIFE, 15, 15, IPL_STR_CURSE, 15, 15, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Wicked Axe", UITYPE_LARGEAXE, 5u, 6u, 31150, IPL_TOHIT, 30, 30, IPL_DEX, 10, 10, IPL_VIT_CURSE, 10, 10, IPL_GETHIT_CURSE, 1, 6, IPL_INDESTRUCTIBLE, 0, 0, IPL_INVCURS, 143, 0 }, { "Wicked Axe", UITYPE_LARGEAXE, 5u, 6u, 31150, IPL_TOHIT, 30, 30, IPL_DEX, 10, 10, IPL_VIT_CURSE, 10, 10, IPL_GETHIT, 1, 6, IPL_INDESTRUCTIBLE, 0, 0, IPL_INVCURS, 143, 0 },
{ "Stonecleaver", UITYPE_BROADAXE, 7u, 5u, 23900, IPL_LIFE, 30, 30, IPL_TOHIT, 20, 20, IPL_DAMP, 50, 50, IPL_LIGHTRES, 40, 40, IPL_INVCURS, 104, 0, IPL_TOHIT, 0, 0 }, { "Stonecleaver", UITYPE_BROADAXE, 7u, 5u, 23900, IPL_LIFE, 30, 30, IPL_TOHIT, 20, 20, IPL_DAMP, 50, 50, IPL_LIGHTRES, 40, 40, IPL_INVCURS, 104, 0, IPL_TOHIT, 0, 0 },
{ "Aguinara's Hatchet", UITYPE_SMALLAXE, 12u, 3u, 24800, IPL_SPLLVLADD, 1, 1, IPL_MAG, 10, 10, IPL_MAGICRES, 80, 80, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Aguinara's Hatchet", UITYPE_SMALLAXE, 12u, 3u, 24800, IPL_SPLLVLADD, 1, 1, IPL_MAG, 10, 10, IPL_MAGICRES, 80, 80, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Hellslayer", UITYPE_BATTLEAXE, 15u, 5u, 26200, IPL_STR, 8, 8, IPL_VIT, 8, 8, IPL_DAMP, 100, 100, IPL_LIFE, 25, 25, IPL_MANA_CURSE, 25, 25, IPL_TOHIT, 0, 0 }, { "Hellslayer", UITYPE_BATTLEAXE, 15u, 5u, 26200, IPL_STR, 8, 8, IPL_VIT, 8, 8, IPL_DAMP, 100, 100, IPL_LIFE, 25, 25, IPL_MANA_CURSE, 25, 25, IPL_TOHIT, 0, 0 },
@ -272,37 +263,37 @@ UItemStruct UniqueItemList[91] =
{ "Storm Spire", UITYPE_WARSTAFF, 8u, 4u, 22500, IPL_LIGHTRES, 50, 50, IPL_LIGHTDAM, 2, 8, IPL_STR, 10, 10, IPL_MAG_CURSE, 10, 10, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Storm Spire", UITYPE_WARSTAFF, 8u, 4u, 22500, IPL_LIGHTRES, 50, 50, IPL_LIGHTDAM, 2, 8, IPL_STR, 10, 10, IPL_MAG_CURSE, 10, 10, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Gleamsong", UITYPE_SHORTSTAFF, 8u, 4u, 6520, IPL_MANA, 25, 25, IPL_STR_CURSE, 3, 3, IPL_VIT_CURSE, 3, 3, IPL_SPELL, 10, 76, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Gleamsong", UITYPE_SHORTSTAFF, 8u, 4u, 6520, IPL_MANA, 25, 25, IPL_STR_CURSE, 3, 3, IPL_VIT_CURSE, 3, 3, IPL_SPELL, 10, 76, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Thundercall", UITYPE_COMPSTAFF, 14u, 5u, 22250, IPL_TOHIT, 35, 35, IPL_LIGHTDAM, 1, 10, IPL_SPELL, 3, 76, IPL_LIGHTRES, 30, 30, IPL_LIGHT, 2, 2, IPL_TOHIT, 0, 0 }, { "Thundercall", UITYPE_COMPSTAFF, 14u, 5u, 22250, IPL_TOHIT, 35, 35, IPL_LIGHTDAM, 1, 10, IPL_SPELL, 3, 76, IPL_LIGHTRES, 30, 30, IPL_LIGHT, 2, 2, IPL_TOHIT, 0, 0 },
{ "The Protector", UITYPE_SHORTSTAFF, 16u, 6u, 17240, IPL_VIT, 5, 5, IPL_GETHIT_CURSE, 5, 5, IPL_SETAC, 40, 40, IPL_SPELL, 2, 86, IPL_THORNS, 1, 3, IPL_INVCURS, 162, 0 }, { "The Protector", UITYPE_SHORTSTAFF, 16u, 6u, 17240, IPL_VIT, 5, 5, IPL_GETHIT, 5, 5, IPL_SETAC, 40, 40, IPL_SPELL, 2, 86, IPL_THORNS, 1, 3, IPL_INVCURS, 162, 0 },
{ "Naj's Puzzler", UITYPE_LONGSTAFF, 18u, 5u, 34000, IPL_MAG, 20, 20, IPL_DEX, 10, 10, IPL_ALLRES, 20, 20, IPL_SPELL, 23, 57, IPL_LIFE_CURSE, 25, 25, IPL_TOHIT, 0, 0 }, { "Naj's Puzzler", UITYPE_LONGSTAFF, 18u, 5u, 34000, IPL_MAG, 20, 20, IPL_DEX, 10, 10, IPL_ALLRES, 20, 20, IPL_SPELL, 23, 57, IPL_LIFE_CURSE, 25, 25, IPL_TOHIT, 0, 0 },
{ "Mindcry", UITYPE_QUARSTAFF, 20u, 4u, 41500, IPL_MAG, 15, 15, IPL_SPELL, 13, 69, IPL_ALLRES, 15, 15, IPL_SPLLVLADD, 1, 1, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Mindcry", UITYPE_QUARSTAFF, 20u, 4u, 41500, IPL_MAG, 15, 15, IPL_SPELL, 13, 69, IPL_ALLRES, 15, 15, IPL_SPLLVLADD, 1, 1, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Rod of Onan", UITYPE_WARSTAFF, 22u, 3u, 44167, IPL_SPELL, 21, 50, IPL_DAMP, 100, 100, IPL_ATTRIBS, 5, 5, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Rod of Onan", UITYPE_WARSTAFF, 22u, 3u, 44167, IPL_SPELL, 21, 50, IPL_DAMP, 100, 100, IPL_ATTRIBS, 5, 5, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Helm of Sprits", UITYPE_HELM, 1u, 2u, 7525, IPL_STEALLIFE, 5, 5, IPL_INVCURS, 77, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Helm of Sprits", UITYPE_HELM, 1u, 2u, 7525, IPL_STEALLIFE, 5, 5, IPL_INVCURS, 77, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Thinking Cap", UITYPE_SKULLCAP, 6u, 5u, 2020, IPL_MANA, 30, 30, IPL_SPLLVLADD, 2, 2, IPL_ALLRES, 20, 20, IPL_SETDUR, 1, 1, IPL_INVCURS, 93, 0, IPL_TOHIT, 0, 0 }, { "Thinking Cap", UITYPE_SKULLCAP, 6u, 5u, 2020, IPL_MANA, 30, 30, IPL_SPLLVLADD, 2, 2, IPL_ALLRES, 20, 20, IPL_SETDUR, 1, 1, IPL_INVCURS, 93, 0, IPL_TOHIT, 0, 0 },
{ "OverLord's Helm", UITYPE_HELM, 7u, 6u, 12500, IPL_STR, 20, 20, IPL_DEX, 15, 15, IPL_VIT, 5, 5, IPL_MAG_CURSE, 20, 20, IPL_SETDUR, 15, 15, IPL_INVCURS, 99, 0 }, { "OverLord's Helm", UITYPE_HELM, 7u, 6u, 12500, IPL_STR, 20, 20, IPL_DEX, 15, 15, IPL_VIT, 5, 5, IPL_MAG_CURSE, 20, 20, IPL_SETDUR, 15, 15, IPL_INVCURS, 99, 0 },
{ "Fool's Crest", UITYPE_HELM, 12u, 5u, 10150, IPL_ATTRIBS_CURSE, 4, 4, IPL_LIFE, 100, 100, IPL_GETHIT, 1, 6, IPL_THORNS, 1, 3, IPL_INVCURS, 80, 0, IPL_TOHIT, 0, 0 }, { "Fool's Crest", UITYPE_HELM, 12u, 5u, 10150, IPL_ATTRIBS_CURSE, 4, 4, IPL_LIFE, 100, 100, IPL_GETHIT_CURSE, 1, 6, IPL_THORNS, 1, 3, IPL_INVCURS, 80, 0, IPL_TOHIT, 0, 0 },
{ "Gotterdamerung", UITYPE_GREATHELM, 21u, 6u, 54900, IPL_ATTRIBS, 20, 20, IPL_SETAC, 60, 60, IPL_GETHIT_CURSE, 4, 4, IPL_ALLRESZERO, 0, 0, IPL_LIGHT_CURSE, 4, 4, IPL_INVCURS, 85, 0 }, { "Gotterdamerung", UITYPE_GREATHELM, 21u, 6u, 54900, IPL_ATTRIBS, 20, 20, IPL_SETAC, 60, 60, IPL_GETHIT, 4, 4, IPL_ALLRESZERO, 0, 0, IPL_LIGHT_CURSE, 4, 4, IPL_INVCURS, 85, 0 },
{ "Royal Circlet", UITYPE_CROWN, 27u, 5u, 24875, IPL_ATTRIBS, 10, 10, IPL_MANA, 40, 40, IPL_SETAC, 40, 40, IPL_LIGHT, 1, 1, IPL_INVCURS, 79, 0, IPL_TOHIT, 0, 0 }, { "Royal Circlet", UITYPE_CROWN, 27u, 5u, 24875, IPL_ATTRIBS, 10, 10, IPL_MANA, 40, 40, IPL_SETAC, 40, 40, IPL_LIGHT, 1, 1, IPL_INVCURS, 79, 0, IPL_TOHIT, 0, 0 },
{ "Torn Flesh of Souls", UITYPE_RAGS, 2u, 5u, 4825, IPL_SETAC, 8, 8, IPL_VIT, 10, 10, IPL_GETHIT_CURSE, 1, 1, IPL_INDESTRUCTIBLE, 0, 0, IPL_INVCURS, 92, 0, IPL_TOHIT, 0, 0 }, { "Torn Flesh of Souls", UITYPE_RAGS, 2u, 5u, 4825, IPL_SETAC, 8, 8, IPL_VIT, 10, 10, IPL_GETHIT, 1, 1, IPL_INDESTRUCTIBLE, 0, 0, IPL_INVCURS, 92, 0, IPL_TOHIT, 0, 0 },
{ "The Gladiator's Bane", UITYPE_STUDARMOR, 6u, 4u, 3450, IPL_SETAC, 25, 25, IPL_GETHIT_CURSE, 2, 2, IPL_DUR, 200, 200, IPL_ATTRIBS_CURSE, 3, 3, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "The Gladiator's Bane", UITYPE_STUDARMOR, 6u, 4u, 3450, IPL_SETAC, 25, 25, IPL_GETHIT, 2, 2, IPL_DUR, 200, 200, IPL_ATTRIBS_CURSE, 3, 3, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "The Rainbow Cloak", UITYPE_CLOAK, 2u, 6u, 4900, IPL_SETAC, 10, 10, IPL_ATTRIBS, 1, 1, IPL_ALLRES, 10, 10, IPL_LIFE, 5, 5, IPL_DUR, 50, 50, IPL_INVCURS, 138, 0 }, { "The Rainbow Cloak", UITYPE_CLOAK, 2u, 6u, 4900, IPL_SETAC, 10, 10, IPL_ATTRIBS, 1, 1, IPL_ALLRES, 10, 10, IPL_LIFE, 5, 5, IPL_DUR, 50, 50, IPL_INVCURS, 138, 0 },
{ "Leather of Aut", UITYPE_LEATHARMOR, 4u, 5u, 10550, IPL_SETAC, 15, 15, IPL_STR, 5, 5, IPL_MAG_CURSE, 5, 5, IPL_DEX, 5, 5, IPL_INDESTRUCTIBLE, 0, 0, IPL_TOHIT, 0, 0 }, { "Leather of Aut", UITYPE_LEATHARMOR, 4u, 5u, 10550, IPL_SETAC, 15, 15, IPL_STR, 5, 5, IPL_MAG_CURSE, 5, 5, IPL_DEX, 5, 5, IPL_INDESTRUCTIBLE, 0, 0, IPL_TOHIT, 0, 0 },
{ "Wisdom's Wrap", UITYPE_ROBE, 5u, 6u, 6200, IPL_MAG, 5, 5, IPL_MANA, 10, 10, IPL_LIGHTRES, 25, 25, IPL_SETAC, 15, 15, IPL_GETHIT_CURSE, 1, 1, IPL_INVCURS, 138, 0 }, { "Wisdom's Wrap", UITYPE_ROBE, 5u, 6u, 6200, IPL_MAG, 5, 5, IPL_MANA, 10, 10, IPL_LIGHTRES, 25, 25, IPL_SETAC, 15, 15, IPL_GETHIT, 1, 1, IPL_INVCURS, 138, 0 },
{ "Sparking Mail", UITYPE_CHAINMAIL, 9u, 2u, 15750, IPL_SETAC, 30, 30, IPL_LIGHTDAM, 1, 10, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Sparking Mail", UITYPE_CHAINMAIL, 9u, 2u, 15750, IPL_SETAC, 30, 30, IPL_LIGHTDAM, 1, 10, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Scavenger Carapace", UITYPE_BREASTPLATE, 13u, 4u, 14000, IPL_GETHIT_CURSE, 15, 15, IPL_AC_CURSE, 30, 30, IPL_DEX, 5, 5, IPL_LIGHTRES, 40, 40, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Scavenger Carapace", UITYPE_BREASTPLATE, 13u, 4u, 14000, IPL_GETHIT, 15, 15, IPL_AC_CURSE, 30, 30, IPL_DEX, 5, 5, IPL_LIGHTRES, 40, 40, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Nightscape", UITYPE_CAPE, 16u, 6u, 11600, IPL_FASTRECOVER, 2, 2, IPL_LIGHT_CURSE, 4, 4, IPL_SETAC, 15, 15, IPL_DEX, 3, 3, IPL_ALLRES, 20, 20, IPL_INVCURS, 138, 0 }, { "Nightscape", UITYPE_CAPE, 16u, 6u, 11600, IPL_FASTRECOVER, 2, 2, IPL_LIGHT_CURSE, 4, 4, IPL_SETAC, 15, 15, IPL_DEX, 3, 3, IPL_ALLRES, 20, 20, IPL_INVCURS, 138, 0 },
{ "Naj's Light Plate", UITYPE_PLATEMAIL, 19u, 6u, 78700, IPL_NOMINSTR, 0, 0, IPL_MAG, 5, 5, IPL_MANA, 20, 20, IPL_ALLRES, 20, 20, IPL_SPLLVLADD, 1, 1, IPL_INVCURS, 159, 0 }, { "Naj's Light Plate", UITYPE_PLATEMAIL, 19u, 6u, 78700, IPL_NOMINSTR, 0, 0, IPL_MAG, 5, 5, IPL_MANA, 20, 20, IPL_ALLRES, 20, 20, IPL_SPLLVLADD, 1, 1, IPL_INVCURS, 159, 0 },
{ "Demonspike Coat", UITYPE_FULLPLATE, 25u, 5u, 251175, IPL_SETAC, 100, 100, IPL_GETHIT_CURSE, 6, 6, IPL_STR, 10, 10, IPL_INDESTRUCTIBLE, 0, 0, IPL_FIRERES, 50, 50, IPL_TOHIT, 0, 0 }, { "Demonspike Coat", UITYPE_FULLPLATE, 25u, 5u, 251175, IPL_SETAC, 100, 100, IPL_GETHIT, 6, 6, IPL_STR, 10, 10, IPL_INDESTRUCTIBLE, 0, 0, IPL_FIRERES, 50, 50, IPL_TOHIT, 0, 0 },
{ "The Deflector", UITYPE_BUCKLER, 1u, 5u, 1500, IPL_SETAC, 7, 7, IPL_ALLRES, 10, 10, IPL_DAMP_CURSE, 20, 20, IPL_TOHIT_CURSE, 5, 5, IPL_INVCURS, 83, 0, IPL_TOHIT, 0, 0 }, { "The Deflector", UITYPE_BUCKLER, 1u, 5u, 1500, IPL_SETAC, 7, 7, IPL_ALLRES, 10, 10, IPL_DAMP_CURSE, 20, 20, IPL_TOHIT_CURSE, 5, 5, IPL_INVCURS, 83, 0, IPL_TOHIT, 0, 0 },
{ "Split Skull Shield", UITYPE_BUCKLER, 1u, 6u, 2025, IPL_SETAC, 10, 10, IPL_LIFE, 10, 10, IPL_STR, 2, 2, IPL_LIGHT_CURSE, 1, 1, IPL_SETDUR, 15, 15, IPL_INVCURS, 116, 0 }, { "Split Skull Shield", UITYPE_BUCKLER, 1u, 6u, 2025, IPL_SETAC, 10, 10, IPL_LIFE, 10, 10, IPL_STR, 2, 2, IPL_LIGHT_CURSE, 1, 1, IPL_SETDUR, 15, 15, IPL_INVCURS, 116, 0 },
{ "Dragon's Breach", UITYPE_KITESHIELD, 2u, 6u, 19200, IPL_FIRERES, 25, 25, IPL_STR, 5, 5, IPL_SETAC, 20, 20, IPL_MAG_CURSE, 5, 5, IPL_INDESTRUCTIBLE, 0, 0, IPL_INVCURS, 117, 0 }, { "Dragon's Breach", UITYPE_KITESHIELD, 2u, 6u, 19200, IPL_FIRERES, 25, 25, IPL_STR, 5, 5, IPL_SETAC, 20, 20, IPL_MAG_CURSE, 5, 5, IPL_INDESTRUCTIBLE, 0, 0, IPL_INVCURS, 117, 0 },
{ "Blackoak Shield", UITYPE_SMALLSHIELD, 4u, 6u, 5725, IPL_DEX, 10, 10, IPL_VIT_CURSE, 10, 10, IPL_SETAC, 18, 18, IPL_LIGHT_CURSE, 1, 1, IPL_DUR, 150, 150, IPL_INVCURS, 146, 0 }, { "Blackoak Shield", UITYPE_SMALLSHIELD, 4u, 6u, 5725, IPL_DEX, 10, 10, IPL_VIT_CURSE, 10, 10, IPL_SETAC, 18, 18, IPL_LIGHT_CURSE, 1, 1, IPL_DUR, 150, 150, IPL_INVCURS, 146, 0 },
{ "Holy Defender", UITYPE_LARGESHIELD, 10u, 6u, 13800, IPL_SETAC, 15, 15, IPL_GETHIT_CURSE, 2, 2, IPL_FIRERES, 20, 20, IPL_DUR, 200, 200, IPL_FASTBLOCK, 1, 1, IPL_INVCURS, 146, 0 }, { "Holy Defender", UITYPE_LARGESHIELD, 10u, 6u, 13800, IPL_SETAC, 15, 15, IPL_GETHIT, 2, 2, IPL_FIRERES, 20, 20, IPL_DUR, 200, 200, IPL_FASTBLOCK, 1, 1, IPL_INVCURS, 146, 0 },
{ "Stormshield", UITYPE_GOTHSHIELD, 24u, 6u, 49000, IPL_SETAC, 40, 40, IPL_GETHIT, 4, 4, IPL_STR, 10, 10, IPL_INDESTRUCTIBLE, 0, 0, IPL_FASTBLOCK, 1, 1, IPL_INVCURS, 148, 0 }, { "Stormshield", UITYPE_GOTHSHIELD, 24u, 6u, 49000, IPL_SETAC, 40, 40, IPL_GETHIT_CURSE, 4, 4, IPL_STR, 10, 10, IPL_INDESTRUCTIBLE, 0, 0, IPL_FASTBLOCK, 1, 1, IPL_INVCURS, 148, 0 },
{ "Bramble", UITYPE_RING, 1u, 4u, 1000, IPL_ATTRIBS_CURSE, 2, 2, IPL_DAMMOD, 3, 3, IPL_MANA, 10, 10, IPL_INVCURS, 9, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Bramble", UITYPE_RING, 1u, 4u, 1000, IPL_ATTRIBS_CURSE, 2, 2, IPL_DAMMOD, 3, 3, IPL_MANA, 10, 10, IPL_INVCURS, 9, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Ring of Regha", UITYPE_RING, 1u, 6u, 4175, IPL_MAG, 10, 10, IPL_MAGICRES, 10, 10, IPL_LIGHT, 1, 1, IPL_STR_CURSE, 3, 3, IPL_DEX_CURSE, 3, 3, IPL_INVCURS, 11, 0 }, { "Ring of Regha", UITYPE_RING, 1u, 6u, 4175, IPL_MAG, 10, 10, IPL_MAGICRES, 10, 10, IPL_LIGHT, 1, 1, IPL_STR_CURSE, 3, 3, IPL_DEX_CURSE, 3, 3, IPL_INVCURS, 11, 0 },
{ "The Bleeder", UITYPE_RING, 2u, 4u, 8500, IPL_MAGICRES, 20, 20, IPL_MANA, 30, 30, IPL_LIFE_CURSE, 10, 10, IPL_INVCURS, 8, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "The Bleeder", UITYPE_RING, 2u, 4u, 8500, IPL_MAGICRES, 20, 20, IPL_MANA, 30, 30, IPL_LIFE_CURSE, 10, 10, IPL_INVCURS, 8, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Constricting Ring", UITYPE_RING, 5u, 3u, 62000, IPL_ALLRES, 75, 75, IPL_DRAINLIFE, 0, 0, IPL_INVCURS, 14, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }, { "Constricting Ring", UITYPE_RING, 5u, 3u, 62000, IPL_ALLRES, 75, 75, IPL_DRAINLIFE, 0, 0, IPL_INVCURS, 14, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 },
{ "Ring of Engagement", UITYPE_RING, 11u, 5u, 12476, IPL_GETHIT_CURSE, 1, 2, IPL_THORNS, 1, 3, IPL_SETAC, 5, 5, IPL_TARGAC, 4, 12, IPL_INVCURS, 13, 0, IPL_TOHIT, 0, 0 }, { "Ring of Engagement", UITYPE_RING, 11u, 5u, 12476, IPL_GETHIT, 1, 2, IPL_THORNS, 1, 3, IPL_SETAC, 5, 5, IPL_TARGAC, 4, 12, IPL_INVCURS, 13, 0, IPL_TOHIT, 0, 0 },
{ &empty_string, UITYPE_INVALID, 0u, 0u, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 } { &empty_string, UITYPE_INVALID, 0u, 0u, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0, IPL_TOHIT, 0, 0 }
}; };
@ -644,7 +635,6 @@ int ItemInvSnds[35] =
int idoppely = 16; // weak int idoppely = 16; // weak
int premiumlvladd[6] = { -1, -1, 0, 0, 1, 2 }; int premiumlvladd[6] = { -1, -1, 0, 0, 1, 2 };
//----- (0041F096) --------------------------------------------------------
void __cdecl InitItemGFX() void __cdecl InitItemGFX()
{ {
signed int v0; // esi signed int v0; // esi
@ -661,7 +651,6 @@ void __cdecl InitItemGFX()
memset(UniqueItemFlag, 0, 0x200u); memset(UniqueItemFlag, 0, 0x200u);
} }
//----- (0041F0E8) --------------------------------------------------------
bool __fastcall ItemPlace(int x, int y) bool __fastcall ItemPlace(int x, int y)
{ {
int v2; // ecx int v2; // ecx
@ -677,7 +666,6 @@ bool __fastcall ItemPlace(int x, int y)
return result; return result;
} }
//----- (0041F13A) --------------------------------------------------------
void __cdecl AddInitItems() void __cdecl AddInitItems()
{ {
int i; // eax int i; // eax
@ -723,7 +711,6 @@ void __cdecl AddInitItems()
} }
} }
//----- (0041F24E) --------------------------------------------------------
void __cdecl InitItems() void __cdecl InitItems()
{ {
int *v0; // eax int *v0; // eax
@ -768,7 +755,6 @@ void __cdecl InitItems()
} }
// 5CF31D: using guessed type char setlevel; // 5CF31D: using guessed type char setlevel;
//----- (0041F320) --------------------------------------------------------
void __fastcall CalcPlrItemVals(int p, bool Loadgfx) void __fastcall CalcPlrItemVals(int p, bool Loadgfx)
{ {
int v2; // eax int v2; // eax
@ -851,7 +837,7 @@ void __fastcall CalcPlrItemVals(int p, bool Loadgfx)
v60 = 0; v60 = 0;
v52 = 0; v52 = 0;
v61 = 0; v61 = 0;
v37 = 0i64; v37 = (__int64)0;
v49 = 0; v49 = 0;
v48 = 0; v48 = 0;
v47 = 0; v47 = 0;
@ -878,7 +864,7 @@ void __fastcall CalcPlrItemVals(int p, bool Loadgfx)
v40 = v3; v40 = v3;
v41 = v2; v41 = v2;
if ( v7 ) if ( v7 )
v37 |= 1i64 << ((unsigned char)v7 - 1); v37 |= (__int64)1 << ((unsigned char)v7 - 1);
if ( !*((_BYTE *)v6 - 296) || *(v6 - 75) ) if ( !*((_BYTE *)v6 - 296) || *(v6 - 75) )
{ {
v57 += *(v6 - 28); v57 += *(v6 - 28);
@ -979,7 +965,7 @@ void __fastcall CalcPlrItemVals(int p, bool Loadgfx)
plr[v5]._pISpells[0] = v37; plr[v5]._pISpells[0] = v37;
plr[v5]._pISpells[1] = HIDWORD(v37); plr[v5]._pISpells[1] = HIDWORD(v37);
plr[v5]._pDamageMod = v15 / v16; plr[v5]._pDamageMod = v15 / v16;
if ( v17 && !(v37 & (1i64 << (_LOBYTE(plr[v5]._pRSpell) - 1))) ) if ( v17 && !(v37 & ((__int64)1 << (_LOBYTE(plr[v5]._pRSpell) - 1))) )
{ {
plr[v5]._pRSpell = -1; plr[v5]._pRSpell = -1;
_LOBYTE(plr[v5]._pRSplType) = 4; _LOBYTE(plr[v5]._pRSplType) = 4;
@ -1118,7 +1104,6 @@ LABEL_86:
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0041F953) --------------------------------------------------------
void __fastcall CalcPlrScrolls(int p) void __fastcall CalcPlrScrolls(int p)
{ {
int v1; // esi int v1; // esi
@ -1143,7 +1128,7 @@ void __fastcall CalcPlrScrolls(int p)
{ {
if ( *(v3 - 53) != -1 && (*v3 == IMISC_SCROLL || *v3 == IMISC_SCROLLT) && v3[34] ) if ( *(v3 - 53) != -1 && (*v3 == IMISC_SCROLL || *v3 == IMISC_SCROLLT) && v3[34] )
{ {
v5 = 1i64 << (*((_BYTE *)v3 + 4) - 1); v5 = (__int64)1 << (*((_BYTE *)v3 + 4) - 1);
plr[v1]._pScrlSpells[0] |= v5; plr[v1]._pScrlSpells[0] |= v5;
plr[v1]._pScrlSpells[1] |= HIDWORD(v5); plr[v1]._pScrlSpells[1] |= HIDWORD(v5);
} }
@ -1158,7 +1143,7 @@ void __fastcall CalcPlrScrolls(int p)
{ {
if ( *(v6 - 53) != -1 && (*v6 == IMISC_SCROLL || *v6 == IMISC_SCROLLT) && v6[34] ) if ( *(v6 - 53) != -1 && (*v6 == IMISC_SCROLL || *v6 == IMISC_SCROLLT) && v6[34] )
{ {
v8 = 1i64 << (*((_BYTE *)v6 + 4) - 1); v8 = (__int64)1 << (*((_BYTE *)v6 + 4) - 1);
plr[v1]._pScrlSpells[0] |= v8; plr[v1]._pScrlSpells[0] |= v8;
plr[v1]._pScrlSpells[1] |= HIDWORD(v8); plr[v1]._pScrlSpells[1] |= HIDWORD(v8);
} }
@ -1179,7 +1164,6 @@ void __fastcall CalcPlrScrolls(int p)
} }
// 52571C: using guessed type int drawpanflag; // 52571C: using guessed type int drawpanflag;
//----- (0041FA4A) --------------------------------------------------------
void __fastcall CalcPlrStaff(int pnum) void __fastcall CalcPlrStaff(int pnum)
{ {
int v1; // esi int v1; // esi
@ -1192,13 +1176,12 @@ void __fastcall CalcPlrStaff(int pnum)
plr[v1]._pISpells[1] = 0; plr[v1]._pISpells[1] = 0;
if ( !v2 && plr[v1].InvBody[4]._iStatFlag && plr[v1].InvBody[4]._iCharges > 0 ) if ( !v2 && plr[v1].InvBody[4]._iStatFlag && plr[v1].InvBody[4]._iCharges > 0 )
{ {
v3 = 1i64 << (_LOBYTE(plr[v1].InvBody[4]._iSpell) - 1); v3 = (__int64)1 << (_LOBYTE(plr[v1].InvBody[4]._iSpell) - 1);
plr[v1]._pISpells[0] = v3; plr[v1]._pISpells[0] = v3;
plr[v1]._pISpells[1] = HIDWORD(v3); plr[v1]._pISpells[1] = HIDWORD(v3);
} }
} }
//----- (0041FA97) --------------------------------------------------------
void __fastcall CalcSelfItems(int pnum) void __fastcall CalcSelfItems(int pnum)
{ {
PlayerStruct *v1; // ecx PlayerStruct *v1; // ecx
@ -1275,7 +1258,6 @@ void __fastcall CalcSelfItems(int pnum)
while ( v9 ); while ( v9 );
} }
//----- (0041FB91) --------------------------------------------------------
void __fastcall CalcPlrItemMin(int pnum) void __fastcall CalcPlrItemMin(int pnum)
{ {
PlayerStruct *v1; // ecx PlayerStruct *v1; // ecx
@ -1313,7 +1295,6 @@ void __fastcall CalcPlrItemMin(int pnum)
while ( v7 ); while ( v7 );
} }
//----- (0041FBF6) --------------------------------------------------------
bool __fastcall ItemMinStats(PlayerStruct *p, ItemStruct *x) bool __fastcall ItemMinStats(PlayerStruct *p, ItemStruct *x)
{ {
if ( p->_pStrength < x->_iMinStr || p->_pMagic < x->_iMinMag || p->_pDexterity < x->_iMinDex ) if ( p->_pStrength < x->_iMinStr || p->_pMagic < x->_iMinMag || p->_pDexterity < x->_iMinDex )
@ -1322,7 +1303,6 @@ bool __fastcall ItemMinStats(PlayerStruct *p, ItemStruct *x)
return 1; return 1;
} }
//----- (0041FC2C) --------------------------------------------------------
void __fastcall CalcPlrBookVals(int p) void __fastcall CalcPlrBookVals(int p)
{ {
int v1; // esi int v1; // esi
@ -1394,7 +1374,6 @@ void __fastcall CalcPlrBookVals(int p)
} }
} }
//----- (0041FD3E) --------------------------------------------------------
void __fastcall CalcPlrInv(int p, bool Loadgfx) void __fastcall CalcPlrInv(int p, bool Loadgfx)
{ {
CalcPlrItemMin(p); CalcPlrItemMin(p);
@ -1411,7 +1390,6 @@ void __fastcall CalcPlrInv(int p, bool Loadgfx)
} }
} }
//----- (0041FD98) --------------------------------------------------------
void __fastcall SetPlrHandItem(ItemStruct *h, int idata) void __fastcall SetPlrHandItem(ItemStruct *h, int idata)
{ {
ItemDataStruct *pAllItem; // edi ItemDataStruct *pAllItem; // edi
@ -1447,13 +1425,11 @@ void __fastcall SetPlrHandItem(ItemStruct *h, int idata)
h->IDidx = idata; h->IDidx = idata;
} }
//----- (0041FE98) --------------------------------------------------------
void __fastcall GetPlrHandSeed(ItemStruct *h) void __fastcall GetPlrHandSeed(ItemStruct *h)
{ {
h->_iSeed = GetRndSeed(); h->_iSeed = GetRndSeed();
} }
//----- (0041FEA4) --------------------------------------------------------
void __fastcall GetGoldSeed(int pnum, ItemStruct *h) void __fastcall GetGoldSeed(int pnum, ItemStruct *h)
{ {
int v3; // edi int v3; // edi
@ -1494,13 +1470,11 @@ void __fastcall GetGoldSeed(int pnum, ItemStruct *h)
h->_iSeed = v5; h->_iSeed = v5;
} }
//----- (0041FF16) --------------------------------------------------------
void __fastcall SetPlrHandSeed(ItemStruct *h, int iseed) void __fastcall SetPlrHandSeed(ItemStruct *h, int iseed)
{ {
h->_iSeed = iseed; h->_iSeed = iseed;
} }
//----- (0041FF19) --------------------------------------------------------
void __fastcall SetPlrHandGoldCurs(ItemStruct *h) void __fastcall SetPlrHandGoldCurs(ItemStruct *h)
{ {
int v1; // eax int v1; // eax
@ -1519,7 +1493,6 @@ void __fastcall SetPlrHandGoldCurs(ItemStruct *h)
} }
} }
//----- (0041FF4E) --------------------------------------------------------
void __fastcall CreatePlrItems(int p) void __fastcall CreatePlrItems(int p)
{ {
int v1; // ebx int v1; // ebx
@ -1601,7 +1574,6 @@ LABEL_14:
CalcPlrItemVals(player_numa, 0); CalcPlrItemVals(player_numa, 0);
} }
//----- (004200F8) --------------------------------------------------------
bool __fastcall ItemSpaceOk(int i, int j) bool __fastcall ItemSpaceOk(int i, int j)
{ {
int v2; // eax int v2; // eax
@ -1636,7 +1608,7 @@ bool __fastcall ItemSpaceOk(int i, int j)
v7 = v6 < 0; v7 = v6 < 0;
if ( v6 > 0 ) if ( v6 > 0 )
{ {
if ( _LOBYTE(objectavail[30 * v6 + 113]) ) /* check */ if ( _LOBYTE(object[v6-1]._oSelFlag) ) /* check */
return 0; return 0;
v7 = v6 < 0; v7 = v6 < 0;
} }
@ -1646,13 +1618,12 @@ bool __fastcall ItemSpaceOk(int i, int j)
if ( v8 <= 0 ) if ( v8 <= 0 )
return nSolidTable[dPiece[0][v3]] == 0; return nSolidTable[dPiece[0][v3]] == 0;
v9 = dObject[v2][j + 1]; v9 = dObject[v2][j + 1];
if ( v9 <= 0 || !_LOBYTE(objectavail[30 * v8 + 113]) || !_LOBYTE(objectavail[30 * v9 + 113]) ) if ( v9 <= 0 || !_LOBYTE(object[v8-1]._oSelFlag) || !_LOBYTE(object[v9-1]._oSelFlag) )
return nSolidTable[dPiece[0][v3]] == 0; return nSolidTable[dPiece[0][v3]] == 0;
} }
return 0; return 0;
} }
//----- (004201F2) --------------------------------------------------------
bool __fastcall GetItemSpace(int x, int y, char inum) bool __fastcall GetItemSpace(int x, int y, char inum)
{ {
int v3; // eax int v3; // eax
@ -1749,7 +1720,6 @@ bool __fastcall GetItemSpace(int x, int y, char inum)
return 1; return 1;
} }
//----- (004202E8) --------------------------------------------------------
void __fastcall GetSuperItemSpace(int x, int y, char inum) void __fastcall GetSuperItemSpace(int x, int y, char inum)
{ {
signed int v4; // edi signed int v4; // edi
@ -1804,7 +1774,6 @@ void __fastcall GetSuperItemSpace(int x, int y, char inum)
} }
} }
//----- (00420376) --------------------------------------------------------
void __fastcall GetSuperItemLoc(int x, int y, int *xx, int *yy) void __fastcall GetSuperItemLoc(int x, int y, int *xx, int *yy)
{ {
signed int v4; // edi signed int v4; // edi
@ -1849,7 +1818,6 @@ LABEL_3:
} }
} }
//----- (004203E0) --------------------------------------------------------
void __fastcall CalcItemValue(int i) void __fastcall CalcItemValue(int i)
{ {
int v1; // ecx int v1; // ecx
@ -1873,7 +1841,6 @@ void __fastcall CalcItemValue(int i)
item[v1]._iIvalue = v4; item[v1]._iIvalue = v4;
} }
//----- (0042042C) --------------------------------------------------------
void __fastcall GetBookSpell(int i, int lvl) void __fastcall GetBookSpell(int i, int lvl)
{ {
int v2; // edi int v2; // edi
@ -1933,7 +1900,6 @@ LABEL_13:
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00420514) --------------------------------------------------------
void __fastcall GetStaffPower(int i, int lvl, int bs, unsigned char onlygood) void __fastcall GetStaffPower(int i, int lvl, int bs, unsigned char onlygood)
{ {
int v4; // esi int v4; // esi
@ -2013,7 +1979,6 @@ void __fastcall GetStaffPower(int i, int lvl, int bs, unsigned char onlygood)
} }
// 420514: using guessed type int var_484[256]; // 420514: using guessed type int var_484[256];
//----- (004206E5) --------------------------------------------------------
void __fastcall GetStaffSpell(int i, int lvl, unsigned char onlygood) void __fastcall GetStaffSpell(int i, int lvl, unsigned char onlygood)
{ {
int l; // esi int l; // esi
@ -2075,7 +2040,6 @@ LABEL_15:
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0042084A) --------------------------------------------------------
void __fastcall GetItemAttrs(int i, int idata, int lvl) void __fastcall GetItemAttrs(int i, int idata, int lvl)
{ {
int rndv; // eax int rndv; // eax
@ -2162,13 +2126,11 @@ void __fastcall GetItemAttrs(int i, int idata, int lvl)
} }
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (00420B17) --------------------------------------------------------
int __fastcall RndPL(int param1, int param2) int __fastcall RndPL(int param1, int param2)
{ {
return param1 + random(22, param2 - param1 + 1); return param1 + random(22, param2 - param1 + 1);
} }
//----- (00420B28) --------------------------------------------------------
int __fastcall PLVal(int pv, int p1, int p2, int minv, int maxv) int __fastcall PLVal(int pv, int p1, int p2, int minv, int maxv)
{ {
if ( p1 == p2 ) if ( p1 == p2 )
@ -2178,7 +2140,6 @@ int __fastcall PLVal(int pv, int p1, int p2, int minv, int maxv)
return minv + (maxv - minv) * (100 * (pv - p1) / (p2 - p1)) / 100; return minv + (maxv - minv) * (100 * (pv - p1) / (p2 - p1)) / 100;
} }
//----- (00420B68) --------------------------------------------------------
void __fastcall SaveItemPower(int i, int power, int param1, int param2, int minval, int maxval, int multval) void __fastcall SaveItemPower(int i, int power, int param1, int param2, int minval, int maxval, int multval)
{ {
int v7; // edi int v7; // edi
@ -2359,10 +2320,10 @@ void __fastcall SaveItemPower(int i, int power, int param1, int param2, int minv
item[v27]._iPLDex -= v10; item[v27]._iPLDex -= v10;
item[v27]._iPLVit -= v10; item[v27]._iPLVit -= v10;
break; break;
case IPL_GETHIT: case IPL_GETHIT_CURSE:
v11 = &item[v8]._iPLGetHit; v11 = &item[v8]._iPLGetHit;
goto LABEL_115; goto LABEL_115;
case IPL_GETHIT_CURSE: case IPL_GETHIT:
v12 = &item[v8]._iPLGetHit; v12 = &item[v8]._iPLGetHit;
goto LABEL_62; goto LABEL_62;
case IPL_LIFE: case IPL_LIFE:
@ -2571,7 +2532,6 @@ LABEL_62:
} }
} }
//----- (004215EF) --------------------------------------------------------
void __fastcall GetItemPower(int i, int minlvl, int maxlvl, int flgs, int onlygood) void __fastcall GetItemPower(int i, int minlvl, int maxlvl, int flgs, int onlygood)
{ {
//int v6; // ecx //int v6; // ecx
@ -2695,7 +2655,6 @@ void __fastcall GetItemPower(int i, int minlvl, int maxlvl, int flgs, int onlygo
} }
// 4215EF: using guessed type int var_494[256]; // 4215EF: using guessed type int var_494[256];
//----- (0042191C) --------------------------------------------------------
void __fastcall GetItemBonus(int i, int idata, int minlvl, int maxlvl, int onlygood) void __fastcall GetItemBonus(int i, int idata, int minlvl, int maxlvl, int onlygood)
{ {
if ( item[i]._iClass != ICLASS_GOLD ) if ( item[i]._iClass != ICLASS_GOLD )
@ -2735,7 +2694,6 @@ void __fastcall GetItemBonus(int i, int idata, int minlvl, int maxlvl, int onlyg
} }
} }
//----- (004219C1) --------------------------------------------------------
void __fastcall SetupItem(int i) void __fastcall SetupItem(int i)
{ {
int it; // eax int it; // eax
@ -2743,9 +2701,9 @@ void __fastcall SetupItem(int i)
it = ItemCAnimTbl[item[i]._iCurs]; it = ItemCAnimTbl[item[i]._iCurs];
item[i]._iAnimWidth = 96; item[i]._iAnimWidth = 96;
item[i]._iAnimXOff = 16; item[i]._iAnimWidth2 = 16;
il = ItemAnimLs[it]; il = ItemAnimLs[it];
item[i].ItemFrame = Item2Frm[it]; item[i]._iAnimData = Item2Frm[it];
item[i]._iAnimLen = il; item[i]._iAnimLen = il;
item[i]._iIdentified = 0; item[i]._iIdentified = 0;
item[i]._iPostDraw = 0; item[i]._iPostDraw = 0;
@ -2765,7 +2723,6 @@ void __fastcall SetupItem(int i)
item[i]._iAnimFrame = il; item[i]._iAnimFrame = il;
} }
//----- (00421A4B) --------------------------------------------------------
int __fastcall RndItem(int m) int __fastcall RndItem(int m)
{ {
int ri; // esi int ri; // esi
@ -2806,7 +2763,6 @@ int __fastcall RndItem(int m)
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
// 421A4B: using guessed type int var_800[512]; // 421A4B: using guessed type int var_800[512];
//----- (00421B32) --------------------------------------------------------
int __fastcall RndUItem(int m) int __fastcall RndUItem(int m)
{ {
int ri; // edx int ri; // edx
@ -2862,7 +2818,6 @@ int __fastcall RndUItem(int m)
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
// 421B32: using guessed type int var_800[512]; // 421B32: using guessed type int var_800[512];
//----- (00421C2A) --------------------------------------------------------
int __cdecl RndAllItems() int __cdecl RndAllItems()
{ {
int ri; // esi int ri; // esi
@ -2893,7 +2848,6 @@ int __cdecl RndAllItems()
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
// 421C2A: using guessed type int var_800[512]; // 421C2A: using guessed type int var_800[512];
//----- (00421CB7) --------------------------------------------------------
int __fastcall RndTypeItems(int itype, int imid) int __fastcall RndTypeItems(int itype, int imid)
{ {
int i; // edi int i; // edi
@ -2928,7 +2882,6 @@ int __fastcall RndTypeItems(int itype, int imid)
} }
// 421CB7: using guessed type int var_80C[512]; // 421CB7: using guessed type int var_80C[512];
//----- (00421D41) --------------------------------------------------------
int __fastcall CheckUnique(int i, int lvl, int uper, bool recreate) int __fastcall CheckUnique(int i, int lvl, int uper, bool recreate)
{ {
int numu; // ebx int numu; // ebx
@ -2978,7 +2931,6 @@ int __fastcall CheckUnique(int i, int lvl, int uper, bool recreate)
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
// 421D41: using guessed type char var_84[128]; // 421D41: using guessed type char var_84[128];
//----- (00421E11) --------------------------------------------------------
void __fastcall GetUniqueItem(int i, int uid) void __fastcall GetUniqueItem(int i, int uid)
{ {
UniqueItemFlag[uid] = 1; UniqueItemFlag[uid] = 1;
@ -3006,7 +2958,6 @@ void __fastcall GetUniqueItem(int i, int uid)
item[i]._iMagical = 2; item[i]._iMagical = 2;
} }
//----- (00421F5C) --------------------------------------------------------
void __fastcall SpawnUnique(int uid, int x, int y) void __fastcall SpawnUnique(int uid, int x, int y)
{ {
int ii; // esi int ii; // esi
@ -3036,14 +2987,12 @@ void __fastcall SpawnUnique(int uid, int x, int y)
} }
// 421F5C: could not find valid save-restore pair for esi // 421F5C: could not find valid save-restore pair for esi
//----- (00421FE6) --------------------------------------------------------
void __fastcall ItemRndDur(int ii) void __fastcall ItemRndDur(int ii)
{ {
if ( item[ii]._iDurability && item[ii]._iDurability != 255 ) if ( item[ii]._iDurability && item[ii]._iDurability != 255 )
item[ii]._iDurability = random(0, item[ii]._iMaxDur >> 1) + (item[ii]._iMaxDur >> 2) + 1; item[ii]._iDurability = random(0, item[ii]._iMaxDur >> 1) + (item[ii]._iMaxDur >> 2) + 1;
} }
//----- (00422024) --------------------------------------------------------
void __fastcall SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int onlygood, int recreate, int pregen) void __fastcall SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int onlygood, int recreate, int pregen)
{ {
int iblvl; // edi int iblvl; // edi
@ -3107,7 +3056,6 @@ void __fastcall SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, int
SetupItem(ii); SetupItem(ii);
} }
//----- (0042217A) --------------------------------------------------------
void __fastcall SpawnItem(int m, int x, int y, unsigned char sendmsg) void __fastcall SpawnItem(int m, int x, int y, unsigned char sendmsg)
{ {
int ii; // edi int ii; // edi
@ -3159,7 +3107,6 @@ LABEL_13:
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00422290) --------------------------------------------------------
void __fastcall CreateItem(int uid, int x, int y) void __fastcall CreateItem(int uid, int x, int y)
{ {
int ii; // esi int ii; // esi
@ -3190,7 +3137,6 @@ void __fastcall CreateItem(int uid, int x, int y)
} }
// 422290: could not find valid save-restore pair for esi // 422290: could not find valid save-restore pair for esi
//----- (0042232B) --------------------------------------------------------
void __fastcall CreateRndItem(int x, int y, unsigned char onlygood, unsigned char sendmsg, int delta) void __fastcall CreateRndItem(int x, int y, unsigned char onlygood, unsigned char sendmsg, int delta)
{ {
int idx; // edi int idx; // edi
@ -3218,7 +3164,6 @@ void __fastcall CreateRndItem(int x, int y, unsigned char onlygood, unsigned cha
} }
} }
//----- (004223D0) --------------------------------------------------------
void __fastcall SetupAllUseful(int ii, int iseed, int lvl) void __fastcall SetupAllUseful(int ii, int iseed, int lvl)
{ {
int idx; // esi int idx; // esi
@ -3238,7 +3183,6 @@ void __fastcall SetupAllUseful(int ii, int iseed, int lvl)
SetupItem(ii); SetupItem(ii);
} }
//----- (0042243D) --------------------------------------------------------
void __fastcall CreateRndUseful(int pnum, int x, int y, unsigned char sendmsg) void __fastcall CreateRndUseful(int pnum, int x, int y, unsigned char sendmsg)
{ {
int ii; // esi int ii; // esi
@ -3258,7 +3202,6 @@ void __fastcall CreateRndUseful(int pnum, int x, int y, unsigned char sendmsg)
} }
} }
//----- (004224A6) --------------------------------------------------------
void __fastcall CreateTypeItem(int x, int y, unsigned char onlygood, int itype, int imisc, int sendmsg, int delta) void __fastcall CreateTypeItem(int x, int y, unsigned char onlygood, int itype, int imisc, int sendmsg, int delta)
{ {
int idx; // edi int idx; // edi
@ -3286,7 +3229,6 @@ void __fastcall CreateTypeItem(int x, int y, unsigned char onlygood, int itype,
} }
} }
//----- (0042254A) --------------------------------------------------------
void __fastcall RecreateItem(int ii, int idx, unsigned short ic, int iseed, int ivalue) void __fastcall RecreateItem(int ii, int idx, unsigned short ic, int iseed, int ivalue)
{ {
int uper; // esi int uper; // esi
@ -3351,7 +3293,6 @@ void __fastcall RecreateItem(int ii, int idx, unsigned short ic, int iseed, int
} }
} }
//----- (0042265C) --------------------------------------------------------
void __fastcall RecreateEar(int ii, unsigned short ic, int iseed, unsigned char Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff) void __fastcall RecreateEar(int ii, unsigned short ic, int iseed, unsigned char Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff)
{ {
SetPlrHandItem(&item[ii], IDI_EAR); SetPlrHandItem(&item[ii], IDI_EAR);
@ -3379,7 +3320,6 @@ void __fastcall RecreateEar(int ii, unsigned short ic, int iseed, unsigned char
item[ii]._iSeed = iseed; item[ii]._iSeed = iseed;
} }
//----- (00422795) --------------------------------------------------------
void __fastcall SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag) void __fastcall SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag)
{ {
int i; // ebx int i; // ebx
@ -3446,7 +3386,6 @@ LABEL_13:
} }
} }
//----- (004228B1) --------------------------------------------------------
void __cdecl SpawnRock() void __cdecl SpawnRock()
{ {
BOOL v0; // edx BOOL v0; // edx
@ -3500,18 +3439,17 @@ void __cdecl SpawnRock()
} }
} }
//----- (00422989) --------------------------------------------------------
void __fastcall RespawnItem(int i, bool FlipFlag) void __fastcall RespawnItem(int i, bool FlipFlag)
{ {
int it; // ecx int it; // ecx
int il; // eax int il; // eax
item[i]._iAnimWidth = 96; item[i]._iAnimWidth = 96;
item[i]._iAnimXOff = 16; item[i]._iAnimWidth2 = 16;
it = ItemCAnimTbl[item[i]._iCurs]; it = ItemCAnimTbl[item[i]._iCurs];
il = ItemAnimLs[it]; il = ItemAnimLs[it];
item[i]._iAnimLen = il; item[i]._iAnimLen = il;
item[i].ItemFrame = Item2Frm[it]; item[i]._iAnimData = Item2Frm[it];
item[i]._iPostDraw = 0; item[i]._iPostDraw = 0;
item[i]._iRequest = 0; item[i]._iRequest = 0;
@ -3540,7 +3478,6 @@ void __fastcall RespawnItem(int i, bool FlipFlag)
item[i]._iSelFlag = 1; item[i]._iSelFlag = 1;
} }
//----- (00422A50) --------------------------------------------------------
void __fastcall DeleteItem(int ii, int i) void __fastcall DeleteItem(int ii, int i)
{ {
int v2; // eax int v2; // eax
@ -3556,7 +3493,6 @@ void __fastcall DeleteItem(int ii, int i)
itemactive[i] = itemactive[v2]; itemactive[i] = itemactive[v2];
} }
//----- (00422A84) --------------------------------------------------------
void __cdecl ItemDoppel() void __cdecl ItemDoppel()
{ {
int idoppelx; // esi int idoppelx; // esi
@ -3581,7 +3517,6 @@ void __cdecl ItemDoppel()
// 492EAC: using guessed type int idoppely; // 492EAC: using guessed type int idoppely;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00422ADE) --------------------------------------------------------
void __cdecl ProcessItems() void __cdecl ProcessItems()
{ {
int i; // edi int i; // edi
@ -3617,7 +3552,6 @@ void __cdecl ProcessItems()
ItemDoppel(); ItemDoppel();
} }
//----- (00422BB2) --------------------------------------------------------
void __cdecl FreeItemGFX() void __cdecl FreeItemGFX()
{ {
int i; // esi int i; // esi
@ -3631,13 +3565,11 @@ void __cdecl FreeItemGFX()
} }
} }
//----- (00422BCF) --------------------------------------------------------
void __fastcall GetItemFrm(int i) void __fastcall GetItemFrm(int i)
{ {
item[i].ItemFrame = Item2Frm[ItemCAnimTbl[item[i]._iCurs]]; item[i]._iAnimData = Item2Frm[ItemCAnimTbl[item[i]._iCurs]];
} }
//----- (00422BF0) --------------------------------------------------------
void __fastcall GetItemStr(int i) void __fastcall GetItemStr(int i)
{ {
int nGold; // esi int nGold; // esi
@ -3662,7 +3594,6 @@ void __fastcall GetItemStr(int i)
} }
// 4B883C: using guessed type int infoclr; // 4B883C: using guessed type int infoclr;
//----- (00422C63) --------------------------------------------------------
void __fastcall CheckIdentify(int pnum, int cii) void __fastcall CheckIdentify(int pnum, int cii)
{ {
ItemStruct *pi; // esi ItemStruct *pi; // esi
@ -3676,7 +3607,6 @@ void __fastcall CheckIdentify(int pnum, int cii)
SetCursor(CURSOR_HAND); SetCursor(CURSOR_HAND);
} }
//----- (00422C9C) --------------------------------------------------------
void __fastcall DoRepair(int pnum, int cii) void __fastcall DoRepair(int pnum, int cii)
{ {
PlayerStruct *p; // eax PlayerStruct *p; // eax
@ -3693,7 +3623,6 @@ void __fastcall DoRepair(int pnum, int cii)
SetCursor(CURSOR_HAND); SetCursor(CURSOR_HAND);
} }
//----- (00422CF6) --------------------------------------------------------
void __fastcall RepairItem(ItemStruct *i, int lvl) void __fastcall RepairItem(ItemStruct *i, int lvl)
{ {
int rep; // edi int rep; // edi
@ -3729,7 +3658,6 @@ void __fastcall RepairItem(ItemStruct *i, int lvl)
} }
} }
//----- (00422D6C) --------------------------------------------------------
void __fastcall DoRecharge(int pnum, int cii) void __fastcall DoRecharge(int pnum, int cii)
{ {
PlayerStruct *p; // eax PlayerStruct *p; // eax
@ -3748,7 +3676,6 @@ void __fastcall DoRecharge(int pnum, int cii)
SetCursor(CURSOR_HAND); SetCursor(CURSOR_HAND);
} }
//----- (00422DDD) --------------------------------------------------------
void __fastcall RechargeItem(ItemStruct *i, int r) void __fastcall RechargeItem(ItemStruct *i, int r)
{ {
if ( i->_iCharges != i->_iMaxCharges ) if ( i->_iCharges != i->_iMaxCharges )
@ -3770,7 +3697,6 @@ void __fastcall RechargeItem(ItemStruct *i, int r)
} }
} }
//----- (00422E14) --------------------------------------------------------
void __fastcall PrintItemOil(char IDidx) void __fastcall PrintItemOil(char IDidx)
{ {
switch ( IDidx ) switch ( IDidx )
@ -3828,7 +3754,6 @@ void __fastcall PrintItemOil(char IDidx)
AddPanelString(tempstr, 1); AddPanelString(tempstr, 1);
} }
//----- (00422EF4) --------------------------------------------------------
void __fastcall PrintItemPower(char plidx, ItemStruct *x) void __fastcall PrintItemPower(char plidx, ItemStruct *x)
{ {
ItemStruct *v2; // esi ItemStruct *v2; // esi
@ -3936,8 +3861,8 @@ LABEL_11:
case IPL_ATTRIBS_CURSE: case IPL_ATTRIBS_CURSE:
sprintf(tempstr, "%+i to all attributes", x->_iPLStr); sprintf(tempstr, "%+i to all attributes", x->_iPLStr);
return; return;
case IPL_GETHIT:
case IPL_GETHIT_CURSE: case IPL_GETHIT_CURSE:
case IPL_GETHIT:
sprintf(tempstr, "%+i damage from enemies", x->_iPLGetHit); sprintf(tempstr, "%+i damage from enemies", x->_iPLGetHit);
return; return;
case IPL_LIFE: case IPL_LIFE:
@ -4106,7 +4031,6 @@ LABEL_104:
} }
} }
//----- (00423530) --------------------------------------------------------
void __cdecl DrawUBack() void __cdecl DrawUBack()
{ {
char *v0; // edi char *v0; // edi
@ -4156,7 +4080,6 @@ void __cdecl DrawUBack()
*v0 = 0; *v0 = 0;
} }
//----- (0042358C) --------------------------------------------------------
void __fastcall PrintUString(int x, int y, int cjustflag, char *str, int col) void __fastcall PrintUString(int x, int y, int cjustflag, char *str, int col)
{ {
char *v5; // edi char *v5; // edi
@ -4217,7 +4140,6 @@ LABEL_16:
} }
} }
//----- (0042365B) --------------------------------------------------------
void __fastcall DrawULine(int y) void __fastcall DrawULine(int y)
{ {
char *v1; // esi char *v1; // esi
@ -4240,7 +4162,6 @@ void __fastcall DrawULine(int y)
while ( v3 ); while ( v3 );
} }
//----- (004236A6) --------------------------------------------------------
void __cdecl DrawUniqueInfo() void __cdecl DrawUniqueInfo()
{ {
int v0; // esi int v0; // esi
@ -4286,7 +4207,6 @@ void __cdecl DrawUniqueInfo()
} }
// 69BD04: using guessed type int questlog; // 69BD04: using guessed type int questlog;
//----- (004237DC) --------------------------------------------------------
void __fastcall PrintItemMisc(ItemStruct *x) void __fastcall PrintItemMisc(ItemStruct *x)
{ {
if ( x->_iMiscId == IMISC_SCROLL ) if ( x->_iMiscId == IMISC_SCROLL )
@ -4324,7 +4244,6 @@ void __fastcall PrintItemMisc(ItemStruct *x)
} }
} }
//----- (004238D4) --------------------------------------------------------
void __fastcall PrintItemDetails(ItemStruct *x) void __fastcall PrintItemDetails(ItemStruct *x)
{ {
ItemStruct *v1; // ebp ItemStruct *v1; // ebp
@ -4394,7 +4313,6 @@ void __fastcall PrintItemDetails(ItemStruct *x)
} }
// 4B8824: using guessed type int pinfoflag; // 4B8824: using guessed type int pinfoflag;
//----- (00423AE1) --------------------------------------------------------
void __fastcall PrintItemDur(ItemStruct *x) void __fastcall PrintItemDur(ItemStruct *x)
{ {
ItemStruct *v1; // esi ItemStruct *v1; // esi
@ -4456,7 +4374,6 @@ void __fastcall PrintItemDur(ItemStruct *x)
} }
// 4B8824: using guessed type int pinfoflag; // 4B8824: using guessed type int pinfoflag;
//----- (00423CE0) --------------------------------------------------------
void __fastcall UseItem(int p, int Mid, int spl) void __fastcall UseItem(int p, int Mid, int spl)
{ {
int v3; // esi int v3; // esi
@ -4668,7 +4585,7 @@ LABEL_71:
if ( v24 != 2 ) if ( v24 != 2 )
return; return;
v25 = p; v25 = p;
*(_QWORD *)plr[p]._pMemSpells |= 1i64 << ((unsigned char)spl - 1); *(_QWORD *)plr[p]._pMemSpells |= (__int64)1 << ((unsigned char)spl - 1);
v26 = &plr[p]._pSplLvl[spl]; v26 = &plr[p]._pSplLvl[spl];
if ( *v26 < 15 ) if ( *v26 < 15 )
++*v26; ++*v26;
@ -4794,7 +4711,6 @@ LABEL_71:
} }
} }
//----- (004241D7) --------------------------------------------------------
bool __fastcall StoreStatOk(ItemStruct *h) bool __fastcall StoreStatOk(ItemStruct *h)
{ {
bool sf; // al bool sf; // al
@ -4807,7 +4723,6 @@ bool __fastcall StoreStatOk(ItemStruct *h)
return sf; return sf;
} }
//----- (0042421C) --------------------------------------------------------
bool __fastcall SmithItemOk(int i) bool __fastcall SmithItemOk(int i)
{ {
unsigned char v1; // cl unsigned char v1; // cl
@ -4820,7 +4735,6 @@ bool __fastcall SmithItemOk(int i)
return rv; return rv;
} }
//----- (00424252) --------------------------------------------------------
int __fastcall RndSmithItem(int lvl) int __fastcall RndSmithItem(int lvl)
{ {
int ri; // edx int ri; // edx
@ -4847,7 +4761,6 @@ int __fastcall RndSmithItem(int lvl)
} }
// 424252: using guessed type int var_804[512]; // 424252: using guessed type int var_804[512];
//----- (004242C1) --------------------------------------------------------
void __fastcall BubbleSwapItem(ItemStruct *a, ItemStruct *b) void __fastcall BubbleSwapItem(ItemStruct *a, ItemStruct *b)
{ {
ItemStruct h; // [esp+8h] [ebp-170h] ItemStruct h; // [esp+8h] [ebp-170h]
@ -4857,7 +4770,6 @@ void __fastcall BubbleSwapItem(ItemStruct *a, ItemStruct *b)
qmemcpy(b, &h, sizeof(ItemStruct)); qmemcpy(b, &h, sizeof(ItemStruct));
} }
//----- (004242F5) --------------------------------------------------------
void __cdecl SortSmith() void __cdecl SortSmith()
{ {
int v0; // esi int v0; // esi
@ -4903,7 +4815,6 @@ void __cdecl SortSmith()
} }
} }
//----- (00424351) --------------------------------------------------------
void __fastcall SpawnSmith(int lvl) void __fastcall SpawnSmith(int lvl)
{ {
int v3; // ebp int v3; // ebp
@ -4945,7 +4856,6 @@ void __fastcall SpawnSmith(int lvl)
SortSmith(); SortSmith();
} }
//----- (00424420) --------------------------------------------------------
bool __fastcall PremiumItemOk(int i) bool __fastcall PremiumItemOk(int i)
{ {
unsigned char v1; // cl unsigned char v1; // cl
@ -4963,7 +4873,6 @@ bool __fastcall PremiumItemOk(int i)
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0042445F) --------------------------------------------------------
int __fastcall RndPremiumItem(int minlvl, int maxlvl) int __fastcall RndPremiumItem(int minlvl, int maxlvl)
{ {
int ri; // edx int ri; // edx
@ -4992,7 +4901,6 @@ int __fastcall RndPremiumItem(int minlvl, int maxlvl)
} }
// 42445F: using guessed type int ril[512]; // 42445F: using guessed type int ril[512];
//----- (004244C6) --------------------------------------------------------
void __fastcall SpawnOnePremium(int i, int plvl) void __fastcall SpawnOnePremium(int i, int plvl)
{ {
int itype; // esi int itype; // esi
@ -5019,7 +4927,6 @@ void __fastcall SpawnOnePremium(int i, int plvl)
qmemcpy(item, &holditem, sizeof(ItemStruct)); qmemcpy(item, &holditem, sizeof(ItemStruct));
} }
//----- (004245A0) --------------------------------------------------------
void __fastcall SpawnPremium(int lvl) void __fastcall SpawnPremium(int lvl)
{ {
int i; // eax int i; // eax
@ -5046,7 +4953,6 @@ void __fastcall SpawnPremium(int lvl)
} }
// 69FB38: using guessed type int talker; // 69FB38: using guessed type int talker;
//----- (0042466C) --------------------------------------------------------
bool __fastcall WitchItemOk(int i) bool __fastcall WitchItemOk(int i)
{ {
bool rv; // eax bool rv; // eax
@ -5080,7 +4986,6 @@ bool __fastcall WitchItemOk(int i)
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (004246D2) --------------------------------------------------------
int __fastcall RndWitchItem(int lvl) int __fastcall RndWitchItem(int lvl)
{ {
int ri; // ebx int ri; // ebx
@ -5103,7 +5008,6 @@ int __fastcall RndWitchItem(int lvl)
} }
// 4246D2: using guessed type int var_804[512]; // 4246D2: using guessed type int var_804[512];
//----- (00424735) --------------------------------------------------------
void __cdecl SortWitch() void __cdecl SortWitch()
{ {
signed int v0; // esi signed int v0; // esi
@ -5149,7 +5053,6 @@ void __cdecl SortWitch()
} }
} }
//----- (00424795) --------------------------------------------------------
void __fastcall WitchBookLevel(int ii) void __fastcall WitchBookLevel(int ii)
{ {
int slvl; // edi int slvl; // edi
@ -5175,7 +5078,6 @@ void __fastcall WitchBookLevel(int ii)
} }
} }
//----- (00424815) --------------------------------------------------------
void __fastcall SpawnWitch(int lvl) void __fastcall SpawnWitch(int lvl)
{ {
int v2; // ebp int v2; // ebp
@ -5242,7 +5144,6 @@ void __fastcall SpawnWitch(int lvl)
SortWitch(); SortWitch();
} }
//----- (004249A4) --------------------------------------------------------
int __fastcall RndBoyItem(int lvl) int __fastcall RndBoyItem(int lvl)
{ {
int ri; // edx int ri; // edx
@ -5265,7 +5166,6 @@ int __fastcall RndBoyItem(int lvl)
} }
// 4249A4: using guessed type int var_800[512]; // 4249A4: using guessed type int var_800[512];
//----- (00424A03) --------------------------------------------------------
void __fastcall SpawnBoy(int lvl) void __fastcall SpawnBoy(int lvl)
{ {
int itype; // esi int itype; // esi
@ -5290,7 +5190,6 @@ void __fastcall SpawnBoy(int lvl)
} }
// 6A8A3C: using guessed type int boylevel; // 6A8A3C: using guessed type int boylevel;
//----- (00424A9B) --------------------------------------------------------
bool __fastcall HealerItemOk(int i) bool __fastcall HealerItemOk(int i)
{ {
int v1; // ecx int v1; // ecx
@ -5348,7 +5247,6 @@ LABEL_21:
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00424B49) --------------------------------------------------------
int __fastcall RndHealerItem(int lvl) int __fastcall RndHealerItem(int lvl)
{ {
int ri; // ebx int ri; // ebx
@ -5371,7 +5269,6 @@ int __fastcall RndHealerItem(int lvl)
} }
// 424B49: using guessed type int var_804[512]; // 424B49: using guessed type int var_804[512];
//----- (00424BAC) --------------------------------------------------------
void __cdecl SortHealer() void __cdecl SortHealer()
{ {
signed int v0; // esi signed int v0; // esi
@ -5417,7 +5314,6 @@ void __cdecl SortHealer()
} }
} }
//----- (00424C0C) --------------------------------------------------------
void __fastcall SpawnHealer(int lvl) void __fastcall SpawnHealer(int lvl)
{ {
int v3; // eax int v3; // eax
@ -5477,7 +5373,6 @@ void __fastcall SpawnHealer(int lvl)
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00424D57) --------------------------------------------------------
void __cdecl SpawnStoreGold() void __cdecl SpawnStoreGold()
{ {
GetItemAttrs(0, IDI_GOLD, 1); GetItemAttrs(0, IDI_GOLD, 1);
@ -5485,7 +5380,6 @@ void __cdecl SpawnStoreGold()
golditem._iStatFlag = 1; golditem._iStatFlag = 1;
} }
//----- (00424D80) --------------------------------------------------------
void __fastcall RecreateSmithItem(int ii, int idx, int plvl, int iseed) void __fastcall RecreateSmithItem(int ii, int idx, int plvl, int iseed)
{ {
SetRndSeed(iseed); SetRndSeed(iseed);
@ -5495,7 +5389,6 @@ void __fastcall RecreateSmithItem(int ii, int idx, int plvl, int iseed)
item[ii]._iIdentified = 1; item[ii]._iIdentified = 1;
} }
//----- (00424DD1) --------------------------------------------------------
void __fastcall RecreatePremiumItem(int ii, int idx, int lvl, int iseed) void __fastcall RecreatePremiumItem(int ii, int idx, int lvl, int iseed)
{ {
int itype; // edi int itype; // edi
@ -5509,7 +5402,6 @@ void __fastcall RecreatePremiumItem(int ii, int idx, int lvl, int iseed)
item[ii]._iIdentified = 1; item[ii]._iIdentified = 1;
} }
//----- (00424E3C) --------------------------------------------------------
void __fastcall RecreateBoyItem(int ii, int idx, int lvl, int iseed) void __fastcall RecreateBoyItem(int ii, int idx, int lvl, int iseed)
{ {
int itype; // edi int itype; // edi
@ -5523,7 +5415,6 @@ void __fastcall RecreateBoyItem(int ii, int idx, int lvl, int iseed)
item[ii]._iIdentified = 1; item[ii]._iIdentified = 1;
} }
//----- (00424EA1) --------------------------------------------------------
void __fastcall RecreateWitchItem(int ii, int idx, int lvl, int iseed) void __fastcall RecreateWitchItem(int ii, int idx, int lvl, int iseed)
{ {
int itype; // edi int itype; // edi
@ -5549,7 +5440,6 @@ void __fastcall RecreateWitchItem(int ii, int idx, int lvl, int iseed)
item[ii]._iIdentified = 1; item[ii]._iIdentified = 1;
} }
//----- (00424F52) --------------------------------------------------------
void __fastcall RecreateHealerItem(int ii, int idx, int lvl, int iseed) void __fastcall RecreateHealerItem(int ii, int idx, int lvl, int iseed)
{ {
if ( idx != IDI_HEAL && idx != IDI_FULLHEAL && idx != IDI_RESURRECT ) if ( idx != IDI_HEAL && idx != IDI_FULLHEAL && idx != IDI_RESURRECT )
@ -5563,7 +5453,6 @@ void __fastcall RecreateHealerItem(int ii, int idx, int lvl, int iseed)
item[ii]._iIdentified = 1; item[ii]._iIdentified = 1;
} }
//----- (00424FB8) --------------------------------------------------------
void __fastcall RecreateTownItem(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue) void __fastcall RecreateTownItem(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)
{ {
if ( icreateinfo & 0x400 ) if ( icreateinfo & 0x400 )
@ -5578,7 +5467,6 @@ void __fastcall RecreateTownItem(int ii, int idx, unsigned short icreateinfo, in
RecreateHealerItem(ii, idx, icreateinfo & 0x3F, iseed); RecreateHealerItem(ii, idx, icreateinfo & 0x3F, iseed);
} }
//----- (0042501F) --------------------------------------------------------
void __cdecl RecalcStoreStats() void __cdecl RecalcStoreStats()
{ {
int i; int i;
@ -5604,7 +5492,6 @@ void __cdecl RecalcStoreStats()
// 6A6BB8: using guessed type int stextscrl; // 6A6BB8: using guessed type int stextscrl;
// 6AA700: using guessed type int stextdown; // 6AA700: using guessed type int stextdown;
//----- (004250C0) --------------------------------------------------------
int __cdecl ItemNoFlippy() int __cdecl ItemNoFlippy()
{ {
int r; // ecx int r; // ecx
@ -5617,7 +5504,6 @@ int __cdecl ItemNoFlippy()
return r; return r;
} }
//----- (004250EF) --------------------------------------------------------
void __fastcall CreateSpellBook(int x, int y, int ispell, bool sendmsg, int delta) void __fastcall CreateSpellBook(int x, int y, int ispell, bool sendmsg, int delta)
{ {
int ii; // edi int ii; // edi
@ -5647,7 +5533,6 @@ void __fastcall CreateSpellBook(int x, int y, int ispell, bool sendmsg, int delt
} }
} }
//----- (004251B8) --------------------------------------------------------
void __fastcall CreateMagicItem(int x, int y, int imisc, int icurs, int sendmsg, int delta) void __fastcall CreateMagicItem(int x, int y, int imisc, int icurs, int sendmsg, int delta)
{ {
int ii; // esi int ii; // esi
@ -5677,7 +5562,6 @@ void __fastcall CreateMagicItem(int x, int y, int imisc, int icurs, int sendmsg,
} }
} }
//----- (0042526E) --------------------------------------------------------
bool __fastcall GetItemRecord(int dwSeed, int CI, int indx) bool __fastcall GetItemRecord(int dwSeed, int CI, int indx)
{ {
int v3; // edi int v3; // edi
@ -5721,7 +5605,6 @@ LABEL_8:
return 0; return 0;
} }
//----- (00425311) --------------------------------------------------------
void __fastcall NextItemRecord(int i) void __fastcall NextItemRecord(int i)
{ {
int v1; // eax int v1; // eax
@ -5736,7 +5619,6 @@ void __fastcall NextItemRecord(int i)
} }
} }
//----- (00425357) --------------------------------------------------------
void __fastcall SetItemRecord(int dwSeed, int CI, int indx) void __fastcall SetItemRecord(int dwSeed, int CI, int indx)
{ {
int i; // ecx int i; // ecx
@ -5751,7 +5633,6 @@ void __fastcall SetItemRecord(int dwSeed, int CI, int indx)
} }
} }
//----- (0042539E) --------------------------------------------------------
void __fastcall PutItemRecord(int seed, int ci, int index) void __fastcall PutItemRecord(int seed, int ci, int index)
{ {
int v3; // edi int v3; // edi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __ITEMS_H__
* United States. Use of a copyright notice is precautionary only and #define __ITEMS_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//items
extern int itemactive[127]; extern int itemactive[127];
extern int uitemflag; extern int uitemflag;
extern int itemavail[127]; extern int itemavail[127];
@ -151,3 +143,5 @@ extern int ItemDropSnds[35];
extern int ItemInvSnds[35]; extern int ItemInvSnds[35];
extern int idoppely; // weak extern int idoppely; // weak
extern int premiumlvladd[6]; extern int premiumlvladd[6];
#endif /* __ITEMS_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -488,7 +479,6 @@ unsigned char byte_49463C[18][18] = /* unused */
unsigned char RadiusAdj[23] = { 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0 }; unsigned char RadiusAdj[23] = { 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0 };
//----- (00425443) --------------------------------------------------------
void __fastcall SetLightFX(int *x, int *y, short *s_r, short *s_g, int *s_b, int *d_r, int *d_g, int *d_b) void __fastcall SetLightFX(int *x, int *y, short *s_r, short *s_g, int *s_b, int *d_r, int *d_g, int *d_b)
{ {
short *v8; // eax short *v8; // eax
@ -520,7 +510,6 @@ void __fastcall SetLightFX(int *x, int *y, short *s_r, short *s_g, int *s_b, int
} }
} }
//----- (004254BA) --------------------------------------------------------
void __fastcall DoLighting(int nXPos, int nYPos, int nRadius, int Lnum) void __fastcall DoLighting(int nXPos, int nYPos, int nRadius, int Lnum)
{ {
int v4; // edi int v4; // edi
@ -803,7 +792,6 @@ void __fastcall DoLighting(int nXPos, int nYPos, int nRadius, int Lnum)
} }
} }
//----- (004258B0) --------------------------------------------------------
void __fastcall DoUnLight(int nXPos, int nYPos, int nRadius) void __fastcall DoUnLight(int nXPos, int nYPos, int nRadius)
{ {
int max_y; // ebx int max_y; // ebx
@ -844,7 +832,6 @@ void __fastcall DoUnLight(int nXPos, int nYPos, int nRadius)
} }
} }
//----- (00425930) --------------------------------------------------------
void __fastcall DoUnVision(int nXPos, int nYPos, int nRadius) void __fastcall DoUnVision(int nXPos, int nYPos, int nRadius)
{ {
int y2; // edi int y2; // edi
@ -882,7 +869,6 @@ void __fastcall DoUnVision(int nXPos, int nYPos, int nRadius)
} }
} }
//----- (0042598A) --------------------------------------------------------
void __fastcall DoVision(int nXPos, int nYPos, int nRadius, unsigned char doautomap, int visible) void __fastcall DoVision(int nXPos, int nYPos, int nRadius, unsigned char doautomap, int visible)
{ {
char *v5; // esi char *v5; // esi
@ -1046,7 +1032,6 @@ void __fastcall DoVision(int nXPos, int nYPos, int nRadius, unsigned char doauto
while ( v27 < 4 ); while ( v27 < 4 );
} }
//----- (00425C13) --------------------------------------------------------
void __cdecl FreeLightTable() void __cdecl FreeLightTable()
{ {
char *v0; // ecx char *v0; // ecx
@ -1056,13 +1041,11 @@ void __cdecl FreeLightTable()
mem_free_dbg(v0); mem_free_dbg(v0);
} }
//----- (00425C25) --------------------------------------------------------
void __cdecl InitLightTable() void __cdecl InitLightTable()
{ {
pLightTbl = (char *)DiabloAllocPtr(6912); pLightTbl = (char *)DiabloAllocPtr(6912);
} }
//----- (00425C35) --------------------------------------------------------
void __cdecl MakeLightTable() void __cdecl MakeLightTable()
{ {
char *v0; // ebx char *v0; // ebx
@ -1197,7 +1180,7 @@ void __cdecl MakeLightTable()
{ {
++v10; ++v10;
} }
if ( v10 == -1 ) if ( v10 == LOBYTE(-1) )
{ {
v11 = 0; v11 = 0;
v10 = 0; v10 = 0;
@ -1408,7 +1391,6 @@ void __cdecl MakeLightTable()
// 525728: using guessed type int light4flag; // 525728: using guessed type int light4flag;
// 5BB1ED: using guessed type char leveltype; // 5BB1ED: using guessed type char leveltype;
//----- (00425FB8) --------------------------------------------------------
void __cdecl InitLightMax() void __cdecl InitLightMax()
{ {
lightmax = light4flag == 0 ? 15 : 3; lightmax = light4flag == 0 ? 15 : 3;
@ -1416,7 +1398,6 @@ void __cdecl InitLightMax()
// 525728: using guessed type int light4flag; // 525728: using guessed type int light4flag;
// 642A14: using guessed type char lightmax; // 642A14: using guessed type char lightmax;
//----- (00425FCE) --------------------------------------------------------
void __cdecl InitLighting() void __cdecl InitLighting()
{ {
signed int v0; // eax signed int v0; // eax
@ -1435,7 +1416,6 @@ void __cdecl InitLighting()
// 642A18: using guessed type int dolighting; // 642A18: using guessed type int dolighting;
// 646A28: using guessed type int lightflag; // 646A28: using guessed type int lightflag;
//----- (00425FEC) --------------------------------------------------------
int __fastcall AddLight(int x, int y, int r) int __fastcall AddLight(int x, int y, int r)
{ {
int lid; // eax int lid; // eax
@ -1458,7 +1438,6 @@ int __fastcall AddLight(int x, int y, int r)
// 642A18: using guessed type int dolighting; // 642A18: using guessed type int dolighting;
// 646A28: using guessed type int lightflag; // 646A28: using guessed type int lightflag;
//----- (00426056) --------------------------------------------------------
void __fastcall AddUnLight(int i) void __fastcall AddUnLight(int i)
{ {
if ( !lightflag && i != -1 ) if ( !lightflag && i != -1 )
@ -1470,7 +1449,6 @@ void __fastcall AddUnLight(int i)
// 642A18: using guessed type int dolighting; // 642A18: using guessed type int dolighting;
// 646A28: using guessed type int lightflag; // 646A28: using guessed type int lightflag;
//----- (00426076) --------------------------------------------------------
void __fastcall ChangeLightRadius(int i, int r) void __fastcall ChangeLightRadius(int i, int r)
{ {
if ( !lightflag && i != -1 ) if ( !lightflag && i != -1 )
@ -1486,7 +1464,6 @@ void __fastcall ChangeLightRadius(int i, int r)
// 642A18: using guessed type int dolighting; // 642A18: using guessed type int dolighting;
// 646A28: using guessed type int lightflag; // 646A28: using guessed type int lightflag;
//----- (004260C5) --------------------------------------------------------
void __fastcall ChangeLightXY(int i, int x, int y) void __fastcall ChangeLightXY(int i, int x, int y)
{ {
if ( !lightflag && i != -1 ) if ( !lightflag && i != -1 )
@ -1503,7 +1480,6 @@ void __fastcall ChangeLightXY(int i, int x, int y)
// 642A18: using guessed type int dolighting; // 642A18: using guessed type int dolighting;
// 646A28: using guessed type int lightflag; // 646A28: using guessed type int lightflag;
//----- (00426120) --------------------------------------------------------
void __fastcall ChangeLightOff(int i, int x, int y) void __fastcall ChangeLightOff(int i, int x, int y)
{ {
if ( !lightflag && i != -1 ) if ( !lightflag && i != -1 )
@ -1520,7 +1496,6 @@ void __fastcall ChangeLightOff(int i, int x, int y)
// 642A18: using guessed type int dolighting; // 642A18: using guessed type int dolighting;
// 646A28: using guessed type int lightflag; // 646A28: using guessed type int lightflag;
//----- (0042617B) --------------------------------------------------------
void __fastcall ChangeLight(int i, int x, int y, int r) void __fastcall ChangeLight(int i, int x, int y, int r)
{ {
if ( !lightflag && i != -1 ) if ( !lightflag && i != -1 )
@ -1538,7 +1513,6 @@ void __fastcall ChangeLight(int i, int x, int y, int r)
// 642A18: using guessed type int dolighting; // 642A18: using guessed type int dolighting;
// 646A28: using guessed type int lightflag; // 646A28: using guessed type int lightflag;
//----- (004261E7) --------------------------------------------------------
void __cdecl ProcessLightList() void __cdecl ProcessLightList()
{ {
int v0; // ebp int v0; // ebp
@ -1609,13 +1583,11 @@ void __cdecl ProcessLightList()
// 642A18: using guessed type int dolighting; // 642A18: using guessed type int dolighting;
// 646A28: using guessed type int lightflag; // 646A28: using guessed type int lightflag;
//----- (004262E0) --------------------------------------------------------
void __cdecl SavePreLighting() void __cdecl SavePreLighting()
{ {
memcpy(dTransVal2, dTransVal, 0x3100u); memcpy(dTransVal2, dTransVal, 0x3100u);
} }
//----- (004262F8) --------------------------------------------------------
void __cdecl InitVision() void __cdecl InitVision()
{ {
numvision = 0; numvision = 0;
@ -1627,7 +1599,6 @@ void __cdecl InitVision()
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
// 642A0C: using guessed type int dovision; // 642A0C: using guessed type int dovision;
//----- (00426333) --------------------------------------------------------
int __fastcall AddVision(int x, int y, int r, bool mine) int __fastcall AddVision(int x, int y, int r, bool mine)
{ {
int vid; // eax int vid; // eax
@ -1652,7 +1623,6 @@ int __fastcall AddVision(int x, int y, int r, bool mine)
} }
// 642A0C: using guessed type int dovision; // 642A0C: using guessed type int dovision;
//----- (004263A0) --------------------------------------------------------
void __fastcall ChangeVisionRadius(int id, int r) void __fastcall ChangeVisionRadius(int id, int r)
{ {
int i; // esi int i; // esi
@ -1675,7 +1645,6 @@ void __fastcall ChangeVisionRadius(int id, int r)
} }
// 642A0C: using guessed type int dovision; // 642A0C: using guessed type int dovision;
//----- (004263E1) --------------------------------------------------------
void __fastcall ChangeVisionXY(int id, int x, int y) void __fastcall ChangeVisionXY(int id, int x, int y)
{ {
int i; // esi int i; // esi
@ -1699,7 +1668,6 @@ void __fastcall ChangeVisionXY(int id, int x, int y)
} }
// 642A0C: using guessed type int dovision; // 642A0C: using guessed type int dovision;
//----- (0042642B) --------------------------------------------------------
void __cdecl ProcessVisionList() void __cdecl ProcessVisionList()
{ {
bool delflag; // ecx bool delflag; // ecx
@ -1751,7 +1719,6 @@ void __cdecl ProcessVisionList()
// 5A5590: using guessed type char TransVal; // 5A5590: using guessed type char TransVal;
// 642A0C: using guessed type int dovision; // 642A0C: using guessed type int dovision;
//----- (0042651F) --------------------------------------------------------
void __cdecl lighting_color_cycling() void __cdecl lighting_color_cycling()
{ {
char *v0; // eax char *v0; // eax

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __LIGHTING_H__
* United States. Use of a copyright notice is precautionary only and #define __LIGHTING_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//lighting
extern LightListStruct VisionList[32]; extern LightListStruct VisionList[32];
extern char lightactive[32]; extern char lightactive[32];
extern LightListStruct LightList[32]; extern LightListStruct LightList[32];
@ -56,3 +48,5 @@ extern void *pCrawlTable[19];
extern unsigned char vCrawlTable[23][30]; extern unsigned char vCrawlTable[23][30];
extern unsigned char byte_49463C[18][18]; extern unsigned char byte_49463C[18][18];
extern unsigned char RadiusAdj[23]; extern unsigned char RadiusAdj[23];
#endif /* __LIGHTING_H__ */

View File

@ -1,19 +1,9 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
void *tbuff; void *tbuff;
//----- (00426564) --------------------------------------------------------
void __fastcall LoadGame(bool firstflag) void __fastcall LoadGame(bool firstflag)
{ {
int v1; // esi int v1; // esi
@ -399,7 +389,6 @@ void __fastcall LoadGame(bool firstflag)
// 5CCB10: using guessed type char setlvlnum; // 5CCB10: using guessed type char setlvlnum;
// 5CF31D: using guessed type char setlevel; // 5CF31D: using guessed type char setlevel;
//----- (00426AE2) --------------------------------------------------------
char __cdecl BLoad() char __cdecl BLoad()
{ {
char result; // al char result; // al
@ -409,7 +398,6 @@ char __cdecl BLoad()
return result; return result;
} }
//----- (00426AF0) --------------------------------------------------------
int __cdecl ILoad() int __cdecl ILoad()
{ {
int v0; // eax int v0; // eax
@ -429,7 +417,6 @@ int __cdecl ILoad()
return result; return result;
} }
//----- (00426B2C) --------------------------------------------------------
int __cdecl ILoad_2() int __cdecl ILoad_2()
{ {
int v0; // eax int v0; // eax
@ -449,7 +436,6 @@ int __cdecl ILoad_2()
return result; return result;
} }
//----- (00426B68) --------------------------------------------------------
bool __cdecl OLoad() bool __cdecl OLoad()
{ {
char v0; // cl char v0; // cl
@ -463,14 +449,12 @@ bool __cdecl OLoad()
return result; return result;
} }
//----- (00426B7F) --------------------------------------------------------
void __fastcall LoadPlayer(int i) void __fastcall LoadPlayer(int i)
{ {
memcpy(&plr[i], tbuff, 0x54B0u); memcpy(&plr[i], tbuff, 0x54B0u);
tbuff = (char *)tbuff + 21680; tbuff = (char *)tbuff + 21680;
} }
//----- (00426BA9) --------------------------------------------------------
void __fastcall LoadMonster(int i) void __fastcall LoadMonster(int i)
{ {
int v1; // edi int v1; // edi
@ -481,21 +465,18 @@ void __fastcall LoadMonster(int i)
SyncMonsterAnim(v1); SyncMonsterAnim(v1);
} }
//----- (00426BDE) --------------------------------------------------------
void __fastcall LoadMissile(int i) void __fastcall LoadMissile(int i)
{ {
memcpy(&missile[i], tbuff, 0xB0u); memcpy(&missile[i], tbuff, 0xB0u);
tbuff = (char *)tbuff + 176; tbuff = (char *)tbuff + 176;
} }
//----- (00426C08) --------------------------------------------------------
void __fastcall LoadObject(int i) void __fastcall LoadObject(int i)
{ {
memcpy(&object[i], tbuff, 0x78u); memcpy(&object[i], tbuff, 0x78u);
tbuff = (char *)tbuff + 120; tbuff = (char *)tbuff + 120;
} }
//----- (00426C2A) --------------------------------------------------------
void __fastcall LoadItem(int i) void __fastcall LoadItem(int i)
{ {
int v1; // edi int v1; // edi
@ -506,14 +487,12 @@ void __fastcall LoadItem(int i)
GetItemFrm(v1); GetItemFrm(v1);
} }
//----- (00426C5F) --------------------------------------------------------
void __fastcall LoadPremium(int i) void __fastcall LoadPremium(int i)
{ {
memcpy(&premiumitem[i], tbuff, 0x170u); memcpy(&premiumitem[i], tbuff, 0x170u);
tbuff = (char *)tbuff + 368; tbuff = (char *)tbuff + 368;
} }
//----- (00426C89) --------------------------------------------------------
void __fastcall LoadQuest(int i) void __fastcall LoadQuest(int i)
{ {
memcpy(&quests[i], tbuff, 0x18u); memcpy(&quests[i], tbuff, 0x18u);
@ -525,28 +504,24 @@ void __fastcall LoadQuest(int i)
DoomQuestState = ILoad(); DoomQuestState = ILoad();
} }
//----- (00426CDE) --------------------------------------------------------
void __fastcall LoadLighting(int i) void __fastcall LoadLighting(int i)
{ {
memcpy(&LightList[i], tbuff, 0x34u); memcpy(&LightList[i], tbuff, 0x34u);
tbuff = (char *)tbuff + 52; tbuff = (char *)tbuff + 52;
} }
//----- (00426D00) --------------------------------------------------------
void __fastcall LoadVision(int i) void __fastcall LoadVision(int i)
{ {
memcpy(&VisionList[i], tbuff, 0x34u); memcpy(&VisionList[i], tbuff, 0x34u);
tbuff = (char *)tbuff + 52; tbuff = (char *)tbuff + 52;
} }
//----- (00426D22) --------------------------------------------------------
void __fastcall LoadPortal(int i) void __fastcall LoadPortal(int i)
{ {
memcpy(&portal[i], tbuff, 0x18u); memcpy(&portal[i], tbuff, 0x18u);
tbuff = (char *)tbuff + 24; tbuff = (char *)tbuff + 24;
} }
//----- (00426D45) --------------------------------------------------------
void __cdecl SaveGame() void __cdecl SaveGame()
{ {
int v0; // eax int v0; // eax
@ -905,14 +880,12 @@ void __cdecl SaveGame()
// 5CCB10: using guessed type char setlvlnum; // 5CCB10: using guessed type char setlvlnum;
// 5CF31D: using guessed type char setlevel; // 5CF31D: using guessed type char setlevel;
//----- (00427203) --------------------------------------------------------
void __fastcall BSave(char v) void __fastcall BSave(char v)
{ {
*(_BYTE *)tbuff = v; *(_BYTE *)tbuff = v;
tbuff = (char *)tbuff + 1; tbuff = (char *)tbuff + 1;
} }
//----- (00427211) --------------------------------------------------------
void __fastcall ISave(int v) void __fastcall ISave(int v)
{ {
*(_BYTE *)tbuff = _HIBYTE(v); *(_BYTE *)tbuff = _HIBYTE(v);
@ -925,7 +898,6 @@ void __fastcall ISave(int v)
tbuff = (char *)tbuff + 1; tbuff = (char *)tbuff + 1;
} }
//----- (00427258) --------------------------------------------------------
void __fastcall ISave_2(int v) void __fastcall ISave_2(int v)
{ {
*(_BYTE *)tbuff = _HIBYTE(v); *(_BYTE *)tbuff = _HIBYTE(v);
@ -938,7 +910,6 @@ void __fastcall ISave_2(int v)
tbuff = (char *)tbuff + 1; tbuff = (char *)tbuff + 1;
} }
//----- (0042729F) --------------------------------------------------------
void __fastcall OSave(unsigned char v) void __fastcall OSave(unsigned char v)
{ {
if ( v ) if ( v )
@ -948,49 +919,42 @@ void __fastcall OSave(unsigned char v)
tbuff = (char *)tbuff + 1; tbuff = (char *)tbuff + 1;
} }
//----- (004272B7) --------------------------------------------------------
void __fastcall SavePlayer(int i) void __fastcall SavePlayer(int i)
{ {
memcpy(tbuff, &plr[i], 0x54B0u); memcpy(tbuff, &plr[i], 0x54B0u);
tbuff = (char *)tbuff + 21680; tbuff = (char *)tbuff + 21680;
} }
//----- (004272E1) --------------------------------------------------------
void __fastcall SaveMonster(int i) void __fastcall SaveMonster(int i)
{ {
memcpy(tbuff, &monster[i], 0xD8u); memcpy(tbuff, &monster[i], 0xD8u);
tbuff = (char *)tbuff + 216; tbuff = (char *)tbuff + 216;
} }
//----- (0042730B) --------------------------------------------------------
void __fastcall SaveMissile(int i) void __fastcall SaveMissile(int i)
{ {
memcpy(tbuff, &missile[i], 0xB0u); memcpy(tbuff, &missile[i], 0xB0u);
tbuff = (char *)tbuff + 176; tbuff = (char *)tbuff + 176;
} }
//----- (00427335) --------------------------------------------------------
void __fastcall SaveObject(int i) void __fastcall SaveObject(int i)
{ {
memcpy(tbuff, &object[i], 0x78u); memcpy(tbuff, &object[i], 0x78u);
tbuff = (char *)tbuff + 120; tbuff = (char *)tbuff + 120;
} }
//----- (00427357) --------------------------------------------------------
void __fastcall SaveItem(int i) void __fastcall SaveItem(int i)
{ {
memcpy(tbuff, &item[i], 0x170u); memcpy(tbuff, &item[i], 0x170u);
tbuff = (char *)tbuff + 368; tbuff = (char *)tbuff + 368;
} }
//----- (00427381) --------------------------------------------------------
void __fastcall SavePremium(int i) void __fastcall SavePremium(int i)
{ {
memcpy(tbuff, &premiumitem[i], 0x170u); memcpy(tbuff, &premiumitem[i], 0x170u);
tbuff = (char *)tbuff + 368; tbuff = (char *)tbuff + 368;
} }
//----- (004273AB) --------------------------------------------------------
void __fastcall SaveQuest(int i) void __fastcall SaveQuest(int i)
{ {
memcpy(tbuff, &quests[i], 0x18u); memcpy(tbuff, &quests[i], 0x18u);
@ -1002,28 +966,24 @@ void __fastcall SaveQuest(int i)
ISave(DoomQuestState); ISave(DoomQuestState);
} }
//----- (00427404) --------------------------------------------------------
void __fastcall SaveLighting(int i) void __fastcall SaveLighting(int i)
{ {
memcpy(tbuff, &LightList[i], 0x34u); memcpy(tbuff, &LightList[i], 0x34u);
tbuff = (char *)tbuff + 52; tbuff = (char *)tbuff + 52;
} }
//----- (00427426) --------------------------------------------------------
void __fastcall SaveVision(int i) void __fastcall SaveVision(int i)
{ {
memcpy(tbuff, &VisionList[i], 0x34u); memcpy(tbuff, &VisionList[i], 0x34u);
tbuff = (char *)tbuff + 52; tbuff = (char *)tbuff + 52;
} }
//----- (00427448) --------------------------------------------------------
void __fastcall SavePortal(int i) void __fastcall SavePortal(int i)
{ {
memcpy(tbuff, &portal[i], 0x18u); memcpy(tbuff, &portal[i], 0x18u);
tbuff = (char *)tbuff + 24; tbuff = (char *)tbuff + 24;
} }
//----- (0042746B) --------------------------------------------------------
void __cdecl SaveLevel() void __cdecl SaveLevel()
{ {
int v0; // eax int v0; // eax
@ -1162,7 +1122,6 @@ void __cdecl SaveLevel()
// 5CCB10: using guessed type char setlvlnum; // 5CCB10: using guessed type char setlvlnum;
// 5CF31D: using guessed type char setlevel; // 5CF31D: using guessed type char setlevel;
//----- (0042772F) --------------------------------------------------------
void __cdecl LoadLevel() void __cdecl LoadLevel()
{ {
int i; // esi int i; // esi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __LOADSAVE_H__
* United States. Use of a copyright notice is precautionary only and #define __LOADSAVE_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//loadsave
extern void *tbuff; extern void *tbuff;
void __fastcall LoadGame(bool firstflag); void __fastcall LoadGame(bool firstflag);
@ -44,3 +36,5 @@ void __fastcall SaveVision(int i);
void __fastcall SavePortal(int i); void __fastcall SavePortal(int i);
void __cdecl SaveLevel(); void __cdecl SaveLevel();
void __cdecl LoadLevel(); void __cdecl LoadLevel();
#endif /* __LOADSAVE_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -25,7 +16,6 @@ int log_inf = 0x7F800000; // weak
int log_not_created = 1; // weak int log_not_created = 1; // weak
HANDLE log_file = (HANDLE)0xFFFFFFFF; // idb HANDLE log_file = (HANDLE)0xFFFFFFFF; // idb
//----- (004279F7) --------------------------------------------------------
struct log_cpp_init_1 struct log_cpp_init_1
{ {
log_cpp_init_1() log_cpp_init_1()
@ -36,7 +26,6 @@ struct log_cpp_init_1
// 47F070: using guessed type int log_inf; // 47F070: using guessed type int log_inf;
// 646A30: using guessed type int log_cpp_init_value; // 646A30: using guessed type int log_cpp_init_value;
//----- (00427A02) --------------------------------------------------------
struct log_cpp_init_2 struct log_cpp_init_2
{ {
log_cpp_init_2() log_cpp_init_2()
@ -46,25 +35,21 @@ struct log_cpp_init_2
} }
} _log_cpp_init_2; } _log_cpp_init_2;
//----- (00427A0C) --------------------------------------------------------
void __cdecl log_init_mutex() void __cdecl log_init_mutex()
{ {
InitializeCriticalSection(&sgMemCrit); InitializeCriticalSection(&sgMemCrit);
} }
//----- (00427A18) --------------------------------------------------------
void __cdecl j_log_cleanup_mutex() void __cdecl j_log_cleanup_mutex()
{ {
atexit(log_cleanup_mutex); atexit(log_cleanup_mutex);
} }
//----- (00427A24) --------------------------------------------------------
void __cdecl log_cleanup_mutex() void __cdecl log_cleanup_mutex()
{ {
DeleteCriticalSection(&sgMemCrit); DeleteCriticalSection(&sgMemCrit);
} }
//----- (00427A30) --------------------------------------------------------
void __cdecl log_flush(bool force_close) void __cdecl log_flush(bool force_close)
{ {
void *v1; // eax void *v1; // eax
@ -95,7 +80,6 @@ void __cdecl log_flush(bool force_close)
LeaveCriticalSection(&sgMemCrit); LeaveCriticalSection(&sgMemCrit);
} }
//----- (00427AC2) --------------------------------------------------------
void *__cdecl log_create() void *__cdecl log_create()
{ {
char *v0; // eax char *v0; // eax
@ -151,7 +135,6 @@ void *__cdecl log_create()
} }
// 4947D4: using guessed type int log_not_created; // 4947D4: using guessed type int log_not_created;
//----- (00427C18) --------------------------------------------------------
void __fastcall log_get_version(VS_FIXEDFILEINFO *file_info) void __fastcall log_get_version(VS_FIXEDFILEINFO *file_info)
{ {
DWORD v1; // eax DWORD v1; // eax
@ -185,7 +168,6 @@ void __fastcall log_get_version(VS_FIXEDFILEINFO *file_info)
} }
} }
//----- (00427CC9) --------------------------------------------------------
void log_printf(char *pszFmt, ...) void log_printf(char *pszFmt, ...)
{ {
size_t v1; // edi size_t v1; // edi
@ -212,7 +194,6 @@ void log_printf(char *pszFmt, ...)
LeaveCriticalSection(&sgMemCrit); LeaveCriticalSection(&sgMemCrit);
} }
//----- (00427D75) --------------------------------------------------------
void __cdecl log_dump_computer_info() void __cdecl log_dump_computer_info()
{ {
char Buffer[64]; // [esp+0h] [ebp-88h] char Buffer[64]; // [esp+0h] [ebp-88h]

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __LOGGING_H__
* United States. Use of a copyright notice is precautionary only and #define __LOGGING_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//logging
extern int log_cpp_init_value; // weak extern int log_cpp_init_value; // weak
extern CHAR FileName[260]; // idb extern CHAR FileName[260]; // idb
extern char log_buffer[388]; extern char log_buffer[388];
@ -35,3 +27,5 @@ extern int log_inf; // weak
extern int log_not_created; // weak extern int log_not_created; // weak
extern HANDLE log_file; // idb extern HANDLE log_file; // idb
#endif /* __LOGGING_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -20,7 +11,6 @@ int mainmenu_inf = 0x7F800000; // weak
int menu_music_track_id = 5; // idb int menu_music_track_id = 5; // idb
//----- (00427E13) --------------------------------------------------------
struct mainmenu_cpp_init struct mainmenu_cpp_init
{ {
mainmenu_cpp_init() mainmenu_cpp_init()
@ -31,7 +21,6 @@ struct mainmenu_cpp_init
// 47F074: using guessed type int mainmenu_inf; // 47F074: using guessed type int mainmenu_inf;
// 646CE0: using guessed type int mainmenu_cpp_init_value; // 646CE0: using guessed type int mainmenu_cpp_init_value;
//----- (00427E1E) --------------------------------------------------------
void __cdecl mainmenu_refresh_music() void __cdecl mainmenu_refresh_music()
{ {
int v0; // eax int v0; // eax
@ -47,7 +36,6 @@ void __cdecl mainmenu_refresh_music()
menu_music_track_id = v0; menu_music_track_id = v0;
} }
//----- (00427E45) --------------------------------------------------------
void __stdcall mainmenu_create_hero(char *a1, char *a2) void __stdcall mainmenu_create_hero(char *a1, char *a2)
{ {
// char *v2; // [esp-14h] [ebp-14h] // char *v2; // [esp-14h] [ebp-14h]
@ -56,7 +44,6 @@ void __stdcall mainmenu_create_hero(char *a1, char *a2)
pfile_create_save_file(a1, a2); pfile_create_save_file(a1, a2);
} }
//----- (00427E62) --------------------------------------------------------
int __stdcall mainmenu_select_hero_dialog(int u1, int u2, int u3, int u4, int mode, char *cname, int clen, char *cdesc, int cdlen, int *multi) /* fix args */ int __stdcall mainmenu_select_hero_dialog(int u1, int u2, int u3, int u4, int mode, char *cname, int clen, char *cdesc, int cdlen, int *multi) /* fix args */
{ {
int v10; // eax int v10; // eax
@ -119,7 +106,6 @@ LABEL_6:
// 5256E8: using guessed type int dword_5256E8; // 5256E8: using guessed type int dword_5256E8;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00427F76) --------------------------------------------------------
void __fastcall mainmenu_action(int option) void __fastcall mainmenu_action(int option)
{ {
int v1; // eax int v1; // eax
@ -165,7 +151,6 @@ LABEL_16:
} }
// 634980: using guessed type int window_activated; // 634980: using guessed type int window_activated;
//----- (00427FEC) --------------------------------------------------------
int __cdecl mainmenu_single_player() int __cdecl mainmenu_single_player()
{ {
gbMaxPlayers = 1; gbMaxPlayers = 1;
@ -173,7 +158,6 @@ int __cdecl mainmenu_single_player()
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (00427FFA) --------------------------------------------------------
int __fastcall mainmenu_init_menu(int a1) int __fastcall mainmenu_init_menu(int a1)
{ {
int v1; // esi int v1; // esi
@ -189,7 +173,6 @@ int __fastcall mainmenu_init_menu(int a1)
return v3; return v3;
} }
//----- (00428030) --------------------------------------------------------
int __cdecl mainmenu_multi_player() int __cdecl mainmenu_multi_player()
{ {
gbMaxPlayers = 4; gbMaxPlayers = 4;
@ -197,7 +180,6 @@ int __cdecl mainmenu_multi_player()
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0042803F) --------------------------------------------------------
void __cdecl mainmenu_play_intro() void __cdecl mainmenu_play_intro()
{ {
music_stop(); music_stop();

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __MAINMENU_H__
* United States. Use of a copyright notice is precautionary only and #define __MAINMENU_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//mainmenu
extern int mainmenu_cpp_init_value; // weak extern int mainmenu_cpp_init_value; // weak
extern char chr_name_str[16]; extern char chr_name_str[16];
@ -30,3 +22,5 @@ extern int mainmenu_inf; // weak
/* rdata */ /* rdata */
extern int menu_music_track_id; // idb extern int menu_music_track_id; // idb
#endif /* __MAINMENU_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -50,7 +41,6 @@ unsigned char mfontkern[56] =
int qscroll_spd_tbl[9] = { 2, 4, 6, 8, 0, -1, -2, -3, -4 }; int qscroll_spd_tbl[9] = { 2, 4, 6, 8, 0, -1, -2, -3, -4 };
//----- (00428056) --------------------------------------------------------
void __cdecl FreeQuestText() void __cdecl FreeQuestText()
{ {
void *v0; // ecx void *v0; // ecx
@ -64,7 +54,6 @@ void __cdecl FreeQuestText()
mem_free_dbg(v1); mem_free_dbg(v1);
} }
//----- (0042807A) --------------------------------------------------------
void __cdecl InitQuestText() void __cdecl InitQuestText()
{ {
unsigned char *v0; // eax unsigned char *v0; // eax
@ -76,7 +65,6 @@ void __cdecl InitQuestText()
} }
// 646D00: using guessed type char qtextflag; // 646D00: using guessed type char qtextflag;
//----- (004280A4) --------------------------------------------------------
void __fastcall InitQTextMsg(int m) void __fastcall InitQTextMsg(int m)
{ {
if ( alltext[m].scrlltxt ) if ( alltext[m].scrlltxt )
@ -98,7 +86,6 @@ void __fastcall InitQTextMsg(int m)
// 646D08: using guessed type int sgLastScroll; // 646D08: using guessed type int sgLastScroll;
// 69BD04: using guessed type int questlog; // 69BD04: using guessed type int questlog;
//----- (00428104) --------------------------------------------------------
void __cdecl DrawQTextBack() void __cdecl DrawQTextBack()
{ {
char *v0; // edi char *v0; // edi
@ -148,7 +135,6 @@ void __cdecl DrawQTextBack()
*v0 = 0; *v0 = 0;
} }
//----- (00428160) --------------------------------------------------------
void __fastcall PrintQTextChr(int screen_x, int screen_y, char *cel_buf, int frame) void __fastcall PrintQTextChr(int screen_x, int screen_y, char *cel_buf, int frame)
{ {
char *v4; // ebx char *v4; // ebx
@ -214,7 +200,6 @@ LABEL_15:
while ( (char *)v7 != v5 ); while ( (char *)v7 != v5 );
} }
//----- (00428202) --------------------------------------------------------
void __cdecl DrawQText() void __cdecl DrawQText()
{ {
char *v0; // edi char *v0; // edi

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __MINITEXT_H__
* United States. Use of a copyright notice is precautionary only and #define __MINITEXT_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//minitext
extern int qtexty; // weak extern int qtexty; // weak
extern char *qtextptr; extern char *qtextptr;
extern int qtextSpd; // weak extern int qtextSpd; // weak
@ -34,3 +26,5 @@ extern unsigned char mfontkern[56];
/* rdata */ /* rdata */
extern int qscroll_spd_tbl[9]; extern int qscroll_spd_tbl[9];
#endif /* __MINITEXT_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __MISSILES_H__
* United States. Use of a copyright notice is precautionary only and #define __MISSILES_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//missile
extern int missileactive[125]; extern int missileactive[125];
extern int missileavail[125]; extern int missileavail[125];
extern MissileStruct missile[125]; extern MissileStruct missile[125];
@ -159,3 +151,5 @@ extern MissileData missiledata[68];
extern MisFileData misfiledata[47]; extern MisFileData misfiledata[47];
extern int XDirAdd[8]; extern int XDirAdd[8];
extern int YDirAdd[8]; extern int YDirAdd[8];
#endif /* __MISSILES_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __MONSTER_H__
* United States. Use of a copyright notice is precautionary only and #define __MONSTER_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//monster
extern int MissileFileFlag; // weak extern int MissileFileFlag; // weak
extern int monster_cpp_init_value; // weak extern int monster_cpp_init_value; // weak
extern int monstkills[200]; extern int monstkills[200];
@ -199,3 +191,5 @@ extern int rnd60[4];
// //
extern void (__fastcall *AiProc[])(int i); extern void (__fastcall *AiProc[])(int i);
#endif /* __MONSTER_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -17,7 +8,6 @@ int loop_movie; // weak
int movie_inf = 0x7F800000; // weak int movie_inf = 0x7F800000; // weak
//----- (0043AD38) --------------------------------------------------------
struct movie_cpp_init struct movie_cpp_init
{ {
movie_cpp_init() movie_cpp_init()
@ -28,7 +18,6 @@ struct movie_cpp_init
// 47F144: using guessed type int movie_inf; // 47F144: using guessed type int movie_inf;
// 659AF4: using guessed type int movie_cpp_init_value; // 659AF4: using guessed type int movie_cpp_init_value;
//----- (0043AD43) --------------------------------------------------------
void __fastcall play_movie(char *pszMovie, bool user_can_close) void __fastcall play_movie(char *pszMovie, bool user_can_close)
{ {
char *v2; // esi char *v2; // esi
@ -80,7 +69,6 @@ void __fastcall play_movie(char *pszMovie, bool user_can_close)
// 659AF8: using guessed type int movie_playing; // 659AF8: using guessed type int movie_playing;
// 659AFC: using guessed type int loop_movie; // 659AFC: using guessed type int loop_movie;
//----- (0043AE3E) --------------------------------------------------------
LRESULT __stdcall MovieWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) LRESULT __stdcall MovieWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{ {
if ( Msg == WM_KEYFIRST || Msg == WM_CHAR ) if ( Msg == WM_KEYFIRST || Msg == WM_CHAR )

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __MOVIE_H__
* United States. Use of a copyright notice is precautionary only and #define __MOVIE_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//movie
extern int movie_cpp_init_value; // weak extern int movie_cpp_init_value; // weak
extern char movie_playing; // weak extern char movie_playing; // weak
extern int loop_movie; // weak extern int loop_movie; // weak
@ -21,3 +13,5 @@ LRESULT __stdcall MovieWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
/* data */ /* data */
extern int movie_inf; // weak extern int movie_inf; // weak
#endif /* __MOVIE_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -25,7 +16,6 @@ int mpqapi_inf = 0x7F800000; // weak
HANDLE sghArchive = (HANDLE)0xFFFFFFFF; // idb HANDLE sghArchive = (HANDLE)0xFFFFFFFF; // idb
//----- (0043AE95) --------------------------------------------------------
struct mpqapi_cpp_init struct mpqapi_cpp_init
{ {
mpqapi_cpp_init() mpqapi_cpp_init()
@ -36,7 +26,6 @@ struct mpqapi_cpp_init
// 47F148: using guessed type int mpqapi_inf; // 47F148: using guessed type int mpqapi_inf;
// 659B00: using guessed type int mpqapi_cpp_init_value; // 659B00: using guessed type int mpqapi_cpp_init_value;
//----- (0043AEA0) --------------------------------------------------------
bool __fastcall mpqapi_set_hidden(char *pszArchive, bool hidden) bool __fastcall mpqapi_set_hidden(char *pszArchive, bool hidden)
{ {
char *v2; // edi char *v2; // edi
@ -58,7 +47,6 @@ bool __fastcall mpqapi_set_hidden(char *pszArchive, bool hidden)
return result; return result;
} }
//----- (0043AEDC) --------------------------------------------------------
void __fastcall mpqapi_store_creation_time(char *pszArchive, int dwChar) void __fastcall mpqapi_store_creation_time(char *pszArchive, int dwChar)
{ {
int v2; // esi int v2; // esi
@ -86,7 +74,6 @@ void __fastcall mpqapi_store_creation_time(char *pszArchive, int dwChar)
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043AF4F) --------------------------------------------------------
bool __fastcall mpqapi_reg_load_modification_time(char *dst, int size) bool __fastcall mpqapi_reg_load_modification_time(char *dst, int size)
{ {
unsigned int v2; // esi unsigned int v2; // esi
@ -115,7 +102,6 @@ bool __fastcall mpqapi_reg_load_modification_time(char *dst, int size)
return 1; return 1;
} }
//----- (0043AFA5) --------------------------------------------------------
void __fastcall mpqapi_xor_buf(char *pbData) void __fastcall mpqapi_xor_buf(char *pbData)
{ {
signed int v1; // eax signed int v1; // eax
@ -135,7 +121,6 @@ void __fastcall mpqapi_xor_buf(char *pbData)
while ( v3 ); while ( v3 );
} }
//----- (0043AFC4) --------------------------------------------------------
bool __fastcall mpqapi_reg_store_modification_time(char *pbData, int dwLen) bool __fastcall mpqapi_reg_store_modification_time(char *pbData, int dwLen)
{ {
int v2; // ebx int v2; // ebx
@ -162,7 +147,6 @@ bool __fastcall mpqapi_reg_store_modification_time(char *pbData, int dwLen)
return SRegSaveData("Diablo", "Video Player ", 0, (unsigned char *)v3, v2); return SRegSaveData("Diablo", "Video Player ", 0, (unsigned char *)v3, v2);
} }
//----- (0043B002) --------------------------------------------------------
void __fastcall mpqapi_remove_hash_entry(char *pszName) void __fastcall mpqapi_remove_hash_entry(char *pszName)
{ {
int v1; // eax int v1; // eax
@ -186,7 +170,6 @@ void __fastcall mpqapi_remove_hash_entry(char *pszName)
} }
// 65AB0C: using guessed type int save_archive_modified; // 65AB0C: using guessed type int save_archive_modified;
//----- (0043B054) --------------------------------------------------------
void __fastcall mpqapi_alloc_block(int block_offset, int block_size) void __fastcall mpqapi_alloc_block(int block_offset, int block_size)
{ {
int v2; // esi int v2; // esi
@ -244,7 +227,6 @@ LABEL_11:
} }
} }
//----- (0043B0E4) --------------------------------------------------------
_BLOCKENTRY *__fastcall mpqapi_new_block(int *block_index) _BLOCKENTRY *__fastcall mpqapi_new_block(int *block_index)
{ {
_BLOCKENTRY *result; // eax _BLOCKENTRY *result; // eax
@ -267,7 +249,6 @@ _BLOCKENTRY *__fastcall mpqapi_new_block(int *block_index)
return result; return result;
} }
//----- (0043B123) --------------------------------------------------------
int __fastcall mpqapi_get_hash_index_of_path(char *pszName) // FetchHandle int __fastcall mpqapi_get_hash_index_of_path(char *pszName) // FetchHandle
{ {
char *v1; // esi char *v1; // esi
@ -282,7 +263,6 @@ int __fastcall mpqapi_get_hash_index_of_path(char *pszName) // FetchHandle
return mpqapi_get_hash_index(v4, v3, v2, 0); return mpqapi_get_hash_index(v4, v3, v2, 0);
} }
//----- (0043B153) --------------------------------------------------------
int __fastcall mpqapi_get_hash_index(short index, int hash_a, int hash_b, int locale) int __fastcall mpqapi_get_hash_index(short index, int hash_a, int hash_b, int locale)
{ {
int v4; // ecx int v4; // ecx
@ -312,7 +292,6 @@ int __fastcall mpqapi_get_hash_index(short index, int hash_a, int hash_b, int lo
return i; return i;
} }
//----- (0043B1BD) --------------------------------------------------------
void __fastcall mpqapi_remove_hash_entries(bool (__stdcall *fnGetName)(int, char *)) void __fastcall mpqapi_remove_hash_entries(bool (__stdcall *fnGetName)(int, char *))
{ {
bool (__stdcall *v1)(int, char *); // edi bool (__stdcall *v1)(int, char *); // edi
@ -330,7 +309,6 @@ void __fastcall mpqapi_remove_hash_entries(bool (__stdcall *fnGetName)(int, char
} }
} }
//----- (0043B1F8) --------------------------------------------------------
bool __fastcall mpqapi_write_file(char *pszName, char *pbData, int dwLen) bool __fastcall mpqapi_write_file(char *pszName, char *pbData, int dwLen)
{ {
char *v3; // edi char *v3; // edi
@ -349,7 +327,6 @@ bool __fastcall mpqapi_write_file(char *pszName, char *pbData, int dwLen)
} }
// 65AB0C: using guessed type int save_archive_modified; // 65AB0C: using guessed type int save_archive_modified;
//----- (0043B23D) --------------------------------------------------------
_BLOCKENTRY *__fastcall mpqapi_add_file(char *pszName, _BLOCKENTRY *pBlk, int block_index) _BLOCKENTRY *__fastcall mpqapi_add_file(char *pszName, _BLOCKENTRY *pBlk, int block_index)
{ {
char *v3; // edi char *v3; // edi
@ -396,7 +373,6 @@ _BLOCKENTRY *__fastcall mpqapi_add_file(char *pszName, _BLOCKENTRY *pBlk, int bl
return v12; return v12;
} }
//----- (0043B317) --------------------------------------------------------
bool __fastcall mpqapi_write_file_contents(char *pszName, char *pbData, int dwLen, _BLOCKENTRY *pBlk) bool __fastcall mpqapi_write_file_contents(char *pszName, char *pbData, int dwLen, _BLOCKENTRY *pBlk)
{ {
char *v4; // esi char *v4; // esi
@ -500,7 +476,6 @@ LABEL_25:
return 1; return 1;
} }
//----- (0043B51C) --------------------------------------------------------
int __fastcall mpqapi_find_free_block(int size, int *block_size) int __fastcall mpqapi_find_free_block(int size, int *block_size)
{ {
_BLOCKENTRY *v2; // eax _BLOCKENTRY *v2; // eax
@ -538,7 +513,6 @@ int __fastcall mpqapi_find_free_block(int size, int *block_size)
return v5; return v5;
} }
//----- (0043B570) --------------------------------------------------------
void __fastcall mpqapi_rename(char *pszOld, char *pszNew) void __fastcall mpqapi_rename(char *pszOld, char *pszNew)
{ {
char *v2; // esi char *v2; // esi
@ -561,13 +535,11 @@ void __fastcall mpqapi_rename(char *pszOld, char *pszNew)
} }
// 65AB0C: using guessed type int save_archive_modified; // 65AB0C: using guessed type int save_archive_modified;
//----- (0043B5AF) --------------------------------------------------------
bool __fastcall mpqapi_has_file(char *pszName) bool __fastcall mpqapi_has_file(char *pszName)
{ {
return mpqapi_get_hash_index_of_path(pszName) != -1; return mpqapi_get_hash_index_of_path(pszName) != -1;
} }
//----- (0043B5BF) --------------------------------------------------------
bool __fastcall mpqapi_open_archive(char *pszArchive, bool hidden, int dwChar) // OpenMPQ bool __fastcall mpqapi_open_archive(char *pszArchive, bool hidden, int dwChar) // OpenMPQ
{ {
char *v3; // ebp char *v3; // ebp
@ -636,7 +608,6 @@ LABEL_15:
// 65AB14: using guessed type char save_archive_open; // 65AB14: using guessed type char save_archive_open;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043B791) --------------------------------------------------------
bool __fastcall mpqapi_parse_archive_header(TMPQHeader *pHdr, int *pdwNextFileStart) // ParseMPQHeader bool __fastcall mpqapi_parse_archive_header(TMPQHeader *pHdr, int *pdwNextFileStart) // ParseMPQHeader
{ {
int *v2; // ebp int *v2; // ebp
@ -680,7 +651,6 @@ bool __fastcall mpqapi_parse_archive_header(TMPQHeader *pHdr, int *pdwNextFileSt
// 65AB0C: using guessed type int save_archive_modified; // 65AB0C: using guessed type int save_archive_modified;
// 65AB14: using guessed type char save_archive_open; // 65AB14: using guessed type char save_archive_open;
//----- (0043B882) --------------------------------------------------------
void __fastcall mpqapi_close_archive(char *pszArchive, bool bFree, int dwChar) // CloseMPQ void __fastcall mpqapi_close_archive(char *pszArchive, bool bFree, int dwChar) // CloseMPQ
{ {
char *v3; // esi char *v3; // esi
@ -716,7 +686,6 @@ void __fastcall mpqapi_close_archive(char *pszArchive, bool bFree, int dwChar) /
// 65AB0C: using guessed type int save_archive_modified; // 65AB0C: using guessed type int save_archive_modified;
// 65AB14: using guessed type char save_archive_open; // 65AB14: using guessed type char save_archive_open;
//----- (0043B8FD) --------------------------------------------------------
void __fastcall mpqapi_store_modified_time(char *pszArchive, int dwChar) void __fastcall mpqapi_store_modified_time(char *pszArchive, int dwChar)
{ {
int v2; // esi int v2; // esi
@ -744,7 +713,6 @@ void __fastcall mpqapi_store_modified_time(char *pszArchive, int dwChar)
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043B970) --------------------------------------------------------
void __fastcall mpqapi_flush_and_close(char *pszArchive, bool bFree, int dwChar) void __fastcall mpqapi_flush_and_close(char *pszArchive, bool bFree, int dwChar)
{ {
if ( sghArchive != (HANDLE)-1 ) if ( sghArchive != (HANDLE)-1 )
@ -765,7 +733,6 @@ void __fastcall mpqapi_flush_and_close(char *pszArchive, bool bFree, int dwChar)
} }
// 65AB0C: using guessed type int save_archive_modified; // 65AB0C: using guessed type int save_archive_modified;
//----- (0043B9CA) --------------------------------------------------------
bool __cdecl mpqapi_write_header() // WriteMPQHeader bool __cdecl mpqapi_write_header() // WriteMPQHeader
{ {
bool result; // al bool result; // al
@ -789,7 +756,6 @@ bool __cdecl mpqapi_write_header() // WriteMPQHeader
return result; return result;
} }
//----- (0043BA60) --------------------------------------------------------
bool __cdecl mpqapi_write_block_table() bool __cdecl mpqapi_write_block_table()
{ {
int v1; // eax int v1; // eax
@ -807,7 +773,6 @@ bool __cdecl mpqapi_write_block_table()
return v2 && NumberOfBytesWritten == 0x8000; return v2 && NumberOfBytesWritten == 0x8000;
} }
//----- (0043BAEB) --------------------------------------------------------
bool __cdecl mpqapi_write_hash_table() bool __cdecl mpqapi_write_hash_table()
{ {
int v1; // eax int v1; // eax
@ -825,7 +790,6 @@ bool __cdecl mpqapi_write_hash_table()
return v2 && NumberOfBytesWritten == 0x8000; return v2 && NumberOfBytesWritten == 0x8000;
} }
//----- (0043BB79) --------------------------------------------------------
bool __cdecl mpqapi_can_seek() bool __cdecl mpqapi_can_seek()
{ {
bool result; // al bool result; // al

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __MPQAPI_H__
* United States. Use of a copyright notice is precautionary only and #define __MPQAPI_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//mpqapi
extern int mpqapi_cpp_init_value; // weak extern int mpqapi_cpp_init_value; // weak
extern int sgdwMpqOffset; // idb extern int sgdwMpqOffset; // idb
extern char mpq_buf[4096]; extern char mpq_buf[4096];
@ -54,3 +46,5 @@ extern int mpqapi_inf; // weak
/* rdata */ /* rdata */
extern HANDLE sghArchive; // idb extern HANDLE sghArchive; // idb
#endif /* __MPQAPI_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -32,7 +23,6 @@ int msg_err_timer; // weak
int msg_inf = 0x7F800000; // weak int msg_inf = 0x7F800000; // weak
//----- (0043BBA9) --------------------------------------------------------
struct msg_cpp_init struct msg_cpp_init
{ {
msg_cpp_init() msg_cpp_init()
@ -43,7 +33,6 @@ struct msg_cpp_init
// 47F14C: using guessed type int msg_inf; // 47F14C: using guessed type int msg_inf;
// 65AB1C: using guessed type int msg_cpp_init_value; // 65AB1C: using guessed type int msg_cpp_init_value;
//----- (0043BBB4) --------------------------------------------------------
void __fastcall msg_send_drop_pkt(int pnum, int reason) void __fastcall msg_send_drop_pkt(int pnum, int reason)
{ {
TFakeDropPlr cmd; // [esp+0h] [ebp-8h] TFakeDropPlr cmd; // [esp+0h] [ebp-8h]
@ -54,7 +43,6 @@ void __fastcall msg_send_drop_pkt(int pnum, int reason)
msg_send_packet(pnum, &cmd, 6); msg_send_packet(pnum, &cmd, 6);
} }
//----- (0043BBCF) --------------------------------------------------------
void __fastcall msg_send_packet(int pnum, void *packet, int dwSize) void __fastcall msg_send_packet(int pnum, void *packet, int dwSize)
{ {
void *v3; // edi void *v3; // edi
@ -80,7 +68,6 @@ void __fastcall msg_send_packet(int pnum, void *packet, int dwSize)
} }
// 65AB24: using guessed type int sgnCurrMegaPlayer; // 65AB24: using guessed type int sgnCurrMegaPlayer;
//----- (0043BC31) --------------------------------------------------------
TMegaPkt *__cdecl msg_get_next_packet() TMegaPkt *__cdecl msg_get_next_packet()
{ {
TMegaPkt *v0; // eax TMegaPkt *v0; // eax
@ -102,7 +89,6 @@ TMegaPkt *__cdecl msg_get_next_packet()
return result; return result;
} }
//----- (0043BC6D) --------------------------------------------------------
int __cdecl msg_wait_resync() int __cdecl msg_wait_resync()
{ {
int v0; // eax int v0; // eax
@ -137,7 +123,6 @@ LABEL_6:
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
// 67862D: using guessed type char gbGameDestroyed; // 67862D: using guessed type char gbGameDestroyed;
//----- (0043BCED) --------------------------------------------------------
void __cdecl msg_free_packets() void __cdecl msg_free_packets()
{ {
TMegaPkt *v0; // eax TMegaPkt *v0; // eax
@ -155,7 +140,6 @@ void __cdecl msg_free_packets()
} }
} }
//----- (0043BD19) --------------------------------------------------------
int __cdecl msg_wait_for_turns() int __cdecl msg_wait_for_turns()
{ {
//int v0; // eax //int v0; // eax
@ -200,7 +184,6 @@ int __cdecl msg_wait_for_turns()
// 6796E4: using guessed type char gbDeltaSender; // 6796E4: using guessed type char gbDeltaSender;
// 679738: using guessed type int gdwTurnsInTransit; // 679738: using guessed type int gdwTurnsInTransit;
//----- (0043BDEB) --------------------------------------------------------
void __cdecl msg_process_net_packets() void __cdecl msg_process_net_packets()
{ {
if ( gbMaxPlayers != 1 ) if ( gbMaxPlayers != 1 )
@ -214,7 +197,6 @@ void __cdecl msg_process_net_packets()
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043BE0D) --------------------------------------------------------
void __cdecl msg_pre_packet() void __cdecl msg_pre_packet()
{ {
TMegaPkt *v0; // edi TMegaPkt *v0; // edi
@ -256,7 +238,6 @@ void __cdecl msg_pre_packet()
} }
} }
//----- (0043BE74) --------------------------------------------------------
void __fastcall DeltaExportData(int pnum) void __fastcall DeltaExportData(int pnum)
{ {
char *v1; // edi char *v1; // edi
@ -299,7 +280,6 @@ void __fastcall DeltaExportData(int pnum)
} }
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
//----- (0043BF2B) --------------------------------------------------------
void *__fastcall DeltaExportItem(void *dst, void *src) void *__fastcall DeltaExportItem(void *dst, void *src)
{ {
_BYTE *v2; // edi _BYTE *v2; // edi
@ -327,7 +307,6 @@ void *__fastcall DeltaExportItem(void *dst, void *src)
return v3; return v3;
} }
//----- (0043BF5B) --------------------------------------------------------
void *__fastcall DeltaExportObject(void *dst, void *src) void *__fastcall DeltaExportObject(void *dst, void *src)
{ {
char *v2; // esi char *v2; // esi
@ -337,7 +316,6 @@ void *__fastcall DeltaExportObject(void *dst, void *src)
return v2 + 127; return v2 + 127;
} }
//----- (0043BF6F) --------------------------------------------------------
void *__fastcall DeltaExportMonster(void *dst, void *src) void *__fastcall DeltaExportMonster(void *dst, void *src)
{ {
_BYTE *v2; // edi _BYTE *v2; // edi
@ -365,7 +343,6 @@ void *__fastcall DeltaExportMonster(void *dst, void *src)
return v3; return v3;
} }
//----- (0043BFA1) --------------------------------------------------------
char *__fastcall DeltaExportJunk(char *a1) char *__fastcall DeltaExportJunk(char *a1)
{ {
char *v1; // ebx char *v1; // ebx
@ -411,7 +388,6 @@ char *__fastcall DeltaExportJunk(char *a1)
return v1; return v1;
} }
//----- (0043C019) --------------------------------------------------------
int __fastcall msg_comp_level(char *buffer, int size) int __fastcall msg_comp_level(char *buffer, int size)
{ {
char *v2; // esi char *v2; // esi
@ -425,7 +401,6 @@ int __fastcall msg_comp_level(char *buffer, int size)
return v4 + 1; return v4 + 1;
} }
//----- (0043C035) --------------------------------------------------------
void __cdecl delta_init() void __cdecl delta_init()
{ {
sgbDeltaChanged = 0; sgbDeltaChanged = 0;
@ -437,7 +412,6 @@ void __cdecl delta_init()
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 676190: using guessed type int deltaload; // 676190: using guessed type int deltaload;
//----- (0043C07C) --------------------------------------------------------
void __fastcall delta_kill_monster(int mi, unsigned char x, unsigned char y, unsigned char bLevel) void __fastcall delta_kill_monster(int mi, unsigned char x, unsigned char y, unsigned char bLevel)
{ {
DMonsterStr *v4; // eax DMonsterStr *v4; // eax
@ -457,7 +431,6 @@ void __fastcall delta_kill_monster(int mi, unsigned char x, unsigned char y, uns
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043C0C2) --------------------------------------------------------
void __fastcall delta_monster_hp(int mi, int hp, unsigned char bLevel) void __fastcall delta_monster_hp(int mi, int hp, unsigned char bLevel)
{ {
DMonsterStr *v3; // eax DMonsterStr *v3; // eax
@ -473,7 +446,6 @@ void __fastcall delta_monster_hp(int mi, int hp, unsigned char bLevel)
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043C0F2) --------------------------------------------------------
void __fastcall delta_sync_monster(TCmdLocParam1 *packet, char level) void __fastcall delta_sync_monster(TCmdLocParam1 *packet, char level)
{ {
DMonsterStr *v2; // eax DMonsterStr *v2; // eax
@ -496,7 +468,6 @@ void __fastcall delta_sync_monster(TCmdLocParam1 *packet, char level)
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043C134) --------------------------------------------------------
void __fastcall delta_sync_golem(TCmdGolem *pG, int pnum, int bLevel) void __fastcall delta_sync_golem(TCmdGolem *pG, int pnum, int bLevel)
{ {
DMonsterStr *v3; // eax DMonsterStr *v3; // eax
@ -518,7 +489,6 @@ void __fastcall delta_sync_golem(TCmdGolem *pG, int pnum, int bLevel)
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043C17D) --------------------------------------------------------
void __fastcall delta_leave_sync(unsigned char bLevel) void __fastcall delta_leave_sync(unsigned char bLevel)
{ {
unsigned char v1; // bl unsigned char v1; // bl
@ -565,19 +535,16 @@ void __fastcall delta_leave_sync(unsigned char bLevel)
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043C24F) --------------------------------------------------------
bool __fastcall delta_portal_inited(int portal_num) bool __fastcall delta_portal_inited(int portal_num)
{ {
return sgJunk[0].portal[portal_num].x == -1; return sgJunk[0].portal[portal_num].x == -1;
} }
//----- (0043C25D) --------------------------------------------------------
bool __fastcall delta_quest_inited(int quest_num) bool __fastcall delta_quest_inited(int quest_num)
{ {
return sgJunk[0].quests[quest_num].qstate != -1; return sgJunk[0].quests[quest_num].qstate != -1;
} }
//----- (0043C26B) --------------------------------------------------------
void __fastcall DeltaAddItem(int ii) void __fastcall DeltaAddItem(int ii)
{ {
int v1; // eax int v1; // eax
@ -650,7 +617,6 @@ void __fastcall DeltaAddItem(int ii)
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043C372) --------------------------------------------------------
void __cdecl DeltaSaveLevel() void __cdecl DeltaSaveLevel()
{ {
int v0; // eax int v0; // eax
@ -678,7 +644,6 @@ void __cdecl DeltaSaveLevel()
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043C3BA) --------------------------------------------------------
void __cdecl DeltaLoadLevel() void __cdecl DeltaLoadLevel()
{ {
int v0; // ebx int v0; // ebx
@ -942,7 +907,6 @@ void __cdecl DeltaLoadLevel()
// 676190: using guessed type int deltaload; // 676190: using guessed type int deltaload;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043C873) --------------------------------------------------------
void __fastcall NetSendCmd(unsigned char bHiPri, unsigned char bCmd) void __fastcall NetSendCmd(unsigned char bHiPri, unsigned char bCmd)
{ {
TCmd cmd; // [esp+3h] [ebp-1h] TCmd cmd; // [esp+3h] [ebp-1h]
@ -954,7 +918,6 @@ void __fastcall NetSendCmd(unsigned char bHiPri, unsigned char bCmd)
NetSendLoPri((unsigned char *)&cmd, 1u); NetSendLoPri((unsigned char *)&cmd, 1u);
} }
//----- (0043C891) --------------------------------------------------------
void __fastcall NetSendCmdGolem(unsigned char mx, unsigned char my, unsigned char dir, unsigned char menemy, int hp, int cl) void __fastcall NetSendCmdGolem(unsigned char mx, unsigned char my, unsigned char dir, unsigned char menemy, int hp, int cl)
{ {
TCmdGolem cmd; // [esp+0h] [ebp-Ch] TCmdGolem cmd; // [esp+0h] [ebp-Ch]
@ -969,7 +932,6 @@ void __fastcall NetSendCmdGolem(unsigned char mx, unsigned char my, unsigned cha
NetSendLoPri((unsigned char *)&cmd, 0xAu); NetSendLoPri((unsigned char *)&cmd, 0xAu);
} }
//----- (0043C8C7) --------------------------------------------------------
void __fastcall NetSendCmdLoc(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y) void __fastcall NetSendCmdLoc(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y)
{ {
TCmdLoc cmd; // [esp+1h] [ebp-3h] TCmdLoc cmd; // [esp+1h] [ebp-3h]
@ -983,7 +945,6 @@ void __fastcall NetSendCmdLoc(unsigned char bHiPri, unsigned char bCmd, unsigned
NetSendLoPri((unsigned char *)&cmd, 3u); NetSendLoPri((unsigned char *)&cmd, 3u);
} }
//----- (0043C8F3) --------------------------------------------------------
void __fastcall NetSendCmdLocParam1(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y, int wParam1) void __fastcall NetSendCmdLocParam1(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y, int wParam1)
{ {
TCmdLocParam1 cmd; // [esp+0h] [ebp-8h] TCmdLocParam1 cmd; // [esp+0h] [ebp-8h]
@ -998,7 +959,6 @@ void __fastcall NetSendCmdLocParam1(unsigned char bHiPri, unsigned char bCmd, un
NetSendLoPri((unsigned char *)&cmd, 5u); NetSendLoPri((unsigned char *)&cmd, 5u);
} }
//----- (0043C928) --------------------------------------------------------
void __fastcall NetSendCmdLocParam2(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y, int wParam1, int wParam2) void __fastcall NetSendCmdLocParam2(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y, int wParam1, int wParam2)
{ {
TCmdLocParam2 cmd; // [esp+0h] [ebp-8h] TCmdLocParam2 cmd; // [esp+0h] [ebp-8h]
@ -1014,7 +974,6 @@ void __fastcall NetSendCmdLocParam2(unsigned char bHiPri, unsigned char bCmd, un
NetSendLoPri((unsigned char *)&cmd, 7u); NetSendLoPri((unsigned char *)&cmd, 7u);
} }
//----- (0043C965) --------------------------------------------------------
void __fastcall NetSendCmdLocParam3(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y, int wParam1, int wParam2, int wParam3) void __fastcall NetSendCmdLocParam3(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y, int wParam1, int wParam2, int wParam3)
{ {
TCmdLocParam3 cmd; // [esp+0h] [ebp-Ch] TCmdLocParam3 cmd; // [esp+0h] [ebp-Ch]
@ -1031,7 +990,6 @@ void __fastcall NetSendCmdLocParam3(unsigned char bHiPri, unsigned char bCmd, un
NetSendLoPri((unsigned char *)&cmd, 9u); NetSendLoPri((unsigned char *)&cmd, 9u);
} }
//----- (0043C9AB) --------------------------------------------------------
void __fastcall NetSendCmdParam1(unsigned char bHiPri, unsigned char bCmd, unsigned short wParam1) void __fastcall NetSendCmdParam1(unsigned char bHiPri, unsigned char bCmd, unsigned short wParam1)
{ {
TCmdParam1 cmd; // [esp+1h] [ebp-3h] TCmdParam1 cmd; // [esp+1h] [ebp-3h]
@ -1044,7 +1002,6 @@ void __fastcall NetSendCmdParam1(unsigned char bHiPri, unsigned char bCmd, unsig
NetSendLoPri((unsigned char *)&cmd, 3u); NetSendLoPri((unsigned char *)&cmd, 3u);
} }
//----- (0043C9D3) --------------------------------------------------------
void __fastcall NetSendCmdParam2(unsigned char bHiPri, unsigned char bCmd, unsigned short wParam1, unsigned short wParam2) void __fastcall NetSendCmdParam2(unsigned char bHiPri, unsigned char bCmd, unsigned short wParam1, unsigned short wParam2)
{ {
TCmdParam2 cmd; // [esp+0h] [ebp-8h] TCmdParam2 cmd; // [esp+0h] [ebp-8h]
@ -1058,7 +1015,6 @@ void __fastcall NetSendCmdParam2(unsigned char bHiPri, unsigned char bCmd, unsig
NetSendLoPri((unsigned char *)&cmd, 5u); NetSendLoPri((unsigned char *)&cmd, 5u);
} }
//----- (0043CA04) --------------------------------------------------------
void __fastcall NetSendCmdParam3(unsigned char bHiPri, unsigned char bCmd, unsigned short wParam1, unsigned short wParam2, int wParam3) void __fastcall NetSendCmdParam3(unsigned char bHiPri, unsigned char bCmd, unsigned short wParam1, unsigned short wParam2, int wParam3)
{ {
TCmdParam3 cmd; // [esp+0h] [ebp-8h] TCmdParam3 cmd; // [esp+0h] [ebp-8h]
@ -1073,7 +1029,6 @@ void __fastcall NetSendCmdParam3(unsigned char bHiPri, unsigned char bCmd, unsig
NetSendLoPri((unsigned char *)&cmd, 7u); NetSendLoPri((unsigned char *)&cmd, 7u);
} }
//----- (0043CA3D) --------------------------------------------------------
void __fastcall NetSendCmdQuest(unsigned char bHiPri, unsigned char q) void __fastcall NetSendCmdQuest(unsigned char bHiPri, unsigned char q)
{ {
int v2; // eax int v2; // eax
@ -1094,7 +1049,6 @@ void __fastcall NetSendCmdQuest(unsigned char bHiPri, unsigned char q)
NetSendLoPri((unsigned char *)&cmd, 5u); NetSendLoPri((unsigned char *)&cmd, 5u);
} }
//----- (0043CA84) --------------------------------------------------------
void __fastcall NetSendCmdGItem(unsigned char bHiPri, unsigned char bCmd, unsigned char mast, unsigned char pnum, int ii) void __fastcall NetSendCmdGItem(unsigned char bHiPri, unsigned char bCmd, unsigned char mast, unsigned char pnum, int ii)
{ {
int v5; // eax int v5; // eax
@ -1155,7 +1109,6 @@ void __fastcall NetSendCmdGItem(unsigned char bHiPri, unsigned char bCmd, unsign
NetSendLoPri((unsigned char *)&cmd, 0x1Eu); NetSendLoPri((unsigned char *)&cmd, 0x1Eu);
} }
//----- (0043CC09) --------------------------------------------------------
void __fastcall NetSendCmdGItem2(unsigned char usonly, unsigned char bCmd, unsigned char mast, unsigned char pnum, struct TCmdGItem *p) void __fastcall NetSendCmdGItem2(unsigned char usonly, unsigned char bCmd, unsigned char mast, unsigned char pnum, struct TCmdGItem *p)
{ {
unsigned char v5; // bl unsigned char v5; // bl
@ -1188,7 +1141,6 @@ void __fastcall NetSendCmdGItem2(unsigned char usonly, unsigned char bCmd, unsig
multi_msg_add(&cmd.bCmd, 0x1Eu); multi_msg_add(&cmd.bCmd, 0x1Eu);
} }
//----- (0043CC74) --------------------------------------------------------
bool __fastcall NetSendCmdReq2(unsigned char bCmd, unsigned char mast, unsigned char pnum, struct TCmdGItem *p) bool __fastcall NetSendCmdReq2(unsigned char bCmd, unsigned char mast, unsigned char pnum, struct TCmdGItem *p)
{ {
unsigned char v4; // bl unsigned char v4; // bl
@ -1215,7 +1167,6 @@ LABEL_3:
return 0; return 0;
} }
//----- (0043CCCF) --------------------------------------------------------
void __fastcall NetSendCmdExtra(struct TCmdGItem *p) void __fastcall NetSendCmdExtra(struct TCmdGItem *p)
{ {
TCmdGItem cmd; // [esp+0h] [ebp-20h] TCmdGItem cmd; // [esp+0h] [ebp-20h]
@ -1226,7 +1177,6 @@ void __fastcall NetSendCmdExtra(struct TCmdGItem *p)
NetSendHiPri((unsigned char *)&cmd, 0x1Eu); NetSendHiPri((unsigned char *)&cmd, 0x1Eu);
} }
//----- (0043CCF8) --------------------------------------------------------
void __fastcall NetSendCmdPItem(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y) void __fastcall NetSendCmdPItem(unsigned char bHiPri, unsigned char bCmd, unsigned char x, unsigned char y)
{ {
int v4; // eax int v4; // eax
@ -1284,7 +1234,6 @@ void __fastcall NetSendCmdPItem(unsigned char bHiPri, unsigned char bCmd, unsign
NetSendLoPri((unsigned char *)&cmd, 0x16u); NetSendLoPri((unsigned char *)&cmd, 0x16u);
} }
//----- (0043CE5B) --------------------------------------------------------
void __fastcall NetSendCmdChItem(unsigned char bHiPri, unsigned char bLoc) void __fastcall NetSendCmdChItem(unsigned char bHiPri, unsigned char bLoc)
{ {
short v2; // dx short v2; // dx
@ -1305,7 +1254,6 @@ void __fastcall NetSendCmdChItem(unsigned char bHiPri, unsigned char bLoc)
NetSendLoPri((unsigned char *)&cmd, 0xBu); NetSendLoPri((unsigned char *)&cmd, 0xBu);
} }
//----- (0043CEB2) --------------------------------------------------------
void __fastcall NetSendCmdDelItem(unsigned char bHiPri, unsigned char bLoc) void __fastcall NetSendCmdDelItem(unsigned char bHiPri, unsigned char bLoc)
{ {
TCmdDelItem cmd; // [esp+2h] [ebp-2h] TCmdDelItem cmd; // [esp+2h] [ebp-2h]
@ -1318,7 +1266,6 @@ void __fastcall NetSendCmdDelItem(unsigned char bHiPri, unsigned char bLoc)
NetSendLoPri((unsigned char *)&cmd, 2u); NetSendLoPri((unsigned char *)&cmd, 2u);
} }
//----- (0043CED4) --------------------------------------------------------
void __fastcall NetSendCmdDItem(unsigned char bHiPri, int ii) void __fastcall NetSendCmdDItem(unsigned char bHiPri, int ii)
{ {
int v2; // eax int v2; // eax
@ -1376,7 +1323,6 @@ void __fastcall NetSendCmdDItem(unsigned char bHiPri, int ii)
NetSendLoPri((unsigned char *)&cmd, 0x16u); NetSendLoPri((unsigned char *)&cmd, 0x16u);
} }
//----- (0043D039) --------------------------------------------------------
void __fastcall NetSendCmdDamage(unsigned char bHiPri, unsigned char bPlr, unsigned int dwDam) void __fastcall NetSendCmdDamage(unsigned char bHiPri, unsigned char bPlr, unsigned int dwDam)
{ {
TCmdDamage cmd; // [esp+0h] [ebp-8h] TCmdDamage cmd; // [esp+0h] [ebp-8h]
@ -1390,7 +1336,6 @@ void __fastcall NetSendCmdDamage(unsigned char bHiPri, unsigned char bPlr, unsig
NetSendLoPri((unsigned char *)&cmd, 6u); NetSendLoPri((unsigned char *)&cmd, 6u);
} }
//----- (0043D064) --------------------------------------------------------
void __fastcall NetSendCmdString(int a1, const char *pszStr) void __fastcall NetSendCmdString(int a1, const char *pszStr)
{ {
const char *v2; // esi const char *v2; // esi
@ -1406,7 +1351,6 @@ void __fastcall NetSendCmdString(int a1, const char *pszStr)
multi_send_msg_packet(v3, &cmd.bCmd, dwStrLen + 2); multi_send_msg_packet(v3, &cmd.bCmd, dwStrLen + 2);
} }
//----- (0043D09D) --------------------------------------------------------
void __fastcall RemovePlrPortal(int pnum) void __fastcall RemovePlrPortal(int pnum)
{ {
memset((char *)sgJunk + 5 * pnum, 255, 5u); memset((char *)sgJunk + 5 * pnum, 255, 5u);
@ -1414,7 +1358,6 @@ void __fastcall RemovePlrPortal(int pnum)
} }
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
//----- (0043D0BC) --------------------------------------------------------
int __fastcall ParseCmd(int pnum, TCmd *pCmd) int __fastcall ParseCmd(int pnum, TCmd *pCmd)
{ {
bool v2; // zf bool v2; // zf
@ -1646,7 +1589,6 @@ LABEL_100:
// 67618D: using guessed type char sgbDeltaChunks; // 67618D: using guessed type char sgbDeltaChunks;
// 6796E4: using guessed type char gbDeltaSender; // 6796E4: using guessed type char gbDeltaSender;
//----- (0043D632) --------------------------------------------------------
void __fastcall DeltaImportData(unsigned char cmd, int recv_offset) void __fastcall DeltaImportData(unsigned char cmd, int recv_offset)
{ {
unsigned char v2; // bl unsigned char v2; // bl
@ -1678,7 +1620,6 @@ void __fastcall DeltaImportData(unsigned char cmd, int recv_offset)
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 67618D: using guessed type char sgbDeltaChunks; // 67618D: using guessed type char sgbDeltaChunks;
//----- (0043D6BA) --------------------------------------------------------
void *__fastcall DeltaImportItem(void *src, void *dst) void *__fastcall DeltaImportItem(void *src, void *dst)
{ {
char *v2; // edi char *v2; // edi
@ -1707,7 +1648,6 @@ void *__fastcall DeltaImportItem(void *src, void *dst)
return v3; return v3;
} }
//----- (0043D6F5) --------------------------------------------------------
void *__fastcall DeltaImportObject(void *src, void *dst) void *__fastcall DeltaImportObject(void *src, void *dst)
{ {
char *v2; // esi char *v2; // esi
@ -1717,7 +1657,6 @@ void *__fastcall DeltaImportObject(void *src, void *dst)
return v2 + 127; return v2 + 127;
} }
//----- (0043D709) --------------------------------------------------------
void *__fastcall DeltaImportMonster(void *src, void *dst) void *__fastcall DeltaImportMonster(void *src, void *dst)
{ {
char *v2; // edi char *v2; // edi
@ -1746,7 +1685,6 @@ void *__fastcall DeltaImportMonster(void *src, void *dst)
return v3; return v3;
} }
//----- (0043D746) --------------------------------------------------------
char __fastcall DeltaImportJunk(int a1) char __fastcall DeltaImportJunk(int a1)
{ {
_BYTE *v1; // ebx _BYTE *v1; // ebx
@ -1806,13 +1744,11 @@ char __fastcall DeltaImportJunk(int a1)
return result; return result;
} }
//----- (0043D7F1) --------------------------------------------------------
int __fastcall On_SYNCDATA(void *packet, int pnum) int __fastcall On_SYNCDATA(void *packet, int pnum)
{ {
return SyncData(pnum, (TSyncHeader *)packet); return SyncData(pnum, (TSyncHeader *)packet);
} }
//----- (0043D7FC) --------------------------------------------------------
int __fastcall On_WALKXY(struct TCmdLoc *pCmd, int pnum) int __fastcall On_WALKXY(struct TCmdLoc *pCmd, int pnum)
{ {
int v2; // ebx int v2; // ebx
@ -1835,7 +1771,6 @@ int __fastcall On_WALKXY(struct TCmdLoc *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043D84A) --------------------------------------------------------
int __fastcall On_ADDSTR(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_ADDSTR(struct TCmdParam1 *pCmd, int pnum)
{ {
unsigned short v2; // cx unsigned short v2; // cx
@ -1854,7 +1789,6 @@ int __fastcall On_ADDSTR(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043D87B) --------------------------------------------------------
int __fastcall On_ADDMAG(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_ADDMAG(struct TCmdParam1 *pCmd, int pnum)
{ {
unsigned short v2; // cx unsigned short v2; // cx
@ -1873,7 +1807,6 @@ int __fastcall On_ADDMAG(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043D8AC) --------------------------------------------------------
int __fastcall On_ADDDEX(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_ADDDEX(struct TCmdParam1 *pCmd, int pnum)
{ {
unsigned short v2; // cx unsigned short v2; // cx
@ -1892,7 +1825,6 @@ int __fastcall On_ADDDEX(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043D8DD) --------------------------------------------------------
int __fastcall On_ADDVIT(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_ADDVIT(struct TCmdParam1 *pCmd, int pnum)
{ {
unsigned short v2; // cx unsigned short v2; // cx
@ -1911,7 +1843,6 @@ int __fastcall On_ADDVIT(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043D90E) --------------------------------------------------------
int __fastcall On_SBSPELL(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_SBSPELL(struct TCmdParam1 *pCmd, int pnum)
{ {
int v2; // eax int v2; // eax
@ -1935,7 +1866,6 @@ int __fastcall On_SBSPELL(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043D97D) --------------------------------------------------------
void msg_errorf(char *pszFmt, ...) void msg_errorf(char *pszFmt, ...)
{ {
DWORD v1; // eax DWORD v1; // eax
@ -1953,7 +1883,6 @@ void msg_errorf(char *pszFmt, ...)
} }
// 67619C: using guessed type int msg_err_timer; // 67619C: using guessed type int msg_err_timer;
//----- (0043D9C4) --------------------------------------------------------
int __fastcall On_GOTOGETITEM(struct TCmdLocParam1 *pCmd, int pnum) int __fastcall On_GOTOGETITEM(struct TCmdLocParam1 *pCmd, int pnum)
{ {
struct TCmdLocParam1 *v2; // edi struct TCmdLocParam1 *v2; // edi
@ -1974,7 +1903,6 @@ int __fastcall On_GOTOGETITEM(struct TCmdLocParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043DA16) --------------------------------------------------------
int __fastcall On_REQUESTGITEM(struct TCmdGItem *pCmd, int pnum) int __fastcall On_REQUESTGITEM(struct TCmdGItem *pCmd, int pnum)
{ {
struct TCmdGItem *v2; // esi struct TCmdGItem *v2; // esi
@ -2022,7 +1950,6 @@ int __fastcall On_REQUESTGITEM(struct TCmdGItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043DAE6) --------------------------------------------------------
bool __fastcall i_own_level(int nReqLevel) bool __fastcall i_own_level(int nReqLevel)
{ {
int v1; // edx int v1; // edx
@ -2042,7 +1969,6 @@ bool __fastcall i_own_level(int nReqLevel)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043DB2D) --------------------------------------------------------
int __fastcall On_GETITEM(struct TCmdGItem *pCmd, int pnum) int __fastcall On_GETITEM(struct TCmdGItem *pCmd, int pnum)
{ {
struct TCmdGItem *v2; // esi struct TCmdGItem *v2; // esi
@ -2115,7 +2041,6 @@ int __fastcall On_GETITEM(struct TCmdGItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043DC3D) --------------------------------------------------------
bool __fastcall delta_get_item(struct TCmdGItem *pI, unsigned char bLevel) bool __fastcall delta_get_item(struct TCmdGItem *pI, unsigned char bLevel)
{ {
struct TCmdGItem *v2; // esi struct TCmdGItem *v2; // esi
@ -2190,7 +2115,6 @@ LABEL_15:
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043DD40) --------------------------------------------------------
int __fastcall On_GOTOAGETITEM(struct TCmdLocParam1 *pCmd, int pnum) int __fastcall On_GOTOAGETITEM(struct TCmdLocParam1 *pCmd, int pnum)
{ {
struct TCmdLocParam1 *v2; // edi struct TCmdLocParam1 *v2; // edi
@ -2211,7 +2135,6 @@ int __fastcall On_GOTOAGETITEM(struct TCmdLocParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043DD92) --------------------------------------------------------
int __fastcall On_REQUESTAGITEM(struct TCmdGItem *pCmd, int pnum) int __fastcall On_REQUESTAGITEM(struct TCmdGItem *pCmd, int pnum)
{ {
struct TCmdGItem *v2; // esi struct TCmdGItem *v2; // esi
@ -2259,7 +2182,6 @@ int __fastcall On_REQUESTAGITEM(struct TCmdGItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043DE60) --------------------------------------------------------
int __fastcall On_AGETITEM(struct TCmdGItem *pCmd, int pnum) int __fastcall On_AGETITEM(struct TCmdGItem *pCmd, int pnum)
{ {
struct TCmdGItem *v2; // esi struct TCmdGItem *v2; // esi
@ -2331,7 +2253,6 @@ int __fastcall On_AGETITEM(struct TCmdGItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043DF6E) --------------------------------------------------------
int __fastcall On_ITEMEXTRA(struct TCmdGItem *pCmd, int pnum) int __fastcall On_ITEMEXTRA(struct TCmdGItem *pCmd, int pnum)
{ {
int v2; // edi int v2; // edi
@ -2358,7 +2279,6 @@ int __fastcall On_ITEMEXTRA(struct TCmdGItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043DFC9) --------------------------------------------------------
int __fastcall On_PUTITEM(struct TCmdPItem *pCmd, int pnum) int __fastcall On_PUTITEM(struct TCmdPItem *pCmd, int pnum)
{ {
int v2; // edi int v2; // edi
@ -2415,7 +2335,6 @@ int __fastcall On_PUTITEM(struct TCmdPItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E0CE) --------------------------------------------------------
void __fastcall delta_put_item(struct TCmdPItem *pI, int x, int y, unsigned char bLevel) void __fastcall delta_put_item(struct TCmdPItem *pI, int x, int y, unsigned char bLevel)
{ {
struct TCmdPItem *v4; // ebx struct TCmdPItem *v4; // ebx
@ -2470,7 +2389,6 @@ void __fastcall delta_put_item(struct TCmdPItem *pI, int x, int y, unsigned char
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043E179) --------------------------------------------------------
void __fastcall check_update_plr(int pnum) void __fastcall check_update_plr(int pnum)
{ {
if ( gbMaxPlayers != 1 && pnum == myplr ) if ( gbMaxPlayers != 1 && pnum == myplr )
@ -2478,7 +2396,6 @@ void __fastcall check_update_plr(int pnum)
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043E193) --------------------------------------------------------
int __fastcall On_SYNCPUTITEM(struct TCmdPItem *pCmd, int pnum) int __fastcall On_SYNCPUTITEM(struct TCmdPItem *pCmd, int pnum)
{ {
int v2; // ebx int v2; // ebx
@ -2528,7 +2445,6 @@ int __fastcall On_SYNCPUTITEM(struct TCmdPItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E284) --------------------------------------------------------
int __fastcall On_RESPAWNITEM(struct TCmdPItem *pCmd, int pnum) int __fastcall On_RESPAWNITEM(struct TCmdPItem *pCmd, int pnum)
{ {
struct TCmdPItem *v2; // esi struct TCmdPItem *v2; // esi
@ -2565,7 +2481,6 @@ int __fastcall On_RESPAWNITEM(struct TCmdPItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E32A) --------------------------------------------------------
int __fastcall On_ATTACKXY(struct TCmdLoc *pCmd, int pnum) int __fastcall On_ATTACKXY(struct TCmdLoc *pCmd, int pnum)
{ {
struct TCmdLoc *v2; // edi struct TCmdLoc *v2; // edi
@ -2587,7 +2502,6 @@ int __fastcall On_ATTACKXY(struct TCmdLoc *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E386) --------------------------------------------------------
int __fastcall On_SATTACKXY(struct TCmdLoc *pCmd, int pnum) int __fastcall On_SATTACKXY(struct TCmdLoc *pCmd, int pnum)
{ {
struct TCmdLoc *v2; // edi struct TCmdLoc *v2; // edi
@ -2609,7 +2523,6 @@ int __fastcall On_SATTACKXY(struct TCmdLoc *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E3D5) --------------------------------------------------------
int __fastcall On_RATTACKXY(struct TCmdLoc *pCmd, int pnum) int __fastcall On_RATTACKXY(struct TCmdLoc *pCmd, int pnum)
{ {
struct TCmdLoc *v2; // edi struct TCmdLoc *v2; // edi
@ -2631,7 +2544,6 @@ int __fastcall On_RATTACKXY(struct TCmdLoc *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E424) --------------------------------------------------------
int __fastcall On_SPELLXYD(struct TCmdLocParam3 *pCmd, int pnum) int __fastcall On_SPELLXYD(struct TCmdLocParam3 *pCmd, int pnum)
{ {
struct TCmdLocParam3 *v2; // edi struct TCmdLocParam3 *v2; // edi
@ -2667,7 +2579,6 @@ int __fastcall On_SPELLXYD(struct TCmdLocParam3 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E4D2) --------------------------------------------------------
int __fastcall On_SPELLXY(struct TCmdLocParam2 *pCmd, int pnum) int __fastcall On_SPELLXY(struct TCmdLocParam2 *pCmd, int pnum)
{ {
struct TCmdLocParam2 *v2; // edi struct TCmdLocParam2 *v2; // edi
@ -2702,7 +2613,6 @@ int __fastcall On_SPELLXY(struct TCmdLocParam2 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E576) --------------------------------------------------------
int __fastcall On_TSPELLXY(struct TCmdLocParam2 *pCmd, int pnum) int __fastcall On_TSPELLXY(struct TCmdLocParam2 *pCmd, int pnum)
{ {
struct TCmdLocParam2 *v2; // edi struct TCmdLocParam2 *v2; // edi
@ -2735,7 +2645,6 @@ int __fastcall On_TSPELLXY(struct TCmdLocParam2 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E61A) --------------------------------------------------------
int __fastcall On_OPOBJXY(struct TCmdLocParam1 *pCmd, int pnum) int __fastcall On_OPOBJXY(struct TCmdLocParam1 *pCmd, int pnum)
{ {
struct TCmdLocParam1 *v2; // esi struct TCmdLocParam1 *v2; // esi
@ -2761,7 +2670,6 @@ int __fastcall On_OPOBJXY(struct TCmdLocParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E68A) --------------------------------------------------------
int __fastcall On_DISARMXY(struct TCmdLocParam1 *pCmd, int pnum) int __fastcall On_DISARMXY(struct TCmdLocParam1 *pCmd, int pnum)
{ {
struct TCmdLocParam1 *v2; // esi struct TCmdLocParam1 *v2; // esi
@ -2787,7 +2695,6 @@ int __fastcall On_DISARMXY(struct TCmdLocParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E6FA) --------------------------------------------------------
int __fastcall On_OPOBJT(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_OPOBJT(struct TCmdParam1 *pCmd, int pnum)
{ {
int v2; // eax int v2; // eax
@ -2805,7 +2712,6 @@ int __fastcall On_OPOBJT(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E732) --------------------------------------------------------
int __fastcall On_ATTACKID(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_ATTACKID(struct TCmdParam1 *pCmd, int pnum)
{ {
int v2; // ebp int v2; // ebp
@ -2837,7 +2743,6 @@ int __fastcall On_ATTACKID(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E7DF) --------------------------------------------------------
int __fastcall On_ATTACKPID(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_ATTACKPID(struct TCmdParam1 *pCmd, int pnum)
{ {
struct TCmdParam1 *v2; // edi struct TCmdParam1 *v2; // edi
@ -2858,7 +2763,6 @@ int __fastcall On_ATTACKPID(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E840) --------------------------------------------------------
int __fastcall On_RATTACKID(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_RATTACKID(struct TCmdParam1 *pCmd, int pnum)
{ {
struct TCmdParam1 *v2; // edi struct TCmdParam1 *v2; // edi
@ -2879,7 +2783,6 @@ int __fastcall On_RATTACKID(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E885) --------------------------------------------------------
int __fastcall On_RATTACKPID(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_RATTACKPID(struct TCmdParam1 *pCmd, int pnum)
{ {
struct TCmdParam1 *v2; // edi struct TCmdParam1 *v2; // edi
@ -2900,7 +2803,6 @@ int __fastcall On_RATTACKPID(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E8CA) --------------------------------------------------------
int __fastcall On_SPELLID(struct TCmdLocParam2 *pCmd, int pnum) int __fastcall On_SPELLID(struct TCmdLocParam2 *pCmd, int pnum)
{ {
struct TCmdLocParam2 *v2; // edi struct TCmdLocParam2 *v2; // edi
@ -2934,7 +2836,6 @@ int __fastcall On_SPELLID(struct TCmdLocParam2 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E964) --------------------------------------------------------
int __fastcall On_SPELLPID(struct TCmdLocParam2 *pCmd, int pnum) int __fastcall On_SPELLPID(struct TCmdLocParam2 *pCmd, int pnum)
{ {
struct TCmdLocParam2 *v2; // edi struct TCmdLocParam2 *v2; // edi
@ -2968,7 +2869,6 @@ int __fastcall On_SPELLPID(struct TCmdLocParam2 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043E9FE) --------------------------------------------------------
int __fastcall On_TSPELLID(struct TCmdLocParam2 *pCmd, int pnum) int __fastcall On_TSPELLID(struct TCmdLocParam2 *pCmd, int pnum)
{ {
struct TCmdLocParam2 *v2; // edi struct TCmdLocParam2 *v2; // edi
@ -3000,7 +2900,6 @@ int __fastcall On_TSPELLID(struct TCmdLocParam2 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EA98) --------------------------------------------------------
int __fastcall On_TSPELLPID(struct TCmdLocParam2 *pCmd, int pnum) int __fastcall On_TSPELLPID(struct TCmdLocParam2 *pCmd, int pnum)
{ {
struct TCmdLocParam2 *v2; // edi struct TCmdLocParam2 *v2; // edi
@ -3032,7 +2931,6 @@ int __fastcall On_TSPELLPID(struct TCmdLocParam2 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EB32) --------------------------------------------------------
int __fastcall On_KNOCKBACK(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_KNOCKBACK(struct TCmdParam1 *pCmd, int pnum)
{ {
int v2; // edi int v2; // edi
@ -3049,7 +2947,6 @@ int __fastcall On_KNOCKBACK(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EB74) --------------------------------------------------------
int __fastcall On_RESURRECT(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_RESURRECT(struct TCmdParam1 *pCmd, int pnum)
{ {
int v2; // esi int v2; // esi
@ -3068,7 +2965,6 @@ int __fastcall On_RESURRECT(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EBA4) --------------------------------------------------------
int __fastcall On_HEALOTHER(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_HEALOTHER(struct TCmdParam1 *pCmd, int pnum)
{ {
if ( gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel ) if ( gbBufferMsgs != 1 && currlevel == plr[pnum].plrlevel )
@ -3077,7 +2973,6 @@ int __fastcall On_HEALOTHER(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EBD5) --------------------------------------------------------
int __fastcall On_TALKXY(struct TCmdLocParam1 *pCmd, int pnum) int __fastcall On_TALKXY(struct TCmdLocParam1 *pCmd, int pnum)
{ {
struct TCmdLocParam1 *v2; // edi struct TCmdLocParam1 *v2; // edi
@ -3098,7 +2993,6 @@ int __fastcall On_TALKXY(struct TCmdLocParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EC27) --------------------------------------------------------
int __fastcall On_NEWLVL(struct TCmdParam2 *pCmd, int pnum) int __fastcall On_NEWLVL(struct TCmdParam2 *pCmd, int pnum)
{ {
if ( gbBufferMsgs == 1 ) if ( gbBufferMsgs == 1 )
@ -3113,7 +3007,6 @@ int __fastcall On_NEWLVL(struct TCmdParam2 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EC5B) --------------------------------------------------------
int __fastcall On_WARP(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_WARP(struct TCmdParam1 *pCmd, int pnum)
{ {
int v2; // esi int v2; // esi
@ -3136,7 +3029,6 @@ int __fastcall On_WARP(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043ECBA) --------------------------------------------------------
int __fastcall On_MONSTDEATH(struct TCmdLocParam1 *pCmd, int pnum) int __fastcall On_MONSTDEATH(struct TCmdLocParam1 *pCmd, int pnum)
{ {
struct TCmdLocParam1 *v2; // esi struct TCmdLocParam1 *v2; // esi
@ -3158,7 +3050,6 @@ int __fastcall On_MONSTDEATH(struct TCmdLocParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043ED23) --------------------------------------------------------
int __fastcall On_KILLGOLEM(struct TCmdLocParam1 *pCmd, int pnum) int __fastcall On_KILLGOLEM(struct TCmdLocParam1 *pCmd, int pnum)
{ {
int v2; // edi int v2; // edi
@ -3180,7 +3071,6 @@ int __fastcall On_KILLGOLEM(struct TCmdLocParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043ED89) --------------------------------------------------------
int __fastcall On_AWAKEGOLEM(struct TCmdGolem *pCmd, int pnum) int __fastcall On_AWAKEGOLEM(struct TCmdGolem *pCmd, int pnum)
{ {
int v2; // esi int v2; // esi
@ -3238,7 +3128,6 @@ LABEL_16:
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EE3D) --------------------------------------------------------
int __fastcall On_MONSTDAMAGE(struct TCmdLocParam1 *pCmd, int pnum) int __fastcall On_MONSTDAMAGE(struct TCmdLocParam1 *pCmd, int pnum)
{ {
int v2; // edi int v2; // edi
@ -3276,7 +3165,6 @@ int __fastcall On_MONSTDAMAGE(struct TCmdLocParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EEF5) --------------------------------------------------------
int __fastcall On_PLRDEAD(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_PLRDEAD(struct TCmdParam1 *pCmd, int pnum)
{ {
if ( gbBufferMsgs == 1 ) if ( gbBufferMsgs == 1 )
@ -3295,7 +3183,6 @@ int __fastcall On_PLRDEAD(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EF2D) --------------------------------------------------------
int __fastcall On_PLRDAMAGE(struct TCmdDamage *pCmd, int pnum) int __fastcall On_PLRDAMAGE(struct TCmdDamage *pCmd, int pnum)
{ {
int v2; // edi int v2; // edi
@ -3335,7 +3222,6 @@ int __fastcall On_PLRDAMAGE(struct TCmdDamage *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043EFDD) --------------------------------------------------------
int __fastcall On_OPENDOOR(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_OPENDOOR(struct TCmdParam1 *pCmd, int pnum)
{ {
struct TCmdParam1 *v2; // edi struct TCmdParam1 *v2; // edi
@ -3357,7 +3243,6 @@ int __fastcall On_OPENDOOR(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F033) --------------------------------------------------------
void __fastcall delta_sync_object(int oi, unsigned char bCmd, unsigned char bLevel) void __fastcall delta_sync_object(int oi, unsigned char bCmd, unsigned char bLevel)
{ {
if ( gbMaxPlayers != 1 ) if ( gbMaxPlayers != 1 )
@ -3369,7 +3254,6 @@ void __fastcall delta_sync_object(int oi, unsigned char bCmd, unsigned char bLev
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
//----- (0043F058) --------------------------------------------------------
int __fastcall On_CLOSEDOOR(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_CLOSEDOOR(struct TCmdParam1 *pCmd, int pnum)
{ {
struct TCmdParam1 *v2; // edi struct TCmdParam1 *v2; // edi
@ -3391,7 +3275,6 @@ int __fastcall On_CLOSEDOOR(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F0AE) --------------------------------------------------------
int __fastcall On_OPERATEOBJ(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_OPERATEOBJ(struct TCmdParam1 *pCmd, int pnum)
{ {
struct TCmdParam1 *v2; // edi struct TCmdParam1 *v2; // edi
@ -3413,7 +3296,6 @@ int __fastcall On_OPERATEOBJ(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F104) --------------------------------------------------------
int __fastcall On_PLROPOBJ(struct TCmdParam2 *pCmd, int pnum) int __fastcall On_PLROPOBJ(struct TCmdParam2 *pCmd, int pnum)
{ {
struct TCmdParam2 *v2; // esi struct TCmdParam2 *v2; // esi
@ -3435,7 +3317,6 @@ int __fastcall On_PLROPOBJ(struct TCmdParam2 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F15C) --------------------------------------------------------
int __fastcall On_BREAKOBJ(struct TCmdParam2 *pCmd, int pnum) int __fastcall On_BREAKOBJ(struct TCmdParam2 *pCmd, int pnum)
{ {
struct TCmdParam2 *v2; // esi struct TCmdParam2 *v2; // esi
@ -3457,7 +3338,6 @@ int __fastcall On_BREAKOBJ(struct TCmdParam2 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F1B0) --------------------------------------------------------
int __fastcall On_CHANGEPLRITEMS(struct TCmdChItem *pCmd, int pnum) int __fastcall On_CHANGEPLRITEMS(struct TCmdChItem *pCmd, int pnum)
{ {
int v2; // eax int v2; // eax
@ -3483,7 +3363,6 @@ int __fastcall On_CHANGEPLRITEMS(struct TCmdChItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F1F0) --------------------------------------------------------
int __fastcall On_DELPLRITEMS(struct TCmdDelItem *pCmd, int pnum) int __fastcall On_DELPLRITEMS(struct TCmdDelItem *pCmd, int pnum)
{ {
int v2; // eax int v2; // eax
@ -3502,7 +3381,6 @@ int __fastcall On_DELPLRITEMS(struct TCmdDelItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F21E) --------------------------------------------------------
int __fastcall On_PLRLEVEL(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_PLRLEVEL(struct TCmdParam1 *pCmd, int pnum)
{ {
if ( gbBufferMsgs == 1 ) if ( gbBufferMsgs == 1 )
@ -3517,7 +3395,6 @@ int __fastcall On_PLRLEVEL(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F258) --------------------------------------------------------
int __fastcall On_DROPITEM(struct TCmdPItem *pCmd, int pnum) int __fastcall On_DROPITEM(struct TCmdPItem *pCmd, int pnum)
{ {
if ( gbBufferMsgs == 1 ) if ( gbBufferMsgs == 1 )
@ -3528,7 +3405,6 @@ int __fastcall On_DROPITEM(struct TCmdPItem *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F28F) --------------------------------------------------------
int __fastcall On_SEND_PLRINFO(struct TCmdPlrInfoHdr *pCmd, int pnum) int __fastcall On_SEND_PLRINFO(struct TCmdPlrInfoHdr *pCmd, int pnum)
{ {
struct TCmdPlrInfoHdr *v2; // esi struct TCmdPlrInfoHdr *v2; // esi
@ -3547,7 +3423,6 @@ int __fastcall On_ACK_PLRINFO(struct TCmdPlrInfoHdr *pCmd, int pnum)
return On_SEND_PLRINFO(pCmd, pnum); return On_SEND_PLRINFO(pCmd, pnum);
} }
//----- (0043F2CE) --------------------------------------------------------
int __fastcall On_PLAYER_JOINLEVEL(struct TCmdLocParam1 *pCmd, int pnum) int __fastcall On_PLAYER_JOINLEVEL(struct TCmdLocParam1 *pCmd, int pnum)
{ {
int v2; // ebx int v2; // ebx
@ -3621,7 +3496,6 @@ int __fastcall On_PLAYER_JOINLEVEL(struct TCmdLocParam1 *pCmd, int pnum)
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
// 67862C: using guessed type char gbActivePlayers; // 67862C: using guessed type char gbActivePlayers;
//----- (0043F448) --------------------------------------------------------
int __fastcall On_ACTIVATEPORTAL(DJunk *pCmd, int pnum) int __fastcall On_ACTIVATEPORTAL(DJunk *pCmd, int pnum)
{ {
signed int v2; // ebx signed int v2; // ebx
@ -3699,7 +3573,6 @@ LABEL_19:
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F521) --------------------------------------------------------
void __fastcall delta_open_portal(int pnum, int x, int y, int bLevel, int bLType, int bSetLvl) void __fastcall delta_open_portal(int pnum, int x, int y, int bLevel, int bLType, int bSetLvl)
{ {
int v6; // eax int v6; // eax
@ -3714,7 +3587,6 @@ void __fastcall delta_open_portal(int pnum, int x, int y, int bLevel, int bLType
} }
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
//----- (0043F55C) --------------------------------------------------------
int __fastcall On_DEACTIVATEPORTAL(struct TCmd *pCmd, int pnum) int __fastcall On_DEACTIVATEPORTAL(struct TCmd *pCmd, int pnum)
{ {
int v2; // esi int v2; // esi
@ -3735,7 +3607,6 @@ int __fastcall On_DEACTIVATEPORTAL(struct TCmd *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F59A) --------------------------------------------------------
int __fastcall On_RETOWN(struct TCmd *pCmd, int pnum) int __fastcall On_RETOWN(struct TCmd *pCmd, int pnum)
{ {
int v2; // esi int v2; // esi
@ -3758,7 +3629,6 @@ int __fastcall On_RETOWN(struct TCmd *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F5D3) --------------------------------------------------------
int __fastcall On_SETSTR(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_SETSTR(struct TCmdParam1 *pCmd, int pnum)
{ {
unsigned short v2; // cx unsigned short v2; // cx
@ -3777,7 +3647,6 @@ int __fastcall On_SETSTR(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F60C) --------------------------------------------------------
int __fastcall On_SETDEX(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_SETDEX(struct TCmdParam1 *pCmd, int pnum)
{ {
unsigned short v2; // cx unsigned short v2; // cx
@ -3796,7 +3665,6 @@ int __fastcall On_SETDEX(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F645) --------------------------------------------------------
int __fastcall On_SETMAG(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_SETMAG(struct TCmdParam1 *pCmd, int pnum)
{ {
unsigned short v2; // cx unsigned short v2; // cx
@ -3815,7 +3683,6 @@ int __fastcall On_SETMAG(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F67E) --------------------------------------------------------
int __fastcall On_SETVIT(struct TCmdParam1 *pCmd, int pnum) int __fastcall On_SETVIT(struct TCmdParam1 *pCmd, int pnum)
{ {
unsigned short v2; // cx unsigned short v2; // cx
@ -3834,7 +3701,6 @@ int __fastcall On_SETVIT(struct TCmdParam1 *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F6B7) --------------------------------------------------------
int __fastcall On_STRING(struct TCmdString *pCmd, int pnum) int __fastcall On_STRING(struct TCmdString *pCmd, int pnum)
{ {
const char *v2; // esi const char *v2; // esi
@ -3850,7 +3716,6 @@ int __fastcall On_STRING(struct TCmdString *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F6EC) --------------------------------------------------------
int __fastcall On_SYNCQUEST(struct TCmdQuest *pCmd, int pnum) int __fastcall On_SYNCQUEST(struct TCmdQuest *pCmd, int pnum)
{ {
if ( gbBufferMsgs == 1 ) if ( gbBufferMsgs == 1 )
@ -3872,7 +3737,6 @@ int __fastcall On_SYNCQUEST(struct TCmdQuest *pCmd, int pnum)
// 67618C: using guessed type char sgbDeltaChanged; // 67618C: using guessed type char sgbDeltaChanged;
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F72E) --------------------------------------------------------
int __fastcall On_ENDSHIELD(int a1, int pnum) int __fastcall On_ENDSHIELD(int a1, int pnum)
{ {
int v2; // ebx int v2; // ebx
@ -3924,13 +3788,11 @@ int __fastcall On_CHEAT_SPELL_LEVEL(struct TCmd *pCmd, int pnum)
} }
#endif #endif
//----- (0043F7A5) --------------------------------------------------------
int __cdecl On_DEBUG() int __cdecl On_DEBUG()
{ {
return 1; return 1;
} }
//----- (0043F7A9) --------------------------------------------------------
int __fastcall On_NOVA(struct TCmdLoc *pCmd, int pnum) int __fastcall On_NOVA(struct TCmdLoc *pCmd, int pnum)
{ {
struct TCmdLoc *v2; // edi struct TCmdLoc *v2; // edi
@ -3955,7 +3817,6 @@ int __fastcall On_NOVA(struct TCmdLoc *pCmd, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F818) --------------------------------------------------------
int __fastcall On_SETSHIELD(int unused, int pnum) int __fastcall On_SETSHIELD(int unused, int pnum)
{ {
int result; // eax int result; // eax
@ -3967,7 +3828,6 @@ int __fastcall On_SETSHIELD(int unused, int pnum)
} }
// 676194: using guessed type char gbBufferMsgs; // 676194: using guessed type char gbBufferMsgs;
//----- (0043F830) --------------------------------------------------------
int __fastcall On_REMSHIELD(int unused, int pnum) int __fastcall On_REMSHIELD(int unused, int pnum)
{ {
int result; // eax int result; // eax

View File

@ -1,15 +1,7 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the #ifndef __MSG_H__
* United States. Use of a copyright notice is precautionary only and #define __MSG_H__
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//msg
extern int sgdwOwnerWait; // weak extern int sgdwOwnerWait; // weak
extern int msg_cpp_init_value; // weak extern int msg_cpp_init_value; // weak
extern int sgdwRecvOffset; // idb extern int sgdwRecvOffset; // idb
@ -169,3 +161,5 @@ int __fastcall On_REMSHIELD(int unused, int pnum);
/* data */ /* data */
extern int msg_inf; // weak extern int msg_inf; // weak
#endif /* __MSG_H__ */

View File

@ -1,13 +1,4 @@
/* //HEADER_GOES_HERE
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
#include "../types.h" #include "../types.h"
@ -17,7 +8,6 @@ int sgdwMsgCmdTimer;
int msgcmd_inf = 0x7F800000; // weak int msgcmd_inf = 0x7F800000; // weak
//----- (0043F84E) --------------------------------------------------------
struct msgcmd_cpp_init_1 struct msgcmd_cpp_init_1
{ {
msgcmd_cpp_init_1() msgcmd_cpp_init_1()
@ -28,7 +18,6 @@ struct msgcmd_cpp_init_1
// 47F150: using guessed type int msgcmd_inf; // 47F150: using guessed type int msgcmd_inf;
// 6761A0: using guessed type int msgcmd_cpp_init_value; // 6761A0: using guessed type int msgcmd_cpp_init_value;
//----- (0043F859) --------------------------------------------------------
struct msgcmd_cpp_init_2 struct msgcmd_cpp_init_2
{ {
msgcmd_cpp_init_2() msgcmd_cpp_init_2()
@ -38,32 +27,27 @@ struct msgcmd_cpp_init_2
} }
} _msgcmd_cpp_init_2; } _msgcmd_cpp_init_2;
//----- (0043F863) --------------------------------------------------------
void __cdecl msgcmd_init_event() void __cdecl msgcmd_init_event()
{ {
msgcmd_init_chatcmd(&sgChat_Cmd); msgcmd_init_chatcmd(&sgChat_Cmd);
} }
//----- (0043F86D) --------------------------------------------------------
void __cdecl msgcmd_cleanup_chatcmd_atexit() void __cdecl msgcmd_cleanup_chatcmd_atexit()
{ {
atexit(msgcmd_cleanup_chatcmd); atexit(msgcmd_cleanup_chatcmd);
} }
//----- (0043F879) --------------------------------------------------------
void __cdecl msgcmd_cleanup_chatcmd() void __cdecl msgcmd_cleanup_chatcmd()
{ {
msgcmd_cleanup_chatcmd_1(&sgChat_Cmd); msgcmd_cleanup_chatcmd_1(&sgChat_Cmd);
msgcmd_cleanup_extern_msg(sgChat_Cmd.extern_msgs); msgcmd_cleanup_extern_msg(sgChat_Cmd.extern_msgs);
} }
//----- (0043F88D) --------------------------------------------------------
void __cdecl msgcmd_cmd_cleanup() void __cdecl msgcmd_cmd_cleanup()
{ {
msgcmd_free_event(&sgChat_Cmd); msgcmd_free_event(&sgChat_Cmd);
} }
//----- (0043F897) --------------------------------------------------------
void __cdecl msgcmd_send_chat() void __cdecl msgcmd_send_chat()
{ {
ServerCommand *v0; // esi ServerCommand *v0; // esi
@ -82,7 +66,6 @@ void __cdecl msgcmd_send_chat()
} }
} }
//----- (0043F8D4) --------------------------------------------------------
bool __fastcall msgcmd_add_server_cmd_W(char *chat_message) bool __fastcall msgcmd_add_server_cmd_W(char *chat_message)
{ {
if ( *chat_message != '/' ) if ( *chat_message != '/' )
@ -91,7 +74,6 @@ bool __fastcall msgcmd_add_server_cmd_W(char *chat_message)
return 1; return 1;
} }
//----- (0043F8E5) --------------------------------------------------------
void __fastcall msgcmd_add_server_cmd(char *command) void __fastcall msgcmd_add_server_cmd(char *command)
{ {
char *v1; // edi char *v1; // edi
@ -113,7 +95,6 @@ void __fastcall msgcmd_add_server_cmd(char *command)
} }
} }
//----- (0043F920) --------------------------------------------------------
void __fastcall msgcmd_init_chatcmd(ChatCmd *chat_cmd) void __fastcall msgcmd_init_chatcmd(ChatCmd *chat_cmd)
{ {
ServerCommand **v1; // edx ServerCommand **v1; // edx
@ -126,7 +107,6 @@ void __fastcall msgcmd_init_chatcmd(ChatCmd *chat_cmd)
chat_cmd->extern_msgs[1] = (ServerCommand *)~(unsigned int)chat_cmd->extern_msgs; chat_cmd->extern_msgs[1] = (ServerCommand *)~(unsigned int)chat_cmd->extern_msgs;
} }
//----- (0043F936) --------------------------------------------------------
void __fastcall msgcmd_free_event(ChatCmd *a1) void __fastcall msgcmd_free_event(ChatCmd *a1)
{ {
int v1; // edx int v1; // edx
@ -144,7 +124,6 @@ void __fastcall msgcmd_free_event(ChatCmd *a1)
} }
} }
//----- (0043F95E) --------------------------------------------------------
bool __fastcall msgcmd_delete_server_cmd_W(ChatCmd *cmd, ServerCommand *extern_msg) bool __fastcall msgcmd_delete_server_cmd_W(ChatCmd *cmd, ServerCommand *extern_msg)
{ {
char *v2; // eax char *v2; // eax
@ -165,7 +144,6 @@ bool __fastcall msgcmd_delete_server_cmd_W(ChatCmd *cmd, ServerCommand *extern_m
return v4; return v4;
} }
//----- (0043F999) --------------------------------------------------------
ChatCmd *__fastcall msgcmd_alloc_event(ChatCmd *a1, int a2, int a3, int a4, int a5) ChatCmd *__fastcall msgcmd_alloc_event(ChatCmd *a1, int a2, int a3, int a4, int a5)
{ {
int v5; // eax int v5; // eax
@ -193,7 +171,6 @@ ChatCmd *__fastcall msgcmd_alloc_event(ChatCmd *a1, int a2, int a3, int a4, int
return v9; return v9;
} }
//----- (0043F9E5) --------------------------------------------------------
void __fastcall msgcmd_remove_event(ChatCmd *a1, int a2) void __fastcall msgcmd_remove_event(ChatCmd *a1, int a2)
{ {
ServerCommand **v2; // esi ServerCommand **v2; // esi
@ -208,7 +185,6 @@ void __fastcall msgcmd_remove_event(ChatCmd *a1, int a2)
} }
} }
//----- (0043FA14) --------------------------------------------------------
void __fastcall msgcmd_event_type(ChatCmd *a1, int a2, int *a3, int a4, int a5) void __fastcall msgcmd_event_type(ChatCmd *a1, int a2, int *a3, int a4, int a5)
{ {
ChatCmd *v5; // edi ChatCmd *v5; // edi
@ -257,7 +233,6 @@ void __fastcall msgcmd_event_type(ChatCmd *a1, int a2, int *a3, int a4, int a5)
} }
} }
//----- (0043FA85) --------------------------------------------------------
void __fastcall msgcmd_cleanup_chatcmd_1(ChatCmd *a1) void __fastcall msgcmd_cleanup_chatcmd_1(ChatCmd *a1)
{ {
ChatCmd *v1; // esi ChatCmd *v1; // esi
@ -273,7 +248,6 @@ void __fastcall msgcmd_cleanup_chatcmd_1(ChatCmd *a1)
} }
} }
//----- (0043FA98) --------------------------------------------------------
void __fastcall msgcmd_cleanup_extern_msg(ServerCommand **extern_msgs) void __fastcall msgcmd_cleanup_extern_msg(ServerCommand **extern_msgs)
{ {
ServerCommand *v1; // esi ServerCommand *v1; // esi

Some files were not shown because too many files have changed in this diff Show More