Help with graphics

All your MAngband related technical questions answered. Problems compiling or running the game/server? No problem! Ask here.
PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Help with graphics

Post by PowerWyrm » Wed 18.11.2009, 16:54

Todo:
- screen doesn't refresh when changing graphic mode (need to do a manual ctrl-R... even if the request for redraw is already done)
- some tiles don't refresh when changing graphic mode (some are probably reset when they should not)
- bigtile mode doesn't work
- remap all graphic attr/char pairs (grafxxx.prf files)
- redraw the missing tiles (or remap them to existing attr/char pairs)
Done:
- screen doesn't refresh when changing graphic mode (now changing graphic mode with the corresponding menu item will automatically refresh the screen)
- some tiles don't refresh when changing graphic mode (I added some code in reset_visuals() to reinitialize the Client_setup info when changing graphic mode to force the reload of attr/char pairing when the corresponding pair cannot be found in Client_setup)
Keep the patches coming. :-)
Hmm this is gonna be hard. For my variant, I replaced the current main-win.c file from MAngband by the vanilla Angband 3.0.9 one (which seemed to be *much* cleaner and fixed a critical bug which prevented the launch of the client under WinXP-SP3 and Vista) and added the multiplayer code again. You could try to look at that file and see if you cannot use it for MAngband 1.2. Here are some of the changes I made:
- reset_visuals(): resets the Client_setup info and reloads attr/char pairs from graf.prf or font.prf
- Term_xtra_win_react(): resets the visuals and reloads the graphics when graphic mode changes
- setup_menus(): handles the new menus (needs new angband.rc file)
- process_menus(): processes graphic mode change

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Help with graphics

Post by PowerWyrm » Wed 18.11.2009, 16:57

File is too big to post here. I'm gonna put it on a distant url once I come home tonight.

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Help with graphics

Post by PowerWyrm » Wed 18.11.2009, 18:50

http://powerwyrm.fr.tc/PWMangband/main-win.c
Post here any comments (this file may reference stuff from other files).

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Help with graphics

Post by PowerWyrm » Wed 25.11.2009, 13:46

Todo:
- remap all graphic attr/char pairs (grafxxx.prf files)
This is next... now that I finally understood how to do that :)
In fact it's easy...
Lines in pref files are formatted as:
L:<a>:<c>
where <a> is the tile attr value, and <c> is the tile char value, in hexadecimal.
Now to map that to the bitmap files, simply map:
<a> = tile row + 0x7f
<c> = tile column + 0x7f

Todo:
- race/class tiles (xtra-xxx.prf)
- flavors (flvr-xxx.prf)
- other attr/char mappings (graf-xxx.prf)

Post Reply