mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added "get_text_width" and "string_compare" script functions
Fixed the return value of charcode script function for characters in the extended ASCII character set. Rewrote set_dm/df_model, set_movie_path functions in C++.
This commit is contained in:
@@ -601,8 +601,8 @@ Some utility/math functions are available:
|
||||
|
||||
> 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)
|
||||
- displays the specified FRM image in the active window created by vanilla CreateWin or sfall's create_win script function
|
||||
- pathFile/artId: path to the FRM file (e.g. "art\\inven\\5mmap.frm"), or its FRM ID number (e.g. 117440550, see specification of the FID format)
|
||||
- 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. 117440550, 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
|
||||
@@ -669,6 +669,15 @@ optional argument:
|
||||
- flag: the flag to change (see WIN_FLAG_* constants in define_extra.h)
|
||||
- value: true - set the flag, false - unset the flag
|
||||
|
||||
> int sfall_func1("get_text_width", string text)
|
||||
- returns the text width in pixels for the currently set font
|
||||
|
||||
> bool sfall_func2("string_compare", string str1, string str2)
|
||||
> bool sfall_func3("string_compare", string str1, string str2, int codePage)
|
||||
- compares two strings case-insensitive, and returns True if the two strings are matched
|
||||
- codePage: code page number to properly compare national characters in the range 128-255 of the ASCII code table
|
||||
available encodings: 1250-1252, 866
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
Reference in New Issue
Block a user