From 6a7242dffd6dcb5d158e5fa2908c1212b7eb4220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Wed, 9 Jun 2021 10:40:39 +0200 Subject: [PATCH] fixing warning compil --- sources/PPU/PPU.cpp | 14 +++++++------- sources/PPU/PPUUtils.hpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sources/PPU/PPU.cpp b/sources/PPU/PPU.cpp index 8d04ffb..b43cdb8 100644 --- a/sources/PPU/PPU.cpp +++ b/sources/PPU/PPU.cpp @@ -42,7 +42,7 @@ namespace ComSquare::PPU this->cgram->write(7, 0x03); this->cgram->write(66, 0xE0); this->cgram->write(67, 0x7F); -/* + //tiles int vram_test[] = { 00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -75,17 +75,17 @@ namespace ComSquare::PPU 00,0x03,0x00,0x03,0x00,0x03,0x00,0x06,0x00,0x0c,0x00,0x18,0x00,0xf0,0x00,0xe0, 00,0x00,0x00,0x00,0x80,0x00,0xc0,0x00,0xe0,0x00,0xf0,0x00,0xf8,0x00,0xfc,0x00, 00,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x07,0x00,0x0f,00,0x1f,00,0x3f,00, -1 - }; */ - int *cgram_test = get_dump_cgram(); + }; + /*int *cgram_test = get_dump_cgram(); for (int i = 0; cgram_test[i] != -1; i++) { this->cgram->write(i, cgram_test[i]); } - int *vram_test = get_dump_vram(); + int *vram_test = get_dump_vram(); */ for (int i = 0; vram_test[i] != -1; i++) { this->vram->write(i, vram_test[i]); } - /* int vram_test_2[] = {8, 00, 02, 00, 0x0A, 00, 02, 00, 0x0A, 00, 00, 00, 00, 00, 00, -1}; + int vram_test_2[] = {8, 00, 02, 00, 0x0A, 00, 02, 00, 0x0A, 00, 00, 00, 00, 00, 00, -1}; for (int i = 0; vram_test_2[i] != -1; i++) { this->vram->write(i + 0x8000, vram_test_2[i]); } @@ -144,8 +144,8 @@ namespace ComSquare::PPU //this->_registers._bgofs[3].raw = 0x03DF; this->_registers._t[0].enableWindowDisplayBg1 = true; this->_registers._t[0].enableWindowDisplayBg2 = true; - */ +/* //registers aladin this->_registers._bgmode.bgMode = 1; @@ -199,7 +199,7 @@ namespace ComSquare::PPU this->_registers._t[0].enableWindowDisplayBg1 = true; this->_registers._t[0].enableWindowDisplayBg2 = true; this->_registers._t[0].enableWindowDisplayBg3 = true; - + */ } diff --git a/sources/PPU/PPUUtils.hpp b/sources/PPU/PPUUtils.hpp index 29a6695..88124da 100644 --- a/sources/PPU/PPUUtils.hpp +++ b/sources/PPU/PPUUtils.hpp @@ -47,8 +47,8 @@ namespace ComSquare::PPU const std::array, SRC_SIZE_Y> &bufferSrc, const Vector2 &offset = {0, 0}) { - for (int i = offset.y; i < bufferSrc.size(); i++) { - for (int j = offset.x; j < bufferSrc[i].size(); j++) { + for (unsigned long i = offset.y; i < bufferSrc.size(); i++) { + for (unsigned long j = offset.x; j < bufferSrc[i].size(); j++) { bufferDest[i][j] = bufferSrc[i][j]; } }