Difference between revisions of "Riven HSPT resources"
m (Protected "Riven HSPT resources" [edit=autoconfirmed:move=autoconfirmed])
Revision as of 20:38, 8 February 2008
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|
|unsigned short||mouse_cursor||Cursor icon to set when the mouse rolls over this hotspot|
|unsigned short||index||Record index starting from 1|
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.
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.