mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Compare commits
317
Commits
v2
...
prevActiveMerc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58c134bd8e | ||
|
|
f902b01497 | ||
|
|
0bbb01ae87 | ||
|
|
4cb1ebac88 | ||
|
|
264105071a | ||
|
|
9ce1492651 | ||
|
|
7499daf06a | ||
|
|
1e1eb88864 | ||
|
|
72e586a378 | ||
|
|
07dbf9c848 | ||
|
|
b19efcf1b4 | ||
|
|
332b267ae6 | ||
|
|
584f6b47e6 | ||
|
|
219cc6f88d | ||
|
|
8257f2c9df | ||
|
|
c6fd81d289 | ||
|
|
d98de9e793 | ||
|
|
049981b35f | ||
|
|
1088ffc5b2 | ||
|
|
3d29eff4d8 | ||
|
|
0dd32c4670 | ||
|
|
fee56e37e7 | ||
|
|
d79a445ad1 | ||
|
|
b1ccdf4e38 | ||
|
|
3af3b3fbbc | ||
|
|
86ec94b40a | ||
|
|
395c18c557 | ||
|
|
2eff78a2cf | ||
|
|
3d95c47356 | ||
|
|
0ebcf0fa06 | ||
|
|
d6166000c9 | ||
|
|
08b8d2f04f | ||
|
|
ba2e69d045 | ||
|
|
c9cf34d608 | ||
|
|
be109b71fa | ||
|
|
690d9e1336 | ||
|
|
3c87ae2724 | ||
|
|
f6ae1a96cd | ||
|
|
6c96b80afc | ||
|
|
00b5758af1 | ||
|
|
72ab9b0135 | ||
|
|
92813f5ce1 | ||
|
|
da83c6a557 | ||
|
|
a9dd9d0ca6 | ||
|
|
710941edd3 | ||
|
|
0b0fffa21d | ||
|
|
e1acf181df | ||
|
|
0f8c14e72e | ||
|
|
ecea18f57c | ||
|
|
e63e936715 | ||
|
|
a15ed3aceb | ||
|
|
0cb13650ed | ||
|
|
601ef4dc30 | ||
|
|
8fa2189a66 | ||
|
|
cf6cc2a213 | ||
|
|
fb34eb6776 | ||
|
|
35984f57d0 | ||
|
|
6c42f222e1 | ||
|
|
e8aedb29d5 | ||
|
|
ffe987061e | ||
|
|
1f6e545a39 | ||
|
|
2b9efd3702 | ||
|
|
f5a7c32bff | ||
|
|
e14a337e03 | ||
|
|
d21b487884 | ||
|
|
a161dcc509 | ||
|
|
f3b99edbff | ||
|
|
f47908e033 | ||
|
|
f52ab32952 | ||
|
|
82aca548f5 | ||
|
|
4ec012ce7b | ||
|
|
ac59eba898 | ||
|
|
216cd78b18 | ||
|
|
7d9cd87da8 | ||
|
|
e5d25810f6 | ||
|
|
5d3cc7969f | ||
|
|
272ba56fa1 | ||
|
|
1004ab6c8c | ||
|
|
3c44f133fd | ||
|
|
ed00830202 | ||
|
|
e9b12908f7 | ||
|
|
e8399bb7c8 | ||
|
|
11202d7e7e | ||
|
|
616d9a08e6 | ||
|
|
f3194718e4 | ||
|
|
fd9611ae04 | ||
|
|
c62d767622 | ||
|
|
b7bfd8a2eb | ||
|
|
c78f8faefc | ||
|
|
63f614f957 | ||
|
|
d078a3439f | ||
|
|
9b83d6a3bc | ||
|
|
9ff8476c15 | ||
|
|
6a9df9f22c | ||
|
|
56dc0088b6 | ||
|
|
c3a34a660d | ||
|
|
1074e9c408 | ||
|
|
4537f5d4dc | ||
|
|
4ae331c19e | ||
|
|
b85380c958 | ||
|
|
eb3f62c3d5 | ||
|
|
8644e5f8b9 | ||
|
|
872a356e82 | ||
|
|
7bb7c54317 | ||
|
|
49a56d01ac | ||
|
|
9d1e9e8948 | ||
|
|
b3b3270e1e | ||
|
|
1a8db5d15b | ||
|
|
09ce332721 | ||
|
|
5e2c61ef12 | ||
|
|
4d948fda06 | ||
|
|
2ae110971b | ||
|
|
9a78e7dfa0 | ||
|
|
d95bae2bf6 | ||
|
|
a1bb85ca95 | ||
|
|
d9391de58a | ||
|
|
c02bbc90cb | ||
|
|
efb54202ea | ||
|
|
11caa6529c | ||
|
|
e2f296c42c | ||
|
|
ee2807ae64 | ||
|
|
b23c9ac8b1 | ||
|
|
fa0c5a2862 | ||
|
|
db6da100e1 | ||
|
|
a3e7ce5794 | ||
|
|
5062ae74f2 | ||
|
|
dd58f904f4 | ||
|
|
8dcb431ef2 | ||
|
|
5f45d06852 | ||
|
|
92103e36a6 | ||
|
|
8f98a9b985 | ||
|
|
c2e78d0461 | ||
|
|
36a84ffe59 | ||
|
|
865288e622 | ||
|
|
3e45217a9a | ||
|
|
da3c3bace8 | ||
|
|
ec4dc8b058 | ||
|
|
07320ba996 | ||
|
|
20a33893d9 | ||
|
|
ffccdfa654 | ||
|
|
abe6877d90 | ||
|
|
d0dbb9afb1 | ||
|
|
1013531a7f | ||
|
|
bfb724eab9 | ||
|
|
e59d915e58 | ||
|
|
4e8c5fa9ab | ||
|
|
de56f653ec | ||
|
|
79b57c326e | ||
|
|
c2b1ac0109 | ||
|
|
2eb16c583c | ||
|
|
5bbbec18bb | ||
|
|
66f5156f03 | ||
|
|
4645a09722 | ||
|
|
d244ef4c91 | ||
|
|
24656f2810 | ||
|
|
d960403514 | ||
|
|
0d97e36c34 | ||
|
|
1ac5d153fb | ||
|
|
d687956cf1 | ||
|
|
94f2e830e0 | ||
|
|
67c8081104 | ||
|
|
0dc2ceabb2 | ||
|
|
1ec2867ced | ||
|
|
a9120ef984 | ||
|
|
a50a6de1b5 | ||
|
|
845d784bff | ||
|
|
99703fa8b6 | ||
|
|
58bfffff55 | ||
|
|
7fffcd295c | ||
|
|
65a8b4fd77 | ||
|
|
9d0ec49e88 | ||
|
|
29354135dc | ||
|
|
63fe0be512 | ||
|
|
3f4c94642e | ||
|
|
8856813768 | ||
|
|
dbc4135974 | ||
|
|
d826491c83 | ||
|
|
bb1c63d4e8 | ||
|
|
8e4307b2fb | ||
|
|
e4fe066da0 | ||
|
|
cabb50a361 | ||
|
|
cebd20f5d0 | ||
|
|
aee7c23aa4 | ||
|
|
c7e654a1d9 | ||
|
|
235ddfa782 | ||
|
|
a670aff29c | ||
|
|
2a52347198 | ||
|
|
648a50f1e8 | ||
|
|
698176e841 | ||
|
|
8b90c84738 | ||
|
|
be5c4b1601 | ||
|
|
534ce662f3 | ||
|
|
ff638a5473 | ||
|
|
5b4be9bcdb | ||
|
|
3f448a62fb | ||
|
|
18673f3a29 | ||
|
|
47824c97a1 | ||
|
|
65c4cdd1d7 | ||
|
|
191af4da49 | ||
|
|
94a5972a85 | ||
|
|
1e16de30d7 | ||
|
|
b718b463c2 | ||
|
|
327046925b | ||
|
|
df01708ac3 | ||
|
|
2387667a23 | ||
|
|
883ceb2f6f | ||
|
|
924ccd8815 | ||
|
|
9bbec030d8 | ||
|
|
bc01bdb56d | ||
|
|
cd83fac928 | ||
|
|
e9e8080077 | ||
|
|
9fb29cf444 | ||
|
|
ca1112313a | ||
|
|
dd2c6f44b2 | ||
|
|
38b710343a | ||
|
|
3ddc4c2bbd | ||
|
|
d2388c76b8 | ||
|
|
07420ce245 | ||
|
|
e62684f0e1 | ||
|
|
c75f57785e | ||
|
|
66bd1e41c2 | ||
|
|
fa56a7ad6d | ||
|
|
f49013307f | ||
|
|
657097aa54 | ||
|
|
b74ccf3ddc | ||
|
|
d149b6ffea | ||
|
|
ef9aa1b027 | ||
|
|
b6e8b0c5ff | ||
|
|
b9641d4c90 | ||
|
|
f50bdf99cc | ||
|
|
9532fbfe2c | ||
|
|
74d752d452 | ||
|
|
06936b71c9 | ||
|
|
e9a13e12d8 | ||
|
|
9acf994952 | ||
|
|
9d62b9a37a | ||
|
|
2e92da4e12 | ||
|
|
f39078357b | ||
|
|
2e147d4bd7 | ||
|
|
274be524e6 | ||
|
|
34f0b40f93 | ||
|
|
f58cf588a6 | ||
|
|
30e6b9008c | ||
|
|
ab94d33bec | ||
|
|
3fe6e4f3d8 | ||
|
|
3e1c87f53c | ||
|
|
cbf53f8848 | ||
|
|
f0be44bb42 | ||
|
|
61c5a41bea | ||
|
|
c475f9e4e6 | ||
|
|
2918801f75 | ||
|
|
42d5ecb923 | ||
|
|
cd720a639a | ||
|
|
d28d46d974 | ||
|
|
edb26a68fe | ||
|
|
e7fe1d1cda | ||
|
|
3ff4cc0c19 | ||
|
|
98c18495c6 | ||
|
|
41fc407de6 | ||
|
|
23af6b6f3f | ||
|
|
b112d39fe2 | ||
|
|
419b0c794d | ||
|
|
8ef7fb5ae4 | ||
|
|
153d402065 | ||
|
|
75deccbc44 | ||
|
|
566ead5815 | ||
|
|
f823cb9718 | ||
|
|
5de6f77f2e | ||
|
|
1a172427ef | ||
|
|
8346d5bfa1 | ||
|
|
131172e41a | ||
|
|
ee429fd1f4 | ||
|
|
9079f2e0c1 | ||
|
|
ecb29ae9bc | ||
|
|
83b3485e58 | ||
|
|
b98732daa7 | ||
|
|
e9c8124dc2 | ||
|
|
cba88ab2bc | ||
|
|
337cf1804f | ||
|
|
1c631cb85f | ||
|
|
b9deb3cc19 | ||
|
|
d07dcf477a | ||
|
|
0def972901 | ||
|
|
735075869c | ||
|
|
6a0d02e9b9 | ||
|
|
568aa0a0b8 | ||
|
|
1327d186ed | ||
|
|
c04cc4cfcc | ||
|
|
1345d92521 | ||
|
|
0103a871cc | ||
|
|
f5b1447646 | ||
|
|
4d740055da | ||
|
|
aad6ed8297 | ||
|
|
d6370b7463 | ||
|
|
3c2592881f | ||
|
|
6c33009fab | ||
|
|
fcf2b27d1a | ||
|
|
040410b450 | ||
|
|
0089e0a640 | ||
|
|
d9edc9362b | ||
|
|
508310be3e | ||
|
|
5cf0ef4bde | ||
|
|
fdd6859726 | ||
|
|
2b024d63c6 | ||
|
|
a81820d0d7 | ||
|
|
f99065d0c6 | ||
|
|
bc870123bf | ||
|
|
17875978e0 | ||
|
|
4e253d0ec0 | ||
|
|
10250dc035 | ||
|
|
06918d7585 | ||
|
|
57cc888cd7 | ||
|
|
9ac53cac32 | ||
|
|
9fb4ef8607 | ||
|
|
03482ffc3d | ||
|
|
5c13170424 | ||
|
|
1f0a8f46e8 |
@@ -200,6 +200,7 @@ jobs:
|
|||||||
git push --delete origin refs/tags/latest || true
|
git push --delete origin refs/tags/latest || true
|
||||||
git tag latest
|
git tag latest
|
||||||
git push --force origin refs/tags/latest
|
git push --force origin refs/tags/latest
|
||||||
|
sleep 15 # make sure github can find the tag for gh release
|
||||||
gh release create latest ../dist/* \
|
gh release create latest ../dist/* \
|
||||||
--generate-notes \
|
--generate-notes \
|
||||||
--title "Latest (unstable)" \
|
--title "Latest (unstable)" \
|
||||||
|
|||||||
@@ -54,16 +54,6 @@ jobs:
|
|||||||
sed -i "s|@Build@|${GAME_BUILD:0:255}|" Ja2/GameVersion.cpp
|
sed -i "s|@Build@|${GAME_BUILD:0:255}|" Ja2/GameVersion.cpp
|
||||||
cat Ja2/GameVersion.cpp
|
cat Ja2/GameVersion.cpp
|
||||||
|
|
||||||
- name: Turn on link-time optimization?
|
|
||||||
if: fromJSON(inputs.assemble)
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
echo "
|
|
||||||
LTO=ON
|
|
||||||
" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Prepare build properties
|
- name: Prepare build properties
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -87,7 +77,7 @@ jobs:
|
|||||||
arch: x86
|
arch: x86
|
||||||
- name: Prepare build
|
- name: Prepare build
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DLanguages="$Env:JA2Language" -DApplications="$Env:JA2Application" -DLTO_OPTION="$Env:LTO"
|
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DLanguages="$Env:JA2Language" -DApplications="$Env:JA2Application"
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cmake --build build/ -- -v
|
cmake --build build/ -- -v
|
||||||
|
|||||||
+2
-3
@@ -49,11 +49,10 @@ include_directories(
|
|||||||
"${CMAKE_SOURCE_DIR}/Strategic"
|
"${CMAKE_SOURCE_DIR}/Strategic"
|
||||||
"${CMAKE_SOURCE_DIR}/sgp"
|
"${CMAKE_SOURCE_DIR}/sgp"
|
||||||
"${CMAKE_SOURCE_DIR}/Ja2/Res"
|
"${CMAKE_SOURCE_DIR}/Ja2/Res"
|
||||||
"${CMAKE_SOURCE_DIR}/Lua"
|
"${CMAKE_SOURCE_DIR}/lua"
|
||||||
"${CMAKE_SOURCE_DIR}/Laptop"
|
"${CMAKE_SOURCE_DIR}/Laptop"
|
||||||
"${CMAKE_SOURCE_DIR}/Multiplayer"
|
"${CMAKE_SOURCE_DIR}/Multiplayer"
|
||||||
"${CMAKE_SOURCE_DIR}/Editor"
|
"${CMAKE_SOURCE_DIR}/Editor"
|
||||||
"${CMAKE_SOURCE_DIR}/Console"
|
|
||||||
"${CMAKE_SOURCE_DIR}/i18n/include"
|
"${CMAKE_SOURCE_DIR}/i18n/include"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -88,7 +87,6 @@ wine
|
|||||||
|
|
||||||
# static libraries whose translation units rely on Application preprocessor definitions.
|
# static libraries whose translation units rely on Application preprocessor definitions.
|
||||||
set(Ja2_Libs
|
set(Ja2_Libs
|
||||||
Console
|
|
||||||
Editor
|
Editor
|
||||||
Ja2
|
Ja2
|
||||||
Laptop
|
Laptop
|
||||||
@@ -147,6 +145,7 @@ foreach(app IN LISTS ApplicationTargets)
|
|||||||
)
|
)
|
||||||
target_link_libraries(${exe} PRIVATE ${Ja2_Libraries} $<IF:${usingMsBuild},legacy_stdio_definitions.lib,>)
|
target_link_libraries(${exe} PRIVATE ${Ja2_Libraries} $<IF:${usingMsBuild},legacy_stdio_definitions.lib,>)
|
||||||
target_link_options(${exe} PRIVATE $<IF:${usingMsBuild},/SAFESEH:NO,>)
|
target_link_options(${exe} PRIVATE $<IF:${usingMsBuild},/SAFESEH:NO,>)
|
||||||
|
target_compile_definitions(${exe} PRIVATE ${compilationFlags} ${debugFlags})
|
||||||
|
|
||||||
# language library for an application, e.g. JA2MAPEDITOR_ENGLISH_i18n
|
# language library for an application, e.g. JA2MAPEDITOR_ENGLISH_i18n
|
||||||
set(language_library ${exe}_i18n)
|
set(language_library ${exe}_i18n)
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
set(ConsoleSrc
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Console.cpp"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Cursors.cpp"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Dialogs.cpp"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/FileStream.cpp"
|
|
||||||
PARENT_SCOPE)
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
||||||
// All rights reserved
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
||||||
// I'll try to keep a version up to date. I can be reached as follows:
|
|
||||||
// marko.bozikovic@alterbox.net
|
|
||||||
// bozho@kset.org
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _COMBSTROUT_H_
|
|
||||||
#define _COMBSTROUT_H_
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CComBSTROut - a class that inherits from CComBSTR and adds Out() method
|
|
||||||
// that should be used instead of & operator for 'out'
|
|
||||||
// function parameters
|
|
||||||
|
|
||||||
class CComBSTROut : public CComBSTR
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
CComBSTROut()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
/*explicit*/ CComBSTROut(int nSize) : CComBSTR(nSize)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
/*explicit*/ CComBSTROut(int nSize, LPCOLESTR sz) : CComBSTR(nSize, sz)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
/*explicit*/ CComBSTROut(LPCOLESTR pSrc) : CComBSTR(pSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
/*explicit*/ CComBSTROut(const CComBSTROut& src) : CComBSTR(src)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
/*explicit*/ CComBSTROut(REFGUID src) : CComBSTR(src)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef OLE2ANSI
|
|
||||||
CComBSTROut(LPCSTR pSrc) : CComBSTR(pSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CComBSTROut(int nSize, LPCSTR sz) : CComBSTR(nSize, sz)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
~CComBSTROut()
|
|
||||||
{
|
|
||||||
CComBSTR::~CComBSTR();
|
|
||||||
}
|
|
||||||
|
|
||||||
BSTR* Out()
|
|
||||||
{
|
|
||||||
Empty();
|
|
||||||
return &m_str;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _COMBSTROUT_H_
|
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
||||||
// All rights reserved
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
||||||
// I'll try to keep a version up to date. I can be reached as follows:
|
|
||||||
// marko.bozikovic@alterbox.net
|
|
||||||
// bozho@kset.org
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _COMVARIANTOUT_H_
|
|
||||||
#define _COMVARIANTOUT_H_
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CComVariantOut - a class that inherits from CComVariant and adds Out()
|
|
||||||
// method that should be used instead of & operator for
|
|
||||||
// 'out' function parameters
|
|
||||||
|
|
||||||
class CComVariantOut : public CComVariant
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
CComVariantOut()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
~CComVariantOut()
|
|
||||||
{
|
|
||||||
CComVariant::~CComVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
CComVariantOut(const VARIANT& varSrc) : CComVariant(varSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CComVariantOut(const CComVariant& varSrc) : CComVariant(varSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CComVariantOut(BSTR bstrSrc) : CComVariant(bstrSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CComVariantOut(LPCOLESTR lpszSrc) : CComVariant(lpszSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef OLE2ANSI
|
|
||||||
CComVariantOut(LPCSTR lpszSrc) : CComVariant(lpszSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CComVariantOut(bool bSrc) : CComVariant(bSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CComVariantOut(int nSrc) : CComVariant(nSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CComVariantOut(BYTE nSrc) : CComVariant(nSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CComVariantOut(short nSrc) : CComVariant(nSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CComVariantOut(long nSrc, VARTYPE m_varSrc = VT_I4) : CComVariant(nSrc, m_varSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CComVariantOut(float fltSrc) : CComVariant(fltSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CComVariantOut(double dblSrc) : CComVariant(dblSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CComVariantOut(CY cySrc) : CComVariant(cySrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CComVariantOut(IDispatch* pSrc) : CComVariant(pSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CComVariantOut(IUnknown* pSrc) : CComVariant(pSrc)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
VARIANT* Out()
|
|
||||||
{
|
|
||||||
Clear();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _COMVARIANTOUT_H_
|
|
||||||
-2876
File diff suppressed because it is too large
Load Diff
@@ -1,746 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
||||||
// All rights reserved
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
||||||
// I'll try to keep a version up to date. I can be reached as follows:
|
|
||||||
// marko.bozikovic@alterbox.net
|
|
||||||
// bozho@kset.org
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Console.h - console class declaration
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//#include "include/FreeImagePlus.h"
|
|
||||||
|
|
||||||
typedef basic_string<TCHAR> tstring;
|
|
||||||
|
|
||||||
#define WM_INPUTREADY WM_USER + 1
|
|
||||||
|
|
||||||
// tray icon message
|
|
||||||
#define WM_TRAY_NOTIFY WM_USER + 0x123
|
|
||||||
|
|
||||||
#define TRAY_ICON_ID 1
|
|
||||||
|
|
||||||
// timer #defines
|
|
||||||
#define TIMER_REPAINT_CHANGE 42 // timer that is started after there
|
|
||||||
// were some changes in the console
|
|
||||||
|
|
||||||
#define TIMER_REPAINT_MASTER 43 // master timer (needed to repaint
|
|
||||||
// for some DOS programs, can be
|
|
||||||
// disabled for lower CPU usage)
|
|
||||||
|
|
||||||
#define TIMER_SHOW_HIDE_CONSOLE 100 // used to hide console window when
|
|
||||||
// starting shell process after a
|
|
||||||
// defined period of time (some
|
|
||||||
// shells, like 4NT need console
|
|
||||||
// window visible during startup for
|
|
||||||
// all init options to work properly
|
|
||||||
|
|
||||||
// transparency #defines
|
|
||||||
#define TRANSPARENCY_NONE 0
|
|
||||||
#define TRANSPARENCY_ALPHA 1
|
|
||||||
#define TRANSPARENCY_COLORKEY 2
|
|
||||||
#define TRANSPARENCY_FAKE 3
|
|
||||||
|
|
||||||
// cusror style #defines
|
|
||||||
#define CURSOR_STYLE_NONE 0
|
|
||||||
#define CURSOR_STYLE_XTERM 1
|
|
||||||
#define CURSOR_STYLE_BLOCK 2
|
|
||||||
#define CURSOR_STYLE_NBBLOCK 3
|
|
||||||
#define CURSOR_STYLE_PULSEBLOCK 4
|
|
||||||
#define CURSOR_STYLE_BAR 5
|
|
||||||
#define CURSOR_STYLE_CONSOLE 6
|
|
||||||
#define CURSOR_STYLE_NBHLINE 7
|
|
||||||
#define CURSOR_STYLE_HLINE 8
|
|
||||||
#define CURSOR_STYLE_VLINE 9
|
|
||||||
#define CURSOR_STYLE_RECT 10
|
|
||||||
#define CURSOR_STYLE_NBRECT 11
|
|
||||||
#define CURSOR_STYLE_PULSERECT 12
|
|
||||||
#define CURSOR_STYLE_FADEBLOCK 13
|
|
||||||
|
|
||||||
// docking #defines
|
|
||||||
#define DOCK_NONE 0
|
|
||||||
#define DOCK_TOP_LEFT 1
|
|
||||||
#define DOCK_TOP_RIGHT 2
|
|
||||||
#define DOCK_BOTTOM_RIGHT 3
|
|
||||||
#define DOCK_BOTTOM_LEFT 4
|
|
||||||
|
|
||||||
// Z-order #defines
|
|
||||||
#define Z_ORDER_REGULAR 0
|
|
||||||
#define Z_ORDER_ONTOP 1
|
|
||||||
#define Z_ORDER_ONBOTTOM 2
|
|
||||||
|
|
||||||
// window border defines
|
|
||||||
#define BORDER_NONE 0
|
|
||||||
#define BORDER_REGULAR 1
|
|
||||||
#define BORDER_THIN 2
|
|
||||||
|
|
||||||
// window background style
|
|
||||||
#define BACKGROUND_STYLE_RESIZE 0
|
|
||||||
#define BACKGROUND_STYLE_CENTER 1
|
|
||||||
#define BACKGROUND_STYLE_TILE 2
|
|
||||||
|
|
||||||
// taskbar button defines
|
|
||||||
#define TASKBAR_BUTTON_NORMAL 0
|
|
||||||
#define TASKBAR_BUTTON_HIDE 1
|
|
||||||
#define TASKBAR_BUTTON_TRAY 2
|
|
||||||
|
|
||||||
// new configuration auto-reload defines
|
|
||||||
#define RELOAD_NEW_CONFIG_PROMPT 0
|
|
||||||
#define RELOAD_NEW_CONFIG_YES 1
|
|
||||||
#define RELOAD_NEW_CONFIG_NO 2
|
|
||||||
|
|
||||||
#define TEXT_SELECTION_NONE 0
|
|
||||||
#define TEXT_SELECTION_SELECTING 1
|
|
||||||
#define TEXT_SELECTION_SELECTED 2
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Console class
|
|
||||||
|
|
||||||
class Console {
|
|
||||||
public: // ctor/dtor
|
|
||||||
|
|
||||||
Console(LPCTSTR szConfigFile, LPCTSTR szShellCmdLine, LPCTSTR szConsoleTitle, LPCTSTR pszReloadNewConfig);
|
|
||||||
~Console();
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// creates and shows Console window
|
|
||||||
BOOL Create(HWND notify);
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
////////////////////
|
|
||||||
// message handlers
|
|
||||||
////////////////////
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
// windows destruction messages
|
|
||||||
|
|
||||||
// destroys GDI stuff and posts a quit message
|
|
||||||
void OnDestroy();
|
|
||||||
// deletes Console object
|
|
||||||
void OnNcDestroy();
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////
|
|
||||||
// painting messages
|
|
||||||
|
|
||||||
// handles painting from off-screen buffers
|
|
||||||
void OnPaint();
|
|
||||||
|
|
||||||
// handles master and 'change' timers
|
|
||||||
void OnPaintTimer();
|
|
||||||
|
|
||||||
// handles cursor timer (for animated cursors)
|
|
||||||
void OnCursorTimer();
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////
|
|
||||||
// window state messages
|
|
||||||
|
|
||||||
// handles window position changes (for snapping to desktop edges)
|
|
||||||
void OnWindowPosChanging(WINDOWPOS* lpWndPos);
|
|
||||||
|
|
||||||
// handles activation message (used for setting alpha transparency and cursor states)
|
|
||||||
void OnActivateApp(BOOL bActivate, DWORD dwFlags);
|
|
||||||
|
|
||||||
// handles vertical scrolling
|
|
||||||
void OnVScroll(WPARAM wParam);
|
|
||||||
|
|
||||||
// handles keyboard layout change, posts the same message to the windows console window
|
|
||||||
void OnInputLangChangeRequest(WPARAM wParam, LPARAM lParam);
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////
|
|
||||||
// mouse messages
|
|
||||||
|
|
||||||
// handles text selection start and window mouse drag start
|
|
||||||
void OnLButtonDown(UINT uiFlags, POINTS points);
|
|
||||||
|
|
||||||
// handles text selection end, window mouse drag end and text copy
|
|
||||||
void OnLButtonUp(UINT uiFlags, POINTS points);
|
|
||||||
|
|
||||||
// toggles always on top flag
|
|
||||||
void OnLButtonDblClick(UINT uiFlags, POINTS points);
|
|
||||||
|
|
||||||
// pops up the Console menu
|
|
||||||
void OnRButtonUp(UINT uiFlags, POINTS points);
|
|
||||||
|
|
||||||
// pastes text from clipboard
|
|
||||||
void OnMButtonDown(UINT uiFlags, POINTS points);
|
|
||||||
|
|
||||||
// handles mouse movement for text selection and window mouse drag
|
|
||||||
void OnMouseMove(UINT uiFlags, POINTS points);
|
|
||||||
|
|
||||||
// handles start/stop mouse drag for window border
|
|
||||||
void OnSetCursor(WORD wHitTest, WORD wMouseMessage);
|
|
||||||
|
|
||||||
// handles text input
|
|
||||||
void OnChar(WORD mychar);
|
|
||||||
|
|
||||||
wstring Input;
|
|
||||||
|
|
||||||
//////////////////
|
|
||||||
// other messages
|
|
||||||
|
|
||||||
// called before the Console menu or system menu pops up
|
|
||||||
// (populates config files submenu with filenames)
|
|
||||||
void OnInitMenuPopup(HMENU hMenu, UINT uiPos, BOOL bSysMenu);
|
|
||||||
|
|
||||||
// handles drag-n-dropped filenames
|
|
||||||
void OnDropFiles(HDROP hDrop);
|
|
||||||
|
|
||||||
// handles commands from the Console popup menu
|
|
||||||
BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
|
||||||
|
|
||||||
// handles commands from the system popup menu
|
|
||||||
BOOL OnSysCommand(WPARAM wParam, LPARAM lParam);
|
|
||||||
|
|
||||||
// handles tray icon messages
|
|
||||||
void OnTrayNotify(WPARAM wParam, LPARAM lParam);
|
|
||||||
|
|
||||||
// handles WM_SETTINGCHANGE (we handle only wallpaper changes here)
|
|
||||||
// void OnWallpaperChanged(const TCHAR* pszFilename);
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
///////////////////////////////////////////
|
|
||||||
// Console window creation/setup functions
|
|
||||||
///////////////////////////////////////////
|
|
||||||
|
|
||||||
// gets Console options
|
|
||||||
BOOL GetOptions();
|
|
||||||
|
|
||||||
// registers Console window classes
|
|
||||||
BOOL RegisterWindowClasses();
|
|
||||||
|
|
||||||
// adds stuff to system and popup menus
|
|
||||||
BOOL SetupMenus();
|
|
||||||
|
|
||||||
// creates Console window
|
|
||||||
BOOL CreateConsoleWindow();
|
|
||||||
|
|
||||||
// creates new Console font
|
|
||||||
void CreateNewFont();
|
|
||||||
|
|
||||||
// creates new background brush
|
|
||||||
void CreateNewBrush();
|
|
||||||
|
|
||||||
// creates the cursor
|
|
||||||
void CreateCursor();
|
|
||||||
|
|
||||||
// creates offscreen painting buffers
|
|
||||||
void CreateOffscreenBuffers();
|
|
||||||
|
|
||||||
// creates background bitmap
|
|
||||||
void CreateBackgroundBitmap();
|
|
||||||
|
|
||||||
// called by the ::EnumDisplayMonitors to create background for each display
|
|
||||||
// static BOOL CALLBACK BackgroundEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData);
|
|
||||||
|
|
||||||
// gets character width and height
|
|
||||||
void GetTextSize();
|
|
||||||
|
|
||||||
// gets window borders (X, Y and caption sizes)
|
|
||||||
void GetBordersDimensions();
|
|
||||||
|
|
||||||
// calculates window and client area sizes
|
|
||||||
void CalcWindowSize();
|
|
||||||
|
|
||||||
// sets up window transparency (alpha, color key, fake)
|
|
||||||
// void SetWindowTransparency();
|
|
||||||
|
|
||||||
// sets scrollbar stuff
|
|
||||||
void SetScrollbarStuff();
|
|
||||||
|
|
||||||
// sets default console colors
|
|
||||||
void SetDefaultConsoleColors();
|
|
||||||
|
|
||||||
// sets window size and position
|
|
||||||
void SetWindowSizeAndPosition();
|
|
||||||
|
|
||||||
// sets Console's big, small and tray icons
|
|
||||||
void SetWindowIcons();
|
|
||||||
|
|
||||||
// sets up traybar icon
|
|
||||||
BOOL SetTrayIcon(DWORD dwMessage);
|
|
||||||
|
|
||||||
// destroys Console cursor
|
|
||||||
void DestroyCursor();
|
|
||||||
|
|
||||||
// opens the configuration file in a text editor
|
|
||||||
void EditConfigFile();
|
|
||||||
|
|
||||||
// reloads Console settings
|
|
||||||
void ReloadSettings();
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////
|
|
||||||
// windows console functions
|
|
||||||
/////////////////////////////
|
|
||||||
|
|
||||||
// allocates the console and starts the command shell
|
|
||||||
BOOL StartShellProcess();
|
|
||||||
|
|
||||||
// refreshes m_hStdOutFresh handle
|
|
||||||
void RefreshStdOut();
|
|
||||||
|
|
||||||
// gets a fresh console output
|
|
||||||
void RefreshScreenBuffer();
|
|
||||||
|
|
||||||
// sets initial windows console size
|
|
||||||
void InitConsoleWndSize(DWORD dwColumns);
|
|
||||||
|
|
||||||
// resizes the windows console
|
|
||||||
void ResizeConsoleWindow();
|
|
||||||
|
|
||||||
// Allocates the screen buffer
|
|
||||||
void AllocateBuffer();
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////
|
|
||||||
// painting functions
|
|
||||||
//////////////////////
|
|
||||||
|
|
||||||
// repaints the memory hdc
|
|
||||||
void RepaintWindow();
|
|
||||||
|
|
||||||
// repaints the memory hdc (paint only changes)
|
|
||||||
void RepaintWindowChanges();
|
|
||||||
|
|
||||||
// draws the cursor
|
|
||||||
void DrawCursor(BOOL bOnlyCursor = FALSE);
|
|
||||||
|
|
||||||
// two helper functions for DrawCursor method
|
|
||||||
|
|
||||||
// returns cursor rectangle
|
|
||||||
inline void GetCursorRect(RECT& rectCursor);
|
|
||||||
// draws cursor background and returns the cursor rectangle
|
|
||||||
inline void DrawCursorBackground(RECT& rectCursor);
|
|
||||||
|
|
||||||
// clears text selection
|
|
||||||
void ClearSelection();
|
|
||||||
|
|
||||||
// returns the console text change rate since the last painting
|
|
||||||
// (using this value we decide whether to repaint entire window
|
|
||||||
// or just the changes)
|
|
||||||
DWORD GetChangeRate();
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////
|
|
||||||
// window state functions
|
|
||||||
//////////////////////////
|
|
||||||
|
|
||||||
// shows/hides Console window
|
|
||||||
void ShowHideWindow();
|
|
||||||
|
|
||||||
// shows/hides windows console window
|
|
||||||
void ShowHideConsole();
|
|
||||||
|
|
||||||
// shows/hides windows console window after a timeout (used during
|
|
||||||
// shell startup)
|
|
||||||
void ShowHideConsoleTimeout();
|
|
||||||
|
|
||||||
// toggles 'always on top' status
|
|
||||||
void ToggleWindowOnTop();
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////
|
|
||||||
// menu functions
|
|
||||||
//////////////////
|
|
||||||
|
|
||||||
// called by OnCommand and OnSysCommand to handle menu commands
|
|
||||||
BOOL HandleMenuCommand(DWORD dwID);
|
|
||||||
|
|
||||||
// updates popup and system menus for 'always on top' status
|
|
||||||
void UpdateOnTopMenuItem();
|
|
||||||
|
|
||||||
// updates popup and system menus for 'hide console' status
|
|
||||||
void UpdateHideConsoleMenuItem();
|
|
||||||
|
|
||||||
// updates configuration files submenu
|
|
||||||
void UpdateConfigFilesSubmenu();
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////
|
|
||||||
// clipboard functions
|
|
||||||
///////////////////////
|
|
||||||
|
|
||||||
// copies selected text to the clipboard
|
|
||||||
void CopyTextToClipboard();
|
|
||||||
|
|
||||||
// pastes text from the clipboard
|
|
||||||
void PasteClipoardText();
|
|
||||||
|
|
||||||
//////////////////
|
|
||||||
// misc functions
|
|
||||||
//////////////////
|
|
||||||
|
|
||||||
// shows Readme.txt file
|
|
||||||
void ShowReadmeFile();
|
|
||||||
|
|
||||||
// shows about dialog
|
|
||||||
void About();
|
|
||||||
|
|
||||||
// sends text to the windows console
|
|
||||||
void SendTextToConsole(const wchar_t *pszText);
|
|
||||||
|
|
||||||
// returns the full filename
|
|
||||||
tstring GetFullFilename(const tstring& strFilename);
|
|
||||||
|
|
||||||
// gets a desktop rectangle
|
|
||||||
void GetDesktopRect(RECT& rectDesktop);
|
|
||||||
|
|
||||||
// Pulls the text from the stdout or stderr handle (both are the same) and sends it to the console
|
|
||||||
void AddOutput();
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////
|
|
||||||
// 'gearbox' functions
|
|
||||||
///////////////////////
|
|
||||||
|
|
||||||
// Console window procedure
|
|
||||||
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
||||||
|
|
||||||
// shell activities monitor
|
|
||||||
static DWORD WINAPI MonitorThreadStatic(LPVOID lpParam);
|
|
||||||
DWORD MonitorThread();
|
|
||||||
|
|
||||||
// CTRL+C, CTRL+BREAK handler
|
|
||||||
static BOOL WINAPI CtrlHandler(DWORD dwCtrlType);
|
|
||||||
|
|
||||||
|
|
||||||
public: // public data
|
|
||||||
|
|
||||||
// Console window handle
|
|
||||||
HWND m_hWnd;
|
|
||||||
|
|
||||||
HWND m_notifyhWnd;
|
|
||||||
|
|
||||||
// console colors
|
|
||||||
COLORREF m_arrConsoleColors[16];
|
|
||||||
|
|
||||||
private: // private data
|
|
||||||
|
|
||||||
// readem filename
|
|
||||||
tstring m_strReadmeFile;
|
|
||||||
|
|
||||||
BOOL m_bInitializing;
|
|
||||||
BOOL m_bReloading;
|
|
||||||
|
|
||||||
tstring m_strConfigFile;
|
|
||||||
tstring m_strConfigEditor;
|
|
||||||
tstring m_strConfigEditorParams;
|
|
||||||
|
|
||||||
// one of the RELOAD_NEW_CONFIG_* constants
|
|
||||||
// - specifies relaod behaviour when a new configuration is selected
|
|
||||||
// (auto reload, don't reload, ask user)
|
|
||||||
DWORD m_dwReloadNewConfigDefault;
|
|
||||||
DWORD m_dwReloadNewConfig;
|
|
||||||
|
|
||||||
tstring m_strShell;
|
|
||||||
tstring m_strShellCmdLine;
|
|
||||||
|
|
||||||
// handle to invisible window - used for hiding the taskbar button in tray and 'hidden' modes
|
|
||||||
HWND m_hwndInvisParent;
|
|
||||||
|
|
||||||
// memory device context that holds console output image
|
|
||||||
HDC m_hdcConsole;
|
|
||||||
// memory device context for an off-screen window buffer (used to
|
|
||||||
// compose an image from m_hdcConsole and m_hdcSelection if text
|
|
||||||
// selection is active)
|
|
||||||
HDC m_hdcWindow;
|
|
||||||
|
|
||||||
// a bitmap used for drawing in the console memory DC
|
|
||||||
HBITMAP m_hbmpConsole;
|
|
||||||
HBITMAP m_hbmpConsoleOld;
|
|
||||||
|
|
||||||
// a bitmap used for drawing in the window memory DC
|
|
||||||
HBITMAP m_hbmpWindow;
|
|
||||||
HBITMAP m_hbmpWindowOld;
|
|
||||||
|
|
||||||
// brush for painting background
|
|
||||||
HBRUSH m_hBkBrush;
|
|
||||||
|
|
||||||
// master repaint timer interval (runs independent of changes in the
|
|
||||||
// console)
|
|
||||||
DWORD m_dwMasterRepaintInt;
|
|
||||||
|
|
||||||
// change repaint timer interval (when a change occurs, repainting
|
|
||||||
// will be postponed for this interval)
|
|
||||||
DWORD m_dwChangeRepaintInt;
|
|
||||||
|
|
||||||
// icon filename
|
|
||||||
tstring m_strIconFilename;
|
|
||||||
// program icons
|
|
||||||
HICON m_hSmallIcon;
|
|
||||||
HICON m_hBigIcon;
|
|
||||||
|
|
||||||
// popup menu
|
|
||||||
HMENU m_hPopupMenu;
|
|
||||||
|
|
||||||
// system (taskbar button) menu
|
|
||||||
HMENU m_hSysMenu;
|
|
||||||
|
|
||||||
// submenu for the XML (config) files
|
|
||||||
HMENU m_hConfigFilesMenu;
|
|
||||||
|
|
||||||
// set to TRUE if the popup menu is disabled
|
|
||||||
BOOL m_bPopupMenuDisabled;
|
|
||||||
|
|
||||||
// Console window title variables
|
|
||||||
// holds the default console title ("console" or the one passed in the cmdline param)
|
|
||||||
tstring m_strWindowTitleDefault;
|
|
||||||
// holds the window title (default title, or the one from the config file)
|
|
||||||
tstring m_strWindowTitle;
|
|
||||||
// holds the current window title
|
|
||||||
tstring m_strWindowTitleCurrent;
|
|
||||||
|
|
||||||
// font data
|
|
||||||
tstring m_strFontName;
|
|
||||||
DWORD m_dwFontSize;
|
|
||||||
BOOL m_bBold;
|
|
||||||
BOOL m_bItalic;
|
|
||||||
BOOL m_bUseFontColor;
|
|
||||||
COLORREF m_crFontColor;
|
|
||||||
HFONT m_hFont;
|
|
||||||
HFONT m_hFontOld;
|
|
||||||
|
|
||||||
// window X and Y positions
|
|
||||||
int m_nX;
|
|
||||||
int m_nY;
|
|
||||||
|
|
||||||
// client area inside border (gives a more 'relaxed' look to windows)
|
|
||||||
int m_nInsideBorder;
|
|
||||||
|
|
||||||
// window width and height
|
|
||||||
int m_nWindowWidth;
|
|
||||||
int m_nWindowHeight;
|
|
||||||
|
|
||||||
// window border sizes
|
|
||||||
int m_nXBorderSize;
|
|
||||||
int m_nYBorderSize;
|
|
||||||
int m_nCaptionSize;
|
|
||||||
|
|
||||||
// client area widht/height
|
|
||||||
int m_nClientWidth;
|
|
||||||
int m_nClientHeight;
|
|
||||||
|
|
||||||
// char height and width (used in window repainting)
|
|
||||||
// Note: width is used only for fixed-pitch fonts to speed up
|
|
||||||
// repainting
|
|
||||||
int m_nCharHeight;
|
|
||||||
int m_nCharWidth;
|
|
||||||
|
|
||||||
// window border type
|
|
||||||
// 0 - none
|
|
||||||
// 1 - regular window
|
|
||||||
// 2 - 1-pixel thin border
|
|
||||||
DWORD m_dwWindowBorder;
|
|
||||||
|
|
||||||
// scrollbar stuff
|
|
||||||
BOOL m_bShowScrollbar;
|
|
||||||
int m_nScrollbarStyle;
|
|
||||||
COLORREF m_crScrollbarColor;
|
|
||||||
int m_nScrollbarWidth;
|
|
||||||
int m_nScrollbarButtonHeight;
|
|
||||||
int m_nScrollbarThunmbHeight;
|
|
||||||
|
|
||||||
// what to do with the taskbar button
|
|
||||||
// if the taskbar button is hidden, or placed in the traybar, you
|
|
||||||
// can't ALT-TAB to console (take care when using with color key
|
|
||||||
// transparency :-)
|
|
||||||
// 0 - nothing
|
|
||||||
// 1 - hide it
|
|
||||||
// 2 - put icon to traybar
|
|
||||||
DWORD m_dwTaskbarButton;
|
|
||||||
|
|
||||||
// set to TRUE if the window can be dragged by left-click hold
|
|
||||||
BOOL m_bMouseDragable;
|
|
||||||
|
|
||||||
// snap distance
|
|
||||||
int m_nSnapDst;
|
|
||||||
|
|
||||||
// window docking position
|
|
||||||
// 0 - no dock
|
|
||||||
// 1 - top left
|
|
||||||
// 2 - top right
|
|
||||||
// 3 - bottom right
|
|
||||||
// 4 - bottom left
|
|
||||||
DWORD m_dwDocked;
|
|
||||||
|
|
||||||
// window Z-ordering
|
|
||||||
// 0 - regular
|
|
||||||
// 1 - always on top
|
|
||||||
// 2 - always on bottom
|
|
||||||
DWORD m_dwOriginalZOrder;
|
|
||||||
DWORD m_dwCurrentZOrder;
|
|
||||||
|
|
||||||
// Win2000/XP transparency
|
|
||||||
// 0 - none
|
|
||||||
// 1 - alpha blending
|
|
||||||
// 2 - colorkey
|
|
||||||
// 3 - fake transparency
|
|
||||||
DWORD m_dwTransparency;
|
|
||||||
|
|
||||||
// alpha value for alpha blending (Win2000 and later only!)
|
|
||||||
BYTE m_byAlpha;
|
|
||||||
|
|
||||||
// alpha value for inactive window
|
|
||||||
BYTE m_byInactiveAlpha;
|
|
||||||
|
|
||||||
COLORREF m_crBackground;
|
|
||||||
COLORREF m_crConsoleBackground;
|
|
||||||
|
|
||||||
// this is used for tinting background images and fake transparencies
|
|
||||||
BOOL m_bTintSet;
|
|
||||||
BYTE m_byTintOpacity;
|
|
||||||
BYTE m_byTintR;
|
|
||||||
BYTE m_byTintG;
|
|
||||||
BYTE m_byTintB;
|
|
||||||
|
|
||||||
// used when background is an image
|
|
||||||
BOOL m_bBitmapBackground;
|
|
||||||
tstring m_strBackgroundFile;
|
|
||||||
HDC m_hdcBackground;
|
|
||||||
HBITMAP m_hbmpBackground;
|
|
||||||
HBITMAP m_hbmpBackgroundOld;
|
|
||||||
|
|
||||||
// background attributes
|
|
||||||
|
|
||||||
// one of BACKGROUND_STYLE_ #defines
|
|
||||||
DWORD m_dwBackgroundStyle;
|
|
||||||
// set to true for relative background
|
|
||||||
BOOL m_bRelativeBackground;
|
|
||||||
// set to true to extend the background to all monitors
|
|
||||||
BOOL m_bExtendBackground;
|
|
||||||
|
|
||||||
// offsets used for multiple monitors and relative backgrounds (fake transparency, too)
|
|
||||||
int m_nBackgroundOffsetX;
|
|
||||||
int m_nBackgroundOffsetY;
|
|
||||||
|
|
||||||
// used for showing/hiding main window
|
|
||||||
BOOL m_bHideWindow;
|
|
||||||
// set to TRUE when the real console is hidden
|
|
||||||
BOOL m_bHideConsole;
|
|
||||||
|
|
||||||
// timeout used when hiding console window for the first time (some
|
|
||||||
// shells need console window visible during startup)
|
|
||||||
DWORD m_dwHideConsoleTimeout;
|
|
||||||
|
|
||||||
// if set to TRUE, Console will be started minimized
|
|
||||||
BOOL m_bStartMinimized;
|
|
||||||
|
|
||||||
|
|
||||||
// cursor style
|
|
||||||
// 0 - none
|
|
||||||
// 1 - XTerm
|
|
||||||
// 2 - block cursor
|
|
||||||
// 3 - bar cursor
|
|
||||||
// 4 - console cursor
|
|
||||||
// 5 - horizontal line
|
|
||||||
// 6 - vertical line
|
|
||||||
// 7 - pulse rect
|
|
||||||
// 8 - fading block
|
|
||||||
DWORD m_dwCursorStyle;
|
|
||||||
|
|
||||||
COLORREF m_crCursorColor;
|
|
||||||
|
|
||||||
// console screen buffer info for cursor
|
|
||||||
CONSOLE_SCREEN_BUFFER_INFO m_csbiCursor;
|
|
||||||
|
|
||||||
// wether console cursor is visible or not
|
|
||||||
BOOL m_bCursorVisible;
|
|
||||||
|
|
||||||
class Cursor* m_pCursor;
|
|
||||||
|
|
||||||
// mouse cursor offset within the window (used for moving the window)
|
|
||||||
POINT m_mouseCursorOffset;
|
|
||||||
|
|
||||||
/////////////////////
|
|
||||||
// console stuff
|
|
||||||
|
|
||||||
// console window handle
|
|
||||||
HWND m_hWndConsole;
|
|
||||||
|
|
||||||
// console screen buffer info for console repainting
|
|
||||||
CONSOLE_SCREEN_BUFFER_INFO m_csbiConsole;
|
|
||||||
|
|
||||||
// console stdouts
|
|
||||||
HANDLE m_hStdOut;
|
|
||||||
HANDLE m_hStdOutFresh;
|
|
||||||
|
|
||||||
// set when quitting the application
|
|
||||||
HANDLE m_hQuitEvent;
|
|
||||||
|
|
||||||
// set by monitor thread when detects console process exit
|
|
||||||
HANDLE m_hConsoleProcess;
|
|
||||||
|
|
||||||
// handle to monitor thread
|
|
||||||
HANDLE m_hMonitorThread;
|
|
||||||
|
|
||||||
// console rows & columns
|
|
||||||
DWORD m_dwRows;
|
|
||||||
DWORD m_dwColumns;
|
|
||||||
DWORD m_dwBufferRows;
|
|
||||||
BOOL m_bUseTextBuffer;
|
|
||||||
|
|
||||||
// set to one of TEXT_SELECTION_ #defines
|
|
||||||
int m_nTextSelection;
|
|
||||||
|
|
||||||
// X Windows style copy-on-select
|
|
||||||
BOOL m_bCopyOnSelect;
|
|
||||||
|
|
||||||
// Inverse the shift behaviour for selecting and dragging
|
|
||||||
BOOL m_bInverseShift;
|
|
||||||
|
|
||||||
COORD m_coordSelOrigin;
|
|
||||||
RECT m_rectSelection;
|
|
||||||
HDC m_hdcSelection;
|
|
||||||
HBITMAP m_hbmpSelection;
|
|
||||||
HBITMAP m_hbmpSelectionOld;
|
|
||||||
HBRUSH m_hbrushSelection;
|
|
||||||
|
|
||||||
CHAR_INFO* m_pScreenBuffer;
|
|
||||||
CHAR_INFO* m_pScreenBufferNew;
|
|
||||||
|
|
||||||
DWORD m_nTextColor;
|
|
||||||
DWORD m_nTextBgColor;
|
|
||||||
|
|
||||||
// Console window class names
|
|
||||||
static const TCHAR m_szConsoleClass[];
|
|
||||||
static const TCHAR m_szHiddenParentClass[];
|
|
||||||
|
|
||||||
// win console window title
|
|
||||||
static const tstring m_strWinConsoleTitle;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
@@ -1,208 +0,0 @@
|
|||||||
//Microsoft Developer Studio generated resource script.
|
|
||||||
//
|
|
||||||
#include "res\resource.h"
|
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
|
||||||
#define IDC_STATIC 00
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
|
||||||
//
|
|
||||||
#include "windows.h"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Neutral resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|
||||||
#pragma code_page(1250)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Dialog
|
|
||||||
//
|
|
||||||
|
|
||||||
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 146, 87
|
|
||||||
STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFOREGROUND | DS_CENTER | WS_POPUP |
|
|
||||||
WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "About Console"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",IDOK,48,66,50,14
|
|
||||||
LTEXT "Console v1.5",IDC_STATIC,51,11,42,8
|
|
||||||
LTEXT "Copyright© 2001-2005 Marko Bozikovic",IDC_STATIC,9,30,
|
|
||||||
127,8
|
|
||||||
LTEXT "bozho@kset.org",IDC_STATIC,46,45,53,8
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// DESIGNINFO
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
GUIDELINES DESIGNINFO DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
IDD_ABOUT, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 139
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 80
|
|
||||||
END
|
|
||||||
END
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
#endif // Neutral resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Neutral (Default) resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUD)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
|
|
||||||
#pragma code_page(1250)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Icon
|
|
||||||
//
|
|
||||||
|
|
||||||
// Icon with lowest ID value placed first to ensure application icon
|
|
||||||
// remains consistent on all systems.
|
|
||||||
//IDI_ICON2 ICON DISCARDABLE "Console.ico"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Menu
|
|
||||||
//
|
|
||||||
|
|
||||||
IDR_POPUP_MENU MENU DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
POPUP " "
|
|
||||||
BEGIN
|
|
||||||
// MENUITEM "Read&me", ID_SHOW_README_FILE
|
|
||||||
MENUITEM "&About Console", ID_ABOUT
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "&Copy", ID_COPY
|
|
||||||
MENUITEM "&Paste", ID_PASTE
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
// MENUITEM "Always on &top", ID_TOGGLE_ONTOP
|
|
||||||
// MENUITEM "&Hide console", ID_HIDE_CONSOLE
|
|
||||||
// MENUITEM SEPARATOR
|
|
||||||
// MENUITEM "&Select configuration file", ID_SEL_CONFIG_FILE
|
|
||||||
// MENUITEM "&Edit configuration file", ID_EDIT_CONFIG_FILE
|
|
||||||
// MENUITEM "&Reload settings", ID_RELOAD_SETTINGS
|
|
||||||
// MENUITEM SEPARATOR
|
|
||||||
MENUITEM "E&xit", ID_EXIT_CONSOLE
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // Neutral (Default) resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Croatian resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HRV)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_CROATIAN, SUBLANG_DEFAULT
|
|
||||||
#pragma code_page(1250)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// TEXTINCLUDE
|
|
||||||
//
|
|
||||||
|
|
||||||
1 TEXTINCLUDE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"resource.h\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
2 TEXTINCLUDE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"#include ""afxres.h""\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
3 TEXTINCLUDE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _MAC
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Version
|
|
||||||
//
|
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
|
||||||
FILEVERSION 1,5,0,351
|
|
||||||
PRODUCTVERSION 1,5,0,351
|
|
||||||
FILEFLAGSMASK 0x3fL
|
|
||||||
#ifdef _DEBUG
|
|
||||||
FILEFLAGS 0x1L
|
|
||||||
#else
|
|
||||||
FILEFLAGS 0x0L
|
|
||||||
#endif
|
|
||||||
FILEOS 0x40004L
|
|
||||||
FILETYPE 0x1L
|
|
||||||
FILESUBTYPE 0x0L
|
|
||||||
BEGIN
|
|
||||||
BLOCK "StringFileInfo"
|
|
||||||
BEGIN
|
|
||||||
BLOCK "000004b0"
|
|
||||||
BEGIN
|
|
||||||
VALUE "Comments", "A cool console window :-)\0"
|
|
||||||
VALUE "CompanyName", "Ingenuity Unlimited Ltd.\0"
|
|
||||||
VALUE "FileDescription", "Console\0"
|
|
||||||
VALUE "FileVersion", "1.5, Build 351 2005.09.22\0"
|
|
||||||
VALUE "InternalName", "Console\0"
|
|
||||||
VALUE "LegalCopyright", "Copyright © 2001-2004 Marko Bozikovic\0"
|
|
||||||
VALUE "LegalTrademarks", "Copyright © 2001-2004 Marko Bozikovic\0"
|
|
||||||
VALUE "OriginalFilename", "Console.exe\0"
|
|
||||||
VALUE "PrivateBuild", "\0"
|
|
||||||
VALUE "ProductName", "Console\0"
|
|
||||||
VALUE "ProductVersion", "1.5.00.351\0"
|
|
||||||
VALUE "SpecialBuild", "\0"
|
|
||||||
END
|
|
||||||
END
|
|
||||||
BLOCK "VarFileInfo"
|
|
||||||
BEGIN
|
|
||||||
VALUE "Translation", 0x0, 1200
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // !_MAC
|
|
||||||
|
|
||||||
#endif // Croatian resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#endif // not APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
@@ -1,769 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
||||||
// All rights reserved
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
||||||
// I'll try to keep a version up to date. I can be reached as follows:
|
|
||||||
// marko.bozikovic@alterbox.net
|
|
||||||
// bozho@kset.org
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Cursors.h - cursor classes
|
|
||||||
|
|
||||||
//#include "stdafx.h"
|
|
||||||
#include <Windows.h>
|
|
||||||
#include <tchar.h>
|
|
||||||
#include "Cursors.h"
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
#define new DEBUG_NEW
|
|
||||||
#undef THIS_FILE
|
|
||||||
static char THIS_FILE[] = __FILE__;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// XTermCursor
|
|
||||||
|
|
||||||
XTermCursor::XTermCursor(HWND hwndConsole, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndConsole, hdcWindow, crCursorColor)
|
|
||||||
, m_hActiveBrush(::CreateSolidBrush(crCursorColor))
|
|
||||||
, m_hInactiveBrush(::CreateSolidBrush(crCursorColor))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
XTermCursor::~XTermCursor() {
|
|
||||||
|
|
||||||
::DeleteObject(m_hActiveBrush);
|
|
||||||
::DeleteObject(m_hInactiveBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void XTermCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
if (m_bActive) {
|
|
||||||
::FillRect(m_hdcWindow, pRect, m_hActiveBrush);
|
|
||||||
} else {
|
|
||||||
::FrameRect(m_hdcWindow, pRect, m_hInactiveBrush);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void XTermCursor::PrepareNext() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// BlockCursor
|
|
||||||
|
|
||||||
BlockCursor::BlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hActiveBrush(::CreateSolidBrush(crCursorColor))
|
|
||||||
, m_bVisible(TRUE)
|
|
||||||
{
|
|
||||||
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 750, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
BlockCursor::~BlockCursor() {
|
|
||||||
|
|
||||||
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
|
|
||||||
::DeleteObject(m_hActiveBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void BlockCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
if (m_bActive && m_bVisible) {
|
|
||||||
|
|
||||||
::FillRect(m_hdcWindow, pRect, m_hActiveBrush);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void BlockCursor::PrepareNext() {
|
|
||||||
|
|
||||||
m_bVisible = !m_bVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// NBBlockCursor
|
|
||||||
|
|
||||||
NBBlockCursor::NBBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hActiveBrush(::CreateSolidBrush(crCursorColor))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
NBBlockCursor::~NBBlockCursor() {
|
|
||||||
|
|
||||||
::DeleteObject(m_hActiveBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void NBBlockCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
::FillRect(m_hdcWindow, pRect, m_hActiveBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void NBBlockCursor::PrepareNext() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// PulseBlockCursor
|
|
||||||
|
|
||||||
PulseBlockCursor::PulseBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hActiveBrush(::CreateSolidBrush(crCursorColor))
|
|
||||||
, m_nSize(0)
|
|
||||||
, m_nMaxSize(0)
|
|
||||||
, m_nStep(0)
|
|
||||||
{
|
|
||||||
::ZeroMemory(&m_rect, sizeof(RECT));
|
|
||||||
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 100, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
PulseBlockCursor::~PulseBlockCursor() {
|
|
||||||
|
|
||||||
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
|
|
||||||
::DeleteObject(m_hActiveBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void PulseBlockCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
// this is called only once, to set the size of the cursor
|
|
||||||
if (m_nMaxSize == 0) {
|
|
||||||
if ((pRect->right - pRect->left) < (pRect->bottom - pRect->top)) {
|
|
||||||
m_nMaxSize = (pRect->right - pRect->left) >> 1;
|
|
||||||
} else {
|
|
||||||
m_nMaxSize = (pRect->bottom - pRect->top) >> 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_bActive) {
|
|
||||||
RECT rect;
|
|
||||||
::CopyMemory(&rect, pRect, sizeof(RECT));
|
|
||||||
rect.left += m_nSize;
|
|
||||||
rect.top += m_nSize;
|
|
||||||
rect.right -= m_nSize;
|
|
||||||
rect.bottom -= m_nSize;
|
|
||||||
::FillRect(m_hdcWindow, &rect, m_hActiveBrush);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void PulseBlockCursor::PrepareNext() {
|
|
||||||
|
|
||||||
if (m_nSize == 0) {
|
|
||||||
m_nStep = 1;
|
|
||||||
} else if (m_nSize == m_nMaxSize) {
|
|
||||||
m_nStep = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_nSize += m_nStep;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// BarCursor
|
|
||||||
|
|
||||||
BarCursor::BarCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hPen(::CreatePen(PS_SOLID, 1, crCursorColor))
|
|
||||||
, m_bVisible(TRUE)
|
|
||||||
{
|
|
||||||
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 750, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
BarCursor::~BarCursor() {
|
|
||||||
|
|
||||||
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
|
|
||||||
|
|
||||||
::DeleteObject(m_hPen);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void BarCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
if (m_bActive && m_bVisible) {
|
|
||||||
HPEN hOldPen = (HPEN)::SelectObject(m_hdcWindow, m_hPen);
|
|
||||||
::MoveToEx(m_hdcWindow, pRect->left, pRect->top, NULL);
|
|
||||||
::LineTo(m_hdcWindow, pRect->left, pRect->bottom);
|
|
||||||
::SelectObject(m_hdcWindow, hOldPen);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void BarCursor::PrepareNext() {
|
|
||||||
|
|
||||||
m_bVisible = !m_bVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// ConsoleCursor
|
|
||||||
|
|
||||||
ConsoleCursor::ConsoleCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hStdOut(::CreateFile(_T("CONOUT$"), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0))
|
|
||||||
, m_hActiveBrush(::CreateSolidBrush(crCursorColor))
|
|
||||||
, m_bVisible(TRUE)
|
|
||||||
{
|
|
||||||
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 750, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
ConsoleCursor::~ConsoleCursor() {
|
|
||||||
|
|
||||||
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
|
|
||||||
::DeleteObject(m_hActiveBrush);
|
|
||||||
::CloseHandle(m_hStdOut);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void ConsoleCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
RECT rect;
|
|
||||||
|
|
||||||
::CopyMemory(&rect, pRect, sizeof(RECT));
|
|
||||||
|
|
||||||
if (m_bActive && m_bVisible) {
|
|
||||||
|
|
||||||
rect.top += (rect.bottom - rect.top) * 80 / 100;
|
|
||||||
|
|
||||||
::FillRect(m_hdcWindow, &rect, m_hActiveBrush);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void ConsoleCursor::PrepareNext() {
|
|
||||||
|
|
||||||
m_bVisible = !m_bVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// NBHLineCursor
|
|
||||||
|
|
||||||
NBHLineCursor::NBHLineCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hPen(::CreatePen(PS_SOLID, 1, crCursorColor))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
NBHLineCursor::~NBHLineCursor() {
|
|
||||||
|
|
||||||
::DeleteObject(m_hPen);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void NBHLineCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
HPEN hOldPen = (HPEN)::SelectObject(m_hdcWindow, m_hPen);
|
|
||||||
::MoveToEx(m_hdcWindow, pRect->left, pRect->bottom-1, NULL);
|
|
||||||
::LineTo(m_hdcWindow, pRect->right, pRect->bottom-1);
|
|
||||||
::SelectObject(m_hdcWindow, hOldPen);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void NBHLineCursor::PrepareNext() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// HLineCursor
|
|
||||||
|
|
||||||
HLineCursor::HLineCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hPen(::CreatePen(PS_SOLID, 1, crCursorColor))
|
|
||||||
, m_nSize(0)
|
|
||||||
, m_nPosition(0)
|
|
||||||
, m_nStep(0)
|
|
||||||
{
|
|
||||||
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 100, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
HLineCursor::~HLineCursor() {
|
|
||||||
|
|
||||||
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
|
|
||||||
|
|
||||||
::DeleteObject(m_hPen);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void HLineCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
// this is called only once, to set the size of the cursor
|
|
||||||
if (m_nSize != (pRect->bottom - pRect->top - 1)) {
|
|
||||||
m_nSize = pRect->bottom - pRect->top - 1;
|
|
||||||
m_nPosition = 0;
|
|
||||||
m_nStep = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_bActive) {
|
|
||||||
HPEN hOldPen = (HPEN)::SelectObject(m_hdcWindow, m_hPen);
|
|
||||||
::MoveToEx(m_hdcWindow, pRect->left, pRect->top + m_nPosition, NULL);
|
|
||||||
::LineTo(m_hdcWindow, pRect->right, pRect->top + m_nPosition);
|
|
||||||
::SelectObject(m_hdcWindow, hOldPen);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void HLineCursor::PrepareNext() {
|
|
||||||
|
|
||||||
if (m_nPosition == 0) {
|
|
||||||
m_nStep = 1;
|
|
||||||
} else if (m_nPosition == m_nSize) {
|
|
||||||
m_nStep = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_nPosition += m_nStep;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// VLineCursor
|
|
||||||
|
|
||||||
VLineCursor::VLineCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hPen(::CreatePen(PS_SOLID, 1, crCursorColor))
|
|
||||||
, m_nSize(0)
|
|
||||||
, m_nPosition(0)
|
|
||||||
, m_nStep(0)
|
|
||||||
{
|
|
||||||
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 100, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
VLineCursor::~VLineCursor() {
|
|
||||||
|
|
||||||
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
|
|
||||||
|
|
||||||
::DeleteObject(m_hPen);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void VLineCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
// this is called only once, to set the size of the cursor
|
|
||||||
if (m_nSize != (pRect->right - pRect->left - 1)) {
|
|
||||||
m_nSize = pRect->right - pRect->left - 1;
|
|
||||||
m_nPosition = 0;
|
|
||||||
m_nStep = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_bActive) {
|
|
||||||
HPEN hOldPen = (HPEN)::SelectObject(m_hdcWindow, m_hPen);
|
|
||||||
::MoveToEx(m_hdcWindow, pRect->left + m_nPosition, pRect->top, NULL);
|
|
||||||
::LineTo(m_hdcWindow, pRect->left + m_nPosition, pRect->bottom);
|
|
||||||
::SelectObject(m_hdcWindow, hOldPen);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void VLineCursor::PrepareNext() {
|
|
||||||
|
|
||||||
if (m_nPosition == 0) {
|
|
||||||
m_nStep = 1;
|
|
||||||
} else if (m_nPosition == m_nSize) {
|
|
||||||
m_nStep = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_nPosition += m_nStep;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// RectCursor
|
|
||||||
|
|
||||||
RectCursor::RectCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hActiveBrush(::CreateSolidBrush(crCursorColor))
|
|
||||||
, m_bVisible(TRUE)
|
|
||||||
{
|
|
||||||
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 750, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
RectCursor::~RectCursor() {
|
|
||||||
|
|
||||||
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
|
|
||||||
::DeleteObject(m_hActiveBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void RectCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
if (m_bActive && m_bVisible) {
|
|
||||||
|
|
||||||
::FrameRect(m_hdcWindow, pRect, m_hActiveBrush);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void RectCursor::PrepareNext() {
|
|
||||||
|
|
||||||
m_bVisible = !m_bVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// NBRectCursor
|
|
||||||
|
|
||||||
NBRectCursor::NBRectCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hActiveBrush(::CreateSolidBrush(crCursorColor))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
NBRectCursor::~NBRectCursor() {
|
|
||||||
|
|
||||||
::DeleteObject(m_hActiveBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void NBRectCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
::FrameRect(m_hdcWindow, pRect, m_hActiveBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void NBRectCursor::PrepareNext() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// PulseRectCursor
|
|
||||||
|
|
||||||
PulseRectCursor::PulseRectCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_hActiveBrush(::CreateSolidBrush(crCursorColor))
|
|
||||||
, m_nSize(0)
|
|
||||||
, m_nMaxSize(0)
|
|
||||||
, m_nStep(0)
|
|
||||||
{
|
|
||||||
::ZeroMemory(&m_rect, sizeof(RECT));
|
|
||||||
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 100, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
PulseRectCursor::~PulseRectCursor() {
|
|
||||||
|
|
||||||
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
|
|
||||||
::DeleteObject(m_hActiveBrush);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void PulseRectCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
// this is called only once, to set the size of the cursor
|
|
||||||
if (m_nMaxSize == 0) {
|
|
||||||
if ((pRect->right - pRect->left) < (pRect->bottom - pRect->top)) {
|
|
||||||
m_nMaxSize = (pRect->right - pRect->left) >> 1;
|
|
||||||
} else {
|
|
||||||
m_nMaxSize = (pRect->bottom - pRect->top) >> 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_bActive) {
|
|
||||||
RECT rect;
|
|
||||||
::CopyMemory(&rect, pRect, sizeof(RECT));
|
|
||||||
rect.left += m_nSize;
|
|
||||||
rect.top += m_nSize;
|
|
||||||
rect.right -= m_nSize;
|
|
||||||
rect.bottom -= m_nSize;
|
|
||||||
::FrameRect(m_hdcWindow, &rect, m_hActiveBrush);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void PulseRectCursor::PrepareNext() {
|
|
||||||
|
|
||||||
if (m_nSize == 0) {
|
|
||||||
m_nStep = 1;
|
|
||||||
} else if (m_nSize == m_nMaxSize) {
|
|
||||||
m_nStep = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_nSize += m_nStep;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// FadeBlockCursor
|
|
||||||
|
|
||||||
FadeBlockCursor::FadeBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor, COLORREF crBkColor)
|
|
||||||
: Cursor(hwndParent, hdcWindow, crCursorColor)
|
|
||||||
, m_crCursorColor(crCursorColor)
|
|
||||||
, m_nStep(1)
|
|
||||||
, m_crBkColor(crBkColor)
|
|
||||||
, m_nIndex(0)
|
|
||||||
, m_hUser32(NULL)
|
|
||||||
, m_hMemDC(NULL)
|
|
||||||
{
|
|
||||||
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 35, NULL);
|
|
||||||
|
|
||||||
FakeBlend();
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
FadeBlockCursor::~FadeBlockCursor() {
|
|
||||||
|
|
||||||
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void FadeBlockCursor::Draw(LPRECT pRect) {
|
|
||||||
|
|
||||||
|
|
||||||
HBRUSH hBrush = ::CreateSolidBrush(m_arrColors[m_nIndex]);
|
|
||||||
::FillRect(m_hdcWindow, pRect, hBrush);
|
|
||||||
::DeleteObject(hBrush);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void FadeBlockCursor::PrepareNext() {
|
|
||||||
if (m_nIndex == 0) {
|
|
||||||
m_nStep = 1;
|
|
||||||
} else if (m_nIndex == (FADE_STEPS)) {
|
|
||||||
m_nStep = -1;
|
|
||||||
}
|
|
||||||
m_nIndex += m_nStep;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// This function is used to create a fake blending for WinNT (uuseful only
|
|
||||||
// for solid background, though)
|
|
||||||
|
|
||||||
void FadeBlockCursor::FakeBlend() {
|
|
||||||
|
|
||||||
int nDeltaR = ((GetRValue(m_crCursorColor) - GetRValue(m_crBkColor)) << 8) / FADE_STEPS;
|
|
||||||
int nDeltaG = ((GetGValue(m_crCursorColor) - GetGValue(m_crBkColor)) << 8) / FADE_STEPS;
|
|
||||||
int nDeltaB = ((GetBValue(m_crCursorColor) - GetBValue(m_crBkColor)) << 8) / FADE_STEPS;
|
|
||||||
|
|
||||||
for (int i = 0; i < FADE_STEPS; ++i) {
|
|
||||||
m_arrColors[i] = RGB(GetRValue(m_crCursorColor) - (nDeltaR*i >> 8), GetGValue(m_crCursorColor) - (nDeltaG*i >> 8), GetBValue(m_crCursorColor) - (nDeltaB*i >> 8));
|
|
||||||
}
|
|
||||||
|
|
||||||
m_arrColors[FADE_STEPS] = m_crBkColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,342 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
||||||
// All rights reserved
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
||||||
// I'll try to keep a version up to date. I can be reached as follows:
|
|
||||||
// marko.bozikovic@alterbox.net
|
|
||||||
// bozho@kset.org
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Cursors.h - cursor classes
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define CURSOR_TIMER 45
|
|
||||||
|
|
||||||
extern BOOL g_bWin2000;
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// A base class for all the cursors
|
|
||||||
|
|
||||||
class Cursor {
|
|
||||||
public:
|
|
||||||
Cursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
|
|
||||||
: m_hwndParent(hwndParent)
|
|
||||||
, m_hdcWindow(hdcWindow)
|
|
||||||
, m_crCursorColor(crCursorColor)
|
|
||||||
, m_bActive(TRUE)
|
|
||||||
, m_uiTimer(0)
|
|
||||||
{};
|
|
||||||
|
|
||||||
virtual ~Cursor(){};
|
|
||||||
|
|
||||||
void SetState(BOOL bActive) {m_bActive = bActive;};
|
|
||||||
BOOL GetState() { return m_bActive; }
|
|
||||||
|
|
||||||
// used to draw current frame of the cursor
|
|
||||||
virtual void Draw(LPRECT pRect) = 0;
|
|
||||||
// used to prepare the next frame of cursor animation
|
|
||||||
virtual void PrepareNext() = 0;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
HWND m_hwndParent;
|
|
||||||
HDC m_hdcWindow;
|
|
||||||
COLORREF m_crCursorColor;
|
|
||||||
|
|
||||||
BOOL m_bActive;
|
|
||||||
UINT m_uiTimer;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// XTermCursor
|
|
||||||
|
|
||||||
class XTermCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
XTermCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~XTermCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HBRUSH m_hActiveBrush;
|
|
||||||
HBRUSH m_hInactiveBrush;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// BlockCursor
|
|
||||||
|
|
||||||
class BlockCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
BlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~BlockCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HBRUSH m_hActiveBrush;
|
|
||||||
BOOL m_bVisible;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// NBBlockCursor
|
|
||||||
|
|
||||||
class NBBlockCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
NBBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~NBBlockCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HBRUSH m_hActiveBrush;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// PulseBlockCursor
|
|
||||||
|
|
||||||
class PulseBlockCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
PulseBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~PulseBlockCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HBRUSH m_hActiveBrush;
|
|
||||||
RECT m_rect;
|
|
||||||
int m_nSize;
|
|
||||||
int m_nMaxSize;
|
|
||||||
int m_nStep;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// BarCursor
|
|
||||||
|
|
||||||
class BarCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
BarCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~BarCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HPEN m_hPen;
|
|
||||||
BOOL m_bVisible;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// ConsoleCursor
|
|
||||||
|
|
||||||
class ConsoleCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
ConsoleCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~ConsoleCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HANDLE m_hStdOut;
|
|
||||||
HBRUSH m_hActiveBrush;
|
|
||||||
BOOL m_bVisible;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// NBHLineCursor
|
|
||||||
|
|
||||||
class NBHLineCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
NBHLineCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~NBHLineCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HPEN m_hPen;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// HLineCursor
|
|
||||||
|
|
||||||
class HLineCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
HLineCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~HLineCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HPEN m_hPen;
|
|
||||||
int m_nSize;
|
|
||||||
int m_nPosition;
|
|
||||||
int m_nStep;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// VLineCursor
|
|
||||||
|
|
||||||
class VLineCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
VLineCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~VLineCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HPEN m_hPen;
|
|
||||||
int m_nSize;
|
|
||||||
int m_nPosition;
|
|
||||||
int m_nStep;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// RectCursor
|
|
||||||
|
|
||||||
class RectCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
RectCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~RectCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HBRUSH m_hActiveBrush;
|
|
||||||
BOOL m_bVisible;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// NBRectCursor
|
|
||||||
|
|
||||||
class NBRectCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
NBRectCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~NBRectCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HBRUSH m_hActiveBrush;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// PulseRectCursor
|
|
||||||
|
|
||||||
class PulseRectCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
PulseRectCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor);
|
|
||||||
~PulseRectCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
HBRUSH m_hActiveBrush;
|
|
||||||
RECT m_rect;
|
|
||||||
int m_nSize;
|
|
||||||
int m_nMaxSize;
|
|
||||||
int m_nStep;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// FadeBlockCursor
|
|
||||||
|
|
||||||
#define FADE_STEPS 20
|
|
||||||
#define ALPHA_STEP 12
|
|
||||||
|
|
||||||
#define BLEND_BMP_WIDTH 10
|
|
||||||
#define BLEND_BMP_HEIGHT 20
|
|
||||||
|
|
||||||
class FadeBlockCursor : public Cursor {
|
|
||||||
public:
|
|
||||||
FadeBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor, COLORREF crBkColor);
|
|
||||||
~FadeBlockCursor();
|
|
||||||
|
|
||||||
void Draw(LPRECT pRect);
|
|
||||||
void PrepareNext();
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
void FakeBlend();
|
|
||||||
|
|
||||||
COLORREF m_crCursorColor;
|
|
||||||
int m_nStep;
|
|
||||||
|
|
||||||
// used under WinNT 4.0
|
|
||||||
COLORREF m_crBkColor;
|
|
||||||
COLORREF m_arrColors[FADE_STEPS+1];
|
|
||||||
int m_nIndex;
|
|
||||||
|
|
||||||
// these are used under Win2000 only
|
|
||||||
HMODULE m_hUser32;
|
|
||||||
BLENDFUNCTION m_bfn;
|
|
||||||
HDC m_hMemDC;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
@@ -1,134 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
||||||
// All rights reserved
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
||||||
// I'll try to keep a version up to date. I can be reached as follows:
|
|
||||||
// marko.bozikovic@alterbox.net
|
|
||||||
// bozho@kset.org
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Dialogs.h - dialog classes
|
|
||||||
//
|
|
||||||
// About dialog class, etc...
|
|
||||||
|
|
||||||
//#include "stdafx.h"
|
|
||||||
#include <Windows.h>
|
|
||||||
|
|
||||||
#include "resource.h"
|
|
||||||
#include "Console.h"
|
|
||||||
#include "Dialogs.h"
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
#define new DEBUG_NEW
|
|
||||||
#undef THIS_FILE
|
|
||||||
static char THIS_FILE[] = __FILE__;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern HINSTANCE ghInstance;
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// About dialog class
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Ctor/Dtor
|
|
||||||
|
|
||||||
CAboutDlg::CAboutDlg(HWND hwndParent)
|
|
||||||
: m_hWndParent(hwndParent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CAboutDlg::~CAboutDlg()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// public methods
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// DoModal - shows About dialog
|
|
||||||
|
|
||||||
BOOL CAboutDlg::DoModal()
|
|
||||||
{
|
|
||||||
::DialogBox(
|
|
||||||
ghInstance,
|
|
||||||
MAKEINTRESOURCE(IDD_ABOUT),
|
|
||||||
m_hWndParent,
|
|
||||||
CAboutDlg::DialogProc);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// message handlers
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// DialogProc - dialog window procedure
|
|
||||||
|
|
||||||
int CALLBACK CAboutDlg::DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|
||||||
{
|
|
||||||
switch (uMsg) {
|
|
||||||
case WM_INITDIALOG:
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case WM_COMMAND:
|
|
||||||
switch (LOWORD(wParam)) {
|
|
||||||
case IDOK:
|
|
||||||
case IDCANCEL:
|
|
||||||
if (HIWORD(wParam) == BN_CLICKED) {
|
|
||||||
::EndDialog(hwndDlg, MB_OK);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
||||||
// All rights reserved
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
||||||
// I'll try to keep a version up to date. I can be reached as follows:
|
|
||||||
// marko.bozikovic@alterbox.net
|
|
||||||
// bozho@kset.org
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Dialogs.h - dialog classes
|
|
||||||
//
|
|
||||||
// About dialog class, etc...
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// About dialog class
|
|
||||||
|
|
||||||
class CAboutDlg {
|
|
||||||
public:
|
|
||||||
CAboutDlg(HWND hwndParent);
|
|
||||||
~CAboutDlg();
|
|
||||||
|
|
||||||
// public methods
|
|
||||||
public:
|
|
||||||
|
|
||||||
// shows About dialog
|
|
||||||
BOOL DoModal();
|
|
||||||
|
|
||||||
// public data
|
|
||||||
public:
|
|
||||||
// parent window handle
|
|
||||||
HWND m_hWndParent;
|
|
||||||
|
|
||||||
// private methods
|
|
||||||
private:
|
|
||||||
/////////////////////////
|
|
||||||
// message handlers
|
|
||||||
|
|
||||||
// dialog window procedure
|
|
||||||
static int CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
|
||||||
|
|
||||||
// private data
|
|
||||||
private:
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
@@ -1,259 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
||||||
// All rights reserved
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
||||||
// I'll try to keep a version up to date. I can be reached as follows:
|
|
||||||
// marko.bozikovic@alterbox.net
|
|
||||||
// bozho@kset.org
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// FileStream.cpp - implementation of IStream interface on any file
|
|
||||||
// (not strictly COM, I'm faking it here a bit :-)
|
|
||||||
//
|
|
||||||
|
|
||||||
#undef CINTERFACE
|
|
||||||
#include "builddefines.h"
|
|
||||||
|
|
||||||
//#include "stdafx.h"
|
|
||||||
//#include <atlbase.h>
|
|
||||||
#include <Windows.h>
|
|
||||||
#include <objidl.h>
|
|
||||||
#include "FileStream.h"
|
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
|
||||||
//#define new DEBUG_NEW
|
|
||||||
#undef THIS_FILE
|
|
||||||
static char THIS_FILE[] = __FILE__;
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CreateFileStream - opens/creates a file and returns an IStream interface
|
|
||||||
|
|
||||||
HRESULT CreateFileStream(
|
|
||||||
LPCTSTR lpFileName, // file name
|
|
||||||
DWORD dwDesiredAccess, // access mode
|
|
||||||
DWORD dwShareMode, // share mode
|
|
||||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
|
|
||||||
DWORD dwCreationDisposition, // how to create
|
|
||||||
DWORD dwFlagsAndAttributes, // file attributes
|
|
||||||
HANDLE hTemplateFile, // handle to template file
|
|
||||||
IStream** ppStream // pointer to IStream interface
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
HANDLE hFile = ::CreateFile(
|
|
||||||
lpFileName,
|
|
||||||
dwDesiredAccess,
|
|
||||||
dwShareMode,
|
|
||||||
lpSecurityAttributes,
|
|
||||||
dwCreationDisposition,
|
|
||||||
dwFlagsAndAttributes,
|
|
||||||
hTemplateFile);
|
|
||||||
|
|
||||||
if (hFile == INVALID_HANDLE_VALUE) {
|
|
||||||
// DWORD a = ::GetLastError();
|
|
||||||
ppStream = NULL;
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
FileStream* pFileStream = new FileStream(hFile);
|
|
||||||
|
|
||||||
return pFileStream->QueryInterface(IID_IStream, (void**)ppStream);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// FileStream class
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// ctor/dtor
|
|
||||||
|
|
||||||
FileStream::FileStream(HANDLE hFile)
|
|
||||||
: m_lRefCount(0)
|
|
||||||
, m_hFile(hFile)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
FileStream::~FileStream()
|
|
||||||
{
|
|
||||||
if (m_hFile) ::CloseHandle(m_hFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// IStream methods
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Read - reads a specified number of bytes from the stream object into memory
|
|
||||||
// starting at the current seek pointer
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Read(void *pv, ULONG cb, ULONG *pcbRead)
|
|
||||||
{
|
|
||||||
if (!::ReadFile(m_hFile, pv, cb, pcbRead, NULL)) return S_FALSE;
|
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Write - writes a specified number of bytes into the stream object starting
|
|
||||||
// at the current seek pointer
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Write(void const *pv, ULONG cb, ULONG *pcbWritten)
|
|
||||||
{
|
|
||||||
if (!::WriteFile(m_hFile, pv, cb, pcbWritten, NULL)) return S_FALSE;
|
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Seek - changes the seek pointer to a new location relative to the beginning
|
|
||||||
// of the stream, to the end of the stream, or to the current seek pointer
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
|
||||||
{
|
|
||||||
DWORD dwFileOrigin;
|
|
||||||
|
|
||||||
DWORD dwMoveLow = dlibMove.LowPart;
|
|
||||||
LONG lMoveHigh = dlibMove.HighPart;
|
|
||||||
|
|
||||||
switch (dwOrigin) {
|
|
||||||
case STREAM_SEEK_SET : dwFileOrigin = FILE_BEGIN; break;
|
|
||||||
case STREAM_SEEK_CUR : dwFileOrigin = FILE_CURRENT; break;
|
|
||||||
case STREAM_SEEK_END : dwFileOrigin = FILE_END; break;
|
|
||||||
default:dwFileOrigin = FILE_BEGIN;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD dwRet = ::SetFilePointer(m_hFile, dwMoveLow, &lMoveHigh, dwFileOrigin);
|
|
||||||
|
|
||||||
if (::GetLastError() != NO_ERROR) return STG_E_INVALIDPOINTER;
|
|
||||||
|
|
||||||
plibNewPosition->LowPart = dwRet;
|
|
||||||
plibNewPosition->HighPart = lMoveHigh;
|
|
||||||
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// SetSize - not really doing anything here
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::SetSize(ULARGE_INTEGER libNewSize)
|
|
||||||
{
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CopyTo - copies a specified number of bytes from the current seek pointer
|
|
||||||
// in the stream to the current seek pointer in another stream
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::CopyTo(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
|
|
||||||
{
|
|
||||||
// later...
|
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Commit - no work here...
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Commit(DWORD grfCommitFlags)
|
|
||||||
{
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Revert - no work here...
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Revert(void)
|
|
||||||
{
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// LockRegion - no work here...
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::LockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
|
|
||||||
{
|
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// UnlockRegion - no work here...
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::UnlockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
|
|
||||||
{
|
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Stat - no work here...
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Stat(STATSTG *pstatstg, DWORD grfStatFlag)
|
|
||||||
{
|
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Clone - no work here...
|
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Clone(IStream **ppstm)
|
|
||||||
{
|
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
||||||
// All rights reserved
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
//
|
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
||||||
// I'll try to keep a version up to date. I can be reached as follows:
|
|
||||||
// marko.bozikovic@alterbox.net
|
|
||||||
// bozho@kset.org
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// FileStream.h - implementation of IStream interface on any file
|
|
||||||
// (not really COM, I'm faking it here a bit :-)
|
|
||||||
//
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// CreateFileStream - opens/creates a file and returns an IStream interface
|
|
||||||
|
|
||||||
HRESULT CreateFileStream(
|
|
||||||
LPCTSTR lpFileName, // file name
|
|
||||||
DWORD dwDesiredAccess, // access mode
|
|
||||||
DWORD dwShareMode, // share mode
|
|
||||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
|
|
||||||
DWORD dwCreationDisposition, // how to create
|
|
||||||
DWORD dwFlagsAndAttributes, // file attributes
|
|
||||||
HANDLE hTemplateFile, // handle to template file
|
|
||||||
IStream** ppStream // pointer to IStream interface
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// FileStream class
|
|
||||||
|
|
||||||
class FileStream : public IStream {
|
|
||||||
public:
|
|
||||||
FileStream(HANDLE hFile);
|
|
||||||
~FileStream();
|
|
||||||
|
|
||||||
// IUnknown methods
|
|
||||||
STDMETHOD(QueryInterface)(REFIID riid, void ** ppv) {
|
|
||||||
if (riid == IID_IUnknown) {
|
|
||||||
*ppv = static_cast<IStream*>(this);
|
|
||||||
} else if (riid == IID_IStream) {
|
|
||||||
*ppv = static_cast<IStream*>(this);
|
|
||||||
} else {
|
|
||||||
*ppv = NULL;
|
|
||||||
return E_NOINTERFACE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static_cast<IUnknown*>(*ppv)->AddRef();
|
|
||||||
return S_OK;
|
|
||||||
};
|
|
||||||
|
|
||||||
STDMETHOD_(ULONG, AddRef)(void) {
|
|
||||||
return ::InterlockedIncrement(&m_lRefCount);
|
|
||||||
};
|
|
||||||
|
|
||||||
STDMETHOD_(ULONG, Release)(void) {
|
|
||||||
long l = ::InterlockedDecrement(&m_lRefCount);
|
|
||||||
if (l == 0) delete this;
|
|
||||||
return l;
|
|
||||||
};
|
|
||||||
|
|
||||||
// IStream methods
|
|
||||||
STDMETHOD(Read)(void *pv, ULONG cb, ULONG *pcbRead);
|
|
||||||
STDMETHOD(Write)(void const *pv, ULONG cb, ULONG *pcbWritten);
|
|
||||||
STDMETHOD(Seek)(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition);
|
|
||||||
STDMETHOD(SetSize)(ULARGE_INTEGER libNewSize);
|
|
||||||
STDMETHOD(CopyTo)(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten);
|
|
||||||
STDMETHOD(Commit)(DWORD grfCommitFlags);
|
|
||||||
STDMETHOD(Revert)(void);
|
|
||||||
STDMETHOD(LockRegion)(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
|
|
||||||
STDMETHOD(UnlockRegion)(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
|
|
||||||
STDMETHOD(Stat)(STATSTG *pstatstg, DWORD grfStatFlag);
|
|
||||||
STDMETHOD(Clone)(IStream **ppstm);
|
|
||||||
|
|
||||||
private: // private data
|
|
||||||
|
|
||||||
// reference count
|
|
||||||
long m_lRefCount;
|
|
||||||
|
|
||||||
// file handle
|
|
||||||
HANDLE m_hFile;
|
|
||||||
};
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
-1200
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __BUTTON_DEFINES_H
|
#ifndef __BUTTON_DEFINES_H
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "worldman.h"
|
#include "worldman.h"
|
||||||
#include "interface.h"
|
#include "Interface.h"
|
||||||
#include "Isometric Utils.h"
|
#include "Isometric Utils.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "EditorDefines.h"
|
#include "EditorDefines.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __CURSOR_MODES_H
|
#ifndef __CURSOR_MODES_H
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITOR_CALLBACK_PROTOTYPES_H
|
#ifndef __EDITOR_CALLBACK_PROTOTYPES_H
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
#include "Worldman.h"
|
#include "worldman.h"
|
||||||
|
|
||||||
BOOLEAN gfShowExitGrids = FALSE;
|
BOOLEAN gfShowExitGrids = FALSE;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITOR_MODES_H
|
#ifndef __EDITOR_MODES_H
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
//sgp
|
//sgp
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "debug.h"
|
#include "DEBUG.H"
|
||||||
//editor
|
//editor
|
||||||
#include "EditorDefines.h"
|
#include "EditorDefines.h"
|
||||||
#include "Editor Callback Prototypes.h"
|
#include "Editor Callback Prototypes.h"
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "EditorMapInfo.h"
|
#include "EditorMapInfo.h"
|
||||||
//tactical
|
//tactical
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
#include "overhead types.h"
|
#include "Overhead Types.h"
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITOR_TASKBAR_CREATION_H
|
#ifndef __EDITOR_TASKBAR_CREATION_H
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
#include "WorldDat.h"
|
#include "WorldDat.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "wordwrap.h"
|
#include "WordWrap.h"
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "Interface Items.h"
|
#include "Interface Items.h"
|
||||||
#include "Soldier Find.h"
|
#include "Soldier Find.h"
|
||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Overhead map.h"
|
#include "overhead map.h"
|
||||||
#include "Cursor Modes.h"
|
#include "Cursor Modes.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "EditorTerrain.h"
|
#include "EditorTerrain.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITOR_TASKBAR_UTILS_H
|
#ifndef __EDITOR_TASKBAR_UTILS_H
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "worldman.h"
|
#include "worldman.h"
|
||||||
#include "smooth.h"
|
#include "smooth.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "debug.h"
|
#include "DEBUG.H"
|
||||||
#include "Isometric Utils.h"
|
#include "Isometric Utils.h"
|
||||||
|
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
#include "Cursor Modes.h"
|
#include "Cursor Modes.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
//dnl ch86 110214
|
//dnl ch86 110214
|
||||||
#include "keys.h"
|
#include "Keys.h"
|
||||||
#include "EditorItems.h"
|
#include "EditorItems.h"
|
||||||
#include "EditorMapInfo.h"
|
#include "EditorMapInfo.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITOR_UNDO_H
|
#ifndef __EDITOR_UNDO_H
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include "Editor Modes.h"
|
#include "Editor Modes.h"
|
||||||
#include "Smoothing Utils.h"
|
#include "Smoothing Utils.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "keys.h"
|
#include "Keys.h"
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "selectwin.h"
|
#include "selectwin.h"
|
||||||
#include "Simple Render Utils.h"
|
#include "Simple Render Utils.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITORBUILDINGS_H
|
#ifndef __EDITORBUILDINGS_H
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITORDEFINES_H
|
#ifndef __EDITORDEFINES_H
|
||||||
#define __EDITORDEFINES_H
|
#define __EDITORDEFINES_H
|
||||||
|
|
||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "Button Defines.h"
|
#include "Button Defines.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-10
@@ -9,34 +9,34 @@
|
|||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "wcheck.h"
|
#include "WCheck.h"
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "selectwin.h"
|
#include "selectwin.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "interface panels.h"
|
#include "Interface Panels.h"
|
||||||
#include "interface items.h"
|
#include "Interface Items.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "utilities.h"
|
#include "Utilities.h"
|
||||||
#include "Action Items.h"
|
#include "Action Items.h"
|
||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
#include "EditorDefines.h"
|
#include "EditorDefines.h"
|
||||||
#include "EditorItems.h"
|
#include "EditorItems.h"
|
||||||
#include "EditorMercs.h"
|
#include "EditorMercs.h"
|
||||||
#include "weapons.h"
|
#include "Weapons.h"
|
||||||
#include "Editor Taskbar Utils.h"
|
#include "Editor Taskbar Utils.h"
|
||||||
#include "wordwrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Item Statistics.h"
|
#include "Item Statistics.h"
|
||||||
#include "Simple Render Utils.h"
|
#include "Simple Render Utils.h"
|
||||||
#include "worldman.h"
|
#include "worldman.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "Pits.h"
|
#include "pits.h"
|
||||||
#include "keys.h"
|
#include "Keys.h"
|
||||||
#include "InterfaceItemImages.h"
|
#include "InterfaceItemImages.h"
|
||||||
#include "Editor Undo.h"//dnl ch86 220214
|
#include "Editor Undo.h"//dnl ch86 220214
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITORITEMS_H
|
#ifndef __EDITORITEMS_H
|
||||||
|
|||||||
@@ -9,23 +9,23 @@
|
|||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "wcheck.h"
|
#include "WCheck.h"
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "selectwin.h"
|
#include "selectwin.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "interface panels.h"
|
#include "Interface Panels.h"
|
||||||
#include "interface items.h"
|
#include "Interface Items.h"
|
||||||
#include "utilities.h"
|
#include "Utilities.h"
|
||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
#include "worldman.h"
|
#include "worldman.h"
|
||||||
#include "overhead.h" //GetSoldier
|
#include "Overhead.h" //GetSoldier
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "Animation Data.h"
|
#include "Animation Data.h"
|
||||||
#include "Animation Control.h"
|
#include "Animation Control.h"
|
||||||
@@ -37,11 +37,11 @@
|
|||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Soldier Add.h"
|
#include "Soldier Add.h"
|
||||||
#include "Soldier Profile Type.h"
|
#include "soldier profile type.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
#include "wordwrap.h"
|
#include "WordWrap.h"
|
||||||
#include "EditorItems.h"
|
#include "EditorItems.h"
|
||||||
#include "Editor Taskbar Utils.h"
|
#include "Editor Taskbar Utils.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITORMAPINFO_H
|
#ifndef __EDITORMAPINFO_H
|
||||||
|
|||||||
+15
-15
@@ -9,24 +9,24 @@
|
|||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "wcheck.h"
|
#include "WCheck.h"
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "selectwin.h"
|
#include "selectwin.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "interface panels.h"
|
#include "Interface Panels.h"
|
||||||
#include "interface items.h"
|
#include "Interface Items.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "utilities.h"
|
#include "Utilities.h"
|
||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
#include "worldman.h"
|
#include "worldman.h"
|
||||||
#include "overhead.h" //GetSoldier
|
#include "Overhead.h" //GetSoldier
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "Animation Data.h"
|
#include "Animation Data.h"
|
||||||
#include "Animation Control.h"
|
#include "Animation Control.h"
|
||||||
@@ -39,11 +39,11 @@
|
|||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Soldier Add.h"
|
#include "Soldier Add.h"
|
||||||
#include "Soldier Profile Type.h"
|
#include "soldier profile type.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
#include "wordwrap.h"
|
#include "WordWrap.h"
|
||||||
#include "EditorItems.h"
|
#include "EditorItems.h"
|
||||||
#include "Editor Taskbar Utils.h"
|
#include "Editor Taskbar Utils.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
@@ -162,7 +162,7 @@ void AddNewItemToSelectedMercsInventory( BOOLEAN fCreate );
|
|||||||
void RenderMercInventoryPanel();
|
void RenderMercInventoryPanel();
|
||||||
void SetDroppableCheckboxesBasedOnMercsInventory();
|
void SetDroppableCheckboxesBasedOnMercsInventory();
|
||||||
|
|
||||||
extern BOOLEAN InternalAddSoldierToSector( UINT8 ubID, BOOLEAN fCalculateDirection, BOOLEAN fUseAnimation, UINT16 usAnimState, UINT16 usAnimCode );
|
extern BOOLEAN InternalAddSoldierToSector( SoldierID ubID, BOOLEAN fCalculateDirection, BOOLEAN fUseAnimation, UINT16 usAnimState, UINT16 usAnimCode );
|
||||||
|
|
||||||
//array which keeps track of which item is in which slot. This is dependant on the selected merc, so
|
//array which keeps track of which item is in which slot. This is dependant on the selected merc, so
|
||||||
//these temp values must be updated when different mercs are selected, and reset when a merc detailed
|
//these temp values must be updated when different mercs are selected, and reset when a merc detailed
|
||||||
@@ -559,7 +559,7 @@ void AddMercToWorld( INT32 iMapIndex )
|
|||||||
|
|
||||||
if( IsLocationSittable( iMapIndex, gfRoofPlacement ) )
|
if( IsLocationSittable( iMapIndex, gfRoofPlacement ) )
|
||||||
{
|
{
|
||||||
UINT8 ubID;
|
SoldierID ubID;
|
||||||
INT16 sSectorX, sSectorY;
|
INT16 sSectorX, sSectorY;
|
||||||
SOLDIERINITNODE *pNode;
|
SOLDIERINITNODE *pNode;
|
||||||
|
|
||||||
@@ -629,7 +629,7 @@ void HandleRightClickOnMerc( INT32 iMapIndex )
|
|||||||
if ( gsSelectedMercID != sThisMercID )
|
if ( gsSelectedMercID != sThisMercID )
|
||||||
{ // We want to edit a new merc (or different merc)
|
{ // We want to edit a new merc (or different merc)
|
||||||
//We need to avoid the editing of player mercs.
|
//We need to avoid the editing of player mercs.
|
||||||
pNode = FindSoldierInitNodeWithID( (UINT8)sThisMercID );
|
pNode = FindSoldierInitNodeWithID( sThisMercID );
|
||||||
if( !pNode )
|
if( !pNode )
|
||||||
return; //this is a player merc (which isn't in the list), or an error in logic.
|
return; //this is a player merc (which isn't in the list), or an error in logic.
|
||||||
IndicateSelectedMerc( sThisMercID );
|
IndicateSelectedMerc( sThisMercID );
|
||||||
@@ -1634,7 +1634,7 @@ void IndicateSelectedMerc( INT16 sID )
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//search for the merc with the specific ID.
|
//search for the merc with the specific ID.
|
||||||
gpSelected = FindSoldierInitNodeWithID( (UINT8)sID );
|
gpSelected = FindSoldierInitNodeWithID( sID );
|
||||||
if( !gpSelected )
|
if( !gpSelected )
|
||||||
{
|
{
|
||||||
gsSelectedMercID = -1;
|
gsSelectedMercID = -1;
|
||||||
@@ -3783,7 +3783,7 @@ void PasteMercPlacement( INT32 iMapIndex )
|
|||||||
|
|
||||||
if( IsLocationSittable( iMapIndex, gfRoofPlacement ) )
|
if( IsLocationSittable( iMapIndex, gfRoofPlacement ) )
|
||||||
{
|
{
|
||||||
UINT8 ubID;
|
SoldierID ubID;
|
||||||
INT16 sSectorX, sSectorY;
|
INT16 sSectorX, sSectorY;
|
||||||
SOLDIERINITNODE *pNode;
|
SOLDIERINITNODE *pNode;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -9,18 +9,18 @@
|
|||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "wcheck.h"
|
#include "WCheck.h"
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "selectwin.h"
|
#include "selectwin.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "interface panels.h"
|
#include "Interface Panels.h"
|
||||||
#include "utilities.h"
|
#include "Utilities.h"
|
||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
#include "EditorDefines.h"
|
#include "EditorDefines.h"
|
||||||
#include "EditorTerrain.h"
|
#include "EditorTerrain.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDITORTERRAIN_H
|
#ifndef __EDITORTERRAIN_H
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "font control.h"
|
#include "Font Control.h"
|
||||||
#include "EditorDefines.h"
|
#include "EditorDefines.h"
|
||||||
#include "Editor Taskbar Utils.h"
|
#include "Editor Taskbar Utils.h"
|
||||||
#include "EditorMercs.h"
|
#include "EditorMercs.h"
|
||||||
@@ -20,10 +20,10 @@
|
|||||||
#include "Weapons.h"
|
#include "Weapons.h"
|
||||||
#include "Items.h"
|
#include "Items.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
#include "Handle Items.h"
|
#include "Handle Items.h"
|
||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
#include "PopupMenu.h"
|
#include "popupmenu.h"
|
||||||
#include "pits.h"
|
#include "pits.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifndef __ITEM_STATISTICS_H
|
#ifndef __ITEM_STATISTICS_H
|
||||||
#define __ITEM_STATISTICS_H
|
#define __ITEM_STATISTICS_H
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "render dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "loadscreen.h"
|
#include "LoadScreen.h"
|
||||||
#include "selectwin.h"
|
#include "selectwin.h"
|
||||||
#include "EditorDefines.h"
|
#include "EditorDefines.h"
|
||||||
#include "messagebox.h"
|
#include "messagebox.h"
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
#include "Fileman.h"
|
#include "FileMan.h"
|
||||||
|
|
||||||
#define FILENAME_BUFLEN (30 + 4 + 1)//dnl ch39 190909 +4 is for ".dat", +1 is for '\0' //dnl ch81 021213
|
#define FILENAME_BUFLEN (30 + 4 + 1)//dnl ch39 190909 +4 is for ".dat", +1 is for '\0' //dnl ch81 021213
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "Road Smoothing.h"
|
#include "Road Smoothing.h"
|
||||||
#include "tiledat.h"
|
#include "TileDat.h"
|
||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "worldman.h"
|
#include "worldman.h"
|
||||||
#include "Editor Undo.h"
|
#include "Editor Undo.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
|
|
||||||
|
|||||||
@@ -15,22 +15,22 @@
|
|||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "loadscreen.h"
|
#include "LoadScreen.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Fileman.h"
|
#include "FileMan.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "Summary Info.h"
|
#include "Summary Info.h"
|
||||||
#include "Animated ProgressBar.h"
|
#include "Animated ProgressBar.h"
|
||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "worlddat.h"
|
#include "WorldDat.h"
|
||||||
#include "EditorDefines.h"
|
#include "EditorDefines.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
#include "GameVersion.h"
|
#include "GameVersion.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __SECTOR_SUMMARY_H
|
#ifndef __SECTOR_SUMMARY_H
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __SMARTMETHOD_H
|
#ifndef __SMARTMETHOD_H
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __SMOOTHING_UTILS_H
|
#ifndef __SMOOTHING_UTILS_H
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __SUMMARY_INFO_H
|
#ifndef __SUMMARY_INFO_H
|
||||||
#define __SUMMARY_INFO_H
|
#define __SUMMARY_INFO_H
|
||||||
|
|
||||||
#include "Types.h"
|
#include "types.h"
|
||||||
|
|
||||||
//dnl ch28
|
//dnl ch28
|
||||||
#define GLOBAL_SUMMARY_VERSION 15
|
#define GLOBAL_SUMMARY_VERSION 15
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __EDIT_SYS_H
|
#ifndef __EDIT_SYS_H
|
||||||
|
|||||||
@@ -12,22 +12,22 @@
|
|||||||
#include "edit_sys.h"
|
#include "edit_sys.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "sys globals.h"
|
#include "Sys Globals.h"
|
||||||
#include "SmartMethod.h"
|
#include "SmartMethod.h"
|
||||||
#include "selectwin.h"
|
#include "selectwin.h"
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
#include "lighting.h"
|
#include "lighting.h"
|
||||||
#include "Interactive Tiles.h"
|
#include "Interactive Tiles.h"
|
||||||
#include "overhead types.h"
|
#include "Overhead Types.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Handle UI.h"
|
#include "Handle UI.h"
|
||||||
#include "Event Pump.h"
|
#include "Event Pump.h"
|
||||||
#include "world items.h"
|
#include "world items.h"
|
||||||
#include "loadscreen.h"
|
#include "LoadScreen.h"
|
||||||
#include "render dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "isometric utils.h"
|
#include "Isometric Utils.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "render fun.h"
|
#include "Render Fun.h"
|
||||||
#include "popupmenu.h"
|
#include "popupmenu.h"
|
||||||
#include "overhead map.h"
|
#include "overhead map.h"
|
||||||
#include "EditorDefines.h"
|
#include "EditorDefines.h"
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
#include "newsmooth.h"
|
#include "newsmooth.h"
|
||||||
#include "Smoothing Utils.h"
|
#include "Smoothing Utils.h"
|
||||||
#include "messagebox.h"
|
#include "messagebox.h"
|
||||||
#include "messageboxscreen.h"
|
#include "MessageBoxScreen.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "scheduling.h"
|
#include "Scheduling.h"
|
||||||
#include "Road Smoothing.h"
|
#include "Road Smoothing.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Summary Info.h"
|
#include "Summary Info.h"
|
||||||
#include "connect.h"//dnl
|
#include "connect.h"//dnl
|
||||||
#include "cursors.h"//dnl ch2 210909
|
#include "Cursors.h"//dnl ch2 210909
|
||||||
#include "Cursor Control.h"//dnl ch2 210909
|
#include "Cursor Control.h"//dnl ch2 210909
|
||||||
#include "maputility.h"//dnl ch49 061009
|
#include "maputility.h"//dnl ch49 061009
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef EDITSCREEN_H
|
#ifndef EDITSCREEN_H
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "messagebox.h"
|
#include "messagebox.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __MESSAGEBOX_H
|
#ifndef __MESSAGEBOX_H
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "Editor Undo.h"
|
#include "Editor Undo.h"
|
||||||
#include "Structure Internals.h"
|
#include "Structure Internals.h"
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
#include "Render Fun.h"
|
#include "Render Fun.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __NEWSMOOTH_H
|
#ifndef __NEWSMOOTH_H
|
||||||
|
|||||||
@@ -16,18 +16,18 @@
|
|||||||
|
|
||||||
#include "tiledef.h"
|
#include "tiledef.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "worlddat.h"
|
#include "WorldDat.h"
|
||||||
#include "selectwin.h"
|
#include "selectwin.h"
|
||||||
#include "popupmenu.h"
|
#include "popupmenu.h"
|
||||||
#include "EditorDefines.h"
|
#include "EditorDefines.h"
|
||||||
#include "render dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "debug.h"
|
#include "DEBUG.H"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "overhead types.h"
|
#include "Overhead Types.h"
|
||||||
#include "EditorMercs.h"
|
#include "EditorMercs.h"
|
||||||
#include "Scheduling.h"
|
#include "Scheduling.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
//popupmenu.h
|
//popupmenu.h
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "tiledef.h"
|
#include "tiledef.h"
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "worlddat.h"
|
#include "WorldDat.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
|
|||||||
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef _SELECTION_WIN_H_
|
#ifndef _SELECTION_WIN_H_
|
||||||
#define _SELECTION_WIN_H_
|
#define _SELECTION_WIN_H_
|
||||||
|
|
||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
|
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
|
|||||||
+3
-3
@@ -5,15 +5,15 @@
|
|||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
#include "debug.h"
|
#include "DEBUG.H"
|
||||||
#include "tiledef.h"
|
#include "tiledef.h"
|
||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "worldman.h"
|
#include "worldman.h"
|
||||||
#include "smooth.h"
|
#include "smooth.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "selectwin.h"
|
#include "selectwin.h"
|
||||||
#include "isometric utils.h"
|
#include "Isometric Utils.h"
|
||||||
#include "structure wrap.h"
|
#include "Structure Wrap.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
#include "Editor Undo.h"
|
#include "Editor Undo.h"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "BuildDefines.h"
|
#include "builddefines.h"
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
#ifndef __SMOOTH_H
|
#ifndef __SMOOTH_H
|
||||||
|
|||||||
+11
-11
@@ -1,24 +1,24 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "Credits.h"
|
#include "Credits.h"
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "wordwrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Video.h"
|
#include "video.h"
|
||||||
#include "render dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
#include "utilities.h"
|
#include "Utilities.h"
|
||||||
#include "WCheck.h"
|
#include "WCheck.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "wordwrap.h"
|
#include "WordWrap.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Input.h"
|
#include "input.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "encrypted file.h"
|
#include "Encrypted File.h"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
|
|
||||||
//externals
|
//externals
|
||||||
extern HVSURFACE ghFrameBuffer;
|
extern HVSURFACE ghFrameBuffer;
|
||||||
|
|||||||
+4
-4
@@ -1,12 +1,12 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "sys globals.h"
|
#include "Sys Globals.h"
|
||||||
#include "fade screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "cursor control.h"
|
#include "Cursor Control.h"
|
||||||
#include "music control.h"
|
#include "Music Control.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
|
|
||||||
|
|||||||
+10
-10
@@ -1,6 +1,6 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "FeaturesScreen.h"
|
#include "FeaturesScreen.h"
|
||||||
#include "Video.h"
|
#include "video.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
@@ -10,29 +10,29 @@
|
|||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "WCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "Debug.h"
|
#include "DEBUG.H"
|
||||||
#include "Sound Control.h"
|
#include "Sound Control.h"
|
||||||
#include "Ambient Control.h"
|
#include "Ambient Control.h"
|
||||||
#include "Worlddat.h"
|
#include "WorldDat.h"
|
||||||
#include "Worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Game Init.h"
|
#include "Game Init.h"
|
||||||
#include "English.h"
|
#include "english.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Gap.h"
|
#include "GAP.H"
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "SysUtil.h"
|
#include "sysutil.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "Message.h"
|
#include "message.h"
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "Sys Globals.h"
|
#include "Sys Globals.h"
|
||||||
#include "insurance.h"
|
#include "insurance.h"
|
||||||
|
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "WorldMan.h"
|
#include "worldman.h"
|
||||||
#include "Init.h"
|
#include "Init.h"
|
||||||
#include "Game Events.h"
|
#include "Game Events.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "GameInitOptionsScreen.h"
|
#include "GameInitOptionsScreen.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "wCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Input.h"
|
#include "input.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "English.h"
|
#include "english.h"
|
||||||
#include "Sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Fade Screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Intro.h"
|
#include "Intro.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "_Ja25EnglishText.h"
|
#include "_Ja25EnglishText.h"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "saveloadscreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "ub_config.h"
|
#include "ub_config.h"
|
||||||
@@ -1830,7 +1830,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason )
|
|||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
||||||
{
|
{
|
||||||
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
||||||
if (iResolution >= _800x600 && iResolution < _1024x768)
|
if (iResolution >= _800x600 && iResolution < _1280x720)
|
||||||
maxSquadSize = GIO_SQUAD_SIZE_8;
|
maxSquadSize = GIO_SQUAD_SIZE_8;
|
||||||
|
|
||||||
if ( iCurrentSquadSize < maxSquadSize )
|
if ( iCurrentSquadSize < maxSquadSize )
|
||||||
@@ -1850,7 +1850,7 @@ void BtnGIOSquadSizeSelectionRightCallback( GUI_BUTTON *btn,INT32 reason )
|
|||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
|
|
||||||
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
UINT8 maxSquadSize = GIO_SQUAD_SIZE_10;
|
||||||
if (iResolution >= _800x600 && iResolution < _1024x768)
|
if (iResolution >= _800x600 && iResolution < _1280x720 )
|
||||||
maxSquadSize = GIO_SQUAD_SIZE_8;
|
maxSquadSize = GIO_SQUAD_SIZE_8;
|
||||||
|
|
||||||
if ( iCurrentSquadSize < maxSquadSize )
|
if ( iCurrentSquadSize < maxSquadSize )
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ typedef struct
|
|||||||
UINT8 usLevelModifierLowLimit;
|
UINT8 usLevelModifierLowLimit;
|
||||||
UINT8 usLevelModifierHighLimit;
|
UINT8 usLevelModifierHighLimit;
|
||||||
BOOLEAN bAllowUnrestrictedXPLevels;
|
BOOLEAN bAllowUnrestrictedXPLevels;
|
||||||
BOOLEAN bQueenLosingControlOfSector;
|
UINT8 bQueenLosingControlOfSector;
|
||||||
BOOLEAN bBloodcatAmbush;
|
BOOLEAN bBloodcatAmbush;
|
||||||
BOOLEAN bAirRaidLookForDive;
|
BOOLEAN bAirRaidLookForDive;
|
||||||
UINT32 iGetNumberOfTurnsPowerGenFanWillBeStoppedFor; //UB
|
UINT32 iGetNumberOfTurnsPowerGenFanWillBeStoppedFor; //UB
|
||||||
|
|||||||
+34
-33
@@ -1,7 +1,7 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include "String.h"
|
#include "string.h"
|
||||||
#include "Sound Control.h"
|
#include "Sound Control.h"
|
||||||
#include "SaveLoadScreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
@@ -9,19 +9,19 @@
|
|||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "GameVersion.h"
|
#include "GameVersion.h"
|
||||||
#include "LibraryDataBase.h"
|
#include "LibraryDataBase.h"
|
||||||
#include "Debug.h"
|
#include "DEBUG.H"
|
||||||
#include "HelpScreen.h"
|
#include "HelpScreen.h"
|
||||||
#include "INIReader.h"
|
#include "INIReader.h"
|
||||||
#include "Shade Table Util.h"
|
#include "Shade Table Util.h"
|
||||||
#include "soldier profile type.h"
|
#include "soldier profile type.h"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "SaveLoadGame.h"
|
||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "Campaign.h"
|
#include "Campaign.h"
|
||||||
#include "meanwhile.h"
|
#include "Meanwhile.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
@@ -279,23 +279,23 @@ BOOLEAN LoadGameSettings()
|
|||||||
gGameSettings.fOptions[TOPTION_BLOOD_N_GORE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_BLOOD_N_GORE" , TRUE );
|
gGameSettings.fOptions[TOPTION_BLOOD_N_GORE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_BLOOD_N_GORE" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_DONT_MOVE_MOUSE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_DONT_MOVE_MOUSE" , FALSE );
|
gGameSettings.fOptions[TOPTION_DONT_MOVE_MOUSE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_DONT_MOVE_MOUSE" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_OLD_SELECTION_METHOD] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_OLD_SELECTION_METHOD" , FALSE );
|
gGameSettings.fOptions[TOPTION_OLD_SELECTION_METHOD] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_OLD_SELECTION_METHOD" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_ALWAYS_SHOW_MOVEMENT_PATH] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALWAYS_SHOW_MOVEMENT_PATH" , FALSE );
|
gGameSettings.fOptions[TOPTION_ALWAYS_SHOW_MOVEMENT_PATH] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALWAYS_SHOW_MOVEMENT_PATH" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_SHOW_MISSES] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_MISSES" , FALSE );
|
gGameSettings.fOptions[TOPTION_SHOW_MISSES] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_MISSES" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_RTCONFIRM] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_RTCONFIRM" , FALSE );
|
gGameSettings.fOptions[TOPTION_RTCONFIRM] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_RTCONFIRM" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_SLEEPWAKE_NOTIFICATION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SLEEPWAKE_NOTIFICATION" , TRUE );
|
gGameSettings.fOptions[TOPTION_SLEEPWAKE_NOTIFICATION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SLEEPWAKE_NOTIFICATION" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_USE_METRIC_SYSTEM] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_METRIC_SYSTEM" , TRUE );
|
gGameSettings.fOptions[TOPTION_USE_METRIC_SYSTEM] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_METRIC_SYSTEM" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_MERC_CASTS_LIGHT" , FALSE);
|
gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_MERC_CASTS_LIGHT" , FALSE);
|
||||||
gGameSettings.fOptions[TOPTION_SMART_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SMART_CURSOR" , FALSE );
|
gGameSettings.fOptions[TOPTION_SMART_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SMART_CURSOR" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_SNAP_CURSOR_TO_DOOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SNAP_CURSOR_TO_DOOR" , TRUE );
|
gGameSettings.fOptions[TOPTION_SNAP_CURSOR_TO_DOOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SNAP_CURSOR_TO_DOOR" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_GLOW_ITEMS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_GLOW_ITEMS" , TRUE );
|
gGameSettings.fOptions[TOPTION_GLOW_ITEMS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_GLOW_ITEMS" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_TOGGLE_TREE_TOPS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TOGGLE_TREE_TOPS" , TRUE );
|
gGameSettings.fOptions[TOPTION_TOGGLE_TREE_TOPS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TOGGLE_TREE_TOPS" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_SMART_TREE_TOPS] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_SMART_TREE_TOPS" , FALSE );
|
gGameSettings.fOptions[TOPTION_SMART_TREE_TOPS] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_SMART_TREE_TOPS" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_TOGGLE_WIREFRAME] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TOGGLE_WIREFRAME" , TRUE );
|
gGameSettings.fOptions[TOPTION_TOGGLE_WIREFRAME] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TOGGLE_WIREFRAME" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_3D_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_3D_CURSOR" , FALSE );
|
gGameSettings.fOptions[TOPTION_3D_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_3D_CURSOR" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_CTH_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_CTH_CURSOR" , TRUE );
|
gGameSettings.fOptions[TOPTION_CTH_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_CTH_CURSOR" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_GL_BURST_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_GL_BURST_CURSOR" , TRUE );
|
gGameSettings.fOptions[TOPTION_GL_BURST_CURSOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_GL_BURST_CURSOR" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_ALLOW_TAUNTS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALLOW_TAUNTS" , TRUE ); // changed from drop all - SANDRO
|
gGameSettings.fOptions[TOPTION_ALLOW_TAUNTS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALLOW_TAUNTS" , TRUE ); // changed from drop all - SANDRO
|
||||||
gGameSettings.fOptions[TOPTION_GL_HIGH_ANGLE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_GL_HIGH_ANGLE" , FALSE );
|
gGameSettings.fOptions[TOPTION_GL_HIGH_ANGLE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_GL_HIGH_ANGLE" , TRUE );
|
||||||
|
|
||||||
if (!is_networked)
|
if (!is_networked)
|
||||||
gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALLOW_REAL_TIME_SNEAK" , FALSE ); // Changed from aim levels restriction - SANDRO
|
gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALLOW_REAL_TIME_SNEAK" , FALSE ); // Changed from aim levels restriction - SANDRO
|
||||||
@@ -305,7 +305,7 @@ BOOLEAN LoadGameSettings()
|
|||||||
gGameSettings.fOptions[TOPTION_SPACE_SELECTS_NEXT_SQUAD] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SPACE_SELECTS_NEXT_SQUAD" , TRUE );
|
gGameSettings.fOptions[TOPTION_SPACE_SELECTS_NEXT_SQUAD] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SPACE_SELECTS_NEXT_SQUAD" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_SHOW_ITEM_SHADOW] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_ITEM_SHADOW" , TRUE );
|
gGameSettings.fOptions[TOPTION_SHOW_ITEM_SHADOW] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_ITEM_SHADOW" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_SHOW_WEAPON_RANGE_IN_TILES] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_WEAPON_RANGE_IN_TILES" , TRUE );
|
gGameSettings.fOptions[TOPTION_SHOW_WEAPON_RANGE_IN_TILES] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_WEAPON_RANGE_IN_TILES" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_TRACERS_FOR_SINGLE_FIRE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TRACERS_FOR_SINGLE_FIRE" , FALSE );
|
gGameSettings.fOptions[TOPTION_TRACERS_FOR_SINGLE_FIRE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TRACERS_FOR_SINGLE_FIRE" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_RAIN_SOUND] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_RAIN_SOUND" , TRUE );
|
gGameSettings.fOptions[TOPTION_RAIN_SOUND] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_RAIN_SOUND" , TRUE );
|
||||||
|
|
||||||
if (!is_networked)
|
if (!is_networked)
|
||||||
@@ -332,12 +332,12 @@ BOOLEAN LoadGameSettings()
|
|||||||
else
|
else
|
||||||
gGameSettings.fOptions[TOPTION_TOGGLE_TURN_MODE] = FALSE;
|
gGameSettings.fOptions[TOPTION_TOGGLE_TURN_MODE] = FALSE;
|
||||||
|
|
||||||
gGameSettings.fOptions[TOPTION_ALT_START_AIM] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_START_AIM" , FALSE); // Start at max aiming level instead of default no aiming
|
gGameSettings.fOptions[TOPTION_ALT_START_AIM] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_START_AIM" , TRUE); // Start at max aiming level instead of default no aiming
|
||||||
gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_PATHFINDING" , FALSE); // A* pathfinding
|
gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = iniReader.ReadBoolean("JA2 Game Settings", "TOPTION_ALT_PATHFINDING" , FALSE); // A* pathfinding
|
||||||
gGameSettings.fOptions[TOPTION_MERCENARY_FORMATIONS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_MERCENARY_FORMATIONS" , TRUE ); // Flugente: mercenary formations
|
gGameSettings.fOptions[TOPTION_MERCENARY_FORMATIONS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_MERCENARY_FORMATIONS" , FALSE ); // Flugente: mercenary formations
|
||||||
gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_ENEMY_LOCATION" , FALSE); // sevenfm: show locations of known enemies
|
gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_ENEMY_LOCATION" , FALSE); // sevenfm: show locations of known enemies
|
||||||
gGameSettings.fOptions[TOPTION_REPORT_MISS_MARGIN] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_REPORT_MISS_MARGIN" , FALSE ); // HEADROCK HAM 4: Shot offset report
|
gGameSettings.fOptions[TOPTION_REPORT_MISS_MARGIN] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_REPORT_MISS_MARGIN" , FALSE ); // HEADROCK HAM 4: Shot offset report
|
||||||
gGameSettings.fOptions[TOPTION_USE_LOGICAL_BODYTYPES] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_LOGICAL_BODYTYPES" , FALSE );
|
gGameSettings.fOptions[TOPTION_USE_LOGICAL_BODYTYPES] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_USE_LOGICAL_BODYTYPES" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_ALT_MAP_COLOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALT_MAP_COLOR" , FALSE ); // HEADROCK HAM 4: Strategic Map Colors
|
gGameSettings.fOptions[TOPTION_ALT_MAP_COLOR] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALT_MAP_COLOR" , FALSE ); // HEADROCK HAM 4: Strategic Map Colors
|
||||||
gGameSettings.fOptions[TOPTION_ALTERNATE_BULLET_GRAPHICS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALTERNATE_BULLET_GRAPHICS" , TRUE );
|
gGameSettings.fOptions[TOPTION_ALTERNATE_BULLET_GRAPHICS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ALTERNATE_BULLET_GRAPHICS" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_SHOW_MERC_RANKS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_MERC_RANKS" , FALSE );
|
gGameSettings.fOptions[TOPTION_SHOW_MERC_RANKS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_MERC_RANKS" , FALSE );
|
||||||
@@ -357,13 +357,13 @@ BOOLEAN LoadGameSettings()
|
|||||||
gGameSettings.fOptions[NUM_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_GAME_OPTIONS" , FALSE );
|
gGameSettings.fOptions[NUM_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_GAME_OPTIONS" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_HIDE_BULLETS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_HIDE_BULLETS" , FALSE );
|
gGameSettings.fOptions[TOPTION_HIDE_BULLETS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_HIDE_BULLETS" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_TRACKING_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TRACKING_MODE" , TRUE );
|
gGameSettings.fOptions[TOPTION_TRACKING_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_TRACKING_MODE" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_DISABLE_CURSOR_SWAP" , FALSE );
|
gGameSettings.fOptions[TOPTION_DISABLE_CURSOR_SWAP] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_DISABLE_CURSOR_SWAP" , TRUE );
|
||||||
gGameSettings.fOptions[TOPTION_QUIET_TRAINING] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_QUIET_TRAINING" , FALSE );
|
gGameSettings.fOptions[TOPTION_QUIET_TRAINING] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_QUIET_TRAINING" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_QUIET_REPAIRING] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_QUIET_REPAIRING" , FALSE );
|
gGameSettings.fOptions[TOPTION_QUIET_REPAIRING] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_QUIET_REPAIRING" , FALSE );
|
||||||
gGameSettings.fOptions[TOPTION_QUIET_DOCTORING] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_QUIET_DOCTORING" , FALSE );
|
gGameSettings.fOptions[TOPTION_QUIET_DOCTORING] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_QUIET_DOCTORING" , FALSE );
|
||||||
|
|
||||||
if (!is_networked)
|
if (!is_networked)
|
||||||
gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_AUTO_FAST_FORWARD_MODE" , FALSE );
|
gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_AUTO_FAST_FORWARD_MODE" , TRUE );
|
||||||
else
|
else
|
||||||
gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] = FALSE;
|
gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] = FALSE;
|
||||||
|
|
||||||
@@ -776,17 +776,17 @@ void InitGameSettings()
|
|||||||
gGameSettings.fOptions[ TOPTION_BLOOD_N_GORE ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_BLOOD_N_GORE ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_DONT_MOVE_MOUSE ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_DONT_MOVE_MOUSE ] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_OLD_SELECTION_METHOD ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_OLD_SELECTION_METHOD ] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_ALWAYS_SHOW_MOVEMENT_PATH ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_ALWAYS_SHOW_MOVEMENT_PATH ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_SHOW_MISSES ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_SHOW_MISSES ] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_RTCONFIRM ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_RTCONFIRM ] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_SLEEPWAKE_NOTIFICATION ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_SLEEPWAKE_NOTIFICATION ] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_USE_METRIC_SYSTEM ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_USE_METRIC_SYSTEM ] = TRUE;
|
||||||
gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] = FALSE;
|
gGameSettings.fOptions[TOPTION_MERC_CASTS_LIGHT] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_SMART_CURSOR ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_SMART_CURSOR ] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_SNAP_CURSOR_TO_DOOR ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_SNAP_CURSOR_TO_DOOR ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_GLOW_ITEMS ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_GLOW_ITEMS ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_TOGGLE_TREE_TOPS ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_TOGGLE_TREE_TOPS ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_SMART_TREE_TOPS ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_SMART_TREE_TOPS ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_TOGGLE_WIREFRAME ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_TOGGLE_WIREFRAME ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_3D_CURSOR ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_3D_CURSOR ] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_CTH_CURSOR ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_CTH_CURSOR ] = TRUE;
|
||||||
@@ -794,14 +794,14 @@ void InitGameSettings()
|
|||||||
//Madd:
|
//Madd:
|
||||||
gGameSettings.fOptions[ TOPTION_GL_BURST_CURSOR ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_GL_BURST_CURSOR ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_ALLOW_TAUNTS ] = TRUE; // changed - SANDRO
|
gGameSettings.fOptions[ TOPTION_ALLOW_TAUNTS ] = TRUE; // changed - SANDRO
|
||||||
gGameSettings.fOptions[ TOPTION_GL_HIGH_ANGLE ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_GL_HIGH_ANGLE ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_ALLOW_REAL_TIME_SNEAK ] = FALSE; // changed - SANDRO
|
gGameSettings.fOptions[ TOPTION_ALLOW_REAL_TIME_SNEAK ] = FALSE; // changed - SANDRO
|
||||||
|
|
||||||
//lalien
|
//lalien
|
||||||
gGameSettings.fOptions[ TOPTION_SPACE_SELECTS_NEXT_SQUAD ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_SPACE_SELECTS_NEXT_SQUAD ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_SHOW_ITEM_SHADOW ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_SHOW_ITEM_SHADOW ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_TRACERS_FOR_SINGLE_FIRE ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_TRACERS_FOR_SINGLE_FIRE ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_RAIN_SOUND ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_RAIN_SOUND ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_ALLOW_CROWS ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_ALLOW_CROWS ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_ALLOW_SOLDIER_TOOLTIPS ] = TRUE;
|
gGameSettings.fOptions[ TOPTION_ALLOW_SOLDIER_TOOLTIPS ] = TRUE;
|
||||||
@@ -827,14 +827,14 @@ void InitGameSettings()
|
|||||||
gGameSettings.fOptions[ TOPTION_REPORT_MISS_MARGIN ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_REPORT_MISS_MARGIN ] = FALSE;
|
||||||
|
|
||||||
// BIO
|
// BIO
|
||||||
gGameSettings.fOptions[ TOPTION_USE_LOGICAL_BODYTYPES ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_USE_LOGICAL_BODYTYPES ] = TRUE;
|
||||||
|
|
||||||
gGameSettings.fOptions[ TOPTION_DISABLE_CURSOR_SWAP ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_DISABLE_CURSOR_SWAP ] = TRUE;
|
||||||
gGameSettings.fOptions[ TOPTION_QUIET_TRAINING ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_QUIET_TRAINING ] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_QUIET_REPAIRING ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_QUIET_REPAIRING ] = FALSE;
|
||||||
gGameSettings.fOptions[ TOPTION_QUIET_DOCTORING ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_QUIET_DOCTORING ] = FALSE;
|
||||||
|
|
||||||
gGameSettings.fOptions[ TOPTION_AUTO_FAST_FORWARD_MODE ] = FALSE;
|
gGameSettings.fOptions[ TOPTION_AUTO_FAST_FORWARD_MODE ] = TRUE;
|
||||||
|
|
||||||
gGameSettings.fOptions[ TOPTION_ZOMBIES ] = FALSE; // Flugente Zombies
|
gGameSettings.fOptions[ TOPTION_ZOMBIES ] = FALSE; // Flugente Zombies
|
||||||
|
|
||||||
@@ -846,7 +846,7 @@ void InitGameSettings()
|
|||||||
|
|
||||||
gGameSettings.fOptions[ TOPTION_MERCENARY_FORMATIONS ] = FALSE; // Flugente: mercenary formations
|
gGameSettings.fOptions[ TOPTION_MERCENARY_FORMATIONS ] = FALSE; // Flugente: mercenary formations
|
||||||
gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = FALSE; // sevenfm: show locations of known enemies
|
gGameSettings.fOptions[TOPTION_SHOW_ENEMY_LOCATION] = FALSE; // sevenfm: show locations of known enemies
|
||||||
gGameSettings.fOptions[TOPTION_ALT_START_AIM] = FALSE;
|
gGameSettings.fOptions[TOPTION_ALT_START_AIM] = TRUE;
|
||||||
gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = FALSE;
|
gGameSettings.fOptions[TOPTION_ALT_PATHFINDING] = FALSE;
|
||||||
|
|
||||||
// arynn: Cheat/Debug Menu
|
// arynn: Cheat/Debug Menu
|
||||||
@@ -1679,6 +1679,9 @@ void LoadGameExternalOptions()
|
|||||||
//JMich.BackpackClimb
|
//JMich.BackpackClimb
|
||||||
gGameExternalOptions.sBackpackWeightToClimb = iniReader.ReadInteger("Tactical Gameplay Settings", "MAX_BACKPACK_WEIGHT_TO_CLIMB", -1);
|
gGameExternalOptions.sBackpackWeightToClimb = iniReader.ReadInteger("Tactical Gameplay Settings", "MAX_BACKPACK_WEIGHT_TO_CLIMB", -1);
|
||||||
gGameExternalOptions.fUseGlobalBackpackSettings = iniReader.ReadBoolean("Tactical Gameplay Settings", "USE_GLOBAL_BACKPACK_SETTINGS", TRUE);
|
gGameExternalOptions.fUseGlobalBackpackSettings = iniReader.ReadBoolean("Tactical Gameplay Settings", "USE_GLOBAL_BACKPACK_SETTINGS", TRUE);
|
||||||
|
|
||||||
|
// Buscher
|
||||||
|
gGameExternalOptions.ubBackPackWeightFactorForAPPenalty = iniReader.ReadInteger("Tactical Gameplay Settings", "BACKPACK_WEIGHT_FACTOR", 50, 1, 250);
|
||||||
|
|
||||||
// sevenfm
|
// sevenfm
|
||||||
gGameExternalOptions.fShowEnemyWeapon = iniReader.ReadBoolean("Tactical Gameplay Settings","SHOW_ENEMY_WEAPON", FALSE);
|
gGameExternalOptions.fShowEnemyWeapon = iniReader.ReadBoolean("Tactical Gameplay Settings","SHOW_ENEMY_WEAPON", FALSE);
|
||||||
@@ -1998,6 +2001,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fFoodDecayInSectors = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_DECAY_IN_SECTORS", TRUE);
|
gGameExternalOptions.fFoodDecayInSectors = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_DECAY_IN_SECTORS", TRUE);
|
||||||
gGameExternalOptions.sFoodDecayModificator = iniReader.ReadFloat("Tactical Food Settings", "FOOD_DECAY_MODIFICATOR", 1.0f, 0.1f, 10.0f);
|
gGameExternalOptions.sFoodDecayModificator = iniReader.ReadFloat("Tactical Food Settings", "FOOD_DECAY_MODIFICATOR", 1.0f, 0.1f, 10.0f);
|
||||||
gGameExternalOptions.fFoodEatingSounds = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_EATING_SOUNDS", TRUE);
|
gGameExternalOptions.fFoodEatingSounds = iniReader.ReadBoolean("Tactical Food Settings", "FOOD_EATING_SOUNDS", TRUE);
|
||||||
|
gGameExternalOptions.fAlwaysFood = iniReader.ReadBoolean("Tactical Food Settings", "ALWAYS_FOOD", FALSE);
|
||||||
|
|
||||||
//################# Disease Settings ##################
|
//################# Disease Settings ##################
|
||||||
gGameExternalOptions.fDisease = iniReader.ReadBoolean( "Disease Settings", "DISEASE", FALSE );
|
gGameExternalOptions.fDisease = iniReader.ReadBoolean( "Disease Settings", "DISEASE", FALSE );
|
||||||
@@ -2097,9 +2101,6 @@ void LoadGameExternalOptions()
|
|||||||
|
|
||||||
//################# Strategic Gameplay Settings ##################
|
//################# Strategic Gameplay Settings ##################
|
||||||
|
|
||||||
// Allow enemy and militia Strategic Groups to reinforce one another for battles?
|
|
||||||
// silversurfer: Obsolete. This is now in DifficultySettings.xml and will be set during InitNewGame().
|
|
||||||
gGameExternalOptions.gfAllowReinforcements = TRUE;
|
|
||||||
// Allow reinforcements only between City sectors?
|
// Allow reinforcements only between City sectors?
|
||||||
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = iniReader.ReadBoolean("Strategic Gameplay Settings","ALLOW_REINFORCEMENTS_ONLY_IN_CITIES",FALSE);
|
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = iniReader.ReadBoolean("Strategic Gameplay Settings","ALLOW_REINFORCEMENTS_ONLY_IN_CITIES",FALSE);
|
||||||
|
|
||||||
@@ -2601,7 +2602,7 @@ void LoadSkillTraitsExternalSettings()
|
|||||||
gSkillTraitValues.ubNumberOfMajorTraitsAllowed = iniReader.ReadInteger( "Generic Traits Settings", "NUMBER_OF_MAJOR_TRAITS_ALLOWED", 3, 2, gSkillTraitValues.ubMaxNumberOfTraits - 1);
|
gSkillTraitValues.ubNumberOfMajorTraitsAllowed = iniReader.ReadInteger( "Generic Traits Settings", "NUMBER_OF_MAJOR_TRAITS_ALLOWED", 3, 2, gSkillTraitValues.ubMaxNumberOfTraits - 1);
|
||||||
|
|
||||||
gSkillTraitValues.ubMaxNumberOfTraitsForIMP = iniReader.ReadInteger("Generic Traits Settings","MAX_NUMBER_OF_TRAITS_FOR_IMP", 3, 2, 30);
|
gSkillTraitValues.ubMaxNumberOfTraitsForIMP = iniReader.ReadInteger("Generic Traits Settings","MAX_NUMBER_OF_TRAITS_FOR_IMP", 3, 2, 30);
|
||||||
gSkillTraitValues.ubNumberOfMajorTraitsAllowedForIMP = iniReader.ReadInteger( "Generic Traits Settings", "NUMBER_OF_MAJOR_TRAITS_ALLOWED_FOR_IMP", 2, 2, min( gSkillTraitValues.ubNumberOfMajorTraitsAllowed, gSkillTraitValues.ubMaxNumberOfTraitsForIMP - 1 ) );
|
gSkillTraitValues.ubNumberOfMajorTraitsAllowedForIMP = iniReader.ReadInteger( "Generic Traits Settings", "NUMBER_OF_MAJOR_TRAITS_ALLOWED_FOR_IMP", 2, 2, min( gSkillTraitValues.ubNumberOfMajorTraitsAllowed, gSkillTraitValues.ubMaxNumberOfTraitsForIMP ) );
|
||||||
|
|
||||||
// Allow an exception in number of traits for Special Merc?
|
// Allow an exception in number of traits for Special Merc?
|
||||||
//gSkillTraitValues.fAllowSpecialMercTraitsException = iniReader.ReadBoolean("Generic Traits Settings","ALLOW_EXCEPTION_FOR_SPECIAL_MERC", TRUE);
|
//gSkillTraitValues.fAllowSpecialMercTraitsException = iniReader.ReadBoolean("Generic Traits Settings","ALLOW_EXCEPTION_FOR_SPECIAL_MERC", TRUE);
|
||||||
@@ -2894,7 +2895,7 @@ void LoadSkillTraitsExternalSettings()
|
|||||||
gSkillTraitValues.fSNTSnitchLeadershipBonusModifer = iniReader.ReadFloat("Snitch","SNITCH_LEADERSHIP_BONUS_MODIFIER", 0.5, 0.0, 10.0);
|
gSkillTraitValues.fSNTSnitchLeadershipBonusModifer = iniReader.ReadFloat("Snitch","SNITCH_LEADERSHIP_BONUS_MODIFIER", 0.5, 0.0, 10.0);
|
||||||
gSkillTraitValues.bSNTSociableMercBonus = iniReader.ReadInteger("Snitch","SOCIABLE_MERC_BONUS", 10, -100, 100);
|
gSkillTraitValues.bSNTSociableMercBonus = iniReader.ReadInteger("Snitch","SOCIABLE_MERC_BONUS", 10, -100, 100);
|
||||||
gSkillTraitValues.bSNTLonerMercBonus = iniReader.ReadInteger("Snitch","LONER_MERC_BONUS", -10, -100, 100);
|
gSkillTraitValues.bSNTLonerMercBonus = iniReader.ReadInteger("Snitch","LONER_MERC_BONUS", -10, -100, 100);
|
||||||
gSkillTraitValues.bSNTSameAssignmentBonus = iniReader.ReadInteger("Snitch","LONER_MERC_BONUS", -20, -100, 100);
|
gSkillTraitValues.bSNTSameAssignmentBonus = iniReader.ReadInteger("Snitch","SAME_ASSIGNMENT_BONUS", -20, -100, 100);
|
||||||
gSkillTraitValues.bSNTMercOpinionAboutMercTreshold = iniReader.ReadInteger("Snitch","MERC_OPINION_ABOUT_MERC_TRESHOLD", -10, -25, 25);
|
gSkillTraitValues.bSNTMercOpinionAboutMercTreshold = iniReader.ReadInteger("Snitch","MERC_OPINION_ABOUT_MERC_TRESHOLD", -10, -25, 25);
|
||||||
|
|
||||||
gSkillTraitValues.ubSNTPassiveReputationGain = iniReader.ReadInteger("Snitch","PASSIVE_REPUTATION_GAIN", 3, 0, 100);
|
gSkillTraitValues.ubSNTPassiveReputationGain = iniReader.ReadInteger("Snitch","PASSIVE_REPUTATION_GAIN", 3, 0, 100);
|
||||||
@@ -3610,10 +3611,10 @@ void LoadGameAPBPConstants()
|
|||||||
APBPConstants[BP_CRAWL_ENERGYCOSTFACTOR] = iniReader.ReadInteger("BPConstants","BP_CRAWL_ENERGYCOSTFACTOR",4);
|
APBPConstants[BP_CRAWL_ENERGYCOSTFACTOR] = iniReader.ReadInteger("BPConstants","BP_CRAWL_ENERGYCOSTFACTOR",4);
|
||||||
APBPConstants[BP_RADIO] = iniReader.ReadInteger("BPConstants","BP_RADIO",0);
|
APBPConstants[BP_RADIO] = iniReader.ReadInteger("BPConstants","BP_RADIO",0);
|
||||||
APBPConstants[BP_USE_DETONATOR] = iniReader.ReadInteger("BPConstants","BP_USE_DETONATOR",0);
|
APBPConstants[BP_USE_DETONATOR] = iniReader.ReadInteger("BPConstants","BP_USE_DETONATOR",0);
|
||||||
APBPConstants[BP_PER_AP_NO_EFFORT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","BP_PER_AP_NO_EFFORT",-50),-50, TRUE);
|
APBPConstants[BP_PER_AP_NO_EFFORT] = DynamicAdjustAPConstants(iniReader.ReadInteger("BPConstants","BP_PER_AP_NO_EFFORT",-50),-50, TRUE);
|
||||||
APBPConstants[BP_PER_AP_MIN_EFFORT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","BP_PER_AP_MIN_EFFORT",-25),-25, TRUE);
|
APBPConstants[BP_PER_AP_MIN_EFFORT] = DynamicAdjustAPConstants(iniReader.ReadInteger("BPConstants","BP_PER_AP_MIN_EFFORT",-25),-25, TRUE);
|
||||||
APBPConstants[BP_PER_AP_LT_EFFORT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","BP_PER_AP_LT_EFFORT",-12),-12, TRUE);
|
APBPConstants[BP_PER_AP_LT_EFFORT] = DynamicAdjustAPConstants(iniReader.ReadInteger("BPConstants","BP_PER_AP_LT_EFFORT",-12),-12, TRUE);
|
||||||
APBPConstants[BP_PER_AP_MOD_EFFORT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","BP_PER_AP_MOD_EFFORT",0),0, TRUE);
|
APBPConstants[BP_PER_AP_MOD_EFFORT] = DynamicAdjustAPConstants(iniReader.ReadInteger("BPConstants","BP_PER_AP_MOD_EFFORT",0),0, TRUE);
|
||||||
APBPConstants[BP_MOVEMENT_FLAT] = iniReader.ReadInteger("BPConstants","BP_MOVEMENT_FLAT",5);
|
APBPConstants[BP_MOVEMENT_FLAT] = iniReader.ReadInteger("BPConstants","BP_MOVEMENT_FLAT",5);
|
||||||
APBPConstants[BP_MOVEMENT_GRASS] = iniReader.ReadInteger("BPConstants","BP_MOVEMENT_GRASS",10);
|
APBPConstants[BP_MOVEMENT_GRASS] = iniReader.ReadInteger("BPConstants","BP_MOVEMENT_GRASS",10);
|
||||||
APBPConstants[BP_MOVEMENT_BUSH] = iniReader.ReadInteger("BPConstants","BP_MOVEMENT_BUSH",20);
|
APBPConstants[BP_MOVEMENT_BUSH] = iniReader.ReadInteger("BPConstants","BP_MOVEMENT_BUSH",20);
|
||||||
|
|||||||
+5
-1
@@ -1,7 +1,7 @@
|
|||||||
#ifndef _GAME_SETTINGS__H_
|
#ifndef _GAME_SETTINGS__H_
|
||||||
#define _GAME_SETTINGS__H_
|
#define _GAME_SETTINGS__H_
|
||||||
|
|
||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
#include "Morale.h"
|
#include "Morale.h"
|
||||||
#include "GameInitOptionsScreen.h"
|
#include "GameInitOptionsScreen.h"
|
||||||
@@ -506,6 +506,7 @@ typedef struct
|
|||||||
FLOAT sFoodDecayModificator;
|
FLOAT sFoodDecayModificator;
|
||||||
|
|
||||||
BOOLEAN fFoodEatingSounds;
|
BOOLEAN fFoodEatingSounds;
|
||||||
|
BOOLEAN fAlwaysFood;
|
||||||
|
|
||||||
// Flugente: disease settings
|
// Flugente: disease settings
|
||||||
BOOLEAN fDisease;
|
BOOLEAN fDisease;
|
||||||
@@ -1360,6 +1361,9 @@ typedef struct
|
|||||||
INT16 sBackpackWeightToClimb;
|
INT16 sBackpackWeightToClimb;
|
||||||
BOOLEAN fUseGlobalBackpackSettings;
|
BOOLEAN fUseGlobalBackpackSettings;
|
||||||
|
|
||||||
|
// Buscher
|
||||||
|
UINT8 ubBackPackWeightFactorForAPPenalty;
|
||||||
|
|
||||||
// sevenfm: show enemy weapon above soldier in tactical
|
// sevenfm: show enemy weapon above soldier in tactical
|
||||||
BOOLEAN fShowEnemyWeapon;
|
BOOLEAN fShowEnemyWeapon;
|
||||||
BOOLEAN fShowEnemyExtendedInfo;
|
BOOLEAN fShowEnemyExtendedInfo;
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "GameVersion.h"
|
#include "GameVersion.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-1
@@ -23,6 +23,8 @@ extern CHAR16 zBuildInformation[256];
|
|||||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
// Keeps track of the saved game version. Increment the saved game version whenever
|
||||||
// you will invalidate the saved game file
|
// you will invalidate the saved game file
|
||||||
|
|
||||||
|
#define INCREASED_TEAMSIZES 186 // Asdow: SOLDIERTYPE ubID changed from UINT8 -> UINT16
|
||||||
|
#define MERC_PROFILE_INSERTION_DATA 185 // Bigmap support for AddProfileToMap function
|
||||||
#define GROWTH_MODIFIERS 184
|
#define GROWTH_MODIFIERS 184
|
||||||
#define REBELCOMMAND 183
|
#define REBELCOMMAND 183
|
||||||
#define DRAGSTRUCTURE 182 // Flugente: we can drag structures behind us
|
#define DRAGSTRUCTURE 182 // Flugente: we can drag structures behind us
|
||||||
@@ -105,7 +107,7 @@ extern CHAR16 zBuildInformation[256];
|
|||||||
#define AP100_SAVEGAME_DATATYPE_CHANGE 105 // Before this, we didn't have the 100AP structure changes
|
#define AP100_SAVEGAME_DATATYPE_CHANGE 105 // Before this, we didn't have the 100AP structure changes
|
||||||
#define NIV_SAVEGAME_DATATYPE_CHANGE 102 // Before this, we used the old structure system
|
#define NIV_SAVEGAME_DATATYPE_CHANGE 102 // Before this, we used the old structure system
|
||||||
|
|
||||||
#define SAVE_GAME_VERSION GROWTH_MODIFIERS
|
#define SAVE_GAME_VERSION INCREASED_TEAMSIZES
|
||||||
|
|
||||||
//#define RUSSIANGOLD
|
//#define RUSSIANGOLD
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
+7
-7
@@ -1,19 +1,19 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "wcheck.h"
|
#include "WCheck.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "font control.h"
|
#include "Font Control.h"
|
||||||
#include "cursor control.h"
|
#include "Cursor Control.h"
|
||||||
#include "render dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "HelpScreen.h"
|
#include "HelpScreen.h"
|
||||||
#include "HelpScreenText.h"
|
#include "HelpScreenText.h"
|
||||||
#include "Line.h"
|
#include "line.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "laptop.h"
|
#include "laptop.h"
|
||||||
|
|||||||
+8
-8
@@ -1,7 +1,7 @@
|
|||||||
#include "builddefines.h"
|
#include "builddefines.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "Gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "Screens.h"
|
#include "Screens.h"
|
||||||
#include "INIReader.h"
|
#include "INIReader.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "Animation Data.h"
|
#include "Animation Data.h"
|
||||||
#include "overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
@@ -21,18 +21,18 @@
|
|||||||
#include "Event Pump.h"
|
#include "Event Pump.h"
|
||||||
#include "lighting.h"
|
#include "lighting.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "music control.h"
|
#include "Music Control.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
#include "interface items.h"
|
#include "Interface Items.h"
|
||||||
#include "Maputility.h"
|
#include "maputility.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "dialogue control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "laptop.h"
|
#include "laptop.h"
|
||||||
#include "NPC.h"
|
#include "NPC.h"
|
||||||
#include "MercTextBox.h"
|
#include "MercTextBox.h"
|
||||||
#include "tile cache.h"
|
#include "Tile Cache.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "Shade Table Util.h"
|
#include "Shade Table Util.h"
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
#include "jascreens.h"
|
#include "jascreens.h"
|
||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "SaveLoadGame.h"
|
||||||
#include "weapons.h"
|
#include "Weapons.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "Multilingual Text Code Generator.h"
|
#include "Multilingual Text Code Generator.h"
|
||||||
|
|||||||
+5
-5
@@ -1,14 +1,14 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "font control.h"
|
#include "Font Control.h"
|
||||||
#include "cursor control.h"
|
#include "Cursor Control.h"
|
||||||
#include "render dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "Line.h"
|
#include "line.h"
|
||||||
#include "Intro.h"
|
#include "Intro.h"
|
||||||
#include "Cinematics.h"
|
#include "Cinematics.h"
|
||||||
#include "Cinematics Bink.h"
|
#include "Cinematics Bink.h"
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "mainmenuscreen.h"
|
#include "mainmenuscreen.h"
|
||||||
#include "Video.h"
|
#include "video.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
+18
-18
@@ -4,7 +4,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "Render Fun.h"
|
#include "Render Fun.h"
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include "debug.h"
|
#include "DEBUG.H"
|
||||||
#include "MemMan.h"
|
#include "MemMan.h"
|
||||||
#include "Overhead Types.h"
|
#include "Overhead Types.h"
|
||||||
//#include "Soldier Control.h"
|
//#include "Soldier Control.h"
|
||||||
@@ -12,21 +12,21 @@
|
|||||||
#include "Animation Data.h"
|
#include "Animation Data.h"
|
||||||
#include "Animation Control.h"
|
#include "Animation Control.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "pathai.h"
|
#include "PATHAI.H"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
#include "Isometric Utils.h"
|
#include "Isometric Utils.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "weapons.h"
|
#include "Weapons.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "Handle UI.h"
|
#include "Handle UI.h"
|
||||||
#include "Event pump.h"
|
#include "Event Pump.h"
|
||||||
#include "ai.h"
|
#include "ai.h"
|
||||||
#include "interface.h"
|
#include "Interface.h"
|
||||||
#include "lighting.h"
|
#include "lighting.h"
|
||||||
#include "faces.h"
|
#include "faces.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "soldier macros.h"
|
#include "Soldier macros.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
|
|
||||||
@@ -34,33 +34,33 @@
|
|||||||
#include "Networking.h"
|
#include "Networking.h"
|
||||||
#include "NetworkEvent.h"
|
#include "NetworkEvent.h"
|
||||||
#endif
|
#endif
|
||||||
#include "items.h"
|
#include "Items.h"
|
||||||
#include "Soundman.h"
|
#include "soundman.h"
|
||||||
#include "utilities.h"
|
#include "Utilities.h"
|
||||||
#include "Strategic.h"
|
#include "strategic.h"
|
||||||
#include "soldier tile.h"
|
#include "soldier tile.h"
|
||||||
#include "Smell.h"
|
#include "Smell.h"
|
||||||
#include "Keys.h"
|
#include "Keys.h"
|
||||||
#include "dialogue control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "soldier functions.h"
|
#include "Soldier Functions.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "SkillCheck.h"
|
#include "SkillCheck.h"
|
||||||
#include "interface dialogue.h"
|
#include "interface Dialogue.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "ShopKeeper Interface.h"
|
#include "ShopKeeper Interface.h"
|
||||||
#include "vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "morale.h"
|
#include "Morale.h"
|
||||||
#include "drugs and alcohol.h"
|
#include "Drugs And Alcohol.h"
|
||||||
#include "SkillCheck.h"
|
#include "SkillCheck.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "Buildings.h"
|
#include "Buildings.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
#include "civ quotes.h"
|
#include "Civ Quotes.h"
|
||||||
#include "Debug Control.h"
|
#include "Debug Control.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#ifndef JA25UPDATE__C_
|
#ifndef JA25UPDATE__C_
|
||||||
#define JA25UPDATE__C_
|
#define JA25UPDATE__C_
|
||||||
|
|
||||||
#include "Types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
#include "Debug.h"
|
#include "DEBUG.H"
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "render dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "UndergroundInit.h"
|
#include "UndergroundInit.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "fade screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "MercTextBox.h"
|
#include "MercTextBox.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "font control.h"
|
#include "Font Control.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "cursor control.h"
|
#include "Cursor Control.h"
|
||||||
#include "laptop.h"
|
#include "laptop.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "overhead map.h"
|
#include "overhead map.h"
|
||||||
#include "MPChatScreen.h"
|
#include "MPChatScreen.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "utilities.h"
|
#include "Utilities.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
|
||||||
#define CHATBOX_WIDTH 310 // 350 is the max size, the PrepareMercPopupBox will add the X_MARGIN to both sides
|
#define CHATBOX_WIDTH 310 // 350 is the max size, the PrepareMercPopupBox will add the X_MARGIN to both sides
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "MPConnectScreen.h"
|
#include "MPConnectScreen.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "wCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Input.h"
|
#include "input.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "English.h"
|
#include "english.h"
|
||||||
#include "Sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Fade Screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "network.h" // for client name
|
#include "network.h" // for client name
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "init.h"
|
#include "Init.h"
|
||||||
#include "xml.h"
|
#include "XML.h"
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "MPHostScreen.h"
|
#include "MPHostScreen.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "wCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Input.h"
|
#include "input.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "English.h"
|
#include "english.h"
|
||||||
#include "Sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Fade Screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Intro.h"
|
#include "Intro.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "network.h"
|
#include "network.h"
|
||||||
#include "saveloadscreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
|
|
||||||
#include "GameInitOptionsScreen.h"
|
#include "GameInitOptionsScreen.h"
|
||||||
|
|
||||||
@@ -31,9 +31,9 @@
|
|||||||
#include <vfs/Tools/vfs_property_container.h>
|
#include <vfs/Tools/vfs_property_container.h>
|
||||||
#include <vfs/Core/vfs_os_functions.h>
|
#include <vfs/Core/vfs_os_functions.h>
|
||||||
#include "MPJoinScreen.h"
|
#include "MPJoinScreen.h"
|
||||||
#include "MainMenuScreen.h"
|
#include "mainmenuscreen.h"
|
||||||
#include "Init.h"
|
#include "Init.h"
|
||||||
#include "xml.h"
|
#include "XML.h"
|
||||||
|
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "MPJoinScreen.h"
|
#include "MPJoinScreen.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "wCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Input.h"
|
#include "input.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "English.h"
|
#include "english.h"
|
||||||
#include "Sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Fade Screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
@@ -20,15 +20,15 @@
|
|||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "network.h" // for client name
|
#include "network.h" // for client name
|
||||||
#include "saveloadscreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
#include "game init.h"
|
#include "Game Init.h"
|
||||||
|
|
||||||
#include <vfs/Core/vfs.h>
|
#include <vfs/Core/vfs.h>
|
||||||
#include <vfs/Core/vfs_init.h>
|
#include <vfs/Core/vfs_init.h>
|
||||||
#include <vfs/Tools/vfs_property_container.h>
|
#include <vfs/Tools/vfs_property_container.h>
|
||||||
#include <vfs/Core/vfs_os_functions.h>
|
#include <vfs/Core/vfs_os_functions.h>
|
||||||
|
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
|
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "MPScoreScreen.h"
|
#include "MPScoreScreen.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "wCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Input.h"
|
#include "input.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "English.h"
|
#include "english.h"
|
||||||
#include "Sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Fade Screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "Cursor Control.h"
|
#include "Cursor Control.h"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "Intro.h"
|
#include "Intro.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
|
|||||||
+14
-14
@@ -4,35 +4,35 @@
|
|||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "MercTextBox.h"
|
#include "MercTextBox.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "font control.h"
|
#include "Font Control.h"
|
||||||
#include "mainmenuscreen.h"
|
#include "mainmenuscreen.h"
|
||||||
#include "cursor control.h"
|
#include "Cursor Control.h"
|
||||||
#include "render dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "music control.h"
|
#include "Music Control.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "SaveLoadScreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "SaveLoadGame.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "English.h"
|
#include "english.h"
|
||||||
#include "Gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "Game Init.h"
|
#include "Game Init.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
#include "Encrypted File.h"
|
#include "Encrypted File.h"
|
||||||
#include "ja2 splash.h"
|
#include "JA2 Splash.h"
|
||||||
#include "GameVersion.h"
|
#include "GameVersion.h"
|
||||||
|
|
||||||
#include "gamesettings.h"
|
#include "GameSettings.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "strategic movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "overhead.h"
|
#include "Overhead.h"
|
||||||
#include "init.h"
|
#include "Init.h"
|
||||||
#include "xml.h"
|
#include "XML.h"
|
||||||
#include <vfs/Core/vfs.h>
|
#include <vfs/Core/vfs.h>
|
||||||
#include <vfs/Core/vfs_profile.h>
|
#include <vfs/Core/vfs_profile.h>
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "fade screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "MercTextBox.h"
|
#include "MercTextBox.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "messageboxscreen.h"
|
#include "MessageBoxScreen.h"
|
||||||
#include "font control.h"
|
#include "Font Control.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "cursor control.h"
|
#include "Cursor Control.h"
|
||||||
#include "laptop.h"
|
#include "laptop.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "overhead map.h"
|
#include "overhead map.h"
|
||||||
#include "DropDown.h" // added by Flugente
|
#include "DropDown.h" // added by Flugente
|
||||||
|
|||||||
+10
-10
@@ -1,6 +1,6 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "Video.h"
|
#include "video.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
@@ -11,24 +11,24 @@
|
|||||||
#include "WCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "Slider.h"
|
#include "Slider.h"
|
||||||
#include "Debug.h"
|
#include "DEBUG.H"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
#include "Sound Control.h"
|
#include "Sound Control.h"
|
||||||
#include "soundman.h"
|
#include "soundman.h"
|
||||||
#include "Ambient Control.h"
|
#include "Ambient Control.h"
|
||||||
#include "Worlddat.h"
|
#include "WorldDat.h"
|
||||||
#include "Worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Game Init.h"
|
#include "Game Init.h"
|
||||||
#include "English.h"
|
#include "english.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Gap.h"
|
#include "GAP.H"
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "SysUtil.h"
|
#include "sysutil.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "Message.h"
|
#include "message.h"
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "SmokeEffects.h"
|
#include "SmokeEffects.h"
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#include "Cheats.h"
|
#include "Cheats.h"
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
#include "WorldMan.h"
|
#include "worldman.h"
|
||||||
#include "Init.h"
|
#include "Init.h"
|
||||||
#include "Game Events.h"
|
#include "Game Events.h"
|
||||||
#include "PostalService.h"
|
#include "PostalService.h"
|
||||||
|
|||||||
+162
-296
@@ -1,32 +1,32 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "FileMan.h"
|
#include "FileMan.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "Debug.h"
|
#include "DEBUG.H"
|
||||||
#include "OverHead.h"
|
#include "Overhead.h"
|
||||||
#include "Keys.h"
|
#include "Keys.h"
|
||||||
#include "finances.h"
|
#include "finances.h"
|
||||||
#include "History.h"
|
#include "history.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
#include "Laptop.h"
|
#include "laptop.h"
|
||||||
#include "iniReader.h"
|
#include "INIReader.h"
|
||||||
#include "Email.h"
|
#include "email.h"
|
||||||
#include "Strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Game Events.h"
|
#include "Game Events.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
#include "WorldDef.h"
|
#include "worlddef.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Queen Command.h"
|
#include "Queen Command.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "SaveLoadGame.h"
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
#include "Environment.h"
|
#include "environment.h"
|
||||||
#include "Lighting.h"
|
#include "lighting.h"
|
||||||
#include "Strategic Movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Strategic.h"
|
#include "strategic.h"
|
||||||
#include "Isometric Utils.h"
|
#include "Isometric Utils.h"
|
||||||
#include "Quests.h"
|
#include "Quests.h"
|
||||||
#include "opplist.h"
|
#include "opplist.h"
|
||||||
@@ -38,17 +38,17 @@
|
|||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Music Control.h"
|
#include "Music Control.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "Ai.h"
|
#include "ai.h"
|
||||||
#include "RenderWorld.h"
|
#include "renderworld.h"
|
||||||
#include "SmokeEffects.h"
|
#include "SmokeEffects.h"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Map Screen Interface Border.h"
|
#include "Map Screen Interface Border.h"
|
||||||
#include "Map Screen Interface Bottom.h"
|
#include "Map Screen Interface Bottom.h"
|
||||||
|
|
||||||
#include "Interface.h"
|
#include "Interface.h"
|
||||||
#include "Map Screen Helicopter.h"
|
#include "Map Screen Helicopter.h"
|
||||||
#include "Environment.h"
|
#include "environment.h"
|
||||||
#include "Arms Dealer Init.h"
|
#include "Arms Dealer Init.h"
|
||||||
#include "Tactical Placement GUI.h"
|
#include "Tactical Placement GUI.h"
|
||||||
|
|
||||||
@@ -57,43 +57,43 @@
|
|||||||
#include "Vehicles.h"
|
#include "Vehicles.h"
|
||||||
#include "Merc Contract.h"
|
#include "Merc Contract.h"
|
||||||
#include "Bullets.h"
|
#include "Bullets.h"
|
||||||
#include "air raid.h"
|
#include "Air Raid.h"
|
||||||
#include "physics.h"
|
#include "physics.h"
|
||||||
#include "Strategic Pathing.h"
|
#include "Strategic Pathing.h"
|
||||||
|
|
||||||
#include "TeamTurns.h"
|
#include "TeamTurns.h"
|
||||||
|
|
||||||
#include "explosion control.h"
|
#include "Explosion Control.h"
|
||||||
#include "Creature Spreading.h"
|
#include "Creature Spreading.h"
|
||||||
#include "Strategic Status.h"
|
#include "Strategic Status.h"
|
||||||
#include "Prebattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
#include "Boxing.h"
|
#include "Boxing.h"
|
||||||
#include "Strategic AI.h"
|
#include "Strategic AI.h"
|
||||||
#include "Map Screen Interface Map.h"
|
#include "Map Screen Interface Map.h"
|
||||||
|
|
||||||
#include "Meanwhile.h"
|
#include "Meanwhile.h"
|
||||||
#include "dialogue control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "lighteffects.h"
|
#include "LightEffects.h"
|
||||||
#include "HelpScreen.h"
|
#include "HelpScreen.h"
|
||||||
#include "Animated ProgressBar.h"
|
#include "Animated ProgressBar.h"
|
||||||
#include "merctextbox.h"
|
#include "MercTextBox.h"
|
||||||
#include "render dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "Interface Items.h"
|
#include "Interface Items.h"
|
||||||
#include "Civ Quotes.h"
|
#include "Civ Quotes.h"
|
||||||
#include "Scheduling.h"
|
#include "Scheduling.h"
|
||||||
#include "Animation Data.h"
|
#include "Animation Data.h"
|
||||||
#include "Game Init.h"
|
#include "Game Init.h"
|
||||||
#include "cheats.h"
|
#include "Cheats.h"
|
||||||
#include "Strategic Event Handler.h"
|
#include "Strategic Event Handler.h"
|
||||||
#include "interface panels.h"
|
#include "Interface Panels.h"
|
||||||
#include "interface dialogue.h"
|
#include "interface Dialogue.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "Interface Items.h"
|
#include "Interface Items.h"
|
||||||
#include "Shopkeeper Interface.h"
|
#include "ShopKeeper Interface.h"
|
||||||
#include "postalservice.h"
|
#include "PostalService.h"
|
||||||
// HEADROCK HAM B1: Additional Include for HAM
|
// HEADROCK HAM B1: Additional Include for HAM
|
||||||
#include "MilitiaSquads.h"
|
#include "MilitiaSquads.h"
|
||||||
// HEADROCK HAM 3.5: Another include for HAM
|
// HEADROCK HAM 3.5: Another include for HAM
|
||||||
@@ -110,17 +110,17 @@
|
|||||||
#include "Rebel Command.h"
|
#include "Rebel Command.h"
|
||||||
|
|
||||||
#include "BobbyR.h"
|
#include "BobbyR.h"
|
||||||
#include "Imp Portraits.h"
|
#include "IMP Portraits.h"
|
||||||
#include "Loading Screen.h"
|
#include "Loading Screen.h"
|
||||||
#include "Interface Utils.h"
|
#include "Interface Utils.h"
|
||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
#include "IMP Confirm.h"
|
#include "IMP Confirm.h"
|
||||||
#include "Enemy Soldier Save.h"
|
#include "Enemy Soldier Save.h"
|
||||||
#include "BobbyRMailOrder.h"
|
#include "BobbyRMailOrder.h"
|
||||||
#include "Mercs.h"
|
#include "mercs.h"
|
||||||
#include "INIReader.h"
|
#include "INIReader.h"
|
||||||
#include "mercs.h"
|
#include "mercs.h"
|
||||||
#include "soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Ja25 Strategic Ai.h"
|
#include "Ja25 Strategic Ai.h"
|
||||||
#include "Ja25_Tactical.h"
|
#include "Ja25_Tactical.h"
|
||||||
@@ -233,7 +233,7 @@ typedef struct
|
|||||||
BOOLEAN fHavePurchasedItemsFromTony;
|
BOOLEAN fHavePurchasedItemsFromTony;
|
||||||
|
|
||||||
//The selected soldier in tactical
|
//The selected soldier in tactical
|
||||||
UINT16 usSelectedSoldier;
|
SoldierID usSelectedSoldier;
|
||||||
|
|
||||||
// The x and y scroll position
|
// The x and y scroll position
|
||||||
INT16 sRenderCenterX;
|
INT16 sRenderCenterX;
|
||||||
@@ -297,15 +297,15 @@ typedef struct
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN fSkyriderEmptyHelpGiven;
|
BOOLEAN fSkyriderEmptyHelpGiven;
|
||||||
BOOLEAN fEnterMapDueToContract;
|
BOOLEAN fEnterMapDueToContract;
|
||||||
UINT8 ubHelicopterHitsTaken;
|
UINT8 ubHelicopterHitsTaken;
|
||||||
UINT8 ubQuitType;
|
UINT8 ubQuitType;
|
||||||
BOOLEAN fSkyriderSaidCongratsOnTakingSAM;
|
BOOLEAN fSkyriderSaidCongratsOnTakingSAM;
|
||||||
INT16 sContractRehireSoldierID;
|
SoldierID sContractRehireSoldierID;
|
||||||
|
|
||||||
|
|
||||||
GAME_OPTIONS GameOptions;
|
GAME_OPTIONS GameOptions;
|
||||||
|
|
||||||
UINT32 uiSeedNumber;
|
UINT32 uiSeedNumber;
|
||||||
|
|
||||||
@@ -314,7 +314,7 @@ typedef struct
|
|||||||
|
|
||||||
INT16 sCurInterfacePanel;
|
INT16 sCurInterfacePanel;
|
||||||
|
|
||||||
UINT8 ubSMCurrentMercID;
|
SoldierID ubSMCurrentMercID;
|
||||||
|
|
||||||
BOOLEAN fFirstTimeInMapScreen;
|
BOOLEAN fFirstTimeInMapScreen;
|
||||||
|
|
||||||
@@ -322,9 +322,9 @@ typedef struct
|
|||||||
|
|
||||||
BOOLEAN fDisableMapInterfaceDueToBattle;
|
BOOLEAN fDisableMapInterfaceDueToBattle;
|
||||||
|
|
||||||
INT32 sBoxerGridNo[ NUM_BOXERS ];
|
INT32 sBoxerGridNo[ NUM_BOXERS ];
|
||||||
UINT8 ubBoxerID[ NUM_BOXERS ];
|
SoldierID ubBoxerID[ NUM_BOXERS ];
|
||||||
BOOLEAN fBoxerFought[ NUM_BOXERS ];
|
BOOLEAN fBoxerFought[ NUM_BOXERS ];
|
||||||
|
|
||||||
BOOLEAN fHelicopterDestroyed; //if the chopper is destroyed
|
BOOLEAN fHelicopterDestroyed; //if the chopper is destroyed
|
||||||
BOOLEAN fShowMapScreenHelpText; //If true, displays help in mapscreen
|
BOOLEAN fShowMapScreenHelpText; //If true, displays help in mapscreen
|
||||||
@@ -342,8 +342,8 @@ typedef struct
|
|||||||
|
|
||||||
BOOLEAN ubPlayerProgressSkyriderLastCommentedOn;
|
BOOLEAN ubPlayerProgressSkyriderLastCommentedOn;
|
||||||
|
|
||||||
BOOLEAN gfMeanwhileTryingToStart;
|
BOOLEAN gfMeanwhileTryingToStart;
|
||||||
BOOLEAN gfInMeanwhile;
|
BOOLEAN gfInMeanwhile;
|
||||||
|
|
||||||
// list of dead guys for squads...in id values->-1 means no one home
|
// list of dead guys for squads...in id values->-1 means no one home
|
||||||
INT16 sDeadMercs[ NUMBER_OF_SQUADS ][ NUMBER_OF_SOLDIERS_PER_SQUAD ];
|
INT16 sDeadMercs[ NUMBER_OF_SQUADS ][ NUMBER_OF_SOLDIERS_PER_SQUAD ];
|
||||||
@@ -413,7 +413,7 @@ typedef struct
|
|||||||
|
|
||||||
UINT32 uiMeanWhileFlags;
|
UINT32 uiMeanWhileFlags;
|
||||||
|
|
||||||
INT8 bSelectedInfoChar;
|
INT16 bSelectedInfoChar;
|
||||||
INT8 bHospitalPriceModifier;
|
INT8 bHospitalPriceModifier;
|
||||||
INT8 bUnused2[ 2 ];
|
INT8 bUnused2[ 2 ];
|
||||||
|
|
||||||
@@ -551,8 +551,8 @@ BOOLEAN SetMercsInsertionGridNo( );
|
|||||||
BOOLEAN LoadOppListInfoFromSavedGame( HWFILE hFile );
|
BOOLEAN LoadOppListInfoFromSavedGame( HWFILE hFile );
|
||||||
BOOLEAN SaveOppListInfoToSavedGame( HWFILE hFile );
|
BOOLEAN SaveOppListInfoToSavedGame( HWFILE hFile );
|
||||||
|
|
||||||
BOOLEAN LoadMercPathToSoldierStruct( HWFILE hFilem, UINT8 ubID );
|
BOOLEAN LoadMercPathToSoldierStruct( HWFILE hFilem, UINT16 ubID );
|
||||||
BOOLEAN SaveMercPathFromSoldierStruct( HWFILE hFilem, UINT8 ubID );
|
BOOLEAN SaveMercPathFromSoldierStruct( HWFILE hFilem, UINT16 ubID );
|
||||||
|
|
||||||
BOOLEAN LoadGeneralInfo( HWFILE hFile );
|
BOOLEAN LoadGeneralInfo( HWFILE hFile );
|
||||||
BOOLEAN SaveGeneralInfo( HWFILE hFile );
|
BOOLEAN SaveGeneralInfo( HWFILE hFile );
|
||||||
@@ -1074,7 +1074,7 @@ BOOLEAN ITEM_CURSOR_SAVE_INFO::Load(HWFILE hFile)
|
|||||||
if ( guiCurrentSaveGameVersion >= NIV_SAVEGAME_DATATYPE_CHANGE )
|
if ( guiCurrentSaveGameVersion >= NIV_SAVEGAME_DATATYPE_CHANGE )
|
||||||
{
|
{
|
||||||
//3 bytes of info, screw being neat
|
//3 bytes of info, screw being neat
|
||||||
if ( !FileRead( hFile, this, 3, &uiNumBytesRead ) )
|
if ( !FileRead( hFile, this, SIZEOF_ITEM_CURSOR_SAVE_INFO_POD, &uiNumBytesRead ) )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1103,7 +1103,7 @@ BOOLEAN ITEM_CURSOR_SAVE_INFO::Save(HWFILE hFile)
|
|||||||
{
|
{
|
||||||
UINT32 uiNumBytesWritten;
|
UINT32 uiNumBytesWritten;
|
||||||
//3 bytes of info, screw being neat
|
//3 bytes of info, screw being neat
|
||||||
if ( !FileWrite( hFile, this, 3, &uiNumBytesWritten ) )
|
if ( !FileWrite( hFile, this, SIZEOF_ITEM_CURSOR_SAVE_INFO_POD, &uiNumBytesWritten ) )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1467,7 +1467,17 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
|
|||||||
numBytesRead = ReadFieldByField( hFile, &this->ubLastDateSpokenTo, sizeof(this->ubLastDateSpokenTo), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->ubLastDateSpokenTo, sizeof(this->ubLastDateSpokenTo), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bLastQuoteSaidWasSpecial, sizeof(this->bLastQuoteSaidWasSpecial), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bLastQuoteSaidWasSpecial, sizeof(this->bLastQuoteSaidWasSpecial), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bSectorZ, sizeof(this->bSectorZ), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bSectorZ, sizeof(this->bSectorZ), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->usStrategicInsertionData, sizeof(this->usStrategicInsertionData), sizeof(UINT16), numBytesRead);
|
|
||||||
|
if ( guiCurrentSaveGameVersion >= MERC_PROFILE_INSERTION_DATA )
|
||||||
|
{
|
||||||
|
numBytesRead = ReadFieldByField( hFile, &this->usStrategicInsertionData, sizeof( this->usStrategicInsertionData ), sizeof( UINT32 ), numBytesRead );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
numBytesRead = ReadFieldByField( hFile, &this->usStrategicInsertionData, sizeof(UINT16), sizeof(UINT16), numBytesRead);
|
||||||
|
buffer += 4; // To make numBytesRead check match the struct size. 2 bytes from uint32 - uint16 and 2 bytes due to struct memory layout change when usStrategicInsertionData was increased to uint32
|
||||||
|
}
|
||||||
|
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bFriendlyOrDirectDefaultResponseUsedRecently, sizeof(this->bFriendlyOrDirectDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bFriendlyOrDirectDefaultResponseUsedRecently, sizeof(this->bFriendlyOrDirectDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bRecruitDefaultResponseUsedRecently, sizeof(this->bRecruitDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bRecruitDefaultResponseUsedRecently, sizeof(this->bRecruitDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->bThreatenDefaultResponseUsedRecently, sizeof(this->bThreatenDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField( hFile, &this->bThreatenDefaultResponseUsedRecently, sizeof(this->bThreatenDefaultResponseUsedRecently), sizeof(INT8), numBytesRead);
|
||||||
@@ -1937,7 +1947,7 @@ use of this function should allow changes to be made to various structures withi
|
|||||||
INT32 ReadFieldByField(HWFILE hFile, PTR pDest, UINT32 uiFieldSize, UINT32 uiElementSize, UINT32 uiCurByteCount)
|
INT32 ReadFieldByField(HWFILE hFile, PTR pDest, UINT32 uiFieldSize, UINT32 uiElementSize, UINT32 uiCurByteCount)
|
||||||
{
|
{
|
||||||
UINT32 uiNumBytesRead;
|
UINT32 uiNumBytesRead;
|
||||||
char padding[10];
|
char padding[10];
|
||||||
UINT32 uiBytesRead = uiCurByteCount; // used to track our new byte count
|
UINT32 uiBytesRead = uiCurByteCount; // used to track our new byte count
|
||||||
UINT32 sampleBytesRead = uiBytesRead; // used to determine how much padding is needed
|
UINT32 sampleBytesRead = uiBytesRead; // used to determine how much padding is needed
|
||||||
|
|
||||||
@@ -1970,8 +1980,10 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
//the soldier type info has changed at version 102
|
//the soldier type info has changed at version 102
|
||||||
//CHRISL: To accomodate future changes to this structure, we'll load each value field by field
|
//CHRISL: To accomodate future changes to this structure, we'll load each value field by field
|
||||||
numBytesRead = 0;
|
numBytesRead = 0;
|
||||||
FileRead( hFile, this, (offsetof(SOLDIERTYPE, ubBodyType)+sizeof(ubBodyType)), &uiNumBytesRead );
|
numBytesRead = ReadFieldByField(hFile, &this->ubID, sizeof(ubID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead += uiNumBytesRead;
|
numBytesRead = ReadFieldByField(hFile, &this->name, sizeof(name), sizeof(CHAR16), numBytesRead);
|
||||||
|
numBytesRead = ReadFieldByField(hFile, &this->ubBodyType, sizeof(ubBodyType), sizeof(UINT8), numBytesRead);
|
||||||
|
|
||||||
if(guiCurrentSaveGameVersion >= AP100_SAVEGAME_DATATYPE_CHANGE)
|
if(guiCurrentSaveGameVersion >= AP100_SAVEGAME_DATATYPE_CHANGE)
|
||||||
{ //CHRISL: It was changed at version 104 to allow for 16bit action points for the 100AP system
|
{ //CHRISL: It was changed at version 104 to allow for 16bit action points for the 100AP system
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bActionPoints, sizeof(bActionPoints), sizeof(INT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bActionPoints, sizeof(bActionPoints), sizeof(INT16), numBytesRead);
|
||||||
@@ -1999,7 +2011,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->ubWaitActionToDo, sizeof(ubWaitActionToDo), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubWaitActionToDo, sizeof(ubWaitActionToDo), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubInsertionDirection, sizeof(ubInsertionDirection), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubInsertionDirection, sizeof(ubInsertionDirection), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bGunType, sizeof(bGunType), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bGunType, sizeof(bGunType), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubOppNum, sizeof(ubOppNum), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubOppNum, sizeof(ubOppNum), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bLastRenderVisibleValue, sizeof(bLastRenderVisibleValue), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bLastRenderVisibleValue, sizeof(bLastRenderVisibleValue), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubAttackingHand, sizeof(ubAttackingHand), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubAttackingHand, sizeof(ubAttackingHand), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->sWeightCarriedAtTurnStart, sizeof(sWeightCarriedAtTurnStart), sizeof(INT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->sWeightCarriedAtTurnStart, sizeof(sWeightCarriedAtTurnStart), sizeof(INT16), numBytesRead);
|
||||||
@@ -2043,8 +2055,8 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->usAnimState, sizeof(usAnimState), sizeof(UINT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->usAnimState, sizeof(usAnimState), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->uiAIDelay, sizeof(uiAIDelay), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->uiAIDelay, sizeof(uiAIDelay), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->sReloadDelay, sizeof(sReloadDelay), sizeof(INT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->sReloadDelay, sizeof(sReloadDelay), sizeof(INT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubAttackerID, sizeof(ubAttackerID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubAttackerID, sizeof(ubAttackerID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubPreviousAttackerID, sizeof(ubPreviousAttackerID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubPreviousAttackerID, sizeof(ubPreviousAttackerID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->sInsertionGridNo, sizeof(sInsertionGridNo), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->sInsertionGridNo, sizeof(sInsertionGridNo), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->AnimCache, sizeof(AnimCache), 1, numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->AnimCache, sizeof(AnimCache), 1, numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bSide, sizeof(bSide), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bSide, sizeof(bSide), sizeof(UINT8), numBytesRead);
|
||||||
@@ -2124,7 +2136,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->pCurrentShade, sizeof(pCurrentShade), sizeof(UINT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->pCurrentShade, sizeof(pCurrentShade), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubFadeLevel, sizeof(ubFadeLevel), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubFadeLevel, sizeof(ubFadeLevel), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubServiceCount, sizeof(ubServiceCount), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubServiceCount, sizeof(ubServiceCount), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubServicePartner, sizeof(ubServicePartner), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubServicePartner, sizeof(ubServicePartner), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->pThrowParams, sizeof(pThrowParams), 4, numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->pThrowParams, sizeof(pThrowParams), 4, numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bReverse, sizeof(bReverse), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bReverse, sizeof(bReverse), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->pLevelNode, sizeof(pLevelNode), 4, numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->pLevelNode, sizeof(pLevelNode), 4, numBytesRead);
|
||||||
@@ -2222,7 +2234,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->iTotalLengthOfInsuranceContract, sizeof(iTotalLengthOfInsuranceContract), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->iTotalLengthOfInsuranceContract, sizeof(iTotalLengthOfInsuranceContract), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubSoldierClass, sizeof(ubSoldierClass), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubSoldierClass, sizeof(ubSoldierClass), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubAPsLostToSuppression, sizeof(ubAPsLostToSuppression), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubAPsLostToSuppression, sizeof(ubAPsLostToSuppression), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubSuppressorID, sizeof(ubSuppressorID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubSuppressorID, sizeof(ubSuppressorID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubDesiredSquadAssignment, sizeof(ubDesiredSquadAssignment), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubDesiredSquadAssignment, sizeof(ubDesiredSquadAssignment), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubNumTraversalsAllowedToMerge, sizeof(ubNumTraversalsAllowedToMerge), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubNumTraversalsAllowedToMerge, sizeof(ubNumTraversalsAllowedToMerge), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usPendingAnimation2, sizeof(usPendingAnimation2), sizeof(UINT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->usPendingAnimation2, sizeof(usPendingAnimation2), sizeof(UINT16), numBytesRead);
|
||||||
@@ -2234,7 +2246,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->bBlockedByAnotherMercDirection, sizeof(bBlockedByAnotherMercDirection), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bBlockedByAnotherMercDirection, sizeof(bBlockedByAnotherMercDirection), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usAttackingWeapon, sizeof(usAttackingWeapon), sizeof(UINT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->usAttackingWeapon, sizeof(usAttackingWeapon), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bWeaponMode, sizeof(bWeaponMode), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bWeaponMode, sizeof(bWeaponMode), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubTargetID, sizeof(ubTargetID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubTargetID, sizeof(ubTargetID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bAIScheduleProgress, sizeof(bAIScheduleProgress), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bAIScheduleProgress, sizeof(bAIScheduleProgress), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->sOffWorldGridNo, sizeof(sOffWorldGridNo), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->sOffWorldGridNo, sizeof(sOffWorldGridNo), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->pAniTile, sizeof(pAniTile), 1, numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->pAniTile, sizeof(pAniTile), 1, numBytesRead);
|
||||||
@@ -2255,8 +2267,8 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->bOldBattleSnd, sizeof(bOldBattleSnd), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bOldBattleSnd, sizeof(bOldBattleSnd), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->iBurstSoundID, sizeof(iBurstSoundID), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->iBurstSoundID, sizeof(iBurstSoundID), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bSlotItemTakenFrom, sizeof(bSlotItemTakenFrom), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bSlotItemTakenFrom, sizeof(bSlotItemTakenFrom), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubAutoBandagingMedic, sizeof(ubAutoBandagingMedic), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubAutoBandagingMedic, sizeof(ubAutoBandagingMedic), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubRobotRemoteHolderID, sizeof(ubRobotRemoteHolderID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubRobotRemoteHolderID, sizeof(ubRobotRemoteHolderID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->uiTimeOfLastContractUpdate, sizeof(uiTimeOfLastContractUpdate), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->uiTimeOfLastContractUpdate, sizeof(uiTimeOfLastContractUpdate), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bTypeOfLastContract, sizeof(bTypeOfLastContract), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bTypeOfLastContract, sizeof(bTypeOfLastContract), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bTurnsCollapsed, sizeof(bTurnsCollapsed), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bTurnsCollapsed, sizeof(bTurnsCollapsed), sizeof(INT8), numBytesRead);
|
||||||
@@ -2275,7 +2287,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->bRegenBoostersUsedToday, sizeof(bRegenBoostersUsedToday), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bRegenBoostersUsedToday, sizeof(bRegenBoostersUsedToday), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bNumPelletsHitBy, sizeof(bNumPelletsHitBy), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bNumPelletsHitBy, sizeof(bNumPelletsHitBy), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->sSkillCheckGridNo, sizeof(sSkillCheckGridNo), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->sSkillCheckGridNo, sizeof(sSkillCheckGridNo), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubLastEnemyCycledID, sizeof(ubLastEnemyCycledID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubLastEnemyCycledID, sizeof(ubLastEnemyCycledID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubPrevSectorID, sizeof(ubPrevSectorID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubPrevSectorID, sizeof(ubPrevSectorID), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubNumTilesMovesSinceLastForget, sizeof(ubNumTilesMovesSinceLastForget), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubNumTilesMovesSinceLastForget, sizeof(ubNumTilesMovesSinceLastForget), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bTurningIncrement, sizeof(bTurningIncrement), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bTurningIncrement, sizeof(bTurningIncrement), sizeof(INT8), numBytesRead);
|
||||||
@@ -2283,7 +2295,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->usValueGoneUp, sizeof(usValueGoneUp), sizeof(UINT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->usValueGoneUp, sizeof(usValueGoneUp), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubNumLocateCycles, sizeof(ubNumLocateCycles), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubNumLocateCycles, sizeof(ubNumLocateCycles), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubDelayedMovementFlags, sizeof(ubDelayedMovementFlags), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubDelayedMovementFlags, sizeof(ubDelayedMovementFlags), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubCTGTTargetID, sizeof(ubCTGTTargetID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubCTGTTargetID, sizeof(ubCTGTTargetID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->uiMercChecksum, sizeof(uiMercChecksum), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->uiMercChecksum, sizeof(uiMercChecksum), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bCurrentCivQuote, sizeof(bCurrentCivQuote), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bCurrentCivQuote, sizeof(bCurrentCivQuote), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bCurrentCivQuoteDelta, sizeof(bCurrentCivQuoteDelta), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bCurrentCivQuoteDelta, sizeof(bCurrentCivQuoteDelta), sizeof(INT8), numBytesRead);
|
||||||
@@ -2301,7 +2313,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->ubDoorOpeningNoise, sizeof(ubDoorOpeningNoise), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubDoorOpeningNoise, sizeof(ubDoorOpeningNoise), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->pGroup, sizeof(pGroup), 1, numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->pGroup, sizeof(pGroup), 1, numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubLeaveHistoryCode, sizeof(ubLeaveHistoryCode), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubLeaveHistoryCode, sizeof(ubLeaveHistoryCode), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bOverrideMoveSpeed, sizeof(bOverrideMoveSpeed), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bOverrideMoveSpeed, sizeof(bOverrideMoveSpeed), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->uiTimeSoldierWillArrive, sizeof(uiTimeSoldierWillArrive), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->uiTimeSoldierWillArrive, sizeof(uiTimeSoldierWillArrive), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bVehicleUnderRepairID, sizeof(bVehicleUnderRepairID), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bVehicleUnderRepairID, sizeof(bVehicleUnderRepairID), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->iTimeCanSignElsewhere, sizeof(iTimeCanSignElsewhere), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->iTimeCanSignElsewhere, sizeof(iTimeCanSignElsewhere), sizeof(INT32), numBytesRead);
|
||||||
@@ -2314,7 +2326,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->ubLastDamageReason, sizeof(ubLastDamageReason), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubLastDamageReason, sizeof(ubLastDamageReason), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->sLastTwoLocations, sizeof(sLastTwoLocations), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->sLastTwoLocations, sizeof(sLastTwoLocations), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->uiTimeSinceLastBleedGrunt, sizeof(uiTimeSinceLastBleedGrunt), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->uiTimeSinceLastBleedGrunt, sizeof(uiTimeSinceLastBleedGrunt), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubNextToPreviousAttackerID, sizeof(ubNextToPreviousAttackerID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubNextToPreviousAttackerID, sizeof(ubNextToPreviousAttackerID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bDoAutofire, sizeof(bDoAutofire), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bDoAutofire, sizeof(bDoAutofire), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->numFlanks, sizeof(numFlanks), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->numFlanks, sizeof(numFlanks), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->lastFlankSpot, sizeof(lastFlankSpot), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->lastFlankSpot, sizeof(lastFlankSpot), sizeof(INT32), numBytesRead);
|
||||||
@@ -2341,9 +2353,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->bScopeMode, sizeof(bScopeMode), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->bScopeMode, sizeof(bScopeMode), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubMilitiaAssists, sizeof(ubMilitiaAssists), sizeof(UINT8), numBytesRead );
|
numBytesRead = ReadFieldByField(hFile, &this->ubMilitiaAssists, sizeof(ubMilitiaAssists), sizeof(UINT8), numBytesRead );
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->sNonNPCTraderID, sizeof(sNonNPCTraderID), sizeof(INT8), numBytesRead );
|
numBytesRead = ReadFieldByField(hFile, &this->sNonNPCTraderID, sizeof(sNonNPCTraderID), sizeof(INT8), numBytesRead );
|
||||||
//numBytesRead = ReadFieldByField(hFile, &this->bUnusedINT8_3, sizeof(bUnusedINT8_3), sizeof(INT8), numBytesRead );
|
numBytesRead = ReadFieldByField(hFile, &this->usDragPersonID, sizeof(usDragPersonID), sizeof(UINT16), numBytesRead );
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usDragPersonID, sizeof(usDragPersonID), sizeof(UINT8), numBytesRead );
|
|
||||||
//numBytesRead = ReadFieldByField(hFile, &this->bUnusedINT16_4, sizeof(bUnusedINT16_4), sizeof(INT16), numBytesRead );
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->sDragCorpseID, sizeof(sDragCorpseID), sizeof(INT16), numBytesRead );
|
numBytesRead = ReadFieldByField(hFile, &this->sDragCorpseID, sizeof(sDragCorpseID), sizeof(INT16), numBytesRead );
|
||||||
|
|
||||||
if ( guiCurrentSaveGameVersion < DRAGPERSONS )
|
if ( guiCurrentSaveGameVersion < DRAGPERSONS )
|
||||||
@@ -2462,10 +2472,10 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
|
|
||||||
if ( guiCurrentSaveGameVersion >= DISEASE_SYSTEM )
|
if ( guiCurrentSaveGameVersion >= DISEASE_SYSTEM )
|
||||||
{
|
{
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->sDiseasePoints, sizeof(sDiseasePoints), sizeof(INT32), numBytesRead );
|
numBytesRead = ReadFieldByField( hFile, &this->sDiseasePoints, sizeof(sDiseasePoints), sizeof(INT16), numBytesRead );
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->sDiseaseFlag, sizeof(sDiseaseFlag), sizeof(UINT8), numBytesRead );
|
numBytesRead = ReadFieldByField( hFile, &this->sDiseaseFlag, sizeof(sDiseaseFlag), sizeof(UINT8), numBytesRead );
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->ubFiller, sizeof( ubFiller ), sizeof( UINT8 ), numBytesRead );
|
numBytesRead = ReadFieldByField( hFile, &this->ubFiller, sizeof( ubFiller ), sizeof( UINT8 ), numBytesRead );
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->ubHoursRemainingOnMiniEvent, sizeof( ubHoursRemainingOnMiniEvent), sizeof( UINT8 ), numBytesRead );
|
numBytesRead = ReadFieldByField( hFile, &this->ubHoursRemainingOnMiniEvent, sizeof( ubHoursRemainingOnMiniEvent), sizeof( UINT16 ), numBytesRead );
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->usGLDelayMode, sizeof( usGLDelayMode ), sizeof( UINT8 ), numBytesRead );
|
numBytesRead = ReadFieldByField( hFile, &this->usGLDelayMode, sizeof( usGLDelayMode ), sizeof( UINT8 ), numBytesRead );
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->usBarrelMode, sizeof( usBarrelMode ), sizeof( UINT8 ), numBytesRead );
|
numBytesRead = ReadFieldByField( hFile, &this->usBarrelMode, sizeof( usBarrelMode ), sizeof( UINT8 ), numBytesRead );
|
||||||
numBytesRead = ReadFieldByField( hFile, &this->usBarrelCounter, sizeof( usBarrelCounter ), sizeof( UINT8 ), numBytesRead );
|
numBytesRead = ReadFieldByField( hFile, &this->usBarrelCounter, sizeof( usBarrelCounter ), sizeof( UINT8 ), numBytesRead );
|
||||||
@@ -2597,140 +2607,6 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
buffer++;
|
buffer++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if ( guiCurrentSaveGameVersion >= FOOD_CHANGES )
|
|
||||||
{
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bFoodLevel, sizeof(bFoodLevel), sizeof(INT32), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bDrinkLevel, sizeof(bDrinkLevel), sizeof(INT32), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usStarveDamageHealth, sizeof(usStarveDamageHealth), sizeof(UINT8), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usStarveDamageStrength, sizeof(usStarveDamageStrength), sizeof(UINT8), numBytesRead);
|
|
||||||
|
|
||||||
if ( guiCurrentSaveGameVersion >= MULTITURN_ACTIONS )
|
|
||||||
{
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bOverTurnAPS, sizeof(bOverTurnAPS), sizeof(INT16), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->sMTActionGridNo, sizeof(sMTActionGridNo), sizeof(INT32), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usMultiTurnAction, sizeof(usMultiTurnAction), sizeof(UINT8), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bAIIndex, sizeof(bAIIndex), sizeof(UINT16), numBytesRead);
|
|
||||||
|
|
||||||
if ( guiCurrentSaveGameVersion >= SOLDIER_PROFILES )
|
|
||||||
{
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usSoldierProfile, sizeof(usSoldierProfile), sizeof(UINT16), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usItemMoveSectorID, sizeof(usItemMoveSectorID), sizeof(UINT8), numBytesRead);
|
|
||||||
|
|
||||||
if ( guiCurrentSaveGameVersion >= SOLDIER_PROFILES )
|
|
||||||
{
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usSkillCounter, sizeof(usSkillCounter), sizeof(UINT16), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usSkillCooldown, sizeof(usSkillCooldown), sizeof(UINT32), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->usAISkillUse, sizeof(usAISkillUse), sizeof(UINT8), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubFiller, sizeof(ubFiller), sizeof(UINT8), numBytesRead);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for(UINT8 i = 0; i < SOLDIER_COUNTER_MAX; ++i)
|
|
||||||
this->usSkillCounter[i] = 0;
|
|
||||||
|
|
||||||
for(UINT8 i = 0; i < SOLDIER_COOLDOWN_MAX; ++i)
|
|
||||||
this->usSkillCooldown[i] = 0;
|
|
||||||
|
|
||||||
this->usAISkillUse = 0;
|
|
||||||
|
|
||||||
// as we added new variables, fillersize was reduced, here we account for that. We have to also read the existing fillers that now do not exist anymore
|
|
||||||
const UINT8 tmp = sizeof(usSkillCounter) + sizeof(usSkillCooldown) + sizeof(usAISkillUse);
|
|
||||||
UINT8 blarg[tmp];
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &blarg, tmp, sizeof(UINT8), numBytesRead);
|
|
||||||
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubFiller, sizeof(ubFiller), sizeof(UINT8), numBytesRead);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->usSoldierProfile = 0;
|
|
||||||
this->usItemMoveSectorID = 0;
|
|
||||||
|
|
||||||
// as we added new variables, fillersize was reduced, here we account for that. We have to also read the existing fillers that now do not exist anymore
|
|
||||||
const UINT8 tmp = sizeof(usSoldierProfile) + sizeof(usItemMoveSectorID);
|
|
||||||
UINT8 blarg[tmp];
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &blarg, tmp, sizeof(UINT8), numBytesRead);
|
|
||||||
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubFiller, sizeof(ubFiller), sizeof(UINT8), numBytesRead);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->bOverTurnAPS = 0;
|
|
||||||
this->sMTActionGridNo = NOWHERE;
|
|
||||||
this->usMultiTurnAction = 0;
|
|
||||||
this->bAIIndex = 0;
|
|
||||||
this->usSoldierProfile = 0;
|
|
||||||
this->usItemMoveSectorID = 0;
|
|
||||||
|
|
||||||
// as we added new variables, fillersize was reduced, here we account for that. We have to also read the existing fillers that now do not exist anymore
|
|
||||||
// +1 for padding
|
|
||||||
const UINT8 tmp = sizeof(bOverTurnAPS) + sizeof(this->sMTActionGridNo) + sizeof(usMultiTurnAction) + sizeof(bAIIndex) + 1 + sizeof(usSoldierProfile) + sizeof(usItemMoveSectorID);
|
|
||||||
UINT8 blarg[tmp];
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &blarg, tmp, sizeof(UINT8), numBytesRead);
|
|
||||||
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->ubFiller, sizeof(ubFiller), sizeof(UINT8), numBytesRead);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//CHRISL: We have to make sure we add a buffer to account for the lack of ubInterruptCounter and that buffer needs to be a full DWORD in size
|
|
||||||
for(int i = 0; i < sizeof(bFoodLevel); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(bDrinkLevel); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(usStarveDamageHealth); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(usStarveDamageStrength); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(bOverTurnAPS); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(sMTActionGridNo); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(usMultiTurnAction); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(bAIIndex); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(usSoldierProfile); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(usItemMoveSectorID); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
|
|
||||||
for(int i = 0; i < sizeof(ubFiller); ++i)
|
|
||||||
buffer++;
|
|
||||||
while((buffer%4) > 0)
|
|
||||||
buffer++;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->fIgnoreGetupFromCollapseCheck, sizeof(fIgnoreGetupFromCollapseCheck), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->fIgnoreGetupFromCollapseCheck, sizeof(fIgnoreGetupFromCollapseCheck), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->GetupFromJA25StartCounter, sizeof(GetupFromJA25StartCounter), sizeof(TIMECOUNTER), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->GetupFromJA25StartCounter, sizeof(GetupFromJA25StartCounter), sizeof(TIMECOUNTER), numBytesRead);
|
||||||
@@ -2738,38 +2614,9 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->ubPercentDamageInflictedByTeam, sizeof(ubPercentDamageInflictedByTeam), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->ubPercentDamageInflictedByTeam, sizeof(ubPercentDamageInflictedByTeam), sizeof(UINT8), numBytesRead);
|
||||||
#endif
|
#endif
|
||||||
numBytesRead += buffer;
|
numBytesRead += buffer;
|
||||||
if(numBytesRead != SIZEOF_SOLDIERTYPE_POD)
|
const UINT32 PODsize = SIZEOF_SOLDIERTYPE_POD;
|
||||||
|
if(numBytesRead != PODsize)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
/* //CHRISL: It was further changed at version 104 to allow for 16bit action points for the 100AP system
|
|
||||||
//first, load the POD
|
|
||||||
if ( guiCurrentSaveGameVersion >= AP100_SAVEGAME_DATATYPE_CHANGE )
|
|
||||||
{
|
|
||||||
if ( !FileRead( hFile, this, SIZEOF_SOLDIERTYPE_POD, &uiNumBytesRead ) )
|
|
||||||
{
|
|
||||||
return(FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
numBytesRead = 0;
|
|
||||||
FileRead( hFile, this, (offsetof(SOLDIERTYPE, ubBodyType)+sizeof(ubBodyType)), &uiNumBytesRead );
|
|
||||||
numBytesRead += uiNumBytesRead;
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bActionPoints, 1, 1, numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bInitialActionPoints, 1, 1, numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bOldLife, sizeof(bOldLife), sizeof(INT8), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bVisible, sizeof(bVisible), sizeof(INT8), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bActive, sizeof(bActive), sizeof(INT8), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->bTeam, sizeof(bTeam), sizeof(INT8), numBytesRead);
|
|
||||||
//CHRISL: in the old structure, there are 3 padding bytes at this point in the file. We need to account for
|
|
||||||
// them before continuing. We also want to include them in our numBytesRead since they cover the changes
|
|
||||||
// caused by increasing two elements by 1byte each. This includes shifting one byte of padding
|
|
||||||
FileRead( hFile, padding, 3, &uiNumBytesRead );
|
|
||||||
numBytesRead += uiNumBytesRead;
|
|
||||||
FileRead( hFile, &this->pTempObject, (SIZEOF_SOLDIERTYPE_POD-numBytesRead), &uiNumBytesRead );
|
|
||||||
numBytesRead += uiNumBytesRead;
|
|
||||||
if(numBytesRead != SIZEOF_SOLDIERTYPE_POD)
|
|
||||||
return(FALSE);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//load the OO inventory
|
//load the OO inventory
|
||||||
if ( !this->inv.Load(hFile) )
|
if ( !this->inv.Load(hFile) )
|
||||||
@@ -2807,7 +2654,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sNoiseGridno, sizeof(aiData.sNoiseGridno), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.sNoiseGridno, sizeof(aiData.sNoiseGridno), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubNoiseVolume, sizeof(aiData.ubNoiseVolume), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubNoiseVolume, sizeof(aiData.ubNoiseVolume), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bLastAttackHit, sizeof(aiData.bLastAttackHit), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.bLastAttackHit, sizeof(aiData.bLastAttackHit), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubXRayedBy, sizeof(aiData.ubXRayedBy), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubXRayedBy, sizeof(aiData.ubXRayedBy), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.dHeightAdjustment, sizeof(aiData.dHeightAdjustment), sizeof(FLOAT), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.dHeightAdjustment, sizeof(aiData.dHeightAdjustment), sizeof(FLOAT), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bMorale, sizeof(aiData.bMorale), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.bMorale, sizeof(aiData.bMorale), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bTeamMoraleMod, sizeof(aiData.bTeamMoraleMod), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.bTeamMoraleMod, sizeof(aiData.bTeamMoraleMod), sizeof(INT8), numBytesRead);
|
||||||
@@ -2830,7 +2677,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
|||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bMoved, sizeof(aiData.bMoved), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.bMoved, sizeof(aiData.bMoved), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bHunting, sizeof(aiData.bHunting), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.bHunting, sizeof(aiData.bHunting), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubLastCall, sizeof(aiData.ubLastCall), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubLastCall, sizeof(aiData.ubLastCall), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubCaller, sizeof(aiData.ubCaller), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.ubCaller, sizeof(aiData.ubCaller), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.sCallerGridNo, sizeof(aiData.sCallerGridNo), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.sCallerGridNo, sizeof(aiData.sCallerGridNo), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bCallPriority, sizeof(aiData.bCallPriority), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.bCallPriority, sizeof(aiData.bCallPriority), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &this->aiData.bCallActedUpon, sizeof(aiData.bCallActedUpon), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &this->aiData.bCallActedUpon, sizeof(aiData.bCallActedUpon), sizeof(INT8), numBytesRead);
|
||||||
@@ -3062,9 +2909,14 @@ BOOLEAN WORLDITEM::Load(INT8** hBuffer, float dMajorMapVersion, UINT8 ubMinorMap
|
|||||||
LOADDATA(&oldWorldItem, *hBuffer, _OLD_SIZEOF_WORLDITEM_POD);
|
LOADDATA(&oldWorldItem, *hBuffer, _OLD_SIZEOF_WORLDITEM_POD);
|
||||||
*this = oldWorldItem;
|
*this = oldWorldItem;
|
||||||
}
|
}
|
||||||
|
else if (dMajorMapVersion < 8.0)
|
||||||
|
{
|
||||||
|
LOADDATA(this, *hBuffer, _SIZEOF_WORLDITEM_INT8_ID_POD);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
LOADDATA(this, *hBuffer, SIZEOF_WORLDITEM_POD);
|
LOADDATA(this, *hBuffer, SIZEOF_WORLDITEM_POD);
|
||||||
|
}
|
||||||
// Load the OO OBJECTTYPE
|
// Load the OO OBJECTTYPE
|
||||||
this->object.Load(hBuffer, dMajorMapVersion, ubMinorMapVersion);
|
this->object.Load(hBuffer, dMajorMapVersion, ubMinorMapVersion);
|
||||||
}
|
}
|
||||||
@@ -3176,15 +3028,24 @@ BOOLEAN StackedObjectData::Load( INT8** hBuffer, float dMajorMapVersion, UINT8 u
|
|||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
if (dMajorMapVersion >= 7 && ubMinorMapVersion >= MINOR_MAP_VERSION)
|
if (dMajorMapVersion >= 8 && ubMinorMapVersion >= MINOR_MAP_VERSION)
|
||||||
|
{
|
||||||
|
// Deal with Increased Team Sizes data
|
||||||
|
LOADDATA(&(this->data), *hBuffer, sizeof(ObjectData) );
|
||||||
|
}
|
||||||
|
else if (dMajorMapVersion >= 7 && ubMinorMapVersion >= MINOR_MAP_VERSION)
|
||||||
{
|
{
|
||||||
// Flugente: changed this, otherwise game would crash when reading WF maps if class ObjectData was different. this is a rough fix and by no means perfect
|
// Flugente: changed this, otherwise game would crash when reading WF maps if class ObjectData was different. this is a rough fix and by no means perfect
|
||||||
LOADDATA(&(this->data), *hBuffer, sizeof(ObjectData) );
|
ObjectData_PRE_ITS oldData{};
|
||||||
|
LOADDATA(&(oldData), *hBuffer, sizeof(ObjectData_PRE_ITS));
|
||||||
|
this->data = oldData;
|
||||||
}
|
}
|
||||||
else if (dMajorMapVersion >= 7 && ubMinorMapVersion >= MINOR_MAP_REPAIR_SYSTEM)
|
else if (dMajorMapVersion >= 7 && ubMinorMapVersion >= MINOR_MAP_REPAIR_SYSTEM)
|
||||||
{
|
{
|
||||||
// sObjectFlag' size changed
|
// sObjectFlag' size changed
|
||||||
LOADDATA(&(this->data), *hBuffer, sizeof(ObjectData) - sizeof(this->data.sObjectFlag) );
|
ObjectData_PRE_ITS oldData;
|
||||||
|
LOADDATA(&(oldData), *hBuffer, sizeof(ObjectData_PRE_ITS) - sizeof(oldData.sObjectFlag));
|
||||||
|
this->data = oldData;
|
||||||
}
|
}
|
||||||
// When saving maps with the new map editor that has weapon overheated feature included!
|
// When saving maps with the new map editor that has weapon overheated feature included!
|
||||||
else if (dMajorMapVersion >= 7 && ubMinorMapVersion >= MINOR_MAP_OVERHEATING)
|
else if (dMajorMapVersion >= 7 && ubMinorMapVersion >= MINOR_MAP_OVERHEATING)
|
||||||
@@ -3195,14 +3056,18 @@ BOOLEAN StackedObjectData::Load( INT8** hBuffer, float dMajorMapVersion, UINT8 u
|
|||||||
// But of course, we now 'read' the values for sRepairThreshold, but there weren't any in older map versions, resulting in garbage values - we therefore set that manually to 100
|
// But of course, we now 'read' the values for sRepairThreshold, but there weren't any in older map versions, resulting in garbage values - we therefore set that manually to 100
|
||||||
// Of course, once the ObjectData-Class is altered, this has to be altered as well!
|
// Of course, once the ObjectData-Class is altered, this has to be altered as well!
|
||||||
//dnl ch74 241013 We cannot change past so hardcode 32 simply because that was sizeof(ObjectData) before current and all future changes ;-)
|
//dnl ch74 241013 We cannot change past so hardcode 32 simply because that was sizeof(ObjectData) before current and all future changes ;-)
|
||||||
LOADDATA(&(this->data), *hBuffer, /*sizeof(ObjectData) - (sizeof(this->data.bDirtLevel) + sizeof(this->data.sObjectFlag) )*/32);
|
ObjectData_PRE_ITS oldData{};
|
||||||
|
LOADDATA(&(oldData), *hBuffer, 32);
|
||||||
|
this->data = oldData;
|
||||||
this->data.sRepairThreshold = 100;
|
this->data.sRepairThreshold = 100;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// WF Maps have old format
|
// WF Maps have old format
|
||||||
// +1 because we have to account for endOfPOD itself
|
// +1 because we have to account for endOfPOD itself
|
||||||
LOADDATA(&(this->data), *hBuffer, SIZEOF_OBJECTDATA_POD+1 );
|
ObjectData_PRE_ITS oldData{};
|
||||||
|
LOADDATA(&(oldData), *hBuffer, SIZEOF_OBJECTDATA_POD_PRE_ITS + 1);
|
||||||
|
this->data = oldData;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOADDATA(&size, *hBuffer, sizeof(int) );
|
LOADDATA(&size, *hBuffer, sizeof(int) );
|
||||||
@@ -6635,7 +6500,7 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
|||||||
if( gTacticalStatus.ubAttackBusyCount > 1 )
|
if( gTacticalStatus.ubAttackBusyCount > 1 )
|
||||||
{
|
{
|
||||||
//Lock the ui
|
//Lock the ui
|
||||||
SetUIBusy( (UINT8)gusSelectedSoldier );
|
SetUIBusy( gusSelectedSoldier );
|
||||||
}
|
}
|
||||||
// OJW - 20090403 - Fix Tactical Interface is still locked after quick-load
|
// OJW - 20090403 - Fix Tactical Interface is still locked after quick-load
|
||||||
else
|
else
|
||||||
@@ -6880,9 +6745,9 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
|||||||
|
|
||||||
// player team character fixes
|
// player team character fixes
|
||||||
SOLDIERTYPE *pTeamSoldier;
|
SOLDIERTYPE *pTeamSoldier;
|
||||||
for (INT8 bLoop=gTacticalStatus.Team[gbPlayerNum].bFirstID; bLoop <= gTacticalStatus.Team[gbPlayerNum].bLastID; bLoop++)
|
for (SoldierID bLoop = gTacticalStatus.Team[gbPlayerNum].bFirstID; bLoop <= gTacticalStatus.Team[gbPlayerNum].bLastID; ++bLoop)
|
||||||
{
|
{
|
||||||
pTeamSoldier=MercPtrs[bLoop];
|
pTeamSoldier = bLoop;
|
||||||
|
|
||||||
// silversurfer: added additional check to only remove the flags when there is no boxing activity going on at the moment.
|
// silversurfer: added additional check to only remove the flags when there is no boxing activity going on at the moment.
|
||||||
// WANNE: This should fix the bug if any merc are still under PC control. This could happen after boxing in SAN MONA.
|
// WANNE: This should fix the bug if any merc are still under PC control. This could happen after boxing in SAN MONA.
|
||||||
@@ -7075,12 +6940,12 @@ BOOLEAN SaveSoldierStructure( HWFILE hFile )
|
|||||||
|
|
||||||
BOOLEAN LoadSoldierStructure( HWFILE hFile )
|
BOOLEAN LoadSoldierStructure( HWFILE hFile )
|
||||||
{
|
{
|
||||||
UINT16 cnt;
|
UINT16 cnt;
|
||||||
UINT32 uiNumBytesRead=0;
|
UINT32 uiNumBytesRead=0;
|
||||||
UINT8 ubId;
|
SoldierID ubId;
|
||||||
UINT8 ubOne = 1;
|
UINT8 ubOne = 1;
|
||||||
UINT8 ubActive = 1;
|
UINT8 ubActive = 1;
|
||||||
UINT32 uiPercentage;
|
UINT32 uiPercentage;
|
||||||
SOLDIERTYPE SavedSoldierInfo;
|
SOLDIERTYPE SavedSoldierInfo;
|
||||||
|
|
||||||
//Loop through all the soldier and delete them all
|
//Loop through all the soldier and delete them all
|
||||||
@@ -7810,13 +7675,13 @@ BOOLEAN LoadTacticalStatusFromSavedGame( HWFILE hFile )
|
|||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.Team, sizeof(gTacticalStatus.Team), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.Team, sizeof(gTacticalStatus.Team), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubCurrentTeam, sizeof(gTacticalStatus.ubCurrentTeam), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubCurrentTeam, sizeof(gTacticalStatus.ubCurrentTeam), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sSlideTarget, sizeof(gTacticalStatus.sSlideTarget), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sSlideTarget, sizeof(gTacticalStatus.sSlideTarget), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sSlideReason, sizeof(gTacticalStatus.sSlideReason), sizeof(INT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sSlideReason_UNUSED, sizeof(gTacticalStatus.sSlideReason_UNUSED), sizeof(INT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceMercAIStart, sizeof(gTacticalStatus.uiTimeSinceMercAIStart), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceMercAIStart, sizeof(gTacticalStatus.uiTimeSinceMercAIStart), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fPanicFlags, sizeof(gTacticalStatus.fPanicFlags), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fPanicFlags, sizeof(gTacticalStatus.fPanicFlags), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sPanicTriggerGridNoUnused, sizeof(gTacticalStatus.sPanicTriggerGridNoUnused), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sPanicTriggerGridNoUnused, sizeof(gTacticalStatus.sPanicTriggerGridNoUnused), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sHandGrid, sizeof(gTacticalStatus.sHandGrid), sizeof(INT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sHandGrid, sizeof(gTacticalStatus.sHandGrid), sizeof(INT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubSpottersCalledForBy, sizeof(gTacticalStatus.ubSpottersCalledForBy), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubSpottersCalledForBy, sizeof(gTacticalStatus.ubSpottersCalledForBy), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubTheChosenOne, sizeof(gTacticalStatus.ubTheChosenOne), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubTheChosenOne, sizeof(gTacticalStatus.ubTheChosenOne), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeOfLastInput, sizeof(gTacticalStatus.uiTimeOfLastInput), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeOfLastInput, sizeof(gTacticalStatus.uiTimeOfLastInput), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceDemoOn, sizeof(gTacticalStatus.uiTimeSinceDemoOn), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceDemoOn, sizeof(gTacticalStatus.uiTimeSinceDemoOn), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiCountdownToRestart, sizeof(gTacticalStatus.uiCountdownToRestart), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiCountdownToRestart, sizeof(gTacticalStatus.uiCountdownToRestart), sizeof(UINT32), numBytesRead);
|
||||||
@@ -7835,13 +7700,13 @@ BOOLEAN LoadTacticalStatusFromSavedGame( HWFILE hFile )
|
|||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bRealtimeSpeed, sizeof(gTacticalStatus.bRealtimeSpeed), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bRealtimeSpeed, sizeof(gTacticalStatus.bRealtimeSpeed), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyIntention, sizeof(gTacticalStatus.ubEnemyIntention), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyIntention, sizeof(gTacticalStatus.ubEnemyIntention), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyIntendedRetreatDirection, sizeof(gTacticalStatus.ubEnemyIntendedRetreatDirection), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyIntendedRetreatDirection, sizeof(gTacticalStatus.ubEnemyIntendedRetreatDirection), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID, sizeof(gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID, sizeof(gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemySightingOnTheirTurnPlayerID, sizeof(gTacticalStatus.ubEnemySightingOnTheirTurnPlayerID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemySightingOnTheirTurnPlayerID, sizeof(gTacticalStatus.ubEnemySightingOnTheirTurnPlayerID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fEnemySightingOnTheirTurn, sizeof(gTacticalStatus.fEnemySightingOnTheirTurn), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fEnemySightingOnTheirTurn, sizeof(gTacticalStatus.fEnemySightingOnTheirTurn), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fAutoBandageMode, sizeof(gTacticalStatus.fAutoBandageMode), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fAutoBandageMode, sizeof(gTacticalStatus.fAutoBandageMode), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubAttackBusyCount, sizeof(gTacticalStatus.ubAttackBusyCount), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubAttackBusyCount, sizeof(gTacticalStatus.ubAttackBusyCount), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bNumEnemiesFoughtInBattleUnused, sizeof(gTacticalStatus.bNumEnemiesFoughtInBattleUnused), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bNumEnemiesFoughtInBattleUnused, sizeof(gTacticalStatus.bNumEnemiesFoughtInBattleUnused), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEngagedInConvFromActionMercID, sizeof(gTacticalStatus.ubEngagedInConvFromActionMercID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEngagedInConvFromActionMercID, sizeof(gTacticalStatus.ubEngagedInConvFromActionMercID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.usTactialTurnLimitCounter, sizeof(gTacticalStatus.usTactialTurnLimitCounter), sizeof(UINT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.usTactialTurnLimitCounter, sizeof(gTacticalStatus.usTactialTurnLimitCounter), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fInTopMessage, sizeof(gTacticalStatus.fInTopMessage), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fInTopMessage, sizeof(gTacticalStatus.fInTopMessage), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubTopMessageType, sizeof(gTacticalStatus.ubTopMessageType), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubTopMessageType, sizeof(gTacticalStatus.ubTopMessageType), sizeof(UINT8), numBytesRead);
|
||||||
@@ -7859,7 +7724,7 @@ BOOLEAN LoadTacticalStatusFromSavedGame( HWFILE hFile )
|
|||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fSaidCreatureFlavourQuote, sizeof(gTacticalStatus.fSaidCreatureFlavourQuote), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fSaidCreatureFlavourQuote, sizeof(gTacticalStatus.fSaidCreatureFlavourQuote), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fHaveSeenCreature, sizeof(gTacticalStatus.fHaveSeenCreature), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fHaveSeenCreature, sizeof(gTacticalStatus.fHaveSeenCreature), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fKilledEnemyOnAttack, sizeof(gTacticalStatus.fKilledEnemyOnAttack), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fKilledEnemyOnAttack, sizeof(gTacticalStatus.fKilledEnemyOnAttack), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyKilledOnAttack, sizeof(gTacticalStatus.ubEnemyKilledOnAttack), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyKilledOnAttack, sizeof(gTacticalStatus.ubEnemyKilledOnAttack), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bEnemyKilledOnAttackLevel, sizeof(gTacticalStatus.bEnemyKilledOnAttackLevel), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bEnemyKilledOnAttackLevel, sizeof(gTacticalStatus.bEnemyKilledOnAttackLevel), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyKilledOnAttackLocation, sizeof(gTacticalStatus.ubEnemyKilledOnAttackLocation), sizeof(UINT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyKilledOnAttackLocation, sizeof(gTacticalStatus.ubEnemyKilledOnAttackLocation), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fItemsSeenOnAttack, sizeof(gTacticalStatus.fItemsSeenOnAttack), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fItemsSeenOnAttack, sizeof(gTacticalStatus.fItemsSeenOnAttack), sizeof(BOOLEAN), numBytesRead);
|
||||||
@@ -7873,7 +7738,7 @@ BOOLEAN LoadTacticalStatusFromSavedGame( HWFILE hFile )
|
|||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fCantGetThrough, sizeof(gTacticalStatus.fCantGetThrough), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fCantGetThrough, sizeof(gTacticalStatus.fCantGetThrough), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sCantGetThroughGridNo, sizeof(gTacticalStatus.sCantGetThroughGridNo), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sCantGetThroughGridNo, sizeof(gTacticalStatus.sCantGetThroughGridNo), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sCantGetThroughSoldierGridNo, sizeof(gTacticalStatus.sCantGetThroughSoldierGridNo), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sCantGetThroughSoldierGridNo, sizeof(gTacticalStatus.sCantGetThroughSoldierGridNo), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubCantGetThroughID, sizeof(gTacticalStatus.ubCantGetThroughID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubCantGetThroughID, sizeof(gTacticalStatus.ubCantGetThroughID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fDidGameJustStart, sizeof(gTacticalStatus.fDidGameJustStart), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fDidGameJustStart, sizeof(gTacticalStatus.fDidGameJustStart), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fStatChangeCheatOn, sizeof(gTacticalStatus.fStatChangeCheatOn), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fStatChangeCheatOn, sizeof(gTacticalStatus.fStatChangeCheatOn), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastRequesterTargetID, sizeof(gTacticalStatus.ubLastRequesterTargetID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastRequesterTargetID, sizeof(gTacticalStatus.ubLastRequesterTargetID), sizeof(UINT8), numBytesRead);
|
||||||
@@ -7887,25 +7752,24 @@ BOOLEAN LoadTacticalStatusFromSavedGame( HWFILE hFile )
|
|||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fHasAGameBeenStarted, sizeof(gTacticalStatus.fHasAGameBeenStarted), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fHasAGameBeenStarted, sizeof(gTacticalStatus.fHasAGameBeenStarted), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bConsNumTurnsWeHaventSeenButEnemyDoes, sizeof(gTacticalStatus.bConsNumTurnsWeHaventSeenButEnemyDoes), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bConsNumTurnsWeHaventSeenButEnemyDoes, sizeof(gTacticalStatus.bConsNumTurnsWeHaventSeenButEnemyDoes), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fSomeoneHit, sizeof(gTacticalStatus.fSomeoneHit), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fSomeoneHit, sizeof(gTacticalStatus.fSomeoneHit), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubPaddingSmall, sizeof(gTacticalStatus.ubPaddingSmall), sizeof(UINT8), numBytesRead);
|
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceLastOpplistDecay, sizeof(gTacticalStatus.uiTimeSinceLastOpplistDecay), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiTimeSinceLastOpplistDecay, sizeof(gTacticalStatus.uiTimeSinceLastOpplistDecay), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bMercArrivingQuoteBeingUsed, sizeof(gTacticalStatus.bMercArrivingQuoteBeingUsed), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bMercArrivingQuoteBeingUsed, sizeof(gTacticalStatus.bMercArrivingQuoteBeingUsed), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyKilledOnAttackKiller, sizeof(gTacticalStatus.ubEnemyKilledOnAttackKiller), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubEnemyKilledOnAttackKiller, sizeof(gTacticalStatus.ubEnemyKilledOnAttackKiller), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fCountingDownForGuideDescription, sizeof(gTacticalStatus.fCountingDownForGuideDescription), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fCountingDownForGuideDescription, sizeof(gTacticalStatus.fCountingDownForGuideDescription), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bGuideDescriptionCountDown, sizeof(gTacticalStatus.bGuideDescriptionCountDown), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bGuideDescriptionCountDown, sizeof(gTacticalStatus.bGuideDescriptionCountDown), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubGuideDescriptionToUse, sizeof(gTacticalStatus.ubGuideDescriptionToUse), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubGuideDescriptionToUse, sizeof(gTacticalStatus.ubGuideDescriptionToUse), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bGuideDescriptionSectorX, sizeof(gTacticalStatus.bGuideDescriptionSectorX), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bGuideDescriptionSectorX, sizeof(gTacticalStatus.bGuideDescriptionSectorX), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bGuideDescriptionSectorY, sizeof(gTacticalStatus.bGuideDescriptionSectorY), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.bGuideDescriptionSectorY, sizeof(gTacticalStatus.bGuideDescriptionSectorY), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fEnemyFlags, sizeof(gTacticalStatus.fEnemyFlags), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fEnemyFlags, sizeof(gTacticalStatus.fEnemyFlags), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus. fAutoBandagePending, sizeof(gTacticalStatus. fAutoBandagePending), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fAutoBandagePending, sizeof(gTacticalStatus. fAutoBandagePending), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus. fHasEnteredCombatModeSinceEntering, sizeof(gTacticalStatus. fHasEnteredCombatModeSinceEntering), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fHasEnteredCombatModeSinceEntering, sizeof(gTacticalStatus. fHasEnteredCombatModeSinceEntering), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus. fDontAddNewCrows, sizeof(gTacticalStatus. fDontAddNewCrows), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.fDontAddNewCrows, sizeof(gTacticalStatus. fDontAddNewCrows), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubMorePadding, sizeof(gTacticalStatus.ubMorePadding), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubMorePadding, sizeof(gTacticalStatus.ubMorePadding), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sCreatureTenseQuoteDelay, sizeof(gTacticalStatus.sCreatureTenseQuoteDelay), sizeof(UINT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.sCreatureTenseQuoteDelay, sizeof(gTacticalStatus.sCreatureTenseQuoteDelay), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiCreatureTenseQuoteLastUpdate, sizeof(gTacticalStatus.uiCreatureTenseQuoteLastUpdate), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.uiCreatureTenseQuoteLastUpdate, sizeof(gTacticalStatus.uiCreatureTenseQuoteLastUpdate), sizeof(UINT32), numBytesRead);
|
||||||
if ( guiCurrentSaveGameVersion >= BUGFIX_NPC_DATA_FOR_BIG_MAPS )
|
if ( guiCurrentSaveGameVersion >= BUGFIX_NPC_DATA_FOR_BIG_MAPS )
|
||||||
{
|
{
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastRequesterSurgeryTargetID, sizeof(gTacticalStatus.ubLastRequesterSurgeryTargetID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubLastRequesterSurgeryTargetID, sizeof(gTacticalStatus.ubLastRequesterSurgeryTargetID), sizeof(UINT16), numBytesRead);
|
||||||
if ( guiCurrentSaveGameVersion >= IMPROVED_INTERRUPT_SYSTEM )
|
if ( guiCurrentSaveGameVersion >= IMPROVED_INTERRUPT_SYSTEM )
|
||||||
{
|
{
|
||||||
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubInterruptPending, sizeof(gTacticalStatus.ubInterruptPending), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &gTacticalStatus.ubInterruptPending, sizeof(gTacticalStatus.ubInterruptPending), sizeof(UINT8), numBytesRead);
|
||||||
@@ -8351,7 +8215,7 @@ void CreateSavedGameFileNameFromNumber( UINT8 ubSaveGameID, STR pzNewFileName )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN SaveMercPathFromSoldierStruct( HWFILE hFile, UINT8 ubID )
|
BOOLEAN SaveMercPathFromSoldierStruct( HWFILE hFile, UINT16 ubID )
|
||||||
{
|
{
|
||||||
UINT32 uiNumOfNodes=0;
|
UINT32 uiNumOfNodes=0;
|
||||||
PathStPtr pTempPath = Menptr[ ubID ].pMercPath;
|
PathStPtr pTempPath = Menptr[ ubID ].pMercPath;
|
||||||
@@ -8392,7 +8256,7 @@ BOOLEAN SaveMercPathFromSoldierStruct( HWFILE hFile, UINT8 ubID )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN LoadMercPathToSoldierStruct( HWFILE hFile, UINT8 ubID )
|
BOOLEAN LoadMercPathToSoldierStruct( HWFILE hFile, UINT16 ubID )
|
||||||
{
|
{
|
||||||
UINT32 uiNumOfNodes=0;
|
UINT32 uiNumOfNodes=0;
|
||||||
PathStPtr pTempPath = NULL;
|
PathStPtr pTempPath = NULL;
|
||||||
@@ -8655,7 +8519,7 @@ BOOLEAN SaveGeneralInfo( HWFILE hFile )
|
|||||||
if( pContractReHireSoldier != NULL )
|
if( pContractReHireSoldier != NULL )
|
||||||
sGeneralInfo.sContractRehireSoldierID = pContractReHireSoldier->ubID;
|
sGeneralInfo.sContractRehireSoldierID = pContractReHireSoldier->ubID;
|
||||||
else
|
else
|
||||||
sGeneralInfo.sContractRehireSoldierID = -1;
|
sGeneralInfo.sContractRehireSoldierID = NOBODY;
|
||||||
|
|
||||||
memcpy( &sGeneralInfo.GameOptions, &gGameOptions, sizeof( GAME_OPTIONS ) );
|
memcpy( &sGeneralInfo.GameOptions, &gGameOptions, sizeof( GAME_OPTIONS ) );
|
||||||
#ifndef BMP_RANDOM//dnl ch55 111009
|
#ifndef BMP_RANDOM//dnl ch55 111009
|
||||||
@@ -8675,7 +8539,7 @@ BOOLEAN SaveGeneralInfo( HWFILE hFile )
|
|||||||
if( gpSMCurrentMerc )
|
if( gpSMCurrentMerc )
|
||||||
sGeneralInfo.ubSMCurrentMercID = gpSMCurrentMerc->ubID;
|
sGeneralInfo.ubSMCurrentMercID = gpSMCurrentMerc->ubID;
|
||||||
else
|
else
|
||||||
sGeneralInfo.ubSMCurrentMercID = 255;
|
sGeneralInfo.ubSMCurrentMercID = NOBODY;
|
||||||
|
|
||||||
//Save the fact that it is the first time in mapscreen
|
//Save the fact that it is the first time in mapscreen
|
||||||
sGeneralInfo.fFirstTimeInMapScreen = fFirstTimeInMapScreen;
|
sGeneralInfo.fFirstTimeInMapScreen = fFirstTimeInMapScreen;
|
||||||
@@ -8686,7 +8550,7 @@ BOOLEAN SaveGeneralInfo( HWFILE hFile )
|
|||||||
|
|
||||||
// Save boxing info
|
// Save boxing info
|
||||||
memcpy( &sGeneralInfo.sBoxerGridNo, &gsBoxerGridNo, NUM_BOXERS * sizeof( INT32 ) );
|
memcpy( &sGeneralInfo.sBoxerGridNo, &gsBoxerGridNo, NUM_BOXERS * sizeof( INT32 ) );
|
||||||
memcpy( &sGeneralInfo.ubBoxerID, &gubBoxerID, NUM_BOXERS * sizeof( INT8 ) );
|
memcpy( &sGeneralInfo.ubBoxerID, &gubBoxerID, NUM_BOXERS * sizeof( UINT16 ) );
|
||||||
memcpy( &sGeneralInfo.fBoxerFought, &gfBoxerFought, NUM_BOXERS * sizeof( BOOLEAN ) );
|
memcpy( &sGeneralInfo.fBoxerFought, &gfBoxerFought, NUM_BOXERS * sizeof( BOOLEAN ) );
|
||||||
|
|
||||||
//Save the helicopter status
|
//Save the helicopter status
|
||||||
@@ -8934,17 +8798,17 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
|||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubHelicopterHitsTaken, sizeof(sGeneralInfo.ubHelicopterHitsTaken), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubHelicopterHitsTaken, sizeof(sGeneralInfo.ubHelicopterHitsTaken), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubQuitType, sizeof(sGeneralInfo.ubQuitType), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubQuitType, sizeof(sGeneralInfo.ubQuitType), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fSkyriderSaidCongratsOnTakingSAM, sizeof(sGeneralInfo.fSkyriderSaidCongratsOnTakingSAM), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fSkyriderSaidCongratsOnTakingSAM, sizeof(sGeneralInfo.fSkyriderSaidCongratsOnTakingSAM), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.sContractRehireSoldierID, sizeof(sGeneralInfo.sContractRehireSoldierID), sizeof(INT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.sContractRehireSoldierID, sizeof(sGeneralInfo.sContractRehireSoldierID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.GameOptions, sizeof(sGeneralInfo.GameOptions), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.GameOptions, sizeof(sGeneralInfo.GameOptions), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.uiSeedNumber, sizeof(sGeneralInfo.uiSeedNumber), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.uiSeedNumber, sizeof(sGeneralInfo.uiSeedNumber), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.uiBaseJA2Clock, sizeof(sGeneralInfo.uiBaseJA2Clock), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.uiBaseJA2Clock, sizeof(sGeneralInfo.uiBaseJA2Clock), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.sCurInterfacePanel, sizeof(sGeneralInfo.sCurInterfacePanel), sizeof(INT16), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.sCurInterfacePanel, sizeof(sGeneralInfo.sCurInterfacePanel), sizeof(INT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubSMCurrentMercID, sizeof(sGeneralInfo.ubSMCurrentMercID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubSMCurrentMercID, sizeof(sGeneralInfo.ubSMCurrentMercID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fFirstTimeInMapScreen, sizeof(sGeneralInfo.fFirstTimeInMapScreen), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fFirstTimeInMapScreen, sizeof(sGeneralInfo.fFirstTimeInMapScreen), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fDisableDueToBattleRoster, sizeof(sGeneralInfo.fDisableDueToBattleRoster), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fDisableDueToBattleRoster, sizeof(sGeneralInfo.fDisableDueToBattleRoster), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fDisableMapInterfaceDueToBattle, sizeof(sGeneralInfo.fDisableMapInterfaceDueToBattle), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fDisableMapInterfaceDueToBattle, sizeof(sGeneralInfo.fDisableMapInterfaceDueToBattle), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.sBoxerGridNo, sizeof(sGeneralInfo.sBoxerGridNo), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.sBoxerGridNo, sizeof(sGeneralInfo.sBoxerGridNo), sizeof(INT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubBoxerID, sizeof(sGeneralInfo.ubBoxerID), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubBoxerID, sizeof(sGeneralInfo.ubBoxerID), sizeof(UINT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fBoxerFought, sizeof(sGeneralInfo.fBoxerFought), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fBoxerFought, sizeof(sGeneralInfo.fBoxerFought), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fHelicopterDestroyed, sizeof(sGeneralInfo.fHelicopterDestroyed), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fHelicopterDestroyed, sizeof(sGeneralInfo.fHelicopterDestroyed), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fShowMapScreenHelpText, sizeof(sGeneralInfo.fShowMapScreenHelpText), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fShowMapScreenHelpText, sizeof(sGeneralInfo.fShowMapScreenHelpText), sizeof(BOOLEAN), numBytesRead);
|
||||||
@@ -9022,7 +8886,7 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
|||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fExplosionQueueActive, sizeof(sGeneralInfo.fExplosionQueueActive), sizeof(BOOLEAN), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.fExplosionQueueActive, sizeof(sGeneralInfo.fExplosionQueueActive), sizeof(BOOLEAN), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubUnused, sizeof(sGeneralInfo.ubUnused), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubUnused, sizeof(sGeneralInfo.ubUnused), sizeof(UINT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.uiMeanWhileFlags, sizeof(sGeneralInfo.uiMeanWhileFlags), sizeof(UINT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.uiMeanWhileFlags, sizeof(sGeneralInfo.uiMeanWhileFlags), sizeof(UINT32), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.bSelectedInfoChar, sizeof(sGeneralInfo.bSelectedInfoChar), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.bSelectedInfoChar, sizeof(sGeneralInfo.bSelectedInfoChar), sizeof(INT16), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.bHospitalPriceModifier, sizeof(sGeneralInfo.bHospitalPriceModifier), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.bHospitalPriceModifier, sizeof(sGeneralInfo.bHospitalPriceModifier), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.bUnused2, sizeof(sGeneralInfo.bUnused2), sizeof(INT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.bUnused2, sizeof(sGeneralInfo.bUnused2), sizeof(INT8), numBytesRead);
|
||||||
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.iHospitalTempBalance, sizeof(sGeneralInfo.iHospitalTempBalance), sizeof(INT32), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.iHospitalTempBalance, sizeof(sGeneralInfo.iHospitalTempBalance), sizeof(INT32), numBytesRead);
|
||||||
@@ -9195,10 +9059,10 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
|||||||
ubQuitType = sGeneralInfo.ubQuitType;
|
ubQuitType = sGeneralInfo.ubQuitType;
|
||||||
|
|
||||||
//if the soldier id is valid
|
//if the soldier id is valid
|
||||||
if( sGeneralInfo.sContractRehireSoldierID == -1 )
|
if( sGeneralInfo.sContractRehireSoldierID == NOBODY )
|
||||||
pContractReHireSoldier = NULL;
|
pContractReHireSoldier = NULL;
|
||||||
else
|
else
|
||||||
pContractReHireSoldier = &Menptr[ sGeneralInfo.sContractRehireSoldierID ];
|
pContractReHireSoldier = sGeneralInfo.sContractRehireSoldierID;
|
||||||
|
|
||||||
memcpy( &gGameOptions, &sGeneralInfo.GameOptions, sizeof( GAME_OPTIONS ) );
|
memcpy( &gGameOptions, &sGeneralInfo.GameOptions, sizeof( GAME_OPTIONS ) );
|
||||||
#ifndef BMP_RANDOM//dnl ch55 111009
|
#ifndef BMP_RANDOM//dnl ch55 111009
|
||||||
@@ -9215,10 +9079,10 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
|||||||
|
|
||||||
|
|
||||||
// Restore the selected merc
|
// Restore the selected merc
|
||||||
if( sGeneralInfo.ubSMCurrentMercID == 255 )
|
if( sGeneralInfo.ubSMCurrentMercID == NOBODY)
|
||||||
gpSMCurrentMerc = NULL;
|
gpSMCurrentMerc = NULL;
|
||||||
else
|
else
|
||||||
gpSMCurrentMerc = &Menptr[ sGeneralInfo.ubSMCurrentMercID ];
|
gpSMCurrentMerc = sGeneralInfo.ubSMCurrentMercID;
|
||||||
|
|
||||||
//Set the interface panel to the team panel
|
//Set the interface panel to the team panel
|
||||||
ShutdownCurrentPanel( );
|
ShutdownCurrentPanel( );
|
||||||
@@ -9246,7 +9110,7 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
|||||||
fDisableMapInterfaceDueToBattle = sGeneralInfo.fDisableMapInterfaceDueToBattle;
|
fDisableMapInterfaceDueToBattle = sGeneralInfo.fDisableMapInterfaceDueToBattle;
|
||||||
|
|
||||||
memcpy( &gsBoxerGridNo, &sGeneralInfo.sBoxerGridNo, NUM_BOXERS * sizeof( INT32 ) );
|
memcpy( &gsBoxerGridNo, &sGeneralInfo.sBoxerGridNo, NUM_BOXERS * sizeof( INT32 ) );
|
||||||
memcpy( &gubBoxerID, &sGeneralInfo.ubBoxerID, NUM_BOXERS * sizeof( UINT8 ) );
|
memcpy( &gubBoxerID, &sGeneralInfo.ubBoxerID, NUM_BOXERS * sizeof( UINT16 ) );
|
||||||
memcpy( &gfBoxerFought, &sGeneralInfo.fBoxerFought, NUM_BOXERS * sizeof( BOOLEAN ) );
|
memcpy( &gfBoxerFought, &sGeneralInfo.fBoxerFought, NUM_BOXERS * sizeof( BOOLEAN ) );
|
||||||
|
|
||||||
//Load the helicopter status
|
//Load the helicopter status
|
||||||
@@ -9427,20 +9291,20 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
|
|||||||
gCamoFace[i].gSnowCamoface = FALSE;
|
gCamoFace[i].gSnowCamoface = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
SOLDIERTYPE * pSoldier;
|
SoldierID Soldier = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
||||||
UINT16 bMercID = gTacticalStatus.Team[gbPlayerNum].bFirstID;
|
SoldierID bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
||||||
UINT16 bLastTeamID = gTacticalStatus.Team[gbPlayerNum].bLastID;
|
for ( ; Soldier <= bLastTeamID; ++Soldier)
|
||||||
for ( pSoldier = MercPtrs[ bMercID ]; bMercID <= bLastTeamID; ++bMercID,pSoldier++)
|
|
||||||
{
|
{
|
||||||
if ( pSoldier )
|
if ( Soldier )
|
||||||
{
|
{
|
||||||
gCamoFace[pSoldier->ubProfile].gCamoface = ( pSoldier->bCamo > 0 );
|
UINT8 profile = Soldier->ubProfile;
|
||||||
gCamoFace[pSoldier->ubProfile].gUrbanCamoface = ( pSoldier->urbanCamo > 0 );
|
gCamoFace[profile].gCamoface = ( Soldier->bCamo > 0 );
|
||||||
gCamoFace[pSoldier->ubProfile].gDesertCamoface = ( pSoldier->desertCamo > 0 );
|
gCamoFace[profile].gUrbanCamoface = ( Soldier->urbanCamo > 0 );
|
||||||
gCamoFace[pSoldier->ubProfile].gSnowCamoface = ( pSoldier->snowCamo > 0 );
|
gCamoFace[profile].gDesertCamoface = ( Soldier->desertCamo > 0 );
|
||||||
|
gCamoFace[profile].gSnowCamoface = ( Soldier->snowCamo > 0 );
|
||||||
|
|
||||||
DeleteSoldierFace( pSoldier );
|
DeleteSoldierFace( Soldier );
|
||||||
pSoldier->iFaceIndex = InitSoldierFace( pSoldier );
|
Soldier->iFaceIndex = InitSoldierFace( Soldier );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9661,18 +9525,19 @@ void GetBestPossibleSectorXYZValues( INT16 *psSectorX, INT16 *psSectorY, INT8 *p
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
INT16 sSoldierCnt;
|
SoldierID sSoldierCnt;
|
||||||
SOLDIERTYPE *pSoldier;
|
SoldierID bLastTeamID;
|
||||||
INT16 bLastTeamID;
|
SOLDIERTYPE *pSoldier;
|
||||||
BOOLEAN fFoundAMerc=FALSE;
|
BOOLEAN fFoundAMerc = FALSE;
|
||||||
|
|
||||||
// Set locator to first merc
|
// Set locator to first merc
|
||||||
sSoldierCnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
sSoldierCnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
||||||
bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
||||||
|
|
||||||
//loop through all the mercs on the players team to find the one that is not moving
|
//loop through all the mercs on the players team to find the one that is not moving
|
||||||
for ( pSoldier = MercPtrs[ sSoldierCnt ]; sSoldierCnt <= bLastTeamID; sSoldierCnt++,pSoldier++)
|
for ( ; sSoldierCnt <= bLastTeamID; ++sSoldierCnt )
|
||||||
{
|
{
|
||||||
|
pSoldier = sSoldierCnt;
|
||||||
// test for !NULL (if initilization fails and MercPtrs contains 'NULL's)
|
// test for !NULL (if initilization fails and MercPtrs contains 'NULL's)
|
||||||
if( pSoldier && pSoldier->bActive )
|
if( pSoldier && pSoldier->bActive )
|
||||||
{
|
{
|
||||||
@@ -9696,8 +9561,9 @@ void GetBestPossibleSectorXYZValues( INT16 *psSectorX, INT16 *psSectorY, INT8 *p
|
|||||||
bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
||||||
|
|
||||||
//loop through all the mercs and find one that is moving
|
//loop through all the mercs and find one that is moving
|
||||||
for ( pSoldier = MercPtrs[ sSoldierCnt ]; sSoldierCnt <= bLastTeamID; sSoldierCnt++,pSoldier++)
|
for ( ; sSoldierCnt <= bLastTeamID; ++sSoldierCnt )
|
||||||
{
|
{
|
||||||
|
pSoldier = sSoldierCnt;
|
||||||
if( pSoldier && pSoldier->bActive )
|
if( pSoldier && pSoldier->bActive )
|
||||||
{
|
{
|
||||||
//we found an alive, merc that is not moving
|
//we found an alive, merc that is not moving
|
||||||
|
|||||||
+20
-33
@@ -38,45 +38,32 @@ class SOLDIERTYPE;
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
UINT32 uiSavedGameVersion;
|
UINT32 uiSavedGameVersion;
|
||||||
CHAR8 zGameVersionNumber[ GAME_VERSION_LENGTH ];
|
CHAR8 zGameVersionNumber[ GAME_VERSION_LENGTH ];
|
||||||
|
CHAR16 sSavedGameDesc[ SIZE_OF_SAVE_GAME_DESC ];
|
||||||
CHAR16 sSavedGameDesc[ SIZE_OF_SAVE_GAME_DESC ];
|
UINT32 uiFlags;
|
||||||
|
|
||||||
UINT32 uiFlags;
|
|
||||||
|
|
||||||
#ifdef CRIPPLED_VERSION
|
#ifdef CRIPPLED_VERSION
|
||||||
UINT8 ubCrippleFiller[20];
|
UINT8 ubCrippleFiller[20];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//The following will be used to quickly access info to display in the save/load screen
|
//The following will be used to quickly access info to display in the save/load screen
|
||||||
UINT32 uiDay;
|
UINT32 uiDay;
|
||||||
UINT8 ubHour;
|
UINT8 ubHour;
|
||||||
UINT8 ubMin;
|
UINT8 ubMin;
|
||||||
INT16 sSectorX;
|
INT16 sSectorX;
|
||||||
INT16 sSectorY;
|
INT16 sSectorY;
|
||||||
INT8 bSectorZ;
|
INT8 bSectorZ;
|
||||||
UINT8 ubNumOfMercsOnPlayersTeam;
|
UINT16 ubNumOfMercsOnPlayersTeam;
|
||||||
INT32 iCurrentBalance;
|
INT32 iCurrentBalance;
|
||||||
|
UINT32 uiCurrentScreen;
|
||||||
UINT32 uiCurrentScreen;
|
BOOLEAN fAlternateSector;
|
||||||
|
BOOLEAN fWorldLoaded;
|
||||||
BOOLEAN fAlternateSector;
|
UINT8 ubLoadScreenID; //The load screen that should be used when loading the saved game
|
||||||
|
GAME_OPTIONS sInitialGameOptions; //need these in the header so we can get the info from it on the save load screen.
|
||||||
BOOLEAN fWorldLoaded;
|
UINT32 uiRandom;
|
||||||
|
UINT8 ubFiller[494]; // WANNE: Decrease this filler by 1, for each new UINT8 variable!
|
||||||
UINT8 ubLoadScreenID; //The load screen that should be used when loading the saved game
|
|
||||||
|
|
||||||
GAME_OPTIONS sInitialGameOptions; //need these in the header so we can get the info from it on the save load screen.
|
|
||||||
|
|
||||||
UINT32 uiRandom;
|
|
||||||
|
|
||||||
UINT8 ubFiller[500]; // WANNE: Decrease this filler by 1, for each new UINT8 variable!
|
|
||||||
|
|
||||||
} SAVED_GAME_HEADER;
|
} SAVED_GAME_HEADER;
|
||||||
|
|
||||||
|
|
||||||
extern UINT32 guiScreenToGotoAfterLoadingSavedGame;
|
extern UINT32 guiScreenToGotoAfterLoadingSavedGame;
|
||||||
extern UINT32 guiCurrentSaveGameVersion;
|
extern UINT32 guiCurrentSaveGameVersion;
|
||||||
|
|
||||||
|
|||||||
+13
-19
@@ -1,34 +1,34 @@
|
|||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "SaveLoadScreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
#include "Video.h"
|
#include "video.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Render Dirty.h"
|
#include "Render Dirty.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "SaveLoadGame.h"
|
#include "SaveLoadGame.h"
|
||||||
#include "Stdio.h"
|
#include "stdio.h"
|
||||||
#include "WordWrap.h"
|
#include "WordWrap.h"
|
||||||
#include "StrategicMap.h"
|
#include "strategicmap.h"
|
||||||
#include "Finances.h"
|
#include "finances.h"
|
||||||
#include "WCheck.h"
|
#include "WCheck.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include "Cursors.h"
|
#include "Cursors.h"
|
||||||
#include "VObject.h"
|
#include "vobject.h"
|
||||||
#include "Merc Hiring.h"
|
#include "Merc Hiring.h"
|
||||||
#include "LaptopSave.h"
|
#include "LaptopSave.h"
|
||||||
#include "Options Screen.h"
|
#include "Options Screen.h"
|
||||||
#include "GameVersion.h"
|
#include "GameVersion.h"
|
||||||
#include "SysUtil.h"
|
#include "sysutil.h"
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
#include "OverHead.h"
|
#include "Overhead.h"
|
||||||
#include "gamescreen.h"
|
#include "gamescreen.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "fade screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "English.h"
|
#include "english.h"
|
||||||
#include "Gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "Game Init.h"
|
#include "Game Init.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Message.h"
|
#include "message.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Multi Language Graphic Utils.h"
|
#include "Multi Language Graphic Utils.h"
|
||||||
#include "Campaign Types.h"
|
#include "Campaign Types.h"
|
||||||
@@ -1398,7 +1398,6 @@ BOOLEAN DisplaySaveGameEntry( INT32 bEntryID )
|
|||||||
CHAR16 zDateString[128];
|
CHAR16 zDateString[128];
|
||||||
CHAR16 zLocationString[128];
|
CHAR16 zLocationString[128];
|
||||||
CHAR16 zNumMercsString[128];
|
CHAR16 zNumMercsString[128];
|
||||||
CHAR16 zBalanceString[128];
|
|
||||||
SAVED_GAME_HEADER SaveGameHeader;
|
SAVED_GAME_HEADER SaveGameHeader;
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
UINT16 usPosX=SLG_FIRST_SAVED_SPOT_X;
|
UINT16 usPosX=SLG_FIRST_SAVED_SPOT_X;
|
||||||
@@ -1669,11 +1668,6 @@ BOOLEAN DisplaySaveGameEntry( INT32 bEntryID )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get the current balance
|
|
||||||
swprintf( zBalanceString, L"%d", SaveGameHeader.iCurrentBalance);
|
|
||||||
InsertCommasForDollarFigure( zBalanceString );
|
|
||||||
InsertDollarSignInToString( zBalanceString );
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Display the Saved game information
|
// Display the Saved game information
|
||||||
//
|
//
|
||||||
@@ -1692,7 +1686,7 @@ BOOLEAN DisplaySaveGameEntry( INT32 bEntryID )
|
|||||||
|
|
||||||
//The balance
|
//The balance
|
||||||
if(!is_networked)
|
if(!is_networked)
|
||||||
DrawTextToScreen( zBalanceString, (UINT16)(usPosX+SLG_BALANCE_OFFSET_X), (UINT16)(usPosY+SLG_BALANCE_OFFSET_Y), 0, uiFont, ubFontColor, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DrawTextToScreen(FormatMoney(SaveGameHeader.iCurrentBalance).data(), (UINT16)(usPosX + SLG_BALANCE_OFFSET_X), (UINT16)(usPosY + SLG_BALANCE_OFFSET_Y), 0, uiFont, ubFontColor, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
|
||||||
if( gbSaveGameArray[ VAL_SLOT_START + bEntryID ] || ( gfSaveGame && !gfUserInTextInputMode && ( gbSelectedSaveLocation == bEntryID ) ) )
|
if( gbSaveGameArray[ VAL_SLOT_START + bEntryID ] || ( gfSaveGame && !gfUserInTextInputMode && ( gbSelectedSaveLocation == bEntryID ) ) )
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
#ifndef __SCREEN_MANAGER
|
#ifndef __SCREEN_MANAGER
|
||||||
#define __SCREEN_MANAGER
|
#define __SCREEN_MANAGER
|
||||||
|
|
||||||
#include "Types.h"
|
#include "types.h"
|
||||||
#include "ScreenIds.h"
|
#include "screenids.h"
|
||||||
|
|
||||||
// Each screen in the game comes with a Status flag (what was the last thing the screen was doing), an Initialization
|
// Each screen in the game comes with a Status flag (what was the last thing the screen was doing), an Initialization
|
||||||
// function (which loads up the screen if necessary), a Handler function which is called while the screen is showing and
|
// function (which loads up the screen if necessary), a Handler function which is called while the screen is showing and
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Types.h"
|
#include "types.h"
|
||||||
|
|
||||||
void TimingLogInitialize(const CHAR8* filename);
|
void TimingLogInitialize(const CHAR8* filename);
|
||||||
void TimingLog(const CHAR8* logEvent, int n);
|
void TimingLog(const CHAR8* logEvent, int n);
|
||||||
|
|||||||
@@ -555,7 +555,7 @@ difficultySettingsEndElementHandle(void *userData, const XML_Char *name)
|
|||||||
else if(strcmp(name, "QueenAttackLosingControlOfSector") == 0)
|
else if(strcmp(name, "QueenAttackLosingControlOfSector") == 0)
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT;
|
pData->curElement = ELEMENT;
|
||||||
pData->curDifficultySettings.bQueenLosingControlOfSector = (BOOLEAN) atol(pData->szCharData);
|
pData->curDifficultySettings.bQueenLosingControlOfSector = atoi(pData->szCharData);
|
||||||
}
|
}
|
||||||
else if(strcmp(name, "BloodcatAmbushSectors") == 0)
|
else if(strcmp(name, "BloodcatAmbushSectors") == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "overhead.h"
|
#include "Overhead.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "Font Control.h"
|
#include "Font Control.h"
|
||||||
#include "Animation Control.h"
|
#include "Animation Control.h"
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include "english.h"
|
#include "english.h"
|
||||||
#include "Fileman.h"
|
#include "FileMan.h"
|
||||||
#include "messageboxscreen.h"
|
#include "MessageBoxScreen.h"
|
||||||
|
|
||||||
//forward declarations of common classes to eliminate includes
|
//forward declarations of common classes to eliminate includes
|
||||||
class OBJECTTYPE;
|
class OBJECTTYPE;
|
||||||
@@ -104,7 +104,7 @@ UINT32 AniEditScreenHandle(void)
|
|||||||
fToggle2 = FALSE;
|
fToggle2 = FALSE;
|
||||||
ubCurLoadedState = 0;
|
ubCurLoadedState = 0;
|
||||||
|
|
||||||
pSoldier = MercPtrs[ gusSelectedSoldier ];
|
pSoldier = gusSelectedSoldier;
|
||||||
|
|
||||||
gTacticalStatus.uiFlags |= LOADING_SAVED_GAME;
|
gTacticalStatus.uiFlags |= LOADING_SAVED_GAME;
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -31,7 +31,9 @@
|
|||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
|
||||||
// Map Editor version - you should use the MapEditor configuration instead of messing with these defines (ChrisL)
|
// Map Editor version - you should use the MapEditor configuration instead of messing with these defines (ChrisL)
|
||||||
|
//#ifndef JA2BETAVERSION
|
||||||
//#define JA2BETAVERSION
|
//#define JA2BETAVERSION
|
||||||
|
//#endif
|
||||||
//#define JA2EDITOR
|
//#define JA2EDITOR
|
||||||
// Normal test version
|
// Normal test version
|
||||||
//#define JA2TESTVERSION
|
//#define JA2TESTVERSION
|
||||||
@@ -77,6 +79,6 @@
|
|||||||
#define _CRT_NON_CONFORMING_SWPRINTFS
|
#define _CRT_NON_CONFORMING_SWPRINTFS
|
||||||
#define _SCL_SECURE_NO_WARNINGS
|
#define _SCL_SECURE_NO_WARNINGS
|
||||||
|
|
||||||
#include "Profiler.h"
|
#include "profiler.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+7
-7
@@ -1,17 +1,17 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "sgp.h"
|
#include "sgp.h"
|
||||||
#include "Gameloop.h"
|
#include "gameloop.h"
|
||||||
#include "Screens.h"
|
#include "Screens.h"
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "init.h"
|
#include "Init.h"
|
||||||
#include "music control.h"
|
#include "Music Control.h"
|
||||||
#include "sys globals.h"
|
#include "Sys Globals.h"
|
||||||
#include "laptop.h"
|
#include "laptop.h"
|
||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "Timer Control.h"
|
#include "Timer Control.h"
|
||||||
#include "overhead.h"
|
#include "Overhead.h"
|
||||||
#include "LibraryDataBase.h"
|
#include "LibraryDataBase.h"
|
||||||
#include "Map Screen Interface.h"
|
#include "Map Screen Interface.h"
|
||||||
#include "Tactical Save.h"
|
#include "Tactical Save.h"
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "mapscreen.h"
|
#include "mapscreen.h"
|
||||||
#include "Interface Control.h"
|
#include "Interface Control.h"
|
||||||
#include "text.h"
|
#include "Text.h"
|
||||||
#include "HelpScreen.h"
|
#include "HelpScreen.h"
|
||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
#include "Tactical Placement GUI.h"//dnl ch45 071009
|
#include "Tactical Placement GUI.h"//dnl ch45 071009
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#ifndef __GAMELOOP_
|
#ifndef __GAMELOOP_
|
||||||
#define __GAMELOOP_
|
#define __GAMELOOP_
|
||||||
|
|
||||||
#include "Types.h"
|
#include "types.h"
|
||||||
|
|
||||||
// main game loop systems
|
// main game loop systems
|
||||||
#define INIT_SYSTEM 0
|
#define INIT_SYSTEM 0
|
||||||
|
|||||||
+52
-60
@@ -6,10 +6,10 @@
|
|||||||
#include "vobject.h"
|
#include "vobject.h"
|
||||||
#include "worlddef.h"
|
#include "worlddef.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "font.h"
|
#include "Font.h"
|
||||||
#include "screenids.h"
|
#include "screenids.h"
|
||||||
#include "screens.h"
|
#include "Screens.h"
|
||||||
#include "overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Isometric Utils.h"
|
#include "Isometric Utils.h"
|
||||||
#include "sysutil.h"
|
#include "sysutil.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
@@ -22,60 +22,60 @@
|
|||||||
#include "Handle UI.h"
|
#include "Handle UI.h"
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include "cursors.h"
|
#include "Cursors.h"
|
||||||
#include "vobject_blitters.h"
|
#include "vobject_blitters.h"
|
||||||
#include "Button System.h"
|
#include "Button System.h"
|
||||||
#include "lighting.h"
|
#include "lighting.h"
|
||||||
#include "renderworld.h"
|
#include "renderworld.h"
|
||||||
#include "sys globals.h"
|
#include "Sys Globals.h"
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "bullets.h"
|
#include "Bullets.h"
|
||||||
#include "Assignments.h"
|
#include "Assignments.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "overhead map.h"
|
#include "overhead map.h"
|
||||||
#include "Strategic Exit GUI.h"
|
#include "Strategic Exit GUI.h"
|
||||||
#include "strategic movement.h"
|
#include "Strategic Movement.h"
|
||||||
#include "Tactical Placement GUI.h"
|
#include "Tactical Placement GUI.h"
|
||||||
#include "Air raid.h"
|
#include "Air Raid.h"
|
||||||
#include "Game Clock.h"
|
#include "Game Clock.h"
|
||||||
#include "game init.h"
|
#include "Game Init.h"
|
||||||
|
|
||||||
//DEF: Test Code
|
//DEF: Test Code
|
||||||
#ifdef NETWORKED
|
#ifdef NETWORKED
|
||||||
#include "Networking.h"
|
#include "Networking.h"
|
||||||
#endif
|
#endif
|
||||||
#include "interface control.h"
|
#include "Interface Control.h"
|
||||||
#include "game clock.h"
|
#include "Game Clock.h"
|
||||||
#include "physics.h"
|
#include "physics.h"
|
||||||
#include "fade screen.h"
|
#include "Fade Screen.h"
|
||||||
#include "dialogue control.h"
|
#include "Dialogue Control.h"
|
||||||
#include "soldier macros.h"
|
#include "Soldier macros.h"
|
||||||
#include "faces.h"
|
#include "faces.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "gamescreen.h"
|
#include "gamescreen.h"
|
||||||
#include "interface.h"
|
#include "Interface.h"
|
||||||
#include "cursor control.h"
|
#include "Cursor Control.h"
|
||||||
#include "strategic turns.h"
|
#include "Strategic Turns.h"
|
||||||
|
|
||||||
#include "merc entering.h"
|
#include "merc entering.h"
|
||||||
#include "soldier create.h"
|
#include "Soldier Create.h"
|
||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
#include "interface panels.h"
|
#include "Interface Panels.h"
|
||||||
#include "Map Information.h"
|
#include "Map Information.h"
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "Squads.h"
|
#include "Squads.h"
|
||||||
#include "interface dialogue.h"
|
#include "interface Dialogue.h"
|
||||||
#include "auto bandage.h"
|
#include "Auto Bandage.h"
|
||||||
#include "meanwhile.h"
|
#include "Meanwhile.h"
|
||||||
#include "strategic ai.h"
|
#include "Strategic AI.h"
|
||||||
#include "HelpScreen.h"
|
#include "HelpScreen.h"
|
||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
#include "Sound Control.h"
|
#include "Sound Control.h"
|
||||||
#include "MessageBoxScreen.h"
|
#include "MessageBoxScreen.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "GameSettings.h"
|
#include "GameSettings.h"
|
||||||
#include "Random.h"
|
#include "random.h"
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "Scheduling.h"
|
#include "Scheduling.h"
|
||||||
#include "Animated ProgressBar.h"
|
#include "Animated ProgressBar.h"
|
||||||
@@ -108,10 +108,10 @@ INT32 giCounterPeriodOverlay = 0;
|
|||||||
BOOLEAN gfExitToNewSector = FALSE;
|
BOOLEAN gfExitToNewSector = FALSE;
|
||||||
//UINT8 gubNewSectorExitDirection;
|
//UINT8 gubNewSectorExitDirection;
|
||||||
|
|
||||||
BOOLEAN gfGameScreenLocateToSoldier = FALSE;
|
BOOLEAN gfGameScreenLocateToSoldier = FALSE;
|
||||||
BOOLEAN gfEnteringMapScreen = FALSE;
|
BOOLEAN gfEnteringMapScreen = FALSE;
|
||||||
UINT32 uiOldMouseCursor;
|
UINT32 uiOldMouseCursor;
|
||||||
UINT8 gubPreferredInitialSelectedGuy = NOBODY;
|
SoldierID gubPreferredInitialSelectedGuy = NOBODY;
|
||||||
|
|
||||||
BOOLEAN gfTacticalIsModal = FALSE;
|
BOOLEAN gfTacticalIsModal = FALSE;
|
||||||
MOUSE_REGION gTacticalDisableRegion;
|
MOUSE_REGION gTacticalDisableRegion;
|
||||||
@@ -261,17 +261,17 @@ void EnterTacticalScreen( )
|
|||||||
if ( gusSelectedSoldier != NOBODY )
|
if ( gusSelectedSoldier != NOBODY )
|
||||||
{
|
{
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: check our guy"));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: check our guy"));
|
||||||
if ( !OK_CONTROLLABLE_MERC( MercPtrs[ gusSelectedSoldier ] ) )
|
if ( !OK_CONTROLLABLE_MERC( gusSelectedSoldier ) )
|
||||||
{
|
{
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: SelectNextAvailSoldier, merc not controllable"));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: SelectNextAvailSoldier, merc not controllable"));
|
||||||
SelectNextAvailSoldier( MercPtrs[ gusSelectedSoldier ] );
|
SelectNextAvailSoldier( gusSelectedSoldier );
|
||||||
}
|
}
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: who is selected? %d", gusSelectedSoldier));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: who is selected? %d", gusSelectedSoldier));
|
||||||
// ATE: If the current guy is sleeping, change....
|
// ATE: If the current guy is sleeping, change....
|
||||||
if ( gusSelectedSoldier != NOBODY && MercPtrs[ gusSelectedSoldier ]->flags.fMercAsleep )
|
if ( gusSelectedSoldier != NOBODY && gusSelectedSoldier->flags.fMercAsleep )
|
||||||
{
|
{
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: SelectNextAvailSoldier, merc asleep"));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("EnterTacticalScreen: SelectNextAvailSoldier, merc asleep"));
|
||||||
SelectNextAvailSoldier( MercPtrs[ gusSelectedSoldier ] );
|
SelectNextAvailSoldier( gusSelectedSoldier );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -580,9 +580,9 @@ UINT32 MainGameScreenHandle(void)
|
|||||||
{
|
{
|
||||||
if ( gTacticalStatus.ubCurrentTeam != gbPlayerNum )
|
if ( gTacticalStatus.ubCurrentTeam != gbPlayerNum )
|
||||||
{
|
{
|
||||||
MercPtrs[ gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID ]->AdjustNoAPToFinishMove( FALSE );
|
gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID->AdjustNoAPToFinishMove( FALSE );
|
||||||
}
|
}
|
||||||
MercPtrs[ gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID ]->flags.fPauseAllAnimation = FALSE;
|
gTacticalStatus.ubEnemySightingOnTheirTurnEnemyID->flags.fPauseAllAnimation = FALSE;
|
||||||
|
|
||||||
gTacticalStatus.fEnemySightingOnTheirTurn = FALSE;
|
gTacticalStatus.fEnemySightingOnTheirTurn = FALSE;
|
||||||
}
|
}
|
||||||
@@ -684,7 +684,7 @@ UINT32 MainGameScreenHandle(void)
|
|||||||
// Select a guy if he hasn;'
|
// Select a guy if he hasn;'
|
||||||
if( !gfTacticalPlacementGUIActive )
|
if( !gfTacticalPlacementGUIActive )
|
||||||
{
|
{
|
||||||
if ( gusSelectedSoldier != NOBODY && OK_INTERRUPT_MERC( MercPtrs[ gusSelectedSoldier ] ) )
|
if ( gusSelectedSoldier != NOBODY && OK_INTERRUPT_MERC( gusSelectedSoldier ) )
|
||||||
{
|
{
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("maingamescreenhandle: selectsoldier"));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("maingamescreenhandle: selectsoldier"));
|
||||||
SelectSoldier( gusSelectedSoldier, FALSE, TRUE );
|
SelectSoldier( gusSelectedSoldier, FALSE, TRUE );
|
||||||
@@ -735,11 +735,11 @@ UINT32 MainGameScreenHandle(void)
|
|||||||
|
|
||||||
if ( !ARE_IN_FADE_IN( ) )
|
if ( !ARE_IN_FADE_IN( ) )
|
||||||
{
|
{
|
||||||
HandleAutoBandagePending( );
|
HandleAutoBandagePending( );
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
HandleThePlayerBeNotifiedOfSomeoneElseInSector();
|
HandleThePlayerBeNotifiedOfSomeoneElseInSector();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -933,7 +933,7 @@ UINT32 MainGameScreenHandle(void)
|
|||||||
if ( gusSelectedSoldier != NOBODY )
|
if ( gusSelectedSoldier != NOBODY )
|
||||||
{
|
{
|
||||||
if( !gGameSettings.fOptions[ TOPTION_MUTE_CONFIRMATIONS ] )
|
if( !gGameSettings.fOptions[ TOPTION_MUTE_CONFIRMATIONS ] )
|
||||||
MercPtrs[ gusSelectedSoldier ]->DoMercBattleSound( BATTLE_SOUND_ATTN1 );
|
gusSelectedSoldier->DoMercBattleSound( BATTLE_SOUND_ATTN1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1030,15 +1030,12 @@ void DisableFPSOverlay( BOOLEAN fEnable )
|
|||||||
|
|
||||||
void TacticalScreenLocateToSoldier( )
|
void TacticalScreenLocateToSoldier( )
|
||||||
{
|
{
|
||||||
INT32 cnt;
|
BOOLEAN fPreferedGuyUsed = FALSE;
|
||||||
SOLDIERTYPE *pSoldier;
|
|
||||||
INT16 bLastTeamID;
|
|
||||||
BOOLEAN fPreferedGuyUsed = FALSE;
|
|
||||||
|
|
||||||
if ( gubPreferredInitialSelectedGuy != NOBODY )
|
if ( gubPreferredInitialSelectedGuy != NOBODY )
|
||||||
{
|
{
|
||||||
// ATE: Put condition here...
|
// ATE: Put condition here...
|
||||||
if ( OK_CONTROLLABLE_MERC( MercPtrs[ gubPreferredInitialSelectedGuy ] ) && OK_INTERRUPT_MERC( MercPtrs[ gubPreferredInitialSelectedGuy ] ) )
|
if ( OK_CONTROLLABLE_MERC( gubPreferredInitialSelectedGuy ) && OK_INTERRUPT_MERC( gubPreferredInitialSelectedGuy ) )
|
||||||
{
|
{
|
||||||
LocateSoldier( gubPreferredInitialSelectedGuy, 10 );
|
LocateSoldier( gubPreferredInitialSelectedGuy, 10 );
|
||||||
SelectSoldier( gubPreferredInitialSelectedGuy, FALSE, TRUE );
|
SelectSoldier( gubPreferredInitialSelectedGuy, FALSE, TRUE );
|
||||||
@@ -1050,14 +1047,14 @@ void TacticalScreenLocateToSoldier( )
|
|||||||
if ( !fPreferedGuyUsed )
|
if ( !fPreferedGuyUsed )
|
||||||
{
|
{
|
||||||
// Set locator to first merc
|
// Set locator to first merc
|
||||||
cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
SoldierID Soldier = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
||||||
bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
SoldierID bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
||||||
for ( pSoldier = MercPtrs[ cnt ]; cnt <= bLastTeamID; cnt++,pSoldier++)
|
for ( ; Soldier <= bLastTeamID; ++Soldier)
|
||||||
{
|
{
|
||||||
if ( OK_CONTROLLABLE_MERC( pSoldier ) && OK_INTERRUPT_MERC( pSoldier ) )
|
if ( OK_CONTROLLABLE_MERC( Soldier ) && OK_INTERRUPT_MERC( Soldier ) )
|
||||||
{
|
{
|
||||||
LocateSoldier( pSoldier->ubID, 10 );
|
LocateSoldier( Soldier, 10 );
|
||||||
SelectSoldier( pSoldier->ubID, FALSE, TRUE );
|
SelectSoldier( Soldier, FALSE, TRUE );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1075,22 +1072,17 @@ void EnterMapScreen( )
|
|||||||
|
|
||||||
void UpdateTeamPanelAssignments( )
|
void UpdateTeamPanelAssignments( )
|
||||||
{
|
{
|
||||||
INT32 cnt;
|
|
||||||
SOLDIERTYPE *pSoldier;
|
|
||||||
INT16 bLastTeamID;
|
|
||||||
|
|
||||||
// Remove all players
|
// Remove all players
|
||||||
RemoveAllPlayersFromSlot( );
|
RemoveAllPlayersFromSlot( );
|
||||||
|
|
||||||
// Set locator to first merc
|
// Set locator to first merc
|
||||||
cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
SoldierID Soldier = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
||||||
bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
SoldierID bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
||||||
for ( pSoldier = MercPtrs[ cnt ]; cnt <= bLastTeamID; cnt++,pSoldier++)
|
for ( ; Soldier <= bLastTeamID; ++Soldier)
|
||||||
{
|
{
|
||||||
// Setup team interface
|
// Setup team interface
|
||||||
CheckForAndAddMercToTeamPanel( pSoldier );
|
CheckForAndAddMercToTeamPanel( Soldier );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -1,8 +1,8 @@
|
|||||||
#ifndef _GAMESCREEN_H
|
#ifndef _GAMESCREEN_H
|
||||||
#define _GAMESCREEN_H
|
#define _GAMESCREEN_H
|
||||||
|
|
||||||
|
#include "Overhead Types.h"
|
||||||
#include "fade screen.h"
|
#include "Fade Screen.h"
|
||||||
|
|
||||||
#define ARE_IN_FADE_IN( ) ( gfFadeIn || gfFadeInitialized )
|
#define ARE_IN_FADE_IN( ) ( gfFadeIn || gfFadeInitialized )
|
||||||
|
|
||||||
@@ -14,9 +14,9 @@ void FadeOutGameScreen( );
|
|||||||
typedef void (*MODAL_HOOK)( void );
|
typedef void (*MODAL_HOOK)( void );
|
||||||
|
|
||||||
|
|
||||||
extern BOOLEAN gfGameScreenLocateToSoldier;
|
extern BOOLEAN gfGameScreenLocateToSoldier;
|
||||||
extern BOOLEAN gfEnteringMapScreen;
|
extern BOOLEAN gfEnteringMapScreen;
|
||||||
extern UINT8 gubPreferredInitialSelectedGuy;
|
extern SoldierID gubPreferredInitialSelectedGuy;
|
||||||
|
|
||||||
|
|
||||||
void EnterMapScreen( );
|
void EnterMapScreen( );
|
||||||
@@ -41,4 +41,4 @@ void InitHelicopterEntranceByMercs( void );
|
|||||||
|
|
||||||
void InternalLeaveTacticalScreen( UINT32 uiNewScreen );
|
void InternalLeaveTacticalScreen( UINT32 uiNewScreen );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user