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
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
int GetFormatString(D3DFORMAT Format, char *pcOut) { // Parameter prüfen if(pcOut == NULL) return 0; int i = 0; // Format suchen und Beschreibung kopieren switch(Format) { case D3DFMT_R8G8B8: strcpy(pcOut, "R8G8B8"); break; case D3DFMT_A8R8G8B8: strcpy(pcOut, "A8R8G8B8"); break; case D3DFMT_X8R8G8B8: strcpy(pcOut, "X8R8G8B8"); break; case D3DFMT_R5G6B5: strcpy(pcOut, "R5G6B5"); break; case D3DFMT_X1R5G5B5: strcpy(pcOut, "X1R5G5B5"); break; case D3DFMT_A1R5G5B5: strcpy(pcOut, "A1R5G5B5"); break; case D3DFMT_A4R4G4B4: strcpy(pcOut, "A4R4G4B4"); break; case D3DFMT_A2B10G10R10: strcpy(pcOut, "A2B10G10R10"); break; case D3DFMT_A16B16G16R16: strcpy(pcOut, "A16B16G16R16"); break; case D3DFMT_G16R16: strcpy(pcOut, "G16R16"); break; case D3DFMT_A8P8: strcpy(pcOut, "A8P8"); break; case D3DFMT_P8: strcpy(pcOut, "P8"); break; case D3DFMT_L8: strcpy(pcOut, "L8"); break; case D3DFMT_A8L8: strcpy(pcOut, "A8L8"); break; case D3DFMT_A4L4: strcpy(pcOut, "A4L4"); break; case D3DFMT_V8U8: strcpy(pcOut, "V8U8"); break; case D3DFMT_Q8W8V8U8: strcpy(pcOut, "Q8W8V8U8"); break; case D3DFMT_V16U16: strcpy(pcOut, "V16U16"); break; case D3DFMT_Q16W16V16U16: strcpy(pcOut, "Q16W16V16U16"); break; case D3DFMT_L6V5U5: strcpy(pcOut, "L6V5U5"); break; case D3DFMT_X8L8V8U8: strcpy(pcOut, "X8L8V8U8"); break; case D3DFMT_A2W10V10U10: strcpy(pcOut, "A2W10V10U10"); break; case D3DFMT_L16: strcpy(pcOut, "L16"); break; case D3DFMT_UYVY: strcpy(pcOut, "UYVY"); break; case D3DFMT_YUY2: strcpy(pcOut, "YUY2"); break; case D3DFMT_DXT1: strcpy(pcOut, "DXT1"); break; case D3DFMT_DXT2: strcpy(pcOut, "DXT2"); break; case D3DFMT_DXT3: strcpy(pcOut, "DXT3"); break; case D3DFMT_DXT4: strcpy(pcOut, "DXT4"); break; case D3DFMT_DXT5: strcpy(pcOut, "DXT5"); break; case D3DFMT_MULTI2_ARGB8: strcpy(pcOut, "MULTI2_ARGB8"); break; case D3DFMT_D16_LOCKABLE: strcpy(pcOut, "D16_LOCKABLE"); break; case D3DFMT_D32: strcpy(pcOut, "D32"); break; case D3DFMT_D32F_LOCKABLE: strcpy(pcOut, "D32F_LOCKABLE"); break; case D3DFMT_D24FS8: strcpy(pcOut, "D24FS8"); break; case D3DFMT_D15S1: strcpy(pcOut, "D15S1"); break; case D3DFMT_D24S8: strcpy(pcOut, "D24S8"); break; case D3DFMT_D16: strcpy(pcOut, "D16"); break; case D3DFMT_D24X8: strcpy(pcOut, "D24X8"); break; case D3DFMT_D24X4S4: strcpy(pcOut, "D24X4S4"); break; case D3DFMT_VERTEXDATA: strcpy(pcOut, "VERTEXDATA"); break; case D3DFMT_INDEX16: strcpy(pcOut, "INDEX16"); break; case D3DFMT_INDEX32: strcpy(pcOut, "INDEX32"); break; case D3DFMT_UNKNOWN: strcpy(pcOut, "UNKNOWN"); break; default: strcpy(pcOut, "Unbekanntes Format"); break; } return 0; } |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »E333« (02.09.2021, 04:13)
ah perfekt danke, das hatte ich gesucht.Zitat
die Funktion, die du suchst wäre im Übrigen wcscpy
Du brauchst da kein strcpy, ein einfaches = sollte reichen, sind ja nur Stringliterale...
Werbeanzeige