資源簡介
超級瑪麗源代碼資源包,有完整的源代碼,以及運行程序,快來下載,應該會對各位同學有所幫助

代碼片段和文件信息
#include?“stdafx.h“
#include?“bitmaptool.h“
#include?“gamemap.h“
extern?GAMEMAP?gamemap;
extern?FILEREPORT?f1;
MYBITMAP::MYBITMAP()
{
}
MYBITMAP::~MYBITMAP()
{
Deleteobject(hBm);
}
void?MYBITMAP::Init(HINSTANCE?hInstanceint?iResourceint?rowint?col)
{
BITMAP?bm;
inum=row;
jnum=col;
hBm=LoadBitmap(hInstanceMAKEINTRESOURCE(iResource));
Getobject(hBmsizeof(BITMAP)&bm);
width=bm.bmWidth/inum;
height=bm.bmHeight/jnum;
}
void?MYBITMAP::SetDevice(HDC?hdestHDC?hsrcint?wwinint?hwin)
{
hdcdest=hdest;
hdcsrc=hsrc;
screenwidth=wwin;
screenheight=hwin;
}
void?MYBITMAP::Show(int?xint?y)
{
xpos=x;
ypos=y;
Selectobject(hdcsrchBm);
BitBlt(hdcdestxposyposwidthheighthdcsrc00SRCCOPY);
}
void?MYBITMAP::ShowCenter(int?y)
{
xpos=(screenwidth-width)/2;
ypos=y;
Selectobject(hdcsrchBm);
BitBlt(hdcdestxposyposwidthheighthdcsrc00SRCCOPY);
}
void?MYBITMAP::ShowLoop(int?leftint?topint?rightint?bottomint?iframe)
{
int?ij;
Selectobject(hdcsrchBm);
for(j=top;j {
for(i=left;i {
BitBlt(hdcdestijwidthheighthdcsrciframe*width0SRCCOPY);
}
}
}
void?MYBITMAP::ShowNoBack(int?xint?yint?iframe)
{
xpos=x;
ypos=y;
Selectobject(hdcsrchBm);
BitBlt(hdcdestxposyposwidthheight/2hdcsrciframe*widthheight/2SRCAND);
BitBlt(hdcdestxposyposwidthheight/2hdcsrciframe*width0SRCPAINT);
}
void?MYBITMAP::ShowNoBackLoop(int?xint?yint?iframeint?iNum)
{
int?i;
xpos=x;
ypos=y;
Selectobject(hdcsrchBm);
for(i=0;i {
BitBlt(hdcdestxpos+i*widthyposwidthheight/2hdcsrciframe*widthheight/2SRCAND);
BitBlt(hdcdestxpos+i*widthyposwidthheight/2hdcsrciframe*width0SRCPAINT);
}
}
void?MYBITMAP::ShowAni()
{
/* if(!iStartAni)
return;
Selectobject(hdcsrchBm);
BitBlt(hdcdestxposyposwidthheight/2hdcsrcframenow*widthheight/2SRCAND);
BitBlt(hdcdestxposyposwidthheight/2hdcsrcframenow*width0SRCPAINT);
framenow++;
//播放結束
if(framenow>=inum)
iStartAni=0;
*/
}
void?MYBITMAP::SetAni(int?xint?y)
{
xpos=x;
ypos=y;
/*
framenow=0;
iStartAni=1;
*/
}
void?MYBITMAP::SetPos(int?istyleint?xint?y)
{
switch(istyle)
{
case?BM_CENTER:
xpos=(screenwidth-width)/2;
ypos=y;
break;
case?BM_USER:
xpos=x;
ypos=y;
break;
}
}
void?MYBITMAP::Draw(DWORD?dwRop)
{
Selectobject(hdcsrchBm);
BitBlt(hdcdestxposyposwidthheighthdcsrc00dwRop);
}
void?MYBITMAP::Stretch(int?xint?y)
{
Selectobject(hdcsrchBm);
StretchBlt(hdcdestxposyposwidth*xheight*y
hdcsrc00widthheight
SRCCOPY);
}
void?MYBITMAP::Stretch(int?xint?yint?id)
{
Selectobject(hdcsrchBm);
StretchBlt(hdcdestxposyposwidth*xheight*y
hdcsrc0id*height
widthheight
SRCCOPY);
}
////////////////////?bitmap?button?//////////////////////
MYBITMAPBTN::MY
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-01-12?13:51??蘑菇大戰日本狗執行文件\
?????目錄???????????0??2015-01-12?13:51??蘑菇大戰日本狗執行文件\map\
?????文件????????1834??2008-06-15?12:36??蘑菇大戰日本狗執行文件\map\map1.txt
?????文件?????2322526??2015-01-12?11:24??蘑菇大戰日本狗執行文件\mario01.exe
?????目錄???????????0??2015-01-12?13:51??蘑菇大戰日本狗源碼\
?????文件????????8210??2008-06-15?11:18??蘑菇大戰日本狗源碼\bitmaptool.cpp
?????文件????????2682??2008-06-15?11:17??蘑菇大戰日本狗源碼\bitmaptool.h
?????目錄???????????0??2015-01-12?13:51??蘑菇大戰日本狗源碼\Debug\
?????文件???????35902??2008-06-15?12:32??蘑菇大戰日本狗源碼\Debug\bitmaptool.obj
?????文件????????8941??2008-06-15?12:32??蘑菇大戰日本狗源碼\Debug\filereport.obj
?????文件???????32036??2008-06-15?12:32??蘑菇大戰日本狗源碼\Debug\gamemap.obj
?????文件??????297052??2015-01-12?11:24??蘑菇大戰日本狗源碼\Debug\mario01.ilk
?????文件???????40878??2015-01-11?21:22??蘑菇大戰日本狗源碼\Debug\mario01.obj
?????文件?????1978896??2008-06-15?12:32??蘑菇大戰日本狗源碼\Debug\mario01.pch
?????文件??????590848??2015-01-12?11:24??蘑菇大戰日本狗源碼\Debug\mario01.pdb
?????文件?????1721120??2015-01-12?11:24??蘑菇大戰日本狗源碼\Debug\mario01.res
?????文件???????55068??2008-06-15?12:32??蘑菇大戰日本狗源碼\Debug\StdAfx.obj
?????文件????????6853??2008-06-15?12:32??蘑菇大戰日本狗源碼\Debug\texttool.obj
?????文件??????107520??2015-01-12?11:24??蘑菇大戰日本狗源碼\Debug\vc60.idb
?????文件??????184320??2015-01-11?21:22??蘑菇大戰日本狗源碼\Debug\vc60.pdb
?????文件????????1234??2008-06-08?09:48??蘑菇大戰日本狗源碼\filereport.cpp
?????文件?????????500??2008-06-08?09:47??蘑菇大戰日本狗源碼\filereport.h
?????文件???????14334??2008-06-15?11:27??蘑菇大戰日本狗源碼\gamemap.cpp
?????文件????????1738??2008-06-15?11:20??蘑菇大戰日本狗源碼\gamemap.h
?????目錄???????????0??2015-01-12?13:51??蘑菇大戰日本狗源碼\map\
?????文件????????1834??2008-06-15?12:36??蘑菇大戰日本狗源碼\map\map1.txt
?????文件?????1726132??2015-01-12?10:43??蘑菇大戰日本狗源碼\mario01.aps
?????文件???????10114??2015-01-11?21:22??蘑菇大戰日本狗源碼\mario01.cpp
?????文件????????5528??2008-06-12?17:11??蘑菇大戰日本狗源碼\mario01.dsp
?????文件?????????520??2008-06-07?14:39??蘑菇大戰日本狗源碼\mario01.dsw
?????文件?????????329??2008-06-07?14:39??蘑菇大戰日本狗源碼\mario01.h
............此處省略24個文件信息
評論
共有 條評論