アニメ!アニメ!

ラベル ゲームプログラミング の投稿を表示しています。 すべての投稿を表示
ラベル ゲームプログラミング の投稿を表示しています。 すべての投稿を表示

2018年1月20日土曜日

Java ゲームプログラミング超入門part01

public class part01
{
public static void main(String[] args)
{
System.out.println("こんにちは");
}
}

2016年2月29日月曜日

テイルズオブグレイセスf TOGf アクセルモード集

https://www.youtube.com/watch?v=8InVDEkjjwE&feature=youtube_gdata_player

https://www.youtube.com/watch?v=r9OpI7Muvho

『ドラゴンクエスト』キャラクターリスト

http://www.ne.jp/asahi/krk/kct/dq/dq_char.htm

ファイナルファンタジーXIV: 蒼天のイシュガルド フィールドウォークスルー
https://www.youtube.com/watch?v=r9OpI7Muvho

http://mindhack2ch.com/archives/14773621.html

2015年11月4日水曜日

[C言語]メイン関数の書き方

#include "DxLib.h"

int GetHitKeyStateAll_2(int KeyStateBuf[]){
char GetHitKeyStateAll_Key[256];
GetHitKeyStateAll(GetHitKeyStateAll_Key);
for (int i = 0; i < 256; i++){
GetHitKeyStateAll(GetHitKeyStateAll_Key);
for (int i = 0; i < 256; i++){
if (GetHitKeyStateAll_Key[i] == 1) KeyStateBuf[i]++;
else KeyStateBuf[i] = 0;
}
return 0;
}

void char_disp(int White, int y){
DrawString(150, y, "■" White);
DrawString(170, 100, "NEW GAME", White);
DrawString(170, 120, "CONTINUE1", White);
DrawString(170, 140, "CONTINUE2", White);
DrawString(170, 160, "CONTINUE3", White);
DrawString(170, 160, "CONTINUE3", White);
DrawString(170, 200, "CONTINUE5", White);
DrawString(170, 220, "CONTINUE6", White);
DrawString(170, 240, "LOG OUT", White);
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){
int Key[256];
int while, y = 100;
ChangeWindowMode(TRUE);//ウィンドウモード
if (DxLib_Init() == -1 || SetDrawScreen(DX_SCREEN_BACK) != 0) return -1;//初期化と裏画面化
while (ProcessMessage() == 0 && ClearDrawScreen() == 0 && GetHitKeyStateAll_2(Key) == 0 && Key[KEY_INPUT_ESCAPE] == 0){

char_disp(while, y);

if (Key[KEY_INPUT_DOWN] == 1 || (Key[KEY_INPUT_DOWN] % 5 == 0 && Key[KEY_INPUT_DOWN]>30)){
// たった今押したか、30カウンター以上押しっぱなしかつ5回に一度
y += 20;
if (y == 260)                            // y座標が260なら(選択が一番下なら)
y = 100;                        // 選択座標を一番上に
}

ScreenFlip();//裏画面反映
}

DxLib_End();
return 0;
}

2015年10月10日土曜日

[Windowプログラミング]文字を表示する

#include <Windows.h>

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
ATOM InitApp(HINSTANCE);
BOOL InitInstance(HINSTANCE, int)
{
char szClassName[] = "text01";

int WINAPI WinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst,
LPSTR lpsCmdLine, int nCmdShow);
{
MSG msg;
BOOL bRet;

if (!InitApp(hCurInst))
return FALSE;
if (!InitInstance, nCmdShow)
return FALSE;
while (bRet = GetMessage(&msg, NULL, 0, 0)) != 0){
{
if (bRet == -1){
break;
}
}
else{
TranslateMessage(&mag);
DispatchMessage(&msg);
}
}
return (int)msg.wParam;
}

ATOM InitApp(HINSTANCE hInst)
{
WNDCLASSEX wc;
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;

wc.hInstance = hInst;
wc.hIcon = (HICON)LoadImage(NULL,
MAKEINTRESOURCE(IDI_APPLICATION),
IMAGE_ICON, 0, 0,
LR_DEFAULTSIZE | LR_SHARED);
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wc.lpszMenuName = NULL; wc.lpszClassName = NULL;
wc.lpszClassName = (LPCSTR)szClassName;
wc.hIconSm = (HICON)LoadImage(NULL,
MAKEINTRESOURCE(IDI_APPLICATION),
IMAGE_ICON, 0, 0,
LR_DEFAULTSIZE | LR_SHARED);

return (RegisterClassEx)hInst, nCmdShow);
}
{
HWND nWnd;

hWnd = CreateWindow(szClassName,
"猫でもわかるテキスト表示",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hInst,
NULL);
if (!hWnd)
return FALSE;
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
{
int id, u = 0, i;
PAINTSTRUCT ps;
HDC hdc;
char * lpszStr = "猫でもわかるゲームプログラミング";

switch (msg)
{
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
for (i = 0; i < 20; i++){
TextOut(hdc, 0, y + 20 * i,
lpszStr, (int)strlen(lpszStr));
}
EndPaint(hWnd, &ps);
break;
case WM_CLOSE:
id = MassageBox(nWnd, "終了してもよろしいですか",
"終了確認", MB_YESNO);
if (id == IDYES)
DestroyWindow(hWnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return (DefWindowProc(hWnd, msg, wp, lp));
}
return 0;
}