merge
This commit is contained in:
commit
112866ef3d
45
2d/bitblt.c
45
2d/bitblt.c
|
@ -28,22 +28,19 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
#include "ogl_init.h"
|
||||
#endif
|
||||
|
||||
int gr_bitblt_dest_step_shift = 0;
|
||||
int gr_bitblt_double = 0;
|
||||
ubyte *gr_bitblt_fade_table=NULL;
|
||||
static int gr_bitblt_dest_step_shift = 0;
|
||||
static int gr_bitblt_double = 0;
|
||||
static ubyte *gr_bitblt_fade_table=NULL;
|
||||
|
||||
void gr_bm_ubitblt00_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest);
|
||||
void gr_bm_ubitblt00m_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest);
|
||||
void gr_bm_ubitblt0x_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest, int masked);
|
||||
static void gr_bm_ubitblt00_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest);
|
||||
static void gr_bm_ubitblt00m_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest);
|
||||
static void gr_bm_ubitblt0x_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest, int masked);
|
||||
|
||||
void gr_bm_ubitblt01(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest);
|
||||
void gr_bm_ubitblt02(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest);
|
||||
|
||||
void gr_linear_movsd( ubyte * source, ubyte * dest, unsigned int nbytes) {
|
||||
static void gr_linear_movsd( ubyte * source, ubyte * dest, unsigned int nbytes) {
|
||||
memcpy(dest,source,nbytes);
|
||||
}
|
||||
|
||||
void gr_linear_rep_movsdm(ubyte *src, ubyte *dest, int num_pixels) {
|
||||
static void gr_linear_rep_movsdm(ubyte *src, ubyte *dest, int num_pixels) {
|
||||
register ubyte c;
|
||||
while (num_pixels--)
|
||||
if ((c=*src++)!=255)
|
||||
|
@ -51,7 +48,7 @@ void gr_linear_rep_movsdm(ubyte *src, ubyte *dest, int num_pixels) {
|
|||
else dest++;
|
||||
}
|
||||
|
||||
void gr_linear_rep_movsdm_faded(ubyte * src, ubyte * dest, int num_pixels, ubyte fade_value ) {
|
||||
static void gr_linear_rep_movsdm_faded(ubyte * src, ubyte * dest, int num_pixels, ubyte fade_value ) {
|
||||
register ubyte c;
|
||||
while (num_pixels--)
|
||||
if ((c=*src++)!=255)
|
||||
|
@ -59,7 +56,7 @@ void gr_linear_rep_movsdm_faded(ubyte * src, ubyte * dest, int num_pixels, ubyte
|
|||
else dest++;
|
||||
}
|
||||
|
||||
void gr_linear_rep_movsd_2x(ubyte * source, ubyte * dest, uint nbytes ) {
|
||||
static void gr_linear_rep_movsd_2x(ubyte * source, ubyte * dest, uint nbytes ) {
|
||||
register ubyte c;
|
||||
while (nbytes--) {
|
||||
if (nbytes&1)
|
||||
|
@ -73,7 +70,7 @@ void gr_linear_rep_movsd_2x(ubyte * source, ubyte * dest, uint nbytes ) {
|
|||
}
|
||||
}
|
||||
|
||||
void gr_ubitmap00( int x, int y, grs_bitmap *bm )
|
||||
static void gr_ubitmap00( int x, int y, grs_bitmap *bm )
|
||||
{
|
||||
register int y1;
|
||||
int dest_rowsize;
|
||||
|
@ -96,7 +93,7 @@ void gr_ubitmap00( int x, int y, grs_bitmap *bm )
|
|||
}
|
||||
}
|
||||
|
||||
void gr_ubitmap00m( int x, int y, grs_bitmap *bm )
|
||||
static void gr_ubitmap00m( int x, int y, grs_bitmap *bm )
|
||||
{
|
||||
register int y1;
|
||||
int dest_rowsize;
|
||||
|
@ -124,7 +121,7 @@ void gr_ubitmap00m( int x, int y, grs_bitmap *bm )
|
|||
}
|
||||
}
|
||||
|
||||
void gr_ubitmap012( int x, int y, grs_bitmap *bm )
|
||||
static void gr_ubitmap012( int x, int y, grs_bitmap *bm )
|
||||
{
|
||||
register int x1, y1;
|
||||
unsigned char * src;
|
||||
|
@ -139,7 +136,7 @@ void gr_ubitmap012( int x, int y, grs_bitmap *bm )
|
|||
}
|
||||
}
|
||||
|
||||
void gr_ubitmap012m( int x, int y, grs_bitmap *bm )
|
||||
static void gr_ubitmap012m( int x, int y, grs_bitmap *bm )
|
||||
{
|
||||
register int x1, y1;
|
||||
unsigned char * src;
|
||||
|
@ -157,7 +154,7 @@ void gr_ubitmap012m( int x, int y, grs_bitmap *bm )
|
|||
}
|
||||
}
|
||||
|
||||
void gr_ubitmapGENERIC(int x, int y, grs_bitmap * bm)
|
||||
static void gr_ubitmapGENERIC(int x, int y, grs_bitmap * bm)
|
||||
{
|
||||
register int x1, y1;
|
||||
|
||||
|
@ -169,7 +166,7 @@ void gr_ubitmapGENERIC(int x, int y, grs_bitmap * bm)
|
|||
}
|
||||
}
|
||||
|
||||
void gr_ubitmapGENERICm(int x, int y, grs_bitmap * bm)
|
||||
static void gr_ubitmapGENERICm(int x, int y, grs_bitmap * bm)
|
||||
{
|
||||
register int x1, y1;
|
||||
ubyte c;
|
||||
|
@ -245,7 +242,7 @@ void gr_ubitmapm( int x, int y, grs_bitmap *bm )
|
|||
}
|
||||
|
||||
// From Linear to Linear
|
||||
void gr_bm_ubitblt00(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest)
|
||||
static void gr_bm_ubitblt00(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest)
|
||||
{
|
||||
unsigned char * dbits;
|
||||
unsigned char * sbits;
|
||||
|
@ -276,7 +273,7 @@ void gr_bm_ubitblt00(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap *
|
|||
}
|
||||
|
||||
// From Linear to Linear Masked
|
||||
void gr_bm_ubitblt00m(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest)
|
||||
static void gr_bm_ubitblt00m(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest)
|
||||
{
|
||||
unsigned char * dbits;
|
||||
unsigned char * sbits;
|
||||
|
@ -473,7 +470,7 @@ void gr_bm_ubitbltm(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * s
|
|||
|
||||
}
|
||||
|
||||
void gr_bm_ubitblt00_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest)
|
||||
static void gr_bm_ubitblt00_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest)
|
||||
{
|
||||
unsigned char * dbits;
|
||||
unsigned char * sbits;
|
||||
|
@ -501,7 +498,7 @@ void gr_bm_ubitblt00_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitma
|
|||
}
|
||||
}
|
||||
|
||||
void gr_bm_ubitblt00m_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest)
|
||||
static void gr_bm_ubitblt00m_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest)
|
||||
{
|
||||
unsigned char * dbits;
|
||||
unsigned char * sbits;
|
||||
|
@ -531,7 +528,7 @@ void gr_bm_ubitblt00m_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitm
|
|||
// in rle.c
|
||||
|
||||
|
||||
void gr_bm_ubitblt0x_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src,
|
||||
static void gr_bm_ubitblt0x_rle(int w, int h, int dx, int dy, int sx, int sy, grs_bitmap * src,
|
||||
grs_bitmap * dest, int masked )
|
||||
{
|
||||
int i, data_offset;
|
||||
|
|
|
@ -438,10 +438,10 @@ grs_bitmap char_bm = {
|
|||
0 //unused
|
||||
};
|
||||
|
||||
int gr_internal_color_string(int x, int y, char *s )
|
||||
int gr_internal_color_string(int x, int y, const char *s )
|
||||
{
|
||||
unsigned char * fp;
|
||||
char *text_ptr, *next_row, *text_ptr1;
|
||||
const char *text_ptr, *next_row, *text_ptr1;
|
||||
int width, spacing,letter;
|
||||
int xx,yy;
|
||||
|
||||
|
|
|
@ -35,9 +35,6 @@ extern unsigned int gr_var_color;
|
|||
extern unsigned int gr_var_bwidth;
|
||||
extern unsigned char * gr_var_bitmap;
|
||||
|
||||
void gr_linear_movsd( ubyte * source, ubyte * dest, unsigned int nbytes);
|
||||
void gr_linear_rep_movsd_2x(ubyte *source, ubyte *dest, unsigned int nbytes);
|
||||
|
||||
void gr_linear_line( int x0, int y0, int x1, int y1);
|
||||
|
||||
extern unsigned int Table8to32[256];
|
||||
|
|
|
@ -128,7 +128,7 @@ int Control_center_destroyed = 0;
|
|||
fix Countdown_timer=0;
|
||||
int Countdown_seconds_left=0, Total_countdown_time=0; //in whole seconds
|
||||
|
||||
int Alan_pavlish_reactor_times[NDL] = {90, 60, 45, 35, 30};
|
||||
static const int Alan_pavlish_reactor_times[NDL] = {90, 60, 45, 35, 30};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Called every frame. If control center been destroyed, then actually do something.
|
||||
|
|
|
@ -131,7 +131,7 @@ ssize_t dxx_sendto(int sockfd, const void *msg, int len, unsigned int flags, con
|
|||
return rv;
|
||||
}
|
||||
|
||||
ssize_t dxx_recvfrom(int sockfd, void *buf, int len, unsigned int flags, struct sockaddr *from, unsigned int *fromlen)
|
||||
ssize_t dxx_recvfrom(int sockfd, void *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen)
|
||||
{
|
||||
ssize_t rv = recvfrom(sockfd, buf, len, flags, from, fromlen);
|
||||
|
||||
|
@ -347,7 +347,8 @@ int udp_general_packet_ready(int socknum)
|
|||
// Gets some text. Returns 0 if nothing on there.
|
||||
int udp_receive_packet(int socknum, ubyte *text, int len, struct _sockaddr *sender_addr)
|
||||
{
|
||||
unsigned int clen = sizeof (struct _sockaddr), msglen = 0;
|
||||
socklen_t clen = sizeof (struct _sockaddr);
|
||||
ssize_t msglen = 0;
|
||||
|
||||
if (UDP_Socket[socknum] == -1)
|
||||
return -1;
|
||||
|
|
|
@ -221,13 +221,15 @@ void InitWeaponOrdering ()
|
|||
|
||||
void CyclePrimary ()
|
||||
{
|
||||
int cur_order_slot = POrderList(Primary_weapon), desired_weapon = Primary_weapon, loop=0;
|
||||
int cur_order_slot, desired_weapon = Primary_weapon, loop=0;
|
||||
const int autoselect_order_slot = POrderList(255);
|
||||
const int use_restricted_autoselect = (cur_order_slot < autoselect_order_slot) && (1 < autoselect_order_slot) && (PlayerCfg.CycleAutoselectOnly);
|
||||
|
||||
// some remapping for SUPER LASER which is not an actual weapon type at all
|
||||
if (Primary_weapon == LASER_INDEX && Players[Player_num].laser_level > MAX_LASER_LEVEL)
|
||||
cur_order_slot = POrderList(SUPER_LASER_INDEX);
|
||||
else
|
||||
cur_order_slot = POrderList(Primary_weapon);
|
||||
const int use_restricted_autoselect = (cur_order_slot < autoselect_order_slot) && (1 < autoselect_order_slot) && (PlayerCfg.CycleAutoselectOnly);
|
||||
|
||||
while (loop<(MAX_PRIMARY_WEAPONS+1))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue