Full Code of diasurgical/devilution for AI

master 9f0175724341 cached
252 files
4.1 MB
1.1M tokens
2678 symbols
1 requests
Download .txt
Showing preview only (4,314K chars total). Download the full file or copy to clipboard to get everything.
Repository: diasurgical/devilution
Branch: master
Commit: 9f0175724341
Files: 252
Total size: 4.1 MB

Directory structure:
gitextract_qfpcrvhg/

├── .circleci/
│   ├── are-we-d1-yet.sh
│   └── config.yml
├── .clang-format
├── .editorconfig
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   └── bug_report.md
│   └── workflows/
│       └── build_mac.yml
├── .gitignore
├── 3rdParty/
│   ├── PKWare/
│   │   ├── Makefile
│   │   ├── PKWare.vcxproj
│   │   ├── PKWare.vcxproj.filters
│   │   ├── Pkware.dsp
│   │   ├── explode.cpp
│   │   ├── implode.cpp
│   │   └── pkware.h
│   └── Storm/
│       ├── Makefile
│       └── Source/
│           ├── Storm.dsp
│           ├── Storm.vcxproj
│           ├── storm.cpp
│           ├── storm.def
│           ├── storm.h
│           └── storm_gcc.def
├── Diablo.dsp
├── Diablo.dsw
├── Diablo.rc
├── Diablo.sln
├── Diablo.vcxproj
├── Diablo.vcxproj.filters
├── DiabloUI/
│   ├── DiabloUI.dsp
│   ├── DiabloUI.vcxproj
│   ├── Makefile
│   ├── _temp_data.cpp
│   ├── _temp_funcs.h
│   ├── artfont.cpp
│   ├── bn_prof.cpp
│   ├── bnetgw.cpp
│   ├── connect.cpp
│   ├── copyprot.cpp
│   ├── cr8game.cpp
│   ├── creadung.cpp
│   ├── creastat.cpp
│   ├── credits.cpp
│   ├── diabedit.cpp
│   ├── diabloui.cpp
│   ├── diabloui.def
│   ├── diabloui.h
│   ├── diabloui_gcc.def
│   ├── dirlink.cpp
│   ├── disclaim.cpp
│   ├── doom.cpp
│   ├── entdial.cpp
│   ├── entname.cpp
│   ├── fade.cpp
│   ├── focus.cpp
│   ├── local.cpp
│   ├── mainmenu.cpp
│   ├── modem.cpp
│   ├── modmstat.cpp
│   ├── okcancel.cpp
│   ├── progress.cpp
│   ├── sbar.cpp
│   ├── selclass.cpp
│   ├── selconn.cpp
│   ├── seldial.cpp
│   ├── selgame.cpp
│   ├── selhero.cpp
│   ├── selipx.cpp
│   ├── sellist.cpp
│   ├── selload.cpp
│   ├── selmodem.cpp
│   ├── selregn.cpp
│   ├── selyesno.cpp
│   ├── title.cpp
│   └── titlesnd.cpp
├── Hellfire.dsp
├── Hellfire.dsw
├── Hellfire.rc
├── LICENSE.md
├── Makefile
├── MakefileVC
├── README.md
├── Source/
│   ├── .clang-format
│   ├── _asm.cpp
│   ├── _render.cpp
│   ├── all.h
│   ├── appfat.cpp
│   ├── appfat.h
│   ├── asm_trans_rect.inc
│   ├── automap.cpp
│   ├── automap.h
│   ├── capture.cpp
│   ├── capture.h
│   ├── codec.cpp
│   ├── codec.h
│   ├── control.cpp
│   ├── control.h
│   ├── cursor.cpp
│   ├── cursor.h
│   ├── dead.cpp
│   ├── dead.h
│   ├── debug.cpp
│   ├── debug.h
│   ├── diablo.cpp
│   ├── diablo.h
│   ├── doom.cpp
│   ├── doom.h
│   ├── drlg_l1.cpp
│   ├── drlg_l1.h
│   ├── drlg_l2.cpp
│   ├── drlg_l2.h
│   ├── drlg_l3.cpp
│   ├── drlg_l3.h
│   ├── drlg_l4.cpp
│   ├── drlg_l4.h
│   ├── dthread.cpp
│   ├── dthread.h
│   ├── dx.cpp
│   ├── dx.h
│   ├── effects.cpp
│   ├── effects.h
│   ├── encrypt.cpp
│   ├── encrypt.h
│   ├── engine.cpp
│   ├── engine.h
│   ├── error.cpp
│   ├── error.h
│   ├── fault.cpp
│   ├── fault.h
│   ├── gamemenu.cpp
│   ├── gamemenu.h
│   ├── gendung.cpp
│   ├── gendung.h
│   ├── gmenu.cpp
│   ├── gmenu.h
│   ├── help.cpp
│   ├── help.h
│   ├── init.cpp
│   ├── init.h
│   ├── interfac.cpp
│   ├── interfac.h
│   ├── inv.cpp
│   ├── inv.h
│   ├── itemdat.cpp
│   ├── itemdat.h
│   ├── items.cpp
│   ├── items.h
│   ├── lighting.cpp
│   ├── lighting.h
│   ├── list.h
│   ├── loadsave.cpp
│   ├── loadsave.h
│   ├── logging.cpp
│   ├── logging.h
│   ├── mainmenu.cpp
│   ├── mainmenu.h
│   ├── minitext.cpp
│   ├── minitext.h
│   ├── misdat.cpp
│   ├── misdat.h
│   ├── missiles.cpp
│   ├── missiles.h
│   ├── monstdat.cpp
│   ├── monstdat.h
│   ├── monster.cpp
│   ├── monster.h
│   ├── movie.cpp
│   ├── movie.h
│   ├── mpqapi.cpp
│   ├── mpqapi.h
│   ├── msg.cpp
│   ├── msg.h
│   ├── msgcmd.cpp
│   ├── msgcmd.h
│   ├── multi.cpp
│   ├── multi.h
│   ├── nthread.cpp
│   ├── nthread.h
│   ├── objdat.cpp
│   ├── objdat.h
│   ├── objects.cpp
│   ├── objects.h
│   ├── pack.cpp
│   ├── pack.h
│   ├── palette.cpp
│   ├── palette.h
│   ├── path.cpp
│   ├── path.h
│   ├── pfile.cpp
│   ├── pfile.h
│   ├── player.cpp
│   ├── player.h
│   ├── plrmsg.cpp
│   ├── plrmsg.h
│   ├── portal.cpp
│   ├── portal.h
│   ├── quests.cpp
│   ├── quests.h
│   ├── render.cpp
│   ├── render.h
│   ├── restrict.cpp
│   ├── restrict.h
│   ├── scrollrt.cpp
│   ├── scrollrt.h
│   ├── setmaps.cpp
│   ├── setmaps.h
│   ├── sha.cpp
│   ├── sha.h
│   ├── sound.cpp
│   ├── sound.h
│   ├── spelldat.cpp
│   ├── spelldat.h
│   ├── spells.cpp
│   ├── spells.h
│   ├── stores.cpp
│   ├── stores.h
│   ├── sync.cpp
│   ├── sync.h
│   ├── textdat.cpp
│   ├── textdat.h
│   ├── themes.cpp
│   ├── themes.h
│   ├── tmsg.cpp
│   ├── tmsg.h
│   ├── town.cpp
│   ├── town.h
│   ├── towners.cpp
│   ├── towners.h
│   ├── track.cpp
│   ├── track.h
│   ├── trigs.cpp
│   ├── trigs.h
│   ├── wave.cpp
│   └── wave.h
├── appveyor.yml
├── comparer-config/
│   ├── diablo.toml
│   ├── hellfire.toml
│   └── spawn.toml
├── defs.h
├── docs/
│   ├── BACKGROUND.md
│   ├── CHANGELOG.md
│   ├── CONTRIBUTING.md
│   ├── INSTALL_linux.md
│   ├── INSTALL_mac.md
│   ├── INSTALL_windows.md
│   ├── TODO.md
│   ├── compatibility_matrix.md
│   ├── debug.md
│   └── troubleshooting.md
├── doxygen.config
├── enums.h
├── resource.h
├── structs.h
└── types.h

================================================
FILE CONTENTS
================================================

================================================
FILE: .circleci/are-we-d1-yet.sh
================================================
#!/bin/bash

# based on https://github.com/k3rn31p4nic/travis-ci-discord-webhook

# Only run for commits/builds on master, not for PRs for now
if [[ "$CIRCLE_BRANCH" != "master" ]]; then
  exit
fi

# Webhook URL missing, do nothing
if [ -z "$2" ]; then
  exit
fi

echo -e "[Webhook]: Sending webhook to Discord...\\n";

AUTHOR_NAME="$(git log -1 "$CIRCLE_SHA1" --pretty="%aN")"
COMMITTER_NAME="$(git log -1 "$CIRCLE_SHA1" --pretty="%cN")"
COMMIT_SUBJECT="$(git log -1 "$CIRCLE_SHA1" --pretty="%s")"
COMMIT_MESSAGE="$(git log -1 "$CIRCLE_SHA1" --pretty="%b")"

if [ "$AUTHOR_NAME" == "$COMMITTER_NAME" ]; then
  CREDITS="$AUTHOR_NAME authored & committed"
else
  CREDITS="$AUTHOR_NAME authored & $COMMITTER_NAME committed"
fi

TIMESTAMP=$(date --utc +%FT%TZ)
WEBHOOK_DATA='{
  "avatar_url": "https://www.saaves.com/storage/brochure/logo-circleci-icon1583764538.png",
  "embeds": [ {
    "author": {
      "name": "'"$3"' (Build #'"$CIRCLE_BUILD_NUM"')",
      "url": "'"$CIRCLE_BUILD_URL"'",
      "icon_url": "https://www.saaves.com/storage/brochure/logo-circleci-icon1583764538.png"
    },
    "title": "['"\`${CIRCLE_SHA1:0:7}\`"'] '"$COMMIT_SUBJECT"'",
    "url": "'"https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"'",
    "description": "'"$CREDITS"'",
    "fields": [
      {
        "name": "Binary accuracy",
        "value": "'"$1"'",
        "inline": true
      }
    ],
    "timestamp": "'"$TIMESTAMP"'"
  } ]
}'

(curl --fail --progress-bar -A "TravisCI-Webhook" -H Content-Type:application/json -H X-Author:diasurgical -d "$WEBHOOK_DATA" "$2" \
  && echo -e "\\n[Webhook]: Successfully sent the webhook.") || echo -e "\\n[Webhook]: Unable to send webhook."


================================================
FILE: .circleci/config.yml
================================================
version: 2
jobs:
  diablo_109b:
    docker:
      - image: diasurgical/riivaaja:stable
    steps:
      - checkout
      - run: make -f MakefileVC
  diablo_109b_diff:
    machine: true
    steps:
      - checkout
      - run: |
          set -e
          wget https://github.com/diasurgical/devilution-comparer/releases/download/v0.4.0/devilution-comparer-v0.4.0-x86_64-unknown-linux-gnu.tar.xz
          tar xf devilution-comparer-v0.4.0-x86_64-unknown-linux-gnu.tar.xz
          mv comparer-config/diablo.toml comparer-config.toml
          echo '#!/bin/sh' | sudo tee /bin/wine
          echo 'docker run -v $(pwd):/root/devilution --entrypoint "/usr/bin/wine" diasurgical/riivaaja:stable $(basename $1) $2 $3' | sudo tee --append /bin/wine
          sudo chmod +x /bin/wine
          docker run -v $(pwd):/root/devilution -e MAKE_BUILD=pdb diasurgical/riivaaja:stable
          ./devilution-comparer generate-full Diablo.exe --no-mem-disp --truncate-to-original
          docker run -v $(pwd):/root/devilution diasurgical/riivaaja:stable ../status.sh
          .circleci/are-we-d1-yet.sh "$(< accuracy.txt)" $DISCORD_WEBHOOK "Diablo 1.09b"
  spawn_109b_diff:
    machine: true
    steps:
      - checkout
      - run: |
          set -e
          wget https://github.com/diasurgical/devilution-comparer/releases/download/v0.4.0/devilution-comparer-v0.4.0-x86_64-unknown-linux-gnu.tar.xz
          tar xf devilution-comparer-v0.4.0-x86_64-unknown-linux-gnu.tar.xz
          mv comparer-config/spawn.toml comparer-config.toml
          echo '#!/bin/sh' | sudo tee /bin/wine
          echo 'docker run -v $(pwd):/root/devilution --entrypoint "/usr/bin/wine" diasurgical/riivaaja:stable $(basename $1) $2 $3' | sudo tee --append /bin/wine
          sudo chmod +x /bin/wine
          docker run -v $(pwd):/root/devilution -e MAKE_BUILD=pdb -e SPAWN=1 diasurgical/riivaaja:stable
          ./devilution-comparer generate-full Diablo.exe --no-mem-disp --truncate-to-original
          docker run -v $(pwd):/root/devilution diasurgical/riivaaja:stable ../spawn-status.sh
          .circleci/are-we-d1-yet.sh "$(< accuracy.txt)" $DISCORD_WEBHOOK "Spawn 1.09b"
  hellfire_101_diff:
    machine: true
    steps:
      - checkout
      - run: |
          set -e
          wget https://github.com/diasurgical/devilution-comparer/releases/download/v0.4.0/devilution-comparer-v0.4.0-x86_64-unknown-linux-gnu.tar.xz
          tar xf devilution-comparer-v0.4.0-x86_64-unknown-linux-gnu.tar.xz
          mv comparer-config/hellfire.toml comparer-config.toml
          echo '#!/bin/sh' | sudo tee /bin/wine
          echo 'docker run -v $(pwd):/root/devilution --entrypoint "/usr/bin/wine" diasurgical/riivaaja:stable $(basename $1) $2 $3' | sudo tee --append /bin/wine
          sudo chmod +x /bin/wine
          docker run -v $(pwd):/root/devilution -e MAKE_BUILD=pdb -e HELLFIRE=1 diasurgical/riivaaja:stable
          dd if=/dev/zero bs=1 count=3072 of=hellfire.exe
          dd if=Diablo.exe >> hellfire.exe
          ./devilution-comparer generate-full hellfire.exe --no-mem-disp --truncate-to-original
          docker run -v $(pwd):/root/devilution diasurgical/riivaaja:stable ../hellfire-status.sh
          .circleci/are-we-d1-yet.sh "$(< accuracy.txt)" $DISCORD_WEBHOOK "Hellfire 1.01"
  linux:
    docker:
      - image: debian:stretch-backports
    steps:
      - checkout
      - run: apt-get update -y
      - run: apt-get install -y mingw-w64 make
      - run: make -j2
      - run: make clean
      - run: make debug -j2

workflows:
  version: 2
  testflow:
    jobs:
      - diablo_109b
      - diablo_109b_diff
      - spawn_109b_diff
      - hellfire_101_diff
      - linux


================================================
FILE: .clang-format
================================================
BasedOnStyle: webkit
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
PointerAlignment: Right
AlignConsecutiveAssignments: true
TabWidth: 4
UseTab: ForIndentation
SortIncludes: false


================================================
FILE: .editorconfig
================================================
root = true

[*]
indent_style = tab
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.sh]
end_of_line = lf


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

Before creating a bug report, please note that this bug tracker is only intended for the original devilution project, which is binary exact function-wise. Please report bugs in ports of devilution in their respective repositories: [Browser port](https://github.com/d07RiV/diabloweb/issues), [Crossplatform port](https://github.com/diasurgical/devilutionX/issues)

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/workflows/build_mac.yml
================================================
name: macOS Build

on:
  push:
    branches:
      - master
  pull_request:
    

jobs:
  xcode:
    runs-on: macos-11

    steps:
      - uses: actions/checkout@v2

      - name: Install dependencies
        run: brew install mingw-w64

      - name: Build
        run: make -j8

      

================================================
FILE: .gitignore
================================================
# Generated by VC++ 6 builds
/vc60.idb
*.asm
*.idb

# macOS
.DS_Store

# CodeLite
.CodeLite
*.project
*.workspace

# Devilution Comparer
devilution-comparer
comparer-config.toml

# ELF object file.
*.o

# PE shared library and associated files.
*.lib
*.exp
*.dll

# PE executable.
*.exe

# GCC dependency file.
*.d

# Resource file.
*.res

# Created by https://www.gitignore.io/api/visualstudio

### VisualStudio ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
WinDebug/
WinRel/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# Visual Studio Trace Files
*.e2e

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json

# Visual Studio code coverage results
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak

# SQL Server files
*.mdf
*.ldf
*.ndf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Tabs Studio
*.tss

# Telerik's JustMock configuration file
*.jmconfig

# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
*.binlog

# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
.mfractor/

### VisualStudio Patch ###
# By default, sensitive information, such as encrypted password
# should be stored in the .pubxml.user file.
*.pubxml.user

# End of https://www.gitignore.io/api/visualstudio
/docs/html/

# MPQ files
*.mpq

# ddraw wrapper configuration file
ddraw_settings.ini

================================================
FILE: 3rdParty/PKWare/Makefile
================================================
VC5_DIR ?= $(HOME)/DevStudio_5.10/VC

# The $(VS6_DIR) directory is a copy of the "Microsoft Visual Studio" directory.
#
# To get a working setup on Linux or other "portable" copies of VS,
# the following DLLs have to be copied to the
# $(VS6_DIR)/VC98/Bin directory.
#
#     - $(VS6_DIR)/Common/MSDev98/Bin/MSPDB60.DLL
#
# And to the $(VC5_DIR)/bin directory.
#
#     - $(VC5_DIR)/SharedIDE/bin/MSDIS100.DLL
#     - $(VC5_DIR)/SharedIDE/bin/MSPDB50.DLL
VS6_DIR ?= $(HOME)/VS6

VC6_DIR     = $(VS6_DIR)/VC98

VC6_BIN_DIR = $(VC6_DIR)/Bin
VC6_INC_DIR = $(VC6_DIR)/Include
VC6_LIB_DIR = $(VC6_DIR)/Lib

VC5_LIB_DIR = $(VC5_DIR)/lib

IDE_DIR ?= $(VS6_DIR)/Common/MSDev98
IDE_BIN_DIR = $(IDE_DIR)/bin
ifeq ($(OS),Windows_NT)
	CL = $(VC6_BIN_DIR)/CL.EXE
	RC = $(IDE_BIN_DIR)/RC.EXE
	VC5_LINK = $(VC5_DIR)/bin/link.exe
	VC6_LINK = $(VC6_BIN_DIR)/link.exe
else
	CL = wine $(VC6_BIN_DIR)/CL.EXE
	RC = wine $(IDE_BIN_DIR)/RC.EXE
	VC5_LINK = wine $(VC5_DIR)/bin/link.exe
	VC6_LINK = wine $(VC6_BIN_DIR)/link.exe
endif

CFLAGS=/nologo /c /GX /W3 /O1 /I $(VC6_INC_DIR) /FD /MT /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /Gm /Zi
LINKFLAGS=/nologo /subsystem:windows /machine:I386 /incremental:no

VC_LINK=$(VC5_LINK)
LINKFLAGS+= /LIBPATH:$(VC5_LIB_DIR)

all: pkware.lib

PKWARE_SRC=$(sort $(wildcard *.cpp))
PKWARE_OBJS=$(PKWARE_SRC:.cpp=.obj)

pkware.lib: $(PKWARE_OBJS)
	$(VC_LINK) -lib /OUT:$@ $^ /nologo

%.obj: %.cpp
	$(CL) $(CFLAGS) /Fo$@ $<

clean:
	@$(RM) -v $(PKWARE_OBJS) pkware.lib vc60.{idb,pch,pdb}

.PHONY: clean all


================================================
FILE: 3rdParty/PKWare/PKWare.vcxproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="explode.cpp" />
    <ClCompile Include="implode.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="pkware.h" />
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <VCProjectVersion>15.0</VCProjectVersion>
    <ProjectGuid>{C7F9F3B4-2F7C-4672-9586-94D8BA0950B6}</ProjectGuid>
    <Keyword>Win32Proj</Keyword>
    <RootNamespace>PKWare</RootNamespace>
    <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v141</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v141</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
    <OutDir>.\WinDebug\</OutDir>
    <IntDir>.\WinDebug\</IntDir>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LinkIncremental>false</LinkIncremental>
    <OutDir>.\WinRel</OutDir>
    <IntDir>.\WinRel</IntDir>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>

================================================
FILE: 3rdParty/PKWare/PKWare.vcxproj.filters
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Filter Include="Source Files">
      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
    </Filter>
    <Filter Include="Header Files">
      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
      <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
    </Filter>
    <Filter Include="Resource Files">
      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
    </Filter>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="explode.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="implode.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="pkware.h">
      <Filter>Header Files</Filter>
    </ClInclude>
  </ItemGroup>
</Project>

================================================
FILE: 3rdParty/PKWare/Pkware.dsp
================================================
# Microsoft Developer Studio Project File - Name="Pkware" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Static Library" 0x0104

CFG=Pkware - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Pkware.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Pkware.mak" CFG="Pkware - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Pkware - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "Pkware - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe

!IF  "$(CFG)" == "Pkware - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "WinRel"
# PROP BASE Intermediate_Dir "WinRel"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "WinRel"
# PROP Intermediate_Dir "WinRel"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo

!ELSEIF  "$(CFG)" == "Pkware - Win32 Debug"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "WinDebug"
# PROP BASE Intermediate_Dir "WinDebug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "WinDebug"
# PROP Intermediate_Dir "WinDebug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo

!ENDIF

# Begin Target

# Name "Pkware - Win32 Release"
# Name "Pkware - Win32 Debug"
# Begin Group "Source Files"

# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File

SOURCE=.\explode.cpp
# End Source File
# Begin Source File

SOURCE=.\implode.cpp
# End Source File
# End Group
# Begin Group "Header Files"

# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# End Target
# End Project


================================================
FILE: 3rdParty/PKWare/explode.cpp
================================================
/*****************************************************************************/
/* explode.cpp                            Copyright (c) Ladislav Zezula 2003 */
/*---------------------------------------------------------------------------*/
/* Implode function of PKWARE Data Compression library                       */
/*---------------------------------------------------------------------------*/
/*   Date    Ver   Who  Comment                                              */
/* --------  ----  ---  -------                                              */
/* 11.03.03  1.00  Lad  Splitted from Pkware.cpp                             */
/* 08.04.03  1.01  Lad  Renamed to explode.cpp to be compatible with pkware  */
/* 02.05.03  1.01  Lad  Stress test done                                     */
/* 22.04.10  1.01  Lad  Documented                                           */
/*****************************************************************************/

#include <assert.h>
#include <string.h>

#include "pkware.h"

#define PKDCL_OK                    0       
#define PKDCL_STREAM_END            1   // All data from the input stream is read
#define PKDCL_NEED_DICT             2   // Need more data (dictionary)
#define PKDCL_CONTINUE             10   // Internal flag, not returned to user
#define PKDCL_GET_INPUT            11   // Internal flag, not returned to user

static char CopyrightPkware[] = "PKWARE Data Compression Library for Win32\r\n"
                                "Copyright 1989-1995 PKWARE Inc.  All Rights Reserved\r\n"
                                "Patent No. 5,051,745\r\n"
                                "PKWARE Data Compression Library Reg. U.S. Pat. and Tm. Off.\r\n"
                                "Version 1.11\r\n";

//-----------------------------------------------------------------------------
// Tables

static unsigned char DistBits[] = 
{
    0x02, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
    0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
    0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
    0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08
};

static unsigned char DistCode[] = 
{
    0x03, 0x0D, 0x05, 0x19, 0x09, 0x11, 0x01, 0x3E, 0x1E, 0x2E, 0x0E, 0x36, 0x16, 0x26, 0x06, 0x3A,
    0x1A, 0x2A, 0x0A, 0x32, 0x12, 0x22, 0x42, 0x02, 0x7C, 0x3C, 0x5C, 0x1C, 0x6C, 0x2C, 0x4C, 0x0C,
    0x74, 0x34, 0x54, 0x14, 0x64, 0x24, 0x44, 0x04, 0x78, 0x38, 0x58, 0x18, 0x68, 0x28, 0x48, 0x08,
    0xF0, 0x70, 0xB0, 0x30, 0xD0, 0x50, 0x90, 0x10, 0xE0, 0x60, 0xA0, 0x20, 0xC0, 0x40, 0x80, 0x00
};

static unsigned char ExLenBits[] =
{
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
};

static unsigned short LenBase[] =
{
    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
    0x0008, 0x000A, 0x000E, 0x0016, 0x0026, 0x0046, 0x0086, 0x0106
};

static unsigned char LenBits[] =
{
    0x03, 0x02, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x07, 0x07
};

static unsigned char LenCode[] =
{
    0x05, 0x03, 0x01, 0x06, 0x0A, 0x02, 0x0C, 0x14, 0x04, 0x18, 0x08, 0x30, 0x10, 0x20, 0x40, 0x00
};

static unsigned char ChBitsAsc[] =
{
    0x0B, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x07, 0x0C, 0x0C, 0x07, 0x0C, 0x0C,
    0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0D, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
    0x04, 0x0A, 0x08, 0x0C, 0x0A, 0x0C, 0x0A, 0x08, 0x07, 0x07, 0x08, 0x09, 0x07, 0x06, 0x07, 0x08,
    0x07, 0x06, 0x07, 0x07, 0x07, 0x07, 0x08, 0x07, 0x07, 0x08, 0x08, 0x0C, 0x0B, 0x07, 0x09, 0x0B,
    0x0C, 0x06, 0x07, 0x06, 0x06, 0x05, 0x07, 0x08, 0x08, 0x06, 0x0B, 0x09, 0x06, 0x07, 0x06, 0x06,
    0x07, 0x0B, 0x06, 0x06, 0x06, 0x07, 0x09, 0x08, 0x09, 0x09, 0x0B, 0x08, 0x0B, 0x09, 0x0C, 0x08,
    0x0C, 0x05, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x0B, 0x07, 0x05, 0x06, 0x05, 0x05,
    0x06, 0x0A, 0x05, 0x05, 0x05, 0x05, 0x08, 0x07, 0x08, 0x08, 0x0A, 0x0B, 0x0B, 0x0C, 0x0C, 0x0C,
    0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D,
    0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D,
    0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D,
    0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
    0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
    0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
    0x0D, 0x0C, 0x0D, 0x0D, 0x0D, 0x0C, 0x0D, 0x0D, 0x0D, 0x0C, 0x0D, 0x0D, 0x0D, 0x0D, 0x0C, 0x0D,
    0x0D, 0x0D, 0x0C, 0x0C, 0x0C, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D
};

static unsigned short ChCodeAsc[] = 
{
    0x0490, 0x0FE0, 0x07E0, 0x0BE0, 0x03E0, 0x0DE0, 0x05E0, 0x09E0,
    0x01E0, 0x00B8, 0x0062, 0x0EE0, 0x06E0, 0x0022, 0x0AE0, 0x02E0,
    0x0CE0, 0x04E0, 0x08E0, 0x00E0, 0x0F60, 0x0760, 0x0B60, 0x0360,
    0x0D60, 0x0560, 0x1240, 0x0960, 0x0160, 0x0E60, 0x0660, 0x0A60,
    0x000F, 0x0250, 0x0038, 0x0260, 0x0050, 0x0C60, 0x0390, 0x00D8,
    0x0042, 0x0002, 0x0058, 0x01B0, 0x007C, 0x0029, 0x003C, 0x0098,
    0x005C, 0x0009, 0x001C, 0x006C, 0x002C, 0x004C, 0x0018, 0x000C,
    0x0074, 0x00E8, 0x0068, 0x0460, 0x0090, 0x0034, 0x00B0, 0x0710,
    0x0860, 0x0031, 0x0054, 0x0011, 0x0021, 0x0017, 0x0014, 0x00A8,
    0x0028, 0x0001, 0x0310, 0x0130, 0x003E, 0x0064, 0x001E, 0x002E,
    0x0024, 0x0510, 0x000E, 0x0036, 0x0016, 0x0044, 0x0030, 0x00C8,
    0x01D0, 0x00D0, 0x0110, 0x0048, 0x0610, 0x0150, 0x0060, 0x0088,
    0x0FA0, 0x0007, 0x0026, 0x0006, 0x003A, 0x001B, 0x001A, 0x002A,
    0x000A, 0x000B, 0x0210, 0x0004, 0x0013, 0x0032, 0x0003, 0x001D,
    0x0012, 0x0190, 0x000D, 0x0015, 0x0005, 0x0019, 0x0008, 0x0078,
    0x00F0, 0x0070, 0x0290, 0x0410, 0x0010, 0x07A0, 0x0BA0, 0x03A0,
    0x0240, 0x1C40, 0x0C40, 0x1440, 0x0440, 0x1840, 0x0840, 0x1040,
    0x0040, 0x1F80, 0x0F80, 0x1780, 0x0780, 0x1B80, 0x0B80, 0x1380,
    0x0380, 0x1D80, 0x0D80, 0x1580, 0x0580, 0x1980, 0x0980, 0x1180,
    0x0180, 0x1E80, 0x0E80, 0x1680, 0x0680, 0x1A80, 0x0A80, 0x1280,
    0x0280, 0x1C80, 0x0C80, 0x1480, 0x0480, 0x1880, 0x0880, 0x1080,
    0x0080, 0x1F00, 0x0F00, 0x1700, 0x0700, 0x1B00, 0x0B00, 0x1300,
    0x0DA0, 0x05A0, 0x09A0, 0x01A0, 0x0EA0, 0x06A0, 0x0AA0, 0x02A0,
    0x0CA0, 0x04A0, 0x08A0, 0x00A0, 0x0F20, 0x0720, 0x0B20, 0x0320,
    0x0D20, 0x0520, 0x0920, 0x0120, 0x0E20, 0x0620, 0x0A20, 0x0220,
    0x0C20, 0x0420, 0x0820, 0x0020, 0x0FC0, 0x07C0, 0x0BC0, 0x03C0,
    0x0DC0, 0x05C0, 0x09C0, 0x01C0, 0x0EC0, 0x06C0, 0x0AC0, 0x02C0,
    0x0CC0, 0x04C0, 0x08C0, 0x00C0, 0x0F40, 0x0740, 0x0B40, 0x0340,
    0x0300, 0x0D40, 0x1D00, 0x0D00, 0x1500, 0x0540, 0x0500, 0x1900,
    0x0900, 0x0940, 0x1100, 0x0100, 0x1E00, 0x0E00, 0x0140, 0x1600,
    0x0600, 0x1A00, 0x0E40, 0x0640, 0x0A40, 0x0A00, 0x1200, 0x0200,
    0x1C00, 0x0C00, 0x1400, 0x0400, 0x1800, 0x0800, 0x1000, 0x0000  
};

//-----------------------------------------------------------------------------
// Local functions

static void PKWAREAPI GenDecodeTabs(
    unsigned char * positions,          // [out] Table of positions
    unsigned char * start_indexes,      // [in] Table of start indexes
    unsigned char * length_bits,        // [in] Table of lengths. Each length is stored as number of bits
    size_t elements)                    // [in] Number of elements in start_indexes and length_bits
{
    unsigned int index;
    unsigned int length;
    size_t i;

    for(i = 0; i < elements; i++)
    {
        length = 1 << length_bits[i];   // Get the length in bytes

        for(index = start_indexes[i]; index < 0x100; index += length)
        {
            positions[index] = (unsigned char)i;
        }
    }
}

static void PKWAREAPI GenAscTabs(TDcmpStruct * pWork)
{
    unsigned short * pChCodeAsc = &ChCodeAsc[0xFF];
    unsigned int  acc, add;
    unsigned short count;

    for(count = 0x00FF; pChCodeAsc >= ChCodeAsc; pChCodeAsc--, count--)
    {
        unsigned char * pChBitsAsc = pWork->ChBitsAsc + count;
        unsigned char bits_asc = *pChBitsAsc;

        if(bits_asc <= 8)
        {
            add = (1 << bits_asc);
            acc = *pChCodeAsc;

            do
            {
                pWork->offs2C34[acc] = (unsigned char)count;
                acc += add;
            }
            while(acc < 0x100);
        }
        else if((acc = (*pChCodeAsc & 0xFF)) != 0)
        {
            pWork->offs2C34[acc] = 0xFF;

            if(*pChCodeAsc & 0x3F)
            {
                bits_asc -= 4;
                *pChBitsAsc = bits_asc;

                add = (1 << bits_asc);
                acc = *pChCodeAsc >> 4;
                do
                {
                    pWork->offs2D34[acc] = (unsigned char)count;
                    acc += add;
                }
                while(acc < 0x100);
            }
            else
            {
                bits_asc -= 6;
                *pChBitsAsc = bits_asc;

                add = (1 << bits_asc);
                acc = *pChCodeAsc >> 6;
                do
                {
                    pWork->offs2E34[acc] = (unsigned char)count;
                    acc += add;
                }
                while(acc < 0x80);
            }
        }
        else
        {
            bits_asc -= 8;
            *pChBitsAsc = bits_asc;

            add = (1 << bits_asc);
            acc = *pChCodeAsc >> 8;
            do
            {
                pWork->offs2EB4[acc] = (unsigned char)count;
                acc += add;
            }
            while(acc < 0x100);
        }
    }
}

//-----------------------------------------------------------------------------
// Removes given number of bits in the bit buffer. New bits are reloaded from
// the input buffer, if needed.
// Returns: PKDCL_OK:         Operation was successful
//          PKDCL_STREAM_END: There are no more bits in the input buffer

static int PKWAREAPI WasteBits(TDcmpStruct * pWork, unsigned int nBits)
{
    // If number of bits required is less than number of (bits in the buffer) ?
    if(nBits <= pWork->extra_bits)
    {
        pWork->extra_bits -= nBits;
        pWork->bit_buff  >>= nBits;
        return PKDCL_OK;
    }

    // Load input buffer if necessary
    pWork->bit_buff >>= pWork->extra_bits;
    if(pWork->in_pos == pWork->in_bytes)
    {
        pWork->in_pos = sizeof(pWork->in_buff);
        if((pWork->in_bytes = pWork->read_buf((char *)pWork->in_buff, &pWork->in_pos, pWork->param)) == 0)
            return PKDCL_STREAM_END;
        pWork->in_pos = 0;
    }

    // Update bit buffer
    pWork->bit_buff  |= (pWork->in_buff[pWork->in_pos++] << 8);
    pWork->bit_buff >>= (nBits - pWork->extra_bits);
    pWork->extra_bits = (pWork->extra_bits - nBits) + 8;
    return PKDCL_OK;
}

//-----------------------------------------------------------------------------
// Decodes next literal from the input (compressed) data.
// Returns : 0x000: One byte 0x00
//           0x001: One byte 0x01
//           ...
//           0x0FF: One byte 0xFF
//           0x100: Repetition, length of 0x02 bytes
//           0x101: Repetition, length of 0x03 bytes
//           ...
//           0x304: Repetition, length of 0x206 bytes
//           0x305: End of stream
//           0x306: Error

static unsigned int PKWAREAPI DecodeLit(TDcmpStruct * pWork)
{
    unsigned int extra_length_bits;    // Number of bits of extra literal length
    unsigned int length_code;          // Length code
    unsigned int value;

    // Test the current bit in byte buffer. If is not set, simply return the next 8 bits.
    if(pWork->bit_buff & 1)
    {
        // Remove one bit from the input data
        if(WasteBits(pWork, 1))
            return 0x306;   
                      
        // The next 8 bits hold the index to the length code table
        length_code = pWork->LengthCodes[pWork->bit_buff & 0xFF];
        
        // Remove the apropriate number of bits
        if(WasteBits(pWork, pWork->LenBits[length_code]))
            return 0x306;

        // Are there some extra bits for the obtained length code ?
        if((extra_length_bits = pWork->ExLenBits[length_code]) != 0)
        {
            unsigned int extra_length = pWork->bit_buff & ((1 << extra_length_bits) - 1);

            if(WasteBits(pWork, extra_length_bits))
            {
                if((length_code + extra_length) != 0x10E)
                    return 0x306;
            }
            length_code = pWork->LenBase[length_code] + extra_length;
        }

        // In order to distinguish uncompressed byte from repetition length,
        // we have to add 0x100 to the length.
        return length_code + 0x100;
    }

    // Remove one bit from the input data
    if(WasteBits(pWork, 1))
        return 0x306;

    // If the binary compression type, read 8 bits and return them as one byte.
    if(pWork->ctype == CMP_BINARY)
    {
        unsigned int uncompressed_byte = pWork->bit_buff & 0xFF;

        if(WasteBits(pWork, 8))
            return 0x306;
        return uncompressed_byte;
    }

    // When ASCII compression ...
    if(pWork->bit_buff & 0xFF)
    {
        value = pWork->offs2C34[pWork->bit_buff & 0xFF];

        if(value == 0xFF)
        {
            if(pWork->bit_buff & 0x3F)
            {
                if(WasteBits(pWork, 4))
                    return 0x306;

                value = pWork->offs2D34[pWork->bit_buff & 0xFF];
            }
            else
            {
                if(WasteBits(pWork, 6))
                    return 0x306;

                value = pWork->offs2E34[pWork->bit_buff & 0x7F];
            }
        }
    }
    else
    {
        if(WasteBits(pWork, 8))
            return 0x306;

        value = pWork->offs2EB4[pWork->bit_buff & 0xFF];
    }

    return WasteBits(pWork, pWork->ChBitsAsc[value]) ? 0x306 : value;
}

//-----------------------------------------------------------------------------
// Decodes the distance of the repetition, backwards relative to the
// current output buffer position

static unsigned int PKWAREAPI DecodeDist(TDcmpStruct * pWork, unsigned int rep_length)
{
    unsigned int dist_pos_code;            // Distance position code
    unsigned int dist_pos_bits;            // Number of bits of distance position
    unsigned int distance;                 // Distance position

    // Next 2-8 bits in the input buffer is the distance position code
    dist_pos_code = pWork->DistPosCodes[pWork->bit_buff & 0xFF];
    dist_pos_bits = pWork->DistBits[dist_pos_code];
    if(WasteBits(pWork, dist_pos_bits))
        return 0;

    if(rep_length == 2)
    {
        // If the repetition is only 2 bytes length,
        // then take 2 bits from the stream in order to get the distance
        distance = (dist_pos_code << 2) | (pWork->bit_buff & 0x03);
        if(WasteBits(pWork, 2))
            return 0;
    }
    else
    {
        // If the repetition is more than 2 bytes length,
        // then take "dsize_bits" bits in order to get the distance
        distance = (dist_pos_code << pWork->dsize_bits) | (pWork->bit_buff & pWork->dsize_mask);
        if(WasteBits(pWork, pWork->dsize_bits))
            return 0;
    }
    return distance + 1;
}

static unsigned int PKWAREAPI Expand(TDcmpStruct * pWork)
{
    unsigned int next_literal;         // Literal decoded from the compressed data
    unsigned int result;               // Value to be returned
    unsigned int copyBytes;             // Number of bytes to copy to the output buffer

    pWork->outputPos = 0x1000;          // Initialize output buffer position

    // Decode the next literal from the input data.
    // The returned literal can either be an uncompressed byte (next_literal < 0x100)
    // or an encoded length of the repeating byte sequence that
    // is to be copied to the current buffer position
    while((result = next_literal = DecodeLit(pWork)) < 0x305)
    {
        // If the literal is greater than 0x100, it holds length
        // of repeating byte sequence
        // literal of 0x100 means repeating sequence of 0x2 bytes
        // literal of 0x101 means repeating sequence of 0x3 bytes
        // ...
        // literal of 0x305 means repeating sequence of 0x207 bytes
        if(next_literal >= 0x100)
        {
            unsigned char * source;
            unsigned char * target;
            unsigned int rep_length;       // Length of the repetition, in bytes
            unsigned int minus_dist;       // Backward distance to the repetition, relative to the current buffer position

            // Get the length of the repeating sequence.
            // Note that the repeating block may overlap the current output position,
            // for example if there was a sequence of equal bytes
            rep_length = next_literal - 0xFE;

            // Get backward distance to the repetition
            if((minus_dist = DecodeDist(pWork, rep_length)) == 0)
            {
                result = 0x306;
                break;
            }

            // Target and source pointer
            target = &pWork->out_buff[pWork->outputPos];
            source = target - minus_dist;

            // Update buffer output position
            pWork->outputPos += rep_length;

            // Copy the repeating sequence
            while(rep_length-- > 0)
                *target++ = *source++;
        }
        else
        {
            pWork->out_buff[pWork->outputPos++] = (unsigned char)next_literal;
        }
    
        // Flush the output buffer, if number of extracted bytes has reached the end
        if(pWork->outputPos >= 0x2000)
        {
            // Copy decompressed data into user buffer
            copyBytes = 0x1000;
            pWork->write_buf((char *)&pWork->out_buff[0x1000], &copyBytes, pWork->param);

            // Now copy the decompressed data to the first half of the buffer.
            // This is needed because the decompression might reuse them as repetitions.
            // Note that if the output buffer overflowed previously, the extra decompressed bytes
            // are stored in "out_buff_overflow", and they will now be
            // within decompressed part of the output buffer.
            memmove(pWork->out_buff, &pWork->out_buff[0x1000], pWork->outputPos - 0x1000);
            pWork->outputPos -= 0x1000;
        }
    }

    // Flush any remaining decompressed bytes
    copyBytes = pWork->outputPos - 0x1000;
    pWork->write_buf((char *)&pWork->out_buff[0x1000], &copyBytes, pWork->param);
    return result;
}


//-----------------------------------------------------------------------------
// Main exploding function.

unsigned int PKWAREAPI explode(
        unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned  int *size, void *param),
        void         (PKWAREAPI *write_buf)(char *buf, unsigned  int *size, void *param),
        char         *work_buf,
        void         *param)
{
    TDcmpStruct * pWork = (TDcmpStruct *)work_buf;

    // Initialize work struct and load compressed data
    // Note: The caller must zero the "work_buff" before passing it to explode
    pWork->read_buf   = read_buf;
    pWork->write_buf  = write_buf;
    pWork->param      = param;
    pWork->in_pos     = sizeof(pWork->in_buff);
    pWork->in_bytes   = pWork->read_buf((char *)pWork->in_buff, &pWork->in_pos, pWork->param);
    if(pWork->in_bytes <= 4)
        return CMP_BAD_DATA;

    pWork->ctype      = pWork->in_buff[0]; // Get the compression type (CMP_BINARY or CMP_ASCII)
    pWork->dsize_bits = pWork->in_buff[1]; // Get the dictionary size
    pWork->bit_buff   = pWork->in_buff[2]; // Initialize 16-bit bit buffer
    pWork->extra_bits = 0;                 // Extra (over 8) bits
    pWork->in_pos     = 3;                 // Position in input buffer

    // Test for the valid dictionary size
    if(4 > pWork->dsize_bits || pWork->dsize_bits > 6) 
        return CMP_INVALID_DICTSIZE;

    pWork->dsize_mask = 0xFFFF >> (0x10 - pWork->dsize_bits); // Shifted by 'sar' instruction

    if(pWork->ctype != CMP_BINARY)
    {
        if(pWork->ctype != CMP_ASCII)
            return CMP_INVALID_MODE;

        memcpy(pWork->ChBitsAsc, ChBitsAsc, sizeof(pWork->ChBitsAsc));
        GenAscTabs(pWork);
    }

    memcpy(pWork->LenBits, LenBits, sizeof(pWork->LenBits));
    GenDecodeTabs(pWork->LengthCodes, LenCode, pWork->LenBits, sizeof(pWork->LenBits));
    memcpy(pWork->ExLenBits, ExLenBits, sizeof(pWork->ExLenBits));
    memcpy(pWork->LenBase, LenBase, sizeof(pWork->LenBase));
    memcpy(pWork->DistBits, DistBits, sizeof(pWork->DistBits));
    GenDecodeTabs(pWork->DistPosCodes, DistCode, pWork->DistBits, sizeof(pWork->DistBits));
    if(Expand(pWork) != 0x306)
        return CMP_NO_ERROR;
        
    return CMP_ABORT;
}


================================================
FILE: 3rdParty/PKWare/implode.cpp
================================================
/*****************************************************************************/
/* implode.cpp                            Copyright (c) Ladislav Zezula 2003 */
/*---------------------------------------------------------------------------*/
/* Implode function of PKWARE Data Compression library                       */
/*---------------------------------------------------------------------------*/
/*   Date    Ver   Who  Comment                                              */
/* --------  ----  ---  -------                                              */
/* 11.04.03  1.00  Lad  First version of implode.cpp                         */
/* 02.05.03  1.00  Lad  Stress test done                                     */
/* 22.04.10  1.01  Lad  Documented                                           */
/*****************************************************************************/

#include <assert.h>
#include <string.h>

#include "pkware.h"

#if ((1200 < _MSC_VER) && (_MSC_VER < 1400))
#pragma optimize("", off)
#endif

//-----------------------------------------------------------------------------
// Defines

#define MAX_REP_LENGTH 0x204            // The longest allowed repetition

static char CopyrightPkware[] = "PKWARE Data Compression Library for Win32\r\n"
                                "Copyright 1989-1995 PKWARE Inc.  All Rights Reserved\r\n"
                                "Patent No. 5,051,745\r\n"
                                "PKWARE Data Compression Library Reg. U.S. Pat. and Tm. Off.\r\n"
                                "Version 1.11\r\n";

//-----------------------------------------------------------------------------
// Tables

static unsigned char DistBits[] = 
{
    0x02, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
    0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
    0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
    0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08
};

static unsigned char DistCode[] = 
{
    0x03, 0x0D, 0x05, 0x19, 0x09, 0x11, 0x01, 0x3E, 0x1E, 0x2E, 0x0E, 0x36, 0x16, 0x26, 0x06, 0x3A,
    0x1A, 0x2A, 0x0A, 0x32, 0x12, 0x22, 0x42, 0x02, 0x7C, 0x3C, 0x5C, 0x1C, 0x6C, 0x2C, 0x4C, 0x0C,
    0x74, 0x34, 0x54, 0x14, 0x64, 0x24, 0x44, 0x04, 0x78, 0x38, 0x58, 0x18, 0x68, 0x28, 0x48, 0x08,
    0xF0, 0x70, 0xB0, 0x30, 0xD0, 0x50, 0x90, 0x10, 0xE0, 0x60, 0xA0, 0x20, 0xC0, 0x40, 0x80, 0x00
};

static unsigned char ExLenBits[] =
{
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
};

static unsigned char LenBits[] =
{
    0x03, 0x02, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x07, 0x07
};

static unsigned char LenCode[] =
{
    0x05, 0x03, 0x01, 0x06, 0x0A, 0x02, 0x0C, 0x14, 0x04, 0x18, 0x08, 0x30, 0x10, 0x20, 0x40, 0x00
};

static unsigned char ChBitsAsc[] =
{
    0x0B, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x07, 0x0C, 0x0C, 0x07, 0x0C, 0x0C,
    0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0D, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
    0x04, 0x0A, 0x08, 0x0C, 0x0A, 0x0C, 0x0A, 0x08, 0x07, 0x07, 0x08, 0x09, 0x07, 0x06, 0x07, 0x08,
    0x07, 0x06, 0x07, 0x07, 0x07, 0x07, 0x08, 0x07, 0x07, 0x08, 0x08, 0x0C, 0x0B, 0x07, 0x09, 0x0B,
    0x0C, 0x06, 0x07, 0x06, 0x06, 0x05, 0x07, 0x08, 0x08, 0x06, 0x0B, 0x09, 0x06, 0x07, 0x06, 0x06,
    0x07, 0x0B, 0x06, 0x06, 0x06, 0x07, 0x09, 0x08, 0x09, 0x09, 0x0B, 0x08, 0x0B, 0x09, 0x0C, 0x08,
    0x0C, 0x05, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x0B, 0x07, 0x05, 0x06, 0x05, 0x05,
    0x06, 0x0A, 0x05, 0x05, 0x05, 0x05, 0x08, 0x07, 0x08, 0x08, 0x0A, 0x0B, 0x0B, 0x0C, 0x0C, 0x0C,
    0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D,
    0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D,
    0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D,
    0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
    0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
    0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
    0x0D, 0x0C, 0x0D, 0x0D, 0x0D, 0x0C, 0x0D, 0x0D, 0x0D, 0x0C, 0x0D, 0x0D, 0x0D, 0x0D, 0x0C, 0x0D,
    0x0D, 0x0D, 0x0C, 0x0C, 0x0C, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D, 0x0D
};

static unsigned short ChCodeAsc[] = 
{
    0x0490, 0x0FE0, 0x07E0, 0x0BE0, 0x03E0, 0x0DE0, 0x05E0, 0x09E0,
    0x01E0, 0x00B8, 0x0062, 0x0EE0, 0x06E0, 0x0022, 0x0AE0, 0x02E0,
    0x0CE0, 0x04E0, 0x08E0, 0x00E0, 0x0F60, 0x0760, 0x0B60, 0x0360,
    0x0D60, 0x0560, 0x1240, 0x0960, 0x0160, 0x0E60, 0x0660, 0x0A60,
    0x000F, 0x0250, 0x0038, 0x0260, 0x0050, 0x0C60, 0x0390, 0x00D8,
    0x0042, 0x0002, 0x0058, 0x01B0, 0x007C, 0x0029, 0x003C, 0x0098,
    0x005C, 0x0009, 0x001C, 0x006C, 0x002C, 0x004C, 0x0018, 0x000C,
    0x0074, 0x00E8, 0x0068, 0x0460, 0x0090, 0x0034, 0x00B0, 0x0710,
    0x0860, 0x0031, 0x0054, 0x0011, 0x0021, 0x0017, 0x0014, 0x00A8,
    0x0028, 0x0001, 0x0310, 0x0130, 0x003E, 0x0064, 0x001E, 0x002E,
    0x0024, 0x0510, 0x000E, 0x0036, 0x0016, 0x0044, 0x0030, 0x00C8,
    0x01D0, 0x00D0, 0x0110, 0x0048, 0x0610, 0x0150, 0x0060, 0x0088,
    0x0FA0, 0x0007, 0x0026, 0x0006, 0x003A, 0x001B, 0x001A, 0x002A,
    0x000A, 0x000B, 0x0210, 0x0004, 0x0013, 0x0032, 0x0003, 0x001D,
    0x0012, 0x0190, 0x000D, 0x0015, 0x0005, 0x0019, 0x0008, 0x0078,
    0x00F0, 0x0070, 0x0290, 0x0410, 0x0010, 0x07A0, 0x0BA0, 0x03A0,
    0x0240, 0x1C40, 0x0C40, 0x1440, 0x0440, 0x1840, 0x0840, 0x1040,
    0x0040, 0x1F80, 0x0F80, 0x1780, 0x0780, 0x1B80, 0x0B80, 0x1380,
    0x0380, 0x1D80, 0x0D80, 0x1580, 0x0580, 0x1980, 0x0980, 0x1180,
    0x0180, 0x1E80, 0x0E80, 0x1680, 0x0680, 0x1A80, 0x0A80, 0x1280,
    0x0280, 0x1C80, 0x0C80, 0x1480, 0x0480, 0x1880, 0x0880, 0x1080,
    0x0080, 0x1F00, 0x0F00, 0x1700, 0x0700, 0x1B00, 0x0B00, 0x1300,
    0x0DA0, 0x05A0, 0x09A0, 0x01A0, 0x0EA0, 0x06A0, 0x0AA0, 0x02A0,
    0x0CA0, 0x04A0, 0x08A0, 0x00A0, 0x0F20, 0x0720, 0x0B20, 0x0320,
    0x0D20, 0x0520, 0x0920, 0x0120, 0x0E20, 0x0620, 0x0A20, 0x0220,
    0x0C20, 0x0420, 0x0820, 0x0020, 0x0FC0, 0x07C0, 0x0BC0, 0x03C0,
    0x0DC0, 0x05C0, 0x09C0, 0x01C0, 0x0EC0, 0x06C0, 0x0AC0, 0x02C0,
    0x0CC0, 0x04C0, 0x08C0, 0x00C0, 0x0F40, 0x0740, 0x0B40, 0x0340,
    0x0300, 0x0D40, 0x1D00, 0x0D00, 0x1500, 0x0540, 0x0500, 0x1900,
    0x0900, 0x0940, 0x1100, 0x0100, 0x1E00, 0x0E00, 0x0140, 0x1600,
    0x0600, 0x1A00, 0x0E40, 0x0640, 0x0A40, 0x0A00, 0x1200, 0x0200,
    0x1C00, 0x0C00, 0x1400, 0x0400, 0x1800, 0x0800, 0x1000, 0x0000  
};

//-----------------------------------------------------------------------------
// Macros

// Macro for calculating hash of the current byte pair.
// Note that most exact byte pair hash would be buffer[0] + buffer[1] << 0x08,
// but even this way gives nice indication of equal byte pairs, with significantly
// smaller size of the array that holds numbers of those hashes
#define BYTE_PAIR_HASH(buffer)   ((buffer[0] * 4) + (buffer[1] * 5))

//-----------------------------------------------------------------------------
// Local functions

// Builds the "hash_to_index" table and "pair_hash_offsets" table.
// Every element of "hash_to_index" will contain lowest index to the
// "pair_hash_offsets" table, effectively giving offset of the first
// occurence of the given PAIR_HASH in the input data.
static void PKWAREAPI SortBuffer(TCmpStruct * pWork, unsigned char * buffer_begin, unsigned char * buffer_end)
{
    unsigned short * phash_to_index;
    unsigned char  * buffer_ptr;
    unsigned short total_sum = 0;
    unsigned long byte_pair_hash;           // Hash value of the byte pair
    unsigned short byte_pair_offs;          // Offset of the byte pair, relative to "work_buff"

    // Zero the entire "phash_to_index" table
    memset(pWork->phash_to_index, 0, sizeof(pWork->phash_to_index));
    
    // Step 1: Count amount of each PAIR_HASH in the input buffer
    // The table will look like this:
    //  offs 0x000: Number of occurences of PAIR_HASH 0
    //  offs 0x001: Number of occurences of PAIR_HASH 1
    //  ...
    //  offs 0x8F7: Number of occurences of PAIR_HASH 0x8F7 (the highest hash value)
    for(buffer_ptr = buffer_begin; buffer_ptr < buffer_end; buffer_ptr++)
        pWork->phash_to_index[BYTE_PAIR_HASH(buffer_ptr)]++;

    // Step 2: Convert the table to the array of PAIR_HASH amounts. 
    // Each element contains count of PAIR_HASHes that is less or equal
    // to element index
    // The table will look like this:
    //  offs 0x000: Number of occurences of PAIR_HASH 0 or lower
    //  offs 0x001: Number of occurences of PAIR_HASH 1 or lower
    //  ...
    //  offs 0x8F7: Number of occurences of PAIR_HASH 0x8F7 or lower
    for(phash_to_index = pWork->phash_to_index; phash_to_index < &pWork->phash_to_index_end; phash_to_index++)
    {
        total_sum = total_sum + phash_to_index[0];
        phash_to_index[0] = total_sum;
    }

    // Step 3: Convert the table to the array of indexes.
    // Now, each element contains index to the first occurence of given PAIR_HASH
    for(buffer_end--; buffer_end >= buffer_begin; buffer_end--)
    {
        byte_pair_hash = BYTE_PAIR_HASH(buffer_end);
        byte_pair_offs = (unsigned short)(buffer_end - pWork->work_buff);

        pWork->phash_to_index[byte_pair_hash]--;
        pWork->phash_offs[pWork->phash_to_index[byte_pair_hash]] = byte_pair_offs;
    }
}

static void PKWAREAPI FlushBuf(TCmpStruct * pWork)
{
    unsigned char save_ch1;
    unsigned char save_ch2;
    unsigned int size = 0x800;

    pWork->write_buf(pWork->out_buff, &size, pWork->param);

    save_ch1 = pWork->out_buff[0x800];
    save_ch2 = pWork->out_buff[pWork->out_bytes];
    pWork->out_bytes -= 0x800;

    memset(pWork->out_buff, 0, sizeof(pWork->out_buff));

    if(pWork->out_bytes != 0)
        pWork->out_buff[0] = save_ch1;
    if(pWork->out_bits != 0)
        pWork->out_buff[pWork->out_bytes] = save_ch2;
}

static void PKWAREAPI OutputBits(TCmpStruct * pWork, unsigned int nbits, unsigned long bit_buff)
{
    unsigned int out_bits;

    // If more than 8 bits to output, do recursion
    if(nbits > 8)
    {
        OutputBits(pWork, 8, bit_buff);
        bit_buff >>= 8;
        nbits -= 8;
    }

    // Add bits to the last out byte in out_buff;
    out_bits = pWork->out_bits;
    pWork->out_buff[pWork->out_bytes] |= (unsigned char)(bit_buff << out_bits);
    pWork->out_bits += nbits;

    // If 8 or more bits, increment number of bytes
    if(pWork->out_bits > 8)
    {
        pWork->out_bytes++;
        bit_buff >>= (8 - out_bits);
        
        pWork->out_buff[pWork->out_bytes] = (unsigned char)bit_buff;
        pWork->out_bits &= 7;
    }
    else
    {
        pWork->out_bits &= 7;
        if(pWork->out_bits == 0)
            pWork->out_bytes++;
    }

    // If there is enough compressed bytes, flush them
    if(pWork->out_bytes >= 0x800)
        FlushBuf(pWork);
}

// This function searches for a repetition
// (a previous occurence of the current byte sequence)
// Returns length of the repetition, and stores the backward distance 
// to pWork structure.
static unsigned int PKWAREAPI FindRep(TCmpStruct * pWork, unsigned char * input_data)
{
    unsigned short * phash_to_index;            // Pointer into pWork->phash_to_index table
    unsigned short * phash_offs;                // Pointer to the table containing offsets of each PAIR_HASH
    unsigned char * repetition_limit;           // An eventual repetition must be at position below this pointer
    unsigned char * prev_repetition;            // Pointer to the previous occurence of the current PAIR_HASH
    unsigned char * prev_rep_end;               // End of the previous repetition
    unsigned char * input_data_ptr;
    unsigned short phash_offs_index;            // Index to the table with PAIR_HASH positions
    unsigned short min_phash_offs;              // The lowest allowed hash offset
    unsigned short offs_in_rep;                 // Offset within found repetition
    unsigned int equal_byte_count;              // Number of bytes that are equal to the previous occurence
    unsigned int rep_length = 1;                // Length of the found repetition
    unsigned int rep_length2;                   // Secondary repetition
    unsigned char pre_last_byte;                // Last but one byte from a repetion
    unsigned short di_val;

    // Calculate the previous position of the PAIR_HASH
    phash_to_index   = pWork->phash_to_index + BYTE_PAIR_HASH(input_data);
    min_phash_offs   = (unsigned short)((input_data - pWork->work_buff) - pWork->dsize_bytes + 1);
    phash_offs_index = phash_to_index[0];

    // If the PAIR_HASH offset is below the limit, find a next one
    phash_offs = pWork->phash_offs + phash_offs_index;
    if(*phash_offs < min_phash_offs)
    {
        while(*phash_offs < min_phash_offs)
        {
            phash_offs_index++;
            phash_offs++;
        }
        *phash_to_index = phash_offs_index;
    }

    // Get the first location of the PAIR_HASH,
    // and thus the first eventual location of byte repetition
    phash_offs = pWork->phash_offs + phash_offs_index;
    prev_repetition = pWork->work_buff + phash_offs[0];
    repetition_limit = input_data - 1;
    
    // If the current PAIR_HASH was not encountered before,
    // we haven't found a repetition.
    if(prev_repetition >= repetition_limit)
        return 0;

    // We have found a match of a PAIR_HASH. Now we have to make sure
    // that it is also a byte match, because PAIR_HASH is not unique.
    // We compare the bytes and count the length of the repetition
    input_data_ptr = input_data;
    for(;;)
    {
        // If the first byte of the repetition and the so-far-last byte
        // of the repetition are equal, we will compare the blocks.
        if(*input_data_ptr == *prev_repetition && input_data_ptr[rep_length-1] == prev_repetition[rep_length-1])
        {
            // Skip the current byte
            prev_repetition++;
            input_data_ptr++;
            equal_byte_count = 2;

            // Now count how many more bytes are equal
            while(equal_byte_count < MAX_REP_LENGTH)
            {
                prev_repetition++;
                input_data_ptr++;
                
                // Are the bytes different ?
                if(*prev_repetition != *input_data_ptr)
                    break;

                equal_byte_count++;
            }

            // If we found a repetition of at least the same length, take it.
            // If there are multiple repetitions in the input buffer, this will
            // make sure that we find the most recent one, which in turn allows
            // us to store backward length in less amount of bits
            input_data_ptr = input_data;
            if(equal_byte_count >= rep_length)
            {
                // Calculate the backward distance of the repetition.
                // Note that the distance is stored as decremented by 1
                pWork->distance = (unsigned int)(input_data - prev_repetition + equal_byte_count - 1);

                // Repetitions longer than 10 bytes will be stored in more bits,
                // so they need a bit different handling
                if((rep_length = equal_byte_count) > 10)
                    break;
            }
        }

        // Move forward in the table of PAIR_HASH repetitions.
        // There might be a more recent occurence of the same repetition.
        phash_offs_index++;
        phash_offs++;
        prev_repetition = pWork->work_buff + phash_offs[0];

        // If the next repetition is beyond the minimum allowed repetition, we are done.
        if(prev_repetition >= repetition_limit)
        {
            // A repetition must have at least 2 bytes, otherwise it's not worth it
            return (rep_length >= 2) ? rep_length : 0;
        }
    }

    // If the repetition has max length of 0x204 bytes, we can't go any fuhrter
    if(equal_byte_count == MAX_REP_LENGTH)
    {
        pWork->distance--;
        return equal_byte_count;
    }

    // Check for possibility of a repetition that occurs at more recent position
    phash_offs = pWork->phash_offs + phash_offs_index;
    if(pWork->work_buff + phash_offs[1] >= repetition_limit)
        return rep_length;

    //
    // The following part checks if there isn't a longer repetition at
    // a latter offset, that would lead to better compression.
    //
    // Example of data that can trigger this optimization:
    //
    //   "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEQQQQQQQQQQQQ"
    //   "XYZ"
    //   "EEEEEEEEEEEEEEEEQQQQQQQQQQQQ";
    //
    // Description of data in this buffer
    //   [0x00] Single byte "E"
    //   [0x01] Single byte "E"
    //   [0x02] Repeat 0x1E bytes from [0x00]
    //   [0x20] Single byte "X"
    //   [0x21] Single byte "Y"
    //   [0x22] Single byte "Z"
    //   [0x23] 17 possible previous repetitions of length at least 0x10 bytes:
    //          - Repetition of 0x10 bytes from [0x00] "EEEEEEEEEEEEEEEE"
    //          - Repetition of 0x10 bytes from [0x01] "EEEEEEEEEEEEEEEE"
    //          - Repetition of 0x10 bytes from [0x02] "EEEEEEEEEEEEEEEE"
    //          ...
    //          - Repetition of 0x10 bytes from [0x0F] "EEEEEEEEEEEEEEEE"
    //          - Repetition of 0x1C bytes from [0x10] "EEEEEEEEEEEEEEEEQQQQQQQQQQQQ"
    //          The last repetition is the best one.
    //

    pWork->offs09BC[0] = 0xFFFF;
    pWork->offs09BC[1] = 0x0000;
    di_val = 0;

    // Note: I failed to figure out what does the table "offs09BC" mean.
    // If anyone has an idea, let me know to zezula_at_volny_dot_cz
    for(offs_in_rep = 1; offs_in_rep < rep_length; )
    {
        if(input_data[offs_in_rep] != input_data[di_val])
        {
            di_val = pWork->offs09BC[di_val];
            if(di_val != 0xFFFF)
                continue;
        }
        pWork->offs09BC[++offs_in_rep] = ++di_val;
    }

    // 
    // Now go through all the repetitions from the first found one
    // to the current input data, and check if any of them migh be
    // a start of a greater sequence match.
    //

    prev_repetition = pWork->work_buff + phash_offs[0];
    prev_rep_end = prev_repetition + rep_length;
    rep_length2 = rep_length;
    
    for(;;)
    {
        rep_length2 = pWork->offs09BC[rep_length2];
        if(rep_length2 == 0xFFFF)
            rep_length2 = 0;

        // Get the pointer to the previous repetition
        phash_offs = pWork->phash_offs + phash_offs_index;

        // Skip those repetitions that don't reach the end
        // of the first found repetition
        do
        {
            phash_offs++;
            phash_offs_index++;
            prev_repetition = pWork->work_buff + *phash_offs;
            if(prev_repetition >= repetition_limit)
                return rep_length;
        }
        while(prev_repetition + rep_length2 < prev_rep_end);

        // Verify if the last but one byte from the repetition matches
        // the last but one byte from the input data.
        // If not, find a next repetition
        pre_last_byte = input_data[rep_length - 2];
        if(pre_last_byte == prev_repetition[rep_length - 2])
        {
            // If the new repetition reaches beyond the end
            // of previously found repetition, reset the repetition length to zero.
            if(prev_repetition + rep_length2 != prev_rep_end)
            {
                prev_rep_end = prev_repetition;
                rep_length2 = 0;
            }
        }
        else
        {
            phash_offs = pWork->phash_offs + phash_offs_index;
            do
            {
                phash_offs++;
                phash_offs_index++;
                prev_repetition = pWork->work_buff + *phash_offs;
                if(prev_repetition >= repetition_limit)
                    return rep_length;
            }
            while(prev_repetition[rep_length - 2] != pre_last_byte || prev_repetition[0] != input_data[0]);

            // Reset the length of the repetition to 2 bytes only
            prev_rep_end = prev_repetition + 2;
            rep_length2 = 2;
        }

        // Find out how many more characters are equal to the first repetition.
        while(*prev_rep_end == input_data[rep_length2])
        {
            if(++rep_length2 >= 0x204)
                break;
            prev_rep_end++;
        }

        // Is the newly found repetion at least as long as the previous one ?
        if(rep_length2 >= rep_length)
        {
            // Calculate the distance of the new repetition
            pWork->distance = (unsigned int)(input_data - prev_repetition - 1);
            if((rep_length = rep_length2) == 0x204)
                return rep_length;

            // Update the additional elements in the "offs09BC" table
            // to reflect new rep length
            while(offs_in_rep < rep_length2)
            {
                if(input_data[offs_in_rep] != input_data[di_val])
                {
                    di_val = pWork->offs09BC[di_val];
                    if(di_val != 0xFFFF)
                        continue;
                }
                pWork->offs09BC[++offs_in_rep] = ++di_val;
            }
        }
    }
}

static void PKWAREAPI WriteCmpData(TCmpStruct * pWork)
{
    unsigned char * input_data_end;         // Pointer to the end of the input data
    unsigned char * input_data = pWork->work_buff + pWork->dsize_bytes + 0x204;
    unsigned int input_data_ended = 0;      // If 1, then all data from the input stream have been already loaded
    unsigned int save_rep_length;           // Saved length of current repetition
    unsigned int save_distance = 0;         // Saved distance of current repetition
    unsigned int rep_length;                // Length of the found repetition
    unsigned int phase = 0;                 // 

    // Store the compression type and dictionary size
    pWork->out_buff[0] = (char)pWork->ctype;
    pWork->out_buff[1] = (char)pWork->dsize_bits;
    pWork->out_bytes = 2;

    // Reset output buffer to zero
    memset(&pWork->out_buff[2], 0, sizeof(pWork->out_buff) - 2);
    pWork->out_bits = 0;

    while(input_data_ended == 0)
    {
        unsigned int bytes_to_load = 0x1000;
        int total_loaded = 0;
        int bytes_loaded;

        // Load the bytes from the input stream, up to 0x1000 bytes
        while(bytes_to_load != 0)
        {
            bytes_loaded = pWork->read_buf((char *)pWork->work_buff + pWork->dsize_bytes + 0x204 + total_loaded,
                                                  &bytes_to_load,
                                                   pWork->param);
            if(bytes_loaded == 0)
            {
                if(total_loaded == 0 && phase == 0)
                    goto __Exit;
                input_data_ended = 1;
                break;
            }
            else
            {
                bytes_to_load -= bytes_loaded;
                total_loaded += bytes_loaded;
            }
        }

        input_data_end = pWork->work_buff + pWork->dsize_bytes + total_loaded;
        if(input_data_ended)
            input_data_end += 0x204;
        
        //
        // Warning: The end of the buffer passed to "SortBuffer" is actually 2 bytes beyond
        // valid data. It is questionable if this is actually a bug or not,
        // but it might cause the compressed data output to be dependent on random bytes
        // that are in the buffer. 
        // To prevent that, the calling application must always zero the compression
        // buffer before passing it to "implode"
        //

        // Search the PAIR_HASHes of the loaded blocks. Also, include
        // previously compressed data, if any.
        switch(phase)
        {
            case 0: 
                SortBuffer(pWork, input_data, input_data_end + 1);
                phase++;
                if(pWork->dsize_bytes != 0x1000)
                    phase++;
                break;

            case 1:
                SortBuffer(pWork, input_data - pWork->dsize_bytes + 0x204, input_data_end + 1);
                phase++;
                break;

            default:
                SortBuffer(pWork, input_data - pWork->dsize_bytes, input_data_end + 1);
                break;
        }

        // Perform the compression of the current block
        while(input_data < input_data_end)
        {
            // Find if the current byte sequence wasn't there before.
            rep_length = FindRep(pWork, input_data);
            while(rep_length != 0)
            {
                // If we found repetition of 2 bytes, that is 0x100 or fuhrter back,
                // don't bother. Storing the distance of 0x100 bytes would actually
                // take more space than storing the 2 bytes as-is.
                if(rep_length == 2 && pWork->distance >= 0x100)
                    break;

                // When we are at the end of the input data, we cannot allow
                // the repetition to go past the end of the input data.
                if(input_data_ended && input_data + rep_length > input_data_end)
                {
                    // Shorten the repetition length so that it only covers valid data
                    rep_length = (unsigned long)(input_data_end - input_data);
                    if(rep_length < 2)
                        break;

                    // If we got repetition of 2 bytes, that is 0x100 or more backward, don't bother
                    if(rep_length == 2 && pWork->distance >= 0x100)
                        break;
                    goto __FlushRepetition;
                }

                if(rep_length >= 8 || input_data + 1 >= input_data_end)
                    goto __FlushRepetition;

                // Try to find better repetition 1 byte later.
                // Example: "ARROCKFORT" "AROCKFORT"
                // When "input_data" points to the second string, FindRep
                // returns the occurence of "AR". But there is longer repetition "ROCKFORT",
                // beginning 1 byte after.
                save_rep_length = rep_length;
                save_distance = pWork->distance;
                rep_length = FindRep(pWork, input_data + 1);

                // Only use the new repetition if it's length is greater than the previous one
                if(rep_length > save_rep_length)
                {
                    // If the new repetition if only 1 byte better
                    // and the previous distance is less than 0x80 bytes, use the previous repetition
                    if(rep_length > save_rep_length + 1 || save_distance > 0x80)
                    {
                        // Flush one byte, so that input_data will point to the secondary repetition
                        OutputBits(pWork, pWork->nChBits[*input_data], pWork->nChCodes[*input_data]);
                        input_data++;
                        continue;
                    }
                }

                // Revert to the previous repetition
                rep_length = save_rep_length;
                pWork->distance = save_distance;

                __FlushRepetition:

                OutputBits(pWork, pWork->nChBits[rep_length + 0xFE], pWork->nChCodes[rep_length + 0xFE]);
                if(rep_length == 2)
                {
                    OutputBits(pWork, pWork->dist_bits[pWork->distance >> 2],
                                      pWork->dist_codes[pWork->distance >> 2]);
                    OutputBits(pWork, 2, pWork->distance & 3);
                }
                else
                {
                    OutputBits(pWork, pWork->dist_bits[pWork->distance >> pWork->dsize_bits],
                                      pWork->dist_codes[pWork->distance >> pWork->dsize_bits]);
                    OutputBits(pWork, pWork->dsize_bits, pWork->dsize_mask & pWork->distance);
                }

                // Move the begin of the input data by the length of the repetition
                input_data += rep_length;
                goto _00402252;
            }

            // If there was no previous repetition for the current position in the input data,
            // just output the 9-bit literal for the one character
            OutputBits(pWork, pWork->nChBits[*input_data], pWork->nChCodes[*input_data]);
            input_data++;
_00402252:;
        }

        if(input_data_ended == 0)
        {
            input_data -= 0x1000;
            memmove(pWork->work_buff, pWork->work_buff + 0x1000, pWork->dsize_bytes + 0x204);
        }
    }

__Exit:

    // Write the termination literal
    OutputBits(pWork, pWork->nChBits[0x305], pWork->nChCodes[0x305]);
    if(pWork->out_bits != 0)
        pWork->out_bytes++;
    pWork->write_buf(pWork->out_buff, &pWork->out_bytes, pWork->param);
    return;
}

//-----------------------------------------------------------------------------
// Main imploding function

unsigned int PKWAREAPI implode(
    unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param),
    void         (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param),
    char         *work_buf,
    void         *param,
    unsigned int *type,
    unsigned int *dsize)
{
    TCmpStruct * pWork = (TCmpStruct *)work_buf;
    unsigned int nChCode;
    unsigned int nCount;
    unsigned int i;
    int nCount2;

    // Fill the work buffer information
    // Note: The caller must zero the "work_buff" before passing it to implode
    pWork->read_buf    = read_buf;
    pWork->write_buf   = write_buf;
    pWork->dsize_bytes = *dsize;
    pWork->ctype       = *type;
    pWork->param       = param;
    pWork->dsize_bits  = 4;
    pWork->dsize_mask  = 0x0F;

    // Test dictionary size
    switch(*dsize)
    {
        case CMP_IMPLODE_DICT_SIZE3:    // 0x1000 bytes
            pWork->dsize_bits++;
            pWork->dsize_mask |= 0x20;
            // No break here !!!

        case CMP_IMPLODE_DICT_SIZE2:    // 0x800 bytes
            pWork->dsize_bits++;
            pWork->dsize_mask |= 0x10;
            // No break here !!!

        case CMP_IMPLODE_DICT_SIZE1:    // 0x400
            break;

        default:
            return CMP_INVALID_DICTSIZE;
    }

    // Test the compression type
    switch(*type)
    {
        case CMP_BINARY: // We will compress data with binary compression type
            for(nChCode = 0, nCount = 0; nCount < 0x100; nCount++)
            {
                pWork->nChBits[nCount]  = 9;
                pWork->nChCodes[nCount] = (unsigned short)nChCode;
                nChCode = (nChCode & 0x0000FFFF) + 2;
            }
            break;


        case CMP_ASCII: // We will compress data with ASCII compression type
            for(nCount = 0; nCount < 0x100; nCount++)
            {
                pWork->nChBits[nCount]  = (unsigned char )(ChBitsAsc[nCount] + 1);
                pWork->nChCodes[nCount] = (unsigned short)(ChCodeAsc[nCount] * 2);
            }
            break;

        default:
            return CMP_INVALID_MODE;
    }

    for(i = 0; i < 0x10; i++)
    {
        if(1 << ExLenBits[i])
        {
            for(nCount2 = 0; nCount2 < (1 << ExLenBits[i]); nCount2++)
            {
                pWork->nChBits[nCount]  = (unsigned char)(ExLenBits[i] + LenBits[i] + 1);
                pWork->nChCodes[nCount] = (unsigned short)((nCount2 << (LenBits[i] + 1)) | ((LenCode[i] & 0xFFFF00FF) * 2) | 1);
                nCount++;
            }
        }
    }

    // Copy the distance codes and distance bits and perform the compression
    memcpy(&pWork->dist_codes, DistCode, sizeof(DistCode));
    memcpy(&pWork->dist_bits, DistBits, sizeof(DistBits));
    WriteCmpData(pWork);
    return CMP_NO_ERROR;
}


================================================
FILE: 3rdParty/PKWare/pkware.h
================================================
/*****************************************************************************/
/* pkware.h                               Copyright (c) Ladislav Zezula 2003 */
/*---------------------------------------------------------------------------*/
/* Header file for PKWARE Data Compression Library                           */
/*---------------------------------------------------------------------------*/
/*   Date    Ver   Who  Comment                                              */
/* --------  ----  ---  -------                                              */
/* 31.03.03  1.00  Lad  The first version of pkware.h                        */
/*****************************************************************************/

#ifndef __PKWARE_H__
#define __PKWARE_H__

//-----------------------------------------------------------------------------
// Defines

#define CMP_BINARY             0            // Binary compression
#define CMP_ASCII              1            // Ascii compression

#define CMP_NO_ERROR           0
#define CMP_INVALID_DICTSIZE   1
#define CMP_INVALID_MODE       2
#define CMP_BAD_DATA           3
#define CMP_ABORT              4

#define CMP_IMPLODE_DICT_SIZE1   1024       // Dictionary size of 1024
#define CMP_IMPLODE_DICT_SIZE2   2048       // Dictionary size of 2048
#define CMP_IMPLODE_DICT_SIZE3   4096       // Dictionary size of 4096

//-----------------------------------------------------------------------------
// Define calling convention

#ifndef PKWAREAPI
#ifdef WIN32
#define PKWAREAPI  __cdecl                   // Use for normal __cdecl calling 
#else
#define PKWAREAPI
#endif
#endif

//-----------------------------------------------------------------------------
// Internal structures

// Compression structure
typedef struct
{
    unsigned int   distance;                // 0000: Backward distance of the currently found repetition, decreased by 1
    unsigned int   out_bytes;               // 0004: # bytes available in out_buff            
    unsigned int   out_bits;                // 0008: # of bits available in the last out byte
    unsigned int   dsize_bits;              // 000C: Number of bits needed for dictionary size. 4 = 0x400, 5 = 0x800, 6 = 0x1000
    unsigned int   dsize_mask;              // 0010: Bit mask for dictionary. 0x0F = 0x400, 0x1F = 0x800, 0x3F = 0x1000
    unsigned int   ctype;                   // 0014: Compression type (CMP_ASCII or CMP_BINARY)
    unsigned int   dsize_bytes;             // 0018: Dictionary size in bytes
    unsigned char  dist_bits[0x40];         // 001C: Distance bits
    unsigned char  dist_codes[0x40];        // 005C: Distance codes
    unsigned char  nChBits[0x306];          // 009C: Table of literal bit lengths to be put to the output stream
    unsigned short nChCodes[0x306];         // 03A2: Table of literal codes to be put to the output stream
    unsigned short offs09AE;                // 09AE: 

    void         * param;                   // 09B0: User parameter
    unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param);  // 9B4
    void         (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param); // 9B8

    unsigned short offs09BC[0x204];         // 09BC:
    unsigned long  offs0DC4;                // 0DC4: 
    unsigned short phash_to_index[0x900];   // 0DC8: Array of indexes (one for each PAIR_HASH) to the "pair_hash_offsets" table
    unsigned short phash_to_index_end;      // 1FC8: End marker for "phash_to_index" table
    char           out_buff[0x802];         // 1FCA: Compressed data
    unsigned char  work_buff[0x2204];       // 27CC: Work buffer
                                            //  + DICT_OFFSET  => Dictionary
                                            //  + UNCMP_OFFSET => Uncompressed data
    unsigned short phash_offs[0x2204];      // 49D0: Table of offsets for each PAIR_HASH
} TCmpStruct;

#define CMP_BUFFER_SIZE  sizeof(TCmpStruct) // Size of compression structure.
                                            // Defined as 36312 in pkware header file


// Decompression structure
typedef struct
{
    unsigned long offs0000;                 // 0000
    unsigned long ctype;                    // 0004: Compression type (CMP_BINARY or CMP_ASCII)
    unsigned long outputPos;                // 0008: Position in output buffer
    unsigned long dsize_bits;               // 000C: Dict size (4, 5, 6 for 0x400, 0x800, 0x1000)
    unsigned long dsize_mask;               // 0010: Dict size bitmask (0x0F, 0x1F, 0x3F for 0x400, 0x800, 0x1000)
    unsigned long bit_buff;                 // 0014: 16-bit buffer for processing input data
    unsigned long extra_bits;               // 0018: Number of extra (above 8) bits in bit buffer
    unsigned int  in_pos;                   // 001C: Position in in_buff
    unsigned long in_bytes;                 // 0020: Number of bytes in input buffer
    void        * param;                    // 0024: Custom parameter
    unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param); // Pointer to function that reads data from the input stream
    void         (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param);// Pointer to function that writes data to the output stream

    unsigned char out_buff[0x2204];         // 0030: Output circle buffer.
                                            //       0x0000 - 0x0FFF: Previous uncompressed data, kept for repetitions
                                            //       0x1000 - 0x1FFF: Currently decompressed data
                                            //       0x2000 - 0x2203: Reserve space for the longest possible repetition
    unsigned char in_buff[0x800];           // 2234: Buffer for data to be decompressed
    unsigned char DistPosCodes[0x100];      // 2A34: Table of distance position codes
    unsigned char LengthCodes[0x100];       // 2B34: Table of length codes
    unsigned char offs2C34[0x100];          // 2C34: Buffer for 
    unsigned char offs2D34[0x100];          // 2D34: Buffer for 
    unsigned char offs2E34[0x80];           // 2EB4: Buffer for 
    unsigned char offs2EB4[0x100];          // 2EB4: Buffer for 
    unsigned char ChBitsAsc[0x100];         // 2FB4: Buffer for 
    unsigned char DistBits[0x40];           // 30B4: Numbers of bytes to skip copied block length
    unsigned char LenBits[0x10];            // 30F4: Numbers of bits for skip copied block length
    unsigned char ExLenBits[0x10];          // 3104: Number of valid bits for copied block
    unsigned short LenBase[0x10];           // 3114: Buffer for 
} TDcmpStruct;

#define EXP_BUFFER_SIZE sizeof(TDcmpStruct) // Size of decompression structure
                                            // Defined as 12596 in pkware headers

//-----------------------------------------------------------------------------
// Public functions

#ifdef __cplusplus
   extern "C" {
#endif

unsigned int PKWAREAPI implode(
   unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned int *size, void *param),
   void         (PKWAREAPI *write_buf)(char *buf, unsigned int *size, void *param),
   char         *work_buf,
   void         *param,
   unsigned int *type,
   unsigned int *dsize);


unsigned int PKWAREAPI explode(
   unsigned int (PKWAREAPI *read_buf)(char *buf, unsigned  int *size, void *param),
   void         (PKWAREAPI *write_buf)(char *buf, unsigned  int *size, void *param),
   char         *work_buf,
   void         *param);

#ifdef __cplusplus
   }                         // End of 'extern "C"' declaration
#endif

#endif // __PKWARE_H__


================================================
FILE: 3rdParty/Storm/Makefile
================================================
VC5_DIR ?= $(HOME)/DevStudio_5.10/VC

# The $(VS6_DIR) directory is a copy of the "Microsoft Visual Studio" directory.
#
# To get a working setup on Linux or other "portable" copies of VS,
# the following DLLs have to be copied to the
# $(VS6_DIR)/VC98/Bin directory.
#
#     - $(VS6_DIR)/Common/MSDev98/Bin/MSPDB60.DLL
#
# And to the $(VC5_DIR)/bin directory.
#
#     - $(VC5_DIR)/SharedIDE/bin/MSDIS100.DLL
#     - $(VC5_DIR)/SharedIDE/bin/MSPDB50.DLL
VS6_DIR ?= $(HOME)/VS6

VC6_DIR     = $(VS6_DIR)/VC98

VC6_BIN_DIR = $(VC6_DIR)/Bin
VC6_INC_DIR = $(VC6_DIR)/Include
VC6_LIB_DIR = $(VC6_DIR)/Lib

VC5_LIB_DIR = $(VC5_DIR)/lib

IDE_DIR ?= $(VS6_DIR)/Common/MSDev98
IDE_BIN_DIR = $(IDE_DIR)/bin
ifeq ($(OS),Windows_NT)
	CL = $(VC6_BIN_DIR)/CL.EXE
	RC = $(IDE_BIN_DIR)/RC.EXE
	VC5_LINK = $(VC5_DIR)/bin/link.exe
	VC6_LINK = $(VC6_BIN_DIR)/link.exe
else
	CL = wine $(VC6_BIN_DIR)/CL.EXE
	RC = wine $(IDE_BIN_DIR)/RC.EXE
	VC5_LINK = wine $(VC5_DIR)/bin/link.exe
	VC6_LINK = wine $(VC6_BIN_DIR)/link.exe
endif

CFLAGS=/nologo /c /GX /W3 /O1 /I $(VC6_INC_DIR) /FD /MT /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /Gm /Zi
LINKFLAGS=/nologo /subsystem:windows /machine:I386 /incremental:no

VC_LINK=$(VC5_LINK)
LINKFLAGS+= /LIBPATH:$(VC5_LIB_DIR)

all: storm.lib

STORM_SRC=$(sort $(wildcard Source/*.cpp))
STORM_OBJS=$(STORM_SRC:.cpp=.obj)

storm.lib: $(STORM_OBJS)
	$(CL) $^ /link /LINK50COMPAT /nologo /dll /subsystem:windows /machine:I386 /LIBPATH:$(VC6_LIB_DIR) /def:"Source/storm.def" /out:storm.dll

%.obj: %.cpp
	$(CL) $(CFLAGS) /Fo$@ $<

clean:
	@$(RM) -v $(STORM_OBJS) storm.{exp,lib,dll} vc60.{idb,pch,pdb}

.PHONY: clean all


================================================
FILE: 3rdParty/Storm/Source/Storm.dsp
================================================
# Microsoft Developer Studio Project File - Name="Storm" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102

CFG=Storm - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE 
!MESSAGE NMAKE /f "Storm.mak".
!MESSAGE 
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "Storm.mak" CFG="Storm - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "Storm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "Storm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE 

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe

!IF  "$(CFG)" == "Storm - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "WinRel"
# PROP BASE Intermediate_Dir "WinRel"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "WinRel"
# PROP Intermediate_Dir "WinRel"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
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 /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 /subsystem:windows /dll /machine:I386 /def:"storm.def"

!ELSEIF  "$(CFG)" == "Storm - Win32 Debug"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "WinDebug"
# PROP BASE Intermediate_Dir "WinDebug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "WinDebug"
# PROP Intermediate_Dir "WinDebug"
# PROP Target_Dir ""
# 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 /O1 /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
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 /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 /subsystem:windows /dll /debug /machine:I386 /def:"storm.def" /pdbtype:sept

!ENDIF 

# Begin Target

# Name "Storm - Win32 Release"
# Name "Storm - Win32 Debug"
# Begin Source File

SOURCE=.\storm.cpp
# End Source File
# End Target
# End Project


================================================
FILE: 3rdParty/Storm/Source/Storm.vcxproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <SccProjectName />
    <SccLocalPath />
    <ProjectGuid>{B28F69CE-15A1-424D-BBB5-2727258D675B}</ProjectGuid>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <PlatformToolset>v141</PlatformToolset>
    <UseOfMfc>false</UseOfMfc>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <PlatformToolset>v141</PlatformToolset>
    <UseOfMfc>false</UseOfMfc>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <OutDir>.\WinRel\</OutDir>
    <IntDir>.\WinRel\</IntDir>
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <OutDir>.\WinDebug\</OutDir>
    <IntDir>.\WinDebug\</IntDir>
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
      <StringPooling>true</StringPooling>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <Optimization>MaxSpeed</Optimization>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <WarningLevel>Level3</WarningLevel>
      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AssemblerListingLocation>.\WinRel\</AssemblerListingLocation>
      <PrecompiledHeaderOutputFile>.\WinRel\Storm.pch</PrecompiledHeaderOutputFile>
      <ObjectFileName>.\WinRel\</ObjectFileName>
      <ProgramDataBaseFileName>.\WinRel\</ProgramDataBaseFileName>
    </ClCompile>
    <Midl>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <TypeLibraryName>.\WinRel\Storm.tlb</TypeLibraryName>
      <MkTypLibCompatible>true</MkTypLibCompatible>
      <RedirectOutputAndErrors>NUL</RedirectOutputAndErrors>
      <TargetEnvironment>Win32</TargetEnvironment>
    </Midl>
    <ResourceCompile>
      <Culture>0x0409</Culture>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ResourceCompile>
    <Bscmake>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <OutputFile>.\WinRel\Storm.bsc</OutputFile>
    </Bscmake>
    <Link>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <LinkDLL>true</LinkDLL>
      <SubSystem>Windows</SubSystem>
      <ModuleDefinitionFile>storm.def</ModuleDefinitionFile>
      <OutputFile>.\WinRel\Storm.dll</OutputFile>
      <ImportLibrary>.\WinRel\Storm.lib</ImportLibrary>
      <AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <InlineFunctionExpansion>Default</InlineFunctionExpansion>
      <Optimization>Disabled</Optimization>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <WarningLevel>Level3</WarningLevel>
      <MinimalRebuild>true</MinimalRebuild>
      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AssemblerListingLocation>.\WinDebug\</AssemblerListingLocation>
      <PrecompiledHeaderOutputFile>.\WinDebug\Storm.pch</PrecompiledHeaderOutputFile>
      <ObjectFileName>.\WinDebug\</ObjectFileName>
      <ProgramDataBaseFileName>.\WinDebug\</ProgramDataBaseFileName>
    </ClCompile>
    <Midl>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <TypeLibraryName>.\WinDebug\Storm.tlb</TypeLibraryName>
      <MkTypLibCompatible>true</MkTypLibCompatible>
      <RedirectOutputAndErrors>NUL</RedirectOutputAndErrors>
      <TargetEnvironment>Win32</TargetEnvironment>
    </Midl>
    <ResourceCompile>
      <Culture>0x0409</Culture>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ResourceCompile>
    <Bscmake>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <OutputFile>.\WinDebug\Storm.bsc</OutputFile>
    </Bscmake>
    <Link>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <LinkDLL>true</LinkDLL>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <SubSystem>Windows</SubSystem>
      <ModuleDefinitionFile>storm.def</ModuleDefinitionFile>
      <OutputFile>.\WinDebug\Storm.dll</OutputFile>
      <ImportLibrary>.\WinDebug\Storm.lib</ImportLibrary>
      <AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="storm.cpp" />
  </ItemGroup>
  <ItemGroup>
    <None Include="storm.def" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="storm.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>

================================================
FILE: 3rdParty/Storm/Source/storm.cpp
================================================
#include "storm.h"

#define rBool { return TRUE; }
#define rPVoid { return NULL; }
#define rVoid { return; }
#define rInt { return 0; }

BOOL STORMAPI SNetCreateGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, char *GameTemplateData, int GameTemplateSize, int playerCount, const char *creatorName, const char *a11, int *playerID) rBool;
BOOL STORMAPI SNetDestroy() rBool;

BOOL STORMAPI SNetDropPlayer(int playerid, DWORD flags) rBool;
BOOL STORMAPI SNetGetGameInfo(int type, void *dst, size_t length, size_t *byteswritten) rBool;

BOOL STORMAPI SNetGetNumPlayers(int *firstplayerid, int *lastplayerid, int *activeplayers) rBool;

BOOL STORMAPI SNetGetPlayerCaps(char playerid, PCAPS playerCaps) rBool;
BOOL STORMAPI SNetGetPlayerName(int playerid, char *buffer, size_t buffersize) rBool;
//BOOL STORMAPI SNetGetProviderCaps(PCAPS providerCaps) rBool;
BOOL STORMAPI SNetGetTurnsInTransit(int *turns) rBool;
BOOL STORMAPI SNetInitializeDevice(int a1, int a2, int a3, int a4, int *a5) rBool;
//BOOL STORMAPI SNetInitializeProvider(DWORD providerName, client_info *gameClientInfo, user_info *userData, battle_info *bnCallbacks, module_info *moduleData) rBool;
BOOL STORMAPI SNetJoinGame(int id, char *gameName, char *gamePassword, char *playerName, char *userStats, int *playerid) rBool;
BOOL STORMAPI SNetLeaveGame(int type) rBool;
BOOL STORMAPI SNetPerformUpgrade(DWORD *upgradestatus) rBool;
BOOL STORMAPI SNetReceiveMessage(int *senderplayerid, char **data, int *databytes) rBool;
BOOL STORMAPI SNetReceiveTurns(int a1, int arraysize, char **arraydata, DWORD *arraydatabytes, DWORD *arrayplayerstatus) rBool;
//HANDLE STORMAPI SNetRegisterEventHandler(int type, void (STORMAPI *sEvent)(PS_EVT)) rPVoid;

int STORMAPI SNetSelectGame(int a1, int a2, int a3, int a4, int a5, int *playerid) rInt;

BOOL STORMAPI SNetSendMessage(int playerID, void *data, size_t databytes) rBool;
BOOL STORMAPI SNetSendTurn(char *data, size_t databytes) rBool;

BOOL STORMAPI SNetSetGameMode(DWORD modeFlags, bool makePublic) rBool;

BOOL STORMAPI SNetEnumGamesEx(int a1, int a2, int (__fastcall *callback)(DWORD, DWORD, DWORD), int *hintnextcall) rBool;
BOOL STORMAPI SNetSendServerChatCommand(const char *command) rBool;

BOOL STORMAPI SNetDisconnectAll(DWORD flags) rBool;
BOOL STORMAPI SNetCreateLadderGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, DWORD dwGameLadderType, DWORD dwGameModeFlags, char *GameTemplateData, int GameTemplateSize, int playerCount, char *creatorName, char *a11, int *playerID) rBool;
BOOL STORMAPI SNetReportGameResult(unsigned a1, int size, int *results, const char* headerInfo, const char* detailInfo) rBool;

int STORMAPI SNetSendLeagueCommand(char *cmd, char *callback) rInt;
int STORMAPI SNetSendReplayPath(int a1, int a2, char *replayPath) rInt;
int STORMAPI SNetGetLeagueName(int leagueID) rInt;
BOOL STORMAPI SNetGetPlayerNames(char **names) rBool;
int STORMAPI SNetLeagueLogout(char *bnetName) rInt;
int STORMAPI SNetGetLeaguePlayerName(char *curPlayerLeageName, size_t nameSize) rInt;

HGDIOBJ STORMAPI SDlgDefDialogProc(HWND hDlg, signed int DlgType, HDC textLabel, HWND hWnd) rPVoid;

HANDLE STORMAPI SDlgDialogBoxIndirectParam(HMODULE hModule, LPCSTR lpName, HWND hWndParent, LPVOID lpParam, LPARAM lParam) rPVoid;

BOOL STORMAPI SDlgEndDialog(HWND hDlg, HANDLE nResult) rBool;

BOOL STORMAPI SDlgSetControlBitmaps(HWND parentwindow, int *id, int a3, char *buffer2, char *buffer, int flags, int mask) rBool;

BOOL STORMAPI SDlgBltToWindowI(HWND hWnd, HRGN a2, char *a3, int a4, void *buffer, RECT *rct, SIZE *size, int a8, int a9, DWORD rop) rBool;
BOOL STORMAPI SDlgBltToWindowE(HWND hWnd, HRGN a2, char *a3, int a4, void *buffer, RECT *rct, SIZE *size, int a8, int a9, DWORD rop) rBool;
BOOL STORMAPI SDlgSetBitmapE(HWND hWnd, int a2, char *src, int mask1, int flags, int a6, int a7, int width, int a9, int mask2) rBool;

int STORMAPI Ordinal224(int a1) rInt;

BOOL STORMAPI SFileCloseArchive(HANDLE hArchive) rBool;
BOOL STORMAPI SFileCloseFile(HANDLE hFile) rBool;

BOOL STORMAPI SFileDdaBeginEx(HANDLE hFile, DWORD flags, DWORD mask, unsigned __int32 lDistanceToMove, signed __int32 volume, signed int a6, int a7) rBool;
BOOL STORMAPI SFileDdaDestroy() rBool;
BOOL STORMAPI SFileDdaEnd(HANDLE hFile) rBool;
BOOL STORMAPI SFileDdaGetPos(HANDLE hFile, DWORD *current, DWORD *end) rBool;

BOOL STORMAPI SFileDdaInitialize(HANDLE directsound) rBool;
BOOL STORMAPI SFileDdaSetVolume(HANDLE hFile, signed int bigvolume, signed int volume) rBool;
BOOL STORMAPI SFileDestroy() rBool;

BOOL STORMAPI SFileGetFileArchive(HANDLE hFile, HANDLE *archive) rBool;
LONG STORMAPI SFileGetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh) rInt;
BOOL STORMAPI SFileOpenArchive(const char *szMpqName, DWORD dwPriority, DWORD dwFlags, HANDLE *phMpq) rBool;
BOOL STORMAPI SFileOpenFile(const char *filename, HANDLE *phFile) rBool;
BOOL STORMAPI SFileOpenFileEx(HANDLE hMpq, const char *szFileName, DWORD dwSearchScope, HANDLE *phFile) rBool;
BOOL STORMAPI SFileReadFile(HANDLE hFile, void *buffer, DWORD nNumberOfBytesToRead, DWORD *read, LONG *lpDistanceToMoveHigh) rBool;

void STORMAPI SFileSetLocale(LCID lcLocale) rVoid;

BOOL STORMAPI SFileSetIoErrorMode(int mode, BOOL (STORMAPI *callback)(char*,int,int) ) rBool;
BOOL STORMAPI SFileGetArchiveName(HANDLE hArchive, char *name, int length) rBool;
BOOL STORMAPI SFileGetFileName(HANDLE hFile, char *buffer, int length) rBool;

BOOL STORMAPI SFileLoadFile(char *filename, void *buffer, int buffersize, int a4, int a5) rBool;
BOOL STORMAPI SFileUnloadFile(HANDLE hFile) rBool;
BOOL STORMAPI SFileLoadFileEx(void *hArchive, char *filename, int a3, int a4, int a5, DWORD searchScope, struct _OVERLAPPED *lpOverlapped) rBool;

BOOL STORMAPI SBltROP3(void *lpDstBuffer, void *lpSrcBuffer, int width, int height, int a5, int a6, int a7, DWORD rop) rBool;
BOOL STORMAPI SBltROP3Clipped(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt, int a4, void *lpSrcBuffer, RECT *lpSrcRect, POINT *lpSrcPt, int a8, int a9, DWORD rop) rBool;
BOOL STORMAPI SBltROP3Tiled(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt, int a4, void *lpSrcBuffer, RECT *lpSrcRect, POINT *lpSrcPt, int a8, int a9, DWORD rop) rBool;

BOOL STORMAPI SBmpDecodeImage(DWORD dwImgType, void *pSrcBuffer, DWORD dwSrcBuffersize, PALETTEENTRY *pPalette, void *pDstBuffer, DWORD dwDstBuffersize, DWORD *pdwWidth, DWORD *pdwHeight, DWORD *pdwBpp) rBool;

BOOL STORMAPI SBmpLoadImage(const char *pszFileName, PALETTEENTRY *pPalette, BYTE *pBuffer, DWORD dwBuffersize, DWORD *pdwWidth, DWORD *pdwHeight, DWORD *pdwBpp) rBool;

BOOL   STORMAPI SBmpSaveImage(const char*, PALETTEENTRY*, void*, DWORD, DWORD, DWORD) rBool;
HANDLE STORMAPI SBmpAllocLoadImage(const char *fileName, PALETTEENTRY *palette, void **buffer, int *width, int *height, int unused6, int unused7, void *(STORMAPI *allocFunction)(DWORD)) rPVoid;

BOOL STORMAPI SCodeCompile(char *directives1, char *directives2, char *loopstring, unsigned int maxiterations, unsigned int flags, HANDLE handle) rBool;
BOOL STORMAPI SCodeDelete(HANDLE handle) rBool;

int  STORMAPI SCodeExecute(HANDLE handle, int a2) rInt;

BOOL STORMAPI SDrawAutoInitialize(HINSTANCE hInst, LPCSTR lpClassName, LPCSTR lpWindowName, WNDPROC pfnWndProc, int nMode, int nWidth, int nHeight, int nBits) rBool;
BOOL STORMAPI SDrawCaptureScreen(const char *source) rBool;

HWND STORMAPI SDrawGetFrameWindow(HWND *sdraw_framewindow) rPVoid;
BOOL STORMAPI SDrawGetObjects(LPDIRECTDRAW *ddInterface, LPDIRECTDRAWSURFACE *primarySurface, LPDIRECTDRAWSURFACE *surface2, LPDIRECTDRAWSURFACE *surface3, LPDIRECTDRAWSURFACE *backSurface, LPDIRECTDRAWPALETTE *ddPalette, HPALETTE *hPalette) rBool;
BOOL STORMAPI SDrawGetScreenSize(DWORD *pdwWidth, DWORD *pdwHeight, DWORD *pdwBpp) rBool;

BOOL STORMAPI SDrawLockSurface(int surfacenumber, RECT *lpDestRect, void **lplpSurface, int *lpPitch, int arg_unused) rBool;
BOOL STORMAPI SDrawManualInitialize(HWND hWnd, LPDIRECTDRAW ddInterface, LPDIRECTDRAWSURFACE primarySurface, LPDIRECTDRAWSURFACE surface2, LPDIRECTDRAWSURFACE surface3, LPDIRECTDRAWSURFACE backSurface, LPDIRECTDRAWPALETTE ddPalette, HPALETTE hPalette) rBool;

BOOL STORMAPI SDrawPostClose() rBool;
//BOOL STORMAPI SDrawRealizePalette() rBool;

BOOL STORMAPI SDrawUnlockSurface(int surfacenumber, void *lpSurface, int a3, RECT *lpRect) rBool;
BOOL STORMAPI SDrawUpdatePalette(unsigned int firstentry, unsigned int numentries, PALETTEENTRY *pPalEntries, int a4) rBool;

BOOL STORMAPI SEvtDispatch(DWORD dwMessageID, DWORD dwFlags, int type, PS_EVT pEvent) rBool;

BOOL STORMAPI SGdiDeleteObject(HANDLE handle) rBool;

BOOL STORMAPI SGdiExtTextOut(int a1, int a2, int a3, int a4, unsigned int a8, signed int a6, signed int a7, const char *string, unsigned int arg20) rBool;
BOOL STORMAPI SGdiImportFont(HGDIOBJ handle, int windowsfont) rBool;

BOOL STORMAPI SGdiSelectObject(int handle) rBool;
BOOL STORMAPI SGdiSetPitch(int pitch) rBool;

BOOL STORMAPI Ordinal393(char *string, int, int) rBool;

void *STORMAPI SMemAlloc(size_t amount, const char *logfilename, int logline, int defaultValue) rPVoid;

BOOL STORMAPI SMemFree(void *location, const char *logfilename, int logline, char defaultValue) rBool;

void* STORMAPI SMemReAlloc(void *location, size_t amount, const char *logfilename, int logline, char defaultValue) rPVoid;

BOOL STORMAPI SRegLoadData(const char *keyname, const char *valuename, int size, LPBYTE lpData, BYTE flags, LPDWORD lpcbData) rBool;
BOOL STORMAPI SRegLoadString(const char *keyname, const char *valuename, BYTE flags, char *buffer, size_t buffersize) rBool;
BOOL STORMAPI SRegLoadValue(const char *keyname, const char *valuename, BYTE flags, int *value) rBool;
BOOL STORMAPI SRegSaveData(const char *keyname, const char *valuename, int size, BYTE *lpData, DWORD cbData) rBool;
BOOL STORMAPI SRegSaveString(const char *keyname, const char *valuename, BYTE flags, char *string) rBool;
BOOL STORMAPI SRegSaveValue(const char *keyname, const char *valuename, BYTE flags, DWORD result) rBool;

BOOL STORMAPI SRegDeleteValue(const char *keyname, const char *valuename, BYTE flags) rBool;

BOOL STORMAPI STransBlt(void *lpSurface, int x, int y, int width, HANDLE hTrans) rBool;
BOOL STORMAPI STransBltUsingMask(void *lpSurface, void *lpSource, int pitch, int width, HANDLE hTrans) rBool;

BOOL STORMAPI STransDelete(HANDLE hTrans) rBool;

BOOL STORMAPI STransDuplicate(HANDLE hTransSource, HANDLE hTransDest) rBool;
BOOL STORMAPI STransIntersectDirtyArray(HANDLE hTrans, char * dirtyarraymask, unsigned flags, HANDLE * phTransResult) rBool;
BOOL STORMAPI STransInvertMask(HANDLE hTrans, HANDLE * phTransResult) rBool;

BOOL STORMAPI STransSetDirtyArrayInfo(int width, int height, int depth, int bits) rBool;

BOOL STORMAPI STransPointInMask(HANDLE hTrans, int x, int y) rBool;
BOOL STORMAPI STransCombineMasks(HANDLE hTransA, HANDLE hTransB, int left, int top, int flags, HANDLE * phTransResult) rBool;

BOOL STORMAPI STransCreateE(void *pBuffer, int width, int height, int bpp, int a5, int bufferSize, HANDLE *phTransOut) rBool;
BOOL STORMAPI STransCreateI(void *pBuffer, int width, int height, int bpp, int a5, int bufferSize, HANDLE *phTransOut) rBool;

BOOL STORMAPI SVidDestroy() rBool;
BOOL STORMAPI SVidGetSize(HANDLE video, int width, int height, int zero) rBool;
BOOL STORMAPI SVidInitialize(HANDLE video) rBool;
BOOL STORMAPI SVidPlayBegin(const char *filename, int a2, int a3, int a4, int a5, int flags, HANDLE *video) rBool;

BOOL STORMAPI SVidPlayContinueSingle(HANDLE video, int a2, int a3) rBool;
BOOL STORMAPI SVidPlayEnd(HANDLE video) rBool;

BOOL STORMAPI SErrDisplayError(DWORD dwErrMsg, const char *logfilename, int logline, const char *message, BOOL allowOption, int exitCode) rBool;
BOOL STORMAPI SErrGetErrorStr(DWORD dwErrCode, char *buffer, size_t bufferchars) rBool;
DWORD STORMAPI SErrGetLastError() rInt;

void STORMAPI SErrSetLastError(DWORD dwErrCode) rVoid;

void STORMAPI SErrSuppressErrors(BOOL suppressErrors) rVoid;

void STORMAPI SMemCopy(void *dest, const void *source, size_t size) rVoid;
void STORMAPI SMemFill(void *location, size_t length, char fillWith) rVoid;

void STORMAPI SMemZero(void *location, DWORD length) rVoid;
int  STORMAPI SMemCmp(void *location1, void *location2, DWORD size) rInt;

int   STORMAPI SStrCopy(char *dest, const char *src, int max_length) rInt;
DWORD STORMAPI SStrHash(const char *string, DWORD flags, DWORD Seed) rInt;
int   STORMAPI SStrPack(char *dest, const char *src, DWORD max_length) rInt;

int STORMAPI SStrLen(const char* string) rInt;

int STORMAPI SStrCmp(const char *string1, const char *string2, size_t size) rInt;
int STORMAPI SStrCmpI(const char *string1, const char *string2, size_t size) rInt;
char* STORMAPI SStrUpper(char* string) rPVoid;

void STORMAPI SRgn523(HANDLE hRgn, RECT *pRect, int a3, int a4) rVoid;
void STORMAPI SRgnCreateRegion(HANDLE *hRgn, int a2) rVoid;
void STORMAPI SRgnDeleteRegion(HANDLE hRgn) rVoid;

void STORMAPI SRgn529i(int handle, int a2, int a3) rVoid;

BOOL SErrDisplayErrorFmt(DWORD dwErrMsg, const char *logfilename, int logline, BOOL allowOption, int exitCode, const char *format, ...) rBool;

void STORMAPI SErrCatchUnhandledExceptions() rVoid;

char* STORMAPI SStrChr(const char *string, char c) rPVoid;
char* STORMAPI SStrChrR(const char *string, char c) rPVoid;

size_t SStrVPrintf(char *dest, size_t size, const char *format, ...) rInt;

int STORMAPI SBigDel(void *buffer) rInt;

int STORMAPI SBigFromBinary(void *buffer, const void *str, size_t size) rInt;

int STORMAPI SBigNew(void **buffer) rInt;

int STORMAPI SBigPowMod(void *buffer1, void *buffer2, int a3, int a4) rInt;

int STORMAPI SBigToBinaryBuffer(void *buffer, int length, int a3, int a4) rInt;
//

void __stdcall SDrawMessageBox(const char *,const char *,int) rVoid;
void __cdecl SDrawDestroy(void) rVoid;
BOOLEAN __cdecl StormDestroy(void) rBool;
BOOL __stdcall SFileSetBasePath(const char *) rBool;
void __cdecl SDrawRealizePalette(void) rVoid;
BOOL __cdecl SVidPlayContinue(void) rBool;
BOOL __stdcall SNetGetOwnerTurnsWaiting(DWORD *) rBool;
BOOL __stdcall SNetUnregisterEventHandler(int,SEVTHANDLER) rPVoid;
BOOL __stdcall SNetRegisterEventHandler(int,SEVTHANDLER) rPVoid;
BOOLEAN __stdcall SNetSetBasePlayer(int) rBool;
int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *) rInt;
int __stdcall SNetGetProviderCaps(struct _SNETCAPS *) rInt;
int __stdcall SFileSetFilePointer(HANDLE,int,HANDLE,int) rInt;
void __stdcall SDrawClearSurface(int a1) rVoid;
BOOL __stdcall SDlgSetBitmapI(HWND hWnd, int a2, char *src, int mask1, int flags, void *pBuff, int a7, int width, int height, int mask2) rBool;
void __stdcall SDlgBeginPaint(HWND hWnd, char *a2) rVoid;
void __stdcall SDlgEndPaint(HWND hWnd, char *a2) rVoid;
void __stdcall SDlgSetSystemCursor(BYTE *a1, BYTE *a2, int *a3, int a4) rVoid;
void __stdcall SDlgSetCursor(HWND hWnd, HCURSOR a2, int a3, int *a4) rVoid;
BOOL __stdcall SDlgSetTimer(int a1, int a2, int a3, void (__stdcall *a4)(int, int, int, int)) rBool;
BOOL __stdcall SDlgKillTimer(int a1, int a2) rBool;
BOOL __stdcall SDlgDrawBitmap(HWND hWnd, int a2, int a3, int a4, int a5, int a6, int a7) rBool;
BOOL __stdcall SDlgDialogBoxParam(HINSTANCE hInst, char *szDialog, int hWnd, WNDPROC func, int selhero_is_good) rBool;
BOOL __stdcall SGdiTextOut(void *pBuffer, int x, int y, int mask, char *str, int len) rBool;
BOOL __stdcall SFileEnableDirectAccess(BOOL enable) rBool;


================================================
FILE: 3rdParty/Storm/Source/storm.def
================================================
LIBRARY      "Storm"

EXPORTS
  SNetCreateGame                @101 NONAME
  SNetDestroy                   @102 NONAME
  ;SNetEnumDevices               @103 NONAME
  ;SNetEnumGames                 @104 NONAME
  ;SNetEnumProviders             @105 NONAME
  SNetDropPlayer                @106 NONAME
  SNetGetGameInfo               @107 NONAME
  ;SNetGetNetworkLatency         @108 NONAME
  SNetGetNumPlayers             @109 NONAME
  SNetGetOwnerTurnsWaiting      @110 NONAME
  ;SNetGetPerformanceData        @111 NONAME
  SNetGetPlayerCaps             @112 NONAME
  SNetGetPlayerName             @113 NONAME
  SNetGetProviderCaps           @114 NONAME
  SNetGetTurnsInTransit         @115 NONAME
  SNetInitializeDevice          @116 NONAME
  SNetInitializeProvider        @117 NONAME
  SNetJoinGame                  @118 NONAME
  SNetLeaveGame                 @119 NONAME
  SNetPerformUpgrade            @120 NONAME
  SNetReceiveMessage            @121 NONAME
  SNetReceiveTurns              @122 NONAME
  SNetRegisterEventHandler      @123 NONAME
  ;SNetResetLatencyMeasurements  @124 NONAME
  SNetSelectGame                @125 NONAME
  ;SNetSelectProvider            @126 NONAME
  SNetSendMessage               @127 NONAME
  SNetSendTurn                  @128 NONAME
  SNetSetBasePlayer             @129 NONAME
  SNetSetGameMode               @130 NONAME
  SNetUnregisterEventHandler    @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
  SFileCloseFile                @253 NONAME
  ;SFileDdaBegin                 @254 NONAME
  SFileDdaBeginEx               @255 NONAME
  SFileDdaDestroy               @256 NONAME
  SFileDdaEnd                   @257 NONAME
  SFileDdaGetPos                @258 NONAME
  ;SFileDdaGetVolume             @259 NONAME
  SFileDdaInitialize            @260 NONAME
  SFileDdaSetVolume             @261 NONAME
  SFileDestroy                  @262 NONAME
  SFileEnableDirectAccess       @263 NONAME
  SFileGetFileArchive           @264 NONAME
  SFileGetFileSize              @265 NONAME
  SFileOpenArchive              @266 NONAME
  SFileOpenFile                 @267 NONAME
  SFileOpenFileEx               @268 NONAME
  SFileReadFile                 @269 NONAME
  SFileSetBasePath              @270 NONAME
  SFileSetFilePointer           @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
  SDrawGetObjects               @347 NONAME
  SDrawGetScreenSize            @348 NONAME
  ;SDrawGetServiceLevel          @349 NONAME
  SDrawLockSurface              @350 NONAME
  SDrawManualInitialize         @351 NONAME
  SDrawMessageBox               @352 NONAME
  SDrawPostClose                @353 NONAME
  SDrawRealizePalette           @354 NONAME
  ;SDrawSelectGdiSurface         @355 NONAME
  SDrawUnlockSurface            @356 NONAME
  SDrawUpdatePalette            @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
  ;SMemDestroy                   @402 NONAME
  SMemFree                      @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
  SRegLoadString                @422 NONAME
  SRegLoadValue                 @423 NONAME
  SRegSaveData                  @424 NONAME
  SRegSaveString                @425 NONAME
  SRegSaveValue                 @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
  SVidGetSize                   @452 NONAME
  SVidInitialize                @453 NONAME
  SVidPlayBegin                 @454 NONAME
  ;SVidPlayBeginFromMemory       @455 NONAME
  SVidPlayContinue              @456 NONAME
  SVidPlayContinueSingle        @457 NONAME
  SVidPlayEnd                   @458 NONAME
  ;SVidSetVolume                 @459 NONAME
  ;Storm460                      @460 NONAME
  SErrDisplayError              @461 NONAME
  SErrGetErrorStr               @462 NONAME
  SErrGetLastError              @463 NONAME
  ;SErrRegisterMessageSource     @464 NONAME
  SErrSetLastError              @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
  SStrHash                      @502 NONAME
  SStrPack                      @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


================================================
FILE: 3rdParty/Storm/Source/storm.h
================================================
#pragma once

#ifndef __BLIZZARD_STORM_HEADER
#define __BLIZZARD_STORM_HEADER

#include <windows.h>
#include <winuser.h>
#include <winsock.h>
#include <ddraw.h>
#include <limits>

// Note to self: Linker error => forgot a return value in cpp

// Storm API definition
#ifndef STORMAPI
#define STORMAPI __stdcall
#endif

#ifndef __STORM_SMAX
#define __STORM_SMAX(x,y) (x < y ? y : x)
#endif

#ifndef __STORM_SSIZEMAX
#define __STORM_SSIZEMAX(x,y) (__STORM_SMAX(sizeof(x),sizeof(y)))
#endif

#ifndef __STORM_SMIN
#define __STORM_SMIN(x,y) (x < y ? x : y)
#endif

#ifndef __STORM_SSIZEMIN
#define __STORM_SSIZEMIN(x,y) (__STORM_SMIN(sizeof(x),sizeof(y)))
#endif

typedef struct _WRECT
{
  WORD  left;
  WORD  top;
  WORD  right;
  WORD  bottom;
} WRECT, *PWRECT;

typedef struct _WPOINT
{
  WORD  x;
  WORD  y;
} WPOINT, *PWPOINT;

typedef struct _WSIZE
{
  WORD  cx;
  WORD  cy;
} WSIZE, *PWSIZE;

#ifdef __cplusplus
static float infinity = std::numeric_limits<float>::infinity();

struct CCritSect {
	CRITICAL_SECTION m_critsect;

	CCritSect()
	{
		InitializeCriticalSection(&m_critsect);
	}
	~CCritSect()
	{
		DeleteCriticalSection(&m_critsect);
	}
	void Enter()
	{
		EnterCriticalSection(&m_critsect);
	}
	void Leave()
	{
		LeaveCriticalSection(&m_critsect);
	}
};
#endif



// Game states
#define GAMESTATE_PRIVATE 0x01
#define GAMESTATE_FULL    0x02
#define GAMESTATE_ACTIVE  0x04
#define GAMESTATE_STARTED 0x08
#define GAMESTATE_REPLAY  0x80

#define PS_CONNECTED 0x10000
#define PS_TURN_ARRIVED 0x20000
#define PS_ACTIVE 0x40000

#define LEAVE_ENDING 0x40000004
#define LEAVE_DROP 0x40000006

#if defined(__GNUC__) || defined(__cplusplus)
extern "C" {
#endif

BOOL STORMAPI SNetCreateGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, char *GameTemplateData, int GameTemplateSize, int playerCount, const char *creatorName, const char *a11, int *playerID);
BOOL STORMAPI SNetDestroy();

/*  SNetDropPlayer @ 106
 *
 *  Drops a player from the current game.
 *
 *  playerid:     The player ID for the player to be dropped.
 *  flags:
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
BOOL
STORMAPI
SNetDropPlayer(
      int playerid,
      DWORD flags);

/*  SNetGetGameInfo @ 107
 *
 *  Retrieves specific game information from Storm, such as name, password,
 *  stats, mode, game template, and players.
 *
 *  type:         The type of data to retrieve. See GAMEINFO_ flags.
 *  dst:          The destination buffer for the data.
 *  length:       The maximum size of the destination buffer.
 *  byteswritten: The number of bytes written to the destination buffer.
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
BOOL
STORMAPI
SNetGetGameInfo(
    int type,
    void *dst,
    unsigned int length,
    unsigned int *byteswritten);


#define SNGetGameInfo(typ,dst) SNetGetGameInfo(typ, &dst, sizeof(dst))



// Game info fields
#define GAMEINFO_NAME           1
#define GAMEINFO_PASSWORD       2
#define GAMEINFO_STATS          3
#define GAMEINFO_MODEFLAG       4
#define GAMEINFO_GAMETEMPLATE   5
#define GAMEINFO_PLAYERS        6


BOOL STORMAPI SNetGetNumPlayers(int *firstplayerid, int *lastplayerid, int *activeplayers);


typedef struct _CAPS
{
  DWORD dwSize;                 // Size of this structure  // sizeof(CAPS)
  DWORD dwUnk_0x04;             // Some flags?
  DWORD maxmessagesize;         // Size of the packet buffer, must be beteen 128 and 512
  DWORD dwUnk_0x0C;             // Unknown
  DWORD dwDisplayedPlayerCount; // Displayed player count in the mode selection list
  DWORD dwUnk_0x14;             // some kind of timeout or timer related
  DWORD dwPlayerLatency;        // ... latency?
  DWORD dwPlayerCount;          // the number of players that can participate, must be between 1 and 20
  DWORD dwCallDelay;            // the number of calls before data is sent over the network // between 2 and 8; single player is set to 1
} CAPS, *PCAPS;


BOOL STORMAPI SNetGetPlayerCaps(char playerid, PCAPS playerCaps);

/*  SNetGetPlayerName @ 113
 *
 *  Retrieves the name of a player given their player ID.
 *
 *  playerid:     The player's ID.
 *  buffer:       The buffer that will receive the name.
 *  buffersize:   The maximum size of buffer.
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
BOOL
STORMAPI
SNetGetPlayerName(
      int playerid,
      char *buffer,
      unsigned int buffersize);

/*  SNetGetProviderCaps @ 114
 *
 *  Retrieves network provider capacity information.
 *
 *  providerCaps: A pointer to a CAPS structure that will receive the information.
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
//BOOL
//STORMAPI
//SNetGetProviderCaps(
//      PCAPS providerCaps);

/*  SNetGetTurnsInTransit @ 115
 *
 *  Retrieves the number of turns (buffers) that have been queued
 *  before sending them over the network.
 *
 *  turns: A pointer to an integer that will receive the value.
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
BOOL
STORMAPI
SNetGetTurnsInTransit(
      int *turns);


BOOL STORMAPI SNetInitializeDevice(int a1, int a2, int a3, int a4, int *a5);

// Network provider structures
typedef struct _client_info
{
  DWORD dwSize; // 60
  char  *pszName;
  char  *pszVersion;
  DWORD dwProduct;
  DWORD dwVerbyte;
  DWORD dwUnk5;
  DWORD dwMaxPlayers;
  DWORD dwUnk7;
  DWORD dwUnk8;
  DWORD dwUnk9;
  DWORD dwUnk10; // 0xFF
  char  *pszCdKey;
  char  *pszCdOwner;
  DWORD dwIsShareware;
  DWORD dwLangId;
} client_info;

typedef struct _user_info
{
  DWORD dwSize; // 16
  char  *pszPlayerName;
  char  *pszUnknown;
  DWORD dwUnknown;
} user_info;

typedef struct _battle_info
{
  DWORD dwSize;   // 92
  DWORD dwUnkType;
  HWND  hFrameWnd;
  void  *pfnBattleGetResource;
  void  *pfnBattleGetErrorString;
  void  *pfnBattleMakeCreateGameDialog;
  void  *pfnBattleUpdateIcons;
  DWORD dwUnk_07;
  void  *pfnBattleErrorDialog;
  void  *pfnBattlePlaySound;
  DWORD dwUnk_10;
  void  *pfnBattleGetCursorLink;
  DWORD dwUnk_12;
  void  *pfnUnk_13;
  DWORD dwUnk_14;
  void  *pfnBattleMakeProfileDialog;
  char  *pszProfileStrings;
  void  *pfnBattleDrawProfileInfo;
  void  *pfnUnk_18;
  DWORD dwUnk_19;
  void  *pfnUnk_20;
  void  *pfnUnk_21;
  void  *pfnBattleSetLeagueName;
} battle_info;

typedef struct _module_info
{
  DWORD dwSize; // 20
  char  *pszVersionString;
  char  *pszModuleName;
  char  *pszMainArchive;
  char  *pszPatchArchive;
} module_info;

typedef struct _game
{
  DWORD     dwIndex;
  DWORD     dwGameState;
  DWORD     dwUnk_08;
  SOCKADDR  saHost;
  DWORD     dwUnk_1C;
  DWORD     dwTimer;
  DWORD     dwUnk_24;
  char      szGameName[128];
  char      szGameStatString[128];
  struct _game     *pNext;
  void      *pExtra;
  DWORD     dwExtraBytes;
  DWORD     dwProduct;
  DWORD     dwVersion;
} game;

typedef struct _storm_head
{
  WORD wChecksum;
  WORD wLength;
  WORD wSent;
  WORD wReceived;
  BYTE bCommandClass;
  BYTE bCommandType;
  BYTE bPlayerId;
  BYTE bFlags;
} storm_head;


// Traffic flags
#define STRAFFIC_NORMAL 0
#define STRAFFIC_VERIFY 1
#define STRAFFIC_RESEND 2
#define STRAFFIC_REPLY  4


/*  SNetInitializeProvider @ 117
 *
 *  Initializes a provider by storing the provider callbacks, and calling
 *  spiInitialize() using the parameters passed to this function.
 *  Note: The use of the parameters is determined by the network
 *  module.
 *
 *  providerName:     The provider's identifier. Example: 'TENB' (BNET).
 *  gameClientInfo:   A pointer to a clientInfo structure containing
 *                    information about the game client.
 *  userData:         A pointer to a userInfo structure containing information
 *                    about the player.
 *  bnCallbacks:      A pointer to a battleInfo structure containing callbacks
 *                    and other information that is specific to Battle.net.
 *  moduleData:       A pointer to a moduleInfo structure containing the
 *                    executable information and paths to MPQ archives.
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
//BOOL
//STORMAPI
//SNetInitializeProvider(
//      DWORD       providerName,
//      client_info  *gameClientInfo,
//      user_info    *userData,
//      battle_info  *bnCallbacks,
//      module_info  *moduleData);


BOOL STORMAPI SNetJoinGame(int id, char *gameName, char *gamePassword, char *playerName, char *userStats, int *playerid);

/*  SNetLeaveGame @ 119
 *
 *  Notifies Storm that the player has left the game. Storm will
 *  notify all connected peers through the network provider.
 *
 *  type: The leave type. It doesn't appear to be important, no documentation available.
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
BOOL
STORMAPI
SNetLeaveGame(
    int type);

BOOL STORMAPI SNetPerformUpgrade(DWORD *upgradestatus);
BOOL STORMAPI SNetReceiveMessage(int *senderplayerid, char **data, int *databytes);
BOOL STORMAPI SNetReceiveTurns(int a1, int arraysize, char **arraydata, DWORD *arraydatabytes, DWORD *arrayplayerstatus);

// Values for arrayplayerstatus
#define SNET_PS_OK             0
#define SNET_PS_WAITING        2
#define SNET_PS_NOTRESPONDING  3
#define SNET_PS_UNKNOWN        default


// Event structure
typedef struct _s_evt
{
  DWORD dwFlags;
  int   dwPlayerId;
  void  *pData;
  DWORD dwSize;
} S_EVT, *PS_EVT;

typedef void (STORMAPI *SEVTHANDLER)(struct _SNETEVENT *);

// @TODO: "type" is unknown.
//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);

/*  SNetSendMessage @ 127
 *
 *  Sends a message to a player given their player ID. Network message
 *  is sent using class 01 and is retrieved by the other client using
 *  SNetReceiveMessage().
 *
 *  playerID:   The player index of the player to receive the data.
 *              Conversely, this field can be one of the following constants:
 *                  SNPLAYER_ALL      | Sends the message to all players, including oneself.
 *                  SNPLAYER_OTHERS   | Sends the message to all players, except for oneself.
 *  data:       A pointer to the data.
 *  databytes:  The amount of bytes that the data pointer contains.
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
BOOL
STORMAPI
SNetSendMessage(
      int    playerID,
      void   *data,
      unsigned int databytes);


// Macro values to target specific players
#define SNPLAYER_ALL    -1
#define SNPLAYER_OTHERS -2


/*  SNetSendTurn @ 128
 *
 *  Sends a turn (data packet) to all players in the game. Network data
 *  is sent using class 02 and is retrieved by the other client using
 *  SNetReceiveTurns().
 *
 *  data:       A pointer to the data.
 *  databytes:  The amount of bytes that the data pointer contains.
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
BOOL
STORMAPI
SNetSendTurn(
      char    *data,
      unsigned int  databytes);

/*  SNetSetGameMode @ 130
 *
 *  Set's the game's mode flags, notifying the network
 *  provider that the state of the game has changed.
 *  For example: notifies Battle.net when the game is
 *  full.
 *
 *  You should first call SNetGetGameInfo to retrieve
 *  the existing mode flags.
 *
 *  modeFlags:  The new flags for the game mode.
 *                  GAMESTATE_PRIVATE     | The game is passworded.
 *                  GAMESTATE_FULL        | The game is full.
 *                  GAMESTATE_ACTIVE      | The game is available.
 *                  GAMESTATE_STARTED     | The game is in progress.
 *                  GAMESTATE_REPLAY      | The game is a replay.
 *  makePublic: Used to make the game a public game, removing the GAMESTATE_PRIVATE flag.
 *
 *  Returns TRUE if the function was called successfully and FALSE otherwise.
 */
BOOL
STORMAPI
SNetSetGameMode(
      DWORD modeFlags,
      BOOLEAN makePublic);

#define SNMakeGamePublic() SNetSetGameMode( (DWORD mode, SNetGetGameInfo(GAMEINFO_MODEFLAGS, &mode, 4), mode), true)

BOOL STORMAPI SNetEnumGamesEx(int a1, int a2, int (__fastcall *callback)(DWORD, DWORD, DWORD), int *hintnextcall);
BOOL STORMAPI SNetSendServerChatCommand(const char *command);

BOOL STORMAPI SNetDisconnectAll(DWORD flags);
BOOL STORMAPI SNetCreateLadderGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, DWORD dwGameLadderType, DWORD dwGameModeFlags, char *GameTemplateData, int GameTemplateSize, int playerCount, char *creatorName, char *a11, int *playerID);

#define SNET_GAME_RESULT_WIN        1
#define SNET_GAME_RESULT_LOSS       2
#define SNET_GAME_RESULT_DRAW       3
#define SNET_GAME_RESULT_DISCONNECT 4

BOOL STORMAPI SNetReportGameResult(unsigned a1, int size, int *results, const char* headerInfo, const char* detailInfo);

int  STORMAPI SNetSendLeagueCommand(char *cmd, char *callback);
int  STORMAPI SNetSendReplayPath(int a1, int a2, char *replayPath);
int  STORMAPI SNetGetLeagueName(int leagueID);
BOOL STORMAPI SNetGetPlayerNames(char **names);
int  STORMAPI SNetLeagueLogout(char *bnetName);
int  STORMAPI SNetGetLeaguePlayerName(char *curPlayerLeageName, unsigned int nameSize);

HGDIOBJ STORMAPI SDlgDefDialogProc(HWND hDlg, signed int DlgType, HDC textLabel, HWND hWnd);

HANDLE STORMAPI SDlgDialogBoxIndirectParam(HMODULE hModule, LPCSTR lpName, HWND hWndParent, LPVOID lpParam, LPARAM lParam);

BOOL STORMAPI SDlgEndDialog(HWND hDlg, HANDLE nResult);

BOOL STORMAPI SDlgSetControlBitmaps(HWND parentwindow, int *id, int a3, char *buffer2, char *buffer, int flags, int mask);

/*
// lpCursorName can only be IDC_ARROW
BOOL STORMAPI SDlgSetSystemCursor(void *lpSrcBuffer, void *p_a2, LPSIZE lpSize, LPCSTR lpCursorName);
*/

BOOL STORMAPI SDlgBltToWindowI(HWND hWnd, HRGN a2, char *a3, int a4, void *buffer, RECT *rct, SIZE *size, int a8, int a9, DWORD rop);
BOOL STORMAPI SDlgBltToWindowE(HWND hWnd, HRGN a2, char *a3, int a4, void *buffer, RECT *rct, SIZE *size, int a8, int a9, DWORD rop);
BOOL STORMAPI SDlgSetBitmapE(HWND hWnd, int a2, char *src, int mask1, int flags, int a6, int a7, int width, int a9, int mask2);

int  STORMAPI Ordinal224(int a1);

BOOL STORMAPI SFileCloseArchive(HANDLE hArchive);
BOOL STORMAPI SFileCloseFile(HANDLE hFile);

BOOL STORMAPI SFileDdaBeginEx(HANDLE hFile, DWORD flags, DWORD mask, unsigned __int32 lDistanceToMove, signed __int32 volume, signed int pan, int a7);
BOOL STORMAPI SFileDdaDestroy();
BOOL STORMAPI SFileDdaEnd(HANDLE hFile);
BOOL STORMAPI SFileDdaGetPos(HANDLE hFile, DWORD *current, DWORD *end);

BOOL STORMAPI SFileDdaInitialize(HANDLE directsound);
BOOL STORMAPI SFileDdaSetVolume(HANDLE hFile, signed int bigvolume, signed int volume);
BOOL STORMAPI SFileDestroy();

BOOL STORMAPI SFileGetFileArchive(HANDLE hFile, HANDLE *archive);
LONG STORMAPI SFileGetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh);
BOOL STORMAPI SFileOpenArchive(const char *szMpqName, DWORD dwPriority, DWORD dwFlags, HANDLE *phMpq);

// values for dwFlags
enum MPQFlags
{
  MPQ_NO_LISTFILE       = 0x0010,
  MPQ_NO_ATTRIBUTES     = 0x0020,
  MPQ_FORCE_V1          = 0x0040,
  MPQ_CHECK_SECTOR_CRC  = 0x0080
};


BOOL STORMAPI SFileOpenFile(const char *filename, HANDLE *phFile);
BOOL STORMAPI SFileOpenFileEx(HANDLE hMpq, const char *szFileName, DWORD dwSearchScope, HANDLE *phFile);

// values for dwSearchScope
enum SFileFlags
{
  SFILE_FROM_MPQ      = 0x00000000,
  SFILE_FROM_ABSOLUTE = 0x00000001,
  SFILE_FROM_RELATIVE = 0x00000002,
  SFILE_FROM_DISK     = 0x00000004
};

BOOL STORMAPI SFileReadFile(HANDLE hFile, void *buffer, DWORD nNumberOfBytesToRead, DWORD *read, LONG *lpDistanceToMoveHigh);

void STORMAPI SFileSetLocale(LCID lcLocale);

// mode:    0 - Silent (callback is NULL)
//          1 - Application Defined
//          2 - Handled by storm (callback is NULL)
// BOOL STORMAPI callback(const char *pszFilename, DWORD dwErrCode, DWORD dwErrCount)
BOOL STORMAPI SFileSetIoErrorMode(DWORD mode, BOOL (STORMAPI *callback)(const char*,DWORD,DWORD) );

BOOL STORMAPI SFileGetArchiveName(HANDLE hArchive, char *name, int length);
BOOL STORMAPI SFileGetFileName(HANDLE hFile, char *buffer, int length);

BOOL STORMAPI SFileLoadFile(char *filename, void *buffer, int buffersize, int a4, int a5);
BOOL STORMAPI SFileUnloadFile(HANDLE hFile);
BOOL STORMAPI SFileLoadFileEx(void *hArchive, char *filename, int a3, int a4, int a5, DWORD searchScope, struct _OVERLAPPED *lpOverlapped);

// Options are DWORD except for #6
// 1: [TRUE|FALSE] - If true, reports resource leaks (SErrReportResourceLeak/SErrReportNamedResourceLeak) to the attached debugger instead of a message box.
// 2: This option is unused.
// 3: [TRUE|FALSE] - If true, reports general memory leaks to the attached debugger instead of a message box.
// 4: This option is unused.
// 5: [TRUE|FALSE] - If true, reports log messages and log dumps to the attached debugger.
// 6: { DWORD blocks_allocated; DWORD blocks_freed; } Used to determine the amount of memory/heap blocks that have been allocated and freed by storm.
//    Can also be used for custom allocations outside of storm.
//
//BOOL STORMAPI StormGetOption(int type, void *pValue, unsigned int *pSize);
//BOOL STORMAPI StormSetOption(int type, void *pValue, unsigned int size);

BOOL STORMAPI SBltROP3(void *lpDstBuffer, void *lpSrcBuffer, int srcDrawWidth, int srcDrawHeight, int dstWidth, int srcWidth, int a7, DWORD rop);
BOOL STORMAPI SBltROP3Clipped(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt, int a4, void *lpSrcBuffer, RECT *lpSrcRect, POINT *lpSrcPt, int a8, int a9, DWORD rop);
BOOL STORMAPI SBltROP3Tiled(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt, int a4, void *lpSrcBuffer, RECT *lpSrcRect, POINT *lpSrcPt, int a8, int a9, DWORD rop);

#define SBMP_DEFAULT  0
#define SBMP_BMP      1
#define SBMP_PCX      2
#define SBMP_TGA      3


/*  SBmpDecodeImage @ 321
 *
 *  Decodes an image that has already been loaded into a buffer.
 *
 *  dwImgType:        Optional, the image type. See SBMP_ macros.
 *  pSrcBuffer:       A pointer to the source buffer.
 *  dwSrcBuffersize:  The size of the data in the source buffer.
 *  pPalette:         An optional buffer that receives the image palette.
 *  pDstBuffer:       A buffer that receives the image data.
 *  dwDstBuffersize:  The size of the specified image buffer. If the size of the
 *                    destination buffer is 0, then the destination buffer is not used.
 *  pdwWidth:         An optional variable that receives the image width.
 *  pdwHeight:        An optional variable that receives the image height.
 *  pdwBpp:           An optional variable that receives the image bits per pixel.
 *
 *  Returns TRUE if the image was supported and decoded correctly, FALSE otherwise.
 */
BOOL
STORMAPI
SBmpDecodeImage(
    DWORD        dwImgType,
    void         *pSrcBuffer,
    DWORD        dwSrcBuffersize,
    PALETTEENTRY *pPalette,
    void         *pDstBuffer,
    DWORD        dwDstBuffersize,
    DWORD        *pdwWidth,
    DWORD        *pdwHeight,
    DWORD        *pdwBpp);


/*  SBmpLoadImage @ 323
 *
 *  Load an image from an available archive into a buffer.
 *
 *  pszFileName:  The name of the graphic in an active archive.
 *  pPalette:     An optional buffer that receives the image palette.
 *  pBuffer:      A buffer that receives the image data.
 *  dwBuffersize: The size of the specified image buffer.
 *  pdwWidth:     An optional variable that receives the image width.
 *  pdwHeight:    An optional variable that receives the image height.
 *  pdwBpp:       An optional variable that receives the image bits per pixel.
 *
 *  Returns TRUE if the image was supported and loaded correctly, FALSE otherwise.
 */
BOOL
STORMAPI
SBmpLoadImage(
    const char   *pszFileName,
    PALETTEENTRY *pPalette ,
    BYTE         *pBuffer,
    DWORD        dwBuffersize,
    DWORD        *pdwWidth,
    DWORD        *pdwHeight,
    DWORD        *pdwBpp);

/*  SBmpSaveImage @ 324
 *
 *  Save an image from a buffer to a file. The image format is determined
 *  from the filename and is either .gif, .pcx, .tga, or .bmp being the default.
 *
 *  pszFileName:  The name of the file to create.
 *  pPalette:     A pointer to a palette array containing 256 entries.
 *  pBuffer:      A buffer containing the image data.
 *  pdwWidth:     The width of the image.
 *  pdwHeight:    The height of the image.
 *  pdwBpp:       The bits per pixel.
 *
 *  Returns TRUE if the image was saved correctly, FALSE otherwise.
 */
BOOL
STORMAPI
SBmpSaveImage(
    const char    *pszFileName,
    PALETTEENTRY  *pPalette,
    void          *pBuffer,
    DWORD         dwWidth,
    DWORD         dwHeight,
    DWORD         dwBpp);


HANDLE STORMAPI SBmpAllocLoadImage(const char *fileName, PALETTEENTRY *palette, void **buffer, int *width, int *height, int unused6, int unused7, void *(STORMAPI *allocFunction)(DWORD));

BOOL STORMAPI SCodeCompile(char *directives1, char *directives2, char *loopstring, unsigned int maxiterations, unsigned int flags, HANDLE handle);
BOOL STORMAPI SCodeDelete(HANDLE handle);

int  STORMAPI SCodeExecute(HANDLE handle, int a2);

BOOL STORMAPI SDrawAutoInitialize(HINSTANCE hInst, LPCSTR lpClassName, LPCSTR lpWindowName, WNDPROC pfnWndProc, int nMode, int nWidth, int nHeight, int nBits);


/*  SDrawCaptureScreen @ 342
 *
 *  Saves a screenshot from the primary surface being handled by Storm.
 *
 *  pszOutput: The name of the output file. The save format is automatically set by the extension.
 *             The extensions supported are .gif, .pcx, .tga, and .bmp. It will write a bitmap by default.
 *
 *  Returns TRUE if successful and FALSE otherwise.
 */
BOOL
STORMAPI
SDrawCaptureScreen(
    const char *pszOutput);


/*  SDrawGetFrameWindow @ 346
 *
 *  Retrieves the window handle that was specified in
 *  SDrawManualInitialize or created in SDrawAutoInitialize.
 *
 *  sdraw_framewindow: Optional variable that receives the returned handle.
 *
 *  Returns the handle of the window.
 */
HWND
STORMAPI
SDrawGetFrameWindow(
    HWND *sdraw_framewindow);


/*  SDrawGetObjects @ 347
 *
 *  Retrieves the object information that was initialized using
 *  SDrawManualInitialize or SDrawAutoInitialize.
 *
 *  ddInterface:    The DirectDraw interface.
 *  primarySurface: The primary DirectDraw surface.
 *  surface2:       A second unknown surface.
 *  surface3:       A third unknown surface.
 *  backSurface:    The back DirectDraw surface.
 *  ddPalette:      The DirectDraw palette.
 *  hPalette:       The palette handle.
 *
 *  Returns FALSE if the direct draw interface has not been initialized.
 */
BOOL
STORMAPI
SDrawGetObjects(
    LPDIRECTDRAW        *ddInterface ,
    LPDIRECTDRAWSURFACE *primarySurface,
    LPDIRECTDRAWSURFACE *surface2,
    LPDIRECTDRAWSURFACE *surface3,
    LPDIRECTDRAWSURFACE *backSurface ,
    LPDIRECTDRAWPALETTE *ddPalette,
    HPALETTE            *hPalette);


/*  SDrawGetScreenSize @ 348
 *
 *  Obtains information for the current screen resolution.
 *
 *  pdwWidth:   Optional variable that receives the screen width.
 *  pdwHeight:  Optional variable that receives the screen height.
 *  pdwBpp:     Optional variable that receives the bits per pixel.
 *
 *  Returns FALSE if no variables were specified.
 */
BOOL
STORMAPI
SDrawGetScreenSize(
    DWORD *pdwWidth,
    DWORD *pdwHeight,
    DWORD *pdwBpp);


// undefined
BOOL STORMAPI SDrawLockSurface(int surfacenumber, RECT *lpDestRect, void **lplpSurface, int *lpPitch, int arg_unused);


/*  SDrawManualInitialize @ 351
 *
 *  Sets the DirectDraw variables to be referenced in Storm.
 *
 *  hWnd:           The handle of the DirectDraw window.
 *  ddInterface:    The DirectDraw interface.
 *  primarySurface: The first and primary surface.
 *  surface2:       A second surface. Behaviour not completely known.
 *  surface3:       A third surface. Behaviour not completely known.
 *  backSurface:    The fourth and final surface. The back surface.
 *  ddPalette:      The DirectDraw palette if the application requires it.
 *  hPalette:       The palette handle that belongs to the window.
 *                  If this is NULL and ddPalette is specified, then it
 *                  will be created automatically. A palette can be created
 *                  using the CreatePalette WinAPI function.
 *
 *  Returns FALSE if no variables were specified.
 */
BOOL
STORMAPI
SDrawManualInitialize(
     HWND hWnd,
     LPDIRECTDRAW ddInterface,
     LPDIRECTDRAWSURFACE primarySurface,
     LPDIRECTDRAWSURFACE surface2,
     LPDIRECTDRAWSURFACE surface3,
     LPDIRECTDRAWSURFACE backSurface,
     LPDIRECTDRAWPALETTE ddPalette,
     HPALETTE hPalette);


/*  SDrawPostClose @ 353
 *
 *  Posts a WM_QUIT message to the active drawing window specified
 *  in SDrawManualInitialize or created in SDrawAutoInitialize.
 *
 *  Returns TRUE if successful and FALSE otherwise.
 */
BOOL
STORMAPI
SDrawPostClose();


// undefined
//BOOL STORMAPI SDrawRealizePalette();

BOOL STORMAPI SDrawUnlockSurface(int surfacenumber, void *lpSurface, int a3, RECT *lpRect);
BOOL STORMAPI SDrawUpdatePalette(unsigned int firstentry, unsigned int numentries, PALETTEENTRY *pPalEntries, int a4);

BOOL STORMAPI SEvtDispatch(DWORD dwMessageID, DWORD dwFlags, int type, PS_EVT pEvent);

BOOL STORMAPI SGdiDeleteObject(HANDLE handle);

BOOL STORMAPI SGdiExtTextOut(int a1, int a2, int a3, int a4, unsigned int a8, signed int a6, signed int a7, const char *pszString, unsigned int arg20);
BOOL STORMAPI SGdiImportFont(HGDIOBJ handle, int windowsfont);

BOOL STORMAPI SGdiSelectObject(int handle);
BOOL STORMAPI SGdiSetPitch(int pitch);

BOOL STORMAPI Ordinal393(char *pszString, int, int);


/*  SMemAlloc @ 401
 *
 *  Allocates a block of memory. This block is different
 *  from the standard malloc by including a header containing
 *  information about the block.
 *
 *  amount:       The amount of memory to allocate, in bytes.
 *  logfilename:  The name of the file or object that this call belongs to.
 *  logline:      The line in the file or one of the SLOG_ macros.
 *  defaultValue: The default value of a byte in the allocated memory.
 *
 *  Returns a pointer to the allocated memory. This pointer does NOT include
 *  the additional storm header.
 */
void *
    STORMAPI
    SMemAlloc(
        unsigned int amount,
        const char *logfilename,
        int logline,
        int defaultValue);

#define SMAlloc(amount) SMemAlloc((amount), __FILE__, __LINE__)


/*  SMemFree @ 403
 *
 *  Frees a block of memory that was created using SMemAlloc,
 *  includes the log file and line for debugging purposes.
 *
 *  location:     The memory location to be freed.
 *  logfilename:  The name of the file or object that this call belongs to.
 *  logline:      The line in the file or one of the SLOG_ macros.
 *  defaultValue:
 *
 *  Returns TRUE if the call was successful and FALSE otherwise.
 */
BOOL
STORMAPI
SMemFree(
    void *location,
    const char *logfilename,
    int  logline,
    char defaultValue);

#define SMFree(loc) SMemFree((loc), __FILE__, __LINE__)


/*  SMemReAlloc @ 405
 *
 *  Reallocates a block of memory that was created using SMemAlloc,
 *  includes the log file and line for debugging purposes.
 *
 *  location:     The memory location to be re-allocated. If this parameter
 *                is NULL, then SMemAlloc is called with the remaining parameters.
 *  amount:       The amount of memory to re-allocate.
 *  logfilename:  The name of the file or object that this call belongs to.
 *  logline:      The line in the file or one of the SLOG_ macros.
 *  defaultValue:
 *
 *  Returns a pointer to the re-allocated memory. This pointer does NOT include
 *  the additional storm header.
 */
void*
STORMAPI
SMemReAlloc(
    void    *location,
    unsigned int  amount,
    const char *logfilename,
    int     logline,
    char    defaultValue);

#define SMReAlloc(loc,s) SMemReAlloc((loc),(s), __FILE__, __LINE__)

// Can be provided instead of logline/__LINE__ parameter to indicate different errors.
#define SLOG_EXPRESSION    0
#define SLOG_FUNCTION     -1
#define SLOG_OBJECT       -2
#define SLOG_HANDLE       -3
#define SLOG_FILE         -4
#define SLOG_EXCEPTION    -5


BOOL STORMAPI SRegLoadData(const char *keyname, const char *valuename, int size, LPBYTE lpData, BYTE flags, LPDWORD lpcbData);
BOOL STORMAPI SRegLoadString(const char *keyname, const char *valuename, BYTE flags, char *buffer, unsigned int buffersize);
BOOL STORMAPI SRegLoadValue(const char *keyname, const char *valuename, BYTE flags, int *value);
BOOL STORMAPI SRegSaveData(const char *keyname, const char *valuename, int size, BYTE *lpData, DWORD cbData);
BOOL STORMAPI SRegSaveString(const char *keyname, const char *valuename, BYTE flags, char *string);
BOOL STORMAPI SRegSaveValue(const char *keyname, const char *valuename, BYTE flags, DWORD result);

BOOL STORMAPI SRegDeleteValue(const char *keyname, const char *valuename, BYTE flags);

// Flags for SReg functions

// Default behaviour checks both HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER
// relative to the "Software\\Blizzard Entertainment\\" key in both hives.
#define SREG_NONE                   0x00000000
#define SREG_EXCLUDE_LOCAL_MACHINE  0x00000001  // excludes checking the HKEY_LOCAL_MACHINE hive
#define SREG_BATTLE_NET             0x00000002  // sets the relative key to "Software\\Battle.net\\" instead
#define SREG_EXCLUDE_CURRENT_USER   0x00000004  // excludes checking the HKEY_CURRENT_USER hive
#define SREG_ABSOLUTE               0x00000010  // specifies that the key is not a relative key

BOOL STORMAPI STransBlt(void *lpSurface, int x, int y, int width, HANDLE hTrans);
BOOL STORMAPI STransBltUsingMask(void *lpDest, void *lpSource, int pitch, int width, HANDLE hTrans);

BOOL STORMAPI STransDelete(HANDLE hTrans);

BOOL STORMAPI STransDuplicate(HANDLE hTransSource, HANDLE hTransDest);
BOOL STORMAPI STransIntersectDirtyArray(HANDLE hTrans, char * dirtyarraymask, unsigned flags, HANDLE * phTransResult);
BOOL STORMAPI STransInvertMask(HANDLE hTrans, HANDLE * phTransResult);

BOOL STORMAPI STransSetDirtyArrayInfo(int width, int height, int depth, int bits);

BOOL STORMAPI STransPointInMask(HANDLE hTrans, int x, int y); // Name is a pure guess
BOOL STORMAPI STransCombineMasks(HANDLE hTransA, HANDLE hTransB, int left, int top, int flags, HANDLE * phTransResult);

BOOL STORMAPI STransCreateE(void *pBuffer, int width, int height, int bpp, int a5, int bufferSize, HANDLE *phTransOut);
BOOL STORMAPI STransCreateI(void *pBuffer, int width, int height, int bpp, int a5, int bufferSize, HANDLE *phTransOut);

BOOL STORMAPI SVidDestroy();
BOOL STORMAPI SVidGetSize(HANDLE video, int width, int height, int zero);
BOOL STORMAPI SVidInitialize(HANDLE video);
BOOL STORMAPI SVidPlayBegin(const char *filename, int a2, int a3, int a4, int a5, int flags, HANDLE *video);

BOOL STORMAPI SVidPlayContinueSingle(HANDLE video, int a2, int a3);
BOOL STORMAPI SVidPlayEnd(HANDLE video);

/* SErrDisplayError @ 461
 *
 * Displays a formatted error message. The message is detailed and flexible for many applications.
 * The message will be different if there is a debugger attached. Will typically terminate the application
 * unless the option to continue is given.
 *
 *  dwErrMessage:   The error code. See SErrGetLastError and GetLastError.
 *  logfilename:    The name of the file or object that this call belongs to.
 *  logline:        The line in the file or one of the SLOG_ macros.
 *  message:        A message or expression with additional information.
 *  allowOption:    If TRUE, allows the user the option to continue execution, otherwise the program will terminate.
 *  exitCode:       The exit code used for program termination.
 *
 *  Returns TRUE if the user chose to continue execution, FALSE otherwise.
 */
BOOL
STORMAPI
SErrDisplayError(
    DWORD dwErrMsg,
    const char *logfilename,
    int logline,
    const char *message,
    BOOL allowOption,
    int exitCode);

#define SAssert(x) { if ( !(x) ) SErrDisplayError(STORM_ERROR_ASSERTION, __FILE__, __LINE__, #x) }

#define SEDisplayError(err) SErrDisplayError(e, __FILE__, __LINE__)

/*  SErrGetErrorStr @ 462
 *
 *  Retrieves a string that describes the specified error code for
 *  the system, Storm, DirectDraw, or DirectSound.
 *
 *  dwErrCode:    The error code to look up.
 *  buffer:       The destination buffer to receive the string.
 *  bufferchars:  The size of the destination buffer.
 *
 *  Returns TRUE if the call was successful and FALSE otherwise.
 */
BOOL
STORMAPI
SErrGetErrorStr(
    DWORD dwErrCode,
    char *buffer,
    unsigned int bufferchars);

#define SEGetErrorStr(e,b) SErrGetErrorStr(e,b,sizeof(b))


/*  SErrGetLastError @ 463
 *
 *  Retrieves the last error that was specifically
 *  set for the Storm library.
 *
 *  Returns the last error set within the Storm library.
 */
DWORD
STORMAPI
SErrGetLastError();


// Registers a module as a message source for SErrGetErrorStr, always returns TRUE
// groupID is a group in a MessageTable entry for example in STORM_ERROR_BAD_ARGUMENT 0x85100065, 0x510 is the group.
// BOOL STORMAPI SErrRegisterMessageSource(WORD groupID, HMODULE hSourceModule, int a3)


/*  SErrSetLastError @ 465
 *
 *  Sets the last error for the Storm library and the Kernel32 library.
 *
 *  dwErrCode:  The error code that will be set.
 */
void
STORMAPI
SErrSetLastError(
    DWORD dwErrCode);

//
// void STORMAPI SErrReportNamedResourceLeak(const char *pszMsg, const char *pszSubMsg = nullptr)
// void STORMAPI SErrReportResourceLeak(const char *pszMsg)

void STORMAPI SErrSuppressErrors(BOOL suppressErrors);

// Values for dwErrCode
#define STORM_ERROR_ASSERTION                    0x85100000
#define STORM_ERROR_BAD_ARGUMENT                 0x85100065
#define STORM_ERROR_GAME_ALREADY_STARTED         0x85100066
#define STORM_ERROR_GAME_FULL                    0x85100067
#define STORM_ERROR_GAME_NOT_FOUND               0x85100068
#define STORM_ERROR_GAME_TERMINATED              0x85100069
#define STORM_ERROR_INVALID_PLAYER               0x8510006a
#define STORM_ERROR_NO_MESSAGES_WAITING          0x8510006b
#define STORM_ERROR_NOT_ARCHIVE                  0x8510006c
#define STORM_ERROR_NOT_ENOUGH_ARGUMENTS         0x8510006d
#define STORM_ERROR_NOT_IMPLEMENTED              0x8510006e
#define STORM_ERROR_NOT_IN_ARCHIVE               0x8510006f
#define STORM_ERROR_NOT_IN_GAME                  0x85100070
#define STORM_ERROR_NOT_INITIALIZED              0x85100071
#define STORM_ERROR_NOT_PLAYING                  0x85100072
#define STORM_ERROR_NOT_REGISTERED               0x85100073
#define STORM_ERROR_REQUIRES_CODEC1              0x85100074
#define STORM_ERROR_REQUIRES_CODEC2              0x85100075
#define STORM_ERROR_REQUIRES_CODEC3              0x85100076
#define STORM_ERROR_REQUIRES_UPGRADE             0x85100077
#define STORM_ERROR_STILL_ACTIVE                 0x85100078
#define STORM_ERROR_VERSION_MISMATCH             0x85100079
#define STORM_ERROR_MEM_NOT_ALLOCATED            0x8510007a
#define STORM_ERROR_MEM_CORRUPTED                0x8510007b
#define STORM_ERROR_MEM_INVALID                  0x8510007c
#define STORM_ERROR_MEM_MANAGER_NOT_INITIALIZED  0x8510007d
#define STORM_ERROR_MEM_NOT_FREED                0x8510007e
#define STORM_ERROR_RESOURCES_NOT_RELEASED       0x8510007f
#define STORM_ERROR_OUT_OF_BOUNDS                0x85100080
#define STORM_ERROR_NULL_POINTER                 0x85100081
#define STORM_ERROR_CDKEY_MISMATCH               0x85100082
#define STORM_ERROR_FILE_CORRUPTED               0x85100083
#define STORM_ERROR_FATAL                        0x85100084
#define STORM_ERROR_GAMETYPE_UNAVAILABLE         0x85100085


/*  SMemCopy @ 491
 *
 *  Copies a block of memory from source to destination.
 *  This function immediately calls memcpy. See online documentation
 *  of memcpy for more details.
 *
 *  dest:   The destination buffer.
 *  source: The source buffer.
 *  size:   The number of bytes to copy.
 */
void
STORMAPI
SMemCopy(
    void *dest,
    const void *source,
    unsigned int size);

#define SMCopy(d,s) ( SMemCopy(d, s, __STORM_SSIZEMIN(s,d)) )

/*  SMemFill @ 492
 *
 *  Fills a block of memory with the specified character.
 *  This function immediately calls memset. See online documentation
 *  of memset for more details.
 *
 *  dest:   The destination buffer.
 *  source: The size of the destination buffer.
 *  size:   The format to use.
 */
void
STORMAPI
SMemFill(
    void *location,
    unsigned int length,
    char fillWith);

#define SMFill(l,f) (SMemFill(l, sizeof(l), f))

/*  SMemZero @ 494
 *
 *  Fills a block of memory with the integer 0x00 (Zero).
 *
 *  location: The location to write at.
 *  length:   The amount of bytes to write.
 */
void
STORMAPI
SMemZero(
    void *location,
    unsigned int length);

#define SMZero(l) (SMemZero(l, sizeof(l)))


int   STORMAPI SMemCmp(void *location1, void *location2, DWORD size);

#define SMCmp(l,x) ( SMemCmp(l, x, __STORM_SSIZEMIN(x,l)) )

/*  SStrCopy @ 501
 *
 *  Copies a string from src to dest (including NULL terminator)
 *  until the max_length is reached.
 *
 *  dest:         The destination array.
 *  src:          The source array.
 *  max_length:   The maximum length of dest.
 *
 *  Returns the number of characters copied.
 */
int
STORMAPI
SStrCopy(
    char *dest,
    const char *src,
    int max_length);

#define SSCopy(d,s) (SStrCopy(d, s, sizeof(d)))

#define STORM_HASH_ABSOLUTE 1

/*  SStrHash @ 502
 *
 *  Creates a simple hash for the string. This function
 *  should NOT be used for sensitive information.
 *
 *  string:   The input string.
 *  flags:    If STORM_HASH_ABSOLUTE is set then this
              function uses the absolute string, otherwise
              it will convert backslashes to forward
              slashes and some other processing.
 *  seed:     The hash seed. If this value is 0 then the
 *            default value 0x7FED7FED will be used.
 *
 *  Returns the 32-bit hash of the string.
 */
DWORD
STORMAPI
SStrHash(
      const char *string,
      DWORD flags,
      DWORD Seed);

int   STORMAPI SStrPack(char *dest, const char *src, DWORD max_length);

/*  SStrLen @ 506
 *
 *  Retrieves the length of a string.
 *
 *  string:   The input string of which to obtain a
 *            length for.
 *
 *  Returns the length of the string.
 */
int
STORMAPI
SStrLen(
      const char *string);

/*  SStrCmp @ 508
 *
 *  Compares two strings case sensitive.
 *
 *  string1:  The first string.
 *  string2:  The second string.
 *  size:     The maximum amount of characters to compare.
 *
 *  Returns 0 if strings are equal. See strcmp documentation for more details.
 */
int
STORMAPI
SStrCmp(
      const char *string1,
      const char *string2,
      unsigned int size);

#define SSCmp(s,x) ( SStrCmp(s,x,__STORM_SSIZEMIN(s,x)) )

/*  SStrCmpI @ 509
 *
 *  Compares two strings case insensitive.
 *
 *  string1:  The first string.
 *  string2:  The second string.
 *  size:     The maximum amount of characters to compare.
 *
 *  Returns 0 if strings are equal. See strcmpi documentation for more details.
 */
int
STORMAPI
SStrCmpI(
      const char *string1,
      const char *string2,
      unsigned int size);

#define SSCmpI(s,x) ( SStrCmpI(s,x,__STORM_SSIZEMIN(s,x)) )

/*  SStrUpper @ 510
 *
 *  Converts all lower-case alpha characters of a string to upper-case.
 *
 *  string:   The string to convert.
 *
 *  Returns the same pointer given in the input.
 */
char*
STORMAPI
SStrUpper(
      char* string);

void  STORMAPI SRgn523(HANDLE hRgn, RECT *pRect, int a3, int a4);
void  STORMAPI SRgnCreateRegion(HANDLE *hRgn, int a2);
void  STORMAPI SRgnDeleteRegion(HANDLE hRgn);

void  STORMAPI SRgn529i(int handle, int a2, int a3);


/* SErrDisplayErrorFmt @ 562
 *
 * Displays a formatted error message. The message is detailed and flexible for many applications.
 * The message will be different if there is a debugger attached. Will typically terminate the application
 * unless the option to continue is given.
 *
 *  dwErrMessage:   The error code. See SErrGetLastError and GetLastError.
 *  logfilename:    The name of the file or object that this call belongs to.
 *  logline:        The line in the file or one of the SLOG_ macros.
 *  allowOption:    If TRUE, allows the user the option to continue execution, otherwise the program will terminate.
 *  exitCode:       The exit code used for program termination.
 *  format:         Additional message formatting. See printf.
 *
 *  Returns TRUE if the user chose to continue execution, FALSE otherwise.
 */
BOOL __cdecl
SErrDisplayErrorFmt(
    DWORD dwErrMsg,
    const char *logfilename,
    int logline,
    BOOL allowOption,
    int exitCode,
    const char *format,
    ...);

//#define SEDisplayErrorFmt(err,...) SErrDisplayErrorFmt(err, __FILE__, __LINE__, FALSE, 1, __VA_ARGS__)

/*  SErrCatchUnhandledExceptions @ 567
 *
 *  Registers a top-level exception filter managed entirely by Storm.
 *  The registered filter will display formatted exception information by calling SErrDisplayError.
 */
void
STORMAPI
SErrCatchUnhandledExceptions();


/*  SStrChr @ 571
 *
 *  Searches a string for the given character. See
 *  strchr documentation for more details.
 *
 *  string:   The string to search.
 *  c:        The character to search for.
 *
 *  Returns a pointer to the first occurance of the character.
 */
char*
STORMAPI
SStrChr(
    const char *string,
    char c);


char *STORMAPI SStrChrR(const char *string, char c);


/*  SStrVPrintf @ 578
 *
 *  Prints a formatted string to a destination buffer.
 *  This function calls vsnprintf with some extra error handling.
 *  See online documentation of vsnprintf for more details.
 *
 *  dest:   The destination buffer.
 *  size:   The size of the destination buffer.
 *  format: The format to use.
 *
 *  Returns the number of characters written.
 */
unsigned int __cdecl
SStrVPrintf(
    char *dest,
    unsigned int size,
    const char *format, ...);


int STORMAPI SBigDel(void *buffer);

int STORMAPI SBigFromBinary(void *buffer, const void *str, unsigned int size);

int STORMAPI SBigNew(void **buffer);

int STORMAPI SBigPowMod(void *buffer1, void *buffer2, int a3, int a4);

int STORMAPI SBigToBinaryBuffer(void *buffer, int length, int a3, int a4);

void __stdcall SDrawMessageBox(const char *,const char *,int);
void __cdecl SDrawDestroy(void);
BOOLEAN __cdecl StormDestroy(void);
BOOL __stdcall SFileSetBasePath(const char *);
void __cdecl SDrawRealizePalette(void);
BOOL __cdecl SVidPlayContinue(void);
BOOL __stdcall SNetGetOwnerTurnsWaiting(DWORD *);
BOOL __stdcall SNetUnregisterEventHandler(int,SEVTHANDLER);
BOOL __stdcall SNetRegisterEventHandler(int,SEVTHANDLER);
BOOLEAN __stdcall SNetSetBasePlayer(int);
int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *);
int __stdcall SNetGetProviderCaps(struct _SNETCAPS *);
int __stdcall SFileSetFilePointer(HANDLE,int,HANDLE,int);
void __stdcall SDrawClearSurface(int a1);
BOOL __stdcall SDlgSetBitmapI(HWND hWnd, int a2, char *src, int mask1, int flags, void *pBuff, int a7, int width, int height, int mask2);
void __stdcall SDlgBeginPaint(HWND hWnd, char *a2);
void __stdcall SDlgEndPaint(HWND hWnd, char *a2);
void __stdcall SDlgSetSystemCursor(BYTE *a1, BYTE *a2, int *a3, int a4);
void __stdcall SDlgSetCursor(HWND hWnd, HCURSOR a2, int a3, int *a4);
BOOL __stdcall SDlgSetTimer(int a1, int a2, int a3, void (__stdcall *a4)(int, int, int, int));
BOOL __stdcall SDlgKillTimer(int a1, int a2);
BOOL __stdcall SDlgDrawBitmap(HWND hWnd, int a2, int a3, int a4, int a5, int a6, int a7);
BOOL __stdcall SDlgDialogBoxParam(HINSTANCE hInst, char *szDialog, int hWnd, WNDPROC func, int selhero_is_good);
BOOL __stdcall SGdiTextOut(void *pBuffer, int x, int y, int mask, char *str, int len);
BOOL __stdcall SFileEnableDirectAccess(BOOL enable);

#if defined(__GNUC__) || defined(__cplusplus)
}
#endif

#endif


================================================
FILE: 3rdParty/Storm/Source/storm_gcc.def
================================================
LIBRARY      "Storm"

EXPORTS
  SNetCreateGame                @101 NONAME
  SNetCreateGame@40             @101 NONAME
  SNetDestroy                   @102 NONAME
  SNetDestroy@0                 @102 NONAME
  ;SNetEnumDevices               @103 NONAME
  ;SNetEnumGames                 @104 NONAME
  ;SNetEnumProviders             @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
  SNetSendServerChatCommand@4   @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
  SDlgBeginPaint@8               @201 NONAME
  SDlgBltToWindowI              @202 NONAME
  SDlgBltToWindowI@40           @202 NONAME
  ;SDlgCheckTimers               @203 NONAME
  ;SDlgCreateDialogIndirectParam @204 NONAME
  ;SDlgCreateDialogParam         @205 NONAME
  SDlgDefDialogProc             @206 NONAME
  SDlgDefDialogProc@16          @206 NONAME

  SDlgDialogBoxIndirectParam    @208 NONAME
  SDlgDialogBoxParam            @209 NONAME
  SDlgDialogBoxParam@20         @209 NONAME
  SDlgDrawBitmap                @210 NONAME
  SDlgDrawBitmap@28             @210 NONAME
  SDlgEndDialog                 @211 NONAME
  SDlgEndDialog@8               @211 NONAME
  SDlgEndPaint                  @212 NONAME
  SDlgEndPaint@8                @212 NONAME
  SDlgKillTimer                 @213 NONAME
  SDlgKillTimer@8               @213 NONAME
  ;SDlgSetBaseFont               @214 NONAME
  SDlgSetBitmapI                @215 NONAME
  SDlgSetBitmapI@40             @215 NONAME
  SDlgSetControlBitmaps         @216 NONAME
  SDlgSetControlBitmaps@28      @216 NONAME
  SDlgSetCursor                 @217 NONAME
  SDlgSetCursor@16              @217 NONAME
  SDlgSetSystemCursor           @218 NONAME
  SDlgSetSystemCursor@16        @218 NONAME
  SDlgSetTimer                  @219 NONAME
  SDlgSetTimer@16               @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
  SFileEnableDirectAccess@4     @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
  SBltROP3@32                   @313 NONAME
  SBltROP3Clipped               @314 NONAME
  SBltROP3Tiled                 @315 NONAME
  SBltROP3Tiled@40              @315 NONAME

  SBmpDecodeImage               @321 NONAME

  SBmpLoadImage                 @323 NONAME
  SBmpLoadImage@28              @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
  SDrawClearSurface@4           @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
  SGdiDeleteObject@4            @383 NONAME
  ;SGdiDestroy                   @384 NONAME
  SGdiExtTextOut                @385 NONAME
  SGdiImportFont                @386 NONAME
  SGdiImportFont@8              @386 NONAME
  ;SGdiLoadFont                  @387 NONAME
  ;SGdiRectangle                 @388 NONAME
  SGdiSelectObject              @389 NONAME
  SGdiSelectObject@4            @389 NONAME
  SGdiSetPitch                  @390 NONAME
  SGdiSetPitch@4                @390 NONAME
  SGdiTextOut                   @391 NONAME
  SGdiTextOut@24                @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
  STransBlt@20                  @431 NONAME
  STransBltUsingMask            @432 NONAME
  STransCreateI                 @433 NONAME
  STransCreateI@28              @433 NONAME
  STransDelete                  @434 NONAME
  STransDelete@4                @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
  SStrPack                      @503 NONAME
  SStrPack@12                   @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                       @
Download .txt
gitextract_qfpcrvhg/

├── .circleci/
│   ├── are-we-d1-yet.sh
│   └── config.yml
├── .clang-format
├── .editorconfig
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   └── bug_report.md
│   └── workflows/
│       └── build_mac.yml
├── .gitignore
├── 3rdParty/
│   ├── PKWare/
│   │   ├── Makefile
│   │   ├── PKWare.vcxproj
│   │   ├── PKWare.vcxproj.filters
│   │   ├── Pkware.dsp
│   │   ├── explode.cpp
│   │   ├── implode.cpp
│   │   └── pkware.h
│   └── Storm/
│       ├── Makefile
│       └── Source/
│           ├── Storm.dsp
│           ├── Storm.vcxproj
│           ├── storm.cpp
│           ├── storm.def
│           ├── storm.h
│           └── storm_gcc.def
├── Diablo.dsp
├── Diablo.dsw
├── Diablo.rc
├── Diablo.sln
├── Diablo.vcxproj
├── Diablo.vcxproj.filters
├── DiabloUI/
│   ├── DiabloUI.dsp
│   ├── DiabloUI.vcxproj
│   ├── Makefile
│   ├── _temp_data.cpp
│   ├── _temp_funcs.h
│   ├── artfont.cpp
│   ├── bn_prof.cpp
│   ├── bnetgw.cpp
│   ├── connect.cpp
│   ├── copyprot.cpp
│   ├── cr8game.cpp
│   ├── creadung.cpp
│   ├── creastat.cpp
│   ├── credits.cpp
│   ├── diabedit.cpp
│   ├── diabloui.cpp
│   ├── diabloui.def
│   ├── diabloui.h
│   ├── diabloui_gcc.def
│   ├── dirlink.cpp
│   ├── disclaim.cpp
│   ├── doom.cpp
│   ├── entdial.cpp
│   ├── entname.cpp
│   ├── fade.cpp
│   ├── focus.cpp
│   ├── local.cpp
│   ├── mainmenu.cpp
│   ├── modem.cpp
│   ├── modmstat.cpp
│   ├── okcancel.cpp
│   ├── progress.cpp
│   ├── sbar.cpp
│   ├── selclass.cpp
│   ├── selconn.cpp
│   ├── seldial.cpp
│   ├── selgame.cpp
│   ├── selhero.cpp
│   ├── selipx.cpp
│   ├── sellist.cpp
│   ├── selload.cpp
│   ├── selmodem.cpp
│   ├── selregn.cpp
│   ├── selyesno.cpp
│   ├── title.cpp
│   └── titlesnd.cpp
├── Hellfire.dsp
├── Hellfire.dsw
├── Hellfire.rc
├── LICENSE.md
├── Makefile
├── MakefileVC
├── README.md
├── Source/
│   ├── .clang-format
│   ├── _asm.cpp
│   ├── _render.cpp
│   ├── all.h
│   ├── appfat.cpp
│   ├── appfat.h
│   ├── asm_trans_rect.inc
│   ├── automap.cpp
│   ├── automap.h
│   ├── capture.cpp
│   ├── capture.h
│   ├── codec.cpp
│   ├── codec.h
│   ├── control.cpp
│   ├── control.h
│   ├── cursor.cpp
│   ├── cursor.h
│   ├── dead.cpp
│   ├── dead.h
│   ├── debug.cpp
│   ├── debug.h
│   ├── diablo.cpp
│   ├── diablo.h
│   ├── doom.cpp
│   ├── doom.h
│   ├── drlg_l1.cpp
│   ├── drlg_l1.h
│   ├── drlg_l2.cpp
│   ├── drlg_l2.h
│   ├── drlg_l3.cpp
│   ├── drlg_l3.h
│   ├── drlg_l4.cpp
│   ├── drlg_l4.h
│   ├── dthread.cpp
│   ├── dthread.h
│   ├── dx.cpp
│   ├── dx.h
│   ├── effects.cpp
│   ├── effects.h
│   ├── encrypt.cpp
│   ├── encrypt.h
│   ├── engine.cpp
│   ├── engine.h
│   ├── error.cpp
│   ├── error.h
│   ├── fault.cpp
│   ├── fault.h
│   ├── gamemenu.cpp
│   ├── gamemenu.h
│   ├── gendung.cpp
│   ├── gendung.h
│   ├── gmenu.cpp
│   ├── gmenu.h
│   ├── help.cpp
│   ├── help.h
│   ├── init.cpp
│   ├── init.h
│   ├── interfac.cpp
│   ├── interfac.h
│   ├── inv.cpp
│   ├── inv.h
│   ├── itemdat.cpp
│   ├── itemdat.h
│   ├── items.cpp
│   ├── items.h
│   ├── lighting.cpp
│   ├── lighting.h
│   ├── list.h
│   ├── loadsave.cpp
│   ├── loadsave.h
│   ├── logging.cpp
│   ├── logging.h
│   ├── mainmenu.cpp
│   ├── mainmenu.h
│   ├── minitext.cpp
│   ├── minitext.h
│   ├── misdat.cpp
│   ├── misdat.h
│   ├── missiles.cpp
│   ├── missiles.h
│   ├── monstdat.cpp
│   ├── monstdat.h
│   ├── monster.cpp
│   ├── monster.h
│   ├── movie.cpp
│   ├── movie.h
│   ├── mpqapi.cpp
│   ├── mpqapi.h
│   ├── msg.cpp
│   ├── msg.h
│   ├── msgcmd.cpp
│   ├── msgcmd.h
│   ├── multi.cpp
│   ├── multi.h
│   ├── nthread.cpp
│   ├── nthread.h
│   ├── objdat.cpp
│   ├── objdat.h
│   ├── objects.cpp
│   ├── objects.h
│   ├── pack.cpp
│   ├── pack.h
│   ├── palette.cpp
│   ├── palette.h
│   ├── path.cpp
│   ├── path.h
│   ├── pfile.cpp
│   ├── pfile.h
│   ├── player.cpp
│   ├── player.h
│   ├── plrmsg.cpp
│   ├── plrmsg.h
│   ├── portal.cpp
│   ├── portal.h
│   ├── quests.cpp
│   ├── quests.h
│   ├── render.cpp
│   ├── render.h
│   ├── restrict.cpp
│   ├── restrict.h
│   ├── scrollrt.cpp
│   ├── scrollrt.h
│   ├── setmaps.cpp
│   ├── setmaps.h
│   ├── sha.cpp
│   ├── sha.h
│   ├── sound.cpp
│   ├── sound.h
│   ├── spelldat.cpp
│   ├── spelldat.h
│   ├── spells.cpp
│   ├── spells.h
│   ├── stores.cpp
│   ├── stores.h
│   ├── sync.cpp
│   ├── sync.h
│   ├── textdat.cpp
│   ├── textdat.h
│   ├── themes.cpp
│   ├── themes.h
│   ├── tmsg.cpp
│   ├── tmsg.h
│   ├── town.cpp
│   ├── town.h
│   ├── towners.cpp
│   ├── towners.h
│   ├── track.cpp
│   ├── track.h
│   ├── trigs.cpp
│   ├── trigs.h
│   ├── wave.cpp
│   └── wave.h
├── appveyor.yml
├── comparer-config/
│   ├── diablo.toml
│   ├── hellfire.toml
│   └── spawn.toml
├── defs.h
├── docs/
│   ├── BACKGROUND.md
│   ├── CHANGELOG.md
│   ├── CONTRIBUTING.md
│   ├── INSTALL_linux.md
│   ├── INSTALL_mac.md
│   ├── INSTALL_windows.md
│   ├── TODO.md
│   ├── compatibility_matrix.md
│   ├── debug.md
│   └── troubleshooting.md
├── doxygen.config
├── enums.h
├── resource.h
├── structs.h
└── types.h
Download .txt
Showing preview only (215K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2678 symbols across 116 files)

FILE: 3rdParty/PKWare/explode.cpp
  function GenDecodeTabs (line 130) | static void PKWAREAPI GenDecodeTabs(
  function GenAscTabs (line 151) | static void PKWAREAPI GenAscTabs(TDcmpStruct * pWork)
  function WasteBits (line 230) | static int PKWAREAPI WasteBits(TDcmpStruct * pWork, unsigned int nBits)
  function DecodeLit (line 270) | static unsigned int PKWAREAPI DecodeLit(TDcmpStruct * pWork)
  function DecodeDist (line 360) | static unsigned int PKWAREAPI DecodeDist(TDcmpStruct * pWork, unsigned i...
  function Expand (line 391) | static unsigned int PKWAREAPI Expand(TDcmpStruct * pWork)
  function explode (line 473) | unsigned int PKWAREAPI explode(

FILE: 3rdParty/PKWare/implode.cpp
  function SortBuffer (line 139) | static void PKWAREAPI SortBuffer(TCmpStruct * pWork, unsigned char * buf...
  function FlushBuf (line 185) | static void PKWAREAPI FlushBuf(TCmpStruct * pWork)
  function OutputBits (line 205) | static void PKWAREAPI OutputBits(TCmpStruct * pWork, unsigned int nbits,...
  function FindRep (line 247) | static unsigned int PKWAREAPI FindRep(TCmpStruct * pWork, unsigned char ...
  function WriteCmpData (line 503) | static void PKWAREAPI WriteCmpData(TCmpStruct * pWork)
  function implode (line 688) | unsigned int PKWAREAPI implode(

FILE: 3rdParty/PKWare/pkware.h
  type TCmpStruct (line 45) | typedef struct
  type TDcmpStruct (line 80) | typedef struct

FILE: 3rdParty/Storm/Source/storm.cpp
  type _OVERLAPPED (line 91) | struct _OVERLAPPED
  type _SNETPROGRAMDATA (line 237) | struct _SNETPROGRAMDATA
  type _SNETPLAYERDATA (line 237) | struct _SNETPLAYERDATA
  type _SNETUIDATA (line 237) | struct _SNETUIDATA
  type _SNETVERSIONDATA (line 237) | struct _SNETVERSIONDATA
  type _SNETCAPS (line 238) | struct _SNETCAPS

FILE: 3rdParty/Storm/Source/storm.h
  type WRECT (line 35) | typedef struct _WRECT
  type WPOINT (line 43) | typedef struct _WPOINT
  type WSIZE (line 49) | typedef struct _WSIZE
  function CCritSect (line 58) | struct CCritSect {
  function Enter (line 69) | void Enter()
  function Leave (line 73) | void Leave()
  type CAPS (line 155) | typedef struct _CAPS
  type client_info (line 219) | typedef struct _client_info
  type user_info (line 238) | typedef struct _user_info
  type battle_info (line 246) | typedef struct _battle_info
  type module_info (line 273) | typedef struct _module_info
  type game (line 282) | typedef struct _game
  type storm_head (line 300) | typedef struct _storm_head
  type S_EVT (line 377) | typedef struct _s_evt
  type _SNETEVENT (line 385) | struct _SNETEVENT
  type MPQFlags (line 521) | enum MPQFlags
  type SFileFlags (line 534) | enum SFileFlags
  type _OVERLAPPED (line 557) | struct _OVERLAPPED
  type _SNETPROGRAMDATA (line 1333) | struct _SNETPROGRAMDATA
  type _SNETPLAYERDATA (line 1333) | struct _SNETPLAYERDATA
  type _SNETUIDATA (line 1333) | struct _SNETUIDATA
  type _SNETVERSIONDATA (line 1333) | struct _SNETVERSIONDATA
  type _SNETCAPS (line 1334) | struct _SNETCAPS

FILE: DiabloUI/artfont.cpp
  function artfont_SetArtFont (line 2) | void __fastcall artfont_SetArtFont(int nFont)
  function artfont_InitAllFonts (line 33) | void __cdecl artfont_InitAllFonts()
  function artfont_FreeAllFonts (line 47) | void __cdecl artfont_FreeAllFonts()
  function artfont_FreeArtFont (line 61) | void __fastcall artfont_FreeArtFont(FontStruct *pFont)
  function BOOL (line 82) | BOOL __cdecl artfont_LoadAllFonts()
  function artfont_LoadArtFont (line 96) | void __fastcall artfont_LoadArtFont(FontStruct *pFont, const char *pszBi...
  function artfont_GetFontMaxHeight (line 140) | int __cdecl artfont_GetFontMaxHeight()
  function artfont_GetFontDefWidth (line 152) | int __cdecl artfont_GetFontDefWidth()
  function artfont_GetFontWidth (line 164) | int __fastcall artfont_GetFontWidth(char *str)
  function artfont_cpp_init (line 187) | void __cdecl artfont_cpp_init()
  function artfont_GetFontBreak (line 194) | int __fastcall artfont_GetFontBreak(char *str)
  function artfont_delete_operator (line 221) | void __cdecl artfont_delete_operator(void *ptr)
  function artfont_PrintFontStr (line 228) | void __fastcall artfont_PrintFontStr(char *str, DWORD **pSurface, int sx...

FILE: DiabloUI/bn_prof.cpp
  function bn_prof_100014E8 (line 2) | signed int bn_prof_100014E8() { return 0; }
  function UiProfileCallback (line 20) | void __cdecl UiProfileCallback() { return; }
  function HGDIOBJ (line 44) | HGDIOBJ __stdcall bn_prof_1000155F(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function bn_prof_100016DD (line 120) | void UNKCALL bn_prof_100016DD(HWND arg) { return; }
  function bn_prof_100018CE (line 237) | void __fastcall bn_prof_100018CE(int a1, int a2) { return; }
  function bn_prof_10001938 (line 262) | int __fastcall bn_prof_10001938(HDC a1, DWORD *a2, char *a3, int a4, int...
  function bn_prof_10001A10 (line 322) | int __fastcall bn_prof_10001A10(HWND a1, HWND a2) { return 0; }
  function HINSTANCE (line 379) | HINSTANCE __fastcall bn_prof_10001B0A(HWND a1, const CHAR *a2) { return ...
  function HWND (line 426) | HWND UNKCALL bn_prof_10001C0E(HWND hWnd) { return 0; }
  function bn_prof_10001CB9 (line 467) | void __fastcall bn_prof_10001CB9(DWORD *a1, int a2, void (__fastcall *a3...
  function bn_prof_10001CF3 (line 498) | int UNKCALL bn_prof_10001CF3(HWND hWnd) { return 0; }
  function HFONT (line 528) | HFONT __fastcall bn_prof_10001D81(HWND hWnd, int a2, int a3) { return 0; }
  function bn_prof_10001E34 (line 575) | void UNKCALL bn_prof_10001E34(void *arg) { return; }
  function bn_prof_10001E4C (line 587) | void __fastcall bn_prof_10001E4C(char *a1, LPARAM lParam, HWND hDlg) { r...
  function bn_prof_10001ED0 (line 633) | void __fastcall bn_prof_10001ED0(char *a1, BYTE *a2, int a3) { return; }
  function BYTE (line 692) | BYTE *bn_prof_10001F84() { return 0; }
  function UiProfileDraw (line 714) | void __cdecl UiProfileDraw() { return; }
  function bn_prof_100021C4 (line 854) | int bn_prof_100021C4() { return 0; }
  function j_bn_prof_10002282 (line 897) | int j_bn_prof_10002282() { return 0; }
  function DWORD (line 904) | DWORD *bn_prof_10002282() { return 0; }
  function bn_prof_10002298 (line 920) | void __cdecl bn_prof_10002298() { return; }
  function bn_prof_100022A2 (line 926) | int UNKCALL bn_prof_100022A2(HWND hWnd) { return 0; }
  function bn_prof_10002353 (line 966) | int UNKCALL bn_prof_10002353(HGDIOBJ h) { return 0; }
  function HGDIOBJ (line 993) | HGDIOBJ bn_prof_100023D8() { return 0; }
  function bn_prof_10002456 (line 1050) | signed int __fastcall bn_prof_10002456(int a1, const CHAR *a2, char a3, ...
  function bn_prof_100026B9 (line 1242) | signed int bn_prof_100026B9() { return 0; }
  function bn_prof_100026C4 (line 1253) | signed int UNKCALL bn_prof_100026C4(DWORD *arg) { return 0; }
  function bn_prof_100026F0 (line 1262) | void UNKCALL bn_prof_100026F0(DWORD *arg) { return; }
  function bn_prof_10002749 (line 1272) | int UNKCALL bn_prof_10002749(char *arg, DWORD *a2) { return 0; }
  function bn_prof_100027D8 (line 1326) | void UNKCALL bn_prof_100027D8(DWORD *arg) { return; }
  function bn_prof_1000287D (line 1386) | void UNKCALL bn_prof_1000287D(DWORD *arg) { return; }
  function bn_prof_10002890 (line 1402) | void UNKCALL bn_prof_10002890(DWORD *arg) { return; }

FILE: DiabloUI/bnetgw.cpp
  function BNetGW_100028C2 (line 2) | void UNKCALL BNetGW_100028C2(DWORD *arg) { return; }
  function BNetGW_100029BF (line 80) | void UNKCALL BNetGW_100029BF(DWORD *arg, int a2) { return; }
  function BNetGW_10002AE5 (line 204) | signed int BNetGW_10002AE5() { return 0; }
  function BNetGW_10002AF0 (line 215) | int UNKCALL BNetGW_10002AF0(DWORD *arg, char *a2) { return 0; }
  function BNetGW_10002B51 (line 247) | void UNKCALL BNetGW_10002B51(DWORD *arg, signed int a2) { return; }
  function BNetGW_10002C51 (line 325) | int UNKCALL BNetGW_10002C51(DWORD *arg) { return 0; }
  function BNetGW_10002DBF (line 440) | int UNKCALL BNetGW_10002DBF(DWORD *arg) { return 0; }

FILE: DiabloUI/connect.cpp
  function Connect_FreeConnectData (line 2) | void __cdecl Connect_FreeConnectData()
  function BOOL (line 33) | BOOL __cdecl Connect_LoadGFXAndStuff()
  function BOOL (line 75) | BOOL __stdcall UiArtCallback(int game_type, unsigned int art_code, PALET...
  function Connect_cpp_init (line 277) | void __cdecl Connect_cpp_init()
  function BOOL (line 285) | BOOL __stdcall UiGetDataCallback(int game_type, int data_code, void *a3,...
  function BOOL (line 353) | BOOL __stdcall UiSoundCallback(int a1, int type, int a3)
  function BOOL (line 365) | BOOL __stdcall UiAuthCallback(int a1, char *a2, char *a3, char a4, char ...
  function BOOL (line 453) | BOOL __stdcall UiDrawDescCallback(int game_type, COLORREF color, LPCSTR ...
  function BOOL (line 679) | BOOL __stdcall UiCategoryCallback(int a1, int a2, int a3, int a4, int a5...
  function Connect_GetRankFromLevel (line 687) | int __fastcall Connect_GetRankFromLevel(char *str)
  function BOOL (line 721) | BOOL __fastcall Connect_DiffFromString(char *str, _gamedata *gamedata, i...
  function Connect_SetDiffString (line 751) | void __fastcall Connect_SetDiffString(_gamedata *gamedata, const char *s...
  function BOOL (line 771) | BOOL __fastcall Connect_GetHeroInfoConc(const char *a1, _uiheroinfo *pInfo)
  function Connect_MakeDescString (line 825) | void __fastcall Connect_MakeDescString(_uiheroinfo *a1, char *name, size...
  function UiCreateGameCriteria (line 844) | void __stdcall UiCreateGameCriteria(_uiheroinfo *pInfo, char *str)
  function BOOL (line 850) | BOOL __stdcall UiCreatePlayerDescription(_uiheroinfo *info, DWORD mode, ...
  function UiSetupPlayerInfo (line 858) | void __stdcall UiSetupPlayerInfo(char *infostr, _uiheroinfo *pInfo, DWOR...
  function Connect_CopyPlrDescStrings (line 866) | void __fastcall Connect_CopyPlrDescStrings(char *str1, int size1, char *...

FILE: DiabloUI/copyprot.cpp
  function BOOL (line 2) | BOOL __stdcall UiCopyProtError(int *pdwResult)
  function LRESULT (line 21) | LRESULT __stdcall CopyProt_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function CopyProt_FreeCopyResrcs (line 74) | void __cdecl CopyProt_FreeCopyResrcs()
  function BOOL (line 91) | BOOL __fastcall CopyProt_LoadCopyStuff(HWND hWnd, int a2)
  function CopyProt_EndCopyDlg (line 136) | void __fastcall CopyProt_EndCopyDlg(HWND hWnd, int a2)
  function CopyProt_cpp_init (line 143) | void __cdecl CopyProt_cpp_init()

FILE: DiabloUI/cr8game.cpp
  function cr8game_cpp_init (line 2) | void __cdecl cr8game_cpp_init()
  function BOOL (line 10) | BOOL __fastcall cr8game_GetSnetCreaGame(HWND hWnd)
  function BOOL (line 60) | BOOL __stdcall UiCreateGameCallback(int a1, int a2, int a3, int a4, int ...
  function LRESULT (line 79) | LRESULT __stdcall cr8game_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LP...
  function cr8game_FreeCreaStuff (line 175) | void __cdecl cr8game_FreeCreaStuff()
  function BOOL (line 192) | BOOL __fastcall cr8game_LoadCreaGFX(HWND hWnd)
  function cr8game_FreeMainMem (line 210) | void __fastcall cr8game_FreeMainMem(HWND hWnd)
  function cr8game_AllocMainMem (line 234) | void __fastcall cr8game_AllocMainMem(HWND hWnd)
  function cr8game_DoAROP3Blit (line 261) | void __fastcall cr8game_DoAROP3Blit(HWND hWnd, int frame, int size)
  function cr8game_SendMessageF5 (line 283) | void __fastcall cr8game_SendMessageF5(HWND hWnd)
  function cr8game_BlitCr8Dialog (line 294) | void __fastcall cr8game_BlitCr8Dialog(HWND hWnd, int a2)
  function cr8game_SetWindowStr (line 308) | void __fastcall cr8game_SetWindowStr(HWND hWnd, int dlgitem, int a3)
  function cr8game_CheckValidGameName (line 317) | int __fastcall cr8game_CheckValidGameName(char *name)
  function HFONT (line 351) | HFONT __fastcall cr8game_GetCr8Object(HWND hWnd)

FILE: DiabloUI/creadung.cpp
  function CreaDung_SetDelSpin (line 2) | void __fastcall CreaDung_SetDelSpin(int a1)
  function CreaDung_cpp_init (line 9) | void __cdecl CreaDung_cpp_init()
  function LRESULT (line 17) | LRESULT __stdcall CreaDung_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function CreaDung_ParseDungProcs (line 65) | void __fastcall CreaDung_ParseDungProcs(HWND hWnd, int dlg)
  function CreaDung_FreeDungProcs (line 90) | void __fastcall CreaDung_FreeDungProcs(HWND hWnd)
  function CreaDung_LoadDungGFX (line 107) | void __fastcall CreaDung_LoadDungGFX(HWND hWnd)
  function CreaDung_PlaySndAndKill (line 131) | void __fastcall CreaDung_PlaySndAndKill(HWND hWnd, int a2)
  function CreaDung_DoAllPlaySnd (line 139) | void __fastcall CreaDung_DoAllPlaySnd(HWND hWnd)
  function CreaDung_DoSnetCreaGame (line 179) | void __fastcall CreaDung_DoSnetCreaGame(HWND hWnd)
  function CreaDung_CheckDlgForSnd (line 231) | void __fastcall CreaDung_CheckDlgForSnd(HWND hWnd, int a2, int a3)
  function BOOL (line 247) | BOOL __fastcall CreaDung_SelDungDiff(int a1, int a2, int a3, int a4, int...

FILE: DiabloUI/creastat.cpp
  function BOOL (line 2) | BOOL __stdcall UiGetDefaultStats(int pclass, _uidefaultstats *pStats)
  function CreaStat_cpp_init (line 14) | void __cdecl CreaStat_cpp_init()

FILE: DiabloUI/credits.cpp
  function credits_cpp_init (line 2) | void __cdecl credits_cpp_init()
  function BOOL (line 10) | BOOL __stdcall UiCreditsDialog(int a1)
  function LRESULT (line 21) | LRESULT __stdcall credits_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LP...
  function credits_FreeCreditResrc (line 76) | void __fastcall credits_FreeCreditResrc(HWND hWnd)
  function credits_LoadImgCreditTxt (line 97) | void __fastcall credits_LoadImgCreditTxt(HWND hWnd, LPARAM lParam)
  function credits_CalcPosROP3 (line 146) | void __fastcall credits_CalcPosROP3(HWND hWnd)
  function credits_PrintCredLines (line 173) | void __fastcall credits_PrintCredLines(HWND hWnd)
  function credits_GetCredLineBreak (line 214) | int __fastcall credits_GetCredLineBreak(char *str)

FILE: DiabloUI/diabedit.cpp
  function DiabEdit_DoPaintBMP (line 2) | void __fastcall DiabEdit_DoPaintBMP(HWND hWnd)
  function DiabEdit_cpp_init (line 12) | void __cdecl DiabEdit_cpp_init()
  function DiabEdit_SetupWindow (line 20) | void __cdecl DiabEdit_SetupWindow()
  function LRESULT (line 33) | LRESULT __stdcall DiabEdit_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function DiabEdit_SendWndCommand (line 89) | void __fastcall DiabEdit_SendWndCommand(HWND hWnd, WORD a2)
  function DiabEdit_GetCursorProp (line 100) | void __fastcall DiabEdit_GetCursorProp(HWND hWnd)
  function DiabEdit_RestrictAndLimit (line 129) | void __fastcall DiabEdit_RestrictAndLimit(HWND hWnd, WPARAM wParam, LPAR...
  function DiabEdit_SetTextAndProp (line 179) | void __fastcall DiabEdit_SetTextAndProp(HWND hWnd, WPARAM wParam, LPARAM...
  function DiabEdit_SetRestrictString (line 204) | void __fastcall DiabEdit_SetRestrictString(HWND hWnd, LPARAM lParam)
  function DiabEdit_SetRestrictTimer (line 218) | void __fastcall DiabEdit_SetRestrictTimer(HWND hWnd)
  function DiabEdit_RemoveAllProps (line 230) | void __fastcall DiabEdit_RemoveAllProps(HWND hWnd)

FILE: DiabloUI/diabloui.cpp
  function DiabloUI_GetSpawned (line 69) | int __cdecl DiabloUI_GetSpawned()
  function UiOnPaint (line 76) | void __stdcall UiOnPaint(int a1)
  function UiSetBackgroundBitmap (line 82) | void __stdcall UiSetBackgroundBitmap(int a1, PALETTEENTRY *a2, int a3, i...
  function UiSetSpawned (line 94) | void __stdcall UiSetSpawned(BOOL bSpawned)
  function UiInitialize (line 101) | void __stdcall UiInitialize()
  function UiDestroy (line 113) | void __stdcall UiDestroy()
  function UiAppActivate (line 123) | void __stdcall UiAppActivate(BOOL bActive)
  function BOOL (line 130) | BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvRe...
  function DiabloUI_cpp_init (line 145) | void __cdecl DiabloUI_cpp_init()

FILE: DiabloUI/diabloui.h
  type FontStruct (line 9) | struct FontStruct {
  type ProfileStruct (line 15) | struct ProfileStruct {
  type ProfFntStruct (line 22) | struct ProfFntStruct {

FILE: DiabloUI/dirlink.cpp
  function DirLink_10005CFA (line 2) | signed int DirLink_10005CFA() { return 0; }
  function BOOL (line 13) | BOOL __fastcall DirLink_10005D05(int a1, int a2, int a3, DWORD *a4, int ...
  function DirLink_10005D63 (line 34) | int __stdcall DirLink_10005D63(HWND hWnd, UINT Msg, WPARAM wParam, unsig...
  function DirLink_10005EB2 (line 107) | int __fastcall DirLink_10005EB2(HWND hDlg, int a2) { return 0; }
  function DirLink_10005F1F (line 128) | int UNKCALL DirLink_10005F1F(HWND hDlg) { return 0; }
  function DirLink_10005F7B (line 146) | int UNKCALL DirLink_10005F7B(HWND hWnd) { return 0; }
  function DirLink_10006047 (line 181) | int __fastcall DirLink_10006047(int a1, int a2) { return 0; }
  function DirLink_10006073 (line 198) | void UNKCALL DirLink_10006073(void *arg) { return; }
  function HWND (line 217) | HWND UNKCALL DirLink_100060D1(HWND arg) { return 0; }
  function DirLink_10006141 (line 250) | int UNKCALL DirLink_10006141(void *arg) { return 0; }
  function DirLink_100061E1 (line 291) | int UNKCALL DirLink_100061E1(void *arg) { return 0; }
  function DirLink_100062BF (line 326) | int UNKCALL DirLink_100062BF(void *arg, int a2, char *a3, char *a4) { re...
  function DirLink_1000632B (line 354) | signed int __stdcall DirLink_1000632B(int a1, char *a2, char *a3) { retu...
  function HWND (line 364) | HWND __fastcall DirLink_10006359(HWND hWnd, int a2, int a3) { return 0; }

FILE: DiabloUI/disclaim.cpp
  function BOOL (line 2) | BOOL __stdcall UiBetaDisclaimer(int a1)
  function LRESULT (line 13) | LRESULT __stdcall disclaim_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function disclaim_DelDisclaimProcs (line 56) | void __fastcall disclaim_DelDisclaimProcs(HWND hWnd)
  function disclaim_LoadDisclaimGFX (line 67) | void __fastcall disclaim_LoadDisclaimGFX(HWND hWnd)
  function disclaim_FadeFromDisclaim (line 82) | void __fastcall disclaim_FadeFromDisclaim(HWND hWnd)
  function disclaim_cpp_init (line 90) | void __cdecl disclaim_cpp_init()

FILE: DiabloUI/doom.cpp
  function Doom_cpp_init (line 2) | void __cdecl Doom_cpp_init()
  function Doom_ParseWndProcs (line 10) | void __fastcall Doom_ParseWndProcs(HWND hWnd, int *msgtbl, int nFont, in...
  function Doom_GetSetWndText (line 22) | void __fastcall Doom_GetSetWndText(HWND hWnd, int msg, int nFont, int a4)
  function Doom_PrintStrWithSpin (line 46) | void __fastcall Doom_PrintStrWithSpin(HWND hWnd, BOOL a2)
  function Doom_AllocAndSetBMP (line 89) | void __fastcall Doom_AllocAndSetBMP(HWND hWnd, int a2, int bmp_flags)
  function Doom_GetWindowROP3 (line 104) | void __fastcall Doom_GetWindowROP3(HWND hWnd1, HWND hWnd2)
  function Doom_ParseWndProc2 (line 131) | void __fastcall Doom_ParseWndProc2(HWND hWnd, int *msgtbl, int nFont, in...
  function Doom_GetSetWndTxt2 (line 143) | void __fastcall Doom_GetSetWndTxt2(HWND hWnd, int msg, int nFont, int a4)
  function Doom_ParseWndProc3 (line 164) | void __fastcall Doom_ParseWndProc3(HWND hWnd, int *msgtbl, int nFont)
  function Doom_GetSetWndTxt3 (line 176) | void __fastcall Doom_GetSetWndTxt3(HWND hWnd, int msg, int nFont)
  function Doom_PrintStrWithSpn2 (line 202) | void __fastcall Doom_PrintStrWithSpn2(HWND hWnd, int justify_type)
  function Doom_ParseWndProc4 (line 230) | void __fastcall Doom_ParseWndProc4(HWND hWnd, int *msgtbl, int nFont)
  function Doom_GetSetWndTxt4 (line 242) | void __fastcall Doom_GetSetWndTxt4(HWND hWnd, int msg, int nFont)
  function Doom_ParseWndProc5 (line 265) | void __fastcall Doom_ParseWndProc5(HWND hWnd, int *msgtbl, int nFont)
  function Doom_GetSetWndTxt5 (line 277) | void __fastcall Doom_GetSetWndTxt5(HWND hWnd, int msg, int nFont)
  function Doom_PrintTextMsg403 (line 291) | void __fastcall Doom_PrintTextMsg403(HWND hWnd)
  function Doom_ParseWndProc6 (line 332) | void __fastcall Doom_ParseWndProc6(HWND hWnd, int *msgtbl, int nFont)
  function Doom_GetSetWndTxt6 (line 344) | void __fastcall Doom_GetSetWndTxt6(HWND hWnd, int msg, int nFont)
  function Doom_DeleteFreeProcs (line 357) | void __fastcall Doom_DeleteFreeProcs(HWND hWnd, int *msgtbl)

FILE: DiabloUI/entdial.cpp
  function EntDial_10006C96 (line 2) | int __stdcall EntDial_10006C96(HWND hDlg, UINT Msg, WPARAM wParam, LPARA...
  function HWND (line 60) | HWND UNKCALL EntDial_10006D78(HWND hDlg) { return 0; }
  function HWND (line 75) | HWND USERCALL EntDial_10006DB8(HWND hWnd, int a2) { return 0; }
  function EntDial_10006EA7 (line 108) | int __fastcall EntDial_10006EA7(HWND hDlg, int a2) { return 0; }
  function EntDial_10006EE8 (line 129) | void __fastcall EntDial_10006EE8(HWND hWnd, unsigned int a2, int a3) { r...
  function EntDial_10006F16 (line 150) | int __fastcall EntDial_10006F16(HWND hDlg, int a2, int a3) { return 0; }
  function EntDial_10006F71 (line 180) | signed int EntDial_10006F71() { return 0; }

FILE: DiabloUI/entname.cpp
  function LRESULT (line 2) | LRESULT __stdcall EntName_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LP...
  function EntName_DelEntNameMsgs (line 61) | void __fastcall EntName_DelEntNameMsgs(HWND hWnd)
  function EntName_LoadFocusChkName (line 74) | void __fastcall EntName_LoadFocusChkName(HWND hWnd)
  function EntName_SetCharName (line 101) | void __fastcall EntName_SetCharName(HWND hWnd, int a2)
  function EntName_GetMessageName (line 116) | void __fastcall EntName_GetMessageName(HWND hWnd, unsigned int a2, int a3)
  function EntName_cpp_init (line 132) | void __cdecl EntName_cpp_init()

FILE: DiabloUI/fade.cpp
  function Fade_ApplyPaletteRange (line 2) | void __fastcall Fade_ApplyPaletteRange(int range1, int range2)
  function Fade_UpdatePaletteRange (line 29) | void __fastcall Fade_UpdatePaletteRange(int range)
  function BOOL (line 69) | BOOL __cdecl Fade_CheckRange5()
  function Fade_Range5SetZero (line 83) | void __cdecl Fade_Range5SetZero()
  function Fade_NoInputAndArt (line 91) | void __fastcall Fade_NoInputAndArt(HWND hWnd, BOOL bShowCurs)
  function Fade_SetInputWindow (line 105) | void __fastcall Fade_SetInputWindow(HWND hWnd)
  function Fade_SetFadeTimer (line 114) | void __fastcall Fade_SetFadeTimer(int nTime)
  function Fade_TimerFunctionDlg (line 124) | void __stdcall Fade_TimerFunctionDlg(int a1, int a2, int a3, int a4)
  function Fade_cpp_init (line 135) | void __cdecl Fade_cpp_init()

FILE: DiabloUI/focus.cpp
  function Focus_CheckPlayMove (line 2) | void __fastcall Focus_CheckPlayMove(LPARAM lParam)
  function Focus_GetSpinWidthOrZero (line 15) | int __cdecl Focus_GetSpinWidthOrZero()
  function Focus_BlitSpinner (line 22) | void __fastcall Focus_BlitSpinner(HWND hWnd1, HWND hWnd2)
  function Focus_CenterSpinFromSide (line 66) | void __fastcall Focus_CenterSpinFromSide(HWND hWnd)
  function Focus_GetAndBlitSpin (line 80) | void __fastcall Focus_GetAndBlitSpin(HWND hWnd, LPARAM lParam)
  function BOOL (line 92) | BOOL __fastcall Focus_DoBlitSpinIncFrame(HWND hWnd1, HWND hWnd2)
  function Focus_DeleteSpinners (line 129) | void __cdecl Focus_DeleteSpinners()
  function Focus_ResetSpinToZero (line 150) | void __cdecl Focus_ResetSpinToZero()
  function Focus_cpp_init (line 159) | void __cdecl Focus_cpp_init()
  function Focus_LoadSpinner (line 167) | void __fastcall Focus_LoadSpinner(const char *pszFileName)
  function Focus_SetFocusTimer (line 216) | void __fastcall Focus_SetFocusTimer(HWND hWnd, const char *pszFileName)
  function Focus_SetFocusAndBlit (line 223) | void __stdcall Focus_SetFocusAndBlit(int hWnd, int a2, int a3, int a4)
  function Focus_KillFocusTimer (line 232) | void __fastcall Focus_KillFocusTimer(HWND hWnd)

FILE: DiabloUI/local.cpp
  function local_InitUiPalette (line 2) | void __cdecl local_InitUiPalette()
  function local_DelUiPalette (line 24) | void __cdecl local_DelUiPalette()
  function local_ClearPalette (line 39) | void __fastcall local_ClearPalette(PALETTEENTRY *pPal)
  function local_ClearSurface (line 56) | void __cdecl local_ClearSurface()
  function BOOL (line 63) | BOOL __fastcall local_LoadArtImage(const char *pszFileName, BYTE **pBuff...
  function BOOL (line 89) | BOOL __fastcall local_LoadArtWithPal(HWND hWnd, int a2, char *src, int m...
  function local_AdjustRectSize (line 128) | void __fastcall local_AdjustRectSize(tagRECT *pRect, int a2, int a3)
  function BOOL (line 142) | BOOL __fastcall local_SetStaticBmp(HWND hWnd, int nIDDlgItem, BYTE *pBuf...
  function local_cpp_init (line 158) | void __cdecl local_cpp_init()
  function BOOL (line 165) | BOOL __fastcall local_SetButtonBmp(HWND hWnd, int flags, int a7, void *p...
  function local_FitButtonDlg (line 171) | void __fastcall local_FitButtonDlg(HWND hWnd, int *a2, void *pBuffer, DW...
  function local_SetWhiteText (line 216) | void __fastcall local_SetWhiteText(HDC hdc)
  function BOOL (line 222) | BOOL __fastcall local_GetBottomRect(HWND hWnd1, HWND hWnd2, int width, i...
  function local_DlgDoPaint (line 243) | void __fastcall local_DlgDoPaint(HWND hWnd)
  function local_DoUiWndProc (line 254) | void __fastcall local_DoUiWndProc(HWND hWnd, DWORD *pdwMsgTbl)
  function LRESULT (line 276) | LRESULT __stdcall local_PostUiWndProc(HWND hWnd, UINT uMsg, WPARAM wPara...
  function local_DoUiWndProc2 (line 334) | void __fastcall local_DoUiWndProc2(HWND hWnd, DWORD *pdwMsgTbl)
  function LRESULT (line 356) | LRESULT __stdcall local_PostUiWndProc2(HWND hWnd, UINT uMsg, WPARAM wPar...
  function BOOL (line 393) | BOOL __fastcall local_DisableKeyWaitMouse(HWND hWnd)
  function local_FreeMemPtr (line 423) | void __fastcall local_FreeMemPtr(void **p)
  function local_SetWndLongStr (line 433) | void __fastcall local_SetWndLongStr(int WndLongData, const char *pszStr)
  function local_LoadArtCursor (line 446) | void __cdecl local_LoadArtCursor()
  function local_InitArtCursor (line 463) | void __cdecl local_InitArtCursor()
  function local_FreeArtCursor (line 487) | void __cdecl local_FreeArtCursor()
  function local_SetCursorArt (line 500) | void __cdecl local_SetCursorArt()
  function local_SetCursorDefault (line 509) | void __cdecl local_SetCursorDefault()
  function local_SetDiabloCursor (line 516) | void __fastcall local_SetDiabloCursor(HWND hWnd)

FILE: DiabloUI/mainmenu.cpp
  function MainMenu_cpp_init (line 2) | void __cdecl MainMenu_cpp_init()
  function BOOL (line 10) | BOOL __stdcall UiMainMenuDialog(const char *name, int *pdwResult, void(_...
  function LRESULT (line 33) | LRESULT __stdcall MainMenu_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function MainMenu_KillAndFreeMenu (line 100) | void __fastcall MainMenu_KillAndFreeMenu(HWND hWnd)
  function MainMenu_SetMenuTimer (line 114) | void __fastcall MainMenu_SetMenuTimer(HWND hWnd)
  function MainMenu_LoadMenuGFX (line 121) | void __fastcall MainMenu_LoadMenuGFX(HWND hWnd)
  function MainMenu_DoOptions (line 149) | void __fastcall MainMenu_DoOptions(HWND hWnd, int option, int PlaySelect)
  function BOOL (line 171) | BOOL __cdecl MainMenu_CheckEnoughMemory()
  function MainMenu_CheckWParamFocus (line 181) | void __fastcall MainMenu_CheckWParamFocus(HWND hWnd, WPARAM wParam)

FILE: DiabloUI/modem.cpp
  function Modem_1000855D (line 2) | int Modem_1000855D() { return 0; }
  function HWND (line 9) | HWND __fastcall Modem_10008563(HWND hDlg, const char *a2, int a3) { retu...
  function Modem_100085D8 (line 41) | int __stdcall Modem_100085D8(int a1, char *a2, char *a3) { return 0; }
  function BOOL (line 51) | BOOL Modem_10008606() { return 0; }
  function Modem_10008648 (line 74) | signed int Modem_10008648() { return 0; }
  function Modem_10008653 (line 85) | int Modem_10008653() { return 0; }
  function Modem_10008659 (line 92) | int Modem_10008659() { return 0; }
  function Modem_1000865F (line 99) | int UNKCALL Modem_1000865F(char *arg) { return 0; }
  function BOOL (line 119) | BOOL __fastcall Modem_10008680(int a1, int a2, int a3, DWORD *a4, int a5...
  function Modem_100086DE (line 140) | int __stdcall Modem_100086DE(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM ...
  function BOOL (line 205) | BOOL UNKCALL Modem_100087DB(HWND hWnd) { return 0; }
  function Modem_10008888 (line 237) | int Modem_10008888() { return 0; }
  function Modem_100088DB (line 270) | int UNKCALL Modem_100088DB(HWND hWnd) { return 0; }
  function Modem_1000893D (line 291) | int UNKCALL Modem_1000893D(HWND hWnd) { return 0; }
  function Modem_10008A38 (line 351) | int __fastcall Modem_10008A38(HWND hWnd, int a2) { return 0; }
  function Modem_10008B42 (line 415) | void __cdecl Modem_10008B42(char *a1) { return; }
  function Modem_10008BB7 (line 442) | int UNKCALL Modem_10008BB7(HWND hWnd) { return 0; }
  function Modem_10008BFE (line 458) | int UNKCALL Modem_10008BFE(HWND hWnd) { return 0; }

FILE: DiabloUI/modmstat.cpp
  function ModmStat_10008C62 (line 2) | int __stdcall ModmStat_10008C62(char *a1, int a2, int a3, int a4, int a5...
  function ModmStat_10008C87 (line 16) | int UNKCALL ModmStat_10008C87(void *arg) { return 0; }
  function ModmStat_10008CA0 (line 23) | int __stdcall ModmStat_10008CA0(HWND hWnd, UINT Msg, WPARAM wParam, LPAR...
  function ModmStat_10008DB3 (line 83) | int UNKCALL ModmStat_10008DB3(HWND hDlg) { return 0; }
  function BOOL (line 97) | BOOL UNKCALL ModmStat_10008DE4(HWND hWnd) { return 0; }
  function ModmStat_10008E89 (line 132) | int __fastcall ModmStat_10008E89(int a1, int a2) { return 0; }
  function ModmStat_10008EBF (line 160) | void UNKCALL ModmStat_10008EBF(HWND hDlg) { return; }
  function ModmStat_10008F26 (line 188) | signed int ModmStat_10008F26() { return 0; }

FILE: DiabloUI/okcancel.cpp
  function BOOL (line 2) | BOOL __fastcall OkCancel_DrawString(HWND hWnd, char *str)
  function OkCancel_cpp_init (line 42) | void __cdecl OkCancel_cpp_init()
  function LRESULT (line 50) | LRESULT __stdcall OkCancel_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function OkCancel_FreeDlgBmp (line 109) | void __fastcall OkCancel_FreeDlgBmp(HWND hWnd)
  function BOOL (line 128) | BOOL __fastcall OkCancel_LoadOkCancGFX(HWND hWnd, DWORD *lParam)
  function OkCancel_PlaySndEndDlg (line 197) | void __fastcall OkCancel_PlaySndEndDlg(HWND hWnd, int a2)
  function OkCancel_DoOkDialog (line 204) | void __fastcall OkCancel_DoOkDialog(HWND hWnd, char *str, int a3)
  function UiMessageBoxCallback (line 217) | void __stdcall UiMessageBoxCallback(HWND hWnd, char *lpText, LPCSTR lpCa...

FILE: DiabloUI/progress.cpp
  function Progress_10009480 (line 2) | signed int Progress_10009480() { return 0; }
  function BOOL (line 13) | BOOL __stdcall UiProgressDialog(HWND window, const char *msg, int enable...
  function Progress_100094F4 (line 40) | int __stdcall Progress_100094F4(HWND hWnd, UINT Msg, WPARAM wParam, LPAR...
  function BOOL (line 132) | BOOL __fastcall Progress_10009675(HWND hWnd, const CHAR *a2) { return 0; }
  function BOOL (line 195) | BOOL __fastcall Progress_10009805(HWND hWnd, int a2) { return 0; }
  function Progress_100098B0 (line 238) | void Progress_100098B0() { return; }
  function Progress_100098C5 (line 247) | void UNKCALL Progress_100098C5(HWND hWnd) { return; }
  function BOOL (line 276) | BOOL UNKCALL Progress_1000991C(HWND hWnd) { return 0; }

FILE: DiabloUI/sbar.cpp
  function Sbar_cpp_init (line 2) | void __cdecl Sbar_cpp_init()
  function BOOL (line 10) | BOOL __fastcall Sbar_CheckIfNextHero(HWND hWnd)
  function Sbar_NumScrollLines (line 22) | int __fastcall Sbar_NumScrollLines(HWND hWnd, int width, int height)
  function Sbar_DrawScrollBar (line 77) | void __fastcall Sbar_DrawScrollBar(HWND hWnd, int nIDDlgItem, int width,...
  function Sbar_LoadScrBarGFX (line 157) | void __fastcall Sbar_LoadScrBarGFX(HWND hWnd, int nIDDlgItem)
  function Sbar_cpp_init2 (line 186) | void __cdecl Sbar_cpp_init2()
  function Sbar_FreeScrollBar (line 194) | void __fastcall Sbar_FreeScrollBar(HWND hWnd, int nIDDlgItem)

FILE: DiabloUI/selclass.cpp
  function LRESULT (line 2) | LRESULT __stdcall SelClass_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function SelClass_FreeClassMsgTbl (line 68) | void __fastcall SelClass_FreeClassMsgTbl(HWND hWnd)
  function SelClass_LoadClassFocus (line 81) | void __fastcall SelClass_LoadClassFocus(HWND hWnd)
  function SelClass_SetDefaultStats (line 106) | void __fastcall SelClass_SetDefaultStats(HWND hWnd, int a2)
  function SelClass_CheckClassSpawn (line 127) | void __fastcall SelClass_CheckClassSpawn(HWND hWnd, int a2)
  function SelClass_cpp_init (line 146) | void __cdecl SelClass_cpp_init()

FILE: DiabloUI/selconn.cpp
  function SelConn_1000A09B (line 9) | signed int SelConn_1000A09B() { return 0; }
  function SelConn_1000A0A6 (line 20) | int __stdcall SelConn_1000A0A6(HWND hWnd, UINT Msg, WPARAM wParam, unsig...
  function HWND (line 102) | HWND __fastcall SelConn_1000A226(HWND hDlg, int nIDDlgItem) { return 0; }
  function HWND (line 204) | HWND UNKCALL SelConn_1000A3E2(HWND hDlg) { return 0; }
  function SelConn_1000A3FF (line 215) | int SelConn_1000A3FF() { return 0; }
  function SelConn_1000A43A (line 249) | void UNKCALL SelConn_1000A43A(HWND hDlg) { return; }
  function SelConn_1000A4B9 (line 272) | int __fastcall SelConn_1000A4B9(DWORD *a1) { return 0; }
  function SelConn_1000A4CD (line 291) | int UNKCALL SelConn_1000A4CD(void *arg) { return 0; }
  function HWND (line 302) | HWND UNKCALL SelConn_1000A4E4(HWND hWnd, char *a2, int a3) { return 0; }
  function SelConn_1000A5F3 (line 350) | signed int __stdcall SelConn_1000A5F3(int a1, char *a2, char *a3, int a4...
  function SelConn_1000A670 (line 375) | int __fastcall SelConn_1000A670(HWND a1, const char *a2) { return 0; }
  function SelConn_1000A6EC (line 420) | void UNKCALL SelConn_1000A6EC(HWND hDlg) { return; }
  function LRESULT (line 450) | LRESULT __stdcall SelConn_1000A73E(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function HWND (line 525) | HWND UNKCALL SelConn_1000A866(HWND hWnd) { return 0; }
  function HWND (line 557) | HWND UNKCALL SelConn_1000A8D7(HWND hWnd) { return 0; }
  function HWND (line 589) | HWND UNKCALL SelConn_1000A948(HWND hWnd) { return 0; }
  function SelConn_1000A9F3 (line 642) | int UNKCALL SelConn_1000A9F3(HWND hWnd) { return 0; }
  function HWND (line 689) | HWND UNKCALL SelConn_1000AA3B(HWND hWnd) { return 0; }
  function HWND (line 745) | HWND UNKCALL SelConn_1000AAEB(HWND hWnd) { return 0; }
  function HWND (line 800) | HWND UNKCALL SelConn_1000AB83(HWND hWnd) { return 0; }
  function SelConn_1000AC07 (line 840) | int __fastcall SelConn_1000AC07(int a1, int a2) { return 0; }
  function SelConn_1000AC30 (line 856) | int UNKCALL SelConn_1000AC30(HWND arg) { return 0; }
  function SelConn_1000AC9E (line 904) | int UNKCALL SelConn_1000AC9E(HWND hWnd) { return 0; }
  function SelConn_1000ADA8 (line 970) | int UNKCALL SelConn_1000ADA8(HWND hWnd) { return 0; }
  function BOOL (line 983) | BOOL UNKCALL SelConn_1000ADD0(HWND hWnd) { return 0; }
  function SelConn_1000AE19 (line 1000) | int __fastcall SelConn_1000AE19(int a1, UINT a2) { return 0; }
  function HWND (line 1020) | HWND __fastcall SelConn_1000AE59(HWND hWnd, int a2, int a3) { return 0; }
  function UiSelectProvider (line 1106) | int __stdcall UiSelectProvider(int a1, _SNETPROGRAMDATA *client_info, _S...

FILE: DiabloUI/seldial.cpp
  function SelDial_1000B011 (line 2) | int UNKCALL SelDial_1000B011(char *arg) { return 0; }
  function SelDial_1000B0C4 (line 43) | signed int SelDial_1000B0C4() { return 0; }
  function SelDial_1000B0CF (line 54) | int __stdcall SelDial_1000B0CF(HWND hWnd, UINT Msg, WPARAM wParam, LPARA...
  function HWND (line 127) | HWND __fastcall SelDial_1000B1FB(HWND hWnd, int a2) { return 0; }
  function HWND (line 161) | HWND UNKCALL SelDial_1000B29A(HWND hDlg) { return 0; }
  function SelDial_1000B2D8 (line 176) | int __fastcall SelDial_1000B2D8(int a1, int a2) { return 0; }
  function HWND (line 205) | HWND UNKCALL SelDial_1000B354(HWND hDlg) { return 0; }
  function HWND (line 244) | HWND UNKCALL SelDial_1000B3D8(HWND hDlg) { return 0; }
  function HWND (line 273) | HWND UNKCALL SelDial_1000B44C(HWND hDlg) { return 0; }
  function HWND (line 291) | HWND USERCALL SelDial_1000B483(HWND hWnd, int a2) { return 0; }
  function SelDial_1000B5D9 (line 374) | int SelDial_1000B5D9() { return 0; }
  function SelDial_1000B614 (line 399) | int __fastcall SelDial_1000B614(HWND hWnd, int a2, int a3) { return 0; }

FILE: DiabloUI/selgame.cpp
  function SelGame_1000B66A (line 2) | void UNKCALL SelGame_1000B66A(void *arg) { return; }
  function SelGame_1000B671 (line 9) | int SelGame_1000B671() { return 0; }
  function SelGame_1000B677 (line 16) | void UNKCALL SelGame_1000B677(void *arg) { return; }
  function SelGame_1000B67E (line 23) | int SelGame_1000B67E() { return 0; }
  function UiSelectGame (line 30) | int __stdcall UiSelectGame(int a1, _SNETPROGRAMDATA *client_info, _SNETP...
  function SelGame_1000B795 (line 77) | signed int SelGame_1000B795() { return 0; }

FILE: DiabloUI/selhero.cpp
  function SelHero_GetNumHeroesLeft (line 8) | int __cdecl SelHero_GetNumHeroesLeft()
  function SelHero_SetHeroDifficulty (line 15) | void __fastcall SelHero_SetHeroDifficulty(int diff)
  function SelHero_GetHeroIsGood (line 34) | int __cdecl SelHero_GetHeroIsGood()
  function SelHero_SetClassStats (line 40) | int __fastcall SelHero_SetClassStats(int heroclass, _uidefaultstats *pSt...
  function SelHero_cpp_init (line 46) | void __cdecl SelHero_cpp_init()
  function SelHero_SetStaticBMP (line 54) | void __fastcall SelHero_SetStaticBMP(HWND hWnd, int adjust_size)
  function SelHero_PrintHeroInfo (line 67) | void __fastcall SelHero_PrintHeroInfo(HWND hWnd, _uiheroinfo *pInfo)
  function SelHero_SetStringWithMsg (line 140) | void __fastcall SelHero_SetStringWithMsg(HWND hWnd, const char *str)
  function BOOL (line 154) | BOOL __fastcall SelHero_IsNameReserved(const char *name)
  function SelHero_SetLastNamePos (line 178) | void __fastcall SelHero_SetLastNamePos(char *name)
  function BOOL (line 185) | BOOL __fastcall SelHero_NameHasChar(const char *name, char *illegalchrs)
  function BOOL (line 203) | BOOL __fastcall UiValidPlayerName(const char *name)
  function BOOL (line 216) | BOOL __stdcall UiSelHeroMultDialog(
  function LRESULT (line 250) | LRESULT __stdcall SelHero_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LP...
  function SelHero_DoStuffWithStrings (line 331) | void __fastcall SelHero_DoStuffWithStrings(HWND hWnd)
  function SelHero_FreeSomeMemory (line 400) | void __fastcall SelHero_FreeSomeMemory(void *ptr)
  function SelHero_DoHeroSelList (line 417) | void __fastcall SelHero_DoHeroSelList(HWND hWnd)
  function SelHero_DoHeroSelClass (line 452) | void __fastcall SelHero_DoHeroSelClass(HWND hWnd)
  function SelHero_DoEnterName (line 480) | void __fastcall SelHero_DoEnterName(HWND hWnd)
  function BOOL (line 496) | BOOL __fastcall SelHero_CreateHero(HWND hWnd, char *name)
  function SelHero_DoSelLoad (line 532) | void __fastcall SelHero_DoSelLoad(HWND hWnd)
  function SelHero_DoSelDiff (line 547) | void __fastcall SelHero_DoSelDiff(HWND hWnd)
  function SelHero_DeleteAndFree (line 580) | void __fastcall SelHero_DeleteAndFree(HWND hWnd)
  function SelHero_FreeAllHeroes (line 598) | void __fastcall SelHero_FreeAllHeroes(_uiheroinfo *pInfo)
  function SelHero_DoHeroEndFade (line 612) | void __fastcall SelHero_DoHeroEndFade(HWND hWnd, int a2)
  function SelHero_LoadHeroGFX (line 623) | void __fastcall SelHero_LoadHeroGFX(HWND hWnd)
  function SelHero_SelectHeroRegion (line 673) | void __fastcall SelHero_SelectHeroRegion(HWND hWnd)
  function BOOL (line 698) | BOOL __stdcall SelHero_GetHeroInfo(_uiheroinfo *pInfo)
  function BOOL (line 714) | BOOL __stdcall UiSelHeroSingDialog(

FILE: DiabloUI/selipx.cpp
  function SelIPX_1000C629 (line 9) | signed int SelIPX_1000C629() { return 0; }
  function BOOL (line 20) | BOOL __fastcall SelIPX_1000C634(int a1, int a2, int a3, DWORD *a4, int a...
  function SelIPX_1000C692 (line 41) | int __stdcall SelIPX_1000C692(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM...
  function LONG (line 126) | LONG __fastcall SelIPX_1000C818(HWND hDlg, int nIDDlgItem) { return 0; }
  function HWND (line 200) | HWND UNKCALL SelIPX_1000C982(HWND hDlg) { return 0; }
  function SelIPX_1000C99F (line 211) | int SelIPX_1000C99F() { return 0; }
  function SelIPX_1000CA64 (line 278) | void __fastcall SelIPX_1000CA64(DWORD *a1) { return; }
  function SelIPX_1000CAC1 (line 322) | int UNKCALL SelIPX_1000CAC1(void *arg) { return 0; }
  function SelIPX_1000CB83 (line 395) | int __fastcall SelIPX_1000CB83(HWND a1, const char *a2) { return 0; }
  function SelIPX_1000CC41 (line 449) | int UNKCALL SelIPX_1000CC41(HWND hDlg) { return 0; }
  function SelIPX_1000CCC5 (line 474) | int __fastcall SelIPX_1000CCC5(DWORD *a1) { return 0; }
  function HWND (line 493) | HWND UNKCALL SelIPX_1000CCD9(HWND hWnd) { return 0; }
  function HWND (line 525) | HWND UNKCALL SelIPX_1000CD4A(HWND hWnd) { return 0; }
  function SelIPX_1000CEE6 (line 590) | void UNKCALL SelIPX_1000CEE6(HWND hDlg) { return; }
  function LRESULT (line 620) | LRESULT __stdcall SelIPX_1000CF38(HWND hWnd, UINT Msg, WPARAM wParam, LP...
  function HWND (line 710) | HWND UNKCALL SelIPX_1000D070(HWND hWnd) { return 0; }
  function HWND (line 742) | HWND UNKCALL SelIPX_1000D0E1(HWND hWnd) { return 0; }
  function SelIPX_1000D18C (line 795) | int UNKCALL SelIPX_1000D18C(HWND hWnd) { return 0; }
  function HWND (line 842) | HWND UNKCALL SelIPX_1000D1D4(HWND hWnd) { return 0; }
  function HWND (line 898) | HWND UNKCALL SelIPX_1000D284(HWND hWnd) { return 0; }
  function HWND (line 953) | HWND UNKCALL SelIPX_1000D31C(HWND hWnd) { return 0; }
  function SelIPX_1000D3A0 (line 993) | int __fastcall SelIPX_1000D3A0(int a1, int a2) { return 0; }
  function HWND (line 1009) | HWND USERCALL SelIPX_1000D3C5(HWND hDlg, int a2) { return 0; }
  function BOOL (line 1089) | BOOL __fastcall SelIPX_1000D4CA(HWND hDlg, int a2) { return 0; }
  function SelIPX_1000D5B0 (line 1155) | int __fastcall SelIPX_1000D5B0(int a1, int a2) { return 0; }
  function HWND (line 1191) | HWND __fastcall SelIPX_1000D696(HWND hDlg, int a2, int a3) { return 0; }

FILE: DiabloUI/sellist.cpp
  function SelList_cpp_init (line 2) | void __cdecl SelList_cpp_init()
  function LRESULT (line 10) | LRESULT __stdcall SelList_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LP...
  function SelList_DeleteFreeProcs (line 93) | void __fastcall SelList_DeleteFreeProcs(HWND hWnd)
  function SelList_GetHeroStats (line 107) | void __fastcall SelList_GetHeroStats(HWND hWnd, int nIDDlgItem)
  function SelList_CountHeroList (line 168) | void __fastcall SelList_CountHeroList(HWND hWnd)
  function SelList_GetNextHeroLong (line 181) | int __fastcall SelList_GetNextHeroLong(HWND hWnd)
  function SelList_LoadFocus16 (line 210) | void __fastcall SelList_LoadFocus16(HWND hWnd)
  function SelList_KillFocus16 (line 217) | void __fastcall SelList_KillFocus16(HWND hWnd)
  function SelList_ShowListWindow (line 224) | void __fastcall SelList_ShowListWindow(HWND hWnd)
  function SelList_SetHeroDlgLong (line 254) | void __fastcall SelList_SetHeroDlgLong(HWND hWnd, _uiheroinfo *pInfo)
  function SelList_DoListOldProc (line 279) | void __fastcall SelList_DoListOldProc(HWND hWnd)
  function LRESULT (line 296) | LRESULT __stdcall SelList_OldListWndProc(HWND hWnd, UINT Msg, WPARAM wPa...
  function SelList_ShiftHeroDlgItems (line 377) | void __fastcall SelList_ShiftHeroDlgItems(HWND hWnd)
  function SelList_ShiftHeroDlgItm2 (line 397) | void __fastcall SelList_ShiftHeroDlgItm2(HWND hWnd)
  function SelList_HeroesWithBigDialogs (line 417) | void __fastcall SelList_HeroesWithBigDialogs(HWND hWnd)
  function SelList_HeroesWithHugeDlg (line 470) | void __fastcall SelList_HeroesWithHugeDlg(HWND hWnd)
  function SelList_HeroDlgWithSound (line 512) | void __fastcall SelList_HeroDlgWithSound(HWND hWnd)
  function SelList_HeroDlgWithSnd2 (line 558) | void __fastcall SelList_HeroDlgWithSnd2(HWND hWnd)
  function SelList_ChooseDlgFromSize (line 594) | void __fastcall SelList_ChooseDlgFromSize(HWND hWnd, int width, int height)

FILE: DiabloUI/selload.cpp
  function LRESULT (line 2) | LRESULT __stdcall SelLoad_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LP...
  function SelLoad_DeleteProcsAndSpin (line 67) | void __fastcall SelLoad_DeleteProcsAndSpin(HWND hWnd)
  function SelLoad_LoadFocusAndMsg (line 80) | void __fastcall SelLoad_LoadFocusAndMsg(HWND hWnd)
  function SelLoad_SelectSndLoad (line 100) | void __fastcall SelLoad_SelectSndLoad(HWND hWnd, int a2)
  function SelLoad_cpp_init (line 116) | void __cdecl SelLoad_cpp_init()

FILE: DiabloUI/selmodem.cpp
  function SelModem_1000E42A (line 2) | signed int SelModem_1000E42A() { return 0; }
  function SelModem_1000E435 (line 13) | int __fastcall SelModem_1000E435(void *a1, int a2, int a3, char *a4, cha...
  function SelModem_1000E505 (line 79) | signed int UNKCALL SelModem_1000E505(void *arg) { return 0; }
  function SelModem_1000E51E (line 89) | signed int SelModem_1000E51E() { return 0; }
  function SelModem_1000E553 (line 109) | int __fastcall SelModem_1000E553(DWORD *a1) { return 0; }
  function SelModem_1000E567 (line 128) | int UNKCALL SelModem_1000E567(void *arg) { return 0; }
  function SelModem_1000E57B (line 139) | int __fastcall SelModem_1000E57B(int a1, int a2) { return 0; }
  function SelModem_1000E5CC (line 161) | signed int SelModem_1000E5CC() { return 0; }
  function SelModem_1000E63E (line 191) | int __stdcall SelModem_1000E63E(HWND hDlg, UINT Msg, WPARAM wParam, LPAR...
  function SelModem_1000E783 (line 269) | void UNKCALL SelModem_1000E783(HWND hDlg) { return; }
  function HWND (line 289) | HWND UNKCALL SelModem_1000E7E9(HWND hDlg) { return 0; }
  function SelModem_1000E80E (line 302) | int UNKCALL SelModem_1000E80E(HWND hWnd) { return 0; }
  function HWND (line 334) | HWND UNKCALL SelModem_1000E843(HWND hWnd) { return 0; }
  function SelModem_1000E932 (line 375) | int __fastcall SelModem_1000E932(HWND a1, const char *a2) { return 0; }
  function SelModem_1000E9B2 (line 418) | void UNKCALL SelModem_1000E9B2(HWND hDlg) { return; }
  function LRESULT (line 448) | LRESULT __stdcall SelModem_1000EA04(HWND hWnd, UINT Msg, WPARAM wParam, ...
  function HWND (line 523) | HWND UNKCALL SelModem_1000EB2C(HWND hWnd) { return 0; }
  function HWND (line 555) | HWND UNKCALL SelModem_1000EB9D(HWND hWnd) { return 0; }
  function HWND (line 587) | HWND UNKCALL SelModem_1000EC0E(HWND hWnd) { return 0; }
  function HWND (line 650) | HWND UNKCALL SelModem_1000ECB2(HWND hWnd) { return 0; }
  function HWND (line 701) | HWND UNKCALL SelModem_1000ED3B(HWND hWnd) { return 0; }
  function HWND (line 751) | HWND UNKCALL SelModem_1000EDBC(HWND hWnd) { return 0; }
  function SelModem_1000EE29 (line 786) | int __fastcall SelModem_1000EE29(int a1, int a2) { return 0; }
  function HWND (line 819) | HWND __fastcall SelModem_1000EE78(HWND hWnd, int a2, int a3) { return 0; }

FILE: DiabloUI/selregn.cpp
  function SelRegn_1000EF60 (line 19) | signed int SelRegn_1000EF60() { return 0; }
  function SelRegn_1000EF6B (line 30) | int __stdcall SelRegn_1000EF6B(HWND hWnd, UINT Msg, WPARAM wParam, LPARA...
  function HWND (line 109) | HWND __fastcall SelRegn_1000F0D7(HWND hDlg, int nIDDlgItem) { return 0; }
  function HWND (line 129) | HWND UNKCALL SelRegn_1000F109(HWND hDlg) { return 0; }
  function SelRegn_1000F126 (line 140) | int SelRegn_1000F126() { return 0; }
  function SelRegn_1000F161 (line 174) | void UNKCALL SelRegn_1000F161(HWND hDlg) { return; }
  function SelRegn_1000F1D4 (line 196) | int __fastcall SelRegn_1000F1D4(DWORD *a1) { return 0; }
  function SelRegn_1000F1E8 (line 215) | int UNKCALL SelRegn_1000F1E8(void *arg) { return 0; }
  function HWND (line 226) | HWND UNKCALL SelRegn_1000F1FC(HWND hWnd) { return 0; }
  function SelRegn_1000F2ED (line 269) | signed int SelRegn_1000F2ED() { return 0; }
  function SelRegn_1000F346 (line 299) | int __fastcall SelRegn_1000F346(HWND a1, const char *a2) { return 0; }
  function SelRegn_1000F3C2 (line 344) | void UNKCALL SelRegn_1000F3C2(HWND hDlg) { return; }
  function LRESULT (line 374) | LRESULT __stdcall SelRegn_1000F414(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function HWND (line 449) | HWND UNKCALL SelRegn_1000F53C(HWND hWnd) { return 0; }
  function HWND (line 481) | HWND UNKCALL SelRegn_1000F5AD(HWND hWnd) { return 0; }
  function HWND (line 513) | HWND UNKCALL SelRegn_1000F61E(HWND hWnd) { return 0; }
  function SelRegn_1000F6C9 (line 566) | int UNKCALL SelRegn_1000F6C9(HWND hWnd) { return 0; }
  function HWND (line 613) | HWND UNKCALL SelRegn_1000F711(HWND hWnd) { return 0; }
  function HWND (line 669) | HWND UNKCALL SelRegn_1000F7C1(HWND hWnd) { return 0; }
  function HWND (line 724) | HWND UNKCALL SelRegn_1000F859(HWND hWnd) { return 0; }
  function SelRegn_1000F8DD (line 764) | signed int UNKCALL SelRegn_1000F8DD(void *arg) { return 0; }
  function SelRegn_1000F8F6 (line 777) | signed int SelRegn_1000F8F6() { return 0; }
  function HWND (line 796) | HWND __fastcall SelRegn_1000F929(HWND hWnd, int a2, int a3) { return 0; }
  function UiSelectRegion (line 866) | signed int __stdcall UiSelectRegion(DWORD *a1) { return 0; }

FILE: DiabloUI/selyesno.cpp
  function SelYesNo_YesNoDialog (line 2) | int __fastcall SelYesNo_YesNoDialog(HWND hWnd, char *dialogstr, char *he...
  function LRESULT (line 16) | LRESULT __stdcall SelYesNo_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, L...
  function SelYesNo_RemoveYNDialog (line 83) | void __fastcall SelYesNo_RemoveYNDialog(HWND hWnd)
  function SelYesNo_LoadSelYN_GFX (line 104) | void __fastcall SelYesNo_LoadSelYN_GFX(HWND hWnd)
  function SelYesNo_DoSelectYesNo (line 146) | void __fastcall SelYesNo_DoSelectYesNo(HWND hWnd, int option)
  function SelYesNo_SelOkDialog (line 167) | int __fastcall SelYesNo_SelOkDialog(HWND hWnd, char *dialogstr, char *he...
  function SelYesNo_SpawnErrDialog (line 181) | int __fastcall SelYesNo_SpawnErrDialog(HWND hWnd, int string_rsrc, int i...
  function SelYesNo_cpp_init (line 198) | void __cdecl SelYesNo_cpp_init()

FILE: DiabloUI/title.cpp
  function Title_BlitTitleBuffer (line 2) | void __fastcall Title_BlitTitleBuffer(HWND hWnd)
  function Title_DeletePhTrans (line 39) | void __cdecl Title_DeletePhTrans()
  function Title_FreeTransMem (line 54) | void __fastcall Title_FreeTransMem(HWND hWnd)
  function Title_SetTitleBMP (line 72) | void __fastcall Title_SetTitleBMP(HWND hWnd)
  function Title_LoadTitleImage (line 94) | void __fastcall Title_LoadTitleImage(HWND hWnd, const char *pszFileName)
  function Title_LoadImgSetTimer (line 135) | void __fastcall Title_LoadImgSetTimer(HWND hWnd, const char *pszFileName)
  function Title_BlitTitleBufFnc (line 144) | void __stdcall Title_BlitTitleBufFnc(int hWnd, int a2, int a3, int a4)
  function Title_cpp_init (line 150) | void __cdecl Title_cpp_init()
  function Title_KillTitleTimer (line 158) | void __fastcall Title_KillTitleTimer(HWND hWnd)
  function BOOL (line 168) | BOOL __stdcall UiTitleDialog(int a1)
  function LRESULT (line 180) | LRESULT __stdcall Title_MainProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP...
  function Title_KillTimerAndFree (line 233) | void __fastcall Title_KillTimerAndFree(HWND hWnd)
  function Title_LoadAllTitleImgs (line 244) | void __fastcall Title_LoadAllTitleImgs(HWND hWnd, int time)
  function Title_KillAndFadeDlg (line 263) | void __fastcall Title_KillAndFadeDlg(HWND hWnd)

FILE: DiabloUI/titlesnd.cpp
  function TitleSnd_SetSoundFunction (line 2) | void __fastcall TitleSnd_SetSoundFunction(void(__stdcall *func)(const ch...
  function TitleSnd_InitSoundFunc (line 8) | void __cdecl TitleSnd_InitSoundFunc()
  function TitleSnd_PlayMoveSound (line 14) | void __cdecl TitleSnd_PlayMoveSound()
  function TitleSnd_PlaySelectSound (line 21) | void __cdecl TitleSnd_PlaySelectSound()
  function TitleSnd_cpp_init (line 28) | void __cdecl TitleSnd_cpp_init()

FILE: Source/_asm.cpp
  function asm_cel_light_edge (line 11) | static __inline void asm_cel_light_edge(unsigned char w, BYTE *tbl, BYTE...
  function asm_cel_light_square (line 30) | static __inline void asm_cel_light_square(unsigned char w, BYTE *tbl, BY...
  function asm_trans_light_cel_0_2 (line 42) | static __inline void asm_trans_light_cel_0_2(unsigned char w, BYTE *tbl,...
  function asm_trans_light_edge_0_2 (line 53) | static __inline void asm_trans_light_edge_0_2(unsigned char w, BYTE *tbl...
  function asm_trans_light_square_0_2 (line 67) | static __inline void asm_trans_light_square_0_2(unsigned char w, BYTE *t...
  function asm_trans_light_cel_1_3 (line 77) | static __inline void asm_trans_light_cel_1_3(unsigned char w, BYTE *tbl,...
  function asm_trans_light_edge_1_3 (line 89) | static __inline void asm_trans_light_edge_1_3(unsigned char w, BYTE *tbl...
  function asm_trans_light_square_1_3 (line 103) | static __inline void asm_trans_light_square_1_3(unsigned char w, BYTE *t...
  function asm_trans_light_mask (line 113) | static __inline unsigned int asm_trans_light_mask(unsigned char w, BYTE ...

FILE: Source/_render.cpp
  function drawTopArchesUpperScreen (line 1) | __declspec(naked) void drawTopArchesUpperScreen(BYTE *pBuff)
  function drawBottomArchesUpperScreen (line 2306) | __declspec(naked) void drawBottomArchesUpperScreen(BYTE *pBuff, DWORD *p...
  function drawUpperScreen (line 3463) | __declspec(naked) void drawUpperScreen(BYTE *pBuff)
  function drawTopArchesLowerScreen (line 4649) | __declspec(naked) void drawTopArchesLowerScreen(BYTE *pBuff)
  function drawBottomArchesLowerScreen (line 7353) | __declspec(naked) void drawBottomArchesLowerScreen(BYTE *pBuff, DWORD *p...
  function drawLowerScreen (line 8818) | __declspec(naked) void drawLowerScreen(BYTE *pBuff)

FILE: Source/appfat.cpp
  function LONG (line 25) | static LONG __stdcall BreakFilter(PEXCEPTION_POINTERS pExc)
  function TriggerBreak (line 42) | void TriggerBreak()
  function TraceErrorDD (line 65) | static void TraceErrorDD(HRESULT hError, char *pszBuffer, DWORD dwMaxChars)
  function TraceErrorDS (line 381) | static void TraceErrorDS(HRESULT hError, char *pszBuffer, DWORD dwMaxChars)
  function MsgBox (line 482) | static void MsgBox(const char *pszFmt, va_list va)
  function FreeDlg (line 495) | static void FreeDlg()
  function app_fatal (line 520) | __declspec(naked)
  function DrawDlg (line 547) | void __cdecl DrawDlg(const char *pszFmt, ...)
  function assert_fail (line 565) | void assert_fail(int nLineNo, const char *pszFile, const char *pszFail)
  function DDErrMsg (line 574) | void DDErrMsg(DWORD error_code, int log_line_nr, const char *log_file_path)
  function DSErrMsg (line 587) | void DSErrMsg(DWORD error_code, int log_line_nr, const char *log_file_path)
  function center_window (line 600) | void center_window(HWND hDlg)
  function TextDlg (line 623) | static void TextDlg(HWND hDlg, const char *text)
  function BOOL (line 634) | static BOOL CALLBACK FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM...
  function ErrDlg (line 657) | void ErrDlg(int dialog_id, DWORD error_code, const char *log_file_path, ...
  function ErrOkDlg (line 679) | void ErrOkDlg(int dialog_id, DWORD error_code, const char *log_file_path...
  function FileErrDlg (line 696) | void FileErrDlg(const char *error)
  function DiskFreeDlg (line 712) | void DiskFreeDlg(const char *error)
  function BOOL (line 725) | BOOL InsertCDDlg()
  function DirErrorDlg (line 744) | void DirErrorDlg(const char *error)

FILE: Source/automap.cpp
  function InitAutomapOnce (line 55) | void InitAutomapOnce()
  function InitAutomap (line 69) | void InitAutomap()
  function StartAutomap (line 144) | void StartAutomap()
  function AutomapUp (line 154) | void AutomapUp()
  function AutomapDown (line 163) | void AutomapDown()
  function AutomapLeft (line 172) | void AutomapLeft()
  function AutomapRight (line 181) | void AutomapRight()
  function AutomapZoomIn (line 190) | void AutomapZoomIn()
  function AutomapZoomOut (line 205) | void AutomapZoomOut()
  function DrawAutomapTile (line 220) | static void DrawAutomapTile(int sx, int sy, WORD automap_type)
  function DrawAutomapItem (line 406) | static void DrawAutomapItem(int x, int y, BYTE color)
  function SearchAutomapItem (line 420) | void SearchAutomapItem()
  function DrawAutomapPlr (line 487) | static void DrawAutomapPlr()
  function DrawAutomapText (line 611) | static void DrawAutomapText()
  function DrawAutomap (line 648) | void DrawAutomap()
  function SetAutomapView (line 740) | void SetAutomapView(int x, int y)
  function AutomapZoomReset (line 815) | void AutomapZoomReset()

FILE: Source/capture.cpp
  function BOOL (line 15) | static BOOL CaptureHdr(HANDLE hFile, short width, short height)
  function BOOL (line 41) | static BOOL CapturePal(HANDLE hFile, PALETTEENTRY *palette)
  function BYTE (line 65) | static BYTE *CaptureEnc(BYTE *src, BYTE *dst, int width)
  function BOOL (line 108) | static BOOL CapturePix(HANDLE hFile, WORD width, WORD height, WORD strid...
  function HANDLE (line 127) | static HANDLE CaptureFile(char *dst_path)
  function RedPalette (line 159) | static void RedPalette(PALETTEENTRY *pal)
  function CaptureScreen (line 178) | void CaptureScreen()

FILE: Source/codec.cpp
  type CodecSignature (line 8) | struct CodecSignature {
  function codec_init_key (line 17) | static void codec_init_key(int unused, const char *pszPassword)
  function codec_decode (line 53) | int codec_decode(BYTE *pbSrcDst, DWORD size, const char *pszPassword)
  function DWORD (line 97) | DWORD codec_get_encoded_len(DWORD dwSrcBytes)
  function codec_encode (line 104) | void codec_encode(BYTE *pbSrcDst, DWORD size, int size_64, const char *p...

FILE: Source/control.cpp
  function SetSpellTrans (line 410) | void SetSpellTrans(char t)
  function DrawSpell (line 470) | void DrawSpell()
  function SetSpell (line 630) | void SetSpell()
  function SetSpeedSpell (line 641) | void SetSpeedSpell(int slot)
  function ToggleSpell (line 655) | void ToggleSpell(int slot)
  function AddPanelString (line 981) | void AddPanelString(const char *str, BOOL just)
  function ClearPanel (line 990) | void ClearPanel()
  function SetFlaskHeight (line 1081) | void SetFlaskHeight(BYTE *pCelBuff, int min, int max, int sx, int sy)
  function DrawFlask (line 1127) | void DrawFlask(BYTE *pCelBuff, int w, int nSrcOff, BYTE *pBuff, int nDst...
  function DrawLifeFlask (line 1174) | void DrawLifeFlask()
  function UpdateLifeFlask (line 1210) | void UpdateLifeFlask()
  function DrawManaFlask (line 1239) | void DrawManaFlask()
  function control_update_life_mana (line 1256) | void control_update_life_mana()
  function UpdateManaFlask (line 1277) | void UpdateManaFlask()
  function InitControlPan (line 1304) | void InitControlPan()
  function DrawCtrlPan (line 1400) | void DrawCtrlPan()
  function DrawCtrlBtns (line 1410) | void DrawCtrlBtns()
  function DoSpeedBook (line 1433) | void DoSpeedBook()
  function DoPanBtn (line 1489) | void DoPanBtn()
  function control_set_button_down (line 1510) | void control_set_button_down(int btn_id)
  function control_check_btn_press (line 1517) | void control_check_btn_press()
  function DoAutoMap (line 1539) | void DoAutoMap()
  function CheckPanelInfo (line 1555) | void CheckPanelInfo()
  function CheckBtnUp (line 1652) | void CheckBtnUp()
  function FreeControlPan (line 1727) | void FreeControlPan()
  function BOOL (line 1747) | BOOL control_WriteStringToBuffer(BYTE *str)
  function CPrintString (line 1764) | static void CPrintString(int y, const char *str, BOOL center, int lines)
  function PrintInfo (line 1796) | static void PrintInfo()
  function DrawInfoBox (line 1818) | void DrawInfoBox()
  function ADD_PlrStringXY (line 1889) | static void ADD_PlrStringXY(int x, int y, int width, const char *pszStr,...
  function PrintGameStr (line 1919) | void PrintGameStr(int x, int y, const char *str, int color)
  function MY_PlrStringXY (line 1942) | static void MY_PlrStringXY(int x, int y, int endX, const char *pszStr, c...
  function DrawChr (line 1972) | void DrawChr()
  function CheckLvlBtn (line 2196) | void CheckLvlBtn()
  function ReleaseLvlBtn (line 2202) | void ReleaseLvlBtn()
  function DrawLevelUpIcon (line 2209) | void DrawLevelUpIcon()
  function CheckChrBtns (line 2220) | void CheckChrBtns()
  function ReleaseChrBtns (line 2260) | void ReleaseChrBtns()
  function DrawDurIcon4Item (line 2295) | static int DrawDurIcon4Item(ItemStruct *pItem, int x, int c)
  function DrawDurIcon (line 2330) | void DrawDurIcon()
  function PrintSBookStr (line 2425) | static void PrintSBookStr(int x, int y, BOOL cjustflag, const char *pszS...
  function DrawSpellBook (line 2490) | void DrawSpellBook()
  function CheckSBook (line 2562) | void CheckSBook()
  function DrawGoldSplit (line 2605) | void DrawGoldSplit(int amount)
  function control_drop_gold (line 2634) | void control_drop_gold(char vkey)
  function control_remove_gold (line 2670) | void control_remove_gold(int pnum, int gold_index)
  function control_set_gold_curs (line 2698) | void control_set_gold_curs(int pnum)
  function DrawTalkPan (line 2735) | void DrawTalkPan()
  function BOOL (line 2795) | BOOL control_check_talk_btn()
  function control_release_talk_btn (line 2820) | void control_release_talk_btn()
  function control_reset_talk_msg (line 2841) | void control_reset_talk_msg(char *msg)
  function control_type_message (line 2856) | void control_type_message()
  function control_reset_talk (line 2875) | void control_reset_talk()
  function control_press_enter (line 2882) | static void control_press_enter()
  function BOOL (line 2922) | BOOL control_talk_last_key(int vkey)
  function control_up_down (line 2943) | static void control_up_down(int v)
  function BOOL (line 2956) | BOOL control_presskeys(int vkey)

FILE: Source/cursor.cpp
  function InitCursor (line 114) | void InitCursor()
  function FreeCursor (line 124) | void FreeCursor()
  function SetICursor (line 133) | void SetICursor(int i)
  function SetCursor_ (line 141) | void SetCursor_(int i)
  function NewCursor (line 149) | void NewCursor(int i)
  function InitLevelCursor (line 154) | void InitLevelCursor()
  function CheckTown (line 167) | void CheckTown()
  function CheckRportal (line 193) | void CheckRportal()
  function CheckCursMove (line 222) | void CheckCursMove()

FILE: Source/dead.cpp
  function InitDead (line 13) | void InitDead()
  function AddDead (line 72) | void AddDead(int dx, int dy, char dv, int ddir)
  function SyncUniqDead (line 77) | void SyncUniqDead()

FILE: Source/debug.cpp
  function LoadDebugGFX (line 21) | void LoadDebugGFX()
  function FreeDebugGFX (line 27) | void FreeDebugGFX()
  function init_seed_desync (line 33) | void init_seed_desync()
  function seed_desync_index_get (line 48) | void seed_desync_index_get()
  function seed_desync_index_set (line 58) | void seed_desync_index_set()
  function seed_desync_check (line 68) | void seed_desync_check(int seed)
  function CheckDungeonClear (line 84) | void CheckDungeonClear()
  function GiveGoldCheat (line 102) | void GiveGoldCheat()
  function StoresCheat (line 119) | void StoresCheat()
  function TakeGoldCheat (line 138) | void TakeGoldCheat()
  function MaxSpellsCheat (line 157) | void MaxSpellsCheat()
  function SetSpellLevelCheat (line 169) | void SetSpellLevelCheat(char spl, int spllvl)
  function SetAllSpellsCheat (line 175) | void SetAllSpellsCheat()
  function PrintDebugPlayer (line 201) | void PrintDebugPlayer(BOOL bNextPlayer)
  function PrintDebugQuest (line 225) | void PrintDebugQuest()
  function PrintDebugMonster (line 237) | void PrintDebugMonster(int m)
  function GetDebugMonster (line 263) | void GetDebugMonster()
  function NextDebugMonster (line 281) | void NextDebugMonster()

FILE: Source/diablo.cpp
  function diablo_parse_flags (line 97) | static void diablo_parse_flags(char *args)
  function FreeGameMem (line 292) | void FreeGameMem()
  function start_game (line 309) | static void start_game(unsigned int uMsg)
  function free_game (line 326) | static void free_game()
  function run_game_loop (line 346) | static void run_game_loop(unsigned int uMsg)
  function BOOL (line 421) | BOOL StartGame(BOOL bNewGame, BOOL bSinglePlayer)
  function diablo_init_screen (line 471) | static void diablo_init_screen()
  function LONG (line 490) | static LONG __stdcall diablo_TopLevelExceptionFilter(PEXCEPTION_POINTERS...
  function BOOL (line 501) | BOOL diablo_get_not_running()
  function BOOL (line 511) | static BOOL diablo_find_window(LPCSTR lpClassName)
  function diablo_reload_process (line 533) | static void diablo_reload_process(HINSTANCE hInstance)
  function BOOL (line 729) | static BOOL LeftMouseCmd(BOOL bShift)
  function BOOL (line 784) | static BOOL TryIconCurs()
  function BOOL (line 854) | static BOOL LeftMouseDown(int wParam)
  function LeftMouseUp (line 925) | static void LeftMouseUp()
  function RightMouseDown (line 939) | static void RightMouseDown()
  function diablo_pause_game (line 966) | static void diablo_pause_game()
  function diablo_hotkey_msg (line 980) | static void diablo_hotkey_msg(DWORD dwMsg)
  function BOOL (line 1004) | static BOOL PressSysKey(int wParam)
  function ReleaseKey (line 1012) | static void ReleaseKey(int vkey)
  function BOOL (line 1018) | BOOL PressEscKey()
  function PressKey (line 1060) | static void PressKey(int vkey)
  function PressChar (line 1266) | static void PressChar(WPARAM vkey)
  function LRESULT (line 1542) | LRESULT CALLBACK DisableInputWndProc(HWND hWnd, UINT uMsg, WPARAM wParam...
  function LRESULT (line 1586) | LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa...
  function LoadLvlGFX (line 1686) | void LoadLvlGFX()
  function LoadAllGFX (line 1756) | void LoadAllGFX()
  function CreateLevel (line 1771) | void CreateLevel(int lvldir)
  function LoadGameLevel (line 1827) | void LoadGameLevel(BOOL firstflag, int lvldir)
  function game_logic (line 2073) | static void game_logic()
  function timeout_cursor (line 2120) | static void timeout_cursor(BOOL bTimeout)
  function game_loop (line 2144) | void game_loop(BOOL bStartup)
  function diablo_color_cyc_logic (line 2163) | void diablo_color_cyc_logic()
  function PlayerStruct (line 2190) | static PlayerStruct *get_plr_mem(PlayerStruct *p)
  function alloc_plr (line 2212) | void alloc_plr()

FILE: Source/doom.cpp
  function doom_get_frame_from_time (line 34) | int doom_get_frame_from_time()
  function doom_cleanup (line 43) | void doom_cleanup()
  function doom_alloc_cel (line 58) | static void doom_alloc_cel()
  function doom_load_graphics (line 73) | static void doom_load_graphics()
  function doom_init (line 96) | void doom_init()
  function doom_draw (line 127) | void doom_draw()

FILE: Source/drlg_l1.cpp
  function DRLG_InitL5Vals (line 507) | void DRLG_InitL5Vals()
  function DRLG_PlaceDoor (line 526) | static void DRLG_PlaceDoor(int x, int y)
  function drlg_l1_crypt_lavafloor (line 586) | void drlg_l1_crypt_lavafloor()
  function DRLG_L1Shadows (line 877) | static void DRLG_L1Shadows()
  function DRLG_PlaceMiniSet (line 967) | static int DRLG_PlaceMiniSet(const BYTE *miniset, int tmin, int tmax, in...
  function DRLG_L1Floor (line 1081) | static void DRLG_L1Floor()
  function DRLG_L1Pass3 (line 1100) | static void DRLG_L1Pass3()
  function DRLG_LoadL1SP (line 1186) | static void DRLG_LoadL1SP()
  function DRLG_FreeL1SP (line 1203) | static void DRLG_FreeL1SP()
  function DRLG_Init_Globals (line 1208) | void DRLG_Init_Globals()
  function DRLG_InitL1Vals (line 1231) | static void DRLG_InitL1Vals()
  function LoadL1Dungeon (line 1274) | void LoadL1Dungeon(const char *sFileName, int vx, int vy)
  function LoadPreL1Dungeon (line 1326) | void LoadPreL1Dungeon(const char *sFileName, int vx, int vy)
  function InitL5Dungeon (line 1375) | static void InitL5Dungeon()
  function L5ClearFlags (line 1387) | static void L5ClearFlags()
  function L5drawRoom (line 1398) | static void L5drawRoom(int x, int y, int w, int h)
  function BOOL (line 1409) | static BOOL L5checkRoom(int x, int y, int width, int height)
  function L5roomGen (line 1425) | static void L5roomGen(int x, int y, int w, int h, int dir)
  function L5firstRoom (line 1482) | static void L5firstRoom()
  function L5GetArea (line 1572) | static int L5GetArea()
  function L5makeDungeon (line 1589) | static void L5makeDungeon()
  function L5makeDmt (line 1606) | static void L5makeDmt()
  function L5HWallOk (line 1628) | static int L5HWallOk(int i, int j)
  function L5VWallOk (line 1654) | static int L5VWallOk(int i, int j)
  function L5HorizWall (line 1680) | static void L5HorizWall(int i, int j, char p, int dx)
  function L5VertWall (line 1729) | static void L5VertWall(int i, int j, char p, int dy)
  function L5AddWall (line 1778) | static void L5AddWall()
  function DRLG_L5GChamber (line 1820) | static void DRLG_L5GChamber(int sx, int sy, BOOL topflag, BOOL bottomfla...
  function DRLG_L5GHall (line 1878) | static void DRLG_L5GHall(int x1, int y1, int x2, int y2)
  function L5tileFix (line 1895) | static void L5tileFix()
  function drlg_l1_crypt_rndset (line 2007) | void drlg_l1_crypt_rndset(const BYTE *miniset, int rndper)
  function DRLG_L5Subs (line 2063) | static void DRLG_L5Subs()
  function DRLG_L5SetRoom (line 2104) | static void DRLG_L5SetRoom(int rx1, int ry1)
  function L5FillChambers (line 2132) | static void L5FillChambers()
  function drlg_l1_set_crypt_room (line 2363) | void drlg_l1_set_crypt_room(int rx1, int ry1)
  function drlg_l1_set_corner_room (line 2395) | void drlg_l1_set_corner_room(int rx1, int ry1)
  function DRLG_L5FTVR (line 2423) | static void DRLG_L5FTVR(int i, int j, int x, int y, int d)
  function DRLG_L5FloodTVal (line 2466) | static void DRLG_L5FloodTVal()
  function DRLG_L5TransFix (line 2486) | static void DRLG_L5TransFix()
  function DRLG_L5DirtFix (line 2525) | static void DRLG_L5DirtFix()
  function DRLG_L5CornerFix (line 2583) | static void DRLG_L5CornerFix()
  function CreateL5Dungeon (line 2844) | void CreateL5Dungeon(DWORD rseed, int entry)
  function drlg_l1_crypt_pattern1 (line 2902) | void drlg_l1_crypt_pattern1(int rndper)
  function drlg_l1_crypt_pattern2 (line 2910) | void drlg_l1_crypt_pattern2(int rndper)
  function drlg_l1_crypt_pattern3 (line 2931) | void drlg_l1_crypt_pattern3(int rndper)
  function drlg_l1_crypt_pattern4 (line 2952) | void drlg_l1_crypt_pattern4(int rndper)
  function drlg_l1_crypt_pattern5 (line 2973) | void drlg_l1_crypt_pattern5(int rndper)
  function drlg_l1_crypt_pattern6 (line 2987) | void drlg_l1_crypt_pattern6(int rndper)
  function drlg_l1_crypt_pattern7 (line 3017) | void drlg_l1_crypt_pattern7(int rndper)

FILE: Source/drlg_l2.cpp
  function BOOL (line 1625) | static BOOL DRLG_L2PlaceMiniSet(BYTE *miniset, int tmin, int tmax, int c...
  function DRLG_L2PlaceRndSet (line 1711) | static void DRLG_L2PlaceRndSet(BYTE *miniset, int rndper)
  function DRLG_L2Subs (line 1762) | static void DRLG_L2Subs()
  function DRLG_L2Shadows (line 1800) | static void DRLG_L2Shadows()
  function InitDungeon (line 1841) | void InitDungeon()
  function DRLG_LoadL2SP (line 1853) | static void DRLG_LoadL2SP()
  function DRLG_FreeL2SP (line 1869) | static void DRLG_FreeL2SP()
  function DRLG_L2SetRoom (line 1874) | static void DRLG_L2SetRoom(int rx1, int ry1)
  function DefineRoom (line 1902) | static void DefineRoom(int nX1, int nY1, int nX2, int nY2, BOOL ForceHW)
  function CreateDoorType (line 1940) | static void CreateDoorType(int nX, int nY)
  function PlaceHallExt (line 1967) | static void PlaceHallExt(int nX, int nY)
  function AddHall (line 1974) | static void AddHall(int nX1, int nY1, int nX2, int nY2, int nHd)
  function CreateRoom (line 2014) | static void CreateRoom(int nX1, int nY1, int nX2, int nY2, int nRDest, i...
  function GetHall (line 2142) | static void GetHall(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd)
  function ConnectHall (line 2156) | static void ConnectHall(int nX1, int nY1, int nX2, int nY2, int nHd)
  function DoPatternCheck (line 2307) | static void DoPatternCheck(int i, int j)
  function L2TileFix (line 2378) | static void L2TileFix()
  function BOOL (line 2403) | static BOOL DL2_Cont(BOOL x1f, BOOL y1f, BOOL x2f, BOOL y2f)
  function DL2_NumNoChar (line 2418) | static int DL2_NumNoChar()
  function DL2_DrawRoom (line 2434) | static void DL2_DrawRoom(int x1, int y1, int x2, int y2)
  function DL2_KnockWalls (line 2453) | static void DL2_KnockWalls(int x1, int y1, int x2, int y2)
  function BOOL (line 2487) | static BOOL DL2_FillVoids()
  function BOOL (line 2759) | static BOOL CreateDungeon()
  function DRLG_L2Pass3 (line 2858) | static void DRLG_L2Pass3()
  function DRLG_L2FTVR (line 2943) | static void DRLG_L2FTVR(int i, int j, int x, int y, int d)
  function DRLG_L2FloodTVal (line 2990) | static void DRLG_L2FloodTVal()
  function DRLG_L2TransFix (line 3008) | static void DRLG_L2TransFix()
  function L2DirtFix (line 3043) | static void L2DirtFix()
  function L2LockoutFix (line 3071) | void L2LockoutFix()
  function L2DoorFix (line 3138) | void L2DoorFix()
  function DRLG_L2 (line 3154) | static void DRLG_L2(int entry)
  function DRLG_InitL2Vals (line 3329) | static void DRLG_InitL2Vals()
  function LoadL2Dungeon (line 3368) | void LoadL2Dungeon(const char *sFileName, int vx, int vy)
  function LoadPreL2Dungeon (line 3458) | void LoadPreL2Dungeon(const char *sFileName, int vx, int vy)
  function CreateL2Dungeon (line 3507) | void CreateL2Dungeon(DWORD rseed, int entry)

FILE: Source/drlg_l3.cpp
  function InitL3Dungeon (line 842) | static void InitL3Dungeon()
  function BOOL (line 856) | static BOOL DRLG_L3FillRoom(int x1, int y1, int x2, int y2)
  function DRLG_L3CreateBlock (line 900) | static void DRLG_L3CreateBlock(int x, int y, int obs, int dir)
  function DRLG_L3FloorArea (line 982) | static void DRLG_L3FloorArea(int x1, int y1, int x2, int y2)
  function DRLG_L3FillDiags (line 993) | static void DRLG_L3FillDiags()
  function DRLG_L3FillSingles (line 1018) | static void DRLG_L3FillSingles()
  function DRLG_L3FillStraights (line 1034) | static void DRLG_L3FillStraights()
  function DRLG_L3Edges (line 1116) | static void DRLG_L3Edges()
  function DRLG_L3GetFloorArea (line 1128) | static int DRLG_L3GetFloorArea()
  function DRLG_L3MakeMegas (line 1143) | static void DRLG_L3MakeMegas()
  function DRLG_L3River (line 1175) | static void DRLG_L3River()
  function BOOL (line 1426) | static BOOL DRLG_L3SpawnEdge(int x, int y, int *totarea)
  function BOOL (line 1476) | static BOOL DRLG_L3Spawn(int x, int y, int *totarea)
  function DRLG_L3Pool (line 1534) | static void DRLG_L3Pool()
  function DRLG_L3PoolFix (line 1589) | static void DRLG_L3PoolFix()
  function BOOL (line 1611) | static BOOL DRLG_L3PlaceMiniSet(const BYTE *miniset, int tmin, int tmax,...
  function DRLG_L3PlaceRndSet (line 1692) | static void DRLG_L3PlaceRndSet(const BYTE *miniset, int rndper)
  function BOOLEAN (line 1748) | BOOLEAN drlg_l3_hive_rnd_piece(const BYTE *miniset, int rndper)
  function BOOL (line 1808) | static BOOL WoodVertU(int i, int y)
  function BOOL (line 1835) | static BOOL WoodVertD(int i, int y)
  function BOOL (line 1856) | static BOOL WoodHorizL(int x, int j)
  function BOOL (line 1883) | static BOOL WoodHorizR(int x, int j)
  function AddFenceDoors (line 1904) | void AddFenceDoors()
  function FenceDoorFix (line 1928) | void FenceDoorFix()
  function DRLG_L3Wood (line 1976) | static void DRLG_L3Wood()
  function BOOL (line 2171) | BOOL DRLG_L3Anvil()
  function FixL3Warp (line 2232) | void FixL3Warp()
  function FixL3HallofHeroes (line 2252) | void FixL3HallofHeroes()
  function DRLG_L3LockRec (line 2279) | void DRLG_L3LockRec(int x, int y)
  function BOOL (line 2293) | BOOL DRLG_L3Lockout()
  function DRLG_L3Pass3 (line 2613) | static void DRLG_L3Pass3()
  function CreateL3Dungeon (line 2712) | void CreateL3Dungeon(DWORD rseed, int entry)
  function LoadL3Dungeon (line 2757) | void LoadL3Dungeon(const char *sFileName, int vx, int vy)
  function LoadPreL3Dungeon (line 2819) | void LoadPreL3Dungeon(const char *sFileName, int vx, int vy)

FILE: Source/drlg_l4.cpp
  function DRLG_L4Shadows (line 143) | static void DRLG_L4Shadows()
  function InitL4Dungeon (line 176) | static void InitL4Dungeon()
  function DRLG_LoadL4SP (line 191) | void DRLG_LoadL4SP()
  function DRLG_FreeL4SP (line 204) | void DRLG_FreeL4SP()
  function DRLG_L4SetSPRoom (line 209) | void DRLG_L4SetSPRoom(int rx1, int ry1)
  function L4makeDmt (line 237) | static void L4makeDmt()
  function L4HWallOk (line 253) | static int L4HWallOk(int i, int j)
  function L4VWallOk (line 304) | static int L4VWallOk(int i, int j)
  function L4HorizWall (line 358) | static void L4HorizWall(int i, int j, int dx)
  function L4VertWall (line 402) | static void L4VertWall(int i, int j, int dy)
  function L4AddWall (line 449) | static void L4AddWall()
  function L4tileFix (line 552) | static void L4tileFix()
  function DRLG_L4Subs (line 898) | static void DRLG_L4Subs()
  function L4makeDungeon (line 939) | static void L4makeDungeon()
  function uShape (line 985) | static void uShape()
  function GetArea (line 1064) | static long GetArea()
  function L4drawRoom (line 1082) | static void L4drawRoom(int x, int y, int width, int height)
  function BOOL (line 1093) | static BOOL L4checkRoom(int x, int y, int width, int height)
  function L4roomGen (line 1115) | static void L4roomGen(int x, int y, int w, int h, int dir)
  function L4firstRoom (line 1172) | static void L4firstRoom()
  function L4SaveQuads (line 1232) | void L4SaveQuads()
  function DRLG_L4SetRoom (line 1249) | void DRLG_L4SetRoom(BYTE *pSetPiece, int rx1, int ry1)
  function DRLG_LoadDiabQuads (line 1271) | void DRLG_LoadDiabQuads(BOOL preflag)
  function BOOL (line 1312) | static BOOL DRLG_L4PlaceMiniSet(const BYTE *miniset, int tmin, int tmax,...
  function DRLG_L4FTVR (line 1399) | static void DRLG_L4FTVR(int i, int j, int x, int y, int d)
  function DRLG_L4FloodTVal (line 1446) | static void DRLG_L4FloodTVal()
  function BOOL (line 1464) | BOOL IsDURWall(char d)
  function BOOL (line 1479) | BOOL IsDLLWall(char dd)
  function DRLG_L4TransFix (line 1494) | static void DRLG_L4TransFix()
  function DRLG_L4Corners (line 1537) | static void DRLG_L4Corners()
  function L4FixRim (line 1554) | void L4FixRim()
  function DRLG_L4GeneralFix (line 1566) | void DRLG_L4GeneralFix()
  function DRLG_L4 (line 1579) | static void DRLG_L4(int entry)
  function DRLG_L4Pass3 (line 1735) | static void DRLG_L4Pass3()
  function CreateL4Dungeon (line 1834) | void CreateL4Dungeon(DWORD rseed, int entry)

FILE: Source/dthread.cpp
  function dthread_handler (line 18) | static unsigned int __stdcall dthread_handler(void *data)
  function dthread_remove_player (line 56) | void dthread_remove_player(int pnum)
  function dthread_send_delta (line 68) | void dthread_send_delta(int pnum, char cmd, void *pbSrc, int dwLen)
  function dthread_start (line 94) | void dthread_start()
  function dthread_cleanup (line 117) | void dthread_cleanup()

FILE: Source/dx.cpp
  function dx_create_back_buffer (line 24) | static void dx_create_back_buffer()
  function dx_create_primary_surface (line 62) | static void dx_create_primary_surface()
  function HRESULT (line 76) | static HRESULT dx_DirectDrawCreate(LPGUID guid, LPDIRECTDRAW *lplpDD, LP...
  function dx_init (line 95) | void dx_init(HWND hWnd)
  function lock_buf_priv (line 163) | static void lock_buf_priv()
  function lock_buf (line 196) | void lock_buf(BYTE idx)
  function unlock_buf_priv (line 204) | static void unlock_buf_priv()
  function unlock_buf (line 226) | void unlock_buf(BYTE idx)
  function dx_cleanup (line 236) | void dx_cleanup()
  function dx_reinit (line 265) | void dx_reinit()
  function j_dx_reinit (line 290) | void j_dx_reinit()

FILE: Source/effects.cpp
  function BOOL (line 1103) | BOOL effect_is_playing(int nSFX)
  function stream_stop (line 1115) | void stream_stop()
  function stream_play (line 1125) | static void stream_play(TSFX *pSFX, int lVolume, int lPan)
  function stream_update (line 1154) | static void stream_update()
  function sfx_stop (line 1163) | static void sfx_stop()
  function InitMonsterSND (line 1176) | void InitMonsterSND(int monst)
  function FreeMonsterSnd (line 1203) | void FreeMonsterSnd()
  function BOOL (line 1228) | static BOOL calc_snd_position(int x, int y, int *plVolume, int *plPan)
  function PlaySFX_priv (line 1253) | static void PlaySFX_priv(TSFX *pSFX, BOOL loc, int x, int y)
  function PlayEffect (line 1286) | void PlayEffect(int i, int mode)
  function RndSFX (line 1312) | static int RndSFX(int psfx)
  function PlaySFX (line 1353) | void PlaySFX(int psfx)
  function PlaySfxLoc (line 1359) | void PlaySfxLoc(int psfx, int x, int y)
  function sound_stop (line 1374) | void sound_stop()
  function sound_update (line 1391) | void sound_update()
  function effects_cleanup_sfx (line 1401) | void effects_cleanup_sfx()
  function priv_sound_init (line 1415) | static void priv_sound_init(BYTE bLoadMask)
  function sound_init (line 1448) | void sound_init()
  function ui_sound_init (line 1474) | void ui_sound_init()
  function effects_play_sound (line 1479) | void __stdcall effects_play_sound(const char *snd_file)

FILE: Source/encrypt.cpp
  function Decrypt (line 11) | void Decrypt(DWORD *castBlock, DWORD size, DWORD key)
  function Encrypt (line 26) | void Encrypt(DWORD *castBlock, DWORD size, DWORD key)
  function DWORD (line 42) | DWORD Hash(const char *s, int type)
  function InitHash (line 58) | void InitHash()
  function PkwareBufferRead (line 75) | static unsigned int __cdecl PkwareBufferRead(char *buf, unsigned int *si...
  function PkwareBufferWrite (line 94) | static void __cdecl PkwareBufferWrite(char *buf, unsigned int *size, voi...
  function PkwareCompress (line 104) | int PkwareCompress(BYTE *srcData, int size)
  function PkwareDecompress (line 140) | void PkwareDecompress(BYTE *pbInBuff, int recv_size, int dwMaxBytes)

FILE: Source/engine.cpp
  function __FINLINE (line 52) | __FINLINE BYTE *CelGetFrame(BYTE *pCelBuff, int nCel, int *nDataSize)
  function __FINLINE (line 70) | __FINLINE int CelGetFrameSize(BYTE *pCelBuff, int nCel)
  function CelDraw (line 193) | void CelDraw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
  function CelBlitFrame (line 216) | void CelBlitFrame(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth)
  function CelClippedDraw (line 242) | void CelClippedDraw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth...
  function CelClippedBlit (line 288) | void CelClippedBlit(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, i...
  function CelDrawLight (line 683) | void CelDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
  function CelClippedDrawLight (line 714) | void CelClippedDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int n...
  function CelClippedBlitLightTrans (line 762) | void CelClippedBlitLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int...
  function CelClippedDrawSafe (line 1056) | void CelClippedDrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nW...
  function CelClippedBlitSafe (line 1102) | void CelClippedBlitSafe(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidt...
  function CelDrawLightSafe (line 1528) | void CelDrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWid...
  function CelClippedBlitLightTransSafe (line 1576) | void CelClippedBlitLightTransSafe(BYTE *pBuff, BYTE *pCelBuff, int nCel,...
  function DrawLine (line 2303) | void DrawLine(int x0, int y0, int x1, int y1, BYTE col)
  function GetDirection (line 2500) | int GetDirection(int x1, int y1, int x2, int y2)
  function SetRndSeed (line 2545) | void SetRndSeed(int s)
  function GetRndSeed (line 2556) | int GetRndSeed()
  function random_ (line 2569) | int random_(BYTE idx, int v)
  function engine_debug_trap (line 2582) | void engine_debug_trap(BOOL show_cursor)
  function BYTE (line 2601) | BYTE *DiabloAllocPtr(DWORD dwBytes)
  function mem_free_dbg (line 2620) | void mem_free_dbg(void *p)
  function BYTE (line 2635) | BYTE *LoadFileInMem(const char *pszName, DWORD *pdwFileLen)
  function DWORD (line 2664) | DWORD LoadFileWithMem(const char *pszName, BYTE *p)
  function Cl2ApplyTrans (line 2693) | void Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel)
  function Cl2Draw (line 3731) | void Cl2Draw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int C...
  function Cl2DrawOutline (line 3779) | void Cl2DrawOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, ...
  function Cl2DrawLightTbl (line 3828) | void Cl2DrawLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidt...
  function Cl2DrawLight (line 3886) | void Cl2DrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, ...
  function Cl2DrawSafe (line 3936) | void Cl2DrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i...
  function Cl2DrawOutlineSafe (line 3984) | void Cl2DrawOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nC...
  function Cl2DrawLightTblSafe (line 4035) | void Cl2DrawLightTblSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int n...
  function Cl2DrawLightSafe (line 4093) | void Cl2DrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWid...
  function PlayInGameMovie (line 4137) | void PlayInGameMovie(const char *pszMovie)

FILE: Source/error.cpp
  function InitDiabloMsg (line 74) | void InitDiabloMsg(char e)
  function ClrDiabloMsg (line 91) | void ClrDiabloMsg()
  function DrawDiabloMsg (line 102) | void DrawDiabloMsg()

FILE: Source/fault.cpp
  type STACK_FRAME (line 8) | struct STACK_FRAME {
    type STACK_FRAME (line 9) | struct STACK_FRAME
  function LPTOP_LEVEL_EXCEPTION_FILTER (line 23) | static LPTOP_LEVEL_EXCEPTION_FILTER fault_reset_filter(void *unused)
  function LPTOP_LEVEL_EXCEPTION_FILTER (line 28) | static LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_cleanup_filter()
  function fault_init_filter (line 33) | static void fault_init_filter()
  function fault_cleanup_filter_atexit (line 38) | static void fault_cleanup_filter_atexit()
  function fault_c_init (line 44) | __attribute__((constructor))
  function fault_hex_format (line 56) | static void fault_hex_format(BYTE *ptr, DWORD numBytes)
  function fault_unknown_module (line 97) | static void fault_unknown_module(LPCVOID lpAddress, LPSTR lpModuleName, ...
  function fault_call_stack (line 148) | static void fault_call_stack(void *instr, STACK_FRAME *stackFrame)
  function LONG (line 255) | LONG __stdcall TopLevelExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo)
  function LPTOP_LEVEL_EXCEPTION_FILTER (line 304) | LPTOP_LEVEL_EXCEPTION_FILTER fault_get_filter()

FILE: Source/gamemenu.cpp
  function gamemenu_update_single (line 82) | static void gamemenu_update_single(TMenuItem *pMenuItems)
  function gamemenu_update_multi (line 95) | static void gamemenu_update_multi(TMenuItem *pMenuItems)
  function gamemenu_on (line 100) | void gamemenu_on()
  function gamemenu_off (line 110) | void gamemenu_off()
  function gamemenu_handle_previous (line 115) | void gamemenu_handle_previous()
  function gamemenu_previous (line 123) | void gamemenu_previous(BOOL bActivate)
  function gamemenu_new_game (line 128) | void gamemenu_new_game(BOOL bActivate)
  function gamemenu_quit_game (line 147) | void gamemenu_quit_game(BOOL bActivate)
  function gamemenu_load_game (line 153) | void gamemenu_load_game(BOOL bActivate)
  function gamemenu_save_game (line 176) | void gamemenu_save_game(BOOL bActivate)
  function gamemenu_restart_town (line 206) | void gamemenu_restart_town(BOOL bActivate)
  function gamemenu_sound_music_toggle (line 211) | static void gamemenu_sound_music_toggle(const char *const *names, TMenuI...
  function gamemenu_slider_music_sound (line 225) | static int gamemenu_slider_music_sound(TMenuItem *menu_item)
  function gamemenu_get_music (line 230) | static void gamemenu_get_music()
  function gamemenu_get_sound (line 235) | static void gamemenu_get_sound()
  function gamemenu_jogging (line 241) | static void gamemenu_jogging()
  function gamemenu_get_gamma (line 249) | static void gamemenu_get_gamma()
  function gamemenu_get_color_cycling (line 256) | static void gamemenu_get_color_cycling()
  function gamemenu_slider_gamma (line 262) | static int gamemenu_slider_gamma()
  function gamemenu_options (line 267) | void gamemenu_options(BOOL bActivate)
  function gamemenu_music_volume (line 281) | void gamemenu_music_volume(BOOL bActivate)
  function gamemenu_sound_volume (line 335) | void gamemenu_sound_volume(BOOL bActivate)
  function gamemenu_loadjog (line 364) | void gamemenu_loadjog(BOOL bActivate)
  function gamemenu_gamma (line 375) | void gamemenu_gamma(BOOL bActivate)
  function gamemenu_color_cycling (line 393) | void gamemenu_color_cycling(BOOL bActivate)

FILE: Source/gendung.cpp
  function FillSolidBlockTbls (line 156) | void FillSolidBlockTbls()
  function SwapTile (line 227) | static void SwapTile(int f1, int f2)
  function SortTiles (line 245) | static void SortTiles(int frames)
  function IsometricCoord (line 603) | int IsometricCoord(int x, int y)
  function SetSpeedCels (line 613) | void SetSpeedCels()
  function SetDungeonMicros (line 624) | void SetDungeonMicros()
  function DRLG_InitTrans (line 673) | void DRLG_InitTrans()
  function DRLG_MRectTrans (line 680) | void DRLG_MRectTrans(int x1, int y1, int x2, int y2)
  function DRLG_RectTrans (line 698) | void DRLG_RectTrans(int x1, int y1, int x2, int y2)
  function DRLG_CopyTrans (line 710) | void DRLG_CopyTrans(int sx, int sy, int dx, int dy)
  function DRLG_ListTrans (line 716) | void DRLG_ListTrans(int num, BYTE *List)
  function DRLG_AreaTrans (line 730) | void DRLG_AreaTrans(int num, BYTE *List)
  function DRLG_InitSetPC (line 747) | void DRLG_InitSetPC()
  function DRLG_SetPC (line 755) | void DRLG_SetPC()
  function Make_SetPC (line 772) | void Make_SetPC(int x, int y, int w, int h)
  function BOOL (line 788) | BOOL DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int max...
  function DRLG_CreateThemeRoom (line 873) | void DRLG_CreateThemeRoom(int themeIndex)
  function DRLG_PlaceThemeRooms (line 997) | void DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq,...
  function DRLG_HoldThemeRooms (line 1039) | void DRLG_HoldThemeRooms()
  function BOOL (line 1057) | BOOL SkipThemeRoom(int x, int y)
  function InitLevels (line 1070) | void InitLevels()

FILE: Source/gmenu.cpp
  function gmenu_print_text (line 52) | static void gmenu_print_text(int x, int y, const char *pszStr)
  function gmenu_draw_pause (line 65) | void gmenu_draw_pause()
  function FreeGMenu (line 75) | void FreeGMenu()
  function gmenu_init_menu (line 84) | void gmenu_init_menu()
  function BOOL (line 106) | BOOL gmenu_is_active()
  function gmenu_up_down (line 111) | static void gmenu_up_down(BOOL isDown)
  function gmenu_set_items (line 141) | void gmenu_set_items(TMenuItem *pItem, void (*gmFunc)(TMenuItem *))
  function gmenu_clear_buffer (line 164) | static void gmenu_clear_buffer(int x, int y, int width, int height)
  function gmenu_get_lfont (line 175) | static int gmenu_get_lfont(TMenuItem *pItem)
  function gmenu_draw_menu_item (line 192) | static void gmenu_draw_menu_item(TMenuItem *pItem, int y)
  function gmenu_draw (line 227) | void gmenu_draw()
  function gmenu_left_right (line 270) | static void gmenu_left_right(BOOL isRight)
  function BOOL (line 293) | BOOL gmenu_presskeys(int vkey)
  function BOOLEAN (line 326) | static BOOLEAN gmenu_get_mouse_slider(int *plOffset)
  function BOOL (line 341) | BOOL gmenu_on_mouse_move()
  function BOOL (line 358) | BOOL gmenu_left_mouse(BOOL isDown)
  function gmenu_enable (line 408) | void gmenu_enable(TMenuItem *pMenuItem, BOOL enable)
  function gmenu_slider_set (line 419) | void gmenu_slider_set(TMenuItem *pItem, int min, int max, int value)
  function gmenu_slider_get (line 434) | int gmenu_slider_get(TMenuItem *pItem, int min, int max)
  function gmenu_slider_steps (line 448) | void gmenu_slider_steps(TMenuItem *pItem, int steps)

FILE: Source/help.cpp
  function InitHelp (line 443) | void InitHelp()
  function DrawHelpLine (line 450) | static void DrawHelpLine(int x, int y, char *text, char color)
  function DrawHelp (line 470) | void DrawHelp()
  function DisplayHelp (line 564) | void DisplayHelp()
  function HelpScrollUp (line 571) | void HelpScrollUp()
  function HelpScrollDown (line 577) | void HelpScrollDown()

FILE: Source/init.cpp
  function init_run_office (line 54) | static void init_run_office(char *dir)
  function HWND (line 93) | static HWND init_find_mom_parent()
  function init_kill_mom_parent (line 109) | static void init_kill_mom_parent()
  function init_await_mom_parent_exit (line 120) | static void init_await_mom_parent_exit()
  function init_run_office_from_start_menu (line 133) | static void init_run_office_from_start_menu()
  function init_disable_screensaver (line 151) | static void init_disable_screensaver(BOOLEAN disable)
  function init_cleanup (line 183) | void init_cleanup(BOOL show_cursor)
  function init_strip_trailing_slash (line 243) | static void init_strip_trailing_slash(char *path)
  function BOOL (line 254) | static BOOL init_read_test_file(char *pszPath, const char *pszArchive, i...
  function HANDLE (line 292) | static HANDLE init_test_access(char *mpq_path, const char *mpq_name, con...
  function init_get_file_info (line 338) | static void init_get_file_info()
  function init_create_window (line 422) | void init_create_window(int nCmdShow)
  function init_activate_window (line 464) | static void init_activate_window(HWND hWnd, BOOL bActive)
  function LRESULT (line 485) | LRESULT __stdcall MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM...
  function LRESULT (line 527) | LRESULT __stdcall WindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM ...
  function WNDPROC (line 535) | WNDPROC SetWindowProc(WNDPROC NewProc)

FILE: Source/interfac.cpp
  function FreeInterface (line 18) | static void FreeInterface()
  function InitCutscene (line 23) | static void InitCutscene(unsigned int uMsg)
  function DrawProgress (line 254) | static void DrawProgress(int screen_x, int screen_y, int progress_id)
  function DrawCutscene (line 266) | static void DrawCutscene()
  function interface_msg_pump (line 285) | void interface_msg_pump()
  function BOOL (line 297) | BOOL IncProgress()
  function ShowProgress (line 308) | void ShowProgress(unsigned int uMsg)

FILE: Source/inv.cpp
  function FreeInvGFX (line 112) | void FreeInvGFX()
  function InitInv (line 117) | void InitInv()
  function DrawInv (line 206) | void DrawInv()
  function DrawInvBelt (line 668) | void DrawInvBelt()
  function BOOL (line 734) | BOOL AutoPlace(int pnum, int ii, int sx, int sy, BOOL saveflag)
  function BOOL (line 789) | BOOL SpecialAutoPlace(int pnum, int ii, int sx, int sy, BOOL saveflag)
  function BOOL (line 959) | BOOL WeaponAutoPlace(int pnum)
  function SwapItem (line 999) | int SwapItem(ItemStruct *a, ItemStruct *b)
  function CheckInvPaste (line 1010) | void CheckInvPaste(int pnum, int mx, int my)
  function CheckInvSwap (line 1460) | void CheckInvSwap(int pnum, BYTE bLoc, int idx, WORD wCI, int seed, BOOL...
  function CheckInvCut (line 1486) | void CheckInvCut(int pnum, int mx, int my)
  function inv_update_rem_item (line 1643) | void inv_update_rem_item(int pnum, BYTE iv)
  function RemoveInvItem (line 1656) | void RemoveInvItem(int pnum, int iv)
  function BOOL (line 1706) | BOOL inv_diablo_to_hellfire(int pnum)
  function RemoveSpdBarItem (line 1745) | void RemoveSpdBarItem(int pnum, int iv)
  function CheckInvItem (line 1766) | void CheckInvItem()
  function CheckInvScrn (line 1778) | void CheckInvScrn()
  function CheckItemStats (line 1786) | void CheckItemStats(int pnum)
  function CheckBookLevel (line 1799) | void CheckBookLevel(int pnum)
  function CheckQuestItem (line 1817) | void CheckQuestItem(int pnum)
  function FindGetItem (line 2253) | int FindGetItem(int idx, WORD ci, int iseed)
  function SyncGetItem (line 2275) | void SyncGetItem(int x, int y, int idx, WORD ci, int iseed)
  function BOOL (line 2325) | BOOL CanPut(int x, int y)
  function BOOL (line 2362) | BOOL TryInvPut()
  function DrawInvMsg (line 2387) | void DrawInvMsg(const char *msg)
  function InvPutItem (line 2398) | int InvPutItem(int pnum, int x, int y)
  function SyncPutItem (line 2498) | int SyncPutItem(int pnum, int x, int y, int idx, WORD icreateinfo, int i...
  function RemoveScroll (line 2692) | void RemoveScroll(int pnum)
  function BOOL (line 2724) | BOOL UseScroll()
  function UseStaffCharge (line 2751) | void UseStaffCharge(int pnum)
  function BOOL (line 2766) | BOOL UseStaff()
  function StartGoldDrop (line 2784) | void StartGoldDrop()
  function BOOL (line 2797) | BOOL UseInvItem(int pnum, int cii)
  function DoTelekinesis (line 2954) | void DoTelekinesis()
  function CalculateGold (line 2965) | int CalculateGold(int pnum)
  function BOOL (line 2984) | BOOL DropItemBeforeTrig()

FILE: Source/items.cpp
  function get_ring_max_value (line 333) | int get_ring_max_value(int i)
  function get_bow_max_value (line 350) | int get_bow_max_value(int i)
  function get_staff_max_value (line 367) | int get_staff_max_value(int i)
  function get_sword_max_value (line 384) | int get_sword_max_value(int i)
  function get_helm_max_value (line 401) | int get_helm_max_value(int i)
  function get_shield_max_value (line 418) | int get_shield_max_value(int i)
  function get_armor_max_value (line 435) | int get_armor_max_value(int i)
  function get_mace_max_value (line 456) | int get_mace_max_value(int i)
  function get_amulet_max_value (line 473) | int get_amulet_max_value(int i)
  function get_axe_max_value (line 490) | int get_axe_max_value(int i)
  function items_get_currlevel (line 507) | int items_get_currlevel()
  function InitItemGFX (line 521) | void InitItemGFX()
  function BOOL (line 537) | BOOL ItemPlace(int xp, int yp)
  function AddInitItems (line 555) | void AddInitItems()
  function SpawnNote (line 601) | static void SpawnNote()
  function InitItems (line 626) | void InitItems()
  function CalcPlrItemVals (line 676) | void CalcPlrItemVals(int p, BOOL Loadgfx)
  function CalcPlrScrolls (line 1164) | void CalcPlrScrolls(int p)
  function CalcPlrStaff (line 1191) | void CalcPlrStaff(int p)
  function CalcSelfItems (line 1201) | void CalcSelfItems(int pnum)
  function BOOL (line 1251) | static BOOL ItemMinStats(PlayerStruct *p, ItemStruct *x)
  function CalcPlrItemMin (line 1265) | void CalcPlrItemMin(int pnum)
  function CalcPlrBookVals (line 1289) | void CalcPlrBookVals(int p)
  function CalcPlrInv (line 1320) | void CalcPlrInv(int p, BOOL Loadgfx)
  function SetPlrHandItem (line 1335) | void SetPlrHandItem(ItemStruct *h, int idata)
  function GetPlrHandSeed (line 1378) | void GetPlrHandSeed(ItemStruct *h)
  function GetGoldSeed (line 1383) | void GetGoldSeed(int pnum, ItemStruct *h)
  function SetPlrHandSeed (line 1407) | void SetPlrHandSeed(ItemStruct *h, int iseed)
  function SetPlrHandGoldCurs (line 1412) | void SetPlrHandGoldCurs(ItemStruct *h)
  function BOOL (line 1569) | BOOL ItemSpaceOk(int i, int j)
  function BOOL (line 1607) | BOOL GetItemSpace(int x, int y, char inum)
  function GetSuperItemSpace (line 1661) | void GetSuperItemSpace(int x, int y, char inum)
  function GetSuperItemLoc (line 1684) | void GetSuperItemLoc(int x, int y, int &xx, int &yy)
  function CalcItemValue (line 1701) | void CalcItemValue(int i)
  function GetBookSpell (line 1719) | void GetBookSpell(int i, int lvl)
  function GetStaffPower (line 1771) | void GetStaffPower(int i, int lvl, int bs, BOOL onlygood)
  function GetStaffSpell (line 1828) | void GetStaffSpell(int i, int lvl, BOOL onlygood)
  function GetOilType (line 1882) | void GetOilType(int i, int max_lvl)
  function RndPL (line 2017) | int RndPL(int param1, int param2)
  function PLVal (line 2022) | int PLVal(int pv, int p1, int p2, int minv, int maxv)
  function SaveItemPower (line 2031) | void SaveItemPower(int i, int power, int param1, int param2, int minval,...
  function GetItemPower (line 2461) | void GetItemPower(int i, int minlvl, int maxlvl, int flgs, BOOL onlygood)
  function GetItemBonus (line 2566) | void GetItemBonus(int i, int idata, int minlvl, int maxlvl, BOOL onlygood)
  function SetupItem (line 2609) | void SetupItem(int i)
  function RndItem (line 2632) | int RndItem(int m)
  function CheckUnique (line 2801) | int CheckUnique(int i, int lvl, int uper, BOOL recreate)
  function GetUniqueItem (line 2838) | void GetUniqueItem(int i, int uid)
  function SpawnUnique (line 2865) | void SpawnUnique(int uid, int x, int y)
  function ItemRndDur (line 2895) | void ItemRndDur(int ii)
  function SetupAllItems (line 2901) | void SetupAllItems(int ii, int idx, int iseed, int lvl, int uper, BOOL o...
  function SpawnItem (line 2965) | void SpawnItem(int m, int x, int y, BOOL sendmsg)
  function CreateItem (line 3010) | void CreateItem(int uid, int x, int y)
  function CreateRndItem (line 3040) | void CreateRndItem(int x, int y, BOOL onlygood, BOOL sendmsg, BOOL delta)
  function SetupAllUseful (line 3070) | void SetupAllUseful(int ii, int iseed, int lvl)
  function CreateRndUseful (line 3120) | void CreateRndUseful(int pnum, int x, int y, BOOL sendmsg)
  function CreateTypeItem (line 3144) | void CreateTypeItem(int x, int y, BOOL onlygood, int itype, int imisc, B...
  function RecreateItem (line 3179) | void RecreateItem(int ii, int idx, WORD icreateinfo, int iseed, int ivalue)
  function RecreateEar (line 3225) | void RecreateEar(int ii, WORD ic, int iseed, int Id, int dur, int mdur, ...
  function CornerstoneSave (line 3253) | void CornerstoneSave()
  function CornerstoneLoad (line 3266) | void CornerstoneLoad(int x, int y)
  function SpawnQuestItem (line 3306) | void SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag)
  function SpawnRock (line 3356) | void SpawnRock()
  function SpawnRewardItem (line 3393) | void SpawnRewardItem(int itemid, int xx, int yy)
  function SpawnMapOfDoom (line 3414) | void SpawnMapOfDoom(int xx, int yy)
  function SpawnRuneBomb (line 3419) | void SpawnRuneBomb(int xx, int yy)
  function SpawnTheodore (line 3424) | void SpawnTheodore(int xx, int yy)
  function RespawnItem (line 3430) | void RespawnItem(int i, BOOL FlipFlag)
  function DeleteItem (line 3461) | void DeleteItem(int ii, int i)
  function ItemDoppel (line 3469) | void ItemDoppel()
  function ProcessItems (line 3488) | void ProcessItems()
  function FreeItemGFX (line 3516) | void FreeItemGFX()
  function GetItemFrm (line 3529) | void GetItemFrm(int i)
  function GetItemStr (line 3534) | void GetItemStr(int i)
  function CheckIdentify (line 3554) | void CheckIdentify(int pnum, int cii)
  function RepairItem (line 3570) | static void RepairItem(ItemStruct *i, int lvl)
  function DoRepair (line 3601) | void DoRepair(int pnum, int cii)
  function RechargeItem (line 3622) | static void RechargeItem(ItemStruct *i, int r)
  function DoRecharge (line 3637) | void DoRecharge(int pnum, int cii)
  function BOOL (line 3661) | static BOOL OilItem(ItemStruct *x, PlayerStruct *p)
  function DoOil (line 3781) | void DoOil(int pnum, int cii)
  function PrintItemOil (line 3796) | void PrintItemOil(char IDidx)
  function PrintUString (line 4306) | void PrintUString(int x, int y, BOOL cjustflag, const char *str, int col)
  function DrawUniqueInfo (line 4370) | void DrawUniqueInfo()
  function PrintItemMisc (line 4405) | void PrintItemMisc(ItemStruct *x)
  function PrintItemDetails (line 4460) | void PrintItemDetails(ItemStruct *x)
  function PrintItemDur (line 4527) | void PrintItemDur(ItemStruct *x)
  function BOOL (line 4831) | BOOL StoreStatOk(ItemStruct *h)
  function BOOL (line 4846) | BOOL SmithItemOk(int i)
  function RndSmithItem (line 4871) | int RndSmithItem(int lvl)
  function BubbleSwapItem (line 4899) | void BubbleSwapItem(ItemStruct *a, ItemStruct *b)
  function SortSmith (line 4908) | void SortSmith()
  function SpawnSmith (line 4931) | void SpawnSmith(int lvl)
  function BOOL (line 4961) | BOOL PremiumItemOk(int i)
  function RndPremiumItem (line 4995) | int RndPremiumItem(int minlvl, int maxlvl)
  function SpawnPremium (line 5127) | void SpawnPremium(int lvl)
  function BOOL (line 5175) | BOOL WitchItemOk(int i)
  function RndWitchItem (line 5217) | int RndWitchItem(int lvl)
  function SortWitch (line 5238) | void SortWitch()
  function WitchBookLevel (line 5261) | void WitchBookLevel(int ii)
  function SpawnWitch (line 5279) | void SpawnWitch(int lvl)
  function RndBoyItem (line 5357) | int RndBoyItem(int lvl)
  function SpawnBoy (line 5377) | void SpawnBoy(int lvl)
  function RndHealerItem (line 5576) | int RndHealerItem(int lvl)
  function SortHealer (line 5596) | void SortHealer()
  function SpawnHealer (line 5619) | void SpawnHealer(int lvl)
  function SpawnStoreGold (line 5664) | void SpawnStoreGold()
  function RecreateSmithItem (line 5671) | void RecreateSmithItem(int ii, int idx, int lvl, int iseed)
  function RecreatePremiumItem (line 5684) | void RecreatePremiumItem(int ii, int idx, int plvl, int iseed)
  function RecreateBoyItem (line 5702) | void RecreateBoyItem(int ii, int idx, int lvl, int iseed)
  function RecreateWitchItem (line 5719) | void RecreateWitchItem(int ii, int idx, int lvl, int iseed)
  function RecreateHealerItem (line 5756) | void RecreateHealerItem(int ii, int idx, int lvl, int iseed)
  function RecreateTownItem (line 5773) | void RecreateTownItem(int ii, int idx, WORD icreateinfo, int iseed, int ...
  function RecalcStoreStats (line 5787) | void RecalcStoreStats()
  function ItemNoFlippy (line 5814) | int ItemNoFlippy()
  function CreateSpellBook (line 5826) | void CreateSpellBook(int x, int y, int ispell, BOOL sendmsg, BOOL delta)
  function CreateMagicArmor (line 5863) | void CreateMagicArmor(int x, int y, int imisc, int icurs, BOOL sendmsg, ...
  function CreateAmulet (line 5906) | void CreateAmulet(int x, int y, int curlv, BOOL sendmsg, BOOL delta)
  function CreateMagicWeapon (line 5935) | void CreateMagicWeapon(int x, int y, int imisc, int icurs, BOOL sendmsg,...
  function NextItemRecord (line 5982) | static void NextItemRecord(int i)
  function BOOL (line 5996) | BOOL GetItemRecord(int nSeed, WORD wCI, int nIndex)
  function SetItemRecord (line 6016) | void SetItemRecord(int nSeed, WORD wCI, int nIndex)
  function PutItemRecord (line 6033) | void PutItemRecord(int nSeed, WORD wCI, int nIndex)

FILE: Source/lighting.cpp
  function RotateRadius (line 482) | void RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, in...
  function DoUnLight (line 640) | void DoUnLight(int nXPos, int nYPos, int nRadius)
  function DoUnVision (line 673) | void DoUnVision(int nXPos, int nYPos, int nRadius)
  function DoVision (line 703) | void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL vi...
  function FreeLightTable (line 792) | void FreeLightTable()
  function InitLightTable (line 797) | void InitLightTable()
  function MakeLightTable (line 803) | void MakeLightTable()
  function ToggleLighting_2 (line 1017) | void ToggleLighting_2()
  function ToggleLighting (line 1033) | void ToggleLighting()
  function InitLightMax (line 1052) | void InitLightMax()
  function InitLighting (line 1061) | void InitLighting()
  function AddLight (line 1074) | int AddLight(int x, int y, int r)
  function AddUnLight (line 1099) | void AddUnLight(int i)
  function ChangeLightRadius (line 1109) | void ChangeLightRadius(int i, int r)
  function ChangeLightXY (line 1123) | void ChangeLightXY(int i, int x, int y)
  function ChangeLightOff (line 1138) | void ChangeLightOff(int i, int x, int y)
  function ChangeLight (line 1153) | void ChangeLight(int i, int x, int y, int r)
  function ProcessLightList (line 1169) | void ProcessLightList()
  function SavePreLighting (line 1211) | void SavePreLighting()
  function InitVision (line 1216) | void InitVision()
  function AddVision (line 1229) | int AddVision(int x, int y, int r, BOOL mine)
  function ChangeVisionRadius (line 1249) | void ChangeVisionRadius(int id, int r)
  function ChangeVisionXY (line 1265) | void ChangeVisionXY(int id, int x, int y)
  function ProcessVisionList (line 1282) | void ProcessVisionList()
  function lighting_color_cycling (line 1327) | void lighting_color_cycling()

FILE: Source/list.h
  type InsertPos (line 41) | enum InsertPos {
  function T (line 189) | T *Next()
  function InsertBefore (line 210) | void InsertBefore(T *node, TLink<T> *nextLink)
  function InsertAfter (line 220) | __forceinline void InsertAfter(T *node, TLink<T> *prevLink, const size_t...

FILE: Source/loadsave.cpp
  function BLoad (line 10) | static char BLoad()
  function WLoad (line 15) | static int WLoad()
  function ILoad (line 25) | static int ILoad()
  function BOOL (line 35) | static BOOL OLoad()
  function LoadPlayer (line 43) | static void LoadPlayer(int i)
  function LoadMonster (line 49) | static void LoadMonster(int i)
  function LoadMissile (line 56) | static void LoadMissile(int i)
  function LoadObject (line 62) | static void LoadObject(int i)
  function LoadItem (line 68) | static void LoadItem(int i)
  function LoadPremium (line 75) | static void LoadPremium(int i)
  function LoadQuest (line 81) | static void LoadQuest(int i)
  function LoadLighting (line 92) | static void LoadLighting(int i)
  function LoadVision (line 98) | static void LoadVision(int i)
  function LoadPortal (line 104) | static void LoadPortal(int i)
  function BSave (line 295) | static void BSave(char v)
  function WSave (line 300) | static void WSave(int v)
  function ISave (line 308) | static void ISave(int v)
  function OSave (line 316) | static void OSave(BOOL v)
  function SavePlayer (line 324) | static void SavePlayer(int i)
  function SaveMonster (line 330) | static void SaveMonster(int i)
  function SaveMissile (line 336) | static void SaveMissile(int i)
  function SaveObject (line 342) | static void SaveObject(int i)
  function SaveItem (line 348) | static void SaveItem(int i)
  function SavePremium (line 354) | static void SavePremium(int i)
  function SaveQuest (line 360) | static void SaveQuest(int i)
  function SaveLighting (line 371) | static void SaveLighting(int i)
  function SaveVision (line 377) | static void SaveVision(int i)
  function SavePortal (line 383) | static void SavePortal(int i)
  function SaveGame (line 389) | void SaveGame()
  function SaveLevel (line 541) | void SaveLevel()
  function LoadLevel (line 633) | void LoadLevel()

FILE: Source/logging.cpp
  function log_get_version (line 22) | static void log_get_version(VS_FIXEDFILEINFO *file_info)
  function HANDLE (line 46) | static HANDLE log_create()
  function log_flush (line 98) | void __cdecl log_flush(BOOL force_close)
  function log_printf (line 122) | void __cdecl log_printf(const char *pszFmt, ...)
  function log_dump_computer_info (line 163) | void log_dump_computer_info()

FILE: Source/mainmenu.cpp
  function mainmenu_refresh_music (line 17) | void mainmenu_refresh_music()
  function BOOL (line 29) | static BOOL mainmenu_init_menu(int type)
  function BOOL (line 45) | static BOOL mainmenu_single_player()
  function BOOL (line 83) | static BOOL mainmenu_multi_player()
  function mainmenu_play_intro (line 119) | static void mainmenu_play_intro()
  function mainmenu_change_name (line 131) | void __stdcall mainmenu_change_name(int arg1, int arg2, int arg3, int ar...
  function BOOL (line 137) | BOOL __stdcall mainmenu_select_hero_dialog(
  function mainmenu_loop (line 195) | void mainmenu_loop()

FILE: Source/minitext.cpp
  function FreeQuestText (line 66) | void FreeQuestText()
  function InitQuestText (line 75) | void InitQuestText()
  function InitQTextMsg (line 86) | void InitQTextMsg(int m)
  function DrawQTextBack (line 103) | void DrawQTextBack()
  function PrintQTextChr (line 121) | void PrintQTextChr(int sx, int sy, BYTE *pCelBuff, int nCel)
  function DrawQText (line 241) | void DrawQText()

FILE: Source/missiles.cpp
  function BOOL (line 251) | BOOL CheckBlock(int fx, int fy, int tx, int ty)
  function GetSpellLevel (line 298) | int GetSpellLevel(int id, int sn)
  function GetDirection8 (line 313) | int GetDirection8(int x1, int y1, int x2, int y2)
  function GetDirection16 (line 358) | int GetDirection16(int x1, int y1, int x2, int y2)
  function DeleteMissile (line 424) | void DeleteMissile(int mi, int i)
  function GetMissileVel (line 442) | void GetMissileVel(int i, int sx, int sy, int dx, int dy, int v)
  function PutMissile (line 462) | void PutMissile(int i)
  function GetMissilePos (line 482) | void GetMissilePos(int i)
  function MoveMissilePos (line 511) | void MoveMissilePos(int i)
  function BOOL (line 793) | BOOL PlayerMHit(int pnum, int m, int dist, int mind, int maxd, int mtype...
  function BOOL (line 992) | BOOL Plr2PlrMHit(int pnum, int p, int mindam, int maxdam, int dist, int ...
  function SetMissAnim (line 1324) | void SetMissAnim(int mi, int animtype)
  function SetMissDir (line 1339) | void SetMissDir(int mi, int dir)
  function LoadMissileGFX (line 1345) | void LoadMissileGFX(BYTE mi)
  function InitMissileGFX (line 1373) | void InitMissileGFX()
  function FreeMissileGFX (line 1383) | void FreeMissileGFX(int mi)
  function FreeMissiles (line 1405) | void FreeMissiles()
  function FreeMissiles2 (line 1415) | void FreeMissiles2()
  function InitMissiles (line 1425) | void InitMissiles()
  function missiles_hive_explosion (line 1486) | void missiles_hive_explosion(int mi, int sx, int sy, int dx, int dy, int...
  function BOOLEAN (line 1495) | static BOOLEAN missiles_found_target(int mi, int *x, int *y, int rad)
  function missiles_fire_rune (line 1529) | void missiles_fire_rune(int mi, int sx, int sy, int dx, int dy, int midi...
  function missiles_light_rune (line 1546) | void missiles_light_rune(int mi, int sx, int sy, int dx, int dy, int mid...
  function missiles_great_light_rune (line 1563) | void missiles_great_light_rune(int mi, int sx, int sy, int dx, int dy, i...
  function missiles_immolation_rune (line 1580) | void missiles_immolation_rune(int mi, int sx, int sy, int dx, int dy, in...
  function missiles_stone_rune (line 1597) | void missiles_stone_rune(int mi, int sx, int sy, int dx, int dy, int mid...
  function missiles_reflection (line 1614) | void missiles_reflection(int mi, int sx, int sy, int dx, int dy, int mid...
  function missiles_berserk (line 1630) | void missiles_berserk(int mi, int sx, int sy, int dx, int dy, int midir,...
  function missiles_hork_spawn (line 1676) | void missiles_hork_spawn(int mi, int sx, int sy, int dx, int dy, int mid...
  function missiles_jester (line 1684) | void missiles_jester(int mi, int sx, int sy, int dx, int dy, int midir, ...
  function missiles_steal_pots (line 1725) | void missiles_steal_pots(int mi, int sx, int sy, int dx, int dy, int mid...
  function missiles_mana_trap (line 1804) | void missiles_mana_trap(int mi, int sx, int sy, int dx, int dy, int midi...
  function missiles_spec_arrow (line 1836) | void missiles_spec_arrow(int mi, int sx, int sy, int dx, int dy, int mid...
  function missiles_warp (line 1862) | void missiles_warp(int mi, int sx, int sy, int dx, int dy, int midir, ch...
  function missiles_light_wall (line 1903) | void missiles_light_wall(int mi, int sx, int sy, int dx, int dy, int mid...
  function missiles_rune_explosion (line 1918) | void missiles_rune_explosion(int mi, int sx, int sy, int dx, int dy, int...
  function missiles_immo_1 (line 1945) | void missiles_immo_1(int mi, int sx, int sy, int dx, int dy, int midir, ...
  function missiles_immo_2 (line 1978) | void missiles_immo_2(int mi, int sx, int sy, int dx, int dy, int midir, ...
  function missiles_larrow (line 2005) | void missiles_larrow(int mi, int sx, int sy, int dx, int dy, int midir, ...
  function missiles_43303D (line 2024) | void missiles_43303D(int mi, int sx, int sy, int dx, int dy, int midir, ...
  function missiles_433040 (line 2028) | void missiles_433040(int mi, int sx, int sy, int dx, int dy, int midir, ...
  function missiles_rech_mana (line 2042) | void missiles_rech_mana(int mi, int sx, int sy, int dx, int dy, int midi...
  function missiles_magi (line 2068) | void missiles_magi(int mi, int sx, int sy, int dx, int dy, int midir, ch...
  function missiles_ring (line 2077) | void missiles_ring(int mi, int sx, int sy, int dx, int dy, int midir, ch...
  function missiles_search (line 2094) | void missiles_search(int mi, int sx, int sy, int dx, int dy, int midir, ...
  function missiles_cbolt_arrow (line 2133) | void missiles_cbolt_arrow(int mi, int sx, int sy, int dx, int dy, int mi...
  function missiles_hbolt_arrow (line 2158) | void missiles_hbolt_arrow(int mi, int sx, int sy, int dx, int dy, int mi...
  function AddLArrow (line 2185) | void AddLArrow(int mi, int sx, int sy, int dx, int dy, int midir, char m...
  function AddArrow (line 2227) | void AddArrow(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function GetVileMissPos (line 2268) | void GetVileMissPos(int mi, int dx, int dy)
  function AddRndTeleport (line 2289) | void AddRndTeleport(int mi, int sx, int sy, int dx, int dy, int midir, c...
  function AddFirebolt (line 2344) | void AddFirebolt(int mi, int sx, int sy, int dx, int dy, int midir, char...
  function AddMagmaball (line 2378) | void AddMagmaball(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function miss_null_33 (line 2397) | void miss_null_33(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddLightball (line 2445) | void AddLightball(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddFireball (line 2489) | void AddFireball(int mi, int sx, int sy, int dx, int dy, int midir, char...
  function AddLightctrl (line 2520) | void AddLightctrl(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddLightning (line 2531) | void AddLightning(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddMisexp (line 2554) | void AddMisexp(int mi, int sx, int sy, int dx, int dy, int midir, char m...
  function AddWeapexp (line 2601) | void AddWeapexp(int mi, int sx, int sy, int dx, int dy, int midir, char ...
  function BOOL (line 2619) | BOOL CheckIfTrig(int x, int y)
  function AddTown (line 2630) | void AddTown(int mi, int sx, int sy, int dx, int dy, int midir, char mie...
  function AddFlash (line 2692) | void AddFlash(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function AddFlash2 (line 2716) | void AddFlash2(int mi, int sx, int sy, int dx, int dy, int midir, char m...
  function AddManashield (line 2738) | void AddManashield(int mi, int sx, int sy, int dx, int dy, int midir, ch...
  function AddFiremove (line 2753) | void AddFiremove(int mi, int sx, int sy, int dx, int dy, int midir, char...
  function AddChain (line 2825) | void AddChain(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function miss_null_11 (line 2833) | void miss_null_11(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function miss_null_12 (line 2841) | void miss_null_12(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function miss_null_13 (line 2851) | void miss_null_13(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddRhino (line 2861) | void AddRhino(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function miss_null_32 (line 2896) | void miss_null_32(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddFlare (line 2922) | void AddFlare(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function AddAcid (line 2959) | void AddAcid(int mi, int sx, int sy, int dx, int dy, int midir, char mie...
  function miss_null_1D (line 2977) | void miss_null_1D(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddAcidpud (line 2987) | void AddAcidpud(int mi, int sx, int sy, int dx, int dy, int midir, char ...
  function AddGolem (line 3058) | void AddGolem(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function AddEtherealize (line 3082) | void AddEtherealize(int mi, int sx, int sy, int dx, int dy, int midir, c...
  function miss_null_1F (line 3097) | void miss_null_1F(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function miss_null_23 (line 3102) | void miss_null_23(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddBoom (line 3118) | void AddBoom(int mi, int sx, int sy, int dx, int dy, int midir, char mie...
  function AddHeal (line 3131) | void AddHeal(int mi, int sx, int sy, int dx, int dy, int midir, char mie...
  function AddHealOther (line 3171) | void AddHealOther(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddElement (line 3179) | void AddElement(int mi, int sx, int sy, int dx, int dy, int midir, char ...
  function AddIdentify (line 3204) | void AddIdentify(int mi, int sx, int sy, int dx, int dy, int midir, char...
  function AddInfra (line 3263) | void AddInfra(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function AddWave (line 3276) | void AddWave(int mi, int sx, int sy, int dx, int dy, int midir, char mie...
  function AddNova (line 3287) | void AddNova(int mi, int sx, int sy, int dx, int dy, int midir, char mie...
  function AddBlodboil (line 3308) | void AddBlodboil(int mi, int sx, int sy, int dx, int dy, int midir, char...
  function AddRepair (line 3351) | void AddRepair(int mi, int sx, int sy, int dx, int dy, int midir, char m...
  function AddRecharge (line 3364) | void AddRecharge(int mi, int sx, int sy, int dx, int dy, int midir, char...
  function AddDisarm (line 3377) | void AddDisarm(int mi, int sx, int sy, int dx, int dy, int midir, char m...
  function AddApoca (line 3385) | void AddApoca(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function AddFlame (line 3411) | void AddFlame(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function AddFlamec (line 3435) | void AddFlamec(int mi, int sx, int sy, int dx, int dy, int midir, char m...
  function AddCbolt (line 3450) | void AddCbolt(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function AddHbolt (line 3482) | void AddHbolt(int mi, int sx, int sy, int dx, int dy, int midir, char mi...
  function AddResurrect (line 3508) | void AddResurrect(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function AddResurrectBeam (line 3516) | void AddResurrectBeam(int mi, int sx, int sy, int dx, int dy, int midir,...
  function AddTelekinesis (line 3527) | void AddTelekinesis(int mi, int sx, int sy, int dx, int dy, int midir, c...
  function AddBoneSpirit (line 3535) | void AddBoneSpirit(int mi, int sx, int sy, int dx, int dy, int midir, ch...
  function AddRportal (line 3561) | void AddRportal(int mi, int sx, int sy, int dx, int dy, int midir, char ...
  function AddDiabApoca (line 3573) | void AddDiabApoca(int mi, int sx, int sy, int dx, int dy, int midir, cha...
  function Sentfire (line 3662) | int Sentfire(int i, int sx, int sy)
  function MI_Dummy (line 3683) | void MI_Dummy(int i)
  function MI_SetManashield (line 3726) | void MI_SetManashield(int i)
  function MI_LArrow (line 3731) | void MI_LArrow(int i)
  function MI_Arrow (line 3817) | void MI_Arrow(int i)
  function MI_Firebolt (line 3848) | void MI_Firebolt(int i)
  function MI_Lightball (line 3948) | void MI_Lightball(int i)
  function mi_null_33 (line 3978) | void mi_null_33(int i)
  function MI_Acidpud (line 3990) | void MI_Acidpud(int i)
  function MI_Firewall (line 4009) | void MI_Firewall(int i)
  function MI_Fireball (line 4037) | void MI_Fireball(int i)
  function mi_hork_spawn (line 4116) | void mi_hork_spawn(int i)
  function MI_Rune (line 4149) | void MI_Rune(int i)
  function mi_light_wall (line 4178) | void mi_light_wall(int i)
  function mi_hive_explode (line 4192) | void mi_hive_explode(int i)
  function mi_immolation (line 4202) | void mi_immolation(int i)
  function mi_light_arrow (line 4327) | void mi_light_arrow(int i)
  function mi_flashfr (line 4404) | void mi_flashfr(int i)
  function mi_flashbk (line 4427) | void mi_flashbk(int i)
  function mi_reflect (line 4441) | void mi_reflect(int i)
  function mi_fire_ring (line 4471) | void mi_fire_ring(int i)
  function mi_light_ring (line 4502) | void mi_light_ring(int i)
  function mi_search (line 4533) | void mi_search(int i)
  function mi_lightning_wall (line 4543) | void mi_lightning_wall(int i)
  function mi_fire_nova (line 4588) | void mi_fire_nova(int i)
  function mi_spec_arrow (line 4620) | void mi_spec_arrow(int i)
  function MI_Lightctrl (line 4665) | void MI_Lightctrl(int i)
  function MI_Lightning (line 4755) | void MI_Lightning(int i)
  function MI_Town (line 4772) | void MI_Town(int i)
  function MI_Flash (line 4805) | void MI_Flash(int i)
  function MI_Flash2 (line 4828) | void MI_Flash2(int i)
  function MI_Manashield (line 4848) | void MI_Manashield(int i)
  function MI_Etherealize (line 4939) | void MI_Etherealize(int i)
  function MI_Firemove (line 4971) | void MI_Firemove(int i)
  function MI_Guardian (line 5015) | void MI_Guardian(int i)
  function mi_null_11 (line 5130) | void mi_null_11(int i)
  function MI_Weapexp (line 5140) | void MI_Weapexp(int i)
  function MI_Misexp (line 5174) | void MI_Misexp(int i)
  function MI_Acidsplat (line 5196) | void MI_Acidsplat(int i)
  function MI_Teleport (line 5216) | void MI_Teleport(int i)
  function MI_Stone (line 5247) | void MI_Stone(int i)
  function MI_Boom (line 5277) | void MI_Boom(int i)
  function MI_Rhino (line 5289) | void MI_Rhino(int i)
  function mi_null_32 (line 5335) | void mi_null_32(int i)
  function MI_FirewallC (line 5377) | void MI_FirewallC(int i)
  function MI_Infra (line 5416) | void MI_Infra(int i)
  function MI_Apoca (line 5426) | void MI_Apoca(int i)
  function MI_Wave (line 5461) | void MI_Wave(int i)
  function MI_Nova (line 5516) | void MI_Nova(int i)
  function MI_Blodboil (line 5549) | void MI_Blodboil(int i)
  function MI_Blodboil (line 5615) | void MI_Blodboil(int i)
  function MI_Flame (line 5621) | void MI_Flame(int i)
  function MI_Flamec (line 5647) | void MI_Flamec(int i)
  function MI_Cbolt (line 5681) | void MI_Cbolt(int i)
  function MI_Hbolt (line 5718) | void MI_Hbolt(int i)
  function MI_Element (line 5755) | void MI_Element(int i)
  function MI_Bonespirit (line 5828) | void MI_Bonespirit(int i)
  function MI_ResurrectBeam (line 5880) | void MI_ResurrectBeam(int i)
  function MI_Rportal (line 5888) | void MI_Rportal(int i)
  function missiles_process_charge (line 5975) | void missiles_process_charge()
  function ClearMissileSpot (line 6001) | void ClearMissileSpot(int mi)

FILE: Source/monster.cpp
  function InitMonsterTRN (line 171) | void InitMonsterTRN(int monst, BOOL special)
  function InitLevelMonsters (line 197) | void InitLevelMonsters()
  function AddMonsterType (line 220) | int AddMonsterType(int type, int placeflag)
  function GetLevelMTypes (line 244) | void GetLevelMTypes()
  function InitMonsterGFX (line 364) | void InitMonsterGFX(int monst)
  function ClearMVars (line 497) | void ClearMVars(int i)
  function InitMonster (line 509) | void InitMonster(int i, int rd, int mtype, int x, int y)
  function ClrAllMonsters (line 629) | void ClrAllMonsters()
  function BOOL (line 665) | BOOL MonstPlace(int xp, int yp)
  function monster_some_crypt (line 690) | void monster_some_crypt()
  function PlaceMonster (line 708) | void PlaceMonster(int i, int mtype, int x, int y)
  function PlaceUniques (line 966) | static void PlaceUniques()
  function PlaceQuestMonsters (line 996) | void PlaceQuestMonsters()
  function PlaceGroup (line 1089) | void PlaceGroup(int mtype, int num, int leaderf, int leader)
  function LoadDiabMonsts (line 1162) | void LoadDiabMonsts()
  function InitMonsters (line 1181) | void InitMonsters()
  function SetMapMonsters (line 1260) | void SetMapMonsters(BYTE *pMap, int startx, int starty)
  function DeleteMonster (line 1301) | void DeleteMonster(int i)
  function AddMonster (line 1311) | int AddMonster(int x, int y, int dir, int mtype, BOOL InMap)
  function AddDoppelganger (line 1325) | void AddDoppelganger(int i)
  function NewMonsterAnim (line 1358) | void NewMonsterAnim(int i, AnimStruct &anim, int md)
  function BOOL (line 1370) | BOOL M_Ranged(int i)
  function BOOL (line 1376) | BOOL M_Talker(int i)
  function M_GetDir (line 1493) | int M_GetDir(int i)
  function M_CheckEFlag (line 1498) | void M_CheckEFlag(int i)
  function M_StartStand (line 1531) | void M_StartStand(int i, int md)
  function M_StartDelay (line 1552) | void M_StartDelay(int i, int len)
  function M_StartSpStand (line 1564) | void M_StartSpStand(int i, int md)
  function M_StartWalk (line 1578) | void M_StartWalk(int i, int xvel, int yvel, int xadd, int yadd, int EndDir)
  function M_StartWalk2 (line 1602) | void M_StartWalk2(int i, int xvel, int yvel, int xoff, int yoff, int xad...
  function M_StartWalk3 (line 1637) | void M_StartWalk3(int i, int xvel, int yvel, int xoff, int yoff, int xad...
  function M_StartAttack (line 1676) | void M_StartAttack(int i)
  function M_StartRAttack (line 1691) | void M_StartRAttack(int i, int missile_type, int dam)
  function M_StartRSpAttack (line 1708) | void M_StartRSpAttack(int i, int missile_type, int dam)
  function M_StartSpAttack (line 1726) | void M_StartSpAttack(int i)
  function M_StartEat (line 1741) | void M_StartEat(int i)
  function M_ClearSquares (line 1754) | void M_ClearSquares(int i)
  function M_GetKnockback (line 1790) | void M_GetKnockback(int i)
  function M_StartHit (line 1813) | void M_StartHit(int i, int pnum, int dam)
  function M_DiabloDeath (line 1865) | void M_DiabloDeath(int i, BOOL sendmsg)
  function SpawnLoot (line 1918) | void SpawnLoot(int i, BOOL sendmsg)
  function M2MStartHit (line 1956) | void M2MStartHit(int mid, int i, int dam)
  function MonstStartKill (line 2024) | void MonstStartKill(int i, int pnum, BOOL sendmsg)
  function M_StartKill (line 2180) | void M_StartKill(int i, int pnum)
  function M_SyncStartKill (line 2202) | void M_SyncStartKill(int i, int x, int y, int pnum)
  function M_StartFadein (line 2235) | void M_StartFadein(int i, int md, BOOL backwards)
  function M_StartFadeout (line 2267) | void M_StartFadeout(int i, int md, BOOL backwards)
  function M_StartHeal (line 2298) | void M_StartHeal(int i)
  function M_ChangeLightOffset (line 2323) | void M_ChangeLightOffset(int monst)
  function BOOL (line 2359) | BOOL M_DoStand(int i)
  function BOOL (line 2390) | BOOL M_DoWalk(int i)
  function BOOL (line 2445) | BOOL M_DoWalk2(int i)
  function BOOL (line 2496) | BOOL M_DoWalk3(int i)
  function M_TryM2MHit (line 2551) | void M_TryM2MHit(int i, int mid, int hper, int mind, int maxd)
  function M_TryH2HHit (line 2594) | void M_TryH2HHit(int i, int pnum, int Hit, int MinDam, int MaxDam)
  function BOOL (line 2781) | BOOL M_DoAttack(int i)
  function BOOL (line 2829) | BOOL M_DoRAttack(int i)
  function BOOL (line 2948) | BOOL M_DoSAttack(int i)
  function BOOL (line 2980) | BOOL M_DoFadein(int i)
  function BOOL (line 3000) | BOOL M_DoFadeout(int i)
  function BOOL (line 3029) | BOOL M_DoHeal(int i)
  function BOOL (line 3062) | BOOL M_DoTalk(int i)
  function M_Teleport (line 3135) | void M_Teleport(int i)
  function BOOL (line 3183) | BOOL M_DoGotHit(int i)
  function M_UpdateLeader (line 3207) | void M_UpdateLeader(int i)
  function PrepDoEnding (line 3279) | void PrepDoEnding()
  function BOOL (line 3307) | BOOL M_DoDeath(int i)
  function BOOL (line 3357) | BOOL M_DoSpStand(int i)
  function BOOL (line 3383) | BOOL M_DoDelay(int i)
  function BOOL (line 3416) | BOOL M_DoStone(int i)
  function M_WalkDir (line 3433) | void M_WalkDir(int i, int md)
  function GroupUnity (line 3473) | void GroupUnity(int i)
  function BOOL (line 3536) | BOOL M_CallWalk(int i, int md)
  function BOOL (line 3560) | BOOL M_PathWalk(int i)
  function BOOL (line 3585) | BOOL M_CallWalk2(int i, int md)
  function BOOL (line 3604) | BOOL M_DumbWalk(int i, int md)
  function BOOL (line 3614) | BOOL M_RoundWalk(int i, int md, int &dir)
  function MAI_Zombie (line 3643) | void MAI_Zombie(int i)
  function MAI_SkelSd (line 3692) | void MAI_SkelSd(int i)
  function BOOL (line 3733) | BOOL MAI_Path(int i)
  function MAI_Snake (line 3780) | void MAI_Snake(int i)
  function MAI_Bat (line 3867) | void MAI_Bat(int i)
  function MAI_SkelBow (line 3935) | void MAI_SkelBow(int i)
  function MAI_Fat (line 3983) | void MAI_Fat(int i)
  function MAI_Fireman (line 4098) | void MAI_Fireman(int i)
  function MAI_Fallen (line 4163) | void MAI_Fallen(int i)
  function MAI_Cleaver (line 4237) | void MAI_Cleaver(int i)
  function MAI_Round (line 4271) | void MAI_Round(int i, BOOL special)
  function MAI_GoatMc (line 4334) | void MAI_GoatMc(int i)
  function MAI_Ranged (line 4339) | void MAI_Ranged(int i, int missile_type, BOOL special)
  function MAI_GoatBow (line 4390) | void MAI_GoatBow(int i)
  function MAI_Succ (line 4395) | void MAI_Succ(int i)
  function MAI_Lich (line 4401) | void MAI_Lich(int i)
  function MAI_ArchLich (line 4406) | void MAI_ArchLich(int i)
  function MAI_Psychorb (line 4411) | void MAI_Psychorb(int i)
  function MAI_Necromorb (line 4416) | void MAI_Necromorb(int i)
  function MAI_AcidUniq (line 4422) | void MAI_AcidUniq(int i)
  function MAI_Firebat (line 4428) | void MAI_Firebat(int i)
  function MAI_Torchant (line 4433) | void MAI_Torchant(int i)
  function MAI_Scav (line 4439) | void MAI_Scav(int i)
  function MAI_Garg (line 4548) | void MAI_Garg(int i)
  function MAI_RoundRanged (line 4594) | void MAI_RoundRanged(int i, int missile_type, BOOL checkdoors, int dam, ...
  function MAI_Magma (line 4663) | void MAI_Magma(int i)
  function MAI_Storm (line 4668) | void MAI_Storm(int i)
  function MAI_BoneDemon (line 4674) | void MAI_BoneDemon(int i)
  function MAI_Acid (line 4680) | void MAI_Acid(int i)
  function MAI_Diablo (line 4685) | void MAI_Diablo(int i)
  function MAI_RR2 (line 4690) | void MAI_RR2(int i, int mistype, int dam)
  function MAI_Mega (line 4769) | void MAI_Mega(int i)
  function MAI_Golum (line 4774) | void MAI_Golum(int i)
  function MAI_SkelKing (line 4856) | void MAI_SkelKing(int i)
  function MAI_Rhino (line 4928) | void MAI_Rhino(int i)
  function MAI_HorkDemon (line 5003) | void MAI_HorkDemon(int i)
  function MAI_Counselor (line 5075) | void MAI_Counselor(int i)
  function MAI_Garbud (line 5151) | void MAI_Garbud(int i)
  function MAI_Zhar (line 5201) | void MAI_Zhar(int i)
  function MAI_SnotSpil (line 5253) | void MAI_SnotSpil(int i)
  function MAI_Lazurus (line 5309) | void MAI_Lazurus(int i)
  function MAI_Lazhelp (line 5367) | void MAI_Lazhelp(int i)
  function MAI_Lachdanan (line 5405) | void MAI_Lachdanan(int i)
  function MAI_Warlord (line 5448) | void MAI_Warlord(int i)
  function DeleteMonsterList (line 5489) | void DeleteMonsterList()
  function ProcessMonsters (line 5515) | void ProcessMonsters()
  function FreeMonsters (line 5684) | void FreeMonsters()
  function BOOL (line 5701) | BOOL DirOK(int i, int mdir)
  function BOOL (line 5760) | BOOL PosOkMissile(int x, int y)
  function BOOL (line 5765) | BOOL CheckNoSolid(int x, int y)
  function BOOL (line 5770) | BOOL LineClearF(BOOL (*Clear)(int, int), int x1, int y1, int x2, int y2)
  function BOOL (line 5851) | BOOL LineClear(int x1, int y1, int x2, int y2)
  function BOOL (line 5856) | BOOL LineClearF1(BOOL (*Clear)(int, int, int), int monst, int x1, int y1...
  function SyncMonsterAnim (line 5937) | void SyncMonsterAnim(int i)
  function M_FallenFear (line 6006) | void M_FallenFear(int x, int y)
  function PrintMonstHistory (line 6046) | void PrintMonstHistory(int mt)
  function PrintUniqueHistory (line 6121) | void PrintUniqueHistory()
  function MissToMonst (line 6146) | void MissToMonst(int i, int x, int y)
  function BOOL (line 6232) | BOOL PosOkMonst(int i, int x, int y)
  function BOOLEAN (line 6282) | BOOLEAN monster_posok(int i, int x, int y)
  function BOOL (line 6322) | BOOL PosOkMonst2(int i, int x, int y)
  function BOOL (line 6370) | BOOL PosOkMonst3(int i, int x, int y)
  function BOOL (line 6437) | BOOL IsSkel(int mt)
  function BOOL (line 6444) | BOOL IsGoat(int mt)
  function M_SpawnSkel (line 6450) | int M_SpawnSkel(int x, int y, int dir)
  function ActivateSpawn (line 6477) | void ActivateSpawn(int i, int x, int y, int dir)
  function BOOL (line 6489) | BOOL SpawnSkeleton(int ii, int x, int y)
  function PreSpawnSkeleton (line 6544) | int PreSpawnSkeleton()
  function TalktoMonster (line 6572) | void TalktoMonster(int i)
  function SpawnGolum (line 6604) | void SpawnGolum(int i, int x, int y, int mi)
  function BOOL (line 6641) | BOOL CanTalkToMonst(int m)
  function BOOL (line 6658) | BOOL CheckMonsterHit(int m, BOOL &ret)
  function encode_enemy (line 6685) | int encode_enemy(int m)
  function decode_enemy (line 6693) | void decode_enemy(int m, int enemy)

FILE: Source/movie.cpp
  function play_movie (line 19) | void play_movie(const char *pszMovie, BOOL user_can_close)
  function LRESULT (line 62) | LRESULT __stdcall MovieWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARA...

FILE: Source/mpqapi.cpp
  function mpqapi_xor_buf (line 28) | static void mpqapi_xor_buf(char *pbData)
  function BOOLEAN (line 72) | static BOOLEAN mpqapi_reg_store_modification_time(char *pbData, DWORD dw...
  function BOOL (line 95) | BOOL mpqapi_set_hidden(const char *pszArchive, BOOL hidden)
  function mpqapi_store_default_time (line 110) | void mpqapi_store_default_time(DWORD dwChar)
  function mpqapi_store_modified_time (line 128) | static void mpqapi_store_modified_time(const char *pszArchive, DWORD dwC...
  function mpqapi_store_creation_time (line 145) | void mpqapi_store_creation_time(const char *pszArchive, DWORD dwChar)
  function _BLOCKENTRY (line 162) | static _BLOCKENTRY *mpqapi_new_block(int *block_index)
  function mpqapi_alloc_block (line 186) | static void mpqapi_alloc_block(int block_offset, int block_size)
  function mpqapi_find_free_block (line 225) | static int mpqapi_find_free_block(int size, int *block_size)
  function mpqapi_get_hash_index (line 257) | static int mpqapi_get_hash_index(int index, int hash_a, int hash_b, int ...
  function BOOL (line 280) | static BOOL WriteMPQHeader()
  function BOOL (line 304) | static BOOL mpqapi_write_block_table()
  function BOOL (line 318) | static BOOL mpqapi_write_hash_table()
  function BOOL (line 332) | static BOOL mpqapi_can_seek()
  function BOOL (line 339) | static BOOL ParseMPQHeader(_FILEHEADER *pHdr, DWORD *pdwNextFileStart)
  function FetchHandle (line 379) | static int FetchHandle(const char *pszName)
  function mpqapi_remove_hash_entry (line 384) | void mpqapi_remove_hash_entry(const char *pszName)
  function mpqapi_remove_hash_entries (line 403) | void mpqapi_remove_hash_entries(BOOL(__stdcall *fnGetName)(DWORD, char *))
  function _BLOCKENTRY (line 414) | static _BLOCKENTRY *mpqapi_add_file(const char *pszName, _BLOCKENTRY *pB...
  function BOOL (line 444) | static BOOL mpqapi_write_file_contents(const char *pszName, const BYTE *...
  function BOOL (line 527) | BOOL mpqapi_write_file(const char *pszName, const BYTE *pbData, DWORD dw...
  function mpqapi_rename (line 541) | void mpqapi_rename(char *pszOld, char *pszNew)
  function BOOL (line 558) | BOOL mpqapi_has_file(const char *pszName)
  function CloseMPQ (line 563) | static void CloseMPQ(const char *pszArchive, BOOL bFree, DWORD dwChar)
  function BOOL (line 583) | BOOL OpenMPQ(const char *pszArchive, BOOL hidden, DWORD dwChar)
  function BOOL (line 637) | BOOL mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, DWORD dw...

FILE: Source/msg.cpp
  function msg_get_next_packet (line 27) | static void msg_get_next_packet()
  function msg_free_packets (line 42) | static void msg_free_packets()
  function msg_pre_packet (line 51) | static void msg_pre_packet()
  function msg_send_packet (line 79) | static void msg_send_packet(int pnum, const void *packet, DWORD dwSize)
  function msg_send_drop_pkt (line 96) | void msg_send_drop_pkt(int pnum, int reason)
  function msg_wait_for_turns (line 106) | static int msg_wait_for_turns()
  function BOOL (line 139) | BOOL msg_wait_resync()
  function run_delta_info (line 171) | void run_delta_info()
  function BYTE (line 182) | static BYTE *DeltaExportItem(BYTE *dst, TCmdPItem *src)
  function BYTE (line 200) | static BYTE *DeltaImportItem(BYTE *src, TCmdPItem *dst)
  function BYTE (line 219) | static BYTE *DeltaExportObject(BYTE *dst, DObjectStr *src)
  function BYTE (line 225) | static BYTE *DeltaImportObject(BYTE *src, DObjectStr *dst)
  function BYTE (line 231) | static BYTE *DeltaExportMonster(BYTE *dst, DMonsterStr *src)
  function BYTE (line 249) | static BYTE *DeltaImportMonster(BYTE *src, DMonsterStr *dst)
  function BYTE (line 268) | static BYTE *DeltaExportJunk(BYTE *dst)
  function DeltaImportJunk (line 303) | static void DeltaImportJunk(BYTE *src)
  function msg_comp_level (line 345) | static int msg_comp_level(BYTE *buffer, BYTE *end)
  function DeltaExportData (line 355) | void DeltaExportData(int pnum)
  function DeltaImportData (line 378) | static void DeltaImportData(BYTE cmd, DWORD recv_offset)
  function DWORD (line 403) | static DWORD On_DLEVEL(int pnum, TCmd *pCmd)
  function delta_init (line 446) | void delta_init()
  function delta_kill_monster (line 455) | void delta_kill_monster(int mi, BYTE x, BYTE y, BYTE bLevel)
  function delta_monster_hp (line 469) | void delta_monster_hp(int mi, int hp, BYTE bLevel)
  function delta_sync_monster (line 480) | void delta_sync_monster(const TSyncMonster *pSync, BYTE bLevel)
  function delta_sync_golem (line 499) | void delta_sync_golem(TCmdGolem *pG, int pnum, BYTE bLevel)
  function delta_leave_sync (line 514) | void delta_leave_sync(BYTE bLevel)
  function delta_sync_object (line 539) | static void delta_sync_object(int oi, BYTE bCmd, BYTE bLevel)
  function BOOL (line 548) | static BOOL delta_get_item(TCmdGItem *pI, BYTE bLevel)
  function delta_put_item (line 612) | static void delta_put_item(TCmdPItem *pI, int x, int y, BYTE bLevel)
  function BOOL (line 649) | BOOL delta_portal_inited(int i)
  function BOOL (line 654) | BOOL delta_quest_inited(int i)
  function DeltaAddItem (line 659) | void DeltaAddItem(int ii)
  function DeltaSaveLevel (line 706) | void DeltaSaveLevel()
  function DeltaLoadLevel (line 719) | void DeltaLoadLevel()
  function NetSendCmd (line 875) | void NetSendCmd(BOOL bHiPri, BYTE bCmd)
  function NetSendCmdGolem (line 886) | void NetSendCmdGolem(BYTE mx, BYTE my, BYTE dir, BYTE menemy, int hp, BY...
  function NetSendCmdLoc (line 900) | void NetSendCmdLoc(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y)
  function NetSendCmdLocParam1 (line 913) | void NetSendCmdLocParam1(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wP...
  function NetSendCmdLocParam2 (line 927) | void NetSendCmdLocParam2(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wP...
  function NetSendCmdLocParam3 (line 942) | void NetSendCmdLocParam3(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y, WORD wP...
  function NetSendCmdParam1 (line 958) | void NetSendCmdParam1(BOOL bHiPri, BYTE bCmd, WORD wParam1)
  function NetSendCmdParam2 (line 970) | void NetSendCmdParam2(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2)
  function NetSendCmdParam3 (line 983) | void NetSendCmdParam3(BOOL bHiPri, BYTE bCmd, WORD wParam1, WORD wParam2...
  function NetSendCmdQuest (line 997) | void NetSendCmdQuest(BOOL bHiPri, BYTE q)
  function NetSendCmdGItem (line 1012) | void NetSendCmdGItem(BOOL bHiPri, BYTE bCmd, BYTE mast, BYTE pnum, BYTE ii)
  function NetSendCmdGItem2 (line 1061) | void NetSendCmdGItem2(BOOL usonly, BYTE bCmd, BYTE mast, BYTE pnum, TCmd...
  function BOOL (line 1090) | BOOL NetSendCmdReq2(BYTE bCmd, BYTE mast, BYTE pnum, TCmdGItem *p)
  function NetSendCmdExtra (line 1114) | void NetSendCmdExtra(TCmdGItem *p)
  function NetSendCmdPItem (line 1128) | void NetSendCmdPItem(BOOL bHiPri, BYTE bCmd, BYTE x, BYTE y)
  function NetSendCmdChItem (line 1172) | void NetSendCmdChItem(BOOL bHiPri, BYTE bLoc)
  function NetSendCmdDelItem (line 1189) | void NetSendCmdDelItem(BOOL bHiPri, BYTE bLoc)
  function NetSendCmdDItem (line 1201) | void NetSendCmdDItem(BOOL bHiPri, int ii)
  function BOOL (line 1245) | static BOOL i_own_level(int nReqLevel)
  function NetSendCmdDamage (line 1263) | void NetSendCmdDamage(BOOL bHiPri, BYTE bPlr, DWORD dwDam)
  function NetSendCmdMonDmg (line 1277) | void NetSendCmdMonDmg(BOOL bHiPri, WORD wMon, DWORD dwDam)
  function NetSendCmdString (line 1291) | void NetSendCmdString(int pmask, const char *pszStr)
  function DWORD (line 1302) | static DWORD On_STRING2(int pnum, TCmd *pCmd)
  function delta_open_portal (line 1313) | static void delta_open_portal(int pnum, BYTE x, BYTE y, BYTE bLevel, BYT...
  function delta_close_portal (line 1323) | void delta_close_portal(int pnum)
  function check_update_plr (line 1329) | static void check_update_plr(int pnum)
  function msg_errorf (line 1335) | static void __cdecl msg_errorf(const char *pszFmt, ...)
  function DWORD (line 1352) | static DWORD On_SYNCDATA(TCmd *pCmd, int pnum)
  function DWORD (line 1357) | static DWORD On_WALKXY(TCmd *pCmd, int pnum)
  function DWORD (line 1370) | static DWORD On_ADDSTR(TCmd *pCmd, int pnum)
  function DWORD (line 1382) | static DWORD On_ADDMAG(TCmd *pCmd, int pnum)
  function DWORD (line 1394) | static DWORD On_ADDDEX(TCmd *pCmd, int pnum)
  function DWORD (line 1406) | static DWORD On_ADDVIT(TCmd *pCmd, int pnum)
  function DWORD (line 1418) | static DWORD On_SBSPELL(TCmd *pCmd, int pnum)
  function DWORD (line 1436) | static DWORD On_GOTOGETITEM(TCmd *pCmd, int pnum)
  function DWORD (line 1449) | static DWORD On_REQUESTGITEM(TCmd *pCmd, int pnum)
  function DWORD (line 1471) | static DWORD On_GETITEM(TCmd *pCmd, int pnum)
  function DWORD (line 1503) | static DWORD On_GOTOAGETITEM(TCmd *pCmd, int pnum)
  function DWORD (line 1516) | static DWORD On_REQUESTAGITEM(TCmd *pCmd, int pnum)
  function DWORD (line 1538) | static DWORD On_AGETITEM(TCmd *pCmd, int pnum)
  function DWORD (line 1570) | static DWORD On_ITEMEXTRA(TCmd *pCmd, int pnum)
  function DWORD (line 1585) | static DWORD On_PUTITEM(TCmd *pCmd, int pnum)
  function DWORD (line 1617) | static DWORD On_SYNCPUTITEM(TCmd *pCmd, int pnum)
  function DWORD (line 1645) | static DWORD On_RESPAWNITEM(TCmd *pCmd, int pnum)
  function DWORD (line 1667) | static DWORD On_ATTACKXY(TCmd *pCmd, int pnum)
  function DWORD (line 1681) | static DWORD On_SATTACKXY(TCmd *pCmd, int pnum)
  function DWORD (line 1695) | static DWORD On_RATTACKXY(TCmd *pCmd, int pnum)
  function DWORD (line 1709) | static DWORD On_SPELLXYD(TCmd *pCmd, int pnum)
  function DWORD (line 1732) | static DWORD On_SPELLXY(TCmd *pCmd, int pnum)
  function DWORD (line 1754) | static DWORD On_TSPELLXY(TCmd *pCmd, int pnum)
  function DWORD (line 1776) | static DWORD On_OPOBJXY(TCmd *pCmd, int pnum)
  function DWORD (line 1792) | static DWORD On_DISARMXY(TCmd *pCmd, int pnum)
  function DWORD (line 1808) | static DWORD On_OPOBJT(TCmd *pCmd, int pnum)
  function DWORD (line 1820) | static DWORD On_ATTACKID(TCmd *pCmd, int pnum)
  function DWORD (line 1836) | static DWORD On_ATTACKPID(TCmd *pCmd, int pnum)
  function DWORD (line 1849) | static DWORD On_RATTACKID(TCmd *pCmd, int pnum)
  function DWORD (line 1862) | static DWORD On_RATTACKPID(TCmd *pCmd, int pnum)
  function DWORD (line 1875) | static DWORD On_SPELLID(TCmd *pCmd, int pnum)
  function DWORD (line 1896) | static DWORD On_SPELLPID(TCmd *pCmd, int pnum)
  function DWORD (line 1917) | static DWORD On_TSPELLID(TCmd *pCmd, int pnum)
  function DWORD (line 1938) | static DWORD On_TSPELLPID(TCmd *pCmd, int pnum)
  function DWORD (line 1959) | static DWORD On_KNOCKBACK(TCmd *pCmd, int pnum)
  function DWORD (line 1971) | static DWORD On_RESURRECT(TCmd *pCmd, int pnum)
  function DWORD (line 1985) | static DWORD On_HEALOTHER(TCmd *pCmd, int pnum)
  function DWORD (line 1995) | static DWORD On_TALKXY(TCmd *pCmd, int pnum)
  function DWORD (line 2008) | static DWORD On_NEWLVL(TCmd *pCmd, int pnum)
  function DWORD (line 2020) | static DWORD On_WARP(TCmd *pCmd, int pnum)
  function DWORD (line 2037) | static DWORD On_MONSTDEATH(TCmd *pCmd, int pnum)
  function DWORD (line 2052) | static DWORD On_KILLGOLEM(TCmd *pCmd, int pnum)
  function DWORD (line 2067) | static DWORD On_AWAKEGOLEM(TCmd *pCmd, int pnum)
  function DWORD (line 2093) | static DWORD On_MONSTDAMAGE(TCmd *pCmd, int pnum)
  function DWORD (line 2128) | static DWORD On_PLRDEAD(TCmd *pCmd, int pnum)
  function DWORD (line 2142) | static DWORD On_PLRDAMAGE(TCmd *pCmd, int pnum)
  function DWORD (line 2164) | static DWORD On_OPENDOOR(TCmd *pCmd, int pnum)
  function DWORD (line 2179) | static DWORD On_CLOSEDOOR(TCmd *pCmd, int pnum)
  function DWORD (line 2194) | static DWORD On_OPERATEOBJ(TCmd *pCmd, int pnum)
  function DWORD (line 2209) | static DWORD On_PLROPOBJ(TCmd *pCmd, int pnum)
  function DWORD (line 2224) | static DWORD On_BREAKOBJ(TCmd *pCmd, int pnum)
  function DWORD (line 2239) | static DWORD On_CHANGEPLRITEMS(TCmd *pCmd, int pnum)
  function DWORD (line 2251) | static DWORD On_DELPLRITEMS(TCmd *pCmd, int pnum)
  function DWORD (line 2263) | static DWORD On_PLRLEVEL(TCmd *pCmd, int pnum)
  function DWORD (line 2275) | static DWORD On_DROPITEM(TCmd *pCmd, int pnum)
  function DWORD (line 2287) | static DWORD On_SEND_PLRINFO(TCmd *pCmd, int pnum)
  function DWORD (line 2299) | static DWORD On_ACK_PLRINFO(TCmd *pCmd, int pnum)
  function DWORD (line 2304) | static DWORD On_PLAYER_JOINLEVEL(TCmd *pCmd, int pnum)
  function DWORD (line 2347) | static DWORD On_ACTIVATEPORTAL(TCmd *pCmd, int pnum)
  function DWORD (line 2378) | static DWORD On_DEACTIVATEPORTAL(TCmd *pCmd, int pnum)
  function DWORD (line 2392) | static DWORD On_RETOWN(TCmd *pCmd, int pnum)
  function DWORD (line 2407) | static DWORD On_SETSTR(TCmd *pCmd, int pnum)
  function DWORD (line 2419) | static DWORD On_SETDEX(TCmd *pCmd, int pnum)
  function DWORD (line 2431) | static DWORD On_SETMAG(TCmd *pCmd, int pnum)
  function DWORD (line 2443) | static DWORD On_SETVIT(TCmd *pCmd, int pnum)
  function DWORD (line 2455) | static DWORD On_STRING(TCmd *pCmd, int pnum)
  function DWORD (line 2460) | static DWORD On_SYNCQUEST(TCmd *pCmd, int pnum)
  function DWORD (line 2476) | static DWORD On_ENDREFLECT(TCmd *pCmd, int pnum)
  function DWORD (line 2492) | static DWORD On_ENDSHIELD(TCmd *pCmd, int pnum)
  function DWORD (line 2507) | static DWORD On_CHEAT_EXPERIENCE(TCmd *pCmd, int pnum)
  function DWORD (line 2520) | static DWORD On_CHEAT_SPELL_LEVEL(TCmd *pCmd, int pnum)
  function DWORD (line 2531) | static DWORD On_DEBUG(TCmd *pCmd, int pnum)
  function DWORD (line 2537) | static DWORD On_NOVA(TCmd *pCmd, int pnum)
  function DWORD (line 2554) | static DWORD On_SETSHIELD(TCmd *pCmd, int pnum)
  function DWORD (line 2562) | static DWORD On_REMSHIELD(TCmd *pCmd, int pnum)
  function DWORD (line 2570) | static DWORD On_REFLECT(TCmd *pCmd, int pnum)
  function DWORD (line 2585) | static DWORD On_NAKRUL(TCmd *pCmd, int pnum)
  function DWORD (line 2596) | static DWORD On_OPENHIVE(TCmd *pCmd, int pnum)
  function DWORD (line 2606) | static DWORD On_OPENCRYPT(TCmd *pCmd, int pnum)
  function DWORD (line 2618) | DWORD ParseCmd(int pnum, TCmd *pCmd)

FILE: Source/msgcmd.cpp
  type EXTERNMESSAGE (line 20) | struct EXTERNMESSAGE {
  function msgcmd_cmd_cleanup (line 50) | void msgcmd_cmd_cleanup()
  function msgcmd_send_chat (line 55) | void msgcmd_send_chat()
  function BOOL (line 71) | BOOL msgcmd_add_server_cmd_W(const char *chat_message)
  function msgcmd_add_server_cmd (line 79) | void msgcmd_add_server_cmd(const char *command)

FILE: Source/multi.cpp
  function dumphist (line 53) | void __cdecl dumphist(const char *pszFmt, ...)
  function buffer_init (line 86) | static void buffer_init(TBuffer *pBuf)
  function multi_check_pkt_valid (line 93) | static int multi_check_pkt_valid(TBuffer *pBuf)
  function multi_copy_packet (line 98) | static void multi_copy_packet(TBuffer *buf, void *packet, BYTE size)
  function BYTE (line 114) | static BYTE *multi_recv_packet(TBuffer *pBuf, BYTE *body, int *size)
  function NetRecvPlrData (line 140) | static void NetRecvPlrData(TPkt *pkt)
  function multi_msg_add (line 154) | void multi_msg_add(BYTE *pbMsg, BYTE bLen)
  function multi_send_packet (line 161) | static void multi_send_packet(void *packet, BYTE dwSize)
  function NetSendLoPri (line 172) | void NetSendLoPri(BYTE *pbMsg, BYTE bLen)
  function NetSendHiPri (line 180) | void NetSendHiPri(BYTE *pbMsg, BYTE bLen)
  function multi_send_msg_packet (line 206) | void multi_send_msg_packet(int pmask, BYTE *src, BYTE len)
  function multi_mon_seeds (line 225) | static void multi_mon_seeds()
  function multi_handle_turn_upper_bit (line 237) | static void multi_handle_turn_upper_bit(int pnum)
  function multi_parse_turn (line 253) | static void multi_parse_turn(int pnum, int turn)
  function multi_msg_countdown (line 268) | void multi_msg_countdown()
  function multi_player_left_msg (line 280) | static void multi_player_left_msg(int pnum, int left)
  function multi_clear_left_tbl (line 309) | static void multi_clear_left_tbl()
  function multi_player_left (line 326) | void multi_player_left(int pnum, int reason)
  function multi_net_ping (line 333) | void multi_net_ping()
  function multi_check_drop_player (line 339) | static void multi_check_drop_player()
  function multi_begin_timeout (line 350) | static void multi_begin_timeout()
  function multi_handle_delta (line 424) | int multi_handle_delta()
  function multi_handle_all_packets (line 463) | static void multi_handle_all_packets(int pnum, BYTE *pData, int nSize)
  function multi_process_tmsgs (line 477) | static void multi_process_tmsgs()
  function multi_process_network_packets (line 487) | void multi_process_network_packets()
  function multi_send_zero_packet (line 558) | void multi_send_zero_packet(int pnum, BYTE bCmd, BYTE *pbSrc, DWORD dwLen)
  function multi_send_pinfo (line 623) | static void multi_send_pinfo(int pnum, char cmd)
  function InitLevelType (line 635) | static int InitLevelType(int l)
  function SetupLocalCoords (line 660) | static void SetupLocalCoords()
  function BOOL (line 692) | static BOOL multi_upgrade(BOOL *pfExitProgram)
  function multi_handle_events (line 714) | static void __stdcall multi_handle_events(_SNETEVENT *pEvt)
  function multi_event_handler (line 749) | static void multi_event_handler(BOOL add)
  function NetClose (line 767) | void NetClose()
  function BOOL (line 786) | BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram)
  function BOOL (line 896) | BOOL multi_init_single(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *u...
  function BOOL (line 916) | BOOL multi_init_multi(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *us...
  function recv_plrinfo (line 959) | void recv_plrinfo(int pnum, TCmdPlrInfoHdr *p, BOOL recv)

FILE: Source/nthread.cpp
  function nthread_terminate_game (line 29) | void nthread_terminate_game(const char *pszFcn)
  function DWORD (line 45) | DWORD nthread_send_and_recv_turn(DWORD cur_turn, int turn_delta)
  function BOOL (line 74) | BOOL nthread_recv_turns(BOOL *pfSendAsync)
  function nthread_handler (line 110) | static unsigned int __stdcall nthread_handler(void *data)
  function nthread_set_turn_upper_bit (line 136) | void nthread_set_turn_upper_bit()
  function nthread_start (line 141) | void nthread_start(BOOL set_turn_upper_bit)
  function nthread_cleanup (line 197) | void nthread_cleanup()
  function nthread_ignore_mutex (line 214) | void nthread_ignore_mutex(BOOL bStart)
  function BOOL (line 231) | BOOL nthread_has_500ms_passed(BOOL unused)

FILE: Source/objects.cpp
  function FreeObjectGFX (line 273) | void FreeObjectGFX()
  function DIABOOL (line 283) | DIABOOL RndLocOk(int xp, int yp)
  function DIABOOL (line 300) | static DIABOOL WallTrapLocOkK(int xp, int yp)
  function InitRndLocObj (line 311) | void InitRndLocObj(int min, int max, int objtype)
  function InitRndLocBigObj (line 337) | void InitRndLocBigObj(int min, int max, int objtype)
  function InitRndLocObj5x5 (line 365) | void InitRndLocObj5x5(int min, int max, int objtype)
  function ClrAllObjects (line 394) | void ClrAllObjects()
  function AddTortures (line 431) | void AddTortures()
  function AddCandles (line 454) | void AddCandles()
  function AddBookLever (line 466) | void AddBookLever(int lx1, int ly1, int lx2, int ly2, int x1, int y1, in...
  function InitRndBarrels (line 506) | void InitRndBarrels()
  function AddL1Objs (line 553) | void AddL1Objs(int x1, int y1, int x2, int y2)
  function add_crypt_objs (line 571) | void add_crypt_objs(int x1, int y1, int x2, int y2)
  function AddL2Objs (line 587) | void AddL2Objs(int x1, int y1, int x2, int y2)
  function AddL3Objs (line 602) | void AddL3Objs(int x1, int y1, int x2, int y2)
  function DIABOOL (line 617) | DIABOOL TorchLocOK(int xp, int yp)
  function AddL2Torches (line 624) | void AddL2Torches()
  function AddObjTraps (line 649) | void AddObjTraps()
  function AddChestTraps (line 704) | void AddChestTraps()
  function LoadMapObjects (line 731) | void LoadMapObjects(BYTE *pMap, int startx, int starty, int x1, int y1, ...
  function LoadMapObjs (line 763) | void LoadMapObjs(BYTE *pMap, int startx, int starty)
  function AddDiabObjs (line 792) | void AddDiabObjs()
  function AddCryptStoryBook (line 808) | void AddCryptStoryBook(int s)
  function AddNakrulGate (line 840) | void AddNakrulGate()
  function AddNakrulBook (line 877) | void AddNakrulBook(int a1, int a2, int a3)
  function AddStoryBooks (line 883) | void AddStoryBooks()
  function AddHookedBodies (line 916) | void AddHookedBodies(int freq)
  function AddL4Goodies (line 958) | void AddL4Goodies()
  function AddLazStand (line 972) | void AddLazStand()
  function InitObjects (line 1010) | void InitObjects()
  function SetMapObjects (line 1164) | void SetMapObjects(BYTE *pMap, int startx, int starty)
  function DeleteObject_ (line 1225) | void DeleteObject_(int oi, int i)
  function SetupObject (line 1238) | void SetupObject(int i, int x, int y, int ot)
  function SetObjMapRange (line 1276) | void SetObjMapRange(int i, int x1, int y1, int x2, int y2, int v)
  function SetBookMsg (line 1285) | void SetBookMsg(int i, int msg)
  function AddL1Door (line 1290) | void AddL1Door(int i, int x, int y, int ot)
  function AddSCambBook (line 1303) | void AddSCambBook(int i)
  function AddChest (line 1312) | void AddChest(int i, int t)
  function AddL2Door (line 1346) | void AddL2Door(int i, int x, int y, int ot)
  function AddL3Door (line 1356) | void AddL3Door(int i, int x, int y, int ot)
  function AddSarc (line 1366) | void AddSarc(int i)
  function AddFlameTrap (line 1375) | void AddFlameTrap(int i)
  function AddFlameLvr (line 1383) | void AddFlameLvr(int i)
  function AddTrap (line 1389) | void AddTrap(int i, int ot)
  function AddObjLight (line 1412) | void AddObjLight(int i, int r)
  function AddBarrel (line 1422) | void AddBarrel(int i, int t)
  function AddShrine (line 1433) | void AddShrine(int i)
  function AddBookcase (line 1473) | void AddBookcase(int i)
  function AddBookstand (line 1479) | void AddBookstand(int i)
  function AddBloodFtn (line 1484) | void AddBloodFtn(int i)
  function AddPurifyingFountain (line 1489) | void AddPurifyingFountain(int i)
  function AddArmorStand (line 1501) | void AddArmorStand(int i)
  function AddGoatShrine (line 1511) | void AddGoatShrine(int i)
  function AddCauldron (line 1516) | void AddCauldron(int i)
  function AddMurkyFountain (line 1521) | void AddMurkyFountain(int i)
  function AddTearFountain (line 1533) | void AddTearFountain(int i)
  function AddDecap (line 1538) | void AddDecap(int i)
  function AddVilebook (line 1545) | void AddVilebook(int i)
  function AddMagicCircle (line 1552) | void AddMagicCircle(int i)
  function AddBrnCross (line 1560) | void AddBrnCross(int i)
  function AddPedistal (line 1565) | void AddPedistal(int i)
  function AddStoryBook (line 1573) | void AddStoryBook(int i)
  function AddWeaponRack (line 1597) | void AddWeaponRack(int i)
  function AddTorturedBody (line 1606) | void AddTorturedBody(int i)
  function GetRndObjLoc (line 1613) | void GetRndObjLoc(int randarea, int &xx, int &yy)
  function AddMushPatch (line 1639) | void AddMushPatch()
  function AddSlainHero (line 1654) | void AddSlainHero()
  function AddCryptBook (line 1663) | void AddCryptBook(int ot, int v2, int ox, int oy)
  function AddCryptObject (line 1680) | void AddCryptObject(int i, int a2)
  function AddObject (line 1750) | void AddObject(int ot, int ox, int oy)
  function Obj_Light (line 1891) | void Obj_Light(int i, int lr)
  function Obj_Circle (line 1928) | void Obj_Circle(int i)
  function Obj_StopAnim (line 1969) | void Obj_StopAnim(int i)
  function Obj_Door (line 1977) | void Obj_Door(int i)
  function Obj_Sarc (line 1998) | void Obj_Sarc(int i)
  function ActivateTrapLine (line 2004) | void ActivateTrapLine(int ttype, int tid)
  function Obj_FlameTrap (line 2019) | void Obj_FlameTrap(int i)
  function Obj_Trap (line 2062) | void Obj_Trap(int i)
  function Obj_BCrossDamage (line 2115) | void Obj_BCrossDamage(int i)
  function ProcessObjects (line 2156) | void ProcessObjects()
  function ObjSetMicro (line 2243) | void ObjSetMicro(int dx, int dy, int pn)
  function objects_set_door_piece (line 2265) | void objects_set_door_piece(int x, int y)
  function ObjSetMini (line 2295) | void ObjSetMini(int x, int y, int v)
  function ObjL1Special (line 2337) | void ObjL1Special(int x1, int y1, int x2, int y2)
  function ObjL2Special (line 2376) | void ObjL2Special(int x1, int y1, int x2, int y2)
  function DoorSet (line 2413) | void DoorSet(int oi, int dx, int dy)
  function RedoPlayerVision (line 2491) | void RedoPlayerVision()
  function OperateL2RDoor (line 2712) | void OperateL2RDoor(int pnum, int oi, DIABOOL sendflag)
  function OperateL2LDoor (line 2757) | void OperateL2LDoor(int pnum, int oi, BOOL sendflag)
  function OperateL3RDoor (line 2802) | void OperateL3RDoor(int pnum, int oi, DIABOOL sendflag)
  function OperateL3LDoor (line 2848) | void OperateL3LDoor(int pnum, int oi, DIABOOL sendflag)
  function MonstCheckDoors (line 2894) | void MonstCheckDoors(int m)
  function OperateL1Door (line 2985) | void OperateL1Door(int pnum, int i, DIABOOL sendflag)
  function OperateLever (line 2997) | void OperateLever(int pnum, int i)
  function OperateBook (line 3033) | void OperateBook(int pnum, int i)
  function OperateBookLever (line 3106) | void OperateBookLever(int pnum, int i)
  function OperateSChambBk (line 3150) | void OperateSChambBk(int pnum, int i)
  function OperateChest (line 3185) | void OperateChest(int pnum, int i, DIABOOL sendmsg)
  function OperateMushPatch (line 3244) | void OperateMushPatch(int pnum, int i)
  function OperateInnSignChest (line 3283) | void OperateInnSignChest(int pnum, int i)
  function OperateSlainHero (line 3321) | void OperateSlainHero(int pnum, int i, DIABOOL sendmsg)
  function OperateTrapLvr (line 3363) | void OperateTrapLvr(int i)
  function OperateSarc (line 3393) | void OperateSarc(int pnum, int i, DIABOOL sendmsg)
  function OperateL2Door (line 3415) | void OperateL2Door(int pnum, int i, DIABOOL sendflag)
  function OperateL3Door (line 3427) | void OperateL3Door(int pnum, int i, DIABOOL sendflag)
  function OperatePedistal (line 3439) | void OperatePedistal(int pnum, int i)
  function TryDisarm (line 3473) | void TryDisarm(int pnum, int i)
  function ItemMiscIdIdx (line 3505) | int ItemMiscIdIdx(int imiscid)
  function OperateShrine (line 3517) | void OperateShrine(int pnum, int i, int sType)
  function OperateSkelBook (line 4298) | void OperateSkelBook(int pnum, int i, DIABOOL sendmsg)
  function OperateBookCase (line 4317) | void OperateBookCase(int pnum, int i, DIABOOL sendmsg)
  function OperateDecap (line 4342) | void OperateDecap(int pnum, int i, DIABOOL sendmsg)
  function OperateArmorStand (line 4355) | void OperateArmorStand(int pnum, int i, DIABOOL sendmsg)
  function FindValidShrine (line 4385) | int FindValidShrine(int i)
  function OperateGoatShrine (line 4415) | void OperateGoatShrine(int pnum, int i, int sType)
  function OperateCauldron (line 4424) | void OperateCauldron(int pnum, int i, int sType)
  function DIABOOL (line 4434) | DIABOOL OperateFountains(int pnum, int i)
  function OperateWeaponRack (line 4554) | void OperateWeaponRack(int pnum, int i, DIABOOL sendmsg)
  function OperateStoryBook (line 4590) | void OperateStoryBook(int pnum, int i)
  function OperateLazStand (line 4612) | void OperateLazStand(int pnum, int i)
  function OperateObject (line 4624) | void OperateObject(int pnum, int i, BOOL TeleFlag)
  function SyncOpL1Door (line 4751) | void SyncOpL1Door(int pnum, int cmd, int i)
  function SyncOpL2Door (line 4772) | void SyncOpL2Door(int pnum, int cmd, int i)
  function SyncOpL3Door (line 4793) | void SyncOpL3Door(int pnum, int cmd, int i)
  function SyncOpObject (line 4814) | void SyncOpObject(int pnum, int cmd, int i)
  function BreakCrux (line 4900) | void BreakCrux(int i)
  function BreakBarrel (line 4928) | void BreakBarrel(int pnum, int i, int dam, BOOL forcebreak, BOOL sendmsg)
  function BreakObject (line 5017) | void BreakObject(int pnum, int oi)
  function SyncBreakObj (line 5042) | void SyncBreakObj(int pnum, int oi)
  function SyncL1Doors (line 5048) | void SyncL1Doors(int i)
  function SyncCrux (line 5102) | void SyncCrux(int i)
  function SyncLever (line 5121) | void SyncLever(int i)
  function SyncQSTLever (line 5127) | void SyncQSTLever(int i)
  function SyncPedistal (line 5142) | void SyncPedistal(int i)
  function SyncL2Doors (line 5160) | void SyncL2Doors(int i)
  function SyncL3Doors (line 5182) | void SyncL3Doors(int i)
  function SyncObjectAnim (line 5201) | void SyncObjectAnim(int o)
  function GetObjectStr (line 5246) | void GetObjectStr(int i)
  function OperateNakrulLever (line 5397) | void OperateNakrulLever()
  function SyncNakrulRoom (line 5410) | void SyncNakrulRoom()
  function AddNakrulLeaver (line 5420) | void AddNakrulLeaver()
  function DIABOOL (line 5444) | DIABOOL OperateNakrulBook(int s)

FILE: Source/pack.cpp
  function PackItem (line 12) | void
  function PackPlayer (line 46) | void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield)
  function UnPackItem (line 148) | void
  function VerifyGoldSeeds (line 179) | void VerifyGoldSeeds(PlayerStruct *pPlayer)
  function UnPackPlayer (line 197) | void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok)

FILE: Source/palette.cpp
  function palette_update (line 28) | static void palette_update()
  function ApplyGamma (line 44) | static void ApplyGamma(PALETTEENTRY *dst, PALETTEENTRY *src, int n)
  function SaveGamma (line 60) | void SaveGamma()
  function LoadGamma (line 68) | static void LoadGamma()
  function LoadSysPal (line 90) | static void LoadSysPal()
  function palette_init (line 117) | void palette_init()
  function LoadPalette (line 138) | void LoadPalette(const char *pszFileName)
  function LoadRndLvlPal (line 158) | void LoadRndLvlPal(int l)
  function ResetPal (line 183) | void ResetPal()
  function IncreaseGamma (line 192) | void IncreaseGamma()
  function DecreaseGamma (line 203) | void DecreaseGamma()
  function UpdateGamma (line 214) | int UpdateGamma(int gamma)
  function SetFadeLevel (line 224) | static void SetFadeLevel(DWORD fadeval)
  function BlackPalette (line 240) | void BlackPalette()
  function PaletteFadeIn (line 245) | void PaletteFadeIn(int fr)
  function PaletteFadeOut (line 258) | void PaletteFadeOut(int fr)
  function palette_update_caves (line 271) | void palette_update_caves()
  function palette_update_crypt (line 292) | void palette_update_crypt()
  function palette_update_hive (line 331) | void palette_update_hive()
  function palette_update_quest_palette (line 369) | void palette_update_quest_palette(int n)
  function BOOL (line 382) | BOOL palette_get_color_cycling()
  function BOOL (line 387) | BOOL palette_set_color_cycling(BOOL enabled)

FILE: Source/path.cpp
  function FindPath (line 49) | int FindPath(BOOL (*PosOk)(int, int, int), int PosOkArg, int sx, int sy,...
  function path_get_h_cost (line 96) | int path_get_h_cost(int sx, int sy, int dx, int dy)
  function path_check_equal (line 119) | int path_check_equal(PATHNODE *pPath, int dx, int dy)
  function PATHNODE (line 130) | PATHNODE *GetNextPath()
  function BOOL (line 155) | BOOL path_solid_pieces(PATHNODE *pPath, int dx, int dy)
  function BOOL (line 180) | BOOL path_get_path(BOOL (*PosOk)(int, int, int), int PosOkArg, PATHNODE ...
  function BOOL (line 204) | BOOL path_parent_path(PATHNODE *pPath, int dx, int dy, int sx, int sy)
  function PATHNODE (line 273) | PATHNODE *path_get_node1(int dx, int dy)
  function PATHNODE (line 287) | PATHNODE *path_get_node2(int dx, int dy)
  function path_next_node (line 301) | void path_next_node(PATHNODE *pPath)
  function path_set_coords (line 325) | void path_set_coords(PATHNODE *pPath)
  function path_push_active_step (line 354) | void path_push_active_step(PATHNODE *pPath)
  function PATHNODE (line 364) | PATHNODE *path_pop_active_step()
  function PATHNODE (line 373) | PATHNODE *path_new_step()

FILE: Source/pfile.cpp
  function pfile_check_available_space (line 26) | static void pfile_check_available_space(char *pszDir)
  function pfile_init_save_directory (line 54) | void pfile_init_save_directory()
  function DWORD (line 161) | static DWORD pfile_get_save_num_from_name(const char *name)
  function BOOL (line 173) | static BOOL pfile_read_hero(HANDLE archive, PkPlayerStruct *pPack)
  function pfile_encode_hero (line 224) | static void pfile_encode_hero(const PkPlayerStruct *pPack)
  function BOOL (line 247) | static BOOL pfile_open_archive(BOOL update, DWORD save_num)
  function pfile_flush (line 265) | static void pfile_flush(BOOL is_single_player, DWORD save_num)
  function HANDLE (line 281) | static HANDLE pfile_open_save_archive(BOOL *showFixedMsg, DWORD save_num)
  function pfile_SFileCloseArchive (line 296) | static void pfile_SFileCloseArchive(HANDLE hsArchive)
  function pfile_write_hero (line 301) | void pfile_write_hero()
  function BOOL (line 318) | BOOL pfile_create_player_description(char *dst, DWORD len)
  function BOOL (line 336) | BOOL pfile_rename_hero(const char *name_1, const char *name_2)
  function pfile_flush_W (line 368) | void pfile_flush_W()
  function pfile_get_player_class (line 373) | static char pfile_get_player_class(unsigned int player_class_nr)
  function BYTE (line 394) | static BYTE game_2_ui_class(const PlayerStruct *p)
  function game_2_ui_player (line 415) | void game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL...
  function BOOL (line 436) | BOOL __stdcall pfile_ui_set_hero_infos(BOOL(__stdcall *ui_add_hero_info)...
  function BOOL (line 496) | BOOL pfile_archive_contains_game(HANDLE hsArchive, DWORD save_num)
  function BOOL (line 552) | BOOL __stdcall pfile_ui_set_class_stats(unsigned int player_class_nr, _u...
  function BOOL (line 607) | BOOL __stdcall pfile_get_file_name(DWORD lvl, char *dst)
  function BOOL (line 632) | BOOL __stdcall pfile_delete_save(_uiheroinfo *hero_info)
  function pfile_read_player_from_save (line 650) | void pfile_read_player_from_save()
  function GetTempLevelNames (line 668) | void GetTempLevelNames(char *szTemp)
  function GetPermLevelNames (line 678) | void GetPermLevelNames(char *szPerm)
  function pfile_get_game_name (line 698) | void pfile_get_game_name(char *dst)
  function BOOL (line 705) | static BOOL __stdcall GetPermSaveNames(DWORD dwIndex, char *szPerm)
  function BOOL (line 721) | static BOOL __stdcall GetTempSaveNames(DWORD dwIndex, char *szTemp)
  function pfile_remove_temp_files (line 737) | void pfile_remove_temp_files()
  function pfile_rename_temp_to_perm (line 748) | void pfile_rename_temp_to_perm()
  function pfile_write_save_file (line 777) | void pfile_write_save_file(const char *pszName, BYTE *pbData, DWORD dwLe...
  function pfile_strcpy (line 810) | void pfile_strcpy(char *dst, const char *src)
  function pfile_update (line 878) | void pfile_update(BOOL force_save)

FILE: Source/player.cpp
  function SetPlayerGPtrs (line 245) | void SetPlayerGPtrs(BYTE *pData, BYTE **pAnim)
  function LoadPlrGFX (line 254) | void LoadPlrGFX(int pnum, player_graphic gfxflag)
  function InitPlayerGFX (line 376) | void InitPlayerGFX(int pnum)
  function DWORD (line 390) | static DWORD GetPlrGFXSize(const char *szCel)
  function InitPlrGFXMem (line 438) | void InitPlrGFXMem(int pnum)
  function FreePlayerGFX (line 509) | void FreePlayerGFX(int pnum)
  function NewPlrAnim (line 527) | void NewPlrAnim(int pnum, BYTE *Peq, int numFrames, int Delay, int width)
  function ClearPlrPVars (line 542) | void ClearPlrPVars(int pnum)
  function SetPlrAnims (line 558) | void SetPlrAnims(int pnum)
  function ClearPlrRVars (line 696) | void ClearPlrRVars(PlayerStruct *p)
  function CalcStatDiff (line 945) | int CalcStatDiff(int pnum)
  function NextPlrLevel (line 960) | void NextPlrLevel(int pnum)
  function AddPlrExperience (line 1024) | void AddPlrExperience(int pnum, int lvl, int exp)
  function AddPlrMonstExper (line 1087) | void AddPlrMonstExper(int lvl, int exp, char pmask)
  function InitPlayer (line 1105) | void InitPlayer(int pnum, BOOL FirstTime)
  function InitMultiView (line 1228) | void InitMultiView()
  function CheckEFlag (line 1238) | void CheckEFlag(int pnum, BOOL flag)
  function BOOL (line 1294) | BOOL SolidLoc(int x, int y)
  function BOOL (line 1305) | BOOL PlrDirOK(int pnum, int dir)
  function PlrClrTrans (line 1333) | void PlrClrTrans(int x, int y)
  function PlrDoTrans (line 1344) | void PlrDoTrans(int x, int y)
  function SetPlayerOld (line 1361) | void SetPlayerOld(int pnum)
  function FixPlayerLocation (line 1371) | void FixPlayerLocation(int pnum, int bDir)
  function StartStand (line 1394) | void StartStand(int pnum, int dir)
  function StartWalkStand (line 1416) | void StartWalkStand(int pnum)
  function PM_ChangeLightOff (line 1439) | void PM_ChangeLightOff(int pnum)
  function PM_ChangeOffset (line 1480) | void PM_ChangeOffset(int pnum)
  function StartWalk (line 1519) | void StartWalk(int pnum, int xvel, int yvel, int xadd, int yadd, int End...
  function StartWalk2 (line 1592) | void StartWalk2(int pnum, int xvel, int yvel, int xoff, int yoff, int xa...
  function StartWalk3 (line 1675) | void StartWalk3(int pnum, int xvel, int yvel, int xoff, int yoff, int xa...
  function StartAttack (line 1755) | void StartAttack(int pnum, int d)
  function StartRangeAttack (line 1776) | void StartRangeAttack(int pnum, int d, int cx, int cy)
  function StartPlrBlock (line 1799) | void StartPlrBlock(int pnum, int dir)
  function StartSpell (line 1822) | void StartSpell(int pnum, int d, int cx, int cy)
  function FixPlrWalkTags (line 1868) | void FixPlrWalkTags(int pnum)
  function RemovePlrFromMap (line 1895) | void RemovePlrFromMap(int pnum)
  function StartPlrHit (line 1915) | void StartPlrHit(int pnum, int dam, BOOL forcehit)
  function RespawnDeadItem (line 1973) | void RespawnDeadItem(ItemStruct *itm, int x, int y)
  function PlrDeadItem (line 1998) | static void PlrDeadItem(int pnum, ItemStruct *itm, int xx, int yy)
  function StartPlayerKill (line 2035) | void StartPlayerKill(int pnum, int earflag)
  function StripTopGold (line 2283) | void StripTopGold(int pnum)
  function RemovePlrMissiles (line 2341) | void RemovePlrMissiles(int pnum)
  function InitLevelChange (line 2372) | void InitLevelChange(int pnum)
  function StartNewLvl (line 2397) | void StartNewLvl(int pnum, int fom, int lvl)
  function RestartTownLvl (line 2437) | void RestartTownLvl(int pnum)
  function StartWarpLvl (line 2461) | void StartWarpLvl(int pnum, int pidx)
  function BOOL (line 2481) | BOOL PM_DoStand(int pnum)
  function BOOL (line 3081) | BOOL PlrHitPlr(int pnum, char p)
  function BOOL (line 3179) | BOOL PlrHitObj(int pnum, int mx, int my)
  function BOOL (line 3197) | BOOL PM_DoAttack(int pnum)
  function BOOL (line 3316) | BOOL PM_DoRangeAttack(int pnum)
  function ShieldDur (line 3370) | void ShieldDur(int pnum)
  function BOOL (line 3405) | BOOL PM_DoBlock(int pnum)
  function ArmorDur (line 3428) | static void ArmorDur(int pnum)
  function BOOL (line 3478) | BOOL PM_DoSpell(int pnum)
  function BOOL (line 3585) | BOOL PM_DoDeath(int pnum)
  function BOOL (line 3614) | BOOL PM_DoNewLvl(int pnum)
  function CheckNewPath (line 3619) | void CheckNewPath(int pnum)
  function BOOL (line 3941) | BOOL PlrDeathModeOK(int p)
  function CheckCheatStats (line 4019) | static void CheckCheatStats(int pnum)
  function ProcessPlayers (line 4046) | void ProcessPlayers()
  function ClrPlrPath (line 4163) | void ClrPlrPath(int pnum)
  function MakePlrPath (line 4235) | void MakePlrPath(int pnum, int xx, int yy, BOOL endspace)
  function CheckPlrSpell (line 4295) | void CheckPlrSpell()
  function SyncPlrAnim (line 4412) | void SyncPlrAnim(int pnum)
  function SyncInitPlrPos (line 4469) | void SyncInitPlrPos(int pnum)
  function SyncInitPlr (line 4525) | void SyncInitPlr(int pnum)
  function CheckStats (line 4535) | void CheckStats(int p)
  function ModifyPlrStr (line 4594) | void ModifyPlrStr(int p, int l)
  function ModifyPlrMag (line 4625) | void ModifyPlrMag(int p, int l)
  function ModifyPlrDex (line 4665) | void ModifyPlrDex(int p, int l)
  function ModifyPlrVit (line 4693) | void ModifyPlrVit(int p, int l)
  function SetPlayerHitPoints (line 4730) | void SetPlayerHitPoints(int pnum, int val)
  function SetPlrStr (line 4744) | void SetPlrStr(int p, int v)
  function SetPlrMag (line 4766) | void SetPlrMag(int p, int v)
  function SetPlrDex (line 4790) | void SetPlrDex(int p, int v)
  function SetPlrVit (line 4812) | void SetPlrVit(int p, int v)
  function InitDungMsgs (line 4837) | void InitDungMsgs(int pnum)
  function get_max_strength (line 4988) | int get_max_strength(int i)
  function get_max_magic (line 4993) | int get_max_magic(int i)
  function get_max_dexterity (line 4998) | int get_max_dexterity(int i)

FILE: Source/plrmsg.cpp
  function plrmsg_delay (line 14) | void plrmsg_delay(BOOL delay)
  function EventPlrMsg (line 43) | size_t __cdecl EventPlrMsg(const char *pszFmt, ...)
  function SendPlrMsg (line 58) | void SendPlrMsg(int pnum, const char *pszStr)
  function ClearPlrMsg (line 69) | void ClearPlrMsg()
  function InitPlrMsg (line 81) | void InitPlrMsg()
  function DrawPlrMsg (line 87) | void DrawPlrMsg()
  function PrintPlrMsg (line 112) | void PrintPlrMsg(DWORD x, DWORD y, DWORD width, const char *str, BYTE col)

FILE: Source/portal.cpp
  function InitPortals (line 18) | void InitPortals()
  function SetPortalStats (line 28) | void SetPortalStats(int i, BOOL o, int x, int y, int lvl, int lvltype)
  function AddWarpMissile (line 38) | void AddWarpMissile(int i, int x, int y)
  function SyncPortals (line 56) | void SyncPortals()
  function AddInTownPortal (line 75) | void AddInTownPortal(int i)
  function ActivatePortal (line 80) | void ActivatePortal(int i, int x, int y, int lvl, int lvltype, BOOL sp)
  function DeactivatePortal (line 93) | void DeactivatePortal(int i)
  function BOOL (line 98) | BOOL PortalOnLevel(int i)
  function RemovePortalMissile (line 106) | void RemovePortalMissile(int id)
  function SetCurrentPortal (line 125) | void SetCurrentPortal(int p)
  function GetPortalLevel (line 130) | void GetPortalLevel()
  function GetPortalLvlPos (line 157) | void GetPortalLvlPos()
  function BOOL (line 173) | BOOL PosOkPortal(int lvl, int x, int y)

FILE: Source/quests.cpp
  function InitQuests (line 98) | void InitQuests()
  function CheckQuests (line 180) | void CheckQuests()
  function BOOL (line 253) | BOOL ForceQuests()
  function BOOL (line 284) | BOOL QuestStatus(int i)
  function CheckQuestKill (line 297) | void CheckQuestKill(int m, BOOL sendmsg)
  function DrawButcher (line 466) | void DrawButcher()
  function DrawSkelKing (line 475) | void DrawSkelKing(int q, int x, int y)
  function DrawWarLord (line 481) | void DrawWarLord(int x, int y)
  function DrawSChamber (line 511) | void DrawSChamber(int q, int x, int y)
  function DrawLTBanner (line 546) | void DrawLTBanner(int x, int y)
  function DrawBlind (line 572) | void DrawBlind(int x, int y)
  function DrawBlood (line 598) | void DrawBlood(int x, int y)
  function DRLG_CheckQuests (line 624) | void DRLG_CheckQuests(int x, int y)
  function SetReturnLvlPos (line 657) | void SetReturnLvlPos()
  function GetReturnLvlPos (line 687) | void GetReturnLvlPos()
  function ResyncMPQuests (line 697) | void ResyncMPQuests()
  function ResyncQuests (line 739) | void ResyncQuests()
  function PrintQLString (line 826) | void PrintQLString(int x, int y, BOOL cjustflag, const char *str, int col)
  function DrawQuestLog (line 859) | void DrawQuestLog()
  function StartQuestlog (line 874) | void StartQuestlog()
  function QuestlogUp (line 897) | void QuestlogUp()
  function QuestlogDown (line 911) | void QuestlogDown()
  function QuestlogEnter (line 925) | void QuestlogEnter()
  function QuestlogESC (line 933) | void QuestlogESC()
  function SetMultiQuest (line 952) | void SetMultiQuest(int q, int s, int l, int v1)

FILE: Source/render.cpp
  function drawTopArchesUpperScreen (line 128) | void drawTopArchesUpperScreen(BYTE *pBuff)
  function drawBottomArchesUpperScreen (line 1157) | void drawBottomArchesUpperScreen(BYTE *pBuff, DWORD *pMask)
  function drawUpperScreen (line 1794) | void drawUpperScreen(BYTE *pBuff)
  function drawTopArchesLowerScreen (line 2416) | void drawTopArchesLowerScreen(BYTE *pBuff)
  function drawBottomArchesLowerScreen (line 3658) | void drawBottomArchesLowerScreen(BYTE *pBuff, DWORD *pMask)
  function drawLowerScreen (line 4455) | void drawLowerScreen(BYTE *pBuff)
  function world_draw_black_tile (line 5236) | void world_draw_black_tile(BYTE *pBuff)

FILE: Source/restrict.cpp
  function BOOL (line 12) | BOOL SystemSupported()
  function BOOL (line 32) | BOOL RestrictedTest()
  function BOOL (line 56) | BOOL ReadOnlyTest()

FILE: Source/scrollrt.cpp
  function ClearCursor (line 102) | void ClearCursor() // CODE_FIX: this was supposed to be in cursor.cpp
  function scrollrt_draw_cursor_back_buffer (line 111) | static void scrollrt_draw_cursor_back_buffer()
  function scrollrt_draw_cursor_item (line 143) | static void scrollrt_draw_cursor_item()
  function DrawMonster (line 397) | static void DrawMonster(int x, int y, int mx, int my, int m, int CelSkip...
  function DrawClippedMonster (line 459) | static void DrawClippedMonster(int x, int y, int mx, int my, int m, int ...
  function DrawPlayer (line 525) | static void DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCe...
  function DrawClippedPlayer (line 617) | static void DrawClippedPlayer(int pnum, int x, int y, int px, int py, BY...
  function DrawDeadPlayer (line 706) | void DrawDeadPlayer(int x, int y, int sx, int sy, int CelSkip, int CelCa...
  function DrawObject (line 752) | static void DrawObject(int x, int y, int ox, int oy, BOOL pre, int CelSk...
  function DrawClippedObject (line 822) | static void DrawClippedObject(int x, int y, int ox, int oy, BOOL pre, in...
  function scrollrt_draw_clipped_e_flag (line 888) | static void scrollrt_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int ...
  function scrollrt_draw_clipped_dungeon (line 945) | static void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, i...
  function scrollrt_draw_lower (line 1198) | static void scrollrt_draw_lower(int x, int y, int sx, int sy, int chunks...
  function scrollrt_draw_clipped_e_flag_2 (line 1360) | static void scrollrt_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, in...
  function scrollrt_draw_lower_2 (line 1702) | static void scrollrt_draw_lower_2(int x, int y, int sx, int sy, int chun...
  function scrollrt_draw_e_flag (line 1816) | static void scrollrt_draw_e_flag(BYTE *pBuff, int x, int y, int row, int...
  function scrollrt_draw_upper (line 2129) | static void scrollrt_draw_upper(int x, int y, int sx, int sy, int chunks...
  function DrawGame (line 2282) | static void DrawGame(int x, int y)
  function DrawView (line 2549) | void DrawView(int StartX, int StartY)
  function ScrollView (line 2646) | void ScrollView()
  function EnableFrameCount (line 2727) | void EnableFrameCount()
  function DrawFPS (line 2736) | static void DrawFPS()
  function DrawMain (line 2871) | static void DrawMain(int dwHgt, BOOL draw_desc, BOOL draw_hp, BOOL draw_...
  function scrollrt_draw_game_screen (line 2979) | void scrollrt_draw_game_screen(BOOL draw_cursor)
  function DrawAndBlit (line 3008) | void DrawAndBlit()

FILE: Source/setmaps.cpp
  function ObjIndex (line 72) | int ObjIndex(int x, int y)
  function AddSKingObjs (line 87) | void AddSKingObjs()
  function AddSChamObjs (line 97) | void AddSChamObjs()
  function AddVileObjs (line 103) | void AddVileObjs()
  function DRLG_SetMapTrans (line 110) | void DRLG_SetMapTrans(const char *sFileName)
  function LoadSetMap (line 140) | void LoadSetMap()

FILE: Source/sha.cpp
  function SHA1Init (line 16) | static void SHA1Init(SHA1Context *context)
  function SHA1ProcessMessageBlock (line 34) | static void SHA1ProcessMessageBlock(SHA1Context *context)
  function SHA1Input (line 101) | static void SHA1Input(SHA1Context *context, const char *message_array, i...
  function SHA1Clear (line 119) | void SHA1Clear()
  function SHA1Result (line 124) | void SHA1Result(int n, char Message_Digest[SHA1HashSize])
  function SHA1Calculate (line 138) | void SHA1Calculate(int n, const char *data, char Message_Digest[SHA1Hash...
  function SHA1Reset (line 145) | void SHA1Reset(int n)

FILE: Source/sound.cpp
  function snd_update (line 63) | void snd_update(BOOL bStopAll)
  function LPDIRECTSOUNDBUFFER (line 81) | static LPDIRECTSOUNDBUFFER sound_dup_channel(LPDIRECTSOUNDBUFFER DSB)
  function snd_get_volume (line 102) | static void snd_get_volume(const char *value_name, int *value)
  function snd_set_volume (line 118) | static void snd_set_volume(const char *key, int value)
  function BOOL (line 123) | static BOOL sound_file_reload(TSnd *sound_file, LPDIRECTSOUNDBUFFER DSB)
  function snd_stop_snd (line 152) | void snd_stop_snd(TSnd *pSnd)
  function BOOL (line 158) | BOOL snd_playing(TSnd *pSnd)
  function snd_play_snd (line 174) | void snd_play_snd(TSnd *pSnd, int lVolume, int lPan)
  function sound_CreateSoundBuffer (line 224) | static void sound_CreateSoundBuffer(TSnd *sound_file)
  function TSnd (line 239) | TSnd *sound_file_load(const char *path)
  function sound_file_cleanup (line 279) | void sound_file_cleanup(TSnd *sound_file)
  function sound_create_primary_buffer (line 292) | static void sound_create_primary_buffer(HANDLE music_track)
  function HRESULT (line 332) | static HRESULT sound_DirectSoundCreate(LPGUID lpGuid, LPDIRECTSOUND *ppD...
  function snd_init (line 351) | void snd_init(HWND hWnd)
  function sound_cleanup (line 373) | void sound_cleanup()
  function music_stop (line 391) | void music_stop()
  function music_start (line 401) | void music_start(int nTrack)
  function sound_disable_music (line 425) | void sound_disable_music(BOOL disable)
  function sound_get_or_set_music_volume (line 434) | int sound_get_or_set_music_volume(int volume)
  function sound_get_or_set_sound_volume (line 447) | int sound_get_or_set_sound_volume(int volume)

FILE: Source/spells.cpp
  function GetManaAmount (line 8) | int GetManaAmount(int id, int sn)
  function UseMana (line 66) | void UseMana(int id, int sn)
  function BOOL (line 97) | BOOL CheckSpell(int id, int sn, char st, BOOL manaonly)
  function PlacePlayer (line 163) | static void PlacePlayer(int pnum)
  function DoResurrect (line 213) | void DoResurrect(int pnum, int rid)
  function DoHealOther (line 262) | void DoHealOther(int pnum, int rid)

FILE: Source/stores.cpp
  function InitStores (line 82) | void InitStores()
  function SetupTownStores (line 104) | void SetupTownStores()
  function FreeStoreMem (line 135) | void FreeStoreMem()
  function DrawSTextBack (line 142) | void DrawSTextBack()
  function PrintSString (line 153) | void PrintSString(int x, int y, BOOL cjustflag, const char *str, char co...
  function DrawSSlider (line 256) | void DrawSSlider(int y1, int y2)
  function DrawSTextHelp (line 285) | void DrawSTextHelp()
  function ClearSText (line 291) | void ClearSText(int s, int e)
  function AddSLine (line 307) | void AddSLine(int y)
  function AddSTextVal (line 315) | void AddSTextVal(int y, int val)
  function OffsetSTextY (line 320) | void OffsetSTextY(int y, int yo)
  function AddSText (line 325) | void AddSText(int x, int y, BOOL j, const char *str, char clr, BOOL sel)
  function PrintStoreItem (line 336) | static void PrintStoreItem(ItemStruct *x, int l, char iclr)
  function StoreAutoPlace (line 402) | void StoreAutoPlace()
  function S_StartSmith (line 474) | void S_StartSmith()
  function S_ScrollSBuy (line 491) | void S_ScrollSBuy(int idx)
  function S_StartSBuy (line 528) | void S_StartSBuy()
  function S_ScrollSPBuy (line 552) | void S_ScrollSPBuy(int idx)
  function BOOL (line 586) | BOOL S_StartSPBuy()
  function BOOL (line 621) | BOOL SmithSellOk(int i)
  function S_ScrollSSell (line 668) | void S_ScrollSSell(int idx)
  function S_StartSSell (line 708) | void S_StartSSell()
  function BOOL (line 782) | BOOL SmithRepairOk(int i)
  function AddStoreHoldRepair (line 798) | static void AddStoreHoldRepair(ItemStruct *itm, int i)
  function S_StartSRepair (line 821) | void S_StartSRepair()
  function S_StartWitch (line 880) | void S_StartWitch()
  function S_ScrollWBuy (line 895) | void S_ScrollWBuy(int idx)
  function S_StartWBuy (line 932) | void S_StartWBuy()
  function BOOL (line 957) | BOOL WitchSellOk(int i)
  function S_StartWSell (line 988) | void S_StartWSell()
  function BOOL (line 1062) | BOOL WitchRechargeOk(int i)
  function AddStoreHoldRecharge (line 1080) | void AddStoreHoldRecharge(ItemStruct itm, int i)
  function S_StartNoMoney (line 1146) | void S_StartNoMoney()
  function S_StartNoRoom (line 1155) | void S_StartNoRoom()
  function S_StartConfirm (line 1163) | void S_StartConfirm()
  function S_StartBoy (line 1229) | void S_StartBoy()
  function S_StartBBoy (line 1248) | void S_StartBBoy()
  function S_StartHealer (line 1279) | void S_StartHealer()
  function S_ScrollHBuy (line 1307) | void S_ScrollHBuy(int idx)
  function S_StartHBuy (line 1333) | void S_StartHBuy()
  function S_StartStory (line 1357) | void S_StartStory()
  function BOOL (line 1369) | BOOL IdItemOk(ItemStruct *i)
  function AddStoreHoldId (line 1380) | void AddStoreHoldId(ItemStruct itm, int i)
  function S_StartSIdentify (line 1389) | void S_StartSIdentify()
  function S_StartIdShow (line 1463) | void S_StartIdShow()
  function S_StartTalk (line 1483) | void S_StartTalk()
  function S_StartTavern (line 1526) | void S_StartTavern()
  function S_StartBarMaid (line 1539) | void S_StartBarMaid()
  function S_StartDrunk (line 1551) | void S_StartDrunk()
  function StartStore (line 1563) | void StartStore(char s)
  function DrawSText (line 1664) | void DrawSText()
  function STextESC (line 1710) | void STextESC()
  function STextUp (line 1783) | void STextUp()
  function STextDown (line 1820) | void STextDown()
  function STextPrior (line 1857) | void STextPrior()
  function STextNext (line 1873) | void STextNext()
  function S_SmithEnter (line 1888) | void S_SmithEnter()
  function SetGoldCurs (line 1917) | void SetGoldCurs(int pnum, int i)
  function SetSpdbarGoldCurs (line 1927) | void SetSpdbarGoldCurs(int pnum, int i)
  function TakePlrsMoney (line 1937) | void TakePlrsMoney(int cost)
  function SmithBuyItem (line 2003) | void SmithBuyItem()
  function S_SBuyEnter (line 2023) | void S_SBuyEnter()
  function SmithBuyPItem (line 2055) | void SmithBuyPItem()
  function S_SPBuyEnter (line 2082) | void S_SPBuyEnter()
  function BOOL (line 2120) | BOOL StoreGoldFit(int idx)
  function PlaceStoreGold (line 2157) | void PlaceStoreGold(int v)
  function StoreSellItem (line 2180) | void StoreSellItem()
  function S_SSellEnter (line 2221) | void S_SSellEnter()
  function SmithRepairItem (line 2242) | void SmithRepairItem()
  function S_SRepairEnter (line 2266) | void S_SRepairEnter()
  function S_WitchEnter (line 2286) | void S_WitchEnter()
  function WitchBuyItem (line 2312) | void WitchBuyItem()
  function S_WBuyEnter (line 2338) | void S_WBuyEnter()
  function S_WSellEnter (line 2373) | void S_WSellEnter()
  function WitchRechargeItem (line 2393) | void WitchRechargeItem()
  function S_WRechargeEnter (line 2411) | void S_WRechargeEnter()
  function S_BoyEnter (line 2431) | void S_BoyEnter()
  function BoyBuyItem (line 2455) | void BoyBuyItem()
  function HealerBuyItem (line 2464) | void HealerBuyItem()
  function StoryIdItem (line 2539) | void StoryIdItem()
  function S_ConfirmEnter (line 2567) | void S_ConfirmEnter()
  function S_HealerEnter (line 2609) | void S_HealerEnter()
  function S_HBuyEnter (line 2645) | void S_HBuyEnter()
  function S_StoryEnter (line 2677) | void S_StoryEnter()
  function S_SIDEnter (line 2697) | void S_SIDEnter()
  function S_TalkEnter (line 2717) | void S_TalkEnter()
  function S_TavernEnter (line 2757) | void S_TavernEnter()
  function S_BarmaidEnter (line 2774) | void S_BarmaidEnter()
  function S_DrunkEnter (line 2791) | void S_DrunkEnter()
  function STextEnter (line 2808) | void STextEnter()
  function CheckStoreBtn (line 2890) | void CheckStoreBtn()
  function ReleaseStoreBtn (line 2942) | void ReleaseStoreBtn()

FILE: Source/sync.cpp
  function sync_one_monster (line 14) | static void sync_one_monster()
  function sync_monster_pos (line 29) | static void sync_monster_pos(TSyncMonster *p, int ndx)
  function BOOL (line 41) | static BOOL sync_monster_active(TSyncMonster *p)
  function BOOL (line 65) | static BOOL sync_monster_active2(TSyncMonster *p)
  function SyncPlrInv (line 93) | static void SyncPlrInv(TSyncHeader *pHdr)
  function DWORD (line 151) | DWORD sync_all_monsters(const BYTE *pbBuf, DWORD dwMaxLen)
  function DWORD (line 256) | DWORD sync_update(int pnum, const BYTE *pbBuf)
  function sync_init (line 290) | void sync_init()

FILE: Source/themes.cpp
  function BOOL (line 56) | BOOL TFit_Shrine(int i)
  function BOOL (line 101) | BOOL TFit_Obj5(int t)
  function BOOL (line 149) | BOOL TFit_SkelRoom(int t)
  function BOOL (line 167) | BOOL TFit_GoatShrine(int t)
  function BOOL (line 181) | BOOL CheckThemeObj3(int xp, int yp, int t, int f)
  function BOOL (line 201) | BOOL TFit_Obj3(int t)
  function BOOL (line 219) | BOOL CheckThemeReqs(int t)
  function BOOL (line 272) | BOOL SpecialThemeFit(int i, int t)
  function BOOL (line 354) | BOOL CheckThemeRoom(int tv)
  function InitThemes (line 396) | void InitThemes()
  function HoldThemeRooms (line 463) | void HoldThemeRooms()
  function PlaceThemeMonsts (line 492) | void PlaceThemeMonsts(int t, int f)
  function Theme_Barrel (line 526) | void Theme_Barrel(int t)
  function Theme_Shrine (line 554) | void Theme_Shrine(int t)
  function Theme_MonstPit (line 576) | void Theme_MonstPit(int t)
  function Theme_SkelRoom (line 610) | void Theme_SkelRoom(int t)
  function Theme_Treasure (line 680) | void Theme_Treasure(int t)
  function Theme_Library (line 725) | void Theme_Library(int t)
  function Theme_Torture (line 771) | void Theme_Torture(int t)
  function Theme_BloodFountain (line 795) | void Theme_BloodFountain(int t)
  function Theme_Decap (line 809) | void Theme_Decap(int t)
  function Theme_PurifyingFountain (line 834) | void Theme_PurifyingFountain(int t)
  function Theme_ArmorStand (line 848) | void Theme_ArmorStand(int t)
  function Theme_GoatShrine (line 878) | void Theme_GoatShrine(int t)
  function Theme_Cauldron (line 898) | void Theme_Cauldron(int t)
  function Theme_MurkyFountain (line 912) | void Theme_MurkyFountain(int t)
  function Theme_TearFountain (line 926) | void Theme_TearFountain(int t)
  function Theme_BrnCross (line 940) | void Theme_BrnCross(int t)
  function Theme_WeaponRack (line 966) | void Theme_WeaponRack(int t)
  function UpdateL4Trans (line 994) | void UpdateL4Trans()
  function CreateThemeRooms (line 1010) | void CreateThemeRooms()

FILE: Source/tmsg.cpp
  function tmsg_get (line 10) | int tmsg_get(BYTE *pbMsg, DWORD dwMaxLen)
  function tmsg_add (line 29) | void tmsg_add(BYTE *pbMsg, BYTE bLen)
  function tmsg_start (line 44) | void tmsg_start()
  function tmsg_cleanup (line 49) | void tmsg_cleanup()

FILE: Source/town.cpp
  function town_clear_upper_buf (line 13) | void town_clear_upper_buf(BYTE *pBuff)
  function town_clear_low_buf (line 80) | void town_clear_low_buf(BYTE *pBuff)
  function town_special_upper (line 280) | void town_special_upper(BYTE *pBuff, int nCel)
  function town_draw_clipped_e_flag (line 400) | void town_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int sx, int sy)
  function town_draw_clipped_town (line 433) | void town_draw_clipped_town(BYTE *pBuff, int sx, int sy, int dx, int dy,...
  function town_draw_lower (line 510) | void town_draw_lower(int x, int y, int sx, int sy, int chunks, int eflag)
  function town_draw_clipped_e_flag_2 (line 607) | void town_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int row, int ...
  function town_draw_clipped_town_2 (line 651) | void town_draw_clipped_town_2(BYTE *pBuff, int sx, int sy, int row, int ...
  function town_draw_lower_2 (line 725) | void town_draw_lower_2(int x, int y, int sx, int sy, int chunks, int row...
  function town_draw_e_flag (line 836) | void town_draw_e_flag(BYTE *pBuff, int x, int y, int row, int CelCap, in...
  function town_draw_town_all (line 873) | void town_draw_town_all(BYTE *pBuff, int x, int y, int row, int CelCap, ...
  function town_draw_upper (line 952) | void town_draw_upper(int x, int y, int sx, int sy, int chunks, int row, ...
  function T_DrawGame (line 1053) | void T_DrawGame(int x, int y)
  function T_DrawView (line 1345) | void T_DrawView(int StartX, int StartY)
  function SetTownMicros (line 1407) | void SetTownMicros()
  function T_FillSector (line 1453) | void T_FillSector(BYTE *P3Tiles, BYTE *pSector, int xi, int yi, int w, i...
  function T_FillTile (line 1532) | void T_FillTile(BYTE *P3Tiles, int xx, int yy, int t)
  function TownOpenHive (line 1578) | void TownOpenHive()
  function TownCloseHive (line 1629) | void TownCloseHive()
  function TownCloseGrave (line 1680) | void TownCloseGrave()
  function TownOpenGrave (line 1695) | void TownOpenGrave()
  function CreateTown (line 1820) | void CreateTown(int entry)

FILE: Source/towners.cpp
  function CowSFX (line 162) | static void CowSFX(int pnum)
  function GetActiveTowner (line 189) | int GetActiveTowner(int t)
  function SetTownerGPtrs (line 201) | void SetTownerGPtrs(BYTE *pData, BYTE **pAnim)
  function NewTownerAnim (line 232) | void NewTownerAnim(int tnum, BYTE *pAnim, int numFrames, int Delay)
  function InitTownerInfo (line 241) | void InitTownerInfo(int i, int w, int sel, int t, int x, int y, int ao, ...
  function InitQstSnds (line 257) | void InitQstSnds(int i)
  function InitSmith (line 277) | void InitSmith()
  function InitBarOwner (line 293) | void InitBarOwner()
  function InitTownDead (line 310) | void InitTownDead()
  function InitWitch (line 326) | void InitWitch()
  function InitBarmaid (line 342) | void InitBarmaid()
  function InitBoy (line 358) | void InitBoy()
  function InitHealer (line 375) | void InitHealer()
  function InitTeller (line 391) | void InitTeller()
  function InitDrunk (line 407) | void InitDrunk()
  function InitCows (line 423) | void InitCows()
  function InitFarmer (line 458) | void InitFarmer()
  function InitCowFarmer (line 474) | void InitCowFarmer()
  function InitGirl (line 494) | void InitGirl()
  function InitTowners (line 515) | void InitTowners()
  function FreeTownerGFX (line 542) | void FreeTownerGFX()
  function TownCtrlMsg (line 557) | void TownCtrlMsg(int i)
  function TownBlackSmith (line 583) | void TownBlackSmith()
  function TownBarOwner (line 591) | void TownBarOwner()
  function TownDead (line 599) | void 
Condensed preview — 252 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,855K chars).
[
  {
    "path": ".circleci/are-we-d1-yet.sh",
    "chars": 1711,
    "preview": "#!/bin/bash\n\n# based on https://github.com/k3rn31p4nic/travis-ci-discord-webhook\n\n# Only run for commits/builds on maste"
  },
  {
    "path": ".circleci/config.yml",
    "chars": 3679,
    "preview": "version: 2\njobs:\n  diablo_109b:\n    docker:\n      - image: diasurgical/riivaaja:stable\n    steps:\n      - checkout\n     "
  },
  {
    "path": ".clang-format",
    "chars": 237,
    "preview": "BasedOnStyle: webkit\nAlignTrailingComments: true\nAllowShortBlocksOnASingleLine: true\nAllowShortFunctionsOnASingleLine: N"
  },
  {
    "path": ".editorconfig",
    "chars": 167,
    "preview": "root = true\r\n\r\n[*]\r\nindent_style = tab\r\nend_of_line = crlf\r\ncharset = utf-8\r\ntrim_trailing_whitespace = true\r\ninsert_fin"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 899,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\nBefore creating "
  },
  {
    "path": ".github/workflows/build_mac.yml",
    "chars": 287,
    "preview": "name: macOS Build\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    \n\njobs:\n  xcode:\n    runs-on: macos-11\n\n"
  },
  {
    "path": ".gitignore",
    "chars": 6268,
    "preview": "# Generated by VC++ 6 builds\n/vc60.idb\n*.asm\n*.idb\n\n# macOS\n.DS_Store\n\n# CodeLite\n.CodeLite\n*.project\n*.workspace\n\n# Dev"
  },
  {
    "path": "3rdParty/PKWare/Makefile",
    "chars": 1516,
    "preview": "VC5_DIR ?= $(HOME)/DevStudio_5.10/VC\n\n# The $(VS6_DIR) directory is a copy of the \"Microsoft Visual Studio\" directory.\n#"
  },
  {
    "path": "3rdParty/PKWare/PKWare.vcxproj",
    "chars": 4593,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microso"
  },
  {
    "path": "3rdParty/PKWare/PKWare.vcxproj.filters",
    "chars": 1148,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "3rdParty/PKWare/Pkware.dsp",
    "chars": 2903,
    "preview": "# Microsoft Developer Studio Project File - Name=\"Pkware\" - Package Owner=<4>\r\n# Microsoft Developer Studio Generated Bu"
  },
  {
    "path": "3rdParty/PKWare/explode.cpp",
    "chars": 21035,
    "preview": "/*****************************************************************************/\n/* explode.cpp                          "
  },
  {
    "path": "3rdParty/PKWare/implode.cpp",
    "chars": 32106,
    "preview": "/*****************************************************************************/\n/* implode.cpp                          "
  },
  {
    "path": "3rdParty/PKWare/pkware.h",
    "chars": 7583,
    "preview": "/*****************************************************************************/\n/* pkware.h                             "
  },
  {
    "path": "3rdParty/Storm/Makefile",
    "chars": 1687,
    "preview": "VC5_DIR ?= $(HOME)/DevStudio_5.10/VC\r\n\r\n# The $(VS6_DIR) directory is a copy of the \"Microsoft Visual Studio\" directory."
  },
  {
    "path": "3rdParty/Storm/Source/Storm.dsp",
    "chars": 3684,
    "preview": "# Microsoft Developer Studio Project File - Name=\"Storm\" - Package Owner=<4>\r\n# Microsoft Developer Studio Generated Bui"
  },
  {
    "path": "3rdParty/Storm/Source/Storm.vcxproj",
    "chars": 7134,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "3rdParty/Storm/Source/storm.cpp",
    "chars": 15811,
    "preview": "#include \"storm.h\"\r\n\r\n#define rBool { return TRUE; }\r\n#define rPVoid { return NULL; }\r\n#define rVoid { return; }\r\n#defin"
  },
  {
    "path": "3rdParty/Storm/Source/storm.def",
    "chars": 18922,
    "preview": "LIBRARY      \"Storm\"\r\n\r\nEXPORTS\r\n  SNetCreateGame                @101 NONAME\r\n  SNetDestroy                   @102 NONAM"
  },
  {
    "path": "3rdParty/Storm/Source/storm.h",
    "chars": 45467,
    "preview": "#pragma once\r\n\r\n#ifndef __BLIZZARD_STORM_HEADER\r\n#define __BLIZZARD_STORM_HEADER\r\n\r\n#include <windows.h>\r\n#include <winu"
  },
  {
    "path": "3rdParty/Storm/Source/storm_gcc.def",
    "chars": 22039,
    "preview": "LIBRARY      \"Storm\"\n\nEXPORTS\n  SNetCreateGame                @101 NONAME\n  SNetCreateGame@40             @101 NONAME\n  "
  },
  {
    "path": "Diablo.dsp",
    "chars": 15476,
    "preview": "# Microsoft Developer Studio Project File - Name=\"Diablo\" - Package Owner=<4>\r\n# Microsoft Developer Studio Generated Bu"
  },
  {
    "path": "Diablo.dsw",
    "chars": 1501,
    "preview": "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n\r"
  },
  {
    "path": "Diablo.rc",
    "chars": 12671,
    "preview": "//Microsoft Developer Studio generated resource script.\r\n//\r\n#include \"resource.h\"\r\n\r\n#define APSTUDIO_READONLY_SYMBOLS\r"
  },
  {
    "path": "Diablo.sln",
    "chars": 2599,
    "preview": "\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 15\r\nVisualStudioVersion = 15.0.27703.203"
  },
  {
    "path": "Diablo.vcxproj",
    "chars": 14599,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "Diablo.vcxproj.filters",
    "chars": 15994,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
  },
  {
    "path": "DiabloUI/DiabloUI.dsp",
    "chars": 3847,
    "preview": "# Microsoft Developer Studio Project File - Name=\"DiabloUI\" - Package Owner=<4>\r\n# Microsoft Developer Studio Generated "
  },
  {
    "path": "DiabloUI/DiabloUI.vcxproj",
    "chars": 7267,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "DiabloUI/Makefile",
    "chars": 1886,
    "preview": "VC5_DIR ?= $(HOME)/DevStudio_5.10/VC\r\n\r\n# The $(VS6_DIR) directory is a copy of the \"Microsoft Visual Studio\" directory."
  },
  {
    "path": "DiabloUI/_temp_data.cpp",
    "chars": 15245,
    "preview": "//rdata\r\nProfileStruct bnprofiles[4] = {\r\n\t{ \"profile\\\\sex\", '\\x01', 1128, 8 },\r\n\t{ \"profile\\\\age\", '\\x01', 1130, 4 },\r\n"
  },
  {
    "path": "DiabloUI/_temp_funcs.h",
    "chars": 31771,
    "preview": "void __fastcall artfont_SetArtFont(int nFont);\r\nvoid __cdecl artfont_InitAllFonts();\r\nvoid __cdecl artfont_FreeAllFonts("
  },
  {
    "path": "DiabloUI/artfont.cpp",
    "chars": 6650,
    "preview": "// ref: 0x10001058\r\nvoid __fastcall artfont_SetArtFont(int nFont)\r\n{\r\n\tswitch (nFont) {\r\n\tcase AF_SMALL:\r\n\t\tsgpCurrFont "
  },
  {
    "path": "DiabloUI/bn_prof.cpp",
    "chars": 34461,
    "preview": "// ref: 0x100014E8\r\nsigned int bn_prof_100014E8() { return 0; }\r\n/* {\r\n\tsigned int result; // eax\r\n\r\n\tresult = 213909504"
  },
  {
    "path": "DiabloUI/bnetgw.cpp",
    "chars": 10638,
    "preview": "// ref: 0x100028C2\r\nvoid UNKCALL BNetGW_100028C2(DWORD *arg) { return; }\r\n/* {\r\n\tDWORD *v1; // esi\r\n\tbool v2; // zf\r\n\tbo"
  },
  {
    "path": "DiabloUI/connect.cpp",
    "chars": 28274,
    "preview": "// ref: 0x10002E2B\r\nvoid __cdecl Connect_FreeConnectData()\r\n{\r\n\tHANDLE *v0; // edi\r\n\r\n\tif (connect_data1) {\r\n\t\tSMemFree("
  },
  {
    "path": "DiabloUI/copyprot.cpp",
    "chars": 4254,
    "preview": "// ref: 0x10004054\r\nBOOL __stdcall UiCopyProtError(int *pdwResult)\r\n{\r\n\tint v1;           // eax\r\n\tint v2;           // "
  },
  {
    "path": "DiabloUI/cr8game.cpp",
    "chars": 10948,
    "preview": "// ref: 0x10004339\r\nvoid __cdecl cr8game_cpp_init()\r\n{\r\n\tcr8game_cpp_float = cr8game_cpp_float_value;\r\n}\r\n// 1001F3FC: u"
  },
  {
    "path": "DiabloUI/creadung.cpp",
    "chars": 8386,
    "preview": "// ref: 0x10004C33\r\nvoid __fastcall CreaDung_SetDelSpin(int a1)\r\n{\r\n\tcreadung_delspinners = a1;\r\n}\r\n// 100296CC: using g"
  },
  {
    "path": "DiabloUI/creastat.cpp",
    "chars": 540,
    "preview": "// ref: 0x1000523E\r\nBOOL __stdcall UiGetDefaultStats(int pclass, _uidefaultstats *pStats)\r\n{\r\n\tif (!pStats)\r\n\t\treturn 0;"
  },
  {
    "path": "DiabloUI/credits.cpp",
    "chars": 6863,
    "preview": "// ref: 0x10005297\r\nvoid __cdecl credits_cpp_init()\r\n{\r\n\tcredits_cpp_float = credits_cpp_float_value;\r\n}\r\n// 1001F408: u"
  },
  {
    "path": "DiabloUI/diabedit.cpp",
    "chars": 5986,
    "preview": "// ref: 0x10005765\r\nvoid __fastcall DiabEdit_DoPaintBMP(HWND hWnd)\r\n{\r\n\tstruct tagPAINTSTRUCT Paint; // [esp+4h] [ebp-40"
  },
  {
    "path": "DiabloUI/diabloui.cpp",
    "chars": 3514,
    "preview": "#define STRICT // for WNDPROC. ref: Remarks in https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-c"
  },
  {
    "path": "DiabloUI/diabloui.def",
    "chars": 656,
    "preview": "LIBRARY \"DiabloUI\"\r\n\r\nEXPORTS\r\n\tUiValidPlayerName\r\n\tUiAppActivate\r\n\tUiArtCallback\r\n\tUiAuthCallback\r\n\tUiBetaDisclaimer\r\n\t"
  },
  {
    "path": "DiabloUI/diabloui.h",
    "chars": 3319,
    "preview": "//HEADER_GOES_HERE\r\n#ifndef __DIABLOUI_H__\r\n#define __DIABLOUI_H__\r\n\r\n#if defined(__GNUC__) || defined(__cplusplus)\r\next"
  },
  {
    "path": "DiabloUI/diabloui_gcc.def",
    "chars": 2387,
    "preview": "LIBRARY \"DiabloUI\"\r\n\r\nEXPORTS\r\n\tUiValidPlayerName              @1\r\n\t@UiValidPlayerName@4           @1  NONAME\r\n\tUiAppAct"
  },
  {
    "path": "DiabloUI/dirlink.cpp",
    "chars": 10344,
    "preview": "// ref: 0x10005CFA\r\nsigned int DirLink_10005CFA() { return 0; }\r\n/* {\r\n\tsigned int result; // eax\r\n\r\n\tresult = 213909504"
  },
  {
    "path": "DiabloUI/disclaim.cpp",
    "chars": 2633,
    "preview": "// ref: 0x100063B3\r\nBOOL __stdcall UiBetaDisclaimer(int a1)\r\n{\r\n\tint v1; // eax\r\n\r\n\tv1 = (int)SDrawGetFrameWindow(NULL);"
  },
  {
    "path": "DiabloUI/doom.cpp",
    "chars": 9125,
    "preview": "// ref: 0x10006581\r\nvoid __cdecl Doom_cpp_init()\r\n{\r\n\tdoom_cpp_float = doom_cpp_float_value;\r\n}\r\n// 1001F41C: using gues"
  },
  {
    "path": "DiabloUI/entdial.cpp",
    "chars": 4464,
    "preview": "// ref: 0x10006C96\r\nint __stdcall EntDial_10006C96(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam) { return 0; }\r\n/* "
  },
  {
    "path": "DiabloUI/entname.cpp",
    "chars": 3835,
    "preview": "// ref: 0x10006F7C\r\nLRESULT __stdcall EntName_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)\r\n{\r\n\tint v4;  /"
  },
  {
    "path": "DiabloUI/fade.cpp",
    "chars": 3345,
    "preview": "// ref: 0x1000722B\r\nvoid __fastcall Fade_ApplyPaletteRange(int range1, int range2)\r\n{\r\n\ttagPALETTEENTRY *v4; // eax MAPD"
  },
  {
    "path": "DiabloUI/focus.cpp",
    "chars": 6365,
    "preview": "// ref: 0x10007458\r\nvoid __fastcall Focus_CheckPlayMove(LPARAM lParam)\r\n{\r\n\tif (sgbSpinnersLoaded && lParam != dword_100"
  },
  {
    "path": "DiabloUI/local.cpp",
    "chars": 13420,
    "preview": "// ref: 0x10007825\r\nvoid __cdecl local_InitUiPalette()\r\n{\r\n\tLOGPALETTE *v0;   // eax MAPDST\r\n\tPALETTEENTRY *v2; // eax\r\n"
  },
  {
    "path": "DiabloUI/mainmenu.cpp",
    "chars": 5592,
    "preview": "// ref: 0x10008164\r\nvoid __cdecl MainMenu_cpp_init()\r\n{\r\n\tmainmenu_cpp_float = mainmenu_cpp_float_value;\r\n}\r\n// 1001F434"
  },
  {
    "path": "DiabloUI/modem.cpp",
    "chars": 12412,
    "preview": "// ref: 0x1000855D\r\nint Modem_1000855D() { return 0; }\r\n/* {\r\n\treturn dword_1002A124;\r\n} */\r\n// 1002A124: using guessed "
  },
  {
    "path": "DiabloUI/modmstat.cpp",
    "chars": 5021,
    "preview": "// ref: 0x10008C62\r\nint __stdcall ModmStat_10008C62(char *a1, int a2, int a3, int a4, int a5) { return 0; }\r\n/* {\r\n\tint "
  },
  {
    "path": "DiabloUI/okcancel.cpp",
    "chars": 7562,
    "preview": "// ref: 0x10008F31\r\nBOOL __fastcall OkCancel_DrawString(HWND hWnd, char *str)\r\n{\r\n\tHDC v3;              // edi\r\n\tvoid *v"
  },
  {
    "path": "DiabloUI/progress.cpp",
    "chars": 9301,
    "preview": "// ref: 0x10009480\r\nsigned int Progress_10009480() { return 0; }\r\n/* {\r\n\tsigned int result; // eax\r\n\r\n\tresult = 21390950"
  },
  {
    "path": "DiabloUI/sbar.cpp",
    "chars": 5916,
    "preview": "// ref: 0x100099B5\r\nvoid __cdecl Sbar_cpp_init()\r\n{\r\n\tSbar_cpp_float = Sbar_cpp_float_value;\r\n}\r\n// 1001F448: using gues"
  },
  {
    "path": "DiabloUI/selclass.cpp",
    "chars": 4365,
    "preview": "// ref: 0x10009D66\r\nLRESULT __stdcall SelClass_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)\r\n{\r\n\tHWND v4; "
  },
  {
    "path": "DiabloUI/selconn.cpp",
    "chars": 26046,
    "preview": "// ref: 0x1000A082\r\nvoid *SelConn_1000A082() { return 0; }\r\n/* {\r\n\treturn SMemAlloc(272, \"C:\\\\Src\\\\Diablo\\\\DiabloUI\\\\Sel"
  },
  {
    "path": "DiabloUI/seldial.cpp",
    "chars": 9883,
    "preview": "// ref: 0x1000B011\r\nint UNKCALL SelDial_1000B011(char *arg) { return 0; }\r\n/* {\r\n\tsigned int v1; // edi\r\n\tint i; // edi\r"
  },
  {
    "path": "DiabloUI/selgame.cpp",
    "chars": 2380,
    "preview": "// ref: 0x1000B66A\r\nvoid UNKCALL SelGame_1000B66A(void *arg) { return; }\r\n/* {\r\n\tdword_1002A408 = (int)arg;\r\n} */\r\n// 10"
  },
  {
    "path": "DiabloUI/selhero.cpp",
    "chars": 19979,
    "preview": "// ref: 0x1000B7A0\r\n_uiheroinfo *__cdecl SelHero_GetCurrentHeroInfo()\r\n{\r\n\treturn sgpHeroInfo;\r\n}\r\n\r\n// ref: 0x1000B7A6\r"
  },
  {
    "path": "DiabloUI/selipx.cpp",
    "chars": 28469,
    "preview": "// ref: 0x1000C610\r\nvoid *SelIPX_1000C610() { return 0; }\r\n/* {\r\n\treturn SMemAlloc(268, \"C:\\\\Src\\\\Diablo\\\\DiabloUI\\\\SelI"
  },
  {
    "path": "DiabloUI/sellist.cpp",
    "chars": 16624,
    "preview": "// ref: 0x1000D769\r\nvoid __cdecl SelList_cpp_init()\r\n{\r\n\tSelList_cpp_float = SelList_cpp_float_value;\r\n}\r\n// 1001F468: u"
  },
  {
    "path": "DiabloUI/selload.cpp",
    "chars": 3448,
    "preview": "// ref: 0x1000E1C2\r\nLRESULT __stdcall SelLoad_WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)\r\n{\r\n\tHWND v4; /"
  },
  {
    "path": "DiabloUI/selmodem.cpp",
    "chars": 19901,
    "preview": "// ref: 0x1000E42A\r\nsigned int SelModem_1000E42A() { return 0; }\r\n/* {\r\n\tsigned int result; // eax\r\n\r\n\tresult = 21390950"
  },
  {
    "path": "DiabloUI/selregn.cpp",
    "chars": 19264,
    "preview": "// ref: 0x1000EF42\r\nvoid *SelRegn_1000EF42() { return 0; }\r\n/* {\r\n\treturn SMemAlloc(136, \"C:\\\\Src\\\\Diablo\\\\DiabloUI\\\\Sel"
  },
  {
    "path": "DiabloUI/selyesno.cpp",
    "chars": 5736,
    "preview": "// ref: 0x1000FA49\r\nint __fastcall SelYesNo_YesNoDialog(HWND hWnd, char *dialogstr, char *hero, int nofocus)\r\n{\r\n\tyesno_"
  },
  {
    "path": "DiabloUI/title.cpp",
    "chars": 7082,
    "preview": "// ref: 0x1000FDEE\r\nvoid __fastcall Title_BlitTitleBuffer(HWND hWnd)\r\n{\r\n\tDWORD *v2;          // edi\r\n\tint v3;          "
  },
  {
    "path": "DiabloUI/titlesnd.cpp",
    "chars": 741,
    "preview": "// ref: 0x10010306\r\nvoid __fastcall TitleSnd_SetSoundFunction(void(__stdcall *func)(const char *file))\r\n{\r\n\tgfnSoundFunc"
  },
  {
    "path": "Hellfire.dsp",
    "chars": 14748,
    "preview": "# Microsoft Developer Studio Project File - Name=\"Hellfire\" - Package Owner=<4>\n# Microsoft Developer Studio Generated B"
  },
  {
    "path": "Hellfire.dsw",
    "chars": 1428,
    "preview": "Microsoft Developer Studio Workspace File, Format Version 5.00\n# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\n\n##"
  },
  {
    "path": "Hellfire.rc",
    "chars": 10931,
    "preview": "//Microsoft Developer Studio generated resource script.\n//\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n////"
  },
  {
    "path": "LICENSE.md",
    "chars": 3599,
    "preview": "# Sustainable Use License\n\nVersion 1.0\n\n## Acceptance\n\nBy using the software, you agree to all of the terms and conditio"
  },
  {
    "path": "Makefile",
    "chars": 1581,
    "preview": "# mingw32 and mingw64 have different executables\r\nifdef MINGW32\r\n\tCXX=mingw32-g++\r\n\tDLLTOOL=dlltool\r\n\tWINDRES=windres\r\ne"
  },
  {
    "path": "MakefileVC",
    "chars": 3231,
    "preview": "# The $(VC5_DIR)/.. and $(VS6_DIR) directories are copies \"Microsoft Visual Studio\".\r\n#\r\n# To get a working setup on Lin"
  },
  {
    "path": "README.md",
    "chars": 10633,
    "preview": "[![Build Status](https://circleci.com/gh/diasurgical/devilution.svg?style=svg)](https://circleci.com/gh/diasurgical/devi"
  },
  {
    "path": "Source/.clang-format",
    "chars": 203,
    "preview": "BasedOnStyle: webkit\nAlignTrailingComments: true\nAllowShortBlocksOnASingleLine: true\nAllowShortFunctionsOnASingleLine: N"
  },
  {
    "path": "Source/_asm.cpp",
    "chars": 3267,
    "preview": "static __inline void asm_cel_light_edge(unsigned char w, BYTE *tbl, BYTE **dst, BYTE **src);\nstatic __inline void asm_ce"
  },
  {
    "path": "Source/_render.cpp",
    "chars": 164875,
    "preview": "__declspec(naked) void drawTopArchesUpperScreen(BYTE *pBuff)\n{\n\t__asm {\n\t\tpush\tebx\n\t\tpush\tedx\n\t\tpush\tedi\n\t\tpush\tesi\n\t\tmo"
  },
  {
    "path": "Source/all.h",
    "chars": 1811,
    "preview": "/**\r\n * @file all.h\r\n *\r\n * Include all application headers.\r\n */\r\n#ifndef __ALL_H__\r\n#define __ALL_H__\r\n\r\n#include \"../"
  },
  {
    "path": "Source/appfat.cpp",
    "chars": 18323,
    "preview": "/**\r\n * @file appfat.cpp\r\n *\r\n * Implementation of error dialogs.\r\n */\r\n#include \"all.h\"\r\n#include \"../3rdParty/Storm/So"
  },
  {
    "path": "Source/appfat.h",
    "chars": 866,
    "preview": "/**\r\n * @file appfat.h\r\n *\r\n * Interface of error dialogs.\r\n */\r\n#ifndef __APPFAT_H__\r\n#define __APPFAT_H__\r\n\r\nvoid Trig"
  },
  {
    "path": "Source/asm_trans_rect.inc",
    "chars": 1986,
    "preview": "/*  Draws a half-transparent rectangle by blacking out odd pixels on odd lines,\r\n *  even pixels on even lines.\r\n *\r\n * "
  },
  {
    "path": "Source/automap.cpp",
    "chars": 21077,
    "preview": "/**\r\n * @file automap.cpp\r\n *\r\n * Implementation of the in-game map overlay.\r\n */\r\n#include \"all.h\"\r\n\r\n/**\r\n * Maps from"
  },
  {
    "path": "Source/automap.h",
    "chars": 532,
    "preview": "/**\r\n * @file automap.h\r\n *\r\n * Interface of the in-game map overlay.\r\n */\r\n#ifndef __AUTOMAP_H__\r\n#define __AUTOMAP_H__"
  },
  {
    "path": "Source/capture.cpp",
    "chars": 4915,
    "preview": "/**\r\n * @file capture.cpp\r\n *\r\n * Implementation of the screenshot function.\r\n */\r\n#include \"all.h\"\r\n\r\n/**\r\n * @brief Wr"
  },
  {
    "path": "Source/capture.h",
    "chars": 177,
    "preview": "/**\r\n * @file capture.h\r\n *\r\n * Interface of the screenshot function.\r\n */\r\n#ifndef __CAPTURE_H__\r\n#define __CAPTURE_H__"
  },
  {
    "path": "Source/codec.cpp",
    "chars": 3199,
    "preview": "/**\r\n * @file codec.cpp\r\n *\r\n * Implementation of save game encryption algorithm.\r\n */\r\n#include \"all.h\"\r\n\r\ntypedef stru"
  },
  {
    "path": "Source/codec.h",
    "chars": 359,
    "preview": "/**\r\n * @file codec.h\r\n *\r\n * Interface of save game encryption algorithm.\r\n */\r\n#ifndef __CODEC_H__\r\n#define __CODEC_H_"
  },
  {
    "path": "Source/control.cpp",
    "chars": 74103,
    "preview": "/**\r\n * @file control.cpp\r\n *\r\n * Implementation of the character and main control panels\r\n */\r\n#include \"all.h\"\r\n\r\nBYTE"
  },
  {
    "path": "Source/control.h",
    "chars": 2363,
    "preview": "/**\r\n * @file control.h\r\n *\r\n * Interface of the character and main control panels\r\n */\r\n#ifndef __CONTROL_H__\r\n#define "
  },
  {
    "path": "Source/cursor.cpp",
    "chars": 20995,
    "preview": "/**\r\n * @file cursor.cpp\r\n *\r\n * Implementation of cursor tracking functionality.\r\n */\r\n#include \"all.h\"\r\n\r\n/** Pixel wi"
  },
  {
    "path": "Source/cursor.h",
    "chars": 782,
    "preview": "/**\r\n * @file cursor.h\r\n *\r\n * Interface of cursor tracking functionality.\r\n */\r\n#ifndef __CURSOR_H__\r\n#define __CURSOR_"
  },
  {
    "path": "Source/dead.cpp",
    "chars": 2269,
    "preview": "/**\r\n * @file dead.cpp\r\n *\r\n * Implementation of functions for placing dead monsters.\r\n */\r\n#include \"all.h\"\r\n\r\n/** unus"
  },
  {
    "path": "Source/dead.h",
    "chars": 302,
    "preview": "/**\r\n * @file dead.h\r\n *\r\n * Interface of functions for placing dead monsters.\r\n */\r\n#ifndef __DEAD_H__\r\n#define __DEAD_"
  },
  {
    "path": "Source/debug.cpp",
    "chars": 6574,
    "preview": "/**\r\n * @file debug.cpp\r\n *\r\n * Implementation of debug functions.\r\n */\r\n#include \"all.h\"\r\n\r\n#ifdef _DEBUG\r\nBOOL update_"
  },
  {
    "path": "Source/debug.h",
    "chars": 642,
    "preview": "/**\r\n * @file debug.h\r\n *\r\n * Interface of debug functions.\r\n */\r\n#ifndef __DEBUG_H__\r\n#define __DEBUG_H__\r\n\r\nextern BYT"
  },
  {
    "path": "Source/diablo.cpp",
    "chars": 48912,
    "preview": "/**\r\n * @file diablo.cpp\r\n *\r\n * Implementation of the main game initialization functions.\r\n */\r\n#include \"all.h\"\r\n#incl"
  },
  {
    "path": "Source/diablo.h",
    "chars": 1918,
    "preview": "/**\r\n * @file diablo.h\r\n *\r\n * Interface of the main game initialization functions.\r\n */\r\n#ifndef __DIABLO_H__\r\n#define "
  },
  {
    "path": "Source/doom.cpp",
    "chars": 2595,
    "preview": "/**\r\n * @file doom.cpp\r\n *\r\n * Implementation of the map of the stars quest.\r\n */\r\n#include \"all.h\"\r\n\r\nint doom_quest_ti"
  },
  {
    "path": "Source/doom.h",
    "chars": 259,
    "preview": "/**\r\n * @file doom.h\r\n *\r\n * Interface of the map of the stars quest.\r\n */\r\n#ifndef __DOOM_H__\r\n#define __DOOM_H__\r\n\r\nex"
  },
  {
    "path": "Source/drlg_l1.cpp",
    "chars": 72356,
    "preview": "/**\r\n * @file drlg_l1.cpp\r\n *\r\n * Implementation of the cathedral level generation algorithms.\r\n */\r\n#include \"all.h\"\r\n\r"
  },
  {
    "path": "Source/drlg_l1.h",
    "chars": 1006,
    "preview": "/**\r\n * @file drlg_l1.h\r\n *\r\n * Interface of the cathedral level generation algorithms.\r\n */\r\n#ifndef __DRLG_L1_H__\r\n#de"
  },
  {
    "path": "Source/drlg_l2.cpp",
    "chars": 72653,
    "preview": "/**\r\n * @file drlg_l2.cpp\r\n *\r\n * Implementation of the catacombs level generation algorithms.\r\n */\r\n#ifndef SPAWN\r\n#inc"
  },
  {
    "path": "Source/drlg_l2.h",
    "chars": 342,
    "preview": "/**\r\n * @file drlg_l2.h\r\n *\r\n * Interface of the catacombs level generation algorithms.\r\n */\r\n#ifndef __DRLG_L2_H__\r\n#de"
  },
  {
    "path": "Source/drlg_l3.cpp",
    "chars": 61629,
    "preview": "/**\r\n * @file drlg_l3.cpp\r\n *\r\n * Implementation of the caves level generation algorithms.\r\n */\r\n#ifndef SPAWN\r\n#include"
  },
  {
    "path": "Source/drlg_l3.h",
    "chars": 338,
    "preview": "/**\r\n * @file drlg_l3.h\r\n *\r\n * Interface of the caves level generation algorithms.\r\n */\r\n#ifndef __DRLG_L3_H__\r\n#define"
  },
  {
    "path": "Source/drlg_l4.cpp",
    "chars": 46743,
    "preview": "/**\r\n * @file drlg_l4.cpp\r\n *\r\n * Implementation of the hell level generation algorithms.\r\n */\r\n#include \"all.h\"\r\n\r\nint "
  },
  {
    "path": "Source/drlg_l4.h",
    "chars": 406,
    "preview": "/**\r\n * @file drlg_l4.h\r\n *\r\n * Interface of the hell level generation algorithms.\r\n */\r\n#ifndef __DRLG_L4_H__\r\n#define "
  },
  {
    "path": "Source/dthread.cpp",
    "chars": 3202,
    "preview": "/**\r\n * @file dthread.cpp\r\n *\r\n * Implementation of functions for updating game state from network commands.\r\n */\r\n#incl"
  },
  {
    "path": "Source/dthread.h",
    "chars": 357,
    "preview": "/**\r\n * @file dthread.h\r\n *\r\n * Interface of functions for updating game state from network commands.\r\n */\r\n#ifndef __DT"
  },
  {
    "path": "Source/dx.cpp",
    "chars": 7313,
    "preview": "/**\r\n * @file dx.cpp\r\n *\r\n * Implementation of functions setting up the graphics pipeline.\r\n */\r\n#include \"all.h\"\r\n#incl"
  },
  {
    "path": "Source/dx.h",
    "chars": 528,
    "preview": "/**\r\n * @file dx.h\r\n *\r\n * Interface of functions setting up the graphics pipeline.\r\n */\r\n#ifndef __DX_H__\r\n#define __DX"
  },
  {
    "path": "Source/effects.cpp",
    "chars": 80154,
    "preview": "/**\r\n * @file effects.cpp\r\n *\r\n * Implementation of functions for loading and playing sounds.\r\n */\r\n#include \"all.h\"\r\n#i"
  },
  {
    "path": "Source/effects.h",
    "chars": 603,
    "preview": "/**\r\n * @file effects.h\r\n *\r\n * Interface of functions for loading and playing sounds.\r\n */\r\n#ifndef __EFFECTS_H__\r\n#def"
  },
  {
    "path": "Source/encrypt.cpp",
    "chars": 3355,
    "preview": "/**\r\n * @file encrypt.cpp\r\n *\r\n * Implementation of functions for compression and decompressing MPQ data.\r\n */\r\n#include"
  },
  {
    "path": "Source/encrypt.h",
    "chars": 468,
    "preview": "/**\r\n * @file encrypt.h\r\n *\r\n * Interface of functions for compression and decompressing MPQ data.\r\n */\r\n#ifndef __ENCRY"
  },
  {
    "path": "Source/engine.cpp",
    "chars": 86323,
    "preview": "/**\r\n * @file engine.cpp\r\n *\r\n * Implementation of basic engine helper functions:\r\n * - Sprite blitting\r\n * - Drawing\r\n "
  },
  {
    "path": "Source/engine.h",
    "chars": 3901,
    "preview": "/**\r\n * @file engine.h\r\n *\r\n *  of basic engine helper functions:\r\n * - Sprite blitting\r\n * - Drawing\r\n * - Angle calcul"
  },
  {
    "path": "Source/error.cpp",
    "chars": 4265,
    "preview": "/**\r\n * @file error.cpp\r\n *\r\n * Implementation of in-game message functions.\r\n */\r\n#include \"all.h\"\r\n\r\nchar msgtable[MAX"
  },
  {
    "path": "Source/error.h",
    "chars": 269,
    "preview": "/**\r\n * @file error.h\r\n *\r\n * Interface of in-game message functions.\r\n */\r\n#ifndef __ERROR_H__\r\n#define __ERROR_H__\r\n\r\n"
  },
  {
    "path": "Source/fault.cpp",
    "chars": 8115,
    "preview": "/**\r\n * @file fault.cpp\r\n *\r\n * Implementation of exception logging functionality.\r\n */\r\n#include \"all.h\"\r\n\r\ntypedef str"
  },
  {
    "path": "Source/fault.h",
    "chars": 346,
    "preview": "/**\r\n * @file fault.h\r\n *\r\n * Interface of exception logging functionality.\r\n */\r\n#ifndef __FAULT_H__\r\n#define __FAULT_H"
  },
  {
    "path": "Source/gamemenu.cpp",
    "chars": 9327,
    "preview": "\r\n/**\r\n * @file gamemenu.cpp\r\n *\r\n * Implementation of the in-game menu functions.\r\n */\r\n#include \"all.h\"\r\n#include \"../"
  },
  {
    "path": "Source/gamemenu.h",
    "chars": 878,
    "preview": "/**\r\n * @file gamemenu.h\r\n *\r\n * Interface of the in-game menu functions.\r\n */\r\n#ifndef __GAMEMENU_H__\r\n#define __GAMEME"
  },
  {
    "path": "Source/gendung.cpp",
    "chars": 28430,
    "preview": "/**\r\n * @file gendung.cpp\r\n *\r\n * Implementation of general dungeon generation code.\r\n */\r\n#include \"all.h\"\r\n\r\n/** Conta"
  },
  {
    "path": "Source/gendung.h",
    "chars": 2605,
    "preview": "/**\r\n * @file gendung.h\r\n *\r\n * Interface of general dungeon generation code.\r\n */\r\n#ifndef __GENDUNG_H__\r\n#define __GEN"
  },
  {
    "path": "Source/gmenu.cpp",
    "chars": 9947,
    "preview": "/**\r\n * @file gmenu.cpp\r\n *\r\n * Implementation of the in-game navigation and interaction.\r\n */\r\n#include \"all.h\"\r\n\r\nBYTE"
  },
  {
    "path": "Source/gmenu.h",
    "chars": 687,
    "preview": "/**\r\n * @file gmenu.h\r\n *\r\n * Interface of the in-game navigation and interaction.\r\n */\r\n#ifndef __GMENU_H__\r\n#define __"
  },
  {
    "path": "Source/help.cpp",
    "chars": 22841,
    "preview": "/**\r\n * @file help.cpp\r\n *\r\n * Implementation of the in-game help text.\r\n */\r\n#include \"all.h\"\r\n\r\nint help_select_line;\r"
  },
  {
    "path": "Source/help.h",
    "chars": 268,
    "preview": "/**\r\n * @file help.h\r\n *\r\n * Interface of the in-game help text.\r\n */\r\n#ifndef __HELP_H__\r\n#define __HELP_H__\r\n\r\nextern "
  },
  {
    "path": "Source/init.cpp",
    "chars": 14261,
    "preview": "/**\r\n * @file init.cpp\r\n *\r\n * Implementation of routines for initializing the environment, disable screen saver, load M"
  },
  {
    "path": "Source/init.h",
    "chars": 767,
    "preview": "/**\r\n * @file init.h\r\n *\r\n * Interface of routines for initializing the environment, disable screen saver, load MPQ.\r\n *"
  },
  {
    "path": "Source/interfac.cpp",
    "chars": 11510,
    "preview": "/**\r\n * @file interfac.cpp\r\n *\r\n * Implementation of load screens.\r\n */\r\n#include \"all.h\"\r\n#include \"../3rdParty/Storm/S"
  },
  {
    "path": "Source/interfac.h",
    "chars": 235,
    "preview": "/**\r\n * @file interfac.h\r\n *\r\n * Interface of load screens.\r\n */\r\n#ifndef __INTERFAC_H__\r\n#define __INTERFAC_H__\r\n\r\nvoid"
  },
  {
    "path": "Source/inv.cpp",
    "chars": 85841,
    "preview": "/**\r\n * @file inv.cpp\r\n *\r\n * Implementation of player inventory.\r\n */\r\n#include \"all.h\"\r\n\r\nBOOL invflag;\r\nBYTE *pInvCel"
  },
  {
    "path": "Source/inv.h",
    "chars": 1667,
    "preview": "/**\r\n * @file inv.h\r\n *\r\n * Interface of player inventory.\r\n */\r\n#ifndef __INV_H__\r\n#define __INV_H__\r\n\r\nextern BOOL inv"
  },
  {
    "path": "Source/itemdat.cpp",
    "chars": 140066,
    "preview": "/**\r\n * @file itemdat.cpp\r\n *\r\n * Implementation of all item data.\r\n */\r\n#include \"all.h\"\r\n\r\n/** Contains the data relat"
  },
  {
    "path": "Source/itemdat.h",
    "chars": 299,
    "preview": "/**\r\n * @file itemdat.h\r\n *\r\n * Interface of all item data.\r\n */\r\n#ifndef __ITEMDAT_H__\r\n#define __ITEMDAT_H__\r\n\r\nextern"
  },
  {
    "path": "Source/items.cpp",
    "chars": 148418,
    "preview": "/**\r\n * @file items.cpp\r\n *\r\n * Implementation of item functionality.\r\n */\r\n#include \"all.h\"\r\n#ifdef HELLFIRE\r\n#include "
  },
  {
    "path": "Source/items.h",
    "chars": 4071,
    "preview": "/**\r\n * @file items.h\r\n *\r\n * Interface of item functionality.\r\n */\r\n#ifndef __ITEMS_H__\r\n#define __ITEMS_H__\r\n\r\nextern "
  },
  {
    "path": "Source/lighting.cpp",
    "chars": 34791,
    "preview": "/**\r\n * @file lighting.cpp\r\n *\r\n * Implementation of light and vision.\r\n */\r\n#include \"all.h\"\r\n\r\nLightListStruct VisionL"
  },
  {
    "path": "Source/lighting.h",
    "chars": 1469,
    "preview": "/**\r\n * @file lighting.h\r\n *\r\n * Interface of light and vision.\r\n */\r\n#ifndef __LIGHTING_H__\r\n#define __LIGHTING_H__\r\n\r\n"
  },
  {
    "path": "Source/list.h",
    "chars": 5553,
    "preview": "/**\r\n * @file list.h\r\n * Intrusive double-linked list implementation,\r\n * based on https://github.com/webcoyote/coho/blo"
  },
  {
    "path": "Source/loadsave.cpp",
    "chars": 16124,
    "preview": "/**\r\n * @file loadsave.cpp\r\n *\r\n * Implementation of save game functionality.\r\n */\r\n#include \"all.h\"\r\n\r\nBYTE *tbuff;\r\n\r\n"
  },
  {
    "path": "Source/loadsave.h",
    "chars": 246,
    "preview": "/**\r\n * @file loadsave.h\r\n *\r\n * Interface of save game functionality.\r\n */\r\n#ifndef __LOADSAVE_H__\r\n#define __LOADSAVE_"
  },
  {
    "path": "Source/logging.cpp",
    "chars": 5014,
    "preview": "/**\r\n * @file logging.cpp\r\n *\r\n * Implementation of logging functionality.\r\n */\r\n#include \"all.h\"\r\n#include \"../3rdParty"
  },
  {
    "path": "Source/logging.h",
    "chars": 432,
    "preview": "/**\r\n * @file logging.h\r\n *\r\n * Interface of logging functionality.\r\n */\r\n#ifndef __LOGGING_H__\r\n#define __LOGGING_H__\r\n"
  },
  {
    "path": "Source/mainmenu.cpp",
    "chars": 5536,
    "preview": "/**\r\n * @file mainmenu.cpp\r\n *\r\n * Implementation of functions for interacting with the main menu.\r\n */\r\n#include \"all.h"
  },
  {
    "path": "Source/mainmenu.h",
    "chars": 847,
    "preview": "/**\r\n * @file mainmenu.h\r\n *\r\n * Interface of functions for interacting with the main menu.\r\n */\r\n#ifndef __MAINMENU_H__"
  },
  {
    "path": "Source/minitext.cpp",
    "chars": 6870,
    "preview": "/**\r\n * @file minitext.cpp\r\n *\r\n * Implementation of scrolling dialog text.\r\n */\r\n#include \"all.h\"\r\n\r\n/** Current y posi"
  },
  {
    "path": "Source/minitext.h",
    "chars": 300,
    "preview": "/**\r\n * @file minitext.h\r\n *\r\n * Interface of scrolling dialog text.\r\n */\r\n#ifndef __MINITEXT_H__\r\n#define __MINITEXT_H_"
  },
  {
    "path": "Source/misdat.cpp",
    "chars": 38738,
    "preview": "/**\r\n * @file misdat.cpp\r\n *\r\n * Implementation of data related to missiles.\r\n */\r\n#include \"all.h\"\r\n\r\n/** Data related "
  },
  {
    "path": "Source/misdat.h",
    "chars": 221,
    "preview": "/**\r\n * @file misdat.h\r\n *\r\n * Interface of data related to missiles.\r\n */\r\n#ifndef __MISDAT_H__\r\n#define __MISDAT_H__\r\n"
  },
  {
    "path": "Source/missiles.cpp",
    "chars": 170987,
    "preview": "/**\r\n * @file missiles.cpp\r\n *\r\n * Implementation of missile functionality.\r\n */\r\n#include \"all.h\"\r\n\r\nint missileactive["
  },
  {
    "path": "Source/missiles.h",
    "chars": 11567,
    "preview": "/**\r\n * @file missiles.h\r\n *\r\n * Interface of missile functionality.\r\n */\r\n#ifndef __MISSILES_H__\r\n#define __MISSILES_H_"
  },
  {
    "path": "Source/monstdat.cpp",
    "chars": 127539,
    "preview": "/**\r\n * @file monstdat.cpp\r\n *\r\n * Implementation of all monster data.\r\n */\r\n#include \"all.h\"\r\n\r\n/** Contains the data r"
  },
  {
    "path": "Source/monstdat.h",
    "chars": 371,
    "preview": "/**\r\n * @file monstdat.h\r\n *\r\n * Interface of all monster data.\r\n */\r\n#ifndef __MONSTDAT_H__\r\n#define __MONSTDAT_H__\r\n\r\n"
  },
  {
    "path": "Source/monster.cpp",
    "chars": 174129,
    "preview": "/**\r\n * @file monster.cpp\r\n *\r\n * Implementation of monster functionality, AI, actions, spawning, loading, etc.\r\n */\r\n#i"
  },
  {
    "path": "Source/monster.h",
    "chars": 3921,
    "preview": "/**\r\n * @file monster.h\r\n *\r\n * Interface of monster functionality, AI, actions, spawning, loading, etc.\r\n */\r\n#ifndef _"
  },
  {
    "path": "Source/movie.cpp",
    "chars": 1815,
    "preview": "/**\r\n * @file movie.cpp\r\n *\r\n * Implementation of video playback.\r\n */\r\n#include \"all.h\"\r\n#include \"../3rdParty/Storm/So"
  },
  {
    "path": "Source/movie.h",
    "chars": 309,
    "preview": "/**\r\n * @file movie.h\r\n *\r\n * Interface of video playback.\r\n */\r\n#ifndef __MOVIE_H__\r\n#define __MOVIE_H__\r\n\r\nextern BOOL"
  },
  {
    "path": "Source/mpqapi.cpp",
    "chars": 17159,
    "preview": "/**\r\n * @file mpqapi.cpp\r\n *\r\n * Implementation of functions for creating and editing MPQ files.\r\n */\r\n#include \"all.h\"\r"
  },
  {
    "path": "Source/mpqapi.h",
    "chars": 666,
    "preview": "/**\r\n * @file mpqapi.h\r\n *\r\n * Interface of functions for creating and editing MPQ files.\r\n */\r\n#ifndef __MPQAPI_H__\r\n#d"
  },
  {
    "path": "Source/msg.cpp",
    "chars": 70793,
    "preview": "/**\r\n * @file msg.cpp\r\n *\r\n * Implementation of function for sending and reciving network messages.\r\n */\r\n#include \"all."
  },
  {
    "path": "Source/msg.h",
    "chars": 2016,
    "preview": "/**\r\n * @file msg.h\r\n *\r\n * Interface of function for sending and reciving network messages.\r\n */\r\n#ifndef __MSG_H__\r\n#d"
  },
  {
    "path": "Source/msgcmd.cpp",
    "chars": 1902,
    "preview": "/**\r\n * @file msgcmd.cpp\r\n *\r\n * Functions for sending commands to Battle.net.\r\n *\r\n * See http://classic.battle.net/inf"
  },
  {
    "path": "Source/msgcmd.h",
    "chars": 401,
    "preview": "/**\r\n * @file msgcmd.h\r\n *\r\n * Interface for sending commands to Battle.net.\r\n *\r\n * See http://classic.battle.net/info/"
  },
  {
    "path": "Source/multi.cpp",
    "chars": 24587,
    "preview": "/**\r\n * @file multi.cpp\r\n *\r\n * Implementation of functions for keeping multiplaye games in sync.\r\n */\r\n#include \"all.h\""
  },
  {
    "path": "Source/multi.h",
    "chars": 1316,
    "preview": "/**\r\n * @file multi.h\r\n *\r\n * Interface of functions for keeping multiplayer games in sync.\r\n */\r\n#ifndef __MULTI_H__\r\n#"
  },
  {
    "path": "Source/nthread.cpp",
    "chars": 5843,
    "preview": "/**\r\n * @file nthread.cpp\r\n *\r\n * Implementation of functions for managing game ticks.\r\n */\r\n#include \"all.h\"\r\n#include "
  },
  {
    "path": "Source/nthread.h",
    "chars": 781,
    "preview": "/**\r\n * @file nthread.h\r\n *\r\n * Interface of functions for managing game ticks.\r\n */\r\n#ifndef __NTHREAD_H__\r\n#define __N"
  },
  {
    "path": "Source/objdat.cpp",
    "chars": 24830,
    "preview": "/**\r\n * @file objdat.cpp\r\n *\r\n * Implementation of all object data.\r\n */\r\n#include \"all.h\"\r\n\r\n/** Maps from dun_object_i"
  },
  {
    "path": "Source/objdat.h",
    "chars": 344,
    "preview": "/**\r\n * @file objdat.h\r\n *\r\n * Interface of all object data.\r\n */\r\n#ifndef __OBJDAT_H__\r\n#define __OBJDAT_H__\r\n\r\nextern "
  },
  {
    "path": "Source/objects.cpp",
    "chars": 135249,
    "preview": "/**\r\n * @file objects.cpp\r\n *\r\n * Implementation of object functionality, interaction, spawning, loading, etc.\r\n */\r\n#in"
  },
  {
    "path": "Source/objects.h",
    "chars": 1665,
    "preview": "/**\r\n * @file objects.h\r\n *\r\n * Interface of object functionality, interaction, spawning, loading, etc.\r\n */\r\n#ifndef __"
  },
  {
    "path": "Source/pack.cpp",
    "chars": 8173,
    "preview": "/**\r\n * @file pack.cpp\r\n *\r\n * Implementation of functions for minifying player data structure.\r\n */\r\n#include \"all.h\"\r\n"
  },
  {
    "path": "Source/pack.h",
    "chars": 498,
    "preview": "/**\r\n * @file pack.h\r\n *\r\n * Interface of functions for minifying player data structure.\r\n */\r\n#ifndef __PACK_H__\r\n#defi"
  },
  {
    "path": "Source/palette.cpp",
    "chars": 9179,
    "preview": "/**\r\n * @file palette.cpp\r\n *\r\n * Implementation of functions for handling the engines color palette.\r\n */\r\n#include \"al"
  },
  {
    "path": "Source/palette.h",
    "chars": 775,
    "preview": "/**\r\n * @file palette.h\r\n *\r\n * Interface of functions for handling the engines color palette.\r\n */\r\n#ifndef __PALETTE_H"
  },
  {
    "path": "Source/path.cpp",
    "chars": 9962,
    "preview": "/**\r\n * @file path.cpp\r\n *\r\n * Implementation of the path finding algorithms.\r\n */\r\n#include \"all.h\"\r\n\r\n/** Notes visist"
  },
  {
    "path": "Source/path.h",
    "chars": 772,
    "preview": "/**\r\n * @file path.h\r\n *\r\n * Interface of the path finding algorithms.\r\n */\r\n#ifndef __PATH_H__\r\n#define __PATH_H__\r\n\r\ni"
  },
  {
    "path": "Source/pfile.cpp",
    "chars": 21537,
    "preview": "/**\r\n * @file pfile.cpp\r\n *\r\n * Implementation of the save game encoding functionality.\r\n */\r\n#include \"all.h\"\r\n#include"
  },
  {
    "path": "Source/pfile.h",
    "chars": 1382,
    "preview": "/**\r\n * @file pfile.h\r\n *\r\n * Interface of the save game encoding functionality.\r\n */\r\n#ifndef __PFILE_H__\r\n#define __PF"
  },
  {
    "path": "Source/player.cpp",
    "chars": 124472,
    "preview": "/**\r\n * @file player.cpp\r\n *\r\n * Implementation of player functionality, leveling, actions, creation, loading, etc.\r\n */"
  },
  {
    "path": "Source/player.h",
    "chars": 2780,
    "preview": "/**\r\n * @file player.h\r\n *\r\n * Interface of player functionality, leveling, actions, creation, loading, etc.\r\n */\r\n#ifnd"
  },
  {
    "path": "Source/plrmsg.cpp",
    "chars": 3281,
    "preview": "/**\r\n * @file plrmsg.cpp\r\n *\r\n * Implementation of functionality for printing the ingame chat messages.\r\n */\r\n#include \""
  },
  {
    "path": "Source/plrmsg.h",
    "chars": 490,
    "preview": "/**\r\n * @file plrmsg.h\r\n *\r\n * Interface of functionality for printing the ingame chat messages.\r\n */\r\n#ifndef __PLRMSG_"
  },
  {
    "path": "Source/portal.cpp",
    "chars": 3784,
    "preview": "/**\r\n * @file portal.cpp\r\n *\r\n * Implementation of functionality for handling town portals.\r\n */\r\n#include \"all.h\"\r\n\r\n/*"
  },
  {
    "path": "Source/portal.h",
    "chars": 686,
    "preview": "/**\r\n * @file portal.h\r\n *\r\n * Interface of functionality for handling town portals.\r\n */\r\n#ifndef __PORTAL_H__\r\n#define"
  },
  {
    "path": "Source/quests.cpp",
    "chars": 27549,
    "preview": "/**\r\n * @file quests.cpp\r\n *\r\n * Implementation of functionality for handling quests.\r\n */\r\n#include \"all.h\"\r\n\r\nint qtop"
  },
  {
    "path": "Source/quests.h",
    "chars": 846,
    "preview": "/**\r\n * @file quests.cpp\r\n *\r\n * Interface of functionality for handling quests.\r\n */\r\n#ifndef __QUESTS_H__\r\n#define __Q"
  },
  {
    "path": "Source/render.cpp",
    "chars": 123377,
    "preview": "/**\r\n * @file render.cpp\r\n *\r\n * Implementation of functionality for rendering the level tiles.\r\n */\r\n#include \"all.h\"\r\n"
  },
  {
    "path": "Source/render.h",
    "chars": 574,
    "preview": "/**\r\n * @file render.h\r\n *\r\n * Interface of functionality for rendering the level tiles.\r\n */\r\n#ifndef __RENDER_H__\r\n#de"
  },
  {
    "path": "Source/restrict.cpp",
    "chars": 1658,
    "preview": "/**\r\n * @file restrict.cpp\r\n *\r\n * Implementation of functionality for checking if the game will be able run on the syst"
  },
  {
    "path": "Source/restrict.h",
    "chars": 250,
    "preview": "/**\r\n * @file restrict.h\r\n *\r\n * Interface of functionality for checking if the game will be able run on the system.\r\n *"
  }
]

// ... and 52 more files (download for full content)

About this extraction

This page contains the full source code of the diasurgical/devilution GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 252 files (4.1 MB), approximately 1.1M tokens, and a symbol index with 2678 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!