mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added "interface_art_draw" script function
Added an argument to "intface_redraw" function to redraw all interfaces.
This commit is contained in:
@@ -89,6 +89,7 @@
|
||||
#define WINTYPE_CHARACTER (5)
|
||||
#define WINTYPE_SKILLDEX (6)
|
||||
#define WINTYPE_ESCMENU (7) // escape menu
|
||||
#define WINTYPE_AUTOMAP (8)
|
||||
|
||||
//Valid flags for force_encounter_with_flags
|
||||
#define ENCOUNTER_FLAG_NO_CAR (0x1)
|
||||
@@ -299,8 +300,8 @@
|
||||
#define dialog_message(text) sfall_func1("dialog_message", text)
|
||||
#define dialog_obj sfall_func0("dialog_obj")
|
||||
#define display_stats sfall_func0("display_stats")
|
||||
#define draw_image(pathFile, frame, x, y, noTrans) sfall_func5("draw_image", pathFile, frame, x, y, noTrans)
|
||||
#define draw_image_scaled(pathFile, frame, x, y, w, h) sfall_func6("draw_image_scaled", pathFile, frame, x, y, w, h)
|
||||
#define draw_image(artFile, frame, x, y, noTrans) sfall_func5("draw_image", artFile, frame, x, y, noTrans)
|
||||
#define draw_image_scaled(artFile, frame, x, y, w, h) sfall_func6("draw_image_scaled", artFile, frame, x, y, w, h)
|
||||
#define exec_map_update_scripts sfall_func0("exec_map_update_scripts")
|
||||
#define floor2(value) sfall_func1("floor2", value)
|
||||
#define get_can_rest_on_map(map, elev) sfall_func2("get_can_rest_on_map", map, elev)
|
||||
@@ -327,6 +328,10 @@
|
||||
#define has_fake_perk_npc(npc, perk) sfall_func2("has_fake_perk_npc", npc, perk)
|
||||
#define has_fake_trait_npc(npc, trait) sfall_func2("has_fake_trait_npc", npc, trait)
|
||||
#define hide_window(winName) sfall_func1("hide_window", winName)
|
||||
#define interface_art_draw(winID, artFile, x, y) sfall_func4("interface_art_draw", winID, artFile, x, y)
|
||||
#define interface_art_draw_frame(wID, art, x, y, frame) sfall_func5("interface_art_draw", wID, art, x, y, frame)
|
||||
#define interface_art_draw_ex(wID, art, x, y, frm, prm) sfall_func6("interface_art_draw", wID, art, x, y, frm, prm)
|
||||
#define interface_redraw_all sfall_func1("intface_redraw", 1)
|
||||
#define intface_hide sfall_func0("intface_hide")
|
||||
#define intface_is_hidden sfall_func0("intface_is_hidden")
|
||||
#define intface_is_shown(winType) sfall_func1("get_window_attribute", winType)
|
||||
|
||||
@@ -356,7 +356,7 @@ Some utility/math functions are available:
|
||||
- returns first object blocking given tile using given blocking function or 0 if tile is clear
|
||||
|
||||
> array tile_get_objs(int tileNum, int elevation)
|
||||
- returns array of all objects at given tile
|
||||
- returns an array of all objects at given tile
|
||||
- it will include any hidden, dead or system objects (like cursor), so make sure to check properly when iterating
|
||||
|
||||
> array party_member_list(int includeHidden)
|
||||
@@ -402,8 +402,9 @@ Some utility/math functions are available:
|
||||
- works just like vanilla critter_inven_obj, but correctly reports item in player's inactive hand slot
|
||||
|
||||
> void sfall_func0("intface_redraw")
|
||||
- redraws main game interface
|
||||
- useful after direct changes to current player weapons or stats to reflect changes
|
||||
> void sfall_func1("intface_redraw", bool eachWin)
|
||||
- redraws main game interface, useful to reflect changes after directly changing current player weapons or stats
|
||||
- eachWin: pass True to redraw all interface windows
|
||||
|
||||
> void sfall_func0("intface_hide")
|
||||
- hides main interface
|
||||
@@ -612,15 +613,15 @@ Some utility/math functions are available:
|
||||
- there is also a unique ID number range for the player and party members from 18000 to 83535
|
||||
- to assign a new ID number generated by the engine to the object (i.e. unassign a unique ID), call the function with two arguments and pass -1 for the flag argument
|
||||
|
||||
> void sfall_func5("draw_image", string/int pathFile/artId, int frame, int x, int y, bool noTransparent)
|
||||
> void sfall_func6("draw_image_scaled", string/int pathFile/artId, int frame, int x, int y, int width, int height)
|
||||
> void sfall_func5("draw_image", string/int artFile/artId, int frame, int x, int y, bool noTransparent)
|
||||
> void sfall_func6("draw_image_scaled", string/int artFile/artId, int frame, int x, int y, int width, int height)
|
||||
- displays the specified PCX or FRM image in the active window created by vanilla CreateWin or sfall's create_win script function
|
||||
- pathFile/artId: path to the PCX/FRM file (e.g. "art\\inven\\5mmap.frm"), or its FRM ID number (e.g. 0x7000026, see specification of the FID format)
|
||||
- artFile/artId: path to the PCX/FRM file (e.g. "art\\inven\\5mmap.frm"), or its FRM ID number (e.g. 0x7000026, see specification of the FID format)
|
||||
optional arguments:
|
||||
- frame: frame number, the first frame starts from zero
|
||||
- x/y: offset relative to the top-left corner of the window
|
||||
- width/height: image size, used to scale the image when displaying it. Pass -1 to either width or height to keep the aspect ratio when scaling
|
||||
- noTransparent: pass true to display an image without transparent background
|
||||
- width/height: the new width/height to scale the image to. Pass -1 to either width or height to keep the aspect ratio when scaling
|
||||
- noTransparent: pass True to display an image without transparent background
|
||||
- NOTE: to omit optional arguments starting from the right, call the functions with different sfall_funcX (e.g. sfall_func4("draw_image", pathFile, frame, x, y))
|
||||
- if draw_image_scaled is called without x/y/width/height arguments, the image will be scaled to fit the window without transparent background
|
||||
|
||||
@@ -731,7 +732,7 @@ optional argument:
|
||||
- message: the text in the dialog box. Use the \n control character to move text to a new line (example: "Hello\nWorld!")
|
||||
optional arguments:
|
||||
- flags: mode flags (see MSGBOX_* constants in define_extra.h). Pass -1 to skip setting the flags (default flags are NORMAL and YESNO)
|
||||
- color1/2: the color index in Fallout palette. color1 sets the text color for the first line, and color2 for all subsequent lines of text (default color is 145)
|
||||
- color1/color2: the color index in Fallout palette. color1 sets the text color for the first line, and color2 for all subsequent lines of text (default color is 145)
|
||||
|
||||
> int sfall_func1("get_stat_min", stat)
|
||||
> int sfall_func1("get_stat_max", stat)
|
||||
@@ -740,6 +741,20 @@ optional arguments:
|
||||
- returns the maximum or minimum set value of the specified stat (see set_stat_max/min functions)
|
||||
- who: 0 (false) or omitting the argument - returns the value of the player, 1 (true) - returns the value set for other critters
|
||||
|
||||
> int sfall_func4("interface_art_draw", int winType, string/int artFile/artId, int x, int y)
|
||||
> int sfall_func5("interface_art_draw", int winType, string/int artFile/artId, int x, int y, int frame)
|
||||
> int sfall_func6("interface_art_draw", int winType, string/int artFile/artId, int x, int y, int frame, array param)
|
||||
- draws the specified PCX or FRM image in the game interface window, returns -1 in case of any error
|
||||
- winType: the type number of the interface window (see WINTYPE_* constants in sfall.h)
|
||||
this also takes the value of the flag (0x10000) to prevent immediate redrawing of the interface window
|
||||
- artFile/artId: path to the PCX/FRM file (e.g. "art\\inven\\5mmap.frm"), or its FRM ID number (e.g. 0x7000026, see specification of the FID format)
|
||||
- x/y: offset relative to the top-left corner of the window
|
||||
optional arguments:
|
||||
- frame: frame number, the first frame starts from zero
|
||||
- param: an array which specifies additional parameters:
|
||||
index 0 - the direction of multi-directional FRM
|
||||
index 1/index 2 - the new width/height to scale the image to. Pass -1 to width or height to use the original image size
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
Reference in New Issue
Block a user