You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(52) |
Aug
(34) |
Sep
(99) |
Oct
(110) |
Nov
(21) |
Dec
(69) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(117) |
Feb
(90) |
Mar
(1) |
Apr
(22) |
May
(96) |
Jun
(25) |
Jul
(22) |
Aug
|
Sep
|
Oct
(18) |
Nov
(43) |
Dec
(71) |
2006 |
Jan
(20) |
Feb
(10) |
Mar
|
Apr
(4) |
May
(2) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(60) |
Nov
(63) |
Dec
(35) |
2007 |
Jan
(18) |
Feb
(40) |
Mar
(14) |
Apr
(18) |
May
(33) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
(25) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(15) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Holger Z. <hz...@us...> - 2005-01-12 12:14:37
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6887/src/jake2/game Modified Files: Monster.java GameSpawn.java GameUtil.java Log Message: small performance improvements Index: GameSpawn.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameSpawn.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GameSpawn.java 22 Sep 2004 19:22:05 -0000 1.9 --- GameSpawn.java 12 Jan 2005 12:14:17 -0000 1.10 *************** *** 350,354 **** if (key.equals("nextmap")) ! Com.p("nextmap: " + value); if (!GameBase.st.set(key, value)) if (!ent.set(key, value)) --- 350,354 ---- if (key.equals("nextmap")) ! Com.Println("nextmap: " + value); if (!GameBase.st.set(key, value)) if (!ent.set(key, value)) Index: Monster.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/Monster.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Monster.java 22 Sep 2004 19:22:06 -0000 1.4 --- Monster.java 12 Jan 2005 12:14:17 -0000 1.5 *************** *** 349,353 **** public boolean think(edict_t self) { if (self.index == 312) ! Com.p("monster_triggered_start"); self.solid = Defines.SOLID_NOT; self.movetype = Defines.MOVETYPE_NONE; --- 349,353 ---- public boolean think(edict_t self) { if (self.index == 312) ! Com.Printf("monster_triggered_start\n"); self.solid = Defines.SOLID_NOT; self.movetype = Defines.MOVETYPE_NONE; Index: GameUtil.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/GameUtil.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** GameUtil.java 22 Sep 2004 19:22:05 -0000 1.7 --- GameUtil.java 12 Jan 2005 12:14:17 -0000 1.8 *************** *** 829,833 **** return it; } ! Com.p("Item not found:" + pickup_name); return null; } --- 829,833 ---- return it; } ! Com.Println("Item not found:" + pickup_name); return null; } |
From: Holger Z. <hz...@us...> - 2005-01-12 09:16:30
|
Update of /cvsroot/jake2/jake2/webstart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3784/webstart Modified Files: jake2_jogl11.jnlp jake2_jogl11ATI.jnlp jake2.jnlp Log Message: default renderer and sound settings Index: jake2.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2.jnlp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** jake2.jnlp 3 Nov 2004 16:16:16 -0000 1.5 --- jake2.jnlp 12 Jan 2005 09:16:15 -0000 1.6 *************** *** 40,44 **** </resources> ! <application-desc main-class="jake2.Jake2"/> ! </jnlp> --- 40,51 ---- </resources> ! <application-desc main-class="jake2.Jake2"> ! <argument>+set</argument> ! <argument>vid_ref</argument> ! <argument>fastjogl</argument> ! <argument>+set</argument> ! <argument>s_impl</argument> ! <argument>joal</argument> ! </application-desc> ! </jnlp> Index: jake2_jogl11ATI.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_jogl11ATI.jnlp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** jake2_jogl11ATI.jnlp 20 Dec 2004 12:39:09 -0000 1.5 --- jake2_jogl11ATI.jnlp 12 Jan 2005 09:16:15 -0000 1.6 *************** *** 45,49 **** </resources> ! <application-desc main-class="jake2.Jake2"/> </jnlp> --- 45,56 ---- </resources> ! <application-desc main-class="jake2.Jake2"> ! <argument>+set</argument> ! <argument>vid_ref</argument> ! <argument>fastjogl</argument> ! <argument>+set</argument> ! <argument>s_impl</argument> ! <argument>joal</argument> ! </application-desc> </jnlp> Index: jake2_jogl11.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_jogl11.jnlp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jake2_jogl11.jnlp 3 Nov 2004 16:16:16 -0000 1.4 --- jake2_jogl11.jnlp 12 Jan 2005 09:16:15 -0000 1.5 *************** *** 45,49 **** </resources> ! <application-desc main-class="jake2.Jake2"/> ! </jnlp> --- 45,56 ---- </resources> ! <application-desc main-class="jake2.Jake2"> ! <argument>+set</argument> ! <argument>vid_ref</argument> ! <argument>fastjogl</argument> ! <argument>+set</argument> ! <argument>s_impl</argument> ! <argument>joal</argument> ! </application-desc> ! </jnlp> |
From: Holger Z. <hz...@us...> - 2005-01-12 09:04:57
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1872 Modified Files: build.xml Log Message: use unobfuscated jar for webstart version Index: build.xml =================================================================== RCS file: /cvsroot/jake2/jake2/build.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** build.xml 12 Jan 2005 08:55:06 -0000 1.20 --- build.xml 12 Jan 2005 09:04:46 -0000 1.21 *************** *** 231,234 **** --- 231,235 ---- <fileset dir="${dist}/lib"> <include name="**/*.jar"/> + <exclude name="jake2.jar"/> </fileset> <fileset dir="."> |
From: Holger Z. <hz...@us...> - 2005-01-12 08:55:27
|
Update of /cvsroot/jake2/jake2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32567 Modified Files: build.xml Log Message: use unobfuscated jar for webstart version Index: build.xml =================================================================== RCS file: /cvsroot/jake2/jake2/build.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** build.xml 7 Jan 2005 14:21:20 -0000 1.19 --- build.xml 12 Jan 2005 08:55:06 -0000 1.20 *************** *** 50,54 **** <!-- compile --> <target name="compile" depends="init"> ! <javac destdir="${build}" optimize="on" debug="off" source="1.4"> <src path="${src}"/> <include name="jake2/**"/> --- 50,54 ---- <!-- compile --> <target name="compile" depends="init"> ! <javac destdir="${build}" optimize="off" debug="on" source="1.4"> <src path="${src}"/> <include name="jake2/**"/> *************** *** 234,237 **** --- 234,238 ---- <fileset dir="."> <include name="patch.jar"/> + <include name="jake2.jar"/> </fileset> </copy> |
From: Holger Z. <hz...@us...> - 2005-01-12 08:48:01
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31119/src/jake2/client Modified Files: Menu.java Log Message: sound menu entries Index: Menu.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Menu.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Menu.java 12 Jan 2005 08:36:21 -0000 1.15 --- Menu.java 12 Jan 2005 08:47:42 -0000 1.16 *************** *** 1314,1327 **** // Cvar.VariableValue("s_loadas8bit")); String s = Cvar.VariableString("s_impl"); ! for (int i = 0; i < s_options_quality_list.itemnames.length; i++) { ! if (s.equals(s_options_quality_list.itemnames[i])) { s_options_quality_list.curvalue = i; } } - // if ("joal".equals(Cvar.VariableString("s_impl"))) { - // s_options_quality_list.curvalue = 0; - // } else { - // s_options_quality_list.curvalue = 1; - // } s_options_sensitivity_slider.curvalue = (sensitivity.value) * 2; --- 1314,1322 ---- // Cvar.VariableValue("s_loadas8bit")); String s = Cvar.VariableString("s_impl"); ! for (int i = 0; i < s_drivers.length; i++) { ! if (s.equals(s_drivers[i])) { s_options_quality_list.curvalue = i; } } s_options_sensitivity_slider.curvalue = (sensitivity.value) * 2; *************** *** 1397,1401 **** static void UpdateSoundQualityFunc(Object unused) { boolean driverNotChanged = false; ! String current = s_options_quality_list.itemnames[s_options_quality_list.curvalue]; driverNotChanged = S.getDriverName().equals(current); // if (s_options_quality_list.curvalue != 0) { --- 1392,1396 ---- static void UpdateSoundQualityFunc(Object unused) { boolean driverNotChanged = false; ! String current = s_drivers[s_options_quality_list.curvalue]; driverNotChanged = S.getDriverName().equals(current); // if (s_options_quality_list.curvalue != 0) { *************** *** 1440,1445 **** --- 1435,1453 ---- static String crosshair_names[] = { "none", "cross", "dot", "angle" }; + static String[] s_labels; + static String[] s_drivers; + static void Options_MenuInit() { + s_drivers = S.getDriverNames(); + s_labels = new String[s_drivers.length]; + for (int i = 0; i < s_drivers.length; i++) { + if ("dummy".equals(s_drivers[i])) { + s_labels[i] = "off"; + } else { + s_labels[i] = s_drivers[i]; + } + } + win_noalttab = Cvar.Get("win_noalttab", "0", CVAR_ARCHIVE); *************** *** 1487,1506 **** } }; ! s_options_quality_list.itemnames = S.getDriverNames();//soundstate_items; ! //s_options_quality_list.curvalue = 1 - (int) ! // Cvar.VariableValue("s_loadas8bit"); ! ! // s_options_compatibility_list.type = MTYPE_SPINCONTROL; ! // s_options_compatibility_list.x = 0; ! // s_options_compatibility_list.y = 30; ! // s_options_compatibility_list.name = "sound compatibility"; ! // s_options_compatibility_list.callback = new mcallback() { ! // public void execute(Object o) { ! // UpdateSoundQualityFunc(o); ! // } ! // }; ! // s_options_compatibility_list.itemnames = compatibility_items; ! // s_options_compatibility_list.curvalue = (int) ! // Cvar.VariableValue("s_primary"); s_options_sensitivity_slider.type = MTYPE_SLIDER; --- 1495,1499 ---- } }; ! s_options_quality_list.itemnames = s_labels; s_options_sensitivity_slider.type = MTYPE_SLIDER; |
From: Holger Z. <hz...@us...> - 2005-01-12 08:36:31
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29108/src/jake2/client Modified Files: Menu.java VID.java Log Message: dynamic video menu Index: Menu.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Menu.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Menu.java 11 Jan 2005 14:24:59 -0000 1.14 --- Menu.java 12 Jan 2005 08:36:21 -0000 1.15 *************** *** 1431,1444 **** } ! static String cd_music_items[] = { "disabled", "enabled", null }; ! ! static String soundstate_items[] = { "on", "off", null }; static String compatibility_items[] = { "max compatibility", ! "max performance", null }; ! static String yesno_names[] = { "no", "yes", null }; ! static String crosshair_names[] = { "none", "cross", "dot", "angle", null }; static void Options_MenuInit() { --- 1431,1442 ---- } ! static String cd_music_items[] = { "disabled", "enabled" }; static String compatibility_items[] = { "max compatibility", ! "max performance" }; ! static String yesno_names[] = { "no", "yes" }; ! static String crosshair_names[] = { "none", "cross", "dot", "angle" }; static void Options_MenuInit() { *************** *** 2022,2026 **** static String difficulty_names[] = { "easy", "medium", ! "fuckin shitty hard", null }; static void Game_MenuInit() { --- 2020,2024 ---- static String difficulty_names[] = { "easy", "medium", ! "fuckin shitty hard" }; static void Game_MenuInit() { *************** *** 2697,2705 **** } ! static String dm_coop_names[] = { "deathmatch", "cooperative", null }; ! static String dm_coop_names_rogue[] = { "deathmatch", "cooperative", "tag", ! // "deathball", ! null }; static void StartServer_MenuInit() { --- 2695,2701 ---- } ! static String dm_coop_names[] = { "deathmatch", "cooperative" }; ! static String dm_coop_names_rogue[] = { "deathmatch", "cooperative", "tag" }; static void StartServer_MenuInit() { *************** *** 2744,2748 **** Com.Error(ERR_DROP, "no maps in maps.lst\n"); ! mapnames = new String[nummaps + 1]; for (i = 0; i < nummaps; i++) { --- 2740,2744 ---- Com.Error(ERR_DROP, "no maps in maps.lst\n"); ! mapnames = new String[nummaps]; for (i = 0; i < nummaps; i++) { *************** *** 2756,2760 **** mapnames[i] = scratch; } - mapnames[nummaps] = null; if (fp != null) { --- 2752,2755 ---- *************** *** 3095,3099 **** //static String yes_no_names[] = { "no", "yes", 0 }; ! static String teamplay_names[] = { "disabled", "by skin", "by model", null }; static void DMOptions_MenuInit() { --- 3090,3094 ---- //static String yes_no_names[] = { "no", "yes", 0 }; ! static String teamplay_names[] = { "disabled", "by skin", "by model" }; static void DMOptions_MenuInit() { *************** *** 3450,3454 **** } ! static String yes_no_names[] = { "no", "yes", null }; static void DownloadOptions_MenuInit() { --- 3445,3449 ---- } ! static String yes_no_names[] = { "no", "yes" }; static void DownloadOptions_MenuInit() { *************** *** 3720,3724 **** static String rate_names[] = { "28.8 Modem", "33.6 Modem", "Single ISDN", ! "Dual ISDN/Cable", "T1/LAN", "User defined", null }; static void DownloadOptionsFunc(Object self) { --- 3715,3719 ---- static String rate_names[] = { "28.8 Modem", "33.6 Modem", "Single ISDN", ! "Dual ISDN/Cable", "T1/LAN", "User defined" }; static void DownloadOptionsFunc(Object self) { *************** *** 3926,3930 **** } ! static String handedness[] = { "right", "left", "center", null }; static boolean PlayerConfig_MenuInit() { --- 3921,3925 ---- } ! static String handedness[] = { "right", "left", "center" }; static boolean PlayerConfig_MenuInit() { *************** *** 4900,4905 **** if (s.curvalue < 0) s.curvalue = 0; ! else if (s.curvalue >= s.itemnames.length) ! s.curvalue = s.itemnames.length - 1; if (s.callback != null) --- 4895,4900 ---- if (s.curvalue < 0) s.curvalue = 0; ! else if (s.curvalue >= s.itemnames.length || s.itemnames[s.curvalue] == null) ! s.curvalue--; if (s.callback != null) Index: VID.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/VID.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** VID.java 12 Jan 2005 00:40:14 -0000 1.13 --- VID.java 12 Jan 2005 08:36:21 -0000 1.14 *************** *** 436,495 **** Cvar.SetValue( "_windowed_mouse", s_windowed_mouse.curvalue); ! switch ( s_ref_list.curvalue ) ! { ! // case REF_SOFT: ! // Cvar_Set( "vid_ref", "soft" ); ! // break; ! // case REF_SOFTX11: ! // Cvar_Set( "vid_ref", "softx" ); ! // break; ! // ! // case REF_MESA3D : ! // Cvar_Set( "vid_ref", "gl" ); ! // Cvar_Set( "gl_driver", "libMesaGL.so.2" ); ! // if (gl_driver->modified) ! // vid_ref->modified = true; ! // break; ! // ! // case REF_OPENGLX : ! // Cvar_Set( "vid_ref", "glx" ); ! // Cvar_Set( "gl_driver", "libGL.so" ); ! // if (gl_driver->modified) ! // vid_ref->modified = true; ! // break; ! // ! // case REF_MESA3DGLX : ! // Cvar_Set( "vid_ref", "glx" ); ! // Cvar_Set( "gl_driver", "libMesaGL.so.2" ); ! // if (gl_driver->modified) ! // vid_ref->modified = true; ! // break; ! // ! // case REF_3DFXGL : ! // Cvar_Set( "vid_ref", "gl" ); ! // Cvar_Set( "gl_driver", "lib3dfxgl.so" ); ! // if (gl_driver->modified) ! // vid_ref->modified = true; ! // break; ! case REF_OPENGL_JOGL : ! Cvar.Set( "vid_ref", "jogl" ); ! Cvar.Set( "gl_driver", "jogl" ); ! if (gl_driver.modified) ! vid_ref.modified = true; ! break; ! case REF_OPENGL_FASTJOGL : ! Cvar.Set( "vid_ref", "fastjogl" ); ! Cvar.Set( "gl_driver", "fastjogl" ); ! if (gl_driver.modified) ! vid_ref.modified = true; ! break; ! case REF_OPENGL_LWJGL : ! Cvar.Set( "vid_ref", "lwjgl" ); ! Cvar.Set( "gl_driver", "lwjgl" ); ! if (gl_driver.modified) ! vid_ref.modified = true; ! break; ! } ! Menu.ForceMenuOff(); } --- 436,444 ---- Cvar.SetValue( "_windowed_mouse", s_windowed_mouse.curvalue); ! Cvar.Set( "vid_ref", drivers[s_ref_list.curvalue] ); ! Cvar.Set( "gl_driver", drivers[s_ref_list.curvalue] ); ! if (gl_driver.modified) ! vid_ref.modified = true; ! Menu.ForceMenuOff(); } *************** *** 513,528 **** static int mode_x; ! static final String[] refs = ! { ! // "[software ]", ! // "[software X11 ]", ! // "[Mesa 3-D 3DFX ]", ! // "[3DFXGL Miniport]", ! // "[OpenGL glX ]", ! // "[Mesa 3-D glX ]", ! "[OpenGL jogl ]", ! "[OpenGL fastjogl]", ! "[OpenGL lwjgl ]", ! }; static final String[] yesno_names = { --- 462,468 ---- static int mode_x; ! static String[] refs; ! static String[] drivers; ! static final String[] yesno_names = { *************** *** 556,559 **** --- 496,512 ---- } + private static void initRefs() { + drivers = Renderer.getDriverNames(); + refs = new String[drivers.length]; + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < drivers.length; i++) { + sb.setLength(0); + sb.append("[OpenGL ").append(drivers[i]); + while (sb.length() < 16) sb.append(" "); + sb.append("]"); + refs[i] = sb.toString(); + } + } + /* ** VID_MenuInit *************** *** 561,564 **** --- 514,519 ---- public static void MenuInit() { + initRefs(); + if ( gl_driver == null ) gl_driver = Cvar.Get( "gl_driver", Renderer.getPreferedName(), 0 ); *************** *** 598,640 **** s_screensize_slider.curvalue = (int)(SCR.scr_viewsize.value/10); ! // if ( strcmp( vid_ref->string, "soft" ) == 0) ! // { ! // s_current_menu_index = SOFTWARE_MENU; ! // s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_SOFT; ! // } ! if ( vid_ref.string.equalsIgnoreCase("jogl")) ! { ! s_ref_list.curvalue = REF_OPENGL_JOGL; ! } ! else if ( vid_ref.string.equalsIgnoreCase("fastjogl")) ! { ! s_ref_list.curvalue = REF_OPENGL_FASTJOGL; ! } ! else if ( vid_ref.string.equalsIgnoreCase("lwjgl")) ! { ! s_ref_list.curvalue = REF_OPENGL_LWJGL; } ! // else if (strcmp( vid_ref->string, "softx" ) == 0 ) ! // { ! // s_current_menu_index = SOFTWARE_MENU; ! // s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_SOFTX11; ! // } ! // else if ( strcmp( vid_ref->string, "gl" ) == 0 ) ! // { ! // s_current_menu_index = OPENGL_MENU; ! // if ( strcmp( gl_driver->string, "lib3dfxgl.so" ) == 0 ) ! // s_ref_list[s_current_menu_index].curvalue = REF_3DFXGL; ! // else ! // s_ref_list[s_current_menu_index].curvalue = REF_MESA3D; ! // } ! // else if ( strcmp( vid_ref->string, "glx" ) == 0 ) ! // { ! // s_current_menu_index = OPENGL_MENU; ! // if ( strcmp( gl_driver->string, "libMesaGL.so.2" ) == 0 ) ! // s_ref_list[s_current_menu_index].curvalue = REF_MESA3DGLX; ! // else ! // s_ref_list[s_current_menu_index].curvalue = REF_OPENGLX; ! // } ! // s_opengl_menu.x = (int)(viddef.width * 0.50f); s_opengl_menu.nitems = 0; --- 553,562 ---- s_screensize_slider.curvalue = (int)(SCR.scr_viewsize.value/10); ! for (int i = 0; i < drivers.length; i++) { ! if (vid_ref.string.equals(drivers[i])) { ! s_ref_list.curvalue = i; ! } } ! s_opengl_menu.x = (int)(viddef.width * 0.50f); s_opengl_menu.nitems = 0; |
From: Carsten W. <ca...@us...> - 2005-01-12 01:21:44
|
Update of /cvsroot/jake2/jake2/src/jake2/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23474/src/jake2/sound Modified Files: S.java Log Message: :-) Index: S.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/S.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** S.java 11 Jan 2005 20:57:50 -0000 1.7 --- S.java 12 Jan 2005 01:21:34 -0000 1.8 *************** *** 85,89 **** } // if driver not found use dummy ! impl = (Sound)drivers.get(0); } --- 85,89 ---- } // if driver not found use dummy ! impl = (Sound)drivers.firstElement(); } |
From: Carsten W. <ca...@us...> - 2005-01-12 00:40:23
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15357/src/jake2/client Modified Files: VID.java Log Message: uses Renderer to select the default or the prefered driver name; null termination of String[] removed (menu labels) Index: VID.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/VID.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** VID.java 11 Jan 2005 15:53:56 -0000 1.12 --- VID.java 12 Jan 2005 00:40:14 -0000 1.13 *************** *** 256,262 **** Globals.cls.disable_screen = 1.0f; // true; if ( !LoadRefresh( vid_ref.string ) ) { ! if ( vid_ref.string.equals("jogl") ) { Com.Printf("Refresh failed\n"); gl_mode = Cvar.Get( "gl_mode", "0", 0 ); --- 256,264 ---- Globals.cls.disable_screen = 1.0f; // true; + String defaultName = Renderer.getDefaultName(); + if ( !LoadRefresh( vid_ref.string ) ) { ! if ( vid_ref.string.equals(defaultName) ) { Com.Printf("Refresh failed\n"); gl_mode = Cvar.Get( "gl_mode", "0", 0 ); *************** *** 265,274 **** Cvar.SetValue("gl_mode", 0); if ( !LoadRefresh( vid_ref.string ) ) ! Com.Error(Defines.ERR_FATAL, "Couldn't fall back to jogl refresh!"); } else ! Com.Error(Defines.ERR_FATAL, "Couldn't fall back to jogl refresh!"); } ! Cvar.Set( "vid_ref", "jogl" ); /* --- 267,276 ---- Cvar.SetValue("gl_mode", 0); if ( !LoadRefresh( vid_ref.string ) ) ! Com.Error(Defines.ERR_FATAL, "Couldn't fall back to " + defaultName +" refresh!"); } else ! Com.Error(Defines.ERR_FATAL, "Couldn't fall back to " + defaultName +" refresh!"); } ! Cvar.Set("vid_ref", defaultName); /* *************** *** 295,299 **** { /* Create the video variables so we know how to start the graphics drivers */ ! vid_ref = Cvar.Get("vid_ref", "fastjogl", CVAR_ARCHIVE); vid_xpos = Cvar.Get("vid_xpos", "3", CVAR_ARCHIVE); vid_ypos = Cvar.Get("vid_ypos", "22", CVAR_ARCHIVE); --- 297,301 ---- { /* Create the video variables so we know how to start the graphics drivers */ ! vid_ref = Cvar.Get("vid_ref", Renderer.getPreferedName(), CVAR_ARCHIVE); vid_xpos = Cvar.Get("vid_xpos", "3", CVAR_ARCHIVE); vid_ypos = Cvar.Get("vid_ypos", "22", CVAR_ARCHIVE); *************** *** 507,511 **** "[2048 1536]", "user mode", - null }; static String[] fs_resolutions; --- 509,512 ---- *************** *** 523,527 **** "[OpenGL fastjogl]", "[OpenGL lwjgl ]", - null }; static final String[] yesno_names = --- 524,527 ---- *************** *** 529,538 **** "no", "yes", - null }; static void initModeList() { DisplayMode[] modes = re.getModeList(); ! fs_resolutions = new String[modes.length + 1]; fs_modes = new vidmode_t[modes.length]; for (int i = 0; i < modes.length; i++) { --- 529,537 ---- "no", "yes", }; static void initModeList() { DisplayMode[] modes = re.getModeList(); ! fs_resolutions = new String[modes.length]; fs_modes = new vidmode_t[modes.length]; for (int i = 0; i < modes.length; i++) { *************** *** 563,567 **** if ( gl_driver == null ) ! gl_driver = Cvar.Get( "gl_driver", "jogl", 0 ); if ( gl_picmip == null ) gl_picmip = Cvar.Get( "gl_picmip", "0", 0 ); --- 562,566 ---- if ( gl_driver == null ) ! gl_driver = Cvar.Get( "gl_driver", Renderer.getPreferedName(), 0 ); if ( gl_picmip == null ) gl_picmip = Cvar.Get( "gl_picmip", "0", 0 ); |
From: Carsten W. <ca...@us...> - 2005-01-12 00:37:25
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14815/src/jake2/render Modified Files: Renderer.java Log Message: new methods for driver selection (see VID) Index: Renderer.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/Renderer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Renderer.java 16 Dec 2004 21:13:06 -0000 1.5 --- Renderer.java 12 Jan 2005 00:37:13 -0000 1.6 *************** *** 44,48 **** Class.forName("net.java.games.jogl.GL"); Class.forName("jake2.render.JoglRenderer"); - Class.forName("jake2.render.FastJoglRenderer"); } catch (ClassNotFoundException e) { // ignore the jogl drivers if runtime not in classpath --- 44,47 ---- *************** *** 54,57 **** --- 53,62 ---- // ignore the lwjgl driver if runtime not in classpath } + try { + Class.forName("net.java.games.jogl.GL"); + Class.forName("jake2.render.FastJoglRenderer"); + } catch (ClassNotFoundException e) { + // ignore the fastjogl drivers if runtime not in classpath + } } catch (Throwable e) { e.printStackTrace(); *************** *** 85,90 **** --- 90,104 ---- return null; } + + public static String getDefaultName() { + return (drivers.isEmpty()) ? null : ((Ref) drivers.firstElement()).getName(); + } + + public static String getPreferedName() { + return (drivers.isEmpty()) ? null : ((Ref) drivers.lastElement()).getName(); + } public static String[] getDriverNames() { + if (drivers.isEmpty()) return null; int count = drivers.size(); String[] names = new String[count]; |
From: Carsten W. <ca...@us...> - 2005-01-11 20:58:07
|
Update of /cvsroot/jake2/jake2/src/jake2/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30708/src/jake2/sound Modified Files: S.java Log Message: sound driver selection changed Index: S.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/S.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** S.java 11 Jan 2005 14:25:10 -0000 1.6 --- S.java 11 Jan 2005 20:57:50 -0000 1.7 *************** *** 48,57 **** Class.forName("jake2.sound.DummyDriver"); try { - Class.forName("net.java.games.joal.AL"); - Class.forName("jake2.sound.joal.JOALSoundImpl"); - } catch (ClassNotFoundException e) { - // ignore the joal driver if runtime not in classpath - } - try { Class.forName("org.lwjgl.openal.AL"); Class.forName("jake2.sound.lwjgl.LWJGLSoundImpl"); --- 48,51 ---- *************** *** 59,62 **** --- 53,63 ---- // ignore the lwjgl driver if runtime not in classpath } + // prefered driver + try { + Class.forName("net.java.games.joal.AL"); + Class.forName("jake2.sound.joal.JOALSoundImpl"); + } catch (ClassNotFoundException e) { + // ignore the joal driver if runtime not in classpath + } } catch (Throwable e) { *************** *** 98,105 **** } ! // set the first driver after dummy as default String defaultDriver = "dummy"; if (drivers.size() > 1){ ! defaultDriver = ((Sound)drivers.elementAt(1)).getName(); } --- 99,106 ---- } ! // set the last registered driver as default String defaultDriver = "dummy"; if (drivers.size() > 1){ ! defaultDriver = ((Sound)drivers.lastElement()).getName(); } |
From: Holger Z. <hz...@us...> - 2005-01-11 15:54:09
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27152/src/jake2/client Modified Files: VID.java Log Message: clean up video menu code Index: VID.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/VID.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** VID.java 14 Dec 2004 12:54:25 -0000 1.11 --- VID.java 11 Jan 2005 15:53:56 -0000 1.12 *************** *** 364,430 **** ==================================================================== */ - static final int SOFTWARE_MENU = 0; - static final int OPENGL_MENU = 1; - static Menu.menuframework_s s_software_menu = new Menu.menuframework_s(); static Menu.menuframework_s s_opengl_menu = new Menu.menuframework_s(); static Menu.menuframework_s s_current_menu; // referenz - static int s_current_menu_index = 1; // default is the openGL menu ! static Menu.menulist_s[] s_mode_list = new Menu.menulist_s[2]; ! static { ! s_mode_list[0] = new Menu.menulist_s(); ! s_mode_list[1] = new Menu.menulist_s(); ! } ! static Menu.menulist_s[] s_ref_list = new Menu.menulist_s[2]; ! static { ! s_ref_list[0] = new Menu.menulist_s(); ! s_ref_list[1] = new Menu.menulist_s(); ! } static Menu.menuslider_s s_tq_slider = new Menu.menuslider_s(); ! static Menu.menuslider_s[] s_screensize_slider = new Menu.menuslider_s[2]; ! static { ! s_screensize_slider[0] = new Menu.menuslider_s(); ! s_screensize_slider[1] = new Menu.menuslider_s(); ! } ! static Menu.menuslider_s[] s_brightness_slider = new Menu.menuslider_s[2]; ! static { ! s_brightness_slider[0] = new Menu.menuslider_s(); ! s_brightness_slider[1] = new Menu.menuslider_s(); ! } ! static Menu.menulist_s[] s_fs_box = new Menu.menulist_s[2]; ! static { ! s_fs_box[0] = new Menu.menulist_s(); ! s_fs_box[1] = new Menu.menulist_s(); ! } static Menu.menulist_s s_stipple_box = new Menu.menulist_s(); static Menu.menulist_s s_paletted_texture_box = new Menu.menulist_s(); static Menu.menulist_s s_windowed_mouse = new Menu.menulist_s(); ! static Menu.menuaction_s[] s_apply_action = new Menu.menuaction_s[2]; ! static { ! s_apply_action[0] = new Menu.menuaction_s(); ! s_apply_action[1] = new Menu.menuaction_s(); ! } ! static Menu.menuaction_s[] s_defaults_action= new Menu.menuaction_s[2]; ! static { ! s_defaults_action[0] = new Menu.menuaction_s(); ! s_defaults_action[1] = new Menu.menuaction_s(); ! } static void DriverCallback( Object unused ) { ! s_ref_list[1 - s_current_menu_index].curvalue = s_ref_list[s_current_menu_index].curvalue; ! ! if ( s_ref_list[s_current_menu_index].curvalue < 2 ) ! { ! // we only use opengl today ! s_current_menu = s_opengl_menu; // s_software_menu; ! s_current_menu_index = 1; // 0; ! } ! else ! { ! s_current_menu = s_opengl_menu; ! s_current_menu_index = 1; ! } } --- 364,392 ---- ==================================================================== */ static Menu.menuframework_s s_opengl_menu = new Menu.menuframework_s(); static Menu.menuframework_s s_current_menu; // referenz ! static Menu.menulist_s s_mode_list = new Menu.menulist_s(); ! ! static Menu.menulist_s s_ref_list = new Menu.menulist_s(); ! static Menu.menuslider_s s_tq_slider = new Menu.menuslider_s(); ! static Menu.menuslider_s s_screensize_slider = new Menu.menuslider_s(); ! ! static Menu.menuslider_s s_brightness_slider = new Menu.menuslider_s(); ! ! static Menu.menulist_s s_fs_box = new Menu.menulist_s(); ! static Menu.menulist_s s_stipple_box = new Menu.menulist_s(); static Menu.menulist_s s_paletted_texture_box = new Menu.menulist_s(); static Menu.menulist_s s_windowed_mouse = new Menu.menulist_s(); ! static Menu.menuaction_s s_apply_action = new Menu.menuaction_s(); ! ! static Menu.menuaction_s s_defaults_action= new Menu.menuaction_s(); static void DriverCallback( Object unused ) { ! s_current_menu = s_opengl_menu; // s_software_menu; } *************** *** 440,448 **** Menu.menuslider_s slider = (Menu.menuslider_s) s; - if ( s_current_menu_index == 0) - s_brightness_slider[1].curvalue = s_brightness_slider[0].curvalue; - else - s_brightness_slider[0].curvalue = s_brightness_slider[1].curvalue; - // if ( stricmp( vid_ref.string, "soft" ) == 0 || // stricmp( vid_ref.string, "softx" ) == 0 ) --- 402,405 ---- *************** *** 463,488 **** static void ApplyChanges( Object unused ) { - /* - ** make values consistent - */ - s_fs_box[1 - s_current_menu_index].curvalue = s_fs_box[s_current_menu_index].curvalue; - s_brightness_slider[1 - s_current_menu_index].curvalue = s_brightness_slider[s_current_menu_index].curvalue; - s_ref_list[1 - s_current_menu_index].curvalue = s_ref_list[s_current_menu_index].curvalue; /* ** invert sense so greater = brighter, and scale to a range of 0.5 to 1.3 */ ! float gamma = ( 0.8f - ( s_brightness_slider[s_current_menu_index].curvalue/10.0f - 0.5f ) ) + 0.5f; Cvar.SetValue( "vid_gamma", gamma ); Cvar.SetValue( "sw_stipplealpha", s_stipple_box.curvalue ); Cvar.SetValue( "gl_picmip", 3 - s_tq_slider.curvalue ); ! Cvar.SetValue( "vid_fullscreen", s_fs_box[s_current_menu_index].curvalue ); Cvar.SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue ); ! Cvar.SetValue( "sw_mode", s_mode_list[SOFTWARE_MENU].curvalue ); ! Cvar.SetValue( "gl_mode", s_mode_list[OPENGL_MENU].curvalue ); Cvar.SetValue( "_windowed_mouse", s_windowed_mouse.curvalue); ! switch ( s_ref_list[s_current_menu_index].curvalue ) { // case REF_SOFT: --- 420,438 ---- static void ApplyChanges( Object unused ) { /* ** invert sense so greater = brighter, and scale to a range of 0.5 to 1.3 */ ! float gamma = ( 0.8f - ( s_brightness_slider.curvalue/10.0f - 0.5f ) ) + 0.5f; Cvar.SetValue( "vid_gamma", gamma ); Cvar.SetValue( "sw_stipplealpha", s_stipple_box.curvalue ); Cvar.SetValue( "gl_picmip", 3 - s_tq_slider.curvalue ); ! Cvar.SetValue( "vid_fullscreen", s_fs_box.curvalue ); Cvar.SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue ); ! Cvar.SetValue( "gl_mode", s_mode_list.curvalue ); Cvar.SetValue( "_windowed_mouse", s_windowed_mouse.curvalue); ! switch ( s_ref_list.curvalue ) { // case REF_SOFT: *************** *** 629,646 **** _windowed_mouse = Cvar.Get( "_windowed_mouse", "0", CVAR_ARCHIVE ); ! s_mode_list[SOFTWARE_MENU].curvalue = (int)sw_mode.value; ! s_mode_list[OPENGL_MENU].curvalue = (int)gl_mode.value; if (vid_fullscreen.value != 0.0f) { ! s_mode_list[OPENGL_MENU].itemnames = fs_resolutions; ! if (s_mode_list[OPENGL_MENU].curvalue >= fs_resolutions.length - 1) { ! s_mode_list[OPENGL_MENU].curvalue = 0; } ! mode_x = fs_modes[s_mode_list[OPENGL_MENU].curvalue].width; } else { ! s_mode_list[OPENGL_MENU].itemnames = resolutions; ! if (s_mode_list[OPENGL_MENU].curvalue >= resolutions.length - 1) { ! s_mode_list[OPENGL_MENU].curvalue = 0; } ! mode_x = vid_modes[s_mode_list[OPENGL_MENU].curvalue].width; } --- 579,595 ---- _windowed_mouse = Cvar.Get( "_windowed_mouse", "0", CVAR_ARCHIVE ); ! s_mode_list.curvalue = (int)gl_mode.value; if (vid_fullscreen.value != 0.0f) { ! s_mode_list.itemnames = fs_resolutions; ! if (s_mode_list.curvalue >= fs_resolutions.length - 1) { ! s_mode_list.curvalue = 0; } ! mode_x = fs_modes[s_mode_list.curvalue].width; } else { ! s_mode_list.itemnames = resolutions; ! if (s_mode_list.curvalue >= resolutions.length - 1) { ! s_mode_list.curvalue = 0; } ! mode_x = vid_modes[s_mode_list.curvalue].width; } *************** *** 648,653 **** SCR.scr_viewsize = Cvar.Get ("viewsize", "100", CVAR_ARCHIVE); ! s_screensize_slider[SOFTWARE_MENU].curvalue = (int)(SCR.scr_viewsize.value/10); ! s_screensize_slider[OPENGL_MENU].curvalue = (int)(SCR.scr_viewsize.value/10); // if ( strcmp( vid_ref->string, "soft" ) == 0) --- 597,601 ---- SCR.scr_viewsize = Cvar.Get ("viewsize", "100", CVAR_ARCHIVE); ! s_screensize_slider.curvalue = (int)(SCR.scr_viewsize.value/10); // if ( strcmp( vid_ref->string, "soft" ) == 0) *************** *** 658,673 **** if ( vid_ref.string.equalsIgnoreCase("jogl")) { ! s_current_menu_index = OPENGL_MENU; ! s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_OPENGL_JOGL; } else if ( vid_ref.string.equalsIgnoreCase("fastjogl")) { ! s_current_menu_index = OPENGL_MENU; ! s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_OPENGL_FASTJOGL; } else if ( vid_ref.string.equalsIgnoreCase("lwjgl")) { ! s_current_menu_index = OPENGL_MENU; ! s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_OPENGL_LWJGL; } // else if (strcmp( vid_ref->string, "softx" ) == 0 ) --- 606,618 ---- if ( vid_ref.string.equalsIgnoreCase("jogl")) { ! s_ref_list.curvalue = REF_OPENGL_JOGL; } else if ( vid_ref.string.equalsIgnoreCase("fastjogl")) { ! s_ref_list.curvalue = REF_OPENGL_FASTJOGL; } else if ( vid_ref.string.equalsIgnoreCase("lwjgl")) { ! s_ref_list.curvalue = REF_OPENGL_LWJGL; } // else if (strcmp( vid_ref->string, "softx" ) == 0 ) *************** *** 693,786 **** // } // - s_software_menu.x = (int)(viddef.width * 0.50f); - s_software_menu.nitems = 0; s_opengl_menu.x = (int)(viddef.width * 0.50f); s_opengl_menu.nitems = 0; ! for (int i = 0; i < 2; i++ ) ! { ! s_ref_list[i].type = MTYPE_SPINCONTROL; ! s_ref_list[i].name = "driver"; ! s_ref_list[i].x = 0; ! s_ref_list[i].y = 0; ! s_ref_list[i].callback = new Menu.mcallback() { ! public void execute(Object self) { ! DriverCallback(self); ! } ! }; ! s_ref_list[i].itemnames = refs; ! ! s_mode_list[i].type = MTYPE_SPINCONTROL; ! s_mode_list[i].name = "video mode"; ! s_mode_list[i].x = 0; ! s_mode_list[i].y = 10; ! s_screensize_slider[i].type = MTYPE_SLIDER; ! s_screensize_slider[i].x = 0; ! s_screensize_slider[i].y = 20; ! s_screensize_slider[i].name = "screen size"; ! s_screensize_slider[i].minvalue = 3; ! s_screensize_slider[i].maxvalue = 12; ! s_screensize_slider[i].callback = new Menu.mcallback() { ! public void execute(Object self) { ! ScreenSizeCallback(self); ! } ! }; ! s_brightness_slider[i].type = MTYPE_SLIDER; ! s_brightness_slider[i].x = 0; ! s_brightness_slider[i].y = 30; ! s_brightness_slider[i].name = "brightness"; ! s_brightness_slider[i].callback = new Menu.mcallback() { ! public void execute(Object self) { ! BrightnessCallback(self); ! } ! }; ! s_brightness_slider[i].minvalue = 5; ! s_brightness_slider[i].maxvalue = 13; ! s_brightness_slider[i].curvalue = ( 1.3f - vid_gamma.value + 0.5f ) * 10; ! s_fs_box[i].type = MTYPE_SPINCONTROL; ! s_fs_box[i].x = 0; ! s_fs_box[i].y = 40; ! s_fs_box[i].name = "fullscreen"; ! s_fs_box[i].itemnames = yesno_names; ! s_fs_box[i].curvalue = (int)vid_fullscreen.value; ! s_fs_box[i].callback = new Menu.mcallback() { ! public void execute(Object o) { ! int fs = ((Menu.menulist_s)o).curvalue; ! if (fs == 0) { ! s_mode_list[1].itemnames = resolutions; ! int i = vid_modes.length - 2; ! while (i > 0 && vid_modes[i].width > mode_x) i--; ! s_mode_list[1].curvalue = i; ! } else { ! s_mode_list[1].itemnames = fs_resolutions; ! int i = fs_modes.length - 1; ! while (i > 0 && fs_modes[i].width > mode_x) i--; ! s_mode_list[1].curvalue = i; ! } } ! }; ! s_defaults_action[i].type = MTYPE_ACTION; ! s_defaults_action[i].name = "reset to default"; ! s_defaults_action[i].x = 0; ! s_defaults_action[i].y = 90; ! s_defaults_action[i].callback = new Menu.mcallback() { ! public void execute(Object self) { ! ResetDefaults(self); ! } ! }; ! s_apply_action[i].type = MTYPE_ACTION; ! s_apply_action[i].name = "apply"; ! s_apply_action[i].x = 0; ! s_apply_action[i].y = 100; ! s_apply_action[i].callback = new Menu.mcallback() { ! public void execute(Object self) { ! ApplyChanges(self); ! } ! }; ! } s_stipple_box.type = MTYPE_SPINCONTROL; --- 638,727 ---- // } // s_opengl_menu.x = (int)(viddef.width * 0.50f); s_opengl_menu.nitems = 0; + + s_ref_list.type = MTYPE_SPINCONTROL; + s_ref_list.name = "driver"; + s_ref_list.x = 0; + s_ref_list.y = 0; + s_ref_list.callback = new Menu.mcallback() { + public void execute(Object self) { + DriverCallback(self); + } + }; + s_ref_list.itemnames = refs; ! s_mode_list.type = MTYPE_SPINCONTROL; ! s_mode_list.name = "video mode"; ! s_mode_list.x = 0; ! s_mode_list.y = 10; ! s_screensize_slider.type = MTYPE_SLIDER; ! s_screensize_slider.x = 0; ! s_screensize_slider.y = 20; ! s_screensize_slider.name = "screen size"; ! s_screensize_slider.minvalue = 3; ! s_screensize_slider.maxvalue = 12; ! s_screensize_slider.callback = new Menu.mcallback() { ! public void execute(Object self) { ! ScreenSizeCallback(self); ! } ! }; ! s_brightness_slider.type = MTYPE_SLIDER; ! s_brightness_slider.x = 0; ! s_brightness_slider.y = 30; ! s_brightness_slider.name = "brightness"; ! s_brightness_slider.callback = new Menu.mcallback() { ! public void execute(Object self) { ! BrightnessCallback(self); ! } ! }; ! s_brightness_slider.minvalue = 5; ! s_brightness_slider.maxvalue = 13; ! s_brightness_slider.curvalue = ( 1.3f - vid_gamma.value + 0.5f ) * 10; ! s_fs_box.type = MTYPE_SPINCONTROL; ! s_fs_box.x = 0; ! s_fs_box.y = 40; ! s_fs_box.name = "fullscreen"; ! s_fs_box.itemnames = yesno_names; ! s_fs_box.curvalue = (int)vid_fullscreen.value; ! s_fs_box.callback = new Menu.mcallback() { ! public void execute(Object o) { ! int fs = ((Menu.menulist_s)o).curvalue; ! if (fs == 0) { ! s_mode_list.itemnames = resolutions; ! int i = vid_modes.length - 2; ! while (i > 0 && vid_modes[i].width > mode_x) i--; ! s_mode_list.curvalue = i; ! } else { ! s_mode_list.itemnames = fs_resolutions; ! int i = fs_modes.length - 1; ! while (i > 0 && fs_modes[i].width > mode_x) i--; ! s_mode_list.curvalue = i; } ! } ! }; ! s_defaults_action.type = MTYPE_ACTION; ! s_defaults_action.name = "reset to default"; ! s_defaults_action.x = 0; ! s_defaults_action.y = 90; ! s_defaults_action.callback = new Menu.mcallback() { ! public void execute(Object self) { ! ResetDefaults(self); ! } ! }; ! s_apply_action.type = MTYPE_ACTION; ! s_apply_action.name = "apply"; ! s_apply_action.x = 0; ! s_apply_action.y = 100; ! s_apply_action.callback = new Menu.mcallback() { ! public void execute(Object self) { ! ApplyChanges(self); ! } ! }; ! s_stipple_box.type = MTYPE_SPINCONTROL; *************** *** 813,841 **** s_paletted_texture_box.curvalue = (int)gl_ext_palettedtexture.value; ! Menu.Menu_AddItem( s_software_menu, s_ref_list[SOFTWARE_MENU] ); ! Menu.Menu_AddItem( s_software_menu, s_mode_list[SOFTWARE_MENU] ); ! Menu.Menu_AddItem( s_software_menu, s_screensize_slider[SOFTWARE_MENU] ); ! Menu.Menu_AddItem( s_software_menu, s_brightness_slider[SOFTWARE_MENU] ); ! Menu.Menu_AddItem( s_software_menu, s_fs_box[SOFTWARE_MENU] ); ! Menu.Menu_AddItem( s_software_menu, s_stipple_box ); ! Menu.Menu_AddItem( s_software_menu, s_windowed_mouse ); ! ! Menu.Menu_AddItem( s_opengl_menu, s_ref_list[OPENGL_MENU] ); ! Menu.Menu_AddItem( s_opengl_menu, s_mode_list[OPENGL_MENU] ); ! Menu.Menu_AddItem( s_opengl_menu, s_screensize_slider[OPENGL_MENU] ); ! Menu.Menu_AddItem( s_opengl_menu, s_brightness_slider[OPENGL_MENU] ); ! Menu.Menu_AddItem( s_opengl_menu, s_fs_box[OPENGL_MENU] ); Menu.Menu_AddItem( s_opengl_menu, s_tq_slider ); Menu.Menu_AddItem( s_opengl_menu, s_paletted_texture_box ); ! Menu.Menu_AddItem( s_software_menu, s_defaults_action[SOFTWARE_MENU] ); ! Menu.Menu_AddItem( s_software_menu, s_apply_action[SOFTWARE_MENU] ); ! Menu.Menu_AddItem( s_opengl_menu, s_defaults_action[OPENGL_MENU] ); ! Menu.Menu_AddItem( s_opengl_menu, s_apply_action[OPENGL_MENU] ); - Menu.Menu_Center( s_software_menu ); Menu.Menu_Center( s_opengl_menu ); s_opengl_menu.x -= 8; - s_software_menu.x -= 8; } --- 754,770 ---- s_paletted_texture_box.curvalue = (int)gl_ext_palettedtexture.value; ! Menu.Menu_AddItem( s_opengl_menu, s_ref_list ); ! Menu.Menu_AddItem( s_opengl_menu, s_mode_list ); ! Menu.Menu_AddItem( s_opengl_menu, s_screensize_slider ); ! Menu.Menu_AddItem( s_opengl_menu, s_brightness_slider ); ! Menu.Menu_AddItem( s_opengl_menu, s_fs_box ); Menu.Menu_AddItem( s_opengl_menu, s_tq_slider ); Menu.Menu_AddItem( s_opengl_menu, s_paletted_texture_box ); ! Menu.Menu_AddItem( s_opengl_menu, s_defaults_action ); ! Menu.Menu_AddItem( s_opengl_menu, s_apply_action ); Menu.Menu_Center( s_opengl_menu ); s_opengl_menu.x -= 8; } *************** *** 847,855 **** static void MenuDraw() { ! ! if ( s_current_menu_index == 0 ) ! s_current_menu = s_software_menu; ! else ! s_current_menu = s_opengl_menu; /* --- 776,780 ---- static void MenuDraw() { ! s_current_menu = s_opengl_menu; /* |
From: Holger Z. <hz...@us...> - 2005-01-11 14:25:20
|
Update of /cvsroot/jake2/jake2/src/jake2/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4510/src/jake2/sound Modified Files: S.java Log Message: dynamic sound menu Index: S.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/S.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** S.java 16 Dec 2004 21:11:56 -0000 1.5 --- S.java 11 Jan 2005 14:25:10 -0000 1.6 *************** *** 206,208 **** --- 206,216 ---- return impl.getName(); } + + public static String[] getDriverNames() { + String[] names = new String[drivers.size()]; + for (int i = 0; i < names.length; i++) { + names[i] = ((Sound)drivers.get(i)).getName(); + } + return names; + } } \ No newline at end of file |
From: Holger Z. <hz...@us...> - 2005-01-11 14:25:20
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4510/src/jake2/client Modified Files: Menu.java Log Message: dynamic sound menu Index: Menu.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/Menu.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Menu.java 22 Dec 2004 15:50:40 -0000 1.13 --- Menu.java 11 Jan 2005 14:24:59 -0000 1.14 *************** *** 1313,1321 **** //s_options_quality_list.curvalue = 1 - ((int) // Cvar.VariableValue("s_loadas8bit")); ! if ("joal".equals(Cvar.VariableString("s_impl"))) { ! s_options_quality_list.curvalue = 0; ! } else { ! s_options_quality_list.curvalue = 1; } s_options_sensitivity_slider.curvalue = (sensitivity.value) * 2; --- 1313,1327 ---- //s_options_quality_list.curvalue = 1 - ((int) // Cvar.VariableValue("s_loadas8bit")); ! String s = Cvar.VariableString("s_impl"); ! for (int i = 0; i < s_options_quality_list.itemnames.length; i++) { ! if (s.equals(s_options_quality_list.itemnames[i])) { ! s_options_quality_list.curvalue = i; ! } } + // if ("joal".equals(Cvar.VariableString("s_impl"))) { + // s_options_quality_list.curvalue = 0; + // } else { + // s_options_quality_list.curvalue = 1; + // } s_options_sensitivity_slider.curvalue = (sensitivity.value) * 2; *************** *** 1391,1405 **** static void UpdateSoundQualityFunc(Object unused) { boolean driverNotChanged = false; ! if (s_options_quality_list.curvalue != 0) { ! // Cvar.SetValue("s_khz", 22); ! // Cvar.SetValue("s_loadas8bit", 0); ! driverNotChanged = S.getDriverName().equals("dummy"); ! Cvar.Set("s_impl", "dummy"); ! } else { ! // Cvar.SetValue("s_khz", 11); ! // Cvar.SetValue("s_loadas8bit", 1); ! driverNotChanged = S.getDriverName().equals("joal"); ! Cvar.Set("s_impl", "joal"); ! } //Cvar.SetValue("s_primary", s_options_compatibility_list.curvalue); --- 1397,1413 ---- static void UpdateSoundQualityFunc(Object unused) { boolean driverNotChanged = false; ! String current = s_options_quality_list.itemnames[s_options_quality_list.curvalue]; ! driverNotChanged = S.getDriverName().equals(current); ! // if (s_options_quality_list.curvalue != 0) { ! // // Cvar.SetValue("s_khz", 22); ! // // Cvar.SetValue("s_loadas8bit", 0); ! // driverNotChanged = S.getDriverName().equals("dummy"); ! // Cvar.Set("s_impl", "dummy"); ! // } else { ! // // Cvar.SetValue("s_khz", 11); ! // // Cvar.SetValue("s_loadas8bit", 1); ! // driverNotChanged = S.getDriverName().equals("joal"); ! // Cvar.Set("s_impl", "joal"); ! // } //Cvar.SetValue("s_primary", s_options_compatibility_list.curvalue); *************** *** 1409,1413 **** return; } else { ! DrawTextBox(8, 120 - 48, 36, 3); Print(16 + 16, 120 - 48 + 8, "Restarting the sound system. This"); --- 1417,1422 ---- return; } else { ! Cvar.Set("s_impl", current); ! DrawTextBox(8, 120 - 48, 36, 3); Print(16 + 16, 120 - 48 + 8, "Restarting the sound system. This"); *************** *** 1480,1484 **** } }; ! s_options_quality_list.itemnames = soundstate_items; //s_options_quality_list.curvalue = 1 - (int) // Cvar.VariableValue("s_loadas8bit"); --- 1489,1493 ---- } }; ! s_options_quality_list.itemnames = S.getDriverNames();//soundstate_items; //s_options_quality_list.curvalue = 1 - (int) // Cvar.VariableValue("s_loadas8bit"); *************** *** 4891,4896 **** if (s.curvalue < 0) s.curvalue = 0; ! else if (s.itemnames[s.curvalue] == null) ! s.curvalue--; if (s.callback != null) --- 4900,4905 ---- if (s.curvalue < 0) s.curvalue = 0; ! else if (s.curvalue >= s.itemnames.length) ! s.curvalue = s.itemnames.length - 1; if (s.callback != null) |
From: Carsten W. <ca...@us...> - 2005-01-10 19:48:54
|
Update of /cvsroot/jake2/jake2/webstart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5114/webstart Modified Files: jake2_lwjgl.jnlp Log Message: argument bugfix Index: jake2_lwjgl.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_lwjgl.jnlp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** jake2_lwjgl.jnlp 7 Jan 2005 14:21:19 -0000 1.2 --- jake2_lwjgl.jnlp 10 Jan 2005 19:48:44 -0000 1.3 *************** *** 45,50 **** <argument>lwjgl</argument> <argument>+set</argument> ! <argument>+s_impl</argument> ! <argument>+lwjgl</argument> </application-desc> --- 45,50 ---- <argument>lwjgl</argument> <argument>+set</argument> ! <argument>s_impl</argument> ! <argument>lwjgl</argument> </application-desc> |
From: Carsten W. <ca...@us...> - 2005-01-10 00:14:42
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23425/src/jake2/render/fastjogl Modified Files: Model.java Surf.java Polygon.java Log Message: code cleanup Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Model.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Model.java 9 Jan 2005 22:36:31 -0000 1.6 --- Model.java 10 Jan 2005 00:14:32 -0000 1.7 *************** *** 30,54 **** import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.Com; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.FS; ! import jake2.qcommon.lump_t; ! import jake2.qcommon.qfiles; ! import jake2.qcommon.texinfo_t; ! import jake2.render.medge_t; ! import jake2.render.mleaf_t; ! import jake2.render.mmodel_t; ! import jake2.render.mnode_t; ! import jake2.render.model_t; ! import jake2.render.msurface_t; ! import jake2.render.mtexinfo_t; ! import jake2.render.mvertex_t; import jake2.util.Math3D; import jake2.util.Vargs; ! import java.nio.ByteBuffer; ! import java.nio.ByteOrder; ! import java.nio.FloatBuffer; ! import java.nio.IntBuffer; import java.util.Arrays; import java.util.Vector; --- 30,39 ---- import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.*; ! import jake2.render.*; import jake2.util.Math3D; import jake2.util.Vargs; ! import java.nio.*; import java.util.Arrays; import java.util.Vector; Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Surf.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Surf.java 9 Jan 2005 22:36:31 -0000 1.6 --- Surf.java 10 Jan 2005 00:14:33 -0000 1.7 *************** *** 27,49 **** import jake2.Defines; ! import jake2.client.dlight_t; ! import jake2.client.entity_t; ! import jake2.client.lightstyle_t; import jake2.game.cplane_t; import jake2.qcommon.Com; ! import jake2.render.glpoly_t; ! import jake2.render.image_t; ! import jake2.render.medge_t; ! import jake2.render.mleaf_t; ! import jake2.render.mnode_t; ! import jake2.render.model_t; ! import jake2.render.msurface_t; ! import jake2.render.mtexinfo_t; import jake2.util.Lib; import jake2.util.Math3D; ! import java.nio.ByteOrder; ! import java.nio.FloatBuffer; ! import java.nio.IntBuffer; import java.util.Arrays; --- 27,38 ---- import jake2.Defines; ! import jake2.client.*; import jake2.game.cplane_t; import jake2.qcommon.Com; ! import jake2.render.*; import jake2.util.Lib; import jake2.util.Math3D; ! import java.nio.*; import java.util.Arrays; Index: Polygon.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Polygon.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Polygon.java 9 Jan 2005 22:36:31 -0000 1.1 --- Polygon.java 10 Jan 2005 00:14:33 -0000 1.2 *************** *** 26,35 **** package jake2.render.fastjogl; - import java.nio.FloatBuffer; - - import jake2.Defines; import jake2.render.glpoly_t; import jake2.util.Lib; /** * Polygon --- 26,34 ---- package jake2.render.fastjogl; import jake2.render.glpoly_t; import jake2.util.Lib; + import java.nio.FloatBuffer; + /** * Polygon |
From: Carsten W. <ca...@us...> - 2005-01-10 00:12:10
|
Update of /cvsroot/jake2/jake2/src/jake2/render/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22631/src/jake2/render/lwjgl Modified Files: Model.java Surf.java Polygon.java Log Message: code cleanup Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Model.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Model.java 9 Jan 2005 22:35:31 -0000 1.4 --- Model.java 10 Jan 2005 00:12:00 -0000 1.5 *************** *** 30,54 **** import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.Com; ! import jake2.qcommon.Cvar; ! import jake2.qcommon.FS; ! import jake2.qcommon.lump_t; ! import jake2.qcommon.qfiles; ! import jake2.qcommon.texinfo_t; ! import jake2.render.medge_t; ! import jake2.render.mleaf_t; ! import jake2.render.mmodel_t; ! import jake2.render.mnode_t; ! import jake2.render.model_t; ! import jake2.render.msurface_t; ! import jake2.render.mtexinfo_t; ! import jake2.render.mvertex_t; import jake2.util.Math3D; import jake2.util.Vargs; ! import java.nio.ByteBuffer; ! import java.nio.ByteOrder; ! import java.nio.FloatBuffer; ! import java.nio.IntBuffer; import java.util.Arrays; import java.util.Vector; --- 30,39 ---- import jake2.game.cplane_t; import jake2.game.cvar_t; ! import jake2.qcommon.*; ! import jake2.render.*; import jake2.util.Math3D; import jake2.util.Vargs; ! import java.nio.*; import java.util.Arrays; import java.util.Vector; Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Surf.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Surf.java 9 Jan 2005 22:35:31 -0000 1.5 --- Surf.java 10 Jan 2005 00:12:00 -0000 1.6 *************** *** 27,53 **** import jake2.Defines; ! import jake2.client.dlight_t; ! import jake2.client.entity_t; ! import jake2.client.lightstyle_t; import jake2.game.cplane_t; import jake2.qcommon.Com; ! import jake2.render.glpoly_t; ! import jake2.render.image_t; ! import jake2.render.medge_t; ! import jake2.render.mleaf_t; ! import jake2.render.mnode_t; ! import jake2.render.model_t; ! import jake2.render.msurface_t; ! import jake2.render.mtexinfo_t; import jake2.util.Lib; import jake2.util.Math3D; ! import java.nio.ByteOrder; ! import java.nio.FloatBuffer; ! import java.nio.IntBuffer; import java.util.Arrays; - import net.java.games.jogl.GL; - import org.lwjgl.BufferUtils; import org.lwjgl.opengl.GL11; --- 27,40 ---- import jake2.Defines; ! import jake2.client.*; import jake2.game.cplane_t; import jake2.qcommon.Com; ! import jake2.render.*; import jake2.util.Lib; import jake2.util.Math3D; ! import java.nio.*; import java.util.Arrays; import org.lwjgl.BufferUtils; import org.lwjgl.opengl.GL11; *************** *** 1195,1205 **** Math3D.VectorAdd (total, vec, total); - //Math3D.VectorCopy (vec, poly.verts[i]); poly.x(i, vec[0]); poly.y(i, vec[1]); poly.z(i, vec[2]); - //poly.verts[i][3] = s; - //poly.verts[i][4] = t; poly.s1(i, s); poly.t1(i, t); --- 1182,1189 ---- *************** *** 1220,1225 **** t /= BLOCK_HEIGHT*16; //fa.texinfo.texture.height; - // poly.verts[i][5] = s; - // poly.verts[i][6] = t; poly.s2(i, s); poly.t2(i, t); --- 1204,1207 ---- Index: Polygon.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Polygon.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Polygon.java 9 Jan 2005 22:35:31 -0000 1.1 --- Polygon.java 10 Jan 2005 00:12:00 -0000 1.2 *************** *** 26,35 **** package jake2.render.lwjgl; - import java.nio.FloatBuffer; - - import jake2.Defines; import jake2.render.glpoly_t; import jake2.util.Lib; /** * Polygon --- 26,34 ---- package jake2.render.lwjgl; import jake2.render.glpoly_t; import jake2.util.Lib; + import java.nio.FloatBuffer; + /** * Polygon |
From: Carsten W. <ca...@us...> - 2005-01-10 00:05:34
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20852/src/jake2/render/fastjogl Modified Files: Warp.java Log Message: replaces the local float[][]; code clean up Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Warp.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Warp.java 9 Jan 2005 22:36:30 -0000 1.5 --- Warp.java 10 Jan 2005 00:05:23 -0000 1.6 *************** *** 29,39 **** import jake2.Globals; import jake2.qcommon.Com; ! import jake2.render.glpoly_t; ! import jake2.render.image_t; ! import jake2.render.msurface_t; import jake2.util.Math3D; - - import java.nio.FloatBuffer; - import net.java.games.jogl.GL; --- 29,34 ---- import jake2.Globals; import jake2.qcommon.Com; ! import jake2.render.*; import jake2.util.Math3D; import net.java.games.jogl.GL; *************** *** 230,234 **** poly.t1(0, total_t * scale); - // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); poly.x(i + 1, poly.x(1)); poly.y(i + 1, poly.y(1)); --- 225,228 ---- *************** *** 241,265 **** /* ! * ================ GL_SubdivideSurface * * Breaks a polygon up along axial 64 unit boundaries so that turbulent and ! * sky warps can be done reasonably. ================ */ ! void GL_SubdivideSurface(msurface_t fa) { ! float[][] verts = new float[64][3]; ! int numverts; ! int i; ! int lindex; float[] vec; - warpface = fa; - // // convert edges back to a normal polygon // ! numverts = 0; ! for (i = 0; i < fa.numedges; i++) { ! lindex = loadmodel.surfedges[fa.firstedge + i]; if (lindex > 0) --- 235,255 ---- /* ! * GL_SubdivideSurface * * Breaks a polygon up along axial 64 unit boundaries so that turbulent and ! * sky warps can be done reasonably. */ ! float[][] tmpVerts = new float[64][3]; ! void GL_SubdivideSurface(msurface_t fa) { ! float[][] verts = tmpVerts; float[] vec; warpface = fa; // // convert edges back to a normal polygon // ! int numverts = 0; ! for (int i = 0; i < fa.numedges; i++) { ! int lindex = loadmodel.surfedges[fa.firstedge + i]; if (lindex > 0) *************** *** 270,274 **** numverts++; } - SubdividePolygon(numverts, verts); } --- 260,263 ---- *************** *** 290,294 **** void EmitWaterPolys(msurface_t fa) { glpoly_t p, bp; - int i; float s = 0; float t = 0; --- 279,282 ---- *************** *** 307,311 **** gl.glBegin(GL.GL_TRIANGLE_FAN); ! for (i = 0; i < p.numverts; i++) { os = p.s1(i); ot = p.t1(i); --- 295,299 ---- gl.glBegin(GL.GL_TRIANGLE_FAN); ! for (int i = 0; i < p.numverts; i++) { os = p.s1(i); ot = p.t1(i); |
From: Carsten W. <ca...@us...> - 2005-01-10 00:05:33
|
Update of /cvsroot/jake2/jake2/src/jake2/render/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20852/src/jake2/render/lwjgl Modified Files: Warp.java Log Message: replaces the local float[][]; code clean up Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Warp.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Warp.java 9 Jan 2005 22:35:31 -0000 1.3 --- Warp.java 10 Jan 2005 00:05:22 -0000 1.4 *************** *** 29,41 **** import jake2.Globals; import jake2.qcommon.Com; ! import jake2.render.glpoly_t; ! import jake2.render.image_t; ! import jake2.render.msurface_t; import jake2.util.Math3D; - import java.nio.FloatBuffer; - - import net.java.games.jogl.GL; - import org.lwjgl.opengl.GL11; --- 29,35 ---- import jake2.Globals; import jake2.qcommon.Com; ! import jake2.render.*; import jake2.util.Math3D; import org.lwjgl.opengl.GL11; *************** *** 226,230 **** poly.t1(0, total_t * scale); - // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); poly.x(i + 1, poly.x(1)); poly.y(i + 1, poly.y(1)); --- 220,223 ---- *************** *** 245,277 **** ================ */ ! void GL_SubdivideSurface(msurface_t fa) ! { ! float[][] verts = new float[64][3]; ! ! int numverts; ! int i; ! int lindex; ! float[] vec; ! ! warpface = fa; ! ! // ! // convert edges back to a normal polygon ! // ! numverts = 0; ! for (i=0 ; i < fa.numedges ; i++) ! { ! lindex = loadmodel.surfedges[fa.firstedge + i]; ! if (lindex > 0) ! vec = loadmodel.vertexes[loadmodel.edges[lindex].v[0]].position; ! else ! vec = loadmodel.vertexes[loadmodel.edges[-lindex].v[1]].position; ! Math3D.VectorCopy(vec, verts[numverts]); ! numverts++; ! } ! SubdividePolygon(numverts, verts); ! } // ========================================================= --- 238,263 ---- ================ */ ! float[][] tmpVerts = new float[64][3]; ! void GL_SubdivideSurface(msurface_t fa) { ! float[][] verts = tmpVerts; ! float[] vec; ! warpface = fa; ! // ! // convert edges back to a normal polygon ! // ! int numverts = 0; ! for (int i = 0; i < fa.numedges; i++) { ! int lindex = loadmodel.surfedges[fa.firstedge + i]; ! if (lindex > 0) ! vec = loadmodel.vertexes[loadmodel.edges[lindex].v[0]].position; ! else ! vec = loadmodel.vertexes[loadmodel.edges[-lindex].v[1]].position; ! Math3D.VectorCopy(vec, verts[numverts]); ! numverts++; ! } ! SubdividePolygon(numverts, verts); ! } // ========================================================= *************** *** 560,564 **** void R_AddSkySurface(msurface_t fa) { ! // calculate vertex values for sky box for (glpoly_t p = fa.polys; p != null; p = p.next) { for (int i = 0; i < p.numverts; i++) { --- 546,550 ---- void R_AddSkySurface(msurface_t fa) { ! // calculate vertex values for sky box for (glpoly_t p = fa.polys; p != null; p = p.next) { for (int i = 0; i < p.numverts; i++) { *************** *** 579,585 **** void R_ClearSkyBox() { ! int i; ! ! for (i=0 ; i<6 ; i++) { skymins[0][i] = skymins[1][i] = 9999; --- 565,569 ---- void R_ClearSkyBox() { ! for (int i=0 ; i<6 ; i++) { skymins[0][i] = skymins[1][i] = 9999; *************** *** 730,734 **** } } - - } --- 714,716 ---- |
From: Carsten W. <ca...@us...> - 2005-01-10 00:05:32
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20852/src/jake2/render/jogl Modified Files: Warp.java Log Message: replaces the local float[][]; code clean up Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Warp.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Warp.java 9 Jan 2005 22:34:21 -0000 1.8 --- Warp.java 10 Jan 2005 00:05:23 -0000 1.9 *************** *** 29,35 **** import jake2.Globals; import jake2.qcommon.Com; ! import jake2.render.glpoly_t; ! import jake2.render.image_t; ! import jake2.render.msurface_t; import jake2.util.Math3D; import net.java.games.jogl.GL; --- 29,33 ---- import jake2.Globals; import jake2.qcommon.Com; ! import jake2.render.*; import jake2.util.Math3D; import net.java.games.jogl.GL; *************** *** 206,210 **** total_t = 0; for (i = 0; i < numverts; i++) { - //Math3D.VectorCopy(verts[i], poly.verts[i + 1]); poly.x(i + 1, verts[i][0]); poly.y(i + 1, verts[i][1]); --- 204,207 ---- *************** *** 228,234 **** poly.t1(0, total_t * scale); - // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); - // System.arraycopy(poly.verts[1], 0, poly.verts[i + 1], 0, - // poly.verts[1].length); // :-) poly.x(i + 1, poly.x(1)); poly.y(i + 1, poly.y(1)); --- 225,228 ---- *************** *** 241,265 **** /* ! * ================ GL_SubdivideSurface * * Breaks a polygon up along axial 64 unit boundaries so that turbulent and ! * sky warps can be done reasonably. ================ */ ! void GL_SubdivideSurface(msurface_t fa) { ! float[][] verts = new float[64][3]; ! int numverts; ! int i; ! int lindex; float[] vec; - warpface = fa; - // // convert edges back to a normal polygon // ! numverts = 0; ! for (i = 0; i < fa.numedges; i++) { ! lindex = loadmodel.surfedges[fa.firstedge + i]; if (lindex > 0) --- 235,255 ---- /* ! * GL_SubdivideSurface * * Breaks a polygon up along axial 64 unit boundaries so that turbulent and ! * sky warps can be done reasonably. */ ! float[][] tmpVerts = new float[64][3]; ! void GL_SubdivideSurface(msurface_t fa) { ! float[][] verts = tmpVerts; float[] vec; warpface = fa; // // convert edges back to a normal polygon // ! int numverts = 0; ! for (int i = 0; i < fa.numedges; i++) { ! int lindex = loadmodel.surfedges[fa.firstedge + i]; if (lindex > 0) *************** *** 270,274 **** numverts++; } - SubdividePolygon(numverts, verts); } --- 260,263 ---- *************** *** 520,533 **** /* ! * ================= R_AddSkySurface ================= */ void R_AddSkySurface(msurface_t fa) { - int i; - glpoly_t p; - // calculate vertex values for sky box ! for (p = fa.polys; p != null; p = p.next) { ! for (i = 0; i < p.numverts; i++) { ! //Math3D.VectorSubtract(p.verts[i], r_origin, verts[i]); verts[i][0] = p.x(i) - r_origin[0]; verts[i][1] = p.y(i) - r_origin[1]; --- 509,518 ---- /* ! * R_AddSkySurface */ void R_AddSkySurface(msurface_t fa) { // calculate vertex values for sky box ! for (glpoly_t p = fa.polys; p != null; p = p.next) { ! for (int i = 0; i < p.numverts; i++) { verts[i][0] = p.x(i) - r_origin[0]; verts[i][1] = p.y(i) - r_origin[1]; |
From: Carsten W. <ca...@us...> - 2005-01-09 23:42:08
|
Update of /cvsroot/jake2/jake2/src/jake2/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15284/src/jake2/util Modified Files: Lib.java Log Message: replacement for String.trim() Index: Lib.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/util/Lib.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Lib.java 16 Dec 2004 19:46:49 -0000 1.11 --- Lib.java 9 Jan 2005 23:41:53 -0000 1.12 *************** *** 211,215 **** FS.Read(buffer, len, f); ! return new String(buffer).trim(); } public static String rightFrom(String in, char c) { --- 211,215 ---- FS.Read(buffer, len, f); ! return Lib.CtoJava(buffer); } public static String rightFrom(String in, char c) { *************** *** 267,272 **** } public static String CtoJava(byte[] old, int offset, int maxLenght) { ! int i; for (i = offset; old[i] != 0 && (i - offset) < maxLenght; i++); return new String(old, offset, i - offset); --- 267,277 ---- } + public static String CtoJava(byte[] old) { + return CtoJava(old, 0, old.length); + } + public static String CtoJava(byte[] old, int offset, int maxLenght) { ! if (old.length == 0 || old[0] == 0) return ""; ! int i; for (i = offset; old[i] != 0 && (i - offset) < maxLenght; i++); return new String(old, offset, i - offset); |
From: Carsten W. <ca...@us...> - 2005-01-09 22:36:50
|
Update of /cvsroot/jake2/jake2/src/jake2/render/fastjogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32096/src/jake2/render/fastjogl Modified Files: Warp.java Model.java Surf.java Added Files: Polygon.java Log Message: the Polygon implementation (FloatBuffer as backbuffer) and the changes to use the interface Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Warp.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Warp.java 22 Sep 2004 19:22:11 -0000 1.4 --- Warp.java 9 Jan 2005 22:36:30 -0000 1.5 *************** *** 201,214 **** // init polys ! glpoly_t poly = new glpoly_t(numverts + 2); poly.next = warpface.polys; warpface.polys = poly; - poly.numverts = numverts + 2; Math3D.VectorClear(total); total_s = 0; total_t = 0; for (i = 0; i < numverts; i++) { ! Math3D.VectorCopy(verts[i], poly.verts[i + 1]); s = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[0]); t = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[1]); --- 201,215 ---- // init polys ! glpoly_t poly = Polygon.create(numverts + 2); poly.next = warpface.polys; warpface.polys = poly; Math3D.VectorClear(total); total_s = 0; total_t = 0; for (i = 0; i < numverts; i++) { ! poly.x(i + 1, verts[i][0]); ! poly.y(i + 1, verts[i][1]); ! poly.z(i + 1, verts[i][2]); s = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[0]); t = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[1]); *************** *** 218,234 **** Math3D.VectorAdd(total, verts[i], total); ! poly.verts[i + 1][3] = s; ! poly.verts[i + 1][4] = t; } ! ! Math3D.VectorScale(total, (1.0f / numverts), poly.verts[0]); ! poly.verts[0][3] = total_s / numverts; ! poly.verts[0][4] = total_t / numverts; // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); ! System.arraycopy(poly.verts[1], 0, poly.verts[i + 1], 0, ! poly.verts[1].length); // :-) ! ! precompilePolygon(poly); } --- 219,241 ---- Math3D.VectorAdd(total, verts[i], total); ! poly.s1(i + 1, s); ! poly.t1(i + 1, t); } ! ! float scale = 1.0f / numverts; ! poly.x(0, total[0] * scale); ! poly.y(0, total[1] * scale); ! poly.z(0, total[2] * scale); ! poly.s1(0, total_s * scale); ! poly.t1(0, total_t * scale); // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); ! poly.x(i + 1, poly.x(1)); ! poly.y(i + 1, poly.y(1)); ! poly.z(i + 1, poly.z(1)); ! poly.s1(i + 1, poly.s1(1)); ! poly.t1(i + 1, poly.t1(1)); ! poly.s2(i + 1, poly.s2(1)); ! poly.t2(i + 1, poly.t2(1)); } *************** *** 283,287 **** void EmitWaterPolys(msurface_t fa) { glpoly_t p, bp; - float[] v; int i; float s = 0; --- 290,293 ---- *************** *** 297,310 **** scroll = 0; - int index; - FloatBuffer texCoord = globalPolygonInterleavedBuf; for (bp = fa.polys; bp != null; bp = bp.next) { p = bp; ! index = p.pos * POLYGON_STRIDE; for (i = 0; i < p.numverts; i++) { ! v = p.verts[i]; ! os = v[3]; ! ot = v[4]; s = os --- 303,313 ---- scroll = 0; for (bp = fa.polys; bp != null; bp = bp.next) { p = bp; ! gl.glBegin(GL.GL_TRIANGLE_FAN); for (i = 0; i < p.numverts; i++) { ! os = p.s1(i); ! ot = p.t1(i); s = os *************** *** 317,325 **** t *= (1.0f / 64); ! texCoord.put(index, s); ! texCoord.put(index + 1, t); ! index += POLYGON_STRIDE; } ! gl.glDrawArrays(GL.GL_TRIANGLE_FAN, p.pos, p.numverts); } } --- 320,327 ---- t *= (1.0f / 64); ! gl.glTexCoord2f(s, t); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); } ! gl.glEnd(); } } *************** *** 522,532 **** */ void R_AddSkySurface(msurface_t fa) { - int i; - glpoly_t p; - // calculate vertex values for sky box ! for (p = fa.polys; p != null; p = p.next) { ! for (i = 0; i < p.numverts; i++) { ! Math3D.VectorSubtract(p.verts[i], r_origin, verts[i]); } ClipSkyPolygon(p.numverts, verts, 0); --- 524,533 ---- */ void R_AddSkySurface(msurface_t fa) { // calculate vertex values for sky box ! for (glpoly_t p = fa.polys; p != null; p = p.next) { ! for (int i = 0; i < p.numverts; i++) { ! verts[i][0] = p.x(i) - r_origin[0]; ! verts[i][1] = p.y(i) - r_origin[1]; ! verts[i][2] = p.z(i) - r_origin[2]; } ClipSkyPolygon(p.numverts, verts, 0); Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Surf.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Surf.java 22 Sep 2004 19:22:11 -0000 1.5 --- Surf.java 9 Jan 2005 22:36:31 -0000 1.6 *************** *** 173,192 **** */ void DrawGLFlowingPoly(glpoly_t p) { ! int i; ! float scroll; ! ! scroll = -64 * ((r_newrefdef.time / 40.0f) - (int) (r_newrefdef.time / 40.0f)); if (scroll == 0.0f) scroll = -64.0f; ! FloatBuffer texCoord = globalPolygonInterleavedBuf; ! float[][] v = p.verts; ! int index = p.pos * POLYGON_STRIDE; ! for (i = 0; i < p.numverts; i++) { ! texCoord.put(index, v[i][3] + scroll); ! index += POLYGON_STRIDE; ! } gl.glDrawArrays(GL.GL_POLYGON, p.pos, p.numverts); } --- 173,184 ---- */ void DrawGLFlowingPoly(glpoly_t p) { ! float scroll = -64 * ((r_newrefdef.time / 40.0f) - (int) (r_newrefdef.time / 40.0f)); if (scroll == 0.0f) scroll = -64.0f; ! p.beginScrolling(scroll); gl.glDrawArrays(GL.GL_POLYGON, p.pos, p.numverts); + p.endScrolling(); } *************** *** 198,205 **** */ void R_DrawTriangleOutlines() { ! int i, j; ! glpoly_t p; ! ! if (gl_showtris.value == 0) return; --- 190,194 ---- */ void R_DrawTriangleOutlines() { ! if (gl_showtris.value == 0) return; *************** *** 208,223 **** gl.glColor4f(1, 1, 1, 1); ! for (i = 0; i < MAX_LIGHTMAPS; i++) { ! msurface_t surf; ! ! for (surf = gl_lms.lightmap_surfaces[i]; surf != null; surf = surf.lightmapchain) { ! p = surf.polys; ! for (; p != null; p = p.chain) { ! for (j = 2; j < p.numverts; j++) { gl.glBegin(GL.GL_LINE_STRIP); ! gl.glVertex3fv(p.verts[0]); ! gl.glVertex3fv(p.verts[j - 1]); ! gl.glVertex3fv(p.verts[j]); ! gl.glVertex3fv(p.verts[0]); gl.glEnd(); } --- 197,209 ---- gl.glColor4f(1, 1, 1, 1); ! for (int i = 0; i < MAX_LIGHTMAPS; i++) { ! for (msurface_t surf = gl_lms.lightmap_surfaces[i]; surf != null; surf = surf.lightmapchain) { ! for (glpoly_t p = surf.polys; p != null; p = p.chain) { ! for (int j = 2; j < p.numverts; j++) { gl.glBegin(GL.GL_LINE_STRIP); ! gl.glVertex3f(p.x(0), p.y(0), p.z(0)); ! gl.glVertex3f(p.x(j-1), p.y(j-1), p.z(j-1)); ! gl.glVertex3f(p.x(j), p.y(j), p.z(j)); ! gl.glVertex3f(p.x(0), p.y(0), p.z(0)); gl.glEnd(); } *************** *** 352,356 **** intens = gl_state.inverse_intensity; ! gl.glInterleavedArrays(GL.GL_T2F_V3F, POLYGON_BYTE_STRIDE, globalPolygonInterleavedBuf); --- 338,342 ---- intens = gl_state.inverse_intensity; ! gl.glInterleavedArrays(GL.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); *************** *** 520,530 **** for (p = surf.polys; p != null; p = p.chain) { ! v = p.verts; ! index = p.pos * POLYGON_STRIDE; ! for (i = 0; i < p.numverts; i++) { ! texCoord.put(index, v[i][3] + scroll); ! index += POLYGON_STRIDE; ! } gl.glDrawArrays(GL.GL_POLYGON, p.pos, p.numverts); } } else { --- 506,512 ---- for (p = surf.polys; p != null; p = p.chain) { ! p.beginScrolling(scroll); gl.glDrawArrays(GL.GL_POLYGON, p.pos, p.numverts); + p.endScrolling(); } } else { *************** *** 552,562 **** for (p = surf.polys; p != null; p = p.chain) { ! v = p.verts; ! index = p.pos * POLYGON_STRIDE; ! for (i = 0; i < p.numverts; i++) { ! texCoord.put(index, v[i][3] + scroll); ! index += POLYGON_STRIDE; ! } gl.glDrawArrays(GL.GL_POLYGON, p.pos, p.numverts); } } else { --- 534,540 ---- for (p = surf.polys; p != null; p = p.chain) { ! p.beginScrolling(scroll); gl.glDrawArrays(GL.GL_POLYGON, p.pos, p.numverts); + p.endScrolling(); } } else { *************** *** 703,711 **** GL_SelectTexture(GL_TEXTURE0); GL_TexEnv(GL.GL_REPLACE); ! gl.glInterleavedArrays(GL.GL_T2F_V3F, POLYGON_BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(GL_TEXTURE1); GL_TexEnv(GL.GL_MODULATE); ! gl.glTexCoordPointer(2, GL.GL_FLOAT, POLYGON_BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY); --- 681,689 ---- GL_SelectTexture(GL_TEXTURE0); GL_TexEnv(GL.GL_REPLACE); ! gl.glInterleavedArrays(GL.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(GL_TEXTURE1); GL_TexEnv(GL.GL_MODULATE); ! gl.glTexCoordPointer(2, GL.GL_FLOAT, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY); *************** *** 876,883 **** GL_SelectTexture(GL_TEXTURE0); GL_TexEnv(GL.GL_REPLACE); ! gl.glInterleavedArrays(GL.GL_T2F_V3F, POLYGON_BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(GL_TEXTURE1); ! gl.glTexCoordPointer(2, GL.GL_FLOAT, POLYGON_BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY); --- 854,861 ---- GL_SelectTexture(GL_TEXTURE0); GL_TexEnv(GL.GL_REPLACE); ! gl.glInterleavedArrays(GL.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(GL_TEXTURE1); ! gl.glTexCoordPointer(2, GL.GL_FLOAT, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY); *************** *** 1075,1079 **** float[] vec; float s, t; - glpoly_t poly; float[] total = { 0, 0, 0 }; --- 1053,1056 ---- *************** *** 1087,1098 **** // draw texture // ! // poly = Hunk_Alloc (sizeof(glpoly_t) + (lnumverts-4) * ! // VERTEXSIZE*sizeof(float)); ! poly = new glpoly_t(lnumverts); poly.next = fa.polys; poly.flags = fa.flags; fa.polys = poly; - poly.numverts = lnumverts; for (i = 0; i < lnumverts; i++) { --- 1064,1072 ---- // draw texture // ! glpoly_t poly = Polygon.create(lnumverts); poly.next = fa.polys; poly.flags = fa.flags; fa.polys = poly; for (i = 0; i < lnumverts; i++) { *************** *** 1115,1121 **** Math3D.VectorAdd(total, vec, total); ! Math3D.VectorCopy(vec, poly.verts[i]); ! poly.verts[i][3] = s; ! poly.verts[i][4] = t; // --- 1089,1097 ---- Math3D.VectorAdd(total, vec, total); ! poly.x(i, vec[0]); ! poly.y(i, vec[1]); ! poly.z(i, vec[2]); ! poly.s1(i, s); ! poly.t1(i, t); // *************** *** 1136,1147 **** t /= BLOCK_HEIGHT * 16; //fa.texinfo.texture.height; ! poly.verts[i][5] = s; ! poly.verts[i][6] = t; } - - poly.numverts = lnumverts; - - precompilePolygon(poly); - } --- 1112,1118 ---- t /= BLOCK_HEIGHT * 16; //fa.texinfo.texture.height; ! poly.s2(i, s); ! poly.t2(i, t); } } *************** *** 1285,1337 **** /* ! * new functions for vertex array handling */ ! static final int POLYGON_BUFFER_SIZE = 120000; ! ! static final int POLYGON_STRIDE = 7; ! ! static final int POLYGON_BYTE_STRIDE = POLYGON_STRIDE ! * BufferUtils.SIZEOF_FLOAT; ! ! static FloatBuffer globalPolygonInterleavedBuf = BufferUtils ! .newFloatBuffer(POLYGON_BUFFER_SIZE * 7); static FloatBuffer globalPolygonTexCoord1Buf = null; static { ! globalPolygonInterleavedBuf.position(POLYGON_STRIDE - 2); globalPolygonTexCoord1Buf = globalPolygonInterleavedBuf.slice(); globalPolygonInterleavedBuf.position(0); }; ! void precompilePolygon(glpoly_t p) { ! ! p.pos = globalPolygonInterleavedBuf.position() / POLYGON_STRIDE; ! ! float[] v; ! FloatBuffer buffer = globalPolygonInterleavedBuf; ! ! for (int i = 0; i < p.verts.length; i++) { ! v = p.verts[i]; ! // textureCoord0 ! buffer.put(v[3]); ! buffer.put(v[4]); ! ! // vertex ! buffer.put(v[0]); ! buffer.put(v[1]); ! buffer.put(v[2]); ! ! // textureCoord1 ! buffer.put(v[5]); ! buffer.put(v[6]); ! } ! } ! ! public static void resetPolygonArrays() { ! globalPolygonInterleavedBuf.rewind(); ! } ! ! //ImageFrame frame; // void debugLightmap(byte[] buf, int w, int h, float scale) { --- 1256,1272 ---- /* ! * new buffers for vertex array handling */ ! static FloatBuffer globalPolygonInterleavedBuf = Polygon.getInterleavedBuffer(); static FloatBuffer globalPolygonTexCoord1Buf = null; static { ! globalPolygonInterleavedBuf.position(Polygon.STRIDE - 2); globalPolygonTexCoord1Buf = globalPolygonInterleavedBuf.slice(); globalPolygonInterleavedBuf.position(0); }; ! //ImageFrame frame; // void debugLightmap(byte[] buf, int w, int h, float scale) { --- NEW FILE: Polygon.java --- /* * Polygon.java * Copyright (C) 2003 * * $Id: Polygon.java,v 1.1 2005/01/09 22:36:31 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package jake2.render.fastjogl; import java.nio.FloatBuffer; import jake2.Defines; import jake2.render.glpoly_t; import jake2.util.Lib; /** * Polygon * * @author cwei */ public final class Polygon extends glpoly_t { private final static int MAX_POLYS = 20000; private final static int MAX_BUFFER_VERTICES = 120000; // backup for s1 scrolling private static float[] s1_old = new float[MAX_VERTICES]; private static FloatBuffer buffer = Lib.newFloatBuffer(MAX_BUFFER_VERTICES * STRIDE); private static int bufferIndex = 0; private static int polyCount = 0; private static Polygon[] polyCache = new Polygon[MAX_POLYS]; static { for (int i = 0; i < polyCache.length; i++) { polyCache[i] = new Polygon(); } } static glpoly_t create(int numverts) { Polygon poly = polyCache[polyCount++]; poly.clear(); poly.numverts = numverts; poly.pos = bufferIndex; bufferIndex += numverts; return poly; } static void reset() { polyCount = 0; bufferIndex = 0; } static FloatBuffer getInterleavedBuffer() { return (FloatBuffer)buffer.rewind(); } private Polygon() { } private final void clear() { next = null; chain = null; numverts = 0; flags = 0; } // the interleaved buffer has the format: // textureCoord0 (index 0, 1) // vertex (index 2, 3, 4) // textureCoord1 (index 5, 6) public final float x(int index) { return buffer.get((index + pos) * 7 + 2); } public final void x(int index, float value) { buffer.put((index + pos) * 7 + 2, value); } public final float y(int index) { return buffer.get((index + pos) * 7 + 3); } public final void y(int index, float value) { buffer.put((index + pos) * 7 + 3, value); } public final float z(int index) { return buffer.get((index + pos) * 7 + 4); } public final void z(int index, float value) { buffer.put((index + pos) * 7 + 4, value); } public final float s1(int index) { return buffer.get((index + pos) * 7 + 0); } public final void s1(int index, float value) { buffer.put((index + pos) * 7 + 0, value); } public final float t1(int index) { return buffer.get((index + pos) * 7 + 1); } public final void t1(int index, float value) { buffer.put((index + pos) * 7 + 1, value); } public final float s2(int index) { return buffer.get((index + pos) * 7 + 5); } public final void s2(int index, float value) { buffer.put((index + pos) * 7 + 5, value); } public final float t2(int index) { return buffer.get((index + pos) * 7 + 6); } public final void t2(int index, float value) { buffer.put((index + pos) * 7 + 6, value); } public final void beginScrolling(float scroll) { int index = pos * 7; for (int i = 0; i < numverts; i++, index+=7) { scroll += s1_old[i] = buffer.get(index); buffer.put(index, scroll); } } public final void endScrolling() { int index = pos * 7; for (int i = 0; i < numverts; i++, index+=7) { buffer.put(index, s1_old[i]); } } } Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/fastjogl/Model.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Model.java 22 Sep 2004 19:22:10 -0000 1.5 --- Model.java 9 Jan 2005 22:36:31 -0000 1.6 *************** *** 1090,1094 **** protected void R_BeginRegistration(String model) { resetModelArrays(); ! resetPolygonArrays(); cvar_t flushmap; --- 1090,1095 ---- protected void R_BeginRegistration(String model) { resetModelArrays(); ! // resetPolygonArrays(); ! Polygon.reset(); cvar_t flushmap; |
From: Carsten W. <ca...@us...> - 2005-01-09 22:35:40
|
Update of /cvsroot/jake2/jake2/src/jake2/render/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31834/src/jake2/render/lwjgl Modified Files: Warp.java Model.java Surf.java Added Files: Polygon.java Log Message: the Polygon implementation (FloatBuffer as backbuffer) and the changes to use the interface Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Warp.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Warp.java 14 Dec 2004 12:56:59 -0000 1.2 --- Warp.java 9 Jan 2005 22:35:31 -0000 1.3 *************** *** 36,39 **** --- 36,41 ---- import java.nio.FloatBuffer; + import net.java.games.jogl.GL; + import org.lwjgl.opengl.GL11; *************** *** 195,228 **** // init polys ! glpoly_t poly = new glpoly_t(numverts + 2); poly.next = warpface.polys; warpface.polys = poly; - poly.numverts = numverts + 2; Math3D.VectorClear(total); total_s = 0; total_t = 0; ! for (i=0 ; i<numverts ; i++) ! { ! Math3D.VectorCopy(verts[i], poly.verts[i+1]); ! s = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[0]); ! t = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[1]); ! ! total_s += s; ! total_t += t; ! Math3D.VectorAdd(total, verts[i], total); ! poly.verts[i+1][3] = s; ! poly.verts[i+1][4] = t; ! } ! Math3D.VectorScale(total, (1.0f/numverts), poly.verts[0]); ! poly.verts[0][3] = total_s/numverts; ! poly.verts[0][4] = total_t/numverts; ! // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); ! System.arraycopy(poly.verts[1], 0, poly.verts[i+1], 0, poly.verts[1].length); // :-) ! ! precompilePolygon(poly); } --- 197,237 ---- // init polys ! glpoly_t poly = Polygon.create(numverts + 2); poly.next = warpface.polys; warpface.polys = poly; Math3D.VectorClear(total); total_s = 0; total_t = 0; ! for (i = 0; i < numverts; i++) { ! poly.x(i + 1, verts[i][0]); ! poly.y(i + 1, verts[i][1]); ! poly.z(i + 1, verts[i][2]); ! s = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[0]); ! t = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[1]); ! total_s += s; ! total_t += t; ! Math3D.VectorAdd(total, verts[i], total); ! poly.s1(i + 1, s); ! poly.t1(i + 1, t); ! } ! ! float scale = 1.0f / numverts; ! poly.x(0, total[0] * scale); ! poly.y(0, total[1] * scale); ! poly.z(0, total[2] * scale); ! poly.s1(0, total_s * scale); ! poly.t1(0, total_t * scale); ! // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); ! poly.x(i + 1, poly.x(1)); ! poly.y(i + 1, poly.y(1)); ! poly.z(i + 1, poly.z(1)); ! poly.s1(i + 1, poly.s1(1)); ! poly.t1(i + 1, poly.t1(1)); ! poly.s2(i + 1, poly.s2(1)); ! poly.t2(i + 1, poly.t2(1)); } *************** *** 300,329 **** scroll = 0; ! int index; ! FloatBuffer texCoord = globalPolygonInterleavedBuf; ! for (bp=fa.polys ; bp != null ; bp=bp.next) ! { ! p = bp; ! index = p.pos * POLYGON_STRIDE; ! for (i=0; i<p.numverts ; i++) ! { ! v = p.verts[i]; ! os = v[3]; ! ot = v[4]; ! s = os + Warp.SIN[(int)((ot * 0.125f + r_newrefdef.time) * TURBSCALE) & 255]; ! s += scroll; ! s *= (1.0f/64); ! t = ot + Warp.SIN[(int)((os * 0.125f + rdt) * TURBSCALE) & 255]; ! t *= (1.0f/64); ! texCoord.put(index, s); ! texCoord.put(index + 1, t); ! index += POLYGON_STRIDE; ! } ! gl.glDrawArrays(GL11.GL_TRIANGLE_FAN, p.pos, p.numverts); ! } } --- 309,334 ---- scroll = 0; ! for (bp = fa.polys; bp != null; bp = bp.next) { ! p = bp; ! gl.glBegin(GL11.GL_TRIANGLE_FAN); ! for (i = 0; i < p.numverts; i++) { ! os = p.s1(i); ! ot = p.t1(i); ! s = os ! + Warp.SIN[(int) ((ot * 0.125f + r_newrefdef.time) * TURBSCALE) & 255]; ! s += scroll; ! s *= (1.0f / 64); ! t = ot ! + Warp.SIN[(int) ((os * 0.125f + rdt) * TURBSCALE) & 255]; ! t *= (1.0f / 64); ! gl.glTexCoord2f(s, t); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); ! } ! gl.glEnd(); ! } } *************** *** 555,571 **** void R_AddSkySurface(msurface_t fa) { ! int i; ! glpoly_t p; ! ! // calculate vertex values for sky box ! for (p=fa.polys ; p != null ; p=p.next) ! { ! for (i=0 ; i < p.numverts ; i++) ! { ! Math3D.VectorSubtract(p.verts[i], r_origin, verts[i]); ! } ! ClipSkyPolygon (p.numverts, verts, 0); ! } ! } --- 560,573 ---- void R_AddSkySurface(msurface_t fa) { ! // calculate vertex values for sky box ! for (glpoly_t p = fa.polys; p != null; p = p.next) { ! for (int i = 0; i < p.numverts; i++) { ! verts[i][0] = p.x(i) - r_origin[0]; ! verts[i][1] = p.y(i) - r_origin[1]; ! verts[i][2] = p.z(i) - r_origin[2]; ! } ! ClipSkyPolygon(p.numverts, verts, 0); ! } ! } Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Surf.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Surf.java 16 Dec 2004 21:55:58 -0000 1.4 --- Surf.java 9 Jan 2005 22:35:31 -0000 1.5 *************** *** 48,51 **** --- 48,53 ---- import java.util.Arrays; + import net.java.games.jogl.GL; + import org.lwjgl.BufferUtils; import org.lwjgl.opengl.GL11; *************** *** 175,187 **** if(scroll == 0.0f) scroll = -64.0f; ! ! FloatBuffer texCoord = globalPolygonInterleavedBuf; ! float[][] v = p.verts; ! int index = p.pos * POLYGON_STRIDE; ! for (i=0 ; i<p.numverts ; i++) { ! texCoord.put(index, v[i][3] + scroll); ! index += POLYGON_STRIDE; ! } gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); } // PGM --- 177,183 ---- if(scroll == 0.0f) scroll = -64.0f; ! p.beginScrolling(scroll); gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); + p.endScrolling(); } // PGM *************** *** 193,235 **** void R_DrawTriangleOutlines() { ! int i, j; ! glpoly_t p; ! ! if (gl_showtris.value == 0) ! return; ! ! gl.glDisable (GL11.GL_TEXTURE_2D); ! gl.glDisable (GL11.GL_DEPTH_TEST); ! gl.glColor4f (1,1,1,1); ! for (i=0 ; i<MAX_LIGHTMAPS ; i++) ! { ! msurface_t surf; ! for ( surf = gl_lms.lightmap_surfaces[i]; surf != null; surf = surf.lightmapchain ) ! { ! p = surf.polys; ! for ( ; p != null ; p=p.chain) ! { ! for (j=2 ; j<p.numverts ; j++ ) ! { ! float[] pverts0=p.verts[0]; ! float[] pvertsjm1=p.verts[j-1]; ! float[] pvertsj=p.verts[j]; ! ! ! gl.glBegin (GL11.GL_LINE_STRIP); ! gl.glVertex3f (pverts0[0],pverts0[1],pverts0[2]); ! gl.glVertex3f (pvertsjm1[0],pvertsjm1[1],pvertsjm1[2]); ! gl.glVertex3f (pvertsj[0],pvertsj[1],pvertsj[2]); ! gl.glVertex3f (pverts0[0],pverts0[1],pverts0[2]); ! gl.glEnd (); ! } ! } ! } ! } ! gl.glEnable (GL11.GL_DEPTH_TEST); ! gl.glEnable (GL11.GL_TEXTURE_2D); } --- 189,216 ---- void R_DrawTriangleOutlines() { ! if (gl_showtris.value == 0) ! return; ! gl.glDisable(GL11.GL_TEXTURE_2D); ! gl.glDisable(GL11.GL_DEPTH_TEST); ! gl.glColor4f(1, 1, 1, 1); ! for (int i = 0; i < MAX_LIGHTMAPS; i++) { ! for (msurface_t surf = gl_lms.lightmap_surfaces[i]; surf != null; surf = surf.lightmapchain) { ! for (glpoly_t p = surf.polys; p != null; p = p.chain) { ! for (int j = 2; j < p.numverts; j++) { ! gl.glBegin(GL11.GL_LINE_STRIP); ! gl.glVertex3f(p.x(0), p.y(0), p.z(0)); ! gl.glVertex3f(p.x(j-1), p.y(j-1), p.z(j-1)); ! gl.glVertex3f(p.x(j), p.y(j), p.z(j)); ! gl.glVertex3f(p.x(0), p.y(0), p.z(0)); ! gl.glEnd(); ! } ! } ! } ! } ! gl.glEnable(GL11.GL_DEPTH_TEST); ! gl.glEnable(GL11.GL_TEXTURE_2D); } *************** *** 376,380 **** intens = gl_state.inverse_intensity; ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, POLYGON_BYTE_STRIDE, globalPolygonInterleavedBuf); for (s=r_alpha_surfaces ; s != null ; s=s.texturechain) --- 357,361 ---- intens = gl_state.inverse_intensity; ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); for (s=r_alpha_surfaces ; s != null ; s=s.texturechain) *************** *** 558,568 **** for ( p = surf.polys; p != null; p = p.chain ) { ! v = p.verts; ! index = p.pos * POLYGON_STRIDE; ! for (i=0 ; i<p.numverts ; i++) { ! texCoord.put(index, v[i][3] + scroll); ! index += POLYGON_STRIDE; ! } gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); } } --- 539,545 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! p.beginScrolling(scroll); gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); + p.endScrolling(); } } *************** *** 596,606 **** for ( p = surf.polys; p != null; p = p.chain ) { ! v = p.verts; ! index = p.pos * POLYGON_STRIDE; ! for (i=0 ; i<p.numverts ; i++) { ! texCoord.put(index, v[i][3] + scroll); ! index += POLYGON_STRIDE; ! } gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); } } --- 573,579 ---- for ( p = surf.polys; p != null; p = p.chain ) { ! p.beginScrolling(scroll); gl.glDrawArrays(GL11.GL_POLYGON, p.pos, p.numverts); + p.endScrolling(); } } *************** *** 767,774 **** GL_SelectTexture(GL_TEXTURE0); GL_TexEnv( GL11.GL_REPLACE ); ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, POLYGON_BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(GL_TEXTURE1); GL_TexEnv( GL11.GL_MODULATE ); ! gl.glTexCoordPointer(2, POLYGON_BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); --- 740,747 ---- GL_SelectTexture(GL_TEXTURE0); GL_TexEnv( GL11.GL_REPLACE ); ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture(GL_TEXTURE1); GL_TexEnv( GL11.GL_MODULATE ); ! gl.glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); *************** *** 957,963 **** GL_SelectTexture( GL_TEXTURE0); GL_TexEnv( GL11.GL_REPLACE ); ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, POLYGON_BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture( GL_TEXTURE1); ! gl.glTexCoordPointer(2, POLYGON_BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); --- 930,936 ---- GL_SelectTexture( GL_TEXTURE0); GL_TexEnv( GL11.GL_REPLACE ); ! gl.glInterleavedArrays(GL11.GL_T2F_V3F, Polygon.BYTE_STRIDE, globalPolygonInterleavedBuf); GL_SelectTexture( GL_TEXTURE1); ! gl.glTexCoordPointer(2, Polygon.BYTE_STRIDE, globalPolygonTexCoord1Buf); gl.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); *************** *** 1183,1187 **** float[] vec; float s, t; - glpoly_t poly; float[] total = {0, 0, 0}; --- 1156,1159 ---- *************** *** 1196,1205 **** // // poly = Hunk_Alloc (sizeof(glpoly_t) + (lnumverts-4) * VERTEXSIZE*sizeof(float)); ! poly = new glpoly_t(lnumverts); poly.next = fa.polys; poly.flags = fa.flags; fa.polys = poly; - poly.numverts = lnumverts; for (i=0 ; i<lnumverts ; i++) --- 1168,1176 ---- // // poly = Hunk_Alloc (sizeof(glpoly_t) + (lnumverts-4) * VERTEXSIZE*sizeof(float)); ! glpoly_t poly = Polygon.create(lnumverts); poly.next = fa.polys; poly.flags = fa.flags; fa.polys = poly; for (i=0 ; i<lnumverts ; i++) *************** *** 1224,1230 **** Math3D.VectorAdd (total, vec, total); ! Math3D.VectorCopy (vec, poly.verts[i]); ! poly.verts[i][3] = s; ! poly.verts[i][4] = t; // --- 1195,1207 ---- Math3D.VectorAdd (total, vec, total); ! //Math3D.VectorCopy (vec, poly.verts[i]); ! poly.x(i, vec[0]); ! poly.y(i, vec[1]); ! poly.z(i, vec[2]); ! ! //poly.verts[i][3] = s; ! //poly.verts[i][4] = t; ! poly.s1(i, s); ! poly.t1(i, t); // *************** *** 1243,1254 **** t /= BLOCK_HEIGHT*16; //fa.texinfo.texture.height; ! poly.verts[i][5] = s; ! poly.verts[i][6] = t; } - - poly.numverts = lnumverts; - - precompilePolygon(poly); - } --- 1220,1228 ---- t /= BLOCK_HEIGHT*16; //fa.texinfo.texture.height; ! // poly.verts[i][5] = s; ! // poly.verts[i][6] = t; ! poly.s2(i, s); ! poly.t2(i, t); } } *************** *** 1414,1461 **** /* ! * new functions for vertex array handling */ ! static final int POLYGON_BUFFER_SIZE = 120000; ! static final int POLYGON_STRIDE = 7; ! static final int POLYGON_BYTE_STRIDE = POLYGON_STRIDE * Lib.SIZEOF_FLOAT; ! ! static FloatBuffer globalPolygonInterleavedBuf = BufferUtils.createFloatBuffer(POLYGON_BUFFER_SIZE * 7); static FloatBuffer globalPolygonTexCoord1Buf = null; static { ! globalPolygonInterleavedBuf.position(POLYGON_STRIDE - 2); globalPolygonTexCoord1Buf = globalPolygonInterleavedBuf.slice(); globalPolygonInterleavedBuf.position(0); }; - void precompilePolygon(glpoly_t p) { - - p.pos = globalPolygonInterleavedBuf.position() / POLYGON_STRIDE; - - float[] v; - FloatBuffer buffer = globalPolygonInterleavedBuf; - - for (int i = 0; i < p.verts.length; i++) { - v = p.verts[i]; - // textureCoord0 - buffer.put(v[3]); - buffer.put(v[4]); - - // vertex - buffer.put(v[0]); - buffer.put(v[1]); - buffer.put(v[2]); - - // textureCoord1 - buffer.put(v[5]); - buffer.put(v[6]); - } - } - - public static void resetPolygonArrays() { - globalPolygonInterleavedBuf.rewind(); - globalPolygonTexCoord1Buf.rewind(); - } - //ImageFrame frame; --- 1388,1402 ---- /* ! * new buffers for vertex array handling */ ! static FloatBuffer globalPolygonInterleavedBuf = Polygon.getInterleavedBuffer(); static FloatBuffer globalPolygonTexCoord1Buf = null; static { ! globalPolygonInterleavedBuf.position(Polygon.STRIDE - 2); globalPolygonTexCoord1Buf = globalPolygonInterleavedBuf.slice(); globalPolygonInterleavedBuf.position(0); }; //ImageFrame frame; --- NEW FILE: Polygon.java --- /* * Polygon.java * Copyright (C) 2003 * * $Id: Polygon.java,v 1.1 2005/01/09 22:35:31 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package jake2.render.lwjgl; import java.nio.FloatBuffer; import jake2.Defines; import jake2.render.glpoly_t; import jake2.util.Lib; /** * Polygon * * @author cwei */ public final class Polygon extends glpoly_t { private final static int MAX_POLYS = 20000; private final static int MAX_BUFFER_VERTICES = 120000; // backup for s1 scrolling private static float[] s1_old = new float[MAX_VERTICES]; private static FloatBuffer buffer = Lib.newFloatBuffer(MAX_BUFFER_VERTICES * STRIDE); private static int bufferIndex = 0; private static int polyCount = 0; private static Polygon[] polyCache = new Polygon[MAX_POLYS]; static { for (int i = 0; i < polyCache.length; i++) { polyCache[i] = new Polygon(); } } static glpoly_t create(int numverts) { Polygon poly = polyCache[polyCount++]; poly.clear(); poly.numverts = numverts; poly.pos = bufferIndex; bufferIndex += numverts; return poly; } static void reset() { polyCount = 0; bufferIndex = 0; } static FloatBuffer getInterleavedBuffer() { return (FloatBuffer)buffer.rewind(); } private Polygon() { } private final void clear() { next = null; chain = null; numverts = 0; flags = 0; } // the interleaved buffer has the format: // textureCoord0 (index 0, 1) // vertex (index 2, 3, 4) // textureCoord1 (index 5, 6) public final float x(int index) { return buffer.get((index + pos) * 7 + 2); } public final void x(int index, float value) { buffer.put((index + pos) * 7 + 2, value); } public final float y(int index) { return buffer.get((index + pos) * 7 + 3); } public final void y(int index, float value) { buffer.put((index + pos) * 7 + 3, value); } public final float z(int index) { return buffer.get((index + pos) * 7 + 4); } public final void z(int index, float value) { buffer.put((index + pos) * 7 + 4, value); } public final float s1(int index) { return buffer.get((index + pos) * 7 + 0); } public final void s1(int index, float value) { buffer.put((index + pos) * 7 + 0, value); } public final float t1(int index) { return buffer.get((index + pos) * 7 + 1); } public final void t1(int index, float value) { buffer.put((index + pos) * 7 + 1, value); } public final float s2(int index) { return buffer.get((index + pos) * 7 + 5); } public final void s2(int index, float value) { buffer.put((index + pos) * 7 + 5, value); } public final float t2(int index) { return buffer.get((index + pos) * 7 + 6); } public final void t2(int index, float value) { buffer.put((index + pos) * 7 + 6, value); } public final void beginScrolling(float scroll) { int index = pos * 7; for (int i = 0; i < numverts; i++, index+=7) { scroll += s1_old[i] = buffer.get(index); buffer.put(index, scroll); } } public final void endScrolling() { int index = pos * 7; for (int i = 0; i < numverts; i++, index+=7) { buffer.put(index, s1_old[i]); } } } Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/lwjgl/Model.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Model.java 16 Dec 2004 21:55:58 -0000 1.3 --- Model.java 9 Jan 2005 22:35:31 -0000 1.4 *************** *** 1173,1178 **** { resetModelArrays(); ! resetPolygonArrays(); ! cvar_t flushmap; --- 1173,1178 ---- { resetModelArrays(); ! Polygon.reset(); ! cvar_t flushmap; *************** *** 1262,1267 **** } GL_FreeUnusedImages(); - resetPolygonArrays(); - //modelMemoryUsage(); } --- 1262,1265 ---- |
From: Carsten W. <ca...@us...> - 2005-01-09 22:34:38
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31562/src/jake2/render/jogl Modified Files: Warp.java Model.java Surf.java Added Files: Polygon.java Log Message: the Polygon implementation (float[] as backbuffer) and the changes to use the interface Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Warp.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Warp.java 22 Sep 2004 19:22:16 -0000 1.7 --- Warp.java 9 Jan 2005 22:34:21 -0000 1.8 *************** *** 198,211 **** // init polys ! glpoly_t poly = new glpoly_t(numverts + 2); poly.next = warpface.polys; warpface.polys = poly; - poly.numverts = numverts + 2; Math3D.VectorClear(total); total_s = 0; total_t = 0; for (i = 0; i < numverts; i++) { ! Math3D.VectorCopy(verts[i], poly.verts[i + 1]); s = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[0]); t = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[1]); --- 198,213 ---- // init polys ! glpoly_t poly = Polygon.create(numverts + 2); poly.next = warpface.polys; warpface.polys = poly; Math3D.VectorClear(total); total_s = 0; total_t = 0; for (i = 0; i < numverts; i++) { ! //Math3D.VectorCopy(verts[i], poly.verts[i + 1]); ! poly.x(i + 1, verts[i][0]); ! poly.y(i + 1, verts[i][1]); ! poly.z(i + 1, verts[i][2]); s = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[0]); t = Math3D.DotProduct(verts[i], warpface.texinfo.vecs[1]); *************** *** 215,229 **** Math3D.VectorAdd(total, verts[i], total); ! poly.verts[i + 1][3] = s; ! poly.verts[i + 1][4] = t; } ! ! Math3D.VectorScale(total, (1.0f / numverts), poly.verts[0]); ! poly.verts[0][3] = total_s / numverts; ! poly.verts[0][4] = total_t / numverts; // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); ! System.arraycopy(poly.verts[1], 0, poly.verts[i + 1], 0, ! poly.verts[1].length); // :-) } --- 217,241 ---- Math3D.VectorAdd(total, verts[i], total); ! poly.s1(i + 1, s); ! poly.t1(i + 1, t); } ! ! float scale = 1.0f / numverts; ! poly.x(0, total[0] * scale); ! poly.y(0, total[1] * scale); ! poly.z(0, total[2] * scale); ! poly.s1(0, total_s * scale); ! poly.t1(0, total_t * scale); // memcpy (poly.verts[i+1], poly.verts[1], sizeof(poly.verts[0])); ! // System.arraycopy(poly.verts[1], 0, poly.verts[i + 1], 0, ! // poly.verts[1].length); // :-) ! poly.x(i + 1, poly.x(1)); ! poly.y(i + 1, poly.y(1)); ! poly.z(i + 1, poly.z(1)); ! poly.s1(i + 1, poly.s1(1)); ! poly.t1(i + 1, poly.t1(1)); ! poly.s2(i + 1, poly.s2(1)); ! poly.t2(i + 1, poly.t2(1)); } *************** *** 278,282 **** void EmitWaterPolys(msurface_t fa) { glpoly_t p, bp; - float[] v; int i; float s = 0; --- 290,293 ---- *************** *** 296,302 **** gl.glBegin(GL.GL_TRIANGLE_FAN); for (i = 0; i < p.numverts; i++) { ! v = p.verts[i]; ! os = v[3]; ! ot = v[4]; s = os --- 307,312 ---- gl.glBegin(GL.GL_TRIANGLE_FAN); for (i = 0; i < p.numverts; i++) { ! os = p.s1(i); ! ot = p.t1(i); s = os *************** *** 310,314 **** gl.glTexCoord2f(s, t); ! gl.glVertex3f(v[0], v[1], v[2]); } gl.glEnd(); --- 320,324 ---- gl.glTexCoord2f(s, t); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); } gl.glEnd(); *************** *** 519,523 **** for (p = fa.polys; p != null; p = p.next) { for (i = 0; i < p.numverts; i++) { ! Math3D.VectorSubtract(p.verts[i], r_origin, verts[i]); } ClipSkyPolygon(p.numverts, verts, 0); --- 529,536 ---- for (p = fa.polys; p != null; p = p.next) { for (i = 0; i < p.numverts; i++) { ! //Math3D.VectorSubtract(p.verts[i], r_origin, verts[i]); ! verts[i][0] = p.x(i) - r_origin[0]; ! verts[i][1] = p.y(i) - r_origin[1]; ! verts[i][2] = p.z(i) - r_origin[2]; } ClipSkyPolygon(p.numverts, verts, 0); Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Surf.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Surf.java 16 Jul 2004 10:11:35 -0000 1.5 --- Surf.java 9 Jan 2005 22:34:21 -0000 1.6 *************** *** 155,167 **** void DrawGLPoly(glpoly_t p) { - int i; - float[] v; - gl.glBegin(GL.GL_POLYGON); ! for (i=0 ; i<p.numverts ; i++) { ! v = p.verts[i]; ! gl.glTexCoord2f(v[3], v[4]); ! gl.glVertex3f(v[0], v[1], v[2]); } gl.glEnd(); --- 155,163 ---- void DrawGLPoly(glpoly_t p) { gl.glBegin(GL.GL_POLYGON); ! for (int i=0 ; i<p.numverts ; i++) { ! gl.glTexCoord2f(p.s1(i), p.t1(i)); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); } gl.glEnd(); *************** *** 177,197 **** void DrawGLFlowingPoly(msurface_t fa) { ! int i; ! float[] v; ! glpoly_t p; ! float scroll; ! ! p = fa.polys; ! ! scroll = -64 * ( (r_newrefdef.time / 40.0f) - (int)(r_newrefdef.time / 40.0f) ); if(scroll == 0.0f) scroll = -64.0f; gl.glBegin (GL.GL_POLYGON); ! for (i=0 ; i<p.numverts ; i++) { ! v = p.verts[i]; ! gl.glTexCoord2f ((v[3] + scroll), v[4]); ! gl.glVertex3f(v[0], v[1], v[2]); } gl.glEnd (); --- 173,186 ---- void DrawGLFlowingPoly(msurface_t fa) { ! float scroll = -64 * ( (r_newrefdef.time / 40.0f) - (int)(r_newrefdef.time / 40.0f) ); if(scroll == 0.0f) scroll = -64.0f; gl.glBegin (GL.GL_POLYGON); ! glpoly_t p = fa.polys; ! for (int i=0 ; i<p.numverts ; i++) { ! gl.glTexCoord2f(p.s1(i) + scroll, p.t1(i)); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); } gl.glEnd (); *************** *** 205,211 **** void R_DrawTriangleOutlines() { - int i, j; - glpoly_t p; - if (gl_showtris.value == 0) return; --- 194,197 ---- *************** *** 215,219 **** gl.glColor4f (1,1,1,1); ! for (i=0 ; i<MAX_LIGHTMAPS ; i++) { msurface_t surf; --- 201,205 ---- gl.glColor4f (1,1,1,1); ! for (int i=0 ; i<MAX_LIGHTMAPS ; i++) { msurface_t surf; *************** *** 221,234 **** for ( surf = gl_lms.lightmap_surfaces[i]; surf != null; surf = surf.lightmapchain ) { ! p = surf.polys; for ( ; p != null ; p=p.chain) { ! for (j=2 ; j<p.numverts ; j++ ) { gl.glBegin (GL.GL_LINE_STRIP); ! gl.glVertex3fv (p.verts[0]); ! gl.glVertex3fv (p.verts[j-1]); ! gl.glVertex3fv (p.verts[j]); ! gl.glVertex3fv (p.verts[0]); gl.glEnd (); } --- 207,220 ---- for ( surf = gl_lms.lightmap_surfaces[i]; surf != null; surf = surf.lightmapchain ) { ! glpoly_t p = surf.polys; for ( ; p != null ; p=p.chain) { ! for (int j=2 ; j<p.numverts ; j++ ) { gl.glBegin (GL.GL_LINE_STRIP); ! gl.glVertex3f(p.x(0), p.y(0), p.z(0)); ! gl.glVertex3f(p.x(j-1), p.y(j-1), p.z(j-1)); ! gl.glVertex3f(p.x(j), p.y(j), p.z(j)); ! gl.glVertex3f(p.x(0), p.y(0), p.z(0)); gl.glEnd (); } *************** *** 236,240 **** } } - gl.glEnable (GL.GL_DEPTH_TEST); gl.glEnable (GL.GL_TEXTURE_2D); --- 222,225 ---- *************** *** 250,262 **** for ( ; p != null; p = p.chain ) { - float[] v; - int j; - gl.glBegin(GL.GL_POLYGON); ! for (j=0 ; j<p.numverts ; j++) { ! v = p.verts[j]; ! gl.glTexCoord2f (v[5], v[6] ); ! gl.glVertex3f(v[0], v[1], v[2]); } gl.glEnd(); --- 235,243 ---- for ( ; p != null; p = p.chain ) { gl.glBegin(GL.GL_POLYGON); ! for (int j=0 ; j<p.numverts ; j++) { ! gl.glTexCoord2f (p.s2(j), p.t2(j)); ! gl.glVertex3f(p.x(j), p.y(j), p.z(j)); } gl.glEnd(); *************** *** 267,279 **** for ( ; p != null; p = p.chain ) { - float[] v; - int j; - gl.glBegin(GL.GL_POLYGON); ! for (j=0 ; j<p.numverts ; j++) { ! v = p.verts[j]; ! gl.glTexCoord2f (v[5] - soffset, v[6] - toffset ); ! gl.glVertex3f(v[0], v[1], v[2]); } gl.glEnd(); --- 248,256 ---- for ( ; p != null; p = p.chain ) { gl.glBegin(GL.GL_POLYGON); ! for (int j=0 ; j<p.numverts ; j++) { ! gl.glTexCoord2f (p.s2(j) - soffset, p.t2(j) - toffset); ! gl.glVertex3f(p.x(j), p.y(j), p.z(j)); } gl.glEnd(); *************** *** 804,814 **** for (i=0 ; i< nv; i++) { ! v = p.verts[i]; ! ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, (v[3] + scroll), v[4]); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, v[5], v[6]); ! //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); ! gl.glVertex3f(v[0], v[1], v[2]); } gl.glEnd (); --- 781,789 ---- for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, p.s1(i) + scroll, p.t1(i)); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, p.s2(i), p.t2(i)); ! //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3] + scroll, v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); } gl.glEnd (); *************** *** 822,832 **** for (i=0 ; i< nv; i++) { ! v = p.verts[i]; ! ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, v[3], v[4]); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, v[5], v[6]); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); ! gl.glVertex3f(v[0], v[1], v[2]); } gl.glEnd (); --- 797,805 ---- for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, p.s1(i), p.t1(i)); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); } gl.glEnd (); *************** *** 858,868 **** for (i=0 ; i< nv; i++) { ! v = p.verts[i]; ! ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, (v[3]+scroll), v[4]); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, v[5], v[6]); ! // qglMTexCoord2fSGIS( GL_TEXTURE0, (v[3]+scroll), v[4]); ! // qglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); ! gl.glVertex3f(v[0], v[1], v[2]); } gl.glEnd(); --- 831,839 ---- for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, p.s1(i) + scroll, p.t1(i)); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, p.s2(i), p.t2(i)); ! //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3] + scroll, v[4]); ! //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); } gl.glEnd(); *************** *** 878,888 **** for (i=0 ; i< nv; i++) { ! v = p.verts[i]; ! ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, v[3], v[4]); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, v[5], v[6]); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); ! gl.glVertex3f(v[0], v[1], v[2]); } gl.glEnd (); --- 849,857 ---- for (i=0 ; i< nv; i++) { ! gl.glMultiTexCoord2fARB(GL_TEXTURE0, p.s1(i), p.t1(i)); ! gl.glMultiTexCoord2fARB(GL_TEXTURE1, p.s2(i), p.t2(i)); //gglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]); //gglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]); ! gl.glVertex3f(p.x(i), p.y(i), p.z(i)); } gl.glEnd (); *************** *** 1478,1487 **** // // poly = Hunk_Alloc (sizeof(glpoly_t) + (lnumverts-4) * VERTEXSIZE*sizeof(float)); ! poly = new glpoly_t(lnumverts); poly.next = fa.polys; poly.flags = fa.flags; fa.polys = poly; - poly.numverts = lnumverts; for (i=0 ; i<lnumverts ; i++) --- 1447,1455 ---- // // poly = Hunk_Alloc (sizeof(glpoly_t) + (lnumverts-4) * VERTEXSIZE*sizeof(float)); ! poly = Polygon.create(lnumverts); poly.next = fa.polys; poly.flags = fa.flags; fa.polys = poly; for (i=0 ; i<lnumverts ; i++) *************** *** 1506,1512 **** Math3D.VectorAdd (total, vec, total); ! Math3D.VectorCopy (vec, poly.verts[i]); ! poly.verts[i][3] = s; ! poly.verts[i][4] = t; // --- 1474,1486 ---- Math3D.VectorAdd (total, vec, total); ! //Math3D.VectorCopy (vec, poly.verts[i]); ! poly.x(i, vec[0]); ! poly.y(i, vec[1]); ! poly.z(i, vec[2]); ! ! //poly.verts[i][3] = s; ! //poly.verts[i][4] = t; ! poly.s1(i, s); ! poly.t1(i, t); // *************** *** 1525,1534 **** t /= BLOCK_HEIGHT*16; //fa.texinfo.texture.height; ! poly.verts[i][5] = s; ! poly.verts[i][6] = t; } - - poly.numverts = lnumverts; - } --- 1499,1507 ---- t /= BLOCK_HEIGHT*16; //fa.texinfo.texture.height; ! //poly.verts[i][5] = s; ! //poly.verts[i][6] = t; ! poly.s2(i, s); ! poly.t2(i, t); } } --- NEW FILE: Polygon.java --- /* * Polygon.java * Copyright (C) 2003 * * $Id: Polygon.java,v 1.1 2005/01/09 22:34:21 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package jake2.render.jogl; import jake2.render.glpoly_t; /** * Polygon * * @author cwei */ public final class Polygon extends glpoly_t { private final static int MAXPOLYS = 20000; private final static int MAX_BUFFER_VERTICES = 120000; private static float[] buffer = new float[MAX_BUFFER_VERTICES * STRIDE]; private static int bufferIndex = 0; private static int polyCount = 0; private static Polygon[] polyCache = new Polygon[MAXPOLYS]; static { for (int i = 0; i < polyCache.length; i++) { polyCache[i] = new Polygon(); } } public static glpoly_t create(int numverts) { Polygon poly = polyCache[polyCount++]; poly.clear(); poly.numverts = numverts; poly.pos = bufferIndex; bufferIndex += numverts; return poly; } public static void reset() { polyCount = 0; bufferIndex = 0; } private Polygon() { } private final void clear() { next = null; chain = null; numverts = 0; flags = 0; } public final float x(int index) { return buffer[(index + pos) * 7 + 0]; } public final void x(int index, float value) { buffer[(index + pos) * 7 + 0] = value; } public final float y(int index) { return buffer[(index + pos) * 7 + 1]; } public final void y(int index, float value) { buffer[(index + pos) * 7 + 1] = value; } public final float z(int index) { return buffer[(index + pos) * 7 + 2]; } public final void z(int index, float value) { buffer[(index + pos) * 7 + 2] = value; } public final float s1(int index) { return buffer[(index + pos) * 7 + 3]; } public final void s1(int index, float value) { buffer[(index + pos) * 7 + 3] = value; } public final float t1(int index) { return buffer[(index + pos) * 7 + 4]; } public final void t1(int index, float value) { buffer[(index + pos) * 7 + 4] = value; } public final float s2(int index) { return buffer[(index + pos) * 7 + 5]; } public final void s2(int index, float value) { buffer[(index + pos) * 7 + 5] = value; } public final float t2(int index) { return buffer[(index + pos) * 7 + 6]; } public final void t2(int index, float value) { buffer[(index + pos) * 7 + 6] = value; } public final void beginScrolling(float value) { // not in use } public final void endScrolling() { // not in use } } Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Model.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Model.java 16 Jul 2004 10:11:35 -0000 1.4 --- Model.java 9 Jan 2005 22:34:21 -0000 1.5 *************** *** 1150,1153 **** --- 1150,1155 ---- { cvar_t flushmap; + + Polygon.reset(); registration_sequence++; |
From: Carsten W. <ca...@us...> - 2005-01-09 22:32:19
|
Update of /cvsroot/jake2/jake2/src/jake2/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31107/src/jake2/render Modified Files: glpoly_t.java Log Message: abstract glpoly_t to hide the implementation; this was done to reduce the memory usage of lwjgl and fastjogl Renderer Index: glpoly_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/glpoly_t.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** glpoly_t.java 9 Jul 2004 06:50:47 -0000 1.2 --- glpoly_t.java 9 Jan 2005 22:32:10 -0000 1.3 *************** *** 24,46 **** package jake2.render; ! public class glpoly_t { ! public final static int VERTEXSIZE = 7; public glpoly_t next; public glpoly_t chain; public int numverts; public int flags; // for SURF_UNDERWATER (not needed anymore?) - public float verts[][] = null; // variable sized (xyz s1t1 s2t2) - public glpoly_t(int numverts) { - this.verts = new float[numverts][VERTEXSIZE]; - } - - /* - * vertex array extension - */ - // the array position (glDrawArrays) public int pos = 0; ! } --- 24,75 ---- package jake2.render; ! import jake2.util.Lib; + public abstract class glpoly_t { + public final static int STRIDE = 7; + public final static int BYTE_STRIDE = 7 * Lib.SIZEOF_FLOAT; + public final static int MAX_VERTICES = 64; + public glpoly_t next; public glpoly_t chain; public int numverts; public int flags; // for SURF_UNDERWATER (not needed anymore?) // the array position (glDrawArrays) public int pos = 0; ! protected glpoly_t() { ! } ! ! public abstract float x(int index); ! ! public abstract void x(int index, float value); ! ! public abstract float y(int index); ! ! public abstract void y(int index, float value); ! ! public abstract float z(int index); ! ! public abstract void z(int index, float value); ! ! public abstract float s1(int index); ! ! public abstract void s1(int index, float value); ! ! public abstract float t1(int index); ! ! public abstract void t1(int index, float value); ! ! public abstract float s2(int index); ! ! public abstract void s2(int index, float value); ! ! public abstract float t2(int index); ! ! public abstract void t2(int index, float value); ! ! public abstract void beginScrolling(float s1); ! ! public abstract void endScrolling(); ! } \ No newline at end of file |
From: Holger Z. <hz...@us...> - 2005-01-07 14:21:29
|
Update of /cvsroot/jake2/jake2/webstart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14622/webstart Modified Files: jake2_lwjgl.jnlp Log Message: add lwjgl OS X libs to webstart config Index: jake2_lwjgl.jnlp =================================================================== RCS file: /cvsroot/jake2/jake2/webstart/jake2_lwjgl.jnlp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jake2_lwjgl.jnlp 20 Dec 2004 12:39:09 -0000 1.1 --- jake2_lwjgl.jnlp 7 Jan 2005 14:21:19 -0000 1.2 *************** *** 35,38 **** --- 35,43 ---- </resources> + <resources os="Mac OS X"> + <j2se version="1.4+" max-heap-size="128M"/> + <nativelib href="http://jake2.sourceforge.net/lib/osx/lwjgl-native.jar"/> + </resources> + <application-desc main-class="jake2.Jake2"> <argument>+set</argument> |