summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-09 09:46:44 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-09 09:46:44 +0000
commitba15bdad80f10dc07f829c14fa6557652caa083f (patch)
tree1bb8d9faeda1deb15c0f877493955678ccab52bb /crawl-ref
parent6e70e966069acbd88760b988fc39638805f0ada2 (diff)
downloadcrawl-ref-ba15bdad80f10dc07f829c14fa6557652caa083f.tar.gz
crawl-ref-ba15bdad80f10dc07f829c14fa6557652caa083f.zip
* Add tile for Sonja.
* Display wielded weapons for zombies, Sonja, Ilsuiw and Saint Roka. * Reorder get_weapon_offset() to be more logical. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9394 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/dat/database/FAQ.txt120
-rw-r--r--crawl-ref/source/rltiles/dc-mon.txt3
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/sonja.pngbin0 -> 893 bytes
-rw-r--r--crawl-ref/source/tilemcache.cc176
-rw-r--r--crawl-ref/source/tilepick.cc12
-rw-r--r--crawl-ref/source/tilereg.cc1
-rw-r--r--crawl-ref/source/tilesdl.cc12
-rw-r--r--crawl-ref/source/tiletex.cc13
8 files changed, 170 insertions, 167 deletions
diff --git a/crawl-ref/source/dat/database/FAQ.txt b/crawl-ref/source/dat/database/FAQ.txt
index b19869b149..c8d4145e59 100644
--- a/crawl-ref/source/dat/database/FAQ.txt
+++ b/crawl-ref/source/dat/database/FAQ.txt
@@ -8,11 +8,11 @@
# Q:key word, for the question
# A:key word, for the corresponding answer
#
-# Questions are pushed into a menu in the order the questions are defined
-# in this file. Answers need not necessarily be right next to the question,
+# Questions are pushed into a menu in the order the questions are defined
+# in this file. Answers need not necessarily be right next to the question,
# but it's easier to read if they are.
#
-# This file is not meant as an easy-access spoiler file, but rather
+# This file is not meant as an easy-access spoiler file, but rather
# intended to answer general questions that crop up from time to time.
#
@@ -28,11 +28,11 @@ A:goal
To survive and to win, obviously. For this you need to find the fabled
Orb of Zot deep down in the dungeon and bring it back to the surface.
-To enter the realm of Zot, you'll first need to collect three runes to be
+To enter the realm of Zot, you'll first need to collect three runes to be
found in various branches of the dungeon.
However, if you're new to the game you really shouldn't worry about this.
-Just try to delve as deeply as possible and have fun exploring the many
+Just try to delve as deeply as possible and have fun exploring the many
side branches in Crawl with various characters of different species,
skill sets, and religions.
%%%%
@@ -44,7 +44,7 @@ A:drop
Press 'd' (or ','/'g'), followed by a number (the amount), and finally the
item's letter. For pickup, this is only possible when choosing items from
-a menu, i.e. ',,' or 'gg'.
+a menu, i.e. ',,' or 'gg'.
Stacks that are selected only in part are marked with '#' rather than '+'.
%%%%
Q:downstairs
@@ -115,12 +115,12 @@ I've got two cool weapons. How can I tell which one is better?
%%%%
A:weapons
-"Better" depends on a number of factors, such as your weapon skills,
-whether it's one or two-handed, the randart properties, the weapon brand,
-and the monsters you're about to face. In general, switching from a weapon
-type you are already highly skilled with to another one that you have no
-skill in is a waste of time. The brands may greatly differ in damage output
-but you can get a good idea by bashing a few comparatively harmless monsters
+"Better" depends on a number of factors, such as your weapon skills,
+whether it's one or two-handed, the randart properties, the weapon brand,
+and the monsters you're about to face. In general, switching from a weapon
+type you are already highly skilled with to another one that you have no
+skill in is a waste of time. The brands may greatly differ in damage output
+but you can get a good idea by bashing a few comparatively harmless monsters
with each and comparing the results. Of the enchantments, damage is usually
more important unless you hardly ever manage to hit with a weapon.
%%%%
@@ -130,9 +130,9 @@ Which gods would you recommend to a beginning player?
%%%%
A:religion
-The easiest gods to play are probably Trog (for pure fighters), Sif Muna
-(for spellcasters), Beogh (for orcs) and Xom (for general fun).
-When you reach the Temple for the first time be sure to read all gods'
+The easiest gods to play are probably Trog (for pure fighters), Sif Muna
+(for spellcasters), Beogh (for orcs) and Xom (for general fun).
+When you reach the Temple for the first time be sure to read all gods'
descriptions and take your time in deciding which way to go.
%%%%
Q:starving
@@ -156,10 +156,10 @@ I keep getting murdered by my own ghosts. Can I deactivate them?
%%%%
A:ghosts
-No, you can't. On the plus side, once a ghost has been loaded onto a
-level, it won't be loaded again - unless you happen to die on that level.
-Keep in mind that you don't absolutely have to fight every monster you meet,
-and with ghosts it's even easier: they cannot leave the level they were
+No, you can't. On the plus side, once a ghost has been loaded onto a
+level, it won't be loaded again - unless you happen to die on that level.
+Keep in mind that you don't absolutely have to fight every monster you meet,
+and with ghosts it's even easier: they cannot leave the level they were
created on.
Alternatively, you could play a couple of strong species/class combinations
@@ -172,7 +172,7 @@ I've somehow ended up in a place called "Abyss". How do I get out of here?
%%%%
A:abyss
-If you are in the Abyss for the first time, chances of getting out are
+If you are in the Abyss for the first time, chances of getting out are
slim. Still, here are a few general hints:
* You need to find a gateway leading out of the Abyss. These are rare!
* Don't stick around to fight, move as much as possible!
@@ -191,15 +191,15 @@ A:randart
Apart from the standard items you'll find lying around in the dungeon, you
might also stumble upon artefacts which come in three varieties:
-* randart: a random artefact, usually a weapon or type of armour with
+* randart: a random artefact, usually a weapon or type of armour with
random properties such as conferring resistances or abilities
-* unrandart: an artefact that looks like a randart but is really
+* unrandart: an artefact that looks like a randart but is really
predefined. There's no further difference except that players "in the know"
can recognize such an item by its special description and/or colour.
-* fixedart: an artefact that does not use the random artefact properties but
+* fixedart: an artefact that does not use the random artefact properties but
instead has unique hardcoded effects and descriptions.
-None of the three types can be enchanted or branded, neither temporarily nor
+None of the three types can be enchanted or branded, neither temporarily nor
permanently.
%%%%
Q:oklobs
@@ -218,11 +218,11 @@ I went down these stairs and got killed instantly! Is this a bug?
%%%%
A:instadeath
-Probably not. While your death might be due to an ill-placed vault (this
-would be a bug), it is generally just really bad luck. We believe that a
-game is more fun if the risk of death is real. This means that such instant
-deaths cannot be fully avoided as Crawl relies on randomness for posing
-challenges. It is important to realize that for highly skilled players, the
+Probably not. While your death might be due to an ill-placed vault (this
+would be a bug), it is generally just really bad luck. We believe that a
+game is more fun if the risk of death is real. This means that such instant
+deaths cannot be fully avoided as Crawl relies on randomness for posing
+challenges. It is important to realize that for highly skilled players, the
margin of such deaths is really slim...
%%%%
##############################################
@@ -236,15 +236,15 @@ A:bug
Please submit a bug report on SourceForge, and give as much information as
you can. (What were you doing at the time? What did you expect to happen,
-what happened instead? etc.) Most importantly, what version are you playing?
-Sometimes a screenshot can be helpful. For crashes or monsters/items/levels
-behaving oddly, we probably need a save file. To be on the safe side, attach
-the entire zipped save of the character in question. If there are error
-messages, please write them down. Short of a save file, a guide on how to
+what happened instead? etc.) Most importantly, what version are you playing?
+Sometimes a screenshot can be helpful. For crashes or monsters/items/levels
+behaving oddly, we probably need a save file. To be on the safe side, attach
+the entire zipped save of the character in question. If there are error
+messages, please write them down. Short of a save file, a guide on how to
reproduce the crash (or bug) can be useful; you can use wizard mode for this.
If you don't log in to SourceForge or leave an email address at least check
-the thread from time to time in case we have some more questions.
+the thread from time to time in case we have some more questions.
Thanks in advance!
%%%%
@@ -254,14 +254,14 @@ I've got millions of ideas! Can I join the team?
%%%%
A:ideas
-No, you can't. All of the devteam members submitted a number of code
-intensive patches and/or took over responsibility over an important side
-project before joining. Once you've become indispensible to the team and we
-start wondering how we ever got along without you, we _may_ ask you to join
+No, you can't. All of the devteam members submitted a number of code
+intensive patches and/or took over responsibility over an important side
+project before joining. Once you've become indispensible to the team and we
+start wondering how we ever got along without you, we _may_ ask you to join
us, but don't hold your breath.
Please submit your ideas to the Feature Requests tracker of SourceForge. If
-they catch the interest of at least one coder, chances are they'll make it
+they catch the interest of at least one coder, chances are they'll make it
into the game.
%%%%
Q:feature
@@ -270,9 +270,9 @@ Hey! Why did you close my feature request?
%%%%
A:feature
-If you are logged in to SourceForge when submitting your feature request,
-or choose to "Monitor" the resulting thread while logged in, you will get
-an email any time someone replies to (or fiddles with) this thread. Once a
+If you are logged in to SourceForge when submitting your feature request,
+or choose to "Monitor" the resulting thread while logged in, you will get
+an email any time someone replies to (or fiddles with) this thread. Once a
thread has been closed, you can still access it by searching for requests
with the "Closed" status.
@@ -283,9 +283,9 @@ down to three reasons:
* We just don't think it's interesting enough to ever be implemented.
Please don't let this stop you from bringing up more suggestions. Already the
-next one might generate heavy interest and excitement, and end up in the
-game. However, do try to be specific in your suggestions. If you cannot even
-explain the basics of your idea, why should we bother to flesh it out, let
+next one might generate heavy interest and excitement, and end up in the
+game. However, do try to be specific in your suggestions. If you cannot even
+explain the basics of your idea, why should we bother to flesh it out, let
alone code it?
%%%%
Q:patch
@@ -316,7 +316,7 @@ appreciated. These are:
If you've got some cool addition, you can send it over the mailing list, or
post it as a SourceForge item. You can also help us by giving feedback on
-the most recent version or trunk (available via SVN, Windows binaries
+the most recent version or trunk (available via SVN, Windows binaries
downloadable from http://crawl.develz.org/trunk/).
Thanks a lot for your support!
@@ -328,7 +328,7 @@ Is there a way for me to play the new version before it is released?
A:beta
There certainly is! You can play "trunk" (what will eventually become the
-next version) online on http://crawl.develz.org, or you can download Windows
+next version) online on http://crawl.develz.org, or you can download Windows
binaries from the same site. Note that trunk may be buggy, and that many
changes will invalidate your saved games. If that doesn't bother you, go
ahead and play. Be sure to leave some feedback/suggestions/bug reports on
@@ -342,7 +342,7 @@ A:interact
If you play online on http://crawl.akrasiac.org or http://crawl.develz.org
you can watch games in progress, other players can watch you while you play,
-and you can kill other players' ghosts. You can even send and receive
+and you can kill other players' ghosts. You can even send and receive
messages.
Check docs/ssh_guide.txt for an explanation about how to play online. You can
@@ -369,12 +369,22 @@ Is there a way for me to replace some of the tiles with different ones?
%%%%
A:tiles graphics
-Not without compiling, no. If you can compile (or get someone to do it for
-you), either directly replace the tiles in the rltiles/ folder, or change
-the paths in the dc-xxxx.txt files. You may also need to delete or rename
-the *.png files in rltiles/. Upon compilation, the newly rolled *.png files
-are copied into the dat/tiles/ folder which is where the game accesses the
-tiles it needs.
+It depends. If all you want are minor modifications (such as colour changes)
+you can directly modify the png files in the dat/tiles/ folder.
+
+Otherwise, you'll need to be able to compile the game. In this case you can
+either directly replace the tiles in the rltiles/ subfolders, or change their
+paths in the dc-xxxx.txt files. For the compilation to be successful, you may
+also need to delete or rename the *.png files in rltiles/. Upon compilation,
+the newly rolled *.png files are copied into the dat/tiles/ folder which is
+where the game accesses the tiles it needs. You can then share these files
+with others players, so they can use your tileset without having to compile
+the game.
+
+If you've created some nice new tiles or variations of existing ones you'd
+like to share you might want to send them over the mailing list or submit
+them as a SourceForge item. It's easiest for us if they are already in
+32x32 png format, preferrably zipped if there are several. Thanks in advance!
%%%%
Q:tiles options
diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt
index f2daf59285..4da943cdca 100644
--- a/crawl-ref/source/rltiles/dc-mon.txt
+++ b/crawl-ref/source/rltiles/dc-mon.txt
@@ -387,6 +387,9 @@ death_ooze MONS_DEATH_OOZE
acid_blob MONS_ACID_BLOB
## Kobolds ('K')
+%sdir dc-mon/unique
+sonja MONS_SONJA
+%sdir dc-mon
kobold MONS_KOBOLD
big_kobold MONS_BIG_KOBOLD
kobold_demonologist MONS_KOBOLD_DEMONOLOGIST
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/sonja.png b/crawl-ref/source/rltiles/dc-mon/unique/sonja.png
new file mode 100644
index 0000000000..1257e2c1f8
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/unique/sonja.png
Binary files differ
diff --git a/crawl-ref/source/tilemcache.cc b/crawl-ref/source/tilemcache.cc
index c988b1eed6..cb893c19d7 100644
--- a/crawl-ref/source/tilemcache.cc
+++ b/crawl-ref/source/tilemcache.cc
@@ -127,7 +127,7 @@ unsigned int tile_fg_store::operator=(unsigned int tile)
{
if (tile & TILE_FLAG_MASK == m_tile & TILE_FLAG_MASK)
{
- // update, as flags may have changed.
+ // Update, as flags may have changed.
m_tile = tile;
return m_tile;
}
@@ -166,25 +166,15 @@ unsigned int mcache_manager::register_monster(const monsters *mon)
mcache_entry *entry;
if (mcache_demon::valid(mon))
- {
entry = new mcache_demon(mon);
- }
else if (mcache_ghost::valid(mon))
- {
entry = new mcache_ghost(mon);
- }
else if (mcache_draco::valid(mon))
- {
entry = new mcache_draco(mon);
- }
else if (mcache_monster::valid(mon))
- {
entry = new mcache_monster(mon);
- }
else
- {
return 0;
- }
unsigned int idx = ~0;
@@ -204,7 +194,7 @@ unsigned int mcache_manager::register_monster(const monsters *mon)
m_entries.push_back(entry);
}
- return TILEP_MCACHE_START + idx;
+ return (TILEP_MCACHE_START + idx);
}
void mcache_manager::clear_nonref()
@@ -222,9 +212,8 @@ void mcache_manager::clear_nonref()
void mcache_manager::clear_all()
{
for (unsigned int i = 0; i < m_entries.size(); i++)
- {
delete m_entries[i];
- }
+
m_entries.resize(0);
}
@@ -332,10 +321,14 @@ mcache_monster::mcache_monster(const monsters *mon)
m_equ_tile = tilep_equ_weapon(mitm[mon_wep]);
}
+// Returns the amount of pixels necessary to shift a wielded weapon
+// from its default placement. Tiles showing monsters already wielding
+// a weapon should not be listed here.
bool mcache_monster::get_weapon_offset(int mon_tile, int &ofs_x, int &ofs_y)
{
switch (mon_tile)
{
+ // No shift necessary.
case TILEP_MONS_VAULT_GUARD:
case TILEP_MONS_HOBGOBLIN:
case TILEP_MONS_DEEP_ELF_MASTER_ARCHER:
@@ -362,17 +355,22 @@ bool mcache_monster::get_weapon_offset(int mon_tile, int &ofs_x, int &ofs_y)
case TILEP_MONS_MERMAID_WATER:
case TILEP_MONS_MERFOLK_FIGHTER:
case TILEP_MONS_MERFOLK_FIGHTER_WATER:
+ case TILEP_MONS_ILSUIW:
+ case TILEP_MONS_ILSUIW_WATER:
ofs_x = 0;
ofs_y = 0;
break;
- case TILEP_MONS_CENTAUR_MELEE:
+ // Shift upwards.
+ case TILEP_MONS_GNOLL:
+ case TILEP_MONS_DEEP_ELF_DEATH_MAGE:
ofs_x = -1;
- ofs_y = -3;
+ ofs_y = 0;
break;
- case TILEP_MONS_CENTAUR_WARRIOR_MELEE:
- ofs_x = 0;
- ofs_y = -1;
+ case TILEP_MONS_TIAMAT:
+ ofs_x = -2;
+ ofs_y = 0;
break;
+ // Shift downwards.
case TILEP_MONS_YAKTAUR_MELEE:
ofs_x = 2;
ofs_y = 0;
@@ -381,12 +379,41 @@ bool mcache_monster::get_weapon_offset(int mon_tile, int &ofs_x, int &ofs_y)
ofs_x = 4;
ofs_y = 0;
break;
+ // Shift to the left.
+ case TILEP_MONS_CENTAUR_WARRIOR_MELEE:
+ case TILEP_MONS_DEEP_ELF_SORCERER:
+ case TILEP_MONS_DEEP_ELF_HIGH_PRIEST:
+ ofs_x = 0;
+ ofs_y = -1;
+ break;
+ case TILEP_MONS_MIDGE:
+ ofs_x = 0;
+ ofs_y = -2;
+ break;
+ case TILEP_MONS_KOBOLD_DEMONOLOGIST:
+ ofs_x = 0;
+ ofs_y = -10;
+ break;
+ // Shift to the right.
+ case TILEP_MONS_DEEP_ELF_KNIGHT:
+ case TILEP_MONS_NAGA:
+ case TILEP_MONS_GREATER_NAGA:
+ case TILEP_MONS_NAGA_WARRIOR:
+ case TILEP_MONS_GUARDIAN_NAGA:
+ case TILEP_MONS_NAGA_MAGE:
+ ofs_x = 0;
+ ofs_y = 1;
+ break;
case TILEP_MONS_ORC:
case TILEP_MONS_URUG:
case TILEP_MONS_BLORK_THE_ORC:
+ case TILEP_MONS_SAINT_ROKA:
case TILEP_MONS_ORC_WARRIOR:
case TILEP_MONS_ORC_KNIGHT:
case TILEP_MONS_ORC_WARLORD:
+ case TILEP_MONS_BOGGART:
+ case TILEP_MONS_DEEP_ELF_FIGHTER:
+ case TILEP_MONS_DEEP_ELF_SOLDIER:
ofs_x = 0;
ofs_y = 2;
break;
@@ -395,96 +422,70 @@ bool mcache_monster::get_weapon_offset(int mon_tile, int &ofs_x, int &ofs_y)
ofs_x = 0;
ofs_y = 4;
break;
- case TILEP_MONS_GNOLL:
+ // Shift upwards and to the left.
+ case TILEP_MONS_DEEP_ELF_MAGE:
+ case TILEP_MONS_DEEP_ELF_SUMMONER:
+ case TILEP_MONS_DEEP_ELF_CONJURER:
+ case TILEP_MONS_DEEP_ELF_PRIEST:
+ case TILEP_MONS_DEEP_ELF_DEMONOLOGIST:
+ case TILEP_MONS_DEEP_ELF_ANNIHILATOR:
ofs_x = -1;
- ofs_y = 0;
- break;
- case TILEP_MONS_BOGGART:
- case TILEP_MONS_DEEP_ELF_FIGHTER:
- case TILEP_MONS_DEEP_ELF_SOLDIER:
- ofs_x = 0;
- ofs_y = 2;
- break;
- case TILEP_MONS_DEEP_ELF_KNIGHT:
- ofs_x = 0;
- ofs_y = 1;
- break;
- case TILEP_MONS_KOBOLD:
- ofs_x = 3;
- ofs_y = 4;
+ ofs_y = -2;
break;
- case TILEP_MONS_KOBOLD_DEMONOLOGIST:
- ofs_x = 0;
- ofs_y = -10;
+ case TILEP_MONS_CENTAUR_MELEE:
+ ofs_x = -1;
+ ofs_y = -3;
break;
- case TILEP_MONS_BIG_KOBOLD:
- ofs_x = 2;
- ofs_y = 3;
+ case TILEP_MONS_SONJA:
+ ofs_x = -2;
+ ofs_y = -7;
break;
- case TILEP_MONS_MIDGE:
- ofs_x = 0;
+ case TILEP_MONS_OGRE_MAGE:
+ ofs_x = -4;
ofs_y = -2;
break;
- case TILEP_MONS_NAGA:
- case TILEP_MONS_GREATER_NAGA:
- case TILEP_MONS_NAGA_WARRIOR:
- case TILEP_MONS_GUARDIAN_NAGA:
- case TILEP_MONS_NAGA_MAGE:
- ofs_x = 0;
- ofs_y = 1;
- break;
+ // Shift upwards and to the right.
case TILEP_MONS_HELL_KNIGHT:
ofs_x = -1;
ofs_y = 3;
break;
+ // Shift downwards and to the left.
+ case TILEP_MONS_WIZARD:
+ ofs_x = 2;
+ ofs_y = -2;
+ break;
case TILEP_MONS_RED_DEVIL:
ofs_x = 2;
ofs_y = -3;
break;
- case TILEP_MONS_WIZARD:
+ // Shift downwards and to the right.
+ case TILEP_MONS_BIG_KOBOLD:
ofs_x = 2;
- ofs_y = -2;
+ ofs_y = 3;
break;
- case TILEP_MONS_HUMAN:
- ofs_x = 5;
- ofs_y = 2;
+ case TILEP_MONS_KOBOLD:
+ ofs_x = 3;
+ ofs_y = 4;
break;
case TILEP_MONS_ELF:
- ofs_y = 1;
+ case TILEP_MONS_ZOMBIE_LARGE:
ofs_x = 4;
+ ofs_y = 1;
break;
- case TILEP_MONS_OGRE_MAGE:
- ofs_y = -2;
- ofs_x = -4;
- break;
- case TILEP_MONS_DEEP_ELF_MAGE:
- case TILEP_MONS_DEEP_ELF_SUMMONER:
- case TILEP_MONS_DEEP_ELF_CONJURER:
- case TILEP_MONS_DEEP_ELF_PRIEST:
- case TILEP_MONS_DEEP_ELF_DEMONOLOGIST:
- case TILEP_MONS_DEEP_ELF_ANNIHILATOR:
- ofs_x = -1;
- ofs_y = -2;
- break;
- case TILEP_MONS_DEEP_ELF_DEATH_MAGE:
- ofs_x = -1;
- ofs_y = 0;
- break;
- case TILEP_MONS_DEEP_ELF_SORCERER:
- case TILEP_MONS_DEEP_ELF_HIGH_PRIEST:
- ofs_x = 0;
- ofs_y = -1;
+ case TILEP_MONS_ZOMBIE_SMALL:
+ ofs_x = 4;
+ ofs_y = 3;
break;
- case TILEP_MONS_TIAMAT:
- ofs_x = -2;
- ofs_y = 0;
+ case TILEP_MONS_HUMAN:
+ ofs_x = 5;
+ ofs_y = 2;
break;
default:
// This monster cannot be displayed with a weapon.
- return false;
+ return (false);
}
- return true;
+ return (true);
}
unsigned int mcache_monster::info(tile_draw_info *dinfo) const
@@ -514,22 +515,19 @@ unsigned int mcache_monster::info(tile_draw_info *dinfo) const
};
dinfo[2].set(eq2, -ofs_x, ofs_y);
-
return 3;
}
else
- {
return 2;
- }
}
bool mcache_monster::valid(const monsters *mon)
{
if (!mon)
- return false;
+ return (false);
int mon_wep = mon->inv[MSLOT_WEAPON];
if (mon_wep == NON_ITEM)
- return false;
+ return (false);
int mon_tile = tileidx_monster(mon, false) & TILE_FLAG_MASK;
@@ -824,9 +822,7 @@ mcache_demon::mcache_demon(const monsters *mon)
m_demon.wings = TILEP_DEMON_WINGS + wings_offset;
}
else
- {
m_demon.wings = 0;
- }
}
unsigned int mcache_demon::info(tile_draw_info *dinfo) const
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index ab9f67a587..36365ff298 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -914,7 +914,7 @@ static int _tileidx_monster_base(const monsters *mon, bool detected)
case MONS_ROXANNE:
return TILEP_MONS_ROXANNE;
case MONS_SONJA:
- return TILEP_MONS_KOBOLD; // TODO enne
+ return TILEP_MONS_SONJA;
case MONS_AZRAEL:
return TILEP_MONS_AZRAEL;
case MONS_ILSUIW:
@@ -4036,18 +4036,12 @@ void tile_init_flavour(const coord_def &gc)
env.tile_flv(gc).special = target - TILE_DNGN_CLOSED_DOOR;
}
else
- {
env.tile_flv(gc).special = 0;
- }
}
else if (grd(gc) == DNGN_SECRET_DOOR)
- {
env.tile_flv(gc).special = 0;
- }
else if (!env.tile_flv(gc).special)
- {
env.tile_flv(gc).special = random2(256);
- }
}
static bool _adjacent_target(dungeon_feature_type target, int x, int y)
@@ -4058,10 +4052,10 @@ static bool _adjacent_target(dungeon_feature_type target, int x, int y)
if (!map_bounds(x+i, y+j))
continue;
if (grd[x+i][y+j] == target)
- return true;
+ return (true);
}
- return false;
+ return (false);
}
void tile_floor_halo(dungeon_feature_type target, int tile)
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index 8b62f13ac4..d818875395 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -983,7 +983,6 @@ void DungeonRegion::place_cursor(cursor_type type, const coord_def &gc)
if (m_cursor[type] != result)
{
m_dirty = true;
- coord_def old_cursor = m_cursor[type];
m_cursor[type] = result;
if (type == CURSOR_MOUSE)
you.last_clicked_grid = coord_def();
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index 4eb4549b76..87d41d59b5 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -208,7 +208,7 @@ bool TilesFramework::initialise()
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0)
{
printf("Failed to initialise SDL: %s\n", SDL_GetError());
- return false;
+ return (false);
}
{
@@ -229,7 +229,7 @@ bool TilesFramework::initialise()
if (!icon)
{
printf("Failed to load icon: %s\n", SDL_GetError());
- return false;
+ return (false);
}
SDL_WM_SetIcon(icon, NULL);
@@ -278,11 +278,11 @@ bool TilesFramework::initialise()
if (!m_context)
{
printf("Failed to set video mode: %s\n", SDL_GetError());
- return false;
+ return (false);
}
if (!m_image.load_textures())
- return false;
+ return (false);
calculate_default_options();
@@ -300,7 +300,7 @@ bool TilesFramework::initialise()
if (crt_font == -1 || msg_font == -1 || stat_font == -1
|| m_tip_font == -1 || lbl_font == -1)
{
- return false;
+ return (false);
}
m_region_tile = new DungeonRegion(&m_image, m_fonts[lbl_font].font,
@@ -329,7 +329,7 @@ bool TilesFramework::initialise()
resize();
- return true;
+ return (true);
}
int TilesFramework::load_font(const char *font_file, int font_size,
diff --git a/crawl-ref/source/tiletex.cc b/crawl-ref/source/tiletex.cc
index 222570a282..8a0c89dee7 100644
--- a/crawl-ref/source/tiletex.cc
+++ b/crawl-ref/source/tiletex.cc
@@ -40,7 +40,7 @@ bool GenericTexture::load_texture(const char *filename,
if (tex_path.c_str()[0] == 0)
{
fprintf(stderr, "Couldn't find texture '%s'.\n", filename);
- return false;
+ return (false);
}
SDL_Surface *img = IMG_Load(tex_path.c_str());
@@ -48,7 +48,7 @@ bool GenericTexture::load_texture(const char *filename,
if (!img)
{
fprintf(stderr, "Couldn't load texture '%s'.\n", tex_path.c_str());
- return false;
+ return (false);
}
unsigned int bpp = img->format->BytesPerPixel;
@@ -59,6 +59,7 @@ bool GenericTexture::load_texture(const char *filename,
int new_width = 1;
while (new_width < img->w)
new_width *= 2;
+
int new_height = 1;
while (new_height < img->h)
new_height *= 2;
@@ -178,7 +179,7 @@ bool GenericTexture::load_texture(const char *filename,
{
printf("Warning: unsupported format, bpp = %d for '%s'\n",
bpp, acBuffer);
- return false;
+ return (false);
}
bool success = false;
@@ -193,7 +194,7 @@ bool GenericTexture::load_texture(const char *filename,
SDL_FreeSurface(img);
- return success;
+ return (success);
}
bool GenericTexture::load_texture(unsigned char *pixels, unsigned int new_width,
@@ -201,7 +202,7 @@ bool GenericTexture::load_texture(unsigned char *pixels, unsigned int new_width,
GenericTexture::MipMapOptions mip_opt)
{
if (!pixels || !new_width || !new_height)
- return false;
+ return (false);
// Assumptions...
const unsigned int bpp = 4;
@@ -234,7 +235,7 @@ bool GenericTexture::load_texture(unsigned char *pixels, unsigned int new_width,
texture_format, format, pixels);
}
- return true;
+ return (true);
}
void GenericTexture::bind() const