略
「選択2-1から実行1-1」
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
ChangeWindowMode( TRUE ) ;
if( DxLib_Init() == -1 ) return -1;
int White,Yellow,G_Blue;
Yellow = GetColor( 255 , 255 , 0 ) ;
G_Blue = GetColor( 128 , 128 , 128 ) ;
White = GetColor( 255 , 255 , 255 ) ;
DrawBox ( 400 , 200 , 440 , 700 , G_Blue , TRUE ) ;
DrawCircle( 550 , 30 , 30 , Yellow , TRUE) ;
DrawString( 0, 0, "level 1" , White);
int i ;
for(i=0;i<300;i++){
LoadGraphScreen( i , 350 , "char.png" , TRUE );
Sleep(10);
}
int c=0;
White = GetColor( 255 , 255 , 255 ) ;
SetDrawScreen( DX_SCREEN_BACK ) ;
while( 1 ){
ClearDrawScreen();
if(c>=0 && c<256)
SetDrawBright( c , c , c );
if(c>=256 && c<400)
SetDrawBright( 255 , 255 , 255 );
if(c>=400 && c<400+256)
SetDrawBright( 255-(c-400) , 255-(c-400) , 255-(c-400)
DrawBox( 0 , 0 , 640 , 480 , White , TRUE) ;
c++;
if(c==400+256) break;
if( ProcessMessage() == -1 ) break ;
ScreenFlip() ;
}
WaitKey() ;
DxLib_End() ;
return 0 ;
}
同様に「選択2-2から実行1-2」略
「実行1-1から実行2-1」
#include "DxLib.h"
#define PI 3.1415926
char Key[256];
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
if( ChangeWindowMode(TRUE) != DX_CHANGESCREEN_OK || DxLib_Init() == -1 ) return -1;
DrawString(0,0,"level1",GetColor(255,255,255));
SetFontSize( 80 ) ;
SetFontThickness( 8 ) ;
ChangeFont( "MS 明朝" ) ;
ChangeFontType( DX_FONTTYPE_ANTIALIASING );
DrawString(50,100,"脱獄成功!",GetColor(255,255,0));
SetFontSize( 40 ) ;
SetFontThickness( 1 ) ;
ChangeFont( "HGS創英角ポップ体" ) ;
ChangeFontType( DX_FONTTYPE_ANTIALIASING_EDGE );
DrawString(50,250,"7人脱獄",GetColor(255,255,255));
ChangeWindowMode( TRUE ) ;
if( DxLib_Init() == -1 ) return -1;
LoadGraphScreen( 0 , 0 , "zu.png" , TRUE ) ;
WaitKey();
DxLib_End();
return 0;
}
同様に「実行1-2から実行2-2」です。長く拙い文章で誠にすみません。よろしくお願いします。