maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   ScummVM on N900 (https://talk.maemo.org/showthread.php?t=33126)

fanoush 2009-12-14 14:43

Re: ScummVM on N900
 
Quote:

Originally Posted by Helmuth (Post 427120)
So my second suggestion in post #90 could work without changes in a easy enought way?
Or are there limitations avoiding something like this?

I think about a menu tat appears like the Menu when you press the power Button on the N900 once. Only click a Button and send the needed keycode to the running scummVM without changes on the scumm code. Everything we need is covered with keycodes.

I am not sure what was your second suggestion in post #90 but anyway, there is even better way than your suggestion of opening and closing external dialog - external virtual keyboard run side by side. This was the way it was done before on previous tablets - check some screenshots of xkbd with various keyboard layouts here
http://talk.maemo.org/showthread.php?t=35841&page=5

I guess xkbd may not run out of box on N900 yet but it should be doable, and again making it running would benefit other games too.

Also if xkbd does not work there should be possiblity of embedding any sdl appliciation (i.e. scummvm) into other application by using SDL_WINDOWID variable when starting it. SDL then uses that window for its output. So in theory one can hack small application in python with few buttons and embed scummvm inside it, check this http://sdl.beuc.net/sdl.wiki/FAQ_GUI

I am not saying these are best ways to do it but if you are unhappy with current state and want quick solution then it may work.

Psymastr 2009-12-15 13:44

Re: ScummVM on N900
 
I am having a bit of a problem with monkey island 3. it is 640x480 and the top bar that shows signal strength and scummvm title pushes the game down 20 oe whatever pixels so it is a lot harder to play it. will you include fullscreen support?

p.s. thanks for your awesome work, playing MI games on the go is the best :)

javispedro 2009-12-15 14:27

Re: ScummVM on N900
 
Quote:

Originally Posted by fanoush (Post 426825)
Maybe in future I can try to start another thread from inside scummvm and initialize glib etc. and listen to d-bus events in parallel to SDL event loop (mainly to support power management better) but it is not trivial. Actually in that case maybe abandoning SDL and starting from scratch would be easier and allowed more flexibility. It is a lot of work though. Also I like current state where all Maemo devices running OS2006,7,8,maemo5 can run same scummvm binary compiled from same source code. Supporting each device and each Maemo version separately is more work too.

Note that what the hildon-games-wrapper library tries to do is exactly that: mix SDL event loop and D-Bus. It actually tries to notify you of certain system / power events, but in a buggy way ;)
I'm constantly wondering too whether to keep on using SDL1.2 or switch to Glib+Gtk... with recent developments I think I'll keep with SDL1.2. SDL1.3 is also an option since the Maemo port is theoretically now "under our control" and we ("we" as in community) may put whatever fixes we care about into it.

Quote:

Originally Posted by kimtuomi (Post 418209)
There is another problem concerning Broken Sword 1. The inventory bar opens in top of the screen. Even when playing in full screen mode and trying to handle the first object in inventory bar, the N900 application menu is triggered although it is not visible on screen.

This is yet another SDL1.2 vs hildon-desktop miscommunication that arises from SDL windows using CWOverrideRedirect instead of fullscreening using NetWM.

You may want to do something like this to the SDL fullscreen window, just after SDL_SetVideoMode
Code:

SDL_SysWMinfo wminfo;
Display *display;
Window xwindow;
XSetWindowAttributes xattr;
Atom atom;
int one = 1;

        SDL_VERSION(&wminfo.version);
        if (!SDL_GetWMInfo(&wminfo)) return;

        wminfo.info.x11.lock_func();
        display = wminfo.info.x11.display;
        xwindow = wminfo.info.x11.fswindow;

                XUnmapWindow(display, xwindow);
                xattr.override_redirect = False;
                XChangeWindowAttributes(display, xwindow, CWOverrideRedirect, &xattr);

                atom = HDATOM(_NET_WM_STATE_FULLSCREEN);
                XChangeProperty(display, xwindow, HDATOM(_NET_WM_STATE),
                        XA_ATOM, 32, PropModeReplace,
                        (unsigned char *) &atom, 1);

                XChangeProperty(display, xwindow, HDATOM(_HILDON_NON_COMPOSITED_WINDOW),
                        XA_INTEGER, 32, PropModeReplace,
                        (unsigned char *) &one, 1);
                XMapWindow(display, xwindow);

wminfo.info.x11.unlock_func();

(this may not compile since I just stripped it from my workspace test app ;) , you also need to define the HDATOM macro -- if you don't care about roundtrips just use XInternAtom instead.

Also, the above snippet sets NON_COMPOSITED mode which gives a nice speed bump (will be on by default from firmware 1.1 onwards).

mikkov 2009-12-15 14:47

Re: ScummVM on N900
 
Quote:

Originally Posted by javispedro (Post 428996)
This is yet another SDL1.2 vs hildon-desktop miscommunication that arises from SDL windows using CWOverrideRedirect instead of fullscreening using NetWM.

Is this the same issue as here https://bugs.maemo.org/show_bug.cgi?id=5601 ?

javispedro 2009-12-15 15:02

Re: ScummVM on N900
 
Quote:

Originally Posted by mikkov (Post 429034)
Is this the same issue as here https://bugs.maemo.org/show_bug.cgi?id=5601 ?

Yep, thanks!

fanoush 2009-12-15 15:03

Re: ScummVM on N900
 
Quote:

Originally Posted by Psymastr (Post 428937)
. will you include fullscreen support?

ctrl+space

Actually there are two scummvm related priorities for me now:

- document keybindings - there was nice wiki page before and the link was automatically shown at downloads.maemo.org ScummVM product page. Since then that wiki tagging feature was removed from downloads.maemo.org and the Maemo wiki itself was switched to another engine and the page is gone. I have a backup so I need to make it availabe again, this time hosted at wiki.scummvm.org

- push source to extras-devel and extras-testing (-testing after keys are documented, -devel ASAP, it is ready)

fanoush 2009-12-15 15:14

Re: ScummVM on N900
 
Quote:

Originally Posted by javispedro (Post 428996)
Note that what the hildon-games-wrapper library tries to do is exactly that: mix SDL event loop and D-Bus. It actually tries to notify you of certain system / power events, but in a buggy way ;)

Can you point me to example code?

I was ignoring the wrapper since I guess this is the thing used in builtin games (Tetris,Marbles) and I absolutely hate the 'game is gone when not in fulscreen' feature. Is this optional? I want scummvm to visibly run in non-fullscreen mode too. And also I don't want initial splash screen with Play/Start button.

javispedro 2009-12-15 21:18

Re: ScummVM on N900
 
Quote:

Originally Posted by fanoush (Post 429081)
Can you point me to example code?

I was ignoring the wrapper since I guess this is the thing used in builtin games (Tetris,Marbles) and I absolutely hate the 'game is gone when not in fulscreen' feature. Is this optional? I want scummvm to visibly run in non-fullscreen mode too. And also I don't want initial splash screen with Play/Start button.

In that case, I suggest you get some inspiration from the source code of the library instead. :)

fanoush 2009-12-15 22:41

Re: ScummVM on N900
 
scummvm (1.0.0-3)

* disable taskmanager topleft button in fullscreen mode (N900)
* map shift+click to right button click
* map ctrl+click to mouse move (no button click)
* set fullscreen window as _HILDON_NON_COMPOSITED_WINDOW (N900)

http://fanoush.wz.cz/maemo/scummvm_1.0.0-3_armel.deb

The only real feature is making Broken Sword and other games with something important in topleft corner playable.

Borealid 2009-12-16 04:14

Re: ScummVM on N900
 
Quote:

Originally Posted by fanoush (Post 429687)
scummvm (1.0.0-3)

* disable taskmanager topleft button in fullscreen mode (N900)
* map shift+click to right button click
* map ctrl+click to mouse move (no button click)
* set fullscreen window as _HILDON_NON_COMPOSITED_WINDOW (N900)

http://fanoush.wz.cz/maemo/scummvm_1.0.0-3_armel.deb

The only real feature is making Broken Sword and other games with something important in topleft corner playable.

Great, but could you possibly enable the SCI engine? I enjoy playing games like King's Quest V.


All times are GMT. The time now is 00:51.

vBulletin® Version 3.8.8