Compare commits

..
Author SHA1 Message Date
google-labs-jules[bot] a59d88f9f5 feat: Implement interface tag functions
I've implemented new sfall script functions to control interface tags (boxes appearing above the interface like SNEAK, LEVEL).

New functions:
- `add_iface_tag()`: Adds a new custom interface tag box. Returns the ID of the new tag (5 to 130) or -1 if the limit (126 custom tags) is reached.
- `show_iface_tag(tag_id)`: Activates a specified tag.
  - For predefined tags: 0 (SNEAK), 3 (LEVEL), 4 (ADDICT), modifies player state.
  - For custom tags (5+): Activates the custom box.
- `hide_iface_tag(tag_id)`: Deactivates a specified tag.
  - For predefined tags: Clears player state.
  - For custom tags: Deactivates the custom box.
- `is_iface_tag_active(tag_id)`: Returns 1 if the tag is active, 0 otherwise.
  - Checks game state for predefined tags: 0 (SNEAK), 1 (POISONED), 2 (RADIATED), 3 (LEVEL), 4 (ADDICT).
  - Checks status for custom tags (5+).
- `set_iface_tag_text(tag_id, text, color)`: Sets the display text (max 19 chars) and color for a custom interface tag.

I've made changes to `interface.h`, `interface.cc`, `sfall_opcodes.cc`, and `sfall_metarules.cc` to implement these features. I also created a new file `sfall_testing/gl_test_iface_tags.ssl` to test all the new functionalities.
2025-06-22 04:43:38 +00:00
86 changed files with 857 additions and 1917 deletions
+5 -5
View File
@@ -87,7 +87,7 @@ jobs:
uses: actions/cache@v4
with:
path: os/android/app/.cxx
key: android-cmake-v100
key: android-cmake-v2
- name: Setup signing config
if: env.KEYSTORE_FILE_BASE64 != '' && env.KEYSTORE_PROPERTIES_FILE_BASE64 != ''
@@ -128,7 +128,7 @@ jobs:
uses: actions/cache@v4
with:
path: out
key: ios-cmake-v100
key: ios-cmake-v5
- name: Configure
run: |
@@ -183,7 +183,7 @@ jobs:
uses: actions/cache@v4
with:
path: out
key: linux-${{ matrix.arch }}-cmake-v100
key: linux-${{ matrix.arch }}-cmake-v3
- name: Configure
run: |
@@ -288,7 +288,7 @@ jobs:
uses: actions/cache@v4
with:
path: out
key: macos-cmake-v100
key: macos-cmake-v6
- name: Configure
run: |
@@ -337,7 +337,7 @@ jobs:
uses: actions/cache@v4
with:
path: out
key: windows-${{ matrix.arch }}-cmake-v100
key: windows-${{ matrix.arch }}-cmake-v3
- name: Configure
shell: cmd
-1
View File
@@ -290,7 +290,6 @@ target_sources(${EXECUTABLE_NAME} PUBLIC
"src/sfall_arrays.h"
"src/touch.cc"
"src/touch.h"
"src/scan_unimplemented.cc"
)
if(IOS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

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