flat assembler
Message board for the users of flat assembler.
Index
> Windows > DirectX 9.x SDK includies for FASM? |
Author |
|
madmatt 10 Apr 2007, 06:41
I have directx9 includes at my website, click the WWW button just below this post. Scroll down to the bottom of the webpage to the "Include folder" link. There's also a good selection of extra windows includes also.
|
|||
10 Apr 2007, 06:41 |
|
Garthower 10 Apr 2007, 10:57
Thanks madmatt! I searched for it very much for a long time, you have very much helped me!
|
|||
10 Apr 2007, 10:57 |
|
madmatt 11 Apr 2007, 06:40
Glad I could help. If you have any problems with the includes, let me know.
|
|||
11 Apr 2007, 06:40 |
|
bionicalbat 17 Jul 2007, 06:36
Every time M$ puts out different headers, it's going to be a rework for someone. I found one site from here with dx8 headers, but searched the board to no avail for dx9. AND they weren't in english.
I started converting them myself. There's a simplifed version of the .h file for devc, if you can get your hands on those. So, rather than create the headers the hard way, I made a script to convert them. It's an .hta (assuming you use windows if you're looking for dx9) that strips out just the enums, defines, etc, and lets you write them in a .inc file. I would have posted headers, but after considering what I've learned about COM, it doesn't make as much sense using ASM to make a DX program. It doubles a program's complexity using COM, and probably makes it less efficient, than just using DLL calls from openGL. Another problem I had is that everyone's going to do their own implementations in ASM. I WOULD!! Not to knock the struct macros of fasm, but on the contrary - I can do anything I want in FASM with macros, so I didn't want to limit another programmer with my own structs. If you want more than COM Interfaces, you have to do a bit of work. You probably need to find or make macros to deal with those anyway. So - there's no copyrighting or license to the .hta, modify it to read in whatever headers you want and in the style you prefer. I'm just finding OpenGL more appealing, and starting to see why there aren't as many DX asm programs out there. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="generator" content="PSPad editor, www.pspad.com"> <title></title> </head> <body> <table width=100%><tr><td align=left> <input type=textbox name=fn1 value=d3d9types.h><input type=submit value="Load File" filtered="disp.innerText = tryLoadFile(fn1.value)"></td><td align=right> <input type=textbox name=fn2><input type=submit value="Save File" filtered="trySaveFile(fn2.value, disp.innerText)"></table> <div id=disp style="width:100%;border:1px solid"></div> <script language=javascript> function tryLoadFile(fn) { if (!fn) return "Specify a filename."; var fs = new ActiveXObject("Scripting.FileSystemObject"); try { var f = fs.OpenTextFile(fn,1); } catch(e) { return "file not found - "+fn; }; var s = f.ReadAll(); if (s) return parseH(s); f.Close(); f=null; fs=null; }; function trySaveFile(fn, s) { if (!fn) return "Specify a filename."; var fs = new ActiveXObject("Scripting.FileSystemObject"); try { var f = fs.OpenTextFile(fn,2, true); } catch(e) { return "Error creating file - "+fn; }; f.Write(s) f.Close(); f=null; fs=null; }; var lAcc; var bAcc; function parseH(s) { bAcc=[]; var sa = s.split("\n"); while (sa.length) myHandler(sa.shift()); return bAcc.join("\n"); }; var ss; function convertHexes(s) { var is=s.split(""); if (!s.match(/0x/)) return s; var i=s.indexOf("0x")+2; while (i<s.length) { ss=s.charCodeAt(i); //return " ******** "+ss+"***"+i; if ((ss>=48)&&((ss<=57)||((ss>=97)&&(ss<=102)))) { is[i-1]=is[i]; i++; } else break; }; is[i-1]='h'; return is.join(""); }; var s2, s3, s4, s5, n1; function handleDefaults(s) { if (s.substr(0,2)=="/*") { lAcc=[]; myHandler=handleComments; handleComments(s); } else if (s.charAt(0)=="#") { s=convertHexes(s); //bAcc.push(";$$"+s); // echo if (s.substr(0,7)=="#define") { if (!s.match(/\x28/)) { // no parenthasis s2=s.replace(/\t/g," ").split(" "); s2.shift(); s3=null; while ((!s3)&&(s2.length)) s3=s2.shift(); if (!s3) { bAcc.push(";#"+s); return; }; // no var s4 = null; while ((!s4)&&(s2.length)) s4=s2.shift(); if (!s4) { bAcc.push(";#"+s); return; }; // #define oneword bAcc.push(s3+" EQU "+s4); }; } else if (s.substr(0,6)=="#undef") { s2=s.replace(/\t/g," ").split(" "); s2.shift(); s3=null; while ((!s3)&&(s2.length)) s3=s2.shift(); if (s3) bAcc.push(s3+" EQU"); } } else if (s.substr(0,19)=="DECLARE_INTERFACE_(") { s2=s.substr(19); s3=s2.split(")"); s2=s3.shift().split(","); s4=s2.shift(); s3=s2.shift(); lAcc=[";********DECLARE Interface - "+s4+" : "+s3+" ************", "struct "+s4," .handle dd ?"," virtual at 0"]; myHandler=handleInterfaces; } else if (s.match(/enum/)) { myHandler=handleEnums; lAcc=[";\t\t\t"+s]; } else { if (s) bAcc.push(";?"+s); } }; var myHandler=handleDefaults; function handleComments(s) { if (s.substr(0,2)!="*/") { lAcc.push(s); return; }; lAcc.unshift(";********************************************************************"); lAcc.push(s); bAcc.push(";**-"+lAcc.join("\n;**-")+"\n;********************************************************"); myHandler=handleDefaults; }; function handleInterfaces(s) { if (s.charAt(0)=="}") { myHandler=handleDefaults; bAcc.push(lAcc.join("\n")+"\n end virtual\nends\n"); } else if (s.match(/STDMETHOD/)) { s=s.split("STDMETHOD").pop(); s2=s.split("("); s2.shift(); s3=s2.shift().split(")").shift(); if (s.charAt(0)=="_") s3=s3.split(",").pop(); n1=0; s4=s2.shift().split(")").shift().split(","); while (s4.length) { s5=s4.shift(); if (s5=="THIS_") n1+=2; else n1++; }; lAcc.push(" STDCALL "+s3+","+n1); } else if (s.charAt(0)=="{") { return; } else { lAcc.push(";?"+s); }; }; function handleEnums(s) { if (s.match("=")) { if (s.charAt(s.length-1)==",") s=s.substr(0,s.length-1); lAcc.push(convertHexes(s)); } else if (s.match("}")) { bAcc.push(lAcc.join("\n")+"\n;\t\t\t"+s); myHandler=handleDefaults; } else { lAcc.push(";?"+s); }; } </script> </body> </html> (save this as converter.hta, in the folder with the headers) _________________ The world is a storm, a clash of immortal forces that all want to take control of the world, many spirits posessing the minds and emotion of men in order to gain control and make it the way their illusion dictates .... how do we change it? |
|||
17 Jul 2007, 06:36 |
|
bionicalbat 17 Jul 2007, 06:43
oh, I see they filtered my filtered commands!!!
replace 'filtered=' with 'filtered=' |
|||
17 Jul 2007, 06:43 |
|
bionicalbat 17 Jul 2007, 06:46
grrrrr .... REPLACE FILTERED WITH o_n_c_l_i_c_k!!!!!
see if they filter that, filtering filter filter machine. filter off!!! |
|||
17 Jul 2007, 06:46 |
|
Furby 17 Jul 2007, 16:03
LOL converter in JS :OOOOO
|
|||
17 Jul 2007, 16:03 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.