![]() |
|
allegro in windowed mode |
ebbo6
Member #733
November 2000
|
Lets pretend I'm making a game for Windows. And lets also pretend that this game is being played in a window. I know that to do this, I need to start up Allegro like this: install_allegro(SYSTEM_NONE, &errno, atexit); Now this is fine and dandy, until I want to use timers and play sounds. Does anyone have any bright ideas on how i could (easily) add sound and timers to a windowed graphical application????? please help, thanks alot |
vpenquerch
Member #233
April 2000
|
Maybe there's something I'm missing, but how about calling: |
Marty Dill
Member #277
April 2000
![]() |
You could use GFX_DIRECTX_WIN with set_gfx_mode(). |
Goku
Member #686
September 2000
![]() |
On that note, do you have to do all that nasty Win32 API setup yourself to get Allegro running windowed, or can you just switch your install_allegro () and set_gfx_mode () calls to get it windowed? -Goku |
ebbo6
Member #733
November 2000
|
Okay... I looked into your suggestions. If I use GFX_DIRECTX_WIN, it does put it in windowed mode, and if I use SYSTEM_AUTODETECT I can use all of the sound and timer functions. But my problem is that I was want to use Windows GUI functions with my window. More specifically, a Windows menu bar. I looked in the source for the directx port, and I didn't see any easy/portable ways of doing this. Suggestions? |
Funklord
Member #467
June 2000
![]() |
Hi guys, this is almost exactly what I was looking for, can anyone recommend any good tiny (or huge) docs on this (maybe found deeply hidden within the allegro sources)? ---------------------- Age is inversely proportional to how much drink you've had - Funklord |
Daniel_C_McKinnon
Member #685
October 2000
|
Definatly! |
ebbo6
Member #733
November 2000
|
Funklord: If you just want an application that does real-time graphics, its not that hard. The /wintests/dibhello.c example gives excellent insight on the details of that. If you want quick keyboard access, try GetAsyncKeyState(VK_?). It is just as good as Allegro's key[KEY_?]. The real problems come in with sound and timers, for which I have not yet found an easy solution. |
|