Many warnings cleaned up (Tim Beckmann)
Menus.
This commit is contained in:
parent
4508748944
commit
9f006f18fe
115 changed files with 1651 additions and 581 deletions
|
@ -283,4 +283,4 @@ public:
|
|||
Object_Animation_Sequence* sequences;
|
||||
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -19,6 +19,8 @@ typedef DIRECTDRAWSURFACE DDSurface;
|
|||
|
||||
typedef struct DIRECT3DTEXTURE
|
||||
{
|
||||
unsigned char *buf;
|
||||
|
||||
int id;
|
||||
|
||||
int w;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace AwTl {
|
|||
bool palettizedB : 1;
|
||||
bool alphaB : 1;
|
||||
bool validB : 1;
|
||||
bool texB : 1;
|
||||
|
||||
unsigned bitsPerPixel;
|
||||
unsigned redLeftShift;
|
||||
|
|
|
@ -724,4 +724,4 @@ private:
|
|||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -393,4 +393,4 @@ struct ChunkAnimSequence
|
|||
int num_verts;
|
||||
ChunkVectorFloat* v_normal_list;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -20,4 +20,4 @@ void CL_Init_All(void);
|
|||
};
|
||||
#endif
|
||||
|
||||
#endif // !_included_cl_init_h_
|
||||
#endif // !_included_cl_init_h_
|
||||
|
|
|
@ -78,4 +78,4 @@ private :
|
|||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -79,4 +79,4 @@ private:
|
|||
|
||||
|
||||
|
||||
#endif // _included_enumchnk_hpp_
|
||||
#endif // _included_enumchnk_hpp_
|
||||
|
|
|
@ -198,4 +198,4 @@ public :
|
|||
int spare1,spare2;
|
||||
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -79,4 +79,4 @@ public :
|
|||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -79,4 +79,4 @@ private:
|
|||
|
||||
|
||||
|
||||
#endif // _included_gsprchnk_hpp_
|
||||
#endif // _included_gsprchnk_hpp_
|
||||
|
|
|
@ -200,4 +200,4 @@ public :
|
|||
ChunkVectorInt min;
|
||||
ChunkVectorInt max;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -821,4 +821,4 @@ namespace IFF {
|
|||
pSub->Release();
|
||||
}
|
||||
|
||||
} // namespace IFF
|
||||
} // namespace IFF
|
||||
|
|
|
@ -84,4 +84,4 @@ namespace IFF
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -270,4 +270,4 @@ public :
|
|||
int spare1,spare2,spare3,spare4;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -248,4 +248,4 @@ private:
|
|||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -500,4 +500,4 @@ public :
|
|||
int spare2;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -96,4 +96,4 @@ public :
|
|||
//constructor from buffer
|
||||
Strategy_Chunk (Chunk_With_Children * parent,const char* data,size_t);
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1087,4 +1087,4 @@ private:
|
|||
friend class Shape_Sub_Shape_Chunk;
|
||||
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -348,4 +348,4 @@ size_t Sound_Collection_Chunk::size_chunk()
|
|||
chunk_size=12+12+num_sounds*sizeof(ChunkSoundWeighting);
|
||||
return chunk_size;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
|
|
@ -20,4 +20,4 @@ public :
|
|||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue