funcode拼图游戏c语言程序,同求funcode平台下拼图游戏的C语言代码
做了好幾天,寫了好多回就是不對(duì),徹底崩潰。。
#include "CommonAPI.h"
//#include "LessonX.h"
#include
#define BLOCK_COUNT 4
int g_iGameState;
intg_iBlockState[BLOCK_COUNT][BLOCK_COUNT];
charg_szBlockName[BLOCK_COUNT*BLOCK_COUNT][64];
const float g_fBlockStartX = -40.625f;
const float g_fBlockStartY = -28.125f;
const float g_fBlockSize = 18.75f;
int XYToOneIndex( const int iIndexX, constint iIndexY )
{
return(iIndexY * BLOCK_COUNT + iIndexX);
}
void MoveSpriteToBlock( const char *szName,const int iIndexX, const int iIndexY )
{
floatfPosX = g_fBlockStartX + iIndexX * g_fBlockSize;
floatfPosY = g_fBlockStartY + iIndexY * g_fBlockSize;
dSetSpritePosition(szName, fPosX, fPosY );
}
int OneIndexToX( const int iIndex )
{
return(iIndex % BLOCK_COUNT);
)
總結(jié)
以上是生活随笔為你收集整理的funcode拼图游戏c语言程序,同求funcode平台下拼图游戏的C语言代码的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux添加三权,基于SELinux的
- 下一篇: 可视化软件有哪些?各自的优缺点?