Jump to content

64 bit compatibility


AnonymousHero

Recommended Posts

Just tried out GemRB 0.3.2 on a 64-bit machine and found a little issue with the proficiency selection during character creation -- the game will allow you to scroll to proficiencies ("weapon types") which aren't actually there. I've "fixed" it by doing this change:

				SkillName = SkillTable.GetValue(Pos+8, 1) #we add the bg1 skill count off$
			MaxProf = SkillTable.GetValue(Pos+8, ProfColumn) #we add the bg1 skill co$

			#invalid entry, adjusting scrollbar
-			   if SkillName == -1:
+			   if (SkillName == -1) or (SkillName == 4294967296):
					GemRB.SetVar("TopIndex",TopIndex)
					ScrollBarControl.SetVarAssoc("TopIndex",Pos-7)
					break

in bg2/GUICG9.py (used "print" to figure out what the SkillName values were), but of course that's not a proper fix. The real problem is of course an invalid int conversion somewhere. Having just starting looking at the code today, I cannot figure out exactly what the proper fix would be. Any hints as to where to look?

 

I noticed another bug in the proficiency selection where it would show text from dialogue (i did take a screenshot if necessary) instead of the proficiency types, but that was with a pretty heavily modded game. Are reports of bugs in modded games of any interest at this point? If not, how about G3 fixpacked?

Link to comment

4294967296 is the correct value from the table, so there is no need to or. The fix is in svn, thanks for the report.

 

The dialog bugs are definitely from mods. Some change the existing dialog.tlk entries or maybe renumerate parts of it, so you can get all kind of wierd stuff. Like my Kelsey or Soulafein is called "Aerie, you wingless freak". :)

Link to comment

Heh.

 

Actually, 4294967296 = 0x100000000 which is (unless of course I'm mistaken) -1 in two's complement when you convert an int32 -1 to an int64 without proper sign extension, so I think there may be an incorrect conversion somewhere in the low-level code in GemRB_GetTableValue() in GUIScript.cpp. My (Python+C)-foo isn't very strong though, so I may be wrong.

 

Cheers,

 

EDIT: (Btw, props to all involved with GemRB -- it already works amazingly well.)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...