bring in most of the remaining api bits from cs-code (except string and

stringh: I'm not really that keen on those interfaces and I'ld like to
see them go away) and create libcsqc for most of it (key goes into gui)
This commit is contained in:
Bill Currie 2002-08-16 20:15:10 +00:00
parent 5a9e5277c9
commit a12fa85506
12 changed files with 82 additions and 3 deletions

View file

@ -5,4 +5,6 @@ include_HEADERS = \
object.h physics.h qw_message.h qw_physics.h qw_sys.h sound.h \
string.h system.h \
\
draw.h inputline.h point.h
draw.h key.h inputline.h point.h \
\
cbuf.h cmd.h cvar.h file.h

9
ruamoko/include/cbuf.h Normal file
View file

@ -0,0 +1,9 @@
#ifndef __ruamoko_cbuf_h
#define __ruamoko_cbuf_h
@extern void (string text) Cbuf_AddText;
@extern void (string text) Cbuf_InsertText;
@extern void () Cbuf_Execute;
@extern void () Cbuf_Execute_Sets;
#endif//__ruamoko_cbuf_h

10
ruamoko/include/cmd.h Normal file
View file

@ -0,0 +1,10 @@
#ifndef __ruamoko_cmd_h
#define __ruamoko_cmd_h
@extern void (string name, void () func) Cmd_AddCommand;
@extern integer () Cmd_Argc;
@extern string (integer arg) Cmd_Argv;
@extern string (integer arg) Cmd_Args;
@extern void (string value) Cmd_Return;
#endif//__ruamoko_cmd_h

6
ruamoko/include/cvar.h Normal file
View file

@ -0,0 +1,6 @@
#ifndef __ruamoko_cvar_h
#define __ruamoko_cvar_h
@extern string (string varname) Cvar_GetCvarString;
#endif//__ruamoko_cvar_h

11
ruamoko/include/file.h Normal file
View file

@ -0,0 +1,11 @@
#ifndef __ruamoko_file_h
#define __ruamoko_file_h
struct _file_t = {};
typedef _file_t [] file_t;
@extern file_t (string path, string mode) File_Open;
@extern void (file_t file) File_Close;
@extern string (file_t file) File_GetLine;
#endif//__ruamoko_file_h

10
ruamoko/include/key.h Normal file
View file

@ -0,0 +1,10 @@
#ifndef __ruamoko_key_h
#define __ruamoko_key_h
#include "QF/keys.h"
@extern string (integer target, integer keynum, string binding) Key_SetBinding;
@extern integer (integer target, integer bindnum, string binding) Key_LookupBinding;
@extern integer (integer target, string binding) Key_CountBinding;
@extern string (integer keynum) Key_KeynumToString;
#endif//__ruamoko_key_h

View file

@ -8,7 +8,7 @@ RANLIB=touch
INCLUDES= -I$(top_srcdir)/ruamoko/include
noinst_LIBRARIES= libr.a libgui.a
noinst_LIBRARIES= libr.a libgui.a libcsqc.a
%.qfo: %.r
$(QFCC) $(QCFLAGS) $(QCPPFLAGS) -p $(STRIP) -c -o $@ $<
@ -24,7 +24,11 @@ libr_a_SOURCES=\
libr_a_AR=$(PAK) -cf
libgui_a_SOURCES=\
draw.r inputline.r point.r
draw.r inputline.r key.r point.r
libgui_a_AR=$(PAK) -cf
libcsqc_a_SOURCES=\
cbuf.r cmd.r cvar.r file.r
libcsqc_a_AR=$(PAK) -cf
CLEANFILES = *.qfo

6
ruamoko/lib/cbuf.r Normal file
View file

@ -0,0 +1,6 @@
#include "cbuf.h"
void (string text) Cbuf_AddText = #0;
void (string text) Cbuf_InsertText = #0;
void () Cbuf_Execute = #0;
void () Cbuf_Execute_Sets = #0;

7
ruamoko/lib/cmd.r Normal file
View file

@ -0,0 +1,7 @@
#include "cmd.h"
void (string name, void () func) Cmd_AddCommand = #0;
integer () Cmd_Argc = #0;
string (integer arg) Cmd_Argv = #0;
string (integer arg) Cmd_Args = #0;
void (string value) Cmd_Return = #0;

3
ruamoko/lib/cvar.r Normal file
View file

@ -0,0 +1,3 @@
#include "cvar.h"
string (string varname) Cvar_GetCvarString = #0;

5
ruamoko/lib/file.r Normal file
View file

@ -0,0 +1,5 @@
#include "file.h"
file_t (string path, string mode) File_Open = #0;
void (file_t file) File_Close = #0;
string (file_t file) File_GetLine = #0;

6
ruamoko/lib/key.r Normal file
View file

@ -0,0 +1,6 @@
#include "key.h"
string (integer target, integer keynum, string binding) Key_SetBinding = #0;
integer (integer target, integer bindnum, string binding) Key_LookupBinding = #0;
integer (integer target, string binding) Key_CountBinding = #0;
string (integer keynum) Key_KeynumToString = #0;