Skip to content
Snippets Groups Projects
Verified Commit f20d9ae7 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

refactor: method re-order

parent 7da7c31d
No related branches found
No related tags found
1 merge request!9Version 0.4.0 🍾
Pipeline #1345 passed
......@@ -951,6 +951,20 @@ class GameboyEmulator implements Emulator {
return "https://gitlab.stage.hive.pt/joamag/boytacean/-/blob/master/CHANGELOG.md";
}
getPixelFormat(): PixelFormat {
return PixelFormat.RGB;
}
/**
* Returns the array buffer that contains the complete set of
* pixel data that is going to be drawn.
*
* @returns The current pixel data for the emulator display.
*/
getImageBuffer(): Uint8Array {
return this.gameBoy!.frame_buffer_eager();
}
toggleRunning() {
if (this.paused) {
this.resume();
......@@ -988,20 +1002,6 @@ class GameboyEmulator implements Emulator {
this.start({ engine: null });
}
/**
* Returns the array buffer that contains the complete set of
* pixel data that is going to be drawn.
*
* @returns The current pixel data for the emulator display.
*/
getImageBuffer(): Uint8Array {
return this.gameBoy!.frame_buffer_eager();
}
getPixelFormat(): PixelFormat {
return PixelFormat.RGB;
}
toggleWindow() {
this.maximize();
}
......
......@@ -31,12 +31,12 @@ export interface Emulator {
getName(): string;
getVersion(): string;
getVersionUrl(): string;
getPixelFormat(): PixelFormat;
getImageBuffer(): Uint8Array;
toggleRunning(): void;
pause(): void;
resume(): void;
reset(): void;
getImageBuffer(): Uint8Array;
getPixelFormat(): PixelFormat;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment