?? map.cpp
字號:
// Map.cpp: implementation of the Map class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include <Mmsystem.h>
#include "Map.h"
#include "log.h"
#include <stdio.h>
#include "CDInput.h"
extern CDIMouse theMouse;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
bool Map::Isnight=true;
Map::Map()
{
view.x=0;
view.y=0;
flag=0;
Count=0;
}
Map::~Map()
{
}
bool Map::Init(char* Filename,int w,int h)
{
this->MapHeight=960;
this->MapWidth=640;
this->Surmap.CreateImageSurface(Filename,false,false,DDBLTFAST_NOCOLORKEY);
Surmap.CreateNight();
time=timeGetTime();
// if(!(this->Surmapmask.CreateImageSurface(Filename,false,false,DDBLTFAST_NOCOLORKEY)))
// Surmapmask.SetSurfaceColorKey(0xf81f);
// srand(timeGetTime());
/* int ran;
for(int i=0;i<w;i++)
for(int j=0;j<h;j++)
{
ran=rand()%10;
RECT rect={ran*160+80,40,(ran+1)*160,80};
Surmapmask.BltTo(i*80,j*40,&Surmap,&rect);
RECT rect1={ran*160,0,ran*160+80,40};
Surmapmask.BltTo(i*80,j*40,&Surmap,&rect1);
}
*/
// this->Surmap.SetSurfaceColorKey(0xf81f);
return true;
}
void Map::MoveMap()
{
}
void Map::ShowMap()
{
// if(flag==0)
{
RECT rect={view.x,view.y,view.x+800,view.y+600};
Surmap.DrawSurface(0,0,&rect);
}
/* else
{
RECT rect={view.x,view.y,view.x+404,view.y+404};
Surmap.DrawSurface(0,0,&rect);
}*/
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -