Interactive actions now allows displaying images.

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23144&goto=363478&#msg_363478

git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@2597 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
Flugente
2021-07-07 20:05:25 +00:00
parent ca3f83b583
commit ef1782394a
12 changed files with 161 additions and 2 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

+54 -1
View File
@@ -574,6 +574,7 @@ MiniGames =
{
TETRIS = 0,
PONG = 1,
PICTURE = 2,
}
-- luaactionids that aren't used in ModSpecificActions
@@ -585,6 +586,16 @@ InteractiveAction =
TABLETENNIS = 53,
TOILET = 54,
TV = 55,
STEAL_CASHREGISTER = 56,
PICTURE_NEONTHECLUB = 57, -- Neon sign: 'The club'
PICTURE_NEONBEER = 58, -- Neon sign: 'Beer'
PICTURE_BEER = 59, -- Poster: 'Beer'
PICTURE_2xBEER = 60, -- 2-tile Poster: 'Beer'
PICTURE_PRIVATE = 61, -- Sign: 'Private'
PICTURE_XXXPITSTOP = 62, -- Neon Sign: 'XXX Pit Stop'
PICTURE_DELIVERY = 63, -- 2-tile Poster: 'Delivery'
PICTURE_GENERALSTORE = 64, -- 2-tile Poster: 'General Store'
PICTURE_SHADYLADY = 65, -- 2-tile Poster: 'Shady Lady'
}
-- We have an array of 1000 signed integers that a modder can use to set whatever data he wants.
@@ -1675,7 +1686,6 @@ function HandleInteractiveActionResult(sSectorX, sSectorY, bSectorZ, sGridNo, bL
elseif ( usActionType == ActionTypes.ACTIONTYPE_VARIOUS ) then
-- for now, the only game we have is tetris
if ( sLuaactionid == InteractiveAction.BILLIARD ) then
PlaySound("Sounds\\billiard.wav")
@@ -1691,6 +1701,49 @@ function HandleInteractiveActionResult(sSectorX, sSectorY, bSectorZ, sGridNo, bL
elseif ( sLuaactionid == InteractiveAction.TV ) then
PlaySound("Sounds\\tvstatic.wav")
elseif ( sLuaactionid == InteractiveAction.STEAL_CASHREGISTER ) then
PlaySound("Sounds\\cashregister.wav")
elseif ( sLuaactionid == InteractiveAction.PICTURE_NEONTHECLUB ) then
-- The first argument is the path of a .png picture (any other format will be ignored).
-- The second argument determines whether we stretch the picture to fullscreen (1) or not (0). If the picture is larger than our screen, we stretch it anyway.
-- Only call this function from tactical (the call will be ignored otherwise).
DisplayPictureTactical("Interface\\neonsign_theclub.png", 1)
elseif ( sLuaactionid == InteractiveAction.PICTURE_NEONBEER ) then
DisplayPictureTactical("Interface\\neonsign_beer.png", 0)
elseif ( sLuaactionid == InteractiveAction.PICTURE_BEER ) then
DisplayPictureTactical("Interface\\poster_beer1.png", 0)
elseif ( sLuaactionid == InteractiveAction.PICTURE_2xBEER ) then
DisplayPictureTactical("Interface\\poster_yellow_green_bottle.png", 0)
elseif ( sLuaactionid == InteractiveAction.PICTURE_PRIVATE ) then
DisplayPictureTactical("Interface\\kingpinclub_entrance.png", 0)
elseif ( sLuaactionid == InteractiveAction.PICTURE_XXXPITSTOP ) then
DisplayPictureTactical("Interface\\neonsign_xxx.png", 0)
elseif ( sLuaactionid == InteractiveAction.PICTURE_DELIVERY ) then
DisplayPictureTactical("Interface\\delivery.png", 0)
elseif ( sLuaactionid == InteractiveAction.PICTURE_GENERALSTORE ) then
DisplayPictureTactical("Interface\\sign_generalstore.png", 0)
elseif ( sLuaactionid == InteractiveAction.PICTURE_SHADYLADY ) then
DisplayPictureTactical("Interface\\shady_lady.png", 0)
end
@@ -1072,6 +1072,112 @@
<sActionType>6</sActionType>
<luaactionid>55</luaactionid>
</ACTION>
<!-- |||||||||||||||||||| VARIOUS |||||||||||||||||||| -->
<!-- cash register -->
<ACTION>
<szTileSetName>lawless2.sti</szTileSetName>
<usTileIndex>18</usTileIndex>
<usTileIndex>19</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>56</luaactionid>
</ACTION>
<ACTION>
<szTileSetName>lawless.sti</szTileSetName>
<usTileIndex>20</usTileIndex>
<usTileIndex>21</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>56</luaactionid>
</ACTION>
<!-- Neon sign: 'The club' -->
<ACTION>
<szTileSetName>waldc21b.sti</szTileSetName>
<usTileIndex>0</usTileIndex>
<usTileIndex>1</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>57</luaactionid>
</ACTION>
<!-- Neon sign: 'Beer' -->
<ACTION>
<szTileSetName>waldc21b.sti</szTileSetName>
<usTileIndex>2</usTileIndex>
<usTileIndex>3</usTileIndex>
<usTileIndex>4</usTileIndex>
<usTileIndex>5</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>58</luaactionid>
</ACTION>
<!-- Poster: 'Beer' -->
<ACTION>
<szTileSetName>waldc21b.sti</szTileSetName>
<usTileIndex>8</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>59</luaactionid>
</ACTION>
<!-- Poster: 'Beer' -->
<ACTION>
<szTileSetName>w_dec06.sti</szTileSetName>
<usTileIndex>0</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>59</luaactionid>
</ACTION>
<!-- 2-tile Poster: 'Beer' -->
<ACTION>
<szTileSetName>w_dec06.sti</szTileSetName>
<usTileIndex>8</usTileIndex>
<usTileIndex>9</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>60</luaactionid>
</ACTION>
<!-- Sign: 'Private' -->
<ACTION>
<szTileSetName>w_dec08.sti</szTileSetName>
<usTileIndex>5</usTileIndex>
<usTileIndex>6</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>61</luaactionid>
</ACTION>
<!-- Neon Sign: 'XXX Pit Stop' -->
<ACTION>
<szTileSetName>waldec21.sti</szTileSetName>
<usTileIndex>1</usTileIndex>
<usTileIndex>2</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>62</luaactionid>
</ACTION>
<!-- 2-tile Poster: 'Delivery' -->
<ACTION>
<szTileSetName>w_dec09.sti</szTileSetName>
<usTileIndex>2</usTileIndex>
<usTileIndex>3</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>63</luaactionid>
</ACTION>
<!-- 2-tile Poster: 'General Store' -->
<ACTION>
<szTileSetName>w_dec09.sti</szTileSetName>
<usTileIndex>4</usTileIndex>
<usTileIndex>5</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>64</luaactionid>
</ACTION>
<!-- 2-tile Poster: 'Shady Lady' -->
<ACTION>
<szTileSetName>w_dec10.sti</szTileSetName>
<usTileIndex>2</usTileIndex>
<usTileIndex>3</usTileIndex>
<sActionType>6</sActionType>
<luaactionid>65</luaactionid>
</ACTION>
<!-- |||||||||||||||||||| VARIOUS |||||||||||||||||||| -->
</INTERACTIVEACTIONS>
Binary file not shown.