JANITORIAL: Fix whitespace

This commit is contained in:
Adrian Frühwirth 2018-04-15 14:00:56 +02:00
parent caba188569
commit 3747d852ee
35 changed files with 170 additions and 176 deletions

View file

@ -241,7 +241,7 @@ void registerDefaults() {
ConfMan.registerDefault("boot_param", 0);
ConfMan.registerDefault("dump_scripts", false);
ConfMan.registerDefault("save_slot", -1);
ConfMan.registerDefault("autosave_period", 5 * 60); // By default, trigger autosave every 5 minutes
ConfMan.registerDefault("autosave_period", 5 * 60); // By default, trigger autosave every 5 minutes
#if defined(ENABLE_SCUMM) || defined(ENABLE_SWORD2)
ConfMan.registerDefault("object_labels", true);
@ -308,7 +308,7 @@ void registerDefaults() {
// Use this for options which have an *optional* value
#define DO_OPTION_OPT(shortCmd, longCmd, defaultVal) \
if (isLongCmd ? (!strcmp(s+2, longCmd) || !memcmp(s+2, longCmd"=", sizeof(longCmd"=") - 1)) : (tolower(s[1]) == shortCmd)) { \
if (isLongCmd ? (!strcmp(s + 2, longCmd) || !memcmp(s + 2, longCmd"=", sizeof(longCmd"=") - 1)) : (tolower(s[1]) == shortCmd)) { \
s += 2; \
if (isLongCmd) { \
s += sizeof(longCmd) - 1; \
@ -337,7 +337,7 @@ void registerDefaults() {
// Use this for boolean options; this distinguishes between "-x" and "-X",
// resp. between "--some-option" and "--no-some-option".
#define DO_OPTION_BOOL(shortCmd, longCmd) \
if (isLongCmd ? (!strcmp(s+2, longCmd) || !strcmp(s+2, "no-" longCmd)) : (tolower(s[1]) == shortCmd)) { \
if (isLongCmd ? (!strcmp(s + 2, longCmd) || !strcmp(s + 2, "no-" longCmd)) : (tolower(s[1]) == shortCmd)) { \
bool boolValue = (Common::isLower(s[1]) != 0); \
s += 2; \
if (isLongCmd) { \
@ -350,7 +350,7 @@ void registerDefaults() {
// Use this for options which never have a value, i.e. for 'commands', like "--help".
#define DO_COMMAND(shortCmd, longCmd) \
if (isLongCmd ? (!strcmp(s+2, longCmd)) : (tolower(s[1]) == shortCmd)) { \
if (isLongCmd ? (!strcmp(s + 2, longCmd)) : (tolower(s[1]) == shortCmd)) { \
s += 2; \
if (isLongCmd) \
s += sizeof(longCmd) - 1; \
@ -383,7 +383,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
// argv[0] contains the name of the executable.
if (argv[0]) {
s = strrchr(argv[0], '/');
s_appName = s ? (s+1) : argv[0];
s_appName = s ? (s + 1) : argv[0];
}
// We store all command line settings into a string map.
@ -746,7 +746,7 @@ static Common::Error listSaves(const char *target) {
gameid = domain->getVal("gameid");
if (gameid.empty())
gameid = target;
gameid.toLowercase(); // Normalize it to lower case
gameid.toLowercase(); // Normalize it to lower case
// Find the plugin that will handle the specified gameid
const Plugin *plugin = nullptr;
@ -754,7 +754,7 @@ static Common::Error listSaves(const char *target) {
if (!plugin) {
return Common::Error(Common::kEnginePluginNotFound,
Common::String::format("target '%s', gameid '%s", target, gameid.c_str()));
Common::String::format("target '%s', gameid '%s", target, gameid.c_str()));
}
const MetaEngine &metaEngine = plugin->get<MetaEngine>();
@ -762,7 +762,7 @@ static Common::Error listSaves(const char *target) {
if (!metaEngine.hasFeature(MetaEngine::kSupportsListSaves)) {
// TODO: Include more info about the target (desc, engine name, ...) ???
return Common::Error(Common::kEnginePluginNotSupportSaves,
Common::String::format("target '%s', gameid '%s", target, gameid.c_str()));
Common::String::format("target '%s', gameid '%s", target, gameid.c_str()));
} else {
// Query the plugin for a list of saved games
SaveStateList saveList = metaEngine.listSaves(target);
@ -821,7 +821,7 @@ static void listAudioDevices() {
static GameList getGameList(const Common::FSNode &dir) {
Common::FSList files;
//Collect all files from directory
// Collect all files from directory
if (!dir.getChildren(files, Common::FSNode::kListAll)) {
printf("Path %s does not exist or is not a directory.\n", dir.getPath().c_str());
return GameList();
@ -1043,7 +1043,7 @@ void upgradeTargets() {
if (gameid.empty()) {
gameid = name;
}
gameid.toLowercase(); // TODO: Is this paranoia? Maybe we should just assume all lowercase, always?
gameid.toLowercase(); // TODO: Is this paranoia? Maybe we should just assume all lowercase, always?
Common::FSNode dir(path);
Common::FSList files;

View file

@ -213,7 +213,7 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
caption = EngineMan.findGame(ConfMan.get("gameid")).description();
}
if (caption.empty())
caption = ConfMan.getActiveDomainName(); // Use the domain (=target) name
caption = ConfMan.getActiveDomainName(); // Use the domain (=target) name
if (!caption.empty()) {
system.setWindowCaption(caption.c_str());
}
@ -394,7 +394,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
if (settings.contains("debuglevel")) {
gDebugLevel = (int)strtol(settings["debuglevel"].c_str(), 0, 10);
printf("Debuglevel (from command line): %d\n", gDebugLevel);
settings.erase("debuglevel"); // This option should not be passed to ConfMan.
settings.erase("debuglevel"); // This option should not be passed to ConfMan.
} else if (ConfMan.hasKey("debuglevel"))
gDebugLevel = ConfMan.getInt("debuglevel");
@ -535,12 +535,12 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
g_eventRec.deinit();
#endif
#if defined(UNCACHED_PLUGINS) && defined(DYNAMIC_MODULES)
#if defined(UNCACHED_PLUGINS) && defined(DYNAMIC_MODULES)
// do our best to prevent fragmentation by unloading as soon as we can
PluginManager::instance().unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false);
// reallocate the config manager to get rid of any fragmentation
ConfMan.defragment();
#endif
#endif
// Did an error occur ?
if (result.getCode() != Common::kNoError && result.getCode() != Common::kUserCanceled) {
@ -549,20 +549,20 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
}
// Quit unless an error occurred, or Return to launcher was requested
#ifndef FORCE_RTL
#ifndef FORCE_RTL
if (result.getCode() == Common::kNoError && !g_system->getEventManager()->shouldRTL())
break;
#endif
#endif
// Reset RTL flag in case we want to load another engine
g_system->getEventManager()->resetRTL();
#ifdef FORCE_RTL
#ifdef FORCE_RTL
g_system->getEventManager()->resetQuit();
#endif
#ifdef ENABLE_EVENTRECORDER
#endif
#ifdef ENABLE_EVENTRECORDER
if (g_eventRec.checkForContinueGame()) {
continue;
}
#endif
#endif
// At this point, we usually return to the launcher. However, the
// game may have requested that one or more other games be "chained"

View file

@ -257,7 +257,7 @@ void PluginManagerUncached::init() {
unloadAllPlugins();
_allEnginePlugins.clear();
unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false); // empty the engine plugins
unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false); // empty the engine plugins
for (ProviderList::iterator pp = _providers.begin();
pp != _providers.end();
@ -362,7 +362,7 @@ bool PluginManagerUncached::loadNextPlugin() {
return true;
}
}
return false; // no more in list
return false; // no more in list
}
/**

View file

@ -179,9 +179,9 @@ public:
//unloadPlugin();
}
// virtual bool isLoaded() const = 0; // TODO
virtual bool loadPlugin() = 0; // TODO: Rename to load() ?
virtual void unloadPlugin() = 0; // TODO: Rename to unload() ?
// virtual bool isLoaded() const = 0; // TODO
virtual bool loadPlugin() = 0; // TODO: Rename to load() ?
virtual void unloadPlugin() = 0; // TODO: Rename to unload() ?
/**
* The following functions query information from the plugin object once

View file

@ -23,10 +23,10 @@
#ifndef BASE_VERSION_H
#define BASE_VERSION_H
extern const char *gScummVMVersion; // e.g. "0.4.1"
extern const char *gScummVMBuildDate; // e.g. "2003-06-24"
extern const char *gScummVMVersion; // e.g. "0.4.1"
extern const char *gScummVMBuildDate; // e.g. "2003-06-24"
extern const char *gScummVMVersionDate; // e.g. "0.4.1 (2003-06-24)"
extern const char *gScummVMFullVersion; // e.g. "ScummVM 0.4.1 (2003-06-24)"
extern const char *gScummVMFeatures; // e.g. "ALSA MPEG2 zLib"
extern const char *gScummVMFullVersion; // e.g. "ScummVM 0.4.1 (2003-06-24)"
extern const char *gScummVMFeatures; // e.g. "ALSA MPEG2 zLib"
#endif

View file

@ -267,7 +267,7 @@ SeekableReadStream *SearchSet::createReadStreamForMember(const String &name) con
SearchManager::SearchManager() {
clear(); // Force a reset
clear(); // Force a reset
}
void SearchManager::clear() {

View file

@ -85,7 +85,7 @@ void ConfigManager::loadDefaultConfigFile() {
// Open the default config file
assert(g_system);
SeekableReadStream *stream = g_system->createConfigReadStream();
_filename.clear(); // clear the filename to indicate that we are using the default config file
_filename.clear(); // clear the filename to indicate that we are using the default config file
// ... load it, if available ...
if (stream) {
@ -321,7 +321,7 @@ void ConfigManager::flushToDisk() {
void ConfigManager::writeDomain(WriteStream &stream, const String &name, const Domain &domain) {
if (domain.empty())
return; // Don't bother writing empty domains.
return; // Don't bother writing empty domains.
// WORKAROUND: Fix for bug #1972625 "ALL: On-the-fly targets are
// written to the config file": Do not save domains that came from

View file

@ -171,7 +171,7 @@ public:
DomainMap::iterator beginGameDomains() { return _gameDomains.begin(); }
DomainMap::iterator endGameDomains() { return _gameDomains.end(); }
static void defragment(); // move in memory to reduce fragmentation
static void defragment(); // move in memory to reduce fragmentation
void copyFrom(ConfigManager &source);
private:
@ -185,7 +185,7 @@ private:
Domain _transientDomain;
DomainMap _gameDomains;
DomainMap _miscDomains; // Any other domains
DomainMap _miscDomains; // Any other domains
Domain _appDomain;
Domain _defaultsDomain;

View file

@ -269,7 +269,7 @@ public:
class FSDirectory : public Archive {
FSNode _node;
String _prefix; // string that is prepended to each cache item key
String _prefix; // string that is prepended to each cache item key
void setPrefix(const String &prefix);
// Caches are case insensitive, clashes are dealt with when creating

View file

@ -29,11 +29,10 @@
namespace Common {
uint hashit(const char *str);
uint hashit_lower(const char *str); // Generate a hash based on the lowercase version of the string
uint hashit_lower(const char *str); // Generate a hash based on the lowercase version of the string
inline uint hashit(const String &str) { return hashit(str.c_str()); }
inline uint hashit_lower(const String &str) { return hashit_lower(str.c_str()); }
// FIXME: The following functors obviously are not consistently named
struct CaseSensitiveString_EqualTo {
@ -53,8 +52,6 @@ struct IgnoreCase_Hash {
uint operator()(const String& x) const { return hashit_lower(x.c_str()); }
};
// Specalization of the Hash functor for String objects.
// We do case sensitve hashing here, because that is what
// the default EqualTo is compatible with. If one wants to use
@ -78,9 +75,6 @@ struct Hash<const char *> {
// String map -- by default case insensitive
typedef HashMap<String, String, IgnoreCase_Hash, IgnoreCase_EqualTo> StringMap;
} // End of namespace Common
#endif

View file

@ -95,10 +95,10 @@ void updateHashCollisionStats(int collisions, int dummyHits, int lookups, int ar
g_size / g_totalHashmaps, g_max_size,
g_capacity / g_totalHashmaps, g_max_capacity);
debug(" %d less than %d; %d less than %d; %d less than %d; %d less than %d",
g_stats[0], 2*8/3,
g_stats[1],2*16/3,
g_stats[2],2*32/3,
g_stats[3],2*64/3);
g_stats[0], 2 * 8 / 3,
g_stats[1], 2 * 16 / 3,
g_stats[2], 2 * 32 / 3,
g_stats[3], 2 * 64 / 3);
// TODO:
// * Should record the maximal size of the map during its lifetime, not that at its death

View file

@ -355,7 +355,7 @@ HashMap<Key, Val, HashFunc, EqualFunc>::~HashMap() {
delete[] _storage;
#ifdef DEBUG_HASH_COLLISIONS
extern void updateHashCollisionStats(int, int, int, int, int);
updateHashCollisionStats(_collisions, _dummyHits, _lookups, _mask+1, _size);
updateHashCollisionStats(_collisions, _dummyHits, _lookups, _mask + 1, _size);
#endif
}
@ -369,9 +369,9 @@ HashMap<Key, Val, HashFunc, EqualFunc>::~HashMap() {
template<class Key, class Val, class HashFunc, class EqualFunc>
void HashMap<Key, Val, HashFunc, EqualFunc>::assign(const HM_t &map) {
_mask = map._mask;
_storage = new Node *[_mask+1];
_storage = new Node *[_mask + 1];
assert(_storage != NULL);
memset(_storage, 0, (_mask+1) * sizeof(Node *));
memset(_storage, 0, (_mask + 1) * sizeof(Node *));
// Simply clone the map given to us, one by one.
_size = 0;
@ -418,7 +418,7 @@ void HashMap<Key, Val, HashFunc, EqualFunc>::clear(bool shrinkArray) {
template<class Key, class Val, class HashFunc, class EqualFunc>
void HashMap<Key, Val, HashFunc, EqualFunc>::expandStorage(size_type newCapacity) {
assert(newCapacity > _mask+1);
assert(newCapacity > _mask + 1);
#ifndef NDEBUG
const size_type old_size = _size;
@ -487,7 +487,7 @@ typename HashMap<Key, Val, HashFunc, EqualFunc>::size_type HashMap<Key, Val, Has
_lookups++;
debug("collisions %d, dummies hit %d, lookups %d, ratio %f in HashMap %p; size %d num elements %d",
_collisions, _dummyHits, _lookups, ((double) _collisions / (double)_lookups),
(const void *)this, _mask+1, _size);
(const void *)this, _mask + 1, _size);
#endif
return ctr;
@ -525,7 +525,7 @@ typename HashMap<Key, Val, HashFunc, EqualFunc>::size_type HashMap<Key, Val, Has
_lookups++;
debug("collisions %d, dummies hit %d, lookups %d, ratio %f in HashMap %p; size %d num elements %d",
_collisions, _dummyHits, _lookups, ((double) _collisions / (double)_lookups),
(const void *)this, _mask+1, _size);
(const void *)this, _mask + 1, _size);
#endif
if (!found && first_free != _mask + 1)

View file

@ -170,7 +170,7 @@ public:
const_iterator i2;
const_iterator e2 = list.end();
for (i = begin(), i2 = list.begin(); (i != e) && (i2 != e2) ; ++i, ++i2) {
for (i = begin(), i2 = list.begin(); (i != e) && (i2 != e2); ++i, ++i2) {
static_cast<Node *>(i._node)->_data = static_cast<const Node *>(i2._node)->_data;
}

View file

@ -64,7 +64,7 @@ void MemoryPool::allocPage() {
// Allocate a new page
page.numChunks = _chunksPerPage;
assert(page.numChunks * _chunkSize < 16*1024*1024); // Refuse to allocate pages bigger than 16 MB
assert(page.numChunks * _chunkSize < 16*1024*1024); // Refuse to allocate pages bigger than 16 MB
page.start = ::malloc(page.numChunks * _chunkSize);
assert(page.start);

View file

@ -289,8 +289,8 @@ public:
return dataSize;
}
int32 pos() const { return _pos - _length; } //'read' position in the stream
int32 size() const { return _size; } //that's also 'write' position in the stream, as it's append-only
int32 pos() const { return _pos - _length; } // 'read' position in the stream
int32 size() const { return _size; } // that's also 'write' position in the stream, as it's append-only
bool seek(int32, int) { return false; }
bool eos() const { return _eos; }
void clearErr() { _eos = false; }

View file

@ -335,7 +335,7 @@ RecorderEvent PlaybackFile::getNextEvent() {
case kScreenShotTag:
_readStream->seek(-4, SEEK_CUR);
header.len = _readStream->readUint32BE();
_readStream->skip(header.len-8);
_readStream->skip(header.len - 8);
break;
case kMD5Tag:
checkRecordedMD5();
@ -575,7 +575,7 @@ int PlaybackFile::getScreensCount() {
int result = 0;
while (skipToNextScreenshot()) {
uint32 size = _readStream->readUint32BE();
_readStream->skip(size-8);
_readStream->skip(size - 8);
++result;
}
return result;
@ -612,7 +612,7 @@ Graphics::Surface *PlaybackFile::getScreenShot(int number) {
return Graphics::loadThumbnail(*_readStream, thumbnail) ? thumbnail : NULL;
} else {
uint32 size = _readStream->readUint32BE();
_readStream->skip(size-8);
_readStream->skip(size - 8);
screenCount++;
}
}

View file

@ -40,10 +40,10 @@ struct Point {
Point() : x(0), y(0) {}
Point(int16 x1, int16 y1) : x(x1), y(y1) {}
bool operator==(const Point &p) const { return x == p.x && y == p.y; }
bool operator!=(const Point &p) const { return x != p.x || y != p.y; }
Point operator+(const Point &delta) const { return Point(x + delta.x, y + delta.y); }
Point operator-(const Point &delta) const { return Point(x - delta.x, y - delta.y); }
bool operator==(const Point &p) const { return x == p.x && y == p.y; }
bool operator!=(const Point &p) const { return x != p.x || y != p.y; }
Point operator+(const Point &delta) const { return Point(x + delta.x, y + delta.y); }
Point operator-(const Point &delta) const { return Point(x - delta.x, y - delta.y); }
void operator+=(const Point &delta) {
x += delta.x;

View file

@ -34,7 +34,7 @@ namespace Common {
template<typename T> \
void syncAs ## SUFFIX(T &val, Version minVersion = 0, Version maxVersion = kLastVersion) { \
if (_version < minVersion || _version > maxVersion) \
return; \
return; \
if (_loadStream) \
val = static_cast<T>(_loadStream->read ## SUFFIX()); \
else { \
@ -178,7 +178,7 @@ public:
*/
void skip(uint32 size, Version minVersion = 0, Version maxVersion = kLastVersion) {
if (_version < minVersion || _version > maxVersion)
return; // Ignore anything which is not supposed to be present in this save game version
return; // Ignore anything which is not supposed to be present in this save game version
_bytesSynced += size;
if (isLoading())
@ -194,7 +194,7 @@ public:
*/
void syncBytes(byte *buf, uint32 size, Version minVersion = 0, Version maxVersion = kLastVersion) {
if (_version < minVersion || _version > maxVersion)
return; // Ignore anything which is not supposed to be present in this save game version
return; // Ignore anything which is not supposed to be present in this save game version
if (isLoading())
_loadStream->read(buf, size);
@ -217,7 +217,7 @@ public:
*/
bool matchBytes(const char *magic, byte size, Version minVersion = 0, Version maxVersion = kLastVersion) {
if (_version < minVersion || _version > maxVersion)
return true; // Ignore anything which is not supposed to be present in this save game version
return true; // Ignore anything which is not supposed to be present in this save game version
bool match;
if (isSaving()) {
@ -238,7 +238,7 @@ public:
*/
void syncString(String &str, Version minVersion = 0, Version maxVersion = kLastVersion) {
if (_version < minVersion || _version > maxVersion)
return; // Ignore anything which is not supposed to be present in this save game version
return; // Ignore anything which is not supposed to be present in this save game version
if (isLoading()) {
char c;

View file

@ -63,7 +63,7 @@ void String::initWithCStr(const char *str, uint32 len) {
if (len >= _builtinCapacity) {
// Not enough internal storage, so allocate more
_extern._capacity = computeCapacity(len+1);
_extern._capacity = computeCapacity(len + 1);
_extern._refCount = 0;
_str = new char[_extern._capacity];
assert(_str != 0);
@ -593,7 +593,7 @@ String String::vformat(const char *fmt, va_list args) {
// vsnprintf didn't have enough space, so grow buffer
output.ensureCapacity(len, false);
scumm_va_copy(va, args);
int len2 = vsnprintf(output._str, len+1, fmt, va);
int len2 = vsnprintf(output._str, len + 1, fmt, va);
va_end(va);
assert(len == len2);
output._size = len2;
@ -741,7 +741,7 @@ String lastPathComponent(const String &path, const char sep) {
const char *last = str + path.size();
// Skip over trailing slashes
while (last > str && *(last-1) == sep)
while (last > str && *(last - 1) == sep)
--last;
// Path consisted of only slashes -> return empty string
@ -1010,7 +1010,7 @@ int scumm_strnicmp(const char *s1, const char *s2, uint n) {
byte l1, l2;
do {
if (n-- == 0)
return 0; // no difference found so far -> signal equality
return 0; // no difference found so far -> signal equality
// Don't use ++ inside tolower, in case the macro uses its
// arguments more than once.

View file

@ -285,7 +285,7 @@ public:
* except that it stores the result in (variably sized) String
* instead of a fixed size buffer.
*/
static String format(const char *fmt, ...) GCC_PRINTF(1,2);
static String format(const char *fmt, ...) GCC_PRINTF(1, 2);
/**
* Print formatted data into a String object. Similar to vsprintf,

View file

@ -99,7 +99,7 @@ bool MemoryReadStream::seek(int32 offs, int whence) {
// Reset end-of-stream flag on a successful seek
_eos = false;
return true; // FIXME: STREAM REWRITE
return true; // FIXME: STREAM REWRITE
}
bool MemoryWriteStreamDynamic::seek(int32 offs, int whence) {
@ -124,7 +124,7 @@ bool MemoryWriteStreamDynamic::seek(int32 offs, int whence) {
// Post-Condition
assert(_pos <= _size);
return true; // FIXME: STREAM REWRITE
return true; // FIXME: STREAM REWRITE
}
#pragma mark -
@ -413,7 +413,7 @@ BufferedSeekableReadStream::BufferedSeekableReadStream(SeekableReadStream *paren
bool BufferedSeekableReadStream::seek(int32 offset, int whence) {
// If it is a "local" seek, we may get away with "seeking" around
// in the buffer only.
_eos = false; // seeking always cancels EOS
_eos = false; // seeking always cancels EOS
int relOffset = 0;
switch (whence) {

View file

@ -47,7 +47,7 @@ int UpdateManager::normalizeInterval(int interval) {
val++;
}
return val[-1]; // Return maximal acceptable value
return val[-1]; // Return maximal acceptable value
}
const char *UpdateManager::updateIntervalToString(int interval) {

View file

@ -50,7 +50,7 @@ public:
kUpdateIntervalNotSupported = 0,
kUpdateIntervalOneDay = 86400,
kUpdateIntervalOneWeek = 604800,
kUpdateIntervalOneMonth = 2628000 // average seconds per month (60*60*24*365)/12
kUpdateIntervalOneMonth = 2628000 // average seconds per month (60*60*24*365)/12
};
UpdateManager() {}

View file

@ -239,7 +239,7 @@ void U32String::ensureCapacity(uint32 new_size, bool keep_old) {
if (new_size < curCapacity)
newCapacity = curCapacity;
else
newCapacity = MAX(curCapacity * 2, computeCapacity(new_size+1));
newCapacity = MAX(curCapacity * 2, computeCapacity(new_size + 1));
// Allocate new storage
newStorage = new value_type[newCapacity];
@ -316,7 +316,7 @@ void U32String::initWithCStr(const value_type *str, uint32 len) {
if (len >= _builtinCapacity) {
// Not enough internal storage, so allocate more
_extern._capacity = computeCapacity(len+1);
_extern._capacity = computeCapacity(len + 1);
_extern._refCount = 0;
_str = new value_type[_extern._capacity];
assert(_str != 0);

View file

@ -373,7 +373,7 @@ bool XMLParser::parse() {
break;
}
} else {
ParserNode *node = allocNode(); //new ParserNode;
ParserNode *node = allocNode(); // new ParserNode;
node->name = _token;
node->ignore = false;
node->header = activeHeader;

View file

@ -281,7 +281,7 @@ public:
_wrapped->seek(0, SEEK_SET);
_zlibErr = inflateReset(&_stream);
if (_zlibErr != Z_OK)
return false; // FIXME: STREAM REWRITE
return false; // FIXME: STREAM REWRITE
_stream.next_in = _buf;
_stream.avail_in = 0;
}
@ -297,7 +297,7 @@ public:
}
_eos = false;
return true; // FIXME: STREAM REWRITE
return true; // FIXME: STREAM REWRITE
}
};

View file

@ -437,7 +437,7 @@ public:
void drawCallback_ALPHABITMAP(const Common::Rect &area, const DrawStep &step, const Common::Rect &clip) {
uint16 x, y, w, h;
stepGetPositions(step, area, x, y, w, h);
blitAlphaBitmap(step.blitAlphaSrc, Common::Rect(x, y, x + w, y + h), step.autoscale, step.xAlign, step.yAlign); //TODO
blitAlphaBitmap(step.blitAlphaSrc, Common::Rect(x, y, x + w, y + h), step.autoscale, step.xAlign, step.yAlign); // TODO
}
void drawCallback_CROSS(const Common::Rect &area, const DrawStep &step, const Common::Rect &clip) {

View file

@ -419,7 +419,7 @@ inline frac_t fp_sqroot(uint32 x) {
x--; px -= pitch; \
} \
a2 = (T >> 8); \
a1 = ~a2; \
a1 = ~a2; \
} while (0)
@ -2680,7 +2680,7 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
int gradient = (dx << 8) / (dy + 0x100);
int interx = (x1 << 8) + gradient;
#else
double gradient = dx / (dy+1);
double gradient = dx / (dy + 1);
double interx = x1 + gradient;
#endif
@ -2846,7 +2846,7 @@ drawTriangleVertAlgClip(int x1, int y1, int w, int h, bool inverted, PixelType c
break;
case kFillForeground:
case kFillBackground:
colorFillClip<PixelType>(ptr_right + 1, ptr_left, color, x_right+1, y_right, _clippingArea);
colorFillClip<PixelType>(ptr_right + 1, ptr_left, color, x_right + 1, y_right, _clippingArea);
blendPixelPtrClip(ptr_right, color, rfpart(intery), x_right, y_right);
blendPixelPtrClip(ptr_left, color, rfpart(intery), x_left, y_left);
break;
@ -2905,7 +2905,7 @@ drawTriangleVertAlgClip(int x1, int y1, int w, int h, bool inverted, PixelType c
break;
case kFillForeground:
case kFillBackground:
colorFillClip<PixelType>(ptr_right + 1, ptr_left, color, x_right+1, y_right, _clippingArea);
colorFillClip<PixelType>(ptr_right + 1, ptr_left, color, x_right + 1, y_right, _clippingArea);
blendPixelPtrClip(ptr_right, color, rfpart(interx), x_right, y_right);
blendPixelPtrClip(ptr_left, color, rfpart(interx), x_left, y_left);
break;
@ -2953,7 +2953,7 @@ drawTriangleVertAlgClip(int x1, int y1, int w, int h, bool inverted, PixelType c
break;
case kFillForeground:
case kFillBackground:
colorFillClip<PixelType>(ptr_right + 1, ptr_left, color, x_right+1, y_right, _clippingArea);
colorFillClip<PixelType>(ptr_right + 1, ptr_left, color, x_right + 1, y_right, _clippingArea);
blendPixelPtrClip(ptr_right, color, rfpart(interx), x_right, y_right);
blendPixelPtrClip(ptr_left, color, rfpart(interx), x_left, y_left);
break;
@ -3061,10 +3061,10 @@ drawBorderRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color,
BE_RESET();
r--;
int alphaStep_tr = ((alpha_t - alpha_r)/(y+1));
int alphaStep_br = ((alpha_r - alpha_b)/(y+1));
int alphaStep_bl = ((alpha_b - alpha_l)/(y+1));
int alphaStep_tl = ((alpha_l - alpha_t)/(y+1));
int alphaStep_tr = ((alpha_t - alpha_r) / (y + 1));
int alphaStep_br = ((alpha_r - alpha_b) / (y + 1));
int alphaStep_bl = ((alpha_b - alpha_l) / (y + 1));
int alphaStep_tl = ((alpha_l - alpha_t) / (y + 1));
// Avoid blending the last pixels twice, since we have an alpha
while (x++ < (y - 2)) {
@ -3970,10 +3970,10 @@ drawBorderRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color,
px = pitch * x;
py = 0;
int alphaStep_tr = ((alpha_t - alpha_r)/(x+1));
int alphaStep_br = ((alpha_r - alpha_b)/(x+1));
int alphaStep_bl = ((alpha_b - alpha_l)/(x+1));
int alphaStep_tl = ((alpha_l - alpha_t)/(x+1));
int alphaStep_tr = ((alpha_t - alpha_r) / (x + 1));
int alphaStep_br = ((alpha_r - alpha_b) / (x + 1));
int alphaStep_bl = ((alpha_b - alpha_l) / (x + 1));
int alphaStep_tl = ((alpha_l - alpha_t) / (x + 1));
while (x > y++) {
WU_ALGORITHM();

View file

@ -85,9 +85,9 @@ private:
};
#define DEFINE_FONT(n) \
const BdfFont *n = 0; \
const BdfFont *n = 0; \
void create_##n() { \
n = new BdfFont(desc, DisposeAfterUse::NO); \
n = new BdfFont(desc, DisposeAfterUse::NO); \
}
#define FORWARD_DECLARE_FONT(n) \

View file

@ -156,7 +156,7 @@ NinePatchBitmap::NinePatchBitmap(Graphics::TransparentSurface *bmp, bool owns_bi
bmp->format.colorToARGB(*(uint32 *)bmp->getBasePtr(x, y), a, r, g, b); \
if (a != 0 && r + g + b + a != 4) goto bad_bitmap;
_check_pixel(0,0);
_check_pixel(0, 0);
_check_pixel(bmp->w - 1, 0);
_check_pixel(0, bmp->h - 1);
_check_pixel(bmp->w - 1, bmp->h - 1);

View file

@ -262,13 +262,13 @@ void drawRoundRect(Common::Rect &rect, int arc, int color, bool filled, void (*p
do {
if (filled) {
drawHLine(rect.left+x+r, rect.right-x-r, rect.top-y+r-stop, color, plotProc, data);
drawHLine(rect.left+x+r, rect.right-x-r, rect.bottom+y-r+stop, color, plotProc, data);
drawHLine(rect.left + x + r, rect.right - x - r, rect.top - y + r - stop, color, plotProc, data);
drawHLine(rect.left + x + r, rect.right - x - r, rect.bottom + y - r + stop, color, plotProc, data);
} else {
(*plotProc)(rect.left+x+r, rect.top-y+r-stop, color, data);
(*plotProc)(rect.right-x-r, rect.top-y+r-stop, color, data);
(*plotProc)(rect.left+x+r, rect.bottom+y-r+stop, color, data);
(*plotProc)(rect.right-x-r, rect.bottom+y-r+stop, color, data);
(*plotProc)(rect.left + x + r, rect.top - y + r - stop, color, data);
(*plotProc)(rect.right - x - r, rect.top - y + r - stop, color, data);
(*plotProc)(rect.left + x + r, rect.bottom + y - r + stop, color, data);
(*plotProc)(rect.right - x - r, rect.bottom + y - r + stop, color, data);
lastx = x;
lasty = y;
@ -284,15 +284,15 @@ void drawRoundRect(Common::Rect &rect, int arc, int color, bool filled, void (*p
x = lastx;
y = lasty;
drawHLine(rect.left+x+r, rect.right-x-r, rect.top-y+r-stop, color, plotProc, data);
drawHLine(rect.left+x+r, rect.right-x-r, rect.bottom+y-r+stop, color, plotProc, data);
drawHLine(rect.left + x + r, rect.right - x - r, rect.top - y + r - stop, color, plotProc, data);
drawHLine(rect.left + x + r, rect.right - x - r, rect.bottom + y - r + stop, color, plotProc, data);
}
for (int i = 0; i < dy; i++) {
if (filled) {
drawHLine(rect.left, rect.right, rect.top + r + i, color, plotProc, data);
} else {
(*plotProc)(rect.left, rect.top + r + i, color, data);
(*plotProc)(rect.left, rect.top + r + i, color, data);
(*plotProc)(rect.right, rect.top + r + i, color, data);
}
}
@ -307,13 +307,13 @@ void drawRoundRect(Common::Rect &rect, int arc, int color, bool filled, void (*p
do {
if (filled) {
drawVLine(rect.left-x+r-stop, rect.top+y+r, rect.bottom-y-r, color, plotProc, data);
drawVLine(rect.right+x-r+stop, rect.top+y+r, rect.bottom-y-r, color, plotProc, data);
drawVLine(rect.left - x + r - stop, rect.top + y + r, rect.bottom - y - r, color, plotProc, data);
drawVLine(rect.right + x - r + stop, rect.top + y + r, rect.bottom - y - r, color, plotProc, data);
} else {
(*plotProc)(rect.left-x+r-stop, rect.top+y+r, color, data);
(*plotProc)(rect.left-x+r-stop, rect.bottom-y-r, color, data);
(*plotProc)(rect.right+x-r+stop, rect.top+y+r, color, data);
(*plotProc)(rect.right+x-r+stop, rect.bottom-y-r, color, data);
(*plotProc)(rect.left - x + r - stop, rect.top + y + r, color, data);
(*plotProc)(rect.left - x + r - stop, rect.bottom - y - r, color, data);
(*plotProc)(rect.right + x - r + stop, rect.top + y + r, color, data);
(*plotProc)(rect.right + x - r + stop, rect.bottom - y - r, color, data);
lastx = x;
lasty = y;
@ -329,15 +329,15 @@ void drawRoundRect(Common::Rect &rect, int arc, int color, bool filled, void (*p
if (!filled) {
x = lastx;
y = lasty;
drawVLine(rect.left-x+r-stop, rect.top+y+r, rect.bottom-y-r, color, plotProc, data);
drawVLine(rect.right+x-r+stop, rect.top+y+r, rect.bottom-y-r, color, plotProc, data);
drawVLine(rect.left - x + r - stop, rect.top + y + r, rect.bottom - y - r, color, plotProc, data);
drawVLine(rect.right + x - r + stop, rect.top + y + r, rect.bottom - y - r, color, plotProc, data);
}
for (int i = 0; i < dx; i++) {
if (filled) {
drawVLine(rect.left + r + i, rect.top, rect.bottom, color, plotProc, data);
} else {
(*plotProc)(rect.left + r + i, rect.top, color, data);
(*plotProc)(rect.left + r + i, rect.top, color, data);
(*plotProc)(rect.left + r + i, rect.bottom, color, data);
}
}
@ -385,14 +385,14 @@ void drawPolygonScan(int *polyX, int *polyY, int npoints, Common::Rect &bbox, in
// http://members.chello.at/easyfilter/bresenham.html
void drawEllipse(int x0, int y0, int x1, int y1, int color, bool filled, void (*plotProc)(int, int, int, void *), void *data) {
int a = abs(x1-x0), b = abs(y1-y0), b1 = b&1; /* values of diameter */
long dx = 4*(1-a)*b*b, dy = 4*(b1+1)*a*a; /* error increment */
long err = dx+dy+b1*a*a, e2; /* error of 1.step */
int a = abs(x1 - x0), b = abs(y1 - y0), b1 = b & 1; /* values of diameter */
long dx = 4 * (1 - a) * b * b, dy = 4 * (b1 + 1) * a * a; /* error increment */
long err = dx + dy + b1 * a * a, e2; /* error of 1.step */
if (x0 > x1) { x0 = x1; x1 += a; } /* if called with swapped points */
if (y0 > y1) y0 = y1; /* .. exchange them */
y0 += (b+1)/2; y1 = y0-b1; /* starting pixel */
a *= 8*a; b1 = 8*b*b;
y0 += (b + 1) / 2; y1 = y0 - b1; /* starting pixel */
a *= 8 * a; b1 = 8 * b * b;
do {
if (filled) {
@ -411,15 +411,15 @@ void drawEllipse(int x0, int y0, int x1, int y1, int color, bool filled, void (*
while (y0-y1 < b) { /* too early stop of flat ellipses a=1 */
if (filled) {
drawHLine(x0-1, x0-1, y0, color, plotProc, data); /* -> finish tip of ellipse */
drawHLine(x1+1, x1+1, y0, color, plotProc, data);
drawHLine(x0-1, x0-1, y1, color, plotProc, data);
drawHLine(x1+1, x1+1, y1, color, plotProc, data);
drawHLine(x0 - 1, x0 - 1, y0, color, plotProc, data); /* -> finish tip of ellipse */
drawHLine(x1 + 1, x1 + 1, y0, color, plotProc, data);
drawHLine(x0 - 1, x0 - 1, y1, color, plotProc, data);
drawHLine(x1 + 1, x1 + 1, y1, color, plotProc, data);
} else {
(*plotProc)(x0-1, y0, color, data); /* -> finish tip of ellipse */
(*plotProc)(x1+1, y0, color, data);
(*plotProc)(x0-1, y1, color, data);
(*plotProc)(x1+1, y1, color, data);
(*plotProc)(x0 - 1, y0, color, data); /* -> finish tip of ellipse */
(*plotProc)(x1 + 1, y0, color, data);
(*plotProc)(x0 - 1, y1, color, data);
(*plotProc)(x1 + 1, y1, color, data);
}
y0++;
y1--;

View file

@ -107,12 +107,12 @@ void InitLUT(Graphics::PixelFormat format) {
hqx_low2bits = (3 << format.rShift) | (3 << format.gShift) | (3 << format.bShift),
hqx_low3bits = (7 << format.rShift) | (7 << format.gShift) | (7 << format.bShift),
hqx_highbits = format.RGBToColor(255,255,255) ^ hqx_lowbits;
hqx_highbits = format.RGBToColor(255, 255, 255) ^ hqx_lowbits;
// FIXME: The following code only does the right thing
// if the color order is RGB or BGR, i.e., green is in the middle.
hqx_greenMask = format.RGBToColor(0,255,0);
hqx_redBlueMask = format.RGBToColor(255,0,255);
hqx_greenMask = format.RGBToColor( 0, 255, 0);
hqx_redBlueMask = format.RGBToColor(255, 0, 255);
hqx_green_redBlue_Mask = (hqx_greenMask << 16) | hqx_redBlueMask;
#endif
@ -145,10 +145,10 @@ void InitScalers(uint32 BitFormat) {
#endif
// Build dotmatrix lookup table for the DotMatrix scaler.
g_dotmatrix[0] = g_dotmatrix[10] = format.RGBToColor(0, 63, 0);
g_dotmatrix[1] = g_dotmatrix[11] = format.RGBToColor(0, 0, 63);
g_dotmatrix[2] = g_dotmatrix[8] = format.RGBToColor(63, 0, 0);
g_dotmatrix[4] = g_dotmatrix[6] =
g_dotmatrix[0] = g_dotmatrix[10] = format.RGBToColor( 0, 63, 0);
g_dotmatrix[1] = g_dotmatrix[11] = format.RGBToColor( 0, 0, 63);
g_dotmatrix[2] = g_dotmatrix[ 8] = format.RGBToColor(63, 0, 0);
g_dotmatrix[4] = g_dotmatrix[ 6] =
g_dotmatrix[12] = g_dotmatrix[14] = format.RGBToColor(63, 63, 63);
}

View file

@ -195,18 +195,18 @@ static inline bool diffYUV(int yuv1, int yuv2) {
int mask;
diff = ((yuv1 & Umask) - (yuv2 & Umask));
mask = diff >> 31; // -1 if value < 0, 0 otherwise
diff = (diff ^ mask) - mask; //-1: ~value + 1; 0: value
mask = diff >> 31; // -1 if value < 0, 0 otherwise
diff = (diff ^ mask) - mask; // -1: ~value + 1; 0: value
if (diff > trU) return true;
diff = ((yuv1 & Vmask) - (yuv2 & Vmask));
mask = diff >> 31; // -1 if value < 0, 0 otherwise
diff = (diff ^ mask) - mask; //-1: ~value + 1; 0: value
mask = diff >> 31; // -1 if value < 0, 0 otherwise
diff = (diff ^ mask) - mask; // -1: ~value + 1; 0: value
if (diff > trV) return true;
diff = ((yuv1 & Ymask) - (yuv2 & Ymask));
mask = diff >> 31; // -1 if value < 0, 0 otherwise
diff = (diff ^ mask) - mask; //-1: ~value + 1; 0: value
mask = diff >> 31; // -1 if value < 0, 0 otherwise
diff = (diff ^ mask) - mask; // -1: ~value + 1; 0: value
if (diff > trY) return true;
return false;

View file

@ -47,17 +47,17 @@
static inline void stage_scale2x(void* dst0, void* dst1, const void* src0, const void* src1, const void* src2, unsigned pixel, unsigned pixel_per_row) {
switch (pixel) {
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
case 1 : scale2x_8_mmx(DST(8,0), DST(8,1), SRC(8,0), SRC(8,1), SRC(8,2), pixel_per_row); break;
case 2 : scale2x_16_mmx(DST(16,0), DST(16,1), SRC(16,0), SRC(16,1), SRC(16,2), pixel_per_row); break;
case 4 : scale2x_32_mmx(DST(32,0), DST(32,1), SRC(32,0), SRC(32,1), SRC(32,2), pixel_per_row); break;
case 1: scale2x_8_mmx( DST( 8,0), DST( 8,1), SRC( 8,0), SRC( 8,1), SRC( 8,2), pixel_per_row); break;
case 2: scale2x_16_mmx(DST(16,0), DST(16,1), SRC(16,0), SRC(16,1), SRC(16,2), pixel_per_row); break;
case 4: scale2x_32_mmx(DST(32,0), DST(32,1), SRC(32,0), SRC(32,1), SRC(32,2), pixel_per_row); break;
#elif defined(USE_ARM_SCALER_ASM)
case 1 : scale2x_8_arm(DST(8,0), DST(8,1), SRC(8,0), SRC(8,1), SRC(8,2), pixel_per_row); break;
case 2 : scale2x_16_arm(DST(16,0), DST(16,1), SRC(16,0), SRC(16,1), SRC(16,2), pixel_per_row); break;
case 4 : scale2x_32_arm(DST(32,0), DST(32,1), SRC(32,0), SRC(32,1), SRC(32,2), pixel_per_row); break;
case 1: scale2x_8_arm( DST( 8,0), DST( 8,1), SRC( 8,0), SRC( 8,1), SRC( 8,2), pixel_per_row); break;
case 2: scale2x_16_arm(DST(16,0), DST(16,1), SRC(16,0), SRC(16,1), SRC(16,2), pixel_per_row); break;
case 4: scale2x_32_arm(DST(32,0), DST(32,1), SRC(32,0), SRC(32,1), SRC(32,2), pixel_per_row); break;
#else
case 1 : scale2x_8_def(DST(8,0), DST(8,1), SRC(8,0), SRC(8,1), SRC(8,2), pixel_per_row); break;
case 2 : scale2x_16_def(DST(16,0), DST(16,1), SRC(16,0), SRC(16,1), SRC(16,2), pixel_per_row); break;
case 4 : scale2x_32_def(DST(32,0), DST(32,1), SRC(32,0), SRC(32,1), SRC(32,2), pixel_per_row); break;
case 1: scale2x_8_def( DST( 8,0), DST( 8,1), SRC( 8,0), SRC( 8,1), SRC( 8,2), pixel_per_row); break;
case 2: scale2x_16_def(DST(16,0), DST(16,1), SRC(16,0), SRC(16,1), SRC(16,2), pixel_per_row); break;
case 4: scale2x_32_def(DST(32,0), DST(32,1), SRC(32,0), SRC(32,1), SRC(32,2), pixel_per_row); break;
#endif
}
}
@ -67,9 +67,9 @@ static inline void stage_scale2x(void* dst0, void* dst1, const void* src0, const
*/
static inline void stage_scale3x(void* dst0, void* dst1, void* dst2, const void* src0, const void* src1, const void* src2, unsigned pixel, unsigned pixel_per_row) {
switch (pixel) {
case 1 : scale3x_8_def(DST(8,0), DST(8,1), DST(8,2), SRC(8,0), SRC(8,1), SRC(8,2), pixel_per_row); break;
case 2 : scale3x_16_def(DST(16,0), DST(16,1), DST(16,2), SRC(16,0), SRC(16,1), SRC(16,2), pixel_per_row); break;
case 4 : scale3x_32_def(DST(32,0), DST(32,1), DST(32,2), SRC(32,0), SRC(32,1), SRC(32,2), pixel_per_row); break;
case 1: scale3x_8_def( DST( 8,0), DST( 8,1), DST( 8,2), SRC( 8,0), SRC( 8,1), SRC( 8,2), pixel_per_row); break;
case 2: scale3x_16_def(DST(16,0), DST(16,1), DST(16,2), SRC(16,0), SRC(16,1), SRC(16,2), pixel_per_row); break;
case 4: scale3x_32_def(DST(32,0), DST(32,1), DST(32,2), SRC(32,0), SRC(32,1), SRC(32,2), pixel_per_row); break;
}
}
@ -281,12 +281,12 @@ int scale_precondition(unsigned scale, unsigned pixel, unsigned width, unsigned
return -1;
switch (scale) {
case 2 :
case 3 :
case 2:
case 3:
if (height < 2)
return -1;
break;
case 4 :
case 4:
if (height < 4)
return -1;
break;
@ -294,14 +294,14 @@ int scale_precondition(unsigned scale, unsigned pixel, unsigned width, unsigned
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
switch (scale) {
case 2 :
case 4 :
case 2:
case 4:
if (width < (16 / pixel))
return -1;
if (width % (8 / pixel) != 0)
return -1;
break;
case 3 :
case 3:
if (width < 2)
return -1;
break;
@ -329,13 +329,13 @@ int scale_precondition(unsigned scale, unsigned pixel, unsigned width, unsigned
void scale(unsigned scale, void* void_dst, unsigned dst_slice, const void* void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height)
{
switch (scale) {
case 2 :
case 2:
scale2x(void_dst, dst_slice, void_src, src_slice, pixel, width, height);
break;
case 3 :
case 3:
scale3x(void_dst, dst_slice, void_src, src_slice, pixel, width, height);
break;
case 4 :
case 4:
scale4x(void_dst, dst_slice, void_src, src_slice, pixel, width, height);
break;
}

View file

@ -334,16 +334,16 @@ const uint8 *FontTowns::getCharData(uint16 ch) const {
if (f >= 0xe0 && f <= 0xea) kanjiType = EKANJI;
if ((f > 0xe8 || (f == 0xe8 && base >= 0x9f)) || (f > 0x90 || (f == 0x90 && base >= 0x9f))) {
c = 48; //correction
p = -8; //correction
c = 48; // correction
p = -8; // correction
}
if (kanjiType == KANA) {//Kana
if (kanjiType == KANA) {
chunk_f = (f - 0x81) * 2;
} else if (kanjiType == KANJI) {//Standard Kanji
} else if (kanjiType == KANJI) { // Standard Kanji
p += f - 0x88;
chunk_f = c + 2 * p;
} else if (kanjiType == EKANJI) {//Enhanced Kanji
} else if (kanjiType == EKANJI) { // Enhanced Kanji
p += f - 0xe0;
chunk_f = c + 2 * p;
}
@ -360,37 +360,37 @@ const uint8 *FontTowns::getCharData(uint16 ch) const {
switch (base) {
case 0x3f:
cr = 0; //3f
cr = 0; // 3f
if (kanjiType == KANA) chunk = 1;
else if (kanjiType == KANJI) chunk = 31;
else if (kanjiType == EKANJI) chunk = 111;
break;
case 0x5f:
cr = 0; //5f
cr = 0; // 5f
if (kanjiType == KANA) chunk = 17;
else if (kanjiType == KANJI) chunk = 47;
else if (kanjiType == EKANJI) chunk = 127;
break;
case 0x7f:
cr = -1; //80
cr = -1; // 80
if (kanjiType == KANA) chunk = 9;
else if (kanjiType == KANJI) chunk = 63;
else if (kanjiType == EKANJI) chunk = 143;
break;
case 0x9f:
cr = 1; //9e
cr = 1; // 9e
if (kanjiType == KANA) chunk = 2;
else if (kanjiType == KANJI) chunk = 32;
else if (kanjiType == EKANJI) chunk = 112;
break;
case 0xbf:
cr = 1; //be
cr = 1; // be
if (kanjiType == KANA) chunk = 18;
else if (kanjiType == KANJI) chunk = 48;
else if (kanjiType == EKANJI) chunk = 128;
break;
case 0xdf:
cr = 1; //de
cr = 1; // de
if (kanjiType == KANA) chunk = 10;
else if (kanjiType == KANJI) chunk = 64;
else if (kanjiType == EKANJI) chunk = 144;