DirectX 8 introductory lecture on game programming)

Source: Internet
Author: User
Original (day) Maeda NLP
[Homepage] http://www.cong.ac.jp /~ Maeda/
[Email] maeda@cong.ac.jp
Translation (medium) Yan Chen
[Homepage] http://www.yanchen.com/
[Email] vagra@sina.com
Contents

Getting started with super cainiao
Full-screen programming example
Window mode programming example

Getting started with super cainiao

§ 01. Install DirectX 8
Install the DirectX 8 SDK (software development kit ).

02. DirectX 8 path setting
Set the include and Lib paths and integrate the compilation environment.

§ 03. Compile the Direct Draw sample
Compile the sample program that comes with the SDK.

§ 04. Move the sample to another folder
Set the shared program file in common.

§ 05. The simplest windows program
The program that outputs the debug message.
Learn how to create and operate a project.

§ 06. Display dialog box (dialog box)
Describe how to create and display dialog box.

§ 07. Window Creation and message box
Generate the DirectX 8 window.
Briefly describe the parameters of winmain.

§ 08. Display Hello DirectX 8!
Creates and depicts the surface for storing strings ).

§ 09. display a true color bitmap image
Creates and depicts the surface for storing bitmap images ).

§ 10. Play Music (MIDI files)
Specify the MIDI file name in the program to play the music.

§ 11. Use a background image and a transparent text Representation
Store the background image (320*240) to the surface that adapts to the image size (640*480.
Set the transparent color (black) for the text so that the background can be seen.
Take a closer look at the source program.

§ 12. display the bitmap image in window mode
Window mode.
When the drag window is changed, the image scales with the screen.

13. Scroll background
Move two consecutive side-by-side background images to the rectangular area on one side, and scroll the image.
Take a closer look at the source program in window mode.

§ 14. depict circles and rectangles
Obtain the buckbuffer (background cache) in window mode and directly depict the circle and rectangle.

§ 15. Create a private library (mydx8.lib)
Describes how to create a private library and its header files.

Top

Full-screen programming example

§ F01. Full Screen mode (Full Screen mode) background image of the vertical scroll
Apply the sample program of mydx8.lib in full screen mode.
Split up and down vertical scroll of an image of the same size as the image.

Top

Window mode programming example

§ W01. Use the draw function to depict "robot cat"
Apply the sample program of mydx8.lib in window mode.
Use the draw function to depict "robot cat" for buckbuffer (background cache ".

§ W02. Drag and Drop to display images
Display the drag-and-drop image in the window size.
Obtains the image size from the BMP file header.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.