abhi2011 Posted April 18, 2015 Author Share Posted April 18, 2015 Hey guys, So going through the entire code and more specifically through the GDIp code, I found a weird bug that JC left in with the original working DX8 engine. Almost every DX8 engine on this forum was based on JC's EO 3.0 and hence has this bug. I believe that this should be fixed. Even though it doesn't cause anything to crash and is pretty much harmless, it's still a coding mistake. **I urge all those who have created a DX8 engine and all those who are making a game in a DX8 engine to please fix this. **In **cGDIPImage** find the method, **LoadPicture_FromNothing**Change ```hImage = pvCreateSourcelessImage2(hImage, Width, Height, 1&, TokenClass, graphics)```to ```hImage = pvCreateSourcelessImage2(hImage, Width, Height, 0&, TokenClass, graphics)```Find **LoadTexture**. It'll most probably be in the Rendering module of your engine. Change this: ```Call ConvertedBitmap.LoadPicture_FromNothing(newHeight, newWidth, I, GDIToken) 'I HAVE NO IDEA why this is backwards but it works.```To this: ```Call ConvertedBitmap.LoadPicture_FromNothing(newWidth, newHeight, I, GDIToken) 'This is no longer backwards and it now works. ```Make sure this is done for every call of **LoadPicture_FromNothing **i.e swap the first two parameters that correspond to the width and height of the Image.So, what's this bug all about?Well, LoadPicture_FromNothing is a method that JC created in the original cGDIpClass so that textures that don't have dimensions in the powers of two can be converted. He basically wanted to load up the original png file, make a new image with the dimensions which is a power of two closest to the original png. But, there was no method for creating an image from nothing. But when he actually wrote the code for it, he set up parameter wrong in the method. Originally it was **1& **but now, it's been changed to **0&**. That parameter is a flag for flipping the image i.e it swaps the width and height of the image. Now, is this fix an absolute necessary for your game to run smoothly without any crashes? Probably not. I haven't heard of any bugs caused due to this method. But, should you fix it? Absolutely. Mainly because it's a coding mistake that should be fixed. If you have any questions about this bug fix or would like to learn more about this then shoot me a PM and I'll be glad to help. Regards, Abhi2011 Link to comment Share on other sites More sharing options...
Alerd Posted April 18, 2015 Share Posted April 18, 2015 hmm this fix repair crash client in ctrl + alt + delete? Link to comment Share on other sites More sharing options...
abhi2011 Posted April 19, 2015 Author Share Posted April 19, 2015 No, that's a totally reason. And most engines already handle that problem. Which engine are you using? Link to comment Share on other sites More sharing options...
Alerd Posted April 19, 2015 Share Posted April 19, 2015 Crystalshire Link to comment Share on other sites More sharing options...
abhi2011 Posted April 19, 2015 Author Share Posted April 19, 2015 The Crystalshire Developers Edition doesn't have the fix for that particular bug. But most other DX8 engines do. Please look into their source code. If you are in need of further help, please do not leave it here, but rather make a new topic in appropriate Forum Board. Link to comment Share on other sites More sharing options...
Spiegel Posted April 25, 2015 Share Posted April 25, 2015 Just as a little note, only engines based off of JC's code will have this, there's a couple different variants of DirectX8 going around, some of which were written far before EO3 came out and not all of them use the same methods. Link to comment Share on other sites More sharing options...
abhi2011 Posted April 25, 2015 Author Share Posted April 25, 2015 It's been a long time since I checked the Custom Engine board, but I'm pretty sure Crystalshire is the only other DX8 engine. Link to comment Share on other sites More sharing options...
Spiegel Posted April 25, 2015 Share Posted April 25, 2015 On this forum, yes. But there were far more DirectX8 variants of Mirage, albeit mostly broken ones. Link to comment Share on other sites More sharing options...
abhi2011 Posted April 26, 2015 Author Share Posted April 26, 2015 > On this forum, yes. But there were far more DirectX8 variants of Mirage, albeit mostly broken ones.:o, that I did not know. Link to comment Share on other sites More sharing options...
Justin Knight Posted May 7, 2015 Share Posted May 7, 2015 thank you so much for this tut! Link to comment Share on other sites More sharing options...
abhi2011 Posted May 7, 2015 Author Share Posted May 7, 2015 No problem! :) Link to comment Share on other sites More sharing options...
Bryan Houser Posted May 16, 2015 Share Posted May 16, 2015 Hello! I am new here, ~~I found error hot key at top on right-side by corner and It was flash (blank often) I saved the log errors:~~~~1.The following error occured at 'HandleUpdateQuest' In 'modHandleData'.Run-time error '0': .2.The following error occured at 'Form_Unload' In 'frmMain'.Run-time error '0': .~~~~3.Property Size in Font had an invalid value.~~~~How I am going fix this?~~EDIT: Never mind, It was my keyboard need replace new one. Link to comment Share on other sites More sharing options...
Helladen Posted May 20, 2015 Share Posted May 20, 2015 This bug has been applied to Eclipse Worlds, will be active in the next release. Unpinning this tutorial, but leaving it open. Link to comment Share on other sites More sharing options...
Guest Posted July 1, 2015 Share Posted July 1, 2015 IS POOP WORTH THE DICK Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now