summaryrefslogtreecommitdiff
path: root/src/win95
diff options
context:
space:
mode:
Diffstat (limited to 'src/win95')
-rw-r--r--src/win95/animobs.cpp12
-rw-r--r--src/win95/chnktype.cpp6
-rw-r--r--src/win95/chunk.cpp9
-rw-r--r--src/win95/chunkpal.cpp10
-rw-r--r--src/win95/chunkpal.hpp4
-rw-r--r--src/win95/db.c4
-rw-r--r--src/win95/enumsch.cpp9
-rw-r--r--src/win95/hash_tem.hpp2
-rw-r--r--src/win95/hierchnk.cpp2
-rw-r--r--src/win95/huffman.cpp2
-rw-r--r--src/win95/io.c2
-rw-r--r--src/win95/ltchunk.cpp2
-rw-r--r--src/win95/obchunk.cpp3
-rw-r--r--src/win95/platform.h4
-rw-r--r--src/win95/shpchunk.cpp2
-rw-r--r--src/win95/texio.c3
16 files changed, 34 insertions, 42 deletions
diff --git a/src/win95/animobs.cpp b/src/win95/animobs.cpp
index 847361c..e8b4bb1 100644
--- a/src/win95/animobs.cpp
+++ b/src/win95/animobs.cpp
@@ -269,8 +269,7 @@ void Object_Animation_Sequence_Chunk::get_frames(List <Object_Animation_Sequence
for (LIF<Chunk *> cli(&cl); !cli.done(); cli.next())
{
pList->add_entry((Object_Animation_Sequence_Frame_Chunk *)cli());
- }
-
+ }
}
////////////////////////////////
@@ -319,9 +318,7 @@ Object_Animation_Sequence_Chunk::Object_Animation_Sequence_Chunk(Object_Animatio
break;
}
framelist.delete_first_entry();
- }
-
-
+ }
}
Object_Animation_Sequence_Chunk * Object_Animation_Sequences_Chunk::get_sequence (int num, int subnum)
@@ -346,10 +343,7 @@ Object_Animation_Sequence_Chunk * Object_Animation_Sequences_Chunk::get_sequence
{
return(sli());
}
- else
- {
- return(0);
- }
+ return 0;
}
int Object_Animation_Sequence_Chunk::get_sequence_time()
diff --git a/src/win95/chnktype.cpp b/src/win95/chnktype.cpp
index d09728e..754dc7d 100644
--- a/src/win95/chnktype.cpp
+++ b/src/win95/chnktype.cpp
@@ -179,9 +179,9 @@ ChunkVector& ChunkVector::operator-=(const ChunkVector& a)
ChunkVector::operator VECTORCH () const
{
VECTORCH v;
- v.vx = x;
- v.vy = y;
- v.vz = z;
+ v.vx = (int)x;
+ v.vy = (int)y;
+ v.vz = (int)z;
return(v);
}
diff --git a/src/win95/chunk.cpp b/src/win95/chunk.cpp
index a068f87..6e61338 100644
--- a/src/win95/chunk.cpp
+++ b/src/win95/chunk.cpp
@@ -231,8 +231,7 @@ Chunk_With_Children const * Chunk::GetRootChunk(void) const
Miscellaneous_Chunk::Miscellaneous_Chunk (Chunk_With_Children * parent, const char * identifier,
const char * _data, size_t _data_size)
-: Chunk (parent, identifier),
-data(NULL), data_size (_data_size)
+: Chunk (parent, identifier), data_size (_data_size), data(NULL)
{
if (data_size)
{
@@ -407,7 +406,7 @@ void Chunk_With_Children::lookup_child (const char * class_ident,List<Chunk*>& c
if (children)
while (child_ptr != NULL) {
- if (strncmp (class_ident, child_ptr->identifier, 8) == NULL)
+ if (strncmp (class_ident, child_ptr->identifier, 8) == 0)
{
assert (!child_ptr->r_u_miscellaneous());
child_list.add_entry(child_ptr);
@@ -426,7 +425,7 @@ unsigned Chunk_With_Children::count_children (char const * class_ident) const
if (children)
while (child_ptr != NULL) {
- if (strncmp (class_ident, child_ptr->identifier, 8) == NULL)
+ if (strncmp (class_ident, child_ptr->identifier, 8) == 0)
{
assert (!child_ptr->r_u_miscellaneous());
++ nChildren;
@@ -445,7 +444,7 @@ Chunk* Chunk_With_Children::lookup_single_child (const char * class_ident) const
Chunk * chunk_found=0;
if (children)
while (child_ptr != NULL) {
- if (strncmp (class_ident, child_ptr->identifier, 8) == NULL)
+ if (strncmp (class_ident, child_ptr->identifier, 8) == 0)
{
assert (!child_ptr->r_u_miscellaneous());
assert(!chunk_found);
diff --git a/src/win95/chunkpal.cpp b/src/win95/chunkpal.cpp
index 8bf84da..1e98413 100644
--- a/src/win95/chunkpal.cpp
+++ b/src/win95/chunkpal.cpp
@@ -154,8 +154,8 @@ Preset_Palette::Preset_Palette (Preset_Palette const & c)
, reserved1(c.reserved1)
, reserved2(c.reserved2)
, startpos(c.startpos)
-, pixel_data(grab_pixel_data(c.size, c.pixel_data))
, name(0)
+, pixel_data(grab_pixel_data(c.size, c.pixel_data))
{
if (c.name)
{
@@ -223,8 +223,8 @@ RIF_IMPLEMENT_DYNCREATE("PRSETPAL",Preset_Palette_Chunk)
Preset_Palette_Chunk::Preset_Palette_Chunk(Chunk_With_Children * const parent, char const * sdata, size_t const /*ssize*/)
: Chunk(parent,"PRSETPAL")
-, version_num(*(int *)sdata)
, flags(*(int *)(sdata+4))
+, version_num(*(int *)sdata)
, reserved1(*(int *)(sdata+8))
, reserved2(*(int *)(sdata+12))
, reserved3(*(int *)(sdata+16))
@@ -291,7 +291,7 @@ RIF_IMPLEMENT_DYNCREATE("ENVTXLIT",Environment_TLT_Chunk)
Environment_TLT_Chunk::Environment_TLT_Chunk (Chunk_With_Children * parent, const char * sdata, size_t ssize)
: Chunk (parent, "ENVTXLIT"), width (*((int*)(sdata))),
- num_levels (*((int*)(sdata+4))), flags(*(int *)(sdata+28)), table (0), filename(0)
+ num_levels (*((int*)(sdata+4))), flags(*(int *)(sdata+28)), filename(0), table (0)
{
int i;
@@ -417,8 +417,8 @@ TLT_Config_Chunk::TLT_Config_Chunk (Chunk_With_Children * parent, const char * s
: Chunk (parent, "TLTCONFG")
, num_shades_white(*(unsigned int const *)sdata)
, table_size(*(unsigned int const *)(sdata+4))
-, flags(*(unsigned int const *)(sdata+8))
, palette_size(*(unsigned int const *)(sdata+12))
+, flags(*(unsigned int const *)(sdata+8))
{
if (!table_size) table_size = 256;
@@ -833,8 +833,8 @@ RIF_IMPLEMENT_DYNCREATE("SETPALST",Preset_Palette_Store_Chunk)
Preset_Palette_Store_Chunk::Preset_Palette_Store_Chunk(Chunk_With_Children * const parent, char const * sdata, size_t const /*ssize*/)
: Chunk(parent,"SETPALST")
-, version_num(*(int *)sdata)
, flags(*(int *)(sdata+4))
+, version_num(*(int *)sdata)
, reserved1(*(int *)(sdata+8))
, reserved2(*(int *)(sdata+12))
, reserved3(*(int *)(sdata+16))
diff --git a/src/win95/chunkpal.hpp b/src/win95/chunkpal.hpp
index 8bb3c6e..534eff9 100644
--- a/src/win95/chunkpal.hpp
+++ b/src/win95/chunkpal.hpp
@@ -763,7 +763,7 @@ public:
strcpy(filename,fname);
}
}
- BMP_Flags(BMP_Name const & bn) : enum_id(bn.enum_id), version_num(bn.version_num), flags((BMPN_Flags)(bn.flags & COPY_BMPN_FLAGS)), filename(0)
+ BMP_Flags(BMP_Name const & bn) : filename(0), flags((BMPN_Flags)(bn.flags & COPY_BMPN_FLAGS)), version_num(bn.version_num), enum_id(bn.enum_id)
{
if (bn.filename)
{
@@ -771,7 +771,7 @@ public:
strcpy(filename,bn.filename);
}
}
- BMP_Flags(BMP_Flags const & c) : filename(0), enum_id(c.enum_id), version_num(c.version_num), flags(c.flags)
+ BMP_Flags(BMP_Flags const & c) : filename(0), flags(c.flags), version_num(c.version_num), enum_id(c.enum_id)
{
if (c.filename)
{
diff --git a/src/win95/db.c b/src/win95/db.c
index 13fc187..228bb1b 100644
--- a/src/win95/db.c
+++ b/src/win95/db.c
@@ -137,8 +137,10 @@ static int InitialisedLog = 0;
static int db_display_type = DB_DOS;
/* For DirectDraw mode. */
+#ifndef DB_NODIRECTDRAW
static struct db_dd_mode_tag dd_mode = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0};
static fontPtr FontP = NULL;
+#endif
/* Volatile zero. */
static volatile int db_vol_zero = 0;
@@ -150,10 +152,12 @@ static const char* db_assert_textA[ 3 ] =
"Expression: %s",
"File: %s Line: %d"
};
+#if 0
static const char* db_prompt_std =
"Quit program/force e(x)ception? [y/n/x]";
static const char* db_prompt_windows =
"Quit program? [Yes/No]/force exception? [Cancel]";
+#endif
static const char* db_assert_log_begin_text =
"DB: FAILED ASSERTION BEGINS";
static const char* db_assert_log_end_text =
diff --git a/src/win95/enumsch.cpp b/src/win95/enumsch.cpp
index 0138cab..73f8626 100644
--- a/src/win95/enumsch.cpp
+++ b/src/win95/enumsch.cpp
@@ -18,7 +18,7 @@ Enum_Constant::Enum_Constant(char const * const _cname, int const _value) : cnam
}
}
-Enum_Constant::Enum_Constant(Enum_Constant const & ec2) : reserved(ec2.reserved), value(ec2.value), cname(0)
+Enum_Constant::Enum_Constant(Enum_Constant const & ec2) : cname(0), value(ec2.value), reserved(ec2.reserved)
{
if (ec2.cname)
{
@@ -65,7 +65,7 @@ BOOL Enum_Constant::operator < (Enum_Constant const & ec2) const
Enum_Constant::Enum_Constant(char const * sdata)
-: value(*(int *)sdata), reserved(*(int *)(sdata+4)), cname(0)
+: cname(0), value(*(int *)sdata), reserved(*(int *)(sdata+4))
{
sdata+=8;
if (*sdata)
@@ -95,10 +95,7 @@ void Enum_Constant::fill_data_block (char * data_start)
RIF_IMPLEMENT_DYNCREATE("BMPENUMS",BMP_Enums_Chunk)
BMP_Enums_Chunk::BMP_Enums_Chunk(Chunk_With_Children * const parent, char const * sdata, size_t const /*ssize*/)
-: Chunk(parent,"BMPENUMS")
-, reserved1(*(int *)sdata)
-, reserved2(*(int *)(sdata+4))
-, ctype(0)
+: Chunk(parent,"BMPENUMS"), ctype(0), reserved1(*(int *)sdata), reserved2(*(int *)(sdata+4))
{
sdata+=8;
unsigned int const len = strlen(sdata)+1;
diff --git a/src/win95/hash_tem.hpp b/src/win95/hash_tem.hpp
index 190402c..8eb6fdb 100644
--- a/src/win95/hash_tem.hpp
+++ b/src/win95/hash_tem.hpp
@@ -290,7 +290,7 @@ class _base_HashTable
_base_HashTable(unsigned = HT_DEFAULTTABLESIZESHIFT);
// destructor
- ~_base_HashTable();
+ virtual ~_base_HashTable();
// copy constructor and assignment not provided in v1.0
_base_HashTable(_base_HashTable<TYPE,ARG_TYPE,CMP_ARG_TYPE> const &);
diff --git a/src/win95/hierchnk.cpp b/src/win95/hierchnk.cpp
index 3f48e48..22d4844 100644
--- a/src/win95/hierchnk.cpp
+++ b/src/win95/hierchnk.cpp
@@ -52,7 +52,7 @@ Object_Hierarchy_Name_Chunk * Object_Hierarchy_Chunk::get_name ()
RIF_IMPLEMENT_DYNCREATE("OBJHIERD",Object_Hierarchy_Data_Chunk)
Object_Hierarchy_Data_Chunk::Object_Hierarchy_Data_Chunk (Object_Hierarchy_Chunk * parent, const char * obname)
-: Chunk (parent, "OBJHIERD"), ob_name (0), object(0)
+: Chunk (parent, "OBJHIERD"), object(0), ob_name (0)
{
num_extra_data=0;
extra_data=0;
diff --git a/src/win95/huffman.cpp b/src/win95/huffman.cpp
index 64100e1..b9523d9 100644
--- a/src/win95/huffman.cpp
+++ b/src/win95/huffman.cpp
@@ -162,7 +162,7 @@ static void MakeHuffTreeFromHuffItems(HuffNode *base, HuffItem *source, int coun
{
temp[n].bits = source[n].Count;
}
- while (upperlim = --count)
+ while ((upperlim = --count))
{
if (temp[0].zero)
temp[0].zero->parent = temp[0].one->parent = movdest;
diff --git a/src/win95/io.c b/src/win95/io.c
index a021f34..1e5c2fa 100644
--- a/src/win95/io.c
+++ b/src/win95/io.c
@@ -1151,7 +1151,7 @@ static int DHM_MoveBufferToQueue(int* pPosX,int* pPosY,int fZeroLeftMargin)
/* It is a standard character or a space */
DHM_AddToQueue(*pPosX,(*pPosY)+textprint_Y_offset, *pCh);
- (*pPosX)+=AAFontWidths[*pCh];//CharWidthInPixels(*pCh);
+ (*pPosX)+=AAFontWidths[(int)*pCh];//CharWidthInPixels(*pCh);
if ((*pPosX)>LastDisplayableXForChars())
{
diff --git a/src/win95/ltchunk.cpp b/src/win95/ltchunk.cpp
index b000a9c..2446830 100644
--- a/src/win95/ltchunk.cpp
+++ b/src/win95/ltchunk.cpp
@@ -241,7 +241,7 @@ RIF_IMPLEMENT_DYNCREATE("SHPVTINT",Shape_Vertex_Intensities_Chunk)
Shape_Vertex_Intensities_Chunk::Shape_Vertex_Intensities_Chunk
(Chunk_With_Children *parent, char *lsn, int num_v, int * i_array)
-: Chunk (parent, "SHPVTINT"), num_vertices(num_v), pad (0)
+: Chunk (parent, "SHPVTINT"), pad (0), num_vertices(num_v)
{
strncpy (light_set_name, lsn, 8);
diff --git a/src/win95/obchunk.cpp b/src/win95/obchunk.cpp
index e90c7ce..67fb263 100644
--- a/src/win95/obchunk.cpp
+++ b/src/win95/obchunk.cpp
@@ -630,8 +630,7 @@ RIF_IMPLEMENT_DYNCREATE("OBJNOTES",Object_Notes_Chunk)
Object_Notes_Chunk::Object_Notes_Chunk (Chunk_With_Children * parent,
const char * _data, size_t _data_size)
-: Chunk(parent, "OBJNOTES"),
-data(NULL), data_size(_data_size)
+: Chunk(parent, "OBJNOTES"), data_size(_data_size), data(NULL)
{
data_store = new char [data_size];
diff --git a/src/win95/platform.h b/src/win95/platform.h
index 0c3bcab..f8f6331 100644
--- a/src/win95/platform.h
+++ b/src/win95/platform.h
@@ -609,8 +609,8 @@ typedef enum {
long GetWindowsTickCount(void);
void CheckForWindowsMessages(void);
-//BOOL ExitWindowsSystem(void);
-//BOOL InitialiseWindowsSystem(HANDLE hInstance, int nCmdShow, int WinInitMode);
+BOOL ExitWindowsSystem(void);
+BOOL InitialiseWindowsSystem(HANDLE hInstance, int nCmdShow, int WinInitMode);
//void KeyboardHandlerKeyDown(WPARAM wParam);
//void KeyboardHandlerKeyUp(WPARAM wParam);
//void MouseVelocityHandler(UINT message, LPARAM lParam);
diff --git a/src/win95/shpchunk.cpp b/src/win95/shpchunk.cpp
index 0514de0..0fe1811 100644
--- a/src/win95/shpchunk.cpp
+++ b/src/win95/shpchunk.cpp
@@ -2265,7 +2265,7 @@ Shape_Morphing_Data_Chunk::Shape_Morphing_Data_Chunk (Shape_Chunk * parent, cons
}
Shape_Morphing_Data_Chunk::Shape_Morphing_Data_Chunk (Shape_Sub_Shape_Chunk * parent, const char *data, size_t size)
-: Chunk_With_Children (parent, "SHPMORPH"), parent_sub_shape (parent), parent_shape (0)
+: Chunk_With_Children (parent, "SHPMORPH"), parent_shape (0), parent_sub_shape (parent)
{
const char * buffer_ptr = data;
diff --git a/src/win95/texio.c b/src/win95/texio.c
index 39ba97c..3e23805 100644
--- a/src/win95/texio.c
+++ b/src/win95/texio.c
@@ -35,7 +35,7 @@
#include "awtexld.h"
-//#include "alt_tab.h"
+#include "alt_tab.h"
/*
#define for experimental purposes
@@ -62,7 +62,6 @@ int tripc = 0;
*/
extern SHAPEHEADER **mainshapelist;
- extern (*ShapeLanguageFunctions[])(SHAPEINSTR *shapeinstrptr);
extern SCREENDESCRIPTORBLOCK ScreenDescriptorBlock;
extern unsigned char *ScreenBuffer;
extern char projectsubdirectory[];