OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 16, 2024 10:30 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re:Dark Basic
PostPosted: Wed Dec 11, 2002 2:05 pm 
yah i tried that thing. i never fooled around with it, because i cant make maps. ill learn once i get into making games with c++.


Top
  
 
 Post subject: Re:Dark Basic
PostPosted: Fri Dec 13, 2002 7:51 pm 
When you say "DOS" you mean the Windows Console right? Because if you use the windows console (which is what C/C++ is all about, mostly that is ;)) You should use Allegro, have you even tried allegro?

Here is a simple program in allegro that you can use with MSVC++ (But you MUST have the Allegro librarys installed, get them pre compiled from the allegro.cc files section ;))

Code:
#define USE_CONSOLE

#include <allegro.h>
#include <winalleg.h>

#pragma comment (lib, "alleg.lib")

int main(int arg, char* args[])
{
allegro_init();
install_keyboard();

set_color_depth(32);
set_gfx_mode(GFX_AUTODETECT, 800, 600, 0, 0);

while(!key[KEY_ESC]);
}

END_OF_MAIN();


Ok, What this code does is Change the Graphics Mode to 800x600x32 and hang the system until a key is pressed. It is VERY simple code, this is the basis of a computer game. You MUST put END_OF_MAIN(); at the end, this is allegro specific, i am not sure why it has to go there, but it just does ;)

Well, I don't like the Names of the functions so i change the names, and put them into classes ;D

This code isn't commented, but you can get lots of good tutorials elsewhere, so i won't bother ;D


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 56 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group