diff options
author | Torbjörn Andersson | 2006-04-09 12:04:33 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-04-09 12:04:33 +0000 |
commit | 8e7e50397923f5d0519db452b51f62f39c3764e5 (patch) | |
tree | 3d49d3db037376ceafe71fc3ab7d1db822d22ec2 /engines/cine | |
parent | 484fe8ab6518fe30a332c9f4142cff57fae4e923 (diff) | |
download | scummvm-rg350-8e7e50397923f5d0519db452b51f62f39c3764e5.tar.gz scummvm-rg350-8e7e50397923f5d0519db452b51f62f39c3764e5.tar.bz2 scummvm-rg350-8e7e50397923f5d0519db452b51f62f39c3764e5.zip |
Casting an array of integers to a pointer to a struct seems like a pretty hacky
thing to do. This replacement hopefully works as intended.
svn-id: r21724
Diffstat (limited to 'engines/cine')
-rw-r--r-- | engines/cine/various.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index 79925004bb..dd7a5f39b2 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -263,8 +263,7 @@ void runObjectScript(int16 entryIdx) { computeScriptStack(pNewElement->scriptPtr, pNewElement->stack, relTable[entryIdx].size); } -int16 getRelEntryForObject(uint16 param1, uint16 param2, - selectedObjStruct *pSelectedObject) { +int16 getRelEntryForObject(uint16 param1, uint16 param2, selectedObjStruct *pSelectedObject) { int16 i; int16 di = -1; @@ -1249,7 +1248,10 @@ void makeCommandLine(void) { isDrawCommandEnabled = 1; if (playerCommand != -1 && choiceResultTable[playerCommand] == commandVar1) { - int16 di = getRelEntryForObject(playerCommand, commandVar1, (selectedObjStruct *) & commandVar3); + selectedObjStruct obj; + obj.idx = commandVar3[0]; + obj.param = commandVar3[1]; + int16 di = getRelEntryForObject(playerCommand, commandVar1, &obj); if (di != -1) { runObjectScript(di); @@ -1838,8 +1840,11 @@ uint16 executePlayerInput(void) { int16 relEntry; drawMenuBox(commandBuffer, 10, defaultMenuBoxColor); + selectedObjStruct obj; + obj.idx = commandVar3[0]; + obj.param = commandVar3[1]; - relEntry = getRelEntryForObject(playerCommand, commandVar1, (selectedObjStruct *)commandVar3); + relEntry = getRelEntryForObject(playerCommand, commandVar1, &obj); if (relEntry != -1) { runObjectScript(relEntry); |