Package screens
Class Screen
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
The emulated machine's screen, to be subclassed.
This object contains abstract methods and MUST be subclassed for each type of screen.
The methods herein convert from the emulated machine's screen data to java screen data.
The CPU object creates the videoram memory automatically, this lies above RAMTOP. This will be "address 0" in this object's vramBuffer.
This now (as of 1.08) handles keypresses and mouse movements/buttons on the emulated screen. Screen redrawing should be kicked off by the "50 Hz" QL50HzInterrupt object only. This (and thus the subclasses) is not thread safe.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected DataBufferInt
protected int
boolean
boolean
protected boolean
protected boolean
protected Monitor
protected int
protected final int[]
protected final int[]
protected int
protected WritableRaster
protected BufferedImage
protected int
protected int
protected boolean
protected int
int
protected int
int
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Changes the double sized status of this screen (a pixel is doubled in every dimension).abstract void
combineBlocks
(MC68000Cpu cpu) This combines two blocks (source 1, source2) with alpha blending and puts the result into the screen.void
copyScreen
(MC68000Cpu cpu, int addr, int value) Copies a word's worth of pixels from the original QL screen to this screen.abstract void
displayRegion
(MC68000Cpu cpu, int start, int nbrOfBytes) Displays a region if bytes were loaded directly to the screen memory.abstract void
fillBlock
(MC68000Cpu cpu, boolean resolveStipple) Fills a block with colour : this updates the "screen memory" (vrambuffer) AND the underlying image.final void
fillScreen
(int newRGB) Fills the visible screen with a certain colour.final void
fillScreen
(Color c) Fills the screen with a certain colour.final int
Gets the current screen mode.int
Gets the divisor necessary for moving memory about.final Dimension
Gets the SMSQE pixel size of the screen, which is that of the underlying image.boolean
final int
Gets the number of bytes per line in high colour mode.Gets the monitor this screen is attached to.Get the last recorded mouse position.final Dimension
Gets the preferred size of this object, which is that of the underlying image.final int
Gets the first address of screen memory.abstract int
Gets size, in bytes, of the vram.final int
Gets the last address of screen memory.static int
getSizeInBytes
(int xsize, int ysize, int colourMode) Gets the number of bytes in each screen mode (except for mode 0 where it's false).final int
getXSize()
Gets the x resolution in pixels.final int
getYSize()
Gets the y resolution in pixels.final boolean
abstract boolean
Checks whether this is a QL type screenboolean
Shows whether "vibrant colours" were turned on or not.boolean
Gets whether mouse is in this screen.abstract void
moveBlock
(MC68000Cpu cpu, boolean copyFromScreen) This is called when a block of memory was copied to the vram..void
Paints the component.void
Resets the mouse buttons, as if no mouse button was pressed.void
Input some keys that aren't caught via the keyTyped method: Cursor keys Function keys home, end, page up, page down pause, syst, stop ESC key (not caught under osx) This here method has several premature exits.void
When key is released, tell SMSQE via monitor object.void
Gets the key typed in theScreen
object to the Monitor object (and thus the emulation).void
When mouse enters the emulated screen, this makes normal host OS mouse cursor "disappear".void
Sets the mouse cursor back to normal when mouse leaves the emulated screen.void
This is the method that catches the mouse movement and sends it to the emulator via the monitor object.void
Handles mouse presses on the emulated screen - send mouse button pressed to SMSQ/E.void
Handles mouse button releases on the emulated screen - send mouse button released to SMSQE.void
setColourMode
(int mode) Sets the screen mode when in Ql compatible mode.final void
setDisplayRegion
(int address, int nbrOfBytes, char[] mem) Copies a block of screen memory from an original QL screen to this screen, converting the colours.void
setEmuColourMode
(int mode) Sets the screen mode for a QL emulated screen (subtly different from the above).void
Set where the window ends, in screen pixels.final void
setFullSize
(boolean full) Sets whether screen should be full size.void
setIsMac
(boolean im) Sets whether this screen is run under a mac.void
setIsWindows
(boolean im) Sets whether this screen is run under windowsvoid
setKeysType
(boolean keyType) void
Sets the Monitor object for this.void
setMouseClickDelay
(int delay) Sets the delay after a mouse click.boolean
setMousePosition
(int x, int y) Sets a new mouse position if that has changed from within SMSQ/E.void
setMousewheelAccel
(int mse) Sets the mousewheel acceleration, ie how many arrow key chars are input for one mouse wheel movement.protected void
setPixels
(int x, int y, int value, int Qlmode) Sets the colours of a QL screen mode word's worth of pixels.final void
setQLEmulationMode
(int mode) Sets the mode the emulated QL screen is supposed to be in when copying it in higher screen modes.abstract void
setVibrantColours
(boolean bright, char[] vram) Sets whether brighter colours should be used.abstract void
setVramBase
(int vrambase) Sets the new Vrambase or the screen buffer if we are in QL compatible mode (this implies that the CPU or its memory changed).abstract void
writeByteToScreen
(int address, int value, int wordValue) Writes a byte to the screen, and paints the corresponding pixel on the screen.abstract void
writeLongToScreen
(int addr, int value) Writes a long word to the screen, and paints the corresponding pixel on the screen.abstract void
writeWordToScreen
(int addr, int value) Writes a word to the screen, and paints the corresponding pixel on the screen.abstract void
xorBlock
(MC68000Cpu cpu, boolean resolveStipple) Xors a block with colour : this updates the "screen memory" (vrambuffer) AND the underlying image.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
startAddress
protected int startAddress -
stopAddress
protected int stopAddress -
xsize
public int xsize -
ysize
public int ysize -
colourMode
protected int colourMode -
isDirty
public volatile boolean isDirty -
isDouble
public boolean isDouble -
screenImage
-
raster
-
dataBuffer
-
nbrOfBytesPerLine
protected int nbrOfBytesPerLine -
vibrantColours
protected boolean vibrantColours -
divisior
protected int divisior -
monitor
-
isMac
protected boolean isMac -
isWindows
protected boolean isWindows -
pixelmask4
protected final int[] pixelmask4 -
pixelmask8
protected final int[] pixelmask8 -
copyMode
protected int copyMode -
QLmode
protected int QLmode -
xEnd
protected int xEnd -
yEnd
protected int yEnd
-
-
Constructor Details
-
Screen
public Screen(int xsize, int ysize, Monitor monitor, boolean isMac, boolean ddouble, int windowMode, boolean keyType) Creates the object - subclasses should always call this.- Parameters:
xsize
- screen x size in pixels.ysize
- screen y size in pixels.monitor
- the monitor running the emulation.isMac
-true
if we are running on a mac.ddouble
- true if double sized pixelswindowMode
- mode of window 0 = window , 1 = full size, 2 = special fullsizekeyType
- true if standard home etc keys
-
-
Method Details
-
screenPanelKeyTyped
Gets the key typed in theScreen
object to the Monitor object (and thus the emulation).- Parameters:
evt
- the key typed
-
screenPanelKeyPressed
Input some keys that aren't caught via the keyTyped method:- Cursor keys
- Function keys
- home, end, page up, page down
- pause, syst, stop
- ESC key (not caught under osx)
- Parameters:
evt
- the key event generated by the key typed.
-
screenPanelKeyReleased
When key is released, tell SMSQE via monitor object.- Parameters:
evt
- the key event of the key released.
-
screenPanelMouseMoved
This is the method that catches the mouse movement and sends it to the emulator via the monitor object.- Parameters:
evt
- the mouse event
-
setMousePosition
public boolean setMousePosition(int x, int y) Sets a new mouse position if that has changed from within SMSQ/E.- Parameters:
x
- the new x position, relative to the screen object.y
- same for y.- Returns:
- true if the screen is in double sized mode.
-
getMyMousePosition
Get the last recorded mouse position.- Returns:
- the last recorded mouse position.
-
screenPanelMouseEntered
When mouse enters the emulated screen, this makes normal host OS mouse cursor "disappear". The cursor is replaced by an invisible one.- Parameters:
evt
- ignored
-
screenPanelMouseExited
Sets the mouse cursor back to normal when mouse leaves the emulated screen. (So that it can be seen on the menubar).- Parameters:
evt
- ignored
-
resetMouseButtons
public void resetMouseButtons()Resets the mouse buttons, as if no mouse button was pressed. -
screenPanelMousePressed
Handles mouse presses on the emulated screen - send mouse button pressed to SMSQ/E.- Parameters:
evt
- ignored
-
screenPanelMouseReleased
Handles mouse button releases on the emulated screen - send mouse button released to SMSQE.- Parameters:
evt
- ignored
-
setIsMac
public void setIsMac(boolean im) Sets whether this screen is run under a mac.- Parameters:
im
-true
if this is run under a mac.
-
setIsWindows
public void setIsWindows(boolean im) Sets whether this screen is run under windows- Parameters:
im
-true
if this is run under windows.
-
setMonitor
Sets the Monitor object for this.- Parameters:
m
- the new Monitor.
-
setMouseClickDelay
public void setMouseClickDelay(int delay) Sets the delay after a mouse click.- Parameters:
delay
- delay in milliseconds.
-
writeByteToScreen
public abstract void writeByteToScreen(int address, int value, int wordValue) Writes a byte to the screen, and paints the corresponding pixel on the screen.- Parameters:
address
- where to write to. This is the SMSQE address, where it thinks video memory lies. It has already been checked that the address is in my memory space.value
- the value to write.wordValue
- the value to write into the word this byte is part of
-
writeWordToScreen
public abstract void writeWordToScreen(int addr, int value) Writes a word to the screen, and paints the corresponding pixel on the screen.- Parameters:
addr
- the address where to write to. It is presumed that it has been checked that this is in screen mem.value
- the value to write to screen mem.
-
writeLongToScreen
public abstract void writeLongToScreen(int addr, int value) Writes a long word to the screen, and paints the corresponding pixel on the screen.- Parameters:
addr
- where to write to.value
- the value.
-
xorBlock
Xors a block with colour : this updates the "screen memory" (vrambuffer) AND the underlying image. Implemented in modes 16 and 32.- Parameters:
cpu
- the CPu used.resolveStipple
- true if colours must be derived from stipple.
-
fillBlock
Fills a block with colour : this updates the "screen memory" (vrambuffer) AND the underlying image. Implemented in modes 16 and 32.- Parameters:
cpu
- the CPU used.resolveStipple
- true if colours must be derived from stipple.
-
moveBlock
This is called when a block of memory was copied to the vram.. It must copy the data from the vram into the image.- Parameters:
cpu
- the CPU used.copyFromScreen
- = true if the source is also the screen. d1 c s size of section to move (x :pixels | y :lines) a pixel may take a variable amount of bytes d2 c s old origin in source area d3 c s new origin in destination area d4 s scratch d5 s scratch d6/d7 preserved a0/a1 preserved a2 c row increment of source area a3 c row increment of destination area a4 c base address of source area a5 c base address of destination area a6/a7 preserved
-
combineBlocks
This combines two blocks (source 1, source2) with alpha blending and puts the result into the screen. The destination must be the screen: this MUST have been checked before this method is called. Source2 must have a row increment of destination row increment + 4.- Parameters:
cpu
- the CPU used. d0 s ? / some arbitrary value d1 c s size of section to move / scratch d2 c s old origin in source area1 / scratch d3 c s new origin in destination area / scratch d4 c s d5 s scratch d6 c alpha / preserved d7 preserved a1 c s base address of source area2 / scratch a2 c s row increment of source area1 / scratch a3 c s row increment of destination area / scratch a4 c s base address of source area1 / scratch a5 c s base address of destination area / scratch a6/a7 preserved
-
displayRegion
Displays a region if bytes were loaded directly to the screen memory. Used from CPU.- Parameters:
cpu
- .start
- where the bytes were loaded to.nbrOfBytes
- how many bytes were loaded.
-
setVramBase
public abstract void setVramBase(int vrambase) Sets the new Vrambase or the screen buffer if we are in QL compatible mode (this implies that the CPU or its memory changed). Adjust vramtop accordingly. If this is a Ql screen, sets the vram object- Parameters:
vrambase
- the "video ram" base.
-
setVibrantColours
public abstract void setVibrantColours(boolean bright, char[] vram) Sets whether brighter colours should be used.- Parameters:
bright
-true
if brighter colours should be used.vram
- te array containing the "vram".
-
getScreenSizeInBytes
public abstract int getScreenSizeInBytes()Gets size, in bytes, of the vram.- Returns:
- screen size, in number of bytes.
-
isQLScreen
public abstract boolean isQLScreen()Checks whether this is a QL type screen- Returns:
- true if this is a QL screen (512*256 i mode 4, 256*256 in mode 8), else false
-
setColourMode
public void setColourMode(int mode) Sets the screen mode when in Ql compatible mode. Is only overriden by screen0.- Parameters:
mode
- 0 for mode 4 ,8 for mode 8,
-
setEmuColourMode
public void setEmuColourMode(int mode) Sets the screen mode for a QL emulated screen (subtly different from the above). ATM only modes 4 and 8 are supported.- Parameters:
mode
- 0 for mode 4 ,8 for mode 8
-
setQLEmulationMode
public final void setQLEmulationMode(int mode) Sets the mode the emulated QL screen is supposed to be in when copying it in higher screen modes.- Parameters:
mode
- the QL mode (mode 4 = 0 or mode 8=8)
-
getDivisor
public int getDivisor()Gets the divisor necessary for moving memory about.- Returns:
- the divisor.
-
isVibrantColours
public boolean isVibrantColours()Shows whether "vibrant colours" were turned on or not.- Returns:
true
if yes.
-
getScreenBase
public final int getScreenBase()Gets the first address of screen memory.- Returns:
- the first address of screen memory.
-
getScreenTop
public final int getScreenTop()Gets the last address of screen memory.- Returns:
- the last address of screen memory.
-
getXSize
public final int getXSize()Gets the x resolution in pixels.- Returns:
- the x resolution (width) in pixels.
-
getYSize
public final int getYSize()Gets the y resolution in pixels.- Returns:
- the y resolution (height) in pixels.
-
getLineSize
public final int getLineSize()Gets the number of bytes per line in high colour mode.- Returns:
- the size of the line in number of bytes per line (this obny makes sens for high colour modes)
-
getColourMode
public final int getColourMode()Gets the current screen mode.- Returns:
- the current screen colour mode 0, 8 or 32
-
getPreferredSize
Gets the preferred size of this object, which is that of the underlying image.- Overrides:
getPreferredSize
in classJComponent
- Returns:
- the java.awt.Dimension with the size.
-
getImageSize
Gets the SMSQE pixel size of the screen, which is that of the underlying image.- Returns:
- the java.awt.Dimension with the size.
-
changeDoubleSize
public final void changeDoubleSize()Changes the double sized status of this screen (a pixel is doubled in every dimension). -
mouseInScreen
public boolean mouseInScreen()Gets whether mouse is in this screen.- Returns:
- true only if mouse is in this screen.
-
getMonitor
Gets the monitor this screen is attached to.- Returns:
- the monitor this screen is attached to.
-
paintComponent
Paints the component. This refills the screen with the image. The data for the image will have been changed by the writeXxxToScreen and move block routines above.- Overrides:
paintComponent
in classJComponent
- Parameters:
g
- thejava.awt.Graphics
object to draw on.
-
fillScreen
Fills the screen with a certain colour. Note this doesn't set the "screen memory" to that colour!- Parameters:
c
- thejava.awt.Color
to fill the screen with.
-
fillScreen
public final void fillScreen(int newRGB) Fills the visible screen with a certain colour. Note this doesn't set the "screen memory" to that colour!- Parameters:
newRGB
- the int (RGB) to fill the screen with.
-
setFullSize
public final void setFullSize(boolean full) Sets whether screen should be full size. If yes, it also covers the task bar.- Parameters:
full
- true if screen should be fullsize.
-
copyScreen
Copies a word's worth of pixels from the original QL screen to this screen. These will be either 8 pixels (in mode 4) or 4 pixels (in mode 8).- Parameters:
cpu
- the CPU from which to get the data.addr
- where in QL screen the pixels go.value
- the colour of the pixels.
-
setPixels
protected void setPixels(int x, int y, int value, int Qlmode) Sets the colours of a QL screen mode word's worth of pixels. This sets either 8 pixels (QL mode 4) or 4 pixels (Ql mode 8).- Parameters:
x
- x coordinate of 1st pixel.y
- y coordinate of 1st pixel.value
- the word containing the colours to set the pixels to, in QL mode 8 or 4.Qlmode
- the QL colour mode (must be 0 or 8).
-
setDisplayRegion
public final void setDisplayRegion(int address, int nbrOfBytes, char[] mem) Copies a block of screen memory from an original QL screen to this screen, converting the colours. Used by CPUforScreenEmulation.- Parameters:
address
- start address of block in the screen memory.nbrOfBytes
- nbr of bytes to treat.mem
- the array with the "vram". the values in there correspond to QL mode colours.
-
setMousewheelAccel
public void setMousewheelAccel(int mse) Sets the mousewheel acceleration, ie how many arrow key chars are input for one mouse wheel movement.- Parameters:
mse
- the mousewheel acceleration,
-
getKeysType
public boolean getKeysType()- Returns:
- the isPCType
-
setKeysType
public void setKeysType(boolean keyType) - Parameters:
keyType
- whether home etc keys are standard or not
-
getSizeInBytes
public static int getSizeInBytes(int xsize, int ysize, int colourMode) Gets the number of bytes in each screen mode (except for mode 0 where it's false).- Parameters:
xsize
-ysize
-colourMode
-- Returns:
-
isDoubleSize
public final boolean isDoubleSize() -
setEndPositions
Set where the window ends, in screen pixels.- Parameters:
p
- x and y end position
-