Screen section to clear

This is a discussion on Screen section to clear within the C++ Programming forums, part of the General Programming Boards category; Is it possible to only clear one part of the screen?? For example I am making a game and when ...

  1. #1
    Spanky devour89's Avatar
    Join Date
    Nov 2002
    Posts
    148

    Screen section to clear

    Is it possible to only clear one part of the screen?? For example I am making a game and when you get into a fight underneath the all the data about monster etc etc there is a menu made with character mapping. I want this menu to update if the user deals damage dealt damage you know the ussual so that in to message part of the menu it says something like "You took 5 damage"and then it goes away in 3 sec or so

    Here is the code for the menu:

    Code:
    #include <iostream>
    #include <conio.h>
    int main()
    {
    int hp = 10;
    int dam = 15;
    int lvl = 1;
    cout<<"ห  ส  ษ  ศ  ฬ  อ  ฮ  ฯ  ม  ย  ร  ฤ า  ำ  ิ  ึ  ู  ฺ  น  บ  ป    ฒ  ณ  ผ  ฝ  พ ";
    cout<<endl;
    cout<<endl;
    cout<<"ษออออออออออหอออออออออหออออออออออออออออออออออออออออออออออออออป";
    cout<<endl;
    cout<<"บHP:"<<hp<<"     บLVL:"<<lvl<<"    บMESSAGES:                             บ";
    cout<<endl;
    cout<<"บDAM:"<<dam<<"    ฬอออออออออฮออออออออออออออออออออออออออออออออออออออน";
    cout<<endl;
    cout<<"บ          บ         บ                                      บ";
    cout<<endl; 
    cout<<"บ          บ         บ                                      บ";
    cout<<endl;
    cout<<"บ          บ         บ                                      บ";
    cout<<endl; 
    cout<<"บ          บ         บ                                      บ";
    cout<<endl; 
    cout<<"บ          บ         บ                                      บ";
    cout<<endl;
    cout<<"บ          บ         บ                                      บ";
    cout<<endl; 
    cout<<"บ          บ         บ                                      บ";
    cout<<endl;
    cout<<"บ          บ         บ                                      บ";
    cout<<endl;
    cout<<"บ          บ         บ                                      บ";
    cout<<endl;
    cout<<"ศออออออออออสอออออออออสออออออออออออออออออออออออออออออออออออออผ";
    getch();
    return 0;
    }
    As you can see this is not the one for my game but its the same princeple
    Last edited by devour89; 12-13-2002 at 07:18 AM.
    Dev C++
    Win XP/2k/98

    I DO NOT TAKE CLASSES I DONT GET HOMEWORK THIS IS NOT A HOMEWORK QUESTION!!!

    He's lean he's keen... He's the spank machine!

  2. #2
    Spanky devour89's Avatar
    Join Date
    Nov 2002
    Posts
    148
    Thanks, but there is two more things

    1. I tried to download all of the libraries but none of them seem to work I am using win zip is this maybe the reason? If it is what compresser should I be using to read these files?

    2. I'll probally be using this method after i have read through it but for now i have another problem. In the message section of the Menu its going to display Last enemy fought, money gained and skill gained but these vary in size so the menu messes up when the name of the enemy is to long. Is there anyway to make that side of the menu wall static?? Or something like that?

    thanks

    -Devouring One-

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting a clear screen...
    By Finchie_88 in forum C++ Programming
    Replies: 13
    Last Post: 09-03-2004, 06:38 PM
  2. Clear Screen Again!!!
    By trang in forum C Programming
    Replies: 3
    Last Post: 12-13-2003, 08:36 AM
  3. Yet another clear screen thread :D
    By kermit in forum Linux Programming
    Replies: 2
    Last Post: 11-20-2003, 05:14 AM
  4. How to clear the screen?
    By Zopyrus in forum C++ Programming
    Replies: 8
    Last Post: 11-07-2003, 10:20 PM
  5. clear screen function probs
    By Unregistered in forum C Programming
    Replies: 10
    Last Post: 03-07-2002, 12:29 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21