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

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

?? deb1d2~1.cpp

?? 游戲的聲音圖像演示程序
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
// DEMO12_5_16b.CPP - pattern 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 "WINXCLASS"  // class name

// setup a 640x480 16-bit windowed mode example
#define WINDOW_TITLE      "16-Bit Pattern 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_PATTERNS    4     // number of patterns in system

// pattern instruction opcodes for bot

// directional instructions
#define OPC_E    0  // move west
#define OPC_NE   1  // move northeast
#define OPC_N    2  // move north
#define OPC_NW   3  // move northwest
#define OPC_W    4  // move west
#define OPC_SW   5  // move southwest
#define OPC_S    6  // move south
#define OPC_SE   7  // move southeast

// special instructions
#define OPC_STOP 8  // stop for a moment
#define OPC_RAND 9  // select a random direction
#define OPC_END  -1 // end pattern

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

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

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

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

BITMAP_IMAGE background_bmp;   // holds the background
BOB          bot;              // the demo robot ship

// patterns in opcode operand format
int pattern_1[] = {OPC_W, 10, OPC_NW, 10, OPC_N, 10, OPC_NE, 10, 
                   OPC_E, 10, OPC_SE, 10, OPC_S, 10, OPC_SW, 10, 
                   OPC_W, 10, OPC_RAND, 10,
                   
                   OPC_W, 20, OPC_NW, 10, OPC_N, 20, OPC_NE, 10, 
                   OPC_E, 20, OPC_SE, 10, OPC_S, 20, OPC_SW, 10, 
                   OPC_W, 10, OPC_END,0};
                   

int pattern_2[] = {OPC_E, 20, OPC_W, 20, OPC_STOP, 20, OPC_NE, 10, 
                   OPC_W, 10, OPC_NW, 10, OPC_SW, 20, OPC_NW, 20, 
                   OPC_SW, 20, OPC_NW, 30, OPC_SW, 10, OPC_S, 50,  
                   OPC_W, 2, OPC_NW, 2, OPC_N, 2, OPC_NE, 50,
                   OPC_E,2, OPC_SE,2, OPC_S,2, OPC_RAND, 10, OPC_END,0};



int pattern_3[] = { OPC_N, 10, OPC_S, 10, OPC_N, 10, OPC_S, 10, 
                    OPC_E, 10, OPC_W, 10, OPC_E, 10, OPC_W, 10, 
                    OPC_NW, 10, OPC_N, 10, OPC_NE, 10, OPC_N, 10, 
                    OPC_STOP, 20, OPC_RAND, 5, OPC_E, 50, OPC_S, 50, OPC_W, 50, 
                    OPC_E, 10, OPC_E, 10, OPC_E, 10, OPC_NW, 100, 
                    OPC_STOP, 10, OPC_END,0};


int pattern_4[] = {OPC_W, 100, 
                   OPC_NW, 2,OPC_N, 2,OPC_NE, 2,
                   OPC_E, 100, 
                   OPC_NE, 2,OPC_N, 2,OPC_NW, 2,
                    
                   OPC_W, 100, 
                   OPC_NW, 2,OPC_N, 2,OPC_NE, 2,
                   OPC_E, 100, 
                   OPC_NE, 2,OPC_N, 2,OPC_NW, 2,
                    
                   OPC_W, 100, 
                   OPC_NW, 2,OPC_N, 2,OPC_NE, 2,
                   OPC_E, 100, 
                   OPC_NE, 2,OPC_N, 2,OPC_NW, 2,

                   OPC_RAND, 10, OPC_RAND, 5,

                   OPC_SW, 2,OPC_S, 2,OPC_SE, 2,
                   OPC_E, 100, 
                   OPC_SE, 2,OPC_S, 2,OPC_SW, 2,
                   OPC_W, 100,

                   OPC_SW, 2,OPC_S, 2,OPC_SE, 2,
                   OPC_E, 100, 
                   OPC_SE, 2,OPC_S, 2,OPC_SW, 2,
                   OPC_W, 100,

                   OPC_SW, 2,OPC_S, 2,OPC_SE, 2,
                   OPC_E, 100, 
                   OPC_SE, 2,OPC_S, 2,OPC_SW, 2,
                   OPC_W, 100, OPC_END,0};

// master pattern array
int *patterns[NUM_PATTERNS] = {pattern_1, pattern_2, pattern_3, pattern_4};

int *curr_pattern=NULL;  // current pattern being processed

int bot_ip     =0,       // pattern instruction pointer for bot
    bot_counter=0,       // counter of pattern control
    bot_pattern_index;   // the current pattern being executed

// used as a index to string lookup to help print out
char *opcode_names[] = {"OPC_E",
                        "OPC_NE", 
                        "OPC_N",    
                        "OPC_NW",   
                        "OPC_W",    
                        "OPC_SW",   
                        "OPC_S",    
                        "OPC_SE",   
                        "OPC_STOP", 
                        "OPC_RAND", 
                        "OPC_END",};  
// sound stuff
int engines_id = -1; // engine sound id

// 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

// T3D GAME PROGRAMMING CONSOLE FUNCTIONS ////////////////

int Game_Init(void *parms)
{
// this function is where you do all the initialization 
// for your game

int index; // looping variable

int bot_anim[2];

// initialize directdraw, very important that in the call
// to setcooperativelevel that the flag DDSCL_MULTITHREADED is used
// which increases the response of directX graphics to
// take the global critical section more frequently
DDraw_Init(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_BPP, WINDOWED_APP);

// load background image
Load_Bitmap_File(&bitmap16bit, "TREKB24.BMP");
Create_Bitmap(&background_bmp,0,0,640,480,16);
Load_Image_Bitmap16(&background_bmp, &bitmap16bit,0,0,BITMAP_EXTRACT_MODE_ABS);
Unload_Bitmap_File(&bitmap16bit);

// load the bots bitmaps

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品热久久久久夜色精品三区 | 欧美日韩中文字幕一区二区| 日本伦理一区二区| 高潮精品一区videoshd| 国产一区二区三区免费看| 久久99国产精品麻豆| 蜜桃一区二区三区在线观看| 91国产免费观看| 欧美午夜精品一区二区三区| 欧美日韩国产一区二区三区地区| 日本道色综合久久| 欧美日韩三级一区| 91精品久久久久久久99蜜桃| 日韩精品一区二区三区中文不卡 | 91精品麻豆日日躁夜夜躁| 欧美一区二区三区在线观看视频 | 亚洲国产综合在线| 婷婷成人综合网| 激情综合五月婷婷| 国产成人在线免费观看| 99久精品国产| 欧美日韩美少妇| 国产精品传媒视频| 久久亚洲欧美国产精品乐播| 国产欧美视频在线观看| 六月丁香综合在线视频| 激情欧美一区二区| eeuss鲁一区二区三区| 欧美视频一区在线观看| 日韩一级高清毛片| 国产精品理伦片| 亚洲一区中文日韩| 九色综合国产一区二区三区| 菠萝蜜视频在线观看一区| 欧美日韩精品一区二区三区| 日韩欧美一级二级三级久久久| 国产欧美一区二区精品性色超碰| 亚洲激情五月婷婷| 激情综合色播激情啊| 成人激情视频网站| 欧美一区二区三区白人| 国产精品黄色在线观看| 日韩中文字幕麻豆| 成人精品免费网站| 51久久夜色精品国产麻豆| 国产精品三级在线观看| 亚洲v日本v欧美v久久精品| 国产成人啪午夜精品网站男同| 欧美在线综合视频| 国产欧美日韩另类视频免费观看| 亚洲国产精品久久人人爱蜜臀| 韩国一区二区三区| 欧美私人免费视频| 欧美激情一区二区三区不卡| 日韩精品一二三四| 一本久道久久综合中文字幕| 日韩欧美的一区二区| 亚洲免费视频成人| 国产一区二区h| 欧美理论电影在线| 中文字幕一区av| 久国产精品韩国三级视频| 日本黄色一区二区| 欧美激情一区二区三区| 免费观看91视频大全| 91原创在线视频| 国产亚洲美州欧州综合国| 日韩国产欧美三级| 91性感美女视频| 久久久久九九视频| 捆绑紧缚一区二区三区视频| 欧美无乱码久久久免费午夜一区| 国产精品久久久久aaaa樱花| 久久99精品久久久久| 欧美人伦禁忌dvd放荡欲情| 亚洲男人天堂av网| 中文字幕乱码久久午夜不卡 | 成人欧美一区二区三区黑人麻豆 | 在线观看一区日韩| 中文字幕欧美区| 激情综合一区二区三区| 3d动漫精品啪啪1区2区免费 | 国产高清在线精品| www一区二区| 免费在线成人网| 欧美二区三区91| 亚洲一区二区三区爽爽爽爽爽| 成人午夜在线播放| 国产视频在线观看一区二区三区| 麻豆91精品91久久久的内涵| 欧美日韩精品电影| 亚洲高清在线视频| 欧美色视频一区| 亚洲动漫第一页| 欧美图区在线视频| 亚洲大片免费看| 欧美日韩国产影片| 日韩 欧美一区二区三区| 555www色欧美视频| 日本不卡的三区四区五区| 欧美高清一级片在线| 天堂成人免费av电影一区| 欧美精品久久一区二区三区| 亚洲最快最全在线视频| 欧美主播一区二区三区| 日日夜夜精品视频免费| 欧美一区二区私人影院日本| 婷婷久久综合九色国产成人| 欧美午夜片在线观看| 亚洲一区在线播放| 欧美精品粉嫩高潮一区二区| 免费人成在线不卡| 精品99久久久久久| 国产馆精品极品| 中文字幕av资源一区| 成人av网址在线| 一区二区三区四区亚洲| 欧美久久一二三四区| 免费成人av资源网| 久久中文娱乐网| 99国产精品视频免费观看| 亚洲另类在线制服丝袜| 欧美精品视频www在线观看| 美女视频一区二区| 亚洲国产高清在线观看视频| 91一区二区在线| 婷婷丁香激情综合| www国产成人| 91在线小视频| av中文字幕亚洲| 亚洲一区二区高清| 欧美精品一区二区三区在线播放| 成人免费视频免费观看| 亚洲一区二区三区三| 日韩欧美国产小视频| 成人高清在线视频| 亚洲九九爱视频| 欧美成人video| av不卡在线观看| 天堂va蜜桃一区二区三区| 久久精品人人做| 欧洲在线/亚洲| 国内精品国产成人国产三级粉色| 国产欧美中文在线| 色天使久久综合网天天| 麻豆精品蜜桃视频网站| **网站欧美大片在线观看| 91精品国产乱码| 97精品国产97久久久久久久久久久久 | 精品日韩在线一区| 色综合久久中文综合久久牛| 美国毛片一区二区| 亚洲色图色小说| 精品国产伦一区二区三区观看体验| 成人国产一区二区三区精品| 午夜久久久久久| 国产精品久久久久三级| 日韩天堂在线观看| 91久久久免费一区二区| 国产一区二区三区免费看| 亚洲国产欧美一区二区三区丁香婷| 久久久综合九色合综国产精品| 欧美色电影在线| 成人免费观看视频| 久草这里只有精品视频| 亚洲午夜精品久久久久久久久| 国产亚洲自拍一区| 91精品国产综合久久久久久久| 9色porny自拍视频一区二区| 美国三级日本三级久久99| 亚洲一区二区精品3399| 国产精品国产三级国产| 久久久国产精华| 日韩女同互慰一区二区| 欧美日韩大陆一区二区| 97久久超碰精品国产| 国产成人8x视频一区二区| 久久精品国产网站| 石原莉奈在线亚洲二区| 亚洲男女毛片无遮挡| 国产精品久久777777| 久久久久久久久久久99999| 日韩小视频在线观看专区| 欧美性受xxxx| 国产日韩欧美激情| 亚洲精品一区二区三区影院 | 亚洲欧美偷拍卡通变态| 国产精品毛片高清在线完整版| 精品999久久久| 欧美成人一区二区三区片免费| 欧美日韩一区二区三区视频 | 国产午夜一区二区三区| 亚洲精品在线电影| 日韩欧美综合一区| 欧美一区2区视频在线观看| 欧美日韩成人在线| 69堂精品视频| 91麻豆精品国产91久久久久久久久| 欧美在线你懂得| 欧美日韩高清一区二区三区|