現在ぼくはDXライブラリを使用し、ポーカーゲームを作っています。
質問なのですが今現在出しているもじをけしてあたらしいもじをかきだすにはどうしたらいいですか?ソースを見ていただくとわかると思いますが「ポーカーゲーム開始。」という文字の上に、新たに1Pの番ですと文字を書き出したいのです。
すごく初歩的な質問かもですが回答よろしくお願いします。
また、僕のソースに何かおかしいところがあればご指導よろしくお願いします。```C++
#include "DxLib.h"
int card_Graphic[52];
void load() {
card_Graphic[0] = LoadGraph("Card\A-1.png");
card_Graphic[1] = LoadGraph("Card\A-2.png");
card_Graphic[2] = LoadGraph("Card\A-3.png");
card_Graphic[3] = LoadGraph("Card\A-4.png");
card_Graphic[4] = LoadGraph("Card\A-5.png");
card_Graphic[5] = LoadGraph("Card\A-6.png");
card_Graphic[6] = LoadGraph("Card\A-7.png");
card_Graphic[7] = LoadGraph("Card\A-8.png");
card_Graphic[8] = LoadGraph("Card\A-9.png");
card_Graphic[9] = LoadGraph("Card\A-10.png");
card_Graphic[10] = LoadGraph("Card\A-11.png");
card_Graphic[11] = LoadGraph("Card\A-12.png");
card_Graphic[12] = LoadGraph("Card\A-13.png");
card_Graphic[13] = LoadGraph("Card\B-1.png");
card_Graphic[14] = LoadGraph("Card\B-2.png");
card_Graphic[15] = LoadGraph("Card\B-3.png");
card_Graphic[16] = LoadGraph("Card\B-4.png");
card_Graphic[17] = LoadGraph("Card\B-5.png");
card_Graphic[18] = LoadGraph("Card\B-6.png");
card_Graphic[19] = LoadGraph("Card\B-7.png");
card_Graphic[20] = LoadGraph("Card\B-8.png");
card_Graphic[21] = LoadGraph("Card\B-9.png");
card_Graphic[22] = LoadGraph("Card\B-10.png");
card_Graphic[23] = LoadGraph("Card\B-11.png");
card_Graphic[24] = LoadGraph("Card\B-12.png");
card_Graphic[25] = LoadGraph("Card\B-13.png");
card_Graphic[26] = LoadGraph("Card\C-1.png");
card_Graphic[27] = LoadGraph("Card\C-2.png");
card_Graphic[28] = LoadGraph("Card\C-3.png");
card_Graphic[29] = LoadGraph("Card\C-4.png");
card_Graphic[30] = LoadGraph("Card\C-5.png");
card_Graphic[31] = LoadGraph("Card\C-6.png");
card_Graphic[32] = LoadGraph("Card\C-7.png");
card_Graphic[33] = LoadGraph("Card\C-8.png");
card_Graphic[34] = LoadGraph("Card\C-9.png");
card_Graphic[35] = LoadGraph("Card\C-10.png");
card_Graphic[36] = LoadGraph("Card\C-11.png");
card_Graphic[37] = LoadGraph("Card\C-12.png");
card_Graphic[38] = LoadGraph("Card\C-13.png");
card_Graphic[39] = LoadGraph("Card\D-1.png");
card_Graphic[40] = LoadGraph("Card\D-2.png");
card_Graphic[41] = LoadGraph("Card\D-3.png");
card_Graphic[42] = LoadGraph("Card\D-4.png");
card_Graphic[43] = LoadGraph("Card\D-5.png");
card_Graphic[44] = LoadGraph("Card\D-6.png");
card_Graphic[45] = LoadGraph("Card\D-7.png");
card_Graphic[46] = LoadGraph("Card\D-8.png");
card_Graphic[47] = LoadGraph("Card\D-9.png");
card_Graphic[48] = LoadGraph("Card\D-10.png");
card_Graphic[49] = LoadGraph("Card\D-11.png");
card_Graphic[50] = LoadGraph("Card\D-12.png");
card_Graphic[51] = LoadGraph("Card\D-13.png");
}
int WINAPI WinMain(HINSTANCE hI, HINSTANCE hP, LPSTR lpC, int nC)
{
ChangeWindowMode(TRUE), DxLib_Init();
int ura; ura = LoadGraph("Card\ura.png"); int haikei, Mouse, mozi; mozi = CreateFontToHandle("MS ゴシック", 50, 9, DX_FONTTYPE_NORMAL); haikei = LoadGraph("haikei.jpg"); DrawRotaGraph(320, 240, 0.5, 0.0, haikei, TRUE); DrawFormatString(25, 220, GetColor(255, 255, 255), "1P"); DrawFormatString(25, 370, GetColor(255, 255, 255), "2P"); while (1){ ProcessMessage(); DrawStringToHandle(100, 70, "ポーカーゲーム開始。", GetColor(255, 255, 255), mozi); Mouse = GetMouseInput(); if (Mouse & MOUSE_INPUT_LEFT) { break; } } load(); DrawRotaGraph(110, 220, 0.125, 0.0 , card_Graphic[GetRand(51)] , TRUE); DrawRotaGraph(220, 220, 0.125, 0.0, card_Graphic[GetRand(51)], TRUE); DrawRotaGraph(330, 220, 0.125, 0.0, card_Graphic[GetRand(51)], TRUE); DrawRotaGraph(440, 220, 0.125, 0.0, card_Graphic[GetRand(51)], TRUE); DrawRotaGraph(550, 220, 0.125, 0.0, card_Graphic[GetRand(51)], TRUE); Mouse& MOUSE_INPUT_LEFT; DrawRotaGraph(110, 370, 0.125, 0.0, ura, TRUE); DrawRotaGraph(220, 370, 0.125, 0.0, ura, TRUE); DrawRotaGraph(330, 370, 0.125, 0.0, ura, TRUE); DrawRotaGraph(440, 370, 0.125, 0.0, ura, TRUE); DrawRotaGraph(550, 370, 0.125, 0.0, ura, TRUE); WaitKey(); DxLib_End(); return 0;
}
回答1件
あなたの回答
tips
プレビュー