make a few more global vars static. remove glideIdent[] from gglide.c (unused.)

This commit is contained in:
sezero
2018-08-04 20:55:32 +03:00
parent 08e1e599fd
commit 383731e840
22 changed files with 24 additions and 66 deletions

View File

@@ -83,9 +83,9 @@ static void Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrAs
static void Read16Bit(FxU16 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
#if ((GLIDE_PLATFORM & (GLIDE_OS_DOS32 | GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) != 0)
const char *openmode = "rb";
static const char *openmode = "rb";
#else
const char *openmode = "r";
static const char *openmode = "r";
#endif
typedef struct

View File

@@ -171,9 +171,6 @@
#include "fxglide.h"
#include "fxinline.h"
#include "rcver.h"
static char glideIdent[] = "@#%" VERSIONSTR ;
#if GLIDE_HW_TRI_SETUP
static void
_grUpdateTriPacketHdr(FxU32 paramMask,
@@ -197,9 +194,6 @@ GR_STATE_ENTRY(grAlphaBlendFunction, void,
GDBG_INFO_MORE(gc->myLevel, "(%d,%d,%d,%d)\n",
rgb_sf, rgb_df, alpha_sf, alpha_df);
/* Watcom warning suppressor */
glideIdent[0] = glideIdent[0];
alphamode = gc->state.fbi_config.alphaMode;
if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) {
GR_CHECK_W(myName, 1, "unsupported alpha source blend function");

View File

@@ -83,9 +83,9 @@ static void Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrAs
static void Read16Bit(FxU16 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
#if ((GLIDE_PLATFORM & (GLIDE_OS_DOS32 | GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) != 0)
const char *openmode = "rb";
static const char *openmode = "rb";
#else
const char *openmode = "r";
static const char *openmode = "r";
#endif
typedef struct

View File

@@ -302,9 +302,6 @@
#include "fxglide.h"
#include "fxinline.h"
#include "rcver.h"
static char glideIdent[] = "@#%" VERSIONSTR ;
#if GLIDE_HW_TRI_SETUP
static void
_grUpdateTriPacketHdr(FxU32 paramMask,
@@ -328,9 +325,6 @@ GR_STATE_ENTRY(grAlphaBlendFunction, void,
GDBG_INFO_MORE(gc->myLevel, "(%d,%d,%d,%d)\n",
rgb_sf, rgb_df, alpha_sf, alpha_df);
/* Watcom warning suppressor */
glideIdent[0] = glideIdent[0];
alphamode = gc->state.fbi_config.alphaMode;
if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) {
GR_CHECK_W(myName, 1, "unsupported alpha source blend function");

View File

@@ -50,9 +50,9 @@ static void Read8Bit( FxU8 *dst, FILE *image, int small_lod, int large_lod, GrA
static void Read16Bit( FxU16 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect );
#if ( ( GLIDE_PLATFORM & ( GLIDE_OS_DOS32 | GLIDE_OS_WIN32 ) ) != 0 )
const char *openmode = "rb";
static const char *openmode = "rb";
#else
const char *openmode = "r";
static const char *openmode = "r";
#endif
typedef struct

View File

@@ -189,9 +189,6 @@
#include <init.h>
#endif
#include "rcver.h"
static char glideIdent[] = "@#%" VERSIONSTR ;
/*---------------------------------------------------------------------------
** grAlphaBlendFunction
**
@@ -206,9 +203,6 @@ GR_ENTRY(grAlphaBlendFunction, void, ( GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendF
GR_BEGIN("grAlphaBlendFunction",85,4);
GDBG_INFO_MORE((gc->myLevel,"(%d,%d,%d,%d)\n",rgb_sf,rgb_df,alpha_sf,alpha_df));
/* Watcom warning suppressor */
glideIdent[0] = glideIdent[0];
alphamode = gc->state.fbi_config.alphaMode;
if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) {
// GR_CHECK_W(myName, 1, "unsupported alpha source blend function");

View File

@@ -843,7 +843,7 @@ _GR_SET16(void *addr, unsigned short data)
#if defined( GLIDE_DEBUG ) && ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
extern char *regNames[];
extern const char *regNames[];
static FxU32 thisMask;
static FxU32 thisWrite;

View File

@@ -97,7 +97,7 @@
#define GEN_INDEX(a) ((((FxU32) a) - ((FxU32) gc->reg_ptr)) >> 2)
char
const char
*regNames[] = {
"status", /* 0x00 */
"reserved001", /* 0x01 */

View File

@@ -163,7 +163,7 @@
#include "fxinline.h"
const FxU32 _grMemOffset[16] =
static const FxU32 _grMemOffset[16] =
{
35, /* 320x200 */
40, /* 320x240 */
@@ -183,7 +183,7 @@ const FxU32 _grMemOffset[16] =
70 /* 400x300 */
};
const FxU32 _grResolutionRefresh[16][9] =
static const FxU32 _grResolutionRefresh[16][9] =
{
{ /* 320x200 */
0, /* 60 Hz */

View File

@@ -105,9 +105,9 @@ static FxBool Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrA
static FxBool Read16Bit(FxU16 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
#if ((GLIDE_PLATFORM & (GLIDE_OS_DOS32 | GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) != 0)
const char *openmode = "rb";
static const char *openmode = "rb";
#else
const char *openmode = "r";
static const char *openmode = "r";
#endif
typedef struct

View File

@@ -347,9 +347,6 @@
#include "fxglide.h"
#include "fxinline.h"
#include "rcver.h"
static char glideIdent[] = "@#%" VERSIONSTR ;
#if GLIDE_HW_TRI_SETUP
static void
_grUpdateTriPacketHdr(FxU32 paramMask,
@@ -373,9 +370,6 @@ GR_STATE_ENTRY(grAlphaBlendFunction, void,
GDBG_INFO_MORE(gc->myLevel, "(%d,%d,%d,%d)\n",
rgb_sf, rgb_df, alpha_sf, alpha_df);
/* Watcom warning suppressor */
glideIdent[0] = glideIdent[0];
alphamode = gc->state.fbi_config.alphaMode;
if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) {
GR_CHECK_W(myName, 1, "unsupported alpha source blend function");

View File

@@ -72,7 +72,7 @@
#include "fxinline.h"
const FxU32 _grResolutionXY[16][2] =
static const FxU32 _grResolutionXY[16][2] =
{
{ 320, 200 }, /* 320x200 */
{ 320, 240 }, /* 320x240 */

View File

@@ -110,9 +110,9 @@ static FxBool Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrA
static FxBool Read16Bit(FxU16 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
#if ((GLIDE_PLATFORM & (GLIDE_OS_DOS32 | GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) != 0)
const char *openmode = "rb";
static const char *openmode = "rb";
#else
const char *openmode = "r";
static const char *openmode = "r";
#endif
typedef struct

View File

@@ -456,9 +456,6 @@
#include <lindri.h>
#endif
#include "rcver.h"
static char glideIdent[] = "@#%" VERSIONSTR ;
#if GLIDE_HW_TRI_SETUP
static void
_grUpdateTriPacketHdr(FxU32 paramMask,
@@ -482,9 +479,6 @@ GR_STATE_ENTRY(grAlphaBlendFunction, void,
GDBG_INFO_MORE(gc->myLevel, "(%d,%d,%d,%d)\n",
rgb_sf, rgb_df, alpha_sf, alpha_df);
/* Watcom warning suppressor */
glideIdent[0] = glideIdent[0];
alphamode = gc->state.shadow.alphaMode;
if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) {
GR_CHECK_W(myName, 1, "unsupported alpha source blend function");

View File

@@ -132,9 +132,9 @@ static FxBool Read16Bit(FxU16 *dst, FILE *image, int small_lod, int large_lod, G
static FxBool Read32Bit(FxU32 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
#if ((GLIDE_PLATFORM & (GLIDE_OS_DOS32 | GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) != 0)
const char *openmode = "rb";
static const char *openmode = "rb";
#else
const char *openmode = "r";
static const char *openmode = "r";
#endif
typedef struct

View File

@@ -654,9 +654,6 @@
#include <lindri.h>
#endif
#include "rcver.h"
static char glideIdent[] = "@#%" VERSIONSTR ;
#if GLIDE_HW_TRI_SETUP
static void
_grUpdateTriPacketHdr(FxU32 paramMask,
@@ -681,9 +678,6 @@ GR_STATE_ENTRY(grAlphaBlendFunction, void,
GDBG_INFO_MORE(gc->myLevel, "(%d,%d,%d,%d)\n",
rgb_sf, rgb_df, alpha_sf, alpha_df);
/* Watcom warning suppressor */
glideIdent[0] = glideIdent[0];
alphamode = gc->state.shadow.alphaMode;
if (gc->grPixelSize == 4) {
switch (alpha_sf) {

View File

@@ -175,7 +175,7 @@
#include "fxinline.h"
const FxU32 _grMemOffset[16] =
static const FxU32 _grMemOffset[16] =
{
65536, /* 320x200 */
65536, /* 320x240 */
@@ -195,7 +195,7 @@ const FxU32 _grMemOffset[16] =
65536 /* 400x300 */
};
const FxU32 _grResolutionRefresh[16][9] =
static const FxU32 _grResolutionRefresh[16][9] =
{
{ /* 320x200 */
0, /* 60 Hz */

View File

@@ -106,9 +106,9 @@ static FxBool Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrA
static FxBool Read16Bit(FxU16 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
#if ((GLIDE_PLATFORM & (GLIDE_OS_DOS32 | GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) != 0)
const char *openmode = "rb";
static const char *openmode = "rb";
#else
const char *openmode = "r";
static const char *openmode = "r";
#endif
typedef struct

View File

@@ -210,9 +210,6 @@
#include <init.h>
#endif
#include "rcver.h"
static char glideIdent[] = "@#%" VERSIONSTR ;
/*---------------------------------------------------------------------------
** grAlphaBlendFunction
**
@@ -227,9 +224,6 @@ GR_STATE_ENTRY(grAlphaBlendFunction, void, ( GrAlphaBlendFnc_t rgb_sf, GrAlpha
GR_BEGIN_NOFIFOCHECK("grAlphaBlendFunction",85);
GDBG_INFO_MORE((gc->myLevel,"(%d,%d,%d,%d)\n",rgb_sf,rgb_df,alpha_sf,alpha_df));
/* Watcom warning suppressor */
glideIdent[0] = glideIdent[0];
alphamode = gc->state.fbi_config.alphaMode;
if (alpha_sf != GR_BLEND_ONE && alpha_sf != GR_BLEND_ZERO) {
// GR_CHECK_W(myName, 1, "unsupported alpha source blend function");

View File

@@ -899,7 +899,7 @@ _GR_SET16(void *addr, unsigned short data)
#if defined( GLIDE_DEBUG ) && ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
extern char *regNames[];
extern const char *regNames[];
static FxU32 thisMask;
static FxU32 thisWrite;

View File

@@ -55,7 +55,7 @@
#include <sst1init.h>
#endif
const FxU32 _grResolutionXY[16][2] =
static const FxU32 _grResolutionXY[16][2] =
{
{ 320, 200 }, /* 320x200 */
{ 320, 240 }, /* 320x240 */

View File

@@ -104,7 +104,7 @@
#define GEN_INDEX(a) ((((FxU32) a) - ((FxU32) gc->reg_ptr)) >> 2)
char
const char
*regNames[] = {
"status", /* 0x00 */
"reserved001", /* 0x01 */