mirror of
https://github.com/fallout2-ce/fallout2-ce.git
synced 2026-07-27 16:47:11 -07:00
Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd38c82514 | ||
|
|
552505e3f5 | ||
|
|
b9dd399457 | ||
|
|
5f544ca985 | ||
|
|
0c7752fd33 | ||
|
|
0a5364972c | ||
|
|
1db054e47a | ||
|
|
8e60a2fba2 | ||
|
|
ca89abad6c | ||
|
|
21a98bebb1 | ||
|
|
283107bebe | ||
|
|
dd21129464 | ||
|
|
7604061e1c | ||
|
|
f832d78949 | ||
|
|
57b784b8a0 | ||
|
|
d5fd197dd9 | ||
|
|
6375604af8 | ||
|
|
c02c5efcf6 | ||
|
|
94a7e7207c | ||
|
|
b8988b69a8 | ||
|
|
9467f4f778 | ||
|
|
447cf6edff | ||
|
|
c9bcb719ee | ||
|
|
5dc9135689 | ||
|
|
dfe7eeb3a8 | ||
|
|
436ce12022 | ||
|
|
1bc0711327 | ||
|
|
5a87638781 | ||
|
|
10f59c6b45 | ||
|
|
24562f57da | ||
|
|
9711e61f89 | ||
|
|
d8d99fe94a | ||
|
|
1a9211d44d | ||
|
|
d63f293291 | ||
|
|
71eaabc957 | ||
|
|
aac42c162c | ||
|
|
47156d2e45 | ||
|
|
33744ecf2e | ||
|
|
20e80d4bb3 | ||
|
|
a756bc2700 | ||
|
|
de73c90a89 | ||
|
|
aa439efd04 |
@@ -122,6 +122,7 @@ jobs:
|
||||
mkdir -p out/dist/fallout2-ce-android-debug
|
||||
cp os/android/app/build/outputs/apk/debug/app-debug.apk out/dist/fallout2-ce-android-debug/fallout2-ce.apk
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-android-debug/ce.dat
|
||||
cp files/fallout2.cfg out/dist/fallout2-ce-android-debug/EXAMPLE_fallout2.cfg
|
||||
cd out/dist
|
||||
zip -r fallout2-ce-android-debug.zip fallout2-ce-android-debug
|
||||
|
||||
@@ -178,6 +179,7 @@ jobs:
|
||||
mkdir -p out/dist/fallout2-ce-ios
|
||||
cp out/build/ios/fallout2-ce.ipa out/dist/fallout2-ce-ios/fallout2-ce-ios.ipa
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-ios/ce.dat
|
||||
cp files/fallout2.cfg out/dist/fallout2-ce-ios/EXAMPLE_fallout2.cfg
|
||||
cd out/dist
|
||||
zip -r fallout2-ce-ios.zip fallout2-ce-ios
|
||||
|
||||
@@ -243,6 +245,7 @@ jobs:
|
||||
mkdir -p out/dist/fallout2-ce-linux-${{ matrix.arch }}
|
||||
cp out/build/linux-${{ matrix.arch }}-debug/fallout2-ce out/dist/fallout2-ce-linux-${{ matrix.arch }}/fallout2-ce
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-linux-${{ matrix.arch }}/ce.dat
|
||||
cp files/fallout2.cfg out/dist/fallout2-ce-linux-${{ matrix.arch }}/EXAMPLE_fallout2.cfg
|
||||
tar -czvf out/dist/fallout2-ce-linux-${{ matrix.arch }}.tar.gz -C out/dist fallout2-ce-linux-${{ matrix.arch }}
|
||||
|
||||
- name: Upload
|
||||
@@ -252,23 +255,38 @@ jobs:
|
||||
path: out/dist/fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
||||
retention-days: 7
|
||||
|
||||
linux-armhf:
|
||||
name: Linux (armhf)
|
||||
linux-arm:
|
||||
name: Linux (${{ matrix.arch }})
|
||||
|
||||
runs-on: ubuntu-22.04-arm
|
||||
needs: [ce-dat]
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch:
|
||||
- armhf
|
||||
- arm64
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Dependencies
|
||||
- name: Dependencies (armhf)
|
||||
if: matrix.arch == 'armhf'
|
||||
run: |
|
||||
sudo dpkg --add-architecture armhf
|
||||
sudo apt update
|
||||
sudo apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libsdl2-dev:armhf zlib1g-dev:armhf
|
||||
|
||||
- name: Configure
|
||||
- name: Dependencies (arm64)
|
||||
if: matrix.arch == 'arm64'
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libsdl2-dev zlib1g-dev
|
||||
|
||||
- name: Configure (armhf)
|
||||
if: matrix.arch == 'armhf'
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
@@ -279,45 +297,8 @@ jobs:
|
||||
-D CMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \
|
||||
# EOL
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Download ce.dat
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ce-dat
|
||||
path: out/dist
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
mkdir -p out/dist/fallout2-ce-linux-armhf
|
||||
cp build/fallout2-ce out/dist/fallout2-ce-linux-armhf/fallout2-ce
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-linux-armhf/ce.dat
|
||||
tar -czvf out/dist/fallout2-ce-linux-armhf.tar.gz -C out/dist fallout2-ce-linux-armhf
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-linux-armhf
|
||||
path: out/dist/fallout2-ce-linux-armhf.tar.gz
|
||||
retention-days: 7
|
||||
|
||||
linux-arm64:
|
||||
name: Linux (arm64)
|
||||
|
||||
runs-on: ubuntu-22.04-arm
|
||||
needs: [ce-dat]
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libsdl2-dev zlib1g-dev
|
||||
|
||||
- name: Configure
|
||||
- name: Configure (arm64)
|
||||
if: matrix.arch == 'arm64'
|
||||
run: cmake -B build -D CMAKE_BUILD_TYPE=Debug -D FALLOUT_VENDORED=OFF
|
||||
|
||||
- name: Build
|
||||
@@ -331,16 +312,17 @@ jobs:
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
mkdir -p out/dist/fallout2-ce-linux-arm64
|
||||
cp build/fallout2-ce out/dist/fallout2-ce-linux-arm64/fallout2-ce
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-linux-arm64/ce.dat
|
||||
tar -czvf out/dist/fallout2-ce-linux-arm64.tar.gz -C out/dist fallout2-ce-linux-arm64
|
||||
mkdir -p out/dist/fallout2-ce-linux-${{ matrix.arch }}
|
||||
cp build/fallout2-ce out/dist/fallout2-ce-linux-${{ matrix.arch }}/fallout2-ce
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-linux-${{ matrix.arch }}/ce.dat
|
||||
cp files/fallout2.cfg out/dist/fallout2-ce-linux-${{ matrix.arch }}/EXAMPLE_fallout2.cfg
|
||||
tar -czvf out/dist/fallout2-ce-linux-${{ matrix.arch }}.tar.gz -C out/dist fallout2-ce-linux-${{ matrix.arch }}
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-linux-arm64
|
||||
path: out/dist/fallout2-ce-linux-arm64.tar.gz
|
||||
name: fallout2-ce-linux-${{ matrix.arch }}
|
||||
path: out/dist/fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
||||
retention-days: 7
|
||||
|
||||
macos:
|
||||
@@ -431,6 +413,7 @@ jobs:
|
||||
mkdir -p out/dist/fallout2-ce-windows-${{ matrix.arch }}
|
||||
cp out/build/windows-${{ matrix.arch }}/RelWithDebInfo/fallout2-ce.exe out/dist/fallout2-ce-windows-${{ matrix.arch }}/fallout2-ce.exe
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-windows-${{ matrix.arch }}/ce.dat
|
||||
cp files/fallout2.cfg out/dist/fallout2-ce-windows-${{ matrix.arch }}/EXAMPLE_fallout2.cfg
|
||||
cd out/dist
|
||||
7z a fallout2-ce-windows-${{ matrix.arch }}.zip fallout2-ce-windows-${{ matrix.arch }}
|
||||
|
||||
@@ -445,7 +428,7 @@ jobs:
|
||||
release:
|
||||
name: Release Continuous build
|
||||
runs-on: ubuntu-latest
|
||||
needs: [android, ios, linux, linux-armhf, linux-arm64, macos, windows]
|
||||
needs: [android, ios, linux, linux-arm, macos, windows]
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
|
||||
@@ -70,6 +70,7 @@ jobs:
|
||||
mkdir -p out/dist/fallout2-ce-android
|
||||
cp os/android/app/build/outputs/apk/release/app-release.apk out/dist/fallout2-ce-android/fallout2-ce-android.apk
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-android/ce.dat
|
||||
cp files/fallout2.cfg out/dist/fallout2-ce-android/EXAMPLE_fallout2.cfg
|
||||
cd out/dist
|
||||
zip -r fallout2-ce-android.zip fallout2-ce-android
|
||||
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-android.zip
|
||||
@@ -130,6 +131,7 @@ jobs:
|
||||
mkdir -p out/dist/fallout2-ce-ios
|
||||
cp build/fallout2-ce.ipa out/dist/fallout2-ce-ios/fallout2-ce-ios.ipa
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-ios/ce.dat
|
||||
cp files/fallout2.cfg out/dist/fallout2-ce-ios/EXAMPLE_fallout2.cfg
|
||||
cd out/dist
|
||||
zip -r fallout2-ce-ios.zip fallout2-ce-ios
|
||||
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-ios.zip
|
||||
@@ -211,6 +213,7 @@ jobs:
|
||||
mkdir -p out/dist/fallout2-ce-linux-${{ matrix.arch }}
|
||||
cp build/fallout2-ce out/dist/fallout2-ce-linux-${{ matrix.arch }}/fallout2-ce
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-linux-${{ matrix.arch }}/ce.dat
|
||||
cp files/fallout2.cfg out/dist/fallout2-ce-linux-${{ matrix.arch }}/EXAMPLE_fallout2.cfg
|
||||
tar -czvf fallout2-ce-linux-${{ matrix.arch }}.tar.gz -C out/dist fallout2-ce-linux-${{ matrix.arch }}
|
||||
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
||||
rm fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
||||
@@ -341,6 +344,7 @@ jobs:
|
||||
mkdir -p out/dist/fallout2-ce-windows-${{ matrix.arch }}
|
||||
cp out/build/windows-${{ matrix.arch }}/RelWithDebInfo/fallout2-ce.exe out/dist/fallout2-ce-windows-${{ matrix.arch }}/fallout2-ce.exe
|
||||
cp out/dist/ce.dat out/dist/fallout2-ce-windows-${{ matrix.arch }}/ce.dat
|
||||
cp files/fallout2.cfg out/dist/fallout2-ce-windows-${{ matrix.arch }}/EXAMPLE_fallout2.cfg
|
||||
cd out/dist
|
||||
7z a fallout2-ce-windows-${{ matrix.arch }}.zip fallout2-ce-windows-${{ matrix.arch }}
|
||||
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-windows-${{ matrix.arch }}.zip
|
||||
|
||||
@@ -1,18 +1,102 @@
|
||||
# Fallout 2 Community Engine
|
||||
|
||||
Fallout 2 Community Engine is a fully working re-implementation of the Fallout 2 engine, optimized for a hassle-free experience on multiple platforms. It provides high resolution support, quality-of-life improvements, and dozens of bug fixes.
|
||||
Fallout 2 Community Engine is a fully working re-implementation of the Fallout 2 engine, optimized for a hassle-free experience on multiple platforms, including Windows, Mac, iOS, Android, and Linux. It provides high resolution support, quality-of-life improvements, and dozens upon dozens of bug fixes.
|
||||
|
||||
This is a fork of the original Fallout2: CE project, which is no longer 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) work. [Fallout 2 Restoration Project](https://github.com/BGforgeNet/Fallout2_Restoration_Project) is supported (in Beta). [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. Nevada and Sonora work. [Fallout 2 Restoration Project](https://github.com/BGforgeNet/Fallout2_Restoration_Project) is supported (in Beta). [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.
|
||||
|
||||
Fallout2: CE has broad (though not total) compatibility with [Sfall](https://github.com/sfall-team/sfall) scripting extensions. Many traditional Fallout mods work out of the box.
|
||||
Fallout2: CE has broad (though not total) compatibility with [Sfall](https://github.com/sfall-team/sfall) scripting extensions. Many traditional Fallout mods work out of the box, including NPC Armor, Party Orders, FO2Tweaks (we recommend v14.5+), Talking Heads, and many others.
|
||||
|
||||
There is also [Fallout 1 Community Edition](https://github.com/alexbatalov/fallout1-ce) (not affiliated with this fork).
|
||||
## Installation — [Download Latest CE Release](https://github.com/fallout2-ce/fallout2-ce/releases)
|
||||
|
||||
## 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).
|
||||
|
||||
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.
|
||||
Download CE from the link above, then extract the archive into your game folder. Launch `fallout2-ce.exe` on Windows (or the platform-specific executable) to play. CE has a lot of enhancements that require configuration. See [Configuration](#configuration) for examples.
|
||||
|
||||
For detailed instructions on how to play on Mac, Linux, iOS, or Android, see the [Platform-specific instructions](#platform-specific-installation).
|
||||
|
||||
## Quality of life benefits over vanilla Fallout
|
||||
|
||||
* High resolution support
|
||||
* Party members can loot and barter in place of PC
|
||||
* Directly equip party members instead of convincing them to use the right equipment.
|
||||
* Expanded 2-column inventory, loot screens
|
||||
* Expanded 4-row barter screen
|
||||
* Expanded AP bar
|
||||
* Ctrl-click to quickly move items when bartering, looting, or stealing, and auto-balance caps
|
||||
* Music continues playing between maps
|
||||
* Auto open doors
|
||||
* Integrated "HELP" menu
|
||||
* 44.1 kHz stereo sound/music supported, in .ogg and .wav format as well as legacy .acm
|
||||
* Last used save slot is remembered
|
||||
* Item/Corpse/Container/Critter highlighting (configure using [mods/sfall-mods.ini](https://github.com/sfall-team/sfall/blob/master/artifacts/config_files/sfall-mods.ini))
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<img src="docs/images/two-column-inventory.jpg" alt="Expanded 2-column inventory" width="360"><br>
|
||||
<sub>Expanded 2-column inventory</sub>
|
||||
</td>
|
||||
<td align="center">
|
||||
<img src="docs/images/companion-equip.gif" alt="Companion equip screen" width="360"><br>
|
||||
<sub>Companion equip screen</sub>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<img src="docs/images/party-member-loot.gif" alt="Party member loot" width="360"><br>
|
||||
<sub>Party member loot</sub>
|
||||
</td>
|
||||
<td align="center">
|
||||
<img src="docs/images/help-menu.gif" alt="Integrated HELP menu" width="360"><br>
|
||||
<sub>Integrated HELP menu</sub>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
There are also dozens of small things that just work a little better than they did in the original. Better pathfinding, fewer graphics glitches, less finicky weapon stacking, and much more.
|
||||
|
||||
## Configuration
|
||||
|
||||
The main configuration file is `fallout2.cfg`. This contains original game config as well as new CE settings.
|
||||
|
||||
Additional settings for screen resolution, UI customization, and map options are now integrated into the main `fallout2.cfg` file (previously part of `f2_res.ini` from Mash's HRP).
|
||||
|
||||
Here are some important settings in `fallout2.cfg` under the `[screen]` and `[ui]` sections. See [the example config](https://github.com/fallout2-ce/fallout2-ce/tree/refs/heads/main/files/fallout2.cfg) for a full list of settings.
|
||||
|
||||
```ini
|
||||
[screen]
|
||||
resolution_x=1600 ; actual game window size (screen resolution), in pixels
|
||||
resolution_y=1080
|
||||
windowed=1 ; 0 = fullscreen
|
||||
scale=2 ; 1 = original scale, 2 = 2x scale, etc. (e.g. at scale 2 and screen resolution 1920x1080, in-game resolution will be 960x540, thus every pixel is twice as wide and tall)
|
||||
|
||||
[ui]
|
||||
; Maximum number of columns shown in the main inventory and loot/steal windows (valid range: 1..2)
|
||||
inventory_columns=2
|
||||
|
||||
; Set to 1 to expand the barter/trade window vertically, adding a 4th item slot per side (requires ce.dat)
|
||||
expand_barter_window=1
|
||||
|
||||
[qol]
|
||||
; Allow opening party member inventory from the long-press context menu.
|
||||
party_trade_from_menu=1
|
||||
|
||||
; Allow switching to companions' inventories in loot screens (and barter, in the future)
|
||||
party_loot_and_barter=1
|
||||
```
|
||||
|
||||
**Recommendations:**
|
||||
- **Desktops**: Use any size you see fit.
|
||||
- **Tablets**: Set these values to logical resolution of your device, for example iPad Pro 11 is 1668x2388 (pixels), but its 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 an in-game interface, right now you have to do it manually. To see all currently working fallout2.cfg settings, just run the game once and quit. It will be automatically updated with defaults for every supported setting.
|
||||
*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 settings can be found here: [f2_res.dat](https://github.com/fallout2-ce/fallout2-ce/raw/refs/heads/main/files/f2_res.dat)
|
||||
|
||||
## Platform-specific installation
|
||||
|
||||
### Windows
|
||||
|
||||
@@ -103,57 +187,6 @@ docker run --rm -v $(pwd):/src emscripten/emsdk:3.1.74 sh -c 'git config --globa
|
||||
```
|
||||
- Demo available at https://github.com/ololoken/fallout2-ce-ems.git
|
||||
|
||||
## Configuration
|
||||
|
||||
The main configuration file is `fallout2.cfg`. There are several important settings you might need to adjust for your installation. Depending on your Fallout distribution main game assets `master.dat`, `critter.dat`, `patch000.dat`, and `data` folder might be either all lowercased, or all uppercased. You can either update `master_dat`, `critter_dat`, `master_patches` and `critter_patches` settings to match your file names, or rename files to match entries in your `fallout2.cfg`.
|
||||
|
||||
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.
|
||||
|
||||
Additional settings for screen resolution, UI customization, and map options are now integrated into the main `fallout2.cfg` file (previously part of `f2_res.ini` from Mash's HRP). When Fallout 2 CE starts, if it detects an existing `f2_res.ini` file, it automatically migrates these settings into `fallout2.cfg`. After migration, `fallout2.cfg` becomes the single source of truth for this configuration.
|
||||
|
||||
Here are some important settings in `fallout2.cfg` under the `[screen]` and `[ui]` sections. See [the example config](https://github.com/fallout2-ce/fallout2-ce/tree/refs/heads/main/files/fallout2.cfg) for a full list of settings.
|
||||
|
||||
```ini
|
||||
[screen]
|
||||
resolution_x=1600 ; actual game window size (screen resolution), in pixels
|
||||
resolution_y=1080
|
||||
windowed=1 ; 0 = fullscreen
|
||||
scale=2 ; 1 = original scale, 2 = 2x scale, etc. (e.g. at scale 2 and screen resolution 1920x1080, in-game resolution will be 960x540, thus every pixel is twice as wide and tall)
|
||||
|
||||
[ui]
|
||||
;Set to 1 to expand the barter/trade window vertically, adding a 4th item slot per side (requires ce.dat)
|
||||
expand_barter_window=1
|
||||
;Maximum number of columns shown in the main inventory and loot/steal windows (valid range: 1..2)
|
||||
inventory_columns=2
|
||||
splash_screen_size=1 ; Splash screen scaling (0=original size, 1=fit preserving aspect, 2=stretch to fill)
|
||||
quick_toolbar_visible=0 ; Skills quick access toolbar visibility (iOS only) (0=hidden, 1=visible)
|
||||
```
|
||||
|
||||
**Recommendations:**
|
||||
- **Desktops**: Use any size you see fit.
|
||||
- **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. To see all currently working fallout2.cfg settings, just run the game once and quit. It will be automatically updated with defaults for every supported setting.
|
||||
*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 settings can be found here: [f2_res.dat](https://github.com/fallout2-ce/fallout2-ce/raw/refs/heads/main/files/f2_res.dat)
|
||||
|
||||
## Quality of life benefits over vanilla Fallout
|
||||
|
||||
* High resolution support
|
||||
* Expanded 2-column inventory
|
||||
* Expanded 4-row barter screen
|
||||
* Expanded AP bar
|
||||
* Party members can loot and barter in place of PC
|
||||
* Increased pathfinding nodes 5x for more accurate pathfinding, and use accurate path length for walk vs run
|
||||
* Ctrl-click to quickly move items when bartering, looting, or stealing
|
||||
* _a_ to select "all" when selecting item quantity, and for `Take All` when looting
|
||||
* When bartering, caps default to the right amount to balance the trade
|
||||
* Music continues playing between maps
|
||||
* Auto open doors
|
||||
* Integrated "HELP" menu
|
||||
* 44.1 kHz stereo sound/music supported, in .ogg and .wav format as well as legacy .acm
|
||||
* Last used save slot is remembered
|
||||
* Item/Corpse/Container/Critter highlighting (configure using [mods/sfall-mods.ini](https://github.com/sfall-team/sfall/blob/master/artifacts/config_files/sfall-mods.ini))
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
+13
-1
@@ -38,6 +38,18 @@ The following settings were moved into [`fallout2.cfg`](files/fallout2.cfg) inst
|
||||
| `Misc` | `UseWalkDistance` | `qol` | `use_walk_distance` |
|
||||
| `Misc` | `AutoOpenDoors` | `qol` | `auto_open_doors` |
|
||||
|
||||
The following settings were moved into [`<DAT>/config/game.cfg`](files/ce.dat/config/game.cfg):
|
||||
|
||||
| ddraw.ini section | ddraw.ini key | game.cfg section | game.cfg key |
|
||||
| --- | --- | --- | --- |
|
||||
| `Misc` | `StartingMap` | `start` | `map` |
|
||||
| `Misc` | `StartXPos` | `start` | `worldmap_x` |
|
||||
| `Misc` | `StartYPos` | `start` | `worldmap_y` |
|
||||
| `Misc` | `ViewXPos` | `start` | `worldmap_view_x` |
|
||||
| `Misc` | `ViewYPos` | `start` | `worldmap_view_y` |
|
||||
| `Misc` | `StartGDialogFix` | `dialog` | `start_gdialog_fix` |
|
||||
| `Misc` | `DisableSpecialMapIDs` | `maps` | `disable_special_map_ids` |
|
||||
|
||||
## Opcodes / Metarules
|
||||
|
||||
See [`https://sfall-team.github.io/sfall/`](https://sfall-team.github.io/sfall/) for documentation on specific functions.
|
||||
@@ -53,7 +65,7 @@ See [`https://sfall-team.github.io/sfall/`](https://sfall-team.github.io/sfall/)
|
||||
| Perks and traits | set_perk_image<br>set_perk_*<br>set_pyromaniac_mod<br>apply_heaveho_fix<br>set_swiftlearner_mod<br>has/set_fake_perk<br>has/set_fake_trait<br>set_selectable_perk<br>set_perkbox_title<br>show/hide_real_perks<br>perk_add_mode<br>clear_selectable_perks<br>add/remove_trait<br>seq_perk_freq | not implemented | - |
|
||||
| Virtual file system | fs_create<br>fs_copy<br>fs_find<br>fs_read/write_*<br>fs_delete<br>fs_size<br>fs_pos<br>fs_seek<br>fs_resize | đźš« | Open an issue if you have a use case for these |
|
||||
| Combat / Knockback | set_weapon_knockback<br>set_target_knockback<br>set_attacker_knockback<br>remove_weapon_knockback<br>remove_target_knockback<br>remove_attacker_knockback | not implemented | - |
|
||||
| Maps and encounters | in_world_map<br>force_encounter{_with_flags}<br>set_map_time_multi<br>get/set_map_enter_position<br>exec_map_update_scripts<br>get/set_terrain_name<br>set_town_title<br>get/set_can_rest_on_map<br>set_rest_heal_time<br>set_rest_mode<br>set_worldmap_heal_time | implemented: in_world_map, force_encounter, force_encounter_with_flags, set_map_time_multi | - |
|
||||
| Maps and encounters | in_world_map<br>force_encounter{_with_flags}<br>set_map_time_multi<br>get/set_map_enter_position<br>exec_map_update_scripts<br>get/set_terrain_name<br>set_town_title<br>get/set_can_rest_on_map<br>set_rest_heal_time<br>set_rest_mode<br>set_worldmap_heal_time | implemented: in_world_map, force_encounter, force_encounter_with_flags, set_map_time_multi, get_terrain_name, set_terrain_name | - |
|
||||
| Maps and encounters / Worldmap | get_world_map_x/y_pos<br>set_world_map_pos | âś… | - |
|
||||
| Audio | play_sfall_sound<br>stop_sfall_sound | âś… | `play_sfall_sound` currently supports `.acm`, `.wav`, `.ogg` formats, and can load from `.dat` archives. `.mp3` is not yet supported. |
|
||||
| Combat / Weapons and ammo | get/set_weapon_ammo_pid<br>get/set_weapon_ammo_count | âś… | - |
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 301 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 303 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 381 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 157 KiB |
@@ -11,6 +11,12 @@ month=6
|
||||
day=24
|
||||
; To start a new game somewhere other than artemple.map, set this to the map file name.
|
||||
map=
|
||||
; Starting worldmap marker position. -1 uses the starting map's world area.
|
||||
worldmap_x=-1
|
||||
worldmap_y=-1
|
||||
; Starting worldmap viewport position. -1 uses the default upper-left view.
|
||||
worldmap_view_x=-1
|
||||
worldmap_view_y=-1
|
||||
; Starting (tribal) and default (jumpsuit) player models. Can also be changed in-game via script.
|
||||
model_male=hmwarr
|
||||
model_male_default=hmjmps
|
||||
@@ -20,6 +26,11 @@ model_female_default=hfjmps
|
||||
; Set to 2 to make the pipboy available by only skipping the vault suit movie check.
|
||||
pipboy=0
|
||||
|
||||
[maps]
|
||||
; Set to 1 to apply transition tile, elevation, and rotation overrides on all maps,
|
||||
; including Fallout 2 map IDs 19 and 37.
|
||||
disable_special_map_ids=0
|
||||
|
||||
[karma]
|
||||
; FRM numbers for karma icons on the character screen. Number of points entries should be 1 less than number of frms entries.
|
||||
; Example: frms=47,48,49 points=-100,100
|
||||
@@ -38,6 +49,9 @@ no_exit_hotkey=1
|
||||
; Set to 1 to allow using '^' in dialog msg files to specify gender-based alternative text.
|
||||
; Text must be enclosed in angle brackets, e.g. <MaleText^FemaleText>.
|
||||
gender_words=0
|
||||
; Set to 1 to enable the sfall StartGDialogFix behavior: talking-head dialogs honor the start_gdialog mood argument unless it is -1.
|
||||
; When set to 0, CE still applies sfall's crash fix for calling start_gdialog outside talk_p_proc.
|
||||
start_gdialog_fix=0
|
||||
|
||||
[main_menu]
|
||||
; Custom version string shown on the main menu. Supports up to two %d placeholders for the game version numbers.
|
||||
|
||||
+74
-29
@@ -1,3 +1,6 @@
|
||||
; This is an example configuration for Fallout CE. If you'd like to use the recommended settings without
|
||||
; disturbing your game config, copy everything from [ui] and [qol] into your fallout2.cfg
|
||||
|
||||
[debug]
|
||||
;Set this to a valid path to save a copy of the console contents
|
||||
console_output_path=
|
||||
@@ -48,15 +51,20 @@ text_line_delay=2.000000
|
||||
violence_level=3
|
||||
|
||||
[screen]
|
||||
resolution_x=640
|
||||
; Physical screen resolution of the full screen or window.
|
||||
resolution_x=800
|
||||
resolution_y=480
|
||||
; Scale of physical pixels to logical pixels. For instance, if x/y is 1280 x 960 and scale is 2,
|
||||
; the game will be rendered at 640 x 480 and then scaled up to 1280 x 960. This is useful for windowed mode on high DPI displays.
|
||||
scale=1
|
||||
; Set to 1 to run the game in windowed mode. Set to 0 to run in fullscreen mode.
|
||||
windowed=1
|
||||
|
||||
[sound]
|
||||
cache_size=448
|
||||
debug=1
|
||||
debug_sfxc=1
|
||||
; Set to 1 to avoid restarting music when changing maps when the music is the same track.
|
||||
gapless_music=1
|
||||
initialize=1
|
||||
master_volume=22281
|
||||
@@ -70,7 +78,7 @@ speech=1
|
||||
speech_volume=22281
|
||||
|
||||
[system]
|
||||
art_cache_size=8
|
||||
art_cache_size=32
|
||||
color_cycling=1
|
||||
critter_dat=critter.dat
|
||||
critter_patches=data
|
||||
@@ -87,60 +95,97 @@ scroll_lock=0
|
||||
splash=5
|
||||
|
||||
[ui]
|
||||
;Speed up or slow down all UI animations such as screen fade, dialog window show/hide, AC numbers roll, etc.
|
||||
; Speed up or slow down all UI animations such as screen fade, dialog window show/hide, AC numbers roll, etc.
|
||||
anim_speed=2.000000
|
||||
;To use more than one save slot for quick saving (F6 key) without picking a slot beforehand
|
||||
;Quick save will cyclically overwrite saves from the first slot on the specified page to the last slot on the n-th page
|
||||
;auto_quick_save sets how many pages you want to use for quick saving (valid range: 1..10)
|
||||
;Set to 0 to disable
|
||||
|
||||
; To use more than one save slot for quick saving (F6 key) without picking a slot beforehand
|
||||
; Quick save will cyclically overwrite saves from the first slot on the specified page to the last slot on the n-th page
|
||||
; auto_quick_save sets how many pages you want to use for quick saving (valid range: 1..10)
|
||||
; Set to 0 to disable
|
||||
auto_quick_save=3
|
||||
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
|
||||
|
||||
; Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
|
||||
display_bonus_damage=1
|
||||
;Set to 1 to get notification of karma changes in the notification window
|
||||
|
||||
; Set to 1 to get notification of karma changes in the notification window
|
||||
display_karma_changes=0
|
||||
;Set to 1 to use the hi-res dialog border/background at resolutions above 640x480. Requires art\intrface\HR_ALLTLK.FRM (for example from f2_res.dat)
|
||||
|
||||
; Set to 1 to use the hi-res dialog border/background at resolutions above 640x480. Requires art\intrface\HR_ALLTLK.FRM (for example from f2_res.dat)
|
||||
dialog_border=1
|
||||
;Set to one to hide areas outside map bounds when using higher than 640x480 resolution, and to zero to disable
|
||||
|
||||
; Set to one to hide areas outside map bounds when using higher than 640x480 resolution, and to zero to disable
|
||||
enable_high_resolution_stencil=1
|
||||
;Set to 1 to extend the action points bar to show up to 16 AP instead of 10 (requires iface_apbar_e.frm)
|
||||
extend_ap_bar=0
|
||||
;Set to 1 to expand the barter/trade window vertically, adding a 4th item slot per side (requires barter_e.frm, trade_e.frm, and a screen height of at least 528 pixels)
|
||||
expand_barter_window=0
|
||||
|
||||
; Set to 1 to extend the action points bar to show up to 16 AP instead of 10 (requires iface_apbar_e.frm)
|
||||
extend_ap_bar=1
|
||||
|
||||
; Set to 1 to expand the barter/trade window vertically, adding a 4th item slot per side (requires barter_e.frm, trade_e.frm, and a screen height of at least 528 pixels)
|
||||
expand_barter_window=1
|
||||
|
||||
; 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
|
||||
; 0 = no side art, 1 = metal, 2 = leather, 3-6 = alternative metal, 7 = alternative leather, 8 = brown metal
|
||||
iface_bar_side_art=2
|
||||
; 0 = Iface-bar side graphics extend from the Iface-Bar to the Screen edges.
|
||||
; 1 = Iface-bar side graphics extend from the Screen edges to the Iface-Bar
|
||||
iface_bar_sides_ori=0
|
||||
; Set to 640 to use the original interface bar width, or 800 to use the 800pix wide asset from f2_res.dat.
|
||||
iface_bar_width=800
|
||||
;Whether to load EDG files (HRP format) when loading maps. If loaded, they override default edge clipping and scroll blocking behavior.
|
||||
|
||||
; Whether to load EDG files (HRP format) when loading maps. If loaded, they override default edge clipping and scroll blocking behavior.
|
||||
edg_support=1
|
||||
ignore_map_edges=0
|
||||
;Set to 1 to display numbered dialogue options
|
||||
|
||||
; Set to 1 to display numbered dialogue options
|
||||
numbers_in_dialogue=0
|
||||
;Set to 1 to skip the 3 opening movies
|
||||
;Set to 2 to also skip the splash screen
|
||||
|
||||
; Set to 1 to skip the 3 opening movies
|
||||
; Set to 2 to also skip the splash screen
|
||||
skip_opening_movies=0
|
||||
|
||||
; Set to 1 to scale the splash screen to fit the screen while preserving aspect ratio.
|
||||
; Set to 2 to fill the screen
|
||||
splash_screen_size=1
|
||||
;Set to 1 to scale movies to fit the screen while preserving aspect ratio.
|
||||
;Set to 0 to keep movies at their native size, centered on screen.
|
||||
|
||||
; Set to 1 to scale movies to fit the screen while preserving aspect ratio.
|
||||
; Set to 0 to keep movies at their native size, centered on screen.
|
||||
movie_aspect_fit=1
|
||||
;Maximum number of columns shown in the main inventory and loot/steal windows (valid range: 1..2)
|
||||
;2-column Loot/steal window requires minimum screen width of 673px
|
||||
|
||||
; Maximum number of columns shown in the main inventory and loot/steal windows (valid range: 1..2)
|
||||
; 2-column Loot/steal window requires minimum screen width of 673px.
|
||||
; This also enables npc equipment management on the loot screen
|
||||
inventory_columns=2
|
||||
|
||||
;Set to 0 to keep the main menu art and controls at native size.
|
||||
;Set to 1 to scale only the main menu background image to fit the screen while maintaining aspect ratio.
|
||||
;Set to 2 to also scale the main menu button panel, red buttons, and button labels with the menu art.
|
||||
; Set to 0 to keep the main menu art and controls at native size.
|
||||
; Set to 1 to scale only the main menu background image to fit the screen while maintaining aspect ratio.
|
||||
; Set to 2 to also scale the main menu button panel, red buttons, and button labels with the menu art.
|
||||
main_menu_scale_mode=1
|
||||
;Set to 1 to show a Help option in the in-game options menu which opens the F1 help screen.
|
||||
|
||||
; Set to 1 to show a Help option in the in-game options menu which opens the F1 help screen.
|
||||
in_game_menu_help=1
|
||||
|
||||
; Weight/size indicator for PC, critters and containers
|
||||
; Set to 0 for vanilla behavior (no weight indicator)
|
||||
; Set to 1 to show a simple weight indicator; works with all inventory_columns values
|
||||
; Set to 2 to show a detailed weight indicator; works with inventory_columns > 1 only
|
||||
loot_weight_indicator=1
|
||||
|
||||
; Set to 0 to show container indicator at all times
|
||||
; Set to XX to show container indicator when size reaches XX%
|
||||
; Set to 100 to show container indicator when full
|
||||
loot_container_size_indicator_threshold=50
|
||||
|
||||
[qol]
|
||||
; Automatically open doors that are unlocked and has no script attached.
|
||||
auto_open_doors=0
|
||||
|
||||
; Overrides distance at which walk animation is used when using an object. 0 disables walking
|
||||
; This is the number of empty tiles between the player and the target
|
||||
; This is the number of empty tiles between the player and the target. 3 is the default
|
||||
use_walk_distance=3
|
||||
; Allow opening party member inventory from the long-press world menu.
|
||||
|
||||
; Allow opening party member inventory from the long-press context menu.
|
||||
party_trade_from_menu=1
|
||||
|
||||
; Allow switching to companions' inventories in loot screens (and barter, in the future)
|
||||
party_loot_and_barter=1
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#include "test_utils.h"
|
||||
#include "sfall.h"
|
||||
|
||||
procedure start begin
|
||||
variable defaultName;
|
||||
|
||||
display_msg("Testing terrain name metarules...");
|
||||
|
||||
call assertEquals("get metarule exists", metarule_exist("get_terrain_name"), 1);
|
||||
call assertEquals("set metarule exists", metarule_exist("set_terrain_name"), 1);
|
||||
|
||||
defaultName := get_terrain_name(0, 0);
|
||||
call assertNotEquals("default terrain name is not error", defaultName, "Error");
|
||||
call assertNotEquals("default terrain name is not empty", defaultName, "");
|
||||
|
||||
set_terrain_name(0, 0, "CE Terrain Override");
|
||||
call assertEquals("terrain override is returned", get_terrain_name(0, 0), "CE Terrain Override");
|
||||
|
||||
set_terrain_name(0, 0, "CE Terrain Override 2");
|
||||
call assertEquals("latest terrain override wins", get_terrain_name(0, 0), "CE Terrain Override 2");
|
||||
call assertEquals("one argument get returns error", sfall_func1("get_terrain_name", 0), -1);
|
||||
call assertEquals("invalid get returns error", get_terrain_name(-1, 0), "Error");
|
||||
call assertNotEquals("current terrain name is available", get_current_terrain_name, "Error");
|
||||
|
||||
call report_test_results("terrain_name");
|
||||
signal_close_game;
|
||||
end
|
||||
@@ -21,10 +21,11 @@ procedure start begin
|
||||
call assertEquals("opcode_exists OP_NOOP", opcode_exists(OP_NOOP), 1);
|
||||
// Probably will never be implemented on fallout2-ce
|
||||
call assertEquals("opcode_exists OP_WRITE_INT", opcode_exists(OP_WRITE_INT), 0);
|
||||
call assertEquals("opcode_exists bare index", opcode_exists(0x1B3), 0);
|
||||
call assertEquals("opcode_exists 0xFFFF", opcode_exists(0xFFFF), 0);
|
||||
end else begin
|
||||
display_msg("Opcode exists metarule is not available, skipping tests.");
|
||||
end
|
||||
|
||||
call report_test_results("metarule_exist");
|
||||
end
|
||||
end
|
||||
|
||||
+8
-8
@@ -97,7 +97,7 @@ static int _compute_explosion_damage(int min, int max, Object* defender, int* kn
|
||||
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 _compute_dmg_damage(int min, int max, Object* obj, int* knockbackDistancePtr, DamageType damageType);
|
||||
|
||||
static int hideProjectile(void* _, void* projectile);
|
||||
|
||||
@@ -200,7 +200,7 @@ int pickDeathAnim(Object* attacker, Object* defender, Object* weapon, int damage
|
||||
int normalViolenceLevelDamageThreshold = 15;
|
||||
int maximumBloodViolenceLevelDamageThreshold = 45;
|
||||
|
||||
int damageType = weaponGetDamageType(attacker, weapon);
|
||||
DamageType damageType = weaponGetDamageType(attacker, weapon);
|
||||
|
||||
if (weapon != nullptr && weapon->pid == PROTO_ID_MOLOTOV_COCKTAIL) {
|
||||
normalViolenceLevelDamageThreshold = 5;
|
||||
@@ -729,7 +729,7 @@ int _action_ranged(Attack* attack, int anim)
|
||||
|
||||
weaponGetRange(attack->attacker, attack->hitMode);
|
||||
|
||||
int damageType = weaponGetDamageType(attack->attacker, attack->weapon);
|
||||
DamageType damageType = weaponGetDamageType(attack->attacker, attack->weapon);
|
||||
|
||||
tileGetTileInDirection(attack->attacker->tile, attack->attacker->rotation, 1);
|
||||
|
||||
@@ -1306,7 +1306,7 @@ int actionLootCritter(Object* critter, Object* target)
|
||||
}
|
||||
|
||||
// 0x4124E0
|
||||
int _action_skill_use(int skill)
|
||||
int _action_skill_use(Skill skill)
|
||||
{
|
||||
if (skill == SKILL_SNEAK) {
|
||||
reg_anim_clear(gDude);
|
||||
@@ -1336,7 +1336,7 @@ static int _action_use_skill_in_combat_error(Object* critter)
|
||||
|
||||
// skill_use
|
||||
// 0x41255C
|
||||
int actionUseSkill(Object* user, Object* target, int skill)
|
||||
int actionUseSkill(Object* user, Object* target, Skill skill)
|
||||
{
|
||||
UseSkillOnHookResult hookResult = scriptHooks_UseSkillOn(&user, target, skill);
|
||||
if (!hookResult.shouldContinue) {
|
||||
@@ -1477,7 +1477,7 @@ int actionUseSkill(Object* user, Object* target, int skill)
|
||||
char* msg = skillsGetGenericResponse(partyMember, isDude);
|
||||
|
||||
Rect rect;
|
||||
if (textObjectAdd(partyMember, msg, 101, _colorTable[32747], _colorTable[0], &rect) == 0) {
|
||||
if (textObjectAdd(partyMember, msg, 101, COLOR_LIGHT_YELLOW, COLOR_BLACK, &rect) == 0) {
|
||||
tileWindowRefreshRect(&rect, gElevation);
|
||||
}
|
||||
|
||||
@@ -1907,7 +1907,7 @@ int _talk_to(Object* _, Object* critter)
|
||||
}
|
||||
|
||||
// 0x413494
|
||||
void actionDamage(int tile, int elevation, int minDamage, int maxDamage, int damageType, bool animated, bool bypassArmor)
|
||||
void actionDamage(int tile, int elevation, int minDamage, int maxDamage, DamageType damageType, bool animated, bool bypassArmor)
|
||||
{
|
||||
Attack* attack = (Attack*)internal_malloc(sizeof(*attack));
|
||||
if (attack == nullptr) {
|
||||
@@ -1988,7 +1988,7 @@ int _report_dmg(Attack* attack, Object* _)
|
||||
// Calculate damage by applying threshold and resistances.
|
||||
//
|
||||
// 0x413660
|
||||
int _compute_dmg_damage(int min, int max, Object* obj, int* knockbackDistancePtr, int damageType)
|
||||
int _compute_dmg_damage(int min, int max, Object* obj, int* knockbackDistancePtr, DamageType damageType)
|
||||
{
|
||||
if (!critterFlagCheck(obj->pid, CRITTER_NO_KNOCKBACK)) {
|
||||
knockbackDistancePtr = nullptr;
|
||||
|
||||
+5
-3
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "combat_defs.h"
|
||||
#include "obj_types.h"
|
||||
#include "proto_types.h"
|
||||
#include "skill_defs.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
@@ -13,14 +15,14 @@ int _action_use_an_item_on_object(Object* user, Object* targetObj, Object* item)
|
||||
int _action_use_an_object(Object* user, Object* targetObj);
|
||||
int actionPickUp(Object* critter, Object* item);
|
||||
int actionLootCritter(Object* critter, Object* target);
|
||||
int _action_skill_use(int skill);
|
||||
int actionUseSkill(Object* user, Object* target, int skill);
|
||||
int _action_skill_use(Skill skill);
|
||||
int actionUseSkill(Object* user, Object* target, Skill skill);
|
||||
bool _is_hit_from_front(const Object* attacker, const Object* defender);
|
||||
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* obj, Object* critter);
|
||||
void actionDamage(int tile, int elevation, int minDamage, int maxDamage, int damageType, bool animated, bool bypassArmor);
|
||||
void actionDamage(int tile, int elevation, int minDamage, int maxDamage, DamageType damageType, bool animated, bool bypassArmor);
|
||||
bool actionCheckPush(Object* obj, Object* target);
|
||||
int actionPush(Object* obj, Object* target);
|
||||
int _action_can_talk_to(Object* obj, Object* critter);
|
||||
|
||||
+2
-2
@@ -1736,7 +1736,7 @@ static bool canUseDoor(Object* critter, Object* door)
|
||||
return false;
|
||||
}
|
||||
|
||||
int bodyType = critterGetBodyType(critter);
|
||||
BodyType bodyType = critterGetBodyType(critter);
|
||||
if (bodyType != BODY_TYPE_BIPED && bodyType != BODY_TYPE_ROBOTIC) {
|
||||
return false;
|
||||
}
|
||||
@@ -3019,7 +3019,7 @@ int _check_move(int* actionPointsPtr)
|
||||
if (isInCombat()) {
|
||||
if (*actionPointsPtr != -1) {
|
||||
if (gPressedPhysicalKeys[SDL_SCANCODE_RCTRL] || gPressedPhysicalKeys[SDL_SCANCODE_LCTRL]) {
|
||||
int hitMode;
|
||||
HitMode hitMode;
|
||||
bool aiming;
|
||||
interfaceGetCurrentHitMode(&hitMode, &aiming);
|
||||
|
||||
|
||||
+3
-1
@@ -1789,11 +1789,13 @@ void FrmImage::resetInternal()
|
||||
|
||||
bool FrmImage::setFrame(const Art* art, int frame, int direction)
|
||||
{
|
||||
unsigned char* data = artGetFrameData(art, frame, direction, &_width, &_height, &_xOffset, &_yOffset);
|
||||
unsigned char* data = artGetFrameData(art, frame, direction, &_width, &_height, nullptr, nullptr);
|
||||
if (data == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
_xOffset = art->xOffsets[direction];
|
||||
_yOffset = art->yOffsets[direction];
|
||||
_data = data;
|
||||
return true;
|
||||
}
|
||||
|
||||
+25
-25
@@ -323,10 +323,10 @@ void automapShow(bool isInGame, bool isUsingScanner)
|
||||
|
||||
int color;
|
||||
if (isInGame) {
|
||||
color = _colorTable[8456];
|
||||
color = COLOR_DARK_GREY;
|
||||
_obj_process_seen();
|
||||
} else {
|
||||
color = _colorTable[22025];
|
||||
color = COLOR_SAND;
|
||||
}
|
||||
|
||||
int oldFont = fontGetCurrent();
|
||||
@@ -472,7 +472,7 @@ void automapShow(bool isInGame, bool isUsingScanner)
|
||||
// 17 - The motion sensor is not installed.
|
||||
// 18 - The motion sensor has no charges remaining.
|
||||
const char* title = getmsg(&gMiscMessageList, &messageListItem, scanner != nullptr ? 18 : 17);
|
||||
showDialogBox(title, nullptr, 0, 165, 140, _colorTable[32328], nullptr, _colorTable[32328], 0);
|
||||
showDialogBox(title, nullptr, 0, 165, 140, COLOR_AMBER, nullptr, COLOR_AMBER, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,9 +522,9 @@ static void automapRenderInMapWindow(int window, int elevation, unsigned char* b
|
||||
{
|
||||
int color;
|
||||
if ((flags & AUTOMAP_IN_GAME) != 0) {
|
||||
color = _colorTable[8456];
|
||||
color = COLOR_DARK_GREY;
|
||||
} else {
|
||||
color = _colorTable[22025];
|
||||
color = COLOR_SAND;
|
||||
}
|
||||
|
||||
windowFill(window, 0, 0, AUTOMAP_WINDOW_WIDTH, AUTOMAP_WINDOW_HEIGHT, color);
|
||||
@@ -546,24 +546,24 @@ static void automapRenderInMapWindow(int window, int elevation, unsigned char* b
|
||||
&& (object->flags & OBJECT_HIDDEN) == 0
|
||||
&& (flags & AUTOMAP_WITH_SCANNER) != 0
|
||||
&& (object->data.critter.combat.results & DAM_DEAD) == 0) {
|
||||
objectColor = _colorTable[31744];
|
||||
objectColor = COLOR_RED;
|
||||
} else {
|
||||
if ((object->flags & OBJECT_SEEN) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (object->pid == PROTO_ID_EXIT_GRID_MAP_MARKER) {
|
||||
objectColor = _colorTable[32328];
|
||||
objectColor = COLOR_AMBER;
|
||||
} else if (objectType == OBJ_TYPE_WALL) {
|
||||
objectColor = _colorTable[992];
|
||||
objectColor = COLOR_GREEN;
|
||||
} else if (objectType == OBJ_TYPE_SCENERY
|
||||
&& (flags & AUTOMAP_WTH_HIGH_DETAILS) != 0
|
||||
&& object->pid != PROTO_ID_BLOCK_HEX_AUTO_INVISO) {
|
||||
objectColor = _colorTable[480];
|
||||
objectColor = COLOR_DARK_GREEN;
|
||||
} else if (object == gDude) {
|
||||
objectColor = _colorTable[31744];
|
||||
objectColor = COLOR_RED;
|
||||
} else {
|
||||
objectColor = _colorTable[0];
|
||||
objectColor = COLOR_BLACK;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -572,29 +572,29 @@ static void automapRenderInMapWindow(int window, int elevation, unsigned char* b
|
||||
if ((flags & AUTOMAP_IN_GAME) == 0) {
|
||||
switch (objectType) {
|
||||
case OBJ_TYPE_ITEM:
|
||||
objectColor = _colorTable[6513];
|
||||
objectColor = COLOR_LIGHT_BLUE;
|
||||
break;
|
||||
case OBJ_TYPE_CRITTER:
|
||||
objectColor = _colorTable[28672];
|
||||
objectColor = COLOR_RED_2;
|
||||
break;
|
||||
case OBJ_TYPE_SCENERY:
|
||||
objectColor = _colorTable[448];
|
||||
objectColor = COLOR_LIGHT_GREEN;
|
||||
break;
|
||||
case OBJ_TYPE_WALL:
|
||||
objectColor = _colorTable[12546];
|
||||
objectColor = COLOR_DARK_BROWN;
|
||||
break;
|
||||
case OBJ_TYPE_MISC:
|
||||
objectColor = _colorTable[31650];
|
||||
objectColor = COLOR_LIGHT_GOLD;
|
||||
break;
|
||||
default:
|
||||
objectColor = _colorTable[0];
|
||||
objectColor = COLOR_BLACK;
|
||||
}
|
||||
}
|
||||
|
||||
if (objectColor != _colorTable[0]) {
|
||||
if (objectColor != COLOR_BLACK) {
|
||||
unsigned char* pixel = windowBuffer + pixelOffset;
|
||||
if ((flags & AUTOMAP_IN_GAME) != 0) {
|
||||
if (*pixel != _colorTable[992] || objectColor != _colorTable[480]) {
|
||||
if (*pixel != COLOR_GREEN || objectColor != COLOR_DARK_GREEN) {
|
||||
pixel[0] = objectColor;
|
||||
pixel[1] = objectColor;
|
||||
}
|
||||
@@ -620,17 +620,17 @@ static void automapRenderInMapWindow(int window, int elevation, unsigned char* b
|
||||
|
||||
int textColor;
|
||||
if ((flags & AUTOMAP_IN_GAME) != 0) {
|
||||
textColor = _colorTable[992];
|
||||
textColor = COLOR_GREEN;
|
||||
} else {
|
||||
textColor = _colorTable[12546];
|
||||
textColor = COLOR_DARK_BROWN;
|
||||
}
|
||||
|
||||
if (mapGetCurrentMap() != -1) {
|
||||
char* areaName = mapGetCityName(mapGetCurrentMap());
|
||||
windowDrawText(window, areaName, 240, 150, 380, textColor | 0x2000000);
|
||||
windowDrawText(window, areaName, 240, 150, 380, textColor | DRAW_TEXT_FLAG_NO_BG);
|
||||
|
||||
char* mapName = mapGetName(mapGetCurrentMap(), elevation);
|
||||
windowDrawText(window, mapName, 240, 150, 396, textColor | 0x2000000);
|
||||
windowDrawText(window, mapName, 240, 150, 396, textColor | DRAW_TEXT_FLAG_NO_BG);
|
||||
}
|
||||
|
||||
windowRefresh(window);
|
||||
@@ -643,8 +643,8 @@ int automapRenderInPipboyWindow(int window, int map, int elevation)
|
||||
{
|
||||
unsigned char* windowBuffer = windowGetBuffer(window) + 640 * AUTOMAP_PIPBOY_VIEW_Y + AUTOMAP_PIPBOY_VIEW_X;
|
||||
|
||||
unsigned char wallColor = _colorTable[992];
|
||||
unsigned char sceneryColor = _colorTable[480];
|
||||
unsigned char wallColor = COLOR_GREEN;
|
||||
unsigned char sceneryColor = COLOR_DARK_GREEN;
|
||||
|
||||
gAutomapEntry.data = (unsigned char*)internal_malloc(11024);
|
||||
if (gAutomapEntry.data == nullptr) {
|
||||
|
||||
+346
-315
File diff suppressed because it is too large
Load Diff
+29
-29
@@ -269,7 +269,7 @@ static bool characterSelectorWindowInit()
|
||||
|
||||
int characterSelectorWindowX = (screenGetWidth() - CS_WINDOW_WIDTH) / 2;
|
||||
int characterSelectorWindowY = (screenGetHeight() - CS_WINDOW_HEIGHT) / 2;
|
||||
gCharacterSelectorWindow = windowCreate(characterSelectorWindowX, characterSelectorWindowY, CS_WINDOW_WIDTH, CS_WINDOW_HEIGHT, _colorTable[0], 0);
|
||||
gCharacterSelectorWindow = windowCreate(characterSelectorWindowX, characterSelectorWindowY, CS_WINDOW_WIDTH, CS_WINDOW_HEIGHT, COLOR_BLACK, 0);
|
||||
if (gCharacterSelectorWindow == -1) {
|
||||
return characterSelectorWindowFatalError(false);
|
||||
}
|
||||
@@ -635,7 +635,7 @@ static bool characterSelectorWindowRenderStats()
|
||||
strcpy(text, str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_NAME_MID_X - (length / 2), text, 160, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_NAME_MID_X - (length / 2), text, 160, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// STRENGTH
|
||||
y += vh + vh + vh;
|
||||
@@ -646,13 +646,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
snprintf(text, sizeof(text), "%s %02d", str, value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
str = statGetValueDescription(value);
|
||||
snprintf(text, sizeof(text), " %s", str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// PERCEPTION
|
||||
y += vh;
|
||||
@@ -663,13 +663,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
snprintf(text, sizeof(text), "%s %02d", str, value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
str = statGetValueDescription(value);
|
||||
snprintf(text, sizeof(text), " %s", str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// ENDURANCE
|
||||
y += vh;
|
||||
@@ -680,13 +680,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
snprintf(text, sizeof(text), "%s %02d", str, value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
str = statGetValueDescription(value);
|
||||
snprintf(text, sizeof(text), " %s", str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// CHARISMA
|
||||
y += vh;
|
||||
@@ -697,13 +697,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
snprintf(text, sizeof(text), "%s %02d", str, value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
str = statGetValueDescription(value);
|
||||
snprintf(text, sizeof(text), " %s", str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// INTELLIGENCE
|
||||
y += vh;
|
||||
@@ -714,13 +714,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
snprintf(text, sizeof(text), "%s %02d", str, value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
str = statGetValueDescription(value);
|
||||
snprintf(text, sizeof(text), " %s", str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// AGILITY
|
||||
y += vh;
|
||||
@@ -731,13 +731,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
snprintf(text, sizeof(text), "%s %02d", str, value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
str = statGetValueDescription(value);
|
||||
snprintf(text, sizeof(text), " %s", str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// LUCK
|
||||
y += vh;
|
||||
@@ -748,13 +748,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
snprintf(text, sizeof(text), "%s %02d", str, value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
str = statGetValueDescription(value);
|
||||
snprintf(text, sizeof(text), " %s", str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_PRIMARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
y += vh; // blank line
|
||||
|
||||
@@ -768,13 +768,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
}
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
value = critterGetStat(gDude, STAT_MAXIMUM_HIT_POINTS);
|
||||
snprintf(text, sizeof(text), " %d/%d", critterGetHitPoints(gDude), value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// ARMOR CLASS
|
||||
y += vh;
|
||||
@@ -783,13 +783,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
strcpy(text, str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
value = critterGetStat(gDude, STAT_ARMOR_CLASS);
|
||||
snprintf(text, sizeof(text), " %d", value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// ACTION POINTS
|
||||
y += vh;
|
||||
@@ -801,13 +801,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
}
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
value = critterGetStat(gDude, STAT_MAXIMUM_ACTION_POINTS);
|
||||
snprintf(text, sizeof(text), " %d", value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
// MELEE DAMAGE
|
||||
y += vh;
|
||||
@@ -816,18 +816,18 @@ static bool characterSelectorWindowRenderStats()
|
||||
strcpy(text, str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
value = critterGetStat(gDude, STAT_MELEE_DAMAGE);
|
||||
snprintf(text, sizeof(text), " %d", value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
y += vh; // blank line
|
||||
|
||||
// SKILLS
|
||||
int skills[DEFAULT_TAGGED_SKILLS];
|
||||
Skill skills[DEFAULT_TAGGED_SKILLS];
|
||||
skillsGetTagged(skills, DEFAULT_TAGGED_SKILLS);
|
||||
|
||||
for (int index = 0; index < DEFAULT_TAGGED_SKILLS; index++) {
|
||||
@@ -837,13 +837,13 @@ static bool characterSelectorWindowRenderStats()
|
||||
strcpy(text, str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
|
||||
value = skillGetValue(gDude, skills[index]);
|
||||
snprintf(text, sizeof(text), " %d%%", value);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
}
|
||||
|
||||
// TRAITS
|
||||
@@ -857,7 +857,7 @@ static bool characterSelectorWindowRenderStats()
|
||||
strcpy(text, str);
|
||||
|
||||
length = fontGetStringWidth(text);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_SECONDARY_STAT_MID_X - length, text, length, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
}
|
||||
|
||||
fontSetCurrent(oldFont);
|
||||
@@ -882,7 +882,7 @@ static bool characterSelectorWindowRenderBio()
|
||||
|
||||
char string[256];
|
||||
while (fileReadString(string, 256, stream) && y < 260) {
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_BIO_X, string, CS_WINDOW_WIDTH - CS_WINDOW_BIO_X, CS_WINDOW_WIDTH, _colorTable[992]);
|
||||
fontDrawText(gCharacterSelectorWindowBuffer + CS_WINDOW_WIDTH * y + CS_WINDOW_BIO_X, string, CS_WINDOW_WIDTH - CS_WINDOW_BIO_X, CS_WINDOW_WIDTH, COLOR_GREEN);
|
||||
y += lineHeight;
|
||||
}
|
||||
|
||||
|
||||
+75
@@ -33,6 +33,81 @@ void colorSetBrightness(double value);
|
||||
bool _initColors();
|
||||
void _colorsClose();
|
||||
|
||||
// Converts a 24-bit 0xRRGGBB color to a 15-bit RGB555 index used by _colorTable.
|
||||
//
|
||||
// _colorTable maps RGB555 indices to the nearest 8-bit palette entry so that
|
||||
// callers can request a logical color without knowing the current palette layout.
|
||||
//
|
||||
// RGB555 packs three 5-bit channels into a 15-bit integer:
|
||||
// bits 14-10 = R (red, 0-31)
|
||||
// bits 9- 5 = G (green, 0-31)
|
||||
// bits 4- 0 = B (blue, 0-31)
|
||||
//
|
||||
// Each 8-bit input channel is reduced to 5 bits by discarding the 3 least
|
||||
// significant bits (>> 3), which is equivalent to dividing by 8.
|
||||
// The three resulting 5-bit values are then packed into the RGB555 layout:
|
||||
// R5 = (rgb >> 16 & 0xFF) >> 3 = rgb >> 19 (masked to 5 bits with & 0x1F)
|
||||
// G5 = (rgb >> 8 & 0xFF) >> 3 = rgb >> 11 (masked to 5 bits with & 0x1F)
|
||||
// B5 = (rgb >> 0 & 0xFF) >> 3 = rgb >> 3 (masked to 5 bits with & 0x1F)
|
||||
constexpr int rgb555(int rgb)
|
||||
{
|
||||
return ((rgb >> 19) & 0x1F) << 10 | ((rgb >> 11) & 0x1F) << 5 | ((rgb >> 3) & 0x1F);
|
||||
}
|
||||
|
||||
#define COLOR_LIGHT_RED _colorTable[rgb555(0xFF5252)]
|
||||
#define COLOR_RED _colorTable[rgb555(0xFF0000)]
|
||||
#define COLOR_RED_2 _colorTable[rgb555(0xE60000)]
|
||||
#define COLOR_DARK_RED _colorTable[rgb555(0xBD1042)]
|
||||
|
||||
#define COLOR_WHITE _colorTable[rgb555(0xFFFFFF)]
|
||||
#define COLOR_PALE_BLUE _colorTable[rgb555(0xC5D6FF)]
|
||||
|
||||
#define COLOR_LIGHT_GREY _colorTable[rgb555(0xA5A5A5)]
|
||||
#define COLOR_LIGHT_GREY_2 _colorTable[rgb555(0x9C94A5)]
|
||||
#define COLOR_GREY _colorTable[rgb555(0x8C8C8C)]
|
||||
#define COLOR_GREY_2 _colorTable[rgb555(0x7B7B7B)]
|
||||
#define COLOR_DARK_GREY _colorTable[rgb555(0x424242)]
|
||||
#define COLOR_DARK_GREY_2 _colorTable[rgb555(0x525252)]
|
||||
#define COLOR_DARK_GREY_3 _colorTable[rgb555(0x212121)]
|
||||
|
||||
#define COLOR_BLACK _colorTable[rgb555(0x000000)]
|
||||
#define COLOR_BLACK_2 _colorTable[rgb555(0x000010)]
|
||||
|
||||
#define COLOR_CYAN _colorTable[rgb555(0x4AFFFF)]
|
||||
#define COLOR_LIGHT_BLUE _colorTable[rgb555(0x315A8C)]
|
||||
#define COLOR_BLUE _colorTable[rgb555(0x0000FF)]
|
||||
#define COLOR_BLUE_2 _colorTable[rgb555(0x0000AD)]
|
||||
#define COLOR_SAGE_GREEN _colorTable[rgb555(0x8CBD8C)]
|
||||
|
||||
#define COLOR_LIGHT_PINK _colorTable[rgb555(0xFF7B7B)]
|
||||
#define COLOR_MAGENTA _colorTable[rgb555(0xFF00FF)]
|
||||
#define COLOR_LIGHT_PINK_2 _colorTable[rgb555(0xF77B7B)]
|
||||
|
||||
#define COLOR_LIGHT_GREEN _colorTable[rgb555(0x007300)]
|
||||
#define COLOR_LIGHT_GREEN_2 _colorTable[rgb555(0x429C21)]
|
||||
#define COLOR_LIGHT_GREEN_3 _colorTable[rgb555(0x00C500)]
|
||||
#define COLOR_GREEN _colorTable[rgb555(0x00FF00)]
|
||||
#define COLOR_DARK_GREEN _colorTable[rgb555(0x007B00)]
|
||||
#define COLOR_DARK_GREEN_2 _colorTable[rgb555(0x084A08)]
|
||||
#define COLOR_GRASS_GREEN _colorTable[rgb555(0x7B7B29)]
|
||||
|
||||
#define COLOR_LIGHT_YELLOW _colorTable[rgb555(0xFFFF5A)]
|
||||
#define COLOR_LIGHT_GOLD _colorTable[rgb555(0xF7EF10)]
|
||||
#define COLOR_LIGHT_GOLD_2 _colorTable[rgb555(0xEFEF42)]
|
||||
#define COLOR_AMBER _colorTable[rgb555(0xFF9442)]
|
||||
#define COLOR_YELLOW_2 _colorTable[rgb555(0xA59C19)]
|
||||
#define COLOR_SAND _colorTable[rgb555(0xAD844A)]
|
||||
#define COLOR_YELLOW_GREEN _colorTable[rgb555(0xEFFF08)]
|
||||
#define COLOR_DARK_YELLOW _colorTable[rgb555(0x948C19)]
|
||||
#define COLOR_DARK_YELLOW_2 _colorTable[rgb555(0x736319)]
|
||||
#define COLOR_DARK_YELLOW_3 _colorTable[rgb555(0x947B29)]
|
||||
#define COLOR_DARK_YELLOW_4 _colorTable[rgb555(0x948C08)]
|
||||
#define COLOR_LIGHT_ORANGE _colorTable[rgb555(0xFFBD7B)]
|
||||
|
||||
#define COLOR_DARK_BROWN _colorTable[rgb555(0x634210)]
|
||||
#define COLOR_OLIVE _colorTable[rgb555(0xADAD5A)]
|
||||
#define COLOR_DULL_BROWN _colorTable[rgb555(0x6B5A4A)]
|
||||
|
||||
} // namespace fallout
|
||||
|
||||
#endif /* COLOR_H */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user