This changes nothing

Major Arcana now runs in a window. Isn’t that neat?

Actually, it’s not – I hate games that run in windows. The very first thing I do when I download a new indie game is look for the fullscreen option – I couldn’t stand Poyo at first because I thought there was no fullscreen mode (there is, as it turns out. Bloody F4 of all keys). Bah! Games want to be played fullscreen!

However, I seem to be in a minority on this. And what the hell, it’s handy for coding. So I added a windowed mode.

I haven’t gotten the whole windowed thing down yet, though – I’ve got the close button working all right – Allegro has a little callback function to take care of it. And the alt-enter thing to switch to fullscreen was easy too, just a couple of lines in the input handler:

  //Fullscreen check
  if((key[KEY_ALT]||key[KEY_ALTGR])&&key[KEY_ENTER]){
    if(fullscreen){
      set_gfx_mode(GFX_AUTODETECT_FULLSCREEN, 800, 600, 0, 0);
    }else{
      set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0);
    }
    fullscreen=(fullscreen==false); 
    while(key[KEY_ENTER]);
  }

(Hmm. Not sure why I pasted that… At least it fills out this painfully thin update!)

There are two little things I still haven’t worked out:

(1) The Maximise Button: This is probably dead easy, but I haven’t got a clue about Windows GUI stuff and Allegro doesn’t come with a helper function on this one. Google hasn’t been much help, but I’m probably just using the wrong search queries.

(2) Alt-Tab: When you switch away from the window, the music starts skipping over the last couple of seconds, like a CD with a scratch. I want the engine to simply pause the music when you change the window, but I haven’t worked out how to capture that event yet.

(Man, I really wish I’d bothered to learn some basic windows programming at some point…)

Well, whatever. If I actually had a list of priorities for this game, this wouldn’t even be on it. If you’re the kinda person who plays a console style RPG in a window, then maybe you deserve to have your music skip on you. Bah!

Incidentally, I also did some actual coding during the week, but I want to wait until what I’ve done is fully implemented before I say anything about it! 🙂

* 1 Comment

1 Comment so far

  1. Josiah Tobin on May 2nd, 2007

    Death to the windowed heretics! Full screen is the only way to play a crpg! :p

    ~Josiah

Leave a reply