Jump to content

Pandora build of 0.7.2 - few questions


foft

Recommended Posts

I've just done a build/pnd of 0.7.2 for the Pandora. Thanks for the great work on gemrb - its awesome! Great to have mobile Baldur's Gate. Now if only I actually had time to play it...

 

I don't really have time to get involved in the core, but thought I would give some feedback on a few things that I had to adjust to get the build working:

i) In SDLVideo.cpp it calls 'SDL_ShowCursor(SDL_DISABLE)'. On the Pandora version this leads to problems with the touchscreen vs mouse and cursor positioning. The workaround is:

diff -r ./plugins/SDLVideo/SDLVideo.cpp ../../gemrb-0.7.1_native/gemrb//plugins/SDLVideo/SDLVideo.cpp
84d83
< static SDL_Cursor *hiddenCursor;
87,88d85
<	   uint8_t hiddenCursorData = 0;
<
95,111c92
<	   //SDL_ShowCursor( SDL_DISABLE );
<
<
<	   hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0);
<	 /* On the OpenPandora we need to work around an SDL assumption that
<	    returns relative mouse coordinates when you get to the screen
<	    edges using the touchscreen and a custom surface for the cursor.
<	    The workaround is to set a blank SDL cursor and NOT disable it
<	    (Hackish I know).
<
<	    The root issues lies in the Windows Manager GRAB code in SDL.
<	    That is why the issue is not seen on framebuffer devices like the
<	    GP2X (there is no X window manager  ).
<	 */
<	 SDL_ShowCursor(SDL_ENABLE);
<	 SDL_SetCursor(hiddenCursor);	 hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0);
<
---
>	   SDL_ShowCursor( SDL_DISABLE );

ii) In the text events display after a few characters talk to me the width of the text gets narrower and narrower and narrower until the conversation is only 1 character wide. I think this is an optimisation issue of some kind since I do not see it on an X86 build and adding a few printfs to debug it made it work. Typical heisenbug... Perhaps someone who knows this bit of code better will have some idea what variables are getting messed up here. My current workaround for this is horrible:

diff gemrb-0.7.2/gemrb/core/Font.cpp ../gemrb-0.7.2/gemrb/core/Font.cpp
156a157,158
> static FILE * gemrbout = 0;
>
545a548,552
>	   static int cnt=0;
>	   if (!gemrbout)
>			   gemrbout = fopen("/dev/null","w");
>	   fprintf(gemrbout,"!!!SetupString %d %d\n",cnt,width);
>	   int posfirst = 0;
551a559
>					   {
552a561,563
>							   fprintf(gemrbout,"  wrap:%d %d %d %s\n",x,wx,width, &string[posfirst]);
>							   posfirst = lastpos+1;
>					   }
567a579,581
>					   fprintf(gemrbout,"  force:%d %s\n",width,&string[posfirst]);
>					   posfirst = pos+1;
>

iii) Gamma on Pandora SDL does not appear to work. On the older Pandora LCDs the display is quite clear, but on the newer ones its quite hard to see. I've not yet tried it but Notaz suggested I try:

sudo -n /usr/pandora/scripts/op_gamma.sh 1.0

iv) I received feedback that auto-pause did not work. I played with it a little and it appears to be back to front. i.e. if its enabled in the GUI its disabled in the game and vice versa. For now I added a 'not' to the check in Autopause when it checks autopause_flags. This seems to also be the case with 'character sounds' at least so I'm wondering if this is a general rendering issue. I also see this same behaviour in a vanilla Linux x86 build. Is it a known issue?

 

All the above are the same for 0.7.1 and 0.7.2.

 

Mark

Link to comment

can you be more specific about issue 2? or better yet post a screen shot?

 

I'm imagining that the x + wx > width test causing a newline is what you mean, but it isnt clear to me from your description what exactly is happening.

 

Also it probably doesnt matter but I for one have no idea what a "Pandora" is so i havent a clue what architecture it uses or what compiler/version.

Link to comment

Yep, may be a compiler bug. Or it may be something that is shown up when optimized only on certain architectures. I'll have to dig into it some more at some point, but for now have a few workarounds...

 

I just got some feedback on the 0.72 build... Will have a dig into this when/if I get a chance - at least to see if its a core problem or a Pandora build one.

...there are some problems with gemrb 072. I've been playing Baldur's Gate 1 for a bit and the biggest problem is that when a character casts a spell the game pauses, at least during combat (it is not an auto pause issue). And the artificial intelligence button does not work well.

I don't know if these issues are from the original gemrb 072 or they are created in the pnd conversion.

Link to comment

Sounds like a gemrb problem. In a recent thread we found out some of the autopause options were mapped incorectly. You can cleanly cherrypick 38e7d06d9fdf6de9677d62d799142460dd6dcbda from master and rebuild.

 

I highly doubt it is not an autopause issue - how was this determined? Disabling all autopause options (Auto pause state=0 in baldur.ini) would be a quick way to verify it. And we even trigger it only in combat ...

Link to comment

Thanks Lynx. I applied this newer version of GUIOPT.py.

 

I also found that I'd mispackaged 0.7.2 which very likely caused many problems. I'd installed it over 0.7.1 and it looks like the old scripts were still run (e.g. bg1/GUIOPT.py instead of global GUIOPT.py etc). I did a completely clean install and its definitely behaving better. The new config saving now works etc:-)

Link to comment

Good news - I updated my compiler to gcc 4.7.2 and now the optimized build appears free of the issues described earlier. I had been using the Sourcery Lite patched version of gcc from 09/2011 (which a lot of people use on the Pandora...).

 

The checkbox issue is still outstanding. i.e. BG1 checkboxes are inverted. I think BG2 is correct!

Link to comment

I made this change to sort out the BG1 checkboxes (instead of adjusting the Button), still not sure this is the correct fix but I think its more likely.

 

--- ../gemrb/GUIScripts/GUIOPTControls.py_Original	  2012-12-09 21:03:32.000000000 +0000
+++ ../gemrb/GUIScripts/GUIOPTControls.py	   2012-12-09 20:54:40.000000000 +0000
@@ -82,6 +82,8 @@
		    button.SetSprites("GBTNOPT4", 0, 0, 1, 2, 3)
    elif GUICommon.GameIsIWD1():
		    button.SetSprites ("GMPPARBC", 3, 1, 2, 3, 5)
+	   elif GUICommon.GameIsBG1():
+			   button.SetSprites ("GMPPARBC", 3, 1, 2, 3, 5)
    if handler:
		    button.SetEvent (IE_GUI_BUTTON_ON_PRESS, handler)

Link to comment

Archived

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

×
×
  • Create New...