aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2
diff options
context:
space:
mode:
Diffstat (limited to 'src/jake2')
-rw-r--r--src/jake2/render/Jsr231cbRenderer.java153
1 files changed, 63 insertions, 90 deletions
diff --git a/src/jake2/render/Jsr231cbRenderer.java b/src/jake2/render/Jsr231cbRenderer.java
index e57c194..1990191 100644
--- a/src/jake2/render/Jsr231cbRenderer.java
+++ b/src/jake2/render/Jsr231cbRenderer.java
@@ -66,7 +66,8 @@ final class Jsr231cbRenderer extends Jsr231cbDriver implements refexport_t, Ref
private boolean post_init = false;
-/**
+
+ /**
* @see jake2.client.refexport_t#Init()
*/
public boolean Init(int vid_xpos, int vid_ypos) {
@@ -94,103 +95,84 @@ final class Jsr231cbRenderer extends Jsr231cbDriver implements refexport_t, Ref
/**
* @see jake2.client.refexport_t#BeginRegistration(java.lang.String)
*/
- public void BeginRegistration(String map) {
+ public void BeginRegistration(final String map) {
if (contextInUse) {
impl.R_BeginRegistration(map);
- return;
+ } else {
+ updateScreen(new xcommand_t() {
+ public void execute() {
+ impl.R_BeginRegistration(map);
+ }
+ });
}
-
- 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)
+ public model_t RegisterModel(final 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;
+ } 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(String name) {
- if (contextInUse)
+ public image_t RegisterSkin(final 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;
+ } else {
+ updateScreen(new xcommand_t() {
+ public void execute() {
+ Jsr231cbRenderer.this.image = impl.R_RegisterSkin(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)
+ public image_t RegisterPic(final 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;
+ } else {
+ updateScreen(new xcommand_t() {
+ public void execute() {
+ Jsr231cbRenderer.this.image = impl.Draw_FindPic(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) {
+ public void SetSky(final String name, final float rotate, final float[] axis) {
if (contextInUse) {
impl.R_SetSky(name, rotate, axis);
- return;
+ } else {
+ updateScreen(new xcommand_t() {
+ public void execute() {
+ impl.R_SetSky(name, rotate, axis);
+ }
+ });
}
-
- 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);
- }
- });
}
/**
@@ -199,14 +181,13 @@ final class Jsr231cbRenderer extends Jsr231cbDriver implements refexport_t, Ref
public void EndRegistration() {
if (contextInUse) {
impl.R_EndRegistration();
- return;
+ } else {
+ updateScreen(new xcommand_t() {
+ public void execute() {
+ impl.R_EndRegistration();
+ }
+ });
}
-
- updateScreen(new xcommand_t() {
- public void execute() {
- impl.R_EndRegistration();
- }
- });
}
/**
@@ -237,26 +218,19 @@ final class Jsr231cbRenderer extends Jsr231cbDriver implements refexport_t, Ref
impl.Draw_StretchPic(x, y, w, h, name);
}
- private int x, y, num;
-
/**
* @see jake2.client.refexport_t#DrawChar(int, int, int)
*/
- public void DrawChar(int x, int y, int num) {
+ public void DrawChar(final int x, final int y, final int num) {
if (contextInUse) {
impl.Draw_Char(x, y, num);;
- return;
+ } else {
+ updateScreen(new xcommand_t() {
+ public void execute() {
+ impl.Draw_Char(x, y, num);
+ }
+ });
}
-
- 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);
- }
- });
}
/**
@@ -315,7 +289,7 @@ final class Jsr231cbRenderer extends Jsr231cbDriver implements refexport_t, Ref
appActivate(activate);
}
- public void screenshot() {
+ public void screenshot() {
if (contextInUse) {
impl.GL_ScreenShot_f();
} else {
@@ -325,8 +299,7 @@ final class Jsr231cbRenderer extends Jsr231cbDriver implements refexport_t, Ref
}
});
}
-
- }
+ }
public int apiVersion() {
return Defines.API_VERSION;