sys.h is no longer part of quakedef.h

sys_wina.S is now sys_x86.S (same as now gone sys_dosa.S, used on Linux too)

Updated Linux Makefile to reflect above

Linux translation table thingy now compiles properly
This commit is contained in:
Joseph Carter 2000-05-14 16:56:28 +00:00
parent 31b8be8648
commit 6e37b33f44
37 changed files with 90 additions and 49 deletions

View file

@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "common.h" #include "common.h"
#include "bspfile.h" #include "bspfile.h"
#include "vid.h" #include "vid.h"
#include "sys.h" //#include "sys.h"
#include "zone.h" #include "zone.h"
#include "mathlib.h" #include "mathlib.h"
#include "wad.h" #include "wad.h"

View file

@ -19,46 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// sys.h -- non-portable functions // sys.h -- non-portable functions
// #ifndef __SYS_H
// Translation table for text consoles #define __SYS_H
//
char trans_table[256] =
{
'\0', '#', '#', '#', '#', '.', '#', '#',
'#', 9, 10, '#', ' ', 13, '.', '.',
'[', ']', '0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', '.', '<', '=', '>',
' ', '!', '"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-', '.', '/',
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=', '>', '?',
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z', '{', '|', '}', '~', '<',
'<', '=', '>', '#', '#', '.', '#', '#',
'#', '#', ' ', '#', ' ', '>', '.', '.',
'[', ']', '0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', '.', '<', '=', '>',
' ', '!', '"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-', '.', '/',
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=', '>', '?',
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z', '{', '|', '}', '~', '<'
};
// //
// file IO // file IO
@ -114,3 +76,6 @@ void Sys_Printf (char *fmt, ...);
// send text to the console // send text to the console
void Sys_Init (void); void Sys_Init (void);
#endif // __SYS_H

View file

@ -152,7 +152,7 @@ CL_sources=\
menu.c \ menu.c \
keys.c \ keys.c \
console.c \ console.c \
sys_dosa.S sys_x86.S
CL_dependencies = $(patsubst %,%.d,$(basename $(CL_sources))) CL_dependencies = $(patsubst %,%.d,$(basename $(CL_sources)))
CL_objects = $(patsubst %.d,%.o,$(CL_dependencies)) CL_objects = $(patsubst %.d,%.o,$(CL_dependencies))

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
void CL_FinishTimeDemo (void); void CL_FinishTimeDemo (void);

View file

@ -27,6 +27,7 @@
*/ */
// cl_ents.c -- entity parsing and management // cl_ents.c -- entity parsing and management
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
extern cvar_t cl_predict_players; extern cvar_t cl_predict_players;

View file

@ -27,15 +27,17 @@
*/ */
// cl_main.c -- client main loop // cl_main.c -- client main loop
#include <ctype.h>
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "winquake.h"
#ifdef _WIN32 #ifdef _WIN32
#include "winquake.h"
#include "winsock.h" #include "winsock.h"
#include "in_win.h" #include "in_win.h"
#else #else
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#include <ctype.h>
// we need to declare some mouse variables here, because the menu system // we need to declare some mouse variables here, because the menu system

View file

@ -27,6 +27,7 @@
*/ */
// cl_parse.c -- parse a message received from the server // cl_parse.c -- parse a message received from the server
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
extern cvar_t gl_flashblend; extern cvar_t gl_flashblend;

View file

@ -27,6 +27,7 @@
*/ */
// cl_tent.c -- client side temporary entities // cl_tent.c -- client side temporary entities
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"

View file

@ -27,6 +27,7 @@
*/ */
// cmd.c -- Quake script command processing module // cmd.c -- Quake script command processing module
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
void Cmd_ForwardToServer (void); void Cmd_ForwardToServer (void);

View file

@ -29,6 +29,7 @@
#include <ctype.h> #include <ctype.h>
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#define MAX_NUM_ARGVS 50 #define MAX_NUM_ARGVS 50

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
int con_ormask; int con_ormask;

View file

@ -27,6 +27,7 @@
*/ */
// d_modech.c: called when mode has just changed // d_modech.c: called when mode has just changed
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "d_local.h" #include "d_local.h"

View file

@ -27,6 +27,7 @@
*/ */
// d_surf.c: rasterization driver surface heap manager // d_surf.c: rasterization driver surface heap manager
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "d_local.h" #include "d_local.h"
#include "r_local.h" #include "r_local.h"

View file

@ -28,6 +28,7 @@
// draw.c -- this is the only file outside the refresh that touches the // draw.c -- this is the only file outside the refresh that touches the
// vid buffer // vid buffer
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
typedef struct { typedef struct {

View file

@ -27,6 +27,7 @@
*/ */
// cl_parse.c -- parse a message received from the server // cl_parse.c -- parse a message received from the server
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "glquake.h" #include "glquake.h"

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
mnode_t *r_pefragtopnode; mnode_t *r_pefragtopnode;

View file

@ -26,10 +26,13 @@
$Id$ $Id$
*/ */
#include "quakedef.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#endif #endif
#include "sys.h"
#include "quakedef.h"
/* /*
key up events are sent even if in console mode key up events are sent even if in console mode

View file

@ -26,8 +26,11 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#ifdef _WIN32
#include "winquake.h" #include "winquake.h"
#endif
void (*vid_menudrawfn)(void); void (*vid_menudrawfn)(void);
void (*vid_menukeyfn)(int key); void (*vid_menukeyfn)(int key);

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include <sys/types.h> #include <sys/types.h>

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
static hull_t box_hull; static hull_t box_hull;

View file

@ -27,6 +27,7 @@
*/ */
// r_alias.c: routines for setting up to draw alias models // r_alias.c: routines for setting up to draw alias models
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "r_local.h" #include "r_local.h"
#include "d_local.h" // FIXME: shouldn't be needed (is needed for patch #include "d_local.h" // FIXME: shouldn't be needed (is needed for patch

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "r_local.h" #include "r_local.h"

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "r_local.h" #include "r_local.h"

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "r_local.h" #include "r_local.h"

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "r_local.h" #include "r_local.h"

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "r_local.h" #include "r_local.h"

View file

@ -27,6 +27,7 @@
*/ */
// r_surf.c: surface-related refresh code // r_surf.c: surface-related refresh code
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "r_local.h" #include "r_local.h"

View file

@ -27,6 +27,7 @@
*/ */
// screen.c -- master for refresh, status bar, console, chat, notify, etc // screen.c -- master for refresh, status bar, console, chat, notify, etc
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "r_local.h" #include "r_local.h"

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
cvar_t baseskin = {"baseskin", "base"}; cvar_t baseskin = {"baseskin", "base"};

View file

@ -27,6 +27,7 @@
*/ */
// snd_dma.c -- main control for any streaming sound output device // snd_dma.c -- main control for any streaming sound output device
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#ifdef _WIN32 #ifdef _WIN32

View file

@ -27,6 +27,7 @@
*/ */
// snd_mem.c: sound caching // snd_mem.c: sound caching
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
int cache_full_cycle; int cache_full_cycle;

View file

@ -45,6 +45,7 @@
#include <sys/mman.h> #include <sys/mman.h>
#include <errno.h> #include <errno.h>
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
int noconinput = 0; int noconinput = 0;
@ -56,6 +57,47 @@ qboolean is_server = false;
cvar_t sys_linerefresh = {"sys_linerefresh","0"};// set for entity display cvar_t sys_linerefresh = {"sys_linerefresh","0"};// set for entity display
//
// Translation table for text consoles
//
char qfont_table[256] =
{
'\0', '#', '#', '#', '#', '.', '#', '#',
'#', 9, 10, '#', ' ', 13, '.', '.',
'[', ']', '0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', '.', '<', '=', '>',
' ', '!', '"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-', '.', '/',
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=', '>', '?',
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z', '{', '|', '}', '~', '<',
'<', '=', '>', '#', '#', '.', '#', '#',
'#', '#', ' ', '#', ' ', '>', '.', '.',
'[', ']', '0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', '.', '<', '=', '>',
' ', '!', '"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-', '.', '/',
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=', '>', '?',
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z', '{', '|', '}', '~', '<'
};
// ======================================================================= // =======================================================================
// General routines // General routines
// ======================================================================= // =======================================================================
@ -128,10 +170,7 @@ void Sys_Printf (char *fmt, ...)
return; return;
for (p = (unsigned char *)text; *p; p++) for (p = (unsigned char *)text; *p; p++)
if ((*p > 128 || *p < 32) && *p != 10 && *p != 13 && *p != 9) putc(qfont_table[*p], stdout);
printf("[%02x]", *p);
else
putc(*p, stdout);
} }
void Sys_Quit (void) void Sys_Quit (void)

View file

@ -36,6 +36,7 @@
#include <asm/io.h> #include <asm/io.h>
#include "sys.h"
#include "vga.h" #include "vga.h"
#include "vgakeyboard.h" #include "vgakeyboard.h"
#include "vgamouse.h" #include "vgamouse.h"

View file

@ -47,6 +47,7 @@ typedef unsigned short PIXEL;
#include <X11/keysym.h> #include <X11/keysym.h>
#include <X11/extensions/XShm.h> #include <X11/extensions/XShm.h>
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#include "d_local.h" #include "d_local.h"

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
int wad_numlumps; int wad_numlumps;

View file

@ -26,6 +26,7 @@
$Id$ $Id$
*/ */
#include "sys.h"
#include "quakedef.h" #include "quakedef.h"
#define DYNAMIC_SIZE 0x20000 #define DYNAMIC_SIZE 0x20000