Many warnings cleaned up (Tim Beckmann)

Menus.
This commit is contained in:
Steven Fuller 2001-12-06 00:22:46 +00:00 committed by Patryk Obara
parent 4508748944
commit 9f006f18fe
115 changed files with 1651 additions and 581 deletions

View file

@ -283,4 +283,4 @@ public:
Object_Animation_Sequence* sequences;
};
#endif
#endif

View file

@ -19,6 +19,8 @@ typedef DIRECTDRAWSURFACE DDSurface;
typedef struct DIRECT3DTEXTURE
{
unsigned char *buf;
int id;
int w;

View file

@ -500,6 +500,7 @@ void AwBackupTexture::ChoosePixelFormat(AwTl::CreateTextureParms const & _parmsR
pixelFormat.alphaB = 1;
pixelFormat.validB = 1;
pixelFormat.texB = 1;
pixelFormat.bitsPerPixel = 32;
pixelFormat.redLeftShift = 0;
pixelFormat.greenLeftShift = 8;
@ -513,6 +514,7 @@ void AwBackupTexture::ChoosePixelFormat(AwTl::CreateTextureParms const & _parmsR
extern "C" {
extern int CreateOGLTexture(D3DTexture *, unsigned char *);
extern int CreateIMGSurface(D3DTexture *, unsigned char *);
};
AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const & _parmsR)
@ -520,8 +522,11 @@ AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const &
using namespace AwTl;
// fprintf(stderr, "AwBackupTexture::CreateTexture(...) This is where we could convert the image to RGB/RGBA, and so on\n");
if (_parmsR.originalWidthP) *_parmsR.originalWidthP = m_nWidth;
if (_parmsR.originalHeightP) *_parmsR.originalHeightP = m_nHeight;
D3DTexture *Tex = new D3DTexture;
D3DTexture *Tex = (D3DTexture *)malloc(sizeof(D3DTexture));
unsigned char *buf = (unsigned char *)malloc(m_nWidth * m_nHeight * 4);
@ -571,9 +576,15 @@ AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const &
/* temp junk */
Tex->w = m_nWidth;
Tex->h = m_nHeight;
CreateOGLTexture(Tex, buf); /* this will set the id */
free(buf);
if (pixelFormat.texB) {
Tex->buf = NULL; /* not used */
CreateOGLTexture(Tex, buf); /* this will set the id */
free(buf);
} else {
Tex->buf = buf; /* hey, I need this! */
CreateIMGSurface(Tex, buf);
}
return static_cast<SurfUnion>(Tex);
#if 0
@ -2154,6 +2165,7 @@ DDSurface * AwCreateSurface(char const * _argFormatS, ...)
pixelFormat.alphaB = 1;
pixelFormat.validB = 1;
pixelFormat.texB = 0;
pixelFormat.bitsPerPixel = 32;
pixelFormat.redLeftShift = 0;
pixelFormat.greenLeftShift = 8;

View file

@ -23,6 +23,7 @@ namespace AwTl {
bool palettizedB : 1;
bool alphaB : 1;
bool validB : 1;
bool texB : 1;
unsigned bitsPerPixel;
unsigned redLeftShift;

View file

@ -724,4 +724,4 @@ private:
#endif
#endif

View file

@ -393,4 +393,4 @@ struct ChunkAnimSequence
int num_verts;
ChunkVectorFloat* v_normal_list;
};
#endif
#endif

View file

@ -20,4 +20,4 @@ void CL_Init_All(void);
};
#endif
#endif // !_included_cl_init_h_
#endif // !_included_cl_init_h_

View file

@ -78,4 +78,4 @@ private :
};
#endif
#endif

View file

@ -79,4 +79,4 @@ private:
#endif // _included_enumchnk_hpp_
#endif // _included_enumchnk_hpp_

View file

@ -198,4 +198,4 @@ public :
int spare1,spare2;
};
#endif
#endif

View file

@ -79,4 +79,4 @@ public :
#endif
#endif

View file

@ -79,4 +79,4 @@ private:
#endif // _included_gsprchnk_hpp_
#endif // _included_gsprchnk_hpp_

View file

@ -200,4 +200,4 @@ public :
ChunkVectorInt min;
ChunkVectorInt max;
};
#endif
#endif

View file

@ -821,4 +821,4 @@ namespace IFF {
pSub->Release();
}
} // namespace IFF
} // namespace IFF

View file

@ -84,4 +84,4 @@ namespace IFF
}
}
}
}

View file

@ -270,4 +270,4 @@ public :
int spare1,spare2,spare3,spare4;
};
#endif
#endif

View file

@ -248,4 +248,4 @@ private:
#endif
#endif

View file

@ -500,4 +500,4 @@ public :
int spare2;
};
#endif
#endif

View file

@ -96,4 +96,4 @@ public :
//constructor from buffer
Strategy_Chunk (Chunk_With_Children * parent,const char* data,size_t);
};
#endif
#endif

View file

@ -1087,4 +1087,4 @@ private:
friend class Shape_Sub_Shape_Chunk;
};
#endif
#endif

View file

@ -348,4 +348,4 @@ size_t Sound_Collection_Chunk::size_chunk()
chunk_size=12+12+num_sounds*sizeof(ChunkSoundWeighting);
return chunk_size;
}
*/
*/

View file

@ -20,4 +20,4 @@ public :
};
#endif
#endif