BugFix: in UpdateTexture, which was introduced a revision before.

support now:
- UpdateSurface
- uMod_IDirect3DSurface9

other improvements:
- added an update button
- uMod can now detect if textures changed their content
This commit is contained in:
code@koerner-de.net
2012-08-19 19:31:17 +00:00
parent b100018d5a
commit 24769aad67
28 changed files with 678 additions and 124 deletions
+17 -22
View File
@@ -23,8 +23,8 @@ along with Universal Modding Engine. If not, see <http://www.gnu.org/licenses/>
uMod_Settings::uMod_Settings(void)
{
XSize = 600;
YSize = 400;
XSize = 800;
YSize = 700;
XPos = -1;
YPos = -1;
UseHook = false;
@@ -118,9 +118,11 @@ int uMod_Settings::Load(void)
}
}
// get display size
int width, height;
wxDisplaySize( &width, &height);
// correct the size and the position of the window according to the dispplay size
if (XSize>width) XSize = width;
if (YSize>height) YSize = height;
if (XSize<50) XSize = 50;
@@ -136,6 +138,11 @@ int uMod_Settings::Load(void)
int uMod_Settings::Save(void)
{
if (XSize<10 || XSize>50000) return -1;
if (YSize<10 || YSize>50000) return -1;
if (XPos<10 || XPos>50000) return -1;
if (YPos<10 || YPos>50000) return -1;
wxFile file;
file.Open(SETTINGS_FILE, wxFile::write);
if (!file.IsOpened()) return -1;
@@ -146,29 +153,17 @@ int uMod_Settings::Save(void)
content << Language << "\n";
file.Write( content.wc_str(), content.Len()*2);
if (XSize>0 && XSize<50000)
{
content.Printf("x_size:%d\n", XSize);
file.Write( content.wc_str(), content.Len()*2);
}
content.Printf("x_size:%d\n", XSize);
file.Write( content.wc_str(), content.Len()*2);
if (YSize>0 && YSize<50000)
{
content.Printf("y_size:%d\n", YSize);
file.Write( content.wc_str(), content.Len()*2);
}
content.Printf("y_size:%d\n", YSize);
file.Write( content.wc_str(), content.Len()*2);
if (XPos>0 && XPos<50000)
{
content.Printf("x_pos:%d\n", XPos);
file.Write( content.wc_str(), content.Len()*2);
}
content.Printf("x_pos:%d\n", XPos);
file.Write( content.wc_str(), content.Len()*2);
if (YPos>0 && YPos<50000)
{
content.Printf("y_pos:%d\n", YPos);
file.Write( content.wc_str(), content.Len()*2);
}
content.Printf("y_pos:%d\n", YPos);
file.Write( content.wc_str(), content.Len()*2);
if (UseHook) content = "UseHook:1\n";
else content = "UseHook:0\n";