#include "DxLib.h"
#include <math.h>
void InitAimingBullet(
float mx, float my,
float ex, float ey,
float speed,
float& x, float& y,
float& vx, float& vy
){
x=ex; y=ey;
float d=sqrt((mx-ex)*(mx-ex)+(my-ey)*(my-ey));
if(d){
vx=(mx-ex)/d*speed;
vy=(my-ey)/d*speed;
} else {
vx=0;
vy=speed;
}
}
void MoveAimingBullet(
float& x, float& y,
float vx, float vy
){
x+=vx;
y+=vy;
}
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
//ウィンドウモードで起動
ChangeWindowMode( TRUE );
//DXライブラリ初期化
if( DxLib_Init() == -1 ) {
return -1;
}
//ここにプログラムを書いていく
InitAimingBullet();
MoveAimingBullet();
//DXライブラリ終了処理
WaitKey();
DxLib_End();
return 0;
}InitAimingBullet();
MoveAimingBullet();
の引数がわかりません?
あと上のプログラムをゲームとして動かそうとすると
どんなプログラムをくわえればいいですか?
教えてください