mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-22 02:19:31 +00:00
uMod2 Alpha Version: known bugs: I disabled the remove device function inside the gui, because something in the event handling goes terrible wrong.
Implemented a some new features.
This commit is contained in:
@@ -29,7 +29,7 @@ along with Universal Modding Engine. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
class uMod_TextureServer;
|
||||
|
||||
/*
|
||||
/**
|
||||
* An object of this class is owned by each d3dXX device.
|
||||
* functions called by the Server are called from the server thread instance.
|
||||
* All other functions are called from the render thread instance of the game itself.
|
||||
@@ -61,6 +61,21 @@ public:
|
||||
*/
|
||||
virtual int SaveSingleTexture(bool val) = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Enable/Disable the string in the left upper corner during save single texture mode (called from the mainloop).
|
||||
* @param[in] val
|
||||
* @return
|
||||
*/
|
||||
int ShowTextureString(bool val) {BoolShowTextureString = val; return (RETURN_OK);}
|
||||
|
||||
/**
|
||||
* Enable/Disable the hashing with CRC32, which is needed to support also tpf mods (called from the mainloop).
|
||||
* @param[in] val
|
||||
* @return
|
||||
*/
|
||||
int SupportTPF(bool val) {BoolComputeCRC = val; return (RETURN_OK);}
|
||||
|
||||
/**
|
||||
* Set the directory, wher the texture should be stored (called from the server)
|
||||
* @param dir
|
||||
@@ -96,21 +111,47 @@ public:
|
||||
|
||||
/**
|
||||
* Set the font color "during save single" texture mode. (called from the server)
|
||||
* @param r red value (0..255)
|
||||
* @param g green value (0..255)
|
||||
* @param b blue value (0..255)
|
||||
* @param colour
|
||||
* @return
|
||||
*/
|
||||
int SetFontColour( DWORD r, DWORD g, DWORD b) {FontColour = D3DCOLOR_ARGB(255, r,g,b); return (RETURN_OK);}
|
||||
int SetFontColour( DWORD64 colour) {FontColour = (D3DCOLOR) colour; return (RETURN_OK);}
|
||||
|
||||
/**
|
||||
* Set the texture color "during save single" texture mode. (called from the server)
|
||||
* @param r red value (0..255)
|
||||
* @param g green value (0..255)
|
||||
* @param b blue value (0..255)
|
||||
* @param colour
|
||||
* @return RETURN_OK
|
||||
*/
|
||||
int SetTextureColour( DWORD r, DWORD g, DWORD b) {TextureColour = D3DCOLOR_ARGB(255, r,g,b); return (RETURN_OK);}
|
||||
int SetTextureColour( DWORD64 colour) {TextureColour = (D3DCOLOR) colour; return (RETURN_OK);}
|
||||
|
||||
/**
|
||||
* @param[in] format
|
||||
* @return
|
||||
*/
|
||||
int SetFileFormat(DWORD64 format) {FileFormat = format; return (RETURN_OK);}
|
||||
|
||||
/**
|
||||
* @param[in] format
|
||||
* @return
|
||||
*/
|
||||
int SetFormatFilter(DWORD64 format) {FormatFilter = format; return (RETURN_OK);}
|
||||
|
||||
/**
|
||||
* @param[in] size
|
||||
* @return
|
||||
*/
|
||||
int SetWidthFilter(DWORD64 size) {WidthFilter = size; return (RETURN_OK);}
|
||||
|
||||
/**
|
||||
* @param[in] size
|
||||
* @return
|
||||
*/
|
||||
int SetHeightFilter(DWORD64 size) {HeightFilter = size; return (RETURN_OK);}
|
||||
|
||||
/**
|
||||
* @param[in] size
|
||||
* @return
|
||||
*/
|
||||
int SetDepthFilter(DWORD64 size) {DepthFilter = size; return (RETURN_OK);}
|
||||
|
||||
/**
|
||||
* The server add an update to the client.(called from server)
|
||||
@@ -128,23 +169,32 @@ public:
|
||||
virtual int MergeUpdate(void) = 0;
|
||||
|
||||
|
||||
bool BoolSaveAllTextures; //< true if all textures should be saved
|
||||
bool BoolSaveSingleTexture; //< true if "save single texture" mode is enabled
|
||||
int KeyBack; //< key value for going to the previous texture
|
||||
int KeySave; //< key value for saving the current texture
|
||||
int KeyNext; //< key value for going to the next texture
|
||||
bool BoolSaveAllTextures; //!< true if all textures should be saved
|
||||
bool BoolSaveSingleTexture; //!< true if "save single texture" mode is enabled
|
||||
bool BoolShowTextureString; //!< true if a string should be displayed during "save single texture" mode is enabled
|
||||
bool BoolComputeCRC; //!< if true also the crc32 is calculated, which is need to support tpf
|
||||
|
||||
D3DCOLOR FontColour; //< color of the message ("save single texture" mode)
|
||||
D3DCOLOR TextureColour; //< color of the texture ("save single texture" mode)
|
||||
int KeyBack; //!< key value for going to the previous texture
|
||||
int KeySave; //!< key value for saving the current texture
|
||||
int KeyNext; //!< key value for going to the next texture
|
||||
|
||||
D3DCOLOR FontColour; //!< color of the message ("save single texture" mode)
|
||||
D3DCOLOR TextureColour; //!< color of the texture ("save single texture" mode)
|
||||
|
||||
|
||||
DWORD64 FileFormat; //!< file format to which the texture should be saved
|
||||
DWORD64 FormatFilter; //!< texture format which should be saved (all==0, else bitwise 1=save,0=don't save)
|
||||
DWORD64 WidthFilter; //!< filter min<<32 max, texture size must be min<=size<=max
|
||||
DWORD64 HeightFilter; //!< filter min<<32 max, texture size must be min<=size<=max
|
||||
DWORD64 DepthFilter; //!< filter min<<32 max, texture size must be min<=size<=max
|
||||
|
||||
const int Version;
|
||||
uMod_TextureServer* Server; //< Pointer to the server
|
||||
wchar_t SavePath[MAX_PATH]; //< saving directory
|
||||
wchar_t GameName[MAX_PATH]; //< game name
|
||||
uMod_TextureServer* Server; //!< Pointer to the server
|
||||
wchar_t SavePath[MAX_PATH]; //!< saving directory
|
||||
wchar_t GameName[MAX_PATH]; //!< game name
|
||||
|
||||
TextureFileStruct* Update; //< array which stores the file in memory and the hash of each texture to be modded
|
||||
int NumberOfUpdate; //< number of texture to be modded
|
||||
TextureFileStruct* Update; //!< array which stores the file in memory and the hash of each texture to be modded
|
||||
int NumberOfUpdate; //!< number of texture to be modded
|
||||
|
||||
/**
|
||||
* Lock the mutex. The mutex protect the AddUpdate and MergeUpdate function to be called simultaneously.
|
||||
@@ -156,12 +206,19 @@ public:
|
||||
* @return RETURN_OK on success
|
||||
*/
|
||||
int UnlockMutex();
|
||||
HANDLE Mutex; //< The mutex protect the AddUpdate and MergeUpdate function to be called simultaneously.
|
||||
HANDLE Mutex; //!< The mutex protect the AddUpdate and MergeUpdate function to be called simultaneously.
|
||||
|
||||
int NumberToMod; //< number of texture to be modded
|
||||
TextureFileStruct* FileToMod; //< array which stores the file in memory and the hash of each texture to be modded
|
||||
int NumberToMod; //!< number of texture to be modded
|
||||
TextureFileStruct* FileToMod; //!< array which stores the file in memory and the hash of each texture to be modded
|
||||
|
||||
int GetIndex( MyTypeHash hash, int num_index_list=0, int *index_list=(int*)0); // called from LookUpToMod(...);
|
||||
/**
|
||||
* Find the given hash value in the \a FileToMod list. A vector with index can be passed. If so, only these index are considered in the search
|
||||
* @param hash hash value
|
||||
* @param num_index_list number of index vector
|
||||
* @param index_list pointer to the index vector
|
||||
* @return index or a negative value if the hash value was not found
|
||||
*/
|
||||
int GetIndex( DWORD64 hash, int num_index_list=0, int *index_list=(int*)0); // called from LookUpToMod(...);
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user