From ba6a2ac66ea3e679246a28e81013f7c4794ed564 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Fri, 11 May 2012 16:03:59 +0200 Subject: WINTERMUTE: Run Astyle on code-files to reformat. --- engines/wintermute/AdActor.cpp | 18 +- engines/wintermute/AdActor.h | 4 +- engines/wintermute/AdActorDir.cpp | 4 +- engines/wintermute/AdActorDir.h | 4 +- engines/wintermute/AdEntity.cpp | 18 +- engines/wintermute/AdEntity.h | 4 +- engines/wintermute/AdGame.cpp | 10 +- engines/wintermute/AdGame.h | 4 +- engines/wintermute/AdInventory.cpp | 6 +- engines/wintermute/AdInventory.h | 4 +- engines/wintermute/AdInventoryBox.cpp | 4 +- engines/wintermute/AdInventoryBox.h | 4 +- engines/wintermute/AdItem.cpp | 8 +- engines/wintermute/AdItem.h | 4 +- engines/wintermute/AdLayer.cpp | 6 +- engines/wintermute/AdLayer.h | 4 +- engines/wintermute/AdNodeState.cpp | 4 +- engines/wintermute/AdNodeState.h | 4 +- engines/wintermute/AdObject.cpp | 6 +- engines/wintermute/AdObject.h | 4 +- engines/wintermute/AdPath.cpp | 4 +- engines/wintermute/AdPath.h | 4 +- engines/wintermute/AdPathPoint.cpp | 4 +- engines/wintermute/AdPathPoint.h | 4 +- engines/wintermute/AdRegion.cpp | 4 +- engines/wintermute/AdRegion.h | 4 +- engines/wintermute/AdResponse.cpp | 4 +- engines/wintermute/AdResponse.h | 4 +- engines/wintermute/AdResponseBox.cpp | 6 +- engines/wintermute/AdResponseBox.h | 6 +- engines/wintermute/AdResponseContext.cpp | 4 +- engines/wintermute/AdResponseContext.h | 4 +- engines/wintermute/AdRotLevel.cpp | 4 +- engines/wintermute/AdRotLevel.h | 4 +- engines/wintermute/AdScaleLevel.cpp | 4 +- engines/wintermute/AdScaleLevel.h | 4 +- engines/wintermute/AdScene.cpp | 8 +- engines/wintermute/AdScene.h | 8 +- engines/wintermute/AdSceneNode.cpp | 4 +- engines/wintermute/AdSceneNode.h | 4 +- engines/wintermute/AdSceneState.cpp | 4 +- engines/wintermute/AdSceneState.h | 4 +- engines/wintermute/AdSentence.cpp | 6 +- engines/wintermute/AdSentence.h | 4 +- engines/wintermute/AdSpriteSet.cpp | 4 +- engines/wintermute/AdSpriteSet.h | 4 +- engines/wintermute/AdTalkDef.cpp | 4 +- engines/wintermute/AdTalkDef.h | 4 +- engines/wintermute/AdTalkHolder.cpp | 4 +- engines/wintermute/AdTalkHolder.h | 4 +- engines/wintermute/AdTalkNode.cpp | 4 +- engines/wintermute/AdTalkNode.h | 4 +- engines/wintermute/AdTypes.h | 4 +- engines/wintermute/AdWaypointGroup.cpp | 6 +- engines/wintermute/AdWaypointGroup.h | 4 +- engines/wintermute/BActiveRect.cpp | 4 +- engines/wintermute/BActiveRect.h | 4 +- engines/wintermute/BBase.cpp | 6 +- engines/wintermute/BBase.h | 8 +- engines/wintermute/BDebugger.cpp | 4 +- engines/wintermute/BDebugger.h | 4 +- engines/wintermute/BDiskFile.cpp | 20 +- engines/wintermute/BDiskFile.h | 6 +- engines/wintermute/BDynBuffer.cpp | 16 +- engines/wintermute/BDynBuffer.h | 4 +- engines/wintermute/BEvent.cpp | 4 +- engines/wintermute/BEvent.h | 4 +- engines/wintermute/BFader.cpp | 6 +- engines/wintermute/BFader.h | 4 +- engines/wintermute/BFile.cpp | 4 +- engines/wintermute/BFile.h | 6 +- engines/wintermute/BFileEntry.cpp | 4 +- engines/wintermute/BFileEntry.h | 4 +- engines/wintermute/BFileManager.cpp | 112 +++++----- engines/wintermute/BFileManager.h | 6 +- engines/wintermute/BFont.cpp | 4 +- engines/wintermute/BFont.h | 4 +- engines/wintermute/BFontBitmap.cpp | 16 +- engines/wintermute/BFontBitmap.h | 4 +- engines/wintermute/BFontStorage.cpp | 4 +- engines/wintermute/BFontStorage.h | 10 +- engines/wintermute/BFontTT.cpp | 58 ++--- engines/wintermute/BFontTT.h | 8 +- engines/wintermute/BFrame.cpp | 8 +- engines/wintermute/BFrame.h | 4 +- engines/wintermute/BGame.cpp | 62 +++--- engines/wintermute/BGame.h | 6 +- engines/wintermute/BImage.h | 4 +- engines/wintermute/BKeyboardState.cpp | 4 +- engines/wintermute/BKeyboardState.h | 4 +- engines/wintermute/BNamedObject.cpp | 4 +- engines/wintermute/BNamedObject.h | 4 +- engines/wintermute/BObject.cpp | 6 +- engines/wintermute/BObject.h | 4 +- engines/wintermute/BPackage.cpp | 6 +- engines/wintermute/BPackage.h | 8 +- engines/wintermute/BParser.cpp | 6 +- engines/wintermute/BParser.h | 4 +- engines/wintermute/BPersistMgr.cpp | 62 +++--- engines/wintermute/BPersistMgr.h | 4 +- engines/wintermute/BPkgFile.cpp | 8 +- engines/wintermute/BPkgFile.h | 8 +- engines/wintermute/BPoint.cpp | 4 +- engines/wintermute/BPoint.h | 4 +- engines/wintermute/BQuickMsg.cpp | 4 +- engines/wintermute/BQuickMsg.h | 4 +- engines/wintermute/BRegion.cpp | 4 +- engines/wintermute/BRegion.h | 4 +- engines/wintermute/BRegistry.cpp | 4 +- engines/wintermute/BRegistry.h | 4 +- engines/wintermute/BRenderSDL.cpp | 34 +-- engines/wintermute/BRenderSDL.h | 10 +- engines/wintermute/BRenderer.cpp | 4 +- engines/wintermute/BRenderer.h | 4 +- engines/wintermute/BResourceFile.cpp | 6 +- engines/wintermute/BResourceFile.h | 4 +- engines/wintermute/BResources.cpp | 6 +- engines/wintermute/BResources.h | 6 +- engines/wintermute/BSaveThumbFile.cpp | 6 +- engines/wintermute/BSaveThumbFile.h | 4 +- engines/wintermute/BSaveThumbHelper.cpp | 4 +- engines/wintermute/BSaveThumbHelper.h | 4 +- engines/wintermute/BScriptHolder.h | 4 +- engines/wintermute/BScriptable.cpp | 4 +- engines/wintermute/BScriptable.h | 4 +- engines/wintermute/BSound.cpp | 6 +- engines/wintermute/BSound.h | 4 +- engines/wintermute/BSoundBuffer.cpp | 8 +- engines/wintermute/BSoundBuffer.h | 8 +- engines/wintermute/BSoundMgr.cpp | 6 +- engines/wintermute/BSoundMgr.h | 4 +- engines/wintermute/BSprite.cpp | 4 +- engines/wintermute/BSprite.h | 4 +- engines/wintermute/BStringTable.cpp | 4 +- engines/wintermute/BStringTable.h | 4 +- engines/wintermute/BSubFrame.cpp | 6 +- engines/wintermute/BSubFrame.h | 4 +- engines/wintermute/BSurface.cpp | 4 +- engines/wintermute/BSurface.h | 4 +- engines/wintermute/BSurfaceSDL.cpp | 66 +++--- engines/wintermute/BSurfaceSDL.h | 10 +- engines/wintermute/BSurfaceStorage.cpp | 4 +- engines/wintermute/BSurfaceStorage.h | 4 +- engines/wintermute/BTransitionMgr.cpp | 4 +- engines/wintermute/BTransitionMgr.h | 4 +- engines/wintermute/BViewport.cpp | 4 +- engines/wintermute/BViewport.h | 4 +- engines/wintermute/FontGlyphCache.cpp | 8 +- engines/wintermute/Matrix4.h | 16 +- engines/wintermute/PartParticle.cpp | 10 +- engines/wintermute/PathUtil.cpp | 6 +- engines/wintermute/PathUtil.h | 4 +- engines/wintermute/PlatformSDL.cpp | 98 ++++---- engines/wintermute/PlatformSDL.h | 4 +- engines/wintermute/StringUtil.cpp | 296 ++++++++++++------------- engines/wintermute/StringUtil.h | 4 +- engines/wintermute/SysClass.cpp | 24 +- engines/wintermute/SysClass.h | 10 +- engines/wintermute/SysClassRegistry.cpp | 4 +- engines/wintermute/SysClassRegistry.h | 12 +- engines/wintermute/SysInstance.cpp | 4 +- engines/wintermute/SysInstance.h | 4 +- engines/wintermute/UIButton.cpp | 12 +- engines/wintermute/UIButton.h | 4 +- engines/wintermute/UIEdit.cpp | 34 +-- engines/wintermute/UIEdit.h | 4 +- engines/wintermute/UIEntity.cpp | 4 +- engines/wintermute/UIEntity.h | 4 +- engines/wintermute/UIObject.cpp | 4 +- engines/wintermute/UIObject.h | 4 +- engines/wintermute/UIText.cpp | 16 +- engines/wintermute/UIText.h | 4 +- engines/wintermute/UITiledImage.cpp | 4 +- engines/wintermute/UITiledImage.h | 4 +- engines/wintermute/UIWindow.cpp | 10 +- engines/wintermute/UIWindow.h | 6 +- engines/wintermute/coll_templ.h | 12 +- engines/wintermute/crc.cpp | 2 +- engines/wintermute/dcgf.h | 4 +- engines/wintermute/dcpackage.h | 2 +- engines/wintermute/dcscript.h | 4 +- engines/wintermute/dctypes.h | 8 +- engines/wintermute/detection.cpp | 28 +-- engines/wintermute/persistent.h | 92 ++++---- engines/wintermute/scriptables/SXArray.cpp | 4 +- engines/wintermute/scriptables/SXArray.h | 4 +- engines/wintermute/scriptables/SXDate.cpp | 4 +- engines/wintermute/scriptables/SXDate.h | 4 +- engines/wintermute/scriptables/SXFile.cpp | 14 +- engines/wintermute/scriptables/SXMath.cpp | 4 +- engines/wintermute/scriptables/SXMath.h | 4 +- engines/wintermute/scriptables/SXMemBuffer.cpp | 44 ++-- engines/wintermute/scriptables/SXMemBuffer.h | 4 +- engines/wintermute/scriptables/SXString.cpp | 52 ++--- engines/wintermute/scriptables/SXString.h | 6 +- engines/wintermute/scriptables/ScEngine.cpp | 34 +-- engines/wintermute/scriptables/ScEngine.h | 4 +- engines/wintermute/scriptables/ScScript.cpp | 10 +- engines/wintermute/scriptables/ScScript.h | 4 +- engines/wintermute/scriptables/ScStack.cpp | 4 +- engines/wintermute/scriptables/ScStack.h | 4 +- engines/wintermute/scriptables/ScValue.cpp | 4 +- engines/wintermute/scriptables/ScValue.h | 4 +- engines/wintermute/utils.cpp | 6 +- engines/wintermute/utils.h | 4 +- engines/wintermute/wintermute.cpp | 160 ++++++------- engines/wintermute/wintermute.h | 68 +++--- engines/wintermute/wintypes.h | 4 +- engines/wintermute/wme_debugger.h | 4 +- 209 files changed, 1186 insertions(+), 1182 deletions(-) diff --git a/engines/wintermute/AdActor.cpp b/engines/wintermute/AdActor.cpp index d957d08b8c..dff70dc3e9 100644 --- a/engines/wintermute/AdActor.cpp +++ b/engines/wintermute/AdActor.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -550,13 +550,13 @@ HRESULT CAdActor::Display() { if (_ignoreItems && ((CAdGame *)Game)->_selectedItem) Reg = false; _currentSprite->Display(_posX, - _posY, - Reg ? _registerAlias : NULL, - ScaleX, - ScaleY, - Alpha, - Rotate, - _blendMode); + _posY, + Reg ? _registerAlias : NULL, + ScaleX, + ScaleY, + Alpha, + Rotate, + _blendMode); } diff --git a/engines/wintermute/AdActor.h b/engines/wintermute/AdActor.h index d1c44b8948..c1e41237ee 100644 --- a/engines/wintermute/AdActor.h +++ b/engines/wintermute/AdActor.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdActorDir.cpp b/engines/wintermute/AdActorDir.cpp index bd888ccb03..6966c5fc1b 100644 --- a/engines/wintermute/AdActorDir.cpp +++ b/engines/wintermute/AdActorDir.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdActorDir.h b/engines/wintermute/AdActorDir.h index 6690796e5c..d4889f83fc 100644 --- a/engines/wintermute/AdActorDir.h +++ b/engines/wintermute/AdActorDir.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdEntity.cpp b/engines/wintermute/AdEntity.cpp index 91f7bfeace..0fb9d3b21b 100644 --- a/engines/wintermute/AdEntity.cpp +++ b/engines/wintermute/AdEntity.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -492,13 +492,13 @@ HRESULT CAdEntity::Display() { DisplaySpriteAttachments(true); if (_currentSprite) { _currentSprite->Display(_posX, - _posY, - (Reg || _editorAlwaysRegister) ? _registerAlias : NULL, - ScaleX, - ScaleY, - Alpha, - Rotate, - _blendMode); + _posY, + (Reg || _editorAlwaysRegister) ? _registerAlias : NULL, + ScaleX, + ScaleY, + Alpha, + Rotate, + _blendMode); } DisplaySpriteAttachments(false); diff --git a/engines/wintermute/AdEntity.h b/engines/wintermute/AdEntity.h index ac93a05d87..c63da505ce 100644 --- a/engines/wintermute/AdEntity.h +++ b/engines/wintermute/AdEntity.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdGame.cpp b/engines/wintermute/AdGame.cpp index ff190dff98..fc1435d1cb 100644 --- a/engines/wintermute/AdGame.cpp +++ b/engines/wintermute/AdGame.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -1492,7 +1492,7 @@ HRESULT CAdGame::WindowLoadHook(CUIWindow *Win, char **Buffer, char **params) { switch (cmd) { case TOKEN_ENTITY_CONTAINER: { CUIEntity *ent = new CUIEntity(Game); - if (!ent || FAILED(ent->LoadBuffer((byte *)*params, false))) { + if (!ent || FAILED(ent->LoadBuffer((byte *)*params, false))) { delete ent; ent = NULL; cmd = PARSERR_GENERIC; @@ -2038,10 +2038,10 @@ HRESULT CAdGame::DisplayDebugInfo() { char str[100]; if (Game->_dEBUG_DebugMode) { sprintf(str, "Mouse: %d, %d (scene: %d, %d)", _mousePos.x, _mousePos.y, _mousePos.x + _scene->GetOffsetLeft(), _mousePos.y + _scene->GetOffsetTop()); - _systemFont->DrawText((byte *)str, 0, 90, _renderer->_width, TAL_RIGHT); + _systemFont->DrawText((byte *)str, 0, 90, _renderer->_width, TAL_RIGHT); sprintf(str, "Scene: %s (prev: %s)", (_scene && _scene->_name) ? _scene->_name : "???", _prevSceneName ? _prevSceneName : "???"); - _systemFont->DrawText((byte *)str, 0, 110, _renderer->_width, TAL_RIGHT); + _systemFont->DrawText((byte *)str, 0, 110, _renderer->_width, TAL_RIGHT); } return CBGame::DisplayDebugInfo(); } diff --git a/engines/wintermute/AdGame.h b/engines/wintermute/AdGame.h index 748fda145a..e74793c8a0 100644 --- a/engines/wintermute/AdGame.h +++ b/engines/wintermute/AdGame.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdInventory.cpp b/engines/wintermute/AdInventory.cpp index 735b9a542e..7fcd955560 100644 --- a/engines/wintermute/AdInventory.cpp +++ b/engines/wintermute/AdInventory.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -115,5 +115,5 @@ HRESULT CAdInventory::Persist(CBPersistMgr *PersistMgr) { return S_OK; } - + } // end of namespace WinterMute diff --git a/engines/wintermute/AdInventory.h b/engines/wintermute/AdInventory.h index 2012054217..f85fc093eb 100644 --- a/engines/wintermute/AdInventory.h +++ b/engines/wintermute/AdInventory.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdInventoryBox.cpp b/engines/wintermute/AdInventoryBox.cpp index 6c093941bf..6429179f50 100644 --- a/engines/wintermute/AdInventoryBox.cpp +++ b/engines/wintermute/AdInventoryBox.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdInventoryBox.h b/engines/wintermute/AdInventoryBox.h index 3606e96123..edfada69a1 100644 --- a/engines/wintermute/AdInventoryBox.h +++ b/engines/wintermute/AdInventoryBox.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdItem.cpp b/engines/wintermute/AdItem.cpp index cc88b8bb3c..448fed3dc7 100644 --- a/engines/wintermute/AdItem.cpp +++ b/engines/wintermute/AdItem.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -412,11 +412,11 @@ HRESULT CAdItem::Display(int X, int Y) { CBFont *Font = _font ? _font : Game->_systemFont; if (Font) { - if (_amountString) Font->DrawText((byte *)_amountString, AmountX, AmountY, Width, _amountAlign); + if (_amountString) Font->DrawText((byte *)_amountString, AmountX, AmountY, Width, _amountAlign); else { char Str[256]; sprintf(Str, "%d", _amount); - Font->DrawText((byte *)Str, AmountX, AmountY, Width, _amountAlign); + Font->DrawText((byte *)Str, AmountX, AmountY, Width, _amountAlign); } } } diff --git a/engines/wintermute/AdItem.h b/engines/wintermute/AdItem.h index b5af924092..51fe0559e2 100644 --- a/engines/wintermute/AdItem.h +++ b/engines/wintermute/AdItem.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdLayer.cpp b/engines/wintermute/AdLayer.cpp index 023379d142..9840cf3097 100644 --- a/engines/wintermute/AdLayer.cpp +++ b/engines/wintermute/AdLayer.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -40,7 +40,7 @@ #include "common/str.h" namespace WinterMute { - + IMPLEMENT_PERSISTENT(CAdLayer, false) ////////////////////////////////////////////////////////////////////////// diff --git a/engines/wintermute/AdLayer.h b/engines/wintermute/AdLayer.h index 6de980d0a5..afa80bec74 100644 --- a/engines/wintermute/AdLayer.h +++ b/engines/wintermute/AdLayer.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdNodeState.cpp b/engines/wintermute/AdNodeState.cpp index 27c796c77b..80858c4a2d 100644 --- a/engines/wintermute/AdNodeState.cpp +++ b/engines/wintermute/AdNodeState.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdNodeState.h b/engines/wintermute/AdNodeState.h index da8dc541b1..7b515e801c 100644 --- a/engines/wintermute/AdNodeState.h +++ b/engines/wintermute/AdNodeState.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdObject.cpp b/engines/wintermute/AdObject.cpp index 2908cee79e..58bb742c8a 100644 --- a/engines/wintermute/AdObject.cpp +++ b/engines/wintermute/AdObject.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -884,7 +884,7 @@ void CAdObject::Talk(const char *Text, const char *Sound, uint32 Duration, const } else width = Game->_renderer->_width / 2; } - height = _sentence->_font->GetTextHeight((byte *)_sentence->_text, width); + height = _sentence->_font->GetTextHeight((byte *)_sentence->_text, width); y = y - height - GetHeight() - 5; if (_subtitlesModRelative) { diff --git a/engines/wintermute/AdObject.h b/engines/wintermute/AdObject.h index e017b979e0..706c291eef 100644 --- a/engines/wintermute/AdObject.h +++ b/engines/wintermute/AdObject.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdPath.cpp b/engines/wintermute/AdPath.cpp index f5e3d8ecc7..d9702005c0 100644 --- a/engines/wintermute/AdPath.cpp +++ b/engines/wintermute/AdPath.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdPath.h b/engines/wintermute/AdPath.h index 372b5e1cd4..3f7090815d 100644 --- a/engines/wintermute/AdPath.h +++ b/engines/wintermute/AdPath.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdPathPoint.cpp b/engines/wintermute/AdPathPoint.cpp index 6ebb5b9090..6de03cc5c2 100644 --- a/engines/wintermute/AdPathPoint.cpp +++ b/engines/wintermute/AdPathPoint.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdPathPoint.h b/engines/wintermute/AdPathPoint.h index 56dee7405c..649dab5012 100644 --- a/engines/wintermute/AdPathPoint.h +++ b/engines/wintermute/AdPathPoint.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdRegion.cpp b/engines/wintermute/AdRegion.cpp index 17917066f1..61d1e29f4a 100644 --- a/engines/wintermute/AdRegion.cpp +++ b/engines/wintermute/AdRegion.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdRegion.h b/engines/wintermute/AdRegion.h index 0af1c743fe..7c017be9c7 100644 --- a/engines/wintermute/AdRegion.h +++ b/engines/wintermute/AdRegion.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdResponse.cpp b/engines/wintermute/AdResponse.cpp index 2e5ddc54b7..9c76c0f4cc 100644 --- a/engines/wintermute/AdResponse.cpp +++ b/engines/wintermute/AdResponse.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdResponse.h b/engines/wintermute/AdResponse.h index f42926e476..576092494b 100644 --- a/engines/wintermute/AdResponse.h +++ b/engines/wintermute/AdResponse.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdResponseBox.cpp b/engines/wintermute/AdResponseBox.cpp index 4d9608ea9a..a027847d24 100644 --- a/engines/wintermute/AdResponseBox.cpp +++ b/engines/wintermute/AdResponseBox.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -619,7 +619,7 @@ CBObject *CAdResponseBox::GetPrevAccessObject(CBObject *CurrObject) { } ////////////////////////////////////////////////////////////////////////// -HRESULT CAdResponseBox::GetObjects(CBArray& Objects, bool InteractiveOnly) { +HRESULT CAdResponseBox::GetObjects(CBArray &Objects, bool InteractiveOnly) { for (int i = 0; i < _respButtons.GetSize(); i++) { Objects.Add(_respButtons[i]); } diff --git a/engines/wintermute/AdResponseBox.h b/engines/wintermute/AdResponseBox.h index b50d91da03..15996d7668 100644 --- a/engines/wintermute/AdResponseBox.h +++ b/engines/wintermute/AdResponseBox.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -42,7 +42,7 @@ class CAdResponseBox : public CBObject { public: CBObject *GetNextAccessObject(CBObject *CurrObject); CBObject *GetPrevAccessObject(CBObject *CurrObject); - HRESULT GetObjects(CBArray& Objects, bool InteractiveOnly); + HRESULT GetObjects(CBArray &Objects, bool InteractiveOnly); HRESULT HandleResponse(CAdResponse *Response); void SetLastResponseText(const char *Text, const char *TextOrig); diff --git a/engines/wintermute/AdResponseContext.cpp b/engines/wintermute/AdResponseContext.cpp index 670604fb68..b29f9a42ba 100644 --- a/engines/wintermute/AdResponseContext.cpp +++ b/engines/wintermute/AdResponseContext.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdResponseContext.h b/engines/wintermute/AdResponseContext.h index 7ae1b14ed2..c801e8a4e2 100644 --- a/engines/wintermute/AdResponseContext.h +++ b/engines/wintermute/AdResponseContext.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdRotLevel.cpp b/engines/wintermute/AdRotLevel.cpp index b5256f2050..7645f19740 100644 --- a/engines/wintermute/AdRotLevel.cpp +++ b/engines/wintermute/AdRotLevel.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdRotLevel.h b/engines/wintermute/AdRotLevel.h index bd78cedb65..509f9a492a 100644 --- a/engines/wintermute/AdRotLevel.h +++ b/engines/wintermute/AdRotLevel.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdScaleLevel.cpp b/engines/wintermute/AdScaleLevel.cpp index 546e0f7f8e..cd36fb65b8 100644 --- a/engines/wintermute/AdScaleLevel.cpp +++ b/engines/wintermute/AdScaleLevel.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdScaleLevel.h b/engines/wintermute/AdScaleLevel.h index efaa5f5e57..b996ff7fb5 100644 --- a/engines/wintermute/AdScaleLevel.h +++ b/engines/wintermute/AdScaleLevel.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdScene.cpp b/engines/wintermute/AdScene.cpp index 4cd4ea1082..4fb1096c1e 100644 --- a/engines/wintermute/AdScene.cpp +++ b/engines/wintermute/AdScene.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -2669,7 +2669,7 @@ CBObject *CAdScene::GetPrevAccessObject(CBObject *CurrObject) { ////////////////////////////////////////////////////////////////////////// -HRESULT CAdScene::GetSceneObjects(CBArray& Objects, bool InteractiveOnly) { +HRESULT CAdScene::GetSceneObjects(CBArray &Objects, bool InteractiveOnly) { for (int i = 0; i < _layers.GetSize(); i++) { // close-up layer -> remove everything below it if (InteractiveOnly && _layers[i]->_closeUp) Objects.RemoveAll(); @@ -2725,7 +2725,7 @@ HRESULT CAdScene::GetSceneObjects(CBArray& Objects, bo ////////////////////////////////////////////////////////////////////////// -HRESULT CAdScene::GetRegionObjects(CAdRegion *Region, CBArray& Objects, bool InteractiveOnly) { +HRESULT CAdScene::GetRegionObjects(CAdRegion *Region, CBArray &Objects, bool InteractiveOnly) { CAdGame *AdGame = (CAdGame *)Game; CAdObject *Obj; diff --git a/engines/wintermute/AdScene.h b/engines/wintermute/AdScene.h index 5aa2e9ffb0..66c27c8c44 100644 --- a/engines/wintermute/AdScene.h +++ b/engines/wintermute/AdScene.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -49,8 +49,8 @@ public: CBObject *GetNextAccessObject(CBObject *CurrObject); CBObject *GetPrevAccessObject(CBObject *CurrObject); - HRESULT GetSceneObjects(CBArray& Objects, bool InteractiveOnly); - HRESULT GetRegionObjects(CAdRegion *Region, CBArray& Objects, bool InteractiveOnly); + HRESULT GetSceneObjects(CBArray &Objects, bool InteractiveOnly); + HRESULT GetRegionObjects(CAdRegion *Region, CBArray &Objects, bool InteractiveOnly); HRESULT AfterLoad(); diff --git a/engines/wintermute/AdSceneNode.cpp b/engines/wintermute/AdSceneNode.cpp index 4085eade56..136836ac4a 100644 --- a/engines/wintermute/AdSceneNode.cpp +++ b/engines/wintermute/AdSceneNode.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdSceneNode.h b/engines/wintermute/AdSceneNode.h index 366e765cdd..9f71706189 100644 --- a/engines/wintermute/AdSceneNode.h +++ b/engines/wintermute/AdSceneNode.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdSceneState.cpp b/engines/wintermute/AdSceneState.cpp index a7acbe78d1..00fd826d6a 100644 --- a/engines/wintermute/AdSceneState.cpp +++ b/engines/wintermute/AdSceneState.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdSceneState.h b/engines/wintermute/AdSceneState.h index 81d84529b8..36f304737e 100644 --- a/engines/wintermute/AdSceneState.h +++ b/engines/wintermute/AdSceneState.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdSentence.cpp b/engines/wintermute/AdSentence.cpp index b5ba7915cf..cd5fc5d754 100644 --- a/engines/wintermute/AdSentence.cpp +++ b/engines/wintermute/AdSentence.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -187,7 +187,7 @@ HRESULT CAdSentence::Display() { x = std::min(x, Game->_renderer->_width - _width); y = std::max(y, 0); - _font->DrawText((byte *)_text, x, y, _width, _align); + _font->DrawText((byte *)_text, x, y, _width, _align); } return S_OK; diff --git a/engines/wintermute/AdSentence.h b/engines/wintermute/AdSentence.h index 7552a72944..c16826f46d 100644 --- a/engines/wintermute/AdSentence.h +++ b/engines/wintermute/AdSentence.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdSpriteSet.cpp b/engines/wintermute/AdSpriteSet.cpp index 8fe079e780..351d3d2667 100644 --- a/engines/wintermute/AdSpriteSet.cpp +++ b/engines/wintermute/AdSpriteSet.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdSpriteSet.h b/engines/wintermute/AdSpriteSet.h index 7a68ed9d0a..689c64af7a 100644 --- a/engines/wintermute/AdSpriteSet.h +++ b/engines/wintermute/AdSpriteSet.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdTalkDef.cpp b/engines/wintermute/AdTalkDef.cpp index 0545887cb3..d8ae610fcb 100644 --- a/engines/wintermute/AdTalkDef.cpp +++ b/engines/wintermute/AdTalkDef.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdTalkDef.h b/engines/wintermute/AdTalkDef.h index 2ead14540b..829c550147 100644 --- a/engines/wintermute/AdTalkDef.h +++ b/engines/wintermute/AdTalkDef.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdTalkHolder.cpp b/engines/wintermute/AdTalkHolder.cpp index 6773626523..05d2c46059 100644 --- a/engines/wintermute/AdTalkHolder.cpp +++ b/engines/wintermute/AdTalkHolder.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdTalkHolder.h b/engines/wintermute/AdTalkHolder.h index e6d4c322eb..647a4b0b98 100644 --- a/engines/wintermute/AdTalkHolder.h +++ b/engines/wintermute/AdTalkHolder.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdTalkNode.cpp b/engines/wintermute/AdTalkNode.cpp index 17e1ca2a2b..4d153e0452 100644 --- a/engines/wintermute/AdTalkNode.cpp +++ b/engines/wintermute/AdTalkNode.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdTalkNode.h b/engines/wintermute/AdTalkNode.h index d939847b70..105972c8da 100644 --- a/engines/wintermute/AdTalkNode.h +++ b/engines/wintermute/AdTalkNode.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdTypes.h b/engines/wintermute/AdTypes.h index 8e77f289bc..d11e3b6553 100644 --- a/engines/wintermute/AdTypes.h +++ b/engines/wintermute/AdTypes.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/AdWaypointGroup.cpp b/engines/wintermute/AdWaypointGroup.cpp index 865279a57e..c68a7e3101 100644 --- a/engines/wintermute/AdWaypointGroup.cpp +++ b/engines/wintermute/AdWaypointGroup.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -34,7 +34,7 @@ #include "BRegion.h" #include "BFileManager.h" namespace WinterMute { - + IMPLEMENT_PERSISTENT(CAdWaypointGroup, false) ////////////////////////////////////////////////////////////////////////// diff --git a/engines/wintermute/AdWaypointGroup.h b/engines/wintermute/AdWaypointGroup.h index 66fbcfa0e1..7a2641a23f 100644 --- a/engines/wintermute/AdWaypointGroup.h +++ b/engines/wintermute/AdWaypointGroup.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BActiveRect.cpp b/engines/wintermute/BActiveRect.cpp index 867b492a85..b94c4d021f 100644 --- a/engines/wintermute/BActiveRect.cpp +++ b/engines/wintermute/BActiveRect.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BActiveRect.h b/engines/wintermute/BActiveRect.h index 9143c1fa6e..6ad5b93448 100644 --- a/engines/wintermute/BActiveRect.h +++ b/engines/wintermute/BActiveRect.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BBase.cpp b/engines/wintermute/BBase.cpp index 32d89cea7f..543259b8d9 100644 --- a/engines/wintermute/BBase.cpp +++ b/engines/wintermute/BBase.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -59,7 +59,7 @@ const char *CBBase::GetEditorProp(const char *PropName, const char *InitVal) { _editorPropsIter = _editorProps.find(PropName); if (_editorPropsIter != _editorProps.end()) return _editorPropsIter->_value.c_str(); - //return _editorPropsIter->second.c_str(); // <- TODO Clean + //return _editorPropsIter->second.c_str(); // <- TODO Clean else return InitVal; } diff --git a/engines/wintermute/BBase.h b/engines/wintermute/BBase.h index 423c9fef6a..eb1a1e7834 100644 --- a/engines/wintermute/BBase.h +++ b/engines/wintermute/BBase.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -57,8 +57,8 @@ public: Common::HashMap _editorProps; Common::HashMap::iterator _editorPropsIter; -/* std::map _editorProps; - std::map::iterator _editorPropsIter;*/ + /* std::map _editorProps; + std::map::iterator _editorPropsIter;*/ }; } // end of namespace WinterMute diff --git a/engines/wintermute/BDebugger.cpp b/engines/wintermute/BDebugger.cpp index 5c26b6ae23..62efc27bb5 100644 --- a/engines/wintermute/BDebugger.cpp +++ b/engines/wintermute/BDebugger.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BDebugger.h b/engines/wintermute/BDebugger.h index c443863af0..bdae7823a0 100644 --- a/engines/wintermute/BDebugger.h +++ b/engines/wintermute/BDebugger.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BDiskFile.cpp b/engines/wintermute/BDiskFile.cpp index 591da4b9db..b456083058 100644 --- a/engines/wintermute/BDiskFile.cpp +++ b/engines/wintermute/BDiskFile.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -63,15 +63,15 @@ HRESULT CBDiskFile::Open(Common::String Filename) { CorrectSlashes(FullPath); //_file = Common::createFileStream(FullPath); Common::File *tempFile = new Common::File(); - if(tempFile->open(FullPath)) { + if (tempFile->open(FullPath)) { _file = tempFile; } else { delete tempFile; } -/* if (_file != NULL) { - error("Tried to open %s, but failed", Filename.c_str()); - break; - }*/ + /* if (_file != NULL) { + error("Tried to open %s, but failed", Filename.c_str()); + break; + }*/ } // if we didn't find it in search paths, try to open directly @@ -87,7 +87,7 @@ HRESULT CBDiskFile::Open(Common::String Filename) { delete tempFile; } } - + if (_file) { uint32 magic1, magic2; magic1 = _file->readUint32LE(); @@ -134,7 +134,7 @@ HRESULT CBDiskFile::Open(Common::String Filename) { _pos = 0; _file->seek(0, SEEK_END); _size = _file->pos() - _prefixSize; - _file->seek(_prefixSize,SEEK_SET); + _file->seek(_prefixSize, SEEK_SET); } return S_OK; @@ -146,7 +146,7 @@ HRESULT CBDiskFile::Open(Common::String Filename) { HRESULT CBDiskFile::Close() { if (_file) { delete _file; - } + } _file = NULL; _pos = 0; _size = 0; diff --git a/engines/wintermute/BDiskFile.h b/engines/wintermute/BDiskFile.h index 6991283437..129dcb0e72 100644 --- a/engines/wintermute/BDiskFile.h +++ b/engines/wintermute/BDiskFile.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -33,7 +33,7 @@ #include "BFile.h" namespace Common { - class SeekableReadStream; +class SeekableReadStream; } namespace WinterMute { diff --git a/engines/wintermute/BDynBuffer.cpp b/engines/wintermute/BDynBuffer.cpp index 68012f29f8..23cd1d2584 100644 --- a/engines/wintermute/BDynBuffer.cpp +++ b/engines/wintermute/BDynBuffer.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -74,7 +74,7 @@ HRESULT CBDynBuffer::Init(uint32 InitSize) { if (InitSize == 0) InitSize = _initSize; - _buffer = (byte *)malloc(InitSize); + _buffer = (byte *)malloc(InitSize); if (!_buffer) { Game->LOG(0, "CBDynBuffer::Init - Error allocating %d bytes", InitSize); return E_FAIL; @@ -93,7 +93,7 @@ HRESULT CBDynBuffer::PutBytes(byte *Buffer, uint32 Size) { while (_offset + Size > _realSize) { _realSize += _growBy; - _buffer = (byte *)realloc(_buffer, _realSize); + _buffer = (byte *)realloc(_buffer, _realSize); if (!_buffer) { Game->LOG(0, "CBDynBuffer::PutBytes - Error reallocating buffer to %d bytes", _realSize); return E_FAIL; @@ -126,14 +126,14 @@ HRESULT CBDynBuffer::GetBytes(byte *Buffer, uint32 Size) { ////////////////////////////////////////////////////////////////////////// void CBDynBuffer::PutDWORD(uint32 Val) { - PutBytes((byte *)&Val, sizeof(uint32)); + PutBytes((byte *)&Val, sizeof(uint32)); } ////////////////////////////////////////////////////////////////////////// uint32 CBDynBuffer::GetDWORD() { uint32 ret; - GetBytes((byte *)&ret, sizeof(uint32)); + GetBytes((byte *)&ret, sizeof(uint32)); return ret; } @@ -143,7 +143,7 @@ void CBDynBuffer::PutString(const char *Val) { if (!Val) PutString("(null)"); else { PutDWORD(strlen(Val) + 1); - PutBytes((byte *)Val, strlen(Val) + 1); + PutBytes((byte *)Val, strlen(Val) + 1); } } @@ -186,7 +186,7 @@ void CBDynBuffer::PutTextIndent(int Indent, LPCSTR fmt, ...) { void CBDynBuffer::PutTextForm(const char *format, va_list argptr) { char buff[32768]; vsprintf(buff, format, argptr); - PutBytes((byte *)buff, strlen(buff)); + PutBytes((byte *)buff, strlen(buff)); } } // end of namespace WinterMute diff --git a/engines/wintermute/BDynBuffer.h b/engines/wintermute/BDynBuffer.h index 4b05ee88ff..2b4d1d97bf 100644 --- a/engines/wintermute/BDynBuffer.h +++ b/engines/wintermute/BDynBuffer.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BEvent.cpp b/engines/wintermute/BEvent.cpp index 05876784a1..2bf77803c4 100644 --- a/engines/wintermute/BEvent.cpp +++ b/engines/wintermute/BEvent.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BEvent.h b/engines/wintermute/BEvent.h index e09f0ff3a8..5afd57ce3a 100644 --- a/engines/wintermute/BEvent.h +++ b/engines/wintermute/BEvent.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BFader.cpp b/engines/wintermute/BFader.cpp index b40582318a..ae716f6d3e 100644 --- a/engines/wintermute/BFader.cpp +++ b/engines/wintermute/BFader.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -74,7 +74,7 @@ HRESULT CBFader::Update() { else { _currentAlpha = _sourceAlpha + (float)time / (float)_duration * AlphaDelta; } - _currentAlpha = MIN((unsigned char)255, MAX(_currentAlpha, (byte )0)); // TODO: clean + _currentAlpha = MIN((unsigned char)255, MAX(_currentAlpha, (byte)0)); // TODO: clean _ready = time >= _duration; if (_ready && _currentAlpha == 0x00) _active = false; diff --git a/engines/wintermute/BFader.h b/engines/wintermute/BFader.h index 38ef8451ab..9007a95de0 100644 --- a/engines/wintermute/BFader.h +++ b/engines/wintermute/BFader.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BFile.cpp b/engines/wintermute/BFile.cpp index e66990f571..43b87027e2 100644 --- a/engines/wintermute/BFile.cpp +++ b/engines/wintermute/BFile.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BFile.h b/engines/wintermute/BFile.h index 7b077b34b9..78241eaf6a 100644 --- a/engines/wintermute/BFile.h +++ b/engines/wintermute/BFile.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -34,7 +34,7 @@ #include "common/str.h" namespace Common { - class SeekableReadStream; +class SeekableReadStream; } namespace WinterMute { diff --git a/engines/wintermute/BFileEntry.cpp b/engines/wintermute/BFileEntry.cpp index 3b9a9fafa9..447b7e85d7 100644 --- a/engines/wintermute/BFileEntry.cpp +++ b/engines/wintermute/BFileEntry.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BFileEntry.h b/engines/wintermute/BFileEntry.h index 00e82f8640..27a4f80eba 100644 --- a/engines/wintermute/BFileEntry.h +++ b/engines/wintermute/BFileEntry.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BFileManager.cpp b/engines/wintermute/BFileManager.cpp index 4cfe031090..e3e5986b88 100644 --- a/engines/wintermute/BFileManager.cpp +++ b/engines/wintermute/BFileManager.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -315,31 +315,31 @@ HRESULT CBFileManager::InitPaths() { // package files paths AddPath(PATH_PACKAGE, "./"); -/*#ifdef __APPLE__ - // search .app path and Resources dir in the bundle - CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef, kCFURLPOSIXPathStyle); - const char *pathPtr = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding()); - -#ifdef __IPHONE__ - AddPath(PATH_PACKAGE, pathPtr); - AddPath(PATH_SINGLE, pathPtr); -#else - char bundlePath[MAX_PATH]; + /*#ifdef __APPLE__ + // search .app path and Resources dir in the bundle + CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); + CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef, kCFURLPOSIXPathStyle); + const char *pathPtr = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding()); - sprintf(bundlePath, "%s/../", pathPtr); - AddPath(PATH_PACKAGE, bundlePath); - AddPath(PATH_SINGLE, bundlePath); + #ifdef __IPHONE__ + AddPath(PATH_PACKAGE, pathPtr); + AddPath(PATH_SINGLE, pathPtr); + #else + char bundlePath[MAX_PATH]; - sprintf(bundlePath, "%s/Contents/Resources/", pathPtr); - AddPath(PATH_PACKAGE, bundlePath); - AddPath(PATH_SINGLE, bundlePath); + sprintf(bundlePath, "%s/../", pathPtr); + AddPath(PATH_PACKAGE, bundlePath); + AddPath(PATH_SINGLE, bundlePath); + sprintf(bundlePath, "%s/Contents/Resources/", pathPtr); + AddPath(PATH_PACKAGE, bundlePath); + AddPath(PATH_SINGLE, bundlePath); - CFRelease(appUrlRef); - CFRelease(macPath); -#endif -#endif*/ + + CFRelease(appUrlRef); + CFRelease(macPath); + #endif + #endif*/ pathList = Game->_registry->ReadString("Resource", "PackagePaths", ""); @@ -365,7 +365,7 @@ HRESULT CBFileManager::RegisterPackages() { Game->LOG(0, "Scanning packages..."); warning("Scanning packages"); - + // TODO: Actually scan the folder, for now we just hardcode the files for Dirty Split. RegisterPackage("data.dcp"); RegisterPackage("english.dcp"); @@ -413,10 +413,10 @@ HRESULT CBFileManager::RegisterPackage(Common::String Filename , bool SearchSign Game->LOG(0, " Error opening package file '%s'. Ignoring.", Filename.c_str()); return S_OK; } - + uint32 AbsoluteOffset = 0; bool BoundToExe = false; - + if (SearchSignature) { uint32 Offset; if (!FindPackageSignature(package, &Offset)) { @@ -428,7 +428,7 @@ HRESULT CBFileManager::RegisterPackage(Common::String Filename , bool SearchSign BoundToExe = true; } } - + TPackageHeader hdr; hdr.readFromStream(package); // package->read(&hdr, sizeof(TPackageHeader), 1, f); @@ -437,11 +437,11 @@ HRESULT CBFileManager::RegisterPackage(Common::String Filename , bool SearchSign delete package; return S_OK; } - + if (hdr.PackageVersion != PACKAGE_VERSION) { Game->LOG(0, " Warning: package file '%s' is outdated.", Filename); } - + // new in v2 if (hdr.PackageVersion == PACKAGE_VERSION) { uint32 DirOffset; @@ -449,55 +449,55 @@ HRESULT CBFileManager::RegisterPackage(Common::String Filename , bool SearchSign DirOffset += AbsoluteOffset; package->seek(DirOffset, SEEK_SET); } - + for (int i = 0; i < hdr.NumDirs; i++) { CBPackage *pkg = new CBPackage(Game); if (!pkg) return E_FAIL; - + pkg->_boundToExe = BoundToExe; - + // read package info byte NameLength = package->readByte(); pkg->_name = new char[NameLength]; package->read(pkg->_name, NameLength); pkg->_cD = package->readByte(); pkg->_priority = hdr.Priority; - + if (!hdr.MasterIndex) pkg->_cD = 0; // override CD to fixed disk _packages.Add(pkg); - - + + // read file entries uint32 NumFiles = package->readUint32LE(); - + for (int j = 0; j < NumFiles; j++) { char *Name; uint32 Offset, Length, CompLength, Flags, TimeDate1, TimeDate2; - + NameLength = package->readByte(); Name = new char[NameLength]; package->read(Name, NameLength); - + // v2 - xor name if (hdr.PackageVersion == PACKAGE_VERSION) { for (int k = 0; k < NameLength; k++) { - ((byte *)Name)[k] ^= 'D'; + ((byte *)Name)[k] ^= 'D'; } } - + // some old version of ProjectMan writes invalid directory entries // so at least prevent strupr from corrupting memory Name[NameLength - 1] = '\0'; - - + + CBPlatform::strupr(Name); - + Offset = package->readUint32LE(); Offset += AbsoluteOffset; Length = package->readUint32LE(); CompLength = package->readUint32LE(); Flags = package->readUint32LE(); - + if (hdr.PackageVersion == PACKAGE_VERSION) { TimeDate1 = package->readUint32LE(); TimeDate2 = package->readUint32LE(); @@ -510,7 +510,7 @@ HRESULT CBFileManager::RegisterPackage(Common::String Filename , bool SearchSign file->_length = Length; file->_compressedLength = CompLength; file->_flags = Flags; - + _files[Name] = file; } else { // current package has lower CD number or higher priority, than the registered @@ -525,8 +525,8 @@ HRESULT CBFileManager::RegisterPackage(Common::String Filename , bool SearchSign delete [] Name; } } - - + + delete package; return S_OK; } @@ -587,10 +587,10 @@ HRESULT CBFileManager::RegisterPackage(const char *Path, const char *Name, bool // read package info byte NameLength; - fread(&NameLength, sizeof(byte ), 1, f); + fread(&NameLength, sizeof(byte), 1, f); pkg->_name = new char[NameLength]; fread(pkg->_name, NameLength, 1, f); - fread(&pkg->_cD, sizeof(byte ), 1, f); + fread(&pkg->_cD, sizeof(byte), 1, f); pkg->_priority = hdr.Priority; if (!hdr.MasterIndex) pkg->_cD = 0; // override CD to fixed disk @@ -605,14 +605,14 @@ HRESULT CBFileManager::RegisterPackage(const char *Path, const char *Name, bool char *Name; uint32 Offset, Length, CompLength, Flags, TimeDate1, TimeDate2; - fread(&NameLength, sizeof(byte ), 1, f); + fread(&NameLength, sizeof(byte), 1, f); Name = new char[NameLength]; fread(Name, NameLength, 1, f); // v2 - xor name if (hdr.PackageVersion == PACKAGE_VERSION) { for (int k = 0; k < NameLength; k++) { - ((byte *)Name)[k] ^= 'D'; + ((byte *)Name)[k] ^= 'D'; } } @@ -677,7 +677,7 @@ bool CBFileManager::IsValidPackage(const AnsiString &fileName) const { ////////////////////////////////////////////////////////////////////////// Common::File *CBFileManager::OpenPackage(const char *Name) { //TODO: Is it really necessary to do this when we have the ScummVM-system? - + //RestoreCurrentDir(); Common::File *ret = new Common::File(); @@ -705,17 +705,17 @@ Common::File *CBFileManager::OpenPackage(const char *Name) { ////////////////////////////////////////////////////////////////////////// Common::File *CBFileManager::OpenSingleFile(const char *Name) { RestoreCurrentDir(); - + Common::File *ret = NULL; char Filename[MAX_PATH]; - + for (int i = 0; i < _singlePaths.GetSize(); i++) { sprintf(Filename, "%s%s", _singlePaths[i], Name); ret->open(Filename); - if (ret->isOpen()) + if (ret->isOpen()) return ret; } - + // didn't find in search paths, try to open directly ret->open(Name); if (ret->isOpen()) { diff --git a/engines/wintermute/BFileManager.h b/engines/wintermute/BFileManager.h index f021afa275..7b487674f5 100644 --- a/engines/wintermute/BFileManager.h +++ b/engines/wintermute/BFileManager.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -36,7 +36,7 @@ #include "common/archive.h" namespace Common { - class File; +class File; } namespace WinterMute { diff --git a/engines/wintermute/BFont.cpp b/engines/wintermute/BFont.cpp index 4bae2841ab..82dfbb072b 100644 --- a/engines/wintermute/BFont.cpp +++ b/engines/wintermute/BFont.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BFont.h b/engines/wintermute/BFont.h index a02b6cd0ca..453f567c96 100644 --- a/engines/wintermute/BFont.h +++ b/engines/wintermute/BFont.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BFontBitmap.cpp b/engines/wintermute/BFontBitmap.cpp index f2f7fcfc60..caa0fb8bf1 100644 --- a/engines/wintermute/BFontBitmap.cpp +++ b/engines/wintermute/BFontBitmap.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -92,9 +92,9 @@ int CBFontBitmap::GetTextWidth(byte *text, int MaxLength) { str = AnsiString((char *)text); } - if (MaxLength >= 0 && str.size() > MaxLength) + if (MaxLength >= 0 && str.size() > MaxLength) str = Common::String(str.c_str(), MaxLength); - //str.substr(0, MaxLength); // TODO: Remove + //str.substr(0, MaxLength); // TODO: Remove int TextWidth = 0; for (size_t i = 0; i < str.size(); i++) { @@ -309,7 +309,7 @@ HRESULT CBFontBitmap::LoadBuffer(byte *Buffer) { Game->LOG(0, "'FONT' keyword expected."); return E_FAIL; } - Buffer = (byte *)params; + Buffer = (byte *)params; int widths[300]; int num = 0, default_width = 8; @@ -343,7 +343,7 @@ HRESULT CBFontBitmap::LoadBuffer(byte *Buffer) { case TOKEN_WIDTHS: parser.ScanStr(params, "%D", widths, &num); for (i = 0; last_width < NUM_CHARACTERS, num > 0; last_width++, num--, i++) { - _widths[last_width] = (byte )widths[i]; + _widths[last_width] = (byte)widths[i]; } break; @@ -388,7 +388,7 @@ HRESULT CBFontBitmap::LoadBuffer(byte *Buffer) { break; case TOKEN_EDITOR_PROPERTY: - ParseEditorProperty((byte *)params, false); + ParseEditorProperty((byte *)params, false); break; } @@ -426,7 +426,7 @@ HRESULT CBFontBitmap::LoadBuffer(byte *Buffer) { int NewWidth = (int)_widths[i] + ExpandWidth; if (NewWidth < 0) NewWidth = 0; - _widths[i] = (byte )NewWidth; + _widths[i] = (byte)NewWidth; } } diff --git a/engines/wintermute/BFontBitmap.h b/engines/wintermute/BFontBitmap.h index 23ebdaabe2..0079e5a916 100644 --- a/engines/wintermute/BFontBitmap.h +++ b/engines/wintermute/BFontBitmap.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BFontStorage.cpp b/engines/wintermute/BFontStorage.cpp index f73f018ab7..67c522aabc 100644 --- a/engines/wintermute/BFontStorage.cpp +++ b/engines/wintermute/BFontStorage.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BFontStorage.h b/engines/wintermute/BFontStorage.h index 8bf9c556c3..77f17f2382 100644 --- a/engines/wintermute/BFontStorage.h +++ b/engines/wintermute/BFontStorage.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -52,9 +52,9 @@ public: CBArray _fonts; HRESULT InitLoop(); -/* FT_Library GetFTLibrary() const { - return _fTLibrary; - }*/ + /* FT_Library GetFTLibrary() const { + return _fTLibrary; + }*/ private: void InitFreeType(); diff --git a/engines/wintermute/BFontTT.cpp b/engines/wintermute/BFontTT.cpp index 24454c7529..2fdaf7b128 100644 --- a/engines/wintermute/BFontTT.cpp +++ b/engines/wintermute/BFontTT.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -131,12 +131,12 @@ void CBFontTT::InitLoop() { int CBFontTT::GetTextWidth(byte *Text, int MaxLength) { WideString text; -/* if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text); - else text = StringUtil::AnsiToWide((char *)Text);*/ + /* if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text); + else text = StringUtil::AnsiToWide((char *)Text);*/ - if (MaxLength >= 0 && text.size() > MaxLength) + if (MaxLength >= 0 && text.size() > MaxLength) text = Common::String(text.c_str(), MaxLength); - //text = text.substr(0, MaxLength); // TODO: Remove + //text = text.substr(0, MaxLength); // TODO: Remove int textWidth, textHeight; MeasureText(text, -1, -1, textWidth, textHeight); @@ -148,8 +148,8 @@ int CBFontTT::GetTextWidth(byte *Text, int MaxLength) { int CBFontTT::GetTextHeight(byte *Text, int Width) { WideString text; -/* if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text); - else text = StringUtil::AnsiToWide((char *)Text);*/ + /* if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text); + else text = StringUtil::AnsiToWide((char *)Text);*/ int textWidth, textHeight; @@ -167,12 +167,12 @@ void CBFontTT::DrawText(byte *Text, int X, int Y, int Width, TTextAlign Align, WideString text; // TODO: Why do we still insist on Widestrings everywhere? -/* if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text); - else text = StringUtil::AnsiToWide((char *)Text);*/ + /* if (Game->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text); + else text = StringUtil::AnsiToWide((char *)Text);*/ - if (MaxLength >= 0 && text.size() > MaxLength) + if (MaxLength >= 0 && text.size() > MaxLength) text = Common::String(text.c_str(), MaxLength); - //text = text.substr(0, MaxLength); // TODO: Remove + //text = text.substr(0, MaxLength); // TODO: Remove CBRenderSDL *_renderer = (CBRenderSDL *)Game->_renderer; @@ -437,7 +437,7 @@ HRESULT CBFontTT::LoadBuffer(byte *Buffer) { Game->LOG(0, "'TTFONT' keyword expected."); return E_FAIL; } - Buffer = (byte *)params; + Buffer = (byte *)params; uint32 BaseColor = 0x00000000; @@ -491,7 +491,7 @@ HRESULT CBFontTT::LoadBuffer(byte *Buffer) { case TOKEN_LAYER: { CBTTFontLayer *Layer = new CBTTFontLayer; - if (Layer && SUCCEEDED(ParseLayer(Layer, (byte *)params))) _layers.Add(Layer); + if (Layer && SUCCEEDED(ParseLayer(Layer, (byte *)params))) _layers.Add(Layer); else { delete Layer; Layer = NULL; @@ -609,7 +609,7 @@ void CBFontTT::AfterLoad() { HRESULT CBFontTT::InitFont() { if (!_fontFile) return E_FAIL; warning("BFontTT::InitFont - Not ported yet"); - + CBFile *file = Game->_fileManager->OpenFile(_fontFile); if (!file) { // the requested font file is not in wme file space; try loading a system font @@ -695,26 +695,26 @@ HRESULT CBFontTT::InitFont() { ////////////////////////////////////////////////////////////////////////// /* unsigned long CBFontTT::FTReadSeekProc(FT_Stream stream, unsigned long offset, unsigned char *buffer, unsigned long count) { - CBFile *f = static_cast(stream->descriptor.pointer); - if (!f) return 0; - - f->Seek(offset, SEEK_TO_BEGIN); - if (count) { - uint32 oldPos = f->GetPos(); - f->Read(buffer, count); - return f->GetPos() - oldPos; - } else return 0; + CBFile *f = static_cast(stream->descriptor.pointer); + if (!f) return 0; + + f->Seek(offset, SEEK_TO_BEGIN); + if (count) { + uint32 oldPos = f->GetPos(); + f->Read(buffer, count); + return f->GetPos() - oldPos; + } else return 0; } ////////////////////////////////////////////////////////////////////////// void CBFontTT::FTCloseProc(FT_Stream stream) { - CBFile *f = static_cast(stream->descriptor.pointer); - if (!f) return; + CBFile *f = static_cast(stream->descriptor.pointer); + if (!f) return; - CBGame *Game = f->Game; + CBGame *Game = f->Game; - Game->_fileManager->CloseFile(f); - stream->descriptor.pointer = NULL; + Game->_fileManager->CloseFile(f); + stream->descriptor.pointer = NULL; }*/ diff --git a/engines/wintermute/BFontTT.h b/engines/wintermute/BFontTT.h index ec552fc9fa..c1bd7e7023 100644 --- a/engines/wintermute/BFontTT.h +++ b/engines/wintermute/BFontTT.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -128,8 +128,8 @@ public: HRESULT LoadBuffer(byte *Buffer); HRESULT LoadFile(const char *Filename); -/* static unsigned long FTReadSeekProc(FT_Stream stream, unsigned long offset, unsigned char *buffer, unsigned long count); - static void FTCloseProc(FT_Stream stream);*/ + /* static unsigned long FTReadSeekProc(FT_Stream stream, unsigned long offset, unsigned char *buffer, unsigned long count); + static void FTCloseProc(FT_Stream stream);*/ FontGlyphCache *GetGlyphCache() { return _glyphCache; diff --git a/engines/wintermute/BFrame.cpp b/engines/wintermute/BFrame.cpp index 08a0e73f72..a4e3cb9032 100644 --- a/engines/wintermute/BFrame.cpp +++ b/engines/wintermute/BFrame.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -239,7 +239,7 @@ HRESULT CBFrame::LoadBuffer(byte *Buffer, int LifeTime, bool KeepLoaded) { case TOKEN_SUBFRAME: { CBSubFrame *subframe = new CBSubFrame(Game); - if (!subframe || FAILED(subframe->LoadBuffer((byte *)params, LifeTime, KeepLoaded))) { + if (!subframe || FAILED(subframe->LoadBuffer((byte *)params, LifeTime, KeepLoaded))) { delete subframe; cmd = PARSERR_GENERIC; } else _subframes.Add(subframe); @@ -276,7 +276,7 @@ HRESULT CBFrame::LoadBuffer(byte *Buffer, int LifeTime, bool KeepLoaded) { break; case TOKEN_EDITOR_PROPERTY: - ParseEditorProperty((byte *)params, false); + ParseEditorProperty((byte *)params, false); break; } } diff --git a/engines/wintermute/BFrame.h b/engines/wintermute/BFrame.h index b236e60172..9810e50ada 100644 --- a/engines/wintermute/BFrame.h +++ b/engines/wintermute/BFrame.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BGame.cpp b/engines/wintermute/BGame.cpp index 0a7885b7e1..e210b3299c 100644 --- a/engines/wintermute/BGame.cpp +++ b/engines/wintermute/BGame.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -294,7 +294,7 @@ CBGame::~CBGame() { delete[] _localSaveDir; delete[] _settingsGameFile; delete[] _savedGameExt; - + delete _cachedThumbnail; delete _saveLoadImage; @@ -321,7 +321,7 @@ CBGame::~CBGame() { _saveLoadImage = NULL; _mathClass = NULL; - + _transMgr = NULL; _scEngine = NULL; _fontStorage = NULL; @@ -333,7 +333,7 @@ CBGame::~CBGame() { _fileManager = NULL; _registry = NULL; _stringTable = NULL; - + DEBUG_DebugDisable(); CBPlatform::OutputDebugString("--- shutting down normally ---\n"); } @@ -516,7 +516,7 @@ void CBGame::DEBUG_DebugEnable(const char *Filename) { _dEBUG_LogFile = fopen(safeLogFileName.c_str(), "a+"); } - if (_dEBUG_LogFile != NULL) fprintf((FILE*)_dEBUG_LogFile, "\n"); + if (_dEBUG_LogFile != NULL) fprintf((FILE *)_dEBUG_LogFile, "\n"); #endif time_t timeNow; @@ -542,7 +542,7 @@ void CBGame::DEBUG_DebugEnable(const char *Filename) { void CBGame::DEBUG_DebugDisable() { if (_dEBUG_LogFile != NULL) { LOG(0, "********** DEBUG LOG CLOSED ********************************************"); - fclose((FILE*)_dEBUG_LogFile); + fclose((FILE *)_dEBUG_LogFile); _dEBUG_LogFile = NULL; } _dEBUG_DebugMode = false; @@ -578,8 +578,8 @@ void CBGame::LOG(HRESULT res, LPCSTR fmt, ...) { if (_debugMgr) _debugMgr->OnLog(res, buff); warning("%02d:%02d: %s\n", tm->tm_hour, tm->tm_min, buff); - fprintf((FILE*)_dEBUG_LogFile, "%02d:%02d: %s\n", tm->tm_hour, tm->tm_min, buff); - fflush((FILE*)_dEBUG_LogFile); + fprintf((FILE *)_dEBUG_LogFile, "%02d:%02d: %s\n", tm->tm_hour, tm->tm_min, buff); + fflush((FILE *)_dEBUG_LogFile); #endif //QuickMessage(buff); @@ -1517,7 +1517,7 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "SetGlobalSFXVolume") == 0) { Stack->CorrectParams(1); - Game->_soundMgr->setVolumePercent(SOUND_SFX, (byte )Stack->Pop()->GetInt()); + Game->_soundMgr->setVolumePercent(SOUND_SFX, (byte)Stack->Pop()->GetInt()); Stack->PushNULL(); return S_OK; } @@ -1527,7 +1527,7 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "SetGlobalSpeechVolume") == 0) { Stack->CorrectParams(1); - Game->_soundMgr->setVolumePercent(SOUND_SPEECH, (byte )Stack->Pop()->GetInt()); + Game->_soundMgr->setVolumePercent(SOUND_SPEECH, (byte)Stack->Pop()->GetInt()); Stack->PushNULL(); return S_OK; } @@ -1537,7 +1537,7 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "SetGlobalMusicVolume") == 0) { Stack->CorrectParams(1); - Game->_soundMgr->setVolumePercent(SOUND_MUSIC, (byte )Stack->Pop()->GetInt()); + Game->_soundMgr->setVolumePercent(SOUND_MUSIC, (byte)Stack->Pop()->GetInt()); Stack->PushNULL(); return S_OK; } @@ -1547,7 +1547,7 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "SetGlobalMasterVolume") == 0) { Stack->CorrectParams(1); - Game->_soundMgr->setMasterVolumePercent((byte )Stack->Pop()->GetInt()); + Game->_soundMgr->setMasterVolumePercent((byte)Stack->Pop()->GetInt()); Stack->PushNULL(); return S_OK; } @@ -1831,7 +1831,7 @@ HRESULT CBGame::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS delete[] _loadImageName; _loadImageName = NULL; } else { - CBUtils::SetString(&_loadImageName, Val->GetString()); + CBUtils::SetString(&_loadImageName, Val->GetString()); } Stack->PushNULL(); return S_OK; @@ -2544,7 +2544,7 @@ HRESULT CBGame::ScSetProperty(const char *Name, CScValue *Value) { ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "SFXVolume") == 0) { Game->LOG(0, "**Warning** The SFXVolume attribute is obsolete"); - Game->_soundMgr->setVolumePercent(SOUND_SFX, (byte )Value->GetInt()); + Game->_soundMgr->setVolumePercent(SOUND_SFX, (byte)Value->GetInt()); return S_OK; } @@ -2553,7 +2553,7 @@ HRESULT CBGame::ScSetProperty(const char *Name, CScValue *Value) { ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "SpeechVolume") == 0) { Game->LOG(0, "**Warning** The SpeechVolume attribute is obsolete"); - Game->_soundMgr->setVolumePercent(SOUND_SPEECH, (byte )Value->GetInt()); + Game->_soundMgr->setVolumePercent(SOUND_SPEECH, (byte)Value->GetInt()); return S_OK; } @@ -2562,7 +2562,7 @@ HRESULT CBGame::ScSetProperty(const char *Name, CScValue *Value) { ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "MusicVolume") == 0) { Game->LOG(0, "**Warning** The MusicVolume attribute is obsolete"); - Game->_soundMgr->setVolumePercent(SOUND_MUSIC, (byte )Value->GetInt()); + Game->_soundMgr->setVolumePercent(SOUND_MUSIC, (byte)Value->GetInt()); return S_OK; } @@ -2571,7 +2571,7 @@ HRESULT CBGame::ScSetProperty(const char *Name, CScValue *Value) { ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "MasterVolume") == 0) { Game->LOG(0, "**Warning** The MasterVolume attribute is obsolete"); - Game->_soundMgr->setMasterVolumePercent((byte )Value->GetInt()); + Game->_soundMgr->setMasterVolumePercent((byte)Value->GetInt()); return S_OK; } @@ -2706,8 +2706,8 @@ HRESULT CBGame::DisplayQuickMsg() { // display for (i = 0; i < _quickMessages.GetSize(); i++) { - _systemFont->DrawText((byte *)_quickMessages[i]->GetText(), 0, PosY, _renderer->_width); - PosY += _systemFont->GetTextHeight((byte *)_quickMessages[i]->GetText(), _renderer->_width); + _systemFont->DrawText((byte *)_quickMessages[i]->GetText(), 0, PosY, _renderer->_width); + PosY += _systemFont->GetTextHeight((byte *)_quickMessages[i]->GetText(), _renderer->_width); } return S_OK; } @@ -3797,8 +3797,8 @@ void CBGame::SetWindowTitle() { } else { warning("CBGame::SetWindowTitle -Ignoring textencoding"); title = Utf8String(Title); -/* WideString wstr = StringUtil::AnsiToWide(Title); - title = StringUtil::WideToUtf8(wstr);*/ + /* WideString wstr = StringUtil::AnsiToWide(Title); + title = StringUtil::WideToUtf8(wstr);*/ } CBRenderSDL *renderer = static_cast(_renderer); @@ -3917,9 +3917,9 @@ HRESULT CBGame::PopViewport() { if (_viewportSP >= 0 && _viewportSP < _viewportStack.GetSize()) _renderer->SetViewport(_viewportStack[_viewportSP]->GetRect()); else _renderer->SetViewport(_renderer->_drawOffsetX, - _renderer->_drawOffsetY, - _renderer->_width + _renderer->_drawOffsetX, - _renderer->_height + _renderer->_drawOffsetY); + _renderer->_drawOffsetY, + _renderer->_width + _renderer->_drawOffsetX, + _renderer->_height + _renderer->_drawOffsetY); return S_OK; } @@ -4308,7 +4308,7 @@ HRESULT CBGame::DisplayDebugInfo() { if (_dEBUG_ShowFPS) { sprintf(str, "FPS: %d", Game->_fps); - _systemFont->DrawText((byte *)str, 0, 0, 100, TAL_LEFT); + _systemFont->DrawText((byte *)str, 0, 0, 100, TAL_LEFT); } if (Game->_dEBUG_DebugMode) { @@ -4320,23 +4320,23 @@ HRESULT CBGame::DisplayDebugInfo() { strcat(str, " ("); strcat(str, _renderer->GetName()); strcat(str, ")"); - _systemFont->DrawText((byte *)str, 0, 0, _renderer->_width, TAL_RIGHT); + _systemFont->DrawText((byte *)str, 0, 0, _renderer->_width, TAL_RIGHT); _renderer->DisplayDebugInfo(); int ScrTotal, ScrRunning, ScrWaiting, ScrPersistent; ScrTotal = _scEngine->GetNumScripts(&ScrRunning, &ScrWaiting, &ScrPersistent); sprintf(str, "Running scripts: %d (r:%d w:%d p:%d)", ScrTotal, ScrRunning, ScrWaiting, ScrPersistent); - _systemFont->DrawText((byte *)str, 0, 70, _renderer->_width, TAL_RIGHT); + _systemFont->DrawText((byte *)str, 0, 70, _renderer->_width, TAL_RIGHT); sprintf(str, "Timer: %d", _timer); - Game->_systemFont->DrawText((byte *)str, 0, 130, _renderer->_width, TAL_RIGHT); + Game->_systemFont->DrawText((byte *)str, 0, 130, _renderer->_width, TAL_RIGHT); - if (_activeObject != NULL) _systemFont->DrawText((byte *)_activeObject->_name, 0, 150, _renderer->_width, TAL_RIGHT); + if (_activeObject != NULL) _systemFont->DrawText((byte *)_activeObject->_name, 0, 150, _renderer->_width, TAL_RIGHT); sprintf(str, "GfxMem: %dMB", _usedMem / (1024 * 1024)); - _systemFont->DrawText((byte *)str, 0, 170, _renderer->_width, TAL_RIGHT); + _systemFont->DrawText((byte *)str, 0, 170, _renderer->_width, TAL_RIGHT); } diff --git a/engines/wintermute/BGame.h b/engines/wintermute/BGame.h index 145af7c3f2..1eb41403b4 100644 --- a/engines/wintermute/BGame.h +++ b/engines/wintermute/BGame.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -89,7 +89,7 @@ public: uint32 _lastMiniUpdate; bool _miniUpdateEnabled; - + virtual HRESULT MiniUpdate(); void GetMousePos(POINT *Pos); diff --git a/engines/wintermute/BImage.h b/engines/wintermute/BImage.h index b9e3ca880c..80a09fe60f 100644 --- a/engines/wintermute/BImage.h +++ b/engines/wintermute/BImage.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BKeyboardState.cpp b/engines/wintermute/BKeyboardState.cpp index 7a4c246899..1bece9fea6 100644 --- a/engines/wintermute/BKeyboardState.cpp +++ b/engines/wintermute/BKeyboardState.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BKeyboardState.h b/engines/wintermute/BKeyboardState.h index 956765b4a9..2ceaa6eb4d 100644 --- a/engines/wintermute/BKeyboardState.h +++ b/engines/wintermute/BKeyboardState.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BNamedObject.cpp b/engines/wintermute/BNamedObject.cpp index 7f33aaa42d..13dfee0273 100644 --- a/engines/wintermute/BNamedObject.cpp +++ b/engines/wintermute/BNamedObject.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BNamedObject.h b/engines/wintermute/BNamedObject.h index aecd45517b..c3e7e31aa4 100644 --- a/engines/wintermute/BNamedObject.h +++ b/engines/wintermute/BNamedObject.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BObject.cpp b/engines/wintermute/BObject.cpp index 389953ad14..4d3a24cfa4 100644 --- a/engines/wintermute/BObject.cpp +++ b/engines/wintermute/BObject.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -211,7 +211,7 @@ HRESULT CBObject::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi _cursor = NULL; } else { _cursor = NULL; - + } Stack->PushNULL(); diff --git a/engines/wintermute/BObject.h b/engines/wintermute/BObject.h index 9908d03e3b..11fa3dba19 100644 --- a/engines/wintermute/BObject.h +++ b/engines/wintermute/BObject.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BPackage.cpp b/engines/wintermute/BPackage.cpp index 56774c64bd..0608fbcde1 100644 --- a/engines/wintermute/BPackage.cpp +++ b/engines/wintermute/BPackage.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -96,7 +96,7 @@ Common::SeekableReadStream *CBPackage::GetFilePointer() { } ////////////////////////////////////////////////////////////////////////// -void CBPackage::CloseFilePointer(Common::SeekableReadStream*& file) { +void CBPackage::CloseFilePointer(Common::SeekableReadStream *&file) { delete file; file = NULL; } diff --git a/engines/wintermute/BPackage.h b/engines/wintermute/BPackage.h index 586088174f..cd8bb14f40 100644 --- a/engines/wintermute/BPackage.h +++ b/engines/wintermute/BPackage.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -33,7 +33,7 @@ #include "BBase.h" namespace Common { - class SeekableReadStream; +class SeekableReadStream; } namespace WinterMute { @@ -41,7 +41,7 @@ namespace WinterMute { class CBPackage : public CBBase { public: Common::SeekableReadStream *GetFilePointer(); - void CloseFilePointer(Common::SeekableReadStream*& file); + void CloseFilePointer(Common::SeekableReadStream *&file); bool _boundToExe; byte _priority; diff --git a/engines/wintermute/BParser.cpp b/engines/wintermute/BParser.cpp index 7f40cc8030..97a191eff1 100644 --- a/engines/wintermute/BParser.cpp +++ b/engines/wintermute/BParser.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -181,7 +181,7 @@ char *CBParser::GetAssignmentText(char **buf) { break; ++*buf; } - **buf = 0; // null terminate it + **buf = 0; // null terminate it if (theChar) // skip the terminator ++*buf; } diff --git a/engines/wintermute/BParser.h b/engines/wintermute/BParser.h index bf5edf7888..eb88467b7e 100644 --- a/engines/wintermute/BParser.h +++ b/engines/wintermute/BParser.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BPersistMgr.cpp b/engines/wintermute/BPersistMgr.cpp index e1e84505ca..bc825ac385 100644 --- a/engines/wintermute/BPersistMgr.cpp +++ b/engines/wintermute/BPersistMgr.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -115,7 +115,7 @@ HRESULT CBPersistMgr::InitSave(const char *Desc) { Cleanup(); _saving = true; - _buffer = (byte *)malloc(SAVE_BUFFER_INIT_SIZE); + _buffer = (byte *)malloc(SAVE_BUFFER_INIT_SIZE); if (_buffer) { _bufferSize = SAVE_BUFFER_INIT_SIZE; res = S_OK; @@ -171,9 +171,9 @@ HRESULT CBPersistMgr::InitSave(const char *Desc) { Game->_cachedThumbnail = NULL; uint32 DataOffset = _offset + - sizeof(uint32) + // data offset - sizeof(uint32) + strlen(Desc) + 1 + // description - sizeof(uint32); // timestamp + sizeof(uint32) + // data offset + sizeof(uint32) + strlen(Desc) + 1 + // description + sizeof(uint32); // timestamp PutDWORD(DataOffset); PutString(Desc); @@ -230,7 +230,7 @@ HRESULT CBPersistMgr::InitLoad(const char *Filename) { _savedExtMinor = getHighByte(getHighWord(Version)); if (Magic == SAVE_MAGIC_2) { - _savedVerBuild = (byte )GetDWORD(); + _savedVerBuild = (byte)GetDWORD(); char *SavedName = GetString(); if (SavedName == NULL || scumm_stricmp(SavedName, Game->_name) != 0) { Game->LOG(0, "ERROR: Saved game name doesn't match current game"); @@ -302,7 +302,7 @@ HRESULT CBPersistMgr::SaveFile(const char *Filename) { HRESULT CBPersistMgr::PutBytes(byte *Buffer, uint32 Size) { while (_offset + Size > _bufferSize) { _bufferSize += SAVE_BUFFER_GROW_BY; - _buffer = (byte *)realloc(_buffer, _bufferSize); + _buffer = (byte *)realloc(_buffer, _bufferSize); if (!_buffer) { Game->LOG(0, "Error reallocating save buffer to %d bytes", _bufferSize); return E_FAIL; @@ -332,14 +332,14 @@ HRESULT CBPersistMgr::GetBytes(byte *Buffer, uint32 Size) { ////////////////////////////////////////////////////////////////////////// void CBPersistMgr::PutDWORD(uint32 Val) { - PutBytes((byte *)&Val, sizeof(uint32)); + PutBytes((byte *)&Val, sizeof(uint32)); } ////////////////////////////////////////////////////////////////////////// uint32 CBPersistMgr::GetDWORD() { uint32 ret; - GetBytes((byte *)&ret, sizeof(uint32)); + GetBytes((byte *)&ret, sizeof(uint32)); return ret; } @@ -349,7 +349,7 @@ void CBPersistMgr::PutString(const char *Val) { if (!Val) PutString("(null)"); else { PutDWORD(strlen(Val) + 1); - PutBytes((byte *)Val, strlen(Val) + 1); + PutBytes((byte *)Val, strlen(Val) + 1); } } @@ -367,40 +367,40 @@ char *CBPersistMgr::GetString() { ////////////////////////////////////////////////////////////////////////// // bool HRESULT CBPersistMgr::Transfer(const char *Name, bool *Val) { - if (_saving) return PutBytes((byte *)Val, sizeof(bool)); - else return GetBytes((byte *)Val, sizeof(bool)); + if (_saving) return PutBytes((byte *)Val, sizeof(bool)); + else return GetBytes((byte *)Val, sizeof(bool)); } ////////////////////////////////////////////////////////////////////////// // int HRESULT CBPersistMgr::Transfer(const char *Name, int *Val) { - if (_saving) return PutBytes((byte *)Val, sizeof(int)); - else return GetBytes((byte *)Val, sizeof(int)); + if (_saving) return PutBytes((byte *)Val, sizeof(int)); + else return GetBytes((byte *)Val, sizeof(int)); } ////////////////////////////////////////////////////////////////////////// // DWORD HRESULT CBPersistMgr::Transfer(const char *Name, uint32 *Val) { - if (_saving) return PutBytes((byte *)Val, sizeof(uint32)); - else return GetBytes((byte *)Val, sizeof(uint32)); + if (_saving) return PutBytes((byte *)Val, sizeof(uint32)); + else return GetBytes((byte *)Val, sizeof(uint32)); } ////////////////////////////////////////////////////////////////////////// // float HRESULT CBPersistMgr::Transfer(const char *Name, float *Val) { - if (_saving) return PutBytes((byte *)Val, sizeof(float)); - else return GetBytes((byte *)Val, sizeof(float)); + if (_saving) return PutBytes((byte *)Val, sizeof(float)); + else return GetBytes((byte *)Val, sizeof(float)); } ////////////////////////////////////////////////////////////////////////// // double HRESULT CBPersistMgr::Transfer(const char *Name, double *Val) { - if (_saving) return PutBytes((byte *)Val, sizeof(double)); - else return GetBytes((byte *)Val, sizeof(double)); + if (_saving) return PutBytes((byte *)Val, sizeof(double)); + else return GetBytes((byte *)Val, sizeof(double)); } @@ -427,14 +427,14 @@ HRESULT CBPersistMgr::Transfer(const char *Name, AnsiStringArray &Val) { if (_saving) { size = Val.size(); - PutBytes((byte *)&size, sizeof(size_t)); + PutBytes((byte *)&size, sizeof(size_t)); for (AnsiStringArray::iterator it = Val.begin(); it != Val.end(); ++it) { PutString((*it).c_str()); } } else { Val.clear(); - GetBytes((byte *)&size, sizeof(size_t)); + GetBytes((byte *)&size, sizeof(size_t)); for (size_t i = 0; i < size; i++) { char *str = GetString(); @@ -448,32 +448,32 @@ HRESULT CBPersistMgr::Transfer(const char *Name, AnsiStringArray &Val) { ////////////////////////////////////////////////////////////////////////// // BYTE HRESULT CBPersistMgr::Transfer(const char *Name, byte *Val) { - if (_saving) return PutBytes((byte *)Val, sizeof(byte )); - else return GetBytes((byte *)Val, sizeof(byte )); + if (_saving) return PutBytes((byte *)Val, sizeof(byte)); + else return GetBytes((byte *)Val, sizeof(byte)); } ////////////////////////////////////////////////////////////////////////// // RECT HRESULT CBPersistMgr::Transfer(const char *Name, RECT *Val) { - if (_saving) return PutBytes((byte *)Val, sizeof(RECT)); - else return GetBytes((byte *)Val, sizeof(RECT)); + if (_saving) return PutBytes((byte *)Val, sizeof(RECT)); + else return GetBytes((byte *)Val, sizeof(RECT)); } ////////////////////////////////////////////////////////////////////////// // POINT HRESULT CBPersistMgr::Transfer(const char *Name, POINT *Val) { - if (_saving) return PutBytes((byte *)Val, sizeof(POINT)); - else return GetBytes((byte *)Val, sizeof(POINT)); + if (_saving) return PutBytes((byte *)Val, sizeof(POINT)); + else return GetBytes((byte *)Val, sizeof(POINT)); } ////////////////////////////////////////////////////////////////////////// // Vector2 HRESULT CBPersistMgr::Transfer(const char *Name, Vector2 *Val) { - if (_saving) return PutBytes((byte *)Val, sizeof(Vector2)); - else return GetBytes((byte *)Val, sizeof(Vector2)); + if (_saving) return PutBytes((byte *)Val, sizeof(Vector2)); + else return GetBytes((byte *)Val, sizeof(Vector2)); } diff --git a/engines/wintermute/BPersistMgr.h b/engines/wintermute/BPersistMgr.h index 01d2fda40a..10e1c9e880 100644 --- a/engines/wintermute/BPersistMgr.h +++ b/engines/wintermute/BPersistMgr.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BPkgFile.cpp b/engines/wintermute/BPkgFile.cpp index 783011bbb3..f336574c0c 100644 --- a/engines/wintermute/BPkgFile.cpp +++ b/engines/wintermute/BPkgFile.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -74,7 +74,7 @@ HRESULT CBPkgFile::Open(Common::String Filename) { // TODO: Cleanup _compressed = (_fileEntry->_compressedLength != 0); _size = _fileEntry->_length; - + if (_compressed) { // TODO: Really, most of this logic might be doable directly in the fileEntry? // But for now, this should get us rolling atleast. @@ -82,7 +82,7 @@ HRESULT CBPkgFile::Open(Common::String Filename) { } else { _file = new Common::SeekableSubReadStream(_file, _fileEntry->_offset, _fileEntry->_offset + _fileEntry->_length, DisposeAfterUse::YES); } - + SeekToPos(0); return S_OK; diff --git a/engines/wintermute/BPkgFile.h b/engines/wintermute/BPkgFile.h index 9b70d37ed6..e3942718f4 100644 --- a/engines/wintermute/BPkgFile.h +++ b/engines/wintermute/BPkgFile.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -37,8 +37,8 @@ #define COMPRESSED_BUFFER_SIZE 4096 namespace Common { - class SeekableReadStream; - class File; +class SeekableReadStream; +class File; } namespace WinterMute { diff --git a/engines/wintermute/BPoint.cpp b/engines/wintermute/BPoint.cpp index 331e9252f4..2cab052b96 100644 --- a/engines/wintermute/BPoint.cpp +++ b/engines/wintermute/BPoint.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BPoint.h b/engines/wintermute/BPoint.h index 6cd17653d9..1517953ef8 100644 --- a/engines/wintermute/BPoint.h +++ b/engines/wintermute/BPoint.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BQuickMsg.cpp b/engines/wintermute/BQuickMsg.cpp index 6fa14ac5c0..49425e7741 100644 --- a/engines/wintermute/BQuickMsg.cpp +++ b/engines/wintermute/BQuickMsg.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BQuickMsg.h b/engines/wintermute/BQuickMsg.h index a760a9ee21..cd7b6b6fdc 100644 --- a/engines/wintermute/BQuickMsg.h +++ b/engines/wintermute/BQuickMsg.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BRegion.cpp b/engines/wintermute/BRegion.cpp index 23071f51a6..f7c4812d3e 100644 --- a/engines/wintermute/BRegion.cpp +++ b/engines/wintermute/BRegion.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BRegion.h b/engines/wintermute/BRegion.h index 79af62bcae..ef7b3f2719 100644 --- a/engines/wintermute/BRegion.h +++ b/engines/wintermute/BRegion.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BRegistry.cpp b/engines/wintermute/BRegistry.cpp index 72f34ef061..0e9592ce56 100644 --- a/engines/wintermute/BRegistry.cpp +++ b/engines/wintermute/BRegistry.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BRegistry.h b/engines/wintermute/BRegistry.h index 0729374783..99d25e88c3 100644 --- a/engines/wintermute/BRegistry.h +++ b/engines/wintermute/BRegistry.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BRenderSDL.cpp b/engines/wintermute/BRenderSDL.cpp index a5a3547cb3..b74967b815 100644 --- a/engines/wintermute/BRenderSDL.cpp +++ b/engines/wintermute/BRenderSDL.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -39,12 +39,12 @@ namespace WinterMute { -// TODO: Redo everything here. +// TODO: Redo everything here. ////////////////////////////////////////////////////////////////////////// CBRenderSDL::CBRenderSDL(CBGame *inGame) : CBRenderer(inGame) { -/* _renderer = NULL; - _win = NULL;*/ + /* _renderer = NULL; + _win = NULL;*/ _renderSurface = NULL; _borderLeft = _borderRight = _borderTop = _borderBottom = 0; @@ -138,10 +138,10 @@ HRESULT CBRenderSDL::InitRenderer(int width, int height, bool windowed) { #if 0 _win = SDL_CreateWindow("WME Lite", - SDL_WINDOWPOS_UNDEFINED, - SDL_WINDOWPOS_UNDEFINED, - _realWidth, _realHeight, - flags); + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + _realWidth, _realHeight, + flags); if (!_win) return E_FAIL; #endif @@ -210,7 +210,7 @@ HRESULT CBRenderSDL::Flip() { } } #endif - g_system->copyRectToScreen((byte*)_renderSurface->pixels, _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h); + g_system->copyRectToScreen((byte *)_renderSurface->pixels, _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h); g_system->updateScreen(); //SDL_RenderPresent(_renderer); @@ -271,18 +271,18 @@ HRESULT CBRenderSDL::FadeToColor(uint32 Color, RECT *rect) { return S_OK; } -// Replacement for SDL2's SDL_RenderCopy +// Replacement for SDL2's SDL_RenderCopy void CBRenderSDL::drawFromSurface(Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect) { for (int i = 0; i < srcRect->height(); i++) { void *destPtr = _renderSurface->getBasePtr(dstRect->left, dstRect->top + i); void *srcPtr = surf->getBasePtr(srcRect->left, srcRect->top + i); for (int j = 0; j < srcRect->width(); j++) { // TODO: Replace this with something less ugly, and more portable. - if (((byte*)srcPtr)[0] == 255) { - memcpy(destPtr, srcPtr, _renderSurface->format.bytesPerPixel); + if (((byte *)srcPtr)[0] == 255) { + memcpy(destPtr, srcPtr, _renderSurface->format.bytesPerPixel); } - ((byte*)srcPtr)+=_renderSurface->format.bytesPerPixel; - ((byte*)destPtr)+=_renderSurface->format.bytesPerPixel; + ((byte *)srcPtr) += _renderSurface->format.bytesPerPixel; + ((byte *)destPtr) += _renderSurface->format.bytesPerPixel; } } } @@ -329,7 +329,7 @@ CBImage *CBRenderSDL::TakeScreenshot() { for (unsigned y = 0; y < FreeImage_GetHeight(dib); y++) { byte *bits = FreeImage_GetScanLine(dib, y); - byte *src = (byte *)surface->pixels + (viewport.h - y - 1) * surface->pitch; + byte *src = (byte *)surface->pixels + (viewport.h - y - 1) * surface->pitch; memcpy(bits, src, bytespp * viewport.w); } @@ -344,7 +344,7 @@ HRESULT CBRenderSDL::SwitchFullscreen() { else SDL_SetWindowFullscreen(_win, SDL_FALSE); _windowed = !_windowed; -*/ + */ Game->_registry->WriteBool("Video", "Windowed", _windowed); return S_OK; diff --git a/engines/wintermute/BRenderSDL.h b/engines/wintermute/BRenderSDL.h index 5842492743..83199433e8 100644 --- a/engines/wintermute/BRenderSDL.h +++ b/engines/wintermute/BRenderSDL.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -57,7 +57,7 @@ public: HRESULT DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color); CBImage *TakeScreenshot(); - + void drawFromSurface(Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest); @@ -77,8 +77,8 @@ public: } private: -/* SDL_Renderer *_renderer; - SDL_Window *_win;*/ + /* SDL_Renderer *_renderer; + SDL_Window *_win;*/ Graphics::Surface *_renderSurface; AnsiString _name; diff --git a/engines/wintermute/BRenderer.cpp b/engines/wintermute/BRenderer.cpp index a0ebcdd1d3..88ad581e6f 100644 --- a/engines/wintermute/BRenderer.cpp +++ b/engines/wintermute/BRenderer.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BRenderer.h b/engines/wintermute/BRenderer.h index 26ea699e6d..7a586775dd 100644 --- a/engines/wintermute/BRenderer.h +++ b/engines/wintermute/BRenderer.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BResourceFile.cpp b/engines/wintermute/BResourceFile.cpp index c03868cde1..c6de083d9c 100644 --- a/engines/wintermute/BResourceFile.cpp +++ b/engines/wintermute/BResourceFile.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -69,7 +69,7 @@ HRESULT CBResourceFile::Close() { HRESULT CBResourceFile::Read(void *Buffer, uint32 Size) { if (!_data || _pos + Size > _size) return E_FAIL; - memcpy(Buffer, (byte *)_data + _pos, Size); + memcpy(Buffer, (byte *)_data + _pos, Size); _pos += Size; return S_OK; diff --git a/engines/wintermute/BResourceFile.h b/engines/wintermute/BResourceFile.h index 110f320d60..654983997b 100644 --- a/engines/wintermute/BResourceFile.h +++ b/engines/wintermute/BResourceFile.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BResources.cpp b/engines/wintermute/BResources.cpp index f387d1848b..e63f1df307 100644 --- a/engines/wintermute/BResources.cpp +++ b/engines/wintermute/BResources.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -2807,7 +2807,7 @@ unsigned char systemfont[] = { ////////////////////////////////////////////////////////////////////////// -bool CBResources::GetFile(const char *fileName, byte*& buffer, uint32 &size) { +bool CBResources::GetFile(const char *fileName, byte *&buffer, uint32 &size) { // better! if (scumm_stricmp(fileName, "invalid.bmp") == 0) { buffer = invalid; diff --git a/engines/wintermute/BResources.h b/engines/wintermute/BResources.h index ff8c050fa8..26d92af525 100644 --- a/engines/wintermute/BResources.h +++ b/engines/wintermute/BResources.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -33,7 +33,7 @@ namespace WinterMute { class CBResources { public: - static bool GetFile(const char *fileName, byte*& buffer, uint32 &size); + static bool GetFile(const char *fileName, byte *&buffer, uint32 &size); }; } // end of namespace WinterMute diff --git a/engines/wintermute/BSaveThumbFile.cpp b/engines/wintermute/BSaveThumbFile.cpp index 4f698563d3..d8d91e8062 100644 --- a/engines/wintermute/BSaveThumbFile.cpp +++ b/engines/wintermute/BSaveThumbFile.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -112,7 +112,7 @@ HRESULT CBSaveThumbFile::Close() { HRESULT CBSaveThumbFile::Read(void *Buffer, uint32 Size) { if (!_data || _pos + Size > _size) return E_FAIL; - memcpy(Buffer, (byte *)_data + _pos, Size); + memcpy(Buffer, (byte *)_data + _pos, Size); _pos += Size; return S_OK; diff --git a/engines/wintermute/BSaveThumbFile.h b/engines/wintermute/BSaveThumbFile.h index 55596b7ecc..69be999f9e 100644 --- a/engines/wintermute/BSaveThumbFile.h +++ b/engines/wintermute/BSaveThumbFile.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSaveThumbHelper.cpp b/engines/wintermute/BSaveThumbHelper.cpp index ac8898c344..6ae2f2013f 100644 --- a/engines/wintermute/BSaveThumbHelper.cpp +++ b/engines/wintermute/BSaveThumbHelper.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSaveThumbHelper.h b/engines/wintermute/BSaveThumbHelper.h index fa42762367..dfb587e194 100644 --- a/engines/wintermute/BSaveThumbHelper.h +++ b/engines/wintermute/BSaveThumbHelper.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BScriptHolder.h b/engines/wintermute/BScriptHolder.h index 2447bf17d6..d06778d7af 100644 --- a/engines/wintermute/BScriptHolder.h +++ b/engines/wintermute/BScriptHolder.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BScriptable.cpp b/engines/wintermute/BScriptable.cpp index 2ced86b1cf..cfdb0e1771 100644 --- a/engines/wintermute/BScriptable.cpp +++ b/engines/wintermute/BScriptable.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BScriptable.h b/engines/wintermute/BScriptable.h index a0142e00ba..be2b961b08 100644 --- a/engines/wintermute/BScriptable.h +++ b/engines/wintermute/BScriptable.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSound.cpp b/engines/wintermute/BSound.cpp index 088235fb75..d419e827b5 100644 --- a/engines/wintermute/BSound.cpp +++ b/engines/wintermute/BSound.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -58,7 +58,7 @@ CBSound::CBSound(CBGame *inGame): CBBase(inGame) { CBSound::~CBSound() { if (_sound) Game->_soundMgr->removeSound(_sound); _sound = NULL; - + delete[] _soundFilename; _soundFilename = NULL; } diff --git a/engines/wintermute/BSound.h b/engines/wintermute/BSound.h index d8da355239..2acdaee464 100644 --- a/engines/wintermute/BSound.h +++ b/engines/wintermute/BSound.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSoundBuffer.cpp b/engines/wintermute/BSoundBuffer.cpp index e045d4d769..1905325f8a 100644 --- a/engines/wintermute/BSoundBuffer.cpp +++ b/engines/wintermute/BSoundBuffer.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -111,10 +111,10 @@ HRESULT CBSoundBuffer::LoadFromFile(const char *Filename, bool ForceReload) { Game->LOG(0, "Error opening sound file '%s'", Filename); return E_FAIL; } - + _stream = Audio::makeVorbisStream(_file->getMemStream(), DisposeAfterUse::YES); CBUtils::SetString(&_filename, Filename); - + return S_OK; #if 0 BASS_FILEPROCS fileProc; diff --git a/engines/wintermute/BSoundBuffer.h b/engines/wintermute/BSoundBuffer.h index e9ef8264f7..312bb03f31 100644 --- a/engines/wintermute/BSoundBuffer.h +++ b/engines/wintermute/BSoundBuffer.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -34,8 +34,8 @@ //#include "bass.h" namespace Audio { - class SeekableAudioStream; - class SoundHandle; +class SeekableAudioStream; +class SoundHandle; } namespace WinterMute { diff --git a/engines/wintermute/BSoundMgr.cpp b/engines/wintermute/BSoundMgr.cpp index a58878fd95..6b0ae4e6a6 100644 --- a/engines/wintermute/BSoundMgr.cpp +++ b/engines/wintermute/BSoundMgr.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -261,7 +261,7 @@ byte CBSoundMgr::getVolumePercent(TSoundType Type) { break; } - return (byte )Volume; + return (byte)Volume; } diff --git a/engines/wintermute/BSoundMgr.h b/engines/wintermute/BSoundMgr.h index aa03edf1de..5cb130c081 100644 --- a/engines/wintermute/BSoundMgr.h +++ b/engines/wintermute/BSoundMgr.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSprite.cpp b/engines/wintermute/BSprite.cpp index e8e9402fe7..f24ee23a78 100644 --- a/engines/wintermute/BSprite.cpp +++ b/engines/wintermute/BSprite.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSprite.h b/engines/wintermute/BSprite.h index 18731b682e..b2b99bc2db 100644 --- a/engines/wintermute/BSprite.h +++ b/engines/wintermute/BSprite.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BStringTable.cpp b/engines/wintermute/BStringTable.cpp index e53403c6f0..a8d10efd3c 100644 --- a/engines/wintermute/BStringTable.cpp +++ b/engines/wintermute/BStringTable.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BStringTable.h b/engines/wintermute/BStringTable.h index f4d1bc254e..bbaf819eb7 100644 --- a/engines/wintermute/BStringTable.h +++ b/engines/wintermute/BStringTable.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSubFrame.cpp b/engines/wintermute/BSubFrame.cpp index cea9d93257..0c57b9b79f 100644 --- a/engines/wintermute/BSubFrame.cpp +++ b/engines/wintermute/BSubFrame.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -172,7 +172,7 @@ HRESULT CBSubFrame::LoadBuffer(byte *Buffer, int LifeTime, bool KeepLoaded) { break; case TOKEN_EDITOR_PROPERTY: - ParseEditorProperty((byte *)params, false); + ParseEditorProperty((byte *)params, false); break; } } diff --git a/engines/wintermute/BSubFrame.h b/engines/wintermute/BSubFrame.h index 04be4e86c8..ec4e7204d0 100644 --- a/engines/wintermute/BSubFrame.h +++ b/engines/wintermute/BSubFrame.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSurface.cpp b/engines/wintermute/BSurface.cpp index 4fe97bcdeb..d08ceee6ea 100644 --- a/engines/wintermute/BSurface.cpp +++ b/engines/wintermute/BSurface.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSurface.h b/engines/wintermute/BSurface.h index 88fe58d17b..bd22d48d01 100644 --- a/engines/wintermute/BSurface.h +++ b/engines/wintermute/BSurface.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSurfaceSDL.cpp b/engines/wintermute/BSurfaceSDL.cpp index 9c1e1dc4dc..710c623a43 100644 --- a/engines/wintermute/BSurfaceSDL.cpp +++ b/engines/wintermute/BSurfaceSDL.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -68,9 +68,9 @@ CBSurfaceSDL::~CBSurfaceSDL() { HRESULT CBSurfaceSDL::Create(const char *Filename, bool default_ck, byte ck_red, byte ck_green, byte ck_blue, int LifeTime, bool KeepLoaded) { CBRenderSDL *renderer = static_cast(Game->_renderer); Common::String strFileName(Filename); - + Graphics::ImageDecoder *imgDecoder; - + if (strFileName.hasSuffix(".png")) { imgDecoder = new Graphics::PNGDecoder(); } else if (strFileName.hasSuffix(".bmp")) { @@ -78,10 +78,10 @@ HRESULT CBSurfaceSDL::Create(const char *Filename, bool default_ck, byte ck_red, } else { error("CBSurfaceSDL::Create : Unsupported fileformat %s", Filename); } - + CBFile *file = Game->_fileManager->OpenFile(Filename); if (!file) return E_FAIL; - + imgDecoder->loadStream(*file->getMemStream()); const Graphics::Surface *surface = imgDecoder->getSurface(); Game->_fileManager->CloseFile(file); @@ -98,41 +98,41 @@ HRESULT CBSurfaceSDL::Create(const char *Filename, bool default_ck, byte ck_red, bool isSaveGameGrayscale = scumm_strnicmp(Filename, "savegame:", 9) == 0 && (Filename[strFileName.size() - 1] == 'g' || Filename[strFileName.size() - 1] == 'G'); if (isSaveGameGrayscale) { warning("grayscaleConversion not yet implemented"); -/* FIBITMAP *newImg = FreeImage_ConvertToGreyscale(img); - if (newImg) { - FreeImage_Unload(img); - img = newImg; - }*/ + /* FIBITMAP *newImg = FreeImage_ConvertToGreyscale(img); + if (newImg) { + FreeImage_Unload(img); + img = newImg; + }*/ } // convert 32-bit BMPs to 24-bit or they appear totally transparent (does any app actually write alpha in BMP properly?) -/* if (FreeImage_GetBPP(img) != 32 || (imgFormat == FIF_BMP && FreeImage_GetBPP(img) != 24)) { - FIBITMAP *newImg = FreeImage_ConvertTo24Bits(img); - if (newImg) { - FreeImage_Unload(img); - img = newImg; - } else { - FreeImage_Unload(img); - return -1; - } - } - - FreeImage_FlipVertical(img);*/ + /* if (FreeImage_GetBPP(img) != 32 || (imgFormat == FIF_BMP && FreeImage_GetBPP(img) != 24)) { + FIBITMAP *newImg = FreeImage_ConvertTo24Bits(img); + if (newImg) { + FreeImage_Unload(img); + img = newImg; + } else { + FreeImage_Unload(img); + return -1; + } + } + + FreeImage_FlipVertical(img);*/ //TODO: This is rather endian-specific, but should be replaced by non-SDL-code anyhow: uint32 rmask = surface->format.rMax() << surface->format.rShift; uint32 gmask = surface->format.gMax() << surface->format.gShift; uint32 bmask = surface->format.bMax() << surface->format.bShift; uint32 amask = surface->format.aMax(); - + // SDL_Surface *surf = SDL_CreateRGBSurfaceFrom(surface->pixels, _width, _height, surface->format.bytesPerPixel * 8, surface->pitch, rmask, gmask, bmask, amask); // no alpha, set color key -/* if (surface->format.bytesPerPixel != 4) - SDL_SetColorKey(surf, SDL_TRUE, SDL_MapRGB(surf->format, ck_red, ck_green, ck_blue));*/ + /* if (surface->format.bytesPerPixel != 4) + SDL_SetColorKey(surf, SDL_TRUE, SDL_MapRGB(surf->format, ck_red, ck_green, ck_blue));*/ _surface = new Graphics::Surface(); _surface->copyFrom(*surface); - + //SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "best"); //TODO //_texture = SdlUtil::CreateTextureFromSurface(renderer->GetSdlRenderer(), surf); @@ -194,11 +194,11 @@ void CBSurfaceSDL::GenAlphaMask(Graphics::Surface *surface) { bool hasColorKey; Uint32 colorKey; Uint8 ckRed, ckGreen, ckBlue; -/* if (SDL_GetColorKey(surface, &colorKey) == 0) { - hasColorKey = true; - SDL_GetRGB(colorKey, surface->format, &ckRed, &ckGreen, &ckBlue); - } else hasColorKey = false; -*/ //TODO + /* if (SDL_GetColorKey(surface, &colorKey) == 0) { + hasColorKey = true; + SDL_GetRGB(colorKey, surface->format, &ckRed, &ckGreen, &ckBlue); + } else hasColorKey = false; + */ //TODO _alphaMask = new byte[surface->w * surface->h]; bool hasTransparency = false; @@ -438,7 +438,7 @@ HRESULT CBSurfaceSDL::DrawSprite(int X, int Y, RECT *Rect, float ZoomX, float Zo /* position.setWidth((float)srcRect.width() * ZoomX / 100.f); position.setHeight((float)srcRect.height() * ZoomX / 100.f); -*/ + */ position.setWidth(srcRect.width()); position.setHeight(srcRect.height()); diff --git a/engines/wintermute/BSurfaceSDL.h b/engines/wintermute/BSurfaceSDL.h index 71a74beb2d..5689e6234c 100644 --- a/engines/wintermute/BSurfaceSDL.h +++ b/engines/wintermute/BSurfaceSDL.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -59,9 +59,9 @@ public: HRESULT DisplayZoom(int X, int Y, RECT rect, float ZoomX, float ZoomY, uint32 Alpha = 0xFFFFFFFF, bool Transparent = false, TSpriteBlendMode BlendMode = BLEND_NORMAL, bool MirrorX = false, bool MirrorY = false); HRESULT DisplayTransform(int X, int Y, int HotX, int HotY, RECT Rect, float ZoomX, float ZoomY, uint32 Alpha, float Rotate, TSpriteBlendMode BlendMode = BLEND_NORMAL, bool MirrorX = false, bool MirrorY = false); -/* static unsigned DLL_CALLCONV ReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle); - static int DLL_CALLCONV SeekProc(fi_handle handle, long offset, int origin); - static long DLL_CALLCONV TellProc(fi_handle handle);*/ + /* static unsigned DLL_CALLCONV ReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle); + static int DLL_CALLCONV SeekProc(fi_handle handle, long offset, int origin); + static long DLL_CALLCONV TellProc(fi_handle handle);*/ private: // SDL_Texture *_texture; diff --git a/engines/wintermute/BSurfaceStorage.cpp b/engines/wintermute/BSurfaceStorage.cpp index 0e22ae64fb..567df7d1f5 100644 --- a/engines/wintermute/BSurfaceStorage.cpp +++ b/engines/wintermute/BSurfaceStorage.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BSurfaceStorage.h b/engines/wintermute/BSurfaceStorage.h index e91b2a3e84..6ebf2b3992 100644 --- a/engines/wintermute/BSurfaceStorage.h +++ b/engines/wintermute/BSurfaceStorage.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BTransitionMgr.cpp b/engines/wintermute/BTransitionMgr.cpp index 1d71fb656d..87cbb86a3d 100644 --- a/engines/wintermute/BTransitionMgr.cpp +++ b/engines/wintermute/BTransitionMgr.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BTransitionMgr.h b/engines/wintermute/BTransitionMgr.h index a0d9afebc8..2db5d4482e 100644 --- a/engines/wintermute/BTransitionMgr.h +++ b/engines/wintermute/BTransitionMgr.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BViewport.cpp b/engines/wintermute/BViewport.cpp index 718f98c939..397197a935 100644 --- a/engines/wintermute/BViewport.cpp +++ b/engines/wintermute/BViewport.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/BViewport.h b/engines/wintermute/BViewport.h index 7c90b568fb..98cc23ed25 100644 --- a/engines/wintermute/BViewport.h +++ b/engines/wintermute/BViewport.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/FontGlyphCache.cpp b/engines/wintermute/FontGlyphCache.cpp index d2ac984b29..feb5f33274 100644 --- a/engines/wintermute/FontGlyphCache.cpp +++ b/engines/wintermute/FontGlyphCache.cpp @@ -61,11 +61,11 @@ GlyphInfo *FontGlyphCache::GetGlyph(wchar_t ch) { /* ////////////////////////////////////////////////////////////////////////// void FontGlyphCache::AddGlyph(wchar_t ch, int glyphIndex, FT_GlyphSlot glyphSlot, size_t width, size_t height, byte *pixels, size_t stride) { - if (stride == 0) stride = width; + if (stride == 0) stride = width; - _glyphs[ch] = new GlyphInfo(glyphIndex); - _glyphs[ch]->SetGlyphInfo(glyphSlot->advance.x / 64.f, glyphSlot->advance.y / 64.f, glyphSlot->bitmap_left, glyphSlot->bitmap_top); - _glyphs[ch]->SetGlyphImage(width, height, stride, pixels); + _glyphs[ch] = new GlyphInfo(glyphIndex); + _glyphs[ch]->SetGlyphInfo(glyphSlot->advance.x / 64.f, glyphSlot->advance.y / 64.f, glyphSlot->bitmap_left, glyphSlot->bitmap_top); + _glyphs[ch]->SetGlyphImage(width, height, stride, pixels); } */ diff --git a/engines/wintermute/Matrix4.h b/engines/wintermute/Matrix4.h index 866d5cdf34..e372f5747f 100644 --- a/engines/wintermute/Matrix4.h +++ b/engines/wintermute/Matrix4.h @@ -39,14 +39,14 @@ public: void RotationZ(float angle); void TransformVector2(Vector2 &vec); -/* union { - struct { - float _11, _12, _13, _14; - float _21, _22, _23, _24; - float _31, _32, _33, _34; - float _41, _42, _43, _44; - };*/ - float m[4][4]; + /* union { + struct { + float _11, _12, _13, _14; + float _21, _22, _23, _24; + float _31, _32, _33, _34; + float _41, _42, _43, _44; + };*/ + float m[4][4]; //}; }; diff --git a/engines/wintermute/PartParticle.cpp b/engines/wintermute/PartParticle.cpp index 68f1c62c5a..63e0ca56d2 100644 --- a/engines/wintermute/PartParticle.cpp +++ b/engines/wintermute/PartParticle.cpp @@ -183,11 +183,11 @@ HRESULT CPartParticle::Display(CPartEmitter *Emitter) { _sprite->GetCurrentFrame(); return _sprite->Display(_pos.x, _pos.y, - NULL, - _scale, _scale, - DRGBA(255, 255, 255, _currentAlpha), - _rotation, - Emitter->_blendMode); + NULL, + _scale, _scale, + DRGBA(255, 255, 255, _currentAlpha), + _rotation, + Emitter->_blendMode); } diff --git a/engines/wintermute/PathUtil.cpp b/engines/wintermute/PathUtil.cpp index aea35e395f..336667525c 100644 --- a/engines/wintermute/PathUtil.cpp +++ b/engines/wintermute/PathUtil.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -89,7 +89,7 @@ AnsiString PathUtil::GetFileName(const AnsiString &path) { AnsiString newPath = UnifySeparators(path); //size_t pos = newPath.find_last_of(L'/'); TODO REMOVE. - Common::String lastPart = Common::lastPathComponent(path,'/'); + Common::String lastPart = Common::lastPathComponent(path, '/'); if (lastPart[lastPart.size() - 1 ] != '/') return lastPart; else diff --git a/engines/wintermute/PathUtil.h b/engines/wintermute/PathUtil.h index 72dcf806b1..a07e3f6af2 100644 --- a/engines/wintermute/PathUtil.h +++ b/engines/wintermute/PathUtil.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/PlatformSDL.cpp b/engines/wintermute/PlatformSDL.cpp index 2837e16be6..8c6cc8d2e3 100644 --- a/engines/wintermute/PlatformSDL.cpp +++ b/engines/wintermute/PlatformSDL.cpp @@ -242,51 +242,51 @@ void CBPlatform::HandleEvent(Common::Event *event) { case Common::EVENT_MBUTTONUP: if (Game) Game->OnMouseMiddleUp(); break; -/*#ifdef __IPHONEOS__ - { - CBRenderSDL *renderer = static_cast(Game->_renderer); - POINT p; - GetCursorPos(&p); - Game->SetActiveObject(renderer->GetObjectAt(p.x, p.y)); - - if (Game->_activeObject != NULL && strcmp(Game->_activeObject->GetClassName(), "CUIButton") == 0) { - CUIButton *btn = static_cast(Game->_activeObject); - if (btn->_visible && !btn->_disable) btn->_press = true; - } - } -#endif*/ + /*#ifdef __IPHONEOS__ + { + CBRenderSDL *renderer = static_cast(Game->_renderer); + POINT p; + GetCursorPos(&p); + Game->SetActiveObject(renderer->GetObjectAt(p.x, p.y)); + + if (Game->_activeObject != NULL && strcmp(Game->_activeObject->GetClassName(), "CUIButton") == 0) { + CUIButton *btn = static_cast(Game->_activeObject); + if (btn->_visible && !btn->_disable) btn->_press = true; + } + } + #endif*/ //TODO -/* case SDL_MOUSEWHEEL: - if (Game) Game->HandleMouseWheel(event->wheel.y); - break; - - case SDL_KEYDOWN: - case SDL_TEXTINPUT: - if (Game) Game->HandleKeypress(event); - break; - - case SDL_WINDOWEVENT: - switch (event->window.event) { - case SDL_WINDOWEVENT_FOCUS_GAINED: - case SDL_WINDOWEVENT_RESTORED: - if (Game) Game->OnActivate(true, true); - SDL_ShowCursor(SDL_DISABLE); - break; - case SDL_WINDOWEVENT_FOCUS_LOST: - case SDL_WINDOWEVENT_MINIMIZED: -#ifndef __IPHONEOS__ - if (Game) Game->OnActivate(false, false); - SDL_ShowCursor(SDL_ENABLE); -#endif - break; - - case SDL_WINDOWEVENT_CLOSE: - break; - - } - break; -*/ + /* case SDL_MOUSEWHEEL: + if (Game) Game->HandleMouseWheel(event->wheel.y); + break; + + case SDL_KEYDOWN: + case SDL_TEXTINPUT: + if (Game) Game->HandleKeypress(event); + break; + + case SDL_WINDOWEVENT: + switch (event->window.event) { + case SDL_WINDOWEVENT_FOCUS_GAINED: + case SDL_WINDOWEVENT_RESTORED: + if (Game) Game->OnActivate(true, true); + SDL_ShowCursor(SDL_DISABLE); + break; + case SDL_WINDOWEVENT_FOCUS_LOST: + case SDL_WINDOWEVENT_MINIMIZED: + #ifndef __IPHONEOS__ + if (Game) Game->OnActivate(false, false); + SDL_ShowCursor(SDL_ENABLE); + #endif + break; + + case SDL_WINDOWEVENT_CLOSE: + break; + + } + break; + */ case Common::EVENT_QUIT: #ifdef __IPHONEOS__ if (Game) { @@ -308,12 +308,12 @@ void CBPlatform::HandleEvent(Common::Event *event) { ////////////////////////////////////////////////////////////////////////// int CBPlatform::SDLEventWatcher(void *userdata, Common::Event *event) { //TODO -/* if (event->type == SDL_WINDOWEVENT && event->window.event == SDL_WINDOWEVENT_MINIMIZED) { - if (Game) Game->AutoSaveOnExit(); - if (Game) Game->OnActivate(false, false); - SDL_ShowCursor(SDL_ENABLE); - } -*/ + /* if (event->type == SDL_WINDOWEVENT && event->window.event == SDL_WINDOWEVENT_MINIMIZED) { + if (Game) Game->AutoSaveOnExit(); + if (Game) Game->OnActivate(false, false); + SDL_ShowCursor(SDL_ENABLE); + } + */ return 1; } diff --git a/engines/wintermute/PlatformSDL.h b/engines/wintermute/PlatformSDL.h index cfb5b6e930..27de188030 100644 --- a/engines/wintermute/PlatformSDL.h +++ b/engines/wintermute/PlatformSDL.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/StringUtil.cpp b/engines/wintermute/StringUtil.cpp index 8ef6c55e88..d98f60d582 100644 --- a/engines/wintermute/StringUtil.cpp +++ b/engines/wintermute/StringUtil.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -43,7 +43,7 @@ void StringUtil::ToLowerCase(AnsiString &str) { ////////////////////////////////////////////////////////////////////////// /*void StringUtil::ToLowerCase(WideString &str) { - std::transform(str.begin(), str.end(), str.begin(), ::towlower); + std::transform(str.begin(), str.end(), str.begin(), ::towlower); }*/ ////////////////////////////////////////////////////////////////////////// @@ -53,7 +53,7 @@ void StringUtil::ToUpperCase(AnsiString &str) { ////////////////////////////////////////////////////////////////////////// /*void StringUtil::ToUpperCase(WideString &str) { - std::transform(str.begin(), str.end(), str.begin(), ::towupper); + std::transform(str.begin(), str.end(), str.begin(), ::towupper); }*/ ////////////////////////////////////////////////////////////////////////// @@ -69,110 +69,110 @@ bool StringUtil::CompareNoCase(const AnsiString &str1, const AnsiString &str2) { ////////////////////////////////////////////////////////////////////////// /*bool StringUtil::CompareNoCase(const WideString &str1, const WideString &str2) { - WideString str1lc = str1; - WideString str2lc = str2; + WideString str1lc = str1; + WideString str2lc = str2; - ToLowerCase(str1lc); - ToLowerCase(str2lc); + ToLowerCase(str1lc); + ToLowerCase(str2lc); - return (str1lc == str2lc); + return (str1lc == str2lc); }*/ ////////////////////////////////////////////////////////////////////////// WideString StringUtil::Utf8ToWide(const Utf8String &Utf8Str) { error("StringUtil::Utf8ToWide - WideString not supported yet"); -/* size_t WideSize = Utf8Str.size(); - - if (sizeof(wchar_t) == 2) { - wchar_t *WideStringNative = new wchar_t[WideSize + 1]; - - const UTF8 *SourceStart = reinterpret_cast(Utf8Str.c_str()); - const UTF8 *SourceEnd = SourceStart + WideSize; - - UTF16 *TargetStart = reinterpret_cast(WideStringNative); - UTF16 *TargetEnd = TargetStart + WideSize + 1; - - ConversionResult res = ConvertUTF8toUTF16(&SourceStart, SourceEnd, &TargetStart, TargetEnd, strictConversion); - if (res != conversionOK) { - delete [] WideStringNative; - return L""; - } - *TargetStart = 0; - WideString ResultString(WideStringNative); - delete [] WideStringNative; - - return ResultString; - } else if (sizeof(wchar_t) == 4) { - wchar_t *WideStringNative = new wchar_t[WideSize + 1]; - - const UTF8 *SourceStart = reinterpret_cast(Utf8Str.c_str()); - const UTF8 *SourceEnd = SourceStart + WideSize; - - UTF32 *TargetStart = reinterpret_cast(WideStringNative); - UTF32 *TargetEnd = TargetStart + WideSize; - - ConversionResult res = ConvertUTF8toUTF32(&SourceStart, SourceEnd, &TargetStart, TargetEnd, strictConversion); - if (res != conversionOK) { - delete [] WideStringNative; - return L""; - } - *TargetStart = 0; - WideString ResultString(WideStringNative); - delete [] WideStringNative; - - return ResultString; - } else { - return L""; - }*/ + /* size_t WideSize = Utf8Str.size(); + + if (sizeof(wchar_t) == 2) { + wchar_t *WideStringNative = new wchar_t[WideSize + 1]; + + const UTF8 *SourceStart = reinterpret_cast(Utf8Str.c_str()); + const UTF8 *SourceEnd = SourceStart + WideSize; + + UTF16 *TargetStart = reinterpret_cast(WideStringNative); + UTF16 *TargetEnd = TargetStart + WideSize + 1; + + ConversionResult res = ConvertUTF8toUTF16(&SourceStart, SourceEnd, &TargetStart, TargetEnd, strictConversion); + if (res != conversionOK) { + delete [] WideStringNative; + return L""; + } + *TargetStart = 0; + WideString ResultString(WideStringNative); + delete [] WideStringNative; + + return ResultString; + } else if (sizeof(wchar_t) == 4) { + wchar_t *WideStringNative = new wchar_t[WideSize + 1]; + + const UTF8 *SourceStart = reinterpret_cast(Utf8Str.c_str()); + const UTF8 *SourceEnd = SourceStart + WideSize; + + UTF32 *TargetStart = reinterpret_cast(WideStringNative); + UTF32 *TargetEnd = TargetStart + WideSize; + + ConversionResult res = ConvertUTF8toUTF32(&SourceStart, SourceEnd, &TargetStart, TargetEnd, strictConversion); + if (res != conversionOK) { + delete [] WideStringNative; + return L""; + } + *TargetStart = 0; + WideString ResultString(WideStringNative); + delete [] WideStringNative; + + return ResultString; + } else { + return L""; + }*/ return ""; } ////////////////////////////////////////////////////////////////////////// Utf8String StringUtil::WideToUtf8(const WideString &WideStr) { error("StringUtil::WideToUtf8 - Widestring not supported yet"); -/* size_t WideSize = WideStr.length(); - - if (sizeof(wchar_t) == 2) { - size_t Utf8Size = 3 * WideSize + 1; - char *Utf8StringNative = new char[Utf8Size]; - - const UTF16 *SourceStart = reinterpret_cast(WideStr.c_str()); - const UTF16 *SourceEnd = SourceStart + WideSize; - - UTF8 *TargetStart = reinterpret_cast(Utf8StringNative); - UTF8 *TargetEnd = TargetStart + Utf8Size; - - ConversionResult res = ConvertUTF16toUTF8(&SourceStart, SourceEnd, &TargetStart, TargetEnd, strictConversion); - if (res != conversionOK) { - delete [] Utf8StringNative; - return (Utf8String)""; - } - *TargetStart = 0; - Utf8String ResultString(Utf8StringNative); - delete [] Utf8StringNative; - return ResultString; - } else if (sizeof(wchar_t) == 4) { - size_t Utf8Size = 4 * WideSize + 1; - char *Utf8StringNative = new char[Utf8Size]; - - const UTF32 *SourceStart = reinterpret_cast(WideStr.c_str()); - const UTF32 *SourceEnd = SourceStart + WideSize; - - UTF8 *TargetStart = reinterpret_cast(Utf8StringNative); - UTF8 *TargetEnd = TargetStart + Utf8Size; - - ConversionResult res = ConvertUTF32toUTF8(&SourceStart, SourceEnd, &TargetStart, TargetEnd, strictConversion); - if (res != conversionOK) { - delete [] Utf8StringNative; - return (Utf8String)""; - } - *TargetStart = 0; - Utf8String ResultString(Utf8StringNative); - delete [] Utf8StringNative; - return ResultString; - } else { - return (Utf8String)""; - }*/ + /* size_t WideSize = WideStr.length(); + + if (sizeof(wchar_t) == 2) { + size_t Utf8Size = 3 * WideSize + 1; + char *Utf8StringNative = new char[Utf8Size]; + + const UTF16 *SourceStart = reinterpret_cast(WideStr.c_str()); + const UTF16 *SourceEnd = SourceStart + WideSize; + + UTF8 *TargetStart = reinterpret_cast(Utf8StringNative); + UTF8 *TargetEnd = TargetStart + Utf8Size; + + ConversionResult res = ConvertUTF16toUTF8(&SourceStart, SourceEnd, &TargetStart, TargetEnd, strictConversion); + if (res != conversionOK) { + delete [] Utf8StringNative; + return (Utf8String)""; + } + *TargetStart = 0; + Utf8String ResultString(Utf8StringNative); + delete [] Utf8StringNative; + return ResultString; + } else if (sizeof(wchar_t) == 4) { + size_t Utf8Size = 4 * WideSize + 1; + char *Utf8StringNative = new char[Utf8Size]; + + const UTF32 *SourceStart = reinterpret_cast(WideStr.c_str()); + const UTF32 *SourceEnd = SourceStart + WideSize; + + UTF8 *TargetStart = reinterpret_cast(Utf8StringNative); + UTF8 *TargetEnd = TargetStart + Utf8Size; + + ConversionResult res = ConvertUTF32toUTF8(&SourceStart, SourceEnd, &TargetStart, TargetEnd, strictConversion); + if (res != conversionOK) { + delete [] Utf8StringNative; + return (Utf8String)""; + } + *TargetStart = 0; + Utf8String ResultString(Utf8StringNative); + delete [] Utf8StringNative; + return ResultString; + } else { + return (Utf8String)""; + }*/ return ""; } @@ -180,13 +180,13 @@ Utf8String StringUtil::WideToUtf8(const WideString &WideStr) { WideString StringUtil::AnsiToWide(const AnsiString &str) { // using default os locale! error("StringUtil::AnsiToWide - WideString not supported yet"); -/* setlocale(LC_CTYPE, ""); - size_t WideSize = mbstowcs(NULL, str.c_str(), 0) + 1; - wchar_t *wstr = new wchar_t[WideSize]; - mbstowcs(wstr, str.c_str(), WideSize); - WideString ResultString(wstr); - delete [] wstr; - return ResultString;*/ + /* setlocale(LC_CTYPE, ""); + size_t WideSize = mbstowcs(NULL, str.c_str(), 0) + 1; + wchar_t *wstr = new wchar_t[WideSize]; + mbstowcs(wstr, str.c_str(), WideSize); + WideString ResultString(wstr); + delete [] wstr; + return ResultString;*/ return ""; } @@ -194,37 +194,37 @@ WideString StringUtil::AnsiToWide(const AnsiString &str) { AnsiString StringUtil::WideToAnsi(const WideString &wstr) { // using default os locale! error("StringUtil::WideToAnsi - WideString not supported yet"); -/* setlocale(LC_CTYPE, ""); - size_t WideSize = wcstombs(NULL, wstr.c_str(), 0) + 1; - char *str = new char[WideSize]; - wcstombs(str, wstr.c_str(), WideSize); - AnsiString ResultString(str); - delete [] str; - return ResultString;*/ + /* setlocale(LC_CTYPE, ""); + size_t WideSize = wcstombs(NULL, wstr.c_str(), 0) + 1; + char *str = new char[WideSize]; + wcstombs(str, wstr.c_str(), WideSize); + AnsiString ResultString(str); + delete [] str; + return ResultString;*/ return ""; } ////////////////////////////////////////////////////////////////////////// bool StringUtil::StartsWith(const AnsiString &str, const AnsiString &pattern, bool ignoreCase) { -/* size_t strLength = str.size(); - size_t patternLength = pattern.size(); + /* size_t strLength = str.size(); + size_t patternLength = pattern.size(); - if (strLength < patternLength || patternLength == 0) - return false; + if (strLength < patternLength || patternLength == 0) + return false; - AnsiString startPart = str.substr(0, patternLength); + AnsiString startPart = str.substr(0, patternLength); - if (ignoreCase) return CompareNoCase(startPart, pattern); - else return (startPart == pattern);*/ + if (ignoreCase) return CompareNoCase(startPart, pattern); + else return (startPart == pattern);*/ if (!ignoreCase) return str.hasPrefix(pattern); else { size_t strLength = str.size(); size_t patternLength = pattern.size(); - + if (strLength < patternLength || patternLength == 0) return false; - + AnsiString startPart(str.c_str(), patternLength); uint32 likeness = str.compareToIgnoreCase(pattern.c_str()); return (likeness == 0); @@ -233,25 +233,25 @@ bool StringUtil::StartsWith(const AnsiString &str, const AnsiString &pattern, bo ////////////////////////////////////////////////////////////////////////// bool StringUtil::EndsWith(const AnsiString &str, const AnsiString &pattern, bool ignoreCase) { -/* size_t strLength = str.size(); // TODO: Remove - size_t patternLength = pattern.size(); + /* size_t strLength = str.size(); // TODO: Remove + size_t patternLength = pattern.size(); - if (strLength < patternLength || patternLength == 0) - return false; + if (strLength < patternLength || patternLength == 0) + return false; - AnsiString endPart = str.substr(strLength - patternLength, patternLength); + AnsiString endPart = str.substr(strLength - patternLength, patternLength); - if (ignoreCase) return CompareNoCase(endPart, pattern); - else return (endPart == pattern);*/ + if (ignoreCase) return CompareNoCase(endPart, pattern); + else return (endPart == pattern);*/ if (!ignoreCase) { return str.hasSuffix(pattern); } else { size_t strLength = str.size(); size_t patternLength = pattern.size(); - + if (strLength < patternLength || patternLength == 0) return false; - + Common::String endPart(str.c_str() + (strLength - patternLength), patternLength); uint32 likeness = str.compareToIgnoreCase(pattern.c_str()); return (likeness != 0); @@ -272,19 +272,19 @@ AnsiString StringUtil::Replace(const AnsiString &str, const AnsiString &from, co size_t pos = 0; while (result.contains(from)) { - const char* startPtr = strstr(result.c_str(), from.c_str()); + const char *startPtr = strstr(result.c_str(), from.c_str()); uint32 index = startPtr - result.c_str(); - + Common::String tail(result.c_str() + index + to.size()); result = Common::String(result.c_str(), index); result += to; result += tail; - -/* pos = result.find(from, pos); - if (pos == result.npos) break; - result.replace(pos, from.size(), to); - pos += to.size();*/ + /* pos = result.find(from, pos); + if (pos == result.npos) break; + + result.replace(pos, from.size(), to); + pos += to.size();*/ } return result; @@ -311,7 +311,7 @@ int StringUtil::IndexOf(const WideString &str, const WideString &toFind, size_t /*size_t pos = str.find(toFind, startFrom); if (pos == str.npos) return -1; else return pos;*/ - const char* index = strstr(str.c_str(), toFind.c_str()); + const char *index = strstr(str.c_str(), toFind.c_str()); if (index == NULL) return -1; else @@ -328,7 +328,7 @@ int StringUtil::LastIndexOf(const WideString &str, const WideString &toFind, siz for (int i = startFrom; i < str.size(); i++) { found = false; for (int j = 0; j < toFind.size(); j++) { - if (str[i+j] != toFind[j]) { + if (str[i + j] != toFind[j]) { found = false; break; } else { @@ -343,33 +343,33 @@ int StringUtil::LastIndexOf(const WideString &str, const WideString &toFind, siz ////////////////////////////////////////////////////////////////////////// AnsiString StringUtil::ToString(size_t val) { -/* std::ostringstream str; - str << val; - return str.str();*/ + /* std::ostringstream str; + str << val; + return str.str();*/ return Common::String::format("%u", val); } ////////////////////////////////////////////////////////////////////////// AnsiString StringUtil::ToString(int val) { -/* std::ostringstream str; - str << val; - return str.str();*/ + /* std::ostringstream str; + str << val; + return str.str();*/ return Common::String::format("%d", val); } ////////////////////////////////////////////////////////////////////////// AnsiString StringUtil::ToString(float val) { -/* std::ostringstream str; - str << val; - return str.str();*/ + /* std::ostringstream str; + str << val; + return str.str();*/ return Common::String::format("%f", val); } ////////////////////////////////////////////////////////////////////////// AnsiString StringUtil::ToString(double val) { -/* std::ostringstream str; - str << val; - return str.str();*/ + /* std::ostringstream str; + str << val; + return str.str();*/ return Common::String::format("%f", val); } diff --git a/engines/wintermute/StringUtil.h b/engines/wintermute/StringUtil.h index f62f82db9a..1d3da609b6 100644 --- a/engines/wintermute/StringUtil.h +++ b/engines/wintermute/StringUtil.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/SysClass.cpp b/engines/wintermute/SysClass.cpp index b20c3f934a..90ac06eb80 100644 --- a/engines/wintermute/SysClass.cpp +++ b/engines/wintermute/SysClass.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -88,12 +88,12 @@ CSysInstance *CSysClass::AddInstance(void *instance, int id, int savedId) { bool CSysClass::RemoveInstance(void *instance) { InstanceMap::iterator mapIt = _instanceMap.find(instance); if (mapIt == _instanceMap.end()) return false; -/* - Instances::iterator it = _instances.find((*mapIt).second); - if (it != _instances.end()) { - delete(*it); - _instances.erase(it); - }*/ + /* + Instances::iterator it = _instances.find((*mapIt).second); + if (it != _instances.end()) { + delete(*it); + _instances.erase(it); + }*/ delete mapIt->_value; _instanceMap.erase(mapIt); @@ -113,7 +113,7 @@ void *CSysClass::IDToPointer(int savedID) { //slow /*Instances::iterator it; for (it = _instances.begin(); it != _instances.end(); ++it) { - if ((*it)->GetSavedID() == savedID) return (*it)->GetInstance(); + if ((*it)->GetSavedID() == savedID) return (*it)->GetInstance(); }*/ InstanceMap::iterator it; for (it = _instanceMap.begin(); it != _instanceMap.end(); ++it) { @@ -130,7 +130,7 @@ int CSysClass::GetNumInstances() { ////////////////////////////////////////////////////////////////////////// void CSysClass::Dump(void *stream) { - fprintf((FILE*)stream, "%03d %c %-20s instances: %d\n", _iD, _persistent ? 'p' : ' ', _name.c_str(), GetNumInstances()); + fprintf((FILE *)stream, "%03d %c %-20s instances: %d\n", _iD, _persistent ? 'p' : ' ', _name.c_str(), GetNumInstances()); } ////////////////////////////////////////////////////////////////////////// @@ -146,7 +146,7 @@ void CSysClass::SaveTable(CBGame *Game, CBPersistMgr *PersistMgr) { /* Instances::iterator it; for (it = _instances.begin(); it != _instances.end(); ++it) { - PersistMgr->PutDWORD((*it)->GetID()); + PersistMgr->PutDWORD((*it)->GetID()); }*/ } @@ -165,7 +165,7 @@ void CSysClass::LoadTable(CBGame *Game, CBPersistMgr *PersistMgr) { } InstanceMap::iterator it = _instanceMap.begin(); -/* Instances::iterator it = _instances.begin();*/ + /* Instances::iterator it = _instances.begin();*/ if (it != _instanceMap.end()) { (it->_value)->SetSavedID(instId); CSysClassRegistry::GetInstance()->AddInstanceToTable((it->_value), (it->_value)->GetInstance()); diff --git a/engines/wintermute/SysClass.h b/engines/wintermute/SysClass.h index ca9ffe0082..df319b5d9b 100644 --- a/engines/wintermute/SysClass.h +++ b/engines/wintermute/SysClass.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -39,8 +39,10 @@ namespace Common { template struct Hash; -template<> struct Hash : public UnaryFunction { - uint operator()(void* val) const { return (uint)((size_t)val); } +template<> struct Hash : public UnaryFunction { + uint operator()(void *val) const { + return (uint)((size_t)val); + } }; } diff --git a/engines/wintermute/SysClassRegistry.cpp b/engines/wintermute/SysClassRegistry.cpp index 64dfa6a988..bd86502023 100644 --- a/engines/wintermute/SysClassRegistry.cpp +++ b/engines/wintermute/SysClassRegistry.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/SysClassRegistry.h b/engines/wintermute/SysClassRegistry.h index 84c4053ee9..1f92c94164 100644 --- a/engines/wintermute/SysClassRegistry.h +++ b/engines/wintermute/SysClassRegistry.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -45,9 +45,11 @@ class CSysClass; } namespace Common { -template struct Hash; -template<> struct Hash : public UnaryFunction { - uint operator()(WinterMute::CSysClass* val) const { return (uint)((size_t)val); } +template struct Hash; +template<> struct Hash : public UnaryFunction { + uint operator()(WinterMute::CSysClass *val) const { + return (uint)((size_t)val); + } }; } diff --git a/engines/wintermute/SysInstance.cpp b/engines/wintermute/SysInstance.cpp index fbbfea87cd..9e6a459bfc 100644 --- a/engines/wintermute/SysInstance.cpp +++ b/engines/wintermute/SysInstance.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/SysInstance.h b/engines/wintermute/SysInstance.h index 80221d13a9..b8e2531c4b 100644 --- a/engines/wintermute/SysInstance.h +++ b/engines/wintermute/SysInstance.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UIButton.cpp b/engines/wintermute/UIButton.cpp index 988760f567..15a9d6f49b 100644 --- a/engines/wintermute/UIButton.cpp +++ b/engines/wintermute/UIButton.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -562,8 +562,8 @@ void CUIButton::CorrectSize() { if (_text) { int text_height; - if (_font) text_height = _font->GetTextHeight((byte *)_text, _width); - else text_height = Game->_systemFont->GetTextHeight((byte *)_text, _width); + if (_font) text_height = _font->GetTextHeight((byte *)_text, _width); + else text_height = Game->_systemFont->GetTextHeight((byte *)_text, _width); if (text_height > _height) _height = text_height; } @@ -631,8 +631,8 @@ HRESULT CUIButton::Display(int OffsetX, int OffsetY) { if (image) image->Draw(ImageX + ((_press || _oneTimePress) && back ? 1 : 0), ImageY + ((_press || _oneTimePress) && back ? 1 : 0), _pixelPerfect ? this : NULL); if (font && _text) { - int text_offset = (_height - font->GetTextHeight((byte *)_text, _width)) / 2; - font->DrawText((byte *)_text, OffsetX + _posX + ((_press || _oneTimePress) ? 1 : 0), OffsetY + _posY + text_offset + ((_press || _oneTimePress) ? 1 : 0), _width, _align); + int text_offset = (_height - font->GetTextHeight((byte *)_text, _width)) / 2; + font->DrawText((byte *)_text, OffsetX + _posX + ((_press || _oneTimePress) ? 1 : 0), OffsetY + _posY + text_offset + ((_press || _oneTimePress) ? 1 : 0), _width, _align); } if (!_pixelPerfect || !_image) Game->_renderer->_rectList.Add(new CBActiveRect(Game, this, NULL, OffsetX + _posX, OffsetY + _posY, _width, _height, 100, 100, false)); diff --git a/engines/wintermute/UIButton.h b/engines/wintermute/UIButton.h index a07b2adce6..de50431f2d 100644 --- a/engines/wintermute/UIButton.h +++ b/engines/wintermute/UIButton.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UIEdit.cpp b/engines/wintermute/UIEdit.cpp index 3c2abebd33..642504e82e 100644 --- a/engines/wintermute/UIEdit.cpp +++ b/engines/wintermute/UIEdit.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -573,13 +573,13 @@ HRESULT CUIEdit::Display(int OffsetX, int OffsetY) { _selEnd = MIN((size_t)_selEnd, strlen(_text)); //int CursorWidth = font->GetCharWidth(_cursorChar[0]); - int CursorWidth = font->GetTextWidth((byte *)_cursorChar); + int CursorWidth = font->GetTextWidth((byte *)_cursorChar); int s1, s2; bool CurFirst; // modify scroll offset if (_selStart >= _selEnd) { - while (font->GetTextWidth((byte *)_text + _scrollOffset, std::max(0, _selEnd - _scrollOffset)) > _width - CursorWidth - 2 * _frameWidth) { + while (font->GetTextWidth((byte *)_text + _scrollOffset, std::max(0, _selEnd - _scrollOffset)) > _width - CursorWidth - 2 * _frameWidth) { _scrollOffset++; if (_scrollOffset >= strlen(_text)) break; } @@ -590,8 +590,8 @@ HRESULT CUIEdit::Display(int OffsetX, int OffsetY) { s2 = _selStart; CurFirst = true; } else { - while (font->GetTextWidth((byte *)_text + _scrollOffset, std::max(0, _selStart - _scrollOffset)) + - sfont->GetTextWidth((byte *)(_text + std::max(_scrollOffset, _selStart)), _selEnd - std::max(_scrollOffset, _selStart)) + while (font->GetTextWidth((byte *)_text + _scrollOffset, std::max(0, _selStart - _scrollOffset)) + + sfont->GetTextWidth((byte *)(_text + std::max(_scrollOffset, _selStart)), _selEnd - std::max(_scrollOffset, _selStart)) > _width - CursorWidth - 2 * _frameWidth) { _scrollOffset++; @@ -625,9 +625,9 @@ HRESULT CUIEdit::Display(int OffsetX, int OffsetY) { // unselected 1 if (s1 > _scrollOffset) { - if (Count) font->DrawText((byte *)_text + _scrollOffset, xxx, yyy, width - xxx, Align, height, s1 - _scrollOffset); - xxx += font->GetTextWidth((byte *)_text + _scrollOffset, s1 - _scrollOffset); - AlignOffset += font->GetTextWidth((byte *)_text + _scrollOffset, s1 - _scrollOffset); + if (Count) font->DrawText((byte *)_text + _scrollOffset, xxx, yyy, width - xxx, Align, height, s1 - _scrollOffset); + xxx += font->GetTextWidth((byte *)_text + _scrollOffset, s1 - _scrollOffset); + AlignOffset += font->GetTextWidth((byte *)_text + _scrollOffset, s1 - _scrollOffset); } // cursor @@ -638,7 +638,7 @@ HRESULT CUIEdit::Display(int OffsetX, int OffsetY) { _cursorVisible = !_cursorVisible; } if (_cursorVisible) - font->DrawText((byte *)_cursorChar, xxx, yyy, width - xxx, Align, height, 1); + font->DrawText((byte *)_cursorChar, xxx, yyy, width - xxx, Align, height, 1); } xxx += CursorWidth; AlignOffset += CursorWidth; @@ -648,9 +648,9 @@ HRESULT CUIEdit::Display(int OffsetX, int OffsetY) { int s3 = std::max(s1, _scrollOffset); if (s2 - s3 > 0) { - if (Count) sfont->DrawText((byte *)_text + s3, xxx, yyy, width - xxx, Align, height, s2 - s3); - xxx += sfont->GetTextWidth((byte *)_text + s3, s2 - s3); - AlignOffset += sfont->GetTextWidth((byte *)_text + s3, s2 - s3); + if (Count) sfont->DrawText((byte *)_text + s3, xxx, yyy, width - xxx, Align, height, s2 - s3); + xxx += sfont->GetTextWidth((byte *)_text + s3, s2 - s3); + AlignOffset += sfont->GetTextWidth((byte *)_text + s3, s2 - s3); } // cursor @@ -661,15 +661,15 @@ HRESULT CUIEdit::Display(int OffsetX, int OffsetY) { _cursorVisible = !_cursorVisible; } if (_cursorVisible) - font->DrawText((byte *)_cursorChar, xxx, yyy, width - xxx, Align, height, 1); + font->DrawText((byte *)_cursorChar, xxx, yyy, width - xxx, Align, height, 1); } xxx += CursorWidth; AlignOffset += CursorWidth; } // unselected 2 - if (Count) font->DrawText((byte *)_text + s2, xxx, yyy, width - xxx, Align, height); - AlignOffset += font->GetTextWidth((byte *)_text + s2); + if (Count) font->DrawText((byte *)_text + s2, xxx, yyy, width - xxx, Align, height); + AlignOffset += font->GetTextWidth((byte *)_text + s2); AlignOffset = (_width - 2 * _frameWidth) - AlignOffset; if (AlignOffset < 0) AlignOffset = 0; @@ -775,7 +775,7 @@ bool CUIEdit::HandleKeypress(Common::Event *event) { if (_selStart != _selEnd) DeleteChars(_selStart, _selEnd); WideString wstr = StringUtil::Utf8ToWide(event->text.text); - _selEnd += InsertChars(_selEnd, (byte *)StringUtil::WideToAnsi(wstr).c_str(), 1); + _selEnd += InsertChars(_selEnd, (byte *)StringUtil::WideToAnsi(wstr).c_str(), 1); if (Game->_textRTL) _selEnd = _selStart; else _selStart = _selEnd; diff --git a/engines/wintermute/UIEdit.h b/engines/wintermute/UIEdit.h index 05c6f14973..762332e60c 100644 --- a/engines/wintermute/UIEdit.h +++ b/engines/wintermute/UIEdit.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UIEntity.cpp b/engines/wintermute/UIEntity.cpp index ca4528e6cf..f0b7e7a68f 100644 --- a/engines/wintermute/UIEntity.cpp +++ b/engines/wintermute/UIEntity.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UIEntity.h b/engines/wintermute/UIEntity.h index 3b8107b5d7..f55160b4d4 100644 --- a/engines/wintermute/UIEntity.h +++ b/engines/wintermute/UIEntity.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UIObject.cpp b/engines/wintermute/UIObject.cpp index 8a25c56cf5..468ababfc1 100644 --- a/engines/wintermute/UIObject.cpp +++ b/engines/wintermute/UIObject.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UIObject.h b/engines/wintermute/UIObject.h index 6646887a2c..1f982ce830 100644 --- a/engines/wintermute/UIObject.h +++ b/engines/wintermute/UIObject.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UIText.cpp b/engines/wintermute/UIText.cpp index d0770224c5..92e917ab36 100644 --- a/engines/wintermute/UIText.cpp +++ b/engines/wintermute/UIText.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -79,12 +79,12 @@ HRESULT CUIText::Display(int OffsetX, int OffsetY) { text_offset = 0; break; case VAL_BOTTOM: - text_offset = _height - font->GetTextHeight((byte *)_text, _width); + text_offset = _height - font->GetTextHeight((byte *)_text, _width); break; default: - text_offset = (_height - font->GetTextHeight((byte *)_text, _width)) / 2; + text_offset = (_height - font->GetTextHeight((byte *)_text, _width)) / 2; } - font->DrawText((byte *)_text, OffsetX + _posX, OffsetY + _posY + text_offset, _width, _textAlign, _height); + font->DrawText((byte *)_text, OffsetX + _posX, OffsetY + _posY + text_offset, _width, _textAlign, _height); } //Game->_renderer->_rectList.Add(new CBActiveRect(Game, this, NULL, OffsetX + _posX, OffsetY + _posY, _width, _height, 100, 100, false)); @@ -387,7 +387,7 @@ HRESULT CUIText::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "HeightToFit") == 0) { Stack->CorrectParams(0); - if (_font && _text) _height = _font->GetTextHeight((byte *)_text, _width); + if (_font && _text) _height = _font->GetTextHeight((byte *)_text, _width); Stack->PushNULL(); return S_OK; } @@ -475,8 +475,8 @@ HRESULT CUIText::Persist(CBPersistMgr *PersistMgr) { ////////////////////////////////////////////////////////////////////////// HRESULT CUIText::SizeToFit() { if (_font && _text) { - _width = _font->GetTextWidth((byte *)_text); - _height = _font->GetTextHeight((byte *)_text, _width); + _width = _font->GetTextWidth((byte *)_text); + _height = _font->GetTextHeight((byte *)_text, _width); } return S_OK; } diff --git a/engines/wintermute/UIText.h b/engines/wintermute/UIText.h index aef5ea1be7..8071461ede 100644 --- a/engines/wintermute/UIText.h +++ b/engines/wintermute/UIText.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UITiledImage.cpp b/engines/wintermute/UITiledImage.cpp index 4cdf9370fc..1f210fd89d 100644 --- a/engines/wintermute/UITiledImage.cpp +++ b/engines/wintermute/UITiledImage.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UITiledImage.h b/engines/wintermute/UITiledImage.h index 6e4b4d31d3..03d15a0daa 100644 --- a/engines/wintermute/UITiledImage.h +++ b/engines/wintermute/UITiledImage.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/UIWindow.cpp b/engines/wintermute/UIWindow.cpp index db5e91a23c..eeeb11d836 100644 --- a/engines/wintermute/UIWindow.cpp +++ b/engines/wintermute/UIWindow.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -182,7 +182,7 @@ HRESULT CUIWindow::Display(int OffsetX, int OffsetY) { if (image) image->Draw(_posX + OffsetX, _posY + OffsetY, _transparent ? NULL : this); if (!CBPlatform::IsRectEmpty(&_titleRect) && font && _text) { - font->DrawText((byte *)_text, _posX + OffsetX + _titleRect.left, _posY + OffsetY + _titleRect.top, _titleRect.right - _titleRect.left, _titleAlign, _titleRect.bottom - _titleRect.top); + font->DrawText((byte *)_text, _posX + OffsetX + _titleRect.left, _posY + OffsetY + _titleRect.top, _titleRect.right - _titleRect.left, _titleAlign, _titleRect.bottom - _titleRect.top); } if (!_transparent && !image) Game->_renderer->_rectList.Add(new CBActiveRect(Game, this, NULL, _posX + OffsetX, _posY + OffsetY, _width, _height, 100, 100, false)); @@ -360,7 +360,7 @@ HRESULT CUIWindow::LoadBuffer(byte *Buffer, bool Complete) { case TOKEN_IMAGE_INACTIVE: delete _imageInactive, - _imageInactive = new CBSprite(Game); + _imageInactive = new CBSprite(Game); if (!_imageInactive || FAILED(_imageInactive->LoadFile((char *)params))) { delete _imageInactive; _imageInactive = NULL; @@ -1294,7 +1294,7 @@ void CUIWindow::MakeFreezable(bool Freezable) { ////////////////////////////////////////////////////////////////////////// -HRESULT CUIWindow::GetWindowObjects(CBArray& Objects, bool InteractiveOnly) { +HRESULT CUIWindow::GetWindowObjects(CBArray &Objects, bool InteractiveOnly) { for (int i = 0; i < _widgets.GetSize(); i++) { CUIObject *Control = _widgets[i]; if (Control->_disable && InteractiveOnly) continue; diff --git a/engines/wintermute/UIWindow.h b/engines/wintermute/UIWindow.h index e2a134282d..deb6bd0a1b 100644 --- a/engines/wintermute/UIWindow.h +++ b/engines/wintermute/UIWindow.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -38,7 +38,7 @@ class CUIButton; class CBViewport; class CUIWindow : public CUIObject { public: - HRESULT GetWindowObjects(CBArray& Objects, bool InteractiveOnly); + HRESULT GetWindowObjects(CBArray &Objects, bool InteractiveOnly); bool _pauseMusic; void Cleanup(); diff --git a/engines/wintermute/coll_templ.h b/engines/wintermute/coll_templ.h index 6bbadd6787..0e0c3fbe75 100644 --- a/engines/wintermute/coll_templ.h +++ b/engines/wintermute/coll_templ.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -189,7 +189,7 @@ template CBArray::~CBArray() { if (_pData != NULL) { DCDestructElements(_pData, _nSize); - delete[](byte *)_pData; + delete[](byte *)_pData; } } @@ -203,7 +203,7 @@ void CBArray::SetSize(int nNewSize, int nGrowBy) { // shrink to nothing if (_pData != NULL) { DCDestructElements(_pData, _nSize); - delete[](byte *)_pData; + delete[](byte *)_pData; _pData = NULL; } _nSize = _nMaxSize = 0; @@ -246,7 +246,7 @@ void CBArray::SetSize(int nNewSize, int nGrowBy) { DCConstructElements(&pNewData[_nSize], nNewSize - _nSize); // get rid of old stuff (note: no destructors called) - delete[](byte *)_pData; + delete[](byte *)_pData; _pData = pNewData; _nSize = nNewSize; _nMaxSize = nNewMax; @@ -282,7 +282,7 @@ void CBArray::FreeExtra() { } // get rid of old stuff (note: no destructors called) - delete[](byte *)_pData; + delete[](byte *)_pData; _pData = pNewData; _nMaxSize = _nSize; } diff --git a/engines/wintermute/crc.cpp b/engines/wintermute/crc.cpp index 503f8242fa..adfd5da624 100644 --- a/engines/wintermute/crc.cpp +++ b/engines/wintermute/crc.cpp @@ -224,7 +224,7 @@ crc crc_initialize(void) { crc crc_process_byte(unsigned char byte, crc remainder) { unsigned char data; - data = (unsigned char)(REFLECT_DATA(byte ) ^ (remainder >> (WIDTH - 8))); + data = (unsigned char)(REFLECT_DATA(byte) ^ (remainder >> (WIDTH - 8))); remainder = crcTable[data] ^ (remainder << 8); return remainder; } diff --git a/engines/wintermute/dcgf.h b/engines/wintermute/dcgf.h index 8fba050f34..855da1d542 100644 --- a/engines/wintermute/dcgf.h +++ b/engines/wintermute/dcgf.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/dcpackage.h b/engines/wintermute/dcpackage.h index f3ecb0d645..e5db019e1d 100644 --- a/engines/wintermute/dcpackage.h +++ b/engines/wintermute/dcpackage.h @@ -59,7 +59,7 @@ struct TPackageHeader { PackageVersion = stream->readUint32LE(); GameVersion = stream->readUint32LE(); - + Priority = stream->readByte(); CD = stream->readByte(); MasterIndex = stream->readByte(); diff --git a/engines/wintermute/dcscript.h b/engines/wintermute/dcscript.h index 98e4f74c53..2ebb0fe11a 100644 --- a/engines/wintermute/dcscript.h +++ b/engines/wintermute/dcscript.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/dctypes.h b/engines/wintermute/dctypes.h index bd5ec3b6e5..f295b01df1 100644 --- a/engines/wintermute/dctypes.h +++ b/engines/wintermute/dctypes.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -141,12 +141,12 @@ enum TMouseButton { }; -enum TTransMgrState{ +enum TTransMgrState { TRANS_MGR_RUNNING, TRANS_MGR_READY }; -enum TTransitionType{ +enum TTransitionType { TRANSITION_NONE = 0, TRANSITION_FADE_OUT = 1, TRANSITION_FADE_IN = 2, diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp index 7c4da190dd..39bb3f1c55 100644 --- a/engines/wintermute/detection.cpp +++ b/engines/wintermute/detection.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -38,11 +38,11 @@ public: virtual const char *getName() const { return "WinterMute Lite"; } - + virtual const char *getOriginalCopyright() const { return "Copyright (c) 2011 Jan Nedoma"; } - + virtual GameList getSupportedGames() const { GameList games; const PlainGameDescriptor *g = WinterMute_setting; @@ -50,10 +50,10 @@ public: games.push_back(*g); g++; } - + return games; } - + virtual GameDescriptor findGame(const char *gameid) const { const PlainGameDescriptor *g = WinterMute_setting; while (g->gameid) { @@ -63,15 +63,15 @@ public: } return GameDescriptor(g->gameid, g->description); } - + virtual GameList detectGames(const Common::FSList &fslist) const { GameList detectedGames; - + // Iterate over all files in the given directory for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { if (!file->isDirectory()) { const char *gameName = file->getName().c_str(); - + if (0 == scumm_stricmp("data.dcp", gameName)) { // You could check the contents of the file now if you need to. detectedGames.push_back(WinterMute_setting[0]); @@ -81,22 +81,22 @@ public: } return detectedGames; } - + virtual Common::Error createInstance(OSystem *syst, Engine **engine) const { assert(syst); assert(engine); - + // Scan the target directory for files (error out if it does not exist) Common::FSList fslist; Common::FSNode dir(ConfMan.get("path")); if (!dir.getChildren(fslist, Common::FSNode::kListAll)) { return Common::kNoGameDataFoundError; } - + // Invoke the detector Common::String gameid = ConfMan.get("gameid"); GameList detectedGames = detectGames(fslist); - + for (uint i = 0; i < detectedGames.size(); i++) { if (detectedGames[i].gameid() == gameid) { // At this point you may want to perform additional sanity checks. @@ -104,7 +104,7 @@ public: return Common::kNoError; } } - + // Failed to find any game data return Common::kNoGameDataFoundError; } diff --git a/engines/wintermute/persistent.h b/engines/wintermute/persistent.h index 4b528c7947..7a63ff326c 100644 --- a/engines/wintermute/persistent.h +++ b/engines/wintermute/persistent.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -32,61 +32,61 @@ #include "wintypes.h" namespace WinterMute { - - class CBPersistMgr; - - // persistence support - typedef void *(WINAPI *PERSISTBUILD)(void); - typedef HRESULT(WINAPI *PERSISTLOAD)(void *, CBPersistMgr *); - typedef void (*SYS_INSTANCE_CALLBACK)(void *Instance, void *Data); + +class CBPersistMgr; + +// persistence support +typedef void *(WINAPI *PERSISTBUILD)(void); +typedef HRESULT(WINAPI *PERSISTLOAD)(void *, CBPersistMgr *); +typedef void (*SYS_INSTANCE_CALLBACK)(void *Instance, void *Data); } // end of namespace WinterMute #include "SysClass.h" #include "SysClassRegistry.h" namespace WinterMute { - + #define DECLARE_PERSISTENT(class_name, parent_class)\ -static const char _className[];\ -static void* WINAPI PersistBuild(void);\ -virtual const char* GetClassName();\ -static HRESULT WINAPI PersistLoad(void* Instance, CBPersistMgr* PersistMgr);\ -class_name(TDynamicConstructor p1, TDynamicConstructor p2):parent_class(p1, p2){ /*memset(this, 0, sizeof(class_name));*/ };\ -virtual HRESULT Persist(CBPersistMgr* PersistMgr);\ -void* operator new (size_t size);\ -void operator delete(void* p);\ + static const char _className[];\ + static void* WINAPI PersistBuild(void);\ + virtual const char* GetClassName();\ + static HRESULT WINAPI PersistLoad(void* Instance, CBPersistMgr* PersistMgr);\ + class_name(TDynamicConstructor p1, TDynamicConstructor p2):parent_class(p1, p2){ /*memset(this, 0, sizeof(class_name));*/ };\ + virtual HRESULT Persist(CBPersistMgr* PersistMgr);\ + void* operator new (size_t size);\ + void operator delete(void* p);\ + - #define IMPLEMENT_PERSISTENT(class_name, persistent_class)\ -const char class_name::_className[] = #class_name;\ -void* class_name::PersistBuild(){\ -return ::new class_name(DYNAMIC_CONSTRUCTOR, DYNAMIC_CONSTRUCTOR);\ -}\ -\ -HRESULT class_name::PersistLoad(void* Instance, CBPersistMgr* PersistMgr){\ -return ((class_name*)Instance)->Persist(PersistMgr);\ -}\ -\ -const char* class_name::GetClassName(){\ -return #class_name;\ -}\ -\ -CSysClass Register##class_name(class_name::_className, class_name::PersistBuild, class_name::PersistLoad, persistent_class);\ -\ -void* class_name::operator new (size_t size){\ -void* ret = ::operator new(size);\ -CSysClassRegistry::GetInstance()->RegisterInstance(#class_name, ret);\ -return ret;\ -}\ -\ -void class_name::operator delete (void* p){\ -CSysClassRegistry::GetInstance()->UnregisterInstance(#class_name, p);\ -::operator delete(p);\ -}\ - + const char class_name::_className[] = #class_name;\ + void* class_name::PersistBuild(){\ + return ::new class_name(DYNAMIC_CONSTRUCTOR, DYNAMIC_CONSTRUCTOR);\ + }\ + \ + HRESULT class_name::PersistLoad(void* Instance, CBPersistMgr* PersistMgr){\ + return ((class_name*)Instance)->Persist(PersistMgr);\ + }\ + \ + const char* class_name::GetClassName(){\ + return #class_name;\ + }\ + \ + CSysClass Register##class_name(class_name::_className, class_name::PersistBuild, class_name::PersistLoad, persistent_class);\ + \ + void* class_name::operator new (size_t size){\ + void* ret = ::operator new(size);\ + CSysClassRegistry::GetInstance()->RegisterInstance(#class_name, ret);\ + return ret;\ + }\ + \ + void class_name::operator delete (void* p){\ + CSysClassRegistry::GetInstance()->UnregisterInstance(#class_name, p);\ + ::operator delete(p);\ + }\ + #define TMEMBER(member_name) #member_name, &member_name #define TMEMBER_INT(member_name) #member_name, (int*)&member_name - + } // end of namespace WinterMute #endif // WINTERMUTE_PERSISTENT_H diff --git a/engines/wintermute/scriptables/SXArray.cpp b/engines/wintermute/scriptables/SXArray.cpp index 77a90b7f12..7ac7dd5460 100644 --- a/engines/wintermute/scriptables/SXArray.cpp +++ b/engines/wintermute/scriptables/SXArray.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/SXArray.h b/engines/wintermute/scriptables/SXArray.h index 8907ec2602..f3ae690ab2 100644 --- a/engines/wintermute/scriptables/SXArray.h +++ b/engines/wintermute/scriptables/SXArray.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/SXDate.cpp b/engines/wintermute/scriptables/SXDate.cpp index 193521d44d..d04e4c5add 100644 --- a/engines/wintermute/scriptables/SXDate.cpp +++ b/engines/wintermute/scriptables/SXDate.cpp @@ -250,9 +250,9 @@ HRESULT CSXDate::Persist(CBPersistMgr *PersistMgr) { CBScriptable::Persist(PersistMgr); #if 0 if (PersistMgr->_saving) - PersistMgr->PutBytes((byte *)&_tm, sizeof(_tm)); + PersistMgr->PutBytes((byte *)&_tm, sizeof(_tm)); else - PersistMgr->GetBytes((byte *)&_tm, sizeof(_tm)); + PersistMgr->GetBytes((byte *)&_tm, sizeof(_tm)); #endif return S_OK; } diff --git a/engines/wintermute/scriptables/SXDate.h b/engines/wintermute/scriptables/SXDate.h index ca9744e6ab..1947925f02 100644 --- a/engines/wintermute/scriptables/SXDate.h +++ b/engines/wintermute/scriptables/SXDate.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/SXFile.cpp b/engines/wintermute/scriptables/SXFile.cpp index fa860e56b6..a27376750a 100644 --- a/engines/wintermute/scriptables/SXFile.cpp +++ b/engines/wintermute/scriptables/SXFile.cpp @@ -200,7 +200,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK; } uint32 BufSize = FILE_BUFFER_SIZE; - byte *Buf = (byte *)malloc(BufSize); + byte *Buf = (byte *)malloc(BufSize); uint32 Counter = 0; byte b; bool FoundNewLine = false; @@ -210,7 +210,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This if (FAILED(Ret)) break; if (Counter > BufSize) { - Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE); + Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE); BufSize += FILE_BUFFER_SIZE; } if (b == '\n') { @@ -225,7 +225,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This } while (SUCCEEDED(Ret)); if (Counter > BufSize) { - Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE); + Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE); BufSize += FILE_BUFFER_SIZE; } Buf[Counter] = '\0'; @@ -251,7 +251,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK; } uint32 BufSize = FILE_BUFFER_SIZE; - byte *Buf = (byte *)malloc(BufSize); + byte *Buf = (byte *)malloc(BufSize); uint32 Counter = 0; byte b; @@ -261,7 +261,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This if (FAILED(Ret)) break; if (Counter > BufSize) { - Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE); + Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE); BufSize += FILE_BUFFER_SIZE; } if (b == 0x0D) continue; @@ -272,7 +272,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This } if (Counter > BufSize) { - Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE); + Buf = (byte *)realloc(Buf, BufSize + FILE_BUFFER_SIZE); BufSize += FILE_BUFFER_SIZE; } Buf[Counter] = '\0'; @@ -335,7 +335,7 @@ HRESULT CSXFile::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *This return S_OK; } byte Val; - if (SUCCEEDED(_readFile->Read(&Val, sizeof(byte )))) Stack->PushInt(Val); + if (SUCCEEDED(_readFile->Read(&Val, sizeof(byte)))) Stack->PushInt(Val); else Stack->PushNULL(); return S_OK; diff --git a/engines/wintermute/scriptables/SXMath.cpp b/engines/wintermute/scriptables/SXMath.cpp index bcd2e96495..59961fb5f1 100644 --- a/engines/wintermute/scriptables/SXMath.cpp +++ b/engines/wintermute/scriptables/SXMath.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/SXMath.h b/engines/wintermute/scriptables/SXMath.h index 3169990159..59064c877f 100644 --- a/engines/wintermute/scriptables/SXMath.h +++ b/engines/wintermute/scriptables/SXMath.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/SXMemBuffer.cpp b/engines/wintermute/scriptables/SXMemBuffer.cpp index 93d8e2e23b..9aea2b0c4c 100644 --- a/engines/wintermute/scriptables/SXMemBuffer.cpp +++ b/engines/wintermute/scriptables/SXMemBuffer.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -91,7 +91,7 @@ HRESULT CSXMemBuffer::Resize(int NewSize) { } if (_buffer && _size > OldSize) { - memset((byte *)_buffer + OldSize, 0, _size - OldSize); + memset((byte *)_buffer + OldSize, 0, _size - OldSize); } return S_OK; } @@ -138,7 +138,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1); int Start = Stack->Pop()->GetInt(); if (!CheckBounds(Script, Start, sizeof(bool))) Stack->PushNULL(); - else Stack->PushBool(*(bool *)((byte *)_buffer + Start)); + else Stack->PushBool(*(bool *)((byte *)_buffer + Start)); return S_OK; } @@ -149,8 +149,8 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack else if (strcmp(Name, "GetByte") == 0) { Stack->CorrectParams(1); int Start = Stack->Pop()->GetInt(); - if (!CheckBounds(Script, Start, sizeof(byte ))) Stack->PushNULL(); - else Stack->PushInt(*(byte *)((byte *)_buffer + Start)); + if (!CheckBounds(Script, Start, sizeof(byte))) Stack->PushNULL(); + else Stack->PushInt(*(byte *)((byte *)_buffer + Start)); return S_OK; } @@ -162,7 +162,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1); int Start = Stack->Pop()->GetInt(); if (!CheckBounds(Script, Start, sizeof(short))) Stack->PushNULL(); - else Stack->PushInt(65536 + * (short *)((byte *)_buffer + Start)); + else Stack->PushInt(65536 + * (short *)((byte *)_buffer + Start)); return S_OK; } @@ -174,7 +174,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1); int Start = Stack->Pop()->GetInt(); if (!CheckBounds(Script, Start, sizeof(int))) Stack->PushNULL(); - else Stack->PushInt(*(int *)((byte *)_buffer + Start)); + else Stack->PushInt(*(int *)((byte *)_buffer + Start)); return S_OK; } @@ -186,7 +186,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1); int Start = Stack->Pop()->GetInt(); if (!CheckBounds(Script, Start, sizeof(float))) Stack->PushNULL(); - else Stack->PushFloat(*(float *)((byte *)_buffer + Start)); + else Stack->PushFloat(*(float *)((byte *)_buffer + Start)); return S_OK; } @@ -198,7 +198,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack Stack->CorrectParams(1); int Start = Stack->Pop()->GetInt(); if (!CheckBounds(Script, Start, sizeof(double))) Stack->PushNULL(); - else Stack->PushFloat(*(double *)((byte *)_buffer + Start)); + else Stack->PushFloat(*(double *)((byte *)_buffer + Start)); return S_OK; } @@ -240,7 +240,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack int Start = Stack->Pop()->GetInt(); if (!CheckBounds(Script, Start, sizeof(void *))) Stack->PushNULL(); else { - void *Pointer = *(void **)((byte *)_buffer + Start); + void *Pointer = *(void **)((byte *)_buffer + Start); CSXMemBuffer *Buf = new CSXMemBuffer(Game, Pointer); Stack->PushNative(Buf, false); } @@ -257,7 +257,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(bool))) Stack->PushBool(false); else { - *(bool *)((byte *)_buffer + Start) = Val; + *(bool *)((byte *)_buffer + Start) = Val; Stack->PushBool(true); } return S_OK; @@ -269,11 +269,11 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack else if (strcmp(Name, "SetByte") == 0) { Stack->CorrectParams(2); int Start = Stack->Pop()->GetInt(); - byte Val = (byte )Stack->Pop()->GetInt(); + byte Val = (byte)Stack->Pop()->GetInt(); - if (!CheckBounds(Script, Start, sizeof(byte ))) Stack->PushBool(false); + if (!CheckBounds(Script, Start, sizeof(byte))) Stack->PushBool(false); else { - *(byte *)((byte *)_buffer + Start) = Val; + *(byte *)((byte *)_buffer + Start) = Val; Stack->PushBool(true); } return S_OK; @@ -289,7 +289,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(short))) Stack->PushBool(false); else { - *(short *)((byte *)_buffer + Start) = Val; + *(short *)((byte *)_buffer + Start) = Val; Stack->PushBool(true); } return S_OK; @@ -305,7 +305,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(int))) Stack->PushBool(false); else { - *(int *)((byte *)_buffer + Start) = Val; + *(int *)((byte *)_buffer + Start) = Val; Stack->PushBool(true); } return S_OK; @@ -321,7 +321,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(float))) Stack->PushBool(false); else { - *(float *)((byte *)_buffer + Start) = Val; + *(float *)((byte *)_buffer + Start) = Val; Stack->PushBool(true); } return S_OK; @@ -337,7 +337,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, sizeof(double))) Stack->PushBool(false); else { - *(double *)((byte *)_buffer + Start) = Val; + *(double *)((byte *)_buffer + Start) = Val; Stack->PushBool(true); } return S_OK; @@ -353,7 +353,7 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack if (!CheckBounds(Script, Start, strlen(Val) + 1)) Stack->PushBool(false); else { - memcpy((byte *)_buffer + Start, Val, strlen(Val) + 1); + memcpy((byte *)_buffer + Start, Val, strlen(Val) + 1); Stack->PushBool(true); } return S_OK; @@ -454,11 +454,11 @@ HRESULT CSXMemBuffer::Persist(CBPersistMgr *PersistMgr) { PersistMgr->Transfer(TMEMBER(_size)); if (PersistMgr->_saving) { - if (_size > 0) PersistMgr->PutBytes((byte *)_buffer, _size); + if (_size > 0) PersistMgr->PutBytes((byte *)_buffer, _size); } else { if (_size > 0) { _buffer = malloc(_size); - PersistMgr->GetBytes((byte *)_buffer, _size); + PersistMgr->GetBytes((byte *)_buffer, _size); } else _buffer = NULL; } diff --git a/engines/wintermute/scriptables/SXMemBuffer.h b/engines/wintermute/scriptables/SXMemBuffer.h index 9c6553bd89..e63601a113 100644 --- a/engines/wintermute/scriptables/SXMemBuffer.h +++ b/engines/wintermute/scriptables/SXMemBuffer.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/SXString.cpp b/engines/wintermute/scriptables/SXString.cpp index d9e1c246c4..acc846dccc 100644 --- a/engines/wintermute/scriptables/SXString.cpp +++ b/engines/wintermute/scriptables/SXString.cpp @@ -103,22 +103,22 @@ HRESULT CSXString::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th if (end < start) CBUtils::Swap(&start, &end); //try { - WideString str; - if (Game->_textEncoding == TEXT_UTF8) - str = StringUtil::Utf8ToWide(_string); - else - str = StringUtil::AnsiToWide(_string); + WideString str; + if (Game->_textEncoding == TEXT_UTF8) + str = StringUtil::Utf8ToWide(_string); + else + str = StringUtil::AnsiToWide(_string); - //WideString subStr = str.substr(start, end - start + 1); - WideString subStr(str.c_str() + start, end - start + 1); + //WideString subStr = str.substr(start, end - start + 1); + WideString subStr(str.c_str() + start, end - start + 1); - if (Game->_textEncoding == TEXT_UTF8) - Stack->PushString(StringUtil::WideToUtf8(subStr).c_str()); - else - Stack->PushString(StringUtil::WideToAnsi(subStr).c_str()); - // } catch (std::exception &) { - // Stack->PushNULL(); - // } + if (Game->_textEncoding == TEXT_UTF8) + Stack->PushString(StringUtil::WideToUtf8(subStr).c_str()); + else + Stack->PushString(StringUtil::WideToAnsi(subStr).c_str()); + // } catch (std::exception &) { + // Stack->PushNULL(); + // } return S_OK; } @@ -141,19 +141,19 @@ HRESULT CSXString::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th if (val->IsNULL()) len = strlen(_string) - start; // try { - WideString str; - if (Game->_textEncoding == TEXT_UTF8) - str = StringUtil::Utf8ToWide(_string); - else - str = StringUtil::AnsiToWide(_string); + WideString str; + if (Game->_textEncoding == TEXT_UTF8) + str = StringUtil::Utf8ToWide(_string); + else + str = StringUtil::AnsiToWide(_string); // WideString subStr = str.substr(start, len); - WideString subStr(str.c_str() + start, len); + WideString subStr(str.c_str() + start, len); - if (Game->_textEncoding == TEXT_UTF8) - Stack->PushString(StringUtil::WideToUtf8(subStr).c_str()); - else - Stack->PushString(StringUtil::WideToAnsi(subStr).c_str()); + if (Game->_textEncoding == TEXT_UTF8) + Stack->PushString(StringUtil::WideToUtf8(subStr).c_str()); + else + Stack->PushString(StringUtil::WideToAnsi(subStr).c_str()); // } catch (std::exception &) { // Stack->PushNULL(); // } @@ -371,11 +371,11 @@ HRESULT CSXString::Persist(CBPersistMgr *PersistMgr) { PersistMgr->Transfer(TMEMBER(_capacity)); if (PersistMgr->_saving) { - if (_capacity > 0) PersistMgr->PutBytes((byte *)_string, _capacity); + if (_capacity > 0) PersistMgr->PutBytes((byte *)_string, _capacity); } else { if (_capacity > 0) { _string = new char[_capacity]; - PersistMgr->GetBytes((byte *)_string, _capacity); + PersistMgr->GetBytes((byte *)_string, _capacity); } else _string = NULL; } diff --git a/engines/wintermute/scriptables/SXString.h b/engines/wintermute/scriptables/SXString.h index 8abddf244d..a303f2d190 100644 --- a/engines/wintermute/scriptables/SXString.h +++ b/engines/wintermute/scriptables/SXString.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -47,7 +47,7 @@ public: CSXString(CBGame *inGame, CScStack *Stack); virtual ~CSXString(); - + private: char *_string; int _capacity; diff --git a/engines/wintermute/scriptables/ScEngine.cpp b/engines/wintermute/scriptables/ScEngine.cpp index bfdfb53fa0..9c690b1c1f 100644 --- a/engines/wintermute/scriptables/ScEngine.cpp +++ b/engines/wintermute/scriptables/ScEngine.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -319,7 +319,7 @@ byte *CScEngine::GetCompiledScript(const char *Filename, uint32 *OutSize, bool I // We have const char* everywhere but in the DLL-interfaces... char *tempFileName = new char[strlen(Filename) + 1]; memcpy(tempFileName, Filename, strlen(Filename) + 1); - + SetFileToCompile(Filename); CompBuffer = ExtCompileFile(tempFileName, &CompSize); delete[] tempFileName; @@ -828,26 +828,26 @@ void CScEngine::DisableProfiling() { ////////////////////////////////////////////////////////////////////////// void CScEngine::DumpStats() { error("DumpStats not ported to ScummVM yet"); -/* uint32 totalTime = CBPlatform::GetTime() - _profilingStartTime; + /* uint32 totalTime = CBPlatform::GetTime() - _profilingStartTime; - typedef std::vector > TimeVector; - TimeVector times; + typedef std::vector > TimeVector; + TimeVector times; - ScriptTimes::iterator it; - for (it = _scriptTimes.begin(); it != _scriptTimes.end(); it++) { - times.push_back(std::pair (it->_value, it->_key)); - } - std::sort(times.begin(), times.end()); + ScriptTimes::iterator it; + for (it = _scriptTimes.begin(); it != _scriptTimes.end(); it++) { + times.push_back(std::pair (it->_value, it->_key)); + } + std::sort(times.begin(), times.end()); - TimeVector::reverse_iterator tit; + TimeVector::reverse_iterator tit; - Game->LOG(0, "***** Script profiling information: *****"); - Game->LOG(0, " %-40s %fs", "Total execution time", (float)totalTime / 1000); + Game->LOG(0, "***** Script profiling information: *****"); + Game->LOG(0, " %-40s %fs", "Total execution time", (float)totalTime / 1000); - for (tit = times.rbegin(); tit != times.rend(); tit++) { - Game->LOG(0, " %-40s %fs (%f%%)", tit->second.c_str(), (float)tit->first / 1000, (float)tit->first / (float)totalTime * 100); - }*/ + for (tit = times.rbegin(); tit != times.rend(); tit++) { + Game->LOG(0, " %-40s %fs (%f%%)", tit->second.c_str(), (float)tit->first / 1000, (float)tit->first / (float)totalTime * 100); + }*/ } } // end of namespace WinterMute diff --git a/engines/wintermute/scriptables/ScEngine.h b/engines/wintermute/scriptables/ScEngine.h index d034bf8ed6..c633a98d6c 100644 --- a/engines/wintermute/scriptables/ScEngine.h +++ b/engines/wintermute/scriptables/ScEngine.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/ScScript.cpp b/engines/wintermute/scriptables/ScScript.cpp index 3678701cf4..611ce4124f 100644 --- a/engines/wintermute/scriptables/ScScript.cpp +++ b/engines/wintermute/scriptables/ScScript.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -1322,7 +1322,7 @@ HRESULT CScScript::ExternalCall(CScStack *Stack, CScStack *ThisStack, CScScript: Buffer->PutDWORD(Val->GetInt()); break; case TYPE_BYTE: - Buffer->PutDWORD((byte )Val->GetInt()); + Buffer->PutDWORD((byte)Val->GetInt()); break; case TYPE_STRING: if (Val->IsNULL()) Buffer->PutDWORD(0); @@ -1363,13 +1363,13 @@ HRESULT CScScript::ExternalCall(CScStack *Stack, CScStack *ThisStack, CScScript: // return switch (Function->returns) { case TYPE_BOOL: - Stack->PushBool((byte )ret != 0); + Stack->PushBool((byte)ret != 0); break; case TYPE_LONG: Stack->PushInt(ret); break; case TYPE_BYTE: - Stack->PushInt((byte )ret); + Stack->PushInt((byte)ret); break; break; case TYPE_STRING: diff --git a/engines/wintermute/scriptables/ScScript.h b/engines/wintermute/scriptables/ScScript.h index 588f57512e..ce9548fc99 100644 --- a/engines/wintermute/scriptables/ScScript.h +++ b/engines/wintermute/scriptables/ScScript.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/ScStack.cpp b/engines/wintermute/scriptables/ScStack.cpp index c7b724e9b2..0d097c69c7 100644 --- a/engines/wintermute/scriptables/ScStack.cpp +++ b/engines/wintermute/scriptables/ScStack.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/ScStack.h b/engines/wintermute/scriptables/ScStack.h index 113fb4c19f..811492c6ca 100644 --- a/engines/wintermute/scriptables/ScStack.h +++ b/engines/wintermute/scriptables/ScStack.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/ScValue.cpp b/engines/wintermute/scriptables/ScValue.cpp index 3576c0a618..72baddbbc8 100644 --- a/engines/wintermute/scriptables/ScValue.cpp +++ b/engines/wintermute/scriptables/ScValue.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/scriptables/ScValue.h b/engines/wintermute/scriptables/ScValue.h index 7c87c8e707..92ee09f0c5 100644 --- a/engines/wintermute/scriptables/ScValue.h +++ b/engines/wintermute/scriptables/ScValue.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/utils.cpp b/engines/wintermute/utils.cpp index de5d00e677..13885dd2e6 100644 --- a/engines/wintermute/utils.cpp +++ b/engines/wintermute/utils.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -107,7 +107,7 @@ void CBUtils::CreatePath(const char *Path, bool PathOnly) { warning("CBUtils::CreatePath - not implemented: %s", Path); // boost::filesystem::create_directories(path); // } catch (...) { - return; + return; // } } diff --git a/engines/wintermute/utils.h b/engines/wintermute/utils.h index fb61ae6571..fa83a51ad4 100644 --- a/engines/wintermute/utils.h +++ b/engines/wintermute/utils.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp index e6b273b291..e83261225f 100644 --- a/engines/wintermute/wintermute.cpp +++ b/engines/wintermute/wintermute.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -36,84 +36,84 @@ #include "engines/wintermute/PlatformSDL.h" namespace WinterMute { - - WinterMuteEngine::WinterMuteEngine(OSystem *syst) + +WinterMuteEngine::WinterMuteEngine(OSystem *syst) : Engine(syst) { - // Put your engine in a sane state, but do nothing big yet; - // in particular, do not load data from files; rather, if you - // need to do such things, do them from init(). - - // Do not initialize graphics here - - // However this is the place to specify all default directories - const Common::FSNode gameDataDir(ConfMan.get("path")); - //SearchMan.addSubDirectoryMatching(gameDataDir, "sound"); - - // Here is the right place to set up the engine specific debug channels - DebugMan.addDebugChannel(kWinterMuteDebugExample, "example", "this is just an example for a engine specific debug channel"); - DebugMan.addDebugChannel(kWinterMuteDebugExample2, "example2", "also an example"); - - // Don't forget to register your random source - _rnd = new Common::RandomSource("WinterMute"); - - debug("WinterMuteEngine::WinterMuteEngine"); - } - - WinterMuteEngine::~WinterMuteEngine() { - debug("WinterMuteEngine::~WinterMuteEngine"); - - // Dispose your resources here - delete _rnd; - - // Remove all of our debug levels here - DebugMan.clearAllDebugChannels(); - } - - Common::Error WinterMuteEngine::run() { - // Initialize graphics using following: - Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0); - initGraphics(800, 600, false, &format); - - // You could use backend transactions directly as an alternative, - // but it isn't recommended, until you want to handle the error values - // from OSystem::endGFXTransaction yourself. - // This is just an example template: - //_system->beginGFXTransaction(); - // // This setup the graphics mode according to users seetings - // initCommonGFX(false); - // - // // Specify dimensions of game graphics window. - // // In this example: 320x200 - // _system->initSize(320, 200); - //FIXME: You really want to handle - //OSystem::kTransactionSizeChangeFailed here - //_system->endGFXTransaction(); - - // Create debugger console. It requires GFX to be initialized - _console = new Console(this); - - // Additional setup. - debug("WinterMuteEngine::init"); - - // Your main even loop should be (invoked from) here. - debug("WinterMuteEngine::go: Hello, World!"); - - // This test will show up if -d1 and --debugflags=example are specified on the commandline - debugC(1, kWinterMuteDebugExample, "Example debug call"); - - // This test will show up if --debugflags=example or --debugflags=example2 or both of them and -d3 are specified on the commandline - debugC(3, kWinterMuteDebugExample | kWinterMuteDebugExample2, "Example debug call two"); - - CAdGame *game = new CAdGame; - - int ret = 1; - - ret = CBPlatform::Initialize(game, NULL, 0); - - if (ret == 0) { - ret = CBPlatform::MessageLoop(); - } - return Common::kNoError; + // Put your engine in a sane state, but do nothing big yet; + // in particular, do not load data from files; rather, if you + // need to do such things, do them from init(). + + // Do not initialize graphics here + + // However this is the place to specify all default directories + const Common::FSNode gameDataDir(ConfMan.get("path")); + //SearchMan.addSubDirectoryMatching(gameDataDir, "sound"); + + // Here is the right place to set up the engine specific debug channels + DebugMan.addDebugChannel(kWinterMuteDebugExample, "example", "this is just an example for a engine specific debug channel"); + DebugMan.addDebugChannel(kWinterMuteDebugExample2, "example2", "also an example"); + + // Don't forget to register your random source + _rnd = new Common::RandomSource("WinterMute"); + + debug("WinterMuteEngine::WinterMuteEngine"); +} + +WinterMuteEngine::~WinterMuteEngine() { + debug("WinterMuteEngine::~WinterMuteEngine"); + + // Dispose your resources here + delete _rnd; + + // Remove all of our debug levels here + DebugMan.clearAllDebugChannels(); +} + +Common::Error WinterMuteEngine::run() { + // Initialize graphics using following: + Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0); + initGraphics(800, 600, false, &format); + + // You could use backend transactions directly as an alternative, + // but it isn't recommended, until you want to handle the error values + // from OSystem::endGFXTransaction yourself. + // This is just an example template: + //_system->beginGFXTransaction(); + // // This setup the graphics mode according to users seetings + // initCommonGFX(false); + // + // // Specify dimensions of game graphics window. + // // In this example: 320x200 + // _system->initSize(320, 200); + //FIXME: You really want to handle + //OSystem::kTransactionSizeChangeFailed here + //_system->endGFXTransaction(); + + // Create debugger console. It requires GFX to be initialized + _console = new Console(this); + + // Additional setup. + debug("WinterMuteEngine::init"); + + // Your main even loop should be (invoked from) here. + debug("WinterMuteEngine::go: Hello, World!"); + + // This test will show up if -d1 and --debugflags=example are specified on the commandline + debugC(1, kWinterMuteDebugExample, "Example debug call"); + + // This test will show up if --debugflags=example or --debugflags=example2 or both of them and -d3 are specified on the commandline + debugC(3, kWinterMuteDebugExample | kWinterMuteDebugExample2, "Example debug call two"); + + CAdGame *game = new CAdGame; + + int ret = 1; + + ret = CBPlatform::Initialize(game, NULL, 0); + + if (ret == 0) { + ret = CBPlatform::MessageLoop(); } - + return Common::kNoError; +} + } // End of namespace WinterMute \ No newline at end of file diff --git a/engines/wintermute/wintermute.h b/engines/wintermute/wintermute.h index 33ed2892ff..efa07ac669 100644 --- a/engines/wintermute/wintermute.h +++ b/engines/wintermute/wintermute.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -28,38 +28,38 @@ #include "gui/debugger.h" namespace WinterMute { - - class Console; - - // our engine debug channels - enum { - kWinterMuteDebugExample = 1 << 0, - kWinterMuteDebugExample2 = 1 << 1 - // next new channel must be 1 << 2 (4) - // the current limitation is 32 debug channels (1 << 31 is the last one) - }; - - class WinterMuteEngine : public Engine { - public: - WinterMuteEngine(OSystem *syst); - ~WinterMuteEngine(); - - virtual Common::Error run(); - - private: - Console *_console; - - // We need random numbers - Common::RandomSource *_rnd; - }; - - // Example console class - class Console : public GUI::Debugger { - public: - Console(WinterMuteEngine *vm) {} - virtual ~Console(void) {} - }; - + +class Console; + +// our engine debug channels +enum { + kWinterMuteDebugExample = 1 << 0, + kWinterMuteDebugExample2 = 1 << 1 + // next new channel must be 1 << 2 (4) + // the current limitation is 32 debug channels (1 << 31 is the last one) +}; + +class WinterMuteEngine : public Engine { +public: + WinterMuteEngine(OSystem *syst); + ~WinterMuteEngine(); + + virtual Common::Error run(); + +private: + Console *_console; + + // We need random numbers + Common::RandomSource *_rnd; +}; + +// Example console class +class Console : public GUI::Debugger { +public: + Console(WinterMuteEngine *vm) {} + virtual ~Console(void) {} +}; + } // End of namespace Wintermute #endif \ No newline at end of file diff --git a/engines/wintermute/wintypes.h b/engines/wintermute/wintypes.h index c722b92c51..476676cbaa 100644 --- a/engines/wintermute/wintypes.h +++ b/engines/wintermute/wintypes.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/engines/wintermute/wme_debugger.h b/engines/wintermute/wme_debugger.h index 0f084be75e..95e2a894ea 100644 --- a/engines/wintermute/wme_debugger.h +++ b/engines/wintermute/wme_debugger.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- cgit v1.2.3