From: Carsten W. <ca...@us...> - 2005-12-06 14:37:54
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12171/src/jake2/client Modified Files: CL.java Log Message: stop cinematics while disconnect; code cleanup; javadoc comments; Index: CL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** CL.java 3 Dec 2005 19:41:20 -0000 1.25 --- CL.java 6 Dec 2005 14:37:43 -0000 1.26 *************** *** 33,37 **** import jake2.sound.S; import jake2.sys.*; ! import jake2.util.*; import java.io.IOException; --- 33,39 ---- import jake2.sound.S; import jake2.sys.*; ! import jake2.util.Lib; ! import jake2.util.Math3D; ! import jake2.util.Vargs; import java.io.IOException; *************** *** 57,65 **** public static final int PLAYER_MULT = 5; - /* - * ================== CL_FixCvarCheats - * - * ================== - */ public static class cheatvar_t { String name; --- 59,62 ---- *************** *** 90,97 **** static int numcheatvars; ! /* ! * ==================== CL_Stop_f * ! * stop recording a demo ==================== */ static xcommand_t Stop_f = new xcommand_t() { --- 87,94 ---- static int numcheatvars; ! /** ! * Stop_f * ! * Stop recording a demo. */ static xcommand_t Stop_f = new xcommand_t() { *************** *** 118,130 **** }; - /* - * ==================== CL_Record_f - * - * record <demoname> - * - * Begins recording a demo from the current position ==================== - */ static entity_state_t nullstate = new entity_state_t(null); static xcommand_t Record_f = new xcommand_t() { public void execute() { --- 115,126 ---- }; static entity_state_t nullstate = new entity_state_t(null); + /** + * Record_f + * + * record <demoname> + * Begins recording a demo from the current position. + */ static xcommand_t Record_f = new xcommand_t() { public void execute() { *************** *** 234,239 **** }; ! /* ! * ================== CL_ForwardToServer_f ================== */ static xcommand_t ForwardToServer_f = new xcommand_t() { --- 230,235 ---- }; ! /** ! * ForwardToServer_f */ static xcommand_t ForwardToServer_f = new xcommand_t() { *************** *** 254,259 **** }; ! /* ! * ================== CL_Pause_f ================== */ static xcommand_t Pause_f = new xcommand_t() { --- 250,255 ---- }; ! /** ! * Pause_f */ static xcommand_t Pause_f = new xcommand_t() { *************** *** 271,276 **** }; ! /* ! * ================== CL_Quit_f ================== */ static xcommand_t Quit_f = new xcommand_t() { --- 267,272 ---- }; ! /** ! * Quit_f */ static xcommand_t Quit_f = new xcommand_t() { *************** *** 281,288 **** }; ! /* ! * ================ CL_Connect_f ! * ! * ================ */ static xcommand_t Connect_f = new xcommand_t() { --- 277,282 ---- }; ! /** ! * Connect_f */ static xcommand_t Connect_f = new xcommand_t() { *************** *** 316,324 **** }; ! /* ! * ===================== CL_Rcon_f * * Send the rest of the command line over as an unconnected command. - * ===================== */ static xcommand_t Rcon_f = new xcommand_t() { --- 310,317 ---- }; ! /** ! * Rcon_f * * Send the rest of the command line over as an unconnected command. */ static xcommand_t Rcon_f = new xcommand_t() { *************** *** 382,390 **** }; ! /* ! * ================= CL_Changing_f * ! * Just sent as a hint to the client that they should drop to full console ! * ================= */ static xcommand_t Changing_f = new xcommand_t() { --- 375,382 ---- }; ! /** ! * Changing_f * ! * Just sent as a hint to the client that they should drop to full console. */ static xcommand_t Changing_f = new xcommand_t() { *************** *** 404,411 **** }; ! /* ! * ================= CL_Reconnect_f * ! * The server is changing levels ================= */ static xcommand_t Reconnect_f = new xcommand_t() { --- 396,403 ---- }; ! /** ! * Reconnect_f * ! * The server is changing levels. */ static xcommand_t Reconnect_f = new xcommand_t() { *************** *** 440,445 **** }; ! /* ! * ================= CL_PingServers_f ================= */ static xcommand_t PingServers_f = new xcommand_t() { --- 432,437 ---- }; ! /** ! * PingServers_f */ static xcommand_t PingServers_f = new xcommand_t() { *************** *** 499,506 **** }; ! /* ! * ================= CL_Skins_f * ! * Load or download any custom player skins and models ================= */ static xcommand_t Skins_f = new xcommand_t() { --- 491,498 ---- }; ! /** ! * Skins_f * ! * Load or download any custom player skins and models. */ static xcommand_t Skins_f = new xcommand_t() { *************** *** 521,526 **** }; ! /* ! * ============== CL_Userinfo_f ============== */ static xcommand_t Userinfo_f = new xcommand_t() { --- 513,518 ---- }; ! /** ! * Userinfo_f */ static xcommand_t Userinfo_f = new xcommand_t() { *************** *** 531,539 **** }; ! /* ! * ================= CL_Snd_Restart_f * * Restart the sound subsystem so it can pick up new parameters and flush ! * all sounds ================= */ static xcommand_t Snd_Restart_f = new xcommand_t() { --- 523,531 ---- }; ! /** ! * Snd_Restart_f * * Restart the sound subsystem so it can pick up new parameters and flush ! * all sounds. */ static xcommand_t Snd_Restart_f = new xcommand_t() { *************** *** 581,607 **** }; - /* - * ================== CL_Frame - * - * ================== - */ private static int extratime; // ============================================================================ ! /* ! * =============== CL_Shutdown * * FIXME: this is a callback from Sys_Quit and Com_Error. It would be better * to run quit through here before the final handoff to the sys code. - * =============== */ static boolean isdown = false; ! /* ! * ==================== CL_WriteDemoMessage * * Dumps the current net message, prefixed by the length - * ==================== */ static void WriteDemoMessage() { --- 573,592 ---- }; private static int extratime; // ============================================================================ ! /** ! * Shutdown * * FIXME: this is a callback from Sys_Quit and Com_Error. It would be better * to run quit through here before the final handoff to the sys code. */ static boolean isdown = false; ! /** ! * WriteDemoMessage * * Dumps the current net message, prefixed by the length */ static void WriteDemoMessage() { *************** *** 619,627 **** } ! /* ! * ======================= CL_SendConnectPacket * * We have gotten a challenge from the server, so try and connect. - * ====================== */ static void SendConnectPacket() { --- 604,611 ---- } ! /** ! * SendConnectPacket * * We have gotten a challenge from the server, so try and connect. */ static void SendConnectPacket() { *************** *** 646,653 **** } ! /* ! * ================= CL_CheckForResend * ! * Resend a connect message if the last one has timed out ================= */ static void CheckForResend() { --- 630,637 ---- } ! /** ! * CheckForResend * ! * Resend a connect message if the last one has timed out. */ static void CheckForResend() { *************** *** 678,686 **** } if (adr.port == 0) - // adr.port = BigShort(PORT_SERVER); adr.port = Defines.PORT_SERVER; ! Globals.cls.connect_time = Globals.cls.realtime; // for retransmit ! // requests Com.Printf("Connecting to " + Globals.cls.servername + "...\n"); --- 662,669 ---- } if (adr.port == 0) adr.port = Defines.PORT_SERVER; ! // for retransmit requests ! Globals.cls.connect_time = Globals.cls.realtime; Com.Printf("Connecting to " + Globals.cls.servername + "...\n"); *************** *** 689,698 **** } ! /* ! * ===================== CL_ClearState * - * ===================== */ - static void ClearState() { S.StopAllSounds(); --- 672,679 ---- } ! /** ! * ClearState * */ static void ClearState() { S.StopAllSounds(); *************** *** 710,721 **** } ! /* ! * ===================== CL_Disconnect * * Goes from a connected state to full screen console state Sends a * disconnect message to the server This is also called on Com_Error, so it ! * shouldn't cause any errors ===================== */ - static void Disconnect() { --- 691,701 ---- } ! /** ! * Disconnect * * Goes from a connected state to full screen console state Sends a * disconnect message to the server This is also called on Com_Error, so it ! * shouldn't cause any errors. */ static void Disconnect() { *************** *** 738,743 **** Math3D.VectorClear(Globals.cl.refdef.blend); ! // TODO: Carsten, check re.CinematicSetPalette ! //re.CinematicSetPalette(null); Menu.ForceMenuOff(); --- 718,722 ---- Math3D.VectorClear(Globals.cl.refdef.blend); ! Globals.re.CinematicSetPalette(null); Menu.ForceMenuOff(); *************** *** 745,750 **** Globals.cls.connect_time = 0; ! // TODO: Carsten, check SCR.StopCinematic(); ! // SCR.StopCinematic(); if (Globals.cls.demorecording) --- 724,728 ---- Globals.cls.connect_time = 0; ! SCR.StopCinematic(); if (Globals.cls.demorecording) *************** *** 763,768 **** Lib.fclose(Globals.cls.download); Globals.cls.download = null; - // fclose(cls.download); - // cls.download = NULL; } --- 741,744 ---- *************** *** 770,777 **** } ! /* ! * ================= CL_ParseStatusMessage * ! * Handle a reply from a ping ================= */ static void ParseStatusMessage() { --- 746,753 ---- } ! /** ! * ParseStatusMessage * ! * Handle a reply from a ping. */ static void ParseStatusMessage() { *************** *** 784,791 **** } ! /* ! * ================= CL_ConnectionlessPacket * ! * Responses to broadcasts, etc ================= */ static void ConnectionlessPacket() { --- 760,767 ---- } ! /** ! * ConnectionlessPacket * ! * Responses to broadcasts, etc */ static void ConnectionlessPacket() { *************** *** 866,871 **** ! /* ! * ================= CL_ReadPackets ================= */ static void ReadPackets() { --- 842,847 ---- ! /** ! * ReadPackets */ static void ReadPackets() { *************** *** 926,931 **** // ============================================================================= ! /* ! * ============== CL_FixUpGender_f ============== */ static void FixUpGender() { --- 902,907 ---- // ============================================================================= ! /** ! * FixUpGender_f */ static void FixUpGender() { *************** *** 1270,1275 **** } ! /* ! * ================= CL_InitLocal ================= */ public static void InitLocal() { --- 1246,1251 ---- } ! /** ! * InitLocal */ public static void InitLocal() { *************** *** 1420,1427 **** } ! /* ! * =============== CL_WriteConfiguration * ! * Writes key bindings and archived cvars to config.cfg =============== */ public static void WriteConfiguration() { --- 1396,1403 ---- } ! /** ! * WriteConfiguration * ! * Writes key bindings and archived cvars to config.cfg. */ public static void WriteConfiguration() { *************** *** 1453,1456 **** --- 1429,1435 ---- } + /** + * FixCvarCheats + */ public static void FixCvarCheats() { int i; *************** *** 1481,1490 **** } ! // ============================================================================ ! /* ! * ================== CL_SendCommand ! * ! * ================== */ public static void SendCommand() { --- 1460,1467 ---- } ! // ============================================================= ! /** ! * SendCommand */ public static void SendCommand() { *************** *** 1510,1513 **** --- 1487,1493 ---- // private static int lasttimecalled; + /** + * Frame + */ public static void Frame(int msec) { *************** *** 1584,1587 **** --- 1564,1570 ---- } + /** + * Shutdown + */ public static void Shutdown() { *************** *** 1600,1604 **** /** ! * initialize client subsystem */ public static void Init() { --- 1583,1587 ---- /** ! * Initialize client subsystem. */ public static void Init() { |