Compare commits

..
Author SHA1 Message Date
cambragol 3822e25201 Update inventory.cc
Added a comment regarding the button flaw on Inventory, Use On and Loot screens.

Also noted that scaling and flipping the main menu button is a temp solution/stop-gap measure.
2025-05-25 02:21:55 +09:00
Mike Klaas 2ba6cbee3a Merge branch 'Splash-and-Help-stretching' into Inventory-Buttons-Fix 2025-05-21 09:02:35 -07:00
cambragol cb90129ebd Merge branch 'main' into Inventory-Buttons-Fix 2025-05-21 09:16:34 +09:00
cambragol 13d5fd2e83 Update inventory.cc
flipped buttons to match top right light source
2025-05-21 08:39:17 +09:00
cambragol 88205ded62 Merge pull request #129 from fallout2-ce/Locations-Scroll-Menu
Update worldmap.cc
2025-05-20 20:40:37 +09:00
cambragol 7c3cbbac05 Update inventory.cc 2025-05-19 21:52:43 +09:00
cambragol a5a317ab40 Update inventory.cc 2025-05-19 21:42:52 +09:00
cambragol 372483a5ca Update game.cc
synchronize some settings
2025-05-18 17:00:52 +09:00
cambragol d46549dd11 Update game.cc 2025-05-18 16:43:26 +09:00
cambragol c6970e35de Update draw.h 2025-05-18 16:40:13 +09:00
cambragol 68e7d3e903 Update draw.cc 2025-05-18 16:39:23 +09:00
cambragol 3216fd02b0 Merge pull request #90 from fallout2-ce/cambragol-patch-3
Update game_dialog.cc to fix Combat Control buttons/sounds
2025-05-18 16:20:59 +09:00
cambragol b4ea465acb Merge pull request #135 from fallout2-ce/default-hires
Turn on hires stencils by default
2025-05-18 10:26:56 +09:00
Mike Klaas 6178149b07 Turn on hires stencils by default
I can't think of a reason why someone would want to do hires without the stencils.  Nevertheless it's still turn off-able using `HiResMode=0` if desired.

In addition, updated the Readme to not mention it (since only very few people would care about turning it off), and fixed the link to the sample ddraw.ini
2025-05-17 16:20:37 -07:00
Mike Klaas 942d88476a Update inventory.cc to fix button click sounds for 'Move Items'
Update inventory.cc to fix button click sounds for 'Move Items'
2025-05-17 16:02:56 -07:00
cambragol b72808a0d3 Update inventory.cc
removed erroneous click sound
2025-05-16 15:44:54 +09:00
cambragol 43fdd520cd Merge pull request #127 from fallout2-ce/mainmenu
Readme adjustments
2025-05-15 20:05:29 +09:00
cambragolandMike Klaas 004eb67b1f Apply suggestions from code review
Co-authored-by: Mike Klaas <mike.klaas@gmail.com>
2025-05-15 14:40:44 +09:00
cambragol 3cdd477df8 Update worldmap.cc
Reduced scrolling from 7! lines at a time, to 1. This also makes mouse scrolling actually work as it should as well.
2025-05-14 20:47:08 +09:00
sherief 9cd309b263 Merge pull request #128 from fallout2-ce/gapless-music
Gapless music.
2025-05-14 01:51:24 -07:00
cambragol aa96478d69 Update ddraw.ini
Settings: commented out or set to zero/Fallout 2
2025-05-14 16:02:47 +09:00
Mike Klaas de7f12f3ca Merge pull request #125 from fallout2-ce/remove-text-on-wm-transition
Remove floaters when moving to a new world map location
2025-05-13 23:20:51 -07:00
Sherief Farouk 7a2edd5677 The clang-format gods are fickle. 2025-05-13 04:02:05 -07:00
Sherief Farouk 66b68f84dc Pleasing the code formatting gods. 2025-05-13 03:57:59 -07:00
Sherief Farouk fef49692e1 _gsound_background_play_level_music() skips rewind when asked to play same track and gapless is on. 2025-05-13 03:37:02 -07:00
Sherief Farouk 6c3c0d34c2 Skipping loading sound when gapless music is enabled. 2025-05-13 03:34:01 -07:00
Sherief Farouk 42e016e4f9 Declared SFall config flag for gapless music. 2025-05-13 03:33:00 -07:00
cambragol 683091b456 Update README.md 2025-05-13 17:41:42 +09:00
cambragol c2c5a1c80a Update f2_res.ini 2025-05-13 17:23:04 +09:00
cambragol 1aeca09c39 Delete files/test.rtf 2025-05-13 17:12:28 +09:00
cambragol 0bbb594511 Add files via upload 2025-05-13 17:11:39 +09:00
cambragol 822a3d9bd4 Create test.rtf
trying to add/make a folder.
2025-05-13 17:07:46 +09:00
Mike Klaas 66542dc28a Merge pull request #121 from fallout2-ce/deobfuscate-item
Deobfuscate item.h,cc
2025-05-12 23:20:10 -07:00
Mike Klaas 5270cf0d55 Merge pull request #124 from fallout2-ce/mikeklaas-update-readme
Update README.md
2025-05-12 23:19:27 -07:00
Vasilii Rogin e598d06c4a Merge pull request #86 from roginvs/test_winxp_support
Linking stdlib statically for win32
2025-05-13 08:34:32 +03:00
Mike Klaas 66f7137f74 Remove floaters when moving to a new world map location
Fixes #115
2025-05-12 21:35:13 -07:00
Mike Klaas cf59439352 Update README.md 2025-05-12 16:51:40 -07:00
Mike Klaas 02ee5cba5d Update README.md
Update README with a pointer to the right release url, updated f2_res.ini support, and mention that this is a fork.
2025-05-12 16:50:37 -07:00
sherief 218fd20700 Merge pull request #51 from cambragol/patch-11
Update pipboy.cc for full pagination
2025-05-12 01:26:12 -07:00
Mike Klaas 7e18a6980a Deobfuscate item.h,cc
As always, no logic changes, only variable/field renames
2025-05-11 23:05:44 -07:00
Vasilii Rogin 66c0218741 Merge pull request #117 from fallout2-ce/fix_crash_on_game_load
Load pipboy messages when rendering saveslots
2025-05-11 14:05:01 +03:00
Vasilii Rogin 8fc789d6f9 Merge pull request #118 from fallout2-ce/add_pr_template
Add pull request template
2025-05-11 12:50:01 +03:00
Vasilii Rogin ddc5be3b6d Add PR template 2025-05-11 12:49:03 +03:00
Vasilii Rogin 833b6d8213 Fix formatting using this command:
docker run --rm \
  -v $(pwd):/app --workdir /app  \
  --user $(id -u):$(id -g) silkeh/clang:18 \
  bash -c 'find src -type f -name \*.cc -o -name \*.h | xargs clang-format -i'
2025-05-11 12:37:42 +03:00
Vasilii Rogin 4f117678ee Fix func declaration 2025-05-11 12:35:16 +03:00
Vasilii Rogin 499f994c37 Use struct initializer 2025-05-11 12:34:40 +03:00
Vasilii Rogin d6c17c1876 Emit warning if message is not found 2025-05-11 12:32:26 +03:00
Vasilii Rogin 347bf8b135 Load and unload pipboy messages for loadsave 2025-05-11 12:30:01 +03:00
Vasilii Rogin faf6439293 Load pipboy messages when rendering saveslots 2025-05-11 12:17:00 +03:00
Vasilii Rogin a259a3318e Merge pull request #114 from fallout2-ce/fix-skill-oob-access
Fix for #76 (occasional crash when using skills on scenery objects).
2025-05-11 08:58:14 +03:00
sherief 50e9fab544 Merge pull request #112 from fallout2-ce/deobfus-animation
Deobfuscate animation.cc
2025-05-10 17:42:42 -07:00
sherief 54a3b0c05c Merge pull request #111 from fallout2-ce/sherief-fix-ai-reload
Fixed AI loading single-rounds in magazines (duplicate with preview)
2025-05-10 13:11:21 -07:00
Sherief Farouk 0873eaab37 Fix for #76 (occasional crash when using skills on scenery objects). 2025-05-10 12:48:27 -07:00
Mike Klaas dff92e56fc Rename AnimationSequence.field_0 -> step 2025-05-10 12:31:28 -07:00
Mike Klaas 34748a2894 Deobfuscate animation.cc
Almost entirely renaming three struct fields of "AnimationSad" (an in-progress movement) and adding constants.

As usual, there are zero functional changes in this PR.
2025-05-10 00:02:03 -07:00
Vasilii Rogin 39160992ef Merge pull request #77 from sherief/asan-builds
Added CMake option for Address Sanitizer builds.
2025-05-10 09:27:24 +03:00
Vasilii Rogin eaa53b3e8e Merge pull request #108 from fallout2-ce/tmp_fix_web_ui_hash_until_fixed
Temp workaround: add commit hash for web interface
2025-05-09 18:39:43 +03:00
Vasilii Rogin 39bcb9875d Fix action parameter name 2025-05-09 18:33:30 +03:00
Vasilii Rogin 9097c2e76d Add commit hash to fix web builds until web ui is fixed 2025-05-09 18:28:49 +03:00
Vasilii Rogin 50db3587e4 Merge pull request #107 from mikeklaas/deobfus-action
Deobfucate action.h,cc
2025-05-09 17:49:50 +03:00
Mike Klaas 9e5a440895 typo 2025-05-08 22:52:12 -07:00
Mike Klaas 61ca374c03 Deobfuscate function parameters in action.{h,cc}
Zero functional changes were made.  This PR renames function parameters only
2025-05-08 22:49:15 -07:00
Vasilii Rogin 8f2b3a10dd Merge pull request #104 from fallout2-ce/IronKing24-code-decryption
Update tile.cc (duplicate)
2025-05-05 21:29:36 +03:00
Vasilii Rogin bbc4f44845 Merge pull request #99 from fallout2-ce/roginvs-use-webinterface-from-organization
Use web interface from organization
2025-05-05 20:30:32 +03:00
Vasilii Rogin 5367eba4f2 Add export 2025-05-05 20:12:34 +03:00
Vasilii Rogin 2d617883d3 Provide env as yml option 2025-05-05 20:07:30 +03:00
Vasilii Rogin 34f666fe55 Empty to trigger re-build 2025-05-05 20:03:26 +03:00
Vasilii Rogin 5ae46be317 Add debug info 2025-05-05 19:44:35 +03:00
Vasilii Rogin a4f9d7b940 Use env variables for debug info 2025-05-05 19:36:04 +03:00
Vasilii Rogin 251656e15b Merge pull request #102 from fallout2-ce/cambragol-patch-12-with-pipboy-text
Update loadsave with pipboy texts
2025-05-05 18:00:15 +03:00
Vasilii Rogin e1a8dc7adc Remove delay_ms 2025-05-05 17:55:06 +03:00
Vasilii Rogin ca029b3412 Merge pull request #103 from mikeklaas/deobfus-1
Deobfuscate several function parameters in art, game, game_mouse, reaction
2025-05-05 17:52:19 +03:00
Vasilii Rogin 70c3035cde Merge branch 'main' into cambragol-patch-12-with-pipboy-text 2025-05-05 07:53:08 +03:00
Mike Klaas 57b6b0caed Deobfuscate several function parameters
Some were already deobfuscated in the .c and I copied over to .h.  Others are new.

There are no semantic changes here.  Variable renames only
2025-05-04 16:21:04 -07:00
Vasilii Rogin 37ec7b1874 Merge pull request #98 from fallout2-ce/cambragol-patch-12
Update loadsave.cc (duplicate)
2025-05-05 01:58:27 +03:00
Vasilii Rogin 2395a6da3f Fix formatting 2025-05-04 20:34:02 +03:00
Vasilii Rogin 7338c2f428 Fix pipboy messages memory leak 2025-05-04 20:25:05 +03:00
Vasilii Rogin 2e2655ee1a Fix formatting 2025-05-04 20:09:31 +03:00
Vasilii Rogin 43c633bb89 Use messages from pipboy 2025-05-04 20:08:27 +03:00
Vasilii Rogin d5b4486d6e Revert back to pipboy text 2025-05-04 20:02:47 +03:00
Vasilii Rogin 590b832ba7 Use static texts, add comment 2025-05-04 20:00:42 +03:00
Vasilii Rogin cc7d9ed866 Revert "Use messages from pipboy"
This reverts commit 2f40ce663c.
2025-05-04 19:59:56 +03:00
Vasilii Rogin 8ad2cb7e2e Revert "Fix dependency"
This reverts commit e638c4cf0d.
2025-05-04 19:59:52 +03:00
Vasilii Rogin e638c4cf0d Fix dependency 2025-05-04 19:39:01 +03:00
Vasilii Rogin 2f40ce663c Use messages from pipboy 2025-05-04 19:36:24 +03:00
Vasilii Rogin 7b1a99a706 Merge remote-tracking branch 'fallout2-ce/main' into cambragol-patch-12 2025-05-04 19:27:50 +03:00
Vasilii Rogin 398c7adb9a Do not use designated initializers 2025-05-04 19:27:33 +03:00
Vasilii Rogin 424f2ffecc Use texts from proto 2025-05-04 19:21:51 +03:00
Vasilii Rogin d4c4022f55 Use color variables 2025-05-04 19:17:01 +03:00
Vasilii Rogin 1d0212ef5a Rename variables, use pages as config option 2025-05-04 19:11:51 +03:00
Vasilii Rogin c7417bb7e5 Merge pull request #101 from fallout2-ce/do_not_check_labels_if_it_is_main_push
Do not check PR labels if it is not a pull request
2025-05-04 19:06:58 +03:00
Vasilii Rogin 4d05fc1c4a Do not read PR labels if it is not a PR 2025-05-04 18:57:13 +03:00
Vasilii Rogin aa70a28509 Merge pull request #100 from roginvs/show_formatting_warnings_if_label_is_present
Show formatting warnings if label is present but do not raise error
2025-05-04 18:44:42 +03:00
Vasilii Rogin 49471a6154 Show formatting warnings if label is present but do not raise error 2025-05-04 17:50:02 +03:00
Vasilii Rogin 1b65466d44 Use web interface from organization 2025-05-04 16:44:21 +03:00
Vasilii Rogin 8416008b0f Merge branch 'main' into cambragol-patch-3 2025-05-04 16:08:48 +03:00
Vasilii Rogin aed6c37c67 Merge remote-tracking branch 'fallout2-ce/main' into cambragol-patch-12 2025-05-04 15:48:21 +03:00
Vasilii Rogin 1d48fb35b2 Merge pull request #97 from fallout2-ce/add_preview_builds
Add preview builds (from this repo branch)
2025-05-04 15:35:28 +03:00
cambragol 25fbb8e5c3 Update game_dialog.cc
Forgot to set the button code
2025-05-02 14:48:35 +09:00
cambragol ca9eaf16a9 Update game_dialog.cc
fixed small red button clicks to use proper format - now give click on press, and release. Return gives click, and Cancel does not (standard behavior)
2025-05-02 07:09:41 +09:00
cambragol a1237ee387 Update inventory.cc
small fix
2025-05-01 20:00:53 +09:00
cambragol d7a5c64cdb Update inventory.cc
fixing borked submit
2025-05-01 19:44:54 +09:00
cambragol 313991b1d4 Update inventory.cc
New approach, following the pattern found elsewhere in the code.
Cancel has no sound effect when using ESC (as found elsewhere)
2025-05-01 19:38:26 +09:00
cambragol 20e3810b9b Update game_dialog.cc
Forgot one function to exit (lock) frms

This fixes #94
2025-04-29 21:02:52 +09:00
cambragol 33dae201fe Update game_dialog.cc
Small updates fixes button layering with background - fixes #93
2025-04-29 13:07:49 +09:00
cambragol 62108938f5 Update game_dialog.cc to fix using keyboard
Fixed to make buttons work when clicked, or when using key commands.

This makes an imperfect button sound (misses the click release), however, the game is littered with this compromise.

Fixes #90
2025-04-28 23:08:01 +09:00
cambragol 6c13d67921 Update inventory.cc to fix button click sounds for 'Move Items'
Fixed to make buttons work when clicked, or when using key commands.

This makes an imperfect button sound (misses the click release), however, the game is littered with this compromise.

Fixs #88
2025-04-28 23:06:05 +09:00
cambragol aa7bda09d8 Update game_dialog.cc to fix Combat Control buttons/sounds
Fixes everything in #89
2025-04-28 22:11:40 +09:00
Vasilii Rogin 3163319290 Revert "Set MSVC_RUNTIME_LIBRARY in the makefile"
This reverts commit 2e8a65593e.
2025-04-27 18:25:15 +03:00
Vasilii Rogin 252d2ef263 Bump required cmake version 2025-04-27 18:20:39 +03:00
Vasilii Rogin ef09142375 Revert "Use cache string force"
This reverts commit a4ba0240f1.
2025-04-27 18:19:35 +03:00
Vasilii Rogin a4ba0240f1 Use cache string force 2025-04-27 18:13:14 +03:00
Vasilii Rogin 2e8a65593e Set MSVC_RUNTIME_LIBRARY in the makefile 2025-04-27 18:05:42 +03:00
Vasilii Rogin f35d1efab2 Revert "Set MSVC_RUNTIME_LIBRARY in the makefile"
This reverts commit 42a6a16f73.
2025-04-27 18:03:17 +03:00
Vasilii Rogin 42a6a16f73 Set MSVC_RUNTIME_LIBRARY in the makefile 2025-04-27 17:58:12 +03:00
Vasilii Rogin 85389ef2f3 Linking stdlib statically 2025-04-27 14:45:05 +03:00
Sherief Farouk 767ae9af25 Fixed crash when running out of ammo before clip is full. 2025-04-26 05:36:03 -07:00
Sherief Farouk 01be11fce5 Added CMake option for Address Sanitizer builds. 2025-04-25 04:11:46 -07:00
Sherief Farouk 12fe582e6f Fixed AI loading single-rounds in magazines.
IIRC, the "unit" for things like 10mm ammo in F1 used to be a dozen (12x).
In F2CE, the unit of ammo seems to be a single round. Prior to this patch,
AI companions (in my case, the Mercenary in Sonora) would reload a single
round into their weapon when they run out, so turns in combat become a loop
of fire, reload, fire, reload, etc.

With this patch, AI reloading keeps inserting ammo into the weapon until
capacity is reached or the critter runs out of ammo.
2025-04-22 00:35:30 -07:00
cambragol bdb4feedf9 Update loadsave.cc
Clang formatting.
2025-04-21 20:43:54 +09:00
cambragol 5e93479192 Update pipboy.cc
Clang formatting?
2025-04-21 20:39:11 +09:00
cambragol 503695cd4d Update loadsave.cc
Restored the emscripten and touchscreen stuff.
2025-04-21 07:14:42 +09:00
cambragol 4dfc7538db Update loadsave.cc
Increases Load/Save slots to 100 - sFall?

Adds pagination and controls to move between slots - previous scrolling/key functions work as normal, and move between pages

No ini setting yet, code it set up to shift based off a single ini setting.
2025-04-20 18:48:58 +09:00
cambragol afeec298bf Update pipboy.cc for full pagination
Adds full pagination to Status, Data and Automaps main and sub pages to prevent overflow.
2025-04-20 18:37:52 +09:00
IronKing24 8ad0067510 2025-02-09 12:51:11 +03:00
IronKing24 894d9aab52 code formatting 2025-02-09 12:47:46 +03:00
IronKing24 043b43d04b Merge branch 'fallout2-ce:main' into code-decryption 2025-02-09 12:24:28 +03:00
MADMAN7 144b3beb79 remove side effects from the conditionals 2024-06-24 11:21:31 +03:00
MADMAN7 30bbb3702a Update tile.cc
decrypt tileFromScreenXY based on code from SFall HRP
2024-06-17 17:05:59 +03:00
39 changed files with 2144 additions and 1004 deletions
+31
View File
@@ -0,0 +1,31 @@
### Description
<!--- Clearly describe the changes introduced by this PR. What was fixed, added, or updated? --->
### Reproduction Steps and Savefile (if available)
<!--- Provide detailed steps to reproduce the issue. Include a savefile if applicable, preferrably for Sonora --->
### Screenshots
<!--- If the PR includes visual changes, add screenshots here. --->
<!---
**Important Notes**
- *Preview builds are not available for pull requests from forked repositories.* To enable preview builds, submit the PR from a branch within this repository.
- *Formatting issues? You have two options:*
1. **Fix formatting automatically** using the following Docker command: *(If you're using Windows, remove `--user $(id -u):$(id -g)`)*
```bash
docker run --rm \
-v $(pwd):/app --workdir /app \
--user $(id -u):$(id -g) silkeh/clang:18 \
bash -c 'find src -type f -name \*.cc -o -name \*.h | xargs clang-format -i'
```
2. **Skip formatting check** by adding the `skip-formatting` label to this PR.
--->
+7 -4
View File
@@ -43,8 +43,8 @@ jobs:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
uses: actions/checkout@v4
with:
repository: ololoken/fallout2-ce-ems
ref: 0764f9fdd0abf27bd9b0d3997ca0a8e61f380058
repository: fallout2-ce/fallout2-ce-ems
ref: 8dc61ba6e8e62116f4810ffe89d0cece00f508d7
path: fallout2-ce-ems
- name: Set deployment path
@@ -68,10 +68,13 @@ jobs:
npm install
cp ../build/fallout2-ce.js src/assets/fallout2ce
cp ../build/fallout2-ce.wasm src/assets/fallout2ce
sed -i 's/Starting wasm module/Starting wasm module ${{github.event.pull_request.head.sha || github.sha }}/' src/pages/Launcher.tsx
export F2_WEB_INFO=Web=$(git rev-parse HEAD)
echo "F2_WEB_INFO=$F2_WEB_INFO"
echo "F2_GAME_VERSION=$F2_GAME_VERSION"
npm run build
env:
SITE_BASE: ${{ steps.set-path.outputs.SITE_BASE }}
F2_GAME_VERSION: Game=${{github.event.pull_request.head.sha || github.sha }}
- name: Install rsync (required for the next step)
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
@@ -93,4 +96,4 @@ jobs:
gh pr comment ${{ github.event.pull_request.number }} \
--body "🚀 WebAssembly PR Preview for ${{github.event.pull_request.head.sha || github.sha }} is available at: https://${{ github.repository_owner }}.github.io/fallout2-ce/PR-${{ github.event.pull_request.number }}/"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+13 -7
View File
@@ -46,14 +46,20 @@ jobs:
- name: clang-format
run: |
echo "Showing PR labels..."
gh pr view ${{ github.event.pull_request.number }} --repo "${{ github.repository }}" --json labels
echo "Checking labels on PR..."
if gh pr view ${{ github.event.pull_request.number }} --repo "${{ github.repository }}" --json labels --jq '.labels[].name' | grep -q "skip-formatting"; then
echo "skip-formatting label found — skipping job."
exit 0
if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
echo "Showing PR labels..."
gh pr view ${{ github.event.pull_request.number }} --repo "${{ github.repository }}" --json labels
echo "Checking labels on PR..."
if gh pr view ${{ github.event.pull_request.number }} --repo "${{ github.repository }}" --json labels --jq '.labels[].name' | grep -q "skip-formatting"; then
echo "skip-formatting label found - do not raise error"
echo "==============================="
find src -type f \( -name \*.cc -o -name \*.h \) | xargs clang-format --dry-run
exit 0
fi
echo "skip-formatting label not found - raise error if formatting is not correct"
else
echo "Not a PR, do not check labels"
fi
echo "skip-formatting label not found — continuing job."
find src -type f \( -name \*.cc -o -name \*.h \) | xargs clang-format --dry-run --Werror
+55 -1
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.18)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
@@ -305,12 +305,14 @@ if(WIN32)
_CRT_NONSTDC_NO_WARNINGS
NOMINMAX
WIN32_LEAN_AND_MEAN
_STATIC_CPPLIB
)
endif()
if(WIN32)
target_link_libraries(${EXECUTABLE_NAME}
winmm
libcpmt
)
endif()
@@ -447,3 +449,55 @@ if(APPLE)
include(CPack)
endif()
# Add option to enable AddressSanitizer
option(ENABLE_ASAN "Enable AddressSanitizer for debug builds" OFF)
# Set C++ standard and other existing settings
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
# Define ASan flags for supported compilers (GCC, Clang, MSVC)
if(ENABLE_ASAN)
if(CMAKE_SYSTEM_NAME MATCHES "Emscripten|Android|iOS")
message(WARNING "AddressSanitizer is not supported on ${CMAKE_SYSTEM_NAME}. Disabling ASan.")
set(ENABLE_ASAN OFF)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
message(STATUS "Enabling AddressSanitizer for debug build (GCC/Clang)")
set(ASAN_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${ASAN_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${ASAN_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${ASAN_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${ASAN_FLAGS}")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# Check if using clang-cl or native MSVC
if(CMAKE_CXX_COMPILER MATCHES "clang-cl")
message(STATUS "Enabling AddressSanitizer for debug build (clang-cl)")
set(ASAN_FLAGS "-fsanitize=address -fno-omit-frame-pointer")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${ASAN_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${ASAN_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fsanitize=address")
else()
message(STATUS "Enabling AddressSanitizer for debug build (MSVC)")
set(ASAN_FLAGS "/fsanitize=address")
# MSVC requires /Zi or /Z7 for debug info with ASan
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${ASAN_FLAGS} /Zi")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${ASAN_FLAGS} /Zi")
# No additional linker flags needed for MSVC ASan
# Disable incremental linking as it's incompatible with ASan
string(REPLACE "/INCREMENTAL" "/INCREMENTAL:NO" CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
string(REPLACE "/INCREMENTAL" "/INCREMENTAL:NO" CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}")
endif()
else()
message(WARNING "AddressSanitizer is not supported with ${CMAKE_CXX_COMPILER_ID}. Disabling ASan.")
set(ENABLE_ASAN OFF)
endif()
endif()
# Existing debug flags for Emscripten (ensure ASan doesn't conflict)
if(CMAKE_SYSTEM_NAME MATCHES "Emscripten")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
endif()
+1 -1
View File
@@ -33,7 +33,7 @@
"cacheVariables": {
"CMAKE_GENERATOR_TOOLSET": "v141_xp",
"CMAKE_C_FLAGS": "/D_WIN32_WINNT=0x0501",
"CMAKE_CXX_FLAGS": "/D_WIN32_WINNT=0x0501",
"CMAKE_CXX_FLAGS": "/D_WIN32_WINNT=0x0501 /D_STATIC_CPPLIB",
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>"
}
},
+36 -9
View File
@@ -1,14 +1,14 @@
# Fallout 2 Community Edition
Fallout 2 Community Edition is a fully working re-implementation of Fallout 2, with the same original gameplay, engine bugfixes, and some quality of life improvements, that works (mostly) hassle-free on multiple platforms.
Fallout 2 Community Edition is a fully working re-implementation of Fallout 2, with the same original gameplay, engine bugfixes, and some quality of life improvements, that works (mostly) hassle-free on multiple platforms. This is a fork of the original project, which isn't getting regular updates.
Popular Fallout 2 total conversion mods are partially supported. Original versions of Nevada and Sonora (that do not rely on extended features provided by Sfall) likely work, although there is no complete walkthrough confirmation yet. [Fallout 2 Restoration Project](https://github.com/BGforgeNet/Fallout2_Restoration_Project), [Fallout Et Tu](https://github.com/rotators/Fo1in2) and [Olympus 2207](https://olympus2207.com) are not yet supported. Other mods (particularly Resurrection and Yesterday) are not tested.
Popular Fallout 2 total conversion mods are partially supported. Original versions of Nevada and Sonora (that do not rely on extended features provided by Sfall) work. [Fallout 2 Restoration Project](https://github.com/BGforgeNet/Fallout2_Restoration_Project), [Fallout Et Tu](https://github.com/rotators/Fo1in2) and [Olympus 2207](https://olympus2207.com) are not yet supported. Other mods (particularly Resurrection and Yesterday) are not tested.
There is also [Fallout Community Edition](https://github.com/alexbatalov/fallout1-ce).
There is also [Fallout Community Edition](https://github.com/alexbatalov/fallout1-ce) (not affiliated with this fork).
## Installation
You must own the game to play. Purchase your copy on [GOG](https://www.gog.com/game/fallout_2), [Epic Games](https://store.epicgames.com/p/fallout-2) or [Steam](https://store.steampowered.com/app/38410). Download latest [release](https://github.com/alexbatalov/fallout2-ce/releases) or build from source. You can also check latest [debug](https://github.com/alexbatalov/fallout2-ce/actions) build intended for testers.
You must own the game to play. Purchase your copy on [GOG](https://www.gog.com/game/fallout_2), [Epic Games](https://store.epicgames.com/p/fallout-2) or [Steam](https://store.steampowered.com/app/38410). Download latest [release](https://github.com/fallout2-ce/fallout2-ce/releases) or build from source.
### Windows
@@ -96,13 +96,36 @@ The main configuration file is `fallout2.cfg`. There are several important setti
The `sound` folder (with `music` folder inside) might be located either in `data` folder, or be in the Fallout folder. Update `music_path1` setting to match your hierarchy, usually it's `data/sound/music/` or `sound/music/`. Make sure it matches your path exactly (so it might be `SOUND/MUSIC/` if you've installed Fallout from CD). Music files themselves (with `ACM` extension) should be all uppercased, regardless of `sound` and `music` folders.
The second configuration file is `f2_res.ini`. Use it to change game window size and enable/disable fullscreen mode.
The second configuration file is `f2_res.ini`. Use it to change game window size, enable/disable fullscreen mode and configure IFACE settings (the control bar at the bottom of the game screen).
```ini
[MAIN]
SCR_WIDTH=1280
SCR_HEIGHT=720
WINDOWED=1
WINDOWED=1 ; 0 = fullscreen
SCALE_2X=1 ; 0 = original scale, 1 = 2x - requires increasing the minimum resolution from 640x480 to 1280x960.
[IFACE]
; if IFACE_BAR_MODE=0 - the bottom of the map view window sits at the top of the IFACE Bar.
; if IFACE_BAR_MODE=1 - the bottom of the map view window extends to the base of the screen and is overlapped by the IFACE Bar.
IFACE_BAR_MODE=0
;if IFACE_BAR_SIDE_ART=0 - Black, No Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=1 - Metal (grey) look Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=2 - Leather look Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=3-6 - Alternative Metal look Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=7 - Alternative Leather look Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=8 - Metal (brown) look Iface-bar side art used.
IFACE_BAR_SIDE_ART=2
;if IFACE_BAR_SIDES_ORI=0 - Iface-bar side graphics extend from the Iface-Bar to the Screen edges.
;if IFACE_BAR_SIDES_ORI=1 - Iface-bar side graphics extend from the Screen edges to the Iface-Bar.
IFACE_BAR_SIDES_ORI=0
;This will increase the width of the interface bar expanding the area used to display text.
;if IFACE_BAR_WIDTH=640 - Interface bar will remain at it's original width.
;if IFACE_BAR_WIDTH=800 - Interface bar will use 800pix wide asset from f2_res.dat.
IFACE_BAR_WIDTH=640
```
Recommendations:
@@ -110,15 +133,19 @@ Recommendations:
- **Tablets**: Set these values to logical resolution of your device, for example iPad Pro 11 is 1668x2388 (pixels), but it's logical resolution is 834x1194 (points).
- **Mobile phones**: Set height to 480, calculate width according to your device screen (aspect) ratio, for example Samsung S21 is 20:9 device, so the width should be 480 * 20 / 9 = 1067.
In time this stuff will receive in-game interface, right now you have to do it manually.
In time this stuff will receive in-game interface, right now you have to do it manually. For a sample f2_res.ini configuration file, containing all currently working settings use this link: [f2_res.ini](https://raw.githubusercontent.com/fallout2-ce/fallout2-ce/refs/heads/mainmenu/files/f2_res.ini)
The third configuration file is `ddraw.ini` (part of Sfall). There are dozens of options that adjust or override engine behaviour and gameplay mechanics. This file is intended for modders and advanced users. Currently only a small subset of these settings are actually implemented.
*Note*: use of the IFACE_BAR settings requires the f2_res.dat file, which contains graphical assets. Various versions are available, but one compatible with the above f2_res.ini be found here: [f2_res.dat](https://github.com/fallout2-ce/fallout2-ce/raw/refs/heads/mainmenu/files/f2_res.dat)
The third configuration file is `ddraw.ini` (part of Sfall). There are dozens of options that adjust or override engine behaviour and gameplay mechanics. This file is intended for modders and advanced users.
For a sample ddraw.ini configuration file, containing all currently working settings use this link: [ddraw.ini](https://raw.githubusercontent.com/fallout2-ce/fallout2-ce/refs/heads/main/files/ddraw.ini)
## Contributing
Integrating Sfall goodies is the top priority. Quality of life updates are OK too. Please no large scale refactorings at this time as we need to reconcile changes from Reference Edition, which will make this process slow and error-prone. In any case open up an issue with your suggestion or to notify other people that something is being worked on.
### Intergrating Sfall
### Integrating Sfall
There are literally hundreds if not thousands of fixes and features in sfall. I guess not all of them are needed in Community Edition, but for the sake of compatibility with big mods out there, let's integrate them all.
+207
View File
@@ -0,0 +1,207 @@
;sfall configuration settings for Fallout 2 CE
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Main]
;Set to one to hide areas outside map bounds when using higher than 640x480 resolution, and to zero to disable
;HiResMode=1
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Misc]
;Uncomment these lines to change the timers of how many days after the game starts Hakunin dream sequences will occur
;MovieTimer_artimer1=5000
;MovieTimer_artimer2=5000
;MovieTimer_artimer3=5000
;MovieTimer_artimer4=5000
;To start a new game somewhere other than artemple.map, uncomment the next line and set it to the map you want to load
;StartingMap=V13ent.map
;To change the 'FALLOUT II v1.02d' version string on the main menu, uncomment the next line
;You can use up to 2 %d's in this if you want to include Fallout's version number somewhere
;VersionString=FALLOUT II v1.02d
;To use a config file other than fallout2.cfg, uncomment the next line and add the name of your new file
;ConfigFile=
;To use a patch file other than patch000.dat, uncomment the next line and add your new file name
;If you want to load multiple patch files (up to 1000) at once, you can include a %d in the file name (sprintf syntax)
;PatchFile=patch%03d.dat
;Set to 1 to allow using the caret character '^' in dialog msg files to specify alternative text in dialogue based on the player's gender
;The text must be enclosed in angle brackets (example: <MaleText^FemaleText>)
;DialogGenderWords=0
;To change the default and starting player models, uncomment the next four lines.
;The default models can also be changed in-game via script
;MaleStartModel=hmjmps
;MaleDefaultModel=hmjmps
;FemaleStartModel=hfjmps
;FemaleDefaultModel=hfjmps
;To change the starting year, month or day, uncomment the next 3 lines
;Both StartMonth and StartDay are 0-indexed (i.e. 0 is January or the first day of a month)
;StartYear=2241
;StartMonth=01
;StartDay=01
;Set to 1 if you want the pipboy to be available at the start of the game
;Set to 2 to make the pipboy available by only skipping the vault suit movie check
;PipBoyAvailableAtGameStart=1
;Choose the damage formula used to calculate combat damage.
;Don't set this to anything other than 0 unless another mod you're using explicitly tells you to!
;0 - Fallout default
;1 - Glovz's Damage Fix
;2 - Glovz's Damage Fix with Damage Multiplier tweak
;5 - Haenlomal's Yet Another Ammo Mod
;DamageFormula=0
;Prevents you from using 0 to escape from dialogue at any time.
;DialogueFix=1
;Prevents you from using number keys to enter unvisited areas on a town map
TownMapHotkeysFix=1
;Set to 1 to use a CriticalOverrides.ini file to override the default critical table
;Set to 2 to use the default critical with bug fixes (doesn't require an ini)
;Set to 3 to use a new format CriticalOverrides.ini file, with preadded bug fixes
;If the ExtraKillTypes option is enabled, this should be set to 3, with containing entries for any new types
;Must be non-zero to use the edit/get/reset_critical script functions
;OverrideCriticalTable=2
;Set to 1 to get notification of karma changes in the notification window
DisplayKarmaChanges=0
;Set to 1 to skip the 3 opening movies
;Set to 2 to also skip the splash screen
SkipOpeningMovies=0
;Change the Skilldex cursor FRM numbers
;Default is 293 for all skills
Lockpick=293
Steal=293
Traps=293
FirstAid=293
Doctor=293
Science=293
Repair=293
;Uncomment these lines to control the premade characters offered when starting a new game
;Multiple options should be separated by commas, and there must be the same number of entries in both lines
;Each name in PremadePaths is limited to 11 characters
;PremadePaths=combat,diplomat,stealth
;PremadeFIDs=201,203,202
;Use this line to modify the list of cities and their associated global variables used for city reputations
;Syntax is 'city id:global id', with each city/global pair separated by a comma.
;CityRepsList=0:5001,2:5003,3:5004,4:5005,5:5006,6:5007,7:5008,8:5009,10:5011,11:5012,60:1640
;Set this to a valid path to save a copy of the console contents
;ConsoleOutputPath=console.txt
;Set to 1 to add additional pages of save slots !!! can be implemented !!!
;ExtraSaveSlots=1
;To use more than one save slot for quick saving (F6 key) without picking a slot beforehand, set the next two lines
;Quick save will cyclically overwrite saves from the first slot on the specified page to the last slot on the n-th page
;AutoQuickSave sets how many pages you want to use for quick saving (valid range: 1..10)
;Set to 0 to disable
AutoQuickSave=0
;These lines allow you to control the karma FRMs displayed on the character screen
;Number of KarmaPoints should be 1 less than number of KarmaFRMs
;KarmaFRMs=47,48,49
;KarmaPoints=-100,100
;Set to 1 to allow science and repair to be used on the player, or 2 for all critters. (Rather than only brahmin/robots)
ScienceOnCritters=0
;Set to 1 to fix the bug that caused bonus HtH damage to not be applied correctly.
BonusHtHDamageFix=1
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
;DisplayBonusDamage=1
;Set to 1 to remove the limits that stop the game from rolling critical successes/failures in the first few days of game time
RemoveCriticalTimelimits=0
;Change the colour of the font used on the main menu for the Fallout/sfall version string and copyright text
;It's the last byte ('3C' by default) that picks the colour used. The first byte supplies additional flags for this option
;1 - change the colour for the version string only
;2 - underline text for the version string
;4 - use monospace font for the version string
;MainMenuFontColour=0x000055
;Change the colour of the font used on the main menu for the button text
;MainMenuBigFontColour=0x3C
;Uncomment the next four lines to move the main menu buttons and credit text (the 'Copyright(c)' line on the main menu)
;MainMenuOffsetX=392
;MainMenuOffsetY=26
;MainMenuCreditsOffsetX=0
;MainMenuCreditsOffsetY=0
;These options modify the bullet distribution of burst attacks
;All the bullets are divided into three groups: center, left, and right
;These groups will then travel along three parallel tracks, trying to hit targets on the way
;CenterMult/Div set the ratio of how many bullets go to the center group, and the remaining are divided equally to the left and right sides
;TargetMult/Div set the ratio of how many bullets in the center group will attack the primary target directly
;Multiplier values are capped at divisor values
;ComputeSpray_CenterMult=1
;ComputeSpray_CenterDiv=3
;ComputeSpray_TargetMult=1
;ComputeSpray_TargetDiv=2
;Set to 1 to make explosions and projectiles emit light
;ExplosionsEmitLight=1
;Uncomment these lines to change explosives damage. DmgMax can be set to 9999 at max, and DmgMin is capped at DmgMax
;Dynamite_DmgMax=50
;Dynamite_DmgMin=30
;PlasticExplosive_DmgMax=80
;PlasticExplosive_DmgMin=40
;To add additional game msg files, uncomment the next line and set a comma delimited list of filenames without .msg extension
;By default, the files will have consecutive numbers assigned beginning with 0
;You can use the syntax 'filename:number' to manually assign numbers to specific msg files, with each pair separated by a comma
;If a file after the specified pair does not have a number assigned, it will have the next consecutive number from the last pair
;You need to use the message_str_game script function to get messages from the files
;ExtraGameMsgFileList=
;Set to 1 to display numbered dialogue options
NumbersInDialogue=0
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Configuration ini files
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;To change the path and filename of the critical table file, uncomment the next line
;OverrideCriticalFile=config\CriticalOverrides.ini
;To add additional books to the game, uncomment the next line and point to a file containing book information
;See the Books.ini in the modders pack for an example file
;BooksFile=sfall\Books.ini
;Point to an ini file containing elevator data
;ElevatorsFile=config\Elevators.ini
;Allows you to change the requirements and effects of unarmed attacks
;See the Unarmed.ini in the modders pack for an example file
;UnarmedFile=sfall\Unarmed.ini
;To change some engine parameters for the game mechanics, uncomment the next line
;TweaksFile=sfall\Tweaks.ini
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Scripts]
;Comma-separated list of masked paths to load global scripts from
;Only use single backslash \ as the directory separator
;Paths outside of scripts folder are supported
;GlobalScriptPaths=scripts\gl_*.int,scripts\sfall\gl*.int
;Uncomment the option to specify an additional directory for ini files used by scripts
;The game will search for ini files first relative to this directory and then relative to the root directory if not found
;The path length is limited to 61 characters
;IniConfigFolder=mods\iniConfigs
BIN
View File
Binary file not shown.
+50
View File
@@ -0,0 +1,50 @@
;hi-res configuration settings for Fallout 2 CE
;##################################################################################################################
[MAIN]
; Set SCALE_2X=1 to scale the game x2.
; Note: This will increase the minimum resolution to from 640x480 to 1280x960.
SCALE_2X=1
; Set the Fullscreen resolution here.
SCR_WIDTH=640
SCR_HEIGHT=480
; Set WINDOWED=1 to enable windowed mode.
WINDOWED=1
;##################################################################################################################
[IFACE]
; if IFACE_BAR_MODE=0 - the bottom of the map view window sits at the top of the IFACE Bar.
; if IFACE_BAR_MODE=1 - the bottom of the map view window extends to the base of the screen and is overlapped by the IFACE Bar.
IFACE_BAR_MODE=0
;if IFACE_BAR_SIDE_ART=0 - Black, No Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=1 - Metal (grey) look Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=2 - Leather look Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=3-6 - Alternative Metal look Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=7 - Alternative Leather look Iface-bar side art used.
;if IFACE_BAR_SIDE_ART=8 - Metal (brown) look Iface-bar side art used.
IFACE_BAR_SIDE_ART=2
;if IFACE_BAR_SIDES_ORI=0 - Iface-bar side graphics extend from the Iface-Bar to the Screen edges.
;if IFACE_BAR_SIDES_ORI=1 - Iface-bar side graphics extend from the Screen edges to the Iface-Bar.
IFACE_BAR_SIDES_ORI=0
;This will increase the width of the interface bar expanding the area used to display text.
;if IFACE_BAR_WIDTH=640 - Interface bar will remain at it's original width.
;if IFACE_BAR_WIDTH=800 - Interface bar will use 800pix wide asset from f2_res.dat. Note
IFACE_BAR_WIDTH=640
;##################################################################################################################
[STATIC_SCREENS]
; if set to 0 - background image will display at its original size.
; if set to 1 - background image will stretch to fit the screen while maintaining its aspect ratio.
; if set to 2 - background image will stretch to fill the screen.
SPLASH_SCRN_SIZE=2
+95 -93
View File
@@ -73,30 +73,32 @@ static const int gMaximumBloodDeathAnimations[DAMAGE_TYPE_COUNT] = {
ANIM_EXPLODED_TO_NOTHING,
};
// Note: some of these are callbacks that always take two Object*, but may not use them.
// Ignored parameters are marked with underscores.
static int actionKnockdown(Object* obj, int* anim, int maxDistance, int rotation, int delay);
static int _action_blood(Object* obj, int anim, int delay);
static int _pick_death(Object* attacker, Object* defender, Object* weapon, int damage, int attackerAnimation, bool hitFromFront);
static int _check_death(Object* obj, int anim, int minViolenceLevel, bool hitFromFront);
static int _internal_destroy(Object* a1, Object* a2);
static int _internal_destroy(Object* _, Object* toDestroy);
static void _show_damage_to_object(Object* defender, int damage, int flags, Object* weapon, bool hitFromFront, int knockbackDistance, int knockbackRotation, int attackerAnimation, Object* attacker, int delay);
static int _show_death(Object* obj, int anim);
static int _show_damage_extras(Attack* attack);
static void _show_damage(Attack* attack, int attackerAnimation, int delay);
static int _action_melee(Attack* attack, int a2);
static int _action_ranged(Attack* attack, int a2);
static int _is_next_to(Object* a1, Object* a2);
static int _action_climb_ladder(Object* a1, Object* a2);
static int _action_melee(Attack* attack, int anim);
static int _action_ranged(Attack* attack, int anim);
static int _is_next_to(Object* obj1, Object* obj2);
static int _action_climb_ladder(Object* critter, Object* ladder);
static int _action_use_skill_in_combat_error(Object* critter);
static int _pick_fall(Object* obj, int anim);
static int _report_explosion(Attack* attack, Object* sourceObj);
static int _finished_explosion(Object* a1, Object* a2);
static int _finished_explosion(Object*, Object*);
static int _compute_explosion_damage(int min, int max, Object* defender, int* knockbackDistancePtr);
static int _can_talk_to(Object* a1, Object* a2);
static int _talk_to(Object* a1, Object* a2);
static int _report_dmg(Attack* attack, Object* a2);
static int _can_talk_to(Object* obj, Object* critter);
static int _talk_to(Object* _, Object* critter);
static int _report_dmg(Attack* attack, Object* _);
static int _compute_dmg_damage(int min, int max, Object* obj, int* knockbackDistancePtr, int damageType);
static int hideProjectile(void* a1, void* a2);
static int hideProjectile(void* _, void* projectile);
// 0x410468
int actionKnockdown(Object* obj, int* anim, int maxDistance, int rotation, int delay)
@@ -281,9 +283,9 @@ int _check_death(Object* obj, int anim, int minViolenceLevel, bool hitFromFront)
}
// 0x4108C8
int _internal_destroy(Object* a1, Object* a2)
int _internal_destroy(Object* _, Object* toDestroy)
{
return _obj_destroy(a2);
return _obj_destroy(toDestroy);
}
// TODO: Check very carefully, lots of conditions and jumps.
@@ -985,10 +987,10 @@ int _action_ranged(Attack* attack, int anim)
}
// 0x411D68
int _is_next_to(Object* a1, Object* a2)
int _is_next_to(Object* obj1, Object* obj2)
{
if (objectGetDistanceBetween(a1, a2) > 1) {
if (a2 == gDude) {
if (objectGetDistanceBetween(obj1, obj2) > 1) {
if (obj2 == gDude) {
MessageListItem messageListItem;
// You cannot get there.
messageListItem.num = 2000;
@@ -1003,9 +1005,9 @@ int _is_next_to(Object* a1, Object* a2)
}
// 0x411DB4
int _action_climb_ladder(Object* a1, Object* a2)
int _action_climb_ladder(Object* critter, Object* ladder)
{
if (a1 == gDude) {
if (critter == gDude) {
int anim = FID_ANIM_TYPE(gDude->fid);
if (anim == ANIM_WALK || anim == ANIM_RUNNING) {
reg_anim_clear(gDude);
@@ -1016,46 +1018,46 @@ int _action_climb_ladder(Object* a1, Object* a2)
int actionPoints;
if (isInCombat()) {
animationRequestOptions = ANIMATION_REQUEST_RESERVED;
actionPoints = a1->data.critter.combat.ap;
actionPoints = critter->data.critter.combat.ap;
} else {
animationRequestOptions = ANIMATION_REQUEST_UNRESERVED;
actionPoints = -1;
}
if (a1 == gDude) {
if (critter == gDude) {
animationRequestOptions = ANIMATION_REQUEST_RESERVED;
}
animationRequestOptions |= ANIMATION_REQUEST_NO_STAND;
reg_anim_begin(animationRequestOptions);
int tile = tileGetTileInDirection(a2->tile, ROTATION_SE, 1);
int tile = tileGetTileInDirection(ladder->tile, ROTATION_SE, 1);
int walkDistance = 5;
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_WALK_DISTANCE, &walkDistance);
if (actionPoints != -1 || objectGetDistanceBetween(a1, a2) < walkDistance) {
animationRegisterMoveToTile(a1, tile, a2->elevation, actionPoints, 0);
if (actionPoints != -1 || objectGetDistanceBetween(critter, ladder) < walkDistance) {
animationRegisterMoveToTile(critter, tile, ladder->elevation, actionPoints, 0);
} else {
animationRegisterRunToTile(a1, tile, a2->elevation, actionPoints, 0);
animationRegisterRunToTile(critter, tile, ladder->elevation, actionPoints, 0);
}
animationRegisterCallbackForced(a1, a2, (AnimationCallback*)_is_next_to, -1);
animationRegisterRotateToTile(a1, a2->tile);
animationRegisterCallbackForced(a1, a2, (AnimationCallback*)_check_scenery_ap_cost, -1);
animationRegisterCallbackForced(critter, ladder, (AnimationCallback*)_is_next_to, -1);
animationRegisterRotateToTile(critter, ladder->tile);
animationRegisterCallbackForced(critter, ladder, (AnimationCallback*)_check_scenery_ap_cost, -1);
int weaponAnimationCode = (a1->fid & 0xF000) >> 12;
int weaponAnimationCode = (critter->fid & 0xF000) >> 12;
if (weaponAnimationCode != 0) {
const char* puttingAwaySfx = sfxBuildCharName(a1, ANIM_PUT_AWAY, CHARACTER_SOUND_EFFECT_UNUSED);
animationRegisterPlaySoundEffect(a1, puttingAwaySfx, -1);
animationRegisterAnimate(a1, ANIM_PUT_AWAY, 0);
const char* puttingAwaySfx = sfxBuildCharName(critter, ANIM_PUT_AWAY, CHARACTER_SOUND_EFFECT_UNUSED);
animationRegisterPlaySoundEffect(critter, puttingAwaySfx, -1);
animationRegisterAnimate(critter, ANIM_PUT_AWAY, 0);
}
const char* climbingSfx = sfxBuildCharName(a1, ANIM_CLIMB_LADDER, CHARACTER_SOUND_EFFECT_UNUSED);
animationRegisterPlaySoundEffect(a1, climbingSfx, -1);
animationRegisterAnimate(a1, ANIM_CLIMB_LADDER, 0);
animationRegisterCallback(a1, a2, (AnimationCallback*)_obj_use, -1);
const char* climbingSfx = sfxBuildCharName(critter, ANIM_CLIMB_LADDER, CHARACTER_SOUND_EFFECT_UNUSED);
animationRegisterPlaySoundEffect(critter, climbingSfx, -1);
animationRegisterAnimate(critter, ANIM_CLIMB_LADDER, 0);
animationRegisterCallback(critter, ladder, (AnimationCallback*)_obj_use, -1);
if (weaponAnimationCode != 0) {
animationRegisterTakeOutWeapon(a1, weaponAnimationCode, -1);
animationRegisterTakeOutWeapon(critter, weaponAnimationCode, -1);
}
return reg_anim_end();
@@ -1522,9 +1524,9 @@ int actionUseSkill(Object* user, Object* target, int skill)
}
// 0x412BC4
bool _is_hit_from_front(Object* a1, Object* a2)
bool _is_hit_from_front(Object* attacker, Object* defender)
{
int diff = a1->rotation - a2->rotation;
int diff = attacker->rotation - defender->rotation;
if (diff < 0) {
diff = -diff;
}
@@ -1533,11 +1535,11 @@ bool _is_hit_from_front(Object* a1, Object* a2)
}
// 0x412BEC
bool _can_see(Object* a1, Object* a2)
bool _can_see(Object* source, Object* target)
{
int diff;
diff = a1->rotation - tileGetRotationTo(a1->tile, a2->tile);
diff = source->rotation - tileGetRotationTo(source->tile, target->tile);
if (diff < 0) {
diff = -diff;
}
@@ -1813,7 +1815,7 @@ int _report_explosion(Attack* attack, Object* sourceObj)
}
// 0x4132C0
int _finished_explosion(Object* a1, Object* a2)
int _finished_explosion(Object* _, Object* __)
{
_action_in_explode = false;
return 0;
@@ -1842,13 +1844,13 @@ int _compute_explosion_damage(int min, int max, Object* defender, int* knockback
}
// 0x413330
int actionTalk(Object* a1, Object* a2)
int actionTalk(Object* obj, Object* critter)
{
if (a1 != gDude) {
if (obj != gDude) {
return -1;
}
if (FID_TYPE(a2->fid) != OBJ_TYPE_CRITTER) {
if (FID_TYPE(critter->fid) != OBJ_TYPE_CRITTER) {
return -1;
}
@@ -1859,25 +1861,25 @@ int actionTalk(Object* a1, Object* a2)
if (isInCombat()) {
reg_anim_begin(ANIMATION_REQUEST_RESERVED);
animationRegisterMoveToObject(a1, a2, a1->data.critter.combat.ap, 0);
animationRegisterMoveToObject(obj, critter, obj->data.critter.combat.ap, 0);
} else {
reg_anim_begin(a1 == gDude ? ANIMATION_REQUEST_RESERVED : ANIMATION_REQUEST_UNRESERVED);
reg_anim_begin(obj == gDude ? ANIMATION_REQUEST_RESERVED : ANIMATION_REQUEST_UNRESERVED);
if (objectGetDistanceBetween(a1, a2) >= 9 || _combat_is_shot_blocked(a1, a1->tile, a2->tile, a2, nullptr)) {
animationRegisterRunToObject(a1, a2, -1, 0);
if (objectGetDistanceBetween(obj, critter) >= 9 || _combat_is_shot_blocked(obj, obj->tile, critter->tile, critter, nullptr)) {
animationRegisterRunToObject(obj, critter, -1, 0);
}
}
animationRegisterCallbackForced(a1, a2, (AnimationCallback*)_can_talk_to, -1);
animationRegisterCallback(a1, a2, (AnimationCallback*)_talk_to, -1);
animationRegisterCallbackForced(obj, critter, (AnimationCallback*)_can_talk_to, -1);
animationRegisterCallback(obj, critter, (AnimationCallback*)_talk_to, -1);
return reg_anim_end();
}
// 0x413420
int _can_talk_to(Object* a1, Object* a2)
int _can_talk_to(Object* obj, Object* critter)
{
if (_combat_is_shot_blocked(a1, a1->tile, a2->tile, a2, nullptr) || objectGetDistanceBetween(a1, a2) >= 9) {
if (a1 == gDude) {
if (_combat_is_shot_blocked(obj, obj->tile, critter->tile, critter, nullptr) || objectGetDistanceBetween(obj, critter) >= 9) {
if (obj == gDude) {
// You cannot get there. (used in actions.c)
MessageListItem messageListItem;
messageListItem.num = 2000;
@@ -1893,9 +1895,9 @@ int _can_talk_to(Object* a1, Object* a2)
}
// 0x413488
int _talk_to(Object* a1, Object* a2)
int _talk_to(Object* _, Object* critter)
{
scriptsRequestDialog(a2);
scriptsRequestDialog(critter);
return 0;
}
@@ -1969,7 +1971,7 @@ void actionDamage(int tile, int elevation, int minDamage, int maxDamage, int dam
}
// 0x41363C
int _report_dmg(Attack* attack, Object* a2)
int _report_dmg(Attack* attack, Object* _)
{
_combat_display(attack);
_apply_damage(attack, false);
@@ -2006,42 +2008,42 @@ int _compute_dmg_damage(int min, int max, Object* obj, int* knockbackDistancePtr
}
// 0x4136EC
bool actionCheckPush(Object* a1, Object* a2)
bool actionCheckPush(Object* obj, Object* target)
{
// Cannot push anything but critters.
if (FID_TYPE(a2->fid) != OBJ_TYPE_CRITTER) {
if (FID_TYPE(target->fid) != OBJ_TYPE_CRITTER) {
return false;
}
// Cannot push itself.
if (a1 == a2) {
if (obj == target) {
return false;
}
// Cannot push inactive critters.
if (!critterIsActive(a2)) {
if (!critterIsActive(target)) {
return false;
}
if (_action_can_talk_to(a1, a2) != 0) {
if (_action_can_talk_to(obj, target) != 0) {
return false;
}
// Can only push critters that have push handler.
if (!scriptHasProc(a2->sid, SCRIPT_PROC_PUSH)) {
if (!scriptHasProc(target->sid, SCRIPT_PROC_PUSH)) {
return false;
}
if (isInCombat()) {
if (a2->data.critter.combat.team == a1->data.critter.combat.team
&& a2 == a1->data.critter.combat.whoHitMe) {
if (target->data.critter.combat.team == obj->data.critter.combat.team
&& target == obj->data.critter.combat.whoHitMe) {
return false;
}
// TODO: Check.
Object* whoHitMe = a2->data.critter.combat.whoHitMe;
Object* whoHitMe = target->data.critter.combat.whoHitMe;
if (whoHitMe != nullptr
&& whoHitMe->data.critter.combat.team == a1->data.critter.combat.team) {
&& whoHitMe->data.critter.combat.team == obj->data.critter.combat.team) {
return false;
}
}
@@ -2050,15 +2052,15 @@ bool actionCheckPush(Object* a1, Object* a2)
}
// 0x413790
int actionPush(Object* a1, Object* a2)
int actionPush(Object* obj, Object* target)
{
if (!actionCheckPush(a1, a2)) {
if (!actionCheckPush(obj, target)) {
return -1;
}
int sid;
if (_obj_sid(a2, &sid) == 0) {
scriptSetObjects(sid, a1, a2);
if (_obj_sid(target, &sid) == 0) {
scriptSetObjects(sid, obj, target);
scriptExecProc(sid, SCRIPT_PROC_PUSH);
bool scriptOverrides = false;
@@ -2073,36 +2075,36 @@ int actionPush(Object* a1, Object* a2)
}
}
int rotation = tileGetRotationTo(a1->tile, a2->tile);
int rotation = tileGetRotationTo(obj->tile, target->tile);
int tile;
do {
tile = tileGetTileInDirection(a2->tile, rotation, 1);
if (_obj_blocking_at(a2, tile, a2->elevation) == nullptr) {
tile = tileGetTileInDirection(target->tile, rotation, 1);
if (_obj_blocking_at(target, tile, target->elevation) == nullptr) {
break;
}
tile = tileGetTileInDirection(a2->tile, (rotation + 1) % ROTATION_COUNT, 1);
if (_obj_blocking_at(a2, tile, a2->elevation) == nullptr) {
tile = tileGetTileInDirection(target->tile, (rotation + 1) % ROTATION_COUNT, 1);
if (_obj_blocking_at(target, tile, target->elevation) == nullptr) {
break;
}
tile = tileGetTileInDirection(a2->tile, (rotation + 5) % ROTATION_COUNT, 1);
if (_obj_blocking_at(a2, tile, a2->elevation) == nullptr) {
tile = tileGetTileInDirection(target->tile, (rotation + 5) % ROTATION_COUNT, 1);
if (_obj_blocking_at(target, tile, target->elevation) == nullptr) {
break;
}
tile = tileGetTileInDirection(a2->tile, (rotation + 2) % ROTATION_COUNT, 1);
if (_obj_blocking_at(a2, tile, a2->elevation) == nullptr) {
tile = tileGetTileInDirection(target->tile, (rotation + 2) % ROTATION_COUNT, 1);
if (_obj_blocking_at(target, tile, target->elevation) == nullptr) {
break;
}
tile = tileGetTileInDirection(a2->tile, (rotation + 4) % ROTATION_COUNT, 1);
if (_obj_blocking_at(a2, tile, a2->elevation) == nullptr) {
tile = tileGetTileInDirection(target->tile, (rotation + 4) % ROTATION_COUNT, 1);
if (_obj_blocking_at(target, tile, target->elevation) == nullptr) {
break;
}
tile = tileGetTileInDirection(a2->tile, (rotation + 3) % ROTATION_COUNT, 1);
if (_obj_blocking_at(a2, tile, a2->elevation) == nullptr) {
tile = tileGetTileInDirection(target->tile, (rotation + 3) % ROTATION_COUNT, 1);
if (_obj_blocking_at(target, tile, target->elevation) == nullptr) {
break;
}
@@ -2111,14 +2113,14 @@ int actionPush(Object* a1, Object* a2)
int actionPoints;
if (isInCombat()) {
actionPoints = a2->data.critter.combat.ap;
actionPoints = target->data.critter.combat.ap;
} else {
actionPoints = -1;
}
reg_anim_begin(ANIMATION_REQUEST_RESERVED);
animationRegisterRotateToTile(a2, tile);
animationRegisterMoveToTile(a2, tile, a2->elevation, actionPoints, 0);
animationRegisterRotateToTile(target, tile);
animationRegisterMoveToTile(target, tile, target->elevation, actionPoints, 0);
return reg_anim_end();
}
@@ -2126,29 +2128,29 @@ int actionPush(Object* a1, Object* a2)
// Returns -2 if it's too far (> 12 tiles).
//
// 0x413970
int _action_can_talk_to(Object* a1, Object* a2)
int _action_can_talk_to(Object* obj, Object* target)
{
if (pathfinderFindPath(a1, a1->tile, a2->tile, nullptr, 0, _obj_sight_blocking_at) == 0) {
if (pathfinderFindPath(obj, obj->tile, target->tile, nullptr, 0, _obj_sight_blocking_at) == 0) {
return -1;
}
if (tileDistanceBetween(a1->tile, a2->tile) > 12) {
if (tileDistanceBetween(obj->tile, target->tile) > 12) {
return -2;
}
return 0;
}
static int hideProjectile(void* a1, void* a2)
static int hideProjectile(void* _, void* projectile)
{
Object* projectile = reinterpret_cast<Object*>(a2);
Object* proj = reinterpret_cast<Object*>(projectile);
Rect rect;
if (objectHide(projectile, &rect) == 0) {
tileWindowRefreshRect(&rect, projectile->elevation);
if (objectHide(proj, &rect) == 0) {
tileWindowRefreshRect(&rect, proj->elevation);
}
projectile->flags |= OBJECT_NO_SAVE;
proj->flags |= OBJECT_NO_SAVE;
return 0;
}
+5 -5
View File
@@ -16,14 +16,14 @@ int _action_loot_container(Object* critter, Object* container);
int _action_skill_use(int skill);
int actionUseSkill(Object* user, Object* target, int skill);
bool _is_hit_from_front(Object* attacker, Object* defender);
bool _can_see(Object* a1, Object* a2);
bool _can_see(Object* source, Object* target);
bool _action_explode_running();
int actionExplode(int tile, int elevation, int minDamage, int maxDamage, Object* sourceObj, bool animate);
int actionTalk(Object* a1, Object* a2);
int actionTalk(Object* obj, Object* critter);
void actionDamage(int tile, int elevation, int minDamage, int maxDamage, int damageType, bool animated, bool bypassArmor);
bool actionCheckPush(Object* a1, Object* a2);
int actionPush(Object* a1, Object* a2);
int _action_can_talk_to(Object* a1, Object* a2);
bool actionCheckPush(Object* obj, Object* target);
int actionPush(Object* obj, Object* target);
int _action_can_talk_to(Object* obj, Object* critter);
} // namespace fallout
+100 -88
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -31,8 +31,8 @@ typedef struct HeadDescription {
} HeadDescription;
static int artReadList(const char* path, char** out_arr, int* out_count);
static int artCacheGetFileSizeImpl(int a1, int* out_size);
static int artCacheReadDataImpl(int a1, int* a2, unsigned char* data);
static int artCacheGetFileSizeImpl(int fid, int* out_size);
static int artCacheReadDataImpl(int fid, int* sizePtr, unsigned char* data);
static void artCacheFreeImpl(void* ptr);
static int artReadFrameData(unsigned char* data, File* stream, int count, int* paddingPtr);
static int artReadHeader(Art* art, File* stream);
+5 -5
View File
@@ -129,9 +129,9 @@ unsigned char* artLockFrameData(int fid, int frame, int direction, CacheEntry**
unsigned char* artLockFrameDataReturningSize(int fid, CacheEntry** out_cache_entry, int* widthPtr, int* heightPtr);
int artUnlock(CacheEntry* cache_entry);
int artCacheFlush();
int artCopyFileName(int objectType, int a2, char* a3);
int _art_get_code(int a1, int a2, char* a3, char* a4);
char* artBuildFilePath(int a1);
int artCopyFileName(int objectType, int id, char* a3);
int _art_get_code(int animation, int weaponType, char* a3, char* a4);
char* artBuildFilePath(int fid);
int artGetFramesPerSecond(Art* art);
int artGetActionFrame(Art* art);
int artGetFrameCount(Art* art);
@@ -144,8 +144,8 @@ unsigned char* artGetFrameData(Art* art, int frame, int direction);
ArtFrame* artGetFrame(Art* art, int frame, int direction);
bool artExists(int fid);
bool _art_fid_valid(int fid);
int _art_alias_num(int a1);
int artCritterFidShouldRun(int a1);
int _art_alias_num(int index);
int artCritterFidShouldRun(int fid);
int artAliasFid(int fid);
int buildFid(int objectType, int frmId, int animType, int weaponCode, int rotation);
Art* artLoad(const char* path);
+32 -18
View File
@@ -2731,13 +2731,19 @@ static int _ai_try_attack(Object* attacker, Object* defender)
int reason = _combat_check_bad_shot(attacker, defender, hitMode, false);
if (reason == COMBAT_BAD_SHOT_NO_AMMO) {
// out of ammo
int roundsLoaded = 0;
if (aiHaveAmmo(attacker, weapon, &ammo)) {
int remainingAmmoQuantity = weaponReload(weapon, ammo);
if (remainingAmmoQuantity == 0 && ammo != nullptr) {
_obj_destroy(ammo);
while (aiHaveAmmo(attacker, weapon, &ammo)) {
int remainingAmmoQuantity = weaponReload(weapon, ammo);
if (remainingAmmoQuantity == 0 && ammo != nullptr) {
_obj_destroy(ammo);
++roundsLoaded;
} else {
break;
}
}
if (remainingAmmoQuantity != -1) {
if (roundsLoaded > 0) {
int volume = _gsound_compute_relative_volume(attacker);
const char* sfx = sfxBuildWeaponName(WEAPON_SOUND_EFFECT_READY, weapon, hitMode, nullptr);
_gsound_play_sfx_file_volume(sfx, volume);
@@ -2920,22 +2926,30 @@ void aiAttemptWeaponReload(Object* critter, int animate)
int ammoQuantity = ammoGetQuantity(weapon);
int ammoCapacity = ammoGetCapacity(weapon);
int loadedRounds = 0;
if (ammoQuantity < ammoCapacity) {
Object* ammo;
if (aiHaveAmmo(critter, weapon, &ammo)) {
int rc = weaponReload(weapon, ammo);
if (rc == 0) {
_obj_destroy(ammo);
}
if (rc != -1 && objectIsPartyMember(critter)) {
int volume = _gsound_compute_relative_volume(critter);
const char* sfx = sfxBuildWeaponName(WEAPON_SOUND_EFFECT_READY, weapon, HIT_MODE_RIGHT_WEAPON_PRIMARY, nullptr);
_gsound_play_sfx_file_volume(sfx, volume);
if (animate) {
_ai_magic_hands(critter, weapon, 5002);
for (int i = 0; i < (ammoCapacity - ammoQuantity); ++i) {
Object* ammo;
if (aiHaveAmmo(critter, weapon, &ammo)) {
int rc = weaponReload(weapon, ammo);
if (rc == 0) {
_obj_destroy(ammo);
++loadedRounds;
} else {
break;
}
} else {
break;
}
}
if (loadedRounds != 0 && objectIsPartyMember(critter)) {
int volume = _gsound_compute_relative_volume(critter);
const char* sfx = sfxBuildWeaponName(WEAPON_SOUND_EFFECT_READY, weapon, HIT_MODE_RIGHT_WEAPON_PRIMARY, nullptr);
_gsound_play_sfx_file_volume(sfx, volume);
if (animate) {
_ai_magic_hands(critter, weapon, 5002);
}
}
}
+51
View File
@@ -1,6 +1,8 @@
#include "draw.h"
#include <cstring>
#include <string.h>
#include <vector>
#include "color.h"
#include "svga.h"
@@ -339,4 +341,53 @@ void transSrcCopy(unsigned char* dest, int destPitch, unsigned char* src, int sr
}
}
void blitBufferToBufferStretchAndFixEdges(
unsigned char* src, int srcW, int srcH, int srcPitch,
unsigned char* dst, int dstW, int dstH, int dstPitch,
int numStates)
{
// Temp buffer for over-stretched result (per state)
const int stretchW = dstW + 1;
const int stretchH = dstH + 1;
const int stretchPitch = stretchW;
std::vector<unsigned char> tempBuffer(stretchW * stretchH * numStates);
// Stretch all states to slightly larger temp buffer
blitBufferToBufferStretch(
src, srcW, srcH * numStates, srcPitch,
tempBuffer.data(), stretchW, stretchH * numStates, stretchPitch);
// Now copy only the top-left dstW x dstH portion per state into the final buffer
for (int state = 0; state < numStates; ++state) {
unsigned char* tempFrame = tempBuffer.data() + stretchW * stretchH * state;
unsigned char* finalFrame = dst + dstW * dstH * state;
for (int y = 0; y < dstH; ++y) {
memcpy(
finalFrame + y * dstW,
tempFrame + y * stretchPitch,
dstW);
}
}
}
void calculateScaledSize(int srcWidth, int srcHeight, int targetWidth, int targetHeight, int mode, int& outWidth, int& outHeight)
{
if (mode == 2) {
// Fullscreen stretch
outWidth = targetWidth;
outHeight = targetHeight;
} else {
// Maintain aspect ratio
if (targetHeight * srcWidth >= targetWidth * srcHeight) {
outWidth = targetWidth;
outHeight = (targetWidth * srcHeight) / srcWidth;
} else {
outWidth = (targetHeight * srcWidth) / srcHeight;
outHeight = targetHeight;
}
}
}
} // namespace fallout
+5
View File
@@ -17,6 +17,11 @@ void _swap_color_buf(unsigned char* buf, int width, int height, int pitch, int c
void bufferOutline(unsigned char* buf, int width, int height, int pitch, int a5);
void srcCopy(unsigned char* dest, int destPitch, unsigned char* src, int srcPitch, int width, int height);
void transSrcCopy(unsigned char* dest, int destPitch, unsigned char* src, int srcPitch, int width, int height);
void blitBufferToBufferStretchAndFixEdges(
unsigned char* src, int srcW, int srcH, int srcPitch,
unsigned char* dst, int dstW, int dstH, int dstPitch,
int numStates = 1);
void calculateScaledSize(int srcWidth, int srcHeight, int targetWidth, int targetHeight, int mode, int& outWidth, int& outHeight);
} // namespace fallout
+183 -101
View File
@@ -168,6 +168,14 @@ int gameInitWithOptions(const char* windowTitle, bool isMapper, int font, int a4
int skipOpeningMovies = 0;
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY, &skipOpeningMovies);
// load preferences before Splash screen to get proper brightness
if (_init_options_menu() != 0) {
debugPrint("Failed on init_options_menu\n");
return -1;
}
debugPrint(">init_options_menu\n");
if (!gIsMapper && skipOpeningMovies < 2) {
showSplash();
}
@@ -341,7 +349,7 @@ int gameInitWithOptions(const char* windowTitle, bool isMapper, int font, int a4
debugPrint(">scr_disable\t");
if (_init_options_menu() != 0) {
if (_init_options_menu() != 0) {
debugPrint("Failed on init_options_menu\n");
return -1;
}
@@ -952,11 +960,12 @@ int gameHandleKey(int eventCode, bool isInCombatMode)
// game_ui_disable
// 0x443BFC
void gameUiDisable(int a1)
// pass allowScrolling = 1 to allow scrolling
void gameUiDisable(int allowScrolling)
{
if (!gGameUiDisabled) {
gameMouseObjectsHide();
_gmouse_disable(a1);
_gmouse_disable(allowScrolling);
keyboardDisable();
interfaceBarDisable();
gGameUiDisabled = true;
@@ -1192,71 +1201,139 @@ static void gameFreeGlobalVars()
// 0x443F74
static void showHelp()
{
ScopedGameMode gm(GameMode::kHelp);
ScopedGameMode gm(GameMode::kHelp); // Switch to Help game mode.
bool isoWasEnabled = isoDisable();
gameMouseObjectsHide();
gameMouseSetCursor(MOUSE_CURSOR_NONE);
bool colorCycleWasEnabled = colorCycleEnabled();
colorCycleDisable();
// CE: Help screen uses separate color palette which is incompatible with
// colors in other windows. Setup overlay to hide everything.
int overlay = windowCreate(0, 0, screenGetWidth(), screenGetHeight(), 0, WINDOW_HIDDEN | WINDOW_MOVE_ON_TOP);
// load the optional stretch setting from f2_res.ini
int helpScreenStretchMode = 0;
int stretchGameMode = 0;
Config config;
if (configInit(&config)) {
if (configRead(&config, "f2_res.ini", false)) {
configGetInt(&config, "STATIC_SCREENS", "HELP_SCRN_SIZE", &helpScreenStretchMode);
int helpWindowX = (screenGetWidth() - HELP_SCREEN_WIDTH) / 2;
int helpWindowY = (screenGetHeight() - HELP_SCREEN_HEIGHT) / 2;
int win = windowCreate(helpWindowX, helpWindowY, HELP_SCREEN_WIDTH, HELP_SCREEN_HEIGHT, 0, WINDOW_HIDDEN | WINDOW_MOVE_ON_TOP);
if (configGetInt(&config, "STATIC_SCREENS", "STRETCH_GAME", &stretchGameMode)) {
helpScreenStretchMode = stretchGameMode; // always override if key exists
}
}
configFree(&config);
}
int screenWidth = screenGetWidth();
int screenHeight = screenGetHeight();
// Create an invisible fullscreen overlay window to cover everything.
int overlay = windowCreate(0, 0, screenWidth, screenHeight, 0, WINDOW_HIDDEN | WINDOW_MOVE_ON_TOP);
FrmImage helpFrmImage;
int helpFid = buildFid(OBJ_TYPE_INTERFACE, 297, 0, 0, 0); // Load Help screen graphic (FID 297).
if (!helpFrmImage.lock(helpFid)) {
if (colorCycleWasEnabled)
colorCycleEnable();
gameMouseObjectsShow();
if (isoWasEnabled)
isoEnable();
return;
}
unsigned char* helpData = helpFrmImage.getData();
int helpWidth = HELP_SCREEN_WIDTH;
int helpHeight = HELP_SCREEN_HEIGHT;
unsigned char* bufferToBlit = helpData;
int blitWidth = helpWidth;
int blitHeight = helpHeight;
// Check if stretching is needed (based on config or screen too small).
if (helpScreenStretchMode != 0 || screenWidth < helpWidth || screenHeight < helpHeight) {
int scaledWidth, scaledHeight;
calculateScaledSize(
helpWidth,
helpHeight,
screenWidth,
screenHeight,
helpScreenStretchMode,
scaledWidth,
scaledHeight);
// Allocate memory for the scaled image.
unsigned char* scaled = reinterpret_cast<unsigned char*>(internal_malloc((scaledWidth + 1) * (scaledHeight + 1)));
if (scaled != nullptr) {
// Stretch and fix the original help image into the new buffer.
blitBufferToBufferStretchAndFixEdges(
helpData, helpWidth, helpHeight, helpWidth, // Source buffer and dimensions
scaled, scaledWidth, scaledHeight, scaledWidth, // Destination buffer and dimensions
1 // numStates = 1 for a single image
);
bufferToBlit = scaled;
blitWidth = scaledWidth;
blitHeight = scaledHeight;
}
}
// Center the window on the screen.
int x = (screenWidth - blitWidth) / 2;
int y = (screenHeight - blitHeight) / 2;
// Create window for the help screen.
int win = windowCreate(x, y, blitWidth, blitHeight, 0, WINDOW_HIDDEN | WINDOW_MOVE_ON_TOP);
if (win != -1) {
unsigned char* windowBuffer = windowGetBuffer(win);
if (windowBuffer != nullptr) {
FrmImage backgroundFrmImage;
int backgroundFid = buildFid(OBJ_TYPE_INTERFACE, 297, 0, 0, 0);
if (backgroundFrmImage.lock(backgroundFid)) {
paletteSetEntries(gPaletteBlack);
blitBufferToBuffer(backgroundFrmImage.getData(), HELP_SCREEN_WIDTH, HELP_SCREEN_HEIGHT, HELP_SCREEN_WIDTH, windowBuffer, HELP_SCREEN_WIDTH);
// Clear palette to black before displaying.
paletteSetEntries(gPaletteBlack);
colorPaletteLoad("art\\intrface\\helpscrn.pal");
paletteSetEntries(_cmap);
// Copy the help image into the window.
blitBufferToBuffer(bufferToBlit, blitWidth, blitHeight, blitWidth, windowBuffer, blitWidth);
// CE: Fill overlay with darkest color in the palette. It might
// not be completely black, but at least it's uniform.
bufferFill(windowGetBuffer(overlay),
screenGetWidth(),
screenGetHeight(),
screenGetWidth(),
intensityColorTable[_colorTable[0]][0]);
// Load the help screen's specific palette.
colorPaletteLoad("art\\intrface\\helpscrn.pal");
paletteSetEntries(_cmap);
windowShow(overlay);
windowShow(win);
// Fill the overlay with the darkest palette color to hide everything behind.
bufferFill(windowGetBuffer(overlay), screenWidth, screenHeight, screenWidth, intensityColorTable[_colorTable[0]][0]);
while (inputGetInput() == -1 && _game_user_wants_to_quit == 0) {
sharedFpsLimiter.mark();
renderPresent();
sharedFpsLimiter.throttle();
}
windowShow(overlay);
windowShow(win);
while (mouseGetEvent() != 0) {
sharedFpsLimiter.mark();
inputGetInput();
renderPresent();
sharedFpsLimiter.throttle();
}
paletteSetEntries(gPaletteBlack);
while (inputGetInput() == -1 && _game_user_wants_to_quit == 0) {
sharedFpsLimiter.mark();
renderPresent();
sharedFpsLimiter.throttle();
}
while (mouseGetEvent() != 0) {
sharedFpsLimiter.mark();
inputGetInput();
renderPresent();
sharedFpsLimiter.throttle();
}
// Fade back to black.
paletteSetEntries(gPaletteBlack);
}
// Cleanup
windowDestroy(overlay);
windowDestroy(win);
colorPaletteLoad("color.pal");
paletteSetEntries(_cmap);
}
// Free temporary scaled buffer if it was allocated.
if (bufferToBlit != helpData) {
internal_free(bufferToBlit);
}
// Restore previous state.
if (colorCycleWasEnabled) {
colorCycleEnable();
}
@@ -1370,7 +1447,7 @@ static int gameDbInit()
char* path_file_name_template = nullptr;
configGetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_PATCH_FILE, &path_file_name_template);
if (path_file_name_template == nullptr || *path_file_name_template == '\0') {
path_file_name_template = (char*)"patch%03d.dat";
path_file_name_template = "patch%03d.dat";
}
for (patch_index = 0; patch_index < 1000; patch_index++) {
@@ -1393,8 +1470,9 @@ static int gameDbInit()
// 0x444384
static void showSplash()
{
int splash = settings.system.splash;
int splashIndex = settings.system.splash;
// path to local splash folder
char path[64];
const char* language = settings.system.language.c_str();
if (compat_stricmp(language, ENGLISH) != 0) {
@@ -1403,19 +1481,19 @@ static void showSplash()
snprintf(path, sizeof(path), "art\\splash\\");
}
File* stream;
for (int index = 0; index < SPLASH_COUNT; index++) {
// open a splash file, cycle through SPLASH_COUNT entries
File* stream = nullptr;
for (int attempt = 0; attempt < SPLASH_COUNT; attempt++) {
char filePath[64];
snprintf(filePath, sizeof(filePath), "%ssplash%d.rix", path, splash);
snprintf(filePath, sizeof(filePath), "%ssplash%d.rix", path, splashIndex);
stream = fileOpen(filePath, "rb");
if (stream != nullptr) {
break;
}
splash++;
if (splash >= SPLASH_COUNT) {
splash = 0;
splashIndex++;
if (splashIndex >= SPLASH_COUNT) {
splashIndex = 0;
}
}
@@ -1423,105 +1501,109 @@ static void showSplash()
return;
}
// Allocate memory for the palette
unsigned char* palette = reinterpret_cast<unsigned char*>(internal_malloc(768));
if (palette == nullptr) {
fileClose(stream);
return;
}
// Verify RIX image version (needed?)
int version;
fileReadInt32(stream, &version);
if (version != 'RIX3') {
fileClose(stream);
internal_free(palette);
return;
}
short width;
fileRead(&width, sizeof(width), 1, stream);
// Read image dimensions
short splashWidth, splashHeight;
fileRead(&splashWidth, sizeof(splashWidth), 1, stream);
fileRead(&splashHeight, sizeof(splashHeight), 1, stream);
short height;
fileRead(&height, sizeof(height), 1, stream);
unsigned char* data = reinterpret_cast<unsigned char*>(internal_malloc(width * height));
if (data == nullptr) {
// Allocate memory for the image pixel data
unsigned char* splashData = reinterpret_cast<unsigned char*>(internal_malloc(splashWidth * splashHeight));
if (splashData == nullptr) {
internal_free(palette);
fileClose(stream);
return;
}
// Load palette and image data
paletteSetEntries(gPaletteBlack);
fileSeek(stream, 10, SEEK_SET);
fileRead(palette, 1, 768, stream);
fileRead(data, 1, width * height, stream);
fileRead(splashData, 1, splashWidth * splashHeight, stream);
fileClose(stream);
// Fix of wrong Palette, without it this makes background bright
// Basically just swapping first and last colors, this problem presented ONLY in F2, F1 has right palette in every splash
memcpy(palette + (255 * 3), palette, 3);
memset(palette, 0, 3);
for (int i = 0; i < width * height; i++) {
if (data[i] == 0) {
data[i] = 255;
} else if (data[i] == 255) {
data[i] = 0;
}
}
int size = 0;
// TODO: Move to settings.
int splashScreenStretchMode = 0;
int stretchGameMode = 0;
Config config;
if (configInit(&config)) {
if (configRead(&config, "f2_res.ini", false)) {
configGetInt(&config, "STATIC_SCREENS", "SPLASH_SCRN_SIZE", &size);
}
configGetInt(&config, "STATIC_SCREENS", "SPLASH_SCRN_SIZE", &splashScreenStretchMode);
if (configGetInt(&config, "STATIC_SCREENS", "STRETCH_GAME", &stretchGameMode)) {
splashScreenStretchMode = stretchGameMode; // always override if key exists
}
}
configFree(&config);
}
int screenWidth = screenGetWidth();
int screenHeight = screenGetHeight();
if (size != 0 || screenWidth < width || screenHeight < height) {
int scaledWidth;
int scaledHeight;
// Stretch image if required or if it doesn't fit the screen
if (splashScreenStretchMode != 0 || screenWidth < splashWidth || screenHeight < splashHeight) {
int scaledWidth, scaledHeight;
if (size == 2) {
scaledWidth = screenWidth;
scaledHeight = screenHeight;
} else {
if (screenHeight * width >= screenWidth * height) {
scaledWidth = screenWidth;
scaledHeight = screenWidth * height / width;
} else {
scaledWidth = screenHeight * width / height;
scaledHeight = screenHeight;
}
}
calculateScaledSize(
splashWidth,
splashHeight,
screenWidth,
screenHeight,
splashScreenStretchMode,
scaledWidth,
scaledHeight);
unsigned char* scaled = reinterpret_cast<unsigned char*>(internal_malloc(scaledWidth * scaledHeight));
unsigned char* scaled = reinterpret_cast<unsigned char*>(internal_malloc((scaledWidth) * (scaledHeight)));
if (scaled != nullptr) {
blitBufferToBufferStretch(data, width, height, width, scaled, scaledWidth, scaledHeight, scaledWidth);
// Stretch the splash screen and fix edge artifacts
blitBufferToBufferStretchAndFixEdges(
splashData,
splashWidth,
splashHeight,
splashWidth,
scaled,
scaledWidth,
scaledHeight,
scaledWidth,
1 // numStates = 1 for a single splash image
);
int x = (screenWidth > scaledWidth) ? (screenWidth - scaledWidth) / 2 : 0;
int y = (screenHeight > scaledHeight) ? (screenHeight - scaledHeight) / 2 : 0;
int x = screenWidth > scaledWidth ? (screenWidth - scaledWidth) / 2 : 0;
int y = screenHeight > scaledHeight ? (screenHeight - scaledHeight) / 2 : 0;
_scr_blit(scaled, scaledWidth, scaledHeight, 0, 0, scaledWidth, scaledHeight, x, y);
paletteFadeTo(palette);
internal_free(scaled);
}
} else {
int x = (screenWidth - width) / 2;
int y = (screenHeight - height) / 2;
_scr_blit(data, width, height, 0, 0, width, height, x, y);
// Center image without scaling
int x = (screenWidth - splashWidth) / 2;
int y = (screenHeight - splashHeight) / 2;
_scr_blit(splashData, splashWidth, splashHeight, 0, 0, splashWidth, splashHeight, x, y);
paletteFadeTo(palette);
}
internal_free(data);
// Clean up
internal_free(splashData);
internal_free(palette);
settings.system.splash = splash + 1;
// Save index for next splash image
settings.system.splash = splashIndex + 1;
}
int gameShowDeathDialog(const char* message)
+1 -1
View File
@@ -27,7 +27,7 @@ int gameInitWithOptions(const char* windowTitle, bool isMapper, int a3, int a4,
void gameReset();
void gameExit();
int gameHandleKey(int eventCode, bool isInCombatMode);
void gameUiDisable(int a1);
void gameUiDisable(int allowScrolling);
void gameUiEnable();
bool gameUiIsDisabled();
int gameGetGlobalVar(int var);
+46 -8
View File
@@ -548,6 +548,8 @@ static FrmImage _redButtonNormalFrmImage;
static FrmImage _redButtonPressedFrmImage;
static FrmImage _lowerHighlightFrmImage;
static FrmImage _upperHighlightFrmImage;
static FrmImage _littleRedButtonNormalFrmImage;
static FrmImage _littleRedButtonPressedFrmImage;
static int _gdialogReset();
static void gameDialogEndLips();
@@ -623,7 +625,9 @@ static void gameDialogHighlightsInit();
static void gameDialogHighlightsExit();
static void gameDialogRedButtonsInit();
static void gameDialogLittleRedButtonsInit();
static void gameDialogRedButtonsExit();
static void gameDialogLittleRedButtonsExit();
static bool gGameDialogFix;
static bool gNumberOptions;
@@ -914,6 +918,7 @@ int _gdialogInitFromScript(int headFid, int reaction)
// CE: Fix Barter button.
gameDialogRedButtonsInit();
gameDialogLittleRedButtonsInit();
_gdCreateHeadWindow();
tickersAdd(gameDialogTicker);
@@ -966,6 +971,7 @@ int _gdialogExitFromScript()
// CE: Fix Barter button.
gameDialogRedButtonsExit();
gameDialogLittleRedButtonsExit();
fontSetCurrent(_oldFont);
@@ -3407,7 +3413,7 @@ int partyMemberControlWindowInit()
partyMemberControlWindowFree();
return -1;
}
buttonSetCallbacks(_gdialog_buttons[1], _gsound_med_butt_press, _gsound_med_butt_release);
buttonSetCallbacks(_gdialog_buttons[2], _gsound_med_butt_press, _gsound_med_butt_release);
// USE BEST ARMOR
_gdialog_buttons[3] = buttonCreate(gGameDialogWindow, 235, 46, 14, 14, -1, -1, -1, KEY_LOWERCASE_A, _redButtonNormalFrmImage.getData(), _redButtonPressedFrmImage.getData(), nullptr, BUTTON_FLAG_TRANSPARENT);
@@ -3415,7 +3421,7 @@ int partyMemberControlWindowInit()
partyMemberControlWindowFree();
return -1;
}
buttonSetCallbacks(_gdialog_buttons[2], _gsound_med_butt_press, _gsound_med_butt_release);
buttonSetCallbacks(_gdialog_buttons[3], _gsound_med_butt_press, _gsound_med_butt_release);
_control_buttons_start = 4;
@@ -3884,7 +3890,7 @@ int partyMemberCustomizationWindowInit()
return -1;
}
buttonSetCallbacks(_gdialog_buttons[index], _gsound_med_butt_press, _gsound_med_butt_release);
buttonSetCallbacks(_gdialog_buttons[optionButton], _gsound_med_butt_press, _gsound_med_butt_release);
}
_custom_current_selected[PARTY_MEMBER_CUSTOMIZATION_OPTION_AREA_ATTACK_MODE] = aiGetAreaAttackMode(gGameDialogSpeaker);
@@ -4119,18 +4125,25 @@ int _gdCustomSelect(int a1)
backgroundFrmImage.unlock();
int btn1 = buttonCreate(win, 70, 164, 14, 14, -1, -1, -1, KEY_RETURN, _redButtonNormalFrmImage.getData(), _redButtonPressedFrmImage.getData(), nullptr, BUTTON_FLAG_TRANSPARENT);
int btn1 = buttonCreate(win, 70, 164, _littleRedButtonNormalFrmImage.getWidth(), _littleRedButtonNormalFrmImage.getHeight(), -1, -1, -1, 500, _littleRedButtonNormalFrmImage.getData(), _littleRedButtonPressedFrmImage.getData(), nullptr, BUTTON_FLAG_TRANSPARENT);
if (btn1 == -1) {
windowDestroy(win);
return -1;
}
if (btn1 != -1) {
buttonSetCallbacks(btn1, _gsound_red_butt_press, _gsound_red_butt_release);
}
int btn2 = buttonCreate(win, 176, 163, 14, 14, -1, -1, -1, KEY_ESCAPE, _redButtonNormalFrmImage.getData(), _redButtonPressedFrmImage.getData(), nullptr, BUTTON_FLAG_TRANSPARENT);
int btn2 = buttonCreate(win, 176, 163, _littleRedButtonNormalFrmImage.getWidth(), _littleRedButtonNormalFrmImage.getHeight(), -1, -1, -1, KEY_ESCAPE, _littleRedButtonNormalFrmImage.getData(), _littleRedButtonPressedFrmImage.getData(), nullptr, BUTTON_FLAG_TRANSPARENT);
if (btn2 == -1) {
windowDestroy(win);
return -1;
}
if (btn2 != -1) {
buttonSetCallbacks(btn2, _gsound_red_butt_press, _gsound_red_butt_release);
}
fontSetCurrent(103);
MessageListItem messageListItem;
@@ -4169,10 +4182,13 @@ int _gdCustomSelect(int a1)
break;
}
if (keyCode == KEY_RETURN) {
if (keyCode == KEY_RETURN || keyCode == 500) {
STRUCT_5189E4* ptr = &(_custom_settings[a1][value]);
_custom_current_selected[a1] = value;
_gdCustomUpdateSetting(a1, ptr->value);
if (keyCode != 500){
soundPlayFile("ib1p1xx1");
}
done = true;
} else if (keyCode == KEY_ESCAPE) {
done = true;
@@ -4346,6 +4362,9 @@ int _gdialog_window_create()
// TODO: Not sure about offsets.
blitBufferToBuffer(bgWindowBuf + screenWidth * (GAME_DIALOG_WINDOW_HEIGHT - _dialogue_subwin_len), screenWidth, _dialogue_subwin_len, screenWidth, windowBuf, screenWidth);
// BARTER/TRADE - button moved here to set above background window
_gdialog_buttons[0] = buttonCreate(gGameDialogWindow, 593, 41, 14, 14, -1, -1, -1, -1, _redButtonNormalFrmImage.getData(), _redButtonPressedFrmImage.getData(), nullptr, BUTTON_FLAG_TRANSPARENT);
if (_dialogue_just_started) {
windowRefresh(gGameDialogBackgroundWindow);
_gdialog_scroll_subwin(gGameDialogWindow, true, backgroundFrmData, windowBuf, nullptr, _dialogue_subwin_len, true);
@@ -4354,8 +4373,6 @@ int _gdialog_window_create()
_gdialog_scroll_subwin(gGameDialogWindow, true, backgroundFrmData, windowBuf, nullptr, _dialogue_subwin_len, false);
}
// BARTER/TRADE
_gdialog_buttons[0] = buttonCreate(gGameDialogWindow, 593, 41, 14, 14, -1, -1, -1, -1, _redButtonNormalFrmImage.getData(), _redButtonPressedFrmImage.getData(), nullptr, BUTTON_FLAG_TRANSPARENT);
if (_gdialog_buttons[0] != -1) {
buttonSetMouseCallbacks(_gdialog_buttons[0], nullptr, nullptr, nullptr, gameDialogBarterButtonUpMouseUp);
buttonSetCallbacks(_gdialog_buttons[0], _gsound_med_butt_press, _gsound_med_butt_release);
@@ -4724,6 +4741,27 @@ static void gameDialogRedButtonsInit()
}
}
static void gameDialogLittleRedButtonsInit()
{
// di_rdbt2.frm - dialog red button up
int normalFid = buildFid(OBJ_TYPE_INTERFACE, 8, 0, 0, 0);
if (!_littleRedButtonNormalFrmImage.lock(normalFid)) {
gameDialogLittleRedButtonsExit();
}
// di_rdbt1.frm - dialog red button down
int pressedFid = buildFid(OBJ_TYPE_INTERFACE, 9, 0, 0, 0);
if (!_littleRedButtonPressedFrmImage.lock(pressedFid)) {
gameDialogLittleRedButtonsExit();
}
}
static void gameDialogLittleRedButtonsExit()
{
_littleRedButtonNormalFrmImage.unlock();
_littleRedButtonPressedFrmImage.unlock();
}
static void gameDialogRedButtonsExit()
{
_redButtonNormalFrmImage.unlock();

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