uMod2 Alpha Version:

known bugs: I disabled the remove device function inside the gui, because something in the event handling goes terrible wrong.

Changes:
- hashing algorithm is now a CRC64 value
- changed CRC32 algorithm to a faster one
- in save single texture mode, the selected texture can now be displayed
- the way how uMod get the raw data of the texture was changed
This commit is contained in:
code@koerner-de.net
2012-08-04 19:30:29 +00:00
parent 0bc7eebede
commit 071ac3ece5
41 changed files with 1126 additions and 1108 deletions
+11 -8
View File
@@ -96,15 +96,18 @@ int uMod_Sender::Send( const uMod_GameInfo &game, const uMod_GameInfo &game_old,
}
SendBool( game.ShowSingleTextureString(), CONTROL_SHOW_STRING);
SendBool( game.ShowSingleTexture(), CONTROL_SHOW_TEXTURE);
SendBool( game.GetSaveSingleTexture(), CONTROL_SAVE_SINGLE);
SendBool(game.GetSaveAllTextures(), CONTROL_SAVE_ALL);
SendBool( game.GetSaveAllTextures(), CONTROL_SAVE_ALL);
SendBool(game.SupportTPF(), CONTROL_SUPPORT_TPF);
SendPath(game.GetSavePath());
/*
wxString path;
path = game.GetSavePath();
if (path!=game_old.GetSavePath()) SendPath(path);
*/
@@ -304,16 +307,16 @@ int uMod_Sender::SendPath( const wxString &path)
msg->Hash = 0u;
msg->Control = CONTROL_SET_DIR;
int len = path.Len();
if ((len+1)*sizeof(wchar_t) + sizeof(MsgStruct) >= BIG_BUFSIZE) return -1;
const wchar_t *file = path.wc_str();
wchar_t *buff_file = (wchar_t*) &Buffer[sizeof(MsgStruct)];
int len = 0;
while (file[len] && (sizeof(MsgStruct)+len*sizeof(wchar_t))<BIG_BUFSIZE) {buff_file[len] = file[len]; len++;};
if ((sizeof(MsgStruct)+len*sizeof(wchar_t))<BIG_BUFSIZE) buff_file[len] = 0;
len++;
for (int i=0; i<len; i++) {buff_file[i] = file[i];}
buff_file[len] = 0;
msg->Value = len*sizeof(wchar_t);
return SendToGame( Buffer, sizeof(MsgStruct)+len*sizeof(wchar_t));
msg->Value = (len+1)*sizeof(wchar_t);
return SendToGame( Buffer, sizeof(MsgStruct)+(len+1)*sizeof(wchar_t));
}