本文整理汇总了C++中LoadGraph函数的典型用法代码示例。如果您正苦于以下问题:C++ LoadGraph函数的具体用法?C++ LoadGraph怎么用?C++ LoadGraph使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LoadGraph函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: LoadGraph
void CPicture::LoadButtonPic(){
closeButton[0] = LoadGraph("Chikuwa2/Close.png");
closeButton[1] = LoadGraph("Chikuwa2/AskClose.png");
saveButton[0] = LoadGraph("Chikuwa2/SaveButton.png");
saveButton[1] = LoadGraph("Chikuwa2/SaveButtonAsk.png");
saveButton[2] = LoadGraph("Chikuwa2/SaveButtonEnd.png");
}
开发者ID:Yasufu12,项目名称:Strategy,代码行数:7,代码来源:Picture.cpp
示例2: Load_Title_Rand
int Load_Title_Rand(){//乱数でタイトル背景を起動するたびに変える
SRand(GetRand(100));//乱数シードを変える
int BG = GetRand(3);//乱数で背景を決める
int BG_jpg;//画像ハンドル保存用の変数
switch (BG + 1){//乱数の値によって分岐
case 1:
BG_jpg = LoadGraph("Pics/BG_Title_01.jpg");
break;
case 2:
BG_jpg = LoadGraph("Pics/BG_Title_02.jpg");
break;
case 3:
BG_jpg = LoadGraph("Pics/BG_Title_03.jpg");
break;
case 4:
BG_jpg = LoadGraph("Pics/BG_Title_04.jpg");
break;
default://1~4以外が出た場合1の画像(保険)
BG_jpg = LoadGraph("Pics/BG_Title_01.jpg");
break;
}
return BG_jpg;
}
开发者ID:RoDoRiTos,项目名称:DRepo_Origin,代码行数:29,代码来源:game_manager.cpp
示例3: GetColor
Dungeon::Dungeon()
{
black = GetColor(0, 0, 0);
yellow = GetColor(255, 255, 0);
white = GetColor(255, 255, 255);
blue = GetColor(0, 0, 255);
SetTransColor(255, 255, 255); //白を透過色に
yajirushi_h = LoadGraph("./dungeon/yajirushi.png");
SetTransColor(0, 0, 0); //一応戻す
event_h = LoadGraph("./img/2bikkuri.bmp");
if (yajirushi_h == -1)
{
DrawString(0, 0, "Error!", GetColor(255, 0, 0));
WaitKey();
}
SetUseZBuffer3D(TRUE); //深度ステンシルバッファ
SetWriteZBuffer3D(TRUE); //。今のところ必要ない…と思いきや、一方通行の壁が荒ぶることへの対処ができる。一瞬暗くなるのは仕方ない?
option = Option::GetInstance();
savedata = SaveData::GetInstance();
menu = Menu::GetInstance();
player = new Player(Prologue::RIAJU);
LoadDungeon(3);
}
开发者ID:ArLEquiN64,项目名称:Hack-on-TUS,代码行数:26,代码来源:Dungeon.cpp
示例4: LoadGraph
void Button::load(const char* active, const char* push, const char* inactive)
{
graphHandle[Active] = LoadGraph(active);
graphHandle[Inactive] = LoadGraph(inactive);
graphHandle[Push] = LoadGraph(push);
GetGraphSize(graphHandle[Active], &size.width, &size.height);
}
开发者ID:rucm,项目名称:lifegame,代码行数:7,代码来源:Button.cpp
示例5: LoadGraph
void CTalkName::Init(){
ImgLabel[0] = LoadGraph("tenyu_data/pic/talkname00.png", true);
ImgLabel[1] = LoadGraph("tenyu_data/pic/talkname01.png", true);
ImgLabel[2] = LoadGraph("tenyu_data/pic/talkname02.png", true);
}
开发者ID:nunu-e64,项目名称:TENYU_RPG_CodeOnly,代码行数:7,代码来源:TalkName.cpp
示例6: InitPicture
void InitPicture(void){
GrHandle[0]=LoadGraph("test1.bmp");
GrHandle[1]=LoadGraph("dialog_LOAD.bmp");
GrHandle[2]=LoadGraph("panel1.bmp");
GrHandle[3]=LoadGraph("panel2.bmp");
GrHandle[4]=LoadGraph("panel3.bmp");
return;
}
开发者ID:uxtuno,项目名称:PetitEmu,代码行数:8,代码来源:psystem.cpp
示例7: LoadGraph
void Battle_Iniβ(){
DrawIni=LoadGraph("RPG DATA\\cursor.png");
EnemyStatus[0].Graph = LoadGraph( EnemyStatus[0].Pass );
EnemyStatus[1].Graph = LoadGraph( EnemyStatus[1].Pass );
for( int i=0; i<10; i++ )BattleMenuString[i]=BattleMenuString2[i];
}
开发者ID:ykprogram,项目名称:New-RPG,代码行数:8,代码来源:BattleMgr.cpp
示例8: LoadGraph
void Player::initialize()
{
m_hand->initialize();
m_state = NULL;
m_stateAnimation = NULL;
m_bets = 0;
m_buttonHandle = LoadGraph("image/testButton.png");
m_10ButtonHandle = LoadGraph("image/+10Button.png");
}
开发者ID:Numkn644,项目名称:BlackJack,代码行数:9,代码来源:Player.cpp
示例9: LoadGraph
//---------------------------------------------------------------------
void TitleDraw::loadImage()
{
image_circle_logo = LoadGraph("image/title/circle_logo.png");
image_title_back = LoadGraph("image/title/title_back.png");
LoadDivGraph("image/title/title_button.png",
TitleData::getButtonNum() * 2,
TitleData::getButtonNum(),
2,
TitleData::getButtonSizeX(),
TitleData::getButtonSizeY(),
image_title_button);
}
开发者ID:tapi-soft,项目名称:poseine,代码行数:13,代码来源:TitleDraw.cpp
示例10: LoadGraph
/*画像ロード*/
void TextGraphClass::Load(){
//背景ロード
GameBackHandle.push_back( LoadGraph("./resource/graph/BackGround1.png") );
GameBackHandle.push_back( LoadGraph("./resource/graph/BackGround2.png") );
//キャラクタ描画
CharacterHandle = LoadGraph("./resource/graph/character1.png");
//テキストボックス
TextBoxHandle = LoadGraph("./resource/graph/TextBox.png");
}
开发者ID:kawashi,项目名称:Reverberation,代码行数:13,代码来源:graph.cpp
示例11: LoadGraph
// 説明画面表示
void Display::Introduction()
{
// 説明画面画像の読み込みと表示
if(IsQuarter == IDYES){
GraphHandle_Introduction = LoadGraph("img\\q_introduction.png");
DrawGraph(0, 0, GraphHandle_Introduction, TRUE);
}else{
GraphHandle_Introduction = LoadGraph("img\\n_introduction.png");
DrawGraph(0, 0, GraphHandle_Introduction, TRUE);
}
//ScreenFlip();
}
开发者ID:OchaParadise,项目名称:casnake,代码行数:13,代码来源:Display.cpp
示例12: LoadGraph
Drawer::Drawer( ) {
_num_img = LoadGraph( "../Resources/Number.png" );
_background_img = LoadGraph( "../Resources/Background.png" );
_seeweed_img = LoadGraph( "../Resources/seeweed.png" );
_play = Play::getTask( );
_scene = Scene::getTask( );
_map = MapPtr( new Map );
_select = SelectPtr( new Select );
_ani_timer = 0;
_stage_max = _select->getIconNum( );
}
开发者ID:tetares,项目名称:PuzzleStudy,代码行数:13,代码来源:Drawer.cpp
示例13: LoadGraph
void GraphButton::LoadToMap(std::string name){
std::string loadname = "Images/" + name;
std::pair<int, int> handle;
handle.first = LoadGraph(loadname.c_str());
handle.second = LoadGraph(loadname.c_str());
GraphFilter(handle.second, DX_GRAPH_FILTER_HSB, 0, 0, 0, 256);
std::vector<std::string> extensionList = { ".png", ".jpg" };
for (auto &i : extensionList){
Func::strReplace(name, i, "");
}
handlemap.emplace(name, handle);
}
开发者ID:yagiri000,项目名称:NatashaForDxLib,代码行数:14,代码来源:Resource.cpp
示例14: LoadDivGraph
//初期化
void Game::Initialize(){
int src[16];
LoadDivGraph("minami_f.png",16,4,4,32,32,src);//主人公の素材
players = new Player[4];
Player minami(src,LoadGraph("minami.png"),LoadGraph("minami2.png"),LoadGraph("minami3.png"),"みなみ",50,30,0,8,10);
players[0] = minami;
players[0].becameMate();
Player siba(src,LoadGraph("siba.png"),LoadGraph("shiba2.png"),LoadGraph("shiba3.png"),"しば",50,30,1,28,20);
players[1] = siba;
players[2] = siba;
players[3] = siba;
players[1].becameMate();
stageMgr.Initialize();
menu.Initialize(players[0].getability(),players[0].getname());
battle.Initialize();
battlemode = false;
count = 0;
dead = false;
src1 = LoadGraph("menu2.png");
src2 = LoadGraph("Dead.png");
white = GetColor(255,255,255);
playercount = 2;
nowplayer = 0;
players[0].setItem("かーど");
playerpoint = new int[3];
}
开发者ID:jinopapo,项目名称:Hoshi_wo_miru_hito,代码行数:27,代码来源:Game.cpp
示例15: LoadGraph
void C_ShotManager::SetStateAll(C_Shot::STATE _setState)
{
for (auto& Shot : ShotList)
{
Shot.SetState(_setState);
}
if (BulletGraph[0] == -1)
{
BulletGraph[0] = LoadGraph("res\\Graph\\Bullet1.png");
BulletGraph[1] = LoadGraph("res\\Graph\\Bullet2.png");
BulletGraph[2] = LoadGraph("res\\Graph\\Bullet3.png");
BulletGraph[3] = LoadGraph("res\\Graph\\Bullet4.png");
}
}
开发者ID:Doku0911,项目名称:MonstrerMsm,代码行数:15,代码来源:ShotManager.cpp
示例16: ReconnectFeatures
CPLErr GNMGenericNetwork::ReconnectFeatures(GNMGFID nSrcGFID, GNMGFID nTgtGFID,
GNMGFID nConGFID, double dfCost,
double dfInvCost, GNMDirection eDir)
{
if(!m_bIsGraphLoaded && LoadGraph() != CE_None)
{
return CE_Failure;
}
OGRFeature *poFeature = FindConnection(nSrcGFID, nTgtGFID, nConGFID);
if (poFeature == NULL)
{
CPLError( CE_Failure, CPLE_AppDefined, "The connection not exist" );
return CE_Failure;
}
poFeature->SetField( GNM_SYSFIELD_COST, dfCost );
poFeature->SetField( GNM_SYSFIELD_INVCOST, dfInvCost );
poFeature->SetField( GNM_SYSFIELD_DIRECTION, eDir );
if( m_poGraphLayer->SetFeature( poFeature ) != OGRERR_NONE )
{
OGRFeature::DestroyFeature( poFeature );
CPLError( CE_Failure, CPLE_AppDefined, "Failed to update feature." );
return CE_Failure;
}
OGRFeature::DestroyFeature( poFeature );
// update graph
m_oGraph.ChangeEdge(nConGFID, dfCost, dfInvCost);
return CE_None;
}
开发者ID:Mavrx-inc,项目名称:gdal,代码行数:35,代码来源:gnmgenericnetwork.cpp
示例17: DisconnectFeatures
CPLErr GNMGenericNetwork::DisconnectFeatures(GNMGFID nSrcGFID, GNMGFID nTgtGFID,
GNMGFID nConGFID)
{
if(!m_bIsGraphLoaded && LoadGraph() != CE_None)
{
return CE_Failure;
}
OGRFeature *poFeature = FindConnection(nSrcGFID, nTgtGFID, nConGFID);
if (poFeature == NULL)
{
CPLError( CE_Failure, CPLE_AppDefined, "The connection not exist" );
return CE_Failure;
}
if (m_poGraphLayer->DeleteFeature(poFeature->GetFID()) != OGRERR_NONE)
{
OGRFeature::DestroyFeature(poFeature);
return CE_Failure;
}
OGRFeature::DestroyFeature(poFeature);
// update graph
m_oGraph.DeleteEdge(nConGFID);
return CE_None;
}
开发者ID:Mavrx-inc,项目名称:gdal,代码行数:29,代码来源:gnmgenericnetwork.cpp
示例18: sprintf_s
void Font::DrawString(int x,int y,int Space,float ext,string String,string Pass,int Position,float Alpha_Speed)
{
bool isLoaded = false;
int Length = FontIndexs.size();
int i=0;
for(i=0;i<Length;i++)
{
if(FontIndexs[i] == Pass)
{
isLoaded = true;
break;
}
}
if(!isLoaded)
{//フォントデータの読み込み
vector<int> Images;
for(char Alphabet='A';Alphabet<='Z';Alphabet++)
{
char Str[7];
sprintf_s(Str,7,"/%c.png",Alphabet);
Images.push_back(LoadGraph((Pass + Str).c_str()));
}
FontData.push_back(Images);
FontIndexs.push_back(Pass);
}
int Width = CalculateWidth(0,0,Space,ext,String.c_str(),i);
DrawString_UseImage(x-(int)(Width * (Position / 2.0)),y,Space,ext,String.c_str(),i);
return;
}
开发者ID:MITUKI,项目名称:StormSignal_ARPG,代码行数:33,代码来源:Font.cpp
示例19: WinMain
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
ChangeWindowMode(TRUE);
DxLib_Init();
SetDrawScreen(DX_SCREEN_BACK);
int handle = LoadGraph("image/backGround.png");
GameManager *gameMgr;
gameMgr = new GameManager();
/*初期化処理*/
gameMgr->initialize();
while (!ProcessMessage() && !ScreenFlip() && !ClearDrawScreen())
{
/*キーボードアップデート*/
KeyboardInput::Instance()->update();
if (KeyboardInput::Instance()->get(KEY_INPUT_ESCAPE) == 1){ break; }
DrawGraph(0, 0, handle, FALSE);
/*メイン処理*/
gameMgr->execute();
}
/*終了処理*/
gameMgr->finalize();
delete gameMgr;
DxLib_End();
return 0;
}
开发者ID:Numkn644,项目名称:BlackJack,代码行数:35,代码来源:Main.cpp
示例20: WinMain
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int){
SetWindowText("Title");
SetGraphMode(WINDOW_WIDTH , WINDOW_HEIGHT,32 );
ChangeWindowMode(TRUE), DxLib_Init(), SetDrawScreen( DX_SCREEN_BACK );
int LoadImage = LoadGraph("Natsuiro/BLOCK/load.png");
DrawExtendGraph(0,0,WINDOW_WIDTH,WINDOW_HEIGHT, LoadImage ,false);
ScreenFlip();
SetTransColor(255,0,255);
Awake();
long long TIME = GetNowHiPerformanceCount();
# if BENCHMARK == TRUE
long long int count = GetNowCount();
# endif
while( ScreenFlip()==0 && ProcessMessage()==0 && ClearDrawScreen()==0 && !CheckHitKey(KEY_INPUT_ESCAPE) ){
GameLoop();
Sleep( (unsigned long)max( 16 - (int)( GetNowHiPerformanceCount() - TIME ) / 1000 , 0 ) );
TIME = GetNowHiPerformanceCount();
# if BENCHMARK == TRUE
DrawFormatString(WINDOW_WIDTH-200,0,BLACK,"FPS %d (%dms)", (int)( 1000/( GetNowCount() - count ) ) , GetNowCount() - count );
count = GetNowCount();
# endif
}
DxLib_End();
return 0;
}
开发者ID:YAZAWA68,项目名称:greedgreen,代码行数:33,代码来源:System.cpp
注:本文中的LoadGraph函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论