Modified some of the mechanics of "interface_overlay" function

Changed "intface_redraw" with one argument to redraw the specified
interface window.
This commit is contained in:
NovaRain
2020-12-25 14:46:47 +08:00
parent 9d5bfaa059
commit 279f91274e
12 changed files with 137 additions and 80 deletions
+3 -1
View File
@@ -338,7 +338,8 @@
#define interface_art_draw_ex(winID, artID, x, y, frame, param) sfall_func6("interface_art_draw", winID, artID, x, y, frame, param)
#define interface_print(text, winType, x, y, color) sfall_func5("interface_print", text, winType, x, y, color)
#define interface_print_width(text, winType, x, y, color, w) sfall_func6("interface_print", text, winType, x, y, color, w)
#define interface_redraw_all sfall_func1("intface_redraw", 1)
#define interface_redraw_all sfall_func1("intface_redraw", -1)
#define interface_redraw_win(winType) sfall_func1("intface_redraw", winType)
#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)
@@ -358,6 +359,7 @@
#define overlay_create(winType) sfall_func2("interface_overlay", winType, 1)
#define overlay_clear(winType) sfall_func2("interface_overlay", winType, 2)
#define overlay_clear_rectangle(winType, x, y, w, h) sfall_func6("interface_overlay", winType, 2, x, y, w, h)
#define overlay_destroy(winType) sfall_func2("interface_overlay", winType, 0)
#define real_dude_obj sfall_func0("real_dude_obj")
#define remove_all_timer_events sfall_func0("remove_timer_event")
#define remove_timer_event(fixedParam) sfall_func1("remove_timer_event", fixedParam)
+10 -2
View File
@@ -402,9 +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")
> void sfall_func1("intface_redraw", bool eachWin)
> void sfall_func1("intface_redraw", int winType)
- redraws main game interface, useful to reflect changes after directly changing current player weapons or stats
- eachWin: pass True to redraw all interface windows
- winType: the type number of the interface window (see WINTYPE_* constants in sfall.h). Pass -1 to redraw all interface windows
> void sfall_func0("intface_hide")
- hides main interface
@@ -782,6 +782,14 @@ optional arguments:
- fills the rectangle area of the currently selected script window with the specified color, or clears the window with transparent (index 0) color (call the function without arguments)
- color: the color index in the game palette (from 0 to 255)
> int sfall_func2("interface_overlay", int winType, int mode)
> int sfall_func6("interface_overlay", int winType, 2, int x, int y, int width, int height)
- creates an additional drawing surface above the graphic layer of the specified interface window. All subsequent calls of interface_art_draw and interface_print functions will draw on it
- winType: the type number of the interface window (see WINTYPE_* constants in sfall.h)
- mode: 1 - creates a new overlay surface
2 - clears the overlay area or the specified rectangle defined by the x, y, width, height arguments
0 - destroys the created overlay surface (frees up the memory allocated to the surface)
------------------------
------ MORE INFO -------
------------------------
@@ -365,6 +365,4 @@
0x8280 - any sfall_func7(string funcName, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
0x8281 - any sfall_func8(string funcName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
* These functions require AllowUnsafeScripting to be enabled in ddraw.ini