Added a blinking icon to force_encounter/with_flags functions

* currently an icon is always shown for scripted force encounters.
This commit is contained in:
NovaRain
2020-01-20 11:50:00 +08:00
parent 957ed92498
commit dc4c4c2524
8 changed files with 29 additions and 13 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
#define below_equal(a, b) (unsigned_comp(a, b) <= 0)
procedure unsigned_comp(variable a, variable b) begin
if (a bwxor b) then return 0;
if ((a bwxor b) == 0) then return 0; // a == b
if (b == 0) then return 1;
return 1 if (a / b) else -1;
end
+1
View File
@@ -80,6 +80,7 @@
//Valid flags for force_encounter_with_flags
#define ENCOUNTER_FLAG_NO_CAR (1)
#define ENCOUNTER_FLAG_LOCK (2) // block new forced encounter by the next function call until the current specified encounter occurs
#define ENCOUNTER_FLAG_SPECIAL (4) // special blinking icon
//The attack types returned by get_attack_type
#define ATKTYPE_LWEP1 (0)
+1 -1
View File
@@ -681,5 +681,5 @@ int arg1 - event type: 0 - when a random encounter occurs, 1 - when the play
int arg2 - the map ID that the encounter will load (see MAPS.h or Maps.txt)
int arg3 - 1 when the encounter occurs is a special encounter, 0 otherwise
int ret1 - overrides the map ID, or pass -1 to cancel the encounter and continue traveling (only for event type 0)
int ret1 - overrides the map ID, or pass -1 for event type 0 to cancel the encounter and continue traveling
int ret2 - pass 1 to cancel the encounter and load the specified map from the ret1 (only for event type 0)
+2 -2
View File
@@ -137,7 +137,7 @@ array - array ID to be used with array-related functions (actually an integer)
- The player will not get an outdoorsman skill check.
> void force_encounter_with_flags(int map, int flags)
- does the same thing as force_encounter, but allows the specification of some extra options.
- does the same thing as force_encounter, but allows the specification of some extra options (see sfall.h for available flags).
- Forcing a random encounter on a map that is not normally used for random encounters may cause the player to lose the car, if they have it.
- In this case use force_encounter_with_flags with the ENCOUNTER_FLAG_NO_CAR flag set.
@@ -703,7 +703,7 @@ optional argument:
- NOTE: this function works only for English letters of A-Z/a-z
> void sfall_func3("set_terrain_name", int x, int y, string name)
- overrides the terrain type name for the sub-tile by the specified coordinates on the world map
- overrides the terrain type name for the sub-tile on the world map by the specified coordinates
------------------------
------ MORE INFO -------