pgbvideooutput.java
来自「一个用java写成的gb模拟器的源代码。」· Java 代码 · 共 47 行
JAVA
47 行
import java.awt.Canvas;
/**
* PgbVideoOutput takes a PgbVideo implementation and renders
* it to the screen, probably through its java.awt.Canvas
* superclass.
*/
public abstract class PgbVideoOutput extends Canvas {
PgbVideo video;
public PgbVideoOutput(PgbVideo video) {
this.video = video;
// notify the video system that we're attached.
video.setVideoOutput(this);
}
public abstract void setGraphics();
/**
* reset() is called by Pgb when the emulated machine
* resets. If any screen clearing is needed, this is a
* good time. Also the canvas is visible, so if any info
* needs to be acquired on the display, this is a good
* time.
*/
public abstract void reset();
/**
* hblank(line) is called by the attached PgbVideo every
* time an hblank occurs and is not skipped by frame
* skipping.
*/
public abstract void hblank(int line);
/**
* vblank() is called by the attached PgbVideo every
* time a vblank occurs and is not skipped by frame
* skipping.
*/
public abstract void vblank();
/**
* create a screenshot
*/
public abstract void makeScreenshot();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?