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
Zitat von »"Visual Studio"«
Unhandled exception at 0x10005a40 (AICE.dll) in ToB2.exe: 0xC0000005: Access violation reading location 0x00000002.
Zitat von »"stdio.h"«
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(int, sprintf_s, vsprintf_s, char, _Dest, _In_z_ _Printf_format_string_ const char *, _Format)
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 |
BOOL CCharacter::LoadFromFile(const char* sFileStand,DWORD iColorKey,int iFrameWidth,int iFrameHeight) { //Standdatei laden - die is der übeltäter! //m_clSurface ist vom Typ CSurface aus der AICE-Engine //if(!m_clStand.LoadFromFile(sFileStand,iColorKey)) return FALSE; //Werte einstellen m_iFrameWidth = iFrameWidth; m_iFrameHeight = iFrameHeight; return TRUE; } |
C-/C++-Quelltext |
|
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 28 29 30 31 32 33 34 35 |
BOOL CSurface::LoadFromFile(const char* sFile,DWORD iColorKey) { CLogData Log; //Textur aus Datei laden if(FAILED(D3DXCreateTextureFromFileEx( CGraphic::GetSingleton().GetDevice(), sFile, D3DX_DEFAULT,D3DX_DEFAULT,0,0, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_FILTER_NONE, D3DX_FILTER_NONE, iColorKey, NULL,NULL, &m_lpTexture))) { Log.AddInformation("Folgende Datei konnte nicht geladen werden: ",sFile,INFOTYPE_FAILED); return FALSE; } //Breite/Höhe holen D3DSURFACE_DESC Desc; if(FAILED(m_lpTexture->GetLevelDesc(0,&Desc))) { Log.AddInformation("Konnte LevelDesc folgender Datei nicht holen: ",sFile,INFOTYPE_FAILED); return FALSE; } m_iWidth = Desc.Width; m_iHeight = Desc.Height; //ansonsten alles schick Log.AddInformation("Bilddatei erfolgreich geladen: ",sFile,INFOTYPE_SUCCESS); return TRUE; } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 |
//da machter streik -> ein string fehlt xD sprintf_s(buf,"<div class=\"failed\">- %s%s</div>\n",Information); //so wäre es richtig! sprintf_s(buf,"<div class=\"failed\">- %s%s</ div>\n",Information,Additional); |
Werbeanzeige