diff --git a/engines/ultima/ultima8/audio/audio_process.cpp b/engines/ultima/ultima8/audio/audio_process.cpp index d13f57b443e..c84d94e1184 100644 --- a/engines/ultima/ultima8/audio/audio_process.cpp +++ b/engines/ultima/ultima8/audio/audio_process.cpp @@ -44,7 +44,7 @@ DEFINE_RUNTIME_CLASSTYPE_CODE(AudioProcess, Process) AudioProcess *AudioProcess::_theAudioProcess = 0; -AudioProcess::AudioProcess(void) : paused(0) { +AudioProcess::AudioProcess(void) : _paused(0) { _theAudioProcess = this; _type = 1; // persistent } @@ -402,8 +402,8 @@ bool AudioProcess::isSpeechPlaying(Std::string &barked, int shapeNum) { } void AudioProcess::pauseAllSamples() { - paused++; - if (paused != 1) return; + _paused++; + if (_paused != 1) return; AudioMixer *mixer = AudioMixer::get_instance(); @@ -421,8 +421,8 @@ void AudioProcess::pauseAllSamples() { } void AudioProcess::unpauseAllSamples() { - paused--; - if (paused != 0) return; + _paused--; + if (_paused != 0) return; AudioMixer *mixer = AudioMixer::get_instance(); diff --git a/engines/ultima/ultima8/audio/audio_process.h b/engines/ultima/ultima8/audio/audio_process.h index 7923d07b5e7..78b08ec9f77 100644 --- a/engines/ultima/ultima8/audio/audio_process.h +++ b/engines/ultima/ultima8/audio/audio_process.h @@ -120,7 +120,7 @@ public: private: void saveData(ODataSource *ods) override; - uint32 paused; + uint32 _paused; //! play the next speech sample for the text in this SampleInfo //! note: si is reused if successful diff --git a/engines/ultima/ultima8/convert/u8/convert_usecode_u8.h b/engines/ultima/ultima8/convert/u8/convert_usecode_u8.h index 9d5a4bdf1fe..4080da16cf3 100644 --- a/engines/ultima/ultima8/convert/u8/convert_usecode_u8.h +++ b/engines/ultima/ultima8/convert/u8/convert_usecode_u8.h @@ -41,7 +41,7 @@ public: uint32 _maxOffset; }; uint32 read4(IDataSource *) { return 0; } - uint32 curOffset; + uint32 _curOffset; virtual const char* const *intrinsics()=0; virtual const char* const *event_names()=0; diff --git a/engines/ultima/ultima8/filesys/file_system.cpp b/engines/ultima/ultima8/filesys/file_system.cpp index 9b4ef9684a3..29674a9110a 100644 --- a/engines/ultima/ultima8/filesys/file_system.cpp +++ b/engines/ultima/ultima8/filesys/file_system.cpp @@ -257,9 +257,9 @@ bool FileSystem::RemoveVirtualPath(const string &vpath) { IDataSource *FileSystem::checkBuiltinData(const Std::string &vfn, bool is_text) { // Is it a Memory file? - Std::map::iterator mf = memoryfiles.find(vfn); + Std::map::iterator mf = _memoryFiles.find(vfn); - if (mf != memoryfiles.end()) + if (mf != _memoryFiles.end()) return new IBufferDataSource(mf->_value->_data, mf->_value->_len, is_text); diff --git a/engines/ultima/ultima8/filesys/file_system.h b/engines/ultima/ultima8/filesys/file_system.h index 2b020322f45..39a8d1b1c94 100644 --- a/engines/ultima/ultima8/filesys/file_system.h +++ b/engines/ultima/ultima8/filesys/file_system.h @@ -120,7 +120,7 @@ private: const uint8 *_data; const uint32 _len; }; - Std::map memoryfiles; // Files mounted in memory + Std::map _memoryFiles; // Files mounted in memory }; } // End of namespace Ultima8 diff --git a/engines/ultima/ultima8/gumps/bark_gump.cpp b/engines/ultima/ultima8/gumps/bark_gump.cpp index d673101b3f5..b80c40d3726 100644 --- a/engines/ultima/ultima8/gumps/bark_gump.cpp +++ b/engines/ultima/ultima8/gumps/bark_gump.cpp @@ -45,7 +45,7 @@ BarkGump::BarkGump(uint16 owner, const Std::string &msg, uint32 speechShapeNum) ItemRelativeGump(0, 0, 100, 100, owner, FLAG_KEEP_VISIBLE, LAYER_ABOVE_NORMAL), _barked(msg), _counter(100), _speechShapeNum(speechShapeNum), _speechLength(0), _totalTextHeight(0), _textWidget(0) { - SettingManager::get_instance()->get("textdelay", textdelay); + SettingManager::get_instance()->get("textdelay", _textDelay); } BarkGump::~BarkGump(void) { @@ -106,7 +106,7 @@ void BarkGump::InitGump(Gump *newparent, bool take_focus) { if (_speechLength && _totalTextHeight) { _counter = (d.h * _speechLength) / _totalTextHeight; } else { - _counter = d.h * textdelay; + _counter = d.h * _textDelay; } _dims.h = d.h; _dims.w = d.w; @@ -125,7 +125,7 @@ bool BarkGump::NextText() { if (_speechLength && _totalTextHeight) { _counter = (d.h * _speechLength) / _totalTextHeight; } else { - _counter = d.h * textdelay; + _counter = d.h * _textDelay; } _dims.h = d.h; _dims.w = d.w; @@ -157,7 +157,7 @@ void BarkGump::run() { if (!speechplaying) Close(); else - _counter = textdelay; + _counter = _textDelay; } } } @@ -213,12 +213,12 @@ bool BarkGump::loadData(IDataSource *ids, uint32 version) { TextWidget *widget = p_dynamic_cast(getGump(_textWidget)); - SettingManager::get_instance()->get("textdelay", textdelay); + SettingManager::get_instance()->get("textdelay", _textDelay); // This is just a hack Rect d; widget->GetDims(d); - _counter = d.h * textdelay; + _counter = d.h * _textDelay; _dims.h = d.h; _dims.w = d.w; diff --git a/engines/ultima/ultima8/gumps/bark_gump.h b/engines/ultima/ultima8/gumps/bark_gump.h index ff418d44f98..630fc291f4a 100644 --- a/engines/ultima/ultima8/gumps/bark_gump.h +++ b/engines/ultima/ultima8/gumps/bark_gump.h @@ -59,7 +59,7 @@ protected: //! returns false if no more text available bool NextText(); - int textdelay; + int _textDelay; public: bool loadData(IDataSource *ids, uint32 version); diff --git a/engines/ultima/ultima8/gumps/bind_gump.cpp b/engines/ultima/ultima8/gumps/bind_gump.cpp index 32d9f03d547..af4af69fa0f 100644 --- a/engines/ultima/ultima8/gumps/bind_gump.cpp +++ b/engines/ultima/ultima8/gumps/bind_gump.cpp @@ -38,7 +38,7 @@ namespace Ultima8 { DEFINE_RUNTIME_CLASSTYPE_CODE(BindGump, ModalGump) -BindGump::BindGump(istring *b, Gump *g): ModalGump(0, 0, 160, 80), binding(b), invoker(g) { +BindGump::BindGump(istring *b, Gump *g): ModalGump(0, 0, 160, 80), _binding(b), _invoker(g) { } BindGump::~BindGump() { @@ -64,13 +64,13 @@ void BindGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) { } bool BindGump::OnKeyDown(int key, int mod) { - if (key != Common::KEYCODE_ESCAPE && binding) { + if (key != Common::KEYCODE_ESCAPE && _binding) { HIDManager *hidmanager = HIDManager::get_instance(); if (key == Common::KEYCODE_BACKSPACE) { - hidmanager->unbind(*binding); + hidmanager->unbind(*_binding); } - if (invoker) - invoker->ChildNotify(this, UPDATE); + if (_invoker) + _invoker->ChildNotify(this, UPDATE); } Close(); return true; @@ -81,8 +81,8 @@ Gump *BindGump::OnMouseDown(int button, int32 mx, int32 my) { // HIDManager * hidmanager = HIDManager::get_instance(); // if (binding) // hidmanager->bind(control, *binding); - if (invoker) - invoker->ChildNotify(this, UPDATE); + if (_invoker) + _invoker->ChildNotify(this, UPDATE); Close(); return this; } diff --git a/engines/ultima/ultima8/gumps/bind_gump.h b/engines/ultima/ultima8/gumps/bind_gump.h index f9aa63cad06..03c041528a8 100644 --- a/engines/ultima/ultima8/gumps/bind_gump.h +++ b/engines/ultima/ultima8/gumps/bind_gump.h @@ -55,8 +55,8 @@ public: }; protected: void saveData(ODataSource *ods) override; - istring *binding; - Gump *invoker; + istring *_binding; + Gump *_invoker; }; } // End of namespace Ultima8 diff --git a/engines/ultima/ultima8/gumps/book_gump.cpp b/engines/ultima/ultima8/gumps/book_gump.cpp index 6b5569b3589..39e22945ab0 100644 --- a/engines/ultima/ultima8/gumps/book_gump.cpp +++ b/engines/ultima/ultima8/gumps/book_gump.cpp @@ -48,7 +48,7 @@ BookGump::BookGump() } BookGump::BookGump(ObjId owner_, Std::string msg) : - ModalGump(0, 0, 100, 100, owner_), text(msg) { + ModalGump(0, 0, 100, 100, owner_), _text(msg) { } BookGump::~BookGump(void) { @@ -58,16 +58,16 @@ void BookGump::InitGump(Gump *newparent, bool take_focus) { ModalGump::InitGump(newparent, take_focus); // Create the TextWidgets (NOTE: they _must_ have exactly the same _dims) - TextWidget *widget = new TextWidget(9, 5, text, true, 9, 123, 129); //!! constants + TextWidget *widget = new TextWidget(9, 5, _text, true, 9, 123, 129); //!! constants widget->InitGump(this); - textwidgetL = widget->getObjId(); + _textWidgetL = widget->getObjId(); - widget = new TextWidget(150, 5, text, true, 9, 123, 129); //!! constants + widget = new TextWidget(150, 5, _text, true, 9, 123, 129); //!! constants widget->InitGump(this); - textwidgetR = widget->getObjId(); + _textWidgetR = widget->getObjId(); widget->setupNextText(); - text.clear(); // no longer need this + _text.clear(); // no longer need this //!! constant Shape *shapeP = GameData::get_instance()->getGumps()->getShape(6); @@ -82,8 +82,8 @@ void BookGump::InitGump(Gump *newparent, bool take_focus) { } void BookGump::NextText() { - TextWidget *widgetL = p_dynamic_cast(getGump(textwidgetL)); - TextWidget *widgetR = p_dynamic_cast(getGump(textwidgetR)); + TextWidget *widgetL = p_dynamic_cast(getGump(_textWidgetL)); + TextWidget *widgetR = p_dynamic_cast(getGump(_textWidgetR)); assert(widgetL); assert(widgetR); if (!widgetR->setupNextText()) { diff --git a/engines/ultima/ultima8/gumps/book_gump.h b/engines/ultima/ultima8/gumps/book_gump.h index 35cc384ff7e..bf490787223 100644 --- a/engines/ultima/ultima8/gumps/book_gump.h +++ b/engines/ultima/ultima8/gumps/book_gump.h @@ -31,9 +31,9 @@ namespace Ultima { namespace Ultima8 { class BookGump : public ModalGump { - Std::string text; - ObjId textwidgetL; - ObjId textwidgetR; + Std::string _text; + ObjId _textWidgetL; + ObjId _textWidgetR; public: ENABLE_RUNTIME_CLASSTYPE() diff --git a/engines/ultima/ultima8/gumps/container_gump.cpp b/engines/ultima/ultima8/gumps/container_gump.cpp index 92cd64d29a8..ad7d200cc40 100644 --- a/engines/ultima/ultima8/gumps/container_gump.cpp +++ b/engines/ultima/ultima8/gumps/container_gump.cpp @@ -145,8 +145,8 @@ void ContainerGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scale if (_displayDragging) { int32 itemx, itemy; - itemx = dragging_x + _itemArea.x; - itemy = dragging_y + _itemArea.y; + itemx = _draggingX + _itemArea.x; + itemy = _draggingY + _itemArea.y; Shape *s = GameData::get_instance()->getMainShapes()-> getShape(_draggingShape); assert(s); @@ -403,18 +403,18 @@ bool ContainerGump::DraggingItem(Item *item, int mx, int my) { // determine target location and set dragging_x/y - dragging_x = mx - _itemArea.x - dox; - dragging_y = my - _itemArea.y - doy; + _draggingX = mx - _itemArea.x - dox; + _draggingY = my - _itemArea.y - doy; Shape *sh = item->getShapeObject(); assert(sh); ShapeFrame *fr = sh->getFrame(_draggingFrame); assert(fr); - if (dragging_x - fr->_xoff < 0 || - dragging_x - fr->_xoff + fr->_width > _itemArea.w || - dragging_y - fr->_yoff < 0 || - dragging_y - fr->_yoff + fr->_height > _itemArea.h) { + if (_draggingX - fr->_xoff < 0 || + _draggingX - fr->_xoff + fr->_width > _itemArea.w || + _draggingY - fr->_yoff < 0 || + _draggingY - fr->_yoff + fr->_height > _itemArea.h) { _displayDragging = false; return false; } @@ -478,7 +478,7 @@ void ContainerGump::DropItem(Item *item, int mx, int my) { splittarget->randomGumpLocation(); } else { splittarget->moveToContainer(getContainer(_owner)); - splittarget->setGumpLocation(dragging_x, dragging_y); + splittarget->setGumpLocation(_draggingX, _draggingY); } } @@ -532,9 +532,9 @@ void ContainerGump::DropItem(Item *item, int mx, int my) { int32 dox, doy; Mouse::get_instance()->getDraggingOffset(dox, doy); - dragging_x = mx - _itemArea.x - dox; - dragging_y = my - _itemArea.y - doy; - item->setGumpLocation(dragging_x, dragging_y); + _draggingX = mx - _itemArea.x - dox; + _draggingY = my - _itemArea.y - doy; + item->setGumpLocation(_draggingX, _draggingY); } } diff --git a/engines/ultima/ultima8/gumps/container_gump.h b/engines/ultima/ultima8/gumps/container_gump.h index 5b5b3aeec31..79aedabe132 100644 --- a/engines/ultima/ultima8/gumps/container_gump.h +++ b/engines/ultima/ultima8/gumps/container_gump.h @@ -89,7 +89,7 @@ protected: uint32 _draggingShape; uint32 _draggingFrame; uint32 _draggingFlags; - int32 dragging_x, dragging_y; + int32 _draggingX, _draggingY; }; } // End of namespace Ultima8 diff --git a/engines/ultima/ultima8/gumps/controls_gump.cpp b/engines/ultima/ultima8/gumps/controls_gump.cpp index 01e89c17597..63a297b764a 100644 --- a/engines/ultima/ultima8/gumps/controls_gump.cpp +++ b/engines/ultima/ultima8/gumps/controls_gump.cpp @@ -49,15 +49,15 @@ public: void ChildNotify(Gump *child, uint32 message) override; void init(); protected: - istring bindingName; - Std::string displayedName; - Gump *button; + istring _bindingName; + Std::string _displayedName; + Gump *_button; }; DEFINE_RUNTIME_CLASSTYPE_CODE(ControlEntryGump, Gump) ControlEntryGump::ControlEntryGump(int x_, int y_, int width, const char *binding, const char *name) - : Gump(x_, y_, width, 5), bindingName(binding), displayedName(name) { + : Gump(x_, y_, width, 5), _bindingName(binding), _displayedName(name) { } ControlEntryGump::~ControlEntryGump() { @@ -81,9 +81,9 @@ void ControlEntryGump::init() { Std::vector controls; Rect rect; - button = new ButtonWidget(0, 0, displayedName, true, font, 0x80D000D0); - button->InitGump(this); - button->GetDims(rect); + _button = new ButtonWidget(0, 0, _displayedName, true, font, 0x80D000D0); + _button->InitGump(this); + _button->GetDims(rect); _dims.h = rect.h; @@ -105,8 +105,8 @@ void ControlEntryGump::init() { void ControlEntryGump::ChildNotify(Gump *child, uint32 message) { ObjId cid = child->getObjId(); if (message == ButtonWidget::BUTTON_CLICK) { - if (cid == button->getObjId()) { - ModalGump *gump = new BindGump(&bindingName, _parent); + if (cid == _button->getObjId()) { + ModalGump *gump = new BindGump(&_bindingName, _parent); gump->InitGump(0); gump->setRelativePosition(CENTER); } diff --git a/engines/ultima/ultima8/gumps/paperdoll_gump.cpp b/engines/ultima/ultima8/gumps/paperdoll_gump.cpp index a1f1dbf5ca5..6ad557bfa6e 100644 --- a/engines/ultima/ultima8/gumps/paperdoll_gump.cpp +++ b/engines/ultima/ultima8/gumps/paperdoll_gump.cpp @@ -213,8 +213,8 @@ void PaperdollGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scale if (_displayDragging) { int32 itemx, itemy; - itemx = dragging_x + _itemArea.x; - itemy = dragging_y + _itemArea.y; + itemx = _draggingX + _itemArea.x; + itemy = _draggingY + _itemArea.y; Shape *s = GameData::get_instance()->getMainShapes()-> getShape(_draggingShape); assert(s); @@ -342,8 +342,8 @@ bool PaperdollGump::DraggingItem(Item *item, int mx, int my) { } _draggingFrame++; - dragging_x = equipcoords[equiptype].x; - dragging_y = equipcoords[equiptype].y; + _draggingX = equipcoords[equiptype].x; + _draggingY = equipcoords[equiptype].y; } else { // drop in backpack @@ -352,8 +352,8 @@ bool PaperdollGump::DraggingItem(Item *item, int mx, int my) { return false; } - dragging_x = _backpackRect.x + _backpackRect.w / 2; - dragging_y = _backpackRect.y + _backpackRect.h / 2; + _draggingX = _backpackRect.x + _backpackRect.w / 2; + _draggingY = _backpackRect.y + _backpackRect.h / 2; } return true; diff --git a/engines/ultima/ultima8/misc/args.cpp b/engines/ultima/ultima8/misc/args.cpp index d86d4237be2..349d62b71ff 100644 --- a/engines/ultima/ultima8/misc/args.cpp +++ b/engines/ultima/ultima8/misc/args.cpp @@ -24,44 +24,44 @@ namespace Ultima8 { void Args::process(const int32 argc, const char *const *const argv) { for (int32 i = 1; i < argc; ++i) { - for (uint32 j = 0; (j < options.size()) && (i < argc); ++j) { - switch (options[j].valuetype) { + for (uint32 j = 0; (j < _options.size()) && (i < argc); ++j) { + switch (_options[j].valuetype) { case Option::no_type: continue; case Option::type_bool: - if (options[j].option == argv[i]) - *(options[j]._bool_val) = options[j]._bool_default; + if (_options[j].option == argv[i]) + *(_options[j]._bool_val) = _options[j]._bool_default; break; case Option::type_str: { - if (options[j].option == argv[i]) { + if (_options[j].option == argv[i]) { // We want the _next_ argument if (++i >= argc) { - warning("Data not specified for argument '%s'. Using default", options[j].option.c_str()); + warning("Data not specified for argument '%s'. Using default", _options[j].option.c_str()); break; } - *(options[j]._str_val) = argv[i]; + *(_options[j]._str_val) = argv[i]; } break; } case Option::type_sint: { - if (options[j].option == argv[i]) { + if (_options[j].option == argv[i]) { // We want the _next_ argument if (++i >= argc) { - warning("Data not specified for argument '%s'. Using default", options[j].option.c_str()); + warning("Data not specified for argument '%s'. Using default", _options[j].option.c_str()); break; } - *(options[j]._sint_val) = strtol(argv[i], 0, 10); + *(_options[j]._sint_val) = strtol(argv[i], 0, 10); } break; } case Option::type_uint: { - if (options[j].option == argv[i]) { + if (_options[j].option == argv[i]) { // We want the _next_ argument if (++i >= argc) { - warning("Data not specified for argument '%s'. Using default", options[j].option.c_str()); + warning("Data not specified for argument '%s'. Using default", _options[j].option.c_str()); break; } - *(options[j]._uint_val) = strtoul(argv[i], 0, 10); + *(_options[j]._uint_val) = strtoul(argv[i], 0, 10); } break; } diff --git a/engines/ultima/ultima8/misc/args.h b/engines/ultima/ultima8/misc/args.h index 678de765393..3afebc2dd67 100644 --- a/engines/ultima/ultima8/misc/args.h +++ b/engines/ultima/ultima8/misc/args.h @@ -79,23 +79,23 @@ public: enum { no_type = 0, type_bool, type_str, type_sint, type_uint } valuetype; }; - Std::vector