初めての3Dプログラムとして下記のようなプログラムをかいたのですが、
何故か画面に何も表示されません。
#include <DxLib.h>
typedef struct
{
int model;
float x;
float y;
float speed;
}redball;
typedef struct
{
int model;
float x;
float y;
float speed;
}bluecube;
typedef struct
{
int model;
float x;
float y;
float speed;
}yellowpyramid;
typedef struct
{
int model;
float x;
float y;
float speed;
}chosecharacter;
typedef struct
{
int attack;
int special;
int shield;
int grab;
int appeal;
int up;
int down;
int right;
int left;
int jump;
}key;
typedef struct
{
}camera;
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
ChangeWindowMode(TRUE);
if(DxLib_Init()==-1) return -1;
SetDrawScreen(DX_SCREEN_BACK);
redball rb;
rb.model=MV1LoadModel("data\\redball\\reball.mqo");
rb.x=320.0;
rb.y=250.0;
rb.speed=50.0;
key key;
key.attack=(KEY_INPUT_Z);
key.special=(KEY_INPUT_X);
key.shield=(KEY_INPUT_C);
key.grab=(KEY_INPUT_D);
key.appeal=(KEY_INPUT_S);
key.up=(KEY_INPUT_UP);
key.down=(KEY_INPUT_DOWN);
key.right=(KEY_INPUT_RIGHT);
key.left=(KEY_INPUT_LEFT);
while((!ProcessMessage()&&!ClearDrawScreen()&&!CheckHitKey(KEY_INPUT_ESCAPE)))
{
if(CheckHitKey(key.right)) rb.x+=rb.speed;
if(CheckHitKey(key.left)) rb.x-=rb.speed;
//SetCameraPositionAndTargetAndUpVec(VGet(),VGet(),VGet());
SetLightDirection(VGet(-1.0f,-1.0f,1.0f));
MV1SetPosition(rb.model,VGet(rb.x,rb.y,0.0f));
MV1DrawModel(rb.model);
ScreenFlip();
}
DxLib_End();
return 0;
}
よろしくお願いします。