From: Carsten W. <ca...@us...> - 2006-12-12 12:54:21
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21802/src/jake2/render Modified Files: Jsr231cbRenderer.java Log Message: simplifies the callback parameters (final values) Index: Jsr231cbRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Jsr231cbRenderer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jsr231cbRenderer.java 11 Dec 2006 12:56:30 -0000 1.1 --- Jsr231cbRenderer.java 12 Dec 2006 12:54:16 -0000 1.2 *************** *** 67,71 **** private boolean post_init = false; ! /** * @see jake2.client.refexport_t#Init() */ --- 67,72 ---- private boolean post_init = false; ! ! /** * @see jake2.client.refexport_t#Init() */ *************** *** 95,195 **** * @see jake2.client.refexport_t#BeginRegistration(java.lang.String) */ ! public void BeginRegistration(String map) { if (contextInUse) { impl.R_BeginRegistration(map); ! return; } - - this.name = map; - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_BeginRegistration(Jsr231cbRenderer.this.name); - } - }); } private model_t model = null; - private String name = null; /** * @see jake2.client.refexport_t#RegisterModel(java.lang.String) */ ! public model_t RegisterModel(String name) { ! ! if (contextInUse) return impl.R_RegisterModel(name); ! ! model = null; ! this.name = name; ! ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.model = impl.R_RegisterModel(Jsr231cbRenderer.this.name); ! } ! }); ! return model; } /** * @see jake2.client.refexport_t#RegisterSkin(java.lang.String) */ ! public image_t RegisterSkin(String name) { ! if (contextInUse) return impl.R_RegisterSkin(name); ! ! this.image = null; ! this.name = name; ! ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.image = impl.R_RegisterSkin(Jsr231cbRenderer.this.name); ! } ! }); ! return image; } - private image_t image = null; - /** * @see jake2.client.refexport_t#RegisterPic(java.lang.String) */ ! public image_t RegisterPic(String name) { ! if (contextInUse) return impl.Draw_FindPic(name); ! ! this.image = null; ! this.name = name; ! ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.image = impl.Draw_FindPic(Jsr231cbRenderer.this.name); ! } ! }); ! return image; } - private float[] axis; - private float rotate; - /** * @see jake2.client.refexport_t#SetSky(java.lang.String, float, float[]) */ ! public void SetSky(String name, float rotate, float[] axis) { if (contextInUse) { impl.R_SetSky(name, rotate, axis); ! return; } - - this.name = name; - this.rotate = rotate; - this.axis = axis; - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_SetSky(Jsr231cbRenderer.this.name, Jsr231cbRenderer.this.rotate, Jsr231cbRenderer.this.axis); - } - }); } --- 96,177 ---- * @see jake2.client.refexport_t#BeginRegistration(java.lang.String) */ ! public void BeginRegistration(final String map) { if (contextInUse) { impl.R_BeginRegistration(map); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_BeginRegistration(map); ! } ! }); } } private model_t model = null; /** * @see jake2.client.refexport_t#RegisterModel(java.lang.String) */ ! public model_t RegisterModel(final String name) { ! if (contextInUse) { return impl.R_RegisterModel(name); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.model = impl.R_RegisterModel(name); ! } ! }); ! return model; ! } } + private image_t image = null; + /** * @see jake2.client.refexport_t#RegisterSkin(java.lang.String) */ ! public image_t RegisterSkin(final String name) { ! if (contextInUse) { return impl.R_RegisterSkin(name); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.image = impl.R_RegisterSkin(name); ! } ! }); ! return image; ! } } /** * @see jake2.client.refexport_t#RegisterPic(java.lang.String) */ ! public image_t RegisterPic(final String name) { ! if (contextInUse) { return impl.Draw_FindPic(name); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! Jsr231cbRenderer.this.image = impl.Draw_FindPic(name); ! } ! }); ! return image; ! } } /** * @see jake2.client.refexport_t#SetSky(java.lang.String, float, float[]) */ ! public void SetSky(final String name, final float rotate, final float[] axis) { if (contextInUse) { impl.R_SetSky(name, rotate, axis); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_SetSky(name, rotate, axis); ! } ! }); } } *************** *** 200,211 **** if (contextInUse) { impl.R_EndRegistration(); ! return; } - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_EndRegistration(); - } - }); } --- 182,192 ---- if (contextInUse) { impl.R_EndRegistration(); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_EndRegistration(); ! } ! }); } } *************** *** 238,261 **** } - private int x, y, num; - /** * @see jake2.client.refexport_t#DrawChar(int, int, int) */ ! public void DrawChar(int x, int y, int num) { if (contextInUse) { impl.Draw_Char(x, y, num);; ! return; } - - this.x = x; - this.y = y; - this.num = num; - - updateScreen(new xcommand_t() { - public void execute() { - impl.Draw_Char(Jsr231cbRenderer.this.x, Jsr231cbRenderer.this.y, Jsr231cbRenderer.this.num); - } - }); } --- 219,235 ---- } /** * @see jake2.client.refexport_t#DrawChar(int, int, int) */ ! public void DrawChar(final int x, final int y, final int num) { if (contextInUse) { impl.Draw_Char(x, y, num);; ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.Draw_Char(x, y, num); ! } ! }); } } *************** *** 316,320 **** } ! public void screenshot() { if (contextInUse) { impl.GL_ScreenShot_f(); --- 290,294 ---- } ! public void screenshot() { if (contextInUse) { impl.GL_ScreenShot_f(); *************** *** 326,331 **** }); } ! ! } public int apiVersion() { --- 300,304 ---- }); } ! } public int apiVersion() { |