Author Topic: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)  (Read 6717 times)

dimap

  • Guest
Sorry for my bad english. I'm russian)
(Warning! Google translate!)
-----------------
Hi all. I make a port of the game Open Syobon Action for Dingux. Although everything works fine (sound, buttons, screen ...), but the screen resolution remains the standard. I've tried everything - nothing worked. Help please! :'(
Compiled from Cygwin.

Part with video initialisation:
Code: [Select]
/* Initialise SDL Video */

if (SDL_Init(SDL_INIT_VIDEO) < 0)
{
printf("Could not initialize SDL: %s\n", SDL_GetError());

exit(1);
}


screen = SDL_SetVideoMode(320, 240, 32, SDL_SWSURFACE|SDL_FULLSCREEN);

if (screen == NULL)
{
printf("Couldn't set screen mode to 320 x 240: %s\n", SDL_GetError());

exit(1);
}

If anyone wants to - make video with game work.
« Last Edit: February 20, 2011, 05:43:47 pm by dimap »

Poligrafowicz

Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #1 on: February 20, 2011, 05:36:24 pm »
I see you initialise 32bit color, but dingux supports only 16bit color (not sure if its 565 or 555). I have no idea what happens when you initialize other color depth than 16, but 16 is the way to go.

As for screen resolution remaining standard (why is?), maybe graphics location is hard coded. The cheap way to go around this, would be render everything on a temporary surface (with the same resolution as the game used natively) and then downscale the temporary surface and display it on actual screen surface.

dimap

  • Guest
Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #2 on: February 20, 2011, 05:42:04 pm »
With 16bit lost transparency. With 32bit all works fine.

About surface. Dingux does not perceive surface (and i don't know why!)
If needed, i can share the sources, but code is so bad(( (Yeap, i'm noob!)

Poligrafowicz

Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #3 on: February 20, 2011, 06:29:15 pm »
With 16bit lost transparency. With 32bit all works fine.

About surface. Dingux does not perceive surface (and i don't know why!)
If needed, i can share the sources, but code is so bad(( (Yeap, i'm noob!)

Ok I dont really understand what is the problem. Maybe the sourcecode would shed some light, do post it please.

clach04

Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #4 on: February 20, 2011, 06:39:39 pm »
It may be worth hanging on IRC, http://webchat.freenode.net/?channels=dingoonity

dimap

  • Guest
Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #5 on: February 20, 2011, 06:44:05 pm »
All sources.
http://www.box.net/shared/8bg6e97pv5
"Makefile" based on makefile from Labyrinth and work fine. Error in DxLib.cpp , in begin.

Poligrafowicz

Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #6 on: February 20, 2011, 07:15:36 pm »
So what resolution the game used originally?

It appears that location of all graphics is hardcoded to use the original resolution. If you want the game to fit 320x240 Dingoo screen, you have to downscale it. Add a new SDL_Surface (make sure it has 32bit depth and same resolution as the game had originally). Next find the main drawing routine, make it draw stuff on that surface instead of your screen surface. Then downscale that temporary surface to 320x240 and draw it on screen surface.

It may be worth hanging on IRC, http://webchat.freenode.net/?channels=dingoonity

And that is a good tip.

dimap

  • Guest
Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #7 on: February 20, 2011, 07:18:59 pm »
Original resolution - 480x420

Poligrafowicz

Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #8 on: February 20, 2011, 07:28:02 pm »
In fact it'll be easier to name the temporary surface screen (like ho the actual screen surface is named now). This way there will be less code to change.

dimap

  • Guest
Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #9 on: February 20, 2011, 09:39:20 pm »
Well... I absolutely do not know how to do it. Sorry guys  :'(

Poligrafowicz

Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #10 on: February 20, 2011, 11:17:11 pm »
I wrote a quick (written quickly rather than working fast) and dirty downscaler for the game, which seems to work (I get the image on screen), but for some reason the game hangs (sort off). That is I can still quit it with select.

http://www.mediafire.com/?ppsn1e8wzndcdzh
« Last Edit: February 20, 2011, 11:27:14 pm by Poligrafowicz »

dimap

  • Guest
Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #11 on: February 20, 2011, 11:18:34 pm »
Can you share the code? Maybe i found cause.
---------
Oh! I think I figured out how to fix the button)
« Last Edit: February 20, 2011, 11:26:53 pm by dimap »


dimap

  • Guest
Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #13 on: February 20, 2011, 11:32:35 pm »
It's working (buttons too)! But realy VERY slow... strange...

dimap

  • Guest
Re: Cat Mario (Open Syobon Action) for Dingux (screen resolution problem)
« Reply #14 on: February 21, 2011, 01:06:15 am »
I try: change resolution, change bits per pixels, change flags, change core clock, add and delete SDL_DOUBLEBUF,SDL_SWSURFACE , SDL_HWSURFACE, SDL_FULLSCREEN , add palete.
Nothing!  ::)
Any ideas?

By the way. Sound is working very fine, without lags. Buttons too. I delete video initialisation, but game already work!

 

Post a new topic
Post a new topic