mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Expanded show/hide_iface_tag functions to work with tag value 0 (sneak)
Updated documents.
This commit is contained in:
@@ -1169,7 +1169,7 @@
|
||||
|
||||
- name: Tags
|
||||
parent: Interface
|
||||
doc: show_iface_tag, hide_iface_tag and is_iface_tag_active relate to the boxes that appear above the interface such as SNEAK and LEVEL. You can use 3 for LEVEL and 4 for ADDICT, or the range from 5 to (4 + the value of BoxBarCount in `ddraw.ini`) for custom boxes. Remember to add your messages to `intrface.msg` and set up the font colours in `ddraw.ini` if you're going to use custom boxes. Starting from sfall 4.1/3.8.12, is_iface_tag_active can also be used to check 0 for SNEAK, 1 for POISONED, and 2 for RADIATED.
|
||||
doc: `show_iface_tag`, `hide_iface_tag` and `is_iface_tag_active` relate to the boxes that appear above the interface such as SNEAK and LEVEL. You can use 0 for **SNEAK** (starting from sfall 4.4.4/3.8.44), 3 for **LEVEL**, 4 for **ADDICT**, and 5 to (4 + the value of BoxBarCount in `ddraw.ini`) for custom boxes. Remember to add your messages to `intrface.msg` and set up the font colours in `ddraw.ini` if you're going to use custom boxes. Starting from sfall 4.1/3.8.12, `is_iface_tag_active` can also be used to check 0 for **SNEAK**, 1 for **POISONED**, and 2 for **RADIATED**.
|
||||
items:
|
||||
- name: show_iface_tag
|
||||
detail: void show_iface_tag(int tag)
|
||||
@@ -1180,10 +1180,9 @@
|
||||
- name: is_iface_tag_active
|
||||
detail: int is_iface_tag_active(int tag)
|
||||
opcode: 0x81de
|
||||
doc: Starting from sfall 4.1, can also be used to check 0 for SNEAK, 1 for POISONED, and 2 for RADIATED.
|
||||
- name: set_iface_tag_text
|
||||
detail: void set_iface_tag_text(int tag, string text, int color)
|
||||
doc: Sets the text messages and colors for custom notification boxes to the interface without the need to add messages to `intrface.msg` and set up the font colors in `ddraw.ini`. Tag value is the same as used in `show_iface_tag`, `hide_iface_tag`, and `is_iface_tag_active`. The valid range is from 5 to (4 + the value of `BoxBarCount` in `ddraw.ini`) or the number of the last custom box added using the `add_iface_tag` function. The text is limited to 19 characters.
|
||||
doc: Sets the text messages and colors for custom notification boxes to the interface without the need to add messages to `intrface.msg` and set up the font colors in `ddraw.ini`. Tag value is the same as used in `show_iface_tag`, `hide_iface_tag`, and `is_iface_tag_active`. The valid range is from 5 to (4 + the value of BoxBarCount in `ddraw.ini`) or the number of the last custom box added using the `add_iface_tag` function. The text is limited to 19 characters.
|
||||
macro: sfall.h
|
||||
- name: add_iface_tag
|
||||
detail: void add_iface_tag()
|
||||
|
||||
@@ -54,7 +54,7 @@ The `has_fake_trait` and `has_fake_perk` return the number of levels the player
|
||||
|
||||
The `perk_add_mode`, `set_selectable_perk`, `set_perkbox_title`, `hide_real_perks`, `show_real_perks` and `clear_selectable_perks` control the behaviour of the select a perk box. The `set_selectable_perk` can be used to add additional items by setting the **active** parameter to 1, and to remove them again by setting it to 0. The `set_perkbox_title` can be used to change the title of the box, or by using `""` it will be set back to the default. The `hide_real_perks` and `show_real_perks` can be used to prevent the dialog from displaying any of the original 119 perks. The `perk_add_mode` modifies what happens when a fake perk is selected from the perks dialog. It is treated as a set of flags - if bit 1 is set then it is added to the player's traits, if bit 2 is set it is added to the player's perks, and if bit 3 is set it is removed from the list of selectable perks. The default is 0x2. The `clear_selectable_perks` restores the dialog to its default state.
|
||||
|
||||
The `show_iface_tag`, `hide_iface_tag` and `is_iface_tag_active` relate to the boxes that appear above the interface such as **SNEAK** and **LEVEL**. You can use 3 for **LEVEL** and 4 for **ADDICT**, or the range from 5 to (4 + the value of BoxBarCount in **ddraw.ini**) for custom boxes. Remember to add your messages to **intrface.msg** and set up the font colours in **ddraw.ini** if you're going to use custom boxes. Starting from sfall 4.1/3.8.12, `is_iface_tag_active` can also be used to check 0 for **SNEAK**, 1 for **POISONED**, and 2 for **RADIATED**.
|
||||
The `show_iface_tag`, `hide_iface_tag` and `is_iface_tag_active` relate to the boxes that appear above the interface such as SNEAK and LEVEL. You can use 0 for **SNEAK** (starting from sfall 4.4.4/3.8.44), 3 for **LEVEL**, 4 for **ADDICT**, and 5 to (4 + the value of BoxBarCount in **ddraw.ini**) for custom boxes. Remember to add your messages to **intrface.msg** and set up the font colours in **ddraw.ini** if you're going to use custom boxes. Starting from sfall 4.1/3.8.12, `is_iface_tag_active` can also be used to check 0 for **SNEAK**, 1 for **POISONED**, and 2 for **RADIATED**.
|
||||
|
||||
The `get_bodypart_hit_modifier` and `set_bodypart_hit_modifier` alter the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id's are from 0 to 8. Changes are not saved, and will reset to the defaults (or to the values specified in **ddraw.ini** if they exist) at each reload.
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ void mf_add_iface_tag(OpcodeContext &ctx) {
|
||||
|
||||
void op_show_iface_tag(OpcodeContext &ctx) {
|
||||
int tag = ctx.arg(0).rawValue();
|
||||
if (tag == 3 || tag == 4) {
|
||||
if (tag == 0 || tag == 3 || tag == 4) {
|
||||
__asm mov eax, tag;
|
||||
__asm call fo::funcoffs::pc_flag_on_;
|
||||
} else {
|
||||
@@ -247,7 +247,7 @@ void op_show_iface_tag(OpcodeContext &ctx) {
|
||||
|
||||
void op_hide_iface_tag(OpcodeContext &ctx) {
|
||||
int tag = ctx.arg(0).rawValue();
|
||||
if (tag == 3 || tag == 4) {
|
||||
if (tag == 0 || tag == 3 || tag == 4) {
|
||||
__asm mov eax, tag;
|
||||
__asm call fo::funcoffs::pc_flag_off_;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user