|
|
|
Re: JA2 git repository available[message #301169]
|
Tue, 06 March 2012 23:36
|
|
mgl |
|
Messages:255
Registered:December 2007 Location: France |
|
|
MisanthroposI 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:
mglBack 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
|
|
|
|
|
Re: JA2 git repository available[message #301991]
|
Mon, 19 March 2012 19:58
|
|
public1983 |
|
Messages:125
Registered:February 2006 |
|
|
Hi,
I am working on a bug-fixing, exploit-disabling, atmosphere-enhancing mini-mod based on stracciatella from time to time. Lately, I have activated air strikes, which has to be tested with a complete playthrough sometime. I do not keep track of all my bug-fixes. However, I remember a problem with money deposit in the last waltnut-version. I am sure, I have done something about that. To be sure, You could tell me how to reproduce the bug, so I can check it with my current executable. I upload or send the code anywhere You tell me, as long as I do not need to provide additional information or install software. I know, I might not be able to complete my mod. Some things would be a pitty to be lost.
Report message to a moderator
|
Sergeant
|
|
|
Re: JA2 git repository available[message #304029]
|
Sun, 29 April 2012 11:46
|
|
selaux |
Messages:1
Registered:April 2012 |
|
|
Hi,
What about moving this repository to GitHub. It's most certainly a more public place, has a bugtracker and engages developers to contribute. This would make it possible to reenable stracciatella development, which is kind of on ice at the moment. I would do it myself, but I'm not a C developer.
selaux
Report message to a moderator
|
Civilian
|
|
|
Re: JA2 git repository available[message #304078]
|
Mon, 30 April 2012 14:42
|
|
misanthropos |
|
Messages:14
Registered:October 2009 |
|
|
Hi there!
I did not have a GitHub account, but selaux has a point...
You can find the code on GitHub now too:
https://github.com/misanthropos/ja2
@sunshine: to reproduce the moneykeeper bug just go to any shopkeeper, sell something, and place the money directly to the dollar sign for the bank. You will notice the money is still a moving item and you can repeat adding that ammount to the bank repeatedly. I fixed that too, but it is not a good solution.
The problem still exists with other items at shopkeepers.... e.g. you can crash the game by going to Franz, buy some ceramic plates and still in the shopkeepermenu add them to you armor...
There is one other nasty bug: if a blood tiger steps on a mine and dies in combat mode, the game stay in a loop forever.... - I can supply a savegame if someone wants to fix that. This event is never handled at all in the game code....
cheers
Misan
[Updated on: Mon, 30 April 2012 14:42] by Moderator Report message to a moderator
|
Private
|
|
|
|
|
|
|
|
|
|
Re: JA2 git repository available[message #305479]
|
Fri, 01 June 2012 19:28
|
|
public1983 |
|
Messages:125
Registered:February 2006 |
|
|
Please be more specific on the cases, when doctor and patient flip. I have never encountered such a bug. What happens, when the patient does not have a medic kit? Apart from that I must admit, that my git-repository contains a serious change of game rules.
There are airstrikes less minutes before the army walks into towns as it takes to retreat and return - it scares of heroic defenders. Every stat based performance is capped at 85 points (Chance to hit < 85% - no save shot, Chance to diffuse < 85% - no save mine field, Max. item status by repair < 85% - new is better than fixed, Max. health status by doctoring < 85% - medicine is no magic, etc.). Movement on the strategic map has changed in that chancellation of routes is disallowed - no cornering, no fooling with enemy patrol groups. Retreat is disabled - patrols will get you sleeping or with your back on the wall. Time warp is disabled - caused many bugs, changes the flow. Every militia killed no matter by whom counts as a civilian killed by the player - for his mum you killed their son by recruiting him to the green shirts, heroic defence starts to make sense. Mercs drop their equipment instantly as they walk off - no hire and fire for mule service to Drassen and Omerta. Pressing "d" in strategic screen lets mercs drop all their luggage - very alike "e" in JA1. Shots without sight always miss except for game physics reasons - spotter and sniper are too efficient te be designed intentionally. Moving targets penalize the aim-points of offenders, not directly the chance to hit - 20 tiles moved, every aimpoint is lost. Rocket rifles are stronger - it does no longer take 20 HEAP rockets to break a tank. etc.
These changes are my personal way of enjoying Jagged Alliance and anyone is free to switch off, what feels odd to him. I marked most changes with the code tag "//HB:". Please read the notes in the changelogs for more infos. GIT allows everyone to suggest changes to the code base. If we do not consent, open Your own branch please. I service no maintenance as the code is there to read, copy and change. This is no release for end users but a code mine for anyone interested in my bugfixes.
[Updated on: Fri, 01 June 2012 20:52] by Moderator Report message to a moderator
|
Sergeant
|
|
|
|
Re: JA2 git repository available[message #306714]
|
Sun, 01 July 2012 14:52
|
|
grantek |
Messages:1
Registered:July 2012 |
|
|
Hi, I've recently been doing a playthrough of JA2 using your git version of Stracciatella, and I've hit a bug that was preventing my progress.
The save file is here:
http://www.2shared.com/file/a_i1Op-5/ja2-misanthropos-explosion-han.html
(the problem occurs in the opponents' turn if you end the players' turn without doing anything)
I'm in the top-left square of Alma (H13) raiding the military building there, and there's a mysterious explosion that blows out the northwest wall where Sergeant is. I have no idea what causes it, but it happens during or shortly after battle, so I think it might be related to the enemy raising alarms. I've searched the area and found nothing to cause the explosion, but it consistently happens in all the versions of JA2 I've tried so I'm willing to think it's part of the game code.
The problem in your git master version is that it causes the enemy AI to hang. The red "Opponents' turn" bar at the top of the screen pauses after the explosion, and never returns or continues. I spent some time in-game trying different tactics to avoid the explosion or set up different circumstances around it (people getting injured in the explosion etc.), but it always causes the same AI hang.
I tried using the 12.1 release of tron's Stracciatella, the explosion occurred and the game crashed with:
ERROR: caught unhandled exception:
Opening file failed
I ran the game with strace and found some failed unlinks that looked odd just before the game created error.sav:
unlink("Temp/sm_H13.DAT") = -1 ENOENT (No such file or directory)
unlink("Temp/l_H13.DAT") = -1 ENOENT (No such file or directory)
I then tried latest subversion Straciatella from tron's site and it worked fine. The explosion occurred, but the game continued and I was able to save and reload with no problems after the explosion.
I've compiled and run all three versions on Ubuntu 12.04 64-bit. I tried some Windows versions of Straciatella and vanilla JA2 using Wine, but the save games weren't compatible with those.
Hopefully the comments between Tron's 12.1 release and the current subversion code help in tracking this down, and thanks for maintaining the git repository
Report message to a moderator
|
Civilian
|
|
|