Published: September 7, 2008
By Richard G. Baldwin
File: Allegro00110PracticeTest
1. True or False: When you write an Allegro program, you must include the header file named iostream.
2. True or False: When you write an Allegro program, you must include the header file named allegro.h.
3. True or False: While not required, an optional call to the function named allegro_init can expose additional Allegro capabilities.
4. True or False: After you call the function named install_keyboard, you can use any of the keyboard input routines including operating system calls and C library functions to access the keyboard.
5. True or False: The following function call sets the graphics mode to a full-screen window.
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320,240,0,0); |
6. True or False: The standard configuration of Allegro supports five alternative graphics modes that behave in different ways.
7. True or False: The call to the textout_ex function shown below draws the text "HELLO WORLD" on a command-line screen similar to the use of a cout statement in standard C++.
textout_ex(screen,//Specify bitmap on the screen font,//Use a default font "HELLO WORLD",//Specify the text to display 20,//X-coordinate for text 30,//Y-coordinate for text makecol(255,255,0),//Color text yellow makecol( 255,0,0) );//Put red behind text |
8. True or False: Transparency with regard to text is achieved by setting either or both of the color parameters in a call to textout_ex to a value of 256.
9. True or False: A call to the readKey function returns the next character from the keyboard buffer in ASCII format.
10. True or False: According to the documentation at allegro.cc, in order to maintain cross-platform compatibility, you must put the macro shown below at the very end of your main function. This macro requirement is specific to Allegro.
END_OF_MAIN() |
Copyright 2008, Richard G. Baldwin.
Reproduction in whole or in part in any form or medium
without express written permission from Richard Baldwin is prohibited.
Richard has participated in numerous consulting projects and he frequently provides onsite training at the high-tech companies located in and around Austin, Texas. He is the author of Baldwin's Programming Tutorials, which have gained a worldwide following among experienced and aspiring programmers. He has also published articles in JavaPro magazine.
In addition to his programming expertise, Richard has many years of practical experience in Digital Signal Processing (DSP). His first job after he earned his Bachelor's degree was doing DSP in the Seismic Research Department of Texas Instruments. (TI is still a world leader in DSP.) In the following years, he applied his programming and DSP expertise to other interesting areas including sonar and underwater acoustics.
Richard holds an MSEE degree from Southern Methodist University and has many years of experience in the application of computer technology to real-world problems.
Copyright 2008, Richard G. Baldwin. Reproduction in whole or in part in any form or medium without express written permission from Richard Baldwin is prohibited.
Richard Baldwin is a college professor (at Austin Community College in Austin, TX) and private consultant whose primary focus is a combination of Java, C#, and XML. In addition to the many platform and/or language independent benefits of Java and C# applications, he believes that a combination of Java, C#, and XML will become the primary driving force in the delivery of structured information on the Web.Richard has participated in numerous consulting projects and he frequently provides onsite training at the high-tech companies located in and around Austin, Texas. He is the author of Baldwin's Programming Tutorials, which have gained a worldwide following among experienced and aspiring programmers. He has also published articles in JavaPro magazine.
In addition to his programming expertise, Richard has many years of practical experience in Digital Signal Processing (DSP). His first job after he earned his Bachelor's degree was doing DSP in the Seismic Research Department of Texas Instruments. (TI is still a world leader in DSP.) In the following years, he applied his programming and DSP expertise to other interesting areas including sonar and underwater acoustics.
Richard holds an MSEE degree from Southern Methodist University and has many years of experience in the application of computer technology to real-world problems.
-end-