Flashing screen?????

This is a discussion on Flashing screen????? within the Game Programming forums, part of the General Programming Boards category; Hey all, I got a Question first off i would just like to say don't bother to post in my ...

  1. #1
    Registered User Joe100's Avatar
    Join Date
    Jul 2003
    Posts
    63

    Unhappy Flashing screen?????

    Hey all, I got a Question first off i would just like to say don't bother to post in my post. If you have something bad to say about me becuase i don't care ok. Anyway my friend stan was showing me this flashing screen program I don't exactly no that much about what the code is the only thing I know is that it flashes different colors lol uuuummmmmm....... but im trying to get the code to ad a little spice to my game.
    "Be Quick Or Be Dead"

    [img]
    http://www.danasoft.com/sig/GU.jpg
    [/img]

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Was it a console app, Windows app, Linux, etc?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,597
    If it's DOS for 320x200x256:


    Code:
    void CLS(unsigned char far *Surface,unsigned char color)
    {
       asm {
         les   di,[Surface] 
         mov cx,32000d
         mov ah,color
         mov al,color
         rep stosw
         }
    }
    If it's DX in 32-bit color:

    Get a pointer to the surface by locking it:

    Code:
    #define RGB32(r,g,b)  ((r<<24)+(g<<16)+(b<<8))
    
    
    Surface[position]=RGB32(red,grn,blu);

    This will fill the screen with one color - flash by clearing and filling every other frame.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 04:56 PM
  2. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 10:18 PM
  3. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 03:41 AM
  4. Converting from Screen to World Coordinates
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 05-11-2004, 01:51 PM
  5. Console Screen Buffer
    By GaPe in forum Windows Programming
    Replies: 0
    Last Post: 02-06-2003, 05:15 AM

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