]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Update dpdefs
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 4 Apr 2024 11:17:48 +0000 (21:17 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 4 Apr 2024 11:17:48 +0000 (21:17 +1000)
qcsrc/client/main.qc
qcsrc/client/view.qc
qcsrc/dpdefs/doc.md
qcsrc/dpdefs/menudefs.qh
qcsrc/dpdefs/upstream/csprogsdefs.qc
qcsrc/dpdefs/upstream/dpextensions.qc
qcsrc/dpdefs/upstream/menudefs.qc
qcsrc/lib/_all.inc

index 4bc3d8007f334b51f65b58f5364584ef82cb7435..5044ef034186a11a0bd5411ae98363f21930f60e 100644 (file)
@@ -43,7 +43,7 @@
 // CSQC_Init : Called every time the CSQC code is initialized (essentially at map load)
 // Useful for precaching things
 
-void CSQC_Init()
+void CSQC_Init(float apilevel, string enginename, float engineversion)
 {
        prvm_language = strzone(cvar_string("prvm_language"));
 
index bf6e22c61c9cfd655b09a98ab879b0cddaca9f76..6a011d3f898738a289a0ccb7d8da35a50b0f2aab 100644 (file)
@@ -1550,7 +1550,7 @@ void View_UpdateFov()
        setproperty(VF_FOV, fov);
 }
 
-void CSQC_UpdateView(entity this, float w, float h)
+void CSQC_UpdateView(entity this, float w, float h, bool notmenu)
 {
        TC(int, w); TC(int, h);
 
index b49bb6f57ad72e7ab0ff6bed1b20925d6e26362a..fa44a529e310c96ab7ec29f0dace12ce1db8df6e 100644 (file)
@@ -17,7 +17,7 @@
 // 3 = mousemove absolute, x, y (DP_CSQC)
 bool CSQC_InputEvent(int eventtype, int x, int y);
 
-void CSQC_UpdateView(int width, int height);
+void CSQC_UpdateView(int vid_width, int vid_height, bool notmenu);
 // catch commands registered with registercommand
 bool CSQC_ConsoleCommand(string cmd);
 bool CSQC_Parse_TempEntity();
@@ -30,7 +30,7 @@ entity CSQC_Ent_Spawn(int entnum);
 void CSQC_Ent_Update(bool isnew);
 void CSQC_Ent_Remove();
 
-void CSQC_Init();
+void CSQC_Init(float apilevel, string enginename, float engineversion);
 void CSQC_Shutdown();
 
 // input:
index 036d87ff2fa8e7a213932d69fc66e84e30700a94..d738f9ede8ab478c0a86eac9bb130a636dcc047c 100644 (file)
@@ -18,8 +18,6 @@
 
 #undef spawn
 
-#define localcmd cmd
-
 int(string str, string sub, int startpos) _strstrofs = #221;
 #define strstrofs _strstrofs
 int(string str, int ofs) _str2chr = #222;
index e392bf8eab5403e94c179858f1a21a10457332a2..bc921c4579c9ac469aed16a2b8a2d7cd39b74db8 100644 (file)
@@ -42,13 +42,17 @@ float               trace_inopen;
 float          trace_inwater;
 
 //
-// required prog functions
+// prog functions called by engine
 //
-void()         CSQC_Init;
-void()         CSQC_Shutdown;
-float(float f, float t, float n)       CSQC_InputEvent;
-void(float w, float h)         CSQC_UpdateView;
-float(string s)        CSQC_ConsoleCommand;
+void  CSQC_Init(float apilevel, string enginename, float engineversion);
+void  CSQC_Shutdown();
+float CSQC_InputEvent(float evtype, float scanx, float chary);
+void  CSQC_UpdateView(float vid_width, float vid_height, float notmenu); // required for EXT_CSQC (preferred)
+float CSQC_ConsoleCommand(string cmdstr);
+#ifdef CSQC_SIMPLE // hud-only CSQC
+       void CSQC_DrawHud(vector virtsize, float showscores); // required for CSQC_SIMPLE (fallback)
+       void CSQC_DrawScores(vector virtsize, float showscores);
+#endif
 
 //these fields are read and set by the default player physics
 vector         pmove_org;
index f7e5b08ecc4236d71ded36783ec7aba48e6b690f..8a4d93c48ac17423bf473e2e3c3af3ad46470c3b 100644 (file)
@@ -35,7 +35,7 @@ float(string s) checkextension = #99;
 //field definitions:
 .float buttonchat;
 //description:
-//true if the player is currently chatting (in messagemode, menus or console)
+//true if the player is currently chatting (in messagemode, menus or console) or if their game window is not active.
 
 //DP_BUTTONUSE
 //idea: id Software
index b987491b7cf778c5ea33bcfb2f783851b5a60461..93bdff12d6fbe9a0a455f214651c3d59403d3140 100644 (file)
@@ -182,6 +182,7 @@ vector      vectoangles(vector v)           = #11;
 float  random(void)  = #12; // Returns a random number > 0 and < 1
 
 void   cmd(string command, ...) = #13;
+void localcmd(string command, ...) = #13;
 
 // cvar cmds
 
index 0bef0b6e0e944feebfe54c14fea8728a9bc6d295..d33bda1d1b71a881958053d6710bb835cabf0659 100644 (file)
@@ -285,16 +285,16 @@ MACRO_END
 #endif
 
 #ifdef CSQC
-       void _CSQC_Init();
-       void CSQC_Init() { if (_CSQC_Init) _CSQC_Init(); }
+       void _CSQC_Init(float apilevel, string enginename, float engineversion);
+       void CSQC_Init(float apilevel, string enginename, float engineversion) { if (_CSQC_Init) _CSQC_Init(apilevel, enginename, engineversion); }
        #define CSQC_Init _CSQC_Init
 
        void _CSQC_Shutdown();
        void CSQC_Shutdown() { if (_CSQC_Shutdown) _CSQC_Shutdown(); }
        #define CSQC_Shutdown _CSQC_Shutdown
 
-       void _CSQC_UpdateView(entity this, float w, float h);
-       void CSQC_UpdateView(float w, float h) { ENGINE_EVENT(); if (_CSQC_UpdateView) _CSQC_UpdateView(this, w, h); }
+       void _CSQC_UpdateView(entity this, float w, float h, bool notmenu);
+       void CSQC_UpdateView(float w, float h, bool notmenu) { ENGINE_EVENT(); if (_CSQC_UpdateView) _CSQC_UpdateView(this, w, h, notmenu); }
        #define CSQC_UpdateView _CSQC_UpdateView
 
        bool _CSQC_InputEvent(int inputType, float nPrimary, float nSecondary);