Skip to content

Commit

Permalink
DM: Janitorial - Fix the style of some pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Aug 27, 2016
1 parent b9986f4 commit bf5875d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions engines/dm/champion.cpp
Expand Up @@ -1082,7 +1082,7 @@ int16 ChampionMan::getTargetChampionIndex(int16 mapX, int16 mapY, uint16 cell) {
return kM1_ChampionNone;
}

int16 ChampionMan::getDexterity(Champion* champ) {
int16 ChampionMan::getDexterity(Champion *champ) {
int16 dexterity = _vm->getRandomNumber(8) + champ->_statistics[k2_ChampionStatDexterity][k1_ChampionStatCurrent];
dexterity -= ((int32)(dexterity >> 1) * (int32)champ->_load) / getMaximumLoad(champ);
if (_partyIsSleeping)
Expand All @@ -1091,7 +1091,7 @@ int16 ChampionMan::getDexterity(Champion* champ) {
return getBoundedValue(1 + _vm->getRandomNumber(8), dexterity >> 1, 100 - _vm->getRandomNumber(8));
}

bool ChampionMan::isLucky(Champion* champ, uint16 percentage) {
bool ChampionMan::isLucky(Champion *champ, uint16 percentage) {
if (_vm->getRandomNumber(2) && (_vm->getRandomNumber(100) > percentage))
return true;

Expand Down Expand Up @@ -1355,7 +1355,7 @@ bool ChampionMan::isProjectileSpellCast(uint16 champIndex, Thing thing, int16 ki
return true; // fix BUG_01
}

void ChampionMan::championShootProjectile(Champion* champ, Thing thing, int16 kineticEnergy, int16 attack, int16 stepEnergy) {
void ChampionMan::championShootProjectile(Champion *champ, Thing thing, int16 kineticEnergy, int16 attack, int16 stepEnergy) {
Direction newDirection = champ->_dir;
_vm->_projexpl->createProjectile(thing, _vm->_dungeonMan->_partyMapX, _vm->_dungeonMan->_partyMapY, normalizeModulo4((((champ->_cell - newDirection + 1) & 0x0002) >> 1) + newDirection), newDirection, kineticEnergy, attack, stepEnergy);
_vm->_projectileDisableMovementTicks = 4;
Expand Down Expand Up @@ -1694,7 +1694,7 @@ void ChampionMan::applyTimeEffects() {
drawAllChampionStates();
}

void ChampionMan::savePartyPart2(Common::OutSaveFile* file) {
void ChampionMan::savePartyPart2(Common::OutSaveFile *file) {
for (uint16 i = 0; i < 4; ++i) {
Champion *champ = &_champions[i];
file->writeUint16BE(champ->_attributes);
Expand Down Expand Up @@ -1756,7 +1756,7 @@ void ChampionMan::savePartyPart2(Common::OutSaveFile* file) {
file->writeByte(party._event71Count_Invisibility);
}

void ChampionMan::loadPartyPart2(Common::InSaveFile* file) {
void ChampionMan::loadPartyPart2(Common::InSaveFile *file) {
for (uint16 i = 0; i < 4; ++i) {
Champion *champ = &_champions[i];
champ->_attributes = file->readUint16BE();
Expand Down Expand Up @@ -2288,7 +2288,7 @@ uint16 ChampionMan::getChampionIconIndex(int16 val, Direction dir) {
return ((val + 4 - dir) & 0x3);
}

void ChampionMan::drawHealthStaminaManaValues(Champion* champ) {
void ChampionMan::drawHealthStaminaManaValues(Champion *champ) {
drawHealthOrStaminaOrManaValue(116, champ->_currHealth, champ->_maxHealth);
drawHealthOrStaminaOrManaValue(124, champ->_currStamina, champ->_maxStamina);
drawHealthOrStaminaOrManaValue(132, champ->_currMana, champ->_maxMana);
Expand Down Expand Up @@ -2374,7 +2374,7 @@ void ChampionMan::drawSlot(uint16 champIndex, int16 slotIndex) {
_vm->_eventMan->showMouse();
}

void ChampionMan::renameChampion(Champion* champ) {
void ChampionMan::renameChampion(Champion *champ) {
#define k1_RENAME_CHAMPION_NAME 1
#define k2_RENAME_CHAMPION_TITLE 2
static const char underscoreCharacterString[2] = "_";
Expand Down
4 changes: 2 additions & 2 deletions engines/dm/champion.h
Expand Up @@ -508,7 +508,7 @@ class ChampionMan {
uint16 getChampionIconIndex(int16 val, Direction dir); // @ M26_CHAMPION_ICON_INDEX
void drawHealthStaminaManaValues(Champion *champ); // @ F0290_CHAMPION_DrawHealthStaminaManaValues
void drawSlot(uint16 champIndex, int16 slotIndex); // @ F0291_CHAMPION_DrawSlot
void renameChampion(Champion* champ); // @ F0281_CHAMPION_Rename
void renameChampion(Champion *champ); // @ F0281_CHAMPION_Rename
uint16 getSkillLevel(int16 champIndex, uint16 skillIndex);// @ F0303_CHAMPION_GetSkillLevel
Common::String getStringFromInteger(uint16 val, bool padding, uint16 paddingCharCount); // @ F0288_CHAMPION_GetStringFromInteger
void applyModifiersToStatistics(Champion *champ, int16 slotIndex, int16 iconIndex,
Expand Down Expand Up @@ -554,7 +554,7 @@ class ChampionMan {
void unpoison(int16 champIndex); // @ F0323_CHAMPION_Unpoison
void applyTimeEffects(); // @ F0331_CHAMPION_ApplyTimeEffects_CPSF
void savePartyPart2(Common::OutSaveFile *file);
void loadPartyPart2(Common::InSaveFile* file);
void loadPartyPart2(Common::InSaveFile *file);

Box _boxChampionIcons[4];
Color _championColor[4];
Expand Down
10 changes: 5 additions & 5 deletions engines/dm/dm.cpp
Expand Up @@ -64,7 +64,7 @@
#include <gui/saveload.h>

namespace DM {
void warning(bool repeat, const char* s, ...) {
void warning(bool repeat, const char *s, ...) {
va_list va;

va_start(va, s);
Expand All @@ -83,8 +83,8 @@ void warning(bool repeat, const char* s, ...) {
}
}

const char* debugGetDirectionName(Direction dir) {
static const char* directionNames[] = {"North", "East", "South", "West"};
const char *debugGetDirectionName(Direction dir) {
static const char *directionNames[] = {"North", "East", "South", "West"};
if (dir < 0 || dir > 3)
return "Invalid direction";
return directionNames[dir];
Expand Down Expand Up @@ -945,8 +945,8 @@ void DMEngine::fuseSequnce() {
#define AL1426_i_FuseSequenceUpdateCount L1426_i_Multiple
#define AL1426_i_TextStringThingCount L1426_i_Multiple
Thing L1427_T_Thing;
Group* L1428_ps_Group;
Explosion* L1429_ps_Explosion;
Group *L1428_ps_Group;
Explosion *L1429_ps_Explosion;
Thing L1430_T_NextThing;
int16 L1431_i_LordChaosMapX;
int16 L1432_i_LordChaosMapY;
Expand Down

0 comments on commit bf5875d

Please sign in to comment.