Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - haynor666

Pages: [1]
1
Scripting / Re: Fetch orientation from list
« on: July 23, 2015, 11:13:14 PM »
I'm sorry but I'm poor programist. I tried as You suggested:

local wi;
local he;

  if ( fe.game_info(Info.Rotation) == 0 )
  {
    wi=256;
    he=192;
  }

  else

  {
    wi=192;
    he=256;
  }


local t = fe.add_artwork( "snap", 16, 16, wi, he );
t.trigger = Transition.EndNavigation;

Now attract mode always setting 192x256 even if currently visible game is with orientation 270, not to mention that switching on the fly does not work.

EDIT. Ok, fe.game_info(Info.Rotation) was not integer, new version:

local wi;
local he;

local or = fe.game_info(Info.Rotation);
local orint = or.tointeger();

  if (orint > 0 )
  {
    wi=240;
    he=320;
  }

  else

  {
    wi=320;
    he=240;
  }

local t = fe.add_artwork( "snap", 300, 16, wi, he );
t.trigger = Transition.EndNavigation;

works but still not on the fly, parameters are taken only from first game and that's it :( I suppose I have to loop t.trigger = Transition.EndNavigation;  Is it possible to changing snap area on the fly (variable wight and height attributes) ?

2
Scripting / Fetch orientation from list
« on: July 23, 2015, 03:46:18 AM »
I'm trying to build layout that can stretch image according to game aspect orientation ie. stretch on area 256x224 or 224x256. Question is, how I can get this variable from list, how can I use it?
There was similiar problem http://forum.attractmode.org/index.php?topic=209.0 but some horizontal screenshots proportions are lower than 1 for example Knuckle Joe so taking image properties and setting stretch according to aspect ratio is not always the best idea.

EDIT. I miss fe.game_info(Info.Rotation), now figure out how to use it.

EDIT. I gave up, I wrote something like this:


local wi;
local he;

function proportions ( wi , he )
  if ( fe.game_info(Info.Rotation) == 0 )
  {
    wi=256;
    he=192;
  }

  else

  {
    wi=192;
    he=256;
  }


local t = fe.add_artwork( "snap", 16, 16, wi, he );
t.trigger = Transition.EndNavigation;

but fetching wi and he does not work. Attract mode claims that values are null. What I'm getting wrong ?

3
General / Re: Any way to hide the console window?
« on: July 23, 2015, 03:04:32 AM »
I would like to know to. Besides it's too astetic it prevents to run Taito Type X game - Raiden IV. Basically game cannot be run correctly if dos windows is open :/

Pages: [1]