📄 pathgame.java
字号:
static final short PA_BIT_NW = 0x09;
static final short PA_BIT_NS = 0x05;
static final short PA_BIT_WE = 0x0A;
static final short PA_BIT_NUM_MASK = 0x10;
static final short PA_BIT_MINNUM = 0x10;
static final short PA_BIT_1 = 0x11;
static final short PA_BIT_2 = 18;
static final short PA_BIT_3 = 19;
static final short PA_BIT_4 = 20;
static final short PA_BIT_5 = 21;
static final short PA_BIT_6 = 22;
static final short PA_BIT_7 = 23;
static final short PA_BIT_8 = 24;
static final short PA_BIT_9 = 25;
static final short PA_BIT_MAX = 0x1A;
static final short PA_BIT_CUR = 11;
static final short PA_BIT_HH = 12;
static final short PA_BIT_VV = 13;
static final short PA_BIT_NES = 0x07;
static final short PA_BIT_WNE = 0x0B;
static final short PA_BIT_SWN = 0x0D;
static final short PA_BIT_ESW = 0x0E;
static final short PA_BIT_DIR_MASK = 0x1F;
static final short PA_BIT_ERROR = 0x1F;
class
PA_pair_t {
public short p1;
public short p2;
}
class
PA_cell_t {
public short n;
public short p;
}
class
PA_board_t {
public static final int NUMBER_OF_CELLS = (( 101 / (9) )*( 80 / (9) ));
public PA_board_t() {
for(int i=0; i<NUMBER_OF_CELLS; i++)
c[i] = new PA_cell_t();
}
public short w;
public short h;
public PA_cell_t c[ ] = new PA_cell_t [ NUMBER_OF_CELLS ];
}
class
PA_undo_t {
public short x0,
y0,
x1,
y1;
public short p[] = new short [9];
}
class
PA_state_t {
public short from_x;
public short from_y;
public short to_x;
public short to_y;
public short from_mask;
public short to_mask;
public short from_n;
public short to_n;
public short from_p;
public short to_p;
public short from_path;
public short to_path;
public boolean pen;
}
/* enum PA_nv_state_t */
static final short pa_factoryreset = 0;
static final short pa_finish = 1;
static final short pa_cont = 2;
class
PA_NV_Data_t implements GameSaveable {
public short level_next[ ] = new short [ (5) ];
public short state;
public int cont;
public short pos;
public boolean pen;
public boolean selected;
public short board[ ] = new short [ (( (( 101 / (9) )*( 80 / (9) )) +1)/2) ];
public int options;
public int total_score;
public GAPI_HighscoreEntry_t highscore = new GAPI_HighscoreEntry_t();
public void serialize( DataOutputStream dos ) throws IOException {
for(int i = 0; i<(5) ; i++)
dos.writeShort(level_next[i]);
dos.writeShort(state);
dos.writeInt(cont);
dos.writeShort(pos);
dos.writeBoolean(pen);
dos.writeBoolean(selected);
for(int i = 0; i<(( (( 101 / (9) )*( 80 / (9) )) +1)/2) ; i++)
dos.writeShort(board[i]);
dos.writeInt(options);
dos.writeInt(total_score);
highscore.serialize(dos);
}
public void unSerialize( DataInputStream dis ) throws IOException {
for(int i = 0; i<(5) ; i++)
level_next[i] = dis.readShort();
state = dis.readShort();
cont = dis.readInt();
pos = dis.readShort();
pen = dis.readBoolean();
selected = dis.readBoolean();
for(int i = 0; i<(( (( 101 / (9) )*( 80 / (9) )) +1)/2) ; i++)
board[i] = dis.readShort();
options = dis.readInt();
total_score = dis.readInt();
highscore.unSerialize(dis);
}
}
class
PA_globals_t {
public PA_globals_t() {
undo[0] = new PA_undo_t();
undo[1] = new PA_undo_t();
}
public short flag;
public PA_state_t state = new PA_state_t();
public GAMenuSelectObject_t settings;
public short mirror;
public int selected;
public short[] desk;
public PA_board_t board = new PA_board_t();
public int bitmap_s;
public short bitmap_x;
public short bitmap_y;
public short bitmap_px;
public short bitmap_py;
public short bitmap_pxm;
public short bitmap_pym;
public short bitmap_cx;
public short bitmap_cy;
public short display_x0;
public short display_y0;
public short pos_x;
public short pos_y;
public short undo_n;
public short undo_ptr;
public PA_undo_t undo[] = new PA_undo_t [2];
public short splash_i;
}
/* extern final char *final desk[ ] = new char [ ( (36) + (58) + (62) + (54) + (40) ) + 1]; */
/* extern void PA_SplashscreenInit(); */
/* extern boolean PA_SplashscreenEvent(GAEvent e); */
/* extern void PA_SplashscreenStop(); */
/* extern boolean PA_GetPen(); */
/* extern void PA_SetPen(boolean to); */
/* extern boolean PA_isInvalidStep(); */
/* extern boolean PA_isBackStep(); */
/* extern boolean PA_isConnected(); */
/* extern boolean PA_Bound(short x,
short y); */
/* extern short PA_Path(short x,
short y); */
/* extern void PA_Mirror(short * x,
short * y); */
/* extern boolean PA_isFinished(); */
/* extern short PA_SelLevel2Linear(); */
/* extern void PA_Beep(); */
/* extern void PA_BeepConnect(); */
/* extern void PA_HighscoreInit(); */
/* extern void PA_HighscoreStart(); */
/* extern boolean PA_HighscoreEvent(GAEvent Event_p); */
/* extern void PA_Reset(); */
/* extern short PA_desk2level(short desk); */
/* extern short PA_selected2level(); */
/* extern void PA_Reload(); */
/* extern void PA_DrawPath(short x,
short y); */
/* extern void PA_DrawCursor(); */
/* extern void PA_DrawCell(short x,
short y); */
/* extern void PA_Refresh(); */
/* extern void PA_Redraw(); */
/* extern void PA_Initialize(); */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -