how get map name??
sorry za bad english
u can't atleast if you compare
one map and the map in the demo
argh! Michal, give me .sdm format :) how? im wanna create demo player
Did you try opening the .sdm with Notepad?
of course. Even with hexview... %|
What language are you using Pongo? I may be able to slap together some code for ya
I just looked and found the map name at offset 0x03 O.o
.net framework 2.0
i use c#... u use vb? vb.net?
quote:I just looked and found the map name at offset 0x03 O.o
add: [quote]yes :)[quote]yes? im not sure... damn!
what? you dont know how to read from 0x03 ?
In what language do you want the code?
Heres some quick VB Code.
Function GetMapName(Path As String) As String
Dim sBuffer As String
nFileNum = FreeFile
sBuffer = Space$(50)
Open Path For Binary Access _
Read Lock Read Write As #nFileNum
Get #nFileNum, 1, sBuffer
sBuffer = Mid(Left(sBuffer, InStr(sBuffer, vbNullChar)), 4)
GetMapName = sBuffer
pretty sloppy, but it gets the job done. Just call it with the full demo path.
its work only when Compression=0 :(
As I said in IRC, ask MichalM what compression is used on the demos and I will find a way to get the map name for you.