summaryrefslogtreecommitdiff
path: root/src/win95/texio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/win95/texio.c')
-rw-r--r--src/win95/texio.c181
1 files changed, 0 insertions, 181 deletions
diff --git a/src/win95/texio.c b/src/win95/texio.c
index 9dffdcf..39ba97c 100644
--- a/src/win95/texio.c
+++ b/src/win95/texio.c
@@ -149,184 +149,6 @@ void InitialiseImageHeaders(void)
#endif
}
-
-int LoadImageCHsForShapes(SHAPEHEADER **shapelist)
-
-{
-
- SHAPEHEADER **shlistptr;
- SHAPEHEADER *shptr;
- char **txfiles;
- int TxIndex;
- int LTxIndex;
-
-
-/*
-
- Build the Texture List
-
-*/
-
- shlistptr = shapelist;
-
- while(*shlistptr) {
-
- shptr = *shlistptr++;
-
- /* If the shape has textures */
-
- if(shptr->sh_localtextures) {
-
- txfiles = shptr->sh_localtextures;
-
- LTxIndex = 0;
-
- while(*txfiles) {
-
- /* The RIFF Image loaders have changed to support not loading the same image twice - JH 17-2-96 */
-
- char *src;
- char *dst;
- char fname[ImageNameSize];
- char *texfilesptr;
- #ifndef RIFF_SYSTEM
- int i, j, NewImage;
- char *iname;
- IMAGEHEADER *ihptr;
- IMAGEHEADER *new_ihptr;
- void* im;
- #endif
-
- txfilesptr = *txfiles++;
-
- /*
-
- "txfilesptr" is in the form "textures\<fname>". We need to
- prefix that text with the name of the current textures path.
-
- Soon this path may be varied but for now it is just the name of
- the current project subdirectory.
-
- */
-
- src = projectsubdirectory;
- dst = fname;
-
- while(*src)
- *dst++ = *src++;
-
- src = txfilesptr;
-
- while(*src)
- *dst++ = *src++;
-
- *dst = 0;
-
- #ifdef RIFF_SYSTEM
-
- /* This function calls GetExistingImageHeader to figure out if the image is already loaded */
- TxIndex = CL_LoadImageOnce(fname,(ScanDrawDirectDraw == ScanDrawMode ? LIO_CHIMAGE : LIO_D3DTEXTURE)|LIO_TRANSPARENT|LIO_RELATIVEPATH|LIO_RESTORABLE);
- GLOBALASSERT(GEI_NOTLOADED != TxIndex);
-
- #else
-
- /* If there are already images, try and find this one */
-
- NewImage = Yes;
-
- #ifdef MaxImageGroups
-
- TxIndex = CurrentImageGroup * MaxImages; /* Assume image 0 */
-
- if(NumImagesArray[CurrentImageGroup]) {
-
- for(i=NumImagesArray[CurrentImageGroup]; i!=0 && NewImage!=No; i--) {
-
- #else
-
- TxIndex = 0; /* Assume image 0 */
-
- if(NumImages) {
-
- for(i=NumImages; i!=0 && NewImage!=No; i--) {
-
- #endif
-
- ihptr = ImageHeaderPtrs[TxIndex];
-
- iname = &ihptr->ImageName[0];
-
- j = CompareFilenameCH(txfilesptr, iname);
-
- if(j) NewImage = No;
-
- else TxIndex++;
-
- }
-
- }
-
-
- /* If this is a new image, add it */
-
- if(NewImage) {
-
- /* Get an Image Header */
-
- new_ihptr = GetImageHeader();
-
- if(new_ihptr) {
-
- if (ScanDrawMode == ScanDrawDirectDraw)
- im = (void*) LoadImageCH(&fname[0], new_ihptr);
- else
- im = LoadImageIntoD3DImmediateSurface
- (&fname[0], new_ihptr, DefinedTextureType);
-
- }
-
- }
-
- #endif
-
- /*
-
- The local index for this image in this shape is
- "LTxIndex".
-
- The global index for the image is "TxIndex".
-
- We must go through the shape's items and change all the
- local references to global.
-
- */
-
- MakeShapeTexturesGlobal(shptr, TxIndex, LTxIndex);
-
- LTxIndex++; /* Next Local Texture */
-
- }
-
- /* Is this shape a sprite that requires resizing? */
-
- if((shptr->shapeflags & ShapeFlag_Sprite) &&
- (shptr->shapeflags & ShapeFlag_SpriteResizing)) {
-
- SpriteResizing(shptr);
-
- }
-
- }
-
- }
-
-
- return Yes;
-
-
-}
-
-
#else
@@ -575,10 +397,7 @@ int InitialiseTextures(void)
#endif
-
return Yes;
-
-
}