diff options
author | Travis Howell | 2009-07-06 06:34:40 +0000 |
---|---|---|
committer | Travis Howell | 2009-07-06 06:34:40 +0000 |
commit | f63b02b9200606069a605e27d828f4c8c59119fc (patch) | |
tree | 705a39e27a252ed5fe897d0ef0e08b7091d43cd8 /engines/gob/draw.cpp | |
parent | 4b1c6b526dbfa8d084fbd2475b4d4caa173e442c (diff) | |
parent | 08df8dc2721808c7019f49d9051e2eebfe8dad9c (diff) | |
download | scummvm-rg350-f63b02b9200606069a605e27d828f4c8c59119fc.tar.gz scummvm-rg350-f63b02b9200606069a605e27d828f4c8c59119fc.tar.bz2 scummvm-rg350-f63b02b9200606069a605e27d828f4c8c59119fc.zip |
Merged revisions 42087-42088,42093-42095,42097-42099,42104-42107,42110,42112-42113,42115-42132,42134-42150,42153-42155,42161-42162 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
........
r42087 | thebluegr | 2009-07-04 21:24:09 +1000 (Sat, 04 Jul 2009) | 1 line
Newer DoSound() semantics are now detected automatically, by the existence of the "setVol" selector. Removed game flag GF_SCI1_NEWDOSOUND
........
r42088 | thebluegr | 2009-07-04 21:33:51 +1000 (Sat, 04 Jul 2009) | 1 line
Removed silly FIXME (mixup between debug and engine debug levels)
........
r42093 | thebluegr | 2009-07-05 01:22:42 +1000 (Sun, 05 Jul 2009) | 1 line
Added a new console command, "selector", which attempts to find a selector by name
........
r42094 | thebluegr | 2009-07-05 01:39:31 +1000 (Sun, 05 Jul 2009) | 1 line
- Changed some comments to DOxygen style
........
r42095 | thebluegr | 2009-07-05 01:45:04 +1000 (Sun, 05 Jul 2009) | 3 lines
- Kernel function names are no longer loaded from vocab.999, but are constructed from the hardcoded function table, depending on the SCI version used
- SCI0 games using older graphics functions are now detected by the presence of the "curAngle" selector
- SCI0 games using a SCI1 table (like KQ1 demo version and full version) are detected by the presence of the "sightAngle" selector (as no SCI0 game seems to have it)
........
r42097 | thebluegr | 2009-07-05 02:30:20 +1000 (Sun, 05 Jul 2009) | 3 lines
- Merged the "early" and "late" SCI1 versions - these are functionally equivalent, and the code that does the version check is unreliable (e.g. it sets SQ1 VGA to SCI1 "late" and EcoQuest 1 to SCI1 "early")
- Cleanup of the vocabulary setting functions
- Cleanup of the cursor manipulation code
........
r42098 | thebluegr | 2009-07-05 02:36:56 +1000 (Sun, 05 Jul 2009) | 1 line
Merged SCI1 versions in one more file
........
r42099 | thebluegr | 2009-07-05 03:39:43 +1000 (Sun, 05 Jul 2009) | 1 line
Cursors without a palette are now initialized correctly (from patch #2816652). Fixes the cursor transparent color in QFG3
........
r42104 | lordhoto | 2009-07-05 04:54:06 +1000 (Sun, 05 Jul 2009) | 1 line
Add GCC_PRINTF parameter.
........
r42105 | lordhoto | 2009-07-05 04:54:27 +1000 (Sun, 05 Jul 2009) | 1 line
Fix mismatching format arguments.
........
r42106 | lordhoto | 2009-07-05 04:54:43 +1000 (Sun, 05 Jul 2009) | 1 line
Kyra1 PC-98 never offered English as language settings, thus remove it. (The CD version *does* supply English files, but those will work as FM-Towns version, so this causes no drawback for the user and is faithful to the original)
........
r42107 | lordhoto | 2009-07-05 05:04:39 +1000 (Sun, 05 Jul 2009) | 1 line
After discussing with Max, disable -Wmissing-format-attribute again. Also added a comment explaining why it is disabled.
........
r42110 | athrxx | 2009-07-05 07:18:20 +1000 (Sun, 05 Jul 2009) | 1 line
KYRA: fix minor bug in Screen::drawShape()
........
r42112 | wjpalenstijn | 2009-07-05 09:52:24 +1000 (Sun, 05 Jul 2009) | 1 line
When morphing a TeeSongIterator, transfer death listeners to remaining child
........
r42113 | wjpalenstijn | 2009-07-05 11:16:53 +1000 (Sun, 05 Jul 2009) | 1 line
When creating a CleanupSongIterator, transfer death listeners to it
........
r42115 | dreammaster | 2009-07-05 17:21:17 +1000 (Sun, 05 Jul 2009) | 1 line
Bugfix for word-wrapping of text, which sometimes failed for strings with special characters
........
r42116 | jvprat | 2009-07-05 19:34:54 +1000 (Sun, 05 Jul 2009) | 3 lines
- Refactorized Groovie::MusicPlayer to make it extensible
- Added an empty MusicPlayerMac to let the Macintosh version of The 7th Guest start
........
r42117 | thebluegr | 2009-07-05 20:34:43 +1000 (Sun, 05 Jul 2009) | 1 line
Removed validity check for atoi, which prevented console commands from interacting with resources with id 0
........
r42118 | thebluegr | 2009-07-05 21:08:53 +1000 (Sun, 05 Jul 2009) | 1 line
SCI1 games with absolute parameters to lofs instructions are automatically detected now. Removed the GF_SCI1_LOFSABSOLUTE game flag
........
r42119 | drmccoy | 2009-07-05 21:26:23 +1000 (Sun, 05 Jul 2009) | 1 line
Adding an enum MouseButtons
........
r42120 | drmccoy | 2009-07-05 21:26:42 +1000 (Sun, 05 Jul 2009) | 1 line
Commenting prepareStr a bit and renaming it to cleanupStr
........
r42121 | drmccoy | 2009-07-05 21:27:11 +1000 (Sun, 05 Jul 2009) | 1 line
Added a Key and ShortKey enum
........
r42122 | drmccoy | 2009-07-05 21:27:26 +1000 (Sun, 05 Jul 2009) | 1 line
Added a skipBlock() method
........
r42123 | drmccoy | 2009-07-05 21:27:54 +1000 (Sun, 05 Jul 2009) | 1 line
Moving the "Collision" stuff to Hotspots in hotspots.cpp/.h
........
r42124 | drmccoy | 2009-07-05 21:28:09 +1000 (Sun, 05 Jul 2009) | 1 line
Wrapping the block end marker checks into Hotspots::Hotspot::isEnd()
........
r42125 | drmccoy | 2009-07-05 21:28:25 +1000 (Sun, 05 Jul 2009) | 1 line
Removing the now empty Game_Fascination class
........
r42126 | drmccoy | 2009-07-05 21:28:38 +1000 (Sun, 05 Jul 2009) | 1 line
Fixing indent
........
r42127 | drmccoy | 2009-07-05 21:28:57 +1000 (Sun, 05 Jul 2009) | 1 line
Merging Game_v1's and Game_v2's prepareStart()
........
r42128 | drmccoy | 2009-07-05 21:29:13 +1000 (Sun, 05 Jul 2009) | 1 line
Merging Game's and Game_v6's totSub()
........
r42129 | drmccoy | 2009-07-05 21:29:30 +1000 (Sun, 05 Jul 2009) | 1 line
Merging playTot()
........
r42130 | drmccoy | 2009-07-05 21:29:54 +1000 (Sun, 05 Jul 2009) | 1 line
Putting the Urban noCD check into Init_v6::initGame()
........
r42131 | drmccoy | 2009-07-05 21:30:14 +1000 (Sun, 05 Jul 2009) | 1 line
Removing the now unneeded Game_v* classes
........
r42132 | thebluegr | 2009-07-05 21:49:05 +1000 (Sun, 05 Jul 2009) | 2 lines
- Fixed feature auto-detection for Conquests of Camelot
- Auto-detected features are now printed in the console (to ease debugging)
........
r42134 | thebluegr | 2009-07-05 21:58:42 +1000 (Sun, 05 Jul 2009) | 1 line
Updated the MSVC project files of the gob engine
........
r42135 | drmccoy | 2009-07-05 22:52:14 +1000 (Sun, 05 Jul 2009) | 1 line
Adding a workaround for an invalid expression in Gob1 EGA
........
r42136 | thebluegr | 2009-07-05 23:07:11 +1000 (Sun, 05 Jul 2009) | 1 line
Merged the two SCI1 versions in one more file
........
r42137 | lordhoto | 2009-07-06 00:11:54 +1000 (Mon, 06 Jul 2009) | 1 line
Got rid of HACK, which was used to setup new cursor on theme change.
........
r42138 | lordhoto | 2009-07-06 00:12:04 +1000 (Mon, 06 Jul 2009) | 1 line
Removed pushing of EVENT_SCREEN_CHANGED on theme load. This event should only be pushed by the backend.
........
r42139 | marcus_c | 2009-07-06 00:57:03 +1000 (Mon, 06 Jul 2009) | 1 line
Refresh the screen if pollEvent() is called without updateScreen() being called for a long time.
........
r42140 | athrxx | 2009-07-06 00:58:22 +1000 (Mon, 06 Jul 2009) | 1 line
LOL: - reduce code duplication
........
r42141 | athrxx | 2009-07-06 02:29:17 +1000 (Mon, 06 Jul 2009) | 1 line
LOL: cleanup
........
r42142 | drmccoy | 2009-07-06 05:56:03 +1000 (Mon, 06 Jul 2009) | 1 line
Encapsulating hotspot state reading
........
r42143 | drmccoy | 2009-07-06 05:56:23 +1000 (Mon, 06 Jul 2009) | 1 line
Correcting an input related mistake
........
r42144 | drmccoy | 2009-07-06 05:56:40 +1000 (Mon, 06 Jul 2009) | 1 line
More state-related encapsulation
........
r42145 | drmccoy | 2009-07-06 05:56:54 +1000 (Mon, 06 Jul 2009) | 1 line
Split off Hotspots::evaluateNew()
........
r42146 | drmccoy | 2009-07-06 05:57:08 +1000 (Mon, 06 Jul 2009) | 1 line
Ooops, fixing monospaced text input again
........
r42147 | drmccoy | 2009-07-06 05:57:22 +1000 (Mon, 06 Jul 2009) | 1 line
Split off some drawing related functions
........
r42148 | drmccoy | 2009-07-06 05:57:37 +1000 (Mon, 06 Jul 2009) | 1 line
More input related split-offs
........
r42149 | drmccoy | 2009-07-06 05:57:55 +1000 (Mon, 06 Jul 2009) | 1 line
Renaming FontDesc::extraData to charWidths
........
r42150 | drmccoy | 2009-07-06 05:58:09 +1000 (Mon, 06 Jul 2009) | 1 line
Reordering some methods
........
r42153 | drmccoy | 2009-07-06 07:39:55 +1000 (Mon, 06 Jul 2009) | 1 line
Renaming the last occurences of "Collision" to "Hotspot"
........
r42154 | drmccoy | 2009-07-06 07:40:20 +1000 (Mon, 06 Jul 2009) | 1 line
Adding some hotspot debug messages
........
r42155 | drmccoy | 2009-07-06 07:40:51 +1000 (Mon, 06 Jul 2009) | 1 line
Added an enum for the hotspot states
........
r42161 | drmccoy | 2009-07-06 11:41:29 +1000 (Mon, 06 Jul 2009) | 1 line
Adding more comments
........
r42162 | dreammaster | 2009-07-06 12:46:59 +1000 (Mon, 06 Jul 2009) | 1 line
Bugfix for node enabling/disabling, which was previously allowing the player to walk through closed doors and into the walls
........
svn-id: r42165
Diffstat (limited to 'engines/gob/draw.cpp')
-rw-r--r-- | engines/gob/draw.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index b3e5e7418c..c20bece7b4 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -360,9 +360,9 @@ int Draw::stringLength(const char *str, int16 fontIndex) { } else { - if (_fonts[fontIndex]->extraData) + if (_fonts[fontIndex]->charWidths) while (*str != 0) - len += *(_fonts[fontIndex]->extraData + (*str++ - _fonts[fontIndex]->startItem)); + len += *(_fonts[fontIndex]->charWidths + (*str++ - _fonts[fontIndex]->startItem)); else len = (strlen(str) * _fonts[fontIndex]->itemWidth); @@ -376,10 +376,10 @@ void Draw::drawString(const char *str, int16 x, int16 y, int16 color1, int16 col while (*str != '\0') { _vm->_video->drawLetter(*str, x, y, font, transp, color1, color2, dest); - if (!font->extraData) + if (!font->charWidths) x += font->itemWidth; else - x += *(font->extraData + (*str - font->startItem)); + x += *(font->charWidths + (*str - font->startItem)); str++; } } @@ -415,12 +415,12 @@ void Draw::printTextCentered(int16 id, int16 left, int16 top, int16 right, _fontIndex = fontIndex; _frontColor = color; _textToPrint = str; - if (_fonts[fontIndex]->extraData != 0) { - byte *data = _fonts[fontIndex]->extraData; + if (_fonts[fontIndex]->charWidths != 0) { + uint8 *widths = _fonts[fontIndex]->charWidths; int length = strlen(str); for (int i = 0; i < length; i++) - width += *(data + (str[i] - _fonts[_fontIndex]->startItem)); + width += *(widths + (str[i] - _fonts[_fontIndex]->startItem)); } else width = strlen(str) * _fonts[fontIndex]->itemWidth; |