Compare commits

..
1189 Commits
Author SHA1 Message Date
Mike Klaas cd38c82514 Remove 100 hard cap on outlined objects (#612)
Fixes odd highlighting behaviour in https://github.com/fallout2-ce/fallout2-ce/pull/603
2026-07-27 08:37:07 -07:00
alpacacommunist-cmd 552505e3f5 fixes party_member.cc memory leaks (#601)
updates functions:

--- File: src/party_member.cc ---
661 | static int _partyMemberRecoverLoadInstance(PartyMemberListItem* a1)
--- File: src/party_member.cc ---
710 | int partyMembersLoad(File* stream)
2026-07-27 13:09:37 +03:00
alpacacommunist-cmd b9dd399457 adds OBJECT_HIDDEN flag check for exit grids in objectSetLocation (#588) 2026-07-27 12:45:31 +03:00
5f544ca985 Change body replacement with the blood stains so the dropped items are on top (#602)
* change the body replacement sequence with the blood stains so that items are dropped after the blood is created

* chore: auto-format with clang-format

* typo

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-27 08:39:26 +02:00
jirik2077andgithub-actions[bot] 0c7752fd33 Type safe usages of DamageType, KillType, BodyType, Editor, Skill, CriticalEffect, RaceType enums. (#599)
* type safe usages or DamageType, KillType, BodyType, Editor, Skill, CriticalEffect, RaceType enums...
replaced numeric constants to Editor enum in character_editor.cc

* chore: auto-format with clang-format

* added defaults to the switches to satisfy -Wswitch

* chore: auto-format with clang-format

* copilot review fixes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-27 06:20:57 +02:00
Mike Klaas 0a5364972c [Et tu] DisableSpecialMapIDs=1 (#611) 2026-07-26 21:03:46 -07:00
Mike Klaas 1db054e47a [Et tu] Implement Start{X|Y}Pos (#585)
* [Et tu] Implement `Start{X|Y}Pos`, `ViewX|Y`
2026-07-26 14:07:55 -07:00
8e60a2fba2 Show weight instead of size in container loot dialog for better comparison (#551)
* show weight instead of size in loot dialog

* chore: auto-format with clang-format

* added configuration

* chore: auto-format with clang-format

* added percentage mode only

* chore: auto-format with clang-format

* use percentage for simple indiator in containers, remove the percentage mode only, change default to simple indicator

* Update src/settings.h

typo

Co-authored-by: Mike Klaas <mike.klaas@gmail.com>

* changed the threshold to be applicable only to the containers and se it to 50%.. changed the colors for the weight indicator and the party member name in the loot dialog.. also tweaked label position for bigger critters like Marcus

* restore font to the previous value in case threshold filters out the indicator

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* missing leading space in  weight indicator comments in fallout2.cfg

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* use actual runtime value of the size of the columns instead of trusting the setting value

Co-authored-by: Mike Klaas <mike.klaas@gmail.com>

* minor reformulation of the comments in fallout2.cfg

Co-authored-by: Mike Klaas <mike.klaas@gmail.com>

* explicitly use std::ceil() over ceil() to follow convention in this file and to make copilot happy

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mike Klaas <mike.klaas@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-26 09:52:04 +02:00
Mike Klaas ca89abad6c [Et tu] Fix TMA (Tell me about) (#596)
* Honor frm global offsets in draw_image

* Return correct dialog window in getInterfaceWindowByType
2026-07-25 20:44:25 -07:00
Mike Klaas 21a98bebb1 Correct PC placement when screen is large (#591)
Fixes https://github.com/fallout2-ce/fallout2-ce/issues/578
2026-07-25 15:37:09 -07:00
Mike Klaas 283107bebe [Et tu] Move pipboy GAMEMODECHANGE hook (#595)
This now fires when the window is created, allowing scripts to manipulate it (and in particular, add "X days left" note)
2026-07-25 08:57:50 -07:00
Mike Klaas dd21129464 [Et tu] get/set_terrain_name (#593)
* [Et tu] get/set_terrain_name
2026-07-24 21:42:30 -07:00
Mike Klaas 7604061e1c Fix script use-after-free when scripts remove themselves (#573)
* Fix script use-after-free when scripts remove themselves
2026-07-24 08:02:15 -07:00
Mike Klaas f832d78949 [Et tu] Filter out GL* scripts as global if they are in scripts.lst (#586)
* [Et tu] Filter out GL* scripts as global if they are in scripts.lst

Matches Sfall, prevents Et tu problems since a lot of Fo1 scripts start with GL*
2026-07-23 22:26:32 -07:00
Mike Klaas 57b784b8a0 Trigger GameMode::kLoot later (#590)
Mods like https://github.com/FalloutTeamX/sfall-Extended/blob/Extended/artifacts/mods/gl_auto_closebox.ssl access loot_obj in the GAMEMODECHANGE handler.  We need to move it later to prevent crashes (and match Sfall)

Fixes https://github.com/fallout2-ce/fallout2-ce/issues/589
2026-07-23 22:07:31 -07:00
Mike Klaas d5fd197dd9 Fix OOM memory access with alternate damage calculation (#584)
Was causing absurd values and/or lock ups due to using uninitized memory.

Also fix correctness bugs with it.
2026-07-23 21:48:30 -07:00
jirik2077andgithub-actions[bot] 6375604af8 Typesafe combat_defs.h enum usages (#580)
* change HitMode, HitLocation, CriticalHitDescriptionDataMember and CombatBatShot to its respective underlying integer types and enforce enum usage in the functions

* chore: auto-format with clang-format

* renamed CriticalHitDescriptionDataMember to CriticalHitDataMember. implemented isValid functions for the refactored enums in combat_defs.h. created template function for getting validated enum value in interpreter.h.. used isValid enum functions around the place

* chore: auto-format with clang-format

* changed gCombatState from uint handling to bit flags enum

* chore: auto-format with clang-format

* remove unused valid/interpreter method for CombatBadShot

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-23 20:16:18 +02:00
Mike Klaas c02c5efcf6 Don't crash on long config file lengths (#581) 2026-07-22 21:36:56 -07:00
Mike Klaas 94a7e7207c Solidify opcode_exists (#579)
* Solidify opcode_exists

* add arg validation
2026-07-21 08:54:38 -07:00
alpacacommunist-cmd b8988b69a8 combatAi: heap fragmentation fix, free previously initialized lists before init (#569)
* free previously initialized lists before init

* adds reasoning comment, safer verification
2026-07-21 13:36:18 +03:00
Mike Klaas 9467f4f778 Allow compat_resolve_path to handle duplicate path separators (#575)
Alternate fix for https://github.com/fallout2-ce/fallout2-ce/pull/563.
2026-07-20 21:49:04 -07:00
V4nnura 447cf6edff Unify linux-armhf and linux-arm64 yaml code. (#574)
* Unify linux-armhf and linux-arm64.
2026-07-20 20:56:26 -07:00
alpacacommunist-cmd c9bcb719ee adds combatSave OBJECT_NO_SAVE predicate + combat list filters (#553)
* adds combatSave OBJECT_NO_SAVE predicate + combat list filters
2026-07-20 20:43:16 -07:00
Mike Klaas 5dc9135689 Fix start_gdialog talking-head crash (#572)
Use the start_gdialog target object when deriving talking-head reaction, matching sfall's crash fix for calls outside talk_p_proc. Keep the separate StartGDialogFix behavior as a modder-controlled game.cfg option so mods can opt into honoring explicit mood arguments unless mood is -1.

sfall references:

- Crash fix/changelog: https://github.com/sfall-team/sfall/blob/d91d01f6256f083fd80a8b90d2202699f604055d/CHANGELOG.md#L171-L175

- Crash patch and StartGDialogFix hook: https://github.com/sfall-team/sfall/blob/d91d01f6256f083fd80a8b90d2202699f604055d/sfall/Modules/BugFixes.cpp#L4138-L4146

- Optional mood behavior hook: https://github.com/sfall-team/sfall/blob/d91d01f6256f083fd80a8b90d2202699f604055d/sfall/Modules/BugFixes.cpp#L2089-L2099

Verified with: make
2026-07-19 10:59:22 -07:00
jirik2077 dfe7eeb3a8 Merge pull request #565 from fallout2-ce/fix_use_after_free_in_use_item_on
Heap-use-after-free fix in objectUseItemOnInternal if  object or item is destroyed by script itself
2026-07-19 06:29:46 +02:00
jirik2077 436ce12022 Merge branch 'main' into fix_use_after_free_in_use_item_on 2026-07-19 06:18:38 +02:00
Mike Klaas 1bc0711327 Reorganize README and include image examples (#566)
* Reorganize README and include image examples
2026-07-18 21:15:54 -07:00
jirik2077 5a87638781 review comments 2026-07-19 06:04:34 +02:00
Mike KlaasandCopilot Autofix powered by AI 10f59c6b45 Bundle example config in distribution (#564)
* add fallout2.cfg docs

* flesh out fallout2.cfg

* add linux

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-18 14:50:29 -07:00
github-actions[bot] 24562f57da chore: auto-format with clang-format 2026-07-18 19:22:04 +00:00
jirik2077 9711e61f89 fixes heap-use-after-free in objectUseItemOnInternal when object is destoryed by the script (fixing K9 and attaching pole in Mariposa cart) 2026-07-18 21:14:50 +02:00
jirik2077 d8d99fe94a Merge pull request #562 from fallout2-ce/deobfuscate_color_usage
Deobfuscate color usage
2026-07-18 08:38:19 +02:00
github-actions[bot] 1a9211d44d chore: auto-format with clang-format 2026-07-18 05:04:11 +00:00
jirik2077 d63f293291 fix typo 2026-07-18 07:01:41 +02:00
jirik2077 71eaabc957 unify the flag usage between text_font.h and window_manager.h.. deobfuscate more draw text flags usages 2026-07-18 06:59:35 +02:00
Mike Klaas aac42c162c Fix refresh after elevator transition (#561)
For some RPU elevator transitions, I was seeing the screen partially not update.  This was due to rejecting the setCenterTile due scroll blockers (I think).  This turns those off if EDG support is enabled.

This also seems to fix some of the jittery scrolling I was seeing in diagonal areas like SF
2026-07-17 20:35:38 -07:00
jirik2077 47156d2e45 deobfuscate the font transparency flag 2026-07-18 00:09:13 +02:00
github-actions[bot] 33744ecf2e chore: auto-format with clang-format 2026-07-17 21:19:31 +00:00
jirik2077 20e80d4bb3 fix the spaces and make rgb to rgb555 color conversion constexpre function 2026-07-17 23:02:48 +02:00
jirik2077 a756bc2700 convert to hexa 2026-07-17 21:51:54 +02:00
jirik2077 de73c90a89 create macros for the color usages 2026-07-17 21:51:26 +02:00
jirik2077 aa439efd04 Add guards for null references in skill.cc (#557)
* add guards for null reference in skill.cc

* removed skillGetBaseValue and add debugPrint
2026-07-17 09:17:37 +02:00
Mike Klaas 41f09fa343 Fix elevator cancelation in RPU (#546)
* Fix elevator cancelation in RPU

If you step into an elevator in RPU and cancel the floor selection, the door closes behind you (sometimes with glitchy graphics).  This is a latent bug in the elevators code that vanilla doesn't hit

  - elevator_select_ mutates the caller’s elevation to a UI/display level before the modal loop.
  - Escape/cancel returns 0 without writing a destination tile.
  - Caller then sees map == current map and elevation != current elevation, so it closes the nearby door.
  - tile is still -1.

* NovaRains approach

* dont default to first floor if not found
2026-07-16 20:06:48 -07:00
Mike Klaas 44067b1933 Avoid non-critter sneak check in obj_can_see_obj (#560)
* We call skillGetValue(gDude, SKILL_SNEAK) for every target
* For non-critters, that can result in OOB memory reads
* We only need it for gDude for sneaking

So let's only call it when dude is sneaking and is the target
2026-07-16 20:05:31 -07:00
alpacacommunist-cmdandCopilot Autofix powered by AI 68d7bd0668 Fix heap corruption in wmWorldMap_load when save file has more cities than current config (#533)
* Fix out-of-bounds write in wmWorldMap_load when numCities exceeds wmMaxAreaNum

* use ENTRANCE_LIST_CAPACITY to properly isolate city entrances

And read a rest to dummy struct

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* adds debug print warning regarding extra data in .sav

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-15 22:11:42 -07:00
Mike Klaas 799184ab96 HOOK_REMOVEINVENOBJ (#540)
* HOOK_REMOVEINVENOBJ

* PR feedback
2026-07-15 21:14:11 -07:00
Mike Klaas 5774372924 Implement set_object_data, and add memory safety and correct offsets (#547)
* Correct `get_object_data` indexes

Currently they are raw offset pointers.  This does not work with CE since pointers are wide (64bit) on some (most) platforms.  So, we can treat these offsets like constants and return the appropriate fields instead.

There are already used for the most part as enum constants:
2026-07-15 21:12:33 -07:00
jirik2077 e90b68837d fix an opposite scroll direction in towns list (#550) 2026-07-15 07:50:06 +02:00
Mike Klaas ceecc3ebdb Two crash fixes (#552)
* Sfall fix for > 160 maps for automap code (RPU triggers this)
* Logic fix for action menu, where actionIndex was incremented unconditionally and could go out of bounds.  This was a regression from vanilla
2026-07-14 22:08:18 -07:00
jirik2077 83b6e081b7 Support for EPA gender change operation (#542)
* support for EPA gender change operation

* fix unintented return
2026-07-13 10:44:01 +02:00
Mike Klaas 083bd4a4cc Implement Sfall npc level cap (10) (#545)
Also, fix off-by-one error that can cause proto corruption
2026-07-12 21:10:23 -07:00
Mike Klaas 27ae59578a Implement real_dude_obj (#537)
This is used by scripts which are party-control aware.  Implementing this means they won't crash and should still work properly
2026-07-12 20:21:33 -07:00
jirik2077 fdee9914e3 Fix division by zero in objectExamineFunc (#541) 2026-07-12 18:25:06 +02:00
Mike Klaas 258de7c21e Increase animation cap (Sfall) (#539)
Fixes #538
2026-07-11 14:26:34 -07:00
jirik2077 feb0cd61ff fix healing revision op_tokenize (#536) 2026-07-11 05:49:44 +02:00
Mike Klaas cbbe2f00f1 Normalize ini paths that start with \ to game root (#501)
* Normalize ini paths that start with `\` to game root

Sfall does this, and we were missing it. https://github.com/sfall-team/sfall/blob/master/sfall/Modules/Scripting/Handlers/IniFiles.cpp#L61-L78

An example is InventoryFilter, which starts its ini path with `\`: https://github.com/rotators/InventoryFilter/blob/master/source/gl_InvenFilter.ssl#L19

* Normalize cache key
2026-07-10 15:10:05 -07:00
Mike Klaas bf1d35b2de Fix possible double-free in animation_free (#513)
* Fix possible double-free in animation_free

Port of roughly: https://github.com/cambragol/fission-ce/commit/7fafbb11c7daf5fe7f5ae05b92a3bffaaaa7b5a4

Not sure how to trigger it in CE, but seems plausibly possible
2026-07-10 15:09:33 -07:00
Mike Klaas 4a9e822e82 Fix "Uncontrolled format string" Code Scanning results (#512)
* Fix "Uncontrolled format string" Code Scanning results

https://github.com/fallout2-ce/fallout2-ce/security/code-scanning

* PR comments

* fix missing early return in programExecuteProcedureAsync path
2026-07-10 15:09:15 -07:00
Mike Klaas 843803e26a Party member equipment management (#528)
Add equipment slots to the companion loot screen.

Items can be equipped directly from player or companion inventory. This also allows switching between party members so you can manage all companion's inventories easily. Does not allow equipping items that would otherwise be disallowed.

Also:

    Calls HOOK_UNWIELD when adding/removing equipment, meaning mods like npc armor work
    Uses HOOK_CANUSE for weapon use checks

Ctrl-click to equip is not implemented since it already transfers items between the two inventories. I tried making it work only for equippable items (and otherwise transfer), but that felt awkward and random. Ctrl-click unequip is implemented.
2026-07-10 15:08:44 -07:00
Mike Klaas ef0085dcca Support Sfall extra animation codes (#535)
Fixes #534
2026-07-10 12:37:03 -07:00
Mike Klaas 9c19d212a6 Fix blue/green channel mixup in PCX reading (#500) 2026-07-09 17:43:28 -07:00
jirik2077andgithub-actions[bot] 41d908274f Handle unimplemented fs_copy/fs_create/fs_find more gracefully in scripts (#530)
* handle unimplemented fs_copy/fs_create/fs_find more gracefully from the script point of view

* chore: auto-format with clang-format

* moved to sfall_opcodes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-09 20:05:06 +02:00
Mike Klaas dafb7b3831 Add offset tracking to --scan-unimplemented (#517)
* Add offset tracking to --scan-unimplemented

* Add a bunch of missing opcodes
* Hardcode a list of implemented hooks to avoid filtering a long list of hooks that are already done
* Add tracking of specific offsets accessed in unsafe scripting so we can plan replacements

Sample output

```
OFFSET write_int (0x81d1 - 0x1d1 - 465):
  0x5190f8 (5345528):
    - ./mods/InventoryFilter.dat/scripts/gl_InvenFilter_debug.int
    - ./mods/InventoryFilter.dat/scripts/release_gl_InvenFilter.int
  0x59e95c (5892444):
    - ./mods/InventoryFilter.dat/scripts/gl_InvenFilter_debug.int
    - ./mods/InventoryFilter.dat/scripts/release_gl_InvenFilter.int
```

Then we can corrlated it with source:

```
// 0x5190F8 curr_rot
static int gInventoryWindowDudeRotation = 0;
```

* PR feedback
2026-07-08 12:31:49 -07:00
Mike Klaas 24199e916d Grow ability for ce-dat-tool to extract a list of files (#506)
* Grow ability for `ce-dat-tool` to extract a list of files

This is needed for Et Tu installation, which selectively extracts files from fo1's master.dat.  (It doesn't work if everything is extracted)

* cache entry list to avoid O(n) cost when extracting many files
2026-07-04 14:58:44 -07:00
Mike Klaas 6ee5d04f7c Deobfuscate COMBAT_STATE_* bitmask (#524) 2026-07-04 14:58:16 -07:00
jirik2077 a380a3c9e1 Merge pull request #525 from fallout2-ce/stackable_empty_weapons_fix
QoL Stackable empty weapons regardless of the previous ammo type.
2026-07-04 16:39:39 +02:00
jirik2077 c79bf5eb23 move before the ammo/money handling 2026-07-04 06:57:34 +02:00
jirik2077 7290bb4262 added the sameFlags also for empty weapon check 2026-07-04 06:32:15 +02:00
jirik2077 9a84b67ed3 comment typo fix 2026-07-03 22:54:20 +02:00
jirik2077 949458a559 empty weapons of the same type are considered the same even the ammo was originally different 2026-07-03 22:18:08 +02:00
Mike Klaas 2183c3914c Fix Goris robe/disrobe (#492)
Currently it isn't playing at all, since we're not doing renderPresent() during the animation loop.

This fixes that.  Also, it optimizes the time the animation takes by starting it before the interface combat start/end animation.  This saves half a second or so.

* Remove hidden items when trading with Goris

Also, fix the fix to allow looting with Goris
2026-07-02 19:41:16 -07:00
Mike Klaas c7e187d275 Add art drawing metarules (#507)
interface_art_draw
draw_image{_scaled}
art_frame_data
2026-07-02 19:28:14 -07:00
Mike Klaas 2c495a46ca Update gl_highlighting from sfall (#518)
* Update gl_highlighting from sfall

Pulls in NovaRain's improvement to distinguish empty containers here: https://github.com/sfall-team/sfall/commit/9fa679293269fde377cda1fc97c4668bce741af2x

* Pick up sfall fix: https://github.com/sfall-team/sfall/commit/ca3df3347d2776b83bd6edb480b8b4845731af63#diff-c2e89ad914e1b203c22d4003fb6949828e299bf9fbe46ad7ccd5a2476c053b4d
2026-07-02 06:53:05 -07:00
Mike Klaas 2ed355f8ca Fix initialized variable comparisons and fileReadInt32 (#519)
* Fix initialized variable comparisons and fileReadInt32

Also pulled in an Sfall fix for this function

Fixes https://github.com/fallout2-ce/fallout2-ce/issues/516

* approximate bytes read in xfileRead
2026-07-02 06:52:26 -07:00
Mike Klaas f3caac0bda Refactor inventory.cc (#491)
This adds major simplification and deduplication to inventory.cc, including the start of an "InventoryScroller" class that can manage inventory events without duplicate handling everywhere.  This is needed as we add more complexity to the page.
2026-06-29 21:38:38 -07:00
Mike Klaas fec5df8981 Fix missing argument to format string (#511)
* Add program->name to scriptError

This is @jirik2077 's fix for a segfault, and I agree with the fix.

Fixes #509
2026-06-29 20:41:50 -07:00
Mike Klaas 4715e0b349 Add in-game HELP menu (#498)
Also: fix alignment of skilldex, menu, charset buttons to look visibly depressed.
2026-06-28 22:23:07 -07:00
Mike Klaas 8ce4361365 Windows opcodes (#505)
* create_win / hide_window
* get_window_attributes
* get_window_under_mouse
* set_window_flag
* dialog_message
* display_stats
2026-06-28 15:18:06 -07:00
Mike Klaas 2447593e9c Fix crash due to corrupted whoHitMe (#493)
* Fix crash due to corrupted `whoHitMe`

It's possible for some object's `whoHitMe` to contain `-1`.  It's supposed to be resolved to `nullptr`, but doesn't reliably happen in all cases, esp outside of combat.  The main fix here is to normalize to nullptr when loading the object, instead of just map load, or combat paths.

At some point I thought the problem might have been attacker being a non-critter.  Added some guards against that regardless.  Also, found several bugs and messiness in `apply_damage` which are now fixed.

Fixes https://github.com/alexbatalov/fallout2-ce/issues/368
2026-06-24 20:36:55 -07:00
Mike Klaas 26d7b632fc HOOK_MOVECOST (#496) 2026-06-17 06:11:08 +00:00
c6818f0849 Fix ddraw.ini -> game.cfg migration on unix-y systems (#497)
* Fix ddraw.ini -> game.cfg migration on unix-y systems

We were using `compat_splitpath` on a windows path.  We want to work on windows paths, so that's good.  This fixes compat_splitpath so that it works with both folder separators.  Also tweak `compat_makepath` to recognize both, for consistency.

This means that filenames with `\` will be broken, but I think we can (and should) live with that)

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* chore: auto-format with clang-format

* fix

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-16 22:48:46 -07:00
Mike Klaas 84cac43da1 HOOK_ITEMDAMAGE (#494)
* HOOK_ITEMDAMAGE
2026-06-16 22:22:53 -07:00
Mike Klaas 261b54c603 Implement unwield_slot (#488)
* Implement `unwield_slot`

This one was surprisingly subtle.  Supports many game modes and handles things differently depending on game mode.
2026-06-08 22:25:46 -07:00
Vlad K 46b89abbd8 Merge pull request #490 from fallout2-ce/feature/mapper-edg
Mapper EDG support
2026-06-08 23:17:25 +02:00
phobos2077 1ee64988bc Guard against saving EDG when saving SAV maps in gameplay 2026-06-07 20:53:35 +02:00
Vlad KandCopilot Autofix powered by AI c78ba885d7 Guard against using dev_path out of mapper
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-07 20:44:34 +02:00
phobos2077 6835d10590 mapper: fix TMP map files not being deleted, fix edg not loading when changing maps in play mode 2026-06-07 02:05:57 +02:00
phobos2077 20ad8d8778 mapper: fix SAV files being created in the dev_path 2026-06-07 01:17:01 +02:00
Vlad K 8c98a15ef6 sfall: get_ini_config + config cache (#489)
* sfall: get_ini_config + config cache

* Code review fixes and comment standardization
2026-06-06 22:34:37 +00:00
github-actions[bot] 6782a21185 chore: auto-format with clang-format 2026-06-06 21:33:20 +00:00
phobos2077 d12dbca951 mapper: EDG angled edges (squareRect) editing 2026-06-06 23:27:51 +02:00
phobos2077 823858f275 mapper: fix selected object being deleted when opening map 2026-06-06 23:27:50 +02:00
phobos2077 b93591f5d7 EDG: fix incorrect image corruption when scroll limiting kicks in right at the edge border 2026-06-06 23:27:50 +02:00
phobos2077 a91e40e3cc mapper: EDG support (edges only) 2026-06-06 23:27:50 +02:00
phobos2077 7da7d75f30 mapper: move common utility functions to mp_utils.cc 2026-06-06 23:27:50 +02:00
phobos2077 72b4680ff5 mapper: implement dev_path, a path override where saved files will go 2026-06-06 23:27:50 +02:00
Mike Klaas 99a762b649 frm2png can convert to/from indexed pngs (#487)
* frm2png can convert to/from indexed pngs
2026-06-05 20:39:56 -07:00
Mike KlaasandCopilot Autofix powered by AI 1afe925cbf Better fix for directory detection (#486)
* Better fix for directory detection

A couple places we used compat_file_exists to distinguish between files and folders/dirs, but this breaks on POSIX.  This attempts to fix it more holistically

* Make compat_file_exists to be consistent

All platforms now return false for folders/dirs

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-05 20:24:59 -07:00
Mike Klaas 95c07dba9f Fix compile warnings (#482)
Most are of this type

```
warning: 'size' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]

sfall_arrays.cc:313:26: note: overridden virtual function is here
    313 |     virtual ProgramValue GetArrayKey(int index, Program* program) = 0;
        |
```
2026-06-04 08:27:48 -07:00
Mike Klaas 0fc042ef84 Fix save games being missing on Mac OS (#484) 2026-06-03 22:46:57 -07:00
Mike Klaas 29df63dd99 [HRP] Scale movies (#478)
SDL Surface for performance and nice scaling
2026-06-03 21:16:16 -07:00
Mike Klaas 6f2693edf7 Change use_walk_distance to match sfall setting (#481)
* Change `use_walk_distance` to match sfall setting

It's pointless to set this to 0,1 because you don't move if the target is adjacent or yourself, so sfall changes this to "number of spaces" between player and target.  We were reading the old ddraw.ini setting before, incorrectly.

Also add a small optimization to not compute path for adjacent targets

* add comment

* return true when distance is self/adjacent
2026-06-03 15:34:55 -07:00
Mike Klaas e51004a3d1 Ability to use indexed pngs as interface art (#454)
* Ability to load indexed pngs in game

* Switch 2-col inventory .frms to .png
2026-06-02 23:48:08 -07:00
Vlad K 9aa2ae4bbc ZIP DB archive support (#480)
* ZIP: inital support (directly in DBase)

* ZIP: log and bail on any unsupported feature

* dfile.cc compile error fix

* ZIP: minor refactoring

* ZIP: code review fixes and refactoring

* ZIP: simpler and more robust code

* Formatting

* ZIP: remove unnecessary dataOffset normalization
2026-06-02 18:30:20 +02:00
Vlad K 968534314d gameDbInit: change load order to keep master_patches at the top and to match sfall (#479) 2026-06-01 16:57:31 +02:00
Mike Klaas a38f3436f8 A few combat opcodes (#477)
* set_critter_burst_disable

* get/set/reset_critical_table

* `attack_is_aimed`
2026-05-31 16:28:00 -07:00
Mike Klaas 15c22ccdfc HRP/Sfall main menu scaling (#457)
Similar to HRP/Sfall, except:

    Does not support non-aspect-ratio-preserving scale mode
    Uses vanilla art if it fits without scaling (e.g. 640x480 or non-scaling res like 800x480). The scaled-down HR assets looks considerably worse.
2026-05-28 19:49:29 -07:00
Mike Klaas f263075abf Bundle Sfall's gl_highlighting.ssl (#461)
* Bundle Sfall's gl_highlight.ssl

Most mods/distributions assume this is exists since it is bundled with Sfall.  It's also a highly requested feature

I decided to merge this as a first-class game config instead of continuing to read mods/sfall-mods.ini.  I think most people to this to be a default capability that can be toggled in-engine.  Open to other thoughts on the matter.  Lost of people will already have sfall-mods.ini configured, which is a reason to keep it the way it was.

* PR feedback
2026-05-27 23:15:09 -07:00
Mike Klaas c95f91c2ff Fix returnval of critter_mod_skill (#476)
Fixes #474
2026-05-27 22:14:16 -07:00
Vlad K db86e53af2 Fix crash in opTokenize when prev is not null but not present in the source string (#473) 2026-05-27 18:40:54 +02:00
Vlad K 349af8fbb8 Fix aiPacketRead inducing crash when loading saves in certain order (#472)
* Fix aiPacketRead overwriting packet_num from savegames, leading to corrupted state on subsequent loads and crash

* Mark variable as unused and add comment
2026-05-27 10:21:45 +02:00
Mike Klaas 9423a2c289 Sfall: save/restore last savegame page/slot (#464)
* Sfall: save/restore last savegame page/slot

* ScopedConfig for RAII convenience
2026-05-26 23:38:02 -07:00
Mike Klaas dc4753cde9 Improve music/sound system to allow .ogg/.wav map music + 44.1 kHz output (#465)
* Change output sound buffer to 44.1 kHz

This allow CE to play 44.1 kHz input files without loss of precision.  In particular, it plays HQ music that ships with RPU.

There is a very similar fix in Sfall

* use generic sound loading path to allow .ogg/.wav music files

* rm a few dangling references

* PR feedback

* rm references to audio file

* rm audio_file.cc/h

* restore default audio io

* PR fixes
2026-05-26 23:12:42 -07:00
Mike Klaas cd3adf1621 Implement set_unique_id (#466)
* Implement `set_unique_id`

* save/load watermark, including compat with previous saves (would be `0`)
* metarule to set and reset unique_id
* inventory stacking rules
2026-05-26 22:38:40 -07:00
Mike Klaas d42c8456dd Custom iface tags + metarules (#463)
* custom iface tag

* add_iface_tag, set_iface_tag_text

Used by FO2Tweaks and other mods
2026-05-26 22:30:42 -07:00
Vlad K c574812f1d EDG: fix getIsoWindowSize returning (1, 1) in release builds (#471) 2026-05-26 18:46:08 +02:00
Mike Klaas 8afe4b3061 Use in-game gamma when generating screenshots (#469)
This fixes the slight darkening effect that currently exists
2026-05-26 09:23:14 -07:00
Vlad Kandgithub-actions[bot] c423d475c5 EDG support (#450)
* HRP's edg file support (WIP)

* Update docs and fix bug

* chore: auto-format with clang-format

* EDG: proper scroll blocking based on pre-calculated rects, exactly as in HRP

* chore: auto-format with clang-format

* EDG: fix scrolling past pixel-space bounds with sub-hex map edge mod

* EDG: review fixes

* EDG: proper edge clipping matching HRP logic

* chore: auto-format with clang-format

* EDG: code review fixes and refactoring

* chore: auto-format with clang-format

* EDG: fix clamping

* EDG: show arrow cursor and block events when over clipped area

* chore: auto-format with clang-format

* EDG: option to disable

* EDG: deobfuscate code

* chore: auto-format with clang-format

* EDG: get rid of rect2 and simplify algebra

* EDG: update docs, clarify that squareRect is not implemented

* EDG: square mask support

* chore: auto-format with clang-format

* Code review fixes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-26 07:25:40 +00:00
Mike Klaas 06d7f09728 Implement HOOK_USESKILL, HOOK_USESKILLON (#456)
* Implement HOOK_USESKILL, HOOK_USESKILLON

* make comment more accurate
2026-05-19 22:40:33 -07:00
Mike Klaas 81164465cf Load f2_res.dat after master.dat (#462)
This bring CE much closer to sfall's load order, and fixes RPU install.

 master_patches > critter_patches > mods_order.txt > PatchFileXX > patchXXX.dat > sfall.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat

Also fixed typo in `showMessageBox`, and added a debugPrint in that function, so errors are visible in the log (LLMs otherwise find it hard to figure out what happened)
2026-05-19 22:20:13 -07:00
IronKing24 0a7834f81b Merge pull request #459 from fallout2-ce/mingw
Add Mingw build system
2026-05-17 01:15:07 +03:00
IronKing24 f76e310f10 Fix mapper compilation 2026-05-16 19:45:00 +03:00
IronKing24 303e7573ca Merge branch 'main' into mingw 2026-05-16 18:30:39 +03:00
Mike Klaas 16ae69fa5a HOOK_ENCOUNTER (#453)
* HOOK_ENCOUNTER

Pretty much 1:1 with Sfall except adding extra validation that the mapId returns belongs to an area
2026-05-13 15:09:43 -07:00
Mike Klaas 6d2d9d6ef3 Add "trade/loot" context menu for party members. (#449)
* Add "trade/loot" context menu for party members.

This was an idea I saw listed on NMA. Veterans of classic Fallout know you can trade with your companions much more easily using the steal skill, But this would be difficult for most new players to discover. This replaces the dialogue option in the long press (which is redundant since it is the default action) with the hand, which is normally used to loot from containers and corpses.

This does introduce a slight inconsistency in the default action, not being present when you long press. how almost everyone will be single-clicking to talk to NPCs.

Also, "you plant..." and "you steal..." messages when trading with companions this way. Put this behind the same flag in case someone wants the original experience.

* Full context menu

* container -> target

* PR feedback

* rebase on main

* rename function
2026-05-12 23:03:43 -07:00
Mike Klaas 7ae0452e1a Add original symbol beside all function and symbol offsets (#332)
* Add original symbol beside all function offsets

e.g.

```
// 0x414E98 register_object_call
int animationRegisterCallback(

// 0x414E20 register_object_must_erase
int animationRegisterHideObjectForced(
```

This was programmatically generated so there could be errors.  Spot checking looks pretty good though
2026-05-11 19:49:15 -07:00
Vlad Kandgithub-actions[bot] f63c113d77 Mapper: Playmode & misc features (#448)
* Mapper: fixed playmode, added some mapper features

* mapper: save map corrections + some stubs

* mapper: fix playmode and cleanup discrepancy

* mapper: edit_mapper inacuracies and tidying up some code

* mapper: corrected Delete Spatial, minor fixes

* mapper: implement debug.show_tile_num, Mark Exit Grid, toolbar name drawing fix and refactoring

* chore: auto-format with clang-format

* mapper: fix inaccuracies after AI review, round 1

* mapper: fix inaccuracies after AI review, round 2

* chore: auto-format with clang-format

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-12 03:00:19 +02:00
EvgeniyandZoschukEN f8ad77061b Refactoring datafile: (#445)
* Refactoring datafile:

Description

1. Removed unused extern variables from the header file.
2. Replaced magic numbers with constants.
3. Added stdint types

* Emty commit for start clang formatter

* Used clang format

---------

Co-authored-by: ZoschukEN <ZoschukEN@RTK-CD.RU>
2026-05-11 10:10:23 -07:00
IronKing24 471ebbf417 Merge branch 'main' into mingw 2026-05-11 10:37:26 +03:00
Mike Klaas 924e12b94c [HRP] Enable HR dialog screen (#441)
* [HRP] Enable HR dialog screen

(It's not really "hi resolution", just adds a border so it looks less funny.)

Also, picked up @NovaRain's suggestion of centering dialog on the play area if it is large enough, which matches Sfall.
2026-05-10 22:35:35 -07:00
Mike Klaas 706785d60e Implement a few AP opcodes (#443)
* get/set_unspent_ap{_perk}_bonus

* get/set_inven_ap_cost
2026-05-10 21:48:22 -07:00
Mike Klaas 1175efd379 Implement HOOK_STEAL (#442)
* Implement HOOK_STEAL
2026-05-10 10:15:50 -07:00
Mike Klaas ab2a09610d Party members can barter (#436)
Very simple party barter support. Builds upon the loot screen so is very little code:

    Switch party members with left/right arrow keys
    When leaving barter with items on the table (canceling), all items go to the PC's inventory
    No special handling of money (yet)

The mod pins the player's money stack on top of the inventory list for all party members. That's nice, but also feels a little odd, but likely just because I'm used to the money stack being stuck at bottom. We can iterate on that.

Adding an interface will require art. I considered enabling mouse use triggered by clicking on the avatar which would be quite simple.
2026-05-07 06:02:37 +00:00
Mike Klaas cef24823f4 Speed up Fallout1 .dat reader (#439)
* Speed up Fallout1 .dat reader

It was reallocating a buffer on a loop, which caused large files to take minutes.  Fixing this reduced it to a reasonable time, but still ~120s for the entire Fallout1 master.dat.

Also, bump the F2 gzip buffer to 4kB. It was only 400 bytes
2026-05-06 13:36:11 -07:00
Mike Klaas 63d79e4bfd Fix high pitch voiced dialog (#440)
In 8b2ead8a2b, soundLoad started honoring AudioFileInfo.channels, but the ACM decoder path historically only propagated sample rate.  This changes playback in a way that caused the bug.

Verified by talking to good ol' Sulik
2026-05-05 22:55:53 -07:00
Vlad Kandgithub-actions[bot] e42d8021c1 WIP Mapper implementation (#438)
* Add mapper CMakeTarget, tool for mapping function names to originals, load/save toolbar & update_art implemented

* edit_mapper function + stubs

* Rename exe to mapper-ce

* load_lbm_to_buf

* Add comments for read/write functions in db.h

* load_dialog, save_dialog, save_as, info_dialog and some other functions

* Fix LBM loading

* Fix mouse input not working on initial empty map, changed error in partyMemberRecoverLoadInstance to print to log, matching vanilla

* mapper.cc: basic hi-res support, NULL->nullptr

* load_lbm_to_buf rewrite, print_toolbar_name background fix

* Stubs for enter/exit playmode, art slot indexes fix, map_scr_toggle_hexes

* Fix memory corruption on screen_width > 640, fix various UI offset bugs

* mapper.cc: UI code style, toggle button fixes, rotation keys, edit button placeholders, PAGEUP key fix

* Elevation display fix, object type switching

* Spatial script placement and display, basic object selection

* Fixed dragging objects, block object showing, add all missing cases in edit_mapper with stubs, move all keys codes to constants

* chore: auto-format with clang-format

* Fix non-win builds

* Add stub calls from edit_mapper, fix objects being incorrectly deleted when unselected, fix tile number display

* Fix compile on Linux

* Attempt to fix iOS signing error

* Placing of objects and tiles, F12 to erase map, bug fixes

* Fixed block object toggling logic and add missing switch cases to edit_mapper

* Object editing added, 'p' to scroll palette fixed

* Add new files to CMakeLists

* Attempt to fix some colors + alignment in critter edit window

* chore: auto-format with clang-format

* Linux build fix attempt

* Critter inventory editing

* Vanilla grid-based inventory item picker

* Review fixes

* More review fixes and const correctness

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-05 18:47:16 +00:00
8254c758fe HOOK_INVENWIELD, HOOK_CANUSEWEAPON, HOOK_ADJUSTFID (#437)
* Add support for new talking heads

Add [Heads] config section in ddraw.ini that maps critter PIDs to talking
head indices in art\heads\heads.lst. When a dialog script starts with
headId=-1, the engine now checks the critter proto's headFid first, then
falls back to the [Heads] mapping. This lets mods add talking heads
without patching dialog scripts.

Includes Cassidy mapping (PID 16777305 → head index 13) for use with
cassidy_head.dat mod.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Implement HOOK_INVENWIELD, HOOK_CANUSEWEAPON and fix HOOK_ADJUSTFID

Wire the sfall hooks that npc_armor.mod relies on so party-member sprites
actually change when armor is equipped:

- HOOK_INVENWIELD fires from inventoryEquipFunc/inventoryUnequipFunc with
  (critter, item, slot, isWield). Script may veto by returning 0. Slot
  values mirror interpreter_extra.cc: WORN=0, RIGHT_HAND=1, LEFT_HAND=2.
- HOOK_CANUSEWEAPON fires from _ai_search_inven_weap so the mod's
  weapon-anim restriction can veto AI weapon picks.
- HOOK_ADJUSTFID arg list corrected to match sfall (single currFid arg,
  critter resolved via dude_obj).
- ProgramValue::isEmpty no longer treats string values as empty — sfall
  scripts like npc_armor's `while (sect.PID)` loop depend on a non-empty
  string being truthy.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* enum class

* chore: auto-format with clang-format

* bad merge

* PR feedback

* restore isEmpty() to vanilla while fixing bug

* fixes

* minor fixes

* extra

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: tectiv3 <tectiv3@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-04 21:36:50 -07:00
Mike Klaas 8b2ead8a2b Sfall-like sound system (#429)
* Sfall-like sound system

(I would like a better name for this system, but the opcodes themselves are called `play|stop_sfall_sound` and I can't think of a better name)

This is a sound management system very similar to Sfall's.  With a few differences:
* No support for new sound formats yet.  Support for at least ogg+wav will come next
* Does support reading from .dat files, hence playing any sound effect in the base game
* Support mode=3 for speech volume.  This exists in Sfall but is ignored when called from the opcode.

Also, change GaplessMusic to use this system to play the "wind2" loading sound.  This restores the "vanilla" feel map transitions, so I think it's reasonable to make GaplessMusic=1 the default.  I can't imagine someone wanting to change it to 0 unless they are ultra purists
2026-05-04 07:21:37 -07:00
Mike Klaas 4f89bb7d77 Companions can be the "looter" in loot screen (#435) 2026-05-03 09:57:25 -07:00
Vlad K 0d8741e082 Debug logging improvements (#434)
* debug log buffering to catch early logs, always duplicate log to stdout, const char* for debug fns

* AI nitpicking fixes
2026-05-03 09:15:13 +00:00
IronKing24 bc7ab1ecb2 Merge branch 'main' into mingw 2026-05-03 11:04:19 +03:00
Vlad Kandgithub-actions[bot] 6ce6bea309 Sfall Saved Arrays (#431)
* Sfall saved arrays support

* Add "...all_arrays..." special case for a list of saved arrays

* Adjust error message on load fail

* Fix crash in GetArrayKey when index == size

* chore: auto-format with clang-format

* Update sfall compatibility md

* Add keyIndex for Assoc Arrays for O(1) key lookups

* Review feedback, more error logging

* Fix build, increase ARRAY_MAX_STRING to 1024 to match sfall, fix gl_test_arrays triggering dynamic string block merge failure, prevent potential string buffer corruption on very long strings

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-03 01:24:30 +02:00
IronKing24 a0a6091bd0 add package dependency fix 2026-05-02 20:56:29 +03:00
IronKing24 f2b2127709 fix processor name typo 2026-05-02 20:53:19 +03:00
IronKing24 ec6647968b Merge branch 'main' into mingw 2026-05-02 19:15:08 +03:00
IronKing24 f97ceff645 add x86 build and move presets to the public 2026-05-02 19:07:27 +03:00
IronKing24 4247d7ac3f - Set correct checks for msvc or win
- change SDL2 cmake for mingw to link correctly
2026-05-02 15:56:41 +03:00
Mike Klaas 6027c7cf2e Vertically center inventory above interface, isntead of related to screen (#428) 2026-05-01 12:53:02 -07:00
IronKing24 bd3358709f add toolchain file 2026-05-01 20:28:30 +03:00
Mike Klaas 7d1c8e7eea Bundle ce.dat into release packages, and update README (#425) 2026-05-01 09:59:46 -07:00
Vlad K a7de228978 frm2png fix unable to convert most FRM's (#426)
* frm2png: fix incorrect byte order detection logic and size check

* Remove unnecessary little endian support

* Add frame size check matching engine logic

* Zero frame size condition reverted

* Tiny fix
2026-05-01 16:49:51 +00:00
Vlad Kandgithub-actions[bot] 3aa6c12244 New concepts for easier UI coding (using game_dialog.cc as a test bed) (#424)
* game_dialog.cc: code debloat, simpler partial cleanup via RAII, fix dialog button during scroll anim

* game_dialog.cc: get rid of awkward button FRM locking using new buttonCreateWithFrm

* chore: auto-format with clang-format

* Code review fixes

* chore: auto-format with clang-format

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-01 12:09:50 +02:00
Mike Klaas afdd110d60 2 column inventory and loot (#413)
Also, fix jesse container bug
2026-04-30 20:35:40 -07:00
Mike Klaas 2f491fa6d5 HOOK_EXPLOSIVETIMER (#423) 2026-04-29 20:37:43 -07:00
tectiv3 4382ec3305 iOS/iPad: touch gestures, HUD tap-through, and quick-actions toolbar (#377)
* iOS: add touch gestures, HUD tap-through, quick-actions toolbar

Makes fallout2-ce playable on iPad without a keyboard, while leaving
non-iOS builds unchanged (all additions are TARGET_OS_IOS-guarded).

Touch gestures (src/mouse.cc):
- 3-finger swipe down → ESC
- 4-finger long-press → F6 (quicksave)
- 3-finger long-press → hold LShift (FO2tweaks highlighting). Uses
  SDL_PushEvent so sfall's SDL_GetKeyboardState-based key_pressed()
  sees the held key, not just the engine's own kb state.

HUD ergonomics (src/mouse.cc):
- Taps on interface-bar buttons inject the button's keyCode directly
  so the cursor stays put. Taps on belt chrome are consumed rather
  than teleporting the cursor to inert pixels.
- Two-finger taps on belt buttons → right-click handler.

Gameplay cursor (src/game_mouse.cc):
- On iPad, keep GAME_MOUSE_MODE_MOVE in relative (trackpad) mode so
  screen taps don't teleport the cursor during combat. UI screens
  that explicitly enable touchscreen mode are unaffected.

Quick-actions toolbar (src/platform/ios/quick_toolbar.{cc,h}):
- Optional iOS-only HUD strip above the belt with skill shortcuts
  and end-turn. Header provides no-op stubs for non-iOS builds so
  interface.cc can call it unconditionally.
- game.cc refactor: skilldex result handling factored into
  gameHandleSkilldexResult() so the toolbar and the keyboard
  shortcut share one path.

README: iPad controls section.

* iOS: add quick toolbar visibility preference

Adds a ui.quick_toolbar_visible config flag (default true)

* iOS: skip HUD tap-through when interface bar is hidden

When the interface bar window is hidden (e.g. on the world map),
windowGetRect still returns its rect, causing taps in that screen
area to be consumed as overHud even though there's nothing to interact
with. Check WINDOW_HIDDEN before treating the rect as active HUD.

Addresses Copilot review comment on PR #377.

* iOS: fix dialog options near bottom unclickable on iPad

Enable touchscreen mode for dialog UI so taps reach dialog option
buttons directly. The HUD tap interception in mouse.cc was consuming
taps that landed inside the interface bar rect, even when a dialog
window overlapped that region. Dialog options near the bottom of the
screen were silently swallowed by the belt chrome catch-all.

Skip HUD tap interception when touchscreen mode is active, since a UI
screen (dialog, inventory, skilldex, etc.) owns input in that state.
Add touch_get_touchscreen_mode() getter to support the check.

* iOS: add pipboy touch exception

* Apply fixes from review

* Change quick toolbar default visibility to false

* Add touch mode to character selector

update readme and simplify switch condition
2026-04-28 23:20:15 -07:00
Mike Klaas b012e62e32 ce-frm2png tool (#419) 2026-04-28 22:55:29 -07:00
Mike Klaas 0f69c50df0 Implement HOOK_AMMOCOST (#421) 2026-04-28 22:36:50 -07:00
Mike Klaasandgithub-actions[bot] 1e387beebd Implement HOOK_RESTTIMER (#417)
* Implement HOOK_RESTTIMER

Et tu + other mods use this

* PR comments + missing doc for ce-dat-tool

* chore: auto-format with clang-format

* document timer wrap

* cleanups

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-26 21:32:49 -07:00
c8a905ea14 Expanded 4-slot barter UI from sfall + support FrmImage locking cached art by file name (#414)
* Expanded barter window from sfall

* Refactor: FrmImage class to lock based on file name, refactor code from last commit

* Soft limit on named art cache size

* Support localized paths for art loaded by name

* Fix visual issue from original sfall implementation where barter window were scrolling down incorrectly + bufToBuf const correctness

* Fix build error and extra destructor call when adding NamedCacheEntry

* Review fixes

* Update src/art.cc

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Review issues fixed, window made transparent to remove black area below the overlap during scroll down

* chore: auto-format with clang-format

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-26 00:03:14 +02:00
Mike Klaas 6255f49d6a Avoid recursive sfall tap_key hooks (#415)
* Avoid recursive sfall tap_key hooks

* PR cleanup
2026-04-25 14:08:59 -07:00
Mike Klaas c3fa7107f9 Rename fallout2-dat to ce-dat-tool (#416)
This is a generic tool that works with FO1 and FO2 archives
2026-04-25 10:53:43 -07:00
Mike Klaas 2b078f48a9 Implement HOOK_AFTERHITROLL (#411)
* Implement HOOK_AFTERHITROLL
2026-04-25 00:38:04 +00:00
Vlad K 10ebd28a4d Fix f2_res migration never working (#410)
* Fix f2_res migration never working

* Remove config checker usage in game_config.cc
2026-04-24 13:05:50 +00:00
Mike Klaas cd123b1ad3 Augment fallout2-dat to create dat archives (#405)
* Augment `fallout2-dat` to create dat archives

Verified by round-tripping master.dat, critter.dat, f2_res.dat with the tool
2026-04-23 22:00:05 -07:00
Mike Klaas 49affe4e80 --dev-load-game commandline arg (#404)
* `--dev-load-game` commandline arg

This allows you to use --dev-load-game=SLOTXX` to immediately load a saved game after the game is launched.  This is mostly useful so that LLMs can launch the game and see the result of an .ssl test script without a human needing to be in the loop
2026-04-23 08:19:39 -07:00
Mike Klaas 07d1649b63 Attempt to fix windows CI (#409)
* Attempt to fix windows CI

* PR feedback
2026-04-23 07:55:52 -07:00
Vlad KandCopilot efd8a4a525 Fix last remaining warnings in MSVC (#406)
* Fix last remaining warnings in MSVC

* Update CMakeLists.txt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-22 21:04:21 +00:00
Vlad Kandgithub-actions[bot] 4c09ffe9e6 Extended AP bar from sfall (#400)
* Extended AP bar from sfall

* Rewrote using new Buffer2D and blitBuffer2D + code review fixes

* chore: auto-format with clang-format

* Add ConstBuffer2D + other fixes

* chore: auto-format with clang-format

* Linux build fix attempt

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-22 22:09:12 +02:00
Mike Klaas 1026c79ac5 Implement objects_in_radius (#399)
* Implement `objects_in_radius`

Used by Et tu and a few other mods
2026-04-21 22:20:59 -07:00
Vlad K 3849b4ea17 Add AI agent related files to git ignore (#395)
* Add AI agent related files to git ignore

* Add gemini.md
2026-04-21 09:46:59 +02:00
Mike Klaas 6cbe68aef9 Fix setup (play) instructions, and add basic compile instructions to CONTRIBUTING.md (#390)
* Fix setup (play) instructions, and add basic compile instructions to CONTRIBUTING.md
2026-04-21 06:09:42 +00:00
Mike Klaas 066595f683 Add Fallout 1 .dat file support to fallout2-dat (#393) 2026-04-20 20:21:19 -07:00
Vlad Kandgithub-actions[bot] fbae40e9a8 Move content-related ddraw.ini settings into new DB config, introduce ce.dat (#387)
* Add basic content config structure

* Moved non-file related settings from ddraw.ini to game.cfg

* Various fixes from self review

* Moved remaining worldmap settings to game.cfg

* Migrate character and text related settings

* Update docs

* chore: auto-format with clang-format

* Add hard-coded foce_base.dat to have reliable location to load CE-provided content from

* Move game.cfg to new base mod

* Automatic migration from ddraw.ini

* chore: auto-format with clang-format

* Removed option to disable cities limit fix

* Minor review comment fixes

* Migrate to /data instead of CE dat

* Migrate to local game#patch.cfg and skip fields with default values

- This was if some mod modifies/overwrites game.cfg later, only fields that user cares about will be loaded from user's override, and said mod is less likely to break

* Fix potential issue when "master_patches" is an absolute path and move recursive mkdir into a helper function

* Refactor code and fix some edge cases: data folder not exists when migrating, ddraw.ini doesn't exist

* Rename face_base.dat -> ce.dat

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-20 20:23:13 +00:00
Mike Klaas 4070d29fcb set/remove_script and HOOK_STDPROCEDURE{_END} (#392)
* `set/remove_script` and `HOOK_STDPROCEDURE{_END}`

These were implemented together as I thought HOOK_STDPROCEDURE would be useful for testing set_script.
2026-04-20 19:56:08 +00:00
Mike Klaas dcba8882bf Commandline .dat file viewer (#373) 2026-04-19 15:29:18 -07:00
Mike Klaas 62c2621fef Implement HOOK_ONDEATH (#384)
* Implement HOOK_ONDEATH

Test both combat death and script-triggered death

* move hp and DEAD flag above hook call
2026-04-19 14:24:51 -07:00
Vlad Kandgithub-actions[bot] 5188ebd4f4 Simplify settings registry with macros (#386)
* Simplify settings registry with macros

* chore: auto-format with clang-format

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-17 22:44:23 +02:00
Mike Klaas 1a77361231 Implement HOOK_MOUSECLICK (#383)
Tested in all major UI modes (worldmap, inven, dialog, pipboy, &c.)
2026-04-17 08:54:22 -07:00
Mike Klaas ed2db51afd Implement gdialog_get_barter_mod (#385)
* Implement `gdialog_get_barter_mod`

Used by Et tu
2026-04-17 08:37:34 -07:00
Vlad K 53ff2293a1 Feature/sfall config move prefs (#381)
* ddraw.ini: moved all settings considered "player preference" into fallout2.cfg

* Update docs and config files

* Simplify docs

* Review fixes
2026-04-17 09:26:39 +00:00
Mike Klaas c4e722612f Match obj_is_openable semantics with Sfall (#382)
* Match `obj_is_openable` semantic with Sfall

Sfall implements this in the opcode: https://github.com/sfall-team/sfall/blob/master/sfall/FalloutEngine/EngineUtils.cpp#L232

This is also called in `objectOpenClose` to early exit when not openable, so I think it make sense to include in the engine-level check

* typo
2026-04-16 21:09:10 -07:00
Mike Klaas 8f3ccca71b Implement several trivial opcodes (#380)
* Implement several trivial opcodes

* get/set_combat_free_move
* item_weight
* obj_is_openable
* get/set_critter_current_ap
2026-04-16 09:20:56 -07:00
Mike Klaas 386b6c26c7 Implement HOOK_CALCAPCOST (#376)
* Implement HOOK_CALCAPCOST

An opcode a day keeps the stimpak away.

https://sfall-team.github.io/sfall/hook-types/#calcapcost

Same as Sfall, but also calls the hook on game load to display the correct AP cost on load.

Also fix a minor bug where the attack mode of the current hand sometimes leaked when loading a save game.  Normally attack mode (burst/reload/&c) isn't saved.  But if you are in aimed mode (say), and load a game with the same weapon equipped, the attack mode will persist.  This is pretty weird, so changed it to always be in the default mode when loading a save.

* test script

* PR comments

* doc tweaks
2026-04-16 05:18:12 +00:00
Vlad KandCopilot 51b0c3c8c0 Feature/cfg keep comments and order (#375)
* Retain key&sections comments when overwriting fallout2.cfg

- Vibe coded with human review and testing

* Fix anim_speed key name

* Revert comment removal by Gemini

* Handle final remove/rename failures

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix edge case when filePath is near MAX_PATH

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove dead weight

* Vibe coded bug fixes and new write flag

* Comment for config flags

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-15 21:14:00 +00:00
Mike Klaas 00a05e5279 get_outline and get_light_level (#379)
These are trivial.  I have a testing script but I don't think it's worth checking in.

(Used by FO2Tweaks)
2026-04-15 12:52:29 -07:00
Mike Klaas a65a426e27 Implement HOOK_WITHINPERCEPTION (#374)
* Implement HOOK_WITHIN_PERCEPTION

Another Et tu hook
2026-04-14 16:55:13 +00:00
Mike Klaasandgithub-actions[bot] a697f0b868 Fix garbled splash screen when SkipOpeningMovies=1 (#372)
* Fix garbled splash screen when `SkipOpeningMovies=1`

If the splash screen is shown but movies are skipped, the main menu palette is applied to the splash screen for a split second, showing garbled colours.  This doesn't happen with movies since they clear the screen.

Fix is to force a black screen clear beforing fading in the main menu

* simplify

* chore: auto-format with clang-format

* Restore palette before load-list error dialog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-13 20:17:15 -07:00
Vlad Kandgithub-actions[bot] 9e8eaa13f5 Settings registry refactoring (#371)
* Refactor settings save/load to use registry pattern

- Some AI work, needs review

* Fix player_speedup having incorrect cfg key, move config file names to cc, clang format code

* Missing for previous commit

* Remove config key aliases used only for registry, remove unused prefence names, some code cleanup after AI

* Move path normalization to settings.cc, skip mapper config outside of mapper,

* Simplify code by using template constructors

* Move ui_anim_speed to ui section

* chore: auto-format with clang-format

* Build fix attempt

* Format

* Compile fix attempt 2

* chore: auto-format with clang-format

* Code review fixes

* Init debug mode ASAP, log setting clamping, remove unused sound settings

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-14 00:43:41 +02:00
Vlad KandCopilot 14839db4f9 Set DPI Awareness hint on windows (#370)
* Set DPI Awareness hint on windows

* Windows specific hint must be used only on WIN32

* Check for SDL_HINT_WINDOWS_DPI_AWARENESS

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-13 00:41:33 +02:00
Mike Klaas e1f5f83ebd Fix strange mouse behaviour in windowed mode when scale>=2 (#369)
* Fix windowed mouse coordinate handling
2026-04-12 10:52:51 -07:00
Vlad K 6e6f82414e Update readme to reflect f2_res.ini migration, add fallout2.cfg to files (#368)
* Update readme to reflect f2_res.ini migration, add fallout2.cfg to files

* Better defaults, valid example resolution, explain scaling
2026-04-11 22:37:22 +02:00
Mike Klaas 6f0f68d5aa Fix crash when using op_pickup with global scripts (#366)
1 isn't valid return value here. 0 is success, -1 is failure.  Verified against original assembly and dozens of other examples.
2026-04-10 07:53:46 -07:00
Mike Klaas 141c67575f Update PR template to remove formatting instructions (#365)
(Auto-format takes care of this)
2026-04-10 07:53:30 -07:00
Mike Klaas a7a7f0b63c Implement sfall signal_close_game (#364)
* Implement sfall `signal_close_game`

Used by Et tu, but might be useful for LLMs too to quit the game after running a test case.

Also added enum for `_user_wants_to_quit`, and did minor reformatting of SFALL_COMPATIBILITY.md
2026-04-10 05:07:43 +00:00
f1d436b144 Move all HRP settings to fallout2.cfg (#345)
* Moved f2_res.ini settings into regular game config

* Rename resolution fields

* chore: auto-format with clang-format

* Code review fixes

* chore: auto-format with clang-format

* One-time migration of f2_res.ini to fallout2.cfg (#350)

* One-time migration of f2_res.ini to fallout2.cfg

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mike Klaas <mike.klaas@gmail.com>
2026-04-10 00:40:33 +02:00
Mike Klaas 5939e41da6 Fix crash when global scripts are called reentrantly (#363)
Saw a crash while testing gl_ShowLootWeight.  The issue was that the script uses `repeat(1)`, and we tried to spawn it again while it was running.

The fix is to check if the program is already running, using the same logic as the game does when running scripts.

This doesn't happen with Sfall since its global script implementation is more integrated with the interpreter.  This does point to likely other subtle differences that might matter.
2026-04-09 08:14:03 -07:00
Mike Klaas 7079da6e90 Sfall-style Context for metarules (#354) 2026-04-08 21:15:15 -07:00
Mike Klaas 1680e885f2 Implement obj_is_carrying_obj Sfall opcode (#362)
Note: does not include the sfall fix to fix stack counts
2026-04-08 20:52:02 -07:00
Mike Klaas b31737d4f7 Update vendored Android SDL library (#358)
* Add Android SDL Java sync guard

* Harden Android SDL Java sync guard

* Sync Android SDL Java bindings

* update to sdk24 (2016) to support newer SDL
2026-04-08 11:57:52 -07:00
Mike Klaas 270f974926 Deobfuscation pass for interpreter.cc/h (#360)
* Deobfuscation pass for interpreter.cc/h

Almost entirely mechanical renaming, with very minor semantic changes:
* changed a couple globals to `static` which were only in this file
* changed a couple bool-like ints to bool
* started adding `const` to local vars
2026-04-07 23:08:20 -07:00
Mike Klaas 92cc37560a Fix list_as_array(LIST_CRITTERS) returning objects with pid=-1 (#359)
* Fix `list_as_array(LIST_CRITTERS)` returning objects with pid=-1

When using gl_highlighting, I saw:

```
2026-04-01 12:42:52.824 Fallout II Community Edition[34437:20111056] INFO: Current script: scripts\gl_highlighting.int, procedure ToggleHighlight
2026-04-01 12:42:52.950 Fallout II Community Edition[34437:20111056] INFO: Script Error: scripts\gl_highlighting.int: op_critter_state: obj is NULL
2026-04-01 12:42:52.950 Fallout II Community Edition[34437:20111056] INFO:
Error during execution: get_proto_data: bad proto -1
```

We missed checking that pidType < -1, so we indexed kObjectTypeToListType[-1] which is UB.  Either we were lucky and this OOB memory matched, or the compiler was getting cheeky.  This fixes the bug and stops the error.

* PR feedback
2026-04-06 22:24:49 -07:00
Mike Klaas 3abdbcb53b Fix Text Delay not saving in options (#357)
The original clamps to [1, 6], so this was just wrong.

Fixes #224
2026-04-05 08:59:30 -07:00
Mike Klaas b7cacdc6da Implement HOOK_COMBATTURN (#352) 2026-04-03 23:25:33 -07:00
Mike Klaas a98d9d6c26 Implement HOOK_INVENTORYMOVE (#351) 2026-04-03 22:08:25 -07:00
Mike Klaas 0a64cf4f6b Partially deobfuscate worldmap.cc (#349)
I did this as part of looking into `WorldMapSlots=21` support.  I don't fully understand that one yet, but this semantics preserving cleanup is worth committing
2026-04-04 04:23:14 +00:00
Mike Klaas b97c9864aa Fix global script loading on non-Windows (#347)
* Fix global script loading on non-Windows

Previously, global scripts in .dats and in local FS didn't work due to path separator confusion.

Now:
 * Hardcode global script path to "scripts\gl*.int" (windows separator)
 * Use Windows fpattern matching inside of dFile (.dats, which always use windows separators)
 * Use \-paths when listing found global scripts

The awkward part is having to vendor a copy of fpattern to force it to use "windows mode".  It's possible that we could use this everywhere since windows allows / as separator, but that could cause bugs where we're using fpattern on the native FS.  For now keeping the dFile implementation separate makes sense.
2026-04-01 20:20:57 -07:00
Vlad Kandgithub-actions[bot] 8d0009aa45 Nested array expressions (#346)
* Nested array expressions

* chore: auto-format with clang-format

* Code review fixes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-31 20:18:38 +00:00
Vlad K 511d53a615 fix set_proto_data leftover value on stack in case of invalid args + use programPrintError (#344) 2026-03-31 17:03:50 +02:00
Mike Klaas f17dd19116 Fix parameter order in metarules set_flags and set_outline. (#341)
* Fix parameter order in metarules set_flags and set_outline.

Also fix missing return val in message_box error path
2026-03-30 08:35:35 -07:00
Mike Klaas c28c62727f Implement sfall animation opcodes and metarule (#326) 2026-03-30 08:24:57 -07:00
Mike Klaas b14f518714 Comment out hires_stencil debug logs (#339)
These are a bit too much when debugging other features.  Could make this controlled by a bool too if people prefer
2026-03-30 07:53:57 -07:00
Vlad K 6a0bed4433 Death Anim script hook + fall anim fix + related refactoring (#336)
* actions: refactor code around death anim selection

* add Death Anim hook from sfall

* AI review fixes

* Rename constants for force field PID/FID
2026-03-30 00:23:53 +02:00
Mike Klaas ce27eb55a1 Sfall compatibility tracker (#334)
The idea is that modders / contributors could track what is implemented, what is planned/unplanned, &c.  There's a risk that we won't keep it up to date, but I think it's a document that we'll need eventually.
2026-03-29 13:32:45 -07:00
Mike Klaas c240657d0d Fix two metarule argument popping order errors (#335)
* Fix two metarule argument popping order errors

Also, backfill all errorReturn and argument type validation for metarules
2026-03-29 13:26:34 -07:00
Vlad Kandgithub-actions[bot] 0a73abe67d Barter hook refactoring and Keypress hook repeat fix (#333)
* Barter hook refactor: weight compute in separate fn, names and comments for related vars, consistent value args

* Hook scripts: use initializer_list for defining args

* Keypress Hook: don't trigger on repeat, to match sfall

* chore: auto-format with clang-format

* Attempt to fix formatting after clang-format

* Don't use references for return values, for better readability

* chore: auto-format with clang-format

* Code review fixes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-29 13:57:30 +02:00
Vlad K 54228248ef Add barter hook from sfall (#331)
* Add barter hook from sfall

* Code review fixes
2026-03-28 10:43:47 +01:00
Mike Klaas 4eba423399 Use GameMode::getCurrentGameMode() instead of custom game mode detection (#328)
* Use `GameMode::getCurrentGameMode()` instead of custom game mode detection
2026-03-28 00:41:33 -07:00
Mike Klaas de98136699 Implement sfall tile/path opcodes (#330)
* Implementation of tile and path opcodes
2026-03-27 22:58:29 -07:00
Mike Klaas b27b0f03fc Fix get_ini_setting (#329)
Previously it was returning `0` if the key is missing from the ini file, but the spec is to return -1: https://sfall-team.github.io/sfall/ini-settings/#get_ini_setting

Note that if the key _exists_, but is the value is empty (`key=`), sfall returns `0`.
2026-03-26 07:51:00 -07:00
Mike Klaas 9d6f86424e Implement sfall add_extra_message_file (#327)
https://sfall-team.github.io/sfall/sfall-funcx-macros/#add_extra_msg_file

For now we're choosing to not support the 2-arg form.  We could return `-1` if the script tries to do this, but if so and it doesn't check for an error, that's likely worse than just crashing at this point.  It's essentially an unimplemented opcode.
2026-03-25 21:19:35 -07:00
Mike Klaas bb65d8d32a sfall opcode refresh_pc_art (#324)
Needed for RPU
2026-03-24 05:30:08 +00:00
Mike Klaas c9139f762d Deobfuscate scripts.cc/h (#323)
* Deobfuscate `scripts.cc/h`

Mostly renaming, but also includes:
 * Some straightforward uninling
 * Function extraction of a pretty large chunk (elevators)
 * Simplification of the script loading loop

Tested manually
2026-03-22 04:25:46 +00:00
Mike Klaas beb3c537a4 Fix several compile warnings (#316)
* Fix several compile warnings

Main change is making display functions accept const char* instead of mutating their arguments.
2026-03-21 21:42:15 +00:00
NovaRain b71f1e7d18 Merge pull request #313 from NovaRain/wmenc_table_fix
Fix crash/glitched map when the encounter table has no available entries
2026-03-21 18:33:15 +08:00
Vlad K b7f2b32b92 Debug window size setting, start debug output earlier and log number of loaded mods (#321)
* Debug window size setting, start debug output earlier and log total number of mods loaded

* Code review fixes
2026-03-21 10:54:32 +01:00
Vlad K 75776e4b5b HOOK_COMBATDAMAGE (#322)
* HOOK_COMBATDAMAGE

* Fix compilation on 64bit systems

* Fix incorrect hit location var
2026-03-20 10:53:03 -07:00
Mike Klaas 5304823f8f Fix argument order in mapper: mapSetEnteringLocation (#315)
Mapper's call of this function uses the wrong order compared to all other uses

Fixes #294
2026-03-20 13:08:09 +01:00
Vlad K 5860ee2ffd Merge pull request #319 from fallout2-ce/feature/hook-ongamemodechange-rebase
Implement sfall HOOK_ONGAMEMODECHANGE
2026-03-20 11:23:44 +01:00
Mike Klaas 550e6f035a Implement sfall HOOK_ONGAMEMODECHANGE
Pretty straight forward one
2026-03-20 11:12:28 +01:00
Vlad Kandgithub-actions[bot] 26978dedc5 Hook scripts, related opcodes and some deobfuscation (#312)
* hooks: an empty cc and a list of hook types with useful comments

* Deobfuscate some script-related procedures and flags

* Script hooks WIP

* Interpreter: add programPrintError(), Program->procedureCount(), rename string-related functions

* ScriptHookCall refactoring and all basic hook script opcode implementation

* HOOK_KEYPRESS and first working hooks

* mf_obj_under_cursor + some test script

* HOOK_TOHIT

* chore: auto-format with clang-format

* Add hooks: useobj, useobjon

* chore: auto-format with clang-format

* opcode: get_sfall_args

* Code review fixes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-20 11:08:49 +01:00
Mike Klaas 47434c4038 Starting game_dialogc/h deobfuscation (#307) 2026-03-18 22:50:11 -07:00
NovaRain 23e9eab72d Fix crash/glitched map when the encounter table has no available entries (#311) 2026-03-19 09:13:43 +08:00
Vlad K ed23b0f502 Fix crash when trying to run missing combat_p_proc and start is not the first in the script (#310) 2026-03-17 07:38:04 +00:00
Vlad K f0404596d0 Add fallout2.cfg->preferences->ui_anim_speed setting (#305)
* Use ui_anim_speed for fading, dialog panel, combat panel, pipboy rest
2026-03-17 08:33:16 +01:00
Vasilii Rogin 72da5eb879 Merge pull request #308 from fallout2-ce/fix/tile-from-screen-xy-signature
Remove unused elevation from tileFromScreenXY call sites
2026-03-16 22:14:21 +02:00
Vasilii Rogin e0384a37b5 Fix tileFromScreenXY signature cleanup 2026-03-16 18:18:02 +02:00
Vasilii Rogin c8cf50540f Merge pull request #304 from fallout2-ce/remove_unused_elevation_from_tileToScreenXY
Remove unused elevation in tileToScreenXY
2026-03-16 18:09:29 +02:00
Mike KlaasandCopilot Autofix powered by AI ebcd124ba4 Add a few more proto extendedFlags names (#306)
* Add a few more proto extendedFlags

Added a few names based on the list in fallout-tools: https://github.com/rotators/fallout-tools/blob/4a54255f3403e90cff8a20e657df152cb2602a65/F2_ProtoManager/ProtoManager/SetFlagsForm.Designer.vb#L883

Follow up to https://github.com/fallout2-ce/fallout2-ce/pull/301

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-15 23:51:23 +00:00
Mike Klaas 07c55842b4 Enums for proto flags (#301) 2026-03-15 22:43:52 +00:00
Vasilii Rogin 7ad7c43ce6 Remove unused elevation in tileToScreenXY 2026-03-15 20:42:42 +02:00
Mike Klaas c352107b09 Dobfuscate region, game_sound, art (#300) 2026-03-14 22:05:30 -07:00
Mike Klaas b6bfcff9b3 Deobfuscate window_manager, inventory, string_parsers (#299)
Also fix bug in _adjust_fid
2026-03-14 04:45:16 +00:00
Mike Klaas 1df5841810 Update preferences window slider when +/- is pressed (#298)
* Update preferences window slider when +/- is pressed

* do not save brightness when in perferences window
2026-03-13 20:54:31 -07:00
Mike Klaas 98ff03c0b9 Deobfuscations of draw,endgame,interface,preferences (#297)
* Deobfuscations of draw,endgame,interface,preferences

This is _mostly_ mechanical renames.

There are a few other changes:
* Extracted two helper functions
* Added a couple constants that virtually eliminated "magic numbers" in a couple functions
* Switched one int -> bool
* Made sure interfaceGetCurrentHand() is compared against HAND_RIGHT/LEFT instead of treated as boolean

* comment dev by zero issues
2026-03-13 04:14:22 +00:00
Mike Klaas 404236c0cb Deobfuscate audio_file, character_selector, options, dictionary, map, elevator, movie.cc/h (#293)
* Debobfuscate audio_file, character_selector, options, and others

* dictionary, font_manager, nevs

* elevator, map, movie

* item, mp_proto, skill

* proto_instance

* proto, proto_types

* revert dictionary, step -> i

* PR feedback

* criticalChanceModifier -> skillBonus

* skillOrCritSuccessBonus
2026-03-09 05:14:20 +00:00
Mike Klaas 3cd817d4b5 Deobfuscate export,game_movie,random,select_file_list,widget and more (#292)
* Deobfuscate export,game_movie,random,select_file_list,widget

* add automap,cache,display_monitor,game_mouse,geometry,window_manager_pricate

* add static to forward-declared static functions for c++ tidiness
2026-03-01 09:23:04 -08:00
Mike Klaas e8d85dbdd8 Revert to original behaviour in window.cc window existence checks (#291)
revert to original behaviour in window.cc window existence checks

* flagging probably mistaken function
2026-02-28 16:39:56 -08:00
Mike Klaas 3633652884 Rename window* -> scriptWindow* (#288)
* Rename window* -> scriptWindow*

This disambiguates the function names from those in managed_window.cc (which also used window*)

Plus a few items of PR feedback from https://github.com/fallout2-ce/fallout2-ce/pull/286
2026-02-27 05:05:49 +00:00
Mike Klaas e86dce3266 more deobfuscation (#286)
Deobfuscation of several files that were close to complete. There are mechanical renames for the most part. A couple exceptions noted in the changeset
2026-02-22 21:55:37 -08:00
a738c38a81 Function renaming part 2 (#285)
* Rename functions with RE-based names for consistency with new scheme

* Rename sub_* that have equivalents in original source

sub_* names pulled from https://raw.githubusercontent.com/sfall-team/sfall/master/sfall/FalloutEngine/FunctionOffsets_def.h if possible

Per discussion in Discord, sticking with camelCase names

* build fix

* window*

* Rename several more window* functions, add explanatory comment

---------

Co-authored-by: phobos2077 <phobos2077@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vlad K <phobos2077@users.noreply.github.com>
2026-02-22 16:58:01 +00:00
Vlad Kandgithub-actions[bot] be4569315f Function naming consistency, part 1 (#284)
* Rename functions with RE-based names for consistency with new scheme

* chore: auto-format with clang-format

* Fix typo

* critterHealByHours - better comment

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-22 17:47:45 +01:00
Mike Klaas a2505f8412 Deobfuscate audio/critter/heap.cc (#282)
Mechanical renames only
2026-02-17 22:35:36 -08:00
Mike Klaas 018d3dd48b Deobfuscate datafile.cc/h (#281)
Also, removed unused functions from the .h file

This PR contains only mechanical renames
2026-02-17 22:35:05 -08:00
Vlad 41eafedf87 Fix release standard library used in debug config (#280)
* Fix release standard library used in debug config

* Github Actions: Update MSVC build tools version
2026-02-17 17:54:07 +01:00
Vasilii Rogin c914e62f44 Merge pull request #277 from ololoken/emscripten-mouse-touch
[emscripten] do not lock mouse; improve mobile browsers compatibility;
2026-02-17 10:23:20 +02:00
cambragol a478e24c8a Merge pull request #279 from fallout2-ce/context-menu-fix
Update game_mouse.cc to fix context menu
2026-01-31 09:19:39 +09:00
cambragol 2703af882c Update game_mouse.cc to fix context menu
Don't set mouse to new position, set it to the original click point.
2026-01-30 22:27:18 +09:00
Roman Turchin 36e8b90831 [emscripten] do not lock mouse; improve mobile browsers compatibility; 2026-01-27 13:24:20 +01:00
Vasilii Rogin 3249b7dc07 Merge pull request #276 from fallout2-ce/improvements_for_map_edge
Disable hi-res stencil if ignoreMapEdges is enabled
2026-01-25 10:37:23 +02:00
Vasilii Rogin f291f52a61 Merge pull request #275 from fallout2-ce/click_through_fix
Click through fix
2026-01-25 10:32:57 +02:00
Vasilii Rogin 4bc2ed5d0d Show message only once 2026-01-25 10:30:14 +02:00
Vasilii Rogin b6a522a065 Disable stencil on tile_hires_stencil_init 2026-01-25 10:28:40 +02:00
github-actions[bot] bbb01398ef chore: auto-format with clang-format 2026-01-20 18:11:36 +00:00
Vasilii Rogin fb5e1f9c07 Auto-disable stencil if gTileIgnoreMapEdges is enabled 2026-01-20 20:08:50 +02:00
Vasilii Rogin 625928265e Merge pull request #274 from JanSimek/ignore-map-edges
Ignore map edges
2026-01-20 20:03:56 +02:00
Jan Ĺ imek a6ccac2a58 Added IGNORE_MAP_EDGES configuration option to f2_res.ini 2026-01-19 19:23:50 +01:00
cambragol 19e72a5b6d Update inventory.cc
The block here prevents clicking triggering on window close.
2026-01-19 07:42:34 +09:00
cambragol 44f5477ee5 Update input.h
Define the global
2026-01-19 07:40:01 +09:00
cambragol 8d0587566f Update input.cc
Defined the global
2026-01-19 07:38:21 +09:00
cambragol 0ed3725124 Update game_mouse.cc
Adding block for mouse left mouse button up
2026-01-19 07:36:25 +09:00
Jan Ĺ imek 86787e2c97 correct SSL function names in comments 2026-01-18 21:46:20 +01:00
Vasilii Rogin f60b773ed4 Merge pull request #273 from fallout2-ce/add_cities_limit_fix_fallout2-ce
Add sfall CitiesLimitFix to fix Resurrection startup
2026-01-18 22:44:51 +02:00
Vasilii Rogin b6384ce8e9 Merge remote-tracking branch 'roginvs/add_cities_limit_fix' into add_cities_limit_fix_fallout2-ce 2026-01-18 20:11:20 +02:00
Vasilii Rogin 15aa1db286 Revert initialization order of gTownMapHotkeysFix 2026-01-18 20:09:17 +02:00
Vasilii Rogin 763169f33e Merge branch 'main' into add_cities_limit_fix 2026-01-18 19:57:07 +02:00
Vasilii Rogin 58b811f2ae Fix overlapping memory copy (#265) 2025-12-26 15:57:39 +02:00
Vasilii Rogin bfcfaa9540 Fix negative ammo for Mega Power Fist (#267)
* Add non-negative check for ammo

* Rename variables
2025-12-23 20:09:03 +02:00
Vasilii Rogin a478bad7fa Merge pull request #260 from fallout2-ce/allow_lower_mouse_sensivity
Allow lower mouse sensitivity
2025-09-11 18:21:15 +03:00
Vasilii Rogin 9a3ec752dd Fix typo 2025-09-09 20:45:03 +03:00
Vasilii Rogin f940766379 Allow 0.25-2.5 for mouse sensivity 2025-09-09 17:46:42 +03:00
Vasilii Rogin 87e1d1f11b Merge pull request #256 from fallout2-ce/ci_add_wait_for_deployment
Mark CI as done when preview is actually deployed
2025-09-08 08:04:44 +03:00
Vasilii Rogin 5d17e0ef89 Update deployment status AFTER website is actually deployed 2025-09-07 13:05:33 +03:00
Vasilii Rogin 2bf08228c5 Add step to ensure that deployment went well 2025-09-07 12:46:33 +03:00
Mike Klaas 571b43410d Fix crash during encounter (#254)
Initial report: https://github.com/BGforgeNet/Fallout2_Restoration_Project/issues/350, first fixed in sfall.

h/t @NovaRain for the fix!

Fixes #253
2025-08-26 08:36:43 -07:00
APAmk2 f0e6002df9 Merge pull request #252. SFall callbacks implementation. 2025-08-18 21:07:58 +04:00
APAMk2 d593c481f2 Clang-format fix & proper variable name 2025-08-18 21:01:26 +04:00
APAMk2 76f3d82679 Clang-format fixes 2025-08-17 23:26:49 +04:00
APAMk2 0e1270a606 Renamed sfall_behaviours to sfall_callbacks 2025-08-17 23:17:00 +04:00
APAMk2 55a32a00ab SFall callbacks implementation (EXPERIMENTAL) 2025-08-17 20:55:09 +04:00
Vasilii Rogin 7b9b545baa Merge pull request #251 from fallout2-ce/minor-more-deobfus
Yet more deobfuscation
2025-08-17 18:42:10 +03:00
Mike Klaas a96edd9f0c one more 2025-08-17 07:36:45 -07:00
Mike Klaas 55c528f346 fixes 2025-08-17 07:22:45 -07:00
Mike Klaas 5c28dc798f Yet more deobfuscation
Focusing on the files that are "almost" fully deobfuscated.  As usual, no semantic changes
2025-08-17 07:17:45 -07:00
APAmk2 7ef6943588 Merge pull request #249 from APAmk2/png-screenshots
PNG Screenshots implementation
2025-08-17 18:07:41 +04:00
Mike Klaas 40bbd6c02a Minor deobfuscation of function parameters (#250)
No semantic changes, just chipping away at removing placeholder function parameters
2025-08-17 06:56:21 -07:00
APAMk2 45c491c11f Added lodepng license file 2025-08-17 17:02:50 +04:00
APAMk2 18c05d438e Fixed clang-format error
Want to believe
2025-08-17 16:58:51 +04:00
APAMk2 c3a501a644 Changed PngScreenshots option to ScreenshotsFormat for new formats in future 2025-08-17 16:54:09 +04:00
APAMk2 2767a399c5 Moved lodepng to third_party folder 2025-08-17 16:39:31 +04:00
APAMk2 1237d8561d Use std::vector, instead of c-style array 2025-08-17 16:07:04 +04:00
APAMk2 89b6812711 Typo fix 2025-08-17 15:50:51 +04:00
APAMk2 339146c5b3 PNG Screenshots implementation 2025-08-17 15:30:06 +04:00
Vasilii Rogin 3949c5d7c1 Merge pull request #248 from fallout2-ce/use-precise-distance-for-walking
Use path length instead of tile distance for determining walk vs run
2025-08-17 10:16:49 +03:00
github-actions[bot] 84a64035e8 chore: auto-format with clang-format 2025-08-16 11:41:39 +00:00
Mike Klaas 164be5105a Use path length instead of tile distance for determining walk vs run
Fallout tries to be smart about walking vs running: if an object you're interacting with is "close" (<5 tiles), the PC will walk, otherwise, they'll run.

The problem with this is that the distance is calculated "as the crow flies" and doesn't take into account the path length.  So not rarely, your character will end up slowly walking a long distance to interact with an object.

This PR fixes that by using path length instead of tile distance.  This is slightly less performant, but extremely unlikely to ever be noticable.  Regardless, I used actual pathfinding only when the tile distance is short, so it is very unlikely to generate long paths (which, in any case, can happen just by trying to move to that tile).

To test, load the given save file.  Interacting with things on the other side of the wall usually triggers annoying walk behaviour.  E.g.:
* Looting the shelves on the other side of the wall
* Using Steal on the shelves / on an NPC
* Dropping an item on one side then picking it up from the other side.
2025-08-16 04:36:02 -07:00
Vasilii Rogin d532e4c398 Merge pull request #244 from fallout2-ce/fix_uncompressed_database_seek
Fix uncompressed database seek
2025-08-06 08:44:28 +03:00
Vasilii Rogin 950c12dbf7 Merge pull request #245 from fallout2-ce/fix_indexes_in_file_list_init
Fix off-by-one error in duplicates cleanup
2025-08-06 08:41:57 +03:00
Vasilii Rogin 2be9b7db65 Fix off-by-one error in duplicates cleanup 2025-08-05 22:43:27 +03:00
github-actions[bot] 138ce8be9b chore: auto-format with clang-format 2025-08-05 19:14:10 +00:00
Vasilii Rogin 96b9323a97 Add assertion about elements count 2025-08-05 22:09:27 +03:00
Vasilii Rogin 7c6d339e3d Do not initialize zlib on non-compressed files 2025-08-05 22:04:40 +03:00
Vasilii Rogin 2ec8240820 Merge pull request #239 from fallout2-ce/fix_gMapGlobalPointers_resize
Resize gMapGlobalPointers if inconsistency between .map and .gam file
2025-08-05 17:57:45 +03:00
Vasilii Rogin ca72573c14 Merge branch 'main' into fix_gMapGlobalPointers_resize 2025-08-05 09:47:15 +03:00
Vasilii Rogin 9974a23c1e Merge pull request #243 from fallout2-ce/fix-deployments-cleanup
Fix deployments cleanup
2025-08-05 08:39:47 +03:00
Vasilii Rogin cd6cce3f34 Update ci-delete-pr-preview.yml 2025-08-05 08:25:26 +03:00
Vasilii Rogin 361b9a0b30 Merge pull request #242 from fallout2-ce/try_to_use_github_deploy_field
Use deployment action instead of comment
2025-08-05 08:04:39 +03:00
Vasilii Rogin 7c7cb87f65 Merge pull request #238 from fallout2-ce/fix_memory_overlap_with_sound
Do not copy the same string, prevent sanitizer crash
2025-08-05 08:02:29 +03:00
Vasilii Rogin 20bcb2360c Fix env, add prune 2025-08-04 20:48:12 +03:00
Vasilii Rogin 75dbc98321 Add debug: true 2025-08-04 20:38:46 +03:00
Vasilii Rogin d792cfa32e add status 2025-08-04 20:38:16 +03:00
Vasilii Rogin e81a07dcaf Add ref, add deployment_id 2025-08-04 20:33:28 +03:00
Vasilii Rogin 0d78119680 Use deployment action instead of comment 2025-08-04 20:27:47 +03:00
github-actions[bot] 79d0fcfcaa chore: auto-format with clang-format 2025-08-04 16:57:36 +00:00
Vasilii Rogin 2d5e69d740 Resize gMapGlobalPointers if inconsistency between .map and .gam file 2025-08-04 19:51:31 +03:00
Vasilii Rogin b5cf3ee148 Do not copy the same string 2025-08-04 19:16:54 +03:00
Mike Klaas a571a985c6 Use FID_ROTATION macro to remove manual bit shifting (#236)
* Use `FID_ROTATION` macro to remove manual bit shifting

This is a mechanical change.

Note: this uncovered what I'm almost certain is a bug in the interpreter code.  I can fix it based on code inspection... this is how it's used everywhere else.  I'm not confident about reproducing it in game though, so open to thoughts on how to preceed here.

* Fix bugs
2025-07-30 21:27:01 -07:00
cambragol 6ccba74836 Merge pull request #230 from fallout2-ce/cambragol-patch-1
Full Transparency Fix
2025-07-23 11:22:25 +09:00
cambragol 30c3af01f5 Merge pull request #231 from fallout2-ce/cambragol-patch-2
Button Fix for Loadsave.cc
2025-07-23 11:22:01 +09:00
Vasilii Rogin fd25944a9e Merge pull request #235 from fallout2-ce/deobfus-iextra
Deobfuscate one function in interpreter_extra.cc
2025-07-22 21:01:48 +03:00
Vasilii Rogin 41c5d77f89 Merge branch 'main' into deobfus-iextra 2025-07-22 20:55:18 +03:00
cambragol 75513058a5 Merge branch 'main' into cambragol-patch-1 2025-07-23 02:07:04 +09:00
cambragol 0cf55eca75 Merge branch 'main' into cambragol-patch-2 2025-07-23 02:06:51 +09:00
Vasilii Rogin e6cbdd5466 Merge pull request #234 from fallout2-ce/test-cache-bust
Test ci cache busting
2025-07-22 18:48:47 +03:00
github-actions[bot] 90f634b285 chore: auto-format with clang-format 2025-07-22 05:23:02 +00:00
Mike Klaas 666ee6f41c Deobfuscate one function in interpreter_extra.cc
Introduces FID_WEAPON_CODE and FID_ROTATION.  In future PRs we can use these to eliminate a lot of inlined bit shifts
2025-07-21 22:21:06 -07:00
Mike Klaas 4342aefa5d Test ci cache busting 2025-07-21 21:55:00 -07:00
cambragol 7224c7d7fb Button Fix for Loadsave.cc
Fixes two missing button sounds for loadsave
2025-07-20 19:02:56 +09:00
cambragol dff7529707 Full Transparency Fix
Fix to restore full transparency. Without this, transparent windows leave a 'trail' within their frame.
2025-07-20 18:51:55 +09:00
Mike Klaas 2435b33480 Fix missing cursor on the right (mirrored) context menu (#227)
* Fix missing cursor on the right (mirrored) context menu

Fixes #226

* Additional deobfuscation + missing artUnlock)
2025-07-13 20:30:37 -07:00
Vasilii Rogin c4652d799a Merge pull request #220 from fallout2-ce/message-box
`message_box` metarule
2025-07-12 10:46:28 +03:00
Mike Klaas 5140b00ccf Implement show/hide_iface_tag,is_iface_tag_active for vanilla tags (#217)
* Implement `show/hide_iface_tag,is_iface_tag_active` for vanilla tags

This is all that is used by RPU (absent partycontrol mod)
2025-07-10 21:39:28 -07:00
Vasilii Rogin f1ba068d05 Merge pull request #198 from fallout2-ce/add_sfall_metarule_exists_metarule
Add opcode_exists metarule
2025-07-10 19:44:59 +03:00
Mike Klaas 01db7078c7 Decrypt some of tile.cc/h (#211)
Mostly functional changes, but did un-inline one function that Alex indicated likely should be uninlined.
2025-07-10 19:34:18 +03:00
Mike Klaas 64fd857da6 Update README.md for clearer OS X instructions (#223) 2025-06-29 20:47:48 -03:00
cambragol 555652d9c3 Merge pull request #216 from fallout2-ce/window-transparent
Window transparent
2025-06-25 16:11:02 +09:00
cambragol 8c35203b7d Merge branch 'main' into window-transparent 2025-06-24 17:33:06 +09:00
cambragol 0303a00299 Merge pull request #219 from fallout2-ce/trade-and-barter-glitch-fix
Trade/Barter background fix
2025-06-24 14:48:16 +09:00
cambragol dd16e374ee Update main.cc
fixed spelling typo
2025-06-24 14:40:27 +09:00
cambragol ce4495589b Update window_manager.cc
removed unneeded comments
2025-06-24 14:39:36 +09:00
github-actions[bot] af350914ef chore: auto-format with clang-format 2025-06-24 05:14:13 +00:00
Mike Klaas 8dd2afc4fa message_box metarule
This is used by Et Tu and RPU.

Also: some decyption of the underlying dialog box code
2025-06-23 22:11:51 -07:00
github-actions[bot] 240aa8a212 chore: auto-format with clang-format 2025-06-23 22:14:36 +00:00
cambragol c58b5eac1d Update window_manager.cc
Removed unneeded if/else switch.
2025-06-24 07:14:09 +09:00
cambragol 0bd8a76b05 Update inventory.cc
Fix background blits positions for moved inventory items
2025-06-23 22:13:23 +09:00
cambragol 853266b380 Merge branch 'main' into window-transparent 2025-06-23 20:55:44 +09:00
Mike Klaas 0adc9c9e77 Prevent pop-in by drawing city circles/names to temp buffer (#178)
* Draw city/name to a temp buffer to prevent pop-in
2025-06-22 22:48:08 -07:00
github-actions[bot] 150e734955 chore: auto-format with clang-format 2025-06-23 05:27:35 +00:00
cambragol d0ba0151d1 Update window_manager.cc
initialised _buffering as false, and put the switch to true in the if statement for the flag from the game init.
2025-06-23 14:27:07 +09:00
cambragol 67c70661a6 Update window_manager.cc
made _buffering conditional on the gameInitWithOptions flag for allocating _screen_buffer
2025-06-22 12:56:20 +09:00
cambragol 9c4efeb59d Merge branch 'main' into window-transparent 2025-06-22 11:18:20 +09:00
cambragol ea0afc84fa Merge pull request #215 from fallout2-ce/decrypt-win-refresh
Decryption of `_GNW_win_refresh`
2025-06-22 11:03:10 +09:00
Mike Klaas c663d79b97 fix bug(?) 2025-06-21 14:43:10 -07:00
cambragol 8bd87be687 Update window_manager.cc
removed unused bool
2025-06-21 13:51:54 +09:00
cambragol 8101c78e78 Update window_manager.cc
cleaning up from testing code
2025-06-21 13:46:20 +09:00
cambragol 9b5737a14e Update automap.cc
Added WINDOW_TRANSPARENT | WINDOW_DRAGGABLE_BY_BACKGROUND temporarily for testing. The automap window default texture has transparency built in.
2025-06-21 11:31:58 +09:00
cambragol 3d4c073856 Update window_manager.cc
Set _buffering to true, add refresh for transparent windows
2025-06-21 10:19:33 +09:00
cambragol f868ac0e1a Update main.cc
Change game ini options to turn on _screen_buffer allocation
2025-06-21 10:09:19 +09:00
Mike Klaas eaa9091bcd one omre 2025-06-19 23:48:01 -07:00
Mike Klaas 76ab99cf73 add a few more notes 2025-06-19 23:47:42 -07:00
github-actions[bot] bed9555f9a chore: auto-format with clang-format 2025-06-20 06:10:55 +00:00
Mike Klaas 9c5294ca88 Decryption of _GNW_win_refresh 2025-06-19 23:09:16 -07:00
cambragol 781d8ab282 Merge pull request #177 from fallout2-ce/dat-error-handling
Update xfile.cc
2025-06-20 08:44:44 +09:00
cambragol 34ef1c2f26 Merge pull request #213 from fallout2-ce/disappearing-inventory-item-fix
Update inventory.cc
2025-06-18 14:17:52 +09:00
cambragol fdc54cfd0b Update inventory.cc
Restoring fix to make items disappear when selecting in inventory #160
2025-06-18 07:53:59 +09:00
Mike Klaas a63aff09ce (sfall) Implement set_map_time_multi (#207)
* (sfall) Implement `set_map_time_multi`
2025-06-16 12:02:40 -07:00
cambragol 3d2aced2f7 Merge pull request #149 from fallout2-ce/worldmap-fallout1-trail-feature
Worldmap Fallout1 trail Feature
2025-06-12 14:26:27 +09:00
cambragol 1d6111b89f Merge pull request #202 from fallout2-ce/fix-for-splash-screens
Fix for Splash Screens
2025-06-12 14:24:04 +09:00
Mike Klaas 21c906cc5c Implement op_get_world_map_x/y_pos (#205) 2025-06-11 22:16:55 -07:00
Vasilii Rogin a67fe7ead1 Merge pull request #191 from fallout2-ce/scan_scripts_for_unknown_opcodes_2
Scanner of not implemented opcodes, metarules, config options
2025-06-11 16:18:21 +03:00
Vasilii Rogin f0691d2c24 Fix for hooks 2025-06-11 16:00:55 +03:00
github-actions[bot] fb30648e2e chore: auto-format with clang-format 2025-06-11 12:53:54 +00:00
Vasilii Rogin 216cbb3861 Add hooks scan 2025-06-11 15:52:41 +03:00
github-actions[bot] be63df4bf6 chore: auto-format with clang-format 2025-06-11 12:10:59 +00:00
Vasilii Rogin 4cf35fd946 Enable scanner of unimplemented by command line argument 2025-06-11 15:10:27 +03:00
Vasilii Rogin dd418ee0f5 Merge branch 'main' into scan_scripts_for_unknown_opcodes_2 2025-06-11 14:47:56 +03:00
Mike Klaas eb5cc7be4f QoL: Ctrl-click to equip in inventory screen (#175)
Very similar to sfall's implementation.
2025-06-10 22:27:22 -07:00
Vasilii Rogin 8c6f28b018 Merge pull request #193 from fallout2-ce/update_sdl2_into_2_32_8
Update SDL2 into 2.32.8
2025-06-10 11:17:26 +03:00
Vasilii Rogin 2e36030389 Merge branch 'main' into update_sdl2_into_2_32_8 2025-06-09 23:19:02 +03:00
Mike Klaas a88ca9f7e7 Fix build warnings introduced by sfall opcodes/metarules (#201) 2025-06-09 08:26:47 -07:00
Mike Klaas 72d9ae85c8 sfall: get_ini_section(s) (#199)
Implements get_ini_section, needed for Et Tu, and get_ini_sections. Fixes buggy set_ini_setting.

Also includes tests for existing ini functions, and moves them all to sfall_init.cc. (opcodes and metarules files were getting long, and this matches sfall's structure)
2025-06-09 08:26:30 -07:00
cambragol a8f2de1a56 Update xfile.cc
removed redundant chdir and added final cleanup for failure
2025-06-09 21:09:15 +09:00
github-actions[bot] 51b82ac1ac chore: auto-format with clang-format 2025-06-09 11:37:04 +00:00
cambragol 0d97222797 Update game.cc
Load options before show splash, so brightness is correct
2025-06-09 20:34:22 +09:00
cambragol b30463ab01 Update svga.cc
Missing fix for Splash Screens courtesy of Alex
2025-06-09 20:31:29 +09:00
github-actions[bot] 9d932b0d2c chore: auto-format with clang-format 2025-06-09 10:25:20 +00:00
Vasilii Rogin 8d76b9655c Use custom to_lower 2025-06-09 13:24:51 +03:00
Vasilii Rogin 0e6c4d9684 Use custom comparator 2025-06-09 13:01:03 +03:00
Vasilii Rogin 02c5efac26 Merge remote-tracking branch 'fallout2-ce/main' into scan_scripts_for_unknown_opcodes_2 2025-06-09 12:52:29 +03:00
cambragol b7933f6b80 Merge pull request #159 from fallout2-ce/inventory-character-display-fix
Fix Backgrounds on Spinning Characters
2025-06-09 17:03:46 +09:00
cambragol fcb1680db2 Merge pull request #144 from fallout2-ce/Localize-Fonts
Localize fonts
2025-06-09 17:03:23 +09:00
github-actions[bot] ea4d978bc1 chore: auto-format with clang-format 2025-06-08 06:48:28 +00:00
Vasilii Rogin 22548a3c70 Merge branch 'main' into scan_scripts_for_unknown_opcodes_2 2025-06-08 09:47:58 +03:00
Vasilii Rogin 7767aabdce Merge pull request #197 from fallout2-ce/change_stencil_option
Change high resolution stencil option
2025-06-08 09:46:34 +03:00
Vasilii Rogin 9cb2b83db1 Merge pull request #185 from fallout2-ce/improve_tests_report
Use global variables and arrays to show tests summary
2025-06-07 20:45:11 +03:00
Vasilii Rogin 75ca12e07c Improve tests reporting 2025-06-07 19:06:48 +03:00
Vasilii Rogin f85e8ba67b Use lowercase for test results 2025-06-07 18:54:56 +03:00
Vasilii Rogin 07876ddaf9 Use arrays for sharing data between tests 2025-06-07 18:51:56 +03:00
Vasilii Rogin 7288f8eeb7 Merge remote-tracking branch 'fallout2-ce/main' into improve_tests_report 2025-06-07 18:27:45 +03:00
github-actions[bot] cd6ca76988 chore: auto-format with clang-format 2025-06-07 15:27:27 +00:00
Vasilii Rogin 5d3cbd567a Add test for OP_WRITE_INT opcode 2025-06-07 18:24:56 +03:00
Vasilii Rogin 70ef1d4009 Add opcode_exists metarule 2025-06-07 18:21:50 +03:00
Vasilii Rogin 3acf0ac6c4 Add assert for opcode_exists 2025-06-07 18:12:43 +03:00
Vasilii Rogin a73c336ead Add tests for metarule_exist/opcode_exists 2025-06-07 18:08:47 +03:00
Vasilii Rogin d46aea53bd Add initial test 2025-06-07 17:59:18 +03:00
Vasilii Rogin 1a46d0f59f Make EnableHighResolutionStencil enabled by default in proper place 2025-06-07 17:40:11 +03:00
Vasilii Rogin 7c2dfa9af1 Change HiResMode into EnableHighResolutionStencil 2025-06-07 17:38:12 +03:00
Vasilii Rogin 3dc89d49e2 Merge branch 'main' into scan_scripts_for_unknown_opcodes_2 2025-06-07 12:43:50 +03:00
Vasilii Rogin 822d5dfd7d Do not use build-in directory_iterator for android 2025-06-07 12:37:14 +03:00
Vasilii Rogin 879634bf9c Remove import of dirent 2025-06-07 12:28:29 +03:00
Vasilii Rogin d681e7be69 Merge pull request #192 from fallout2-ce/toggle-active-hand
Add `toggle_active_hand` (sfall)
2025-06-07 12:23:06 +03:00
Vasilii Rogin 795ef54d70 fix formatting 2025-06-07 12:21:45 +03:00
Vasilii Rogin 14b06d2dcc Add scan for windows 2025-06-07 12:21:20 +03:00
Vasilii Rogin ed959edbbb Split scanned by files 2025-06-07 12:15:26 +03:00
Vasilii Rogin 7940ea791c Add polyfill for directory_iterator 2025-06-07 11:19:53 +03:00
Vasilii Rogin 3f270aa4cc Merge branch 'main' into scan_scripts_for_unknown_opcodes_2 2025-06-07 11:10:41 +03:00
Mike Klaas 8294e15d3c Default to 800px interface bar (#181)
(still can be overriden by config)

Will fall back to 640px version if screen is narrower than 800px or asset doesn't exist
2025-06-06 21:07:11 -07:00
Mike Klaas 4278d1a1d0 fix crash 2025-06-06 20:54:24 -07:00
Vasilii Rogin b8769fded1 Bump CI cache 2025-06-06 21:30:38 +03:00
Vasilii Rogin 43d5b6028d Update SDL2 into 2.32.8 2025-06-06 21:21:53 +03:00
Mike Klaas b2675ad1ac Add toggle_active_hand (sfall) 2025-06-06 00:34:36 -07:00
Vasilii Rogin da3f1cc426 Fixes 2025-06-04 21:25:47 +03:00
github-actions[bot] a892461dac chore: auto-format with clang-format 2025-06-04 17:56:15 +00:00
Vasilii Rogin 209d2d027b Add TODO 2025-06-04 20:52:25 +03:00
Vasilii Rogin b8385d7775 Do not exit 2025-06-04 20:45:16 +03:00
Vasilii Rogin a3c365f9fe Rename scanner 2025-06-04 20:44:53 +03:00
Vasilii Rogin 87d4a4b8ca Scan f2_res.ini 2025-06-04 20:41:37 +03:00
Vasilii Rogin 1aa53a4720 Add scan for fallout2.cfg 2025-06-04 20:31:32 +03:00
Vasilii Rogin 6bcf2952f6 Add config scan 2025-06-04 20:26:40 +03:00
Vasilii Rogin e2927e1d0e Some intermedite progress 2025-06-04 20:00:26 +03:00
Vasilii Rogin bb839cd6c1 some fixes & improvements 2025-06-04 19:34:56 +03:00
Vasilii Rogin caa0e1bf1a Add scan in .dat files 2025-06-04 19:08:27 +03:00
Vasilii Rogin f3759d07a5 Adding .dat files scan 2025-06-04 18:58:43 +03:00
Vasilii Rogin 604fde895f Split by funcs 2025-06-04 18:45:46 +03:00
Vasilii Rogin f46c391e5d Merge remote-tracking branch 'fallout2-ce/main' into scan_scripts_for_unknown_opcodes_2 2025-06-03 23:06:35 +03:00
Vasilii Rogin 5dafa019c9 Merge pull request #190 from fallout2-ce/all-opcodes
Reformat sfall opcode list to contain all opcodes
2025-06-03 20:10:25 +03:00
Mike Klaas 8888fc46d6 Reformat sfall opcode list to contain all opcodes
This pulls in every sfall opcode, including param types and returnval.  It is grouped in a more "natural" order (i.e. what the sfall doc lists) instead of numeric order, which helps see which opcodes from a logical group are missing
2025-06-03 08:56:16 -07:00
Mike Klaas 001bdbee5c Add all remaining sfall math functions (#187)
* Add all remaining sfall math functions

* Fix op_round
2025-06-03 08:06:29 -07:00
Vasilii Rogin 1e45b0184b Merge remote-tracking branch 'fallout2-ce/main' into scan_scripts_for_unknown_opcodes_2 2025-06-02 21:10:35 +03:00
Vasilii Rogin 40471e5a0b Merge pull request #186 from fallout2-ce/experiment_with_gh-pages_cleanup
Add single-commit option for preview deployments
2025-06-02 21:00:24 +03:00
Vasilii Rogin ad776876a1 Add check that it is gh-pages branch 2025-06-02 20:53:30 +03:00
Vasilii Rogin 224f1088f2 Also force-push to gh-pages on PR cleanup 2025-06-02 20:52:46 +03:00
Vasilii Rogin 05b692f403 Add single-commit option for preview deployments 2025-06-02 20:43:56 +03:00
Vasilii Rogin 190906bb5f Use global variables to show tests summary 2025-06-02 18:31:40 +03:00
Vasilii Rogin 447ea23862 Merge remote-tracking branch 'fallout2-ce/main' into scan_scripts_for_unknown_opcodes_2 2025-06-02 17:55:56 +03:00
Mike Klaasandgithub-actions[bot] 41dd2ccd81 Implement all remaining sfall string functions (#184)
Implement string_to_case, and add comments for missing metarules/opcodes
    string_find
    string_compare
    charcode

This should complete all string functions listed here that aren't deprecated.


* chore: auto-format with clang-format

* PR feedback

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-02 10:12:25 +03:00
Vasilii Rogin 72786c4d43 Merge remote-tracking branch 'fallout2-ce/main' into scan_scripts_for_unknown_opcodes_2 2025-06-01 20:04:07 +03:00
Vasilii Rogin 04e93cabd7 Merge pull request #183 from fallout2-ce/add_sprintf
Add sprintf, add test utils
2025-06-01 20:03:04 +03:00
Vasilii Rogin a31af0671d Use .h for test utils 2025-06-01 19:54:25 +03:00
Vasilii Rogin 72df28f53a Use const to reduce warnings 2025-06-01 17:07:13 +03:00
github-actions[bot] 7e3bd36f86 chore: auto-format with clang-format 2025-06-01 14:03:26 +00:00
Vasilii Rogin 94ce0fbe11 Merge remote-tracking branch 'fallout2-ce/main' into add_sprintf 2025-06-01 17:01:28 +03:00
Vasilii Rogin a368f27ad4 Add one more byte to be safe 2025-06-01 16:56:12 +03:00
Vasilii Rogin d8d411e847 Add test for big strings 2025-06-01 16:53:29 +03:00
Vasilii Rogin 5eef9af7a9 Add one more test 2025-06-01 16:46:20 +03:00
Vasilii Rogin 0419efad8f Add sprintf 2025-06-01 16:42:42 +03:00
Vasilii Rogin 21f432afbb Register opcode 2025-06-01 16:13:37 +03:00
Vasilii Rogin aed05c0daf Initial implemenation of sprintf 2025-06-01 16:10:12 +03:00
Vasilii Rogin 8a8b54d4b7 Increase metarules params to 8 2025-06-01 15:30:13 +03:00
Vasilii Rogin 8ee543ec16 Add tests for metarules with multiple params 2025-06-01 15:27:42 +03:00
Vasilii Rogin 161bb82f30 Slightly better output for tests 2025-06-01 14:08:18 +03:00
Vasilii Rogin 22bd1ffbba Small cleanup in tests 2025-06-01 13:57:29 +03:00
Vasilii Rogin f46f1c78d4 Add test for string_format 2025-06-01 13:15:58 +03:00
Vasilii Rogin 3d0e206825 Add tests for float 2025-06-01 13:01:14 +03:00
Vasilii Rogin 47a9891e0e Add test for %c 2025-06-01 12:58:51 +03:00
Vasilii Rogin f1e5cde84f Add tests for sprintf 2025-06-01 12:56:45 +03:00
Vasilii Rogin 015909fdef Use lowercase for scripts 2025-06-01 12:47:30 +03:00
Vasilii Rogin 1e91b401f1 Fix stats test 2025-06-01 12:31:23 +03:00
Vasilii Rogin 29a0be50f4 Update stats test 2025-06-01 12:28:23 +03:00
Vasilii Rogin 9e3ce4cd8d Fix stats test 2025-06-01 12:22:33 +03:00
Vasilii Rogin 592882b7b8 Adding tests 2025-06-01 12:18:12 +03:00
Vasilii Rogin 3d3e47c9db Scan for .int.expected too 2025-06-01 11:56:22 +03:00
Vasilii Rogin a9726cab56 Show by-file 2025-06-01 11:21:18 +03:00
Vasilii Rogin 400aa4d8a3 Update visual 2025-06-01 11:11:46 +03:00
Vasilii Rogin cbd7b45736 Merge pull request #182 from fallout2-ce/add_test_script_for_sfall_opcodes
Add test for derived stats
2025-06-01 10:47:45 +03:00
Vasilii Rogin 599d3ab392 Merge remote-tracking branch 'fallout2-ce/main' into scan_scripts_for_unknown_opcodes_2 2025-06-01 10:46:24 +03:00
Vasilii Rogin 84336d4655 Fix warning 2025-06-01 10:45:49 +03:00
Vasilii Rogin 220fb8e190 Add test for derived stats 2025-06-01 10:39:43 +03:00
Vasilii Rogin 5a29fc1815 Merge pull request #180 from fallout2-ce/make-sfall-opcodes-consistent
Rename sfall opcodes to use underscores for consistency.
2025-06-01 09:36:53 +03:00
Mike Klaas a083779fb2 Rename sfall opcodes to use underscores for consistency.
This also makes them significantly easier to find in the codebase
2025-05-31 14:11:32 -07:00
Vasilii Rogin 95d254cd45 Merge pull request #179 from fallout2-ce/add_test_script_for_sfall_opcodes
Add critter stats opcodes
2025-05-31 23:32:22 +03:00
Vasilii Rogin 0d8f4cc711 Merge branch 'main' into add_test_script_for_sfall_opcodes 2025-05-31 23:11:27 +03:00
Vasilii Rogin aabc971dd5 Merge pull request #176 from fallout2-ce/update_windows_runner
Update windows runner
2025-05-31 23:11:06 +03:00
Vasilii Rogin 696e926177 Add note 2025-05-31 22:57:37 +03:00
Vasilii Rogin 30babd7e1f Improvements 2025-05-31 22:47:51 +03:00
Vasilii Rogin 6ff0b411e4 Show opcode cmd name 2025-05-31 22:26:16 +03:00
Vasilii Rogin 9f623f3f3e Add sfall human-readable opcodes 2025-05-31 22:09:52 +03:00
Vasilii Rogin d8bee457f4 Improve scanner 2025-05-31 22:04:14 +03:00
Vasilii Rogin fcabd63561 Still scanning for strings 2025-05-31 22:00:18 +03:00
Vasilii Rogin 73c024c705 Make kMetarules available 2025-05-31 21:09:19 +03:00
Vasilii Rogin 27da084b65 Scanning opcodes 2025-05-31 21:00:59 +03:00
Vasilii Rogin dfa610f352 Adding script scanner 2025-05-31 20:57:27 +03:00
Vasilii Rogin a0a597725a Fix extensions scan 2025-05-31 20:47:23 +03:00
Vasilii Rogin 7ae194a8ee Adding .ssl scanner 2025-05-31 20:44:30 +03:00
Vasilii Rogin b069e3b941 Update testing script 2025-05-31 20:06:25 +03:00
Vasilii Rogin 823f72492f Implement critter stat opcodes 2025-05-31 20:06:16 +03:00
Vasilii Rogin e5f3734e08 Add opcodes 2025-05-31 19:57:52 +03:00
Vasilii Rogin e37522d388 Add test for critter stats set/get 2025-05-31 19:51:37 +03:00
Vasilii Rogin 07a361f63a Add float_msg 2025-05-31 19:32:01 +03:00
Vasilii Rogin 515bec4c82 Adding simple test for stats 2025-05-31 18:34:56 +03:00
Vasilii Rogin 42bfdc7343 Update testing docs to use global scripts 2025-05-31 16:57:51 +03:00
Vasilii Rogin 0fd5e59575 Remove choco cache because it does not work properly 2025-05-31 15:01:02 +03:00
Vasilii Rogin 0d0578f111 Revert "Add --force flag to re-install in case of used cache"
This reverts commit dacda99b98.
2025-05-31 14:59:33 +03:00
Vasilii Rogin dacda99b98 Add --force flag to re-install in case of used cache 2025-05-31 14:56:39 +03:00
Vasilii Rogin dfb0463b02 Add arch into choco cache 2025-05-31 14:34:53 +03:00
Vasilii Rogin 1903e04c6e Update release workflow too 2025-05-31 14:25:49 +03:00
Vasilii Rogin abec3681b0 Use win2025 with vs2019 2025-05-31 14:14:18 +03:00
cambragol 7f7e103465 Update xfile.cc
This removes the creation of a 'dat' folder when opening or path finding fails. This may have been a leftover from development, or part of the mapper, however, in practice it prevents users getting correct error messages when opening the app with missing dats or incorrect dat paths.

With this fix, missing dats or paths should give a popup message to the user, instead of the ubiquitous 'cannot find fonts error'
2025-05-31 10:58:28 +09:00
cambragol 5a9f8fb46c Merge pull request #164 from fallout2-ce/character-screen-button-fix
Character Screen Button Fix
2025-05-31 10:03:03 +09:00
cambragol 721e40f784 Merge branch 'main' into inventory-character-display-fix 2025-05-31 09:56:20 +09:00
cambragol 3659c834ae Merge pull request #166 from fallout2-ce/animations-behind-worldmap-fix
Animations behind worldmap fix
2025-05-31 09:54:19 +09:00
Mike Klaas 196553ec46 Don't crash if game resolution is <800 with custom interface bar (#174)
* Don't crash if game resolution is <800 with custom interface bar
2025-05-29 22:52:26 -07:00
Mike Klaas 57f1229a51 Add click when using a to Take all or move All (#169)
Most other button make a sound when you use the keyboard shortcut, and so ought these
2025-05-29 15:22:34 -07:00
Mike Klaasandgithub-actions[bot] 413c843ff5 Fix bug that stopped music when reloading on the same map (#168)
* Fix bug that stopped music when reloading on the same map

If you have GaplessMusic=1 and load a saved game on the same map you're currently on, we erroneously skip playing music.  This fixes that problem.

Also, still playing loading sound if no background music is playing (not sure there can actually happen).  I still want to get the loading sound back in eventually.

Finally, added a bit of decyption.  It's not complete yet but has some deciphering

* chore: auto-format with clang-format

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-29 00:21:29 -07:00
cambragol 995102d515 Update worldmap.h
removed unneeded global
2025-05-29 16:08:38 +09:00
cambragol dd867446ea Update worldmap.cc
removed unneeded global
2025-05-29 16:07:48 +09:00
cambragol 4f91e38cc0 Update animation.cc 2025-05-29 16:05:53 +09:00
cambragol 016c83bc48 Inventory Item not Disappearing Fix (#161)
Fixes #160 

Conditional was incorrect.
2025-05-28 21:58:23 -07:00
github-actions[bot] 59c64451ff chore: auto-format with clang-format 2025-05-28 22:40:35 +00:00
cambragol 965f360578 Update worldmap.cc
Enclosed trail logic in config option
2025-05-29 07:40:09 +09:00
cambragol 3f79d79f25 Update sfall_config.h
Config option for worldmap trails. Name is from an Sfall option (I believe): WorldMapTravelMarkers
2025-05-29 07:19:31 +09:00
github-actions[bot] cad023a73e chore: auto-format with clang-format 2025-05-28 22:18:21 +00:00
cambragol 7490c900b3 Update sfall_config.cc
adding config option for the worldmap trail
2025-05-29 07:17:55 +09:00
cambragol d8dc05597b Update worldmap.cc
Fixed placement of  inWorldMap = true; and inWorldMap = false; Was preventing animations outside of worldmp.
2025-05-27 19:49:44 +09:00
github-actions[bot] 7d9e1612c6 chore: auto-format with clang-format 2025-05-27 08:42:47 +00:00
cambragol 848bd97e42 Update animation.cc
Check for 'isWorldMapActive', so we know to turn off fidget animation behind the map.
2025-05-27 17:39:08 +09:00
cambragol 5c5512277d Update worldmap.cc
Adding global for inWorldMap - so we know if the world map is active or not.
2025-05-27 17:37:22 +09:00
cambragol 016f853c0a Update worldmap.h
Adding a bool for 'inWorldMap' to fix animations behind worldmap
2025-05-27 17:32:01 +09:00
cambragol 9edbf0dd72 Update character_editor.cc
Adjusted the correct button x coordinates. Previously had adjusted the x coordinates of the button labels.
2025-05-27 14:25:28 +09:00
cambragol 36af4b2ea8 Update character_editor.cc
Moved 3 bottom buttons 1 pixel to right. Affects both screens, and aligns them better to the baked in buttons.
2025-05-26 21:33:45 +09:00
github-actions[bot] 67a6119f34 chore: auto-format with clang-format 2025-05-26 07:36:34 +00:00
cambragol aa036c574e Update inventory.cc
Added some comments regarding which window is which
2025-05-26 16:36:06 +09:00
github-actions[bot] a17d7fb7d5 chore: auto-format with clang-format 2025-05-25 11:07:47 +00:00
cambragol 8ed777ba83 Merge branch 'main' into Localize-Fonts 2025-05-25 19:53:57 +09:00
Vasilii Rogin 145cf6bbcc Merge pull request #157 from fallout2-ce/deobfus-window-2
More deobfuscation in `window.cc,h`
2025-05-25 08:59:40 +03:00
Mike Klaas 5b39307f61 More deobfuscation in window.cc,h
As usualy, no logic changes
2025-05-24 22:45:21 -07:00
Vasilii Rogin 547cabc42d Merge pull request #153 from roginvs/auto-fix-formatting-on-main-branch
Auto fix formatting on main branch or PR branch
2025-05-24 17:34:47 +03:00
Vasilii Rogin d2a3d61dcb Trying auto-format 2025-05-24 14:16:53 +03:00
Vasilii Rogin 2d1966f0af Adding manual workflow 2025-05-24 13:56:48 +03:00
Vasilii Rogin a406c5f019 CI fixes 2025-05-24 13:43:31 +03:00
Vasilii Rogin 9ca540f05e Auto-format only PRs from the same repo 2025-05-24 13:32:12 +03:00
Vasilii Rogin 4678e19edd Add formatter for PR too 2025-05-24 13:31:06 +03:00
Vasilii Rogin 485d2253f4 Add auto-formatting workflow 2025-05-24 13:29:16 +03:00
Mike Klaas 72309fc9dc Deobfuscate some parameters in window.h,cc (#152)
Note: no logic changes

Removed a parameter which was never used
2025-05-23 23:45:05 -07:00
cambragol fda6fd0646 Update game_dialog.cc (#139)
* Update game_dialog.cc

* Update game_dialog.cc

* Update game_dialog.cc
2025-05-23 21:24:59 -07:00
Mike Klaas 2126e23161 QoL: Add Ctrl-click to move items in inventory, barter, looting/stealing (#133)
* Add Ctrl-click to move items in inventory, barter, looting/stealing

Barter: move from table (offer) to inventory, on both merchant and pc.
Looting/stealing: move from one side to the other.
Inventory: ctrl-click to unequip armor or item in hand.

Modeled after the SFALL feature.

* skip quantity selection when quick moving

* Add `a` to inventory quantity select screen as a quick way to select ALL

* format

* Add Readme changes, and `a` to `Take All`

* try to format

* fmt
2025-05-24 13:06:41 +09:00
Vasilii Rogin 0fa90a1a00 Merge pull request #140 from fallout2-ce/add_test_script_for_sfall_opcodes
Add test script for sFall opcodes
2025-05-23 22:43:21 +03:00
Vasilii Rogin 9bfc3e83cd Add fix_formatting script 2025-05-23 22:34:41 +03:00
Vasilii Rogin 2f974aefed Fix formatting 2025-05-23 22:29:47 +03:00
Vasilii Rogin b27093b7ac Merge remote-tracking branch 'fallout2-ce/main' into add_test_script_for_sfall_opcodes 2025-05-23 22:29:26 +03:00
Vasilii Rogin 6f240acf0a Fix typo 2025-05-23 21:35:20 +03:00
cambragol 7c182b66a6 Update worldmap.cc
tweaked the drop parameters - looks closer to Fallout 1, paths more clearly defined (speeds).
2025-05-23 23:15:44 +09:00
cambragol f6320d3a66 Update worldmap.cc
Removed 'scaled' variables (leftover from my personal builds)
scaledViewWidth, scaledViewHeight, scaledWidth, scaledViewY, and scaledViewX
2025-05-23 20:03:32 +09:00
cambragol 5dbcfd997c Fixes slightly misaligned buttons in the pipboy (#147) 2025-05-22 23:17:07 -07:00
cambragol ec2ecd17d9 Update inventory.cc
First pass on fix for #148 

Adds correct blitting backgrounds for behind the spinning character
2025-05-23 15:13:07 +09:00
cambragol de06827c01 Update worldmap.cc
First draft (after many different tries) of worldmap trail enhancement, like in Fallout 1. Meant to be optional in the end.
2025-05-23 14:45:09 +09:00
cambragol e3437a8d0e Merge branch 'main' into Localize-Fonts 2025-05-21 09:26:38 +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 f12babe525 Update text_font.cc 2025-05-20 14:45:07 +09:00
cambragol cb990ac154 Update font_manager.cc 2025-05-20 14:44:33 +09:00
cambragol a3fc8d21be Update text_font.cc 2025-05-20 14:36:33 +09:00
cambragol cc805db194 Update font_manager.cc 2025-05-20 14:35:37 +09:00
Vasilii Rogin a3d37e11c1 Update README 2025-05-18 22:49:32 +03:00
Vasilii Rogin 0e18e77901 Fix formatting 2025-05-18 18:43:07 +03:00
Vasilii Rogin 9d2db5b36a Remove note 2025-05-18 16:17:25 +03:00
Vasilii Rogin b88230426d Update README 2025-05-18 16:14:40 +03:00
Vasilii Rogin bbf52f6b2d Add testing information 2025-05-18 15:51:25 +03:00
Vasilii Rogin 89a9d1ae12 Add initial version of test scripts 2025-05-18 15:15:28 +03: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
Vasilii Rogin 1d4171727b Empty 2025-05-04 14:58:19 +03:00
Vasilii Rogin af046127e9 Add forgotten permission for auto-remove of previews 2025-05-04 14:48:41 +03:00
Vasilii Rogin 5a2c429956 Add hash info into auto comment 2025-05-04 14:47:25 +03:00
Vasilii Rogin ff5fa993f2 Add sudo for rsync 2025-05-04 14:39:38 +03:00
Vasilii Rogin 5a0507200b fix emsdk setup 2025-05-04 14:36:05 +03:00
Vasilii Rogin 54442f0cfe Install emsdk as step 2025-05-04 14:32:37 +03:00
Vasilii Rogin ae9912b7ea Add github hash 2025-05-04 14:09:03 +03:00
Vasilii Rogin f6da491246 Add gh cli 2025-05-04 14:02:06 +03:00
Vasilii Rogin 5fa6ec679d Do not make preview build if PR is from fork 2025-05-04 13:55:32 +03:00
Vasilii Rogin d029bf3cd0 Revert rsync step 2025-05-03 19:05:29 +03:00
Vasilii Rogin f81e1f7ba7 Use previous action for pushing to gh-pages 2025-05-03 19:04:14 +03:00
Vasilii Rogin f672ba4ddf Log GITHUB_OUTPUT for debugging 2025-05-03 18:57:15 +03:00
Vasilii Rogin 14cd1844d0 Add remove PR job 2025-05-03 18:53:04 +03:00
Vasilii Rogin 2b8f18ff0c Add github preview builds 2025-05-03 18:52:15 +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
Vasilii Rogin 07b52e0b76 Merge pull request #54 from cambragol/patch-14
Update loadsave.cc to fit longer location names in Infobox
2025-04-29 19:43:47 +03: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 c79696326d Update loadsave.cc
missed other x value
2025-04-29 09:15:00 +09:00
cambragol 132626912a Update loadsave.cc
should fix the artifacts
2025-04-29 02:26:09 +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
Vasilii Rogin f7c1ccfada Merge pull request #81 from roginvs/add_label_to_ignore_clang_format_check
Add label to ignore clang format check
2025-04-27 09:24:00 +03:00
Sherief Farouk 767ae9af25 Fixed crash when running out of ammo before clip is full. 2025-04-26 05:36:03 -07:00
Vasilii Rogin 0ba670f0f7 Add debug message when everything is ok 2025-04-25 21:39:26 +03:00
Vasilii Rogin 58fdf2ff9e Empty commit 2025-04-25 21:38:26 +03:00
Vasilii Rogin cb1d2d6ed3 Exit step if label is found 2025-04-25 21:36:57 +03:00
Vasilii Rogin 4ce09d8cdb Debugging 2025-04-25 21:33:34 +03:00
Vasilii Rogin 787fa1b1b1 Show labels for debug 2025-04-25 21:32:09 +03:00
Vasilii Rogin 3d4fcf23ba Check labels before checkout 2025-04-25 21:31:17 +03:00
Vasilii Rogin 74c2125606 Fix env 2025-04-25 21:29:00 +03:00
Vasilii Rogin b1df5a084c Add token 2025-04-25 21:25:31 +03:00
Vasilii Rogin 2a610cf479 Skip code formatting check if skip-formatting label is present 2025-04-25 21:20:37 +03:00
Vasilii Rogin 7d093030e7 Fix find filtering 2025-04-25 21:17:27 +03: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
Vasilii Rogin 6f321c7882 Merge pull request #62 from roginvs/show_clang_format_version_in_ci
Show clang-format version in CI run
2025-04-21 17:07:39 +03:00
Vasilii Rogin e05dacebca Merge pull request #64 from roginvs/fix_ci_release_names
Fix ci release names
2025-04-21 16:51:02 +03:00
Vasilii Rogin 917c1bc49e Move sleep into separate step 2025-04-21 16:30:07 +03:00
Vasilii Rogin ca9618bf0b Change apk file name 2025-04-21 16:28:34 +03:00
Vasilii Rogin 2112b04c5b Merge pull request #63 from roginvs/fix_ci_release_names
Fix for auto-release: Rename artifact folder
2025-04-21 16:19:28 +03:00
Vasilii Rogin 52e1954aea Rename artifact folder 2025-04-21 16:17:50 +03:00
Vasilii Rogin 2f144fb421 Merge pull request #60 from roginvs/fix_ci_release_names
Fix CI release file names
2025-04-21 16:02:10 +03:00
Vasilii Rogin fe472abc2f Show clang-format version in CI run 2025-04-21 16:00:45 +03: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
Vasilii Rogin 7960b3cb65 Add platform/architecture suffix to executables 2025-04-21 10:42:43 +03:00
Vasilii Rogin 7d0a495ce8 Add duplicate files check 2025-04-21 10:35:04 +03:00
Vasilii Rogin 4e8c3a4815 Merge pull request #53 from cambragol/patch-13
Update skill.cc repair robot message
2025-04-21 10:16:20 +03:00
Vasilii Rogin 55af34472a Merge pull request #50 from sherief/auto-open-doors
QoL: automatically walk through unlocked doors when outside of combat.
2025-04-21 10:16:02 +03:00
cambragol 503695cd4d Update loadsave.cc
Restored the emscripten and touchscreen stuff.
2025-04-21 07:14:42 +09:00
Sherief Farouk 9db0a4d29e Code formatting. 2025-04-20 04:18:58 -07:00
Sherief Farouk 325577db56 If a door has a custom script attached consider it impassable to require player to interact. 2025-04-20 04:18:34 -07:00
Sherief Farouk cf17f42cf8 Replaced magic number with constant. 2025-04-20 04:18:11 -07:00
cambragol cc6d803517 Update loadsave.cc
Small fix to Load/Save descriptions in the info box.

Allows for longer names, and wraps them to second line if they are too long.
2025-04-20 19:19:08 +09:00
cambragol de5ee7d7f8 Update skill.cc repair robot message
Fixes the incorrect message when attempting to repair robots.
2025-04-20 18:55:07 +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
Sherief Farouk eeed6e87a5 QoL: automatically walk through unlocked doors when outside of combat.
Defaults to off, controllable via SFall config flag.
2025-04-19 06:20:19 -07:00
Vasilii Rogin 0aa0f064e5 Merge pull request #47 from sherief/sherief/node-pathing
QoL: increased node expansion while pathing
2025-04-17 19:49:20 +03:00
Sherief Farouk dd49ddb7c7 Fixed clang-format complaint. 2025-04-16 22:57:19 -07:00
Sherief Farouk 2922162412 QoL: increased path node capacity. 2025-04-16 21:12:23 -07:00
Sherief Farouk 35c59913f0 Path node capacity is a constant instead of magic number. 2025-04-16 21:12:07 -07:00
Vasilii Rogin 5b93794660 Merge pull request #46 from sherief/sherief/sfall-walk-distance
QoL: implemented SFall "UseWalkDistance".
2025-04-16 19:14:43 +03:00
Vasilii Rogin 8f3ab4df6f Merge pull request #11 from JanSimek/sfall-modorder-txt
Sfall: add support for loading mods / mod_order.txt
2025-04-16 19:09:22 +03:00
Sherief Farouk 498bdfcd13 Fixed missing value check. 2025-04-16 03:15:42 -07:00
Sherief Farouk 4f1c239118 QoL: implemented SFall "UseWalkDistance". 2025-04-16 01:11:15 -07:00
Vasilii Rogin b7374ffb24 Merge pull request #44 from roginvs/add_winxp_support
Add Windows XP x86 support
2025-03-22 20:48:24 +02:00
Vasilii Rogin 14e119f014 Remove clang-format off because of following #ifdef 2025-03-22 20:22:12 +02:00
Vasilii Rogin a5de358845 Fix missing lib for 64bit windows 2025-03-22 20:11:26 +02:00
Vasilii Rogin 7957246c73 Fix artifacts 2025-03-22 20:04:55 +02:00
Vasilii Rogin 07da6c53be Use RelWithDebInfo for Windows release 2025-03-22 20:00:35 +02:00
Vasilii Rogin 4020d6a500 Use release config 2025-03-22 19:55:35 +02:00
Vasilii Rogin 6c30ce64bf Use RelWithDebInfo for Windows builds 2025-03-22 19:53:29 +02:00
Vasilii Rogin 53337cbb76 Now trying to fix win64 builds 2025-03-22 19:27:18 +02:00
Vasilii Rogin bc47279a93 Do changes in correct branch instead of wondering why it does not work 2025-03-22 19:23:52 +02:00
Vasilii Rogin 512e403771 Following ChatGPT advices 2025-03-22 19:19:26 +02:00
Vasilii Rogin 2ffdad43fa Add some defines from ChatGPT advice 2025-03-22 19:13:47 +02:00
Vasilii Rogin 0e9fee8cec Add windows.h before timeapi.h 2025-03-22 19:07:13 +02:00
Vasilii Rogin 35e9f71810 Use timeapi.h for win64 2025-03-22 19:04:18 +02:00
Vasilii Rogin 607b95f2c4 Use mmsystem for win32 2025-03-22 18:59:59 +02:00
Vasilii Rogin 3c59f111cd Do clang-format 2025-03-22 18:58:51 +02:00
Vasilii Rogin c981fdc700 Replace windows.h with mmsystem.h 2025-03-22 18:57:24 +02:00
Vasilii Rogin 38b1a01c26 Add algorithm for win xp support 2025-03-22 18:54:08 +02:00
Vasilii Rogin bf3e817a3e Add XP support 2025-03-22 18:46:51 +02:00
Vasilii Rogin 43bb53b2e2 Merge pull request #43 from roginvs/use_coefficients_for_scrolling
Keep original scrolling coefficient for main game scrolling
2025-03-07 15:04:44 +02:00
Vasilii Rogin d55944a8c4 Merge pull request #37 from ololoken/main
Remove some warnings; bump emsdk version;
2025-03-06 17:27:54 +02:00
Roman Turchin 3b23a1cfe0 use __assume(0) for unreachable code in MSVC 2025-03-05 16:02:35 -05:00
Vasilii Rogin d364579925 Keep original scrolling coefficient for main game scrolling 2025-03-05 21:39:03 +02:00
Roman Turchin 25106684ba [emscripten] bump emsdk version; fix review comment 2025-03-05 13:38:07 -05:00
Roman Turchin b25ee43682 Merge remote-tracking branch 'org/main' 2025-03-05 13:23:32 -05:00
Vasilii Rogin 9b6fbeecb9 Merge pull request #42 from roginvs/fallout2-ce-main-fix-ci-release
CI Release: Move files from subfolders
2025-03-05 19:53:22 +02:00
Vasilii Rogin bc25c97e93 Move files from subfolders 2025-03-05 19:52:17 +02:00
Vasilii Rogin f3f92187ae Merge pull request #41 from roginvs/fallout2-ce-main-pick-changes-from-alex-3
Pick the rest from alex
2025-03-05 19:28:20 +02:00
Vasilii Rogin 168f250028 Trying to fix CI release 2025-03-05 19:25:42 +02:00
Vasilii Rogin db6967feb5 Add linux-armhf and linux-arm64 into release dependency 2025-03-05 19:18:21 +02:00
Vasilii Rogin 806ac12a72 Merge commit 'e97087b9582f37075db347a89898887320753f8b' into fallout2-ce-main-pick-changes-from-alex-3 2025-03-05 19:14:31 +02:00
Vasilii Rogin 3c63aa30ee Merge commit '135c62758f018bfe202a0877d18ceeac704e9e04' into fallout2-ce-main-pick-changes-from-alex-3 2025-03-05 19:14:20 +02:00
Vasilii Rogin b4ad5ea8a7 Merge commit '2de74728ce1c9255802cf25d6c264286a23f43a5' into fallout2-ce-main-pick-changes-from-alex-3 2025-03-05 19:14:10 +02:00
Vasilii Rogin 71d56fcf98 Merge pull request #40 from roginvs/fallout2-ce-main-pick-changes-from-alex
Pick commits one-by-one for easier conflict resolving
2025-03-05 19:13:55 +02:00
Vasilii Rogin b3f8abbcbb Merge commit 'd631bfcdd0a1ad50d7c1e214ad03464f58c93260' into fallout2-ce-main-pick-changes-from-alex-3 2025-03-05 19:13:44 +02:00
Vasilii Rogin 16d786bd25 Merge commit '82793d14f4429928175047292e59fd91e9325c82' into fallout2-ce-main-pick-changes-from-alex-3 2025-03-05 19:13:02 +02:00
Vasilii Rogin 91ae593aac Merge commit 'a5d252f19bcacd7487ed82f6275b345f23605842' into fallout2-ce-main-pick-changes-from-alex-3 2025-03-05 19:12:49 +02:00
Vasilii Rogin 03e26a4551 Merge commit 'e5d4d310c053a7f28d219165c00c830c8f326495' into fallout2-ce-main-pick-changes-from-alex-3 2025-03-05 19:12:37 +02:00
Vasilii Rogin acb470f34a Merge commit 'fa1621ff562717377a0b1e7aaee627564724592d' into fallout2-ce-main-pick-changes-from-alex-3 2025-03-05 19:12:22 +02:00
Vasilii Rogin 3c01ff7477 Merge commit 'a1fc68f13a1cc4cdb4ad0146f967621bf2ef3f92' into fallout2-ce-main-pick-changes-from-alex-3 2025-03-05 19:11:51 +02:00
Vasilii Rogin 68d9405a0a Merge commit '58c82f9268018c0a41f2a2c2b1a8bc216534a4af' into fallout2-ce-main-pick-changes-from-alex-2 2025-03-05 19:10:55 +02:00
Vasilii Rogin dd9c521363 Merge commit '8fcdbe0beee659aaa96f04f725ca56e7c55ceeab' into fallout2-ce-main-pick-changes-from-alex-2 2025-03-05 19:10:41 +02:00
Vasilii Rogin 51e8056430 Merge commit 'afff399fcafdfe6042fbe16fe489b1eda2544edb' into fallout2-ce-main-pick-changes-from-alex-2 2025-03-05 19:10:15 +02:00
Vasilii Rogin b336e06401 Merge commit '080f99962681dae5388e11421615d8f371bf9800' into fallout2-ce-main-pick-changes-from-alex-2 2025-03-05 19:09:31 +02:00
Vasilii Rogin fc788a3795 Merge commit '593f80144cb6f92d7198a1c096c67f27cac220d5' into fallout2-ce-main-pick-changes-from-alex 2025-03-05 19:03:29 +02:00
Vasilii Rogin a9878cbe98 Merge commit '4df9ee557d85370219d148bde9ab3e8c368ec6cd' into fallout2-ce-main-pick-changes-from-alex 2025-03-05 18:57:07 +02:00
Vasilii Rogin 5891072346 Merge commit 'f6ba9d38fd156abfef16fb00772bff7feb02fae8' into fallout2-ce-main-pick-changes-from-alex 2025-03-05 18:54:56 +02:00
Alexander Batalov e97087b958 Remove pause window 2025-02-16 11:35:06 +03:00
Alexander Batalov b31cea9331 Remove keyboard settings functions 2025-02-16 11:27:03 +03:00
Alexander Batalov f5ade9fb19 Remove idle func 2025-02-16 10:56:28 +03:00
Alexander Batalov f59637d0cc Remove focus func 2025-02-16 10:52:17 +03:00
Alexander Batalov 236774c7b2 Fix extra delay in loadsave screen 2025-02-16 10:01:08 +03:00
Alexander Batalov f7d4fc4ffe Remove vcr 2025-02-16 09:51:46 +03:00
Alexander Batalov 135c62758f Update installation instructions
Closes #360
2025-02-15 14:50:42 +03:00
Alexander Batalov 2de74728ce Review main (#458) 2025-02-15 12:31:06 +03:00
Alexander Batalov d631bfcdd0 Add linux armhf build (#456) 2025-02-12 22:45:08 +03:00
sonilyanandAlexander Batalov 4382d67c19 Add SFALL_CONFIG_PIPBOY_AVAILABLE_AT_GAMESTART (#314)
Co-authored-by: Alexander Batalov <alex.batalov@gmail.com>
2025-02-12 21:46:10 +03:00
Alexander Batalov e38e7060d4 Review some mve video playback routines 2025-02-12 20:27:06 +03:00
Alexander Batalov d6fc3bb2d8 Remove unused movie callbacks 2025-02-12 08:29:34 +03:00
Alexander Batalov 82793d14f4 Update linux runner (#455) 2025-02-12 08:04:34 +03:00
Alexander Batalov a5d252f19b Remove 16 bpp mve leftovers 2025-02-12 07:07:57 +03:00
Alexander Batalov e5d4d310c0 Fix dialog option bounding box (#454) 2025-02-12 02:50:27 +03:00
Alexander Batalov fa1621ff56 Remove dictionary mem indirection 2025-02-11 20:26:43 +03:00
Alexander Batalov 52e5611e1b Remove color palette stacks 2025-02-11 20:05:52 +03:00
Alexander Batalov d540a9ff04 Remove color mem indirection 2025-02-11 20:03:46 +03:00
Alexander Batalov 1b6fe7e15b Remove color IO indirection 2025-02-11 19:53:41 +03:00
Alexander Batalov 900140f8f7 Make dialog window modal
Fixes #408
2025-02-11 18:40:10 +03:00
Alexander Batalov 14430c4f0a Review mve sync functions 2025-02-11 18:15:39 +03:00
Alexander Batalov a1fc68f13a Review mve palette functions 2025-02-10 22:44:40 +03:00
Alexander Batalov 2e15d01be3 Clarify MveSetShowFrame 2025-02-10 22:28:28 +03:00
Alexander Batalov 96335aebc9 Remove MVE_rmHoldMovie 2025-02-10 22:15:42 +03:00
Alexander Batalov 6ab3c508e6 Clarify MveHeader 2025-02-10 22:14:29 +03:00
Alexander Batalov f790a10e88 Clarify MveMem 2025-02-10 21:40:31 +03:00
Alexander Batalov 6b879e71b8 Remove mve frame save/load 2025-02-10 21:29:06 +03:00
Alexander Batalov 9878e205e6 Remove MVE_rmCallbacks 2025-02-10 21:23:52 +03:00
Alexander Batalov 0a5afd1e18 Clarify MveSetPalette 2025-02-10 21:21:45 +03:00
Alexander Batalov 625bf69b33 Review MVE_rmPrepMovie 2025-02-10 21:13:05 +03:00
Alexander Batalov 48c01eb8a1 Review MVE_rmFrameCounts 2025-02-10 21:07:38 +03:00
Alexander Batalov b105517ab3 Review MveSetScreenSize 2025-02-10 21:02:57 +03:00
Alexander Batalov 7d6371fd1c Remove movieLibSetPan 2025-02-10 20:54:38 +03:00
Alexander Batalov dc9824e2be Review MveSetVolume 2025-02-10 20:53:39 +03:00
Alexander Batalov 60a0d3ab8c Review MveSetIO 2025-02-10 20:52:08 +03:00
Alexander Batalov 58c82f9268 Review MveSetMemory 2025-02-10 20:48:17 +03:00
Alexander Batalov 8fcdbe0bee Add linux arm64 build (#453) 2025-02-10 19:19:06 +03:00
Alexander Batalov afff399fca Get rid of object data array accessor
Fixes #405
2025-02-09 23:05:56 +03:00
Vlad 080f999626 Code deobfuscation/decyphering (3) (#374) 2025-02-09 19:20:53 +03:00
Alexander Batalov 593f80144c Add cmake presets (#452) 2025-02-09 15:00:12 +03:00
Alexander Batalov 4df9ee557d Add option to use vendored vs. system dependencies (#451) 2025-02-09 13:49:04 +03:00
Alexander Batalov f6ba9d38fd Use FetchContent_MakeAvailable (#438) 2025-02-09 13:10:54 +03: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
Roman Turchin 277faa114e fix code formatting 2025-02-01 02:21:05 -05:00
Roman Turchin 1f91ab4d41 EM_ASM cleanup; silence warnings; add experemental wasm flags 2025-02-01 01:51:46 -05:00
Roman Turchin 0e68bfc280 merge with fallout2-ce org repo 2025-01-31 19:51:12 -05:00
Vasilii Rogin c26488f2a0 Merge pull request #36 from alexbatalov/main
Fix background music not being stopped when playing intro in mainmenu
2025-01-31 21:07:12 +02:00
Roman Turchin bf49e6b7e2 Merge remote-tracking branch 'origin/main' 2025-01-29 17:06:41 -05:00
Alexander Batalov c4cc713272 Fix background music not being stopped when playing intro in mainmenu
Closes #399
2025-01-29 21:57:06 +03:00
Roman Turchin dad514c2a4 Merge remote-tracking branch 'origin/main' 2025-01-29 10:43:22 -05:00
Vasilii Rogin 09ba154dcf Merge pull request #35 from alexbatalov/main
Pick changes from alexbatalov
2025-01-29 17:22:05 +02:00
Alexander Batalov f9af163495 Fix negative weapon ammo (#444) 2025-01-28 22:27:43 +03:00
Ryan Deering 9d6f4d9686 Fix mouse sensitivity (#416) 2025-01-28 22:27:10 +03:00
APAmk2 17042491c6 Code deobfuscation, part 3 #29 2025-01-26 01:23:00 +04:00
APAmk2 cfea9072db Merge branch 'main' into feature/code-readibility-3-new-repo 2025-01-26 01:18:59 +04:00
Vasilii Rogin 3d541f2be3 Merge pull request #34 from roginvs/add_webassembly_build_target
Fix github pages https://fallout2-ce.github.io/fallout2-ce/
2025-01-25 19:34:06 +02:00
Vasilii Rogin d53bda5012 Fix github pages https://fallout2-ce.github.io/fallout2-ce/ 2025-01-25 19:33:35 +02:00
Vasilii Rogin 97a7e4cc6a Merge pull request #33 from roginvs/add_webassembly_build_target
Install rsync
2025-01-25 19:28:25 +02:00
Vasilii Rogin 9b7c48a197 Use default branch name 2025-01-25 19:25:27 +02:00
Vasilii Rogin bf04bec410 Add permissions 2025-01-25 19:24:49 +02:00
Vasilii Rogin 7796238030 Install rsync 2025-01-25 19:23:17 +02:00
Vasilii Rogin e91880c26a Merge pull request #32 from roginvs/add_webassembly_build_target
Add webassembly build target
2025-01-25 19:19:12 +02:00
Vasilii Rogin 321892dd03 Use actions/checkout@v4 for checkout 2025-01-25 19:13:59 +02:00
Vasilii Rogin e42b7ad2c9 Fix flags 2025-01-25 18:43:49 +02:00
Vasilii Rogin c91057ec16 Use EM_ASYNC_JS correctly 2025-01-25 18:38:33 +02:00
Vasilii Rogin ed6930a5e5 Add different function names 2025-01-25 17:59:08 +02:00
Vasilii Rogin edde0470a6 Disable clang-format for JS code 2025-01-25 17:41:41 +02:00
Vasilii Rogin f79cff3565 Fixing clang-format 2025-01-25 17:38:40 +02:00
Vasilii Rogin d0c0a81ec8 Fix steps and branch names 2025-01-25 17:36:28 +02:00
Vasilii Rogin a791930acf Use #if defined( __EMSCRIPTEN__ ) for emscripten 2025-01-25 17:36:10 +02:00
Vasilii Rogin 25b5e9d272 Fix async call 2025-01-25 17:29:39 +02:00
Vasilii Rogin 3f15d3055c Sync idbfs on config save 2025-01-25 17:26:54 +02:00
Vasilii Rogin e611956cb0 Sync idbfs on game save 2025-01-25 17:25:23 +02:00
Vasilii Rogin 2abf530797 Clone web-interface from other repository 2025-01-25 17:20:38 +02:00
Vasilii Rogin 3883b68c86 Add workflow to build wasm version 2025-01-25 17:01:54 +02:00
Vasilii Rogin 090fa331cc Use -O1 optimization for web release builds due to issues with ios 2025-01-25 16:50:24 +02:00
Vasilii Rogin 1f0f08f3e4 Use DWARF for debug build 2025-01-25 16:49:59 +02:00
Vasilii Rogin 1e3aacebdd Fix build cmd 2025-01-25 16:12:21 +02:00
Vasilii Rogin 843e2f515a Update README 2025-01-25 16:08:30 +02:00
Vasilii Rogin 0aaf9e6125 Add Emscripten.cmake 2025-01-25 16:08:25 +02:00
Vasilii Rogin eceb96194c Add webassembly into CMakeLists.txt 2025-01-25 16:07:27 +02:00
Vasilii Rogin c1c143aa43 Update .gitignore 2025-01-25 16:06:38 +02:00
Vasilii Rogin 7fc23de62a Merge pull request #31 from alexbatalov/main
Pull changes from alexbatalov
2025-01-25 16:01:43 +02:00
ololoken bc577641fe Merge branch 'alexbatalov:main' into main 2025-01-24 22:49:45 -05:00
Roman Turchin 31abd327fd emscripten: move options to CMakeLists.txt 2025-01-22 02:49:41 -05:00
Alexander Batalov 2e14e4620e Remove text floaters after moving to another map or elevation
Fixes #401
2025-01-21 22:58:04 +03:00
Alexander Batalov 95d92d8bd0 Fix world map tabs
Closes #419
2025-01-21 21:31:56 +03:00
root acc52383ed emscripten: add CASE_INSENSITIVE_FS, move source map generation to debug mode 2025-01-19 04:12:48 -05:00
Roman Turchin 75c5f777fd emscripten: optimize fs sync; add source map output 2025-01-18 10:54:04 -05:00
Roman Turchin f06eb813e0 Merge remote-tracking branch 'origin/main' 2025-01-18 10:50:33 -05:00
APAmk2 4270ee33cc Improved touchscreen controls #27 2025-01-18 00:30:11 +04:00
Vlad 46c2f460fb Merge branch 'main' into feature/code-readibility-3 2025-01-17 13:15:01 +01:00
APAMk2 a852e88bf8 Clang format fix 2025-01-17 01:05:21 +04:00
APAMk2 178de356f1 Improved touch controls 2025-01-17 00:43:25 +04:00
Vasilii Rogin 04b8c847d3 Merge pull request #26 from alexbatalov/main
Pull changes from alexbatalov
2025-01-14 18:18:05 +02:00
Alexander Batalov d586e81827 Migrate fpattern (#442) 2025-01-14 08:45:02 +03:00
Vasilii Rogin 26574914ff Merge pull request #25 from alexbatalov/main
Update macOS/iOS deployment target (#440)
2025-01-13 21:31:31 +02:00
Alexander Batalov 67375a5857 Update macOS/iOS deployment target (#440) 2025-01-13 21:22:30 +03:00
Vasilii Rogin 9be2e45f43 Merge pull request #24 from alexbatalov/main
Pull changes from alexbatalov
2025-01-13 20:15:26 +02:00
Alexander Batalov 3dbea2e400 Use snprintf in win_get_num_i 2025-01-13 20:33:11 +03:00
Graham GowerandAlexander Batalov bd7321b128 Fix buffer overrun for audio files with 8 char names (#378)
Co-authored-by: Alexander Batalov <alex.batalov@gmail.com>
2025-01-13 20:17:13 +03:00
Vasilii Rogin 7bb9104a7d Merge pull request #23 from roginvs/alexbatalov_main
Pick changes from alexbatalov/main
2025-01-13 18:23:27 +02:00
Vasilii Rogin 18c5ce786e Merge branch 'main' into alexbatalov_main 2025-01-13 18:18:01 +02:00
Vasilii Rogin eb9f745b78 Merge pull request #21 from roginvs/ci_fix_releases
Release only on master push
2025-01-13 18:12:50 +02:00
Vasilii Rogin 3a9f0a500f Remove pull request condition 2025-01-13 18:05:24 +02:00
Vasilii Rogin 38717c9710 Remove close condition 2025-01-13 18:04:20 +02:00
Vasilii RoginandAlexander Batalov ad7b0e56ab Fix default hit location on called shots (#429)
Co-authored-by: Alexander Batalov <alex.batalov@gmail.com>
2025-01-13 18:41:18 +03:00
Alexander V. Nikolaev e770e64a48 Ensure fileFindFirst path is resolved (#369) 2025-01-13 18:05:12 +03:00
Jan Ĺ imek 5956227dcb Fix debug print on non-Windows platforms and Quick-save message (#400) 2025-01-13 02:33:14 +03:00
Condratiy Lenovin f443e365cc Add Epic Games Store link (#420) 2025-01-13 02:19:19 +03:00
Walter Agazzi b443e21c6e Fix wrong variable usage in character_editor (#432) 2025-01-13 02:11:48 +03:00
Vasilii Rogin 19ed168d42 Pvs studio fixes (#434) 2025-01-13 01:55:32 +03:00
Vasilii Rogin 29b8c7bfe5 Merge pull request #20 from roginvs/fix_no_sound_issue
Fix no sound issue
2025-01-12 23:24:24 +02:00
Vasilii RoginandAlexander Batalov 939211d640 Copy sound string because dictionary can re-allocate it (#436)
Co-authored-by: Alexander Batalov <alex.batalov@gmail.com>
2025-01-12 23:59:34 +03:00
Alexander Batalov b5d857547e Review gsound_get_music_path 2025-01-12 23:40:39 +03:00
Alexander Batalov 0a9aaab4d1 Update macos runner (#437) 2025-01-12 22:04:21 +03:00
Vasilii Rogin 5c6e5e826a Copy sound string because dict can re-allocate it 2025-01-12 18:54:27 +02:00
Vasilii Rogin aed3723306 Merge pull request #18 from APAmk2/main
Runtime fix of Splashes wrong pal
2025-01-11 00:57:50 +02:00
APAMk2 319c116048 PR Fix for #18 2025-01-11 02:45:01 +04:00
APAMk2 61da360180 Runtime fix of Splashes wrong pal
The 1-st color always must be black, but never does in F2 splashes.
2025-01-11 02:38:54 +04:00
Vasilii Rogin 9d6134367a Merge pull request #14 from roginvs/pvs_studio_fixes
Pvs studio fixes
2025-01-10 21:55:03 +02:00
APAmk2 9b96e3118d Workflow permissions fix #17 2025-01-10 23:35:14 +04:00
APAMk2 f5507c8c5a Workflow permissions fix 2025-01-10 23:34:06 +04:00
APAmk2 926efeb0c5 Fix for workflow file #16 2025-01-10 23:14:55 +04:00
APAMk2 d3346b5d1b Fix for workflow 2025-01-10 23:13:32 +04:00
Vasilii Rogin b6c2fc02b6 Merge pull request #15 from APAmk2/main
Added creation of continuous releases on every commit to main branch
2025-01-10 19:39:41 +02:00
APAMk2 983092944d Added continuous building 2025-01-10 21:26:07 +04:00
Roman Turchin 68e363429c [WASM] add wasm build target 2025-01-09 21:56:46 -05:00
Vasilii Rogin eaab620c84 src/character_editor.cc 7253 err V783 Dereferencing of the invalid iterator 'gCustomKarmaFolderDescriptions.end()' might take place. 2025-01-07 21:16:31 +02:00
Vasilii Rogin 61742535d5 src/art.cc 636 err V781 The value of the 'type' variable is checked after it was used. Perhaps there is a mistake in program logic. Check lines: 636, 640. 2025-01-07 21:05:34 +02:00
Vasilii Rogin a66618cbff src/art.cc 528 err V547 Expression is always false.
Original function

signed int __usercall art_get_base_name_@<eax>(signed int type@<eax>, int fid@<edx>, char *strBuf@<ebx>)
{
   signed int result; // eax@3
   char *_strBuf; // edi@6
   int dstName; // esi@6
   char c1; // al@7
   char c2; // al@8

   if ( type >= 0 && type < 11 )
   {
      if ( fid < art[type].count )
      {
         _strBuf = strBuf;
         dstName = 13 * fid + art[type].mem;
         do
         {
            c1 = *dstName;
            *_strBuf = *dstName;
            if ( !c1 )
            {
               break;
            }
            c2 = *(dstName + 1);
            dstName += 2;
            _strBuf[1] = c2;
            _strBuf += 2;
         }
         while ( c2 );
         result = 0;
      }
      else
      {
         result = -1;
      }
   }
   else
   {
      result = -1;
   }
   return result;
}
2025-01-07 21:04:00 +02:00
Vasilii Rogin f8b63280f2 Merge pull request #13 from tag2015/main
Fix wrong variable usage in character_editor
2025-01-04 15:48:22 +02:00
Walter Agazzi a24e0630d7 Fix wrong variable usage in character_editor 2025-01-04 12:36:20 +01:00
APAmk2 be11208a88 Engine versioning #12 2025-01-02 14:33:33 +04:00
git 4a2174c8aa Clang warning fix, part 2 2025-01-02 02:42:31 +04:00
git 39733665fc Clang warning fix
Very strange, tbh
2025-01-02 02:41:27 +04:00
git 50467d3296 Added engine versioning 2025-01-02 02:30:24 +04:00
APAmk2 959d40dc06 y0lo PR fixes 2025-01-01 22:31:04 +04:00
git b2efcffec7 Fix to eliminate Clang warnings on old merged PRs 2025-01-01 22:24:54 +04:00
APAmk2 8675d89a39 Fast barter auto calc for money #5 2025-01-01 22:18:20 +04:00
APAmk2 a99a250a37 Clear input envents on combat turn #4 2025-01-01 22:16:10 +04:00
Vasilii Rogin 98cf43438c Merge pull request #9 from roginvs/fix_targeted_attack_on_non_critter
Set hitLocation when return status is not -1
2024-12-25 15:46:05 +02:00
Vasilii Rogin 8eae8a4cb0 Merge pull request #8 from roginvs/fallout2_ce_fix_formatting
Fix CI checks
2024-12-25 15:33:20 +02:00
Vasilii Rogin 1d3b5c1951 Bump macos version 2024-12-25 15:26:49 +02:00
Vasilii Rogin 5786f56606 Fix formatting 2024-12-25 15:20:27 +02:00
Vasilii Rogin ef3f3f3fc9 Set hitLocation when return status is not -1 2024-12-25 15:10:26 +02:00
APAmk2 64a53ff4d0 Merge pull request #1 from avnik/avnik/fix-case-sensitive-findfirst
Fix broken game load/save on Linux due to case sensitive opendir()
2024-11-24 22:58:25 +04:00
Vasilii Rogin 3b211b2d71 Merge pull request #6 from fallout2-ce/use-macos-12-for-mac-build
Use macos-12
2024-11-19 22:46:23 +02:00
Vasilii Rogin c920078f7e Use macos-12 2024-11-19 22:37:08 +02:00
APAmk2 660df2578a Merge pull request #3 from roginvs/add_tile_hires_stencil
Add tile hires stencil
2024-11-18 23:43:56 +04:00
Vasilii Rogin ea02ad0481 Workaround for error C7555: use of designated initializers requires at least '/std:c++20' 2024-11-14 15:33:51 +02:00
Vasilii Rogin 78e577892a Workaround for error C7555: use of designated initializers requires at least '/std:c++20' 2024-11-14 15:32:56 +02:00
Vasilii Rogin 9811069d7b Remove useless includes 2024-11-14 14:32:23 +02:00
Vasilii Rogin 451524e6e0 Remove old TODO 2024-11-14 14:27:10 +02:00
Vasilii Rogin 30cfd0f089 Fix formatting 2024-11-14 14:10:33 +02:00
Vasilii Rogin e44aeb6894 Use config option 2024-11-14 14:09:20 +02:00
Vasilii Rogin 74eb64b594 Disable debug checks 2024-11-14 14:02:57 +02:00
Vasilii Rogin a59bfdb64b Fix debug print message 2024-11-14 14:02:03 +02:00
Vasilii Rogin 1d53594961 Fix initialization place 2024-11-14 14:00:29 +02:00
Vasilii Rogin 6375269f69 Add tiles hires stencil 2024-11-14 13:54:13 +02: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
Vasilii Rogin 41a7c97e69 Show warning if cities amount differs 2024-06-04 20:56:42 +03:00
Vasilii Rogin 2ca921c525 Revert "Remove cities amount check on game load"
This reverts commit e676089f83.
2024-06-04 20:50:03 +03:00
Vasilii Rogin e676089f83 Remove cities amount check on game load 2024-06-04 19:43:37 +03:00
Jan Ĺ imek 28c3908862 Sfall: add support for loading mods / mod_order.txt 2024-06-04 17:07:17 +02:00
phobos2077 323cc6165c Decyphering inventory.cc + a few other places 2024-06-02 14:11:26 +02:00
phobos2077 dfcf61b184 Misc decyphering 2024-05-31 13:23:45 +02:00
phobos2077 20d55423f7 Decypher Party level 2024-05-31 13:22:07 +02:00
phobos2077 8714d418ac Clang format fixes 2024-05-18 20:08:02 +02:00
phobos2077 6efbe795dc Decyphering in and around proto_instance + fix build 2024-05-18 20:02:03 +02:00
phobos2077 ebb6a6b9d8 Decyphering: perform_drug_effect, MapHeader, perk params
- Remove a few constant conditions in worldmap.cc
2024-05-18 19:07:24 +02:00
phobos2077 26c04ae803 obj_attempt_placement + WM encounter ratioMode naming 2024-05-16 23:30:58 +02:00
phobos2077 da72bc9501 Inventory symbol naming (WIP) 2024-05-16 23:29:46 +02:00
phobos2077 91a502d704 gdialog_scroll_subwin() readability 2024-05-08 23:01:40 +02:00
Alexander V. Nikolaev d843a662b3 Ensure fileFindFirst path is resolved 2024-05-05 16:08:39 +03:00
phobos2077 71f84cbe44 Decypher buildFid (art_id) function 2024-05-03 16:22:18 +02:00
Alexander Batalov 9fb917c357 Bump version to 1.3.0 2024-04-21 12:46:24 +03:00
Alexander Batalov aa31185b35 Update release workflow 2024-04-21 11:23:18 +03:00
Vasilii Rogin e119aa4c4d Use cities limit patch by default 2024-04-19 12:55:51 +03:00
Vasilii Rogin ea66287551 Load gCitiesLimitFix state before it is used 2024-04-18 23:23:41 +03:00
Vasilii Rogin db07e95f5b Use gCitiesLimitFix variable 2024-04-18 23:10:56 +03:00
Vasilii Rogin acd0413626 Check that save file have the same amount of cities 2024-04-18 23:02:22 +03:00
Vasilii Rogin 196ad2267f Fix formatting 2024-04-18 22:59:24 +03:00
Vasilii Rogin 22a864a0c9 Ignore cities count if CitiesLimitFix is enabled 2024-04-18 22:55:17 +03:00
Vasilii Rogin 252d7fe83e Add CitiesLimitFix into sFall config with default=true 2024-04-18 22:51:45 +03:00
Alexander Batalov ec0685ea19 Normalize and resolve asset bundle paths 2024-04-06 16:41:49 +03:00
Alexander Batalov 2c7ab7f5c8 Detect alternative default music directory 2024-04-06 16:33:16 +03:00
Alexander Batalov 8de73ad774 Refactor file find
Fixes #352
2024-04-06 12:47:11 +03:00
Alexander Batalov 3ceacf1001 Fix warning 2024-04-06 12:01:48 +03:00
Alexander Batalov 31afb4d568 Bump actions to v4 2024-03-03 11:27:37 +03:00
Alexander Batalov 95cbba3920 Bump zlib to 1.3.1 2024-03-03 09:39:06 +03:00
sonilyan 16b044ae31 Fix obj_can_see_obj not working in release build (#350) 2024-02-15 05:04:57 +03:00
sonilyan caea9cb4fb Fix yaam no damage (#351) 2024-02-15 05:02:56 +03:00
Alexander Batalov 8325823493 Expose game data files to iOS Files app
Fixes #343
2024-01-16 23:42:25 +03:00
Alexander Batalov 8e1e8d483c Review db_total
Fixes #327
2024-01-16 22:37:06 +03:00
Alexander Batalov 1b18c2baa3 Fix custom patch file name template
Follow-up to #309
2024-01-16 22:35:16 +03:00
Alexander Batalov 70d5830f00 Force LF on .mm 2024-01-16 19:04:14 +03:00
yabisiktir 401df384ef modernize-use-nullptr (#332) 2024-01-16 18:57:49 +03:00
Vlad 59af02cca9 Variable naming, part 2 (#320) 2024-01-16 16:33:08 +03:00
c6 c6565ac96a Sfall: add VersionString, ConfigFile, PatchFile (#309) 2024-01-16 15:56:21 +03:00
Jo 16f4ab7787 Improve pointer comparsion for Nevada and Sonora mods (#291) 2024-01-16 15:42:32 +03:00
Vasilii Rogin e23c4eddda Use delay_ms instead of spinwait (#262) 2024-01-16 15:24:49 +03:00
λP.(P izzy) 601f0c7b44 fix CMake condition to allow build on OpenBSD & FreeBSD (#341) 2024-01-16 15:06:47 +03:00
sonilyan f411d75643 Add overriddenSelf initialization for scriptRead (#329) 2023-10-31 13:46:25 +03:00
Vasilii Rogin 81fce5f4a2 Fix wrong pointer dereferecing in aiFindAttackers (#324) 2023-10-09 20:50:59 +03:00
Eir Nym 0e447c55a8 Upgrade zlib to 1.3 (#323) 2023-09-28 17:26:52 +03:00
Alexander Batalov 91806d8ccb Fix missing include 2023-09-03 22:31:52 +03:00
Alexander Batalov a30fb4cfdd Add mapper_refresh_rotation 2023-09-03 22:21:14 +03:00
Alexander Batalov def8effa9f Add handle_new_map 2023-09-03 21:42:17 +03:00
Alexander Batalov d46ee07583 Add mapper_destroy_highlight_obj 2023-09-03 21:30:59 +03:00
Alexander Batalov ee19238667 Add update_toolname 2023-09-03 20:48:23 +03:00
Alexander Batalov 0d83cff24e Add place_entrance_hex 2023-09-03 20:24:36 +03:00
Alexander Batalov 30a3bf9b71 Add pick_region 2023-09-03 20:23:50 +03:00
Alexander Batalov 8c61b0bd8c Add sort_rect 2023-09-03 19:15:50 +03:00
Alexander Batalov 6e9f1ae517 Add op_set_self 2023-09-03 18:23:19 +03:00
Alexander Batalov ad3e0eb752 Add op_explosions_metarule 2023-09-03 16:51:29 +03:00
Alexander Batalov b40bfcc64a Add some metarules 2023-09-03 16:26:52 +03:00
Alexander Batalov b706756ec9 Add op_get_script 2023-09-03 13:34:16 +03:00
Alexander Batalov 427672741a Add op_list_as_array 2023-09-02 22:06:37 +03:00
Alexander Batalov bb3513956c Add op_force_encounter 2023-09-02 21:34:41 +03:00
Alexander Batalov 84aecfa823 Add draw_rect 2023-09-02 20:07:02 +03:00
Alexander Batalov 7f920fe13b Add erase_rect 2023-09-02 19:57:14 +03:00
Alexander Batalov 9178abc53d Add toolbar_proto 2023-09-02 19:47:15 +03:00
Alexander Batalov 84288612ef Add map_toggle_block_obj_viewing_on 2023-09-02 19:43:56 +03:00
Alexander Batalov 4a94b19f60 Add proto_subdata_setup_pid_button 2023-09-02 19:36:17 +03:00
Alexander Batalov b0b161ceb5 Add proto_subdata_setup_fid_button 2023-09-02 19:31:16 +03:00
Alexander Batalov 1c2fd05bcd Add proto_subdata_setup_int_button 2023-09-02 18:33:32 +03:00
Alexander Batalov e0b18a8785 Add target_exit 2023-09-02 18:08:21 +03:00
Alexander Batalov 8929941d13 Add target_init 2023-09-02 18:07:37 +03:00
Alexander Batalov 8d2d5df65f Add target_new 2023-09-02 17:54:17 +03:00
Alexander Batalov fe47d88035 Add target_remove_tid 2023-09-02 17:47:43 +03:00
Alexander Batalov 29e81f3bf4 Add target_remove 2023-09-02 17:37:21 +03:00
Alexander Batalov 05b4c125e6 Add target_save 2023-09-02 17:19:51 +03:00
Alexander Batalov 96573a7209 Add target_remove_all 2023-09-02 17:14:49 +03:00
Alexander Batalov caf28a7286 Add target_tid_ptr 2023-09-02 17:07:43 +03:00
Alexander Batalov 25a3de62e7 Add target_ptr 2023-09-02 17:05:26 +03:00
Alexander Batalov fd3cd887b6 Add target_load 2023-09-02 16:40:18 +03:00
Alexander Batalov c3a6d07dc4 Add target_find_free_subnode 2023-09-02 16:24:07 +03:00
Alexander Batalov ed7ffac816 Add target_header_load 2023-09-02 15:31:23 +03:00
Alexander Batalov 59c43590cc Add target_header_save 2023-09-02 15:29:59 +03:00
Alexander Batalov f14f37f970 Add target_override_protection 2023-09-02 14:39:31 +03:00
Alexander Batalov cba1fc8f61 Add map_scr_remove_spatial 2023-07-25 11:56:20 +03:00
Alexander Batalov 8329d2fcf6 Add map_scr_remove_all_spatials 2023-07-25 11:14:41 +03:00
Alexander Batalov 1de7ef0151 Add init_mapper_protos 2023-07-24 15:19:18 +03:00
Alexander Batalov f1f4cac316 Add proto_choose_container_flags 2023-07-24 15:15:06 +03:00
Alexander Batalov 6ce6639f10 Add proto_wall_light_str 2023-07-24 10:57:31 +03:00
Alexander Batalov c5ad0c294f Add proto_critter_flags_redraw 2023-07-24 10:53:04 +03:00
Alexander Batalov f780969178 Add proto_critter_flags_modify 2023-07-24 10:46:31 +03:00
Alexander Batalov f3f61abc18 Add critter_flag_unset 2023-07-24 09:07:02 +03:00
Alexander Batalov 369a54f836 Add critter_flag_set 2023-07-24 09:04:11 +03:00
Alexander Batalov e9f3b34888 Add mp_pick_kill_type 2023-07-24 08:55:43 +03:00
Alexander Batalov c1258cbb4c Add proto_pick_ai_packet 2023-07-24 08:43:27 +03:00
Alexander Batalov 49804a52e6 Add combat_ai_name 2023-07-24 08:29:19 +03:00
Alexander Batalov e0e0db219c Add combat_ai_num 2023-07-24 08:27:42 +03:00
Alexander Batalov f93aa710a4 Add target_pick_local_var 2023-07-24 08:20:15 +03:00
Alexander Batalov ca206da4af Add target_pick_map_var 2023-07-24 08:17:04 +03:00
Alexander Batalov f6461a44dc Add target_pick_global_var 2023-07-24 08:13:45 +03:00
Alexander Batalov 3a271a399f Add pick_rot 2023-07-24 08:10:46 +03:00
Alexander Batalov ac1f4477ef Add target_make_path 2023-07-24 08:08:01 +03:00
Alexander Batalov 708862ca24 Add target_overriden 2023-07-24 08:03:25 +03:00
Alexander Batalov 57711cae5f Add mapper_edit_exit 2023-07-24 07:17:21 +03:00
Alexander Batalov f6e9a9d975 Make MapDirErase public 2023-07-24 07:15:58 +03:00
Alexander Batalov 4cd40b33af Add mapper_edit_init 2023-07-24 06:50:07 +03:00
Alexander Batalov 053e70dde4 Add gmouse_set_mapper_mode 2023-07-23 14:27:52 +03:00
Alexander Batalov 4b51b2f29b Add tile_toggle_roof 2023-07-23 14:15:20 +03:00
Alexander Batalov cdfd308193 Add mapper_main 2023-07-23 11:01:03 +03:00
Alexander Batalov 7327588fc3 Add MapperInit 2023-07-23 10:35:16 +03:00
Alexander Batalov d16f0010ac Add bookmarkInit 2023-07-23 10:26:43 +03:00
Alexander Batalov a27b2496d4 Add bookmarkExit 2023-07-23 10:25:58 +03:00
Alexander Batalov a2d61dc7c4 Add bookmarkHide 2023-07-23 10:23:55 +03:00
Alexander Batalov 093d4f23d8 Add bookmarkUnHide 2023-07-23 10:22:42 +03:00
Alexander Batalov 3331ad02b0 Add categoryInit 2023-07-23 10:20:54 +03:00
Alexander Batalov 661c689029 Add categoryExit 2023-07-23 10:19:02 +03:00
Alexander Batalov b1049fceb1 Add categoryToggleState 2023-07-23 10:17:52 +03:00
Alexander Batalov f933bff8ae Add categoryHide 2023-07-23 10:16:59 +03:00
Alexander Batalov 9f08c73b3c Add categoryUnhide 2023-07-23 10:15:51 +03:00
Alexander Batalov 4eaea0e3c0 Add proto_user_is_librarian 2023-07-23 10:10:09 +03:00
Alexander Batalov c652312157 Add print_toolbar_name 2023-07-23 10:01:58 +03:00
Alexander Batalov 8cc48cf52a Add update_high_obj_name 2023-07-23 09:55:58 +03:00
Alexander Batalov 9faa427a28 Add clear_toolname 2023-07-23 09:52:59 +03:00
Alexander Batalov 480094a3eb Add redraw_toolname 2023-07-23 09:49:22 +03:00
Alexander Batalov 1366b050b0 Add mapper_inven_unwield 2023-07-23 09:44:09 +03:00
Alexander Batalov e68c2a4784 Add mapper_mark_exit_grid 2023-07-23 09:39:13 +03:00
Alexander Batalov 78ae0fb3bf Add mapper_mark_all_exit_grids 2023-07-23 09:25:56 +03:00
Alexander Batalov 127de14318 Add win_get_num_i 2023-07-23 07:20:56 +03:00
Alexander Batalov 28d1d410d5 Add get_num_i 2023-07-23 06:08:23 +03:00
Alexander Batalov 4b65bdf021 Add scripts_request_townmap 2023-07-22 17:09:19 +03:00
Alexander Batalov cbb9cbc6fd Clarify some proto params 2023-07-22 17:00:24 +03:00
Alexander Batalov c72d8778ba Add proto_new 2023-07-22 16:53:01 +03:00
Alexander Batalov d6c3d74b3f Clarify proto_make_path address 2023-07-22 15:36:51 +03:00
Alexander Batalov 3c7248af5f Add proto_item_init 2023-07-22 15:34:32 +03:00
Alexander Batalov fd9fa80204 Add proto_item_subdata_init 2023-07-22 15:22:05 +03:00
Alexander Batalov 3d5cb4c3f4 Add proto_scenery_init 2023-07-22 15:07:39 +03:00
Alexander Batalov 01a68af4a4 Add proto_scenery_subdata_init 2023-07-22 15:05:00 +03:00
Alexander Batalov 6a75ec07e9 Add proto_wall_init 2023-07-22 14:59:32 +03:00
Alexander Batalov 1d310eb626 Add proto_tile_init 2023-07-22 14:58:47 +03:00
Alexander Batalov ffc440c809 Add proto_misc_init 2023-07-22 14:53:22 +03:00
Alexander Batalov a4daffa30e Add proto_copy_proto 2023-07-22 14:49:56 +03:00
Alexander Batalov ccabbd7688 Add proto_is_subtype 2023-07-22 14:46:51 +03:00
Alexander Batalov d27eafe03a Fix win_get_str return code 2023-07-21 11:22:57 +03:00
Alexander Batalov 7a45ac72f0 Add reading mapper config 2023-07-21 11:10:15 +03:00
Alexander Batalov f6cfc1fa3a Clarify GNW_check_menu_bars param 2023-07-21 11:02:54 +03:00
Alexander Batalov 6dcbcb97ad Add process_pull_down 2023-07-21 10:50:33 +03:00
Alexander Batalov 769599c463 Fix closing same file twice
Closes #318
2023-07-21 08:04:10 +03:00
Alexander Batalov 50d7c71db1 Clarify dragging flags 2023-07-20 11:13:01 +03:00
Alexander Batalov b07a7bcefd Complete win_drag 2023-07-20 10:20:05 +03:00
Alexander Batalov 867d28ac62 Add rect_clip 2023-07-20 10:13:21 +03:00
Alexander Batalov d9a173678a Cleanup timed msgs code 2023-07-20 09:39:15 +03:00
Alexander Batalov dde3255b07 Fix endless loop while cleaning up timed msgs 2023-07-20 09:21:26 +03:00
Alexander Batalov 1506ae7048 Add win_timed_msg 2023-07-20 08:53:26 +03:00
Alexander Batalov ce5d07e09c Add win_yes_no 2023-07-19 21:27:20 +03:00
Alexander Batalov 2d8a637f7d Force debug window font 2023-07-19 12:05:39 +03:00
Alexander Batalov 8414effc04 Fix GNW color indexes 2023-07-19 12:01:20 +03:00
Alexander Batalov 3a17818ceb Handle debug mode
Closes #298
2023-07-19 11:51:13 +03:00
Alexander Batalov 90d1545bb2 Uninline debug_register_func 2023-07-19 11:45:55 +03:00
Alexander Batalov a7628ccaea Fix bufferDrawLine
Missing 1 pixel in the middle of the vertical line.
2023-07-19 11:43:10 +03:00
Alexander Batalov 3af2a49250 Review debug_register_log 2023-07-19 11:39:01 +03:00
Vlad ffe90eef49 Improve code readability (#315) 2023-07-13 13:35:26 +03:00
Alexander Batalov c4c2806071 Fix game time calculations (#307) 2023-07-13 13:04:31 +03:00
Ivan Sokolov 0e31ac4753 Simplyfy logic to calc suggested amount of barter money 2023-06-22 00:38:18 +08:00
Ivan Sokolov a949178e30 Set recomended ammount of money to be moved for barter
The feature works in any direction to move from/to player/npc and from/to inventory/table
2023-06-21 21:13:06 +08:00
Ivan Sokolov 0e806d9be3 Add feature for automatic calculation of barter money 2023-06-20 17:21:10 +08:00
Ivan Sokolov 2d88189b4c Clear input envents on combat turn
Issue: if a user skips turn by clicking end a combat turn button
the cursor becomes frozen in "watch" mode but all input events are queued.
If a user clicked while the AI turn is not ended then the next user's turn is skipped.

Fix: clear input queue each time before user's turn.
2023-06-16 18:16:53 +08:00
Alexander Batalov fe035d8514 Improve loadsave.cc readability 2023-06-16 08:12:38 +03:00
c6 cf98070cd0 Add Sfall AutoQuickSave (#305) 2023-06-16 08:01:44 +03:00
Austin Hurst 0ffcb107af Implement SCALE_2X for Fallout 2 (#306) 2023-06-16 07:18:15 +03:00
Alexander Batalov cf5f865a23 Add load/save global vars (#296) 2023-06-03 08:06:49 +03:00
Alexander Batalov 37e4822ed5 Add keyboard opcodes (#295) 2023-06-01 19:01:03 +03:00
Alexander Batalov bf639a2c4a Fix copying files on case-sensitive file systems
Closes #273
2023-06-01 17:10:36 +03:00
Alexander Batalov 89839be3af Add global scripts (#294) 2023-05-31 21:48:44 +03:00
Alexander Batalov ec722475b6 Add op_create_message_window
See #200
2023-05-30 14:21:50 +03:00
Alexander Batalov 32ed3c3271 Add FixNamespaceComments 2023-05-30 12:56:51 +03:00
Alexander Batalov 03bf507893 Add ini opcodes (#293) 2023-05-30 12:52:55 +03:00
Alexander Batalov 681b7c388b Fix sfall opcode comments 2023-05-30 09:12:51 +03:00
Vasilii RoginandAlexander Batalov fe0d767521 Add SFall arrays (#269)
Co-authored-by: Alexander Batalov <alex.batalov@gmail.com>
2023-05-30 09:06:55 +03:00
Alexander Batalov 62c5c4757c Fix comparing pointers and integers
See #189
2023-05-24 21:52:50 +03:00
Vasilii RoginandAlexander Batalov 70b0b61664 Delete critter from combat during _partyFixMultipleMembers (#277)
Co-authored-by: Alexander Batalov <alex.batalov@gmail.com>
2023-05-24 21:32:09 +03:00
Vasilii Rogin 53a4437be9 Remove trailing comma after reading strParseIntWithKey (#259) 2023-05-23 23:51:04 +03:00
Vasilii RoginandAlexander Batalov 42c541012c Fix crash in _map_age_dead_critters (#258)
Co-authored-by: Alexander Batalov <alex.batalov@gmail.com>
2023-05-23 23:50:37 +03:00
Vlad 61293bd39c Fix ruined stack in rm_mult_objs_from_inven and name remaining opcodes (#289) 2023-05-23 23:45:18 +03:00
Alexander Batalov d641fefc13 Fix open door sound
See alexbatalov/fallout1-ce#71
2023-05-23 23:43:00 +03:00
Alexander Batalov 666e5cf62d Fix mouse events processing
See alexbatalov/fallout1-ce#55
2023-05-23 23:32:11 +03:00
Alexander Batalov 2565900f90 Fix clang-format args
Looks like clang-format in Ubuntu does not recognize glob pattern as
macOS does. Previous solution without xargs reported status code of
find itself, not clang-format.
2023-05-18 23:32:16 +03:00
Alexander Batalov 6b6fa3f111 Fix code format check 2023-05-09 18:42:47 +03:00
Alexander Batalov a06097aef5 Improve touch controls (#283) 2023-05-09 18:36:20 +03:00
Alexander Batalov efdc2e0199 Bump setup-java to v3 (#278) 2023-05-01 07:54:14 +03:00
Alexander Batalov d6a74468da Use Xcode for macOS builds (#275) 2023-05-01 07:10:04 +03:00
Alexander Batalov fcf8a87603 Ignore channels in acm files (#274) 2023-04-27 10:14:41 +03:00
Alexander Batalov a8815229a0 Add compat_access (#272) 2023-04-26 20:12:22 +03:00
Alexander Arkhipov aa99b2e1d3 Convert file paths to correct case (#214) 2023-04-26 17:45:36 +03:00
Vasilii Rogin 63d8300c61 Add clang format (#270) 2023-04-26 15:35:02 +03:00
Alexander Batalov 81c3ff9b1a Improve iOS icon (#271) 2023-04-26 15:11:24 +03:00
Alexander Batalov a0652e2646 Use Xcode for iOS builds (#267) 2023-04-26 14:11:26 +03:00
Alexander Batalov df3ac30de6 Add blocking objects opcodes 2023-04-20 11:22:47 +03:00
Alexander Batalov 6ca1329720 Add op_get_attack_type 2023-04-20 10:51:20 +03:00
Alexander Batalov 129361836f Add op_get_mouse_buttons 2023-04-20 10:31:32 +03:00
Alexander Batalov cf4921de1e Add op_tile_under_cursor 2023-04-20 10:25:13 +03:00
Alexander Batalov ecc6a8679b Add math opcodes 2023-04-20 09:53:50 +03:00
Alexander Batalov a39f149817 Add date/time opcodes 2023-04-19 19:10:09 +03:00
Alexander Batalov 540cc1e08b Add combat opcodes 2023-04-19 10:03:04 +03:00
Alexander Batalov ef34fdb519 Add proto data opcodes 2023-04-19 09:21:38 +03:00
Alexander Batalov 9b02f600de Add worldmap opcodes 2023-04-19 09:09:17 +03:00
Alexander Batalov 0bb07dbd50 Add pc base stats opcodes 2023-04-19 09:02:54 +03:00
Vasilii Rogin 0a85ce520b Use stack on the heap for roof fill (#263) 2023-04-18 11:06:07 +03:00
Vasilii Rogin 99bc14cf3a Add sFall movie timer options (#261) 2023-04-14 19:03:21 +03:00
Vasilii Rogin 527e152297 Allow messageIndex to be zero (#264) 2023-04-14 18:40:37 +03:00
Alexander Batalov c8d45854ba Normalize line endings when reading text files
Closes #250
2023-04-11 20:00:38 +03:00
Alexander Batalov 11472e8be9 Fix soundOpenData flags 2023-04-11 17:27:34 +03:00
Alexander Batalov 69e4adf5b3 Add HQ music support
See #239
2023-04-11 16:37:01 +03:00
Alexander Batalov a2eabd668b Fix missing speech in some Russian localizations
Closes #246
2023-04-11 14:03:55 +03:00
Alexander Batalov 6d1273d325 Improve button functions readability 2023-04-11 09:01:14 +03:00
TomArnaez e23b39abaa Fix crash in inventory list (#256) 2023-02-28 22:11:08 +03:00
Alexander Batalov 117b1d7b44 Fix iPad settings
Follow-up to alexbatalov/fallout1-ce#29
2023-02-28 20:31:19 +03:00
Alexander Batalov 6398f8a79e Fix itemDropAll
See #253
2023-02-28 16:11:48 +03:00
Alexander Batalov 81b9345303 Update config 2023-02-18 19:06:20 +03:00
Alexander Batalov 249892716e Get rid of mmx stuff 2023-02-18 18:14:30 +03:00
Alexander Batalov 3e8227a62b Extract mainmenu 2023-02-17 15:55:14 +03:00
Alexander Batalov 1570f860e8 Remove unnecessary calls 2023-02-17 15:53:42 +03:00
Alexander Batalov d7c4589a55 Extract preferences 2023-02-17 12:33:26 +03:00
Alexander Batalov 0a9a1dc7ca Fix faulty frms
Closes #235
2023-02-16 15:46:49 +03:00
Alexander Batalov 42346f66b2 Update readme 2023-02-15 12:47:32 +03:00
Alexander Batalov 7ac651b736 Adjust modal dialogs position 2023-02-15 11:37:00 +03:00
Alexander Batalov 0bb822ba60 Fix "Affect player speed" font
Closes #245
2023-02-15 09:23:46 +03:00
Alexander Batalov 075de8f837 Review sound IO functions 2023-02-13 11:51:09 +03:00
Alexander Batalov 36b5ceba8a Improve sound_decoder.cc accuracy 2023-02-13 11:02:17 +03:00
Alexander Batalov f5d3cfb5e3 Fix Fast Metabolism trait 2023-02-12 23:12:36 +03:00
Alexander Batalov 81210f46af Fix storing pointers in game global variables 2023-02-10 11:05:42 +03:00
Alexander Batalov c14f671a0d Add object and string concatenation
Fixes #232
2023-02-10 09:27:10 +03:00
Alexander Batalov 33141672ed Use screen borders for scrolling worldmap 2023-02-10 09:00:59 +03:00
Alexander Batalov 28083cfea9 Fix talking head mood transition 2023-02-09 19:40:25 +03:00
Alexander Batalov c9864741f3 Fix crash in artLockFrameDataReturningSize
Closes #231
2023-02-09 19:27:25 +03:00
Jiří Malák 5a230efd2b Properly handle path with spaces (#228) 2023-01-29 08:56:03 +03:00
Alexander Batalov 3aea6a98ef Fix loading custom interface frms 2023-01-21 15:24:18 +03:00
Alexander Batalov ba49abcea6 Fix some scripts not being properly removed
Closes #224
2023-01-21 13:15:18 +03:00
Alexander Batalov 47f5be8340 Fix HP being used as AP 2023-01-20 14:16:43 +03:00
Alexander Batalov d435185e9e Fix missing melee damage info 2023-01-20 14:12:03 +03:00
397 changed files with 79977 additions and 27239 deletions
+1
View File
@@ -1,2 +1,3 @@
BasedOnStyle: WebKit
AllowShortIfStatementsOnASingleLine: WithoutElse
FixNamespaceComments: true
+1
View File
@@ -7,6 +7,7 @@
*.java text eol=lf
*.json text eol=lf
*.md text eol=lf
*.mm text eol=lf
*.plist text eol=lf
*.pro text eol=lf
*.properties text eol=lf
+21
View File
@@ -0,0 +1,21 @@
### 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.
--->
+47
View File
@@ -0,0 +1,47 @@
name: Auto Format with Clang
on:
pull_request:
types: [opened, synchronize]
push:
branches: [main]
permissions:
contents: read
jobs:
format:
runs-on: ubuntu-latest
if: github.actor != 'github-actions[bot]' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}
token: ${{ secrets.PAT_FOR_ACTIONS }}
- name: Run clang-format via Docker
run: |
docker run --rm \
-v ${{ github.workspace }}:/app --workdir /app \
--user $(id -u):$(id -g) silkeh/clang:18 \
bash -c 'find src -type f \( -name "*.cc" -o -name "*.h" \) -print0 | xargs -0 clang-format -i'
# https://github.com/actions/checkout?tab=readme-ov-file#push-a-commit-to-a-pr-using-the-built-in-token
- name: Check and commit changes if needed
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if ! git diff --quiet; then
git diff
git commit -am "chore: auto-format with clang-format"
git push
else
echo "No formatting changes"
fi
+145
View File
@@ -0,0 +1,145 @@
name: Build and deploy webassembly version
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
permissions:
contents: read
jobs:
build_webassembly_version:
name: Build webassembly version
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
steps:
- name: start deployment
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: bobheadxi/deployments@v1
id: deployment
with:
ref: ${{ github.event.pull_request.head.sha }}
step: start
debug: true
env: preview-${{ github.event.pull_request.number }}
- name: Clone
uses: actions/checkout@v4
- name: Install Emscripten SDK
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 4.0.4
./emsdk activate 4.0.4
- name: Build fallout2 wasm module
run: |
source emsdk/emsdk_env.sh
git config --global --add safe.directory "*"
mkdir -p build
cd build
emcmake cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release && emmake make VERBOSE=1 -j 4
cd ..
- name: Add node
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
uses: actions/setup-node@v2
with:
node-version: '22'
- name: Checkout web interface
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: fallout2-ce/fallout2-ce-ems
ref: 8dc61ba6e8e62116f4810ffe89d0cece00f508d7
path: fallout2-ce-ems
- name: Set deployment path
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
id: set-path
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "DEST_DIR=PR-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
echo "SITE_BASE=/fallout2-ce/PR-${{ github.event.pull_request.number }}/" >> $GITHUB_OUTPUT
else
echo "DEST_DIR=." >> $GITHUB_OUTPUT
echo "SITE_BASE=/fallout2-ce/" >> $GITHUB_OUTPUT
fi
echo ===============================
cat $GITHUB_OUTPUT
- name: Build web interface
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
run: |
cd fallout2-ce-ems
npm install
cp ../build/fallout2-ce.js src/assets/fallout2ce
cp ../build/fallout2-ce.wasm src/assets/fallout2ce
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: Place hash file
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
run: echo "$GITHUB_SHA" > fallout2-ce-ems/dist/site_hash.txt
- 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)
run: |
sudo apt-get update && sudo apt-get install -y rsync
- name: Deploy PR preview or main site
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: fallout2-ce-ems/dist
target-folder: ${{ steps.set-path.outputs.DEST_DIR }}
clean: false
single-commit: true
- name: Check that site is deployed
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
run: |
URL="$SITE_ORIGIN""$SITE_BASE""site_hash.txt"
echo "Expecting $GITHUB_SHA from $URL"
for i in `seq 1 80`; do
got="$(curl -fsSL --max-time 10 "$URL" | tr -d '\r\n' || true)"
if [ "$got" = "$GITHUB_SHA" ]; then
echo "âś… Match on attempt $i: ${got}"
exit 0
fi
echo "Received $got, waiting"
sleep 5
done
exit 1
env:
SITE_ORIGIN: https://${{ github.repository_owner }}.github.io
SITE_BASE: ${{ steps.set-path.outputs.SITE_BASE }}
- name: Update deployment status
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: bobheadxi/deployments@v1
with:
step: finish
status: success
debug: true
env: ${{ steps.deployment.outputs.env }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
ref: ${{ github.event.pull_request.head.sha }}
env_url: https://${{ github.repository_owner }}.github.io/fallout2-ce/PR-${{ github.event.pull_request.number }}/
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,58 @@
name: Cleanup PR Preview
on:
pull_request:
types:
- closed
permissions:
contents: read
jobs:
delete_pr_preview:
name: Delete PR preview from gh-pages
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
token: ${{ secrets.GITHUB_TOKEN }}
- name: Remove PR preview folder
run: |
PR_FOLDER="PR-${{ github.event.pull_request.number }}"
echo "Removing preview folder: $PR_FOLDER"
git rm -r --ignore-unmatch "$PR_FOLDER" || true
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: $CURRENT_BRANCH"
if [ "$CURRENT_BRANCH" != "gh-pages" ]; then
echo "❌ Refusing to force-push to non-gh-pages branch: $CURRENT_BRANCH"
exit 1
fi
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit --amend -m "đźš® Remove preview for closed PR #${{ github.event.pull_request.number }}"
git push --force
fi
- name: mark environment as deactivated
uses: bobheadxi/deployments@v1
with:
step: deactivate-env
env: preview-${{ github.event.pull_request.number }}
desc: Environment was pruned
debug: true
+169 -96
View File
@@ -5,29 +5,41 @@ on:
types:
- published
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
ce-dat:
name: Build ce.dat
uses: ./.github/workflows/reusable-build-ce-dat.yml
with:
preset: linux-x64-release
android:
name: Android
runs-on: ubuntu-latest
needs: [ce-dat]
permissions:
contents: write
steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: gradle
- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: os/android/app/.cxx
key: android-cmake-v1
@@ -47,26 +59,39 @@ jobs:
cd os/android
./gradlew assembleRelease
- name: Download ce.dat
uses: actions/download-artifact@v4
with:
name: ce-dat
path: out/dist
- name: Upload
run: |
cd os/android/app/build/outputs/apk/release
cp app-release.apk fallout2-ce-android.apk
gh release upload ${{ github.ref_name }} fallout2-ce-android.apk
rm fallout2-ce-android.apk
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
rm fallout2-ce-android.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ios:
name: iOS
runs-on: macos-11
runs-on: macos-14
needs: [ce-dat]
permissions:
contents: write
steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: ios-cmake-v1
@@ -75,26 +100,42 @@ jobs:
run: |
cmake \
-B build \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/ios.toolchain.cmake \
-D ENABLE_BITCODE=0 \
-D PLATFORM=OS64 \
-G Xcode \
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \
# EOL
- name: Build
run: |
cmake \
--build build \
--config RelWithDebInfo \
-j $(sysctl -n hw.physicalcpu) \
--target package \
# EOL
- name: Pack
run: |
cd build
cpack -C RelWithDebInfo
- name: Download ce.dat
uses: actions/download-artifact@v4
with:
name: ce-dat
path: out/dist
- name: Upload
run: |
cd build
cp fallout2-ce.zip fallout2-ce-ios.ipa
gh release upload ${{ github.ref_name }} fallout2-ce-ios.ipa
rm fallout2-ce-ios.ipa
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
rm fallout2-ce-ios.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -102,6 +143,9 @@ jobs:
name: Linux (${{ matrix.arch }})
runs-on: ubuntu-20.04
needs: [ce-dat]
permissions:
contents: write
strategy:
fail-fast: false
@@ -112,7 +156,7 @@ jobs:
steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Dependencies (x86)
if: matrix.arch == 'x86'
@@ -129,7 +173,7 @@ jobs:
sudo apt install libsdl2-dev zlib1g-dev
- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: linux-${{ matrix.arch }}-cmake-v1
@@ -158,11 +202,20 @@ jobs:
-j $(nproc) \
# EOL
- name: Download ce.dat
uses: actions/download-artifact@v4
with:
name: ce-dat
path: out/dist
- name: Upload
run: |
cd build
tar -czvf fallout2-ce-linux-${{ matrix.arch }}.tar.gz fallout2-ce
gh release upload ${{ github.ref_name }} fallout2-ce-linux-${{ matrix.arch }}.tar.gz
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -171,19 +224,21 @@ jobs:
name: macOS
runs-on: macos-11
permissions:
contents: write
steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Import code signing certificates
uses: apple-actions/import-codesign-certs@v1
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_FILE_BASE64 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_PASSWORD }}
- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: macos-cmake-v3
@@ -192,75 +247,10 @@ jobs:
run: |
cmake \
-B build \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D CPACK_BUNDLE_APPLE_CERT_APP="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
# EOL
- name: Build
run: |
cmake \
--build build \
-j $(sysctl -n hw.physicalcpu) \
--target package \
# EOL
- name: Notarize
run: |
brew install mitchellh/gon/gon
cat << EOF > config.json
{
"notarize": {
"path": "build/fallout2-ce.dmg",
"bundle_id": "$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" build/fallout2-ce.app/Contents/Info.plist)",
"staple": true
}
}
EOF
gon config.json
rm config.json
env:
AC_USERNAME: ${{ secrets.APPLE_DEVELOPER_AC_USERNAME }}
AC_PASSWORD: ${{ secrets.APPLE_DEVELOPER_AC_PASSWORD }}
- name: Upload
run: |
cd build
cp fallout2-ce.dmg fallout2-ce-macos.dmg
gh release upload ${{ github.ref_name }} fallout2-ce-macos.dmg
rm fallout2-ce-macos.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
windows:
name: Windows (${{ matrix.arch }})
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- arch: x86
generator-platform: Win32
- arch: x64
generator-platform: x64
steps:
- name: Clone
uses: actions/checkout@v3
- name: Cache cmake build
uses: actions/cache@v3
with:
path: build
key: windows-${{ matrix.arch }}-cmake-v1
- name: Configure
run: |
cmake \
-B build \
-G "Visual Studio 16 2019" \
-A ${{ matrix.generator-platform }} \
-G Xcode \
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS="NO" \
-D CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS="--options=runtime --timestamp" \
# EOL
- name: Build
@@ -268,13 +258,96 @@ jobs:
cmake \
--build build \
--config RelWithDebInfo \
-j $(sysctl -n hw.physicalcpu) \
# EOL
- name: Pack
run: |
cd build
cpack -C RelWithDebInfo
- name: Notarize
run: |
xcrun notarytool submit \
"build/Fallout II Community Edition.dmg" \
--apple-id "${{ secrets.APPLE_DEVELOPER_AC_USERNAME }}" \
--team-id "${{ secrets.APPLE_DEVELOPER_AC_TEAM }}" \
--password "${{ secrets.APPLE_DEVELOPER_AC_PASSWORD }}" \
--wait
- name: Staple
run: |
xcrun stapler staple \
"build/Fallout II Community Edition.dmg"
- name: Upload
run: |
cd build/RelWithDebInfo
7z a fallout2-ce-windows-${{ matrix.arch }}.zip fallout2-ce.exe
gh release upload ${{ github.ref_name }} fallout2-ce-windows-${{ matrix.arch }}.zip
cd build
cp "Fallout II Community Edition.dmg" fallout2-ce-macos.dmg
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-macos.dmg
rm fallout2-ce-macos.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
windows:
name: Windows (${{ matrix.arch }})
runs-on: windows-2025
needs: [ce-dat]
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- arch: x86
- arch: x64
steps:
- name: Clone
uses: actions/checkout@v4
- name: Install Visual Studio 2022 Build Tools with v141_xp
shell: cmd
run: |
choco install visualstudio2022buildtools -y --package-parameters="'--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 --add Microsoft.VisualStudio.Component.VC.v141.xp --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK.10240 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.WinXP --add Microsoft.VisualStudio.Component.WinXP'"
- name: Cache cmake build
uses: actions/cache@v4
with:
path: out
key: windows-${{ matrix.arch }}-cmake-v2
- name: Configure
shell: cmd
run: |
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products Microsoft.VisualStudio.Product.BuildTools -requires Microsoft.VisualStudio.Component.VC.v141.x86.x64 Microsoft.VisualStudio.Component.VC.v141.xp -property installationPath`) do set "VS_PATH=%%i"
call "%VS_PATH%\Common7\Tools\VsDevCmd.bat" ^
&& cmake --preset windows-${{ matrix.arch }}
- name: Build
shell: cmd
run: |
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products Microsoft.VisualStudio.Product.BuildTools -requires Microsoft.VisualStudio.Component.VC.v141.x86.x64 Microsoft.VisualStudio.Component.VC.v141.xp -property installationPath`) do set "VS_PATH=%%i"
call "%VS_PATH%\Common7\Tools\VsDevCmd.bat" ^
&& cmake --build --preset windows-${{ matrix.arch }}-release
- name: Download ce.dat
uses: actions/download-artifact@v4
with:
name: ce-dat
path: out/dist
- name: Upload
run: |
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
rm fallout2-ce-windows-${{ matrix.arch }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,49 @@
name: Reusable Build ce.dat
on:
workflow_call:
inputs:
preset:
required: true
type: string
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
build-ce-dat:
name: Build ce.dat
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
- name: Dependencies
run: |
sudo apt update
sudo apt install libsdl2-dev zlib1g-dev
- name: Configure
run: |
cmake --preset ${{ inputs.preset }}
- name: Build ce-dat-tool
run: |
cmake --build --preset ${{ inputs.preset }} --target ce-dat-tool
- name: Create ce.dat
run: |
mkdir -p out/dist
out/build/${{ inputs.preset }}/ce-dat-tool create files/ce.dat out/dist/ce.dat
- name: Upload ce.dat artifact
uses: actions/upload-artifact@v4
with:
name: ce-dat
path: out/dist/ce.dat
retention-days: 7
+21
View File
@@ -9,6 +9,8 @@
*.user
*.userosscache
*.sln.docstates
.DS_Store
.local-tools/
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
@@ -388,6 +390,25 @@ FodyWeavers.xsd
.idea/
*.sln.iml
# VSCode
.vscode
# CMake
/out
/build
# versioning header
src/platform/git_version.h
CMakeUserPresets.json
# Local configs for AI agents
.opencode
.agents
.aider*
.gemini
.claude
.mcp.json
AGENTS.md
CLAUDE.md
GEMINI.md
opencode.json
+452 -58
View File
File diff suppressed because it is too large Load Diff
+293
View File
@@ -0,0 +1,293 @@
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 19,
"patch": 0
},
"configurePresets": [
{
"name": "base",
"hidden": true,
"binaryDir": "${sourceDir}/out/build/${presetName}"
},
{
"name": "windows-base",
"hidden": true,
"inherits": [
"base"
],
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "windows-x86",
"inherits": [
"windows-base"
],
"generator": "Visual Studio 17 2022",
"architecture": "Win32",
"cacheVariables": {
"CMAKE_GENERATOR_TOOLSET": "v141_xp",
"CMAKE_C_FLAGS": "/D_WIN32_WINNT=0x0501",
"CMAKE_CXX_FLAGS": "/D_WIN32_WINNT=0x0501 /D_STATIC_CPPLIB",
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>"
}
},
{
"name": "windows-x64",
"inherits": [
"windows-base"
],
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"cacheVariables": {
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>"
}
},
{
"name": "linux-base",
"hidden": true,
"inherits": [
"base"
],
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"cacheVariables": {
"FALLOUT_VENDORED": "OFF"
}
},
{
"name": "linux-x86-base",
"hidden": true,
"inherits": [
"linux-base"
],
"cacheVariables": {
"CMAKE_C_FLAGS": "-m32",
"CMAKE_CXX_FLAGS": "-m32",
"CMAKE_SYSTEM_NAME": "Linux",
"CMAKE_SYSTEM_PROCESSOR": "i386"
}
},
{
"name": "linux-x86-debug",
"inherits": [
"linux-x86-base"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "linux-x86-release",
"inherits": [
"linux-x86-base"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "linux-x64-debug",
"inherits": [
"linux-base"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "linux-x64-release",
"inherits": [
"linux-base"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "darwin-base",
"hidden": true,
"inherits": [
"base"
],
"generator": "Xcode",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "macos",
"inherits": [
"darwin-base"
]
},
{
"name": "ios",
"inherits": [
"darwin-base"
],
"cacheVariables": {
"CMAKE_SYSTEM_NAME": "iOS"
}
},
{
"name": "Mingw-base",
"hidden": true,
"description": "Base preset for all MinGW builds.",
"inherits":[
"base"
],
"generator": "Ninja",
"toolchainFile": "${sourceDir}/cmake/toolchain/mingw.cmake",
"cacheVariables": {
"CMAKE_SYSTEM_NAME": "Windows"
}
},
{
"name": "Mingw-x86-base",
"hidden": true,
"description": "Base preset for all MinGW x86 builds.",
"inherits": [
"Mingw-base"
],
"cacheVariables": {
"CMAKE_C_FLAGS": "-m32",
"CMAKE_CXX_FLAGS": "-m32",
"CMAKE_SYSTEM_PROCESSOR": "i686"
}
},
{
"name": "Mingw-x86-debug",
"displayName": "MinGW x86 Debug",
"description": "Cross-compile a Debug Windows x86 build with MinGW-w64 and Ninja.",
"inherits": [
"Mingw-x86-base"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "Mingw-x86-release",
"displayName": "MinGW x86 Release",
"description": "Cross-compile a RelWithDebInfo Windows x86 build with MinGW-w64 and Ninja.",
"inherits": [
"Mingw-x86-debug"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "Mingw-x64-debug",
"displayName": "MinGW x64 Debug",
"description": "Cross-compile a Debug Windows x64 build with MinGW-w64 and Ninja.",
"inherits": [
"Mingw-base"
],
"cacheVariables": {
"CMAKE_SYSTEM_PROCESSOR": "x86_64",
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "Mingw-x64-release",
"displayName": "MinGW x64 Release",
"description": "Cross-compile a RelWithDebInfo Windows x64 build with MinGW-w64 and Ninja.",
"inherits": [
"Mingw-x64-debug"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
}
],
"buildPresets": [
{
"name": "windows-x86-debug",
"configurePreset": "windows-x86",
"configuration": "Debug"
},
{
"name": "windows-x86-release",
"configurePreset": "windows-x86",
"configuration": "RelWithDebInfo"
},
{
"name": "windows-x64-debug",
"configurePreset": "windows-x64",
"configuration": "Debug"
},
{
"name": "windows-x64-release",
"configurePreset": "windows-x64",
"configuration": "RelWithDebInfo"
},
{
"name": "linux-x86-debug",
"configurePreset": "linux-x86-debug"
},
{
"name": "linux-x86-release",
"configurePreset": "linux-x86-release"
},
{
"name": "linux-x64-debug",
"configurePreset": "linux-x64-debug"
},
{
"name": "linux-x64-release",
"configurePreset": "linux-x64-release"
},
{
"name": "macos-debug",
"configurePreset": "macos",
"configuration": "Debug"
},
{
"name": "macos-release",
"configurePreset": "macos",
"configuration": "RelWithDebInfo"
},
{
"name": "ios-debug",
"configurePreset": "ios",
"configuration": "Debug"
},
{
"name": "ios-release",
"configurePreset": "ios",
"configuration": "RelWithDebInfo"
},
{
"name": "Mingw-x86-Debug",
"displayName": "MinGW x86 Debug",
"configurePreset": "Mingw-x86-debug"
},
{
"name": "Mingw-x86-Release",
"displayName": "MinGW x86 Release",
"configurePreset": "Mingw-x86-release"
},
{
"name": "Mingw-x64-Debug",
"displayName": "MinGW x64 Debug",
"configurePreset": "Mingw-x64-debug"
},
{
"name": "Mingw-x64-Release",
"displayName": "MinGW x64 Release",
"configurePreset": "Mingw-x64-release"
}
]
}
-50
View File
@@ -1,50 +0,0 @@
{
"configurations": [
{
"name": "x86-Debug",
"generator": "Visual Studio 16 2019",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x86" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x86-Release",
"generator": "Visual Studio 16 2019",
"configurationType": "Release",
"inheritEnvironments": [ "msvc_x86" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x64-Debug",
"generator": "Visual Studio 16 2019 Win64",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
},
{
"name": "x64-Release",
"generator": "Visual Studio 16 2019 Win64",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
}
+129
View File
@@ -0,0 +1,129 @@
# Contributing
This file is currently a shell to be filled in over time. For now, it only captures project-specific maintenance notes that are easy to miss.
For current sfall compatibility status and the remaining work needed to close gaps, see [SFALL_COMPATIBILITY.md](SFALL_COMPATIBILITY.md).
## Building
The project uses CMake, so building mostly comes down to picking the right preset.
## Commandline arguments
- `--scan-unimplemented` - do an analysis of opcodes and hooks used by loaded mods
- `--dev-load-game=1` - load the given save game automatically (useful for LLM automation)
### macOS
- Install the Command Line Tools if needed: `xcode-select --install`
- Install the common build dependencies: `brew install cmake ninja`
- Configure and build:
```sh
cmake -S . -B out/build/macos -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build out/build/macos --target fallout2-ce
```
### Linux
Install SDL and a toolchain:
- Debian / Ubuntu:
```sh
sudo apt install build-essential cmake ninja-build libsdl2-dev zlib1g-dev
```
- Fedora:
```sh
sudo dnf install gcc-c++ cmake ninja-build SDL2-devel zlib-devel
```
- Arch Linux:
```sh
sudo pacman -S base-devel cmake ninja sdl2 zlib
```
Then build:
```
cmake -S . -B out/build/linux-x64-debug -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build out/build/linux-x64-debug --target fallout2-ce
```
### Windows
TODO: add Visual Studio build instructions. This will likely need a Visual Studio generator or preset plus the MSVC toolchain and Windows SDK.
## `.dat` CLI Tool
There is a small command-line archive tool in this repo for inspecting Fallout `.dat` files. It supports both Fallout 2 and Fallout 1 archives.
From the repo root, build it with your normal CMake workflow, targeting `ce-dat-tool`:
`cmake --build out/build/<preset-name> --target ce-dat-tool`
The executable is written to your selected build directory, so the exact path will vary by preset and configuration.
Available commands:
1. `./<BUILD_DIR>/ce-dat-tool <archive.dat> list [pattern]`
2. `ce-dat-tool <archive.dat> info [pattern]`
3. `ce-dat-tool <archive.dat> extract [--lower] <output-dir> [pattern]`
4. `ce-dat-tool <archive.dat> extract [--lower] (--file-list|--files-from) <list-file> <output-dir>`
5. `ce-dat-tool <archive.dat> cat <entry>`
6. `ce-dat-tool create <input-dir> <archive.dat>`
Use `--lower` with `extract` when you want every extracted file and directory name forced to lowercase.
For example:
`ce-dat-tool master.dat extract --lower /tmp/ce-dat-tool-lower data\\*`
## `ce-frm2png` CLI Tool
There is also a small FRM conversion tool in this repo for converting Fallout art between `.frm` and `.png`.
From the repo root, build it with your normal CMake workflow, targeting `ce-frm2png`:
`cmake --build out/build/<preset-name> --target ce-frm2png`
The executable is written to your selected build directory, so the exact path will vary by preset and configuration.
Basic usage:
1. `./<BUILD_DIR>/ce-frm2png <input.frm> [output.png]`
2. `./<BUILD_DIR>/ce-frm2png <input.frm> [output.png] --palette <path-to-color.pal>`
3. `./<BUILD_DIR>/ce-frm2png <input.frm> [output.png] --frame <index> --direction <index>`
4. `./<BUILD_DIR>/ce-frm2png <input.png> [output.frm] --palette <path-to-color.pal>`
5. `./<BUILD_DIR>/ce-frm2png <input.png> [output.frm] --fps 10 --action-frame 0 --x-offset 0 --y-offset 0`
6. `./<BUILD_DIR>/ce-frm2png <input.png> <output.png> --palette <path-to-color.pal>`
7. `./<BUILD_DIR>/ce-frm2png - [output.png|-] --from-frm --palette <path-to-color.pal>`
8. `./<BUILD_DIR>/ce-frm2png - [output.frm|-] --from-png --palette <path-to-color.pal>`
`-` can be used to take input from stdin (e.g. from `ce-dat-tool cat`) or write to stdout. When reading from stdin, pass `--from-frm` or `--from-png`. Output defaults to PNG for FRM input and FRM for PNG input when output is omitted or `-`; use `--to-png` for PNG output to stdout from PNG input.
Output file extensions are validated against the selected conversion. For example, PNG-to-FRM output must use `.frm`, and PNG output must use `.png`.
If `--palette` isn't specified, it will pick up `color.pal` in the input file's directory or cwd.
Notes:
- The tool expects a raw `color.pal` file. It does not read palettes directly from `master.dat`, so extract `color.pal` first if needed.
- A typical extraction flow is: `ce-dat-tool master.dat extract --lower . 'color.pal'`
- By default palette index `0` becomes transparent in the output PNG. Pass `--opaque` to keep it opaque.
- PNG output is always palette-indexed and preserves Fallout palette indices when possible.
- For `png -> frm`, transparent pixels (alpha below 128) map to palette index `0` by default. Pass `--opaque` to quantize every pixel instead.
- The current `png -> frm` implementation writes a single-frame FRM and points all six direction slots at the same frame payload.
## Updating SDL
SDL is pinned for native builds in `third_party/sdl2/CMakeLists.txt`. Right now, Android also relies on checked-in Java bindings in `os/android/app/src/main/java/org/libsdl/app`, and those bindings must match the SDL version fetched by CMake.
When updating SDL:
1. Update the SDL tag in `third_party/sdl2/CMakeLists.txt`.
2. Run an Android build once so Gradle/CMake fetch the new SDL source tree.
3. Copy the Android Java bindings from the fetched SDL checkout into `os/android/app/src/main/java/org/libsdl/app`.
Source path pattern:
`os/android/app/.cxx/<Variant>/<Hash>/arm64-v8a/_deps/sdl2-src/android-project/app/src/main/java/org/libsdl/app`
4. Rebuild Android and confirm the SDL sync guard passes.
The Android build contains a guard in `os/android/app/build.gradle` that fails if the checked-in Java bindings drift from the fetched native SDL source.
This is a hack, not a good long-term setup. The Java bindings are still duplicated in the repo instead of being sourced from the same SDL tree as the native build. That should be improved so Android does not depend on a manual copy/sync step.
+160 -18
View File
@@ -1,25 +1,120 @@
# Fallout 2 Community Edition
# Fallout 2 Community Engine
## Installation
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.
You must own the game to play. Purchase your copy on [GOG](https://www.gog.com/game/fallout_2) or [Steam](https://store.steampowered.com/app/38410). Download latest release or build from source.
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. 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, including NPC Armor, Party Orders, FO2Tweaks (we recommend v14.5+), Talking Heads, and many others.
## Installation — [Download Latest CE Release](https://github.com/fallout2-ce/fallout2-ce/releases)
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 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
Download and copy `fallout2-ce.exe` to your `Fallout2` folder. It serves as a drop-in replacement for `fallout2.exe`.
[Download](https://github.com/fallout2-ce/fallout2-ce/releases) and unzip into your `Fallout2` folder. Launch the game using `fallout2-ce.exe`.
### Linux
- Use Windows installation as a base - it contains data assets needed to play. Copy `Fallout2` folder somewhere, for example `/home/john/Desktop/Fallout2`.
- Download and copy `fallout2-ce` to this folder.
- Install [SDL2](https://libsdl.org/download-2.0.php):
- Alternatively you can extract the needed files from the GoG installer:
```console
$ sudo apt install libsdl2-2.0-0
$ sudo apt install innoextract
$ innoextract ~/Downloads/setup_fallout_2_1.02_gog_v1_\(77792\).exe -d Fallout2
```
- Download the Linux release archive, extract `fallout2-ce` and `ce.dat`, and copy them into this folder.
- Run `./fallout2-ce`.
### macOS
@@ -30,19 +125,35 @@ $ sudo apt install libsdl2-2.0-0
- Alternatively you can use Fallout 2 from Macplay/The Omni Group as a base - you need to extract game assets from the original bundle. Mount CD/DMG, right click `Fallout 2` -> `Show Package Contents`, navigate to `Contents/Resources`. Copy `GameData` folder somewhere, for example `/Applications/Fallout2`.
- Download and copy `fallout2-ce.app` to this folder.
- Or if you're a Terminal user and have Homebrew installed you can extract the needed files from the GoG installer. **Note**: You must use "Offline backup game installer", not the main game installer.
- Run `fallout2-ce.app`.
```console
$ brew install innoextract
$ innoextract ~/Downloads/setup_fallout_2_1.02_gog_v1_\(77792\).exe -d fallout2
$ mv fallout2 /Applications/Fallout2
```
- [Download](https://github.com/fallout2-ce/fallout2-ce/releases) and copy `Fallout II Community Edition.app` to this folder.
- Run `Fallout II Community Edition.app`.
### Android
> **NOTE**: Fallout 2 was designed with mouse in mind. There are many controls that require precise cursor positioning, which is not possible with fingers. When playing on Android you'll use fingers to move mouse cursor, not a character, or a map. Double tap to "click" left mouse button in the current cursor position, triple tap to "click" right mouse button. It might feel awkward at first, but it's super handy - you can play with just a thumb. This is not set in stone and might change in the future.
> **NOTE**: Fallout 2 was designed with mouse in mind. There are many controls that require precise cursor positioning, which is not possible with fingers. Current control scheme resembles trackpad usage:
- One finger moves mouse cursor around.
- Tap one finger for left mouse click.
- Tap two fingers for right mouse click (switches mouse cursor mode).
- Move two fingers to scroll current view (map view, worldmap view, inventory scrollers).
- Use Windows installation as a base - it contains data assets needed to play. Copy `Fallout2` folder to your device, for example to `Downloads`. You need `master.dat`, `critter.dat`, `patch000.dat`, and `data` folder.
> **NOTE**: From Android standpoint release and debug builds are different apps. Both apps require their own copy of game assets and have their own savegames. This is intentional. As a gamer just stick with release version and check for updates.
- Download `fallout2-ce.apk` and copy it to your device. Open it with file explorer, follow instructions (install from unknown source).
- Download the Android [release](https://github.com/fallout2-ce/fallout2-ce/releases), which contains an .apk file and `ce.dat`.
- When you run the game for the first time it will immediately present file picker. Select the folder from the first step. Wait until this data is copied. A loading dialog will appear, just wait for about 30 seconds. The game will start automatically.
- Use Windows installation as a base - it contains data assets needed to play. Copy `Fallout2` folder to your device, for example to `Downloads`. You need `master.dat`, `critter.dat`, `patch000.dat`, and `data` folder. Watch for file names - keep (or make) them lowercased (see [Configuration](#configuration)). Copy `ce.dat` into this folder.
- Copy `fallout2-ce.apk` from the release to your device. Open it with file explorer, follow instructions (install from unknown source).
- When you run the game for the first time it will immediately present file picker. Select the folder from the first step. Wait until this data is copied. A loading dialog will appear, just wait for about 30 seconds. If you're installing total conversion mod or localized version with a large number of unpacked resources in `data` folder it can take up to 20 minutes. Once copied, the game will start automatically.
### iOS
@@ -52,15 +163,46 @@ $ sudo apt install libsdl2-2.0-0
- Run the game once. You'll see error message saying "Couldn't find/load text fonts". This step is needed for iOS to expose the game via File Sharing feature.
- Use Finder (macOS Catalina and later) or iTunes (Windows and macOS Mojave or earlier) to copy `master.dat`, `critter.dat`, `patch000.dat`, and `data` folder to "Fallout 2" app ([how-to](https://support.apple.com/HT210598)).
- Use Finder (macOS Catalina and later) or iTunes (Windows and macOS Mojave or earlier) to copy `master.dat`, `critter.dat`, `patch000.dat`, `ce.dat`, and `data` folder to "Fallout 2" app ([how-to](https://support.apple.com/HT210598)). Watch for file names - keep (or make) them lowercased (see [Configuration](#configuration)).
-
**Controls on iPad:**
- One-finger tap → left click; hold → left button held.
- Two-finger tap → right click (cycles cursor mode between walk and attack).
- One-finger drag → scroll map / windows.
- Two-finger drag → mouse wheel.
- **Three-finger swipe down → ESC** (opens options / main menu).
- **Four-finger long press → F6** (quicksave). Hold four fingers on the screen for about half a second.
- **Three-finger long press → hold Shift** (highlights interactable objects — containers, doors, items — while held).
- Taps on the HUD (interface bar / end-turn / end-combat buttons) act as direct touches so small buttons are easy to hit without aiming.
- A Bluetooth keyboard works for everything else (numbered dialog choices, load game, etc.).
### Browser
> **NOTE**: WebAssembly build with emscripten
```
docker run --rm -v $(pwd):/src emscripten/emsdk:3.1.74 sh -c 'git config --global --add safe.directory "*" && mkdir -p build && cd build && emcmake cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/Emscripten.cmake && emmake make'
```
- Demo available at https://github.com/ololoken/fallout2-ce-ems.git
## 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.
For build instructions and contributor notes, see [CONTRIBUTING.md](CONTRIBUTING.md).
### Intergrating Sfall
Integrating Sfall goodies is the top priority. Quality of life updates are OK too. In any case open up an issue with your suggestion or to notify other people that something is being worked on.
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.
For current sfall compatibility status and the remaining work needed to close gaps, see [SFALL_COMPATIBILITY.md](SFALL_COMPATIBILITY.md).
## For modders
* Robust (though not 100%) Sfall opcode and hook support
* .ogg/.wav support for map music
* .png support for static assets (must be 8bit indexed)
* .zip support for .dat archives
* Working BIS mapper
## License
+154
View File
@@ -0,0 +1,154 @@
# Sfall Compatibility
This document tracks Fallout 2 CE compatibility with sfall. This is for modders who need to know which Sfall features work in CE.
For now, this covers opcodes/metarules, and hooks. In the future, it will include other ways of modifying the engine (like ini files), and other Sfall-specific behaviour.
## HRP EDG Scroll-Blocker Support
CE supports the `.edg` file format from the HRP (High Resolution Patch), which defines per-map scroll boundaries and square-level render clipping.
**How it works in CE:**
- On map load, `maps/<mapname>.edg` is read if present. Missing file = silent fallback to the scroll-blocker object system.
- The `.edg` file defines per-elevation rectangle boundary zones. Multiple chained zones per elevation are supported.
- When loaded, these zones are used for both scroll blocking and visible area clipping (black bars), replacing both vanilla scroll blocking and CE hi-res stencil system.
- v2 EDG files also contain a `SquareRect` that defines "Angled edges", or square-grid stencil. This is also supported.
## Settings (ddraw.ini → fallout2.cfg / game.cfg)
Settings previously read from `ddraw.ini` have been moved into standard CE config files.
Most settings that control game behavior (premade characters, extra message files, combat tweaks, worldmap, etc.) have been moved into [`<DAT>/config/game.cfg`](files/ce.dat/config/game.cfg), which is a content-mod config file intended to be overridden by mods. See that file for the full list with descriptions.
The following settings were moved into [`fallout2.cfg`](files/fallout2.cfg) instead:
| ddraw.ini section | ddraw.ini key | fallout2.cfg section | fallout2.cfg key |
| --- | --- | --- | --- |
| `Misc` | `SkipOpeningMovies` | `ui` | `skip_opening_movies` |
| `Misc` | `DisplayKarmaChanges` | `ui` | `display_karma_changes` |
| `Misc` | `DisplayBonusDamage` | `ui` | `display_bonus_damage` |
| `Misc` | `NumbersInDialogue` | `ui` | `numbers_in_dialogue` |
| `Misc` | `AutoQuickSave` | `ui` | `auto_quick_save` |
| `Main` | `EnableHighResolutionStencil` | `ui` | `enable_high_resolution_stencil` |
| `Misc` | `ConsoleOutputPath` | `debug` | `console_output_path` |
| `Misc` | `GaplessMusic` | `sound` | `gapless_music` |
| `Misc` | `ScreenshotsFormat` | `system` | `screenshots_format` |
| `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.
| Group | Opcodes In Group | Compatibility | Notes |
| --- | --- | --- | --- |
| Direct memory access| read_byte,short,int,string<br>write_byte,short,int,string<br>call_offset_vX | đźš« | Not possible. Open an issue if you need functionality not covered by other opcodes. |
| Stats | get/set_pc_base_stat<br>get/set_pc_extra_stat<br>get/set_critter_base_stat<br>get/set_critter_extra_stat | âś… | CE uses engine stat helpers here instead of sfall's direct proto-field behavior, so derived-stat update behavior can differ. |
| Stats / Alter min/max | get/set_stat_min/max<br>set_pc_stat_min/max<br>set_npc_stat_min/max | not implemented | - |
| Skills | get/set_critter_skill_points<br>get/set_available_skill_points<br>set_skill_max<br>set_critter_skill_mod<br>set_base_skill_mod<br>mod_skill_points_per_level | not implemented | - |
| Graphics | graphics_funcs_available<br>force_graphics_refresh<br>get_screen_width<br>get_screen_height<br>set_palette | implemented: only get_screen_width, get_screen_height | - |
| Shaders | load_shader<br>free_shader<br>activate_shader<br>deactivate_shader<br>set/get_shader_* | đźš« | likely will not implement direct compatibility
| 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, 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 | âś… | - |
| Sfall / Version | sfall_ver_major<br>sfall_ver_minor<br>sfall_ver_build | âś… | CE currently reports `4.3.4` |
| Utility / Math | log, exponent, round, sqrt, abs, sin, cos, tan, arctan, ceil, ^, floor2, div | âś… | - |
| Keyboard and mouse | key_pressed<br>tap_key<br>get_mouse_x/y<br>get_mouse_buttons | âś… | - |
| Lists | list_begin<br>list_next<br>list_end<br>list_as_array<br>party_member_list | âś… | - |
| Explosions | set_attack_explosion_pattern<br>set_attack_explosion_art<br>set_attack_explosion_radius<br>set_attack_is_explosion_fire<br>set_explosion_radius<br>set_dynamite_damage<br>set_plastic_damage<br>get_explosion_damage<br>set_explosion_max_targets<br>item_make_explosive | âś… except item_make_explosive | - |
| Animations | reg_anim_combat_check<br>reg_anim_destroy<br>reg_anim_animate_and_hide<br>reg_anim_light<br>reg_anim_change_fid<br>reg_anim_take_out<br>reg_anim_turn_towards<br>reg_anim_callback<br>reg_anim_animate_and_move | âś… except reg_anim_callback | - |
| Art and appearance | art_exists<br>art_frame_data<br>refresh_pc_art<br>art_cache_clear | âś… | - |
| Tiles and paths | get_tile_fid<br>tile_under_cursor<br>tile_light<br>tile_get_objs<br>tile_refresh_display<br>obj_blocking_tile<br>tile_by_position<br>get_tile_ground_fid<br>get_tile_roof_fid<br>obj_blocking_line<br>path_find_to<br>objects_in_radius | âś… | - |
| Utility | sprintf<br>typeof<br>atoi<br>atof | âś… | - |
| Utility / Strings | string_split<br>substr<br>strlen<br>charcode<br>get_string_pointer<br>string_find<br>string_find_from<br>string_format<br>string_format_array<br>string_replace<br>string_to_case<br>string_compare | âś… | `get_string_pointer` is deprecated and intentionally omitted. |
| Interface / Tags | show_iface_tag<br>hide_iface_tag<br>is_iface_tag_active<br>set_iface_tag_text<br>add_iface_tag | âś… | Legacy `BoxBarCount`, `BoxBarColors` ddraw.ini settings not supported. |
| Global variables | set_sfall_global<br>get_sfall_global_int<br>get_sfall_global_float | âś… except get_sfall_global_float | Current CE storage is int-backed; `set_sfall_global` stores integer values |
| Hooks / Hook functions | init_hook<br>get_sfall_arg<br>get_sfall_args<br>get_sfall_arg_at<br>set_sfall_return<br>set_sfall_arg<br>register_hook<br>register_hook_proc<br>register_hook_proc_spec | âś… | See below for implemented hooks. `init_hook` is deprecated and will not be implemented. register_hook_proc and register_hook_proc_spec both add hooks to the *end* of the hook list, instead of beginning and end, respectively. |
| Arrays / Array functions | create_array<br>temp_array<br>fix_array<br>get/set_array<br>resize_array<br>free_array<br>scan_array<br>len_array<br>save/load_array<br>array_key<br>arrayexpr | âś… | - |
| Perks and traits / NPC perks | set_fake_perk_npc<br>set_fake_trait_npc<br>set_selectable_perk_npc<br>has_fake_perk_npc<br>has_fake_trait_npc | not implemented | - |
| Global scripts / Global script functions | set_global_script_repeat<br>set_global_script_type<br>available_global_script_types | âś… except available_global_script_types | - |
| Combat | attack_is_aimed<br>block_combat<br>force_aimed_shots<br>disable_aimed_shots<br>get_attack_type<br>get/set_bodypart_hit_modifier<br>combat_data<br>get/set/reset_critical_table<br>get_last_target<br>get_last_attacker<br>set_critter_burst_disable<br>get/set_critter_current_ap<br>set_spray_settings<br>get/set_combat_free_move | âś… except block_combat, force_aimed_shots, disable_aimed_shots, get_last_target, get_last_attacker, set_spray_settings | - |
| Car | set_car_current_town<br>car_gas_amount<br>set_car_intface_art | implemented: all except set_car_intface_art | - |
| Interface / Windows and images | interface_art_draw<br>interface_print<br>draw_image{_scaled}<br>get_window_under_mouse<br>create_win<br>get_window_attribute<br>message_box<br>set_window_flag<br>win_fill_color<br>interface_overlay<br>dialog_message<br>get_text_width<br>hide_window<br>show_window<br>create_message_window | âś… except interface_print, interface_overlay | - |
| Interface / Outline | outlined_object<br>get_outline<br>set_outline | âś… | - |
| Interface / Main interface | intface_is_hidden<br>intface_redraw<br>intface_hide<br>intface_show<br>set_quest_failure_value | implemented: only intface_redraw | `intface_redraw` only supports the zero-argument form; the optional-argument path is explicitly unimplemented. |
| Interface / Inventory | display_stats<br>inventory_redraw<br>critter_inven_obj2<br>get_current_inven_size<br>item_weight | âś… except get_current_inven_size | - |
| Interface / Cursor | get/set_cursor_mode | âś… | - |
| Locks | lock_is_jammed<br>unjam_lock<br>set_unjam_locks_time | not implemented | - |
| INI settings | get_ini_setting<br>get_ini_string<br>get_ini_section<br>get_ini_sections<br>get_ini_config<br>get_ini_config_db<br>set_ini_setting | âś… | `modified_ini` is intentionally omitted as deprecated. |
| Objects and scripts | set_self<br>set_dude_obj<br>real_dude_obj<br>remove_script<br>get/set_script<br>obj_is_carrying_obj<br>loot_obj<br>dialog_obj<br>obj_under_cursor<br>get/set_object_data<br>get/set_flags<br>set_unique_id<br>set_scr_name<br>obj_is_openable<br>get/set_proto_data<br>get_object_ai_data | âś… except set_dude_obj, set_scr_name | `get/set_object_data` maps supported object and `C_ATTACK_*` offsets instead of exposing arbitrary raw memory offsets. |
| Other / Game management | set_movie_path<br>stop/resume_game<br>mark_movie_played<br>game_loaded<br>get_game_mode<br>get_uptime<br>signal_close_game | implemented: game_loaded, get_game_mode, get_uptime, signal_close_game | - |
| Gameplay tweaks | set_pickpocket_max<br>set_hit_chance_max<br>set_xp_mod<br>set_critter_hit_chance_mod<br>set_base_hit_chance_mod<br>set_hp_per_level_mod<br>gdialog_get_barter_mod<br>get/set_unspent_ap_bonus<br>get/set_unspent_ap_perk_bonus<br>set_base_pickpocket_mod<br>set_critter_pickpocket_mod<br>get/set_inven_ap_cost<br>set_drugs_data<br>get_kill_counter<br>mod_kill_counter<br>set_pipboy_available | implemented: gdialog_get_barter_mod, get/set_unspent_ap{_perk}_bonus, get/set_inven_ap_cost | - |
| NPCs | inc_npc_level<br>get_npc_level<br>npc_engine_level_up | not implemented | - |
| Hero Appearance | set_dm/df_model<br>hero_select_win<br>set_hero_race<br>set_hero_style | not implemented | - |
| Events | add_g_timer_event<br>remove_timer_event<br>create_spatial<br>spatial_radius | not implemented | - |
| Other | get_year<br>active_hand<br>toggle_active_hand<br>get/set_viewport_x/y<br>get_light_level<br>message_str_game<br>sneak_success<br>unwield_slot<br>add_extra_msg_file<br>get_metarule_table<br>metarule_exist<br> | âś… except get/set_viewport_x/y, sneak_success | `input_funcs_available`, `nb_create_char` are deprecated in sfall and intentionally absent in CE. `add_extra_msg_file` does not support the explicit `fileNumber` form in CE. |
## Hooks
| Hook | ID | Compatibility | Notes |
| --- | --- | --- | --- |
| ToHit | `HOOK_TOHIT` | âś… | - |
| AfterHitRoll | `HOOK_AFTERHITROLL` | âś… | Overriding `defender` leaves a lot of attack variables in previous state (e.g. distance, ->oops, roundsHitMainTarget) |
| CalcAPCost | `HOOK_CALCAPCOST` | âś… | - |
| DeathAnim1 | `HOOK_DEATHANIM1` | đźš« | Use DEATHANIM2 instead |
| DeathAnim2 | `HOOK_DEATHANIM2` | âś… | - |
| CombatDamage | `HOOK_COMBATDAMAGE` | âś… | - |
| OnDeath | `HOOK_ONDEATH` | âś… | - |
| FindTarget | `HOOK_FINDTARGET` | đźš« | (maybe) |
| UseObjOn | `HOOK_USEOBJON` | âś… | - |
| UseObj | `HOOK_USEOBJ` | âś… | CE notes an sfall-matching inconsistency around return code `2` behavior between interface contexts. |
| RemoveInvenObj | `HOOK_REMOVEINVENOBJ` | âś… | - |
| BarterPrice | `HOOK_BARTERPRICE` | âś… | - |
| ItemDamage | `HOOK_ITEMDAMAGE` | âś… | - |
| MoveCost | `HOOK_MOVECOST` | âś… | - |
| AmmoCost | `HOOK_AMMOCOST` | âś… | Requires `check_weapon_ammo_cost=1` if you want pre-attack ammo validation to respect per-shot/per-round overrides. |
| KeyPress | `HOOK_KEYPRESS` | âś… | Third hook arg is currently `0`; CE doesn't use VK codes. |
| MouseClick | `HOOK_MOUSECLICK` | âś… | - |
| UseSkill | `HOOK_USESKILL` | âś… | - |
| Steal | `HOOK_STEAL` | âś… | - |
| WithinPerception | `HOOK_WITHINPERCEPTION` | âś… | - |
| InventoryMove | `HOOK_INVENTORYMOVE` | âś… | - |
| InvenWield | `HOOK_INVENWIELD` | âś… | - |
| AdjustFID | `HOOK_ADJUSTFID` | âś… | Second hook arg currently matches the first because CE has no internal FID modifiers like Hero Appearance. |
| CombatTurn | `HOOK_COMBATTURN` | âś… | - |
| StdProcedure | `HOOK_STDPROCEDURE` | âś… | - |
| StdProcedureEnd | `HOOK_STDPROCEDURE_END` | âś… | - |
| CarTravel | `HOOK_CARTRAVEL` | đźš« | - |
| SetGlobalVar | `HOOK_SETGLOBALVAR` | đźš« | - |
| RestTimer | `HOOK_RESTTIMER` | âś… | CE is slightly more strict: only `ret0 == 1` interrupts. Ticks wrap every 6.8y; do not rely on them for absolute game time. |
| GameModeChange | `HOOK_GAMEMODECHANGE` | âś… | - |
| UseAnimObj | `HOOK_USEANIMOBJ` | đźš« | Et tu; (maybe) |
| ExplosiveTimer | `HOOK_EXPLOSIVETIMER` | âś… | - |
| DescriptionObj | `HOOK_DESCRIPTIONOBJ` | đźš« | Et tu |
| UseSkillOn | `HOOK_USESKILLON` | âś… | - |
| OnExplosion | `HOOK_ONEXPLOSION` | đźš« | (maybe) |
| SubCombatDamage | `HOOK_SUBCOMBATDAMAGE` | đźš« | (maybe) |
| SetLighting | `HOOK_SETLIGHTING` | đźš« | Et tu; (maybe) |
| Sneak | `HOOK_SNEAK` | đźš« | - |
| TargetObject | `HOOK_TARGETOBJECT` | đźš« | (maybe) |
| Encounter | `HOOK_ENCOUNTER` | âś… | - |
| AdjustPoison | `HOOK_ADJUSTPOISON` | đźš« | (maybe) |
| AdjustRads | `HOOK_ADJUSTRADS` | đźš« | (maybe) |
| RollCheck | `HOOK_ROLLCHECK` | đźš« | - |
| BestWeapon | `HOOK_BESTWEAPON` | đźš« | - |
| CanUseWeapon | `HOOK_CANUSEWEAPON` | âś… | - |
| BuildSfxWeapon | `HOOK_BUILDSFXWEAPON` | đźš« | - |
+48
View File
@@ -0,0 +1,48 @@
# Get author name
execute_process(
COMMAND git log -1 --pretty=format:%an
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE AUTHOR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get current branch
execute_process(
COMMAND git branch --show-current
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get hash of the latest commit
execute_process(
COMMAND git log --pretty=format:%h -n 1
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get last tag
execute_process(
COMMAND git describe --tags --abbrev=0
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE LATEST_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get date of the latest commit
execute_process(
COMMAND git log -1 --date=format:"%b %d %Y %H:%M:%S" --pretty=format:%cd
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Define a variable for CI_BUILD
set(CI_BUILD 0)
# Create git_version.h file
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/platform/git_version.h.in
${CMAKE_CURRENT_SOURCE_DIR}/src/platform/git_version.h
)
+18
View File
@@ -0,0 +1,18 @@
set( CMAKE_SYSTEM_NAME "Emscripten" )
add_compile_definitions("DEBUG=$<CONFIG:Debug>")
set( CMAKE_C_COMPILER "emcc" )
set( CMAKE_CXX_COMPILER "em++" )
set( EXECUTABLE_NAME fallout2-ce.js )
option(OPTION_WASM_64 "Build wasm64 module" OFF)
option(OPTION_WASM_JSPI "Build wasm with JSPI support instead of asyncify module" OFF)
# Touch toolchain variable to suppress "unused variable" warning.
# This happens if CMake is invoked with the same command line the second time.
if(CMAKE_TOOLCHAIN_FILE)
endif()
-4
View File
@@ -1,4 +0,0 @@
set( CMAKE_SYSTEM_NAME "Linux" )
set( CMAKE_SYSTEM_PROCESSOR "i386" )
set( CMAKE_C_FLAGS "-m32" )
set( CMAKE_CXX_FLAGS "-m32" )
File diff suppressed because it is too large Load Diff

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