de.farafin.snEADy.control
Class M_GraphixEngineUI
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
de.farafin.snEADy.control.M_GraphixEngineUI
- All Implemented Interfaces:
- I_Constants, I_Control_interface, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
public class M_GraphixEngineUI
- extends java.awt.Frame
- implements I_Control_interface, I_Constants
- Version:
- $Revision: 1.62 $
- Author:
- larsonmars
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface de.farafin.snEADy.communication.I_Constants |
analyse_ms, auto_grow_delay, auto_slowdown_delay, commandConstants, damage_length_grow, damage_points_radius, DEBUG, delplayer, emergencyPause, exit_time, FACE_EAST, FACE_NORTH, FACE_SOUTH, FACE_WEST, goody_length_occ, goody_length_value, goody_points_occ, goody_points_value, goody_slowdown_occ, goody_speed_occ, IN_ACTION, IN_ERROR_EXC, IN_ERROR_INIT, IN_ERROR_SPACE, IN_ERROR_TIME, IN_EXIT, IN_HEAVEN, init_length, init_move_delay, kill, kill_point_goodies, kill_points_radius, loadhuman, loadlevel, loadplayer, logging, max_goody_occ_delay, MAX_HUMAN_PLAYERS, max_mem_check_delay, max_move_delay, max_player_mem, MAX_PLAYERS, max_timeout_ms, min_move_delay, min_timeout_ms, overalldelay, pause, print_calc_ms, print_parameter, print_player_mem, print_playfield, quit, run, show_subcycles, start, stop, suddend_time, survival_points, thinking_ms, TURN_LEFT, TURN_NONE, TURN_RIGHT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary |
void |
beep()
|
void |
beep(int i)
|
void |
beep(java.lang.String str)
|
private java.awt.image.VolatileImage |
createBackBufferVI(int width,
int height)
|
private void |
drawBitmapString(java.lang.String str,
int x,
int y,
int GFONT,
java.awt.Graphics g,
char alligm,
int MODE)
|
private boolean |
drawGameImageToBackbuffer(java.awt.image.VolatileImage destVImg,
int imageID,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2)
|
private void |
drawMenuElements(java.awt.Graphics g,
D_GameInfo gameInfo)
|
private void |
drawPlayerTab(boolean[] drawArray)
|
private void |
drawVImg(int imageID,
java.awt.Graphics g)
|
private void |
getVImgFromImg(java.awt.image.VolatileImage destVImg,
java.awt.Image srcImg)
|
private boolean |
loadImages()
|
void |
paint(java.awt.Graphics g)
|
void |
setActive(boolean active)
|
private void |
setupCommandFrame()
|
private void |
setupFileSelectorArena()
|
private void |
setupFileSelectorPlayer()
|
void |
update(D_GameInfo gameInfo,
C_Human[] humanPlayer)
|
private void |
updateGraphics()
|
private void |
updatePlayer(D_GameInfo gameInfo)
|
private void |
updatePlayerTab(D_GameInfo gameInfo)
|
private void |
updateTexts(D_GameInfo gameInfo,
java.awt.Graphics g)
|
Methods inherited from class java.awt.Frame |
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
C_NOTHING
public static final char C_NOTHING
- See Also:
- Constant Field Values
C_WALL
public static final char C_WALL
- See Also:
- Constant Field Values
C_FLOOR
public static final char C_FLOOR
- See Also:
- Constant Field Values
C_EXIT
public static final char C_EXIT
- See Also:
- Constant Field Values
C_WALL_S
public static final char C_WALL_S
- See Also:
- Constant Field Values
C_WALLCORNER_NW_CC
public static final char C_WALLCORNER_NW_CC
- See Also:
- Constant Field Values
C_WALLCORNER_NW_CV
public static final char C_WALLCORNER_NW_CV
- See Also:
- Constant Field Values
C_WALLCORNER_N
public static final char C_WALLCORNER_N
- See Also:
- Constant Field Values
C_WALLCORNER_NE_CC
public static final char C_WALLCORNER_NE_CC
- See Also:
- Constant Field Values
C_WALLCORNER_NE_CV
public static final char C_WALLCORNER_NE_CV
- See Also:
- Constant Field Values
C_WALLCORNER_E
public static final char C_WALLCORNER_E
- See Also:
- Constant Field Values
C_WALLCORNER_SE_CC
public static final char C_WALLCORNER_SE_CC
- See Also:
- Constant Field Values
C_WALLCORNER_SE_CV
public static final char C_WALLCORNER_SE_CV
- See Also:
- Constant Field Values
C_WALLCORNER_S
public static final char C_WALLCORNER_S
- See Also:
- Constant Field Values
C_WALLCORNER_SW_CC
public static final char C_WALLCORNER_SW_CC
- See Also:
- Constant Field Values
C_WALLCORNER_SW_CV
public static final char C_WALLCORNER_SW_CV
- See Also:
- Constant Field Values
C_WALLCORNER_W
public static final char C_WALLCORNER_W
- See Also:
- Constant Field Values
C_WALL_E
public static final char C_WALL_E
- See Also:
- Constant Field Values
C_PLAYERH_S
public static final char C_PLAYERH_S
- See Also:
- Constant Field Values
C_PLAYERH01
public static final char C_PLAYERH01
- See Also:
- Constant Field Values
C_PLAYERH02
public static final char C_PLAYERH02
- See Also:
- Constant Field Values
C_PLAYERH03
public static final char C_PLAYERH03
- See Also:
- Constant Field Values
C_PLAYERH04
public static final char C_PLAYERH04
- See Also:
- Constant Field Values
C_PLAYERH05
public static final char C_PLAYERH05
- See Also:
- Constant Field Values
C_PLAYERH06
public static final char C_PLAYERH06
- See Also:
- Constant Field Values
C_PLAYERH07
public static final char C_PLAYERH07
- See Also:
- Constant Field Values
C_PLAYERH08
public static final char C_PLAYERH08
- See Also:
- Constant Field Values
C_PLAYERH09
public static final char C_PLAYERH09
- See Also:
- Constant Field Values
C_PLAYERH10
public static final char C_PLAYERH10
- See Also:
- Constant Field Values
C_PLAYERH_E
public static final char C_PLAYERH_E
- See Also:
- Constant Field Values
C_EXITO
public static final char C_EXITO
- See Also:
- Constant Field Values
C_PLAYER_S
public static final char C_PLAYER_S
- See Also:
- Constant Field Values
C_PLAYER01
public static final char C_PLAYER01
- See Also:
- Constant Field Values
C_PLAYER02
public static final char C_PLAYER02
- See Also:
- Constant Field Values
C_PLAYER03
public static final char C_PLAYER03
- See Also:
- Constant Field Values
C_PLAYER04
public static final char C_PLAYER04
- See Also:
- Constant Field Values
C_PLAYER05
public static final char C_PLAYER05
- See Also:
- Constant Field Values
C_PLAYER06
public static final char C_PLAYER06
- See Also:
- Constant Field Values
C_PLAYER07
public static final char C_PLAYER07
- See Also:
- Constant Field Values
C_PLAYER08
public static final char C_PLAYER08
- See Also:
- Constant Field Values
C_PLAYER09
public static final char C_PLAYER09
- See Also:
- Constant Field Values
C_PLAYER10
public static final char C_PLAYER10
- See Also:
- Constant Field Values
C_PLAYER_E
public static final char C_PLAYER_E
- See Also:
- Constant Field Values
C_GOODY_S
public static final char C_GOODY_S
- See Also:
- Constant Field Values
C_GOODY_SPEED
public static final char C_GOODY_SPEED
- See Also:
- Constant Field Values
C_GOODY_LENGTH
public static final char C_GOODY_LENGTH
- See Also:
- Constant Field Values
C_GOODY_POINTS
public static final char C_GOODY_POINTS
- See Also:
- Constant Field Values
C_GOODY_E
public static final char C_GOODY_E
- See Also:
- Constant Field Values
C_UNKNOWN
public static final char C_UNKNOWN
- See Also:
- Constant Field Values
C_END
public static final char C_END
- See Also:
- Constant Field Values
M_BG
private static final char M_BG
- See Also:
- Constant Field Values
M_TABOPEN
private static final char M_TABOPEN
- See Also:
- Constant Field Values
M_TABCLOSE
private static final char M_TABCLOSE
- See Also:
- Constant Field Values
M_FONTSERP8X14
private static final char M_FONTSERP8X14
- See Also:
- Constant Field Values
M_VOLATILE_END
private static final char M_VOLATILE_END
- See Also:
- Constant Field Values
M_BUTTRUN
private static final char M_BUTTRUN
- See Also:
- Constant Field Values
M_BUTTSTOP
private static final char M_BUTTSTOP
- See Also:
- Constant Field Values
M_BUTTQUIT
private static final char M_BUTTQUIT
- See Also:
- Constant Field Values
M_BUTTMIN
private static final char M_BUTTMIN
- See Also:
- Constant Field Values
M_BUTTARENA
private static final char M_BUTTARENA
- See Also:
- Constant Field Values
M_BUTTPLAYER
private static final char M_BUTTPLAYER
- See Also:
- Constant Field Values
M_BUTTOPTIONS
private static final char M_BUTTOPTIONS
- See Also:
- Constant Field Values
M_BUTTRMPLAYER
private static final char M_BUTTRMPLAYER
- See Also:
- Constant Field Values
S_BG
private static final char S_BG
- See Also:
- Constant Field Values
S_BUTTLOAD
private static final char S_BUTTLOAD
- See Also:
- Constant Field Values
S_BUTTQUIT
private static final char S_BUTTQUIT
- See Also:
- Constant Field Values
S_BUTTMIN
private static final char S_BUTTMIN
- See Also:
- Constant Field Values
S_VSCROLLBUTT
private static final char S_VSCROLLBUTT
- See Also:
- Constant Field Values
S_VSCROLL
private static final char S_VSCROLL
- See Also:
- Constant Field Values
S_TITLEARENA
private static final char S_TITLEARENA
- See Also:
- Constant Field Values
S_TITLEPLAYER
private static final char S_TITLEPLAYER
- See Also:
- Constant Field Values
UIGRAPHIX_END
private static final char UIGRAPHIX_END
- See Also:
- Constant Field Values
F_NORMAL
private static final int F_NORMAL
- See Also:
- Constant Field Values
F_INACTIVE
private static final int F_INACTIVE
- See Also:
- Constant Field Values
F_RED
private static final int F_RED
- See Also:
- Constant Field Values
F_GREEN
private static final int F_GREEN
- See Also:
- Constant Field Values
F_MARKED
private static final int F_MARKED
- See Also:
- Constant Field Values
FIELDELEMSIZE
public static final int FIELDELEMSIZE
- See Also:
- Constant Field Values
ARENAMAXSIZE
public static final int ARENAMAXSIZE
- See Also:
- Constant Field Values
mdx
private int mdx
mdy
private int mdy
MONSTARTX
private static final int MONSTARTX
- See Also:
- Constant Field Values
MONSTARTY
private static final int MONSTARTY
- See Also:
- Constant Field Values
MAXFRAMECOUNT
private static final int MAXFRAMECOUNT
- See Also:
- Constant Field Values
frameC
private int frameC
lastTime
private long lastTime
fps
private float fps
oldGameInfo
D_GameInfo oldGameInfo
version
private int version
main
private I_Main_interface main
humans
private C_Human[] humans
humanPlayerC
private int humanPlayerC
humanPlayerKeyL
private static final int[] humanPlayerKeyL
humanPlayerKeyU
private static final int[] humanPlayerKeyU
humanPlayerKeyR
private static final int[] humanPlayerKeyR
humanPlayerKeyD
private static final int[] humanPlayerKeyD
gameImageFiles
private java.io.File[] gameImageFiles
menuImageFiles
private java.io.File[] menuImageFiles
gc
private java.awt.GraphicsConfiguration gc
gameImagesO
private java.awt.image.BufferedImage[] gameImagesO
menuImagesO
private java.awt.image.BufferedImage[] menuImagesO
gameImages
private java.awt.image.VolatileImage[] gameImages
menuImages
private java.awt.image.VolatileImage[] menuImages
img_arena
private java.awt.image.VolatileImage img_arena
gr_arena
private java.awt.Graphics gr_arena
img_pTab
private java.awt.image.VolatileImage[] img_pTab
img_tab
private java.awt.image.VolatileImage[] img_tab
gr_tab
java.awt.Graphics[] gr_tab
monPosX
private int monPosX
monPosY
private int monPosY
monWidth
private int monWidth
monHeight
private int monHeight
arena
private M_GraphixEngineUI.Gr_Arena[] arena
actArena
private int actArena
diff
private M_GraphixEngineUI.Gr_DiffArena diff
last_killPoints
private int[] last_killPoints
m_length
private int[] m_length
m_killpoints
private int[] m_killpoints
m_cycles
private int[] m_cycles
m_name
private int[] m_name
lastPlayerC
private int lastPlayerC
playerOrd
private int[] playerOrd
root
private M_GraphixEngineUI root
actGraphics
private java.awt.Graphics actGraphics
butt_run
private M_GraphixEngineUI.GrButton butt_run
butt_stop
private M_GraphixEngineUI.GrButton butt_stop
butt_min
private M_GraphixEngineUI.GrButton butt_min
butt_quit
private M_GraphixEngineUI.GrButton butt_quit
butt_arena
private M_GraphixEngineUI.GrButton butt_arena
butt_player
private M_GraphixEngineUI.GrButton butt_player
butt_options
private M_GraphixEngineUI.GrButton butt_options
butt_rmPlayer
private M_GraphixEngineUI.GrButton[] butt_rmPlayer
commandFrame
private java.awt.Frame commandFrame
cf_text
private java.awt.TextField cf_text
cf_lab
private java.awt.Label cf_lab
arenaFS
private M_GraphixEngineUI.GrFileSelector arenaFS
playerFS
private M_GraphixEngineUI.GrFileSelector playerFS
MAXCOMMANDHIST
private static final int MAXCOMMANDHIST
- See Also:
- Constant Field Values
commandHist
private java.lang.String[] commandHist
selectedCommand
private int selectedCommand
lastInserted
private int lastInserted
debugMon
private C_DebugMonitor debugMon
M_GraphixEngineUI
public M_GraphixEngineUI(I_Main_interface calling,
C_DebugMonitor debMon,
int version)
- Creates a new instance of C_GraphixEngineUI
M_GraphixEngineUI
private M_GraphixEngineUI()
setupFileSelectorArena
private void setupFileSelectorArena()
setupFileSelectorPlayer
private void setupFileSelectorPlayer()
setupCommandFrame
private void setupCommandFrame()
loadImages
private boolean loadImages()
getVImgFromImg
private void getVImgFromImg(java.awt.image.VolatileImage destVImg,
java.awt.Image srcImg)
createBackBufferVI
private final java.awt.image.VolatileImage createBackBufferVI(int width,
int height)
drawGameImageToBackbuffer
private boolean drawGameImageToBackbuffer(java.awt.image.VolatileImage destVImg,
int imageID,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2)
updateGraphics
private void updateGraphics()
updateTexts
private void updateTexts(D_GameInfo gameInfo,
java.awt.Graphics g)
updatePlayer
private void updatePlayer(D_GameInfo gameInfo)
updatePlayerTab
private void updatePlayerTab(D_GameInfo gameInfo)
drawMenuElements
private void drawMenuElements(java.awt.Graphics g,
D_GameInfo gameInfo)
drawPlayerTab
private void drawPlayerTab(boolean[] drawArray)
drawBitmapString
private void drawBitmapString(java.lang.String str,
int x,
int y,
int GFONT,
java.awt.Graphics g,
char alligm,
int MODE)
drawVImg
private void drawVImg(int imageID,
java.awt.Graphics g)
paint
public void paint(java.awt.Graphics g)
- Overrides:
paint
in class java.awt.Container
setActive
public void setActive(boolean active)
- Specified by:
setActive
in interface I_Control_interface
- Parameters:
active
- decides wether the Control Class is able to send data
update
public void update(D_GameInfo gameInfo,
C_Human[] humanPlayer)
- Specified by:
update
in interface I_Control_interface
- Parameters:
gameInfo
- contains all data about the current gameInfohumanPlayer
- contains all data about the human players.
beep
public void beep()
beep
public void beep(java.lang.String str)
beep
public void beep(int i)