User talk:Smurf

Interactive map project / flat projection
Hi Smurf, I'm playing around with your FlatProjection.js file, but I have problems getting it to work. Just taking the file as it is, and using new FlatProjection(MapWidth,MapHeight,MapPxPerLon,MapMaxZoom-2,MapMaxZoom) in the new GMapType call (the variables used for the parameters having the same value as in your demo), results in the map being displayed, but no tiles being shown. I can upload a demo tonight if necessary, but maybe you already know where the problem might be. DeepSearch 06:56, 27 December 2006 (CST)
 * The only thing I know of thats wrong with my FlatProjection.js is I don't think it works with tiles that are not 256x256. So go ahead and upload it and I'll take a look at it. -Smurf [[Image:User_Smurf.gif]] 15:09, 27 December 2006 (CST)
 * Sorry, that took longer than expected. See here, I tried to strip out as much of unnecessary code as possible: http://mapdev.fiftypounds.com/DeepSearch/FlatProjectionTest/demo/index.html DeepSearch 14:31, 2 January 2007 (CST)
 * Change line 41 in ../js/GWMap.js to: map.setCenter(new GLatLng(-12,15.97265625), 3, gwMap);


 * OR
 * map.setCenter(new GLatLng(-(MapHeight/MapPxPerLon)/2,(MapWidth/MapPxPerLon)/2), 3, gwMap); which is center of the map. I'll try to fix my map projection so the Y axis increase going down. -Smurf [[Image:User_Smurf.gif]] 17:01, 2 January 2007 (CST)
 * Ok I fixed it and you can get the new one here Smurf/FlatProjection.js. It was much easier than I thought it would be and now I don't know why I had it that way in the first place. So if you use the new one just remove the negative sign in front of the first number -Smurf [[Image:User_Smurf.gif]] 17:33, 2 January 2007 (CST)
 * Embarrassingly obvious, as expected ;) Thanks! DeepSearch 15:00, 3 January 2007 (CST)

Pictures
Nice pictures. How did u take them? Or are they stolen from anet?


 * Not sure which ones your talking about so I'll summarize them all.
 * Warrior and Monk characters - User_talk:Smurf/Archive_1
 * Necro, Ele, and Paragon characters and Dances - DirectX modifying to replace all 2048x2048 textures (the ground) with a white texture. Also used Fraps for the dances
 * Items & skill icons, and map imagery - instead of replacing the textures I save them.
 * -Smurf [[Image:User_Smurf.gif]] 15:09, 27 December 2006 (CST)

EDIT: Question: Could you possibly convert your images to PNG with transparency?
 * I could but guildwiki has problems scaling png format so I stick with jpg. (GW:IMAGE) -Smurf [[Image:User_Smurf.gif]] 04:19, 1 January 2007 (CST)


 * Care to give any more details on this DirectX modifying process? or maybe a link to where i could learn how to do it? Thanks. Cronnie 11:10, 2 January 2007 (CST)
 * http://www.codeguru.com/cpp/g-m/directx/directx8/article.php/c11453/ -Smurf [[Image:User_Smurf.gif]] 12:15, 2 January 2007 (CST)
 * Thanks for the link, but i am totally lost lol.... I understood some bits here and there, and got my .dll files for both DirectX 8 & 9. So, what code as such do i have to add or remove in these files? Also what program will i need to do this? D3DSpy? I am sorry if i sound to be a pain but i really want to learn how to do this, once again thanks for all help. Cronnie 13:22, 2 January 2007 (CST)
 * It's gonna require you to know C++ and DirectX. You'll want to mess with proxydll_9_src.zip since guildwars uses directx 9. You may also need the directx SDK which you can get off microsoft's site. Then it should compile fine in visual studio. once compiled you can test your new code by putting the new d3d9.dll into the game's folder like C:\Program Files\Guild Wars\. good luck :) -Smurf [[Image:User_Smurf.gif]] 17:14, 2 January 2007 (CST)
 * I am dling all the files that you told me to, but is it possible you could lend me your .dll file for learning purposes? Obviously if you cant link outisde of the wiki then could you message me. Once again, thanks a lot for all help. Cronnie 11:39, 3 January 2007 (CST)
 * Ok, i cannot seem to open the d3d9.dll using Visual Studio, i get a file cannot be opened error. I am not sure, but this may be as i am using Vista.... I can however, open the .h files, but am not sure which one i want to be editing, and what to edit. If you could provide more help, or the files i need so i can study them and test it then i would be eternally grateful. I understand if you do not want to provide me with the files, or dont want to spend anymore time on this lost cause, but if you could, please do. Cronnie 13:37, 3 January 2007 (CST)
 * Ok i can seem to open all the header files and etc, but still am overwhelmed by the amount of options to edit. If you could please offer some more guidance or resources i would be a very happy man User:Cronnie [[Image:Necromancer-icon-small.png]] 17:36, 5 January 2007 (CST)
 * First, a dll file is already compiled code so you won't be able to open it; You'll want to open the .vcproj file. If you don't know C++ then it will be overwhelming and you won't be able to do much. C++ tutorials are just a google search away. The source already includes a sample (draws a yellow square), and MSDN is also a nice resource (IDirect3DDevice9 interface). -Smurf [[Image:User_Smurf.gif]] 00:02, 6 January 2007 (CST)
 * Yes, this does seem very much overwhelming, i shouldnt have jumped straight into this. I ask once again, is it possible you could provide the .vcproj, or .dll files for me to use? - Cronnie [[Image:Necromancer-icon-small.png]] 07:29, 6 January 2007 (CST)
 * umm the .vcproj file is included in the zip file and the dll file will be created in a subfolder when you build it in visual studio. -Smurf [[Image:User_Smurf.gif]] 21:19, 6 January 2007 (CST)
 * Could you upload the d3dl file for me please? Cronnie [[Image:Necromancer-icon-small.png]] 18:52, 13 January 2007 (CST)
 * With what in it? You won't be able to change the dll file. Even then, GuildWiki doesn't allow dll files since they're just as dangerous as an exe file. And I wouldn't trust anyone else's dll file; but thats me. -Smurf [[Image:User_Smurf.gif]] 13:41, 14 January 2007 (CST)
 * With all relavant edits to remove the background textures. Also you could email the file to me, and i have backups of my current dll and am prepared for any consequences of using yours. Please. Cronnie [[Image:Necromancer-icon-small.png]] 11:33, 15 January 2007 (CST)
 * I'd be interested aswell. Compiling and testing all the time. Can't figure out how to change a texture regarding it's size (2048x2048). I manged to create a blank texture (created a blank/white .bmp file) and calling D3DXCreateTextureFromFile but i really don't know how to replace 2048x2048 textures with this one. - Zerfl 05:14, 23 January 2007 (CST)
 * In myIDirect3D9.cpp, find the CreateTexture function, and insert following right after the initial open bracket, and before the return instruction: if ((Width == 2048) && (Height == 2048)) return 0; else - worked for me. DeepSearch 11:55, 1 February 2007 (CST)

Here are the changes to proxydll_9_src.zip that I've always used to grab textures: Add the following to the myIDirect3DDevice9 class under private members: bool SaveTextures; char* path;

Add these includes to the top of myIDirect3DDevice9.cpp page after #include "StdAfx.h" :
 * 1) include "D3dx9tex.h"
 * 2) include 
 * 3) include 

Add these lines inside the myIDirect3DDevice9::myIDirect3DDevice9 function : SaveTextures = false; path = 0;

Remove or comment out this line in the myIDirect3DDevice9::Present function: this->ShowWeAreHere;

Add this to the beginning of the myIDirect3DDevice9::Present function: if ( this->SaveTextures ) { 	this->SaveTextures = false; if (path) delete[] path; } if ( GetAsyncKeyState(VK_F10)&1 ) { 	time_t t; 	path = new char[50]; this->SaveTextures = true; time(&t); sprintf( path, "Textures\\%u", (unsigned int)t); CreateDirectory( "Textures", NULL); CreateDirectory( path, NULL); }

Add this to the beginning of the myIDirect3DDevice9::SetTexture function: if ( SaveTextures && pTexture != NULL && pTexture->GetType == D3DRTYPE_TEXTURE ) { 	char* file = new char[100]; sprintf( file, "%s_%08X.png", path, pTexture); D3DXSaveTextureToFile( file, D3DXIFF_PNG, pTexture, NULL); delete[] file; }

This will save all the textures being used for a single shot when you press F10. It will be saved in a png file in a Textures\ folder with the format time_memoryaddress.png

And if you want to restrict it to grab textures of certain sizes add this inside the IF in the SetTexture function D3DSURFACE_DESC desc; ((IDirect3DTexture9*)pTexture)->GetLevelDesc(0,&desc); then just use desc.Width and desc.Height inside another IF statement. This will make it go a lot faster if you don't save the 2048x2048 texture everytime.

And I'm not gonna compile it for anyone. If you don't know what you're doing then don't do it. I haven't played GW for about a month and I'm gonna play this weekend but plz don't pm me about this.-Smurf 12:04, 3 February 2007 (CST)


 * Ok thanks a lot for all of that, i nearly got it working perfectly except for the one error i keep getting,

LINK : fatal error LNK1104: cannot open file 'd3dx9.lib'

Now i have had a look around, and reinstalled the SDKs which seemed to help most people, however i still get the error. Cronnie 13:45, 3 February 2007 (CST)


 * Add the lib directory from the DirectX SDK folder to your "Library Files" path in your Visual Studio options. Do the same with the Include directory / Include path. DeepSearch 14:16, 3 February 2007 (CST)


 * Yep that fixed it, but now i get this:
 * myIDirect3DDevice9.obj : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 :::referenced in function "public: virtual long __stdcall myIDirect3DDevice9::Present(struct tagRECT :::const *,struct tagRECT const *,struct HWND__ *,struct _RGNDATA const *)" :::(?Present@myIDirect3DDevice9@@UAGJPBUtagRECT@@0PAUHWND__@@PBU_RGNDATA@@@Z)
 * Release/d3d9.dll : fatal error LNK1120: 1 unresolved externals Cronnie :::[[Image:Necromancer-icon-small.png]] 14:20, 3 February 2007 (CST)
 * My guess would be you're missing the platform SDK (not the DX SDK). --Fyren 19:03, 3 February 2007 (CST)


 * Nope, i have both SDKs, and they seem to be linked correctly under Visual Studio..... Cronnie [[Image:Necromancer-icon-small.png]] 07:32, 4 February 2007 (CST)
 * Linking against the wrong libraries? Like libc.lib instead of msvcwhatever.lib?  --Fyren 07:55, 4 February 2007 (CST)

User page
Hey, you have a very nice user page. Are people allowed to use it?
 * Anyone can use it and you don't have to credit me. -Smurf [[Image:User_Smurf.gif]] 01:32, 28 December 2006 (CST)
 * Oh my gawd! Smurf, tell me you didn't say that! ;) --[[Image:Gem-icon-sm.png]] (talk) 05:38, 28 December 2006 (CST)
 * lol now I see where Poki's 2nd userbox submission comes from. -Smurf [[Image:User_Smurf.gif]] 13:48, 28 December 2006 (CST)
 * Speaking of user boxes, why haven't you submitted any? Your user page has a few really great ones nad I believe you could also come up with new good ideas. --[[Image:Gem-icon-sm.png]] (talk) 16:29, 28 December 2006 (CST)
 * I'm in there: User:Gem/User_box_competition. -Smurf [[Image:User_Smurf.gif]] 16:31, 28 December 2006 (CST)
 * Yeah right. You somehow hacked the wiki history and changed my memories so that now I think that I was wrong when accusing you of not having any entries. :P --[[Image:Gem-icon-sm.png]] (talk) 16:43, 28 December 2006 (CST)

Your item icons
Due to the fact that you have done most of the icon work for guild wiki it would be a great help for the official wiki if you released your contributions under the GFDL as well. --FireFox  20:30, 11 February 2007 (CST)