test gui (source + binaries available)

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
nicfer
Director
Director
Posts: 529
Joined: 03 May 2005 20:50
Location: Somewhere in a country called Argentina

Post by nicfer »

When I use the second binary and the data files I get a error that says not founded msvcr71d.dll or something (I have WinXp in spanish and I unknow the exact English message).
Sorry for my english I am argentinian
TTO don't crashes in Windows XP; XP crashes TTO

Formerly known as UnderBuilder.

MyMiniCity
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

For completeness sake, since I already explained it on IRC.
lucaspiller wrote:I have a couple of questions about your patch though DV (ok one):

Code: Select all

-						x2 = (screen->w - x - 10) / 40;
+						x2 = 4 - (screen->w - x - 10) 
Firstly, where did this 4 come from?
You enumerate your 5 'tiles' from the right corner based on their size. Now we know there are 5 'tiles' so if we take your first tile (which is the right-most one) and subtract that from 4 (indeces start with zero of course) we end up with tile 5, which we want exactly. Just flipping the order.
lucaspiller wrote:
DV wrote:Didn't bother deleting it, I'll leave that up to the person that wants to put this product into production ;P
Deleting what now? :shock:

Also I can't believe I forgot to add fclose and closedir. :x
As you can see from the diff _tile_image[...].name = dir_name where dir_name is created with a new(). This should be deleted when not needed anymore to have nice coding. This whole new/delete code is needed because otherwise name points to the directory's name-buffer which is probably not there anymore after you close the directory or loop, or whatever given any odds. It results in inconsistent behaviour; that's why the value is copied somewhere else we know will stay.

He, release compiled as debug :P See attached binary files for proper listing. Also updated the source with proper VS.NET 2003 project settings.
Attachments
tile_source.zip
Sourceorrz
(19.82 KiB) Downloaded 344 times
tile-binary.zip
Windows binary, you should have everything you need in here except for the data/ directory
(277.11 KiB) Downloaded 412 times
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

Alrighty people, not much has really happened, except we now have an SVN repository (provided by good ol' Peter :D). You can access it at svn://svn.bucks.net/projects/tiletool/. You should note that there is no websvn, so you will have to use your favourite SVN tool.
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
Alltaken
Tycoon
Tycoon
Posts: 1285
Joined: 03 Dec 2003 06:24
Location: Christchurch, New Zealand
Contact:

Post by Alltaken »

ok tested it.

very nice, works well. just curious on two things.

could the grid in the top right corner be made isometric and/or overlayed over the final mockup? (i dunno how hard coding is so if its hard its not important)

would thumbnails be possible (fom the smallest zoom level i would imagine) for loading images. it might get messy with millions of sprites with similar names.

the whole back to front grid is funny, you have already noticed that though so i will say no more :P

one more suggestion is a "screenshot" option which will output just the mockup area as an image (.png i would imagine)

did the x&y offsets when moving upwards get fixed? my version (i think its the most recent) still moves the tiles left when trying to move them upwards.

looks good though, works nice, and will be very helpfull for me and other artists.

Alltaken
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

Changinge the mini grid: It is rather complicated, and I have had no experience with isometric grids before so I have no idea of how to do that, but if anyone does give me a shout. It is also no longer back to front, but still a bit wierd.

Thumbnails: Should be easy.

Screenshots: See below. BMP format for now though, because SDL has a built in function for this.

Offsets should be fixed if you have the version with Darkvater's patch, if not they are fixed here.

Version 3

What is in this release
Brand spanking new Makefile (thanks to Bjarni). Now just by typing make (assuming you system has make) it should compile. If not submit a patch to fix it.

Fix multikey press prevention, which was broken with Darkvater's patch. (tut tut)

Dynamically allocated tiles and chaning of the grid size - should eventually allow more than one tile per location.

You can now take screenshots, only outputted to bitmap for now.

Dev C++ and Visual Studio / C++ project files.

New error handler thingy, code cleanups, more bug fixes, and other random stuff to look like I am actually doing something.

Todo
Thumbnails, changing offsets in program, layering, some other stuff.

[EDIT] - added mac binary - Bjarni
Attachments
TileTool-3.win32.zip
Version 3, Win32
(479.12 KiB) Downloaded 405 times
tile_tool-3.tar.bz2
Version 3, source
(238.71 KiB) Downloaded 318 times
TileTool-3.osx.zip
Version 3, MacOS X
(1.34 MiB) Downloaded 326 times
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

lucaspiller wrote:Fix multikey press prevention, which was broken with Darkvater's patch. (tut tut)
Interesting; what broke it? If I look at my patch all I see in the way of kay-changes is initializing kDown, etc. to false.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

Well the problem was that they keys were originally defined inside the loop, then you added the thing to reset them, again while they were in the loop - so really the bug was already there, but you brought it into the light.
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

lucaspiller wrote:Well the problem was that they keys were originally defined inside the loop, then you added the thing to reset them, again while they were in the loop - so really the bug was already there, but you brought it into the light.
Then don't blame it on me :)
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
dmh_mac
Transport Coordinator
Transport Coordinator
Posts: 278
Joined: 25 Apr 2005 18:18

Post by dmh_mac »

Great, now if you guys could add some moving vehicles and industries and a larger map...

Purely for testing tiles ofcourse :wink:
User avatar
nicfer
Director
Director
Posts: 529
Joined: 03 May 2005 20:50
Location: Somewhere in a country called Argentina

Post by nicfer »

The new version gives me a error that says wrong config and that reinstalling application may solve the trouble or something. What am I doing bad? I have the data folder and the files inside.
Sorry for my english I am argentinian
TTO don't crashes in Windows XP; XP crashes TTO

Formerly known as UnderBuilder.

MyMiniCity
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

SLaY3r wrote:The new version gives me a error that says wrong config and that reinstalling application may solve the trouble or something. What am I doing bad? I have the data folder and the files inside.
it would be nice to know stuff like what OS and did you try to compile yourself. Also the current and future releases are standalone. They should not update anything. Just unstuff them, copy your own work (only your own work, not anything from the last release) and run it. That way you will not mix versions and generally nothing good comes from mixing versions
User avatar
nicfer
Director
Director
Posts: 529
Joined: 03 May 2005 20:50
Location: Somewhere in a country called Argentina

Post by nicfer »

Well, it seems that I have to wait until next release because I don't know how to compile in C, and I'm not interested in know how.
Sorry for my english I am argentinian
TTO don't crashes in Windows XP; XP crashes TTO

Formerly known as UnderBuilder.

MyMiniCity
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

The closest error message to that inside the program is "Failed to load `data/ets.png` -- have you actually got the data files?", but this is completely different. Can you post the exact error message, it sounds as if it could be SDL related. Also as Bjarni asked, what OS are you running?

P.S. This is a C++ app. :wink:
dmh_mac wrote:Great, now if you guys could add some moving vehicles and industries and a larger map...

Purely for testing tiles ofcourse :wink:
Don't forget network support. :D
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
User avatar
nicfer
Director
Director
Posts: 529
Joined: 03 May 2005 20:50
Location: Somewhere in a country called Argentina

Post by nicfer »

I'm using WinXpSp2 and the error is 'cannot execute file because of wrong config. Reinstalling the application may solve the trouble.' or something.
Sorry for my english I am argentinian
TTO don't crashes in Windows XP; XP crashes TTO

Formerly known as UnderBuilder.

MyMiniCity
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

lucaspiller wrote:Changinge the mini grid: It is rather complicated, and I have had no experience with isometric grids before so I have no idea of how to do that, but if anyone does give me a shout.
Well either you can do it in a mathematical way aka linear algebra by making a function that can translate a screen cordinate to a iso-map cordinate. Or you can use a programming method that I have used in my Iso engine that I wrote 2 years ago when I did not know about that math.

My iso engine works simply like this:

Code: Select all

for each map.tiles as tile
  draw_tile(tile);

  if is_in_box(pointer, tile.box) then
    if is_on_non_transparent_pixel(pointer, tile) then
      pointer_on_tile = tile;
    end if;
  end if;
end loop;
Then if you want to know which tile the pointer is on you'll just have to eximinate the pointer_on_tile variable.

This method is not the fastest but it works.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Killer 11
Tycoon
Tycoon
Posts: 2463
Joined: 06 Jan 2004 18:38
Location: Kaunas, Lithuania
Contact:

Post by Killer 11 »

SLaY3r wrote:I'm using WinXpSp2 and the error is 'cannot execute file because of wrong config. Reinstalling the application may solve the trouble.' or something.
i got the same problem when using win XP Mui Proffesional without sp1 or sp2
here it is:
Attachments
error.PNG
error.PNG (9.53 KiB) Viewed 9407 times
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7595
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

Same here.
Image
qball
Engineer
Engineer
Posts: 13
Joined: 28 Jul 2004 08:42
Contact:

Post by qball »

can next time make sure it unpacks in a subdir... you don't half know how irritating it is having it extract in the same dir........
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

qball wrote:can next time make sure it unpacks in a subdir... you don't half know how irritating it is having it extract in the same dir........
because?
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7595
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

qball wrote:can next time make sure it unpacks in a subdir... you don't half know how irritating it is having it extract in the same dir........
Thats extremely annoying, seeing as most people would MAKE a sub directory.
Image
Locked

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 6 guests