Programming

 

To modify displayed tiles, I needed both graphical and programming modifications.


Graphical modifications :

The David Gervais tiles I having been adding have already been used in some other games (please refer to the < links section > for a complete list). They are 32 x 32 bits big, instead of 16 x 16 for Adam Bolt ones, and 8 x 8 for old ones.

To display the new tiles correctly, I decided to use twice as much characters as previously. Here is a table giving the number of cars used, whenever “Bigtile mode” or “Double size mode” are off or on:

# of cars used to display a tile
Double size mode off
Double size mode on
Bigtile mode off
1 car x 1 car
2 cars x 2 cars
Bigtile mode on
2 cars x 1 car
4 cars x 2 cars

Each D. Gervais tile is being included in the graphic file “32x32.bmp”, to take place of Adam Bolt tiles. You can have a look at all D. Gervais tiles I am using in the < Tiles Library >.

 


Coding modifications :

To get advice about compiling ToME, please refer to the < Compiling section >.
You will find next all the files I modified to deal with the new tiles; click on each one to get details about what have been changed or added. Modifications deal mainly with two categories: including new 32 x 32 tiles, and displaying them with double size mode.

Major changes:
src\cave.c
src\main-win.c
src\object1.c
src\store.c
src\xtra2.c
src\z-term.c
lib\pref\graf-win.prf
src\angband.rc

New files:
• src\make.cmd
• lib\xtra\graf\32x32.bmp
• lib\xtra\graf\mask32.bmp
• lib\pref\graf-gervais.prf
• lib\pref\xtra-gervais.prf

Minor changes:
src\variable.c
src\defines.h
src\bldg.c
src\monster1.c
• src\makefile.bcc