Jump to content

Working port to Ios


Guest SyntaxError

Recommended Posts

Ok, if you switched resolution and it's ok, then probably you had some unsupported resolution which has no possible gui resources. The colors are the results of some ipad related hack about the masks. If there are differences in SDLVideo (around createsprite calls), i would try the original gemrb lines. Not all masks had to be zeroed out.

 

I reverted all my masks to git so I could fix the blue paper doll in BG2. Now I only 0 out the masks when SDL 1.3 would have complained (at run time not compile time). see SDL 1.3 requires all masks to be set or no masks be set, even the alpha.

 

I dont really feel like doing anything else with it since i dont have a game that has a problem. BG2 is fixed and thats the only game i have installed. Since i dont have IWD i cant backtrace the sprite calls to their exact origin.

 

I could always totally revert the masks to git and you would end up with black instead :laugh:

I guess, this means, reverting didn't help with the odd colors?

Link to comment

Leaving the masks alone (as they are in the git source) results in several NULL sprites. (unknown pixel format errors)

 

making them all 0 results in several discolored sprites. 0 masks on a 32bit sprite default to SDL_PIXELFORMAT_RGB888

 

to fix the discolored graphics is BG2 i made a mask validation macro:

 

#if SDL_VERSION_ATLEAST(1,3,0)
// this will result in SDL_PIXELFORMAT_RGB888
#define SDL_VALIDATE_MASKS(rMask, gMask, bMask, aMask) \
if(!rMask || !gMask || !bMask || !aMask){\
rMask = 0;\
gMask = 0;\
bMask = 0;\
aMask = 0;\
}
#else
#define SDL_VALIDATE_MASKS(rMask, gMask, bMask, aMask)
#endif

 

To me it seems that gemrb wants to create a sprite that is either not a SDL_PIXELFORMAT_RGB888 sprite, or is using the wrong masks. for SDL_PIXELFORMAT_RGB888 the masks should be R=0x00FF0000, G=0x0000FF00, B=0x000000FF, but gemrb is using masks that are shifted 1 byte left.

 

Avenger, while we are on the topic is SDLVideo::CreateDisplay what pixel format should the buffers be using? the way the masks are supplied in git doesnt work so i defaulted to RGB888 and it woks fine, but there was an alpha mask before i changed it. is the intention to create an RGBA8888 surface? if so why?

Link to comment

New build:

 

Lots of changes to interface and input. Keep in mind nothing is set in stone and i made these changes to get feedback. I can probably make any controversial changes optional, but I want everybody to try it this way first.

 

1. the touch scroll areas are now optional (thanks to beh0lder and his work). they are now disabled by default.

2. tap+hold for right click is still here, but now doesn't click until finger up. shortened the length of the hold to about a quarter of a second.

3. tap+hold while finger is down displays tooltips

4. disabled mouse hover tooltips

5. disabled mouse cursors

6. you can now leave gemrb and it will suspend and restore properly. keep this in mind as gemrb will no longer exit when hitting home.

there is a known issue with sound not always coming back you can go home and back in until it fixes itself. another minor issue is that leaving during amovie and coming back the movie will appear frozen but you can click though it still.

7. implemented 2 finger gestures:

A. two finger gestures act as if both tab and alt are held down

B. two finger scrolling acts like a mouse scroll wheel. this means you should be able to scroll dialogue boxes (untested) and it scrolls the game viewport

 

Please give feedback for the changes.

 

Remember that the config is in the app bundle (soon i will make this the secondary location and primary will be elsewhere). so if you dont want to overwrite your config remove it before replacing the app. If you dont overwrite your config i recommend turning off the touch scroll areas; they are not needed now.

 

Again this is iPad only for now. iPhone support is next on the agenda.

download

Link to comment
New build:

 

Lots of changes to interface and input. Keep in mind nothing is set in stone and i made these changes to get feedback. I can probably make any controversial changes optional, but I want everybody to try it this way first.

 

1. the touch scroll areas are now optional (thanks to beh0lder and his work). they are now disabled by default.

2. tap+hold for right click is still here, but now doesn't click until finger up. shortened the length of the hold to about a quarter of a second.

3. tap+hold while finger is down displays tooltips

4. disabled mouse hover tooltips

5. disabled mouse cursors

6. you can now leave gemrb and it will suspend and restore properly. keep this in mind as gemrb will no longer exit when hitting home.

there is a known issue with sound not always coming back you can go home and back in until it fixes itself. another minor issue is that leaving during amovie and coming back the movie will appear frozen but you can click though it still.

7. implemented 2 finger gestures:

A. two finger gestures act as if both tab and alt are held down

B. two finger scrolling acts like a mouse scroll wheel. this means you should be able to scroll dialogue boxes (untested) and it scrolls the game viewport

 

Please give feedback for the changes.

 

Remember that the config is in the app bundle (soon i will make this the secondary location and primary will be elsewhere). so if you dont want to overwrite your config remove it before replacing the app. If you dont overwrite your config i recommend turning off the touch scroll areas; they are not needed now.

 

Again this is iPad only for now. iPhone support is next on the agenda.

download

Works great! I like the 2-fingers map scrool.

However the 2-fingers dialog box scroll doesn't seem to work.

by defaultthe dialog box shows the first texts, not the last one, and I can't seem to get it to scroll.... am I doing something wrong ?

Link to comment
I dont know; like i said it was untested as i dont have a convenient way of testing it so unless you want to send me a save right near someone i can engage in a long dialogue with it probably wont get fixed.

Not sure my save would do good as I'm running BGT, not BG2.

JonathanPi do you have the same issue or is it just me who doesn't know how to use it properly?

Link to comment
I dont know; like i said it was untested as i dont have a convenient way of testing it so unless you want to send me a save right near someone i can engage in a long dialogue with it probably wont get fixed.

Not sure my save would do good as I'm running BGT, not BG2.

JonathanPi do you have the same issue or is it just me who doesn't know how to use it properly?

 

Im sure its not a know how thing. It should work just like a scrollwheel since all im doing in mimicking a scroll-wheel. I cant imagine it would be different in BG2 vs BGT even though i have no idea what BGT is.

Link to comment
I dont know; like i said it was untested as i dont have a convenient way of testing it so unless you want to send me a save right near someone i can engage in a long dialogue with it probably wont get fixed.

Not sure my save would do good as I'm running BGT, not BG2.

JonathanPi do you have the same issue or is it just me who doesn't know how to use it properly?

 

Im sure its not a know how thing. It should work just like a scrollwheel since all im doing in mimicking a scroll-wheel. I cant imagine it would be different in BG2 vs BGT even though i have no idea what BGT is.

It's a combined install of bg1 and bg2 allowing to play it as one big game and using bg2 interface and graphics engine

Best it to have sbdy running bg2 provide the save

Link to comment
Im sure its not a know how thing. It should work just like a scrollwheel since all im doing in mimicking a scroll-wheel. I cant imagine it would be different in BG2 vs BGT even though i have no idea what BGT is.

 

Its definitely not a 'know how' thing. Using the scroll wheel in BG2 makes the dialogue box look like this (on PC and iPad).

 

img0058i.png

 

I can verify that the mouse scrolling does not work on the iPad but you can scroll up on the PC when the dialogue gets filled. Not so on the iPad. It is causing a bit of the text to run past the bottom of the conversation interface. Had to reload a game because it would not go back to gameplay mode (dialogue box stuck on screen).

 

I love the two finger scrolling/highlighting. It works VERY well. Also, change to the right click, bloody brilliant. As far as the mouse cursor being gone, I didn't even notice it was missing. Definitely feels like "Baldur's Gate 2? We got an app for that!" I love it.

 

My vote is to scratch the dialogue scrolling. Never really find myself using it on the PC and it seems to be a bit cumbersome on the iPad. If you can make it disable-able, more power to you.

 

 

Oh yeah, BGT is a mod that combines BG1 and BG2 into one continuous game, played through the BG2 engine.

 

@bsauvage Keep me updated on your playthrough of BGT (ie, if you find any major bugs). I am ultimately going to be installing that on my iPad as well. Also, just in case you didn't know, you can take a screenshot of you iPad screen by pressing 'power' and 'home' button at the same time. It won't interfere with your game. Helpful for evidence of issues.

Link to comment

the 2 finger scrolling mimics a scrollwheel so i dont pick and choose what it interacts with. it is likely that there is a bug in the core scrollwheel code that i wrote. I'm assuming that if dialogue scrolling worked correctly you wouldnt mind it; after all nothing is forcing you to use it. I just need to fix it. I'll look at it tomorrow or sunday.

 

I should also try and figure out why all the text is gold. the options should be red.

Link to comment
the 2 finger scrolling mimics a scrollwheel so i dont pick and choose what it interacts with. it is likely that there is a bug in the core scrollwheel code that i wrote. I'm assuming that if dialogue scrolling worked correctly you wouldnt mind it; after all nothing is forcing you to use it. I just need to fix it. I'll look at it tomorrow or sunday.

 

Well, it is preventing me from scrolling at all with the dialogue box, even when clicking the scroll 'buttons'. It is also cutting off a line of text at the bottom, so you can't read it.

 

And ... It gets worse. Once the dialogue box fills up, any options you can pick from appear at the bottom while the dialogue box is locked at the top. Again, unable to scroll down, at all. Can't select them.

 

I should also try and figure out why all the text is gold. the options should be red.

 

I ... Never really noticed that, actually. It's been gold since I've been playing on the iPad.

Link to comment
the 2 finger scrolling mimics a scrollwheel so i dont pick and choose what it interacts with. it is likely that there is a bug in the core scrollwheel code that i wrote. I'm assuming that if dialogue scrolling worked correctly you wouldnt mind it; after all nothing is forcing you to use it. I just need to fix it. I'll look at it tomorrow or sunday.

 

I should also try and figure out why all the text is gold. the options should be red.

Indeed I don't mind either way.

While waiting for the fix is there a way to see the text that's hiding at the bottom ofthe dialog box? Clicking on the text scroll buttons on the right doesn't seem to be working

Link to comment

the 2 finger scroll isnt at fault here its the scrollbar code. i made a mistake somewhere in that.

 

Edit: yup, I see what ive done. used Pos inseatd of newPos >_<

 

also im not forcing a redraw. also a problem

 

Fixed now

 

still haven't looked at the text color being wrong. more concerned about getting my changes into commitable patches ATM. next build will sync with git and that contains some spell casting fixes and the trap disarm fix (among many others)

Link to comment

Archived

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

×
×
  • Create New...