From: Carsten W. <ca...@us...> - 2006-12-12 13:02:29
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24986/src/jake2/render Modified Files: JoglRenderer.java Log Message: simplifies the callback parameters (final values) Index: JoglRenderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/JoglRenderer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** JoglRenderer.java 22 Nov 2006 15:05:39 -0000 1.9 --- JoglRenderer.java 12 Dec 2006 13:02:25 -0000 1.10 *************** *** 66,70 **** private boolean post_init = false; ! /** * @see jake2.client.refexport_t#Init() */ --- 66,71 ---- private boolean post_init = false; ! ! /** * @see jake2.client.refexport_t#Init() */ *************** *** 94,194 **** * @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(JoglRenderer.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() { ! JoglRenderer.this.model = impl.R_RegisterModel(JoglRenderer.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() { ! JoglRenderer.this.image = impl.R_RegisterSkin(JoglRenderer.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() { ! JoglRenderer.this.image = impl.Draw_FindPic(JoglRenderer.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(JoglRenderer.this.name, JoglRenderer.this.rotate, JoglRenderer.this.axis); - } - }); } --- 95,175 ---- * @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() { ! JoglRenderer.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() { ! JoglRenderer.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() { ! JoglRenderer.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); ! } ! }); } } *************** *** 199,210 **** if (contextInUse) { impl.R_EndRegistration(); ! return; } - - updateScreen(new xcommand_t() { - public void execute() { - impl.R_EndRegistration(); - } - }); } --- 180,190 ---- if (contextInUse) { impl.R_EndRegistration(); ! } else { ! updateScreen(new xcommand_t() { ! public void execute() { ! impl.R_EndRegistration(); ! } ! }); } } *************** *** 237,260 **** } - 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(JoglRenderer.this.x, JoglRenderer.this.y, JoglRenderer.this.num); - } - }); } --- 217,233 ---- } /** * @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); ! } ! }); } } *************** *** 315,319 **** } ! public void screenshot() { if (contextInUse) { impl.GL_ScreenShot_f(); --- 288,292 ---- } ! public void screenshot() { if (contextInUse) { impl.GL_ScreenShot_f(); *************** *** 325,330 **** }); } ! ! } public int apiVersion() { --- 298,302 ---- }); } ! } public int apiVersion() { |