mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-07 02:39:56 +00:00
WINTERMUTE: Run Astyle on code-files to reformat.
This commit is contained in:
parent
2ee58d2dc3
commit
ba6a2ac66e
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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) {
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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<CUIObject *, CUIObject *>& Objects, bool InteractiveOnly) {
|
||||
HRESULT CAdResponseBox::GetObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly) {
|
||||
for (int i = 0; i < _respButtons.GetSize(); i++) {
|
||||
Objects.Add(_respButtons[i]);
|
||||
}
|
||||
|
@ -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<CUIObject *, CUIObject *>& Objects, bool InteractiveOnly);
|
||||
HRESULT GetObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly);
|
||||
|
||||
HRESULT HandleResponse(CAdResponse *Response);
|
||||
void SetLastResponseText(const char *Text, const char *TextOrig);
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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<CAdObject *, CAdObject *>& Objects, bool InteractiveOnly) {
|
||||
HRESULT CAdScene::GetSceneObjects(CBArray<CAdObject *, CAdObject *> &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<CAdObject *, CAdObject *>& Objects, bo
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
HRESULT CAdScene::GetRegionObjects(CAdRegion *Region, CBArray<CAdObject *, CAdObject *>& Objects, bool InteractiveOnly) {
|
||||
HRESULT CAdScene::GetRegionObjects(CAdRegion *Region, CBArray<CAdObject *, CAdObject *> &Objects, bool InteractiveOnly) {
|
||||
CAdGame *AdGame = (CAdGame *)Game;
|
||||
CAdObject *Obj;
|
||||
|
||||
|
@ -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<CAdObject *, CAdObject *>& Objects, bool InteractiveOnly);
|
||||
HRESULT GetRegionObjects(CAdRegion *Region, CBArray<CAdObject *, CAdObject *>& Objects, bool InteractiveOnly);
|
||||
HRESULT GetSceneObjects(CBArray<CAdObject *, CAdObject *> &Objects, bool InteractiveOnly);
|
||||
HRESULT GetRegionObjects(CAdRegion *Region, CBArray<CAdObject *, CAdObject *> &Objects, bool InteractiveOnly);
|
||||
|
||||
HRESULT AfterLoad();
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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<Common::String, Common::String> _editorProps;
|
||||
Common::HashMap<Common::String, Common::String>::iterator _editorPropsIter;
|
||||
/* std::map<std::string, std::string> _editorProps;
|
||||
std::map<std::string, std::string>::iterator _editorPropsIter;*/
|
||||
/* std::map<std::string, std::string> _editorProps;
|
||||
std::map<std::string, std::string>::iterator _editorPropsIter;*/
|
||||
};
|
||||
|
||||
} // end of namespace WinterMute
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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 __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 __IPHONE__
|
||||
AddPath(PATH_PACKAGE, pathPtr);
|
||||
AddPath(PATH_SINGLE, pathPtr);
|
||||
#else
|
||||
char bundlePath[MAX_PATH];
|
||||
|
||||
sprintf(bundlePath, "%s/../", 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);
|
||||
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()) {
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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<CBFont *, CBFont *> _fonts;
|
||||
HRESULT InitLoop();
|
||||
|
||||
/* FT_Library GetFTLibrary() const {
|
||||
return _fTLibrary;
|
||||
}*/
|
||||
/* FT_Library GetFTLibrary() const {
|
||||
return _fTLibrary;
|
||||
}*/
|
||||
|
||||
private:
|
||||
void InitFreeType();
|
||||
|
@ -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<CBFile *>(stream->descriptor.pointer);
|
||||
if (!f) return 0;
|
||||
CBFile *f = static_cast<CBFile *>(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;
|
||||
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<CBFile *>(stream->descriptor.pointer);
|
||||
if (!f) return;
|
||||
CBFile *f = static_cast<CBFile *>(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;
|
||||
}*/
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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<CBRenderSDL *>(_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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user