diff options
Diffstat (limited to 'src/win95')
| -rw-r--r-- | src/win95/animobs.hpp | 2 | ||||
| -rw-r--r-- | src/win95/aw.h | 2 | ||||
| -rw-r--r-- | src/win95/awtexld.cpp | 20 | ||||
| -rw-r--r-- | src/win95/awtexld.hpp | 1 | ||||
| -rw-r--r-- | src/win95/bmpnames.hpp | 2 | ||||
| -rw-r--r-- | src/win95/chnktype.hpp | 2 | ||||
| -rw-r--r-- | src/win95/cl_init.h | 2 | ||||
| -rw-r--r-- | src/win95/dummyobjectchunk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/enumchnk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/envchunk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/fragchnk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/gsprchnk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/hierchnk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/iff.cpp | 2 | ||||
| -rw-r--r-- | src/win95/ilbm_ext.cpp | 2 | ||||
| -rw-r--r-- | src/win95/ltchunk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/mishchnk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/obchunk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/oechunk.h | 2 | ||||
| -rw-r--r-- | src/win95/shpchunk.hpp | 2 | ||||
| -rw-r--r-- | src/win95/sndchunk.cpp | 2 | ||||
| -rw-r--r-- | src/win95/toolchnk.hpp | 2 |
22 files changed, 38 insertions, 23 deletions
diff --git a/src/win95/animobs.hpp b/src/win95/animobs.hpp index 0cdb9f8..727df47 100644 --- a/src/win95/animobs.hpp +++ b/src/win95/animobs.hpp @@ -283,4 +283,4 @@ public: Object_Animation_Sequence* sequences; }; -#endif
\ No newline at end of file +#endif diff --git a/src/win95/aw.h b/src/win95/aw.h index 62c85db..902d9f4 100644 --- a/src/win95/aw.h +++ b/src/win95/aw.h @@ -19,6 +19,8 @@ typedef DIRECTDRAWSURFACE DDSurface; typedef struct DIRECT3DTEXTURE { + unsigned char *buf; + int id; int w; diff --git a/src/win95/awtexld.cpp b/src/win95/awtexld.cpp index 3394374..337e1d0 100644 --- a/src/win95/awtexld.cpp +++ b/src/win95/awtexld.cpp @@ -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; diff --git a/src/win95/awtexld.hpp b/src/win95/awtexld.hpp index 34e287f..e41400c 100644 --- a/src/win95/awtexld.hpp +++ b/src/win95/awtexld.hpp @@ -23,6 +23,7 @@ namespace AwTl { bool palettizedB : 1; bool alphaB : 1; bool validB : 1; + bool texB : 1; unsigned bitsPerPixel; unsigned redLeftShift; diff --git a/src/win95/bmpnames.hpp b/src/win95/bmpnames.hpp index 5616b12..40d7c80 100644 --- a/src/win95/bmpnames.hpp +++ b/src/win95/bmpnames.hpp @@ -724,4 +724,4 @@ private: -#endif
\ No newline at end of file +#endif diff --git a/src/win95/chnktype.hpp b/src/win95/chnktype.hpp index 9a3a57d..c35e8d4 100644 --- a/src/win95/chnktype.hpp +++ b/src/win95/chnktype.hpp @@ -393,4 +393,4 @@ struct ChunkAnimSequence int num_verts; ChunkVectorFloat* v_normal_list; }; -#endif
\ No newline at end of file +#endif diff --git a/src/win95/cl_init.h b/src/win95/cl_init.h index 79cfba2..a0b35c7 100644 --- a/src/win95/cl_init.h +++ b/src/win95/cl_init.h @@ -20,4 +20,4 @@ void CL_Init_All(void); }; #endif -#endif // !_included_cl_init_h_
\ No newline at end of file +#endif // !_included_cl_init_h_ diff --git a/src/win95/dummyobjectchunk.hpp b/src/win95/dummyobjectchunk.hpp index adb3a93..2655755 100644 --- a/src/win95/dummyobjectchunk.hpp +++ b/src/win95/dummyobjectchunk.hpp @@ -78,4 +78,4 @@ private : }; -#endif
\ No newline at end of file +#endif diff --git a/src/win95/enumchnk.hpp b/src/win95/enumchnk.hpp index a29bf16..8b65a05 100644 --- a/src/win95/enumchnk.hpp +++ b/src/win95/enumchnk.hpp @@ -79,4 +79,4 @@ private: -#endif // _included_enumchnk_hpp_
\ No newline at end of file +#endif // _included_enumchnk_hpp_ diff --git a/src/win95/envchunk.hpp b/src/win95/envchunk.hpp index ee4b578..445a700 100644 --- a/src/win95/envchunk.hpp +++ b/src/win95/envchunk.hpp @@ -198,4 +198,4 @@ public : int spare1,spare2; }; -#endif
\ No newline at end of file +#endif diff --git a/src/win95/fragchnk.hpp b/src/win95/fragchnk.hpp index 4fc806e..340e054 100644 --- a/src/win95/fragchnk.hpp +++ b/src/win95/fragchnk.hpp @@ -79,4 +79,4 @@ public : -#endif
\ No newline at end of file +#endif diff --git a/src/win95/gsprchnk.hpp b/src/win95/gsprchnk.hpp index ede6395..a1ca067 100644 --- a/src/win95/gsprchnk.hpp +++ b/src/win95/gsprchnk.hpp @@ -79,4 +79,4 @@ private: -#endif // _included_gsprchnk_hpp_
\ No newline at end of file +#endif // _included_gsprchnk_hpp_ diff --git a/src/win95/hierchnk.hpp b/src/win95/hierchnk.hpp index 3e2881b..4772196 100644 --- a/src/win95/hierchnk.hpp +++ b/src/win95/hierchnk.hpp @@ -200,4 +200,4 @@ public : ChunkVectorInt min; ChunkVectorInt max; }; -#endif
\ No newline at end of file +#endif diff --git a/src/win95/iff.cpp b/src/win95/iff.cpp index a65ffaa..4e176d6 100644 --- a/src/win95/iff.cpp +++ b/src/win95/iff.cpp @@ -821,4 +821,4 @@ namespace IFF { pSub->Release(); } -} // namespace IFF
\ No newline at end of file +} // namespace IFF diff --git a/src/win95/ilbm_ext.cpp b/src/win95/ilbm_ext.cpp index 613cdd4..77a2eaa 100644 --- a/src/win95/ilbm_ext.cpp +++ b/src/win95/ilbm_ext.cpp @@ -84,4 +84,4 @@ namespace IFF } } -}
\ No newline at end of file +} diff --git a/src/win95/ltchunk.hpp b/src/win95/ltchunk.hpp index 8fee87b..3b7de43 100644 --- a/src/win95/ltchunk.hpp +++ b/src/win95/ltchunk.hpp @@ -270,4 +270,4 @@ public : int spare1,spare2,spare3,spare4; }; -#endif
\ No newline at end of file +#endif diff --git a/src/win95/mishchnk.hpp b/src/win95/mishchnk.hpp index 411e49c..237da64 100644 --- a/src/win95/mishchnk.hpp +++ b/src/win95/mishchnk.hpp @@ -248,4 +248,4 @@ private: -#endif
\ No newline at end of file +#endif diff --git a/src/win95/obchunk.hpp b/src/win95/obchunk.hpp index b4780b3..29233f8 100644 --- a/src/win95/obchunk.hpp +++ b/src/win95/obchunk.hpp @@ -500,4 +500,4 @@ public : int spare2; }; -#endif
\ No newline at end of file +#endif diff --git a/src/win95/oechunk.h b/src/win95/oechunk.h index 40bea19..5dc247c 100644 --- a/src/win95/oechunk.h +++ b/src/win95/oechunk.h @@ -96,4 +96,4 @@ public : //constructor from buffer Strategy_Chunk (Chunk_With_Children * parent,const char* data,size_t); }; -#endif
\ No newline at end of file +#endif diff --git a/src/win95/shpchunk.hpp b/src/win95/shpchunk.hpp index accddf7..18f8041 100644 --- a/src/win95/shpchunk.hpp +++ b/src/win95/shpchunk.hpp @@ -1087,4 +1087,4 @@ private: friend class Shape_Sub_Shape_Chunk; }; -#endif
\ No newline at end of file +#endif diff --git a/src/win95/sndchunk.cpp b/src/win95/sndchunk.cpp index c0e08d3..7054111 100644 --- a/src/win95/sndchunk.cpp +++ b/src/win95/sndchunk.cpp @@ -348,4 +348,4 @@ size_t Sound_Collection_Chunk::size_chunk() chunk_size=12+12+num_sounds*sizeof(ChunkSoundWeighting); return chunk_size; } -*/
\ No newline at end of file +*/ diff --git a/src/win95/toolchnk.hpp b/src/win95/toolchnk.hpp index f266d72..9dcd789 100644 --- a/src/win95/toolchnk.hpp +++ b/src/win95/toolchnk.hpp @@ -20,4 +20,4 @@ public : }; -#endif
\ No newline at end of file +#endif |
