Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Anonymous
unregistriert
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
// ****************************************************************** // Setzen einer Textur tbResult tbDirect3D::SetTexture(DWORD dwStage, PDIRECT3DBASETEXTURE9 pTexture) { // In der Debug-Version wird geprüft, ob dwStage in Ordnung ist. #ifdef _DEBUG if(dwStage < 0 || dwStage > 8) { // Texturschicht ist nicht gültig! TB_ERROR("Ungültige Texturschicht!", TB_ERROR); } #endif // Prüfen, ob die Textur vielleicht schon gesetzt wurde. // Falls ja, wird direkt abgebrochen. PDIRECT3DBASETEXTURE9 pTextureTmp=NULL; <------ m_pD3DDevice->GetTexture(dwStage, &pTextureTmp); <------ if(pTextureTmp == pTexture) return TB_OK; <------ else{ // Die Textur setzen und die Tabelle aktualisieren m_pD3DDevice->SetTexture(dwStage, pTexture); m_apTexture[dwStage] = pTexture; } return TB_OK; } |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
// Dritte Seite (Menü, Mission) m_pGUI->CreateFrame(300, 2, tbVector2(10.0f, 10.0f), tbVector2(780.0f, 580.0f)); m_pGUI->CreateButton(301, 2, tbVector2(50.0f, 50.0f), tbVector2(120.0f, 50.0f), "Mission"); m_pGUI->CreateButton(302, 2, tbVector2(50.0f, 120.0f), tbVector2(120.0f, 50.0f), "Schiff"); m_pGUI->CreateButton(303, 2, tbVector2(50.0f, 440.0f), tbVector2(120.0f, 50.0f), "Hauptmenü"); m_pGUI->CreateButton(304, 2, tbVector2(50.0f, 510.0f), tbVector2(120.0f, 50.0f), "Spiel Starten"); m_pGUI->CreateFrame(305, 2, tbVector2(230.0f, 50.0f), tbVector2(520.0f, 510.0f)); m_pGUI->CreateText(306, 2, tbVector2(250.0f, 70.0f), "Missionsbesprechung"); m_pGUI->CreateFrame(307, 2, tbVector2(250.0f, 120.0f), tbVector2(450.0f, 250.0f)); m_pGUI->CreateImage(308, 2, tbVector2(255.0f, 125.0f), tbVector2(440.0f, 240.0f), m_pBackground, tbVector2(0.0f,0.0f), tbVector2(1.0f,1.0f), tbColor(1.0f, 0.75f, 0.75f)); // Image funktioniert nicht m_pGUI->CreateButton(309, 2, tbVector2(250.0f, 370.0f), tbVector2(40.0f, 40.0f), "<"); m_pGUI->CreateButton(310, 2, tbVector2(290.0f, 370.0f), tbVector2(40.0f, 40.0f), "<<"); m_pGUI->CreateButton(311, 2, tbVector2(660.0f, 370.0f), tbVector2(40.0f, 40.0f), ">"); m_pGUI->CreateButton(312, 2, tbVector2(620.0f, 370.0f), tbVector2(40.0f, 40.0f), ">>"); m_pGUI->CreateText(313, 2, tbVector2(460.0f, 380.0f), ""); // Anzahl und aktuelle Nummer von Bildern m_pGUI->CreateText(314, 2, tbVector2(250.0f, 410.0f), "Beschreibung"); m_pGUI->CreateFrame(315, 2, tbVector2(250.0f, 440.0f), tbVector2(450.0f, 100.0f)); m_pGUI->CreateText(316, 2, tbVector2(260.0f, 450.0f), ""); |
Anonymous
unregistriert
Werbeanzeige