mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Warning fixes, comments
This commit is contained in:
+5
-6
@@ -354,7 +354,7 @@ ScreenshotResult TakeGameScreenshot(Draw::DrawContext *draw, const Path &filenam
|
||||
const u8 *buffer = ConvertBufferToScreenshot(buf, false, flipbuffer, width, height);
|
||||
|
||||
bool success;
|
||||
if (width <= 480 * maxRes) {
|
||||
if ((int)width <= 480 * maxRes) {
|
||||
success = Save888RGBScreenshot(filename, fmt, buffer, width, height);
|
||||
delete[] flipbuffer;
|
||||
} else {
|
||||
@@ -363,13 +363,12 @@ ScreenshotResult TakeGameScreenshot(Draw::DrawContext *draw, const Path &filenam
|
||||
delete[] flipbuffer;
|
||||
|
||||
// TODO: Speed this thing up.
|
||||
while (width > 480 * maxRes) {
|
||||
while ((int)width > 480 * maxRes) {
|
||||
u8 *halfSize = new u8[(width / 2) * (height / 2) * 3];
|
||||
for (int y = 0; y < height / 2; y++) {
|
||||
for (int x = 0; x < width / 2; x++) {
|
||||
for (u32 y = 0; y < height / 2; y++) {
|
||||
for (u32 x = 0; x < width / 2; x++) {
|
||||
for (int c = 0; c < 3; c++) {
|
||||
halfSize[(y * (width / 2) + x) * 3 + c] =
|
||||
(shrinkBuffer[((y * 2) * width + (x * 2)) * 3 + c] +
|
||||
halfSize[(y * (width / 2) + x) * 3 + c] = (shrinkBuffer[((y * 2) * width + (x * 2)) * 3 + c] +
|
||||
shrinkBuffer[((y * 2) * width + (x * 2 + 1)) * 3 + c] +
|
||||
shrinkBuffer[(((y * 2) + 1) * width + (x * 2)) * 3 + c] +
|
||||
shrinkBuffer[(((y * 2) + 1) * width + (x * 2 + 1)) * 3 + c]) / 4;
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
// [04000116] P: s16 C: 5551 T: u16 (12b) (7688298)
|
||||
|
||||
// This is the first GoW one. TODO: Do two verts at a time.
|
||||
// God of War.
|
||||
void VtxDec_Tu16_C8888_Pfloat(const u8 *srcp, u8 *dstp, int count, const UVScale *uvScaleOffset) {
|
||||
// Input: 4 + 4 + 4 + 12 = 24 bytes
|
||||
struct GOWVTX {
|
||||
union {
|
||||
struct {
|
||||
@@ -47,6 +49,7 @@ void VtxDec_Tu16_C8888_Pfloat(const u8 *srcp, u8 *dstp, int count, const UVScale
|
||||
float z;
|
||||
};
|
||||
// NOTE: This might be different for different vertex formats.
|
||||
// Output: 8 + 4 + 4 + 12 = 28 bytes.
|
||||
struct OutVTX {
|
||||
float u;
|
||||
float v;
|
||||
|
||||
Reference in New Issue
Block a user