Files
firestorm/Gameleap/code/mw4/Libraries/mlr/GOSImage.hpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

89 lines
1.5 KiB
C++

#pragma once
#define MLR_GOSIMAGE_HPP
#if !defined(MLR_MLR_HPP)
#include <MLR\MLR.hpp>
#endif
#if !defined(GAMEOS_HPP)
#include <GameOS\GameOS.hpp>
#endif
namespace MidLevelRenderer {
class GOSImage:
public Stuff::Plug
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Constructors/Destructors
//
public:
GOSImage(const char* imageName);
GOSImage(DWORD imageHandle);
GOSImage(gos_TextureFormat, const char*, int, gos_TextureHints);
~GOSImage();
int
GetWidth();
int
GetHeight();
const char*
GetName()
{ Check_Object(this); return imageName; }
int
Ref()
{ Check_Object(this); instance++; return instance; }
int
DeRef()
{ Check_Object(this); instance--; return instance; }
int
GetRef()
{ Check_Object(this); return instance; }
bool
IsLoaded()
{ Check_Object(this); return ( (flags & Loaded) != 0); }
DWORD
GetHandle()
{ Check_Object(this); return imageHandle; }
enum {
Loaded = 1,
Locked = 2
};
void
LockImage();
void
UnlockImage();
BYTE*
GetImagePtr();
int
GetPitch()
{ return ptr.Pitch; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Testing
//
public:
void
TestInstance() const
{}
Stuff::MString imageName;
int instance;
int flags;
DWORD imageHandle;
TEXTUREPTR ptr;
};
}