DatMCEyeBall Posted May 4, 2014 Share Posted May 4, 2014 (edited) I wrote this a while ago and only recently implemented shading. The current shading algorithm could use some improvements. Most of the source is based from here. The .dll source is also in the archive (made with Visual Studio 2012 Express). 2D Water simulation using a C++ dll.7z If you use a x64 bit OS then: For anyone having trouble running this on a x64 OS, set #AutoIt3Wrapper_UseX64=n (OP code assumes you are running x86 AutoIt). EDIT: Added an example using a .gif file (split into frames). Edited May 11, 2014 by DatMCEyeBall AdmiralAlkex, UEZ and GreenCan 3 "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
UEZ Posted May 4, 2014 Share Posted May 4, 2014 (edited) I can't get it run. msvcp110d.dll was missing but after downloaded it, nothing happens when starting the script.Tested on Win 8.1 and 3.3.10.2.Br,UEZ Edited May 4, 2014 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted May 4, 2014 Author Share Posted May 4, 2014 I fixed it (compiled w static links) see the OP for download. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
UEZ Posted May 4, 2014 Share Posted May 4, 2014 (edited) Cool, works now. I will check whether it can be loaded from memory and use it for my watermark app.Btw, I tried several times to learn C++ using MS VS but it is a overkill with plenty of features which I don't need when being a C++ noob besides to use the IDE environment.A mentor would be nice...Br,UEZ Edited May 4, 2014 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted May 4, 2014 Author Share Posted May 4, 2014 (edited) Cool, works now. I will check whether it can be loaded from memory and use it for my watermark app. Look at the first line of WaterSim.au3 (the Global Enum line). Check the UseBuffer1 flag in the params structure (forgot the Enum's name) if so use the HM (height map) #1 if not use #2 Add to the data (+=) at the specified location an amount (it's a height map used by the .dll so add a number like 512 or more - depends on what you prefer) The height map is a 1D array, I think the main .au3 file still has a _PixelIndexFromXY (or similar) function, use it to convert XY co-ordinates into the index of the array. Call the NewFrame function to draw and flatten the water. I can write you something special instead. If you want me to do so then please PM me. A mentor would be nice... Mentor? C++ for dummies(link to .pdf) is what I used to learn it, VS is just there for convenience. Edited May 4, 2014 by DatMCEyeBall "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
UEZ Posted May 4, 2014 Share Posted May 4, 2014 (edited) I mean rather to load the DLL from the memory. Thanks for the Dummy stuff but I've already a lot of C++ documentations (incl. this). Br, UEZ Edited May 4, 2014 by UEZ DatMCEyeBall 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 4, 2014 Share Posted May 4, 2014 For anyone having trouble running this on a x64 OS, set #AutoIt3Wrapper_UseX64=n (OP code assumes you are running x86 AutoIt). @DatMCEyeBall Cool effect! DatMCEyeBall 1 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted May 5, 2014 Author Share Posted May 5, 2014 (edited) For anyone having trouble running this on a x64 OS, set #AutoIt3Wrapper_UseX64=n (OP code assumes you are running x86 AutoIt). I'm adding this to the OP. I mean rather to load the DLL from the memory. Thanks for the Dummy stuff but I've already a lot of C++ documentations (incl. this). What exactly is bothering you with MS VS C++? If you have a problem then Google it - that's what I do. Edited May 5, 2014 by DatMCEyeBall "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
wakillon Posted May 5, 2014 Share Posted May 5, 2014 Your demo reminds me something... Nice work and nice effects ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted May 5, 2014 Share Posted May 5, 2014 I'm adding this to the OP. What exactly is bothering you with MS VS C++? If you have a problem then Google it - that's what I do. I find it hard to use the editor - it is so oversized compared to SciTE. Anyhow, if I find enough motivation I will try again. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted May 6, 2014 Author Share Posted May 6, 2014 If you try searching on Youtube for "Microsoft Visual Studio 2012 C++ tutorial": http://www.youtube.com/watch?v=xoExJLVroZc "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation 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