Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » JA2 git repository available
Re: JA2 git repository available[message #301169] Tue, 06 March 2012 23:36 Go to previous messageGo to previous message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: France
Misanthropos
I did not know of any parent windows and to me it looks like there is none. Can you point me to this unused code you mentioned?

Well, the term is not "parent window" but "current screen", in the global guiCurrentScreen variable.

I explained the bug in the "Bug in shopkeeper interface" thread here. I copy and paste my message from this thread for convenience:
mgl
Back to the topic, on the "deposit money" problem in the shopkeeper interface, the function "EndItempointer()" has the code to manage it (I don't remember in which file it is). The code is activated if the current screen ("guiCurrentScreen" variable) is "SHOPKEEPER_INTERFACE_SCREEN". Unfortunately, the "current screen" is the Yes/No message box which asks if you really want to deposit money. When the screens were managed with flags, a memory of the shopkeeper interface existed there and the code tested it rather than the current screen.

According to my message, there must be an "if (guiCurrentScreen == SHOPKEEPER_INTERFACE_SCREEN)" statement in the EndItemPointer() function which deletes the money on the mouse pointer. The dead code is there because the test can never be true because the yes/no message box changed the value of guiCurrentScreen to its own id.

I didn't check the code to see if it's possible, but a lazy fix would be to try to set guiCurrentScreen to SHOPKEEPER_INTERFACE_SCREEN just before the call to the EndItemPointer() function, to cancel the change done by the message box, and set it back to its original value just after.

A more elaborated fix would be to give a unique screen id to the "Do you really want to deposit money" yes/no message box created by the shopkeeper interface and use this unique id in the EndItemPointer() function. Screen ids are important now that Tron removed the bitmask value which managed the screens before. But an id like "generic yes/no message box" is totally useless. Moreover, the useful id of its parent screen is lost with the new system.

Report message to a moderator

Master Sergeant
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Thor dismissal Bug
Next Topic: Stracciatella on OSX Lion
Goto Forum:
  


Current Time: Sat Jan 11 21:42:26 GMT+2 2025

Total time taken to generate the page: 0.01074 seconds