Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 21, 2011, 05:47   #141
buzzkill
Prophet
 
buzzkill's Avatar
 
Join Date: May 2008
Location: Indiana, USA
Posts: 2,939
Donated: $8
buzzkill is on a distinguished road
Quote:
Originally Posted by Blue Baron View Post
Hi I play z+Angband and modified it for my own use. One of the changes I made was to use different tilesets easier. I did two things. First, I added a new command to pref files: I:<elementwidth>:<elementheight>:<filename>{:<mask filename>}. Second I added $GRAFC <number>, so I don't have to add names of files in bunches of places, and just use the number in use_graphics directly.
Am I missing something? What does this do that couldn't be accomplished by simply editing the first few lines of the angband.ini.
__________________
www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
My banding life on Buzzkill's ladder.
buzzkill is offline   Reply With Quote
Old April 21, 2011, 06:00   #142
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by buzzkill View Post
Am I missing something? What does this do that couldn't be accomplished by simply editing the first few lines of the angband.ini.
the graphics = 3 ( or 0, 1, 2) line in the ini file refers to the graphics mode. there are also hard coded constants that use those numbers (GRAPHICS_DAVID_GERVAIS, GRAPHICS_NONE, GRAPHICS_ORIGINAL, GRAPHICS_ADAM_BOLT respectively) there aer several places in the code that use these constants by name. In main-win.c and the other main-xxx.c files the tile sizes and file names are hard coded using those constants. To change them or to add to them the entire program must be rebuilt. I added the I: line so only the pref files and the ini file have to be changed to use an additional tileset.
Blue Baron is offline   Reply With Quote
Old April 21, 2011, 06:15   #143
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,918
Derakon is on a distinguished road
DiretX is problematic for PNG support simply because it is not cross-platform. We'd be better off hooking into SDL or OpenGL or just accessing libpng directly.
Derakon is offline   Reply With Quote
Old April 21, 2011, 07:49   #144
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,836
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Derakon View Post
DiretX is problematic for PNG support simply because it is not cross-platform. We'd be better off hooking into SDL or OpenGL or just accessing libpng directly.
The gtk, sdl and Mac ports already use png, though - it's pretty much only been the windows port that it's needed for. So if DirectX can be called (or whatever you do with it) in main-win.c, then (a) we can use Shockbolt's tiles and (b) we get to ditch .bmp files altogether.

Whether using DirectX like this is possible or not I have no clue.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old April 21, 2011, 10:29   #145
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
As Nick said, those three reference png files in their main-xxx.c files. However, the real reason I used DirectX is that I am familiar with it, I am not familiar with the others.

I have created a function that works for me in z+ 0.3.3. To use it add the function prototype somewher, perhaps in readdib.h or above init_graphics() in main-win.c. the funtion prototype is:

extern BOOL ReadDIB_DX9(HWND, LPSTR, DIBINIT*);

then in init_graphics() change all ReadDIB to ReadDIB_DX9
and add readdx9.c to your project. Also make sure the DirectX headers are in your include path, and link against d3d9.lib and d3dx9.lib.

If you want to replace ReadDIB() entirely (after testing this alot), remember that FreeDIB() in readdib.c is still needed.

readdx9.c if attached to this message as readdx9.txt
Attached Files
File Type: txt readdx9.txt (5.4 KB, 209 views)
Blue Baron is offline   Reply With Quote
Old April 24, 2011, 15:31   #146
Shockbolt
Knight
 
Shockbolt's Avatar
 
Join Date: Jan 2011
Location: Norway
Posts: 632
Shockbolt is on a distinguished road
Send a message via MSN to Shockbolt
How is the graphics handled on the mac os version of angband? Are the tiles separate or fetched from a tilemap, like on the win bmp version?
__________________
http://www.rpgartkits.com/
Fantasy art kits for personal and commercial use. Commercial use requires a Developer license, also available through my website.
Shockbolt is offline   Reply With Quote
Old April 24, 2011, 16:48   #147
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Blue Baron View Post
then in init_graphics() change all ReadDIB to ReadDIB_DX9
and add readdx9.c to your project. Also make sure the DirectX headers are in your include path, and link against d3d9.lib and d3dx9.lib.
Thanks so much for your work here! I'm going to test it out and see if I can get it working for me (on Linux using Mingw cross-compilation and WINE).

I will try to figure it out myself, but if you get this can you list the actual DirectX headers I need to include? Are they just d3d9.h and d3dx9.h?

Thanks again...
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old April 24, 2011, 18:58   #148
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Shockbolt View Post
How is the graphics handled on the mac os version of angband? Are the tiles separate or fetched from a tilemap, like on the win bmp version?
It's a tilemap PNG file, with transparency included. Everything apart from Windows uses a PNG tilemap.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old April 25, 2011, 21:48   #149
Shockbolt
Knight
 
Shockbolt's Avatar
 
Join Date: Jan 2011
Location: Norway
Posts: 632
Shockbolt is on a distinguished road
Send a message via MSN to Shockbolt
Some monster tiles are larger than 64x64:

__________________
http://www.rpgartkits.com/
Fantasy art kits for personal and commercial use. Commercial use requires a Developer license, also available through my website.

Last edited by Shockbolt; April 15, 2014 at 20:45.
Shockbolt is offline   Reply With Quote
Old April 25, 2011, 21:52   #150
Shockbolt
Knight
 
Shockbolt's Avatar
 
Join Date: Jan 2011
Location: Norway
Posts: 632
Shockbolt is on a distinguished road
Send a message via MSN to Shockbolt
The same goes for this one, some of the tiles are larger than 64x64 pixels:
__________________
http://www.rpgartkits.com/
Fantasy art kits for personal and commercial use. Commercial use requires a Developer license, also available through my website.

Last edited by Shockbolt; April 15, 2014 at 20:45.
Shockbolt is offline   Reply With Quote
Reply

Tags
angband, graphic, graphics, tileset


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OSX Tileset help? ZorroRoaster Variants 1 March 31, 2009 01:09
Tileset formats? caduceus Vanilla 8 April 24, 2008 00:44


All times are GMT +1. The time now is 11:14.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.