Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: (C++) Window Size in Allegro  (Read 1540 times)

0 Members and 1 Guest are viewing this topic.
(C++) Window Size in Allegro
« on: July 09, 2009, 07:13:00 pm »
  • You don't know me.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 234
So, yeah, I've been learning more about Allegro, but I haven't actually seen anything about changing the size of the screen when in windowed mode. When I tried, I ended up just messing around with the resolution (which, of course, didn't work, and made me feel stupid when I realized what it was I was changing).

If anybody here knows how to do this, then any help would be appreciated. Thanks!

I'm sure this is the right forum this time.
Logged


No one located in this area of the internet remembers me.
Re: (C++) Window Size in Allegro
« Reply #1 on: July 10, 2009, 11:54:43 pm »
  • Fight the Power
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1245
You were using something like this:
Code: [Select]
set_gfx_mode( GFX_AUTODETECT, 512, 256, 0, 0);right? :D

I found this, maybe it can help:
Code: [Select]
# SCREEN_H — Global define to obtain the size of the screen.
# SCREEN_W — Global define to obtain the size of the screen.
H being height and W width, of course.
I also found this, I'm not sure what the difference is, though:
Code: [Select]
# VIRTUAL_H — Global define to obtain the virtual size of the screen.
# VIRTUAL_W — Global define to obtain the virtual size of the screen.

BTW, I'm trying to learn Allegro, too. I'm having trouble installing it, though. Haha xD Are you using MSVC? I don't know where to unpack the .h files and so on, and I can't even find the .lib and .dll files in my allegro folder. Did you get this aswell?
Logged

Currently Listening to: Mos Def - Summertime
Re: (C++) Window Size in Allegro
« Reply #2 on: July 12, 2009, 08:01:52 pm »
  • You don't know me.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 234
Yeah, that's what I was doing. Silly, isn't it?

I'm pretty sure the SCREEN_W/H values are constants, as after setting Allegro to graphics mode they're immediately available to use to find the screen size (like in blitting where you only want to copy a segment of a background no larger than the screen so you can display it). The book I'm using hasn't actually talked about the VIRTUAL ones, so I'll look at that, though it may also be a constant thing. Thanks.
Logged


No one located in this area of the internet remembers me.
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.018 seconds with 41 queries.

anything