EOSERV Forum > Client Editing > Failed attempt of a Map Editor (Good Idea Tho)
Topic is locked.
Page: << 1 >>
Failed attempt of a Map Editor (Good Idea Tho)
Author Message
Post #16207 Failed attempt of a Map Editor (Good Idea Tho)

It's too slow and i don't think you can open resource files in Visual Basic 2008 Express... next stop C++ and Allegro, gonna have to learn some more :(

I was making as a MDI so you can have it open more than one map and have a nice toolbox or summets along those lines

---
I am an alien and not crazy!
14 years, 38 weeks ago
Post #16239 Re: Failed attempt of a Map Editor (Good Idea Tho)


upload in mediafire.com the compiled exe

14 years, 38 weeks ago
Post #16250 Re: Failed attempt of a Map Editor (Good Idea Tho)
eo-brasil-server posted: (14th Aug 2009 06:19 pm)


upload in mediafire.com the compiled exe



OK, I've uploaded for you and included the source code. Looks abit messy but I am re-coding it anyhows in C++... Just got to learn abit about allegro and reading writing bytes LOL.

Link: http://www.mediafire.com/?sharekey=dd02b7827494e24541446e35a78dc463e04e75f6e8ebb871

Note: It was coded in Visual Basic 2008 Express

---
I am an alien and not crazy!
14 years, 38 weeks ago
Post #16271 Re: Failed attempt of a Map Editor (Good Idea Tho)

It's not hard to do any of it at all.

The bytes are mostly are decoded in eoserv source, you just have to use what he has for the tiles and that such.

Then loading the GFX would be the biggest problem to me since I don't know that much with graphics.

But then rendering and all that shouldn't be hard with Allegro. That is it's main purpose and has some pretty easy function's.

---
http://www.addipop.com
14 years, 38 weeks ago
Post #16297 Re: Failed attempt of a Map Editor (Good Idea Tho)

Loading the graphics from EO in VB (or any language that lets you call WinAPI) is quite simple as they are actually just bitmap resources inside a .dll file.
The two API you should look at are LoadLibrary and LoadImage


---
http://sordie.co.uk
http://twitter.com/@SordieEO
14 years, 38 weeks ago
Post #16298 Re: Failed attempt of a Map Editor (Good Idea Tho)

Thanks for the comments, I will look into the functions as stated by Sordie :)

Here we go!

I can't figue out what needs to be passed in the LoadImage() function. (Am I even doing it right?)

Public Class Form1

Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( _

ByVal lpLibFileName As String) As Long

Declare Function LoadImage Lib "user32" Alias "LoadImageA" ( _

ByVal hInst As Long, _

ByVal lpsz As String, _

ByVal un1 As Long, _

ByVal n1 As Long, _

ByVal n2 As Long, _

ByVal un2 As Long) As Long

Private Declare Function FreeLibrary Lib "kernel32" ( _

ByVal hLibModule As Long) As Long

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

If My.Computer.FileSystem.FileExists("gfx\gfx003.egf") = False Then MsgBox("Missing file: gfx003.egf", MsgBoxStyle.Exclamation, "Missing File!") : End

Dim gfx003 = LoadLibrary("gfx\gfx003.egf")

Dim bm = LoadImage(gfx003, "101", 1, 0, 0, 0)

FreeLibrary(gfx003)

End Sub

End Class

---
I am an alien and not crazy!
14 years, 38 weeks ago
Post #16312 Re: Failed attempt of a Map Editor (Good Idea Tho)

Google it. I bet it will give you the exact answer of what LoadImage does and an example.

But I think you want to LoadLibrary as the .gfx, then LoadImage's from inside the library.

---
http://www.addipop.com
14 years, 38 weeks ago
Post #16314 Re: Failed attempt of a Map Editor (Good Idea Tho)
Addison posted: (15th Aug 2009 07:52 pm)

Google it. I bet it will give you the exact answer of what LoadImage does and an example.

But I think you want to LoadLibrary as the .gfx, then LoadImage's from inside the library.



Thanks, but I've decided to go a different way by making my own resource files using Visual Studio Professional and working with images that way. Works just as good.. Might get an email from Vult-r tho for using his GFX.

The resource file names are going to be "tiles.resources", "object.resources" ect. I have made a test program with the home made resource and it loads the images perfectly. Now to re-try the editor.

EDIT: Still a massive fail, I think I should leave it to the experts but an idea for you. Make it in an MDI so that all work is in one place like this...

Peace all, I have deleted the source.

---
I am an alien and not crazy!
14 years, 38 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Client Editing > Failed attempt of a Map Editor (Good Idea Tho)