summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Rodrigues Couto <gabrielrcouto@gmail.com>2016-02-21 11:28:54 -0300
committerGabriel Rodrigues Couto <gabrielrcouto@gmail.com>2016-02-21 11:28:54 -0300
commit9e198c491c067318a07d4d8719ebe038f563da71 (patch)
treee9ec0f7012b6481bd83fe40c6a3e3d4fe92b46a1
parenteb377af37dd0ec8b1b63f1ec4cbe7a51437d379a (diff)
downloadphp-terminal-gameboy-emulator-9e198c491c067318a07d4d8719ebe038f563da71.zip
php-terminal-gameboy-emulator-9e198c491c067318a07d4d8719ebe038f563da71.tar.gz
php-terminal-gameboy-emulator-9e198c491c067318a07d4d8719ebe038f563da71.tar.bz2
Numbered Settings
Removed scaledFrameBuffer
-rw-r--r--src/Gameboy/Core.php3
-rw-r--r--src/Gameboy/Settings.php48
2 files changed, 21 insertions, 30 deletions
diff --git a/src/Gameboy/Core.php b/src/Gameboy/Core.php
index 55f2496..cc47bce 100644
--- a/src/Gameboy/Core.php
+++ b/src/Gameboy/Core.php
@@ -317,8 +317,6 @@ class Core
public $frameBuffer = [];
- public $scaledFrameBuffer = [];
-
public $canvasBuffer;
public $gbcRawPalette = [];
@@ -1062,7 +1060,6 @@ class Core
}
public function initLCD() {
- $this->scaledFrameBuffer = $this->getTypedArray($this->pixelCount, 0, "int32"); //Used for software side scaling...
$this->transparentCutoff = (Settings::$settings[17] || $this->cGBC) ? 32 : 4;
if (count($this->weaveLookup) == 0) {
//Setup the image decoding lookup table:
diff --git a/src/Gameboy/Settings.php b/src/Gameboy/Settings.php
index 36e64a7..d08b4db 100644
--- a/src/Gameboy/Settings.php
+++ b/src/Gameboy/Settings.php
@@ -5,73 +5,67 @@ class Settings
{
//Some settings.
public static $settings = [
- //Turn on sound.
+ //[0] - Turn on sound.
false,
- //Force Mono sound.
+ //[1] - Force Mono sound.
false,
- //Give priority to GameBoy mode
+ //[2] - Give priority to GameBoy mode
true,
- //Keyboard button map.
+ //[3] - Keyboard button map.
[39, 37, 38, 40, 88, 90, 16, 13],
- //Frameskip Amount (Auto frameskip setting allows the script to change this.)
+ //[4] - Frameskip Amount (Auto frameskip setting allows the script to change this.)
0,
- //Use the data URI BMP method over the canvas tag method?
+ //[5] - Use the data URI BMP method over the canvas tag method?
false,
- //How many tiles in each direction when using the BMP method (width * height).
+ //[6] - How many tiles in each direction when using the BMP method (width * height).
[16, 12],
- //Auto Frame Skip
+ //[7] - Auto Frame Skip
true,
- //Maximum Frame Skip
+ //[8] - Maximum Frame Skip
29,
- //Override to allow for MBC1 instead of ROM only (compatibility for broken 3rd-party cartridges).
+ //[9] - Override to allow for MBC1 instead of ROM only (compatibility for broken 3rd-party cartridges).
true,
- //Override MBC RAM disabling and always allow reading and writing to the banks.
+ //[10] - Override MBC RAM disabling and always allow reading and writing to the banks.
true,
- //Audio granularity setting (Sampling of audio every x many machine cycles)
+ //[11] - Audio granularity setting (Sampling of audio every x many machine cycles)
20,
- //Frameskip base factor
+ //[12] - Frameskip base factor
10,
- //Target number of machine cycles per loop. (4,194,300 / 1000 * 17)
+ //[13] - Target number of machine cycles per loop. (4,194,300 / 1000 * 17)
17826,
- //Sample Rate
+ //[14] - Sample Rate
70000,
- //How many bits per WAV PCM sample (For browsers that fall back to WAV PCM generation)
+ //[15] - How many bits per WAV PCM sample (For browsers that fall back to WAV PCM generation)
0x10,
- //Use the GBC BIOS?
+ //[16] - Use the GBC BIOS?
false,
- //Colorize GB mode?
+ //[17] - Colorize GB mode?
false,
- //Sample size for webkit audio.
+ //[18] - Sample size for webkit audio.
512,
- //Whether to display the canvas at 144x160 on fullscreen or as stretched.
+ //[19] - Whether to display the canvas at 144x160 on fullscreen or as stretched.
false,
- //Interval for the emulator loop.
+ //[20] - Interval for the emulator loop.
17,
-
- //Render nearest-neighbor scaling in javascript?
- false,
-
- //Disallow typed arrays?
- false
];
} \ No newline at end of file