Difference between revisions of "Riven HSPT resources"
m (Protected "Riven HSPT resources" [edit=autoconfirmed:move=autoconfirmed]) |
(cursor picture test) |
||
Line 32: | Line 32: | ||
Hotspot rectangles can fall outside the game window (in any direction) and often two or more hotspots overlap. There are even cases with ''left'' > ''right'' (card 371, t_Data). When more hotspots overlap, the "active" hotspot receiving mouse events is the one with the largest ''index'' value. | Hotspot rectangles can fall outside the game window (in any direction) and often two or more hotspots overlap. There are even cases with ''left'' > ''right'' (card 371, t_Data). When more hotspots overlap, the "active" hotspot receiving mouse events is the one with the largest ''index'' value. | ||
− | Cursor icon values are on the right. | + | Cursor icon values are listed on the right. |
''u0'' seems always zero and changing it seems to leave Riven indifferent. ''u1'' is very very often -1 but not always. ''u2'' is 0 for ordinary hotspots, 1 for Zip Mode ones: the engine disables all Zip Mode hotspots when Zip Mode is off. | ''u0'' seems always zero and changing it seems to leave Riven indifferent. ''u1'' is very very often -1 but not always. ''u2'' is 0 for ordinary hotspots, 1 for Zip Mode ones: the engine disables all Zip Mode hotspots when Zip Mode is off. | ||
For info on the attached script see the [[Riven scripts|scripts section]]. | For info on the attached script see the [[Riven scripts|scripts section]]. |
Revision as of 12:45, 16 February 2008
Riven | |||
Mohawk | Overview | ||
BLST | CARD | FLST | HSPT |
MLST | NAME | PLST | RMAP |
SFXE | SLST | tBMP | tMOV |
tWAV | VARS | VERS | ZIPS |
Scripts | Variables | ||
External commands |
These contain hotspots, sort of invisible buttons within cards that respond to mouse clicks (and other events) by performing actions described by attached scripts.
Each HSPT resource is a list of records and starts with an unsigned short equal to the number of records. Due to the attached scripts, HSPT records can have different size and there is no way to know it without fully decoding the record. Each record has the following structure:
unsigned short | blst_id | Links the hotspot to a BLST resource record |
short | name_rec | If ≥ 0, record index in NAME resource 2 to provide a name for the hotspot |
short | left | Hotspot rectangle within the game window, in pixels |
short | top | |
short | right | |
short | bottom | |
unsigned short | u0 | |
unsigned short | mouse_cursor | Cursor icon to set when the mouse rolls over this hotspot |
unsigned short | index | Record index starting from 1 |
short | u1 | |
unsigned short | u2 | |
variable size | script |
Hotspot rectangles can fall outside the game window (in any direction) and often two or more hotspots overlap. There are even cases with left > right (card 371, t_Data). When more hotspots overlap, the "active" hotspot receiving mouse events is the one with the largest index value.
Cursor icon values are listed on the right.
u0 seems always zero and changing it seems to leave Riven indifferent. u1 is very very often -1 but not always. u2 is 0 for ordinary hotspots, 1 for Zip Mode ones: the engine disables all Zip Mode hotspots when Zip Mode is off.
For info on the attached script see the scripts section.