/*広告*/

/*STGの作り方 Sin値表示プログラム2*/

/*目次へ戻る*/

#include "DxLib.h" #include <math.h> int key[256]; int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int){ ChangeWindowMode(TRUE); DxLib_Init(); SetDrawScreen(DX_SCREEN_BACK); float x = 0; int angle = 0; int gamecount = 0; int Color_White = GetColor(255,255,255); while (ScreenFlip()==0 && ProcessMessage()==0 && ClearDrawScreen()==0){ /*その1*/ //x = sin(DX_PI / 720 * gamecount); /*その2*/ //x = sin(DX_PI / 720 * gamecount - (DX_PI * 0.5f)); /*その3*/ //x = (sin(DX_PI / 720 * gamecount - (DX_PI * 0.5f)) + 1) / 2; /*その4*/ //x = (sin(DX_PI / 720 * gamecount - (DX_PI * 0.5f)) + 1) / 2 * 100; DrawFormatString(0, 0, Color_White, "%f", x); DrawFormatString(0, 20, Color_White, "gamecount = %d", gamecount); if (gamecount < 720){ gamecount++; } } DxLib_End(); return 0; }

/*ページの先頭へ*/

/*目次へ戻る*/

/*HOME*/

/*Copyright 2016 K.N/petitetech.com*/

/*広告*/