亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? deb1d3~1.cpp

?? 游戲的聲音圖像演示程序
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
// DEMO12_8_16b.CPP - path finding racing demo
// 16-bit version
// to compile make sure to include DDRAW.LIB, DSOUND.LIB,
// DINPUT.LIB, WINMM.LIB, and of course 
// T3DLIB1.CPP,T3DLIB2.CPP,T3DLIB3.CPP,

// INCLUDES ///////////////////////////////////////////////

#define INITGUID

#define WIN32_LEAN_AND_MEAN  

#include <windows.h>   // include important windows stuff
#include <windowsx.h> 
#include <mmsystem.h>
#include <iostream.h> // include important C/C++ stuff
#include <conio.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h> 
#include <math.h>
#include <io.h>
#include <fcntl.h>

#include <ddraw.h>  // directX includes
#include <dsound.h>
#include <dmksctrl.h>
#include <dmusici.h>
#include <dmusicc.h>
#include <dmusicf.h>
#include <dinput.h>
#include "T3DLIB1.h" // game library includes
#include "T3DLIB2.h"
#include "T3DLIB3.h"

// DEFINES ////////////////////////////////////////////////

// defines for windows 
#define WINDOW_CLASS_NAME "WINCLASS"  // class name

// setup a 640x480 16-bit windowed mode example
#define WINDOW_TITLE      "16-Bit Path Finding Demo"
#define WINDOW_WIDTH      640   // size of window
#define WINDOW_HEIGHT     480

#define WINDOW_BPP        16    // bitdepth of window (8,16,24 etc.)
                                // note: if windowed and not
                                // fullscreen then bitdepth must
                                // be same as system bitdepth
                                // also if 8-bit the a pallete
                                // is created and attached

#define WINDOWED_APP      1     // 0 not windowed, 1 windowed

#define NUM_WAYPOINTS 30 // number of waypoints in path

// PROTOTYPES /////////////////////////////////////////////

// game console
int Game_Init(void *parms=NULL);
int Game_Shutdown(void *parms=NULL);
int Game_Main(void *parms=NULL);

// TYPES /////////////////////////////////////////////////

typedef struct WAYPOINT_TYP
        {
        float x,y;

        } WAYPOINT, *WAYPOINT_PTR;


// GLOBALS ////////////////////////////////////////////////

HWND main_window_handle           = NULL; // save the window handle
HINSTANCE main_instance           = NULL; // save the instance
char buffer[256];                          // used to print text

BITMAP_IMAGE background_bmp;   // holds the background

BOB          car; // this little race car

int wind_sound_id = -1;        // the ambient wind
int car_sound_id = -1;         // the engine of the car

int vector_display_on = 1;     // used to toggle the informational vector rendering

// the way point list hand compiled :)
WAYPOINT path[NUM_WAYPOINTS] = { 

{332,122}, 
{229,108}, 
{155,97}, 
{104,100}, 
{67,119}, 
{46,159}, 
{55,229}, 
{74,283}, 
{132,364}, 
{206,407}, 
{268,412}, 
{291,405}, 
{303,379}, 
{312,274}, 
{336,244}, 
{383,233}, 
{417,240}, 
{434,278}, 
{426,328}, 
{407,388}, 
{418,415}, 
{452,429}, 
{501,419}, 
{534,376}, 
{562,263}, 
{562,188}, 
{556,112}, 
{530,100}, 
{484,97},
{404,116},};                     


// FUNCTIONS //////////////////////////////////////////////

LRESULT CALLBACK WindowProc(HWND hwnd, 
						    UINT msg, 
                            WPARAM wparam, 
                            LPARAM lparam)
{
// this is the main message handler of the system
PAINTSTRUCT	ps;		   // used in WM_PAINT
HDC			hdc;	   // handle to a device context

// what is the message 
switch(msg)
	{	
	case WM_CREATE: 
        {
		// do initialization stuff here
		return(0);
		} break;

    case WM_PAINT:
         {
         // start painting
         hdc = BeginPaint(hwnd,&ps);

         // end painting
         EndPaint(hwnd,&ps);
         return(0);
        } break;

	case WM_DESTROY: 
		{
		// kill the application			
		PostQuitMessage(0);
		return(0);
		} break;

	default:break;

    } // end switch

// process any messages that we didn't take care of 
return (DefWindowProc(hwnd, msg, wparam, lparam));

} // end WinProc

// WINMAIN ////////////////////////////////////////////////

int WINAPI WinMain(	HINSTANCE hinstance,
					HINSTANCE hprevinstance,
					LPSTR lpcmdline,
					int ncmdshow)
{
// this is the winmain function

WNDCLASSEX winclass; // this will hold the class we create
HWND	   hwnd;	 // generic window handle
MSG		   msg;		 // generic message
HDC        hdc;      // graphics device context

// first fill in the window class stucture
winclass.cbSize         = sizeof(WNDCLASSEX);
winclass.style			= CS_DBLCLKS | CS_OWNDC | 
                          CS_HREDRAW | CS_VREDRAW;
winclass.lpfnWndProc	= WindowProc;
winclass.cbClsExtra		= 0;
winclass.cbWndExtra		= 0;
winclass.hInstance		= hinstance;
winclass.hIcon			= LoadIcon(NULL, IDI_APPLICATION);
winclass.hCursor		= LoadCursor(NULL, IDC_ARROW); 
winclass.hbrBackground	= (HBRUSH)GetStockObject(BLACK_BRUSH);
winclass.lpszMenuName	= NULL;
winclass.lpszClassName	= WINDOW_CLASS_NAME;
winclass.hIconSm        = LoadIcon(NULL, IDI_APPLICATION);

// save hinstance in global
main_instance = hinstance;

// register the window class
if (!RegisterClassEx(&winclass))
	return(0);

// create the window
if (!(hwnd = CreateWindowEx(NULL,                  // extended style
                            WINDOW_CLASS_NAME,     // class
						    WINDOW_TITLE, // title
						    (WINDOWED_APP ? (WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION) : (WS_POPUP | WS_VISIBLE)), 
					 	    0,0,	  // initial x,y
						    WINDOW_WIDTH,WINDOW_HEIGHT,  // initial width, height
						    NULL,	  // handle to parent 
						    NULL,	  // handle to menu
						    hinstance,// instance of this application
						    NULL)))	// extra creation parms
return(0);

// save main window handle
main_window_handle = hwnd;

if (WINDOWED_APP)
{
// now resize the window, so the client area is the actual size requested
// since there may be borders and controls if this is going to be a windowed app
// if the app is not windowed then it won't matter
RECT window_rect = {0,0,WINDOW_WIDTH-1,WINDOW_HEIGHT-1};

// make the call to adjust window_rect
AdjustWindowRectEx(&window_rect,
     GetWindowStyle(main_window_handle),
     GetMenu(main_window_handle) != NULL,
     GetWindowExStyle(main_window_handle));

// save the global client offsets, they are needed in DDraw_Flip()
window_client_x0 = -window_rect.left;
window_client_y0 = -window_rect.top;

// now resize the window with a call to MoveWindow()
MoveWindow(main_window_handle,
           0, // x position
           0, // y position
           window_rect.right - window_rect.left, // width
           window_rect.bottom - window_rect.top, // height
           TRUE);

// show the window, so there's no garbage on first render
ShowWindow(main_window_handle, SW_SHOW);
} // end if windowed

// perform all game console specific initialization
Game_Init();

// enter main event loop
while(1)
	{
	if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
		{ 
		// test if this is a quit
        if (msg.message == WM_QUIT)
           break;
	
		// translate any accelerator keys
		TranslateMessage(&msg);

		// send the message to the window proc
		DispatchMessage(&msg);
		} // end if
    
    // main game processing goes here
    Game_Main();

	} // end while

// shutdown game and release all resources
Game_Shutdown();

// return to Windows like this
return(msg.wParam);

} // end WinMain

///////////////////////////////////////////////////////////

int Find_Nearest_Waypoint(float x, float y)
{
// this function finds the nearest waypoint to the sent position

int near_id = 0;
int near_dist = 1000,
    test_dist;

for (int index=0; index<NUM_WAYPOINTS; index++)
    {
    // is this waypoint closer?
    if ((test_dist = Fast_Distance_2D(path[index].x - x,path[index].y - y)) < near_dist)
       {
       // set as nearest waypoint
       near_id = index;
       near_dist = test_dist;   
       } // end if

    } // end for index

// test if user want to see all those lines
if (vector_display_on==1)
   {
   // draw it
   DDraw_Lock_Back_Surface();
   Draw_Line16(path[near_id].x, path[near_id].y - 8,path[near_id].x, path[near_id].y + 8,
              RGB16Bit(0,0,255), back_buffer, back_lpitch); 

   Draw_Line16(path[near_id].x-8, path[near_id].y ,path[near_id].x+8, path[near_id].y,
              RGB16Bit(0,0,255), back_buffer, back_lpitch); 
   DDraw_Unlock_Back_Surface();
   } // end if

// return it
return(near_id);

} // end Find_Nearest_Waypoint

////////////////////////////////////////////////////////////

void Draw_Waypoints(int mode=1)
{
// this function draws the waypoints and the path network

// lock back surface
DDraw_Lock_Back_Surface();

for (int index=0; index < NUM_WAYPOINTS; index++)
    {
    // draw network line too?
    if (mode > 0)
       Draw_Line16(path[index].x, path[index].y,
                 path[(index+1)%NUM_WAYPOINTS].x, path[(index+1)%NUM_WAYPOINTS].y,
                 RGB16Bit(255,0,0),   

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品网站免费观看| 欧美一级日韩一级| 国产91色综合久久免费分享| 日本成人中文字幕在线视频 | 蜜臀av在线播放一区二区三区| 亚洲色图欧洲色图| 亚洲四区在线观看| 亚洲黄色录像片| 午夜在线成人av| 日韩高清不卡一区二区三区| 视频一区中文字幕| 午夜精品久久一牛影视| 午夜精品在线看| 久久国产精品色| 国产成人自拍网| 99久久精品免费看国产免费软件| 91在线观看一区二区| 91免费国产在线| 欧美亚洲一区三区| 91麻豆精品国产综合久久久久久| 91.com在线观看| 久久亚洲欧美国产精品乐播| 2021中文字幕一区亚洲| 国产色产综合色产在线视频 | 国产福利精品一区二区| 成人动漫中文字幕| 欧美在线三级电影| 亚洲精品一区二区三区蜜桃下载| 欧美国产丝袜视频| 五月天欧美精品| 国产在线精品免费av| zzijzzij亚洲日本少妇熟睡| 欧美日本一区二区| 国产性色一区二区| 午夜精品久久久久久不卡8050| 极品瑜伽女神91| 色偷偷久久一区二区三区| 91精品国产综合久久福利| 国产精品视频观看| 青草国产精品久久久久久| 成人18视频日本| 精品国产凹凸成av人网站| 亚洲一区在线电影| 国产精品羞羞答答xxdd| 欧美久久久一区| 亚洲欧洲精品成人久久奇米网| 日日夜夜免费精品| 99视频一区二区| 亚洲精品在线免费观看视频| 一区二区三区中文字幕精品精品| 久久精品久久精品| 欧美亚洲丝袜传媒另类| 中文字幕亚洲欧美在线不卡| 蜜臀av国产精品久久久久| 91传媒视频在线播放| 国产精品入口麻豆九色| 久久99精品国产91久久来源| 欧美日韩五月天| 亚洲码国产岛国毛片在线| 狠狠狠色丁香婷婷综合激情| 欧美巨大另类极品videosbest | 97精品超碰一区二区三区| 日韩免费观看高清完整版 | 成人爱爱电影网址| 精品国产91久久久久久久妲己| 亚洲国产精品久久久久婷婷884| 国产ts人妖一区二区| 26uuu亚洲综合色| 久久精品国产成人一区二区三区| 欧美狂野另类xxxxoooo| 亚洲综合免费观看高清完整版| 成人禁用看黄a在线| 欧美国产视频在线| 成人免费视频播放| 最新日韩av在线| 色域天天综合网| 亚洲国产裸拍裸体视频在线观看乱了 | 亚洲精品高清在线| 99精品一区二区三区| 国产精品色噜噜| 91小视频免费观看| 亚洲另类在线制服丝袜| 在线一区二区三区四区| 一级精品视频在线观看宜春院| 色综合天天性综合| 亚洲一区二区三区视频在线| 欧美日韩一区视频| 免费观看一级欧美片| 欧美精品一区二区三区蜜桃视频 | 国产99久久精品| 国产精品成人网| 欧美这里有精品| 麻豆视频观看网址久久| 久久亚区不卡日本| 99久久精品免费看| 亚洲成人黄色影院| 欧美tickling挠脚心丨vk| 国产一区二区三区| 亚洲美腿欧美偷拍| 91麻豆精品国产91久久久久久| 久久99精品久久久久| 中文字幕在线观看不卡| 精品视频123区在线观看| 日本不卡一二三| 久久精品亚洲国产奇米99| 色婷婷综合久久久中文一区二区 | 国产精品996| 亚洲在线视频一区| 久久综合色综合88| 色婷婷精品久久二区二区蜜臀av| 天天色天天爱天天射综合| 久久精品人人做人人综合| 色噜噜狠狠一区二区三区果冻| 日日欢夜夜爽一区| 欧美韩国日本不卡| 欧美一个色资源| 一本久久a久久精品亚洲| 久久精品国产亚洲一区二区三区| 国产精品久久久久久久浪潮网站 | 1024国产精品| 日韩欧美在线一区二区三区| 成人性色生活片免费看爆迷你毛片| 亚洲一二三四在线| 欧美激情综合五月色丁香小说| 欧美亚洲动漫精品| jlzzjlzz亚洲日本少妇| 六月丁香婷婷久久| 午夜精品123| 亚洲码国产岛国毛片在线| 久久久99精品免费观看不卡| 欧美美女喷水视频| 色婷婷综合久久久久中文| 国产酒店精品激情| 日本系列欧美系列| 亚洲综合男人的天堂| 欧美激情一区二区| 久久精品一级爱片| 欧美成人乱码一区二区三区| 在线观看免费亚洲| 色综合激情五月| av电影在线不卡| jizzjizzjizz欧美| 国产精品88888| 国产一区日韩二区欧美三区| 蓝色福利精品导航| 午夜精品在线看| 亚洲成a人v欧美综合天堂下载| 亚洲同性gay激情无套| 国产精品毛片久久久久久| 亚洲国产精品激情在线观看| 久久先锋影音av| 久久精品欧美一区二区三区麻豆 | 国产不卡视频在线观看| 国产99久久久国产精品| 国产成人免费av在线| 国产高清不卡一区二区| 懂色中文一区二区在线播放| 国产a精品视频| 97精品电影院| 欧美色倩网站大全免费| 在线观看日韩毛片| 欧美自拍偷拍一区| 欧美久久一二区| 精品久久久久av影院 | 亚洲摸摸操操av| 夜夜嗨av一区二区三区四季av| 一区二区三区欧美日| 婷婷久久综合九色综合绿巨人 | 99re这里都是精品| 在线视频一区二区三| 欧美日韩国产一区二区三区地区| 欧美精品自拍偷拍| 精品久久久久久综合日本欧美| 国产欧美中文在线| 依依成人精品视频| 天天综合天天做天天综合| 久久精品国产一区二区三区免费看| 国模冰冰炮一区二区| av爱爱亚洲一区| 欧美肥大bbwbbw高潮| 久久精品亚洲精品国产欧美kt∨| 中文字幕亚洲区| 麻豆专区一区二区三区四区五区| 国产精品原创巨作av| 在线亚洲人成电影网站色www| 欧美一级黄色录像| 国产精品盗摄一区二区三区| 亚洲动漫第一页| 国产曰批免费观看久久久| 99精品视频一区| 宅男噜噜噜66一区二区66| 中文字幕乱码亚洲精品一区| 亚洲自拍都市欧美小说| 国产在线播放一区二区三区| 在线一区二区视频| 国产调教视频一区| 青青草原综合久久大伊人精品 | 亚洲综合色自拍一区| 国产一区二区三区美女| 欧美日韩美女一区二区|