Well when you try to access your dmap from another thread it will crash your program and thrown an exception saying something like no cross thread calls allowed.
If this is j ust a GUI with no functionality in it then I can totally see why there is no issue <yet>.
You can remove the check for that, and aslong as what your doing is safe then its actually not a problem at all.
a buddy of mine gave me some code for this.seems to be like a binarie reader of the dmaps.he said it should help on what we are trying to do.soon as I get the connection problems im having with the alchemy source,ill try it/
a buddy of mine gave me some code for this.seems to be like a binarie reader of the dmaps.he said it should help on what we are trying to do.soon as I get the connection problems im having with the alchemy source,ill try it/
Are you having connection problems within the code, or just with settings.txt etc..
a buddy of mine gave me some code for this.seems to be like a binarie reader of the dmaps.he said it should help on what we are trying to do.soon as I get the connection problems im having with the alchemy source,ill try it/
Probably not a binary reader lol, dmaps are like..
0 = invalid coords
1 = valid coords
so for 0 draw a pixel of black for 1 draw a pixel of white.
@martin
yeah that's the exception i was talking about, and yea easy fix delegate/ invoke the function and its gone.
i wasn't aware there was a way to just disable the check? + that's not thread safe? O.o
Both methods work, you can just disable it and be just fine so long as you dont do something really ridiculous.
True, but I'm pretty sure setting CheckForIllegalCrossThreadCalls to false doesn't mean that you can access control properties. I mean, like you can by invoking. Like: If chkMyCheckBox.Checked = True then do something...
Can't do that in a seperate thread unless you're using invoke.
Also, another advantage that comes with invoking: BeginInvoke allows you to access the GUI asynchronously which is pretty neat at certain occasions.
Are you having connection problems within the code, or just with settings.txt etc..
not sure as of yet but i have a week off work so i should all the time in the world to fix it...lol
i sent you the code,my buddy said it was ok.just dont post please not mine or your.
Quote:
Originally Posted by Ian*
Probably not a binary reader lol, dmaps are like..
0 = invalid coords
1 = valid coords
so for 0 draw a pixel of black for 1 draw a pixel of white.
well only checked the code a bit,does me no good at the mmoment
The reason why he hasn't had any issues with crossthreadcall crashing is cause I already set it to false for the gui I had originally added for myself (I had one with some basic stuff like kill counter/character tracker + some basic settings). I never bothered doing any of the map stuff though cause it was always being hosted through 1 main server with everyone logging in through it. At the time I had no desire to do a proper proxy cause well... that wasn't something that really interested me.
But yes, currently the proxy he is using already has the check disabled. I've never had any problems using that system but as you said, I'm sure there are PLENTY of better ways to do things.
Note: You can access the form members but you have to set them to public (IE: set the label to public and then when starting the gui from your main program save the instance you created of it and use that to modify all the form members)
Probably not a binary reader lol, dmaps are like..
0 = invalid coords
1 = valid coords
so for 0 draw a pixel of black for 1 draw a pixel of white.
You read the .dmap format with a binary reader. Heres the entire file:
Code:
_FileStream.Seek(268, SeekOrigin.Begin);
Map.PopulateTiles(Reader.ReadUInt32(), Reader.ReadUInt32());
for (ushort y = 0; y < Map.Height; y++)
{
for (ushort x = 0; x < Map.Width; x++)
{
Map.SetWalk(x, y, !Convert.ToBoolean(Reader.ReadUInt16()));
_FileStream.Seek(2, SeekOrigin.Current);
if (_Height)
Map.SetHeight(x, y, Reader.ReadUInt16());
else
_FileStream.Seek(2, SeekOrigin.Current);
}
_FileStream.Seek(4, SeekOrigin.Current);
}
uint PortalCount = Reader.ReadUInt32();
Map.PopulatePortals(PortalCount);
for (ushort y = 0; y < PortalCount; y++)
{
DMapPortal portal = new DMapPortal();
portal.XCord = (ushort)Reader.ReadUInt32();
portal.YCord = (ushort)Reader.ReadUInt32();
Map.SetPortal(y, portal);
_FileStream.Seek(4, SeekOrigin.Current);
}
Between access and height is a third variable which denotes the type of tile, not really necessary for private servers. Also i seek the first section of the file as its not necessary for loading the tiles.
And of course portals at the end of the file.
Edit: And also i just noticed that someone posted a copy of my loader from the CUOSP project, that loader is custom made to be used with my .smap format, it determines access based on the bits used in a byte to compress the size even further and reduce loading time. It will not work with standard dmap files.
My problem is that im using it on a 64 bit pc, while its 32 bit. I saw korvacs made a thread about making it 64 bit a while ago, but i think that when i turn it on 64 bit, everything will be ******.
My problem is that im using it on a 64 bit pc, while its 32 bit. I saw korvacs made a thread about making it 64 bit a while ago, but i think that when i turn it on 64 bit, everything will be ******.
[Question] Inventar Form ändern/vergrössern 06/17/2011 - Flyff Private Server - 12 Replies Heey, E*pvper's
Ich bin dabei ein neues Ingame Design zu entwerfen.
Ich hab mir da mal das Inventar angeschaut und mir überlegt wie man es doch vergrössern oder gar die Form verändern könnte.
Ich hab da schon einiges versucht, leider erfolglos <.<
Die SuFu spuckte auch nicht's aus ._.
Ich freue mich auf jede hilfreiche Antwort :)
Liebe Grüsse Apfelsuchtii
DMap Info [Question] 08/08/2009 - CO2 Private Server - 12 Replies I have a DMap Reader on my source. I want to check the access of some locations when a player drop an item, jump, walk, etc... But, if I load the DMap in an array, I have like 20mo of RAM used by one map. An other solution is to read the DMap when the player have to check the location but I don't want to kill my computer:rolleyes: The best solution, I think, is to load in memory the most used map like TC and for the other, check when the player use the map.
What is the best solution?
.DMap 06/29/2006 - Conquer Online 2 - 10 Replies Hello, It is my first post here I usually just read topics and learn from them ect.. Thank you elitepvpers for all these weeks of help but now i need something not found..
I want to make costum little map the ones at the top right of your screen i wanted to make an edited one with lets say a star where the ganaderma spawns but i dont know how to open or save as .DMap can someone help m with this? are there any specifications when doing this? filesize ect..
DMAP 04/09/2006 - Conquer Online 2 - 5 Replies Ok i checked on forum i couldn't find anything base on this so i'm want to know if there any program open dmap files so i can edit the maps if so could you let me know I appreciate it.