From: Laszlo T. <ave...@us...> - 2011-07-31 20:57:18
|
gemrb: Infinity Engine emulator The branch master has been updated via b734965b3d971fcf9c725a29d74b93a0d7a840c3 (commit) Summary of changes: gemrb/core/Map.cpp | 11 +++++++---- gemrb/core/Map.h | 8 ++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) from 5b83f1b55da0f67eb6c0d468a910e44827d3f3be (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=b734965b3d971fcf9c725a29d74b93a0d7a840c3 commit b734965b3d971fcf9c725a29d74b93a0d7a840c3 Author: Avenger <ave...@so...> Date: Sun Jul 31 22:56:45 2011 +0200 a few more consts diff --git a/gemrb/core/Map.cpp b/gemrb/core/Map.cpp index 53f1c19..f5d6a37 100644 --- a/gemrb/core/Map.cpp +++ b/gemrb/core/Map.cpp @@ -3461,7 +3461,7 @@ bool Map::DisplayTrackString(Actor *target) // returns a lightness level in the range of [0-100] // since the lightmap is much smaller than the area, we need to interpolate -unsigned int Map::GetLightLevel(const Point &Pos) +unsigned int Map::GetLightLevel(const Point &Pos) const { Color c = LightMap->GetPixel(Pos.x/16, Pos.y/12); // at night/dusk/dawn the lightmap color is adjusted by the color overlay. (Only get's darker.) @@ -3690,21 +3690,24 @@ void Map::SeeSpellCast(Scriptable *caster, ieDword spell) } } -short unsigned int Map::GetInternalSearchMap(int x, int y) { +short unsigned int Map::GetInternalSearchMap(int x, int y) const +{ if ((unsigned)x >= Width || (unsigned)y >= Height) { return 0; } return SrchMap[x+y*Width]; } -void Map::SetInternalSearchMap(int x, int y, int value) { +void Map::SetInternalSearchMap(int x, int y, int value) +{ if ((unsigned)x >= Width || (unsigned)y >= Height) { return; } SrchMap[x+y*Width] = value; } -void Map::SetBackground(const ieResRef &bgResRef, ieDword duration) { +void Map::SetBackground(const ieResRef &bgResRef, ieDword duration) +{ Video* video = core->GetVideoDriver(); ResourceHolder<ImageMgr> bmp(bgResRef); diff --git a/gemrb/core/Map.h b/gemrb/core/Map.h index 68e2463..59c4777 100644 --- a/gemrb/core/Map.h +++ b/gemrb/core/Map.h @@ -465,16 +465,20 @@ public: Spawn *GetSpawnRadius(const Point &point, unsigned int radius); unsigned int GetSpawnCount() { return (unsigned int) spawns.size(); } void TriggerSpawn(Spawn *spawn); + //move some or all players to a new area void MoveToNewArea(const char *area, const char *entrance, unsigned int direction, int EveryOne, Actor *actor); bool HasWeather(); int GetWeather(); void ClearTrap(Actor *actor, ieDword InTrap); + + //tracking stuff void SetTrackString(ieStrRef strref, int flg, int difficulty); //returns true if tracking failed bool DisplayTrackString(Actor *actor); - unsigned int GetLightLevel(const Point &Pos); - unsigned short GetInternalSearchMap(int x, int y); + + unsigned int GetLightLevel(const Point &Pos) const; + unsigned short GetInternalSearchMap(int x, int y) const; void SetInternalSearchMap(int x, int y, int value); void SetBackground(const ieResRef &bgResref, ieDword duration); private: ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |