diff options
Diffstat (limited to 'src/video_core/utils.cpp')
| -rw-r--r-- | src/video_core/utils.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/utils.cpp b/src/video_core/utils.cpp index 67d74a2d8..b94376ac1 100644 --- a/src/video_core/utils.cpp +++ b/src/video_core/utils.cpp | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | #include "video_core/utils.h" | 8 | #include "video_core/utils.h" |
| 9 | 9 | ||
| 10 | namespace VideoCore { | 10 | namespace VideoCore { |
| 11 | |||
| 12 | /** | 11 | /** |
| 13 | * Dumps a texture to TGA | 12 | * Dumps a texture to TGA |
| 14 | * @param filename String filename to dump texture to | 13 | * @param filename String filename to dump texture to |
| @@ -32,9 +31,9 @@ void DumpTGA(std::string filename, int width, int height, u8* raw_data) { | |||
| 32 | fwrite(&hdr, sizeof(TGAHeader), 1, fout); | 31 | fwrite(&hdr, sizeof(TGAHeader), 1, fout); |
| 33 | for (int i = 0; i < height; i++) { | 32 | for (int i = 0; i < height; i++) { |
| 34 | for (int j = 0; j < width; j++) { | 33 | for (int j = 0; j < width; j++) { |
| 35 | r = raw_data[(4 * (i * width)) + (4 * j) + 0]; | 34 | b = raw_data[(3 * (i * width)) + (3 * j) + 0]; |
| 36 | g = raw_data[(4 * (i * width)) + (4 * j) + 1]; | 35 | g = raw_data[(3 * (i * width)) + (3 * j) + 1]; |
| 37 | b = raw_data[(4 * (i * width)) + (4 * j) + 2]; | 36 | r = raw_data[(3 * (i * width)) + (3 * j) + 2]; |
| 38 | putc(b, fout); | 37 | putc(b, fout); |
| 39 | putc(g, fout); | 38 | putc(g, fout); |
| 40 | putc(r, fout); | 39 | putc(r, fout); |
| @@ -42,5 +41,4 @@ void DumpTGA(std::string filename, int width, int height, u8* raw_data) { | |||
| 42 | } | 41 | } |
| 43 | fclose(fout); | 42 | fclose(fout); |
| 44 | } | 43 | } |
| 45 | |||
| 46 | } // namespace | 44 | } // namespace |