Compare commits

...
Author SHA1 Message Date
Marc Zinnschlag 14f32563e7 fixed script compiler code ordering issue 2014-09-09 13:55:10 +02:00
Marc Zinnschlag b2e8d61b43 updated changelog 2014-09-06 10:28:23 +02:00
scrawl f345288865 Merge branch 'openmw-32' of https://github.com/OpenMW/openmw into openmw-32 2014-09-05 17:20:09 +02:00
scrawl db879e77c2 Handle death in actor update rather than instantly (Fixes #1866) 2014-09-05 17:19:18 +02:00
Marc Zinnschlag c44f9bfca9 updated changelog 2014-09-03 18:16:33 +02:00
scrawl 58f92f3659 Pause frame updates when the window is minimized (Fixes #1868) 2014-09-03 04:54:45 +02:00
Marc Zinnschlag b9856cc382 Merge remote-tracking branch 'origin/openmw-32' into openmw-32 2014-08-31 20:00:06 +02:00
CorporamaandMarc Zinnschlag 20c5857f34 Compile fixes for Linux 2014-08-31 19:55:16 +02:00
scrawl 0f290493e9 Fix summoned creatures not following for non-player summoners 2014-08-30 19:14:41 +02:00
Marc Zinnschlag 8f336dfedd Merge remote-tracking branch 'origin/openmw-32' into openmw-32 2014-08-29 10:03:56 +02:00
Marc Zinnschlag b6a3541573 increased version number 2014-08-29 10:03:49 +02:00
scrawl 84ad05b4fa Fix bone not found exception for golden saint spellcasting 2014-08-28 17:03:03 +02:00
scrawl 927dcc7cdd Another invalid iterator fix 2014-08-28 17:03:03 +02:00
scrawl 3f503c6561 Fix mSelectedEnchantItem cleanup not working for non-player actors 2014-08-28 16:32:21 +02:00
Marc Zinnschlag d605019111 updated changelog 2014-08-28 14:09:12 +02:00
Marc Zinnschlag 78393bca30 Merge branch 'editorfix' 2014-08-28 13:33:08 +02:00
Marc Zinnschlag 0dff1fb816 fix for previous commit (was using wrong destination path) 2014-08-28 13:25:56 +02:00
Marek KochanowiczandMarc Zinnschlag ea2feb0aa9 fix for bug 1672 2014-08-28 12:51:49 +02:00
Marc Zinnschlag ce3d75bba2 Merge remote-tracking branch 'scrawl/master' 2014-08-28 12:34:08 +02:00
Marc Zinnschlag 9197d4b653 Merge remote-tracking branch 'scrawl/ai' 2014-08-28 09:32:44 +02:00
scrawl 253036abee Play VFX_Soul_Trap on successful soul trap 2014-08-28 02:55:36 +02:00
scrawl f8f4d2dfdb Another invalid iterator fix 2014-08-28 02:14:30 +02:00
scrawl 1a98f8ca93 Invalid iterator fix 2014-08-28 02:09:00 +02:00
scrawl 2e623bac5a Don't attempt to use broken weapons in AI 2014-08-28 02:01:41 +02:00
scrawl 0bdc1b243a Consider weapon ammunition in combat AI (Fixes #1576) 2014-08-28 01:54:32 +02:00
scrawl f1d72419de Don't equip weapons in autoEquip, AiCombat does that now (Fixes #1451) 2014-08-28 00:59:54 +02:00
scrawl 0fe9612afb Implement basic spellcasting AI (Fixes #961)
Select a weapon to attack with in AiCombat and equip it (Fixes #1609, Fixes #1772)
2014-08-28 00:55:37 +02:00
scrawl 1a96dd0bd5 Remove more MyGUI 3.2.0 specific code 2014-08-27 16:39:13 +02:00
cc9cii 7ff1136d81 For compiling in Windows with MSVC. 2014-08-27 21:25:47 +10:00
Marc Zinnschlag 0b3e2775a0 fixed wording in body part verifier 2014-08-27 10:46:21 +02:00
Stanislav 4d2bdda22f Merge branch 'master' of https://github.com/OpenMW/openmw 2014-08-26 22:14:50 +06:00
Stanislav bdfb0c8351 Feature #1616: Body part record verifier 2014-08-26 21:55:31 +06:00
scrawl c5fa7bf7c2 Minor cleanup 2014-08-26 17:45:28 +02:00
scrawl 4f92044d71 Allow user-created markers on local map (Fixes #1571) 2014-08-26 17:45:23 +02:00
scrawl 17dc01ec44 Require MyGUI version 3.2.1 and remove legacy code (Fixes #1528) 2014-08-26 17:01:35 +02:00
scrawl 1baf0f7bb2 Add version parsing to FindMyGUI.cmake 2014-08-26 16:56:04 +02:00
scrawl c2a91148f3 Implement multiple emitter nodes for NiBSPArrayController
The particles for the flame, frost and storm atronachs work correctly now.
2014-08-26 03:06:30 +02:00
scrawl dd77954512 Don't pass key to input binder if it was consumed by text editor (Fixes #1845) 2014-08-26 03:06:30 +02:00
scrawl dcddd9a07c Use MyGUI clipboard events for MyGUI 3.2.1+ (Fixes #1846)
Note that only <= 3.2.0 and >= 3.2.1 are supported, any SVN version between them might still exhibit duplicate text pasting.
2014-08-26 03:06:30 +02:00
scrawl 3d47f2ceb0 Fix bad indentation 2014-08-26 03:06:29 +02:00
scrawl 10a0e2434e Open inventory when activating an unconscious actor (Fixes #1848) 2014-08-26 03:06:23 +02:00
scrawl fc7ed05da8 Knock out actors when fatigue base is 0 (Fixes #1847) 2014-08-26 03:02:06 +02:00
scrawl 44642ae21b Fix incorrect Speed value in ESM::MagicEffect (thanks Hrnchamd) 2014-08-26 02:09:23 +02:00
scrawl b4fbaf1169 Fix potential infinite recursion in ActionTeleport (Fixes #1840) 2014-08-26 02:09:23 +02:00
scrawl 854491ac15 Don't treat actors as following if another non-combat AiPackage precedes (Fixes #1843) 2014-08-26 02:09:23 +02:00
scrawl 7714192e28 Remove wrong comment 2014-08-26 02:09:23 +02:00
scrawl 9f13315d1c Remove unused numUnload 2014-08-26 02:09:23 +02:00
scrawl c775e05d7a Show encumbrance preview when trading (Fixes #1793) 2014-08-26 02:09:22 +02:00
Marc Zinnschlag f1f38fc786 Merge remote-tracking branch 'miroslavr/master' 2014-08-25 22:03:40 +02:00
MiroslavR 46e9ee408f Do not allow mods to change fixed effect properties in the legacy format, but allow it entirely in the new format. 2014-08-25 18:59:50 +02:00
MiroslavR fc21d898f2 Add hand-to-hand tooltip 2014-08-25 03:15:28 +02:00
MiroslavR 3823e36f05 Merge branch 'master' of github.com:OpenMW/openmw 2014-08-25 00:56:35 +02:00
MiroslavR d16e0c063c Enchanting, spellmaking dialog: check for flags when listing known effects 2014-08-24 21:59:52 +02:00
MiroslavR df262e53ae Display school in the spell tooltip 2014-08-24 20:51:41 +02:00
Arthur Moore b7852b8215 Convert niffile.cpp to use std::map instead of a custom search function.
I haven't profiled this, but it should speed things up a decent bit.
2014-08-24 14:39:59 -04:00
MiroslavR fc789265e2 Spells that always succeed should not increase your skill when you cast them 2014-08-24 20:36:31 +02:00
Arthur Moore 8be6aefd95 Moved functions from niffile.cpp to where they belong.
Also cleaned up some #includes

Removed a few asserts.  Vector already throws an out_of_range error.
2014-08-24 13:45:36 -04:00
Marc Zinnschlag 45c0be8f62 Merge remote-tracking branch 'emperorarthur/niftest' 2014-08-24 19:25:51 +02:00
Marc Zinnschlag 80f05a3b81 Merge remote-tracking branch 'emperorarthur/Documentation_Updates' 2014-08-24 18:21:11 +02:00
Arthur Moore 53ce94d0e4 Disable building nif file tester by default 2014-08-24 12:11:46 -04:00
Arthur Moore cdfa24e15d (Re) Wrote a tool to test NIF files in BSAs and on the filesystem.
Just give it a set of files, one file per argument, and it will make sure openmw can read them.

On linux/mac you can use "xargs --arg-file=nifs.txt ./niftest" to give it a list of files to check.
2014-08-24 12:09:39 -04:00
Marc Zinnschlag 111b55f48e Merge remote-tracking branch 'scrawl/script' 2014-08-24 17:58:05 +02:00
Arthur Moore 5794751dd9 Updated Doxyfile to latest version.
Changes are cosmetic, but allow for more modification of the defaults.
2014-08-24 11:50:43 -04:00
scrawl 174153b2da Revert "Fix member variable case problem"
This reverts commit f0354ea04c.

Fixes #759 (again)

Conflicts:
	components/compiler/lineparser.cpp
2014-08-24 17:46:08 +02:00
Arthur Moore 96c8322665 Changed doxygen build file options
Use 'doxygen docs/Doxyfile' to build the documentation.
2014-08-24 11:43:44 -04:00
Arthur Moore 7cfbde6cbc Updated .mailmap file 2014-08-24 11:18:05 -04:00
Arthur Moore 84d0bf82b2 First pass at creating a .mailmap file for git.
This will make it easier to use git blame to identify individual file authors.

Generated with:  "git log --format='%aN <%aE>' | sort -u"
Edited by hand to match nicknames with Credits.txt
2014-08-24 11:17:44 -04:00
MiroslavR e8a245bea3 Enchanting dialog: follow vanilla behavior more closely 2014-08-24 16:41:17 +02:00
MiroslavR e2f15181f9 Make the "Choose an Attribute" text centered 2014-08-24 16:36:19 +02:00
Marc Zinnschlag 52f6a2ec7b remote local variable access was always using variable with index 1 instead of the index specified by the access request (Fixes #1739) 2014-08-24 11:58:08 +02:00
Marc Zinnschlag 736ab76f68 limit argument error workaround to PositionCell instruction (Fixes #1732) 2014-08-24 10:17:55 +02:00
Marc Zinnschlag d024c1a93f Merge remote-tracking branch 'scrawl/master' 2014-08-24 09:14:17 +02:00
Marc Zinnschlag 79e1786ff9 Merge remote-tracking branch 'rohitnirmal/quick-draw' 2014-08-24 09:11:58 +02:00
scrawl c5c822ecba Use Chop attack when walking diagonally (Fixes #1729) 2014-08-24 02:38:00 +02:00
scrawl e0e4cbbb41 Implement Light magic effect (Fixes #1122) 2014-08-24 02:37:59 +02:00
scrawl 714c927fda Fix being able to change camera during death via mouse wheel 2014-08-24 02:37:59 +02:00
scrawl 3dbe17b6ed Terminate AiPursue when target dies (Fixes #1836) 2014-08-24 02:37:59 +02:00
scrawl 1a8acac40a Share keyframe data in NIF resource (Fixes #908) 2014-08-24 02:37:59 +02:00
scrawl 2b407a9995 Refactor NIF cache
- Remove broken cache locking mechanism

This was supposed to unload NIFFiles after a cell transition completes, but it was never working due to a mistake on the line if (--sLockLevel), should have been if (--sLockLevel == 0). Repairing this would increase load times (NIF files would have to be reloaded more frequently), so just removed it for now.

 - Decouple cache from NIFFile (now a new nifcache component)

 - Add API for future background loading

 - Provide a reliable way (SharedPtr) to hold on to loaded NIFFiles. This will be useful to avoid deep copies of keyframe and text key data, which is currently a performance bottleneck.
2014-08-24 02:37:50 +02:00
Marc Zinnschlag 80d39780ae same fix for a couple of additional instructions 2014-08-23 18:50:53 +02:00
Marc Zinnschlag 7de49a66e2 fix for PCJoinFaction and for getPcRank without explicit reference 2014-08-23 18:45:06 +02:00
Marc Zinnschlag 0d8bfbfa9b getpcrank did not read the explicit reference in some cases (Fixed #1767) 2014-08-23 18:23:14 +02:00
Rohit Nirmal 6ed4f530df Forgot to update comment. 2014-08-23 10:35:55 -05:00
Rohit Nirmal bf97fe7b35 Need to change draw state if use'd item is in player's right hand. 2014-08-23 10:31:10 -05:00
scrawl e9e7e96c5f SaveGameDialog: use ComboBox accept event, not changePosition (improves keyboard navigation) 2014-08-23 16:18:46 +02:00
Marc Zinnschlag 7c1b32ae62 Merge remote-tracking branch 'miroslavr/corprus' 2014-08-23 09:15:27 +02:00
Rohit Nirmal 234903d93c Change player draw state when quick-selecting weapon or spell.
(Fixes #1828)
2014-08-22 21:36:39 -05:00
MiroslavR 85aa237baf Implement removal of corprus spells 2014-08-22 03:34:31 +02:00
MiroslavR 2cbe17ca0a Make Spells::mCorprusSpells private 2014-08-20 12:40:38 +02:00
MiroslavR 26732bc228 Purge blight should not remove corprus 2014-08-19 22:13:37 +02:00
scrawl f4b5662562 Make sure not to add duplicate viewports (Fixes #1832)
Wasn't a problem while testing reload() on linux. Maybe an implementation difference with Ogre's D3D rendersystem?
2014-08-19 19:47:46 +02:00
MiroslavR 96e7ff666d Implement saving/loading of corprus stats, remove redundant code 2014-08-19 03:17:31 +02:00
scrawl 7b2070de5a unloadUnreferencedMaterials: Properly unload materials instead of removing techniques 2014-08-18 19:23:16 +02:00
Bret Curtis feb0ef8390 fixes building on systems with kFreeBSD kernel 2014-08-18 17:19:54 +02:00
scrawl 83037a1a91 Move fast-forward of particle systems outside of OgreNifLoader (Fixes #1830)
Particle systems were being fast-forwarded before the skeleton base was attached, so particles without the LocalSpace flag would spawn at an incorrect position.
2014-08-18 16:37:47 +02:00
MiroslavR 3722c7adc3 Initial work on implementing corprus worsening effect 2014-08-18 15:33:12 +02:00
scrawl 03cb66c342 Set render queue group for projectiles (Fixes #1829) 2014-08-18 15:32:52 +02:00
Bret Curtis bb1fe23f9c fix building on GNU Hurd 2014-08-18 14:41:46 +02:00
scrawl 888a53af04 SaveGameDialog: Allow deleting saves with keyboard (Delete key) 2014-08-17 20:41:23 +02:00
scrawl 9b38888ac9 Add missing AiFollow ActorId initialization (Fixes #1818) 2014-08-17 17:01:04 +02:00
Marc Zinnschlag 4e521d1aca fixed resources collection access 2014-08-17 14:21:23 +02:00
Marc Zinnschlag 02b7712d7c Merge remote-tracking branch 'scrawl/master' 2014-08-17 12:07:44 +02:00
scrawl bcc79919a7 Fix fortified skill not immediately updating on changing equipment 2014-08-17 05:42:52 +02:00
scrawl 360c7f863c Store magic effect Base values in savegame (Fixes #1489) 2014-08-17 05:38:48 +02:00
scrawl 2db50da8dd Implement magic effect script instructions (Feature #1489) 2014-08-17 05:09:14 +02:00
scrawl d8943aef2f Encapsulate magic effect magnitude (Feature #1489) 2014-08-17 03:58:04 +02:00
scrawl e508450c1c Add persuasion GMST to ensureNeededRecords (Fixes #1817) 2014-08-17 03:58:03 +02:00
scrawl 322480862b InteractiveMessageBox: lay out buttons horizontally if button width does not exceed message width (Fixes #1812)
Also fix some layout bugs.
2014-08-16 18:53:13 +02:00
MiroslavR 195f044f3b Replace more .tga->.dds hacks with ResourceHelpers 2014-08-16 18:12:18 +02:00
scrawl bb33b4e005 Revert "Remove horizontal messagebox layout, not used in vanilla (Fixes #1402)"
This reverts commit 40d6c8abf7.
2014-08-16 17:24:18 +02:00
scrawl ddf8c5023e InventoryWindow: don't unnecessarily update preview on opening count dialog 2014-08-16 17:18:13 +02:00
scrawl 0a9a0a3b14 Slightly improve count dialog layout 2014-08-16 17:11:57 +02:00
scrawl 6ddd9cc5a2 Don't show weight or value for keys (Fixes #1815) 2014-08-16 16:51:56 +02:00
Marc Zinnschlag 47619d957a Merge remote-tracking branch 'miroslavr/master' 2014-08-16 15:25:13 +02:00
Marc Zinnschlag e893d0d7d3 Merge remote-tracking branch 'scrawl/master' 2014-08-16 15:10:03 +02:00
MiroslavR 063b40a0ee Correct tooltip for maxed out skills 2014-08-16 13:30:49 +02:00
MiroslavR 236eec3d89 Allow widgets with layout-type tooltip to change user data of widgets from tooltip layout 2014-08-16 13:24:44 +02:00
MiroslavR a9f7a30d90 HBox, VBox: call parent setPropertyOverride 2014-08-16 13:12:02 +02:00
scrawl c4ae07f48a Remove partially broken sound pausing in main menu (Fixes #1707) 2014-08-16 02:01:39 +02:00
scrawl 7432771ac7 For non-active torches set the particle system speed factor to zero instead of destroying it (Fixes #1811) 2014-08-16 00:51:02 +02:00
scrawl 6c6b3bd890 Remove extra setVisibilityFlags on SkelBase
SkelBase is already contained in mEntities.
2014-08-15 22:46:48 +02:00
scrawl ddba9e5854 Improve performance of ItemView resize (reposition widgets instead of recreate) 2014-08-15 18:42:33 +02:00
scrawl 084cc857d4 Update magic effects when changing equipment (Fixes #1646) 2014-08-15 01:13:38 +02:00
MiroslavR 1385a86bd4 Spell creation: do not add skill/attribute effects before selecting the skill or attribute 2014-08-15 00:30:24 +02:00
scrawl 7f807f31d0 Remove comment
Doing some testing with extended journals, doesn't appear to be a performance issue.
2014-08-14 19:49:03 +02:00
scrawl 77a4e38c49 Remove -Wno-ignored-qualifiers and fix caused warnings 2014-08-14 19:18:30 +02:00
scrawl c62d53ae84 Remove no longer needed comments about coordinate system 2014-08-14 19:09:33 +02:00
scrawl c065a4b203 Add ManualResourceLoader for global map overlay (Fixes #1736) 2014-08-14 19:01:03 +02:00
scrawl 1bb82c710c Fix use of uninitialized memory in AiWander::init 2014-08-14 18:55:54 +02:00
scrawl 061c7813f6 AiFollow: return from execute() if target is not player (Fixes #1637) 2014-08-14 02:14:13 +02:00
scrawl f8010c09fe Adjust combat engagement of following actors (Fixes #1810) 2014-08-14 02:13:55 +02:00
scrawl 94c2517d67 Fix race preview crash (Fixes #1808) 2014-08-13 19:30:46 +02:00
scrawl 28e61c9834 Add default values for fDifficultyMult and sDifficulty (Fixes #1742)
Also added values for some other GMSTs added in a Morrowind patch or Tribunal/BM
2014-08-13 17:32:52 +02:00
scrawl 09f27d142a Clear movement queue when changing to a new cell (Fixes #1802) 2014-08-13 16:25:27 +02:00
scrawl d649c19790 Cache ActorId in AiFollow::getTarget (Fixes #1804) 2014-08-13 16:00:32 +02:00
Marc Zinnschlag 93ed019ca3 Merge remote-tracking branch 'scrawl/master' 2014-08-13 09:04:35 +02:00
scrawl 8ae6796b2f Play creature movement animation without scaling if a fallback is used (Fixes #1797) 2014-08-13 01:53:56 +02:00
scrawl e2ee3b2497 Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwrender/terrainstorage.cpp
2014-08-12 19:53:37 +02:00
MiroslavR 4f67f5d26f Spellcreation window: set captions to "0" if no effects are added (Fixes #1778) 2014-08-12 18:53:03 +02:00
Marc Zinnschlag 40a33eb9f0 Merge remote-tracking branch 'miroslavr/master' 2014-08-12 17:49:03 +02:00
scrawl b374255447 Improve performance of moving spell window (don't recreate widgets unnecessarily) 2014-08-12 17:07:15 +02:00
scrawl 025f50a2df Improve performance of inventory window resize (don't update selection buffer unnecessarily) 2014-08-12 17:07:06 +02:00
MiroslavR baa14511cf Use ResourceHelpers to replace DDS hacks scattered throughout the code, fix prefix comparision 2014-08-12 12:18:38 +02:00
Marc Zinnschlag a5ecf2e9f0 hide record type column in resources tables 2014-08-12 11:32:38 +02:00
Marc Zinnschlag 98fa789904 fixed mixed-up tooltip 2014-08-12 11:07:54 +02:00
scrawl 177de58884 Use fWereWolfRunMult only when no weapon is drawn 2014-08-12 01:10:18 +02:00
scrawl 63cb91db2e Add --export-fonts command line option 2014-08-11 20:40:02 +02:00
scrawl cf22d2fa36 Make Potions reveal two effects for every fWortChanceValue of alchemy skill (Fixes #1792) 2014-08-11 20:40:02 +02:00
scrawl 5335f00958 Don't show Until Healed button when only fatigue is not full (Fixes #1798) 2014-08-11 20:40:02 +02:00
scrawl 28fe81df90 Make Lights with OffDefault flag not emit light nor particles when placed in a cell (Fixes #1796) 2014-08-11 20:39:56 +02:00
MiroslavR 4d403ed747 Rename and move functions for texture path correction 2014-08-11 20:04:44 +02:00
scrawl 8866b5f860 Fix maximum magicka calculation (Fixes #1795) 2014-08-11 19:07:14 +02:00
scrawl fc1687906b Use the last Loop Stop key for calculating animation velocity (Fixes #1776) 2014-08-11 05:29:36 +02:00
scrawl 34847baa54 Disable head animations for dead actors (Fixes #1781) 2014-08-11 05:00:13 +02:00
scrawl f8040da694 Make doors move through dead actors (Fixes #1608) 2014-08-11 04:43:06 +02:00
scrawl 98bc4618cb AiAvoidDoor: turn and walk forward instead of backwards or sideways (Fixes #1788) 2014-08-11 04:21:04 +02:00
scrawl 36ba56d037 Make Position instruction move non-player actors within their cell only (Fixes #1791) 2014-08-11 02:01:20 +02:00
slothlife f6b2e7d5fd Fix building on Win32 2014-08-10 18:28:38 -05:00
scrawl f724732290 Implement mouse wheel journal navigation (Fixes #1790) 2014-08-11 00:51:54 +02:00
scrawl fcd2a9e4d5 Don't set magic effects for dead actors (Fixes #1783) 2014-08-10 23:52:32 +02:00
scrawl 4138c3e966 Reuse health of previous level rather than recalculating initial health (Fixes #1787) 2014-08-10 17:09:14 +02:00
scrawl 399fa90ef1 Add missing include guard 2014-08-10 16:56:54 +02:00
Marc Zinnschlag ee3acc31a8 minor correction to previous commit 2014-08-10 10:09:45 +02:00
cc9cii c43bd3c345 Continue loading esm after detecting string table overflow condition. Should resolve bug #1774. 2014-08-10 12:54:54 +10:00
MiroslavR 4873c4bd31 Generalize function for texture path correction (Fixes #1779) 2014-08-09 18:59:57 +02:00
scrawl fc0465eeb0 Add missing header to CMakeLists 2014-08-09 15:42:54 +02:00
scrawl 4a26dcb2ad Avoid calling RenderTarget::update from within loadResource 2014-08-08 15:46:33 +02:00
scrawl 8c26f802e6 Move terrain grid implementation to a component so the editor can use it (Feature #1597) 2014-08-08 15:46:33 +02:00
scrawl 982453d4f6 Move ESM terrain data handler to esmterrain component so it can be used by the editor (Feature #1597) 2014-08-08 15:46:33 +02:00
scrawl accab47724 Don't knock down from fall damage in onHit (CharacterController is doing that already) 2014-08-08 15:46:32 +02:00
scrawl a731ec3587 Remove summoned creature and its effect when it is killed (Fixes #1341) 2014-08-08 15:46:32 +02:00
scrawl 8a4e0a2ce8 Don't fade out screen if teleport target cell is not found 2014-08-08 15:46:32 +02:00
scrawl 143609be59 Set glyph width/height separately from texture coordinates (Bug #1096)
Requires MyGUI SVN
2014-08-08 15:46:13 +02:00
scrawl 22d7d8a466 Implement Command creature/humanoid magic effects (Fixes #1120) 2014-08-07 17:21:07 +02:00
scrawl 0f8a10f468 Savegame: Set equipment slot for lights (Fixes #1761) 2014-08-06 20:13:58 +02:00
scrawl 2bfcec53bf Don't show sMagicInvalidTarget for soultrap on NPCs (Fixes #1762)
Note the message was accurate, since NPCs can't be soultrapped. Maybe vanilla doesn't show it to not spam the screen with message boxes when attacking with a "soultrap on strike" weapon...
2014-08-06 20:13:58 +02:00
scrawl a9a7a7ec73 Use Modified attribute values to derive magicka and fatigue (Fixes #1760) 2014-08-06 20:13:58 +02:00
scrawl c5a9cd0aa1 Sync upstream changes to shiny 2014-08-06 20:13:58 +02:00
scrawl 44b517f66d Implement hiding inventory windows by double click on caption (Fixes #1690) 2014-08-06 20:13:58 +02:00
scrawl 2e7b5fde7c Fix uninitialized QuestStatus in DialInfo (Fixes #1694) 2014-08-06 20:13:57 +02:00
scrawl c6bf9dfbfb Add ManualResourceLoader for character previews (Fixes #1752) 2014-08-06 20:13:57 +02:00
scrawl 0b1e997bdd Make sure dialogue is ended properly when closing it by using a service (Fixes #1755) 2014-08-06 20:13:57 +02:00
scrawl 1fc424ce30 Make sure player doesn't get any AI packages (Bug #1749) 2014-08-06 20:13:57 +02:00
MiroslavR 42dceb641e Readd Azura's Star after recharging (Fixes #1765) 2014-08-06 19:50:10 +02:00
MiroslavR 8707f7b116 Fix spell creation magicka cost (Fixes #1763) 2014-08-06 13:19:40 +02:00
Marc Zinnschlag 8951974208 updated credits file 2014-08-06 13:03:55 +02:00
Marc Zinnschlag f4ddf2a7b9 Merge remote-tracking branch 'sandstranger/android' 2014-08-06 08:04:11 +02:00
root c15902487d fix indent in cmake 2014-08-06 07:59:39 +04:00
root 32ebc90ba4 fix v9 2014-08-06 07:52:36 +04:00
root 713787d92f fix v7 2014-08-06 07:48:16 +04:00
root 8978f9bcc6 fix v6 2014-08-06 02:10:47 +04:00
root 3cd98e5259 fix code v5 2014-09-06 02:02:39 +04:00
root e27ca878a1 fixed v 4 2014-08-06 01:01:43 +04:00
root 174b528082 fixe v 3 2014-08-06 00:54:53 +04:00
root d8772156a7 fixe all code v 2 2014-08-06 00:46:21 +04:00
root 9757ad4031 fixed code 2014-09-04 23:27:14 +04:00
root 8a8b91dfe1 fixed all code for building on all platforms inlcudng ANDROID 2014-09-04 22:47:03 +04:00
root 57a8b9cdb5 abdroid-build 2014-08-04 19:52:01 +04:00
root 7cd2d4809c android-build 2014-08-04 19:50:53 +04:00
root 16aafc26bc fixed cmake for build on all plaforms include android 2014-08-04 19:49:54 +04:00
Marc Zinnschlag 33c36bf0df Merge remote-tracking branch 'scrawl/master' 2014-08-03 22:23:48 +02:00
scrawl 45f0f0e4c3 Use sky_night_02.nif if available (Fixes #1744) 2014-08-03 17:40:29 +02:00
scrawl 639ae7e06c Implement friendly hits on followers (Fixes #1139) 2014-08-03 16:24:16 +02:00
scrawl 2d74388a76 Don't report crime if we are in combat with the victim 2014-08-03 16:24:16 +02:00
scrawl 216ebac2e9 Implement weapon condition damage for ranged weapons (Fixes #1746) 2014-08-03 16:24:11 +02:00
Marc Zinnschlag dbf5613d8c cleanup 2014-08-03 09:28:44 +02:00
Digmaster a32ab842ae Added ForceJump/ForceMoveJump commands 2014-08-02 22:42:40 -07:00
scrawl eb1888a540 Fix GetPcRank and PcExpelled not accepting Faction IDs properly (Fixes #1709) 2014-08-03 00:31:25 +02:00
scrawl ef78ae22f6 Loosen mode restrictions on opening Journal window (Fixes #1570) 2014-08-03 00:31:18 +02:00
scrawl cd8287da16 Make sure fog texture is loaded before trying to convertToImage 2014-08-01 18:42:51 +02:00
scrawl 6cb9382bf0 Adjust screen-sized widgets automatically using Stretch align 2014-08-01 17:15:28 +02:00
scrawl 715d357f24 Use a controller to move Drag&Drop widget with the mouse cursor 2014-08-01 17:14:35 +02:00
scrawl a18cec7c8e Use a MyGUI widget to render the screen fader (Fixes #1741, Fixes #1719) 2014-08-01 16:25:41 +02:00
Marc Zinnschlag 3f6a7e36d0 removed the (partial broken) return/enter shortcut for custom push buttons, since there is already a space shortcut) 2014-08-01 09:50:49 +02:00
Marc Zinnschlag 1e6d557089 Merge branch 'visibility' 2014-07-31 14:34:25 +02:00
Marc Zinnschlag f381451ae0 added control element selector toolbar button 2014-07-31 14:33:38 +02:00
Marc Zinnschlag 612202a7a5 fixed several bugs in the layout algorithm of the toggle scene tool 2014-07-31 14:33:12 +02:00
Marc Zinnschlag 507e5c4f6e explicitly flag scene as modified when changing visibility mask 2014-07-31 14:29:52 +02:00
Marc Zinnschlag 439ba57d46 added visual element selector toolbar button 2014-07-31 14:06:04 +02:00
Marc Zinnschlag a25758c3b1 fixed visibility flags setting 2014-07-31 14:02:55 +02:00
Marc Zinnschlag b0a9d17dc3 use name as a tooltip if no tooltip is given for scene tool bar toggle buttons 2014-07-31 13:26:23 +02:00
Marc Zinnschlag 92d322cbd1 added visibility flags 2014-07-31 13:25:30 +02:00
Marc Zinnschlag 71ce78f949 added scene toolbar toggle widget 2014-07-31 13:05:08 +02:00
scrawl b58b8c6f8f Adjust player position to ground when using a door marker, even if the player is levitating (Fixes #1737) 2014-07-31 04:28:02 +02:00
scrawl 89af49f669 Make sure fog of war texture is loaded before accessing its buffer 2014-07-31 01:58:33 +02:00
scrawl 0c1c468f70 Accept a useless extra integer argument for addItem (Fixes #1726) 2014-07-31 01:18:52 +02:00
scrawl 175cc98e64 Make magic effects with no corresponding resistance attribute unresistable (Fixes #1727) 2014-07-31 01:14:44 +02:00
scrawl 0f1451babd Add epsilon to armor class calculation 2014-07-30 20:26:47 +02:00
Marc Zinnschlag 7a5f73de9e added navigation mode icons to buttons 2014-07-30 17:02:23 +02:00
Marc Zinnschlag bb741eb8d7 Merge remote-tracking branch 'crysthala/master' 2014-07-30 16:49:27 +02:00
scrawl 261e755e73 Font hacking again (Fixes #1506) 2014-07-30 15:26:10 +02:00
scrawl d1feb9ef02 Fix # in book text being interpreted as MyGUI color code 2014-07-30 15:26:10 +02:00
scrawl 78bd516ab4 Show sMagicInvalidTarget for an invalid soultrap target (Fixes #1728) 2014-07-30 15:26:10 +02:00
crysthala f25e0b13b2 render window controls icons
eyeball dude: first person
flying eye: free cam
orbit2: orbiting cam
2014-07-30 07:55:21 -05:00
Michał Ściubidło f754e06be9 Fix for bug 1685 2014-07-30 07:47:09 +01:00
scrawl 45af34d189 Merge branch 'master' of https://github.com/OpenMW/openmw 2014-07-29 19:35:44 +02:00
scrawl 543bb22e8f Implement collision script instructions (Fixes #1111) 2014-07-29 19:01:40 +02:00
scrawl ccde462308 Fix typo (RefId -> RefNum) 2014-07-29 19:01:14 +02:00
scrawl 9e48d56244 Reset RefNum when copying an object (Fixes #1723) 2014-07-29 15:55:58 +02:00
scrawl 1a6db097ed Fix dangling MWWorld::Ptrs in enchanting dialog after loading save game (Fixes #1722) 2014-07-29 15:32:22 +02:00
scrawl a59620f643 Cache loudness vector in the buffer cache 2014-07-29 14:32:44 +02:00
scrawl 0943ff0886 Fix normalizing sample values 2014-07-29 14:19:12 +02:00
Marc Zinnschlag ff407a5b87 Merge remote-tracking branch 'funkybit/master' 2014-07-29 08:55:56 +02:00
scrawl 625f9a35e6 Implement NPC eye blinking (Fixes #1721) 2014-07-29 01:16:08 +02:00
scrawl 598c0c4ae7 Implement mouth animation for NPCs based on say sound (Fixes #642) 2014-07-29 01:15:22 +02:00
Michał Ściubidło bd3729a6cb Add grace periods for player greeting.
Add delay for NPC greating. NPC ignores greeted player after some time.
Fixes bug 1503.
2014-07-28 23:45:26 +01:00
Michał Ściubidło d47bfbe69c Implement AI greeting states.
Greeting consist of 3 phases:
- none - default one, greeting state can only change to "in progress"
  when near enough and some time passes
- in progress - NPC says his greating and rotates toward player,
  state can only change to "done" after some time
- done - rotation is stoped, after idling can go away from player,
  state can only change to "none" when player and NPC are faraway
2014-07-28 23:45:26 +01:00
Michał Ściubidło 20efeea5d9 AI tell their greatings even when player is moving (like morrowind).
Greating reset distance was greatly inflated comparing with morrowind.
2014-07-28 23:45:26 +01:00
scrawl 7dfb624ee2 Support loading text keys for objects without a skeleton
This means we can no longer map them to bone IDs, but they are unused anyway.

Required to load text keys from the default head models (such as Talk: Start/Stop and Blink: Start/Stop)
2014-07-29 00:23:00 +02:00
bogglez c006393178 Fix http://bugs.openmw.org/issues/768
Changes application_name in configuration manager to OpenMW instead of
openmw, if on windows. This shouldn't break anything since Windows uses
case-insensitive filesystems. Strictly speaking the installation
directory must be OpenMW now though (not sure whether this is the case)
2014-07-28 21:52:34 +02:00
Marc Zinnschlag 0032426817 updated credits file 2014-07-28 20:39:37 +02:00
scrawl 8455ed6279 Cancel upper body animations when knocked down 2014-07-28 19:51:29 +02:00
scrawl 5349699172 Only show "target resists magic" message for spells cast by player 2014-07-28 17:54:48 +02:00
bogglez b56cb7e5ee Remove defunct option for building without FFmpeg
- Added REQUIRED to find_package(FFmpeg)
- Removed USE_FFMPEG option from CMakeLists.txt
- Always use FFmpeg for sound input
- Removed SOUND_DEFINE from CMakeLists.txt
- Removed #else branch from videoplayer.cpp with dummy VideoState code
  (FFmpeg is now guaranteed to exist and the code was incomplete)
- Remove #ifdef OPENMW_USE_FFMPEG in ffmpeg_decoder.cpp, it is guaranteed to be used
- Remove #ifdef OPENMW_USE_FFMPEG from soundmanagerimp.cpp, it is guaranteed to be used
2014-07-28 17:46:41 +02:00
scrawl f67b7dae91 Sheath weapon in all Ai packages except for AiCombat 2014-07-28 17:32:14 +02:00
scrawl d956df83e4 Don't make guards fight non-aggressive creatures that are in combat
Ex. summoned creature that is helping in a fight.
2014-07-28 17:19:20 +02:00
scrawl d9a6515fe3 Adjust AiFollow running threshold to more closely match vanilla MW 2014-07-28 17:11:46 +02:00
scrawl 18b3e71be5 Reset player position when spawning in fallback cell 2014-07-28 16:59:46 +02:00
scrawl 4773d754c6 Remove redundant isHostile flag (Fixes #1652) 2014-07-28 16:41:12 +02:00
scrawl 0077296c91 Take actor's speed into account in stuck check
The Winged Twilight's walking animation was so slow that it incorrectly detects being stuck.
2014-07-28 15:57:16 +02:00
scrawl d69ed78ccd Don't add combat AI to player 2014-07-28 15:40:52 +02:00
scrawl 3067082534 Make base_anim.nif take priority for biped creatures
Fixes the skeletal minion's WalkForward1h animation.
2014-07-28 14:53:53 +02:00
Marc Zinnschlag bb9e5f9eb1 Merge branch 'openmw-31'
Conflicts:
	apps/openmw/mwgui/companionwindow.cpp
	apps/openmw/mwgui/container.cpp
	readme.txt
2014-07-28 10:11:55 +02:00
Marc Zinnschlag 4791098e11 Merge remote-tracking branch 'miroslavr/master' 2014-07-28 10:06:22 +02:00
Marc Zinnschlag 7991dfb907 Merge remote-tracking branch 'scrawl/master' 2014-07-28 09:03:17 +02:00
Marc Zinnschlag c9cd7fb6b7 Merge branch 'scripts' 2014-07-28 09:02:24 +02:00
Marc Zinnschlag ad50b926f5 reducing some stray arguments again 2014-07-28 09:01:44 +02:00
scrawl c6d3b0b70b Moved merchant restock from trade start to dialogue start, since other services also interact with it. 2014-07-28 02:27:48 +02:00
scrawl 315b022d2d Add transfer gold from all services to NPC trade gold pool 2014-07-28 00:55:57 +02:00
scrawl 45206bc3f6 Savegame: write and read dynamic Store before Cells 2014-07-28 00:32:59 +02:00
MiroslavR b4ba18afe7 Include revision number in the "version" command line option (Closes #1711) 2014-07-27 23:36:40 +02:00
scrawl 6262d6c964 Don't leave stale player CharacterController in Actors when loading game (Fixes #1713) 2014-07-27 23:10:58 +02:00
Marc Zinnschlag 17bd094afd allow a few more stray arguments 2014-07-27 20:55:54 +02:00
Marc Zinnschlag 2abc4e42c8 end parsing of line after parsing a declaration 2014-07-27 20:49:57 +02:00
scrawl d81e9cfefd Implement actors fighting for the actor they are following (Fixes #1141) 2014-07-27 20:33:45 +02:00
scrawl 1a04501951 Handle faction save/load properly when player has faction reputation in a faction he is not a member of (Fixes #1573) 2014-07-27 20:33:45 +02:00
scrawl 47e42d4fda Destroy Engine after exception is logged
In cases where OpenMW throws an exception, then crashes in the Engine destructor (ideally should not happen, but keeps happening), we will at least see what the exception was about.
2014-07-27 20:33:45 +02:00
scrawl d7acb7fc7d Ignore invalid shader cache index (Bug #1664) 2014-07-27 20:33:45 +02:00
scrawl 8c81e22f3e Determine target for On Touch effects for non-player actors 2014-07-27 20:33:44 +02:00
scrawl fdc6dd6985 Shader compatibility fixes for GLSL ES 2014-07-27 20:33:44 +02:00
scrawl 31d058b98c Add workaround for ScrollView messing up canvas size (Fixes #1700)
TODO: Create fixed ScrollView widget?
2014-07-27 20:33:44 +02:00
scrawl 16b089cdc8 Fix invisible enchanting price when self-enchanting was previously used. 2014-07-27 20:33:44 +02:00
scrawl 9c60e4d826 Change button caption from "Buy" to "Create" when self-enchanting 2014-07-27 20:33:44 +02:00
scrawl 09607f992e Enchanting: fix inverted self-enchant success chance (Fixes #1701) 2014-07-27 20:33:44 +02:00
scrawl b370c0f7b5 Enchanting: Don't check price on self-enchanting (Bug #1701) 2014-07-27 20:33:43 +02:00
scrawl 4a1e561015 Properly assign effect attribute/skill in potion creation (Fixes #1704) 2014-07-27 20:33:02 +02:00
Marc Zinnschlag 6a745c014f workaround for incorrect argument order for PositionCell instruction 2014-07-27 11:51:53 +02:00
scrawl 90b2709d6c Allow absorption of non-harmful spells (Fixes #1693)
Also fix absorption being calculated for each effect rather than the whole spell.
2014-07-25 19:56:06 +02:00
scrawl 60499eff83 Hotfix for message boxes locking up the game 2014-07-25 19:48:37 +02:00
Marc Zinnschlag af54bb9623 removed some redundancies; some more general cleanup 2014-07-25 12:23:18 +02:00
Marc Zinnschlag d0654f3ade move starting of startup scripts from engine startup to new game start; also restart all startup scripts on saved game load 2014-07-25 12:17:15 +02:00
Marc Zinnschlag 5e543ac806 added script doortestwarp to blacklist 2014-07-25 11:53:30 +02:00
Marc Zinnschlag 4421e7a5cc added lighting mode toolbar icons 2014-07-25 11:15:04 +02:00
Marc Zinnschlag 151ef14b67 some cleanup 2014-07-25 11:10:12 +02:00
Marc Zinnschlag acb728195f improved documentation of ESM::Script member variables 2014-07-25 10:37:34 +02:00
Marc Zinnschlag 1ca0cc4988 rewrote MWScript::Locals::configure to be independent of precompiled script data 2014-07-25 09:37:21 +02:00
Marc Zinnschlag a3c4000198 moved call to Globalscripts::addStartup out of the constructor because at the time of construction the environment may not be set up yet to perform this operation 2014-07-25 09:36:02 +02:00
Marc Zinnschlag 87c54adb24 some cleanup 2014-07-25 09:26:30 +02:00
Marc Zinnschlag f6b502b195 rewrote dialgoue filter access to local variables 2014-07-25 09:08:59 +02:00
Marc Zinnschlag 9f69db0d69 added missing const to ScriptManager::getLocals 2014-07-25 08:12:53 +02:00
Marc Zinnschlag 2e355df8b3 removed function ScriptManager::getLocalIndex (was redundant and was also depending on precompiled scripts) 2014-07-25 07:59:50 +02:00
Marc Zinnschlag 358c76a049 Merge remote-tracking branch 'crysthala/master' 2014-07-24 22:29:29 +02:00
scrawl 75abe8db31 Ignore FLTV from old savegames 2014-07-24 20:52:14 +02:00
crysthala 919632a505 render lighting icons 2014-07-24 13:12:44 -05:00
scrawl 81cb4bf6d1 Merge branch 'master' of https://github.com/OpenMW/openmw 2014-07-24 19:52:10 +02:00
scrawl 4ec51b386a Add ManualResourceLoader for fog of war textures (Fixes #1675) 2014-07-24 19:00:57 +02:00
scrawl 4b3e12bfb4 Fix pinned widgets receiving mouse clicks in gamemode (Fixes #1686) 2014-07-24 18:04:44 +02:00
scrawl 469d2afffa Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwgui/levelupdialog.cpp
2014-07-24 02:33:46 +02:00
scrawl d4ff17f1c5 Remove unused FLTV and NAM0 from CellRef 2014-07-24 02:20:16 +02:00
scrawl 4e0c133fb3 Add comment to Cell NAM0 (it's a RefId counter) 2014-07-24 02:19:36 +02:00
scrawl 7ae9bbb1a5 Implement iCrimeThresholdMultiplier 2014-07-24 02:17:44 +02:00
scrawl fc618cb3ea Use separate function for fatigue restoration during resting/waiting 2014-07-24 02:17:44 +02:00
scrawl 103325bfb8 Change HUD enemy health bar to use actorId 2014-07-24 02:17:44 +02:00
scrawl 07cfa2abd5 Set texture unit indices for GLSL ES 2014-07-24 02:17:44 +02:00
scrawl 75366b2e37 Implement CellRef's faction rank (rank requirement to use item) 2014-07-24 02:17:38 +02:00
Michał Ściubidło 432fb751bf Implement fatigue restoration to match Morrowind.
Fatigue restoration doesn't depend on encuberance or EndFatigueMult.
2014-07-23 21:25:28 +01:00
Marc Zinnschlag f55084463b added MockChangeScript to script blacklist 2014-07-23 12:35:15 +02:00
Marc Zinnschlag 19f4c46fe4 alllow (and ignore) explicit references for StopScript and ScriptRunning 2014-07-23 12:33:35 +02:00
Marc Zinnschlag aa8c0bccb4 added new argument type: z (optional, any) 2014-07-23 09:44:29 +02:00
scrawl ca45a63cf7 Close doors instantly when using Lock instruction 2014-07-22 17:55:54 +02:00
scrawl 2b57c7fa67 Use CellRef's global variable to disable owner (Fixes #1677) 2014-07-22 17:06:40 +02:00
Marc Zinnschlag 91afc2ebe7 Merge remote-tracking branch 'mikesc/bug1482' 2014-07-22 08:13:35 +02:00
Marc Zinnschlag 6b5f79a9ca Merge remote-tracking branch 'miroslavr/master' 2014-07-22 08:11:11 +02:00
Marc Zinnschlag ccf672630f Merge remote-tracking branch 'lgro/aicombat' 2014-07-22 08:06:24 +02:00
Michał Ściubidło e24173f94a Fix bug 1482:
- put powers on cooldown only when they are used succedsfully
2014-07-21 23:56:38 +01:00
scrawl 038a811f16 Rename travel window Ok button to Cancel (Fixes #1676) 2014-07-21 23:44:33 +02:00
Lukasz Gromanowski 171c61022d Added initialization of weapRange in AiCombat::execute().
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2014-07-21 21:17:12 +02:00
MiroslavR 3b67e9b329 Rework level up dialog to behave more like vanilla 2014-07-21 20:56:02 +02:00
scrawl c0645d4978 Increase death count immediately on death (Bug #1588)
This is required for scripts using getDeadCount as reaction to onDeath that rely on the increased value.
2014-07-21 20:37:14 +02:00
scrawl d43c21a9fc Make NPCs react to being attacked by other actors (Fixes #1588) 2014-07-21 20:36:26 +02:00
scrawl 127add7623 Don't allow dialogue with werewolf NPCs 2014-07-21 18:19:45 +02:00
Marc Zinnschlag 11a2c767cc some argument parsing cleanup 2014-07-21 12:50:29 +02:00
Marc Zinnschlag a9f9dec923 consider script blacklist in OpenCS verifier 2014-07-21 12:15:21 +02:00
Marc Zinnschlag d87630b41a blacklisting for scripts in OpenMW 2014-07-21 09:34:10 +02:00
scrawl 10d4da7994 Fix date time in journal entries being off by one day (Fixes #1668) 2014-07-21 01:17:01 +02:00
scrawl 5629803a08 Implement correct armor mitigation mechanics 2014-07-20 23:45:31 +02:00
scrawl 804f1a5e59 Adjust combat mechanics
- Projectiles can not trigger critical hits
 - Critical hits are only possible if the target is not in combat (Fixes #1669)
 - Hand-to-hand deals damage to health during entire duration of knockdown animation (including standing up)
2014-07-20 23:17:55 +02:00
scrawl 90a96cd7d8 Fix bug where actors in combat with multiple other actors where not regarded as in combat with a specific actor 2014-07-20 22:34:20 +02:00
scrawl 1636fd66db Don't add creature base damage to weapon damage (UESP was wrong) 2014-07-20 22:26:26 +02:00
scrawl 6d794dac69 Add missing messagebox for spell lock and unlock success 2014-07-20 17:09:55 +02:00
scrawl 9897f14c3c Don't block when actor is paralyzed 2014-07-20 16:52:57 +02:00
scrawl 28a0899d2b Implement difficulty scaling (Fixes #1505) 2014-07-20 16:38:20 +02:00
scrawl 5bbf07976f Consider Shield spell effect for creature armor rating 2014-07-20 14:41:39 +02:00
scrawl 691ba02115 Reduce wepaon condition even if attack misses 2014-07-20 14:12:27 +02:00
MiroslavR 0f2305ae43 Clear selected spell when window manager is cleared 2014-07-20 13:07:47 +02:00
scrawl 63fd04882a Make sure crime gold discounts don't reduce price to zero 2014-07-19 23:49:54 +02:00
MiroslavR d5381e1bc4 Dynamically resize skill widgets to fit their contents (Fixes #1610) 2014-07-19 14:04:38 +02:00
scrawl 1320ac6983 Ensure non-negative particle life time, add size assertion 2014-07-18 16:11:08 +02:00
Marc Zinnschlag e33ee52b91 make stray names in the begin line a warning instead of an error 2014-07-18 12:29:20 +02:00
Marc Zinnschlag 6a3ff211b1 automatically get target ID at InterpreterContext construction, if a reference is available 2014-07-18 09:57:47 +02:00
Marc Zinnschlag 4fb897f2f8 added missing getId functions to classes derived from MWWorld::Class 2014-07-18 09:56:58 +02:00
scrawl 192d5ca08f Allow overriding OGRE_PLUGIN_DIR in cmake command line 2014-07-17 22:31:57 +02:00
scrawl d4ffd30f98 Implement Rank filter with no faction given (Fixes #1660) 2014-07-17 20:57:37 +02:00
scrawl 4d39d77eaa Fix incompatible encoding names in ContentModel (bug uncovered by 41c17bccb6) 2014-07-17 20:40:40 +02:00
scrawl f9a39138cc Add missing endline 2014-07-17 16:16:14 +02:00
scrawl 2a510573b8 Remove unused implementation file 2014-07-17 16:16:14 +02:00
scrawl 41c17bccb6 Exit if an unknown encoding option is specified 2014-07-17 16:16:14 +02:00
scrawl 876af8f529 Fix not saved Attacked flag (Fixes #1657) 2014-07-17 16:16:13 +02:00
scrawl 08ce6ed7fb Attempt to restack item after repair or recharge (Fixes #1656) 2014-07-17 16:16:06 +02:00
Marc Zinnschlag 8952154488 inherit target ID when starting a script from another script 2014-07-17 13:37:57 +02:00
Marc Zinnschlag 27c84d6cb7 the reference for a targeted script is now determined when needed instead of at the start of the script execution 2014-07-17 13:36:55 +02:00
Marc Zinnschlag 35b27ea8cb ignore stray string argument after GetDisabled 2014-07-17 11:29:04 +02:00
Marc Zinnschlag dba6a9ebff run targeted scripts with an implicit reference based on the ID given 2014-07-17 09:15:41 +02:00
Marc Zinnschlag e8322da663 added support for targeted scripts to script compiler 2014-07-17 08:36:34 +02:00
scrawl 20a0040bdb Apply elemental shield magnitude to element resistance (Closes #1121) 2014-07-16 10:58:28 +02:00
scrawl 123157b216 Implement elemental shield damage to attacker (Feature #1121) 2014-07-16 10:58:28 +02:00
scrawl f43a10b7b9 Adjust disease contraction according to Hrnchamd's research 2014-07-16 10:58:21 +02:00
Marc Zinnschlag 75ab8de3d2 added opcode for running scripts with explicit references (targeted scripts) 2014-07-15 13:26:04 +02:00
Marc Zinnschlag e9377ad5c4 include targeted script data in saved games 2014-07-15 13:05:38 +02:00
Marc Zinnschlag 8241ee59c3 modified GlobalScripts data structures to accommodate targeted script data 2014-07-15 12:59:02 +02:00
Marc Zinnschlag 1a1f5dfc4a added tooltips to dialgoue subview buttons 2014-07-15 12:46:52 +02:00
Marc Zinnschlag 563c2e5730 be a bit more relaxed about allowing - in names (Fixes #1593) 2014-07-15 10:39:11 +02:00
scrawl 5839691530 Check for container organic flag before checking weight (Fixes #1654) 2014-07-14 17:27:36 +02:00
scrawl 6cd739678a Fix dangling model pointer after reference cleanup (Fixes #1653) 2014-07-14 16:53:58 +02:00
Marc Zinnschlag 517b27e29a Merge branch 'toolbar' 2014-07-14 14:18:08 +02:00
Marc Zinnschlag 0430558c3c fixed focussed button in mode tool panel when panel is opened 2014-07-14 14:17:27 +02:00
Marc Zinnschlag 17fc570e38 new keyboard shortcut (T): move focus from toolbar to scene widget 2014-07-14 13:49:55 +02:00
Marc Zinnschlag 92af093856 new keyboard shortcut (T): move focus from scene widget to toolbar 2014-07-14 11:19:59 +02:00
Marc Zinnschlag 688d413b8c when scene toolbar gains focus, focus first button 2014-07-14 11:06:12 +02:00
scrawl f31a5490f3 Create shaders on first render in shader based MyGUI manager 2014-07-13 19:35:26 +02:00
scrawl 7c7c71428a Don't crash if certain class doesn't exist 2014-07-13 14:26:59 +02:00
Marc Zinnschlag c2ea8f3f0a added self-adjusting tooltips to the top-level toolbar buttons 2014-07-13 14:21:50 +02:00
Marc Zinnschlag 26f87f5d23 added navigation mode button tooltips 2014-07-13 12:15:05 +02:00
Marc Zinnschlag e855e55318 added tooltip to user settings button on startup window 2014-07-13 10:52:33 +02:00
scrawl c9150c9680 Initialize character skeleton to a suitable pose (Fixes #1473) 2014-07-13 10:40:48 +02:00
slothlife d0e1210dd7 Fix for Bullet debug assert
After changing the vector comparison to squaredDistance, the threshold
for rejecting similar vectors needed to be readjusted.
2014-07-13 01:39:42 -05:00
scrawl 8b404ee255 Fix not being able to exit dialogue using Escape when a Goodbye link appears 2014-07-13 06:42:24 +02:00
Marc Zinnschlag cae0c4a044 Merge remote-tracking branch 'scrawl/master' 2014-07-12 21:19:15 +02:00
scrawl f2799ea1d9 Reset item model when reference is reset (Fixes #1628)
This caused crashes when the window was resized after the reference no longer exists (e.g. when a savegame is loaded)
2014-07-12 18:53:22 +02:00
scrawl 40c3fa0dc1 Fix travis 2014-07-12 18:53:22 +02:00
scrawl 41d73377b0 Use explicit C locale in Misc::StringUtils (Fixes #1216) 2014-07-12 18:53:22 +02:00
Marc Zinnschlagandscrawl 7cd819f24f updated changelog 2014-07-12 18:53:22 +02:00
Marc Zinnschlagandscrawl 7316f4dde4 increased version number 2014-07-12 18:53:22 +02:00
scrawl d63dd88113 Apply autocalc corrections to player starting spells 2014-07-12 18:53:16 +02:00
scrawl fd3f109362 Fix underflow for NPCs with level 0 2014-07-12 18:53:16 +02:00
scrawl a1639371d3 Fix rounding for skill/attribute autocalc 2014-07-12 18:53:16 +02:00
scrawl 83819b2894 Traverse spells in record order from content files. bronrod_the_roarer is perfect now. Other NPCs have some differences. 2014-07-12 18:53:15 +02:00
scrawl 479f248c1d Use spell effect range type, not base effect (applied to spellcasting code) 2014-07-12 18:53:15 +02:00
scrawl b4f8edc186 Use spell effect range type, not base effect 2014-07-12 18:53:15 +02:00
scrawl 1c41ce9b9d Implement Hrnchamd's player and NPC autocalc spells (Some unclarities remaining, XXX) 2014-07-12 18:53:15 +02:00
scrawl d91d599269 Disable quickload when in modal dialog (Fixes #1641) 2014-07-12 06:43:04 +02:00
scrawl 048d07b299 Show owner of doors in tooltip 2014-07-11 11:57:21 +02:00
scrawl 5fbce67b9d Don't redraw ItemView if the size did not change 2014-07-11 04:30:44 +02:00
scrawl 53c70dbdaa Exit dialogue when going to jail (Fixes #1635) 2014-07-11 04:25:56 +02:00
Marc Zinnschlag 490442cf62 added lighting mode tooltips 2014-07-10 13:18:24 +02:00
Marc Zinnschlag 61a02d8a40 replaced custom toolbutton push flag with type enum 2014-07-10 13:04:30 +02:00
Marc Zinnschlag 32e48edb83 toolbar tooltip system 2014-07-10 12:53:57 +02:00
Marc Zinnschlag 67ad7d5b0e fixed scene subview focus problem 2014-07-10 12:20:48 +02:00
Marc Zinnschlag 57b9b8d884 set focus when opening a toolbar panel 2014-07-10 12:13:27 +02:00
Marc Zinnschlag d6c0b8d0ac use custom button on toolbar (top level) 2014-07-10 11:45:45 +02:00
Marc Zinnschlag 44b95bbd7b added push mode and icon-less push button constructor 2014-07-10 11:45:20 +02:00
Marc Zinnschlag 8b239df1b1 removed text argument from button constructor, because toolbar buttons will always be icon only 2014-07-10 11:34:09 +02:00
Marc Zinnschlag 365b721878 return/enter activate the selected button 2014-07-10 11:32:20 +02:00
Marc Zinnschlag 50ee815dd8 make buttons in mode panel act like radiobuttons 2014-07-10 11:23:48 +02:00
Marc Zinnschlag dd0aa20390 custom push button 2014-07-10 11:03:55 +02:00
Marc Zinnschlag 930f782bc5 SceneWidget::setLighting was missing an update call 2014-07-10 10:09:21 +02:00
scrawl 0704fa2b3d Reset local rotation axis in SetAngle (Fixes #1630) 2014-07-09 10:23:01 +02:00
Marc Zinnschlag 3333f67830 removed a left-over marker 2014-07-08 12:53:25 +02:00
Marc Zinnschlag 03f67cd6bd moved low level widgets from CSVWorld into a separate namespace/directory 2014-07-08 12:39:12 +02:00
scrawl df80c436fb Fix compile error for OPENMW_USE_FFMPEG=0 2014-07-08 10:30:46 +02:00
scrawl ad90d20ad8 Don't silently skip unknown NPC subrecords 2014-07-08 10:30:46 +02:00
scrawl 742d008765 Fix initializing CharacterController with fists or spell equipped 2014-07-08 10:30:46 +02:00
scrawl a3a8f4da70 More font hackery. Will it ever end?
Fixes #1606
2014-07-08 10:30:45 +02:00
scrawl 0a2d5d34bc Cancel queued view mode switch when switching view mode (Fixes #1618) 2014-07-08 10:30:45 +02:00
scrawl ee81698089 Always control movement by animation except for first person or in-air 2014-07-08 10:30:45 +02:00
Marc Zinnschlag a54497e9ef Merge branch 'resources' 2014-07-08 09:51:30 +02:00
Marc Zinnschlag 1548f4670a drop part of resources drag and drop 2014-07-08 09:51:17 +02:00
Marc Zinnschlag b6c5ee125d more refactoring 2014-07-08 09:24:05 +02:00
Marc Zinnschlag 9d5956585c added separate display type for colours 2014-07-08 09:08:01 +02:00
Marc Zinnschlag b2ce94f28a fixed exceptions 2014-07-08 08:56:28 +02:00
Marc Zinnschlag b2c2342988 some refactoring (removing redundant code) 2014-07-08 08:53:39 +02:00
Marc Zinnschlag 05d92f0a7b updated changelog 2014-07-08 08:07:13 +02:00
Marc Zinnschlag 0e229108f4 Merge remote-tracking branch 'scrawl/openmw-31' into openmw-31 2014-07-08 07:53:53 +02:00
scrawl 3042a9da73 Cancel queued view mode switch when switching view mode (Fixes #1618) 2014-07-07 23:40:31 +02:00
scrawl ef9eb83514 Fix initializing CharacterController with fists or spell equipped 2014-07-07 23:40:14 +02:00
scrawl 4a844ef79b Fix compile error for OPENMW_USE_FFMPEG=0 2014-07-07 23:39:54 +02:00
scrawl 0295673869 Reset item model when reference is reset (Fixes #1628)
This caused crashes when the window was resized after the reference no longer exists (e.g. when a savegame is loaded)
2014-07-07 23:37:59 +02:00
Marc Zinnschlag c1bbefb840 enable dragging from resources tables 2014-07-07 15:20:05 +02:00
Marc Zinnschlag df6996d4ae filter resources files based on extension 2014-07-07 11:34:24 +02:00
Marc Zinnschlag 05cb22f5b7 updated changelog 2014-07-07 10:36:29 +02:00
Marc Zinnschlag 19828df799 added subviews for resources tables 2014-07-05 15:51:17 +02:00
Marc Zinnschlag b2c957a56f added resources tables 2014-07-05 15:50:47 +02:00
Marc Zinnschlag 42db9a5091 make modification column optional in table views 2014-07-05 15:50:17 +02:00
Marc Zinnschlag 4f6c7b0e84 resolved UniversalId naming ambiguity 2014-07-05 15:07:17 +02:00
Marc Zinnschlag e171babd2f added Feature_Constant to IdTable 2014-07-05 12:44:11 +02:00
cc9cii 9713873538 Minor change to improve generated STL code (only tested with MSVC 2012). More details in forum post https://forum.openmw.org/viewtopic.php?f=6&t=2153#p24065 2014-07-05 15:41:40 +10:00
scrawl 0489bdcd22 Fix travis 2014-07-05 07:24:30 +02:00
scrawl f27e3067a3 Use explicit C locale in Misc::StringUtils (Fixes #1216) 2014-07-05 01:31:38 +02:00
Marc Zinnschlag 1b1f1bade3 injected new class IdTableBase between QAbstractItemModel and IdTable 2014-07-04 13:25:56 +02:00
Marc Zinnschlag 63d0fdee7f removed leftover data member 2014-07-04 12:48:18 +02:00
Marc Zinnschlag 879ab49e9c added resources manager 2014-07-04 12:46:57 +02:00
Marc Zinnschlag 6ba4a5335c updated changelog 2014-07-04 08:58:54 +02:00
Marc Zinnschlag 673b102079 increased version number 2014-07-03 12:17:24 +02:00
Marc Zinnschlag 1ce60fa13b Merge branch 'tables' 2014-07-03 12:03:21 +02:00
Marc Zinnschlag 1745335982 body part table fix: forgot to include body parts in ID listings 2014-07-03 12:03:01 +02:00
Marc Zinnschlag 607445d40c Merge branch 'editorfixes' 2014-07-03 10:34:23 +02:00
Marc Zinnschlag 9ce92302d7 interpret empty filter strings as no filter instead of a broken filter (Fixes #1311) 2014-07-03 10:22:39 +02:00
scrawl 6cd6578a88 Handle Deleted moved references (Bug #1613) 2014-07-01 21:47:27 +02:00
scrawl e666ddfe18 Fix list of moved references being discarded (Fixes #1613) 2014-07-01 21:42:11 +02:00
scrawl df62c06acf Print exterior grid position in betaComment 2014-07-01 21:41:23 +02:00
Marc Zinnschlag 37a2b48fa2 added missing type columns to body part table 2014-07-01 14:28:12 +02:00
Marc Zinnschlag d96ed38d49 added body part table 2014-07-01 12:37:22 +02:00
Marc Zinnschlag 5649552f18 added other missing columns for enchantment table; fixed dialogue subviews for enchantment records 2014-07-01 09:50:43 +02:00
Marc Zinnschlag ab8bee4d1a added enchantment type column to enchantment table 2014-07-01 09:42:56 +02:00
Marc Zinnschlag 395c45c88b Merge branch 'editorfixes' into tables 2014-06-30 20:49:41 +02:00
Marc Zinnschlag e97fd35ae6 added enchantments table 2014-06-30 20:40:34 +02:00
Marc Zinnschlag 4f08efc4d7 added missing combat, magic and stealth columns for creatures (Feature #1312) 2014-06-30 19:51:59 +02:00
scrawl 205e039a39 Allow modCurrent instructions to decrease below zero (Bug #1589) 2014-06-30 17:58:08 +02:00
Marc Zinnschlag a25321f07e update paged scene view according to changes made to cell records 2014-06-30 17:57:38 +02:00
scrawl 2506c16bf5 Add a dummy GetStat function returning 0 (Fixes #1589) 2014-06-30 17:49:01 +02:00
Marc Zinnschlag 5fb2e1a877 do not render deleted exterior cells in scene view 2014-06-30 17:33:03 +02:00
Marc Zinnschlag af59106533 for regular IdCollections when loading a record make the record a copy of the existing record first (adresses some incomplete records in some content files) 2014-06-30 12:35:34 +02:00
scrawl 85a1f9d37b Fall back to resolution selected from list when switching to fullscreen (Fixes #1599) 2014-06-30 00:08:39 +02:00
scrawl 082b6125a9 Fix crash during spell creation when an effect targeting a skill/attribute doesn't have one assigned yet (Fixes #1598) 2014-06-29 17:02:29 +02:00
scrawl 5ec96c5394 Add missing visibility flags 2014-06-29 16:02:43 +02:00
scrawl 1de406cb6d Catch exception from invalid scripts during save&load (Fixes #1590) 2014-06-29 16:02:43 +02:00
Marc Zinnschlag b5650f5d4f Merge branch 'cells' 2014-06-29 16:00:26 +02:00
Marc Zinnschlag 2fe2def64c added cell rendering in paged worldspaces 2014-06-29 16:00:06 +02:00
Marc Zinnschlag a6626b94c8 added cell rendering in unpaged worldspaces 2014-06-29 14:19:10 +02:00
Marc Zinnschlag 74ed9cbb2d added cell rendering class 2014-06-29 14:18:46 +02:00
Marc Zinnschlag 604509ac7e Merge remote-tracking branch 'scrawl/master' 2014-06-29 10:34:48 +02:00
scrawl e25fa6c157 Refactor non-distant land terrain path to a grid based implementation (Fixes #1562) 2014-06-29 02:42:36 +02:00
scrawl 4949aa1fbb Add hack required for unnamed animated collision shapes (in_dagoth_bridge00.nif) 2014-06-28 18:21:56 +02:00
scrawl 10ef0a34d9 Update effects even when main animation is paused (Fixes #1585) 2014-06-28 17:54:14 +02:00
scrawl f929004635 Search exterior cells in reverse (workaround for duplicate chargen_plank reference in Morrowind.esm and Bloodmoon.esm) 2014-06-28 17:44:52 +02:00
scrawl 65e36793fc Fix messagebox on crash showing wrong path 2014-06-28 15:31:55 +02:00
scrawl 3b2358888b Attempt to fix player position after using coc/coe 2014-06-28 15:19:32 +02:00
scrawl 8e361bb879 Make targeted spells collide with water (Fixes #1500) 2014-06-28 14:49:07 +02:00
scrawl 92f5898b32 AiWander: Make sure we have 8 idle values (Fixes #1583)
The AiWander instruction may specify more (or less) than 8.
2014-06-28 14:22:27 +02:00
Marc Zinnschlag c35b87de95 various Object class fixes 2014-06-28 11:25:28 +02:00
scrawl 523c2715e3 AiCombat: Handle Start to Min and Min to Max durations of 0 (found in Riekling animation) 2014-06-28 01:31:34 +02:00
scrawl 516014c071 Trigger hit on start key if there's no hit key (Fixes #1574) 2014-06-28 01:06:53 +02:00
scrawl 1ab02d8072 Fix exception for box shapes (Fixes #1580) 2014-06-28 00:10:36 +02:00
scrawl 911bd0e340 Use walk animation as fallback if there's no run animation (Fixes #1578) 2014-06-28 00:07:13 +02:00
scrawl 78d02d97da Find text keys in reverse (Bug #1578) 2014-06-28 00:06:08 +02:00
scrawl 2451eead8a Some additional wrapping for faction rank instructions 2014-06-27 20:07:19 +02:00
scrawl 7f26843dc3 Reset key focus when the key focus widget is hidden (Fixes #1568) 2014-06-27 19:35:41 +02:00
scrawl 37c85f0af4 Don't update object root controllers with no time source (Fixes #1564) 2014-06-27 19:35:41 +02:00
scrawl 6a900e0aad Update weapon and shield controllers for creatures 2014-06-27 19:35:41 +02:00
Marc Zinnschlag 3541d03809 fixed deleting of referenceables (modification state column was incorrectly flagged as non-editable) 2014-06-27 12:29:23 +02:00
Marc Zinnschlag 099c406226 Merge branch 'objects' 2014-06-27 11:55:28 +02:00
Marc Zinnschlag 6020edf60f make preview watch for changes in modification state of relevant records 2014-06-27 11:55:02 +02:00
Marc Zinnschlag a2f514f024 disabled preview function for deleted records 2014-06-27 11:38:34 +02:00
Marc Zinnschlag 36c1170d09 fixed some function names 2014-06-27 10:35:00 +02:00
Marc Zinnschlag 0c1ad54e68 refactored object rendering into a separate class 2014-06-27 09:12:26 +02:00
Marc Zinnschlag 3100206b28 replaced an assert with an exception 2014-06-27 08:37:41 +02:00
scrawl 8b340ddd5e Implement slower movement against storms (Closes #41) 2014-06-27 03:22:00 +02:00
scrawl 07d0f4458d Rotate clouds/particles to come from red mountain (Fixes #245) 2014-06-27 03:22:00 +02:00
scrawl 9eb8addc70 Make flying creatures fall when paralyzed (Fixes #1494) 2014-06-27 03:21:50 +02:00
scrawl e19bbfd1b5 Fix OpenCS crash when drag and drop is used with unexpected data, e.g. plain text (Fixes #1543) 2014-06-26 20:49:22 +02:00
scrawl 865f4648b0 Fix flying creatures not falling on death 2014-06-26 17:15:07 +02:00
scrawl 44fd526c98 Don't show disposition bar for creatures 2014-06-26 15:36:19 +02:00
scrawl 4aab4e1c26 Ignore item condition when determining value, except in trade (Fixes #1557) 2014-06-26 14:59:33 +02:00
scrawl 869fa08a32 Fix disarming a trap when key is used (Fixes #1556) 2014-06-26 14:30:19 +02:00
scrawl e5254ff8ef Set render queue for rain 2014-06-26 14:26:53 +02:00
Marc Zinnschlag 06e89d8bd3 reduced loading batch size (making the the loading progress bars a bit more responsive 2014-06-26 11:43:21 +02:00
Marc Zinnschlag bd252d0aec display record count in loading window 2014-06-26 11:41:21 +02:00
scrawl 7b1e1d03d8 Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwrender/sky.hpp
2014-06-26 04:29:03 +02:00
scrawl 697329f128 Fix crash for in_dagoth_bridge00.nif (Fixes #1561)
This one is causing trouble by using an unnamed node, will need some more work.
2014-06-26 03:33:09 +02:00
scrawl 15b486e149 Don't trigger changed flag if a script with no locals is configured 2014-06-26 01:21:15 +02:00
scrawl 2d17d8f61a Savegame: start in (0,0) cell if player's cell no longer exists
This happens frequently when saves are loaded that were created in a different MW language.
2014-06-26 01:19:03 +02:00
scrawl b25026299c Why was Hrnchamd not in credits? 2014-06-25 20:33:18 +02:00
scrawl 5bd2f30a99 CellRef uninitialized fixes 2014-06-25 19:52:14 +02:00
scrawl f6a568c995 Implement rain (Feature #41) 2014-06-25 18:20:21 +02:00
scrawl 4a6dbe6f89 Use the actor's collision group/mask for traces
Fixes dead bodies being lifted up when standing below them.
2014-06-25 18:15:56 +02:00
scrawl 09926a86cb Fix comparing outdated listener position with up-to-date cell (Fixes #1499) 2014-06-25 18:10:26 +02:00
scrawl 2bcbc6ab7d Potential crash fix, either way should have a better error message now 2014-06-25 14:52:12 +02:00
Marc Zinnschlag 85965bfd47 Merge remote-tracking branch 'scrawl/master' 2014-06-25 09:58:00 +02:00
scrawl ec64f1a53a Reset accumulation root when its animation finishes
Fixes a position flicker after standing up from knockdown.
2014-06-25 02:46:39 +02:00
scrawl ee098de0a6 Don't ignore lighting values of particles not attached to a character 2014-06-25 01:14:21 +02:00
scrawl b259c5def2 Make GetFactionReaction garbage argument optional 2014-06-25 01:12:57 +02:00
scrawl 3d9bdad8ba Correct run speed for creatures (by Hrnchamd - Fixes #1136) 2014-06-25 00:51:02 +02:00
scrawl 7f1d0fc2a2 Fix disposition for npcs in same faction, by Hrnchamd 2014-06-25 00:12:51 +02:00
scrawl 8a8ecce1e5 Fix some uninitialized data written to savegames 2014-06-25 00:11:25 +02:00
scrawl e274314548 Ignore alpha modifier for particle materials
This makes the tx_ash_flake.dds particles from ashcloud.nif appear.
2014-06-24 19:51:30 +02:00
scrawl 693a097b21 Implement idlestorm animation (Feature #41) 2014-06-24 18:37:38 +02:00
scrawl 1c157b86f6 Fix dead bodies blocking hits (again) 2014-06-24 18:14:27 +02:00
scrawl 36135293e8 Fix moving object from an inactive to another inactive cell 2014-06-24 15:29:36 +02:00
scrawl b52977e44c Add dummy Face implementation for now (Bug #1541) 2014-06-24 15:09:13 +02:00
scrawl 36132e054a Implement ashstorm, blightstorm, snow and blizzard effects (Feature #41) 2014-06-24 15:00:15 +02:00
slothlife 96ba4a414f Fix MSVC size_t conversion warning. 2014-06-24 00:13:34 -05:00
scrawl 30be59c029 Implement auto-adjusting of particle emit rate
This makes ashcloud.nif and blightcloud.nif work properly.
2014-06-24 03:07:10 +02:00
scrawl 1d46ac19ff Fix being able to activate through terrain 2014-06-24 02:24:32 +02:00
scrawl 750d8b5589 Allow garbage integer argument for addSpell (Fixes #1539) 2014-06-23 22:02:22 +02:00
scrawl 320ab1b2c1 Don't say voice when using startcombat for a dead actor (Fixes #1542) 2014-06-23 22:00:17 +02:00
scrawl 0b34d8d2fd Add support for animated collision shapes (Fixes #1549) 2014-06-23 20:43:24 +02:00
slothlife 9ea22324f7 Fix some MSVC warnings.
Several fixes are warnings about truncations on 64-bit, while others are
complaints about mixed signed / unsigned integer operations.
2014-06-23 01:13:30 -05:00
scrawl 64a4c2785e Fix water walking 2014-06-22 22:30:30 +02:00
scrawl 8df0effcf5 Remove unused string 2014-06-22 22:30:30 +02:00
scrawl d296c6e9b7 Handle fog density values of 0 (Bug #1549) 2014-06-22 22:30:29 +02:00
scrawl cbec0ffaee Exception fix 2014-06-22 22:30:29 +02:00
scrawl baf490a2b5 Change to btCylinderShape 2014-06-22 22:30:29 +02:00
scrawl 33ed11d8e6 Physics: Use capsule shapes for actors if possible (Fixes #1437) 2014-06-22 22:30:23 +02:00
slothlife ead801f2d0 Fix for compiling Win32 debug. 2014-06-21 21:15:41 -05:00
scrawl e23a7694f3 Don't throw exception when using ModDisposition on creatures (Fixes #1548) 2014-06-22 00:34:32 +02:00
scrawl 0bed6d9d56 Physics: Recognize BBoxCollision flag, but don't use it for raycasting (Fixes #1349) 2014-06-22 00:16:47 +02:00
scrawl e002acdeae Physics: Create actor shapes outside of BulletNifLoader
This will allow to create a specialised shape instead, such as a capsule, which tends to work better for character controllers.
2014-06-21 23:37:16 +02:00
scrawl 98329a94b4 Add case sensitivity workaround for spine bones (Fixes #1547) 2014-06-21 19:54:12 +02:00
scrawl a4ce9d6a7f Always show the script name when a script fails to compile 2014-06-20 23:56:21 +02:00
scrawl 7bf7daa846 Fix exception (getline will trigger failbit on the last line) 2014-06-20 21:33:03 +02:00
scrawl 9a26cf22e6 Implement toggleMenus 2014-06-20 18:51:00 +02:00
scrawl ad0a182b7e Improve error message for unknown cells 2014-06-19 20:08:53 +02:00
scrawl 091f9a8fdc Optimize global map render slightly 2014-06-19 19:14:59 +02:00
scrawl 8eab3abb15 Fix initial view offset for large world maps (Fixes #1523) 2014-06-19 19:03:12 +02:00
scrawl 218f916d6d Savegame: Don't write stat modifiers that are zero 2014-06-19 17:17:26 +02:00
scrawl 11b05c352f Fix exception when casting Bound Gloves spell 2014-06-19 16:00:27 +02:00
Marc Zinnschlag 30f8e279ed Merge remote-tracking branch 'scrawl/master' 2014-06-19 10:35:28 +02:00
scrawl c69a311ad8 Disable lighting for particles
Fixes magic cast visuals being too dark depending on the environment.
2014-06-19 04:57:46 +02:00
scrawl 4648524df4 Improve getLOS (use eye level). Also, don't crash when used with non-actors. 2014-06-19 04:53:25 +02:00
scrawl 185ff279a3 Add missing sound effect for mages guild transport 2014-06-19 03:29:36 +02:00
scrawl cc3c6ae7b8 Fix very slow movement on some creatures, e.g. rats (Bug #1136)
Neither fAthleticsRunBonus, fBaseRunMultiplier or the creature's athletics skill (i.e. Combat stat) have any effect on the run speed (tested by setting those to absurd values). The new formula is just a guess and doesn't seem to be completely accurate.
2014-06-19 02:36:10 +02:00
scrawl 6760f4c897 Make cached GMSTs in MWClass::Npc/Creature safer 2014-06-19 02:09:46 +02:00
scrawl 4234c70232 Savegame: Disable CustomData load optimization for npcs and creatures for now to preserve compatibility (still enabled for containers) 2014-06-19 02:00:40 +02:00
scrawl d878456d0f Don't add an extra path separator 2014-06-19 01:10:33 +02:00
scrawl c3e4160a0a Don't crash in StatsWindow for invalid faction rank values
PcRaiseRank: don't allow to raise rank beyond max rank
2014-06-18 23:50:55 +02:00
scrawl 2193977eec Savegame: Don't fill CustomData from ESM records if the savegame overwrites it anyway
This gets rid of some junk in ContainerStores (since clear() only sets count to 0 and doesn't really delete references), and significantly speeds up loading savegames (by about 80% in my test)
2014-06-18 22:59:18 +02:00
scrawl 4e71db7081 Savegame: Don't load/save deleted container items. This is currently pointless, and also causes new garbage being added on each load/save cycle: Container stores are first filled from ESM records, then cleared and filled from the savegame. The items from ESM records remain as deleted refs. 2014-06-18 21:39:17 +02:00
scrawl 5645c9185b Fix location of local data path 2014-06-18 17:18:48 +02:00
scrawl 8a4227ec38 Heal player while in jail 2014-06-18 16:57:54 +02:00
scrawl 9a6737073f Fix broken swimdeath in first person 2014-06-18 16:57:54 +02:00
scrawl 224163e5a2 Fix console text becoming unreadable when selected (Fixes #1530) 2014-06-18 16:57:54 +02:00
scrawl e95483c40f Fix crash for on target spells cast by non-actors (Fixes #1529) 2014-06-18 16:57:53 +02:00
scrawl fe1e6a2719 Make Weakness effects apply to all subsequent effects within the same spell (Fixes #1150) 2014-06-18 16:57:53 +02:00
scrawl 56bc5a9d39 Fix being able to steal undetected just after invisibility breaks 2014-06-18 16:57:53 +02:00
scrawl 80f66e2157 Fix crash when avformat_open_input fails (Fixes #1522) 2014-06-18 16:57:53 +02:00
scrawl d4678a8d55 Fix level up dialogue layout (Fixes #1393) 2014-06-18 16:57:53 +02:00
scrawl 666dbc6ddc Disable QuickKeysMenu in werewolf form 2014-06-18 16:57:53 +02:00
scrawl a3ea7cb956 Ignore distance when considering aggression due to crime (seems to work better, all balmora mages guild members now come to help when one is attacked) 2014-06-18 16:57:53 +02:00
scrawl 1dc9e151cb Count werewolf kills (Fixes #1525) 2014-06-18 16:56:36 +02:00
scrawl 1244da85df Make Detect Life spell detect NPCs when in werewolf form (Fixes #1527) 2014-06-17 16:27:33 +02:00
scrawl 4f9ebd148c Fix broken AI movement on Z axis 2014-06-17 15:25:54 +02:00
scrawl cb6f1d3a52 Fix wait dialog arrow button step (Fixes #1524) 2014-06-17 14:58:11 +02:00
Marc Zinnschlag 2683aa9503 Merge remote-tracking branch 'filkry/bug640_luminescent_water' 2014-06-17 13:08:06 +02:00
Marc Zinnschlag 073cc3f02c fixed base flag in content file loader code 2014-06-17 11:01:17 +02:00
scrawl 2477456f99 Implement Murder crimes and OnMurder instruction (Fixes #1315) 2014-06-17 04:05:27 +02:00
scrawl 3801dfb4ba Add delay to sneak icon update and skill progress (Fixes #1321) 2014-06-17 04:05:27 +02:00
scrawl ec66484472 Fix forceGreeting with explicit references (Fixes #1518) 2014-06-17 04:05:27 +02:00
scrawl ffb6f5d555 Use fFight<Crime> GMSTs to control attacks in response to crimes 2014-06-17 04:05:27 +02:00
scrawl 8ac019611d Fix Potion use action removing the potion even when the action is not executed (Fixes #1521) 2014-06-17 04:05:20 +02:00
Fil Krynicki c36fc48c47 Fixed underwater issue
I had accidentally deleted some interpolation parameters.
2014-06-16 17:15:49 -04:00
Fil Krynicki cfea7736d9 WIP fix
Bug is fixed, but appears to have broken vision underwater. Notes:

+ basically fixed by darkening the colour of water such that it is
darker than refracted terrain
+ also disabled sunlight scattering at night. This may actually be
desirable, but given there is no visible moon it seems unlikely to make
much sense, and blends a lot of green into the water colour appearing
luminescent at night
2014-06-16 17:08:02 -04:00
scrawl 28feb260eb Implement disposition/distance based aggression (Fixes #1520) 2014-06-16 20:05:53 +02:00
scrawl d11a5e19f7 Fix positionCell not properly teleporting actors from inactive to active cells (Fixes #1516) 2014-06-16 20:05:53 +02:00
scrawl 2ce8323a42 Fix getDistance not detecting references in inactive cells properly 2014-06-16 20:05:47 +02:00
scrawl 47bd170d7e Crashcatcher: create temp file in /tmp, not working directory (which may not have write access) 2014-06-16 04:13:36 +02:00
scrawl f935cfc6c9 Fix crash when stealing items with the owner not around (Fixes #1512) 2014-06-16 04:03:53 +02:00
scrawl 5f5c0c5bff Remove an unused setting 2014-06-16 03:29:02 +02:00
scrawl 1b610cdbd0 Allow following NPCs to fast-travel (Fixes #1501) 2014-06-16 03:17:31 +02:00
scrawl 468db7a9c4 Remove terrain limit warning text that no longer applies 2014-06-16 03:16:50 +02:00
scrawl 78f30e2970 Fix a journal layout bug 2014-06-16 02:52:25 +02:00
scrawl 345ba99c17 Fix WeaponAnimationTime not working after restoring draw state (when loading save or re-entering a cell - Fixes #1497) 2014-06-16 02:52:25 +02:00
scrawl 9ea071c1e8 Fix weapon incorrectly showing when saving and loading with spell equipped 2014-06-16 02:52:25 +02:00
scrawl edccb62c1f Clear MyGUI's clipboard, since we don't want to use it (Fixes #1277)
This would cause pasted text to appear twice, but only when using an SVN version of MyGUI, since 3.2 had a bug where it wouldn't recognize the Ctrl C/V/X keys when using separated key/textinput events.
2014-06-16 02:52:25 +02:00
scrawl 4f73e8bb71 Add items to player inventory upon drag start (Fixes #1507) 2014-06-16 02:52:25 +02:00
scrawl 0aba1088a1 Attempt to open companion window if no greetings are found (Bug #1507) 2014-06-16 02:52:25 +02:00
scrawl 3b7119ba0d Make Bipedal creatures always able to walk and swim (Fixes #1509)
This is necessary since the vanilla CS greys out the walk/swim checkboxes when Bipedal is checked.
2014-06-16 02:52:24 +02:00
scrawl d5b97005ab Make ESM::Faction skills optional (Fixes #1508)
Also increased size of mSkills array to 7. Some factions with 7 skills can be found in the vanilla CS. The previously "mUnknown" int appears to be the 7th element of the skills array.
2014-06-16 02:52:16 +02:00
scrawl ee2b81763e Savegame: Store AiSettings and summoned creatures
CreatureStats state is now completely stored (Closes #1174)

Also play VFX_Summon_Start and VFX_Summon_End visual effects.
2014-06-15 21:19:37 +02:00
scrawl a0f9a6718f Disable fProjectileThrownStoreChance when shooting at player (Fixes #1490) 2014-06-15 16:11:22 +02:00
scrawl fd59a4a79e Fix some doxygen typos 2014-06-15 16:11:22 +02:00
scrawl 77388fe2ce Implement BetaComment instruction (dumps reference info) 2014-06-15 16:11:16 +02:00
scrawl 326c747508 Don't run scripts when in pause menu (Fixes #1495) 2014-06-15 14:18:16 +02:00
scrawl 9e6d21d95b Clear message boxes in windowmanager cleanup (Fixes #1496) 2014-06-15 14:18:16 +02:00
scrawl e288437885 Disable all other animations on death (Fixes #1483) 2014-06-15 14:18:16 +02:00
scrawl 1adb81abd0 Sort using ciLess, not ciEqual 2014-06-15 14:18:16 +02:00
scrawl 88f8f25ffa Don't allow scripted dialogue with dead actors (Fixes #1493) 2014-06-15 14:18:16 +02:00
scrawl 8d8015ce18 Remove a squareroot in pathfinding 2014-06-15 14:18:16 +02:00
scrawl afbd5162ee Move AiWander arrival check to time-critical section 2014-06-15 14:18:16 +02:00
scrawl 7afd2ca614 Consider moved references in CellStore::listRefs 2014-06-15 14:18:16 +02:00
scrawl 31a4e10c6f Fix incorrect trigger of change flag for static doors 2014-06-15 14:18:16 +02:00
scrawl 395f98e476 Fix triggering changed flag for all references when cell is visited
The InsertFunctor for cells was calling localRotateObject() for all references which set the mChanged flag in RefData to true.

Also clean up RefData interface slightly.
2014-06-15 14:18:16 +02:00
scrawl b20f8cc04f Don't clear AiSequence if there are no saved packages (eg for old savegames) 2014-06-15 14:18:16 +02:00
Marc Zinnschlag 01c90a3434 Merge remote-tracking branch 'mrcheko/master' 2014-06-15 14:12:38 +02:00
Marc Zinnschlag c8c45d4923 Merge remote-tracking branch 'lgro/valgrind_fixes' 2014-06-15 10:57:01 +02:00
Lukasz Gromanowski abeb1d4ab3 Valgrind: Added constructor for KeyListT class, and added initialziation of ver member field in NIFFile class.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2014-06-15 09:39:16 +02:00
mrcheko a6ee4272aa fix bug when you were able to kill somebody from large distance without
being spotted
2014-06-15 00:14:18 +04:00
mrcheko 6da061fd96 fix http://bugs.openmw.org/issues/1340
Did I understand right that guards trigger combat after refusing pay
gold/go to jail via script?
2014-06-14 23:36:57 +04:00
Alexander "Ace" Olofsson c24e08dff6 Use Ogre::Math::PI 2014-06-14 14:43:24 +02:00
Alexander "Ace" Olofsson 5960d3f1d9 These files moved, leading to package failure 2014-06-14 13:54:12 +02:00
Alexander "Ace" Olofsson 6ea29812ac Another way of getting M_PI 2014-06-14 13:54:01 +02:00
Alexander "Ace" Olofsson dc2fefffc7 Fix missing M_PI define on Windows 2014-06-14 13:29:55 +02:00
scrawl 832f1a4857 Fix merge mistake 2014-06-14 02:31:01 +02:00
scrawl 0637cde267 Bug #1417: Make sure to reset all position/rotation fields when placing items 2014-06-13 23:40:49 +02:00
scrawl ad3a78706e Bug #1417: Use fmod to wrap local rotations (more efficient and robust) 2014-06-13 23:40:35 +02:00
scrawl 162549b7af Remove a wrong comment 2014-06-13 22:23:24 +02:00
scrawl fcab53b3f7 Fix locked mouse cursor due to SDL_SetRelativeMouseMode even when --no-grab was specified 2014-06-13 22:21:44 +02:00
scrawl 54d8606b78 Fix logging fatal exceptions to cerr, and log them to openmw.log 2014-06-13 22:04:20 +02:00
scrawl 4f742fd468 Allow INFO records with no subrecords following DATA (Fixes #1486) 2014-06-13 21:54:03 +02:00
mrcheko 9d40f2e196 Merge remote-tracking branch 'origin/master' 2014-06-13 23:23:25 +04:00
mrcheko c4e5872620 fix bug http://bugs.openmw.org/issues/1470 2014-06-13 23:22:00 +04:00
scrawl 3334078d4d Add first person meshes to refraction render (Fixes #1481) 2014-06-13 21:14:17 +02:00
scrawl fe5bbfce3c Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
2014-06-13 19:31:33 +02:00
scrawl 8114f48469 Workaround per-frame resources leak in MyGUI. New vertex buffers were being created every frame. 2014-06-13 19:06:09 +02:00
mrcheko fc6366fb27 Merge remote-tracking branch 'upstream/master'
Equipping_Weapon check isn't needed cause there won't be WeapType_None in
that case

Conflicts:
	apps/openmw/mwmechanics/character.cpp
2014-06-13 14:12:41 +04:00
mrcheko ae552d4e85 Merge remote-tracking branch 'origin/master' 2014-06-13 12:51:28 +04:00
scrawl e458cf1df2 Savegame: Store death counter (Fixes #1477) 2014-06-13 02:26:53 +02:00
scrawl 797134aa51 Handle activation scripts in AiActivate (Fixes #1478) 2014-06-13 02:26:52 +02:00
scrawl a54ac579a5 Savegame: Store AiSequence 2014-06-13 02:26:52 +02:00
scrawl be6f1fe4fe Fix a sign error 2014-06-13 02:26:52 +02:00
scrawl 91ed5183c8 Show base item value in tooltip, not real value (Fixes #1469) 2014-06-13 02:26:52 +02:00
scrawl 604d5ac000 Fix console reference label not resetting when loading save 2014-06-13 02:26:52 +02:00
scrawl b158919c4b Fix uninitialized variable use 2014-06-13 02:26:52 +02:00
mrcheko df7213185f warning fixes 2014-06-12 23:42:33 +04:00
mrcheko b969986cff Merge remote-tracking branch 'origin/master' 2014-06-12 17:02:22 +04:00
Marc Zinnschlag 2eebb0bf73 Merge remote-tracking branch 'scrawl/master' 2014-06-12 12:54:39 +02:00
Marc Zinnschlag 82eb13c070 Merge remote-tracking branch 'cc9cii/master' 2014-06-12 12:46:04 +02:00
scrawl 029e438c11 Don't check mInterpolationType each iteration 2014-06-11 23:57:39 +02:00
cc9cii 37f0c253f6 For compiling with MSVC 2012 2014-06-12 07:04:57 +10:00
cc9cii 36e380c6be Merge remote-tracking branch 'upstream/master' 2014-06-11 21:58:10 +01:00
scrawl 68d6b6b2f3 Cell merge fix (reference context position was not saved correctly) 2014-06-11 21:56:10 +02:00
scrawl 41ab7329a8 Store keybindings as keycode, not keyname. Also use SDL_GetKeyName instead of a manually created map. Fixes #1202
Note: breaks compatibility with input.xml, so the filename was changed.
2014-06-11 19:47:42 +02:00
scrawl 013916fca3 Fix for broken physics in exteriors (Fixes #1446)
The wrong function was being used to check the distance between old and new positions. It took the length of the vectors into account, which makes no sense for positions. The issue was only observed in exteriors, since most interiors are relatively close to the origin.
2014-06-11 19:01:23 +02:00
scrawl d970cc06d7 Don't play the same music track twice in a row (Fixes #746) 2014-06-11 18:11:16 +02:00
scrawl d60df66811 Change openmw.log to boost ofstream to fix unicode path on windows (see https://github.com/OpenMW/openmw/pull/108) 2014-06-11 16:56:41 +02:00
scrawl 73be457805 Merge ESM::Cell fields by subrecord
Fixes an issue with the Morrowind Patched mod where cell ambient values would become black due to the new cell records not including an AMBI subrecord.

Also fixes a bug where mLeasedRefs was incorrectly cleared when overwriting a cell (*oldcell = *cell;)
2014-06-11 16:13:33 +02:00
Marc Zinnschlag c23e9e03fd Merge branch 'refs' 2014-06-11 11:44:43 +02:00
Marc Zinnschlag 7d1ecea20c added extended versions of revert and delete 2014-06-11 11:43:38 +02:00
Marc Zinnschlag 2faeceacfa Merge remote-tracking branch 'scrawl/master'
Conflicts:
	apps/openmw/main.cpp
2014-06-11 08:51:18 +02:00
Marc Zinnschlag afbcaa0846 Merge remote-tracking branch 'potatoesmaster/log' 2014-06-11 08:36:17 +02:00
scrawl 0f31e31088 Allow opening journal during dialogue (Fixes #1460) 2014-06-11 03:08:22 +02:00
scrawl 14a9f0ebf8 Handle Quadratic and Linear attenuation independently (Fixes #1456) 2014-06-11 02:24:17 +02:00
Emanuel Guevel a41339da1e Write logs in log directory
The crash.log file was created in the working directory, requiring users
that had installed the game to run it with augmented privileges to be
able to create the file.
2014-06-10 23:46:49 +02:00
scrawl 7eee0855f7 Merge commit 'pull/origin/155'
Conflicts:
	CMakeLists.txt
2014-06-10 23:24:16 +02:00
mrcheko d6d9df6cec split getStartTime 2014-06-11 00:20:46 +04:00
scrawl 07d20c212b Fix crash activating quick key 1 2014-06-10 21:34:47 +02:00
scrawl 10758d6297 Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwinput/inputmanagerimp.cpp
2014-06-10 19:32:49 +02:00
scrawl 47172fb8a2 ContentModel: Don't confuse file path with file name (Fixes #1352) 2014-06-10 19:23:42 +02:00
scrawl 7b5482f25b Fix character selection caption when there is no character in settings.cfg 2014-06-10 19:01:18 +02:00
scrawl 5a955279bb Fix main menu background showing when resizing window during load 2014-06-10 18:49:42 +02:00
scrawl 3788fb042e Implement MenuTest script instruction (Fixes #1454) 2014-06-10 18:49:42 +02:00
scrawl 6ba112619a Fix dropped items ending up inaccessible when standing in objects with no collision (Fixes #1441) 2014-06-10 18:49:42 +02:00
scrawl 2dd54dbcfc Implement ClearInfoActor script instruction (Fixes #1422) 2014-06-10 18:49:41 +02:00
scrawl a90245147b Don't reset history when ForceGreeting is used and a dialogue window was already open for the same actor (Fixes #1423) 2014-06-10 18:46:16 +02:00
scrawl 1ed3f092c1 Implement text replacement for journal topic responses (Fixes #1429) 2014-06-10 15:42:50 +02:00
scrawl 3bf599248e CMake cleanup: Remove distribution-specific install stuff (unused) 2014-06-10 15:03:27 +02:00
Bret Curtis e28888df39 fix for dejavu location 2014-06-10 14:51:51 +02:00
scrawl 4119038f1d Remove an old workaround (Fixes #1458) 2014-06-10 14:46:44 +02:00
mrcheko 979128b2c5 Combat music; some minor combat fixes 2014-06-10 14:20:29 +04:00
Bret Curtis 8419002393 Task #940: Move licenses to appropriate place in docs. Additional cleanup. 2014-06-10 11:25:39 +02:00
scrawl 65d5311037 Revert "Don't try to show exceptions in a message box if SDL was not initialized"
According to SDL docs, "This function may be called at any time, even before SDL_Init()".

Also fixes an issue where message boxes weren't working due to SDL_Quit already having been called by ~Engine.

This reverts commit 39eea24dc3.

Conflicts:
	apps/openmw/main.cpp
2014-06-10 04:10:34 +02:00
scrawl c0c1db4490 Don't list non-usable items in QuickKeysMenu selection (Fixes #1427) 2014-06-10 03:28:21 +02:00
scrawl 271aac3fcc Savegame dialog: Grey out buttons if no save is selected 2014-06-10 02:47:02 +02:00
scrawl 311acfa8ff Add delete button to save load menu (Fixes #1453) 2014-06-10 02:27:38 +02:00
scrawl 881ae33b74 Don't allow Creatures with no movement abilities to move (Fixes #1457) 2014-06-10 02:15:09 +02:00
scrawl e0d6670ac4 Move video skip detection to WindowManager
Fixes a bug where skipping using Esc would not work if a mouse button had been pressed previously
2014-06-10 01:57:54 +02:00
scrawl 7721e54191 Use descriptive names for save files and character folders (Fixes #1449) 2014-06-10 00:22:00 +02:00
scrawl e796fa2313 Add another french morrowind font workaround (Fixes #1447) 2014-06-09 22:18:53 +02:00
mrcheko 698cbba6ef old bug + comment fix 2014-06-09 23:02:06 +04:00
mrcheko 08e8dab067 merge openmw master 2014-06-09 22:37:49 +04:00
scrawl 1bab74a98d Fix punishment for stealing 0 value items (Fixes #1435) 2014-06-09 03:42:29 +02:00
scrawl 5488fe1ab3 Change npc training skills to prefer skills with lowest ID if skill values are the same (Fixes #1445) 2014-06-09 03:40:14 +02:00
scrawl cdd53862cb Increase width of dialogue topic list (Fixes #1440) 2014-06-08 23:15:50 +02:00
scrawl a3752da79f Store Always Run control state in settings 2014-06-08 19:50:39 +02:00
mrcheko 67abc60264 aiming to moving target in ranged combat ai
1) Taking into account target move vector and speed. However aiming is not
ideal, since attack strength can't be controlled directly. I did achieve
almost 100% accuracy updating it everyframe but then thought it would be
unfair, cause AI should mimic human targetting.
2) Also added in this commit func to measure real attack durations for
weapon.
2014-06-08 20:59:26 +04:00
Marc Zinnschlag 48468b7d0c some dialogue subview cleanup and start of command dispatching refactoring 2014-06-08 14:10:08 +02:00
Marc Zinnschlag 803a7514df updated credits file 2014-06-08 11:33:39 +02:00
Marc Zinnschlag b717e3fcb8 Merge remote-tracking branch 'filkry/bug1196jumpdialog' 2014-06-08 11:25:34 +02:00
scrawl d2dca27067 Correct wrong assertions (Fixes #1425) 2014-06-08 11:25:10 +02:00
scrawl 98d7b6672a Make MODL subrecord optional for potions (Fixes #1419) 2014-06-08 11:22:37 +02:00
scrawl b9dadff5a3 Recognize DELE subrecords at the end of the record (Fixes #1414) 2014-06-08 11:22:37 +02:00
scrawl 823ccb1b3d Don't batch statics that have "references persist" set (temporary fix for Arkngthand door - Fixes #1386) 2014-06-08 11:22:37 +02:00
scrawl 69855097ca Fix an always true condition (Bug #1355) 2014-06-08 11:22:37 +02:00
scrawl a0bff03560 Fix not handling failbit/badbit in ifstream (Bug #1355) 2014-06-08 11:22:37 +02:00
scrawl b470596206 Handle failed savegame file operations (Fixes #1413) 2014-06-08 11:22:37 +02:00
scrawl 2ec324c80b Consider all splash screens in the Splash folder (Fixes #1416) 2014-06-08 11:22:37 +02:00
scrawl 927ae00454 Fix code that stopped animation immediately after starting it, due to thinking it has completed (Fixes #1370) 2014-06-08 11:22:37 +02:00
slothlife 51c45796b1 Fix physics to not trigger Bullet assert in Debug
When physics attempts to move by a very small amount, precision losses
caused Bullet to trigger an assert in debug from normalizing a zero
length vector.
2014-06-07 19:26:12 -05:00
Fil Krynicki cd693b6d37 Fixed mouse closing containers, and injection/gui test order
Called setEnabled on channels now effects whether those channels
notify listeners, rather than whether they register changes to
their controls. This was making channels get stuck on "1" when the
GUI was activated.

Also ensured GUI activity can invalidate player controls even if
that activity is closing the GUI, by re-ordering a check.

And fixed a comment.
2014-06-07 20:08:29 -04:00
Marc Zinnschlag 7ede6573eb removed more hardcoded column numbers 2014-06-07 14:39:34 +02:00
Marc Zinnschlag 302e2f8e9a fixed some proxy model problems related to column numbers 2014-06-07 14:32:12 +02:00
Marc Zinnschlag e4a37ef709 removed some hardcoded column numbers 2014-06-07 13:06:19 +02:00
Marc Zinnschlag 85fca19fd9 replaced selection model in CommandDispatcher with a slightly slower but more robust implementation 2014-06-07 13:02:45 +02:00
Fil Krynicki 1d3a220d94 Added A_Use command to player controls. 2014-06-06 22:35:16 -04:00
Fil Krynicki 4800f2ccbe Merge branch 'bug1196_alternate' into bug1196jumpdialog
Conflicts:
	apps/openmw/mwinput/inputmanagerimp.cpp
2014-06-06 22:30:07 -04:00
Fil Krynicki 97caa1f8a4 Alternative fix strategy by checking for binding state 2014-06-06 22:25:23 -04:00
Fil Krynicki 13c953cbb2 Made recommended changes
Maybe introduced a bug not allowing punching. Testing.
2014-06-06 16:21:28 -04:00
Marc Zinnschlag f6ae967ba0 simplified Data constructor 2014-06-06 20:47:31 +02:00
Marc Zinnschlag 0668019c86 Merge remote-tracking branch 'scrawl/master' 2014-06-06 19:09:24 +02:00
scrawl 58d963d6e6 Fix warning 2014-06-06 18:43:30 +02:00
scrawl b68a8e38cd Remove unused map 2014-06-06 15:24:06 +02:00
scrawl 54a5dba3f5 Don't reserve Pauldron parts for robes (Fixes #1396) 2014-06-06 15:20:56 +02:00
Hallfaer Tuilinn 01283f531e Fix for Bug #1409 2014-06-06 15:13:25 +02:00
scrawl 9627146bf4 Another fix for trade exploit (hopefully the last: Fixes #1408) 2014-06-06 15:08:44 +02:00
Marc Zinnschlag c6557e1ade some UniversalId cleanup and enhancements 2014-06-06 14:25:06 +02:00
scrawl f3cece8dec Fix alchemy allowing same item ID in different slots (Fixes #1407) 2014-06-06 14:12:50 +02:00
Marc Zinnschlag 3e0c6ec732 some general cleanup; fixed two cases of dialogue subviews that allowed creating records where they shouldn't have 2014-06-06 13:09:17 +02:00
Arthur Moore f9f278f645 Fixed a capitalization error.
Changed Interpolations to unsigned.
Also explained what's happening in the comments.
2014-06-06 07:00:04 -04:00
Marc Zinnschlag 83d5f2aaeb factored out command creation from table view into a separate class 2014-06-06 12:43:21 +02:00
cc9cii fd758bacd3 Remove #ifdef guards. 2014-06-06 19:58:05 +10:00
Arthur Moore b90e4db871 Actually read in XYZ_ROTATION_KEY data instead of discarding it. 2014-06-06 01:26:28 -04:00
scrawl 40d6c8abf7 Remove horizontal messagebox layout, not used in vanilla (Fixes #1402) 2014-06-06 02:24:51 +02:00
scrawl d442853b3e Allow opposite gender's parts as fallback (Fixes #1404) 2014-06-06 01:30:23 +02:00
scrawl c36decb855 Fix being able to place items on top of actors (Fixes #1403) 2014-06-06 00:43:24 +02:00
scrawl 3d103f3785 Don't block hits when in hand-to-hand combat (shield not visible) 2014-06-05 22:27:46 +02:00
scrawl 0063b63ae4 Don't use armor mitigation for fall damage 2014-06-05 22:23:57 +02:00
scrawl 6db936bb3a Refactor item icon code into ItemWidget (Fixes #1391)
- Removed duplicate code
 - Fixed missing magic backgrounds during item drag&drop
 - Change background texture used for HUD icons
2014-06-05 22:13:18 +02:00
scrawl f53e86cad9 Fix AiCombat being incorrectly added to player (Fixes #1356) 2014-06-05 21:51:57 +02:00
cc9cii 76bf774485 Small changes for compiling with MSVC 2013. 2014-06-06 03:52:41 +10:00
dreamer-dead e772bb88da Remove RTTI usage in NIF reader. 2014-06-05 20:22:20 +04:00
scrawl 1173957e56 Fix item weight displaying as 1e+3 for Stendarr's Hammer 2014-06-05 18:15:48 +02:00
scrawl 17f8b49db6 Add missing padding for item tooltip magic effects 2014-06-05 17:51:15 +02:00
scrawl d2e98c4de1 Fix forced switch to third person on death not always working
For instance, when dying from fall damage
2014-06-05 17:21:02 +02:00
scrawl b6e52ae8ab Fix crash when loading a savegame after dying (Fixes #1389) 2014-06-05 17:01:22 +02:00
scrawl 4e235516c3 Work around missing character in french morrowind font (Bug #1390) 2014-06-05 16:16:16 +02:00
scrawl 85c9871178 Use question mark for not found glyphs in the font 2014-06-05 16:15:47 +02:00
scrawl cefa20bfb9 Fix not reacting to quit request while video is playing 2014-06-05 15:52:02 +02:00
scrawl c0f1449004 Cycle with equipped items if all slots are occupied (Fixes #1395) 2014-06-05 14:54:07 +02:00
Marc Zinnschlag 1b9b275f30 fix for bug #1369 2014-06-05 13:40:37 +02:00
Marc Zinnschlag a28a2bc2fe simplified feature management for record tables 2014-06-05 10:28:10 +02:00
Marc Zinnschlag c4e7386770 Revert "added changed reference tracking for cells"
This reverts commit f4334da42e.
2014-06-04 21:12:23 +02:00
Marc Zinnschlag 5313862a46 Merge remote-tracking branch 'scrawl/master' 2014-06-04 15:14:29 +02:00
scrawl 00775035af Add missing hasItemHealth for lockpicks/probes (Fixes #1385) 2014-06-04 01:03:12 +02:00
scrawl 7376cb9b61 Fix loading ESX files cleaned with testool (Fixes #1382) 2014-06-03 22:49:37 +02:00
scrawl ce14a6413b Small optimization to ESM::Variant 2014-06-03 22:40:09 +02:00
scrawl d7f3cd75ac Rewrite journal GUI topic list to use MWList 2014-06-03 16:04:18 +02:00
scrawl 17b15a6f4f Fix overlapping text in SpellWindow when the window is too small 2014-06-03 01:12:31 +02:00
scrawl d777739425 Fix a crash on exit when projectiles were active 2014-06-03 00:44:32 +02:00
scrawl bbc5b125ab Rewrite journal GUI quest index
- Use quest names as identifiers, not quest IDs. This ensures that quests with different IDs, but the same name (e.g. A2_4_MiloCaiusGone and A2_4_MiloGone) are merged properly, as they should.
 - Switch display from BookPage to MWList. Handles word-wrapping and scrolling properly.
 - Fixes a bug where the quest index would not be updated when opened.
2014-06-03 00:28:33 +02:00
slothlife 281d3b4c95 Fix for dereferencing past end of mGuiModes. 2014-06-02 17:21:13 -05:00
scrawl 577ed3943b Show wallpaper when loading a savegame 2014-06-02 23:26:43 +02:00
scrawl d2ad2e0f31 Re-enable collision when an actor is resurrected 2014-06-02 20:45:25 +02:00
scrawl 16ceb382f4 Ignore raycasting shapes for weapon collision tests
Fixes dead bodies being in the way when they shouldn't.
2014-06-02 20:40:06 +02:00
scrawl 996e49c534 Change CharacterManager to use list instead of vector
Solves a crash when deleting all savegames of a character due to mCurrent being invalidated
2014-06-02 20:24:35 +02:00
scrawl 68afac6a19 Fix large size_t being truncated to int 2014-06-02 19:47:39 +02:00
Marc Zinnschlag f130f8535c Merge remote-tracking branch 'slothlife/cmake-fixes' 2014-06-02 19:08:15 +02:00
scrawl 8b33c087e0 Properly handle exceptions when saving the game
Add message boxes when an exception occurs while loading or saving the game
2014-06-02 14:46:41 +02:00
Marc Zinnschlag 96e91e70a8 Merge remote-tracking branch 'emperorarthur/nif_fix' 2014-06-02 10:32:32 +02:00
Emanuel GuevelandMarc Zinnschlag 929aae6869 Silence a clang warning
warning: pointer is initialized by a temporary array, which will be destroyed at the end of the full-expression [-Waddress-of-array-temporary]
2014-06-02 10:30:44 +02:00
slothlife 20dabaead9 Fix CMake scripts to link static dependencies
Added FindDirectX scripts from Ogre so that FindOgre.cmake doesn't
fail silently to find the libraries correctly.

Modified top-level CMakelists.txt:
- Correctly set include dirs, preprocessor definitions, and add
  libraries for static Ogre plugins.
- Correctly set preprocessor definitions for static MyGUI.

Modified launcher, openmw, and opencs to link the static Ogre plugins.

Fixed FindSDL2.cmake to set a variable that contains only the SDL2
library, so that the launcher doesn't incorrectly link against
SDL2main.

Fixed FindMyGUI.cmake to correctly look for static variants.

Fixed FindOgre.cmake to set variables for DirectX plugins correctly.
2014-06-02 02:51:04 -05:00
Arthur Moore 576c06d791 Fix Bug #1371
Not properly reading in the NIF file's QuaternionKeyList.
2014-06-01 18:01:44 -04:00
scrawl 5df9ff8e2c Respect CMAKE_INSTALL_PREFIX in the global openmw.cfg
Fixes installing to /usr/local (Bug #1378)
2014-06-01 23:32:05 +02:00
scrawl f6f6b5604a Fix loading a savegame when some of its content files were disabled
Fixes #1380
2014-06-01 23:11:38 +02:00
Marc Zinnschlag 538aa6607e Merge remote-tracking branch 'scrawl/master' 2014-06-01 10:25:53 +02:00
scrawl c018319940 Addition to 7c9c0830a9: don't create useless BaseWhite clones 2014-06-01 02:21:47 +02:00
Fil Krynicki bbb7ceab43 Merge branch 'master' into bug1196jumpdialog
Conflicts:
	apps/openmw/mwinput/inputmanagerimp.cpp
2014-05-31 19:58:21 -04:00
Fil Krynicki cd131e7f86 1196/1217 fix
Fixes an issue where inputs could be processed by both GUI and
gameplay systems. An enabled/disable has been added to OIS
channels, and OpenMW now disables player gameplay hotkeys when
a GUI element has focus. GUI hotkeys are left enabled.
2014-05-31 19:51:21 -04:00
scrawl dcc0e2d105 When dialogue goodbye is forced, allow using either the red link or the goodbye button
Fixes #1373
2014-06-01 00:21:55 +02:00
scrawl 7c9c0830a9 Fix errors due to BaseWhite material being removed 2014-05-31 19:50:01 +02:00
scrawl 0f1b39bca4 Fix trade exploit
Using the Max Sale button it was possible to "invert" the buying/selling state.
2014-05-31 18:28:00 +02:00
scrawl 865486604f Make trade disposition changes temporary again, as in vanilla 2014-05-31 13:57:07 +02:00
scrawl a1bdf20958 Make trade balance label editable 2014-05-31 13:53:36 +02:00
scrawl de7fcf0beb Fix unhandled edge case in TradeItemModel with items that are able to stack, but are not currently stacked (e.g. after repairing a damaged item)
Fixes #1368
2014-05-31 13:45:47 +02:00
scrawl 16ac6e7aac Merge DialInfo objects by subrecord instead of overwriting the object
Fixes #1360
2014-05-31 13:01:11 +02:00
Rohit Nirmal 4f4a37896e Check if player's CellStore is non-NULL before configuring fog.
This prevents an assertion fail in getCell() when changing the
view distance while in the main menu.
2014-05-30 22:37:13 -05:00
Fil Krynicki 6cc6172779 Update in response to comments.
It turns out I was erroneous about problem (1) in my original commit
message. I thought that in an edge case the OpenMWGUI could both handle
the same event on the frame the GUI was closed. My test for
this was broken. So after brainstorming many possible unsatisfactory
solutions to this event handling, it's luckily not necessary!
2014-05-30 15:12:57 -04:00
scrawl d26f756c53 Fix several edit boxes not receiving mouse input 2014-05-30 14:52:47 +02:00
scrawl 8761aa5795 Loop main menu video when it's finished playing 2014-05-30 14:28:04 +02:00
scrawl ac77b07e29 Small fix for menu background 2014-05-30 14:28:04 +02:00
Marc Zinnschlag ecf3d52b46 Merge remote-tracking branch 'cc9cii/crash-fix-cg-shader' 2014-05-30 12:07:16 +02:00
Marc Zinnschlag f5e587f566 Merge remote-tracking branch 'puppykevin/master' 2014-05-30 11:42:19 +02:00
cc9cii 11ce093a9e Fix crashes caused when terrain materials don't get created (e.g. due to cg shader bug on Windows/D3D9). Should resolve Bug #1284. 2014-05-30 18:46:18 +10:00
Marc Zinnschlag be7f344eca Merge branch 'refs'
Conflicts:
	apps/opencs/model/doc/savingstate.cpp
	components/esm/cellref.hpp
2014-05-30 10:38:38 +02:00
Marc Zinnschlag 4778c27548 silenced two warnings 2014-05-30 10:18:05 +02:00
Marc Zinnschlag be88168e91 Merge remote-tracking branch 'scrawl/master' 2014-05-30 10:07:18 +02:00
scrawl b81c7d05c6 Remove CG shaders from settings window (not fully supported on non-nvidia cards, amd profiles have an instruction limit making them useless)
Can still be used by editing the config file, however.
2014-05-29 23:16:36 +02:00
scrawl afc1fa49f6 Use mouse release instead of press for binding actions
Resolves difficulties binding actions to mouse buttons (Fixes #1364)
2014-05-29 20:35:57 +02:00
Marc Zinnschlag 2f56b11530 Merge remote-tracking branch 'digmaster/master' 2014-05-29 18:57:16 +02:00
scrawl 50a72ed710 Fix ghosts in Cavern Of The Incarnate having -1 health 2014-05-29 18:09:13 +02:00
scrawl 6a882e1e8d Don't show hidden factions in StatsWindow (e.g. Nerevarine) 2014-05-29 18:09:04 +02:00
Marc Zinnschlag ae50632774 implemented cell and reference saving int OpenCS 2014-05-29 18:08:40 +02:00
scrawl 3b3b53d665 Support animated main menus (menu_background.bik)
Closes #1362
2014-05-29 17:24:25 +02:00
scrawl a6788cfb0e Support lights that do not have a model (Fixes #1361) 2014-05-29 16:44:50 +02:00
scrawl 95b3026c7e Fix cells being listed twice in console autocompletion when using --skip-menu=0 and loading a game 2014-05-29 16:34:05 +02:00
Digmaster 03d7137655 Fixes issue with pressing f1 in QuickKey menu, removed transparency in GoodBye button 2014-05-29 06:19:25 -04:00
Digmaster a5cfa8a049 Removes add behavior when pressing escape while waiting. 2014-05-29 01:52:41 -04:00
scrawl c6a4506ac2 Make console error prefix slightly less technical (see https://bugs.openmw.org/issues/1194#note-2) 2014-05-28 22:35:36 +02:00
Kevin Poitra 8516b837ff Revert "Started implementing sound time tracking so we can have NPCs' mouths move as they talk."
This reverts commit b897080156.
2014-05-28 15:04:35 -05:00
Kevin Poitra 18314b1707 We use spaces, not tabs. 2014-05-28 14:56:50 -05:00
scrawl 41a04b9c65 Slightly adjust menu button position 2014-05-28 21:50:08 +02:00
scrawl e9ab7c85c6 Fix exception when there are spaces in INI-imported color settings 2014-05-28 21:29:09 +02:00
Kevin Poitra 3f00f00426 Remove some debug code. 2014-05-28 14:20:04 -05:00
scrawl 18e24a2007 Fix old savegames causing the save list to not fill properly (Error in framelistener: Object '$dynamic0' not found)
Fixes #1357
2014-05-28 21:08:20 +02:00
Kevin Poitra 8e55eb8009 Fix some formatting. 2014-05-28 13:06:43 -05:00
Kevin Poitra 545c3c312c Remove a superfluous clear. 2014-05-28 13:03:40 -05:00
Kevin Poitra 16a6edbd0e Fix a possible crash due to a null pointer. 2014-05-28 12:58:45 -05:00
Marc Zinnschlag f112c78858 Merge remote-tracking branch 'scrawl/master' 2014-05-28 19:47:36 +02:00
Kevin Poitra 251df73407 Merge branch 'master' of https://github.com/OpenMW/openmw 2014-05-28 12:29:40 -05:00
Kevin Poitra b897080156 Started implementing sound time tracking so we can have NPCs' mouths move as they talk. 2014-05-28 12:26:35 -05:00
scrawl e68600eda2 Make Activate instruction work properly even when onActivate was not called in the same frame.
There are two major differences to the old implementation:
 - Activate can now be called on its own, e.g. in the console. In Vanilla this appears to be a no-op, so it is unlikely to be used and the potential for breakage is low.
 - The Action to execute is now determined when Activate is called, not when OnActivate is called. This however makes sense, since there may be a time difference between the two, and the object (or the player) could have changed in the meantime, requiring a different Action.

Fixes #1166 and #1346.
2014-05-28 19:23:50 +02:00
scrawl 42ea43c3d1 Fix container scripts not getting removed properly on cell change
Broken by f99eda1a54
2014-05-28 18:45:07 +02:00
mrcheko 34b163233b Merge remote-tracking branch 'upstream/master' 2014-05-28 17:54:38 +04:00
Marc Zinnschlag bb011f278e Merge remote-tracking branch 'cc9cii/master' 2014-05-28 14:45:57 +02:00
scrawl 56ff399f30 Say attack voiced dialogue *after* the target is set up
Required for the CreatureTargetted filter to function properly
2014-05-28 13:59:31 +02:00
cc9cii bbe77d656a Minor fixes from static analysis. 2014-05-28 21:15:50 +10:00
Marc Zinnschlag d02f7ac775 Merge remote-tracking branch 'emperorarthur/nif_fix' 2014-05-28 11:15:01 +02:00
Marc Zinnschlag 3244f2197a updated credits file 2014-05-28 11:13:23 +02:00
Arthur Moore 50a4d175da Read NIF interpolation type 4 (XYZ_ROTATION_KEY)
Don't actually do anything with it yet, but without this the "MW Containers Animated" mod made containers inaccessible.

Partly implements Feature #1067
2014-05-28 03:42:26 -04:00
Arthur Moore 9be219beba Fixes Bug #1348 "Evidence Chest unlocking when arrested." 2014-05-27 22:09:37 -04:00
cc9cii eb1589fd54 Merge remote-tracking branch 'upstream/master' 2014-05-27 21:04:40 +01:00
Marc Zinnschlag be39395ce7 Merge remote-tracking branch 'scrawl/master' 2014-05-27 21:09:24 +02:00
Marc Zinnschlag 12fc0aaecb removed an unused parser settings (implicitly fixing a case were this setting was not applied correctly) 2014-05-27 21:08:29 +02:00
Digmaster 033f1850f9 Fixed crass on character creation, allowed some character creation windows to be Esc-able 2014-05-27 14:30:26 -04:00
Digmaster 060a50f94a Fixed issue with QuickKeyMenu and ItemSelectionDialog 2014-05-27 13:50:24 -04:00
Fil Krynicki 91f4967614 Fix for bug 1196.
This bug would cause the player to jump when jump was assigned to
Space and they closed a dialog with Space. I tested vanilla
MW for behaviour and found that Jump was the only basic input which
MW does not allow when closing dialogs (i.e. if Space is assigned to
move forward, MW will move you forward after closing the dialog).

There were two reasons for the bug:
1) OpenMW GUI does not consume UI events
2) Jump occurs so long as key is down (not only on first key down)

To minimally fix the bug, I made it so that keypress events can be
consumed by the GUI and not passed along to the player control
input manager (1). However, if the player holds space, they will still
jump (as the subsequent key held events will be captured and cause
a jump).

Unfortunately, there is no idiomatic way that I could find in the
OpenMW input manager to perform events only on key down. Instead,
I introduced a variable which tracks whether the jump key has been
pressed for the first time within the current frame (2).

Note: I was initially concerned that limiting the jump event to
KeyDown and not Key Hold would cause issues with swimming,
levitating, or variable height jumping. However, after a bunch
of testing in vanilla MW and exploration of the OpenMW codebase
I could find nothing suggesting the need to capture the jump
key being held.
2014-05-27 13:12:27 -04:00
scrawl 0b45a9e6b2 Fix case folding for faction reaction from ESX records 2014-05-27 19:02:48 +02:00
scrawl 2b15b85af1 Fix position adjustment not working properly for rotated objects 2014-05-27 17:58:18 +02:00
scrawl 2fe86f2b85 Consider hit normal for item drop test (Fixes #995) 2014-05-27 17:39:04 +02:00
scrawl f476aa4ade Remove MyGUI color codes when copying to system clipboard 2014-05-27 17:07:14 +02:00
scrawl 49a6579d3a Fixed esmtool 2014-05-27 15:37:04 +02:00
scrawl 3e2eed9269 Implement getFactionReaction function
Strange bug when using value != 0 for the garbage argument?
2014-05-27 15:23:22 +02:00
scrawl e266c39c5d Implement modFactionReaction instruction (Closes #1347) 2014-05-27 14:54:29 +02:00
Marc Zinnschlag 27c795483b Merge remote-tracking branch 'ace/win-build-fix' 2014-05-27 14:32:20 +02:00
cc9cii ad911d4d03 MSVC generates different symbols for class vs struct, confusing the linker. 2014-05-27 22:09:08 +10:00
scrawl 578adb4ef6 PcJoinFaction and friends: make sure the given faction exists 2014-05-27 13:54:25 +02:00
Alexander "Ace" Olofsson d3357cc279 The MSVC linker is really pedantic with this.
Functions compiled as taking a class can't be linked with functions giving a struct, because of the name mangling I'm guessing...

unresolved external symbol "protected: void __thiscall MWWorld::LiveCellRefBase::loadImp(class ESM::ObjectState const &)" (?loadImp@LiveCellRefBase@MWWorld@@IAEXABVObjectState@ESM@@@Z)
2014-05-27 13:27:18 +02:00
Marc Zinnschlag 1665822224 Merge remote-tracking branch 'puppykevin/master' 2014-05-27 12:42:48 +02:00
Marc Zinnschlag e0ba9a4bf2 added reference collection stage to saving operation (preparation for cell saving) 2014-05-27 12:39:26 +02:00
Digmaster 2b3b11d848 Give access to the main menu when at a choice in dialogue 2014-05-27 05:33:25 -04:00
Digmaster ee7b5fa5c2 Fixed crash when Esc-ing out of Save "are you sure" dialog. 2014-05-27 04:38:13 -04:00
Digmaster e0356cf89d Added support to close modal windows with Esc 2014-05-27 03:00:31 -04:00
Kevin Poitra beba58268c Fix a typo within the launcher. Fixes bug #1058. 2014-05-27 01:47:57 -05:00
Marc Zinnschlag 9e21da9636 Merge remote-tracking branch 'scrawl/master' 2014-05-27 08:34:54 +02:00
Digmaster e0d55116a4 Dims and disabled Goodbye button in dialogs when unavailable. 2014-05-27 00:30:37 -04:00
Digmaster 79d0ed64d9 Undo some changes I made in the past that shouldn't exist 2014-05-26 23:31:40 -04:00
Digmaster 1ca921d6e2 Merge remote-tracking branch 'upstream/master' 2014-05-26 23:26:23 -04:00
Digmaster e3e51324a4 Esc button exits all non-modal GUI windows 2014-05-26 23:13:37 -04:00
scrawl cf68f6da96 Fix ESX dependencies not being checked except for the first one 2014-05-27 00:06:34 +02:00
scrawl 4caa8c5cca Fix offset to accumulation root not being cleared when adding an animation state with startpoint=1.f (observed with death animations) 2014-05-26 20:52:38 +02:00
scrawl 5660f283dd Fix actor models incorrectly being rotated on X/Y axes 2014-05-26 20:52:38 +02:00
scrawl 0966755a0c Store death animation index in CreatureStats 2014-05-26 20:52:32 +02:00
Marc Zinnschlag 3937cfcd8b Merge remote-tracking branch 'scrawl/master' 2014-05-26 19:02:13 +02:00
scrawl 3cd835e61a Fix bsa file loading not being case insensitive (Fixes #1178) 2014-05-26 17:34:36 +02:00
scrawl f629307f60 Fix frame delay for sound listener position (Fixes #1180) 2014-05-26 16:43:19 +02:00
scrawl bfd91c0681 Fix potential NpcStats overwriting issue 2014-05-26 12:31:08 +02:00
Marc Zinnschlag 4aab4bae65 minor cleanup and silenced a warning 2014-05-26 10:14:24 +02:00
Marc Zinnschlag f0d0a31a19 Merge remote-tracking branch 'mrcheko/master' 2014-05-26 10:08:40 +02:00
Thomas 7697b9e868 Ensures nothing bad will happen if we try to lock a door that never had a lock level 2014-05-26 01:48:24 -04:00
Thomas b3ffd5b868 Fix for bug Bug #1098 2014-05-26 01:42:11 -04:00
mrcheko 8fa7fcdbee fix bug http://bugs.openmw.org/issues/1335 (1304 as well)
though fish detects if actor is swimming, but in MW it attacks even if
the player is knee-deep in water
2014-05-25 21:03:37 +04:00
scrawl 10d835a55c Some more missing isInCell checks 2014-05-25 15:07:35 +02:00
scrawl f3ba31de2d Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwscript/cellextensions.cpp
2014-05-25 14:58:47 +02:00
scrawl 039398c8ae Basic RefData and CellRef change tracking
Wrapped item charge handling in getItemHealth function
2014-05-25 14:30:07 +02:00
Marc Zinnschlag 130af28fa5 Merge remote-tracking branch 'cc9cii/master'
Conflicts:
	apps/openmw/mwrender/videoplayer.cpp
2014-05-25 12:07:09 +02:00
Marc Zinnschlag ff15601a4c Merge branch 'openmw-30' 2014-05-25 11:55:25 +02:00
mrcheko c62187bd55 fix bug at http://bugs.openmw.org/issues/1155
Though it still can happen sometimes but not in such stupid manner.
2014-05-25 13:31:46 +04:00
cc9cii d2794165ba Disable binkaudio sound for FFmpeg libavocdec versions below 54.55.xxx (Windows x64) and 54.10.xxx (Windows 32bit). Later versions are all allowed, but due to sample formats there will be no sound and this message will be shown on the console "Sound Error: Unsupported sample format: fltp" 2014-05-25 18:56:50 +10:00
mrcheko 559c772906 Merge remote-tracking branch 'upstream/master' 2014-05-25 10:21:54 +04:00
cc9cii 4f94a31b54 Fix crash starting a new game. 2014-05-25 07:50:19 +10:00
mrcheko 56881cb7c9 fix bugs in aisequence::execute 2014-05-24 23:05:30 +04:00
scrawl a05c8fd3ce Make applyEnchantment return the record ID instead of modifying Ptr 2014-05-24 14:58:48 +02:00
scrawl 1d8da95756 Warning fix 2014-05-24 14:47:51 +02:00
scrawl 08cf58204f Merge branch 'master' of github.com:scrawl/openmw 2014-05-23 16:45:28 +02:00
scrawl f09c8ddc9e Remove a pointless assert 2014-05-23 16:44:51 +02:00
scrawl a7d525245c Fix missing include 2014-05-23 16:07:02 +02:00
Scott Howard c9011f707f missing #include <iostream> in mwiniimporter
missing #include <iostream> in mwiniimporter/main.cpp
2014-05-23 08:41:49 -04:00
cc9cii 367acd9676 Enable video but without sound. 2014-05-23 21:55:47 +10:00
cc9cii 3718847ffc Disable video for Windows until the crash issues are fixed. 2014-05-23 21:07:01 +10:00
Marc Zinnschlag f4334da42e added changed reference tracking for cells 2014-05-23 09:32:34 +02:00
scrawl b47b2b84f3 Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwdialogue/filter.cpp
	apps/openmw/mwgui/waitdialog.cpp
2014-05-23 08:39:48 +02:00
Marc Zinnschlag 6ac700a501 Merge remote-tracking branch 'potatoesmaster/getClass' 2014-05-23 08:00:52 +02:00
Marc Zinnschlag 244eb11651 Merge remote-tracking branch 'greye/widechar' 2014-05-23 07:48:26 +02:00
scrawl a2f156be8e Prevent magic bolts from colliding with their caster 2014-05-22 23:34:32 +02:00
scrawl df8e095c83 Small cleanup 2014-05-22 23:27:54 +02:00
scrawl e51300989c Handle NiBSPArrayController as alias for NiParticleSystemController
The differences (if any) are unknown.

NiBSPArrayController is used by the Atronach_Fire.nif model. Its particles are now visible, but they don't look right yet. Need to handle NiAutoNormalParticlesData?
2014-05-22 23:07:06 +02:00
Emanuel Guevel 1e4a854433 Remove static method MWWorld::Class::get(&Ptr)
It was just adding a level of indirection to Ptr.getClass().
All the call were replaced by that instead. The number of lines changed
is important, but the change itself is trivial, so everything should be
fine. :)
2014-05-22 20:50:00 +02:00
Emanuel Guevel 20cfdd4b43 Move LiveCellRefBase ctor where it belongs to 2014-05-22 20:50:00 +02:00
scrawl cba50c7338 Optimize ManualRef: look up correct Store instead of searching 2014-05-22 15:46:35 +02:00
scrawl 4b5f02f644 Remove useless throwing of exception 2014-05-22 15:29:36 +02:00
greye 663d5c314e be more verbose on change reasons 2014-05-22 16:35:57 +04:00
greye 8f9091550e require boost::locale only on Windows 2014-05-22 15:42:47 +04:00
scrawl 3380e1e1c5 Fix ShouldAttack filter
This makes NPCs exit dialogue properly when they should attack as a result of taunting actions.
2014-05-22 12:20:25 +02:00
scrawl c6c254d279 Do not trigger levelup if rest was interrupted 2014-05-22 11:08:36 +02:00
scrawl 18bba6bcec Fix layout glitch when autosaving 2014-05-22 11:03:45 +02:00
mrcheko 48431c841f Merge remote-tracking branch 'upstream/master' 2014-05-22 10:34:04 +04:00
greye cb598f0455 the same for data-local entry 2014-05-22 01:13:27 +04:00
greye 28b59f4008 process paths as UTF-8 in launcher 2014-05-22 01:08:03 +04:00
greye 3721174ae4 proof-of-concept boost::wave iteration policy 2014-05-21 23:50:58 +04:00
scrawl cf07d2ab93 Fix swapped position of Save and Load menu buttons 2014-05-21 16:38:50 +02:00
scrawl f812746010 Auto-select first save in load dialog 2014-05-21 16:36:55 +02:00
scrawl 3a7e2f8bb5 Allow invoking Journal instruction with non-existing index
This is used by the MG_EscortScholar1 quest.
2014-05-21 14:18:14 +02:00
greye 8b94e31062 try to set relative path to resources 2014-05-21 15:39:58 +04:00
scrawl 2f6d400c62 Merge branch 'master' of https://github.com/OpenMW/openmw into newgame 2014-05-21 10:41:03 +02:00
scrawl b39b572c5a Moved mStartupScript to World, so that it is executed for a New game 2014-05-21 09:25:45 +02:00
greye 4346e3b4d0 try to load plugins from relative paths 2014-05-20 21:42:51 +04:00
scrawl 9fe505c8fa Only run --script-run commands when bypassing the menu
Running them while no game is started yet is dangerous, and also leaves bits and pieces of state (e.g. in LocalScripts for scripted items added to inventory) that will not get cleaned up properly when a game is loaded (since when no game was previously running, no cleanup is performed). As a result, dangling MWWorld::Ptrs were left in LocalScripts.
2014-05-20 18:35:17 +02:00
scrawl abd6b6ab33 Fix not returning to main menu on failed loads when using quickload 2014-05-20 17:11:26 +02:00
scrawl 7ab98f0c6f Clear choices when dialogue starts
This is usually not needed, because it is not possible to exit dialogue while in a choice. However you can still exit dialogue by loading a different savegame.
2014-05-20 16:57:38 +02:00
greye b728a919a2 write dependency on boost::locale to CMake files 2014-05-20 12:59:58 +04:00
greye 1b7ed98325 fix typos, reset memory before using 2014-05-20 12:41:45 +04:00
scrawl 220ab86eca Simplify new game movie player 2014-05-20 10:07:08 +02:00
Marc Zinnschlag e0b6bf6aeb implemented reference record deleting 2014-05-20 09:28:18 +02:00
Marc Zinnschlag d8440e1fdc implemented reference record merging 2014-05-20 09:02:22 +02:00
greye 9dbe3f21d9 keep non-const signature for argv after conversion 2014-05-20 10:42:21 +04:00
greye 46c32f6c47 OpenEngine MyGUI logging facility 2014-05-20 10:37:04 +04:00
greye a46662043a tinyxml convert path to UTF-16 on Windows 2014-05-20 09:17:32 +04:00
greye 130349e0cd open files in binary mode when necessary 2014-05-20 08:14:29 +04:00
Marc Zinnschlag 58afa58549 Merge remote-tracking branch 'mrcheko/master' 2014-05-19 22:07:32 +02:00
mrcheko 638df221a6 memory leak fix 2014-05-19 23:29:35 +04:00
greye 86a8966306 manual screenshot creation and uploading (scrawl) 2014-05-19 22:56:40 +04:00
greye 444a07c01b workaround OgreLog Unicode path handling 2014-05-19 18:12:13 +04:00
greye 20527e0bd4 use boost::filesystem instead of boost::iostreams 2014-05-19 16:56:41 +04:00
scrawl 6bd0bbb8df Do not load (0,0) on new game 2014-05-19 14:09:16 +02:00
greye db16bb8983 fix OpenCS saving to Unicode path destination 2014-05-19 15:52:19 +04:00
greye 9c6224c74d fix saving to Unicode path destination 2014-05-19 15:43:25 +04:00
greye 493f8c6050 fix opening BSA on Unicode path 2014-05-19 13:39:07 +04:00
greye 417e07fbce fix irrelevant error reporting 2014-05-19 10:59:36 +04:00
greye 6cb795ef7d attempt to fix LowLevelFile, minor code reuse 2014-05-19 10:47:02 +04:00
greye 2c82da8e6e load Ogre::ConfigFile from DataStream 2014-05-19 10:07:43 +04:00
scrawl 6f03694d50 Fixes #1334: Only unequip item if the sell/drag action is actually successful 2014-05-19 08:03:55 +02:00
scrawl 510b7f8505 Task #1333: Remove cmake git tag reading 2014-05-19 07:31:19 +02:00
scrawl 0fe0dc33a6 Fixes #1338: Bring back a label that got lost 2014-05-19 05:35:16 +02:00
Marc Zinnschlag 7c149e98e0 Merge branch 'openmw-30' 2014-05-18 22:38:52 +02:00
Marc Zinnschlag 37f1a49352 Merge remote-tracking branch 'mrcheko/master' 2014-05-18 22:36:40 +02:00
mrcheko fa14df62b7 fix crash on disappeared target 2014-05-18 23:15:22 +04:00
Marc Zinnschlag a5f0fe7282 incremented version number 2014-05-18 20:07:41 +02:00
Marc Zinnschlag 1294682196 Merge remote-tracking branch 'scrawl/master' 2014-05-18 19:03:35 +02:00
scrawl 3dceb7ee4f Fix overwriting DialInfo 2014-05-18 18:58:32 +02:00
Marc Zinnschlag aa05acd26e Merge remote-tracking branch 'scrawl/master' 2014-05-18 18:50:18 +02:00
Marc Zinnschlag 56c4367c1a Merge remote-tracking branch 'mrcheko/master' 2014-05-18 18:42:23 +02:00
mrcheko e1249f6a31 actor handle and id confusing fix 2014-05-18 20:13:46 +04:00
scrawl a87b64d2da Fix some ancient code 2014-05-18 16:34:58 +02:00
scrawl 0aa1042fd7 Optimized dialogue merging with a lookup map 2014-05-18 16:01:16 +02:00
scrawl 1677fcf324 Dialogue merging 2014-05-18 15:25:16 +02:00
mrcheko 66307dd889 travis fix #3 :( 2014-05-18 16:10:14 +04:00
mrcheko 74697f8116 travis fix #2 2014-05-18 15:41:15 +04:00
scrawl 5b76c0893a Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	components/esm/inventorystate.hpp
2014-05-18 12:55:43 +02:00
greye e02b04536f fix most vexing parse issue 2014-05-18 14:55:05 +04:00
greye 424d06a6f8 open fstreams from boost::filesystem::path, vol.2 2014-05-18 14:55:05 +04:00
greye 2236216344 minor simplification 2014-05-18 14:55:05 +04:00
greye a22ec223d8 open fstreams from boost::filesystem::path, vol.1 2014-05-18 14:55:05 +04:00
greye 18b3cfebdb fix importer crash on empty lines (thanks to Ace) 2014-05-18 14:55:05 +04:00
greye b4950509bc use converted widechars in ini importer 2014-05-18 14:55:05 +04:00
greye cd990a665a create QString from utf-8 when expected 2014-05-18 14:55:05 +04:00
greye eafdefe999 using WindowsPath implies utf-8 for boost fs::path 2014-05-18 14:55:05 +04:00
greye 584c121f33 fix windows unicode path handling 2014-05-18 14:55:04 +04:00
scrawl a872c9f83a Feature #1323: handle restocking levelled items 2014-05-18 12:53:21 +02:00
mrcheko 69c1eb28c5 travis compile fix 2014-05-18 14:39:04 +04:00
scrawl 90ec19c3ac Remove unneeded MWScrollView 2014-05-18 10:30:03 +02:00
scrawl 150b920ef1 Fix long journal entries not being displayed 2014-05-18 10:14:03 +02:00
scrawl 5fc2b1a41b Allow setting a journal index even if there's no related journal entry
This is used by the MV_SlaveMule quest.
2014-05-18 07:39:16 +02:00
scrawl e1458453f3 Fix "unknown info ID" exceptions when a dialogue response is from the Info Refusal group
Could be observed in TG_OverduePayments quest when talking to Trasteve about Dwemer Artifacts.

Info Refusal responses are not specific to any particular topic, so they should not be added to the journal. Trying to do so anyway will cause "unknown id" exceptions because MWDialogue::Entry expects the infoId to be from the Dialogue for the supplied topic.
2014-05-18 06:52:15 +02:00
cc9cii 12dc5cf4ea Bug #1303 - resolves the bug by tweaking the slope constant (the value 49 was selected to mimic vanilla behaviour for a low level character exploring Seyda Neen). The feature to vary the climbable angle based on acrobatics is still to be implemented. 2014-05-18 12:05:08 +10:00
cc9cii b36bb58e8c Bug #1324: Artem's solution 2014-05-18 07:34:13 +10:00
mrcheko aa5647b45e merge master, resolve conflicts 2014-05-17 19:20:57 +04:00
cc9cii 8971db8962 SceneWidget windowHandle fix for Windows. 2014-05-17 23:53:33 +10:00
scrawl b4ed828e21 Feature #1323: Implement restocking items (does not handle levelled lists yet) 2014-05-17 14:30:31 +02:00
Marc Zinnschlag f7c89015f9 Merge remote-tracking branch 'scrawl/master' 2014-05-17 11:50:31 +02:00
scrawl ae66d28c87 Feature #32: Implement respawn for containers, creatures and NPCs 2014-05-17 09:09:00 +02:00
scrawl 92c5bb56e0 Un-reverted actorId for AiPursue 2014-05-17 05:34:54 +02:00
scrawl e266aff561 Savegame: store projectiles 2014-05-17 05:24:32 +02:00
scrawl 15368188dc Fix sliders in effect editor not being precisely movable 2014-05-17 02:54:51 +02:00
scrawl 9adb990143 Fix potentially unsafe use of MWWorld::Ptr 2014-05-17 02:52:24 +02:00
scrawl e5a21aca53 Refactor projectiles to no longer use MW-objects 2014-05-16 13:33:30 +02:00
scrawl 18852c09d0 Manually re-added AiCombat portion of actorid changes. This is the only one that really matters, and will not suffer from the infinite recursion because it's not included in AiSequence::fill. 2014-05-16 12:28:23 +02:00
scrawl 36d9ae17cc Revert "Change all AI packages (except AiActivate) to use ActorIds"
Causes potential infinite loops (AiSequence::fill -> AiPackage() -> getCreatureStats -> ensureCustomData -> ..)

This reverts commit 2e9985c1a3.
2014-05-16 12:11:34 +02:00
scrawl 028e00c98f Add missing status report for some toggle commands 2014-05-16 09:21:28 +02:00
scrawl 868e38a07c Fix Assault crimes being reported when striking in self-defense
Last missing fix for Bug #1134.
2014-05-16 08:32:00 +02:00
scrawl 940a434479 Use ItemModel for moving items from a container to the world
Fixes owner not resetting when moving an item from a corpse to the world.
2014-05-16 03:19:38 +02:00
scrawl d70306382e Don't create the player object until the game starts
Fixes a crash introduced in e591d23 when using --skip-menu=0.
2014-05-16 00:58:12 +02:00
mrcheko 5be37f04ef Feature 1314: make npc fight creatures 2014-05-16 00:03:48 +04:00
scrawl b3735981d6 Remove unused file_finder 2014-05-15 21:36:24 +02:00
Marc Zinnschlag 3b2ba4f6cd Merge remote-tracking branch 'scrawl/master' 2014-05-15 14:25:36 +02:00
scrawl 0bc33fa86a Revert "AiCombat: Removed obsolete door back-off code (now handled in AiAvoidDoor)"
Apparently not working for AiCombat due to its higher getPriority(). What should we do here?

This reverts commit a6e1d7ffd6.
2014-05-15 10:14:47 +02:00
scrawl b16d444f0f Fix never clearing graveyard. Oops 2014-05-15 10:05:35 +02:00
scrawl 6de7e16550 Fix searchPtrViaActorId not skipping over deleted references
Fixes an issue when an actor has moved cell: searchPtrViaActorId would randomly return the deleted Ptr from the old cell.
2014-05-15 09:57:09 +02:00
scrawl b6a7aee42e Fix player not being allowed to use his own items 2014-05-15 09:54:10 +02:00
scrawl eb40032bde Fix item owner not resetting when dragging an item from a corpse to the player avatar 2014-05-15 09:54:10 +02:00
scrawl bac4d875df Fix a potential exploit that made it possible to reset the owner of any item 2014-05-15 09:54:10 +02:00
scrawl a6e1d7ffd6 AiCombat: Removed obsolete door back-off code (now handled in AiAvoidDoor) 2014-05-15 09:54:10 +02:00
scrawl 2e9985c1a3 Change all AI packages (except AiActivate) to use ActorIds
More robust in case the target changes cell or there are multiple targets with the same RefId
2014-05-15 09:54:10 +02:00
scrawl 2f13a17a39 Add some more safety checks to spellcasting 2014-05-15 09:54:10 +02:00
scrawl f2c193ce3d Fix searching the player's actorId 2014-05-15 09:54:10 +02:00
scrawl a609dc5674 Fix exception when getting hit by a trap 2014-05-15 09:54:10 +02:00
scrawl a76e391ad0 Savegame: store door movement state (Closes #747) 2014-05-15 09:54:10 +02:00
scrawl 37b9d2fb0c Fix a wrong use of reference that causes potential crash 2014-05-15 09:54:10 +02:00
scrawl 471bbd0021 Savegame: store levelled creature state and move to actorIds
(Closes #1332)
2014-05-15 09:54:04 +02:00
Marc Zinnschlag d08869a25d Merge remote-tracking branch 'slothlife/msvc_warning_cleanup'
Conflicts:
	apps/openmw/mwrender/localmap.cpp
2014-05-15 08:13:15 +02:00
slothlife f33559fead Fixes for MSVC warnings, less overall changes
Kept some fixes from the first round of review. Found out that several
targets weren't being built with the same basic warnings disabled.
Disabled a few warnings for external libraries specifically, rather than
applying them to all targets.
2014-05-14 20:12:52 -05:00
scrawl 9b67fcc4d7 Merge branch 'master' of https://github.com/OpenMW/openmw 2014-05-14 23:54:25 +02:00
scrawl 9052cc4a57 Savegame: store ActiveSpells 2014-05-14 23:54:15 +02:00
Marc Zinnschlag 2116f16289 Merge remote-tracking branch 'digmaster/master' 2014-05-14 21:16:24 +02:00
Thomas d2aada95b4 Fixed AiPursue by fixing underlying issue is Pathto() 2014-05-14 14:11:34 -04:00
Thomas 2425d2c2ab Added stuck mitigation for AiAvoidDoor 2014-05-14 13:38:10 -04:00
Marc Zinnschlag c2ea92b93a Merge remote-tracking branch 'sirherrbatka/Feature#1274' 2014-05-14 14:41:04 +02:00
Marek Kochanowicz 3439900239 ignore all drops that will not create usefull filter 2014-05-14 11:56:23 +02:00
Thomas 993ef1be43 Actor avoiding door asks all surrounding actors to do the same. 2014-05-14 04:05:18 -04:00
scrawl 1141c1f3f2 Change projectiles to use actorIds 2014-05-14 09:48:16 +02:00
scrawl 61187c2fef Savegame: store actorIds 2014-05-14 09:47:49 +02:00
scrawl 51020fdb5f Fix a bug for NpcStats::mUsedIds in savegames, and added a compile-time guard to prevent similar errors in the future. 2014-05-14 09:17:30 +02:00
Thomas cbcf0f6039 Changed AiEScort to use new PathTo function 2014-05-14 01:44:11 -04:00
scrawl dfacf8c044 Change ActiveSpells to use ActorId 2014-05-14 07:14:08 +02:00
scrawl 67e942e733 Bug #869: Some fixes to the previous fix 2014-05-14 07:13:12 +02:00
slothlife c160a04ede Revert "Fixes for warnings when building with MSVC"
This reverts commit 46eb20b98c.
2014-05-14 00:03:30 -05:00
scrawl 7697ab37e0 Fixes #1129: Change summoned creatures to use ActorId
Gracefully handles summoned creatures that are left behind in inactive cells.
2014-05-14 06:37:31 +02:00
Thomas 7cd4c93fa4 Changed getNearbyDoor to use MWWorld::Ptr 2014-05-13 23:46:00 -04:00
scrawl 99b4bc721b Don't attempt to inflict spells on dead actors 2014-05-14 05:37:53 +02:00
scrawl 6c7b3074f5 Fix self-defense for creatures when attacked with a spell 2014-05-14 05:31:19 +02:00
Thomas 58bf7624be Made code a bit more efficient 2014-05-13 21:52:05 -04:00
scrawl 3cdbcf3c28 Merge branch 'actorid' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwmechanics/creaturestats.cpp
2014-05-14 02:35:05 +02:00
Thomas 203ef580cf Fixed moving activatable object being incorrectly activated. 2014-05-13 20:32:29 -04:00
scrawl 365ca6c7e1 Fixes #1331: Manually disable movement state for dead actors.
For dead actors, refreshCurrentAnims is no longer called, so we need to disable the movement state manually.
2014-05-13 21:47:45 +02:00
Thomas 6d540c4e07 Removed merging error 2014-05-13 14:24:48 -04:00
Thomas 680890c846 Clarification on some documentation points 2014-05-13 14:21:59 -04:00
Thomas 085fb2c5a2 Simplified documentation a bit 2014-05-13 14:13:05 -04:00
Thomas d6d4d9f75d Removed destructor documentation 2014-05-13 14:08:08 -04:00
Thomas a61d804de6 now that I've found the documentation, fixed some stuff for extensions 2014-05-13 13:53:06 -04:00
Thomas ee36ace00b Undid some code clean up changes, and changed how some includes work 2014-05-13 13:43:50 -04:00
scrawl f01c3e0eac Fixes #1037: Change default footstep volume to match vanilla 2014-05-13 19:38:28 +02:00
Thomas 77d365e196 Forced some function arguments to take in a specific array size 2014-05-13 13:25:22 -04:00
Thomas 598221a8e7 Forgot some files 2014-05-13 13:07:27 -04:00
scrawl e591d23880 Fixes #894: Make sure the player's CharacterController is updated when the player is rebuilt. Necessary if the race is changed while we are still in a GUI (e.g. in the review dialog), and an update normally wouldn't occur. 2014-05-13 19:01:02 +02:00
Thomas 9dbe53c722 Merge remote-tracking branch 'upstream/master' 2014-05-13 04:11:07 -04:00
Thomas 2db3c89a9e Ensures destination is far enough to care about getting stuck 2014-05-13 04:09:21 -04:00
Marc Zinnschlag 6c8e4b27d3 Merge remote-tracking branch 'scrawl/master' 2014-05-13 10:00:18 +02:00
Thomas cbfa282f8d Changed implementations of aifollow/pursue/activate slightly, added ability for NPCs to go through unlocked doors (They even try locked ones), and step back from opening doors (Although it still needs some work)
Notes - When the door hits them while it's about to finish closing they will try to walk through the door.
      - Considerably more works is needed in making the NPC work out troublesome areas where they get stuck
2014-05-13 03:58:32 -04:00
Thomas 2c74ea381e Moved pathfinding code to aiPackage, implemented it's use with aiFollow and aiPursue 2014-05-12 21:05:32 -04:00
scrawl 386604bc9d Fixes #869: Added methods to control external and internal collision modes separately
When an actor dies, we should only disable external collisions, i.e. prevent other actors from colliding with the dead body. The dead actor, however, should still have gravity and collision applied.

Also moved disableCollision to when the death animation finishes, not as soon as the actor's health is 0.
2014-05-13 01:43:52 +02:00
scrawl f11079f1e4 Fix findGround (off by 2 units) 2014-05-12 23:10:11 +02:00
mrcheko 725f6cac5e AiPursue infinite package updating bug resolved 2014-05-13 00:05:30 +04:00
scrawl 6cc691115b Savegame: store most of CreatureStats 2014-05-12 21:37:36 +02:00
Thomas 645d174a96 Merge remote-tracking branch 'upstream/master'
Conflicts:
	apps/openmw/mwmechanics/aisequence.hpp
2014-05-12 14:49:08 -04:00
mrcheko e4fe78937a Merge remote-tracking branch 'upstream/master' 2014-05-12 22:06:26 +04:00
Marc Zinnschlag 3c5fe28857 Merge branch 'config' 2014-05-12 10:33:10 +02:00
Marc Zinnschlag 8279d307c4 text encoding configuration (was using hardcoded settings before) 2014-05-12 10:32:57 +02:00
Marc Zinnschlag 050fe9ebe1 updated credits file 2014-05-12 08:58:55 +02:00
scrawl 117b812fb1 Fix invisibility not breaking on certain actions 2014-05-12 02:20:56 +02:00
scrawl b0fbea9d57 Removed a wrong assertion. Max drowning time is defined by GMST. 2014-05-11 21:03:27 +02:00
scrawl 2bc2684a66 Fixes #275: force updating exterior cell maps even if already in cache 2014-05-11 18:01:47 +02:00
scrawl 54a893994a Also update local map when paused, to make it update properly when teleporting via GUI/console 2014-05-11 18:01:47 +02:00
scrawl 7428511ea0 Bug #772: Do not show door markers for disabled doors 2014-05-11 18:01:47 +02:00
scrawl 961c4d4dc4 Fixes #772: Give scripts a chance to run before updating map, so that disabled objects are not visible 2014-05-11 18:01:47 +02:00
scrawl ac8abd3398 assert -> exception to gracefully handle corrupted savegames 2014-05-11 18:01:47 +02:00
Marc Zinnschlag 368c868623 Merge remote-tracking branch 'scrawl/master' 2014-05-11 11:10:51 +02:00
Marc Zinnschlag a85c73cf35 Merge remote-tracking branch 'filkry/bug1047dialoglinks' 2014-05-11 11:07:23 +02:00
scrawl c39a0368cf Bug #618: Make local map textures static in an attempt to fix the disappearing maps with D3D.
Also removed problematic DISCARDABLE flag for fog of war textures.
2014-05-11 02:40:15 +02:00
scrawl c98bea2a88 Moved local map update to LocalMap::updatePlayer to fix a brief desync on cell transitions due to sFogOfWarSkip 2014-05-11 02:27:43 +02:00
scrawl a4a9794417 Savegame: store fog of war (Closes #1177) 2014-05-11 02:07:58 +02:00
scrawl 7b46e9f914 Get rid of no longer needed widget names 2014-05-11 01:05:49 +02:00
scrawl 041319c43e Fixes #1234: Store dynamic record counter in savegame to prevent name clashes 2014-05-11 00:32:22 +02:00
scrawl 07d9845aa0 Fix a bug in ESMStore code that checks for duplicate record insertions 2014-05-11 00:10:28 +02:00
scrawl 3ad28ec5aa Set a proper Page size for all scrollbars. Fixes scrollbars only moving very slowly when interacting with them (as opposed to using mousewheel on the content) 2014-05-11 00:09:02 +02:00
Fil Krynicki eb5ef270ba Bug 1047 update - defaults and edge case
Handles edge case where it was possible to highlight adjacent
sub-terms without whitespace between them.

Also makes ignoring words not prefixed by whitespace the
assumed behaviour.
2014-05-10 17:47:21 -04:00
scrawl dab4db87ff Fix a bug in marker placement for interior maps 2014-05-10 23:47:00 +02:00
Fil Krynicki 9095a45ba7 Bug 1047 Fix
Dialog links can no longer be highlighted if they appear in the
middle of the word. This is achieved by confirming that the
character before a match is not alphabetic, so that words
following hyphens can still potentially match.
2014-05-10 17:05:15 -04:00
scrawl b358cf2423 Fix a potential crash when loading script locals from savegame 2014-05-10 21:31:49 +02:00
scrawl 9fb5cef287 Oops, committed debug code 2014-05-10 21:31:49 +02:00
Marc Zinnschlag 8f5acf4741 Merge branch 'openmw-30' 2014-05-10 17:49:02 +02:00
Marc Zinnschlag 5b5bf6f37e removed a redundant (and unsufficiently configured) copy of ConfigurationManager 2014-05-10 17:46:10 +02:00
Marc Zinnschlag 804bf523ba removed two unused files 2014-05-10 17:35:11 +02:00
Marc Zinnschlag 5b9e90744e Merge branch 'load' 2014-05-10 13:49:25 +02:00
Marc Zinnschlag 6fdbd4d3f9 minor adjustment to UniversalId 2014-05-10 13:49:19 +02:00
Marc Zinnschlag 96ca9500ca generate error messages when encounting non-critical problems during load 2014-05-10 13:47:22 +02:00
Marc Zinnschlag 79d59153c1 improved layout of loading window 2014-05-10 13:29:28 +02:00
Marc Zinnschlag 95d24492de display load error messages in loading window 2014-05-10 13:18:40 +02:00
Marc Zinnschlag aadaf7827d added load error log 2014-05-10 12:04:36 +02:00
Marc Zinnschlag 31b8dad4e0 Merge remote-tracking branch 'scrawl/master' 2014-05-10 10:52:47 +02:00
Marc Zinnschlag 7500895519 updated changelog 2014-05-10 10:52:23 +02:00
Marc Zinnschlag 2009cf9ad7 Merge remote-tracking branch 'scrawl/master' into openmw-30 2014-05-10 10:48:40 +02:00
scrawl 242e19a136 Fix crash when exiting OpenMW while dialogue/journal is opened and mouse cursor on a topic
(Fixes #1300)
2014-05-10 01:37:34 +02:00
scrawl 5163358478 Fix a crash when exiting OpenMW while the mouse cursor is over a local map marker 2014-05-10 01:14:12 +02:00
scrawl d86585b153 Fix clearing of local map markers
destroyWidget changes the child count, so the for loop is flawed.
2014-05-10 01:07:40 +02:00
scrawl 1444cd9051 Fix AiCombat exception when actor has a lockpick/probe equipped.
Don't make NPCs autoEquip lockpicks/probes, since they can't use them.
2014-05-10 00:37:36 +02:00
scrawl 136813a882 Bug #1319: Fix references not coming from a content file incorrectly overwriting each other 2014-05-10 00:01:30 +02:00
scrawl e7a004824c Fix a search that should have been find 2014-05-09 23:58:24 +02:00
scrawl 872d9be1b4 Fix potential issue with dialogue globals
Make sure they are updated throughout the conversation
2014-05-09 19:19:21 +02:00
scrawl 731bc9c275 Fix broken isClass check and renamed variable for clarity 2014-05-09 18:45:49 +02:00
Marc Zinnschlag 199f030d38 adjusted cmake file for opencs user settings file rename 2014-05-09 17:19:44 +02:00
slothlife 46eb20b98c Fixes for warnings when building with MSVC
Most warnings are innocuous (wrong type-specifier for forward
declarations, conversion of literals into unsigned integers, warnings
about methods optimized out), but I believe actual bugs were revealed in
vartypedelegate.cpp and combat.cpp.
2014-05-09 08:32:52 -05:00
cc9cii cf23721f1b Windows debug build crash fix. 2014-05-09 20:43:24 +10:00
scrawl 6e9458c076 Small fix for dropping items from inventory
Some widgets prevented clicking through
2014-05-08 21:04:11 +02:00
scrawl 312dc84fa4 Fix a bug where the player's inventory could be opened as a container
If an NPC uses AiActivate on the player (i.e. to activate dialogue) precisely in the frame where the player just died, the player's inventory would be opened as a container instead.
2014-05-08 20:40:45 +02:00
Marc Zinnschlag 3dfd239b83 updated changelog 2014-05-08 20:39:58 +02:00
Marc Zinnschlag af14bca5aa Merge branch 'master' into openmw-30 2014-05-08 20:37:54 +02:00
Marc Zinnschlag cf90da6cd8 minor fix 2014-05-08 15:23:29 +02:00
Marc Zinnschlag 6eff5ecaad Merge branch 'operations' into load
Conflicts:
	apps/opencs/main.cpp
	apps/opencs/model/doc/document.cpp
2014-05-08 13:17:24 +02:00
Marc Zinnschlag 205306ee3d changed message passing format from QString to a UniversalId/std::string pair 2014-05-08 12:42:29 +02:00
graffy76 0e7d40de6a Merge branch 'master' of https://github.com/OpenMW/openmw
upstream merge
2014-05-07 22:00:08 -05:00
graffy76 cd7983adb5 Decoupled setting definitions from the Setting class. QSettings
implementation is now fully responsible for managing user settings.
2014-05-07 21:59:26 -05:00
Marc Zinnschlag 224f5cf7db updated changelog 2014-05-07 19:14:04 +02:00
Marc Zinnschlag 21142711f0 Merge remote-tracking branch 'graffy76/master' 2014-05-07 10:35:11 +02:00
graffy76 e47e3de3d2 Removed unneeded includes, cleaned up code, added comments 2014-05-06 21:58:50 -05:00
graffy76 8fb96e1be3 Removed error code for missing opencs.ini files. 2014-05-06 19:22:45 -05:00
mrcheko 01810f24b0 A* misses 1st closest node fix 2014-05-06 23:29:39 +04:00
Marc Zinnschlag 729e079b0b Merge remote-tracking branch 'scrawl/master' 2014-05-06 20:18:19 +02:00
scrawl 1c8c26072d Crime and self defense fixes
- NPCs should still shout messages such as "thief" even if they did not report the crime
 - Fixed self defense for NPCs (they no longer attack the player when they were attacked by a non-player actor)
 - Fixed self defense for creatures (Fixes #1203)
2014-05-06 19:15:43 +02:00
mrcheko 6590eb6727 Merge remote-tracking branch 'upstream/master' 2014-05-06 20:06:55 +04:00
scrawl d2beb814e7 Remove superfluous attack phrases (already done by startCombat) 2014-05-06 18:05:53 +02:00
graffy76 042670fc73 Merge remote-tracking branch 'origin'
merge
2014-05-06 07:38:29 -05:00
graffy76 a17cb1f389 Fixed opencs.ini formatting 2014-05-06 07:37:52 -05:00
graffy76 79b13a74a3 Incorporated SettingManager into UserSettings class. Other minor code
changes to support QSettings integration
2014-05-06 07:33:32 -05:00
Marc Zinnschlag a30d816982 fixed a mixup in CSMTools::Tools constructor/destructor 2014-05-06 11:44:20 +02:00
Marc Zinnschlag 492620c8cf handle exceptions thrown during loading and report them to the user 2014-05-06 09:39:39 +02:00
scrawl dd9117809d Say an attack phrase when combat starts
Move combat start to a helper method

Added some todo comments
2014-05-06 00:13:31 +02:00
scrawl d4492b56db Added header file missing from CMakeLists 2014-05-05 23:52:09 +02:00
scrawl 536fc5e192 Fix autosaves 2014-05-05 22:38:08 +02:00
graffy76 5cba828cc9 Removed unneeded code from setting manager. Moved some code to user
settings
2014-05-05 06:26:00 -05:00
graffy76 74fa115d20 fixed check for missing ini files 2014-05-05 06:07:41 -05:00
graffy76 475214ab62 Implmented QSettings for loading / saving file definitions. Also
renamed opencs.cfg to opencs.ini to follow Ini format standards
2014-05-05 05:56:03 -05:00
Jeffrey Haines d4812c3af9 fixed placement of else statement 2014-05-04 17:54:33 -04:00
Jeffrey Haines 78f76842a6 Added else statement
Its still dodgy though
2014-05-04 16:56:30 -04:00
Jeffrey Haines 7d5dab214c #58 - Sneak Skill: functional sneaking
Removed sneak checking from individual actor update.
Added sneak checking to Actors::update()
2014-05-04 16:20:09 -04:00
Jeffrey Haines a65e8393bb Merged files 2014-05-04 11:33:27 -04:00
Marc Zinnschlag df97a1b57f Merge remote-tracking branch 'sirherrbatka/Feature#1274' 2014-05-04 17:11:43 +02:00
mrcheko f596b698d9 fixes to slow-down at jump startup and infinite air intertia growth 2014-05-04 18:15:07 +04:00
Marek Kochanowicz f51f826dad fixed compilation 2014-05-04 15:13:03 +02:00
Jeffrey Haines a469444e53 Player can't detect self 2014-05-04 08:05:32 -04:00
Marc Zinnschlag 7f78c29bb5 Merge remote-tracking branch 'sirherrbatka/Feature#1274'
Conflicts:
	apps/opencs/view/world/table.cpp
2014-05-04 14:03:56 +02:00
Marek Kochanowicz 4a502226e6 added flag to distingiush widgets 2014-05-04 12:41:06 +02:00
Marc Zinnschlag e43913e7c2 Merge remote-tracking branch 'graffy76/master' 2014-05-04 12:17:44 +02:00
Thomas dbf06d8c8b Merge remote-tracking branch 'upstream/master'
Conflicts:
	apps/openmw/mwmechanics/aipursue.hpp
	apps/openmw/mwmechanics/aisequence.hpp
2014-05-04 02:06:43 -04:00
graffy76 3f737bbb44 implemented QDial into RangeView class 2014-05-03 22:02:16 -05:00
graffy76 4f876574c1 Implemented slider widget in rangeView class 2014-05-03 21:50:08 -05:00
graffy76 306c9e840c Merge branch 'master' of https://github.com/graffy76/openmw
fixed conflict

Conflicts:
	apps/opencs/model/settings/usersettings.cpp
2014-05-03 19:49:01 -05:00
graffy76 0a3ab3dcd1 Commented out "proxy selection test" demo page in user settings 2014-05-03 19:48:04 -05:00
graffy76 c4a9c18045 Commented out "proxy selection test" demo page in user settings 2014-05-03 19:36:52 -05:00
graffy76 35d1502308 Merge branch 'master' of https://github.com/OpenMW/openmw
merge
2014-05-03 19:16:42 -05:00
graffy76 1c26741c56 Implemented rangeview with spinbox as only control. Simplified setting
class constructor.
2014-05-03 18:58:43 -05:00
graffy76 bc6197c552 Added custom spin box class 2014-05-03 18:57:34 -05:00
Thoronador be89654eef remove audiere_decoder + mpgsnd_decoder from CMake file for openmw 2014-05-03 22:05:21 +02:00
Thoronador 620a8ccaf3 remove Audiere and MPG123+Sndfile decoder sources 2014-05-03 21:49:57 +02:00
Thoronador 688d556510 remove references to Audiere and MPG123 from top-level CMake file 2014-05-03 21:20:22 +02:00
Thoronador 320411f5b3 remove unused CMake files for Audiere, MPG123 and Sndfile 2014-05-03 21:05:45 +02:00
Marek Kochanowicz 00b21449a2 replaced type_cell with type_scene 2014-05-03 19:47:13 +02:00
Jeffrey Haines e1e23447f2 Removed initial check form setSneak
It wasn’t needed.
2014-05-03 13:16:07 -04:00
Jeffrey Haines 05e326bdc3 Added update sneak to actors
Intends to check the state of a players sneak by asking the question if
each npc can see the player.
2014-05-03 12:48:07 -04:00
Marc Zinnschlag 72b4945128 Merge remote-tracking branch 'scrawl/master' 2014-05-03 18:38:00 +02:00
scrawl 658c37a299 AiPursue: If we reached the path end, that does not mean we reached the target. Rebuild the path if the target has moved in the meantime.
Fixes guards in pursuit activating the dialogue too early.

Also tweaked the activation distance.
2014-05-03 17:17:00 +02:00
Marc Zinnschlag e9c2f24faa intercept close button clicks in loading window 2014-05-03 17:14:17 +02:00
Marc Zinnschlag 3fdd72f204 added cancel button to loading window 2014-05-03 16:44:50 +02:00
scrawl eff648e3ab Show unhandled SDL events in hexadecimal (easier to compare with the enum) 2014-05-03 16:16:27 +02:00
Marc Zinnschlag 6bc5869222 record loading progress bar 2014-05-03 15:33:35 +02:00
Marc Zinnschlag 6692d2dc72 split up load function in a start and continue part 2014-05-03 15:05:02 +02:00
Marc Zinnschlag 0b309d9ef4 Merge branch 'master' into load
Conflicts:
	apps/opencs/view/doc/viewmanager.cpp
2014-05-03 14:36:06 +02:00
Marek Kochanowicz 5e99381019 Drag and drop works. 2014-05-03 14:00:30 +02:00
Marc Zinnschlag e0e2ad8316 content file loading progress bar 2014-05-03 13:01:29 +02:00
scrawl 7bddfc0025 Fix some spelling mistakes. 2014-05-03 12:23:22 +02:00
scrawl 122e606e30 Crime: improvement to arrest on sight for large bounties
iCrimeThreshold controls the needed bounty to have guards run to the player and force dialogue. In vanilla, the greeting dialogue is scripted to either arrest the player (< 5000 bounty) or present a death sentence and attack (>= 5000 bounty).
2014-05-03 12:17:44 +02:00
Marc Zinnschlag e09218f164 moved load code from Document to Loader class 2014-05-03 12:07:05 +02:00
scrawl 7331a64e34 Restore fix for Bug #875 (commit 602be9bbe7, was broken by 43757efdc4) 2014-05-03 11:33:20 +02:00
scrawl e7b9b6d87a Fix a confusing variable name 2014-05-02 23:07:01 +02:00
scrawl 1b074e5524 Call setAttacked even if the attack missed. Unsuccessful hits should also evoke a response. 2014-05-02 22:38:39 +02:00
scrawl df1694c27b Console autocompletion: List candidates when repeatedly pressing tab (bash-style) 2014-05-02 22:19:02 +02:00
scrawl 92467ba6bc Fix sunlight for interiors 2014-05-02 21:20:27 +02:00
Marek Kochanowicz 7f1df878f6 make getDropType static and public. 2014-05-02 20:28:28 +02:00
scrawl 58d868d56a Change default water setting (current fps is low enough as it is without this setting enabled) 2014-05-02 19:16:10 +02:00
Marc Zinnschlag 3abe4c1f16 Merge remote-tracking branch 'scrawl/master' 2014-05-02 13:11:44 +02:00
scrawl 8560b43464 Move to esm component 2014-05-02 12:48:07 +02:00
scrawl f8cc328b5e Slightly prettier backdrop when loading game from main menu. 2014-05-02 12:48:01 +02:00
scrawl 6381b1e938 Fixes #1309: Do not allow saving while dialogs are opened, just like vanilla
This limitation could be removed post-1.0 by serializing the state of open windows.
2014-05-02 11:20:43 +02:00
scrawl 17bb8d7f9a Fixes #1252: Add item/magic keybindings to savegame 2014-05-01 21:16:32 +02:00
Marek Kochanowicz c2b070f097 trying to do it right. 2014-05-01 19:17:33 +02:00
Marek Kochanowicz ea1aaef8ca replace paged with unpaged (and vice versa) 2014-05-01 18:25:28 +02:00
scrawl fc7e79027a Fixes #1144: Don't refreshCurrentAnims when adding already dead actors 2014-05-01 16:55:16 +02:00
scrawl 64a30ad182 Fix another leak 2014-05-01 16:55:16 +02:00
scrawl 6f7fbc867f Fix several leaks 2014-05-01 16:55:15 +02:00
scrawl f99eda1a54 Fixes #1302: Do not attempt to set OnPcAdd before the script has been added 2014-05-01 16:55:15 +02:00
scrawl 5415ca6a63 Fix exception when shift+click on empty space in save dialog 2014-05-01 16:55:15 +02:00
Marek Kochanowicz d00dbf47d5 working on worldspace drops 2014-05-01 15:09:47 +02:00
Sandy 36914b43d7 Remove install of License of no longer used font 2014-05-01 08:19:05 -04:00
Marc Zinnschlag ab94e70724 more cleanup of document setup 2014-05-01 13:04:48 +02:00
Marek Kochanowicz 57131332f4 fixing minor issues 2014-05-01 12:34:54 +02:00
Marc Zinnschlag 6a809064df Merge remote-tracking branch 'mrcheko/master' 2014-05-01 10:07:43 +02:00
mrcheko 9e79fb5b87 fix to broken aiwander logic 2014-05-01 11:41:25 +04:00
Marc Zinnschlag 634311c86c Merge remote-tracking branch 'mrcheko/master' 2014-04-30 22:45:26 +02:00
mrcheko e8f7d12c01 uninit bool and invalid iterator bugs fixes 2014-04-30 23:57:19 +04:00
Marek Kochanowicz 9e01a54d72 minor correction 2014-04-30 15:17:20 +02:00
Marek Kochanowicz 6aaa15b2e8 paged worldspace drop 2014-04-30 15:03:46 +02:00
Marek Kochanowicz 19dac9dc86 that would be it 2014-04-30 14:27:11 +02:00
Jeffrey Haines 5c9c467b26 Improved sneak. 2014-04-30 08:06:36 -04:00
Jeffrey Haines 14ebd8b110 Fixed logic in commit crime 2014-04-30 07:44:29 -04:00
Marek Kochanowicz 4d79f00e28 enable dragging on the region map cells 2014-04-30 13:32:54 +02:00
Thomas 10a5bb9464 Made code a bit more standardized and added a good bit of documentation. 2014-04-29 23:40:59 -04:00
Marek Kochanowicz eeb18b533e moved editlock to the dragrecordtable 2014-04-29 21:41:57 +02:00
Marc Zinnschlag 0c2843b0f7 some missing cleanup 2014-04-29 19:56:33 +02:00
Marek Kochanowicz d376efe30b handle dragging not-existing records 2014-04-29 19:34:06 +02:00
Thomas 8f90dd43ec Changed things to use typedef ScriptARgs/ScriptReturn, which makes finding out what those weird strings meant much much easier 2014-04-29 12:52:08 -04:00
Marc Zinnschlag 9a1b5dc1c6 a bit of cleanup 2014-04-29 15:32:00 +02:00
Marc Zinnschlag f6a876bc3d added actor ID 2014-04-29 15:27:49 +02:00
cc9cii 7d990abd37 OpenCS changes to allow compilation with MSVC 11.0. 2014-04-29 22:46:55 +10:00
Marc Zinnschlag 8dc6ad5059 moved new flag from setupData function to Document constructor 2014-04-29 14:27:44 +02:00
Marc Zinnschlag 5f1d2f72f6 added basic loading GUI 2014-04-29 14:17:25 +02:00
Marc Zinnschlag 2906ade531 string fix 2014-04-29 13:16:58 +02:00
Marc Zinnschlag 4eeed4e2c7 Merge remote-tracking branch 'scrawl/return' 2014-04-29 12:27:27 +02:00
Marek Kochanowicz 18fc8acc71 able to drag existing cells from the regionmap 2014-04-29 12:27:26 +02:00
Marek Kochanowicz 853abb65c3 added new, later common, base for the regionmap and the table 2014-04-29 11:44:21 +02:00
scrawl 28ef236f0e Don't allow setting a new return position if there already is one and we haven't reached it yet 2014-04-29 11:17:07 +02:00
Marc Zinnschlag 8fea2cfa2a Merge remote-tracking branch 'mrcheko/master' 2014-04-29 10:03:29 +02:00
scrawl 1fd7a07b5e Merge branch 'master' of https://github.com/OpenMW/openmw into return
Conflicts:
	apps/openmw/mwmechanics/aisequence.cpp
	apps/openmw/mwmechanics/aiwander.cpp
2014-04-29 09:14:13 +02:00
scrawl 9b36a13821 Feature #1289: NPCs return to default position
Make stationary NPCs return to their previous position once combat/crime AI finishes.
2014-04-29 09:09:51 +02:00
scrawl 3780503275 Removed quicksave/quickload message boxes, now that the same text is shown in the progress bar 2014-04-29 07:07:03 +02:00
Marc Zinnschlag 3013c34d9b Merge remote-tracking branch 'scrawl/master' 2014-04-28 21:46:05 +02:00
scrawl 7a0aeeaa38 Allow to delete savegames (shift + click) 2014-04-28 20:57:45 +02:00
scrawl 7f37f2c2be Fixes #1187: Make GetDistance handle actors in remote cells gracefully 2014-04-28 19:23:25 +02:00
Marc Zinnschlag 2e7b4e798e Merge remote-tracking branch 'digmaster/master' 2014-04-28 19:22:54 +02:00
Lars Söderberg d530bbe5cd Implemented Scrawls alternative workaround. 2014-04-28 18:52:53 +02:00
scrawl a35f7c73ae Fixes #1286 (Dialogue topic list clips with window frame)
The first problem was with the ScrollView skin, which had a full-sized client area. Since the scrollbar starts out visible, MyGUI expects the client area to be smaller to accomodate for the scrollbar width. As a result, the starting canvas size becomes bigger than the view size.
Another bug was with the MWList code: reducing the canvas size for the scrollbar is not needed, since MyGUI is already doing that, and attempting to do it manually interferes with the view offset.
2014-04-28 18:40:29 +02:00
scrawl 518a32c19d Fixes #1195: Make NPCs equip torches in interiors under certain conditions 2014-04-28 18:33:42 +02:00
Thomas 885228ec02 Merge remote-tracking branch 'upstream/master'
Conflicts:
	apps/openmw/mwmechanics/actors.cpp
2014-04-28 12:27:57 -04:00
Lars Söderberg 0513d0837c Alignment tweaks and autosized buttons workaround 2014-04-28 17:54:55 +02:00
Lars Söderberg 04e5b9c72c Right aligned version/revision
I've always felt that having the version/revision text at the bottom
center in the main menu was a bit out of place. A more common place for
this kind of thing is in one of the corners. I chose bottom right.

Aditionally I right aligned it and changed the v and r in version and
revision to capital letters.

Comments?
2014-04-28 16:23:07 +02:00
Lars Söderberg b0bdd233ee Center, switch and change text for confirmation buttons
The confirmation buttons for quitting or starting a new game were
driving me crazy by not being ok left and cancel right, as e.g. vanilla
is.

Then I noticed the text isn't the same as in vanilla either. It should
be yes/no, not ok/cancel.

To make it even more authentic I also centered the buttons. Had to
remove autosized buttons for this. I think it looks fine still.

Comments?
2014-04-28 16:05:27 +02:00
scrawl 84961d7843 Fixes #1254: PcRank should return first rank if not in the faction 2014-04-28 15:31:18 +02:00
scrawl b2119441b9 Fix bug in PcRank / PcNextRank
It was using the first faction instead of the actor's faction.
2014-04-28 15:26:40 +02:00
Marc Zinnschlag 421679b319 Merge remote-tracking branch 'scrawl/master' 2014-04-28 15:13:09 +02:00
scrawl 7e4a0c2478 Removed asserts 2014-04-28 15:00:52 +02:00
mrcheko 35c1724d39 unblock vertical aiming for combatants 2014-04-28 16:34:49 +04:00
scrawl 138fb4e29a Bug #1265: Fixed confirmation buttons align 2014-04-28 12:51:46 +02:00
scrawl 0796815da0 Ignore dead actors in getActorsFollowing/Fighting
Prevents dead enemies from disallowing resting near them
2014-04-28 11:44:56 +02:00
scrawl 27a05027f4 Fixes #1172: Added basic loading/saving progress bar
The progress is not particularly accurate. It simply uses the current / total number of records written/read as indication. Cell records are currently the largest by far, but there is a good chance that could be optimized using a change tracking system.
2014-04-28 11:29:57 +02:00
scrawl 4555f6ddf6 Add text shadow to progress bar labels 2014-04-28 11:19:12 +02:00
Marc Zinnschlag 0b2371a05d Merge remote-tracking branch 'thoronador/fix-minor-stuff' 2014-04-28 10:59:34 +02:00
Marc Zinnschlag af322a9f77 Merge remote-tracking branch 'scrawl/master' 2014-04-28 10:48:57 +02:00
scrawl 1da99d9fc7 Remove unused variable 2014-04-28 10:26:24 +02:00
scrawl b89463db09 Fix #1207: Remember previous choice in class creation dialog 2014-04-28 09:12:03 +02:00
scrawl 1da19585dc Remove some unneeded includes 2014-04-28 07:49:08 +02:00
Thomas dc54bd5a5f Merge remote-tracking branch 'upstream/master' 2014-04-27 20:56:45 -04:00
Thomas c2127845af Added onKnockdown command 2014-04-27 20:54:22 -04:00
Thoronador f69d61976e minor performance improvements in other apps subdirectories 2014-04-27 23:25:02 +02:00
mrcheko 22cdb166f2 warning fix, vars renaming 2014-04-27 22:38:04 +04:00
Thoronador 1b8c975d5b minor performance improvements in apps/openmw
Checking for emptiness using size() might be inefficient, because
it can take linear time, while empty() is guaranteed to take only
constant time.

For non-primitive types, postfix ++ operators are inefficient
compared to prefix ++ operators, because post-increment usually
involves keeping a copy of the previous value around.
2014-04-27 19:10:23 +02:00
Marc Zinnschlag ca097e146b Merge remote-tracking branch 'jeffreyhaines/master' 2014-04-27 17:35:10 +02:00
Jeffrey Haines edbc319c42 fixed logic. || 2014-04-27 10:05:34 -04:00
Jeffrey Haines 52bb7c3f69 fixed logic. ! 2014-04-27 09:55:38 -04:00
Jeffrey Haines 7599b26d30 Fixed: creatures won't witness crimes
and potential crash.
2014-04-27 09:37:43 -04:00
Jeffrey Haines 0409e18a0e revert 2014-04-27 09:35:49 -04:00
Jeffrey Haines b9bd4bc126 broken 2014-04-27 09:34:59 -04:00
Jeffrey Haines ce106d3bec Revert "NPCs detect crime exclusively"
This reverts commit 54d9615d85ae856ad4fdd2c130ac9cb0cd847c72.

Conflicts:
apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
2014-04-27 09:34:33 -04:00
mrcheko 82121e0401 some checks reworked 2014-04-27 16:59:21 +04:00
scrawl e42855d522 Minor fix for spell icon 2014-04-27 12:54:18 +02:00
mrcheko 6a3dddfb9a merge master 2014-04-27 13:49:31 +04:00
Marc Zinnschlag 85dbf393d2 Merge remote-tracking branch 'graffy76/master' 2014-04-27 11:44:15 +02:00
scrawl 3eb1e4e117 Fixes #1241: Removed disposition-based combat conditions
The information for this code came from UESP, which in turn cites a (extremely vague) section from the TES-CS help text, so no surprise that it wasn't accurate.

The guard on the boat has a fight rating of 70, so with the old code it would attack on sight if the disposition is low enough. BTB-Character.esp includes something (not sure what) that drops his disposition to 35 when playing as a Khajiit, making him attack.

Testing in Vanilla it appears that disposition has no effect on combat engagement at all. Even with disposition 0 and fight 70 the NPCs don't attack.

Setting an NPCs fight rating to 70 or less still has a meaning, because the higher it is, the easier it becomes to raise the fight rating to 80 (by taunting, for example).
2014-04-27 09:43:54 +02:00
scrawl dac0b7090a Get rid of bigbars.png and smallbars.png
Changed loading bar colour to match vanilla
2014-04-27 09:43:48 +02:00
scrawl 3161647809 Fix for not being able to pick up scrolls during combat
This is the behaviour I observed in vanilla morrowind.
2014-04-27 09:15:37 +02:00
scrawl 14757a856b Tweak settings window size and encumbrance bar text align 2014-04-27 08:17:14 +02:00
scrawl dd14dec8dc Tweak loading screen progress bar positioning to match vanilla 2014-04-27 08:16:35 +02:00
scrawl d92f95f5bf Fix a stacking issue 2014-04-27 06:08:15 +02:00
scrawl 93b76a603b Fixes #1100: Looting a corpse is no longer considered stealing 2014-04-27 06:08:08 +02:00
graffy76 985af15a12 removed qdebug references 2014-04-26 21:43:59 -05:00
graffy76 0d711e51b0 Converted SettingType enums to indicate widget type. 2014-04-26 21:32:36 -05:00
scrawl e8210c92c6 Fixes #1240: Don't hardcode drowning time 2014-04-27 04:27:26 +02:00
graffy76 b94466dbb4 Merge branch 'master' of https://github.com/OpenMW/openmw
merge
2014-04-26 21:24:02 -05:00
cc9cii 1fb2c8d87b NPC turning is less hacky but still not perfect. NPC's should walk away after a period of non-action by the player (vanilla behaviour) - not yet implemented. 2014-04-27 07:38:31 +10:00
Thomas c2b692e124 getActorsFollowing/Fighting no longer returns dead actors 2014-04-26 17:21:53 -04:00
mrcheko dbe1307de0 code refining + minor fixes 2014-04-26 22:21:20 +04:00
Marc Zinnschlag 5e7cd806c4 Merge remote-tracking branch 'scrawl/master' 2014-04-26 18:05:04 +02:00
scrawl 04964595ef Fixes #1270, Fixes #1201: Update active weapon/spell icons every frame 2014-04-26 16:44:20 +02:00
graffy76 ab33e78b67 Added RangeView class files 2014-04-26 09:40:58 -05:00
Jeffrey Haines 13416a3501 Merge pull request #1 from OpenMW/master
merge into my branch
2014-04-26 10:10:17 -04:00
Jeffrey Haines b28dfa94cd Revert 4a4c089..f0c5d1a
This rolls back to commit 4a4c08946c.
2014-04-26 10:07:56 -04:00
Jeffrey Haines f0c5d1a7e1 Revert "Checks the state of the passed sneak variable"
This reverts commit 4a4c08946c.
2014-04-26 10:03:56 -04:00
scrawl d5dd864404 Fixes #1236: Disable all controls while playing movie 2014-04-26 14:33:45 +02:00
Jeffrey Haines 48b2c0073b fix, sorry for being sloppy.. 2014-04-26 08:29:28 -04:00
Jeffrey Haines afe624bd07 Cleaned up update in Actors.cpp
Removed unnecessary for loops
2014-04-26 08:12:57 -04:00
scrawl 30666f2cce Fixes #1297: Store global map markers in savegame 2014-04-26 13:42:32 +02:00
Marc Zinnschlag ddb0496dca replaced return value of removeDocument with a signal 2014-04-26 13:11:27 +02:00
scrawl f921f2e7db Make PcRaiseRank, PcLowerRank and PcJoinFaction properly accept references instead of using the actor that the player talked to last.
This also solves a potential crash when no actor has been talked to yet, e.g. immediately after loading a savegame.
2014-04-26 12:04:37 +02:00
scrawl ef39b0f6ab Fixes #1291: Faction rank saving issue
A value of 0 is the first rank, -1 means not a member
2014-04-26 11:41:44 +02:00
scrawl 45d2a00717 Fixes #1293: Allow interpolation type 0 in case of 0 keys 2014-04-26 11:36:27 +02:00
scrawl b13b25dd1b Fixes #1295: Support partial matches in Cell filter 2014-04-26 11:03:17 +02:00
scrawl 6eca5ac4bb Fixes #1296: Streamlined cellChanged detection 2014-04-26 07:46:19 +02:00
scrawl cd1b4218e7 Fix dynamically placed objects being discarded when loading game 2014-04-26 05:01:26 +02:00
scrawl f05606657c Correctly insert pasted text at cursor position 2014-04-26 05:01:26 +02:00
scrawl 91e50585ff AiWander: make sure to walk, not run 2014-04-26 05:01:26 +02:00
scrawl 5b011e43a7 Fix a crash after loading game 2014-04-26 05:01:26 +02:00
mrcheko f3626adc86 remake of z-moving in combat for flying/swimming enemies 2014-04-26 00:20:55 +04:00
Marc Zinnschlag 42b332775a removed some debug statements 2014-04-25 15:30:46 +02:00
Marc Zinnschlag c63d6437c0 Merge remote-tracking branch 'jeffreyhaines/master'
Conflicts:
	apps/openmw/mwbase/mechanicsmanager.hpp
2014-04-25 15:29:23 +02:00
Marc Zinnschlag 837fd2a4c6 Merge remote-tracking branch 'graffy76/master' 2014-04-25 15:11:19 +02:00
graffy76 2e06414b43 Fixed broken delegate display modes (Display Format settings). Moved
UserSetting update functions to DataDisplayDelegate.
2014-04-25 07:16:40 -05:00
Marc Zinnschlag 1f6ed584c2 Merge remote-tracking branch 'digmaster/master'
Conflicts:
	apps/openmw/mwstate/statemanagerimp.cpp
2014-04-25 08:39:40 +02:00
Jeffrey Haines 4a4c08946c Checks the state of the passed sneak variable 2014-04-24 23:02:11 -04:00
Thomas f3272c941f Fix for bug #1080, can't read/repair/make potions/use soul gems/rest/sleep while in combat.
The radius for being in combat with the player is fAlarmDistance, which looked like the only pertinent thing.
2014-04-24 22:47:45 -04:00
Jeffrey Haines 42b879a9a5 Reworked the accusation of actors 2014-04-24 22:41:05 -04:00
Jeffrey Haines c3e08916da Sneak: Added support for state checking
I need advice one what I should do in order to pass mActors over to the
player. Particularly line 139 in player.cpp
2014-04-24 20:40:17 -04:00
graffy76 3f2ae950f5 Disabled view resize for open views when user setting changes. Fixed
new view size issue to match existing user settings.
2014-04-24 12:50:10 -05:00
Marc Zinnschlag dbb192f084 moved loading to a separate thread 2014-04-24 15:09:25 +02:00
Marc Zinnschlag 9db9ad410d fixed checks for allowing load/save and some general cleanup 2014-04-24 10:14:17 +02:00
Marc Zinnschlag 760c8c7214 removed a redundant include 2014-04-24 09:56:51 +02:00
Marc Zinnschlag 42b3233bda removed a redundant check 2014-04-24 09:54:47 +02:00
Thomas 5b681e2199 Moved quickload to statemanager for consistency's sake, as well as make autosave only occur on sleep, not wait. 2014-04-24 03:14:47 -04:00
Thomas 05b21c92af Moved quick save into statemanager class. Kept loader as is as it's rather specalized. 2014-04-24 03:06:36 -04:00
Thomas 6a8bf71c4c Moved autosave to before you rest, not after it. 2014-04-23 23:33:57 -04:00
Thomas a598060071 Added autosave on rest, as well as an option in the settings menu 2014-04-23 23:12:30 -04:00
Thomas 682c395488 Apparently a normal save must exist for some reason, calling for a character to be made doesn't cause the signature to be created, and I don't know how to force create the signature (It's kinda driving me nuts) 2014-04-23 21:39:25 -04:00
Thomas 49620968b9 Disallowed quicksave/load in character creation 2014-04-23 21:21:11 -04:00
Thomas e873135da7 Missed a debug message 2014-04-23 21:04:52 -04:00
Thomas f90810223a Added quicksave and quickload 2014-04-23 21:02:09 -04:00
graffy76 ce56669339 Fixed failed signal/slot connection between UserSettings and
CSVWorld::SubView
2014-04-23 17:02:37 -05:00
Thomas ee581f593b Fixed issue which may occur if there's no evidence chest nearby 2014-04-23 13:20:43 -04:00
Thomas f6deca7c80 Fixed various issues caused by late-night coding. Also added "unlock" message to unlocked doors 2014-04-23 13:02:51 -04:00
Thomas 61341d4206 Removed mLocked, kept it as "Negative lock level means unlocked" 2014-04-23 10:00:18 -04:00
graffy76 8c6c70ee9c Merge branch 'master' of https://github.com/graffy76/openmw 2014-04-23 07:05:34 -05:00
Thomas 6022ffbd1f Evidence chest now locks when new evidence is added to it 2014-04-23 05:54:18 -04:00
Thomas 420163d35f Small changes to lock command (If no valid lockLevel exists, defaults to 100) 2014-04-23 05:19:34 -04:00
Thomas cac8e52154 Seperated locked and lock level, to allow for relocking doors to previous lock level.
The data is stored in the esm as -lockLevel if unlocked; lockLevel if locked. While not tested, it should not present any problems.
2014-04-23 05:12:07 -04:00
Thomas e71a119c23 Made aifollowers run when long distances (800 or 10000, depending) from what they're following. 2014-04-23 02:57:48 -04:00
graffy76 4b607d658f Re-link user settings to editor main application 2014-04-22 22:19:53 -05:00
graffy76 e3384e3999 relocate support.hpp / remove support.cpp 2014-04-22 22:19:03 -05:00
graffy76 331df17b48 Added new framework files 2014-04-22 22:17:19 -05:00
graffy76 d3148555fa Delete old framework files 2014-04-22 22:16:14 -05:00
mrcheko fbd0ffe86f enable z-moving for flying/water combatants 2014-04-22 22:59:39 +04:00
Marc Zinnschlag 6ecee55209 Merge remote-tracking branch 'scrawl/master' 2014-04-21 18:10:38 +02:00
Marc Zinnschlag 1ab51306c3 updated credits file 2014-04-21 17:47:20 +02:00
scrawl 9998c2783e Fix travis
Why again do we need a unit test for something that was never used?
2014-04-21 17:37:06 +02:00
Marc Zinnschlag e324450118 replaced return value of DocumentManager::addDocument with a signal 2014-04-21 09:02:58 +02:00
scrawl 6929e541dd Fix texture name issue with Vality's Bitter Coast Mod 2014-04-21 05:30:14 +02:00
scrawl 2cb9f38a45 Changed crime IDs for legacy savegames. Not an issue, but it was inconsistent. 2014-04-20 19:34:58 +02:00
scrawl 262e959699 Remove unused slice_array 2014-04-20 19:28:39 +02:00
scrawl 79f32546e1 Dead link fix 2014-04-20 19:28:25 +02:00
mrcheko f811abb752 pathgrid shortcutting extended 2014-04-20 20:35:07 +04:00
Marc Zinnschlag 86bd2f48dc removed an unused function 2014-04-20 17:28:10 +02:00
Marc Zinnschlag 0eed697f9a Merge remote-tracking branch 'digmaster/master' 2014-04-20 13:36:39 +02:00
Marc Zinnschlag a91b386381 Merge remote-tracking branch 'jeffreyhaines/master' 2014-04-20 13:34:58 +02:00
cc9cii 6a1435c49e Remove rotation check that was freezing NPC's. 2014-04-20 17:59:08 +10:00
cc9cii e17fab891d Suppress travis warning and one more tweak. 2014-04-20 16:49:57 +10:00
Thomas Luppi d6f1f129eb Forgot to capitalize something. whooooops
dat y do
2014-04-20 00:39:50 -04:00
Thomas Luppi 95ef874205 Gets default keybindings from scancode, not keyvalue.
Gives keyboard set-up independant default keybindings; useful for
international keyboards or dvorak users
2014-04-20 00:34:58 -04:00
cc9cii 2b544d550b Fixed the rotation animation glitch. 2014-04-20 14:27:18 +10:00
cc9cii 000afa48b7 An attempt at making turning animation smoother. Copied some code from AiCombat for rotation. 2014-04-20 11:59:47 +10:00
cc9cii 3d26702f5e Make idle actors face the player. Turning animation is not smooth. 2014-04-20 10:36:01 +10:00
cc9cii 9bd31b6236 Added reaction time and moved game setting variables init to the constructor. 2014-04-20 10:06:03 +10:00
Jeffrey Haines 3484df0743 Fixed garage value found in beta's static analysis
Source: https://forum.openmw.org/viewtopic.php?f=6&t=2059#p23844
2014-04-19 19:42:49 -04:00
Jeffrey Haines 6733a1541e Fixes to Crime System
Victimless crimes were removed because victims may not exist in the
case of stealing items.

Is class now uses case insensitive comparison.

Fixed issue with confiscation of stolen items.
2014-04-19 19:03:31 -04:00
cc9cii 3dfd08cf2d Cleanup and little tweaking. 2014-04-20 08:31:02 +10:00
cc9cii 479a94b35d Backing off closed doors working, needs cleanup and tweaking. 2014-04-20 08:14:54 +10:00
Marc Zinnschlag 7eb6a2e52d Merge remote-tracking branch 'scrawl/alarm' 2014-04-18 16:19:28 +02:00
Marc Zinnschlag 34092f9f5d Merge remote-tracking branch 'scrawl/master' 2014-04-18 15:08:30 +02:00
Marc Zinnschlag f67b8f2d9d Merge remote-tracking branch 'scrawl/crime_savegame' 2014-04-18 15:07:56 +02:00
scrawl a3dffd5d57 Add some missing SDL to MyGUI key translations.
Most importantly to allow numpad enter as alternative to return key.
2014-04-18 14:13:29 +02:00
scrawl b3916e7744 Crime: mark witnesses as alarmed.
Fixes guard dialogue to properly detect if the player turned himself in.
2014-04-18 13:44:09 +02:00
scrawl d3d0b7362f Fix older savegame compatibility regarding new crime feature. 2014-04-18 12:34:26 +02:00
scrawl 4625adfb7f Fix typo in a condition. 2014-04-18 11:43:37 +02:00
cc9cii 7437647f70 Forgot to add a guard :-( 2014-04-18 16:45:31 +10:00
cc9cii a0fc514df7 Suppress compiler warning. 2014-04-18 15:45:39 +10:00
cc9cii c652cb1568 More cleaning up. 2014-04-18 15:19:22 +10:00
cc9cii 2447f0f4aa Cleaned up logging statements. 2014-04-18 14:41:44 +10:00
cc9cii aad13d315c Fixed issue where allowed nodes were being erased. PathFinder was returning an empty path if the closest pathgrid point to the start was also the closest pathgrid point to the goal. Still need to clean up and remove logging statements. 2014-04-18 14:41:44 +10:00
cc9cii d3be725ee7 Actors are moved on if idling near a closed interior door. Unreachable pathgrid points due to a closed door are removed from the allowed set of points. 2014-04-18 14:41:43 +10:00
cc9cii 1ceeeb4a22 Fix movement glitches for actors with low speeds (e.g. a rat). Was caused by false detection of being stuck. 2014-04-18 14:41:43 +10:00
Marc Zinnschlag 65161c3e24 Merge remote-tracking branch 'sirherrbatka/less-signals' 2014-04-16 10:22:20 +02:00
Marc Zinnschlag ce33912980 Merge remote-tracking branch 'sirherrbatka/AngryFix' 2014-04-16 10:21:59 +02:00
Marc Zinnschlag a7cece3d30 do not generate modfiy commands on edits to change a cell to a value equal its original value before the edit 2014-04-15 22:34:15 +02:00
Marek Kochanowicz 8fba71101c removed signals 2014-04-15 20:39:19 +02:00
Marek Kochanowicz fc1837e2ed fixed bug: regions can be dragged
ps
fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
2014-04-15 19:26:43 +02:00
Marc Zinnschlag 30d5040f2f Merge remote-tracking branch 'cc9cii/Bug-No-1260' 2014-04-15 15:26:58 +02:00
cc9cii 1fc030653f Avoid hard coding "thief.dds" string. 2014-04-15 22:30:41 +10:00
Marc Zinnschlag 86e65944b8 Merge remote-tracking branch 'jeffreyhaines/master'
Conflicts:
	apps/openmw/CMakeLists.txt
2014-04-15 11:31:48 +02:00
Jeffrey Haines e2fab228f9 Save state is handled correctly now. 2014-04-14 18:11:04 -04:00
mrcheko 4e7ee97050 fix for windows builds 2014-04-14 17:18:29 +04:00
cc9cii 89be1069a7 Bug #1260: show thief.dds image for a custom class level up menu 2014-04-14 18:31:46 +10:00
Marc Zinnschlag 71068ae3ad Merge branch 'regionmap' 2014-04-13 17:24:08 +02:00
Marc Zinnschlag d188e68227 added f-type hint to TableSubView 2014-04-13 16:40:41 +02:00
Marc Zinnschlag 097c063b8a added 'view in table' action to region map 2014-04-13 16:40:16 +02:00
Marc Zinnschlag 2eca9e72fd added view action to region map 2014-04-13 15:46:31 +02:00
Marc Zinnschlag 1892550833 added set/unset region actions to region map 2014-04-13 15:32:49 +02:00
Marc Zinnschlag fc4195a88f added create cell menu item to regionmap 2014-04-13 14:17:18 +02:00
Marc Zinnschlag 19b31c4146 always use the cell ID instead of the exterior coordinate fields from the original cell struct 2014-04-13 14:16:59 +02:00
Marc Zinnschlag decd4270d9 added CellId role to RegionMap model 2014-04-13 13:59:27 +02:00
Marc Zinnschlag e520dcd62d Merge remote-tracking branch 'cc9cii/Bug-No-1271' 2014-04-13 13:24:09 +02:00
Marc Zinnschlag 300eb6f444 make FNAM sub-record optional for all record types 2014-04-13 13:23:50 +02:00
cc9cii 966ed46870 Better performance but less tolerant of collision induced glitches. Also had to use const_cast to cache on ground status. 2014-04-13 18:34:08 +10:00
cc9cii 3e6e325e5b Instead of hacking character.cpp, provide a more reliable check for world->isOnGround(mPtr). 2014-04-13 14:53:36 +10:00
cc9cii e9be6d3f42 Fix falling animation where vec.z is set to zero. 2014-04-13 11:34:59 +10:00
cc9cii 0bef754873 Fix jumping animation glitches caused by minor vertical movements. Should resolve Bug #1271. 2014-04-13 08:46:02 +10:00
Marc Zinnschlag 2f63eb7ca4 added missing edit lock for record reordering 2014-04-12 20:07:09 +02:00
cc9cii d2a41167d0 Allow flying and swimming creatures to step inclines. Should have listen to Chris in the first place, see https://forum.openmw.org/viewtopic.php?f=6&t=2075 2014-04-11 21:24:00 +10:00
Marc Zinnschlag d0ea23431c replaced CellIndex typedef with new CellCoordinates class 2014-04-11 10:06:16 +02:00
Marc Zinnschlag 0516d95253 added context menu with selection functions to region map 2014-04-10 22:12:09 +02:00
Marc Zinnschlag 7f12733463 Merge remote-tracking branch 'potatoesmaster/1071' 2014-04-08 21:08:59 +02:00
Emanuel Guevel 09bd0324c9 Fail properly when a content file is not found 2014-04-08 20:19:09 +02:00
Marc Zinnschlag d205d5f0af Merge branch 'cellselect' 2014-04-08 09:58:00 +02:00
Marc Zinnschlag e0550ba336 allow multiple cell coordinates in c-type hint for scene subviews 2014-04-07 15:23:14 +02:00
Marc Zinnschlag 0d352cb883 replaced rectangular cell selection with a CellSelection object 2014-04-07 14:16:02 +02:00
Marc Zinnschlag 67965ec10c added CellCoordinates and CellSelection classes 2014-04-07 13:44:43 +02:00
Marc Zinnschlag 324b2743d4 removed grid button (discarding the first attempt at a cell selector) 2014-04-07 10:21:26 +02:00
Marc Zinnschlag 03b3487f1b minor cleanup 2014-04-07 09:56:36 +02:00
Marc Zinnschlag fafb7501e3 Merge remote-tracking branch 'cc9cii/PathFinder-split' 2014-04-07 09:48:15 +02:00
Emanuel Guevel ce7aa96371 Fix visual glitch happening when closing inventory while sneaking
(bug #1255)
2014-04-06 22:21:28 +02:00
Marc Zinnschlag c7f2cfeca0 Merge remote-tracking branch 'gus/AIFix2' 2014-04-06 15:13:30 +02:00
Jeffrey Haines a274b48f2f States are saved. Crime is reacted to.
Issues where some crime is ignored. Needs a lot more work
2014-04-05 22:45:40 -04:00
Jeffrey Haines 940c88d2ec Cleaned up code, implemented crime ids
There is a problem with my game freezing. ToggleAi stops my character
2014-04-05 10:26:14 -04:00
Marc Zinnschlag 0fe67b586a increased scene toolbar button size 2014-04-05 13:16:13 +02:00
Jeffrey Haines df5cbe5dec Minor changes 2014-04-04 08:10:35 -04:00
cc9cii 28f7c42fb7 One more comment fix. 2014-04-04 18:17:42 +11:00
cc9cii f59226265a Remove redundant parameter from aStarSearch. Also update some comments. 2014-04-04 18:10:06 +11:00
Jeffrey Haines 70919ba60a Removed witnesses and minor changes 2014-04-03 16:13:14 -04:00
cc9cii 5cf8e7e933 Remove logging. 2014-04-04 06:16:26 +11:00
cc9cii 040d4f8fc4 Move PathgridGraph into separate files. 2014-04-04 06:13:47 +11:00
Jeffrey Haines 0c957a3cde Added witnesses to the mix 2014-04-03 14:53:31 -04:00
Marc Zinnschlag baf30ba292 added grid tool (does not work yet) 2014-04-03 14:44:48 +02:00
cc9cii a8b2eb1fe9 Make Travis happy. 2014-04-03 22:49:22 +11:00
Marc Zinnschlag 3a58da9ad7 size adjustment 2014-04-03 13:30:22 +02:00
cc9cii 325d0616bb Cleanup debug statements. 2014-04-03 22:17:45 +11:00
Marc Zinnschlag 5d422fec8a fixed scene toolbar layout problems 2014-04-03 13:00:19 +02:00
cc9cii 98f77714ce Per-cell pathgrid data and calculation moved off PathFinder. Now the edge cost calculations and strongly connected component searches are done only once per cell. Per-actor data and methods still remain with PathFinder.
This version still has debugging statements and needs cleaning up.
2014-04-03 21:43:44 +11:00
Jeffrey Haines b1abef7a38 Cleaned up code 2014-04-03 01:07:56 -04:00
Jeffrey Haines 58b135a2be Crime is now checked every frame call 2014-04-03 00:50:09 -04:00
cc9cii f597d3e88b Use duration rather than frame counts. Stops false detection of being "stuck" with high frame rates (e.g. indoors). 2014-04-03 07:46:26 +11:00
Jeffrey Haines 510f2d10ac Replaces broken code with todo 2014-04-02 14:20:33 -04:00
Jeffrey Haines 6f1211dd8d Moved mWitnesses into Player. resetCrime for paying fine. 2014-04-02 12:23:38 -04:00
Jeffrey Haines 7c0b51fb7e Ai pursue now controls guards pursuit of crimes
Should extend AiActivate in the future
2014-04-02 00:18:22 -04:00
Jeffrey Haines 50dac98a2b Feature 1154 & 73: Crime and NPC reactions 2014-04-01 20:24:25 -04:00
Jeffrey Haines 4037f3705e Feature 1154 & 73: NPCs react to crime 2014-04-01 14:15:55 -04:00
Marc Zinnschlag c9f9566623 Merge remote-tracking branch 'origin/master' 2014-04-01 18:45:25 +02:00
Marc Zinnschlag 6ee998ac38 updated credits file 2014-04-01 18:44:55 +02:00
scrawl 78d322e6a5 Revert "Temporary added broken CMakeLists.txt - Travis IRC notification test."
This reverts commit 529d2436b5.
2014-04-01 11:44:27 +02:00
Marc Zinnschlag 5b5069535e keep track of active cells in PagedWorldspaceWidget and update SubView title accordingly 2014-04-01 10:04:14 +02:00
Lukasz Gromanowski 529d2436b5 Temporary added broken CMakeLists.txt - Travis IRC notification test.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2014-03-31 22:14:12 +02:00
Lukasz Gromanowski db4975dab8 Changed IRC notifications for Travis CI from normal messages to IRC notices.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2014-03-31 21:52:20 +02:00
Marc Zinnschlag 12e46c5dc7 Merge remote-tracking branch 'megaton/master' 2014-03-31 10:24:12 +02:00
Marc Zinnschlag 4ee1069baa Merge remote-tracking branch 'scrawl/master' 2014-03-31 10:11:54 +02:00
scrawl f5810b8e1c Consider aspect ratio for loading screen background
More consistent with the main menu.
2014-03-30 23:07:49 +02:00
scrawl 1265131203 Set the selected index after all items are added (workaround for MyGUI bug) 2014-03-30 20:07:43 +02:00
megaton 50af9bc0d3 General perfomance optimizations. 2014-03-30 19:45:27 +04:00
cc9cii d04bb3befb MSVC uses C version of locale. 2014-03-30 17:23:22 +11:00
Jeffrey Haines 8ce938c6f1 Revert 6b28c06..98fd381
This rolls back to commit 6b28c06b2c.
2014-03-29 22:26:53 -04:00
Jeffrey Haines 98fd381564 Feature #1154 Not all NPCs get aggressive when one is attacked
Compiling fix
2014-03-29 21:25:20 -04:00
Jeffrey Haines 6c866deb1b Feature #1154 Not all NPCs get aggressive when one is attacked
Partially implemented
2014-03-29 21:23:34 -04:00
scrawl 5eeed03f5b Only exchange bribe gold if the bribe was accepted 2014-03-30 00:12:31 +01:00
scrawl 72df9e77c6 Don't show version text in the pause menu 2014-03-30 00:07:32 +01:00
gus d9ea7107b7 compile fix. 2014-03-29 18:36:32 +01:00
gus bee057346b Merge branch 'master' of https://github.com/OpenMW/openmw.git into AIFix2
Conflicts:
	apps/openmw/mwmechanics/aifollow.cpp
2014-03-29 18:05:56 +01:00
Sebastian Wick 512ee1204e fixes a bug when resizing the window before a window listener is set 2014-03-29 15:49:48 +01:00
Marc Zinnschlag adab85eeb7 Merge remote-tracking branch 'jeffreyhaines/master' 2014-03-29 13:29:06 +01:00
Jeffrey Haines 6b28c06b2c Feature #1233 Bribe gold in inventory - Corrected 1000 drake bribe 2014-03-29 07:47:41 -04:00
Jeffrey Haines ad9286a30f Revert "Revert "made mReceiver private""
This reverts commit 33aecc5218.
2014-03-29 07:45:56 -04:00
Jeffrey Haines 33aecc5218 Revert "made mReceiver private"
This reverts commit 3e8f7b3bae.
2014-03-29 07:45:36 -04:00
Marc Zinnschlag c7b969821f silenced a warning 2014-03-29 11:11:43 +01:00
Marc Zinnschlag 27095f3edb Merge remote-tracking branch 'cc9cii/AiWander-improvements' 2014-03-29 11:08:51 +01:00
cc9cii ebb1813b9b Minor comment clarification. 2014-03-29 20:17:04 +11:00
cc9cii 07fd801d94 My previous analysis of the pathfinding issue was incorrect. It was in fact caused due to some of the pathgrid points being unreachable. Instead of returning an empty path in such a scenario, incorrect path + requested destination were being returned. There was also a defect where past cost was being used for selecting open points.
There is still an unresolved issue where mGraph and mSCComp are being rebuilt unnecessarily.  The check mCell != cell in buildPath() is being triggered frequently. Not sure why.
2014-03-29 19:35:52 +11:00
cc9cii 267855c44e Prevent NPC suicides off silt the strider platform in Seyda Neen. Added some comments as well. There may be opportunities for some optimization but left that out for now. 2014-03-29 19:35:52 +11:00
cc9cii 90a813ad2c Allow interrupting a walking NPC to trigger a greeting. 2014-03-29 19:35:52 +11:00
Marc Zinnschlag 04baa4a573 Merge remote-tracking branch 'jeffreyhaines/master' 2014-03-29 08:14:04 +01:00
Jeffrey Haines 3e8f7b3bae made mReceiver private 2014-03-29 02:59:47 -04:00
Jeffrey Haines 13d330e427 Feature #1233 Bribe gold not in inventory
Gold is now put into inventory receivers when bribing.
2014-03-28 21:16:42 -04:00
Marc Zinnschlag 86e5179fd8 Merge remote-tracking branch 'jeffreyhaines/master' 2014-03-28 22:40:12 +01:00
Jeffrey Haines 9efef31bb8 Feature #953 Trader Gold - Unused code/warning resolved
Removed unused code
getBaseGold throws proper error
2014-03-28 17:27:23 -04:00
Marc Zinnschlag c38812d026 Merge remote-tracking branch 'jeffreyhaines/master' 2014-03-28 19:34:40 +01:00
Jeffrey Haines 401d21b4ee getBaseGold implemented in MWWorld::Class for NPC and Creature
Implemented a getBaseGold() to get the vendor gold base
NPC gold base now can come from mNpdt12 and mNpdt52
2014-03-28 14:21:38 -04:00
Jeffrey Haines 895748f18d Gold Pool implemented for Vendors
It appears that my solution breaks persuasion gold for some reason. I
may be wrong. I can’t see where this could be happening as the files
I’ve changes should not affect persuasion at all.
2014-03-28 12:01:56 -04:00
Marc Zinnschlag 2c2106205d Merge remote-tracking branch 'scrawl/master' 2014-03-28 09:56:35 +01:00
scrawl d7df9cae21 Bug #1224: Changed fix to potentially allow for language independent saves 2014-03-27 22:32:42 +01:00
scrawl ea357cfed0 Fix crash when resizing while company logo is playing 2014-03-27 20:39:56 +01:00
scrawl 4f852daf45 Don't play company logo when using --skip-menu 2014-03-27 19:59:33 +01:00
scrawl f2cd37edd0 Play company logo movie 2014-03-27 19:51:48 +01:00
scrawl 5906d795c0 Refactored video player (now a MyGUI widget) 2014-03-27 19:10:15 +01:00
Marc Zinnschlag 7026a0ceee updated credits file 2014-03-27 15:46:49 +01:00
scrawl 2e4ef93b28 Add proper main menu (background image, logo animation, title music) 2014-03-27 15:25:01 +01:00
Marc Zinnschlag 5c81f20f46 Merge remote-tracking branch 'rohitnirmal/load-weap-icon' 2014-03-27 14:57:55 +01:00
Marc Zinnschlag ce792cf182 Merge branch 'light' 2014-03-27 14:39:40 +01:00
Marc Zinnschlag 50f1679a4c Merge remote-tracking branch 'jeffreyhaines/master' 2014-03-27 13:40:06 +01:00
Jeffrey Haines 6896142db1 Trader Gold Reset Delay
Trade Time initialized to 0
Gold pot set correctly for npc’s and creatures
2014-03-27 07:30:24 -04:00
Marc Zinnschlag 53c4878d52 fix for inconsistent case in topic records 2014-03-27 10:01:42 +01:00
Jeffrey Haines 2a8bf46607 Trader Gold Reset Delay
Implemented traded gold reset delay.

Note:
Traders gold pool is still in inventory.
2014-03-27 01:23:56 -04:00
Rohit Nirmal e695890e01 Only update the icon if player is NOT unarmed, to avoid bad dereference. 2014-03-26 21:53:35 -05:00
Rohit Nirmal bcacdc49af Update weapon icon in HUD when save is loaded. 2014-03-26 21:08:31 -05:00
scrawl 27956f3624 Savegame dialog: Hide main menu after successful load 2014-03-27 02:36:21 +01:00
scrawl 0e78ffe8c0 Add option to disable SDL's "minimize on focus loss" in fullscreen 2014-03-27 00:10:46 +01:00
scrawl e5e1e84c52 Ask for confirmation to exit OpenMW 2014-03-26 22:05:21 +01:00
scrawl a5598e9c2e Add Credits button to main menu (plays mw_credits.bik) 2014-03-26 21:38:57 +01:00
scrawl 23f4bbc5b0 Videoplayer: only pause previous sounds if there is an audio stream 2014-03-26 21:36:57 +01:00
scrawl 5562c78ac4 Ask for confirmation when selecting 'New Game' 2014-03-26 21:11:39 +01:00
scrawl ecfaa41e93 Savegame dialog: use locale-aware datetime format 2014-03-26 20:56:39 +01:00
scrawl 53ba23e303 Fixes #1224: Store class name instead of id in savegame header 2014-03-26 19:56:12 +01:00
scrawl 793649c854 ToggleAI: Report current status on toggle 2014-03-26 19:55:52 +01:00
scrawl 688415ce54 Play deathknockout/deathknockdown animations when appropriate 2014-03-26 18:55:16 +01:00
Marc Zinnschlag ed524b2fd4 added bright lighting mode 2014-03-26 18:29:15 +01:00
Marc Zinnschlag 9746f8bd32 added night lighting mode 2014-03-26 17:59:42 +01:00
Marc Zinnschlag fa29942b27 added day lighting mode 2014-03-26 17:47:56 +01:00
Marc Zinnschlag 235dbdf18e updated credits file 2014-03-26 17:07:43 +01:00
Marc Zinnschlag d5506172e8 added lighting switching 2014-03-23 15:14:26 +01:00
Marc Zinnschlag 205354ba30 some ambient light cleanup 2014-03-23 13:40:56 +01:00
Marc Zinnschlag 1b6b4e3442 Merge remote-tracking branch 'slothlife/weather_save' 2014-03-23 08:36:45 +01:00
cc9cii 772a49b2a6 Just some notes for future maintenance. 2014-03-23 13:38:11 +11:00
scrawl 0a17245633 Refactored settings window 2014-03-22 19:02:14 +01:00
scrawl 452b522bc3 Fix typos 2014-03-22 19:01:41 +01:00
Marc Zinnschlag 87ae03b5d4 fix for previous commit 2014-03-22 16:39:24 +01:00
Marc Zinnschlag 6bd3b3ee78 include local variable state in saved games 2014-03-22 15:00:49 +01:00
Marc Zinnschlag 4d80bc009a Merge remote-tracking branch 'scrawl/master' 2014-03-22 09:54:42 +01:00
scrawl 0c207f7212 Fix build error 2014-03-22 02:08:09 +01:00
scrawl 394284d0f8 Fixes #1209: Tarhiel never falls
There are a few pitfalls with this code:
 - Gravity is only considered when applying queued movement. Therefore, make sure to queue some movement every frame. (Could be refactored in the future?)
 - The character controller never detects being in free fall (!World::isOnGround) unless movement has been applied.
2014-03-22 02:08:04 +01:00
Alexander "Ace" Olofsson 317f1e0b63 Update dialoguesubview.cpp
That doesn't work on Windows. (Are and/or allowed in C++ in any other compiler?)
2014-03-21 13:44:01 +01:00
Marc Zinnschlag 41fd94b160 compensated for different coordinate systems 2014-03-21 13:39:22 +01:00
Marc Zinnschlag 1e57d55717 update/close on deletion of reference/referenceable 2014-03-21 13:27:46 +01:00
Marc Zinnschlag 698fe8cce3 update preview title on changed referenceableID (preview for references only) 2014-03-21 12:52:46 +01:00
Marc Zinnschlag 58daf52a67 deal with empty and invalid referenceable ID fields 2014-03-21 12:44:06 +01:00
Marc Zinnschlag 1a9df4bc56 Merge branch 'preview' 2014-03-21 12:35:40 +01:00
Marek Kochanowicz 2a26ff2299 better fix 2014-03-21 12:13:54 +01:00
Marc Zinnschlag fc8ae2b9b5 fixed encoding problems 2014-03-21 11:56:48 +01:00
Marc Zinnschlag 10ce47938b update preview on reference/referenceable changes 2014-03-21 11:22:43 +01:00
Marc Zinnschlag 2128d3008c Merge branch 'master' into preview 2014-03-21 08:12:06 +01:00
slothlife 6dce3e5186 Fixed include to use C99 header, not C++11 header 2014-03-21 01:33:11 -05:00
slothlife 00eac7d53a Fixed header include guard to match filename 2014-03-21 01:22:54 -05:00
slothlife 6eab9c5179 Move weather state save/load to a new class 2014-03-21 01:19:40 -05:00
Rohit Nirmal e3a9daf921 Play item sound when trying to sell a bound item, too. 2014-03-20 22:22:31 -05:00
Marc Zinnschlag 688e03a9d2 Merge remote-tracking branch 'sirherrbatka/Editor-Dialog' 2014-03-20 22:27:28 +01:00
Marek Kochanowicz fbb619db73 … 2014-03-20 21:41:11 +01:00
Marek Kochanowicz a692ce99fa where was my mind… 2014-03-20 20:26:53 +01:00
Marek Kochanowicz ccd5e549cd moved buttons down 2014-03-20 19:53:03 +01:00
Marek Kochanowicz 832a10b2ac solving problems 2014-03-20 18:40:10 +01:00
Marek Kochanowicz c9b8c69f03 reverted changes in the cmake 2014-03-20 15:14:37 +01:00
Marc Zinnschlag 1a1d52c513 fixed a column ID problem 2014-03-20 14:19:50 +01:00
Marek Kochanowicz 5c34823bb0 added some placeholder icons 2014-03-20 13:59:00 +01:00
Marek Kochanowicz ad2f9a69a1 prevent deleting already deleted record 2014-03-20 08:59:04 +01:00
slothlife 1acd1bd913 Feature #1173: Saved Game: include weather state
Removed some unused state in and changed Ogre::String to std::string in
WeatherManager.
2014-03-20 01:25:52 -05:00
Rohit Nirmal e4c4747a27 Play item sound even if merchant doesn't purchase it. 2014-03-19 20:08:01 -05:00
Alexander "Ace" Olofsson 7ed3effc92 Fix windows packaging issue now that the OFL license doesn't exist
anymore.
2014-03-19 12:01:53 +01:00
Marek Kochanowicz ea9b6fa37e view button 2014-03-19 12:01:36 +01:00
Marek Kochanowicz 8f3103ce65 added preview button 2014-03-19 11:43:25 +01:00
Marek Kochanowicz 6416ae90d2 Merge branch 'preview' of https://github.com/zinnschlag/openmw into Editor-Dialog
Conflicts:
	apps/opencs/CMakeLists.txt
	apps/opencs/view/world/subviews.cpp
2014-03-19 10:23:15 +01:00
Marek Kochanowicz 010160d047 missed those :/ 2014-03-18 20:56:55 +01:00
Marek Kochanowicz c0b2b783cb use more proper creators 2014-03-18 20:53:21 +01:00
Marek Kochanowicz f3475f7ef5 Merge branch 'master' of https://github.com/zinnschlag/openmw into Editor-Dialog 2014-03-18 19:24:10 +01:00
Marek Kochanowicz db774b02d7 clone and create buttons work 2014-03-18 09:36:22 +01:00
pvdk 5f71843e2c Updated credits.txt 2014-03-18 00:00:13 +01:00
Marek Kochanowicz 95afca0558 delete record button 2014-03-17 19:28:41 +01:00
Marek Kochanowicz 7296b09357 revert button 2014-03-17 19:18:18 +01:00
Marek Kochanowicz 09ba547630 use tool buttons with icons 2014-03-17 15:35:36 +01:00
scrawl 128a47570e One more fix 2014-03-17 14:15:52 +01:00
scrawl 4443e22387 Build fix 2014-03-17 13:32:13 +01:00
scrawl 9089df3080 Add unity build option
Each component and each MW-subsystem will be used as a single compilation unit.
2014-03-16 23:49:12 +01:00
scrawl c8c0e5de38 Fixed code issues found with unity build. Missing include guards, duplicated functions, ... 2014-03-16 23:49:06 +01:00
scrawl 49ef976b3d Remove reference to no longer used font 2014-03-16 23:30:45 +01:00
scrawl 81dfc26d26 mwscript/locals was added twice 2014-03-16 21:39:46 +01:00
Marc Zinnschlag 20ea859aac adjusted the far clip distance 2014-03-16 17:14:44 +01:00
sirherrbatka 3c8eeb8c48 added comment 2014-03-16 17:11:13 +01:00
Marc Zinnschlag 6b11265fbc consider scale and orientation when previewing reference 2014-03-16 17:06:45 +01:00
Marc Zinnschlag 48ea93d890 less random camera start position 2014-03-16 17:06:30 +01:00
sirherrbatka 4a0d1ba272 do not cast and check multiple times 2014-03-16 17:06:11 +01:00
scrawl b0a1e1198a Yet another terrain fix 2014-03-16 16:30:17 +01:00
Marc Zinnschlag fa042a8aca use proper title for reference prewview subviews (avoid internal ID) 2014-03-16 13:22:32 +01:00
Marc Zinnschlag 8b36de6c67 Merge remote-tracking branch 'cc9cii/Slaughterfish-fix' 2014-03-16 12:57:38 +01:00
Marc Zinnschlag afbdd84467 Merge remote-tracking branch 'cc9cii/AiWander-fix' 2014-03-16 12:47:30 +01:00
Marc Zinnschlag c36dfef972 prewview subview 2014-03-16 12:44:01 +01:00
cc9cii f71fb83bfc Cleaned up more inaccurate comments. 2014-03-16 20:56:11 +11:00
cc9cii f57c11254f Revert to original variable names. 2014-03-16 20:09:18 +11:00
cc9cii 22c544d9d7 Remove unnecessary comment. 2014-03-16 12:51:12 +11:00
cc9cii fdbd564700 Apparently fall trace needs to be done with the middle of the object. 2014-03-16 08:57:55 +11:00
cc9cii 43757efdc4 Feature #1030 - partial fix to stop creatures unable to walk/fly to come out of water. Does not necessarily handle situations where they are already out of water, however. 2014-03-16 08:09:14 +11:00
scrawl d08394bf78 Fixes #1205: apparently creature and hand-to-hand (health) attacks should also level up armor skill (tested in vanilla) 2014-03-15 21:00:25 +01:00
scrawl 61955111f1 Fixes #1204: Any health value < 1 should show as empty life bar. 2014-03-15 20:48:54 +01:00
scrawl 93c21b5ef2 Fixes #1197: incorrect mouse wheel step 2014-03-15 20:34:12 +01:00
scrawl 3880247017 Fixes #1206: effect texture override was not accounted for 2014-03-15 20:28:48 +01:00
scrawl cd0c283795 Add text shadow to version text for better readability 2014-03-15 15:14:59 +01:00
Marc Zinnschlag 2fdf80bcbf Merge remote-tracking branch 'gsedej/master' 2014-03-15 13:53:05 +01:00
cc9cii e6977d00e8 Oops. Fix typo picked up by Zini. 2014-03-15 08:16:35 +11:00
cc9cii b2e3fa70c2 Fix spelling errors in comments. 2014-03-14 07:04:39 +11:00
Marek Kochanowicz 4a623ace71 disabling works 2014-03-13 18:41:37 +01:00
Marek Kochanowicz c97172d89c fixed segfault and prevent drops from other documents 2014-03-13 17:00:14 +01:00
Marek Kochanowicz e1a4b64efb fixed segfault 2014-03-13 16:50:04 +01:00
cc9cii d54ae58ec9 Bug #900 fix - minor update to comments 2014-03-14 00:09:03 +11:00
cc9cii d92740efc9 Bug #900 fix - only fixed AiWonder, AiCombat, AiTravel and others may need a different strategy to this. 2014-03-13 23:44:52 +11:00
Marc Zinnschlag 7bc97fb8b8 reworked code for player positioning on startup and new game 2014-03-13 13:19:32 +01:00
Marek Kochanowicz dd755a00e4 fix for the bug (?) 2014-03-13 08:52:37 +01:00
Marek Kochanowicz cc1ceb35ce drag and drop works 2014-03-12 20:34:55 +01:00
Marek Kochanowicz fd4829141d succesfully connected the signals 2014-03-12 19:55:51 +01:00
Marek Kochanowicz 1bf67e7390 added the new qlineedit subclass 2014-03-12 19:36:46 +01:00
Marek Kochanowicz 30a0c82e22 this code segfaults, but i don't know why 2014-03-12 16:28:10 +01:00
Marek Kochanowicz 919065db32 fixed segfault 2014-03-12 16:06:59 +01:00
Marek Kochanowicz d1290ac556 skip deleled or erased records 2014-03-12 15:46:27 +01:00
Marek Kochanowicz 2278eb5e91 handle locking 2014-03-12 15:17:49 +01:00
Marek Kochanowicz 1a9d4204d2 correction 2014-03-12 15:07:17 +01:00
Gašper Sedej 43a12fffd5 indentation issue... 2014-03-12 14:37:44 +01:00
Marek Kochanowicz 2e226e63b6 change universalid of base subview after pressing next or prev 2014-03-12 13:04:40 +01:00
Gašper Sedej d72a2f1ffb Added code to test if git hash is availible 2014-03-12 12:33:42 +01:00
Marek Kochanowicz cb9bcc3cc1 buttons are functional 2014-03-12 12:25:37 +01:00
scrawl 0cd40294a2 Fixed ranged combat for creatures 2014-03-12 11:30:44 +01:00
Marek Kochanowicz 299b7a6ce6 Added buttons, they don't do anything. 2014-03-12 11:08:04 +01:00
Gašper Sedej 06e02ed77f Added version and revision number to mainmenu 2014-03-12 10:53:56 +01:00
Marek Kochanowicz 8d50af547a created editwidget 2014-03-12 10:39:28 +01:00
Marek Kochanowicz 865e6b52ae scroll area 2014-03-11 21:21:05 +01:00
Marek Kochanowicz 022e3fcaca reverting 2014-03-11 20:41:46 +01:00
Marek Kochanowicz c422dc6eed Refactorisation. 2014-03-11 20:40:31 +01:00
Marek Kochanowicz 81f32976e3 changes 2014-03-11 18:38:37 +01:00
Marek Kochanowicz 5ad572346b referencables also work now 2014-03-11 13:02:25 +01:00
Marek Kochanowicz 1edf5a4414 registered additional subviews. 2014-03-11 10:47:30 +01:00
Marek Kochanowicz 87286232d7 fixed bug, god bless overloading 2014-03-11 09:38:53 +01:00
Marek Kochanowicz a25271f0b6 moving bloat away from the dispatcher 2014-03-11 09:14:13 +01:00
Marc Zinnschlag ef1364878f moved test cube from SceneWidget to WorldspaceWidget 2014-03-10 18:35:49 +01:00
Marek Kochanowicz 17b521cec8 additional check 2014-03-10 17:57:40 +01:00
Marek Kochanowicz f4614c2c63 use qlabels for not editable fields 2014-03-10 17:52:45 +01:00
Marek Kochanowicz 089732419a introduce longString 2014-03-10 17:18:29 +01:00
Marek Kochanowicz cc96a38921 use qlinedit for the var 2014-03-10 13:27:52 +01:00
Marek Kochanowicz 874847c959 handle color 2014-03-10 13:25:01 +01:00
Marc Zinnschlag 7812427836 added Preview submenu item; fixed View issues regarding exterior cells 2014-03-10 12:44:34 +01:00
Marek Kochanowicz 73cb3ac0ed embelishing 2014-03-10 12:04:03 +01:00
Marek Kochanowicz 361bc55973 dont force trying display 2014-03-10 09:47:41 +01:00
Marek Kochanowicz 9ab920bd80 display id and other not editable data 2014-03-10 09:37:53 +01:00
Marek Kochanowicz b2fdaa74b0 trying to set the size policy 2014-03-09 18:44:04 +01:00
Marc Zinnschlag 2b17f5dde9 register resources locations on editor startup 2014-03-09 12:32:21 +01:00
scrawl a9dcc90970 Another terrain fix 2014-03-09 11:59:23 +01:00
Marc Zinnschlag 2de862126a moved resources group creation from Engine to bsa component 2014-03-09 11:42:39 +01:00
Marek Kochanowicz 7eb10756d4 some extra views enabled 2014-03-09 08:58:24 +01:00
scrawl 6eaa7553f8 Fixes #1181: Enable controls when loading a savegame 2014-03-09 03:34:49 +01:00
scrawl b8ca067730 Small fix for terrain 2014-03-09 03:21:34 +01:00
Sandy Carter 72a3c50eb8 (#1191) Disallow picking up if inventory disabled
Check if window manager has allowed the inventory window
if not, then items should not be possible to pick up
2014-03-08 13:45:54 -05:00
Marek Kochanowicz 0447be7e7a register extra views. do not display id 2014-03-08 17:24:00 +01:00
Marek Kochanowicz 1f1774b5e1 changing the enumdelegate seteditordata 2014-03-08 16:54:05 +01:00
Marek Kochanowicz 9612c6a6fd handle also bool boxes 2014-03-08 16:50:42 +01:00
Marek Kochanowicz 08ccae6b49 handle comboboxes 2014-03-08 16:21:49 +01:00
Marek Kochanowicz a8b11829d4 disable not editable widgets 2014-03-08 15:18:40 +01:00
Marek Kochanowicz 3c60345d6b nest wrapper into the proxy class 2014-03-08 15:15:00 +01:00
scrawl 072dc6d438 Feature #50: Implement marksman mechanics. 2014-03-08 06:03:45 +01:00
scrawl 12de0afb03 Feature #50: Spawn projectiles
Fix a bug in copyObjectToCell.
Make actor rotations more consistent.
2014-03-08 01:31:27 +01:00
Marek Kochanowicz 2e6b45dafb edit view, savind works 2014-03-07 22:17:40 +01:00
Marek Kochanowicz 020e3f8fc5 Merge branch 'master' of https://github.com/zinnschlag/openmw into dialogoue3 2014-03-07 17:16:38 +01:00
Marek Kochanowicz f0a45fa15f just saved progress 2014-03-07 17:15:43 +01:00
cc9cii f36bea03ab Bug #1189 fix by scrawl 2014-03-07 19:36:44 +11:00
Marek Kochanowicz b0ae78e889 basicly enabled code 2014-03-06 20:10:13 +01:00
Marc Zinnschlag f1353dc84f Merge branch 'scene' 2014-03-06 16:46:44 +01:00
Marc Zinnschlag 516a3b9abd close interior cell view when cell is deleted 2014-03-06 16:40:08 +01:00
Marc Zinnschlag 0254a209f6 some general cleanup 2014-03-06 13:51:21 +01:00
Marc Zinnschlag f04348fb8e do not offer view action for cells flagged as deleted 2014-03-06 13:43:06 +01:00
Marc Zinnschlag 4a119c8f46 ambient lighting in interior cells 2014-03-06 13:02:21 +01:00
Marc Zinnschlag 7e0f0c8402 fixed SceneWidget destructor 2014-03-06 12:42:09 +01:00
Marc Zinnschlag 397921e457 specialising WorldspaceWdiget into paged and unpaged subclasses 2014-03-06 10:13:39 +01:00
Marc Zinnschlag 7386d3eb0b moved navigation into the WorldspaceWidget 2014-03-06 10:01:23 +01:00
scrawl e08f6c9ce3 Bug #416: Copy framebuffer to a texture instead of not clearing
Potentially faster than the previous workaround, and should work for triple buffering too.
2014-03-06 04:01:25 +01:00
scrawl d0f98103e4 Terrain: re-added "distant land=off" path
Still a hack, but the overhead of building and traversing the quad tree appears negligible.
2014-03-06 03:04:23 +01:00
scrawl 83b6fcf22e Bug #416: Workaround for page flipping problem 2014-03-05 22:24:05 +01:00
scrawl 1d926816b5 Terrain: background load blendmaps & layer textures. Refactor QuadTree update. 2014-03-05 21:46:37 +01:00
scrawl 4328e08162 Terrain: get rid of unneeded members 2014-03-05 21:46:37 +01:00
scrawl 6a002d19b3 Terrain: destroy no longer used materials 2014-03-05 21:46:37 +01:00
scrawl 97c3efb3ba Terrain: decoupled Chunk from QuadTreeNode. 2014-03-05 21:46:37 +01:00
scrawl 2a4e99c069 Set StaticGeometry origin
Fixes an exception for coordinates far away from (0,0,0).
2014-03-05 21:46:37 +01:00
scrawl edb5a54092 Include some more required Ogre headers explicitely. 2014-03-05 21:46:37 +01:00
scrawl 195071efc7 Terrain: geometry is now loaded in background threads.
TODO: background load layer textures and blendmaps.
"Distant land" setting has been removed for now (i.e. always enabled).
2014-03-05 21:46:37 +01:00
scrawl b3fed853ae Terrain: take cell world size into account for LOD selection 2014-03-05 21:46:37 +01:00
scrawl 065b6d3331 Terrain: moved ESM::Land load to earlier in the startup procedure
Required for background loading as we cannot load ESM::Land data from background threads.
2014-03-05 21:46:36 +01:00
scrawl 6c863486e1 Terrain: fix an embarrassing copy&paste mistake. 2014-03-05 21:46:36 +01:00
scrawl 8730b61362 Render maps after *all* cells have finished loading
Still not fixing Bug #772, but at least this will allow for background loading of terrain.
2014-03-05 21:46:36 +01:00
scrawl 64c9932597 Terrain: remove hard dependency on shiny - can now be compiled without it (fixed function) 2014-03-05 21:46:36 +01:00
scrawl c9e349f60f Terrain: support alternate coordinate systems. Get rid of LoadingListener for now 2014-03-05 21:46:36 +01:00
Bret Curtis ab224f93c9 remove our stdint.h version that uses boost and force usage of system stdint.h 2014-03-05 17:08:58 +01:00
cc9cii 5539c75ef0 Typo fix to avoid divide by zero. 2014-03-05 22:12:59 +11:00
cc9cii ce8d327e8e Debug MSVC build of openmw needs number of sections beyond 2^16 2014-03-05 22:11:10 +11:00
gus d84319300a fix 2014-03-05 11:27:16 +01:00
gus f4879dacd5 add AIfollow to summoned creatures 2014-03-05 11:24:39 +01:00
Marc Zinnschlag a264e86e13 subclasses scene widget for worldspace scenes 2014-03-04 14:47:43 +01:00
Marc Zinnschlag f9d2fde783 Merge branch 'openmw-29'
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
2014-03-04 09:34:38 +01:00
Marc Zinnschlag 6101916b7d bumped version number 2014-03-04 08:52:48 +01:00
Marc Zinnschlag 0ae9cc0106 removed unused function 2014-03-03 08:21:16 +01:00
Marc Zinnschlag 26c2f28879 replaced global world->scene menu item with individual view context menu items in cell and reference tables 2014-03-02 22:43:44 +01:00
Marc Zinnschlag 6e8b9c88b2 changed name of default worldspace (should reduce chance of a name conflict) 2014-03-02 22:43:15 +01:00
Marc Zinnschlag 55195f819a changed edit requests from row index format to UniversalId/hint format 2014-03-02 22:34:41 +01:00
Marc Zinnschlag 797f5527ee added hint parameter for UniversalId viewing requests 2014-03-02 13:29:02 +01:00
Marc Zinnschlag cb3994281c changed UniversalId::Type_Scene from index to string ID argument (argument is the worldspace) 2014-03-02 13:11:15 +01:00
Marc Zinnschlag ca30f2af3d minor fix 2014-03-02 11:03:37 +01:00
Marc Zinnschlag 536a0e0ab0 added orbit navigation mode 2014-03-01 14:15:04 +01:00
Marc Zinnschlag 0e0d2331d6 updated changelog 2014-02-28 21:53:11 +01:00
Marc Zinnschlag a6e80205e1 Merge remote-tracking branch 'cc9cii/branch_0_29_fixes' into openmw-29 2014-02-28 21:49:06 +01:00
cc9cii 46867ec0cf Fix file handles being left open on windows builds 2014-03-01 07:24:20 +11:00
scrawl a99aa15d14 Fix a copy&paste mistake leaving start rotation uninitialized 2014-02-28 17:23:58 +01:00
Marc Zinnschlag 4d3abeedcb keep camera upright in 1st person mode 2014-02-28 13:37:01 +01:00
Marc Zinnschlag ae637d6abc rolling 2014-02-28 11:58:03 +01:00
Marc Zinnschlag 0926501717 Merge remote-tracking branch 'cc9cii/branch_0_29_fixes' into openmw-29 2014-02-27 15:45:45 +01:00
Marc Zinnschlag 4eea2c7a86 added free navigation mode 2014-02-27 15:42:59 +01:00
Marc Zinnschlag c977b2a756 moved implementation of the 1st person camera into a separate file 2014-02-27 15:23:14 +01:00
Marc Zinnschlag 14c3bfcf62 added navigation class 2014-02-27 14:46:06 +01:00
cc9cii 5c11a94511 Fix 32bit Windows non-debug build with MSVC 11.0 crash during startup. 2014-02-28 00:29:57 +11:00
cc9cii 56ae85df0c Fix 32bit Windows crash while taking the save screenshot. 2014-02-28 00:28:02 +11:00
cc9cii 8fa88f4480 sync with upstream 2014-02-28 00:13:57 +11:00
cc9cii 2421f23c2f cleanup the mess... 2014-02-27 23:59:23 +11:00
Marc Zinnschlag 8f73cc9268 added navigation mode selection 2014-02-25 14:59:46 +01:00
Marc Zinnschlag 526d75df51 inverted ctrl key 2014-02-25 14:30:38 +01:00
Marc Zinnschlag 644f5cb8de fixed mouse button release detection 2014-02-25 14:28:55 +01:00
Marc Zinnschlag e33bd4d508 camera rotation via ctrl-left button drag 2014-02-25 14:24:35 +01:00
Marc Zinnschlag e987199949 getting rid of some magic numbers 2014-02-25 14:14:53 +01:00
Marc Zinnschlag 07d20a2013 camera panning via left button drag 2014-02-25 14:09:07 +01:00
Marc Zinnschlag b9107addc0 mouse wheel zooming 2014-02-25 13:39:49 +01:00
Marc Zinnschlag b6ae521aa5 moving the camera with A and D keys 2014-02-25 13:31:15 +01:00
Marc Zinnschlag af50575259 use shift key to speed up camera movement 2014-02-25 13:17:15 +01:00
Marc Zinnschlag 8081c067a6 moving the camera with W and S keys 2014-02-25 13:09:37 +01:00
Marc Zinnschlag 4ec4599be3 added navigation mode enum to SceneWidget 2014-02-25 12:30:45 +01:00
Marc Zinnschlag 6ec86564d1 re-enabled OGRE in OpenCS; cleaned up startup 2014-02-25 11:58:32 +01:00
cc9ciiandMarc Zinnschlag 5b48ca114f aicombat pathfinding fix - check the correct list 2014-02-25 08:31:14 +01:00
cc9ciiandMarc Zinnschlag 85c467f00f Minor cleanup for aicombat pathfinding workaround. 2014-02-25 08:30:52 +01:00
Nikolay KasyanovandMarc Zinnschlag 76c1d60d23 Fixed OpenCS build on OS X 2014-02-24 15:59:05 +01:00
Marc Zinnschlag c62a352956 Merge branch 'cellstore' 2014-02-24 10:03:13 +01:00
Marc Zinnschlag 9b18e01507 keep track of which cells have state that needs to be saved 2014-02-24 10:03:04 +01:00
Marc Zinnschlag bfcd768078 various bits of cleanup 2014-02-23 21:39:18 +01:00
Marc Zinnschlag 83ded18af0 encapsulated reference collections 2014-02-23 21:21:27 +01:00
Marc Zinnschlag 367919200f moved CellRefList into a separate file 2014-02-23 20:11:05 +01:00
Marc Zinnschlag f220867144 make Ptr a bit more pointer-like 2014-02-23 18:17:41 +01:00
Marc Zinnschlag b72c1c2c58 encapsulated water level 2014-02-23 17:34:18 +01:00
gus 95ff869163 Merge branch 'openmw-29' of https://github.com/zinnschlag/openmw.git into AIFix2 2014-02-23 17:07:49 +01:00
Marc Zinnschlag 79e723ad06 encapsulated mIds 2014-02-23 16:46:07 +01:00
Marc Zinnschlag 8ea686c6c8 encapsulated mState 2014-02-23 14:26:36 +01:00
Marc Zinnschlag 4246172251 updated credits file 2014-02-23 11:52:13 +01:00
cc9ciiandMarc Zinnschlag 1bd2664cb0 aicombat pathfinding workaround 2014-02-23 11:47:25 +01:00
cc9cii 1ab5948f19 merge upstream changes 2014-02-23 19:11:37 +11:00
Marc Zinnschlag d780364842 fixed record size type 2014-02-22 17:31:44 +01:00
Marc Zinnschlag b0ae5b8ab7 Merge remote-tracking branch 'cc9cii/windows-save-fix' into openmw-29 2014-02-22 17:16:55 +01:00
cc9cii fcfc8fcccb Revert "Allow MinGW64 compilation in Windows/msys"
This reverts commit c3f350e3fb.

Conflicts:
	libs/platform/string.h
2014-02-22 23:45:13 +11:00
cc9cii ac606a865c Back out unnecessary change. 2014-02-22 23:22:23 +11:00
Marc Zinnschlag 2ca28f40be minor addition to change log 2014-02-22 12:55:14 +01:00
cc9cii 29a33364cc Another attempt at fixing MinGW64 2014-02-22 17:21:19 +11:00
cc9cii c241405d91 Fix Windows save & load. 2014-02-22 12:15:20 +11:00
cc9cii c3f350e3fb Allow MinGW64 compilation in Windows/msys 2014-02-22 12:06:50 +11:00
Nikolay Kasyanov 59508e914f Fixed OpenCS build on OS X 2014-02-22 01:17:58 +04:00
Marek Kochanowicz e348c6baa9 accept drops from filters table. Cool. ☺ 2014-02-21 13:50:59 +01:00
Marek Kochanowicz e2dce53543 additional check on droping to prevent exception 2014-02-21 12:55:01 +01:00
Marek Kochanowicz fcf17805a0 Installing basic event filter 2014-02-21 12:48:39 +01:00
Marc Zinnschlag 7693f712bc started making CellStore into a proper class; encapsulated mCell member 2014-02-21 11:35:46 +01:00
Marek Kochanowicz 55e9083570 refactorisation 2014-02-21 10:27:23 +01:00
Marek Kochanowicz 1c35a85adf fixed bugs, added extra display_type 2014-02-20 19:27:51 +01:00
Marek Kochanowicz 7dff34ebf1 Features implemented. Time to debug. 2014-02-20 19:15:09 +01:00
Marek Kochanowicz 3ad6df1f92 try with the passing action 2014-02-20 17:54:18 +01:00
Marek Kochanowicz 38a86b5015 We can handle droping multiple records 2014-02-20 16:01:54 +01:00
Marek Kochanowicz b788ab8b4c correcting 2014-02-20 14:10:03 +01:00
Marc Zinnschlag c5b2c154f8 another esm writer fix 2014-02-20 12:49:56 +01:00
Marc Zinnschlag ee7364a8a3 updated changelog 2014-02-20 12:43:49 +01:00
Marek Kochanowicz 4fe21dc38f Const correctness 2014-02-20 12:43:09 +01:00
Marc Zinnschlag 72b29ddb79 fix broken esm writer header code 2014-02-20 12:35:57 +01:00
Marc Zinnschlag 736644de05 Revert "#1041 in progress: decode first sample batch right in OpenAL_SoundStream::play()"
This reverts commit 51fb9f65ea.
2014-02-20 12:31:40 +01:00
Marek Kochanowicz eb3cbaa4e1 Create filter on droping record. 2014-02-20 12:25:47 +01:00
Marek Kochanowicz c7b3e139aa Propagate signal to the edit widget 2014-02-20 11:07:04 +01:00
Marek Kochanowicz fca7701359 Column titles retrived and passed to the filterbox. 2014-02-19 16:15:51 +01:00
pvdk c0631187c6 Removed git tag retrieval for Travis 2014-02-19 14:48:33 +01:00
pvdk 56d537e23d Added some sanity checking: compare git version with manual version 2014-02-19 14:37:27 +01:00
pvdk b43325119a Some changes to the version retrieval: ignore shallow clones 2014-02-19 14:19:08 +01:00
pvdk 85b7240948 Made the git version retrieval more reliable 2014-02-19 13:43:14 +01:00
Marek Kochanowicz d7a1abb30b emit signal with types (will be connected to the tablesubview) 2014-02-19 12:55:39 +01:00
Marek Kochanowicz dd95ed8e4c Accept drops on the filterbox 2014-02-19 12:32:48 +01:00
Marek Kochanowicz 569533eeae Merge branch 'master' of https://github.com/zinnschlag/openmw into DragDrop 2014-02-19 11:23:53 +01:00
scrawl d25b3ad9cb Fix AiCombat for creatures with weapons 2014-02-19 11:23:03 +01:00
scrawl ebc67a82cf Don't list unnamed quests in the quest book 2014-02-19 11:23:03 +01:00
scrawl 1fba5d1bb9 Terrain: change world bounds from AABB to 4 floats 2014-02-19 11:23:03 +01:00
scrawl bc376e6649 Closes #888: Treat "Bip 01" as animation root if existing 2014-02-19 11:23:03 +01:00
scrawl 439018e706 Get rid of useless return values 2014-02-19 11:23:03 +01:00
scrawl 90f6cda4cc Moved includes to appropriate place 2014-02-19 11:23:03 +01:00
scrawl ae5d25ac58 FindSDL.cmake is unused 2014-02-19 11:23:03 +01:00
Marek Kochanowicz e9664d80bd make convert enumns public static 2014-02-19 11:22:47 +01:00
Marc Zinnschlag 550e5eb686 Merge remote-tracking branch 'corristo/osx-music-fix' 2014-02-18 09:12:02 +01:00
gus d8f24ac499 bug fix 2014-02-17 15:49:49 +01:00
Marc Zinnschlag ea16f79d77 Merge remote-tracking branch 'gus/AIFix2' 2014-02-17 10:54:07 +01:00
gus 84959eea28 woops, thanks scrawl 2014-02-17 10:50:10 +01:00
gus 6e1425321b remove cout spam 2014-02-17 10:43:09 +01:00
gus e5b19cf3c6 clean up 2014-02-17 10:37:11 +01:00
Marc Zinnschlag 02c6c65705 Merge remote-tracking branch 'sirherrbatka/DragDrop' 2014-02-17 09:55:50 +01:00
Marek Kochanowicz 2bb9e47507 Improvements. 2014-02-17 08:58:55 +01:00
Nikolay Kasyanov 51fb9f65ea #1041 in progress: decode first sample batch right in OpenAL_SoundStream::play() 2014-02-17 02:59:23 +04:00
Nikolay Kasyanov 5e8cb2e466 Another attempt to fix #1041. This time I'm sending real data from decoder
once after playback started.
2014-02-17 02:35:13 +04:00
Marek Kochanowicz e1a0f60041 allow _foo ids without qoute 2014-02-16 20:26:22 +01:00
Marek Kochanowicz b83817e05e May only include alphanumeric characters and underscores and may not start with a number. 2014-02-16 20:18:28 +01:00
Marek Kochanowicz 3cc23a9cb3 very basic, but safe putting down " " 2014-02-16 18:41:42 +01:00
Nikolay Kasyanov 4e28fd85a3 Fixed build on OS X 2014-02-16 20:22:46 +04:00
Marc Zinnschlag 44f6f79bf5 Merge remote-tracking branch 'corristo/osx-ogre-19' 2014-02-16 17:12:52 +01:00
Marc Zinnschlag c18c3e51ee handle IDs that don't exist anymore after loading 2014-02-16 16:23:05 +01:00
Nikolay Kasyanov 4a61868521 OS X: fixed Ogre plugin packaging 2014-02-16 19:01:28 +04:00
Marc Zinnschlag 9788bbcab9 partially store creature state in saved game files (only attributes and dynamics for now) 2014-02-16 15:56:36 +01:00
Marc Zinnschlag b0532e0c85 store NPC state in saved game files 2014-02-16 15:51:45 +01:00
Marc Zinnschlag 9f721fd144 store list of known topics in saved game files 2014-02-16 12:54:27 +01:00
Marc Zinnschlag 6ac64bbe15 Merge branch 'script'
Conflicts:
	readme.txt
2014-02-16 12:12:56 +01:00
Nikolay Kasyanov e4017b8bfe It seems that OctreeSceneManager is not required anymore 2014-02-16 14:16:45 +04:00
Nikolay Kasyanov 8f99da084b OS X: plugins are now in Frameworks dir, not in Plugins 2014-02-16 14:13:12 +04:00
Nikolay Kasyanov 3c281c6a62 OS X: specify path to framework binary, not to framework directory 2014-02-16 14:12:45 +04:00
Marek Kochanowicz 17af865a9f checking for the source of the drop, reject those from other files for now 2014-02-16 09:51:33 +01:00
Marc Zinnschlag 9cdfca6c26 Merge remote-tracking branch 'potatoesmaster/disable-crash' 2014-02-15 22:55:00 +01:00
Marek Kochanowicz cbe1fe2f95 removed misplaced bracket 2014-02-15 22:38:59 +01:00
Marek Kochanowicz 45d9364195 Put the id in the quote. 2014-02-15 22:14:27 +01:00
Marek Kochanowicz ec8c8a9d88 -journalinfo +topic 2014-02-15 22:05:42 +01:00
Marek Kochanowicz 41606a67e4 implemented whitelist of allowed types in the scripts 2014-02-15 20:49:09 +01:00
Marek Kochanowicz 930b77e60a allow drag and drop into the script edit window. 2014-02-15 19:52:40 +01:00
Marc Zinnschlag 01a7918124 Merge remote-tracking branch 'potatoesmaster/selected-spell' 2014-02-15 18:38:10 +01:00
Marek Kochanowicz 97fe5465bf created new files 2014-02-15 17:55:18 +01:00
Emanuel Guevel 3d8ca02479 Fix breaking of enchanted items casting 2014-02-15 17:39:57 +01:00
Marc Zinnschlag 0afa61eed5 fixed referenceable-loading in case of more than one content file 2014-02-15 15:50:17 +01:00
Marc Zinnschlag 2007a3e902 improved script check error messages 2014-02-15 13:25:38 +01:00
Marek Kochanowicz 56be62b956 small reformatting 2014-02-15 13:23:51 +01:00
Marek Kochanowicz 4ee90c24e5 more readable code. 2014-02-15 13:22:14 +01:00
Marc Zinnschlag 4e04131957 fixing case broke sorting in script context 2014-02-15 13:09:43 +01:00
Marc Zinnschlag 2130ec39d6 disable warnings by default in script verifier 2014-02-15 12:58:34 +01:00
Marc Zinnschlag 0d84adb2c6 allow x->(y) instead of (x->y) 2014-02-15 12:50:40 +01:00
Marc Zinnschlag fd665a1994 ignore conditions after an else (only works if condition is put in parentheses) 2014-02-15 12:45:50 +01:00
Marek Kochanowicz b1f63947e8 Checking if the drop comes from same document. 2014-02-15 12:40:07 +01:00
Marek Kochanowicz d6820b977e store const ref to the document in the table. 2014-02-15 12:22:32 +01:00
Marek Kochanowicz f3dc45f1ec long line split. 2014-02-14 15:29:10 +01:00
Marek Kochanowicz 37d262b147 Splited very long line. 2014-02-14 15:12:34 +01:00
Marc Zinnschlag 7b8802588e Merge remote-tracking branch 'sirherrbatka/DragDrop' 2014-02-14 14:28:30 +01:00
Marek Kochanowicz aafde926d3 Documentation, corrections. 2014-02-14 14:04:36 +01:00
Marc Zinnschlag e17af4231a added script verifier 2014-02-14 13:38:30 +01:00
Marc Zinnschlag 0ff744c2ff fixed CSMWorld::ScriptContext::isJournalId 2014-02-14 12:56:05 +01:00
gus a315d5cc2b aiactivate works. Bug when you try to use it on a reference that doesn't exist. Need to clran up door.cpp 2014-02-14 12:55:14 +01:00
Marek Kochanowicz 13c4c71995 reformating 2014-02-14 12:54:51 +01:00
Marek Kochanowicz ae418f2538 nicer formatting 2014-02-14 12:51:50 +01:00
Marc Zinnschlag 0a8ffbfb1d added missing implementation for CSMWorld::ScriptContext::getMemberType 2014-02-14 12:46:54 +01:00
Marek Kochanowicz ace4252013 nicer formatting 2014-02-14 12:46:15 +01:00
Marc Zinnschlag d213c6c36a fixed a constness-issue 2014-02-14 12:23:00 +01:00
Marc Zinnschlag 910d62e4b8 added missing implementation for CSMWorld::ScriptContext::getGlobalType 2014-02-14 11:59:33 +01:00
Marc Zinnschlag 451e1f413b instead of using pre-compiled variable lists for remote member access get the variable list from the remote script on the fly 2014-02-14 11:15:16 +01:00
Marc Zinnschlag e76ef92669 also allow the use of keywords as remote local variables in set statements 2014-02-14 09:06:06 +01:00
Marc Zinnschlag 2086ebe410 fix for inappropriate disable (2nd attempt) 2014-02-14 08:48:26 +01:00
Marc Zinnschlag b01c6dad37 Revert "allow disable as an alias for getDisabled (in most cases)"
This reverts commit f7ff4fbd51.
2014-02-14 08:29:18 +01:00
Emanuel Guevel 7c981587fc When searching object by id, search in active cells before searching in the player's inventory 2014-02-13 22:58:12 +01:00
Nikolay Kasyanov c2fe0d480a Merge remote-tracking branch 'upstream/master' into osx-ogre-19
Conflicts:
	CMakeLists.txt
2014-02-14 00:04:16 +04:00
Marc Zinnschlag 053b3dc371 Merge branch 'openmw-28'
Conflicts:
	CMakeLists.txt
2014-02-13 20:57:28 +01:00
Emanuel Guevel e597328b6b Make enable/disable a no-op for items in containers 2014-02-13 20:24:27 +01:00
Marek Kochanowicz 40cc108e54 drag and drop works. 2014-02-13 20:19:51 +01:00
Marek Kochanowicz 1bcc6d6918 using new icon. 2014-02-13 19:14:17 +01:00
Marek Kochanowicz 2afe3f3e57 Introduced multitype icon. 2014-02-13 19:00:35 +01:00
Nikolay Kasyanov 58add97676 Merge branch 'master' into osx-ogre-19
Conflicts:
	CMakeLists.txt
2014-02-13 20:34:06 +04:00
Marek Kochanowicz 6662560cbc new displays for referencable table columns 2014-02-13 15:43:19 +01:00
Marc Zinnschlag f7ff4fbd51 allow disable as an alias for getDisabled (in most cases) 2014-02-13 15:31:07 +01:00
Marc Zinnschlag d6e212a02b Merge branch 'master' into script 2014-02-13 15:02:02 +01:00
Marc Zinnschlag e9238b456d use case-insensitive sorting in columns 2014-02-13 15:01:10 +01:00
Marc Zinnschlag 309573a3ac allow the use of the keyword end as a variable name in an expression 2014-02-13 14:15:48 +01:00
Marek Kochanowicz 09d3c7a446 Attempt to match types. Does not work at the moment. 2014-02-13 13:54:09 +01:00
Marc Zinnschlag d73097c2e4 Merge remote-tracking branch 'scrawl/master' 2014-02-13 13:13:37 +01:00
gus 7c6e27e4f9 Merge branch 'master' of https://github.com/zinnschlag/openmw.git into AIFix2
Conflicts:
	apps/openmw/mwmechanics/aitravel.cpp
2014-02-13 12:59:04 +01:00
scrawl ea90035eca Enable irc notification for travis 2014-02-13 12:35:33 +01:00
scrawl 1ed1b43296 Enable release branches in Travis CI 2014-02-13 12:30:53 +01:00
scrawl 0fcec24c9b Remove some bogus dependencies for travis build 2014-02-13 12:24:15 +01:00
scrawl 4e6507248b Fix travis build 2014-02-13 12:19:21 +01:00
scrawl d4a755d1aa Fix some hardcoded literals 2014-02-13 11:15:55 +01:00
Marek Kochanowicz 71b2fc1c70 Introduced method to access display type. 2014-02-13 10:55:31 +01:00
Marc Zinnschlag 9c52820754 Merge remote-tracking branch 'scrawl/master' 2014-02-13 10:54:51 +01:00
Marek Kochanowicz 5f3f867a10 Implemented convertEnums function 2014-02-13 10:21:49 +01:00
scrawl c6fb0f2d9b Removed terrain component's dependency on ESM 2014-02-13 10:13:53 +01:00
scrawl fb0c5be536 Don't suppress git error output 2014-02-13 10:13:03 +01:00
Marc Zinnschlag ac8290c4d3 fixed problem with line endings in case of a local variable redeclaration 2014-02-13 09:59:22 +01:00
Marc Zinnschlag dde4fbd818 allow one more integer argument in RemoveSoulGem and up to 6 more in AiFollow and then throw them all away 2014-02-13 09:52:44 +01:00
Marc Zinnschlag 87b51e47a9 fixed another case issue in remote member access 2014-02-13 09:40:07 +01:00
Marc Zinnschlag c03bd8ebb6 allow [] as aliases for () 2014-02-13 08:59:33 +01:00
Marc Zinnschlag 0313876d88 allow leaving out if in a top-level if-statement 2014-02-13 08:49:40 +01:00
Marc Zinnschlag 2eeb0eb4f3 allow lines to continue with other instructions after an legit else 2014-02-13 08:38:26 +01:00
Marc Zinnschlag 749136bf33 ignore attempts to set non-existing variables 2014-02-12 20:23:47 +01:00
Marc Zinnschlag b3412b7eec another case fix (remote member access again) 2014-02-12 15:22:17 +01:00
Marc Zinnschlag a85d3c7dcb ignore unused explicit references for functions 2014-02-12 13:53:59 +01:00
Marc Zinnschlag 6e2e4d1adf ignore stray begin 2014-02-12 13:45:01 +01:00
Marc Zinnschlag dc433a3c09 fixed case handling problem for local variable access 2014-02-12 13:38:16 +01:00
Marc Zinnschlag 388735046f fixed broken remote member variable access 2014-02-12 13:35:24 +01:00
Marek Kochanowicz c142089bfe Merge branch 'master' of https://github.com/zinnschlag/openmw into DragDrop 2014-02-12 13:13:32 +01:00
Marek Kochanowicz c00834a8de added some iostream garbage. 2014-02-12 13:12:58 +01:00
Marek Kochanowicz 8dfdd87a07 Merge branch 'DnD' of https://github.com/gugus/openmw into DragDrop
Conflicts:
	apps/opencs/view/world/table.cpp
2014-02-12 12:12:53 +01:00
Marek Kochanowicz 62c9c77ddf Compiles now. 2014-02-12 11:42:19 +01:00
gus 6cf561f713 get index to where we are dropping 2014-02-12 11:32:01 +01:00
gus 2e33ab3a13 droping somewhat works 2014-02-12 11:16:12 +01:00
Marc Zinnschlag 93d4743012 interpret instruction keywords as names within expressions 2014-02-12 09:56:25 +01:00
Marek Kochanowicz e1a39b8388 Replaced some display_string with specific type. Damn, i wish this is correct ;-) 2014-02-12 09:24:08 +01:00
Marc Zinnschlag c0a6acfe6c allow the use of keywords as variable names in more places 2014-02-12 09:23:23 +01:00
Marc Zinnschlag b1b0877122 allow additional numeric argument for AiFollow and ignore it 2014-02-12 09:14:32 +01:00
Marc Zinnschlag bfb0e62c4a ignore additional string argument after enable/disable 2014-02-12 09:10:05 +01:00
Marek Kochanowicz fc135fbfee Added new Display types 2014-02-12 09:04:52 +01:00
Marc Zinnschlag 61626e90da allow additional string argument for stopcombat and addspell (ignored) 2014-02-12 08:53:37 +01:00
Marc Zinnschlag 6a5d88b640 ignore stray else and endif in scripts 2014-02-12 08:42:42 +01:00
Emanuel Guevel 8824af30b4 Allow to display message box outside of dialogue window 2014-02-11 18:26:57 +01:00
Marc Zinnschlag ffd1783690 Merge remote-tracking branch 'mrcheko/master' 2014-02-11 17:03:50 +01:00
Marc Zinnschlag e44a7268fc Merge remote-tracking branch 'potatoesmaster/selected-spell' 2014-02-11 17:00:41 +01:00
Emanuel Guevel a3eea4f6b6 Do not allow spellcasting stance without spell selected 2014-02-11 16:34:51 +01:00
Emanuel Guevel 70d35da116 Unset selected spell when removed 2014-02-11 16:34:23 +01:00
Marc Zinnschlag 697bda6371 allow (and discard) explicit reference on instructions that do not accept explicit references 2014-02-11 14:55:31 +01:00
Emanuel Guevel 6a4820c0f7 Show a message when the player attempts to cast a disabled spell 2014-02-11 14:52:58 +01:00
Marc Zinnschlag 9de2922d22 fixed case problem in remote member variable access 2014-02-11 13:56:56 +01:00
Marc Zinnschlag f26aa4f645 fixed while loop implementation 2014-02-11 13:31:04 +01:00
Marek Kochanowicz 53e2e8415d replaced start with exec 2014-02-11 12:25:21 +01:00
Emanuel Guevel 8c8f4cd420 Fix typo 2014-02-10 22:53:16 +01:00
gus df46218acc try droping 2014-02-10 16:48:04 +01:00
Marc Zinnschlag 5c0071f320 fixed spelling of an error message 2014-02-10 14:59:20 +01:00
Marc Zinnschlag 3b990795c4 added access to remote access of local variables of global scripts 2014-02-10 14:45:55 +01:00
Marc Zinnschlag 3147aebf75 factored out declaration parser 2014-02-10 13:01:52 +01:00
gus b5006c5dbd compile fix 2014-02-09 15:33:00 +01:00
mrcheko a6be72673c improves animation-controlled velocity check 2014-02-08 16:59:15 +02:00
scrawl 8f949c6ae2 Fix lockpicks 2014-02-08 07:35:34 +01:00
scrawl 6ce499f0e6 Fixes #848: Use hardcoded animation velocity for first person movement 2014-02-06 04:05:22 +01:00
scrawl ff11d85a62 Fix wrong assertion 2014-02-06 03:15:01 +01:00
gus 632834ce10 WIP 2014-02-05 16:12:50 +01:00
scrawl 4a26909172 Fixes #1159: Don't allow quick keys menu in chargen 2014-02-05 12:15:49 +01:00
Marek Kochanowicz 3b8f04c0f3 Allow multi-item drag. 2014-02-05 11:44:08 +01:00
Marek Kochanowicz f01b02c42d Changed format. 2014-02-05 11:24:33 +01:00
Marek Kochanowicz 76b729ac9b Removed getUniversalid interface. 2014-02-05 11:19:55 +01:00
scrawl 677fc84223 Refactor actors update 2014-02-05 09:50:21 +01:00
scrawl 73c9efc5e3 Add generated version.hpp to gitignore 2014-02-05 08:48:15 +01:00
scrawl 0cc1cd8f7e Fix message box formatting bug 2014-02-05 05:18:11 +01:00
scrawl 7907181c0c Fix uninitialized member 2014-02-05 05:18:11 +01:00
scrawl ffe19e7a52 Feature #50: Handle attach & release of projectiles 2014-02-05 05:18:11 +01:00
scrawl 8b8fb931a0 Feature #50: Don't allow ranged weapon attack when ammunition is empty 2014-02-05 05:18:10 +01:00
scrawl a07eaa0c0d Feature #50: Allow body pitch in third person for ranged weapon aiming 2014-02-05 05:18:10 +01:00
scrawl 5ee105c812 Fix typo 2014-02-05 05:18:10 +01:00
scrawl 7cf22391a5 Feature #50: Handle weapon controllers (i.e. bowstring animations, etc) 2014-02-05 05:18:10 +01:00
scrawl 975f0e05b4 Fixes #1157 (attribute layout issue) 2014-02-05 05:18:10 +01:00
scrawl e1e7a492e2 Fix movement speed formula for flying creatures 2014-02-05 05:18:10 +01:00
scrawl f608ceeffc Fixes #1158 (Armor rating label issues) 2014-02-05 05:18:10 +01:00
scrawl 8aed4fcfa4 Correction for marksman weapon inventory preview 2014-02-05 05:18:10 +01:00
scrawl 5b076aa570 Revert "Bug #1074: Inventory paperdoll obscures armour rating"
This reverts commit b017a3be3e.
2014-02-05 05:18:10 +01:00
scrawl 2c0d46525b Fast-forward particle systems to make cell loads less obvious. 2014-02-05 05:18:09 +01:00
scrawl cf3812188f Fix bounding box assertions due to negative particle life time
Other parts of the code could not deal with negative life times and produced negative particle sizes as a result (which Ogre could not handle)
2014-02-05 05:18:09 +01:00
scrawl df78357e05 Handle knockout separately (Closes #1151) 2014-02-05 05:18:09 +01:00
Marek Kochanowicz 04287cb87a Provide method to return whole data vector from tablemimedata. 2014-02-04 19:42:52 +01:00
Marek Kochanowicz 8b799683c1 Display QPixMap with dragged object. 2014-02-04 18:48:18 +01:00
Marek Kochanowicz 3439940a8e Tablemimedata able to handle vector of objects and return icon. 2014-02-04 18:38:31 +01:00
Marek Kochanowicz 423b2906be Yes, you can drag. But not drop. 2014-02-04 11:40:48 +01:00
Marek Kochanowicz dc80bfff55 Attempt to get basic tablemimedata subclass. 2014-02-04 09:13:40 +01:00
mrcheko 688f359a33 discard creatures speed and negative fatique changes 2014-02-03 23:09:26 +02:00
Marc Zinnschlag c5b92ed6c8 Merge remote-tracking branch 'pvdk/versioninfo' 2014-02-03 11:21:11 +01:00
Marc Zinnschlag 21f502df34 compatibility fix 2014-02-03 11:20:55 +01:00
pvdk f263acdac6 Merge remote-tracking branch 'upstream/master' into versioninfo 2014-02-03 02:27:24 +01:00
Alexander "Ace" Olofsson e50a393de4 Fix linking issues on Windows using MSVC. 2014-02-02 23:59:57 +01:00
pvdk 4e03e9cf87 Changed development version info text and the tooltip now works on all platforms 2014-02-02 20:10:47 +01:00
Marc Zinnschlag 2b2ac6f62b allow declaration of local variables with keywords as names 2014-02-02 15:43:48 +01:00
Marc Zinnschlag 32860a05e3 added dummy implementations for getPcInJail and getPcTraveling 2014-02-02 15:35:18 +01:00
mrcheko 761f13d3ce activate whole-body attack animations 2014-02-02 16:29:51 +02:00
Marc Zinnschlag 914ab1b8ab allow 'x' instead of 'getjournalindex x' 2014-02-02 15:08:27 +01:00
Marc Zinnschlag cd9b137129 allow elseif without matching if (grrrrr) 2014-02-02 14:24:58 +01:00
Marc Zinnschlag 858dc80292 corrected command line switch documentation in readme file 2014-02-02 14:10:57 +01:00
Marc Zinnschlag 4ee43612f6 added new switch: --script-warn 2014-02-02 14:09:59 +01:00
mrcheko b85a4dd35e pos accum without conformity with animation bug/creature speed 2014-02-02 15:01:49 +02:00
Alexander "Ace" Olofsson e3d85af70a Fix an issue with int32_t being unknown on windows. 2014-02-02 13:57:19 +01:00
Marc Zinnschlag 8bcdf54570 added warning mode to script compiler error handler 2014-02-02 13:55:03 +01:00
Marek Kochanowicz a36cc26434 Created new files for TableMimeData class. 2014-02-01 19:06:41 +01:00
scrawl 1deb0a7cdf Savegame dialog: Set key focus to editbox 2014-02-01 18:42:01 +01:00
scrawl ec46575671 Overwriting saves fixes - copy description of overwritten slot, ask for confirmation 2014-02-01 18:42:01 +01:00
scrawl 6d37cd7e86 Savegame dialog: Don't allow empty save names 2014-02-01 18:42:01 +01:00
scrawl 63284d21a0 Savegame dialog: 'Enter' while editing a name is equivalent to pressing the ok button 2014-02-01 18:42:01 +01:00
scrawl dea9d21db6 Some additional safety checks for global map loading 2014-02-01 18:42:01 +01:00
scrawl f89b3cac02 Feature #764: Store the actor that gave the dialog response 2014-02-01 18:42:01 +01:00
scrawl a988a0d6dc Don't add duplicate topic responses to the journal 2014-02-01 18:42:00 +01:00
scrawl 37ef8ec908 Savegame dialog: support loading saves using Enter key or double-click 2014-02-01 18:42:00 +01:00
scrawl 49e26415be Don't call loadGame() from within the MWMechanics::Actors update sequence 2014-02-01 18:42:00 +01:00
Marc Zinnschlag 1b5301eec0 Merge branch 'savedgame'
Conflicts:
	apps/openmw/mwbase/mechanicsmanager.hpp
	apps/openmw/mwbase/soundmanager.hpp
	apps/openmw/mwgui/mapwindow.hpp
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
	apps/openmw/mwsound/soundmanagerimp.hpp
	components/esm/loadcell.cpp
2014-02-01 18:16:32 +01:00
Marc Zinnschlag 5b04c10e1d added creature/NPC state to saved games (only container/inventory for now) 2014-02-01 17:36:23 +01:00
Marc Zinnschlag d2ec3ffdc8 handle equipped items when serialising inventory state 2014-02-01 17:31:05 +01:00
Marc Zinnschlag bcc5894e2d changed implementation functions for container serialisation from free functions to member functions (will need some polymorphism later) 2014-02-01 15:24:01 +01:00
Marc Zinnschlag dd674566a2 store content of containers in saved game files 2014-01-31 13:25:32 +01:00
scrawl bbd15b185d Skip inactive controllers. Fixes those bloody bone boots again. 2014-01-31 05:59:58 +01:00
scrawl 4ec86d1c68 Bug #1147: Fix the inventory preview pose used for ranged weapons 2014-01-31 05:06:35 +01:00
scrawl 5b300c1052 Handle controllers for the root node. Fixes #1147 (incorrect dwemer crossbow rotation) 2014-01-31 05:06:35 +01:00
scrawl 60bbab52fe Support keyframe controllers for bones that aren't in the skeleton base 2014-01-31 05:06:34 +01:00
scrawl 305a471c5a Fix VisController in ascended sleeper's death animation 2014-01-31 05:06:08 +01:00
scrawl da34f8bda1 Fix LastHitObject 2014-01-31 04:43:35 +01:00
scrawl 067c2bc2ec Disable combat movements for creatures without weapons 2014-01-31 04:43:35 +01:00
scrawl 7820ea5806 "Always best attack" should only affect the player 2014-01-31 04:43:35 +01:00
scrawl d0c6ecd03a Bug #1148: Workaround for broken images in some MW versions 2014-01-31 04:43:35 +01:00
scrawl 52f89e9a17 Don't play "idle" voice entries for NPCs with Hello 0
Not entirely sure if this is correct, but it prevents the NPCs in the starting boat from incorrectly playing them.
2014-01-31 04:43:35 +01:00
scrawl 39d86a9468 Improvements to smooth NPC steering 2014-01-31 04:43:29 +01:00
mrcheko 80d8aa4030 bug with sequence of knockouts; giving sense to some hit state code 2014-01-30 23:54:26 +02:00
Marc Zinnschlag 900532a6ca store additional state of lights in saved game files 2014-01-30 12:37:33 +01:00
Marc Zinnschlag ec7cb90ca4 added support for serialisation of CustomData state 2014-01-30 11:50:13 +01:00
scrawl 2b15b8b484 Fix gold bugs (Fixes #1145, Fixes #1146) 2014-01-29 15:37:27 +01:00
scrawl 305e78c981 Fix creature attack bug 2014-01-29 15:37:27 +01:00
scrawl e717694b36 Reset Run stance in AiWander 2014-01-29 15:37:27 +01:00
scrawl 23ffb8a4dc Fixes #1143: Make getCurrentAiPackage return the package that was run last, not the package that will be run in the next frame.
This makes the Mehra Milo script work properly.
2014-01-29 15:37:27 +01:00
scrawl 434fd21584 Don't set journal index if a higher index is currently set
This is vanilla behaviour, and required for the Mehra Milo vivec informants quest.
2014-01-29 15:37:27 +01:00
scrawl edff88542b Allow double click / Enter key for accepting race/class/birthsign 2014-01-29 15:37:27 +01:00
scrawl a8a09762ce Don't crash when deleting or disabling a moving door 2014-01-29 15:37:26 +01:00
scrawl 190512156d Use some more GMSTs for enchanting 2014-01-29 15:37:26 +01:00
scrawl 292d692b40 Loosen window size restrictions 2014-01-29 15:37:26 +01:00
scrawl ea7e0abdc2 Move WhenStrikes skill success to a more appropriate place 2014-01-29 15:37:26 +01:00
scrawl b8db151da7 Add missing skill increases for armor hits 2014-01-29 15:37:26 +01:00
scrawl 82146e7f8d Use GMSTs for levelup 2014-01-29 15:37:26 +01:00
scrawl cc40cec395 Move levelup to NpcStats
The code came from back in the days where NpcStats did not derive from CreatureStats.
2014-01-29 15:37:26 +01:00
scrawl ba67bf45f8 Fix an issue with InventoryStore copy constructor. Don't copy the iterator directly - mContainer will be wrong and comparisons against end() will always fail.
This caused an exception when looting a creature that had moved cells.
2014-01-29 15:37:26 +01:00
scrawl 365ae15532 Drag&Drop: auto-hide windows that can't be drop targets on mouseover 2014-01-29 15:37:26 +01:00
mrcheko 3a5da7e6e8 merged with master 2014-01-29 00:03:00 +02:00
mrcheko 5ee1dc6be8 attacktypes error fix 2014-01-28 21:07:26 +02:00
Marc Zinnschlag e0537a3253 made object state polymorphic 2014-01-28 13:53:24 +01:00
Marc Zinnschlag a623f03850 reduced object state for objects in containers 2014-01-28 13:49:59 +01:00
Marc Zinnschlag 1d34f5e096 Merge remote-tracking branch 'sirherrbatka/cloning'
Conflicts:
	apps/opencs/model/world/refiddata.cpp
2014-01-28 12:40:14 +01:00
Marc Zinnschlag a473c3f619 some cleanup 2014-01-28 12:36:10 +01:00
Marc Zinnschlag fd5486864a Merge remote-tracking branch 'gus/AIFix2'
Conflicts:
	apps/openmw/mwbase/mechanicsmanager.hpp
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwmechanics/actors.hpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
2014-01-28 12:33:31 +01:00
Marek Kochanowicz 2bd98a69ab Corrections, according to the comments. Thanks for the review. :-) 2014-01-28 11:16:48 +01:00
mrcheko e50e94af0b remove CreatureStats::mAttackType, set/getAttackType() 2014-01-27 23:05:17 +02:00
mrcheko fe0268062d merge with master 2014-01-27 22:38:01 +02:00
Marek Kochanowicz d3000ce099 whitespaces removed again. 2014-01-27 19:47:54 +01:00
Marek Kochanowicz 62ea0bb066 Cleared whitespaces. 2014-01-27 19:40:05 +01:00
Marek Kochanowicz c82db915f1 Removed needless includes 2014-01-27 19:32:51 +01:00
Marek Kochanowicz d0b07de7ef Corrected bug mentioned by zini. 2014-01-27 16:59:18 +01:00
gus 846276f747 clean up 2014-01-27 15:14:24 +01:00
Marek Kochanowicz ed0ba906cf removed needless include 2014-01-27 15:05:29 +01:00
Marek Kochanowicz 9c579dbd6c ok, that should be enough 2014-01-27 15:03:29 +01:00
Marek Kochanowicz 84e07c95b1 formatting 2014-01-27 15:02:29 +01:00
Marek Kochanowicz 51115fa5be spaces around operators 2014-01-27 14:56:57 +01:00
Marek Kochanowicz c91ae86084 is there something that can generate diff from two git branches? Using github for this is kinda annoying. 2014-01-27 14:53:39 +01:00
Marek Kochanowicz 52176d6435 reforfucking 2014-01-27 14:51:57 +01:00
Marek Kochanowicz 2b71568bb6 still reformating 2014-01-27 14:50:36 +01:00
Marek Kochanowicz 316debb827 reformating 2014-01-27 14:46:58 +01:00
Marek Kochanowicz 4d6fb31610 reformating 2014-01-27 14:45:07 +01:00
Marek Kochanowicz 2899f04a3f reformatting 2014-01-27 14:43:12 +01:00
Marek Kochanowicz 6a0b5defd7 removed needless member value. 2014-01-27 13:42:08 +01:00
Marek Kochanowicz bb62efc3d8 Removed pointless includes. 2014-01-27 13:36:01 +01:00
Marc Zinnschlag 29c3a288e3 load and save of reference in cells (without CustomData state) 2014-01-27 13:27:42 +01:00
Marek Kochanowicz 71d6364754 Chaninging variables name to follow our policy. 2014-01-27 13:13:39 +01:00
Marek Kochanowicz aa6d1ff4c3 removed needless argument for cloning 2014-01-27 13:08:14 +01:00
Marek Kochanowicz be8b978a89 corrected mistake in data 2014-01-27 12:23:03 +01:00
Marek Kochanowicz 62c2259c87 removing coordinates handling 2014-01-27 10:10:23 +01:00
mrcheko 45b3aa3d93 corrected things connected to determining attack type 2014-01-26 23:32:57 +02:00
gus f5d589388c bug fix 2014-01-26 22:06:54 +01:00
gus 764011dd1b clean up 2014-01-26 21:53:55 +01:00
gus 7cb47aa635 new implementation of pathfinding. Works, but need clean up 2014-01-26 21:26:19 +01:00
scrawl eba6c9a8fd Fix massive console spam regarding the scrib's idle3 animation 2014-01-26 02:49:32 +01:00
scrawl b1066de81d Revert "Merge remote-tracking branch 'mrcheko/master'"
This reverts commit 4e360136b1, reversing
changes made to 047bbe43b2.

Conflicts:

	apps/openmw/mwmechanics/aicombat.cpp
2014-01-26 00:31:44 +01:00
scrawl a1fbd1fcc8 Revert "Merge remote-tracking branch 'mrcheko/master'"
This reverts commit df7c139e2f, reversing
changes made to fec26342cd.
2014-01-26 00:14:49 +01:00
scrawl e0de76a6f7 Save/load global map 2014-01-25 19:06:14 +01:00
scrawl e62bf8fca9 Remove some garbage 2014-01-25 16:41:26 +01:00
scrawl 79a9c4e048 Clear mShared before populating it. Fixes an issue with duplicate records (e.g. dialogue keywords) after loading a savegame. 2014-01-25 16:33:39 +01:00
scrawl bdb03926c2 Fix crash when loading another game after dying 2014-01-25 16:13:45 +01:00
scrawl 28185e2017 Death/godmode fixes: Revive player *after* character update, since there might be fall damage. 2014-01-25 15:54:24 +01:00
scrawl 9c0ed69550 Fix CellRef loading issue causing a startup script failure when TR_Mainland.esm is loaded. 2014-01-25 15:10:25 +01:00
scrawl f09328ca84 Clear global map overlay when starting/loading a game 2014-01-25 13:34:56 +01:00
scrawl a1ac99463f Fix an uninitialized value 2014-01-24 22:52:04 +01:00
Marek Kochanowicz 032c542396 improving the cell cloning. 2014-01-24 20:34:33 +01:00
gus 707e579dfe Merge branch 'master' of https://github.com/zinnschlag/openmw.git into AIFix2
Conflicts:
	apps/openmw/mwmechanics/aifollow.cpp
2014-01-24 19:16:50 +01:00
gus 5ca5946760 WIP 2014-01-24 19:13:23 +01:00
scrawl 03cf383be7 Merge branch 'master' of https://github.com/zinnschlag/openmw into savedgame
Conflicts:
	apps/openmw/mwgui/referenceinterface.cpp
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
	apps/openmw/mwscript/cellextensions.cpp
	apps/openmw/mwworld/cells.cpp
	apps/openmw/mwworld/cells.hpp
	apps/openmw/mwworld/cellstore.cpp
	apps/openmw/mwworld/store.cpp
	apps/openmw/mwworld/worldimp.cpp
2014-01-24 18:28:35 +01:00
scrawl 295aed3533 Implement savegame screenshots 2014-01-24 17:49:16 +01:00
scrawl 786ed6ca5b Include some required Ogre headers explicitely 2014-01-24 15:02:34 +01:00
scrawl ac1859fb77 Merge branch 'savedgame' of https://github.com/zinnschlag/openmw into savedgame 2014-01-24 15:02:13 +01:00
scrawl 9b9c39af7a Fix being able to activate magic bolts mid-flight 2014-01-24 13:22:39 +01:00
scrawl ac4c904e62 Fix projectile bug 2014-01-24 13:22:30 +01:00
Marek Kochanowicz 01be9386d6 Id to the coordinates with the boost and explicit specialisations of template member functions. 2014-01-24 11:22:20 +01:00
mrcheko 87e83a92f8 refactoring of setting an attack type 2014-01-23 23:14:20 +02:00
Marek Kochanowicz f390c7f4b0 Disable widgets in the cell creator. 2014-01-23 16:24:03 +01:00
Marek Kochanowicz c87d9ff38d Disable reference creator widget when in the clone mode. 2014-01-23 16:17:04 +01:00
Marek Kochanowicz dda7ddb6f8 Disable not needed referencable creator widget when in cloning mode. 2014-01-23 16:00:44 +01:00
Marek Kochanowicz 1b1ecafdd8 introduced missing columns to data 2014-01-23 15:13:37 +01:00
pvdk 19bef4fce8 Distinguish between release and development builds 2014-01-23 13:18:05 +01:00
scrawl 70264eae3b Feature #764: Quest completetion status in quest book 2014-01-23 13:08:56 +01:00
scrawl 849ee54399 Feature #764: Show quest names in quest book if present 2014-01-23 12:54:37 +01:00
Marc Zinnschlag 460089c0aa ignore deleted references that did not came from a content file 2014-01-23 12:53:55 +01:00
Marc Zinnschlag 419e3a7d30 write references in cells to saved game file 2014-01-23 12:51:42 +01:00
Marc Zinnschlag dd7d80ffbc removed a redundant field from object state 2014-01-23 12:51:25 +01:00
scrawl 358cc3c62f Closes #1060: Fix incorrect message box size 2014-01-23 12:24:06 +01:00
Marc Zinnschlag 22cb4784b5 store cell state in saved game files (no references yet) 2014-01-23 11:29:40 +01:00
Marek Kochanowicz 4d9d31b25e refrences cloning does not work 2014-01-23 09:41:09 +01:00
pvdk d92ded3bcd Forgot adding the version header CMake file 2014-01-22 19:30:41 +01:00
pvdk c354cd52be Added compile date and time to the version info in the launcher 2014-01-22 18:37:49 +01:00
pvdk fa186f5ec1 Added version information to the launcher 2014-01-22 17:51:10 +01:00
pvdk c95b8bcb39 Moved the generated version header stuff into components 2014-01-22 17:33:55 +01:00
pvdk 43bc223e68 Added version info retrieval from git tags 2014-01-22 17:04:49 +01:00
scrawl cf378ec31e Support optional volume and pitch arguments for soundgen events (e.g. moan 0.5 1.0) as required for some actors 2014-01-22 15:25:03 +01:00
scrawl 2e6e0fd0a0 Fix GetPcCell bug 2014-01-22 14:45:36 +01:00
scrawl ea21d8fec3 Fix CreatureTargetted function 2014-01-22 13:30:45 +01:00
scrawl 4c94289b1f Fix PC Health Percent function 2014-01-22 13:30:07 +01:00
scrawl f27701cbe8 Detect selling stolen items or enchanting with stolen items 2014-01-22 13:04:55 +01:00
scrawl 264226dfe3 Handle iWereWolfBounty 2014-01-22 12:33:47 +01:00
scrawl 194413c955 Feature #1119: Implement Resistance/Weakness to normal weapons magic effect. Handle fWereWolfSilverWeaponDamageMult. 2014-01-22 12:26:53 +01:00
scrawl f89c400305 Don't complain about greetings with no sound 2014-01-22 00:02:43 +01:00
scrawl 16f5f5862d Feature #956: Implement blocking melee attacks 2014-01-21 23:25:24 +01:00
Marek Kochanowicz b3b51992ef copying references. 2014-01-21 21:37:21 +01:00
Marc Zinnschlag 9ebe66e693 improved cleanup; failed loads will now drop back into the main menu instead of crashing 2014-01-21 14:50:58 +01:00
Marc Zinnschlag 0f60898517 adding missing cleanup for SoundManager 2014-01-21 14:13:13 +01:00
scrawl 82a07af72c Fix typo (should be Strength, not Luck). Use GMSTs for strength damage. 2014-01-21 12:30:23 +01:00
scrawl 1617a4f7d9 Use fCombatDistance 2014-01-21 12:30:23 +01:00
scrawl a4404054bb Feature #1130: Add race power spells for NPCs as well, not just the player 2014-01-21 12:30:23 +01:00
scrawl 5de8c7fe29 Feature #1130: Add auto-calculated NPC spells 2014-01-21 12:30:23 +01:00
scrawl 851a7d5014 Feature #957: Handle area effects for "on touch" range 2014-01-21 12:30:15 +01:00
Marek Kochanowicz bc0130f8d8 do not double check if record is deleted 2014-01-21 10:35:08 +01:00
Marek Kochanowicz 9b56b6585b Cloning works for referencables as well. 2014-01-21 09:43:02 +01:00
Marek Kochanowicz 7594bcf97a Small refactoring. 2014-01-21 08:27:29 +01:00
Marek Kochanowicz d0a52b7b24 mostly refreshing view. 2014-01-20 18:28:06 +01:00
Marek Kochanowicz 92ee252eef Small correction. 2014-01-20 16:39:42 +01:00
Marek Kochanowicz d82f272e05 Properly check if clone is deleted. 2014-01-20 16:17:49 +01:00
Marek Kochanowicz 5a52715701 implemented check for deletion. But it seems flawed. 2014-01-20 15:58:19 +01:00
Marek Kochanowicz 38636fab9a added setId to adapter 2014-01-20 14:38:20 +01:00
Marek Kochanowicz a45339bbe6 lower case in command, not in the collection 2014-01-20 14:14:59 +01:00
Marek Kochanowicz 33620a001b Cloning works for single record type tables. Well, kinda. 2014-01-20 13:59:00 +01:00
scrawl c8a9e9f7fa Stop AiCombat when the target is dead 2014-01-20 13:54:10 +01:00
scrawl 42284603f7 Properly handle on target effects with mArea=0 2014-01-20 13:44:38 +01:00
scrawl bd34b61f2a Set all keyframe-controlled bones as manually controlled 2014-01-20 13:37:34 +01:00
scrawl 9cedd3bb2e Fix spell area not displaying in tooltip 2014-01-20 13:11:34 +01:00
scrawl 205e8aa4e9 Feature #957: Implement area magic 2014-01-20 13:11:29 +01:00
scrawl ba5300b071 Update the Ptr in SoundManager for references moved to a different cell. Fixes looping sounds not stopping after a moved object was already deleted. 2014-01-20 12:05:13 +01:00
scrawl 5dd3cfa09a Loop projectile sounds 2014-01-20 11:50:52 +01:00
scrawl df7c139e2f Merge remote-tracking branch 'mrcheko/master' 2014-01-19 21:23:04 +01:00
scrawl fec26342cd Query the number of animation groups for death/hit animations, since they can vary a lot (argonian/khajiit, creatures, first person..) 2014-01-19 21:11:48 +01:00
mrcheko 339399f8b1 bug fix/logic fix/future suggestion 2014-01-19 22:09:51 +02:00
scrawl 05e75e1214 Closes #1127: Fix for subtitles for idle dialogue appearing outside of hearing range 2014-01-19 20:54:05 +01:00
scrawl bea161331c Play 'hello' voiced dialogue entries in AIWander 2014-01-19 20:53:58 +01:00
Marek Kochanowicz 0ea2bb7c4c Working on commands 2014-01-19 16:49:39 +01:00
scrawl 0adc0f56ed Issue #777: Consider weapons in Creature::hit 2014-01-19 16:13:16 +01:00
scrawl 9723263730 Bug #1126: Tweak creature attack distance a bit (still no idea where this should come from) 2014-01-19 14:47:58 +01:00
scrawl 1a00f26390 Bug #1126: Golden saints and many other creatures only have "Bip01 Head" 2014-01-19 14:33:41 +01:00
scrawl 4e360136b1 Merge remote-tracking branch 'mrcheko/master'
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
	apps/openmw/mwmechanics/character.cpp
	apps/openmw/mwmechanics/character.hpp
2014-01-19 14:01:39 +01:00
scrawl 047bbe43b2 Don't complain about missing jump animations 2014-01-19 13:46:40 +01:00
scrawl 13646a651b Issue #777: Handle creatures with weapons in CharacterController. Move attack strength to CreatureStats. 2014-01-19 13:32:58 +01:00
scrawl 198bb0de60 Issue #777: Add CreatureAnimation variant for creatures with weapons/shields 2014-01-19 13:05:26 +01:00
Marek Kochanowicz b3e45c55bc progressing with the cloning 2014-01-19 11:44:47 +01:00
scrawl 589fbbd871 Issue #777: Create InventoryStore for creatures with weapons/shields 2014-01-19 11:43:23 +01:00
scrawl 69ca03c308 Issue #777: Move DrawState to CreatureStats. All creatures can cast spells, and some creatures have weapons. 2014-01-19 09:43:41 +01:00
scrawl 947b6c9645 kOgrePi unused 2014-01-18 22:16:31 +01:00
scrawl 4c0045b418 Bug #1109: Do not reset water level when loading a plugin with no water level record (for real this time) 2014-01-18 21:11:12 +01:00
Marc Zinnschlag 14e64c180f on load check player record for dangling ID references 2014-01-18 15:06:58 +01:00
Marc Zinnschlag 6584a01d01 reset reference to player NPC record during cleanup 2014-01-18 14:53:25 +01:00
mrcheko 969340d61b fixed StartCombat script 2014-01-18 12:55:17 +02:00
scrawl 525ce2f042 Some cleanup - move definitions to implementation file 2014-01-18 10:52:16 +01:00
scrawl c04a8afc8b Make sure onPcEquip is also set for Equip script instruction 2014-01-18 10:51:52 +01:00
scrawl 9653355cf1 Feature #701: Spawn levelled creatures in cells 2014-01-18 07:26:27 +01:00
mrcheko df4df5b094 fixed weapRange for creatures/startcombat script(?) 2014-01-17 23:30:28 +02:00
scrawl 5049f3b134 Fix the group for creature attack animations 2014-01-17 20:18:35 +01:00
mrcheko a11a6b616b Merge remote-tracking branch 'upstream/master' 2014-01-17 21:00:55 +02:00
mrcheko 435bbdd530 one more mismatch fixed 2014-01-17 20:55:21 +02:00
mrcheko 46a4790cb1 final warnings removal 2014-01-17 20:33:49 +02:00
mrcheko 7df8273d71 fix for everybody 2014-01-17 20:01:15 +02:00
scrawl 3dcb292bc1 Do not soul trap creatures without a soul (which apparently exist) 2014-01-17 18:43:45 +01:00
mrcheko 5357f569e6 fix for scrawl 2014-01-17 19:36:22 +02:00
scrawl 149d77dedf Feature #960: Add knockdown and hit recovery for creatures 2014-01-17 17:41:16 +01:00
scrawl 9b32b1403b Feature #960: Implement Creature::hit 2014-01-17 17:19:08 +01:00
scrawl 228254c890 Handle creature attack animations in character controller 2014-01-17 16:31:27 +01:00
scrawl c76a0448a3 Closes #1123: Implement SlowFall magic effect 2014-01-17 15:47:34 +01:00
scrawl 27d0d9c592 Fix exception when clicking on statics when in the inventory window 2014-01-17 15:27:59 +01:00
scrawl 37a59a37c6 Remove cpack (no longer used, according to BrotherBrick) 2014-01-17 15:20:28 +01:00
scrawl 5fc38e7ac4 Don't use blood effects for fatigue damage 2014-01-17 15:20:28 +01:00
scrawl 659d790048 uuid is not used 2014-01-17 15:20:28 +01:00
scrawl c548dcee13 Quick keys menu: make sure selected spell still exists 2014-01-17 15:20:22 +01:00
Marc Zinnschlag 1b7697a4b2 handle missing player specific state during load/save 2014-01-17 13:07:57 +01:00
scrawl 805843d7ff Closes #1086: Implement blood effects 2014-01-17 11:27:13 +01:00
scrawl 240d96a0f1 Renamed AnimationValue to AnimationTime 2014-01-17 10:55:46 +01:00
scrawl 11394d83c5 Feature #1086: Import blood models/textures in MWIniImporter 2014-01-17 10:55:46 +01:00
scrawl ddc432c7ef Fix stealing bug 2014-01-17 10:55:46 +01:00
scrawl e410eb5273 Play 'Idle' voiced dialogue entries in AIWander. Tweak voice max distance. 2014-01-17 10:55:46 +01:00
scrawl 2836c7c927 Do not set owner when adding items to a container, as opposed to NPC/creatures 2014-01-17 10:55:46 +01:00
scrawl fe66012bcd Closes #1115: Fix a bug causing number of AI packages to grow exponentially when adding an AI package. Not sure if adding the same package twice should even be allowed. 2014-01-17 10:55:46 +01:00
scrawl f070d9966d Implement movement speed formula for creatures. Still moving a bit too slow. 2014-01-17 10:55:46 +01:00
Marc Zinnschlag ce00639d31 added missing birthsign field to player state record 2014-01-17 10:51:52 +01:00
mrcheko f2ad1c18f2 fix merging problem/some logic fixes 2014-01-16 22:24:05 +02:00
Marc Zinnschlag b9869e8519 Merge remote-tracking branch 'ace/patch-1' 2014-01-16 12:19:32 +01:00
Marc Zinnschlag 671d0e46e2 Merge remote-tracking branch 'nobrakal/patch-1' 2014-01-16 12:18:54 +01:00
Alexander "Ace" Olofsson ddf72c06de Update statswindow.cpp
Fixes a build issue on MSVC ('floor' : ambiguous call to overloaded function)
2014-01-16 12:09:50 +01:00
Marc Zinnschlag c300cd9375 loading/saving of some player state (cell/coordinates and some other bits) 2014-01-16 12:03:23 +01:00
Marc Zinnschlag d8d4f1a15e some fixes to record structs 2014-01-16 12:02:45 +01:00
nobrakal e638b8b8cb Update openmw.desktop
Fix bad output of desktop-file-validate for openmw.dektop
2014-01-16 08:44:56 +01:00
nobrakal 278876d6fb Update opencs.desktop
Fix bad output of desktop-file-validate for opencs.dektop
2014-01-16 08:41:29 +01:00
mrcheko d5f794d4fb update to combat ai behaviour 2014-01-15 22:56:55 +02:00
scrawl ea8f60eddf Implement movement speed formula for creatures. Still moving a bit too slow. 2014-01-15 16:30:16 +01:00
scrawl d544551f61 Added getSkill to Class interface, since creatures also have skills (which are provided by generalized Combat, Magic and Stealth attributes which substitute for the specific skills, in the same way as specialization)
Information provided by Hrnchamd.
2014-01-15 15:50:45 +01:00
scrawl 7534fc968d Minor acrobatics fixes 2014-01-15 14:53:30 +01:00
scrawl 28a2585106 Unsheath weapon in AiWander 2014-01-15 14:53:29 +01:00
scrawl dff67bb0b6 StopCombat: mark as non-hostile 2014-01-15 14:53:29 +01:00
scrawl da3295d69c Closes #1106: Move stance to CreatureStats, since creatures also have separate run/walk animations. 2014-01-15 14:53:29 +01:00
scrawl 0a8c61a7fe Bug #1107: Reverted previous fix, which caused problems with some actors not using a box shape as expected. Instead, do not create a bounding box collision shape for hidden nodes. 2014-01-15 14:53:29 +01:00
scrawl 03b2e99802 Remove unused Combat stance 2014-01-15 14:53:29 +01:00
scrawl 79a6ffd216 Closes #1107: Do not create box shapes unless the box collision flag is enabled 2014-01-15 14:53:29 +01:00
scrawl 3ea1407ed3 Closes #1109: Don't reset water level when loading a plugin that does include water level records 2014-01-15 14:53:29 +01:00
scrawl d4aeb177f9 Remove unused btKinematicCharacterController 2014-01-15 14:53:29 +01:00
scrawl 264736c139 Remove hopelessly outdated nifogre tests 2014-01-15 14:53:29 +01:00
scrawl d0500e8124 Some unneeded includes cleanup 2014-01-15 14:53:28 +01:00
scrawl 0c4b6ea89f Minor fix 2014-01-15 14:53:28 +01:00
scrawl a432661b8a Minor correction 2014-01-15 14:53:28 +01:00
scrawl de64c57179 Fix some typos and accidental commit 2014-01-15 14:53:28 +01:00
Marc Zinnschlag 9b31bbc00b Merge remote-tracking branch 'bwrsandman/patch-1' 2014-01-15 14:41:02 +01:00
Marc Zinnschlag bf1a37dc38 Merge remote-tracking branch 'sirherrbatka/referencables_verifer' 2014-01-15 14:29:54 +01:00
Sandy a4602326f3 openmw is now available in [community] 2014-01-15 07:30:07 -05:00
Marek Kochanowicz 6224344957 Being any idiot is hard. 2014-01-15 12:52:38 +01:00
Marek Kochanowicz 3d722ba104 Corrected brackets. 2014-01-15 11:59:11 +01:00
Marek Kochanowicz fbcb1a14fc ooops, using search id 2014-01-15 11:12:56 +01:00
Marek Kochanowicz 89d4a90c06 Localised version of morrowind will no longer spam false positives. Don't check diff, please. 2014-01-15 10:30:43 +01:00
Marek Kochanowicz 344cae8f99 added new entry to the context menu 2014-01-14 15:44:04 +01:00
Marc Zinnschlag 8c5f313546 added savedgame-specifc record structs for objects state 2014-01-14 15:29:55 +01:00
greye 61707694e8 fix memory leak in AISequence 2014-01-14 16:22:50 +04:00
Marek Kochanowicz 6397d9d40e Added mCloneAction member 2014-01-14 13:12:15 +01:00
greye 15d946415e minor cleanup
Removed case folding via std::transform, excessive lowerCase()
replaced with ciEqual().
2014-01-14 12:46:53 +04:00
Marek Kochanowicz a81d9c23f8 Merge branch 'master' of https://github.com/zinnschlag/openmw 2014-01-14 09:36:29 +01:00
Marek Kochanowicz c981a2a6f8 Removed boost in favor of #include <components/misc/stringops.hpp>. Hopefully this will make scrawl happy. :P 2014-01-14 09:25:03 +01:00
Marek Kochanowicz 2c1ef610b9 Moving back to boost for case insensitive comparsion. 2014-01-14 09:16:59 +01:00
scrawl 52b9ebff9d Closes #1092: Implement sleep interruption. Fix levelled list flags for creatures. Change World::copyObjectToCell to search for the correct cell. 2014-01-14 07:42:03 +01:00
scrawl 69381c49c7 Added a todo comment 2014-01-14 07:39:44 +01:00
scrawl b8583124e0 Correction for RemoveSoulgem instruction 2014-01-14 06:13:30 +01:00
scrawl 26d972280f Fix a few text defines 2014-01-14 06:03:34 +01:00
scrawl 90b92a8f41 Move levelled list code out of ContainerStore 2014-01-14 05:37:06 +01:00
scrawl 6aa56354c0 Revert "Bug #991: Don't autoequip items with harmful permanent enchantments"
This is no longer needed, since merchants no longer equip items sold to them (2f35e5a04e). Also, items with harmful enchantments that are initially in the NPCs inventory *must* be equipped (e.g. slave bracers)

This reverts commit 71d9755ef1.
2014-01-14 05:24:58 +01:00
scrawl 9de3abcb5f Closes #1105: Do not reduce magicka if unable to cast 2014-01-14 03:34:30 +01:00
scrawl 396efd580b Fix a leftover of the old coordinate system 2014-01-14 03:26:56 +01:00
scrawl 2196ce427a Closes #556: Link movie volume to 'master' volume slider, instead of 'music'. 2014-01-14 03:08:37 +01:00
scrawl 95651857f3 Fix code duplication 2014-01-14 02:52:34 +01:00
scrawl 0d0005c433 Fix fatigue not restoring when waiting 2014-01-14 02:20:13 +01:00
Marek Kochanowicz e34cb9e931 changed according to the scrawl sugestion 2014-01-13 19:17:03 +01:00
Marek Kochanowicz 59de794e58 Creature check was not invoked. 2014-01-13 19:02:23 +01:00
Marek Kochanowicz 17cc6a695c fixed bug resposnsible for exception throwed. 2014-01-13 18:34:28 +01:00
scrawl ba27b693f8 Increase sneak skill on successful pickpocket 2014-01-13 10:18:03 +01:00
scrawl 73268a8606 Fix skill progress not working 2014-01-13 10:18:03 +01:00
scrawl cd06b2177d Automatically knock down when fatigue goes below zero 2014-01-13 10:18:03 +01:00
scrawl 413bf127de Allow drain fatigue effect to reduce below zero 2014-01-13 10:18:02 +01:00
scrawl 3a1b6dd354 Handle fCombatKODamageMult and fCombatCriticalStrikeMult. Fix SelectWrapper Function_Detected. 2014-01-13 10:18:02 +01:00
scrawl 83872f6bf5 Knockdown / hit recovery improvements. Use formula and GMSTs from research wiki for knockdown determination. Hand-to-hand automatically knocks out when fatigue empty. 2014-01-13 10:18:02 +01:00
Marc Zinnschlag 3e58eb34e4 Merge remote-tracking branch 'sergeyshambir/startcombat'
Conflicts:
	apps/openmw/mwscript/docs/vmformat.txt
2014-01-13 10:17:10 +01:00
Marc Zinnschlag 63cd70f810 some junk removal 2014-01-13 10:03:25 +01:00
scrawl 7983b07b10 Get bk_treasuryreport script to work properly:
- OnPcEquip needs to be set on *using* any item, not just equipping
 - Handle PcSkipEquip
 - Execute item's script once immediately after setting OnPcEquip
 - Do not set OnPcEquip when an item that has skipped equipping sets pcskipequip back to 0 and gets equipped
2014-01-13 06:20:18 +01:00
gus 5d4e148063 some clean up 2014-01-12 22:47:22 +01:00
Marc Zinnschlag e453468eff moved CellRef loading code to the CellRef class 2014-01-12 19:23:08 +01:00
gus 5d038423ec attempt to solve Bug #1009 by not building graph every frame 2014-01-12 18:42:31 +01:00
Marc Zinnschlag 9025210965 Merge branch 'refnum' into savedgame
Conflicts:
	apps/openmw/mwworld/cellstore.cpp
	apps/openmw/mwworld/manualref.hpp
	components/esm/cellref.hpp
2014-01-12 16:58:06 +01:00
gus 0e46c40cb5 Make ACtionTeleport non player specific and teleport actors following the teleporting actor 2014-01-12 14:03:11 +01:00
gus 1ae62665d6 get all actors following a given actor 2014-01-12 14:02:40 +01:00
gus dd870e35db get all actors following a given actor 2014-01-12 14:02:15 +01:00
gus 2446abe076 Allow getting current active package 2014-01-12 14:01:54 +01:00
gus 7e96a391da FollowCell duration = 0 -> infinite time 2014-01-12 11:39:42 +01:00
gus 7066844e52 Follow you until a certain cell is reached 2014-01-12 11:38:58 +01:00
scrawl f78b846f9e Handle CasterLinked magic effect flag 2014-01-12 10:21:49 +01:00
scrawl 767c72e619 Fix diagonal movement being faster than forward movement 2014-01-12 10:04:06 +01:00
scrawl fb778f8ecd Use fEncumbranceStrMult 2014-01-12 04:09:51 +01:00
scrawl 1d19d36bd6 Remove unused magic effect flags and update esmtool output 2014-01-12 01:25:00 +01:00
scrawl 921ef6cd9c Closes #1093: Show weapon when initializing the character controller with a weapon equipped 2014-01-12 00:42:27 +01:00
scrawl 10ddea45e9 Move crime from onHit to hit, since failed hits are apparently also a crime 2014-01-11 23:12:21 +01:00
scrawl 44b2380874 Closes #947: Decrease fatigue when running, swimming and attacking 2014-01-11 22:28:50 +01:00
scrawl dddc0979a2 Fix another fatigue cap issue 2014-01-11 22:28:50 +01:00
scrawl 224f288359 Don't attempt to change disposition for creatures 2014-01-11 21:30:26 +01:00
scrawl 3db299f1b2 Fix fall damage crash 2014-01-11 21:30:26 +01:00
gus 051d7141be check position to stop AIFollow 2014-01-11 20:32:38 +01:00
Marc Zinnschlag 5ea25dc269 player state cleanup 2014-01-11 15:34:32 +01:00
Marc Zinnschlag b1ffb64a1f Merge remote-tracking branch 'gus/AIFix2' 2014-01-11 14:33:27 +01:00
gus ccf07f9406 Bugfix 2014-01-11 12:07:10 +01:00
gus 2d66b2c4fa AiFollow. Npc get stuck often (no stuck dtection yet) 2014-01-11 12:06:36 +01:00
gus f41f08c352 Wrong logic... should improve performances 2014-01-11 12:04:32 +01:00
gus 0609b71df9 fix pathfinding 2014-01-11 11:57:07 +01:00
Marc Zinnschlag a0872b2646 Merge remote-tracking branch 'gus/AIFix2' 2014-01-11 11:51:53 +01:00
Marc Zinnschlag 1b03eec63e Merge remote-tracking branch 'scrawl/master' 2014-01-11 11:43:12 +01:00
gus 828e5841d8 Windows SDL fix 2014-01-11 11:00:34 +01:00
scrawl a2ba0dde31 Implemented GoToJail 2014-01-11 06:47:58 +01:00
scrawl 3896c88403 Use VFX_DefaultCast / VFX_DefaultHit if the magic effect does not specify any 2014-01-11 05:58:05 +01:00
scrawl ce6aab89cf Fix a possible permutation issue 2014-01-11 04:58:30 +01:00
scrawl 9ddee8fd8c Autocalculate NPC reputation as according to research wiki 2014-01-11 04:03:13 +01:00
scrawl 9127839cc1 Add a searchPtr method as required for getting an owner, which may already be dead and disposed of. 2014-01-11 03:33:17 +01:00
scrawl bf6d302fba Confiscate stolen items when caught 2014-01-11 03:29:41 +01:00
scrawl 909494ff35 Implement Assault crimes. In other words, NPCs now fight back! 2014-01-11 03:08:16 +01:00
scrawl 12944f2459 Fix an auto equipping bug that allowed twohanded weapon and shield at the same time 2014-01-11 03:07:35 +01:00
scrawl d4a98ffc27 Increase fight rating when being the victim of a crime 2014-01-11 02:27:44 +01:00
scrawl aba72ffefe Fix up the merge a bit 2014-01-11 02:12:41 +01:00
scrawl 727aa30347 Dead actors are unaware of everything 2014-01-11 02:06:54 +01:00
scrawl c64dc2c831 Terrain specular mapping: use a "_diffusespec" postfix to indicate specular information is present in the alpha channel. Use alpha directly instead of 1-alpha. 2014-01-11 00:51:03 +01:00
scrawl d01f89b153 Rewrite some awful code 2014-01-11 00:24:21 +01:00
scrawl e9f63270d9 Speed fix for "on target" spells 2014-01-10 22:51:42 +01:00
scrawl 621e52f09d Play "attack" voiced dialogue entries randomly based on iVoiceAttackOdds. 2014-01-10 22:48:42 +01:00
scrawl d9d6f37619 Use iVoiceHitOdds 2014-01-10 22:44:40 +01:00
scrawl 15e48107f7 Use i1stPersonSneakDelta + some cleanup 2014-01-10 22:39:01 +01:00
scrawl 2744cde40f Use a few additional GMSTs 2014-01-10 22:27:31 +01:00
scrawl 3bf36515d5 Implement Trespassing crime 2014-01-10 21:26:24 +01:00
scrawl f5a70dccf0 Fix title of buttons in generate class result dialog 2014-01-10 21:13:03 +01:00
scrawl 627dcddb33 Do not allow training skills above their governing attribute 2014-01-10 20:53:53 +01:00
Marc Zinnschlag f62497dfdc Merge remote-tracking branch 'mrcheko/master' 2014-01-10 19:08:35 +01:00
mrcheko ffcb7fb280 fix for bug scrawl mentioned 2014-01-10 19:04:07 +02:00
Marek Kochanowicz cb0d3794f7 Final check is not performed with just +1! Something is not right. 2014-01-10 11:01:29 +01:00
Marek Kochanowicz 688488de62 replaced == operator for string comparsion in npc check with boost algorithm to get case insensitive check. 2014-01-10 10:43:03 +01:00
Marek Kochanowicz 31c59db71c Splited another long line in the header. 2014-01-10 10:22:18 +01:00
Marek Kochanowicz 468b9d7340 camel case in the header 2014-01-10 09:50:56 +01:00
Marek Kochanowicz e4d637fd64 splited long lines in the header. 2014-01-10 09:49:05 +01:00
Marek Kochanowicz b98cdabe89 Shameful bug fixed. 2014-01-10 09:42:36 +01:00
scrawl bfdca3b738 Fix needTangents not being set for cached/shared materials 2014-01-09 23:13:31 +01:00
mrcheko d41f27451b appropriate camera vanity<>preview mode switch + hit recoils fix 2014-01-09 23:36:40 +02:00
scrawl 546b0cee76 Closes #1077: Replace tags before trying to get the message length 2014-01-09 22:17:51 +01:00
scrawl aa855e9524 Include some required Ogre headers explicitely 2014-01-09 20:56:24 +01:00
Marc Zinnschlag 5e2eb8caf8 Merge remote-tracking branch 'swick/master' 2014-01-09 09:47:42 +01:00
Marc Zinnschlag 85707b5e3e Merge remote-tracking branch 'scrawl/master' 2014-01-09 09:35:54 +01:00
scrawl 768d9f7237 Scripting: Add an optional 'required' parameter to getReference (default: true). If required=false, it will not throw an exception if there's no reference. Fixes PcExpell not working without a reference like it's supposed to, and makes the code nicer for some others (use required=false instead of catching the exception) 2014-01-09 02:21:03 +01:00
scrawl 223c1d5a38 Use GMSTs for crime bounty 2014-01-09 02:20:52 +01:00
scrawl 6f9113fe88 Add preliminary implementation of PayFine, PayFineThief and GoToJail instructions 2014-01-09 01:49:58 +01:00
scrawl baf55df7a1 Gold fixes (when did this break?) 2014-01-09 01:34:10 +01:00
Sebastian Wick 925d28e4a7 crashcatcher uname error checking 2014-01-09 00:52:37 +01:00
scrawl 9bf7bf529c Implement crime-related dialogue globals as they are described in MSFD 2014-01-09 00:40:25 +01:00
scrawl d7f69205f6 Don't play "Menu Click" sound for disabled (= cannot receive input) buttons, plus some redundancy fixes 2014-01-09 00:06:24 +01:00
scrawl 0f5dc59176 Remove useless dependencies on InventoryWindow for getting player gold. Don't use string literals for gold_001 id, just to be sure. 2014-01-08 23:37:46 +01:00
scrawl 372cd437d1 Add a utility function for counting items in a container 2014-01-08 23:00:29 +01:00
Marc Zinnschlag 92521bd23d updated changelog 2014-01-08 20:27:33 +01:00
scrawl c55f9bd0aa GetWaterLevel fix (similar to MCP): if there is no water in the cell, return -FLT_MAX to prevent mods from incorrectly thinking the player is underwater. 2014-01-08 20:19:47 +01:00
Marc Zinnschlag 7c8f735004 Merge remote-tracking branch 'corristo/osx-fixes' into openmw-28 2014-01-08 20:16:39 +01:00
Marc Zinnschlag 3127b8518e updated credits file 2014-01-08 20:15:54 +01:00
Marc Zinnschlag a7be755db0 Merge remote-tracking branch 'mrcheko/master' 2014-01-08 20:13:31 +01:00
scrawl bf02b77c1d Closes #1090: Don't throw an exception if a cell has no region in GetPCCell 2014-01-08 19:57:13 +01:00
scrawl 154fae9f25 Don't suppress exceptions thrown while running scripts 2014-01-08 19:52:57 +01:00
scrawl 9baa1bef78 Expell player from faction when committing a crime against a faction member 2014-01-08 19:26:03 +01:00
scrawl 19d63f392f Clean up the NpcStats expelled interface. Show message box when expelled. 2014-01-08 18:59:00 +01:00
scrawl 098f9712f1 Add getPlayerPtr() utility method. Reduces dependencies a lot. 2014-01-08 18:39:44 +01:00
scrawl 7b33f6f2ac Detect crime of sleeping in other NPC's beds. ShowRestMenu needs to support an explicit/implicit reference for this. 2014-01-08 17:19:43 +01:00
scrawl b99ca92fee Add missing line of sight check 2014-01-08 17:18:13 +01:00
Nikolay Kasyanov bc90443aeb Revert "Music playback on OS X >= 10.9 works again. Fixes bug #1041."
This reverts commit fc21dd1f3a.
2014-01-08 18:07:58 +04:00
mrcheko 46519062d3 hit recoils/knockdowns feature 2014-01-08 16:05:14 +02:00
scrawl 2bb21f2f76 Don't copy NpcStats/CreatureStats unnecessarily. Fixes a bug: taunt actions would not correctly increase the target's fight rating. 2014-01-08 02:35:36 +01:00
scrawl c85c2cff4e Fix disposition changes from trades not applying properly 2014-01-08 01:46:42 +01:00
scrawl 728365b48d Remove an unused hook 2014-01-07 21:07:02 +01:00
scrawl 03b6334ceb Get rid of a hack 2014-01-07 20:43:08 +01:00
scrawl 0285d18fc2 Respect items belonging to a faction 2014-01-07 20:24:01 +01:00
scrawl 3c0080d2c1 Implement theft detection 2014-01-07 19:58:17 +01:00
scrawl d2d76f4f47 Fix disintegration bug 2014-01-07 19:21:19 +01:00
scrawl c4ab2f417a Fix exception closing container window 2014-01-07 18:11:19 +01:00
scrawl d97615d5d8 Support separate specular maps 2014-01-07 18:05:44 +01:00
scrawl 90b55c8d4b Use Ogre's asin/acos functions which will protect against NaNs 2014-01-07 17:09:08 +01:00
Marc Zinnschlag 48a08c4c4d Merge remote-tracking branch 'endorph/master' 2014-01-07 14:12:15 +01:00
Dmitriy 'Endorph' Shkurskiy 9afa8e952e tabs -> spaces 2014-01-07 14:32:14 +02:00
Marc Zinnschlag 72a81a2381 Merge remote-tracking branch 'scrawl/master' 2014-01-07 10:17:33 +01:00
scrawl 780bf5a2cd Implement pickpocket detection. Play a voiced dialogue entry when detected. 2014-01-07 03:01:33 +01:00
scrawl ea3ee4407f oops, didn't mean to commit this 2014-01-07 02:48:44 +01:00
Sergey Shambir d5a0ff17fd MWScript: updated vmformat.txt, changed opcodes to fix sequence.
Opcodes for StartCombat, StopCombat, GetTarget now follow the last
previous opcode.
2014-01-07 05:06:20 +04:00
Sergey Shambir d536ff3cdc printAIPackage: changed field name from Unknown to ShouldRepeat too. 2014-01-07 04:58:59 +04:00
Sergey Shambir 5c7e39a92f Implemented script commands StartCombat, StopCombat, GetTarget.
Also renamed one field of AIWander class because it's not longer
unknown.
2014-01-07 04:43:06 +04:00
scrawl 887db76ed2 Don't consider swimming or in-air characters as sneaking 2014-01-07 01:22:04 +01:00
scrawl 29c823b9d4 Implement awareness check function. Use this for combat AI and GetDetected instruction. 2014-01-07 00:51:09 +01:00
scrawl 4a3d148a48 Fixes #1089 (skill increases) 2014-01-07 00:37:52 +01:00
Marek Kochanowicz b85fe2becf Changes according to the comment. 2014-01-06 23:37:18 +01:00
Marc Zinnschlag fefaec5804 Merge remote-tracking branch 'scrawl/savedgame' into savedgame 2014-01-06 22:30:08 +01:00
scrawl 68b87714bb Addition to 2f35e5a04e: companions should still auto equip 2014-01-06 22:14:11 +01:00
mrcheko 2591ff2d5a bug repairing 2014-01-06 22:00:01 +02:00
scrawl 4ad43fdf92 Closes #1088: Quick&dirty fix for NIF filters not working properly with some mods 2014-01-06 19:01:05 +01:00
Marek Kochanowicz 06f8537087 added final check for player npc. Removed useless includes. However, this code spams exceptions and I can't figure out why. 2014-01-06 18:43:44 +01:00
Marc Zinnschlag 43dd3b8ef2 removed redundant deletion flag from CellRef 2014-01-06 13:53:20 +01:00
Marc Zinnschlag 0ad7aa1f53 Merge remote-tracking branch 'scrawl/master' 2014-01-06 10:22:07 +01:00
scrawl 62774fcc4a Merge branch 'master' into HEAD
Conflicts:
	apps/openmw/mwbase/world.hpp
	apps/openmw/mwinput/inputmanagerimp.cpp
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwworld/worldimp.cpp
	apps/openmw/mwworld/worldimp.hpp
	components/esm/loadtes3.cpp
2014-01-06 00:23:17 +01:00
scrawl 2f35e5a04e Stop merchants from autoequipping items sold to them 2014-01-05 22:43:09 +01:00
Marc Zinnschlag e63b4964b2 Merge remote-tracking branch 'scrawl/master' 2014-01-05 21:27:06 +01:00
scrawl dde2cd5d5a Fix some code that still used setCount directly instead of using the ContainerStore interface. Also fix a related annoyance with the interface. 2014-01-05 20:53:45 +01:00
scrawl 73f8161d1e Fix spell deletion not resetting the selected spell correctly 2014-01-05 19:40:05 +01:00
scrawl b3764c504a Implement GetPcJumping instruction 2014-01-05 19:08:12 +01:00
scrawl 45847c67ad Lock NIF cache when loading an interior cell as well. Should improve load performance. 2014-01-05 18:38:21 +01:00
scrawl c004fb778f Get rid of underscore defines. They are reserved by the standard. 2014-01-05 18:22:29 +01:00
scrawl b8e9343764 Extend NifOverrides to allow material overrides, useful for texture modding e.g. adding normal maps without having to edit the affected meshes 2014-01-05 18:09:50 +01:00
Marek Kochanowicz c69814ed14 corrected one, additional name to follow policy 2014-01-05 18:00:49 +01:00
Marek Kochanowicz 4338706307 static is a keyword. renamed static to staticElement 2014-01-05 17:31:54 +01:00
Marek Kochanowicz 80d424591f npc instead of NPC. 2014-01-05 17:28:47 +01:00
Marek Kochanowicz 693c398204 forgot to save the file before comit -_-' 2014-01-05 17:05:57 +01:00
Marek Kochanowicz 873870c7ce Chainging names to comply our policy. 2014-01-05 17:04:57 +01:00
scrawl ce013315ba Nothing to see here, move along.
Fine... it's flying cliff racers. But did you really want to know?
2014-01-05 16:09:06 +01:00
Marek Kochanowicz c1f4a9cb0e Added proper id check. 2014-01-05 12:18:26 +01:00
Marek Kochanowicz 89d8ee62fa Removing name check from listCheck. Id can't be empty to be sure. 2014-01-05 12:12:36 +01:00
Marc Zinnschlag 46931d85a0 changed changelog 2014-01-05 11:51:31 +01:00
Marek Kochanowicz 220d92f865 changed ID check in leveled list to name. 2014-01-05 11:30:03 +01:00
scrawl 44e96fcaaa Implement Charm magic effect 2014-01-05 01:56:36 +01:00
scrawl 14b70a3ce6 Implement AI related magic effects (calm, frenzy, rally, demoralize, turn undead) 2014-01-05 01:34:35 +01:00
scrawl 634a53211c Make sure materials are built before trying to determine their transparency 2014-01-04 22:56:06 +01:00
pvdk 92234cf783 Changed crashcatcher's uname system info retrieval and cleaned indentation 2014-01-04 21:46:38 +01:00
scrawl c4e4a8fb57 Closes #1083: Fix werewolf change handling 2014-01-04 20:50:18 +01:00
scrawl f4517c8221 For dialogue filtering, use the Vampirism magic effect instead of the untouched NpcStats::mVampire 2014-01-04 20:50:18 +01:00
mrcheko 7002412760 resolve conflict in character.cpp 2014-01-04 17:55:09 +02:00
Marek Kochanowicz e860717105 replaced raw values with enums. 2014-01-04 15:28:08 +01:00
Marek Kochanowicz 558690b571 implemented list of magical bolts for skipping. 2014-01-04 15:19:17 +01:00
Marek Kochanowicz dfd1058551 Various style corrections. 2014-01-04 14:49:01 +01:00
Marek Kochanowicz aa05ffcf60 Splited some long argument lists to the multiple lines. 2014-01-04 13:05:19 +01:00
Marc Zinnschlag 356b53bd22 Merge remote-tracking branch 'scrawl/master' 2014-01-04 11:38:31 +01:00
Dmitriy 'Endorph' Shkurskiy 116f125f05 Windows-specific definition to deny SDL from providing it's own WinMain() 2014-01-04 07:46:30 +02:00
Dmitriy 'Endorph' Shkurskiy 7023395012 Windows-specific definition to omit inclusion of unused stuff from Windows.h 2014-01-04 07:46:29 +02:00
Dmitriy 'Endorph' Shkurskiy 18d4cdb2ac Fix for VS2010-Debug: manual assignment operator and cctor added for MMWorld::ContainerStoreIterator 2014-01-04 07:46:29 +02:00
scrawl 16838595a3 Another console fix: discard text markup when getting the command line's text 2014-01-04 05:24:32 +01:00
scrawl af3569665c Remove unused font 2014-01-04 05:19:08 +01:00
scrawl 1b96c5d266 Console improvements: Show scrollbar, allow copying text from the history 2014-01-04 05:13:53 +01:00
scrawl 710a1e2f37 Smash case for manual reference IDs as well, consistent with references in data files 2014-01-04 04:39:06 +01:00
scrawl 557652112f Show the target HP bar also when casting a heal effect (same as MCP) 2014-01-04 04:21:44 +01:00
scrawl 12691040d1 Fix incorrect disposition testing and get rid of of a related hack that is no longer needed. 2014-01-04 02:49:10 +01:00
scrawl 09d491d1ba Move a piece of functionality to its appropriate place 2014-01-04 01:13:19 +01:00
scrawl be2ebc5cac Closes #1081: Implement disease contraction 2014-01-03 23:33:14 +01:00
scrawl 2a7d610f87 Implement GetSpellReadied instruction 2014-01-03 22:55:17 +01:00
scrawl c0fbcf413f Use the playermagic and playerfighting control switches 2014-01-03 22:44:35 +01:00
scrawl e9bd43e2da Use GMSTs for bound items/creatures 2014-01-03 20:54:14 +01:00
Marek Kochanowicz 1c3296fb64 Some changes in weapons check. 2014-01-03 18:25:06 +01:00
scrawl 617a65cdd2 Print message to dialogue window after successful trade 2014-01-03 17:40:14 +01:00
scrawl b22dd40b41 Implement Paralyze magic effect 2014-01-03 17:06:05 +01:00
Marc Zinnschlag ee621245bb Merge remote-tracking branch 'scrawl/master' 2014-01-03 15:59:06 +01:00
scrawl 55c5d7cee4 Implement Resurrect instruction 2014-01-03 15:54:23 +01:00
Marek Kochanowicz 7b63e1942c style corrections 2014-01-03 11:42:49 +01:00
Marek Kochanowicz 24f090ca98 Finishing stuff. 2014-01-03 11:31:54 +01:00
Marek Kochanowicz 8201c97abf Inventory item template. 2014-01-03 09:16:41 +01:00
scrawl b4230f716e Implement RemoveEffects instruction 2014-01-03 05:19:10 +01:00
scrawl 7d8ca91286 Implement RemoveSpellEffects instruction 2014-01-03 05:18:44 +01:00
scrawl 366801f3d5 Implement explodeSpell instruction (like Cast, with caster = target) 2014-01-03 04:44:50 +01:00
scrawl 93e1a2df73 Implement Cast script instruction (shrines work now) 2014-01-03 04:09:52 +01:00
scrawl b42240be6d Implement Damage/restore skill/attribute effects. Use dedicated classes for skill and attribute values (instead of Stat<T>) since there are some important differences. 2014-01-03 03:48:43 +01:00
scrawl 32ff3b530c Change all instances of skill/attribute values to use an appropriate typedef. 2014-01-03 01:59:15 +01:00
scrawl 623cdef69f Code cleanup 2014-01-02 21:49:12 +01:00
scrawl eba60858dd Closes #1078: Show stat bar text even when 0 2014-01-02 21:48:33 +01:00
Marc Zinnschlag 3b75f6676c Merge remote-tracking branch 'scrawl/openmw-0.28' into openmw-28 2014-01-02 21:27:08 +01:00
scrawl 299690631f Implement SoulTrap magic effect 2014-01-02 21:21:28 +01:00
mrcheko 79e972bdb6 resolved accompanying minor problems 2014-01-02 21:54:41 +02:00
Marc Zinnschlag 0ded85893b updated changelog again 2014-01-02 20:47:43 +01:00
Lukasz Gromanowski b017a3be3e Bug #1074: Inventory paperdoll obscures armour rating
Changed size of inventory paperdoll.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2014-01-02 20:20:57 +01:00
scrawl 596e0c8a49 Correct Dispel effect (use magnitude as chance) 2014-01-02 20:15:07 +01:00
scrawl 94d2ec8e4e Add missing spells update 2014-01-02 20:02:28 +01:00
Marc Zinnschlag 5d3b696eb6 Merge remote-tracking branch 'scrawl/master' into openmw-28 2014-01-02 19:52:47 +01:00
scrawl 29acc3f722 Fix particles being too small. Looks like this should actually be size*2. 2014-01-02 16:56:31 +01:00
scrawl 12de351feb Check if levitation is enabled before levitating 2014-01-02 16:38:23 +01:00
scrawl 0990ca4b75 Closes #1072: Fix extra light being added multiple times when showCarriedLeft(true) is called repeatedly 2014-01-02 15:58:00 +01:00
scrawl e6c0e187bc Closes #1073: Check for all gold types in canSell. For containers, only gold_001 is relevant, but items in the world can be sold as well. 2014-01-02 15:44:58 +01:00
Marc Zinnschlag e4c802eac4 updated changelog 2014-01-02 14:17:59 +01:00
Marc Zinnschlag 0d3e67dafc Merge branch 'master' into openmw-28 2014-01-02 13:39:36 +01:00
Marc Zinnschlag a6e6411686 Merge remote-tracking branch 'scrawl/master' 2014-01-02 12:12:52 +01:00
scrawl c558e12212 Don't try to move objects that are not in a cell 2014-01-02 03:06:48 +01:00
scrawl 993edf0384 Bug #1063: Safety check in moveObject. Required when items in containers execute script commands like setAtStart etc. 2014-01-02 02:27:48 +01:00
scrawl 0f2b2fabdb Implement water walking 2014-01-02 02:03:44 +01:00
scrawl 5b0a4c9424 Get rid of unused file and some other cruft. 2014-01-02 01:44:09 +01:00
scrawl 783c501d70 Some checks to prevent bound item abuse 2014-01-02 01:36:08 +01:00
scrawl 590c8cb4a0 Implement Disintegrate effects. When an armor/weapon breaks, unequip it and do not allow equipping it again. 2014-01-02 01:03:44 +01:00
scrawl 899214a906 Use fVanityDelay 2014-01-02 00:13:23 +01:00
scrawl c6421276bd Closes #841: Correct activation distance in third person mode 2014-01-01 23:59:17 +01:00
scrawl 24aa743573 Add function for converting feet to game units 2014-01-01 23:34:18 +01:00
scrawl f6387d5979 Implement Telekinesis magic effect. Remove some duplicate code. 2014-01-01 23:30:58 +01:00
scrawl 531bef6193 Shorter Vector3 initialisation 2014-01-01 22:46:10 +01:00
scrawl 5729672262 Show marked position on map. Implement Detect X magic effects. 2014-01-01 22:37:52 +01:00
scrawl 9245faf2aa Don't destroyRenderTarget with a NULL window 2014-01-01 22:19:02 +01:00
mrcheko 16e10cc702 error fix 2014-01-01 22:46:29 +02:00
scrawl bfc9fcf2cd Add starting spells when building player (F_PCStart flag) 2014-01-01 21:34:00 +01:00
mrcheko 09a0a69b04 more improvements 2014-01-01 21:40:31 +02:00
Marc Zinnschlag 11bcb66cce Merge remote-tracking branch 'lgro/travis' 2014-01-01 19:47:42 +01:00
Marc Zinnschlag 1f4c192bf6 Merge remote-tracking branch 'lgro/issue417_apply_weather_instantly_when_teleporting' 2014-01-01 19:47:11 +01:00
Marc Zinnschlag e1355be47c Merge remote-tracking branch 'lgro/valgrind_warnings' 2014-01-01 19:41:52 +01:00
Lukasz Gromanowski 43cbff6333 Bumped libogre to v1.9 in travis configuration file.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2014-01-01 18:32:55 +01:00
scrawl eab7ffd6b4 Remove redundant finding of default exterior position height 2014-01-01 18:05:28 +01:00
scrawl 8e5cae1081 Implement mark/recall magic effects 2014-01-01 17:06:21 +01:00
Lukasz Gromanowski 2d4e06cd50 Updated comments about freeing format_ctx->pb->buffer.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2014-01-01 17:05:49 +01:00
Lukasz Gromanowski 722469d57b Correction to the e9844e1 commit.
Restored interrior check in WeatherManager::update().

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2014-01-01 16:45:39 +01:00
scrawl 69ba8a40bf Fix weird formatting added during the merge 2014-01-01 16:13:20 +01:00
scrawl b3cd10dbea Remove redundant setTeleported calls 2014-01-01 15:18:25 +01:00
Marc Zinnschlag b19b277f18 temporarily disable OGRE-integration in OpenCS (need to sort out path problem first) 2014-01-01 15:16:51 +01:00
Marc Zinnschlag fe34c9cf1f increased version number 2014-01-01 15:06:31 +01:00
Marc Zinnschlag c3482b6f24 Merge remote-tracking branch 'scrawl/master'
Conflicts:
	apps/openmw/mwmechanics/spellcasting.cpp
2014-01-01 15:05:42 +01:00
Marc Zinnschlag 5fa9aa5d1e Merge remote-tracking branch 'lgro/issue417_apply_weather_instantly_when_teleporting'
Conflicts:
	apps/openmw/mwworld/weather.cpp
	apps/openmw/mwworld/worldimp.cpp
2014-01-01 14:57:14 +01:00
scrawl ea3b88951a Implement divine/almsivi intervention magic effects 2014-01-01 02:22:11 +01:00
scrawl c86760e3cd Remember the last known exterior position of the player in case we fail to map the interior to a world position. 2014-01-01 01:10:55 +01:00
Lukasz Gromanowski 101813fd0d Fixes #417: Apply weather instantly when teleporting
Correction to previous commit - WeatherManager->update()
will always be called.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-31 21:18:10 +01:00
Lukasz Gromanowski e9844e1b37 Fixes #417: Apply weather instantly when teleporting
Changed teleporting detection from "position tracking" to manually
setting "teleportation" flag ( player->setTeleported(true) ).

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-31 20:40:23 +01:00
scrawl b02b966c44 Closes #994: Don't cap skills to 100 when set via console (except for modX variants) 2013-12-31 19:11:16 +01:00
scrawl c7c3ba0ac6 Tweak .gitignore 2013-12-31 18:37:55 +01:00
Marc Zinnschlag c34b586b65 Merge remote-tracking branch 'ace/fix' 2013-12-31 18:37:12 +01:00
scrawl 3604b9d171 Closes #566: In interior cells, update global map position marker using the first exterior teleport door 2013-12-31 18:35:46 +01:00
scrawl be1938ee90 Closes #805: Don't add entities that are supposed to be invisible to static geometry 2013-12-31 18:32:46 +01:00
Lukasz Gromanowski 1ce4663065 Updated compiler opcodes for COE, and setHello.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-31 18:13:38 +01:00
scrawl 86b2211932 Don't warn about NiFlipController (already implemented) 2013-12-31 17:33:15 +01:00
mrcheko a8fb1ae51c improved, added knockdown after falling 2013-12-31 17:55:04 +02:00
scrawl 764ec9bc5f Closes #716: Use the particle controller's size instead of NiAutoNormalParticlesData particle radius. Same as NifSkope now. 2013-12-31 15:50:27 +01:00
Alexander "Ace" Olofsson 8381cad5a4 Don't try to set a cursor before one exists 2013-12-31 14:13:42 +01:00
scrawl 07a9b7623a Enable skeleton-based bounding boxes added in Ogre 1.10 2013-12-31 13:22:57 +01:00
mrcheko d6345bce91 added npc hit reactions 2013-12-31 13:24:20 +02:00
scrawl 254eba350e Not handling interpolation type should be an error, since it will fail reading the next record if it hasn't read the previous one completely. 2013-12-31 00:56:04 +01:00
scrawl 94cdc1efd2 Enable mipmap generator for 1.9+ 2013-12-31 00:54:40 +01:00
Lukasz Gromanowski 50b6e828cc Added asserts in Interpreter::installSegmentX methods.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-30 23:51:44 +01:00
Lukasz Gromanowski cb04f43384 Fixes for "Conditional jump or move depends on uninitialised value(s)"
and memleaks reported by valgrind.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-30 23:08:53 +01:00
Lukasz Gromanowski 6107d5bad2 Updated ffmpeg decoder fix
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-30 22:16:06 +01:00
Lukasz Gromanowski 5c5f87445b Fixes for "Conditional jump or move depends on uninitialised value(s)"
and memleaks reported by valgrind.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-30 21:47:06 +01:00
Marek Kochanowicz cb723710fe Corrected stupid typo. 2013-12-30 19:24:53 +01:00
scrawl b8ac37347c Code cleanup for Class::canBeEquipped 2013-12-30 19:04:35 +01:00
Marek Kochanowicz 79bc149c73 reverting refidata.hpp 2013-12-30 18:47:19 +01:00
Marek Kochanowicz a7de04d0a4 reverting refiddata.cpp 2013-12-30 18:46:18 +01:00
Marek Kochanowicz 4a1987ddec correcting 2013-12-30 18:41:16 +01:00
scrawl 79a440e94a Many additions to 900bc06d2c:
- Fix indentation
 - Consider any kind of light, not just torch_infinite_time
 - Hostile NPCs should also wear lights, if they have nothing else that could use the slot (or a twohanded weapon)
 - Remove redundant code and don't add additional lights to the inventory
 - World::isDark returns false for interiors which are unaffected by weather
2013-12-30 17:57:41 +01:00
scrawl f3a7321a43 Closes #856: More aggressive supression of skeleton base: only create for keyframe controllers, not any controllers 2013-12-30 16:44:07 +01:00
Marek Kochanowicz 3758fe3834 reformatted 2013-12-30 13:23:16 +01:00
Marek Kochanowicz c89608f390 Check for head and hair. Correct faction check. 2013-12-30 11:39:03 +01:00
Scott Howard 2f082ef796 remove unneeded libraries 2013-12-29 16:25:49 -05:00
Lukasz Gromanowski 60fb75b03a Fixed valgrind warning about uninitialized variable:
==16814== Conditional jump or move depends on uninitialised value(s)
==16814==    at 0xA945B8: Terrain::QuadTreeNode::update(Ogre::Vector3 const&, Loading::Listener*) (quadtreenode.cpp:269)
==16814==    by 0xA94A77: Terrain::QuadTreeNode::update(Ogre::Vector3 const&, Loading::Listener*) (quadtreenode.cpp:354)
==16814==    by 0xA77541: Terrain::World::update(Ogre::Vector3 const&) (world.cpp:159)
==16814==    by 0x6EBA17: MWRender::RenderingManager::requestMap(MWWorld::CellStore*) (renderingmanager.cpp:649)
==16814==    by 0x8A25C4: MWWorld::Scene::loadCell(MWWorld::CellStore*, Loading::Listener*) (scene.cpp:157)
==16814==    by 0x8A2CEA: MWWorld::Scene::changeCell(int, int, ESM::Position const&, bool) (scene.cpp:296)
==16814==    by 0x8A2DE0: MWWorld::Scene::changeToExteriorCell(ESM::Position const&) (scene.cpp:440)
==16814==    by 0x85AC17: MWWorld::World::changeToExteriorCell(ESM::Position const&) (worldimp.cpp:761)
==16814==    by 0x927E38: OMW::Engine::prepareEngine(Settings::Manager&) (engine.cpp:436)
==16814==    by 0x92843D: OMW::Engine::go() (engine.cpp:483)
==16814==    by 0x6C6B3F: main (main.cpp:279)
==16814==  Uninitialised value was created by a heap allocation
==16814==    at 0x4C27CC2: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16814==    by 0xA93E60: Terrain::QuadTreeNode::createChild(Terrain::ChildDirection, float, Ogre::Vector2 const&) (quadtreenode.cpp:178)
==16814==    by 0xA7733E: Terrain::World::buildQuadTree(Terrain::QuadTreeNode*) (world.cpp:139)
==16814==    by 0xA76B18: Terrain::World::World(Loading::Listener*, Ogre::SceneManager*, Terrain::Storage*, int, bool, bool) (world.cpp:94)
==16814==    by 0x6EC6EB: MWRender::RenderingManager::enableTerrain(bool) (renderingmanager.cpp:1013)
==16814==    by 0x8A2A00: MWWorld::Scene::changeCell(int, int, ESM::Position const&, bool) (scene.cpp:206)
==16814==    by 0x8A2DE0: MWWorld::Scene::changeToExteriorCell(ESM::Position const&) (scene.cpp:440)
==16814==    by 0x85AC17: MWWorld::World::changeToExteriorCell(ESM::Position const&) (worldimp.cpp:761)
==16814==    by 0x927E38: OMW::Engine::prepareEngine(Settings::Manager&) (engine.cpp:436)
==16814==    by 0x92843D: OMW::Engine::go() (engine.cpp:483)
==16814==    by 0x6C6B3F: main (main.cpp:279)

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-29 21:58:55 +01:00
Marek Kochanowicz 842e26b8e5 added comment 2013-12-29 21:53:33 +01:00
Marek Kochanowicz 13637e7166 Dynamic_casting, checking rank. Commented out faction check, since it will not work. 2013-12-29 21:45:09 +01:00
Marek Kochanowicz e321d571e1 Added faction check. 2013-12-29 21:06:08 +01:00
Marek Kochanowicz 9df6d23afc removing member size values, since this does not work properly. 2013-12-29 20:15:00 +01:00
Lukasz Gromanowski c65f018760 Fixes #417: Apply weather instantly when teleporting
Corrected constant name.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-29 15:09:49 +01:00
mrcheko 783c2ec716 Merge remote-tracking branch 'upstream/master' 2013-12-29 16:03:56 +02:00
Marc Zinnschlag 6de39a7329 Merge remote-tracking branch 'lgro/issue845_NPCs_hold_torches_whole_day'
Conflicts:
	apps/openmw/mwmechanics/character.cpp
2013-12-29 15:00:31 +01:00
Marc Zinnschlag 56a80da70c Merge remote-tracking branch 'ace/win-fix' 2013-12-29 14:50:09 +01:00
Marc Zinnschlag 456b41f05b Merge remote-tracking branch 'scrawl/master' 2013-12-29 14:45:22 +01:00
Lukasz Gromanowski faf8011c48 Fixes #417: Apply weather instantly when teleporting
Removed changing speed of weather transition introduced in previous
commit. Instead try to detect player "teleporting" (ie. coc),
and then switch instantly to the next weather type.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-29 12:47:44 +01:00
scrawl c0dba2834b Closes #855: Don't try to look up bone if there's no skeleton 2013-12-29 01:20:57 +01:00
scrawl 04f9f7af56 Closes #990: Add option to unlock mouse cursor when in any menu 2013-12-29 00:58:48 +01:00
scrawl 17ff8165d2 Closes #1065: Don't apply fall damage when landing in water 2013-12-29 00:36:36 +01:00
Alexander "Ace" Olofsson b50151cb38 Quick build fix for windows 2013-12-28 18:16:01 +01:00
Marek Kochanowicz bf0383fe05 Last fixes. 2013-12-28 18:07:01 +01:00
Marek Kochanowicz 147ee0ace3 small oops + added new variables to the constructor 2013-12-28 17:35:04 +01:00
scrawl 2a8ab932ef Bug #951: Only recalculate derived stats when attributes change 2013-12-28 17:19:35 +01:00
Marc Zinnschlag f1be4656ec Merge remote-tracking branch 'lgro/issue1042_TES3_header_data_wrong_encoding' 2013-12-28 17:14:41 +01:00
Marc Zinnschlag 60a8a9e684 Merge remote-tracking branch 'scrawl/master' 2013-12-28 17:03:54 +01:00
scrawl 27b45dd3cd Remove unused input 2013-12-28 16:34:32 +01:00
Marek Kochanowicz b9d1047ad6 Small fix for lights. 2013-12-28 16:18:16 +01:00
Lukasz Gromanowski 100edda8c0 Fixes #417: Apply weather instantly when teleporting
Change speed of weather transition from blight to other (twice fast as normal)
and from other to blight (four times faster than normal).

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-28 16:15:34 +01:00
Marek Kochanowicz be6e47bcb6 Corrections 2013-12-28 15:51:38 +01:00
Lukasz Gromanowski 9b73d23139 Fix warning about uninitialized variable inside stream.peak():
openmw/mwgui/bookpage.cpp:394:13: warning: ‘*((void*)& stream +24)’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-28 13:55:54 +01:00
Marek Kochanowicz 5406a70fdd still working on npc check 2013-12-28 11:34:51 +01:00
scrawl 6d47d710a0 Reimplement NiGeomMorpherController using Ogre's pose animation system 2013-12-28 00:51:09 +01:00
Marek Kochanowicz da3dda896a Code compiles now 2013-12-27 22:57:36 +01:00
scrawl 596c9b80a9 Check if threads are joinable before joining (issue with boost 1.52) 2013-12-27 22:38:30 +01:00
Marek Kochanowicz 03235bf0a2 NPC. Still WIP. 2013-12-27 22:13:55 +01:00
scrawl 85ec80100c Bug #1005: Hide torches/shields during spellcasting and hand-to-hand combat 2013-12-27 22:00:16 +01:00
scrawl 7265b427fe Bug #1013: Rewrote fall height detection 2013-12-27 21:21:18 +01:00
scrawl 02277db685 Bug #1052: Don't use set/getOnlyText which discards escape characters 2013-12-27 19:52:10 +01:00
scrawl 686d9efac3 Bug #1060: Fix incorrect spell type checks 2013-12-27 18:58:35 +01:00
scrawl 27092a4494 flagAsModified should be private 2013-12-27 18:58:35 +01:00
scrawl a9526622b1 Particle improvements: particle systems now move with the particle bone, not the scene node. This difference is not noticable if the particle bone is static, but it makes the code *much* nicer and mirrors more closely what NifSkope does. 2013-12-27 18:58:24 +01:00
scrawl 6400f23ab0 Use the material controller manager for effects with overridden texture 2013-12-27 14:54:36 +01:00
scrawl d262d9e6b0 Bug #1054: Set render queue group for effects 2013-12-27 14:51:59 +01:00
scrawl 1c60a781a5 Add header to CMakeLists 2013-12-27 14:42:22 +01:00
scrawl 561c661156 Reset starting angle / position when adding world item to a container 2013-12-27 01:57:08 +01:00
scrawl 608bd0f525 Don't copy the base node pointer when adding a world object to a container. Fixes bug #1028 2013-12-27 01:34:56 +01:00
scrawl 30b1da996b Issue #1029 - Quick keys menu: Select compatible replacement when tool used up 2013-12-27 00:51:29 +01:00
scrawl 5a287a7e01 Remove no longer accurate flagAsModified calls. Container items are now modified via ContainerStore, not RefData. 2013-12-27 00:41:19 +01:00
scrawl d09a86e208 Issue #1018: Don't allow view mode switching while performing an action 2013-12-27 00:36:06 +01:00
scrawl a3017e16d4 Don't allow changing the spell that is being cast mid-animation 2013-12-26 22:32:39 +01:00
scrawl 5054d8e6c1 Bug #1055: Check power use and mana before starting cast animation 2013-12-26 22:06:13 +01:00
scrawl 71d9755ef1 Bug #991: Don't autoequip items with harmful permanent enchantments 2013-12-26 21:26:59 +01:00
scrawl 9877db413c Connect particle systems to the particle node, not the emitter node 2013-12-26 20:53:52 +01:00
scrawl eab2c89346 Issue #983: Fix controllers to affect objects attached to the base node 2013-12-26 20:53:52 +01:00
scrawl 5931fdcbde Implement NiBillboardNode. Flags not handled yet. 2013-12-26 20:53:52 +01:00
scrawl a3ff9e5be8 Change destruction order - fixes a shutdown crash discovered with mesa 2013-12-26 20:53:52 +01:00
scrawl def93f9910 Readme updates 2013-12-26 20:53:52 +01:00
scrawl fb845e81a4 Rename nosound to no-sound for consistency 2013-12-26 20:53:52 +01:00
scrawl 85ed21dbd2 Remove unused command line option 2013-12-26 20:53:51 +01:00
scrawl 33389b9b63 XDG compliant paths 2013-12-26 20:53:51 +01:00
scrawl aef0fd1460 Rename some path methods 2013-12-26 20:53:51 +01:00
scrawl e68e2f82a2 Implement DarkTexture slot. Fix an issue with incorrect transparency override when base texture is empty. 2013-12-26 20:53:51 +01:00
scrawl 0050e6e67b Support materials with no base (diffuse) texture (should be white). Support alternate UV set for diffuse texture. 2013-12-26 20:53:51 +01:00
scrawl a9e1e89bbc Bug #1007: Fix the console getting key focus when a reference becomes unavailable, even if the console is not visible 2013-12-26 20:53:51 +01:00
scrawl 31c1f484ed Slight performance improvement for WindowManager::updateVisible 2013-12-26 20:53:51 +01:00
scrawl b6bad969a0 Fix an issue with items that have no UI icon 2013-12-26 20:53:51 +01:00
scrawl 81ec8c2f55 Handle --version and --help before reading configuration - putting these options into openmw.cfg makes no sense 2013-12-26 20:53:51 +01:00
scrawl 74e902330f Fix a terrain shader issue 2013-12-26 20:53:51 +01:00
scrawl c5c3248376 Compile fixes for Ogre 1.10 2013-12-26 20:53:51 +01:00
scrawl 6d27ebabb6 Integrate AddGlow with material controllers 2013-12-26 20:53:45 +01:00
Marek Kochanowicz f04a727af6 removed set sizes, consted sizes, added itemleveledlist check 2013-12-26 18:40:47 +01:00
Marek Kochanowicz 1da56e1790 checkin leveled items lists 2013-12-26 18:28:24 +01:00
Marek Kochanowicz c2993909cf added creature leveled list check 2013-12-26 18:16:54 +01:00
Marek Kochanowicz 360a939aa0 Working on leveled lists now. 2013-12-26 15:35:58 +01:00
Marek Kochanowicz 6c95cea4c4 Added ingredient check 2013-12-26 15:24:52 +01:00
Marek Kochanowicz c1715779fa Added door check with related methods. 2013-12-26 12:59:43 +01:00
Nikolay Kasyanov 9fabae5198 OS X: force Cocoa API for Ogre windows in OpenCS 2013-12-25 00:26:15 +04:00
Nikolay Kasyanov 892ff93489 OS X: attempt to fix #1045 2013-12-25 00:25:58 +04:00
Marek Kochanowicz e4e7d50623 Added creatureCheck. I don't know meaning of all data fields here. 2013-12-23 12:32:35 +01:00
Marek Kochanowicz 94fcea4d4d added mCreaturesSize 2013-12-22 14:46:07 +01:00
Marek Kochanowicz 32046070d5 Added getCreatures 2013-12-22 14:44:22 +01:00
Marek Kochanowicz 16af9e6986 added container check 2013-12-22 14:42:17 +01:00
Marek Kochanowicz 1a7f023237 added mContainersSize. 2013-12-22 14:35:40 +01:00
Marek Kochanowicz dc594da0de added getContainers 2013-12-22 14:34:29 +01:00
Marek Kochanowicz bbcaef8e42 Added armor check and related stuff. 2013-12-22 14:32:42 +01:00
Marek Kochanowicz 97fc8acbdb Added armor check 2013-12-22 14:22:03 +01:00
Marek Kochanowicz 955fe3e8cf Added check for non-positive quality of alchemical apparatus 2013-12-22 10:00:04 +01:00
Marek Kochanowicz 1811f0a71b Works, but it seems that I miss something in referencables. I will write post on the forum. 2013-12-21 15:40:39 +01:00
Marek Kochanowicz a27441720e Added enchantmnet check for books. 2013-12-21 12:07:40 +01:00
Marek Kochanowicz ee5dfd1cc8 Adde potionCheck method 2013-12-21 11:15:46 +01:00
Marek Kochanowicz 21ee2a6d2e Getting size of potions. 2013-12-21 11:02:58 +01:00
Marek Kochanowicz a6c36e2377 Small optimization. 2013-12-21 11:01:40 +01:00
Marek Kochanowicz 385824aee0 Renamed getActivator to getActivators. 2013-12-21 10:59:13 +01:00
Marek Kochanowicz 4842c56cb5 added getpotions 2013-12-21 10:58:05 +01:00
Lukasz Gromanowski 18a9878bdd Fixes #1042: TES3 header data wrong encoding
Changed loading of HEDR structure from all-in-once to field-by-field
so author and descryption could be converted to UTF-8.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-21 09:33:05 +01:00
Lukasz Gromanowski 900bc06d2c Fixes #845: NPCs hold torches during the day
Moved 'equipping torches at night and unequipping at day' code from Character
to Actors class.

Removed unneeded showLights method (introduced in previous commits)
from animation/npcanimation classes.

Since this commit autoEquip() method doesn't automatically equip lights.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-20 22:38:23 +01:00
Marek Kochanowicz f69465d7e0 Added aditional checks for books. Activator check. 2013-12-20 22:31:17 +01:00
mrcheko 7aca2be540 Merge remote-tracking branch 'upstream/master' 2013-12-20 22:40:11 +02:00
mrcheko b98cfe2d1b Revert "bug fix http://bugs.openmw.org/issues/428"
This reverts commit 8dd930cf97.
2013-12-20 22:39:02 +02:00
mrcheko e480e31d1e Revert "improvement to bug fix http://bugs.openmw.org/issues/428"
This reverts commit c0d07fbdc9.
2013-12-20 22:37:18 +02:00
Marek Kochanowicz 8085fcc792 Added Referencable checks class, added method to get refidcontainer, added method to get mBooks.
Currently only books are checked, and only if name is present.
2013-12-20 20:02:42 +01:00
Marc Zinnschlag 18e7e83585 Merge remote-tracking branch 'mrcheko/savedgame' into savedgame 2013-12-20 13:13:06 +01:00
mrcheko 8eb2696f6c using gmst string 2013-12-20 14:04:59 +02:00
Lukasz Gromanowski abc126e2af Fixes #845: NPCs hold torches during the day
Added check for Player character so it won't be affected by showing,
or hidding torches.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-20 01:01:30 +01:00
Lukasz Gromanowski 6eb674e4e5 Fixes #845: NPCs hold torches during the day
Added equipping/unequipping torches.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-20 00:18:34 +01:00
Lukasz Gromanowski 92072d968b Fixes #845: NPCs hold torches during the day
Simplified a bit code which shows and hides light.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-19 21:11:07 +01:00
mrcheko 3816a09c6f bug 428 ask to load recent saved game 2013-12-19 22:08:34 +02:00
Marek Kochanowicz 230bbf06ba Merge pull request #6 from zinnschlag/master
updating fork
2013-12-19 06:42:29 -08:00
Marc Zinnschlag 16b3927f17 Merge remote-tracking branch 'scrawl/master' 2013-12-19 14:26:41 +01:00
scrawl 5fd98d7c3a Add an assertion 2013-12-19 01:41:36 +01:00
scrawl 18c002a21d Fix an awful typo. 2013-12-19 01:31:42 +01:00
scrawl 6a3eb3b355 Better way of reversing layer UV. 2013-12-19 01:31:12 +01:00
scrawl 9afdf71af3 Fix crash with player->position command 2013-12-19 00:37:57 +01:00
scrawl a0d38dfb63 Fix highlighted topics being selectable when in a choice 2013-12-19 00:26:08 +01:00
scrawl 876fb9a899 Addition to bb4bd999ba : adjust position for objects placed from inventory 2013-12-19 00:11:14 +01:00
Marc Zinnschlag 082a4678e1 Merge remote-tracking branch 'sirherrbatka/csmanual' 2013-12-18 14:35:23 +01:00
Marc Zinnschlag c22e38f825 removing 255 content file limitation 2013-12-17 21:19:05 +01:00
Marc Zinnschlag 09fadd446b Merge remote-tracking branch 'mrcheko/savedgame' into savedgame 2013-12-17 19:33:32 +01:00
pvdk da9b67b6d2 Fix for Bug #922: Launcher writing merged openmw.cfg files 2013-12-16 20:40:58 +01:00
mrcheko a854eb73db StateRunning check returns 2013-12-16 21:02:21 +02:00
scrawl eb5e4ecec2 Remove more unused code 2013-12-16 15:35:38 +01:00
mrcheko f50ff0b1c4 reworked http://bugs.openmw.org/issues/428 2013-12-16 15:40:47 +02:00
scrawl 19e5978a01 Merge branch 'master' of https://github.com/zinnschlag/openmw
Conflicts:
	apps/openmw/main.cpp
2013-12-16 13:35:31 +01:00
scrawl 56893a097d Don't stack used torches 2013-12-16 13:31:03 +01:00
scrawl cd756a8a39 Fix incorrect value for partially used items (missing float casts). Make sure the correct value is displayed in tooltips. 2013-12-16 13:22:27 +01:00
Marc Zinnschlag 1cf1d49bc4 fix to content file reading error reporting in case of missing dependency 2013-12-16 11:39:24 +01:00
mrcheko fd9f8c34f6 bug fix http://bugs.openmw.org/issues/428 2013-12-15 18:50:25 +02:00
Marc Zinnschlag bf4ffe94dc fixed a memory leak in the script record 2013-12-15 16:19:45 +01:00
Marc Zinnschlag 3590fa40bd store global script state in saved game files 2013-12-15 16:16:50 +01:00
scrawl 4bc4af6bf0 Enable microcode caching for Ogre 1.9+ 2013-12-14 22:01:24 +01:00
Nikolay Kasyanov fc21dd1f3a Music playback on OS X >= 10.9 works again. Fixes bug #1041. 2013-12-14 17:26:09 +04:00
mrcheko c0d07fbdc9 improvement to bug fix http://bugs.openmw.org/issues/428 2013-12-14 15:07:00 +02:00
scrawl 530d06ab54 Remove unused code 2013-12-14 05:07:08 +01:00
mrcheko 8dd930cf97 bug fix http://bugs.openmw.org/issues/428 2013-12-13 22:43:58 +02:00
Marc Zinnschlag 0890fa66b0 Merge remote-tracking branch 'mrcheko/master' 2013-12-13 18:47:11 +01:00
mrcheko 8b3a393a6b bug fix at http://bugs.openmw.org/issues/985 2013-12-13 19:33:01 +02:00
mrcheko c8bf69b91a Revert "bug fix http://bugs.openmw.org/issues/985"
This reverts commit 7a9b64c6f4.
2013-12-13 19:02:25 +02:00
scrawl 39eea24dc3 Don't try to show exceptions in a message box if SDL was not initialized 2013-12-13 03:50:01 +01:00
mrcheko 7a9b64c6f4 bug fix http://bugs.openmw.org/issues/985 2013-12-12 16:09:38 +02:00
Marc Zinnschlag 2a35c7d33a fixed running global scripts a second time after they have been stopped 2013-12-12 13:16:32 +01:00
Marc Zinnschlag 74793c1c2f globals script cleanup; fixed potential case folding bug 2013-12-12 13:15:38 +01:00
Nikolay Kasyanov 73c6aba4d0 OS X: Ogre plugins are now installed in OpenCS bundle too. Generalized
plugin install routine.
2013-12-12 15:20:04 +04:00
Marc Zinnschlag fc37c77a91 store global variables in saved game files 2013-12-12 12:19:25 +01:00
Nikolay Kasyanov 874ecee079 OS X: do not enforce static boost, this can be set externally
anyway
2013-12-12 14:20:13 +04:00
Nikolay Kasyanov 89c60b065c OS X: looks like OGRE_Plugin_CgProgramManager_FOUND is not reliable 2013-12-12 14:19:48 +04:00
Nikolay Kasyanov 87853f4066 OS X: consider Ogre CG plugin as used only if it’s found 2013-12-12 13:53:35 +04:00
Nikolay Kasyanov 99cfb8cda2 OS X: this CMake parameters can be set in CMake invocation, no need to hardcode them in CMakeLists.txt 2013-12-12 13:53:35 +04:00
scrawl 0c3c3ed8e9 Fix wind gravity affector 2013-12-11 15:15:30 +01:00
Lukasz Gromanowski 91a4d9a2eb Fixes #845: NPCs hold torches during the day
Added method in WeatherManger and World which returns true if it is night.
This method is used later in character controller to show torches
(or other sources of light) at night and hide them at day.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-10 23:48:49 +01:00
Marc Zinnschlag b38bfe1f21 removed a redundant function for listing global variables 2013-12-10 15:22:38 +01:00
Marc Zinnschlag 51bfa5cde3 rewrote global variable storage (using ESM variant type now) 2013-12-10 15:09:58 +01:00
Marc Zinnschlag 1fdd43bbb7 removed a redundant new 2013-12-10 12:31:18 +01:00
Emanuel Guevel 357ecd92b2 Do not display negative stat values
Display zero instead of negative values.
Also remove useless for loops and some unused attributes.
2013-12-10 00:41:36 +01:00
Emanuel Guevel fc8bd1aacb Allow fatigue stat to become negative when fatigue damages are taken 2013-12-09 21:53:04 +01:00
Marc Zinnschlag 77a2179d1e Merge remote-tracking branch 'scrawl/master' 2013-12-09 18:39:34 +01:00
scrawl 57a33c957e Add possibly missing include 2013-12-09 14:26:08 +01:00
scrawl 0bc3a13c0f Break invisibility on Use or Activate 2013-12-08 23:36:37 +01:00
scrawl 5fd2df5546 Ignore invisible targets for combat AI 2013-12-08 23:21:23 +01:00
scrawl 37a7ee8fcd Set alpha value of character animations according to Invisibility / Chameleon effects. 2013-12-08 23:05:21 +01:00
Lukasz Gromanowski 594cc693b2 Fixes #1006: Many NPCs have 0 skill
Added calculation of skill values for NPC with mNpdtType
set to NPC_WITH_AUTOCALCULATED_STATS (their NPDT is 12).

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-08 21:47:43 +01:00
scrawl 9fcb4fad5c Implement NiFlipController 2013-12-08 18:51:56 +01:00
scrawl 51a9f0111c Implement NiAlphaController and NiMaterialColorController 2013-12-08 16:38:13 +01:00
Lukasz Gromanowski 8d63f8eea2 Fixes #998: Setting the max health should also set the current health
Added setting current value of dynamic stat in OpSetDynamic class.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-07 21:00:46 +01:00
scrawl 1624e0fd8a Rename ObjectList to ObjectScene. Wrap it in a SharedPtr so we can automate the destruction routine. 2013-12-07 20:15:39 +01:00
Marc Zinnschlag ef8c0fab73 Merge remote-tracking branch 'scrawl/master' 2013-12-07 16:26:52 +01:00
scrawl 742e0e014d Remove more cruft in MessageBox. Fixes inconsistent sizing when close to a newline. 2013-12-07 14:15:51 +01:00
scrawl bb70deabb1 Add an incomplete implementation of SayAnimationValue (lip animation) 2013-12-07 14:15:45 +01:00
scrawl c5e543b91b Implement NiGeomMorpherController 2013-12-07 14:10:33 +01:00
Marc Zinnschlag 1c13a9037a save and load dynamic records 2013-12-07 13:17:28 +01:00
Marc Zinnschlag 030c733e2d Merge branch 'master' into savedgame
Conflicts:
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwworld/worldimp.cpp
	files/settings-default.cfg
2013-12-07 12:27:06 +01:00
Lukasz Gromanowski e01085cac5 Fixes #1015: Player status window scroll state resets on status change
Removed resetting scroll state position.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-07 02:57:30 +01:00
Marc Zinnschlag 48b779af80 Merge remote-tracking branch 'ace/win-fix' 2013-12-06 15:17:34 +01:00
Marc Zinnschlag 674931a851 remove terminating 0 from strings read from ESM records 2013-12-06 14:24:14 +01:00
Alexander "Ace" Olofsson baacf91de4 Another windows build fix 2013-12-06 11:37:29 +01:00
Marc Zinnschlag 14eff87339 removed some junk from ESM store 2013-12-06 11:34:24 +01:00
Lukasz Gromanowski bfd79bfbe6 Various fixes for CppCheck warnings.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-06 07:36:16 +01:00
Marc Zinnschlag 07f692bdd2 Merge remote-tracking branch 'scrawl/master' 2013-12-05 16:04:50 +01:00
scrawl 062ea627b3 Add parallax mapping for objects 2013-12-05 15:51:07 +01:00
scrawl 845bc5f7eb Show fatal exceptions in a message box instead of cerr when running without a terminal 2013-12-05 15:51:07 +01:00
scrawl afa71bb622 Throw an exception if a BSA is not found 2013-12-05 15:51:07 +01:00
scrawl 69c0bb1723 Add normal, specular & parallax mapping for terrain 2013-12-05 15:51:01 +01:00
scrawl 9ab8fe1038 Fix bsatool warning 2013-12-05 15:46:33 +01:00
scrawl f695deb29d Remember window positions 2013-12-05 15:46:23 +01:00
Marc Zinnschlag ee6ddc3404 block saving while chargen is in progress 2013-12-05 14:56:30 +01:00
Marc Zinnschlag 8b7889f8e5 setup player after loading a saved game 2013-12-05 14:22:08 +01:00
Marc Zinnschlag a7b42b867b more cleanup 2013-12-05 14:18:43 +01:00
Marc Zinnschlag ce624e024b make sure player record stays in place across cleanups 2013-12-05 14:03:25 +01:00
Marc Zinnschlag e818d43bc3 removed an outdated typedef and some dead code 2013-12-05 13:21:26 +01:00
Marc Zinnschlag 537b2efe8e first round of cleaning up world cleanup 2013-12-05 12:49:25 +01:00
Alexander "Ace" Olofsson 47c60a7037 Fix C4716 (Must return a value) error on Windows MSVC 2013-12-04 21:48:25 +01:00
scrawl 5f1878eb54 Add specular mapping (uses alpha channel of diffuse texture) 2013-12-03 18:41:45 +01:00
scrawl 147bc447a5 Add specular lighting for directional light to objects shader 2013-12-03 16:07:07 +01:00
scrawl 3a82f8c193 Fix incorrect log file name for launcherOgre.log 2013-12-03 15:56:00 +01:00
scrawl 8f4ffe4ddc Fix new window size not being written to settings when manually resizing window 2013-12-03 15:55:31 +01:00
Marek Kochanowicz 890aca720e correcting qoutes style and removing informations about settings from creating_file.tex. Thanks zini. 2013-12-03 15:35:03 +01:00
Marc Zinnschlag 63721682f6 GUI fix: previous character was selected when saving new character 2013-12-03 15:19:13 +01:00
Marc Zinnschlag 34cdd2bb1f deal with dialogue/info records that don't exist anymore 2013-12-03 14:39:54 +01:00
Marc Zinnschlag e269c9e689 changed a few sub record names to make them more unique 2013-12-03 14:30:18 +01:00
Marc Zinnschlag 2293b92efe storing and loading the journal 2013-12-03 14:28:46 +01:00
Marc Zinnschlag 7d8e3ac651 fixed QuestState::load/save 2013-12-03 13:51:44 +01:00
Marc Zinnschlag 2fe135d85f journals subview was bound to the wrong universal ID type 2013-12-02 16:25:26 +01:00
Marc Zinnschlag 0f971163f7 use Entry instead of plain string for topic and quest entries 2013-12-01 14:50:25 +01:00
Marc Zinnschlag b273f9e387 splitting JournalEntry into Entry and JournalEntry 2013-12-01 14:44:27 +01:00
Marc Zinnschlag 16e2d67b1f added overloaded start/endRecord functions to ESMWriter 2013-12-01 13:32:11 +01:00
Marek Kochanowicz 4ef2724f35 Starting dialog window finished. 2013-12-01 13:24:28 +01:00
Marek Kochanowicz 465d39e8d9 Merge branch 'csmanual' of https://github.com/sirherrbatka/openmw into csmanual 2013-12-01 13:01:34 +01:00
Marek Kochanowicz 8b74e8cba7 Commiting. Not sure what since i had short blackout :/ 2013-12-01 13:00:44 +01:00
sirherrbatka a3348ccceb Merge pull request #5 from lgromanowski/csmanual
Another small cleanup - missed that in previous commits.

Thank you.
2013-12-01 03:56:09 -08:00
Lukasz Gromanowski 5869908480 Another small cleanup - missed that in previous commits.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-01 12:03:04 +01:00
sirherrbatka 6bf643ea79 Merge pull request #4 from lgromanowski/csmanual
OpenCS user manual updates
2013-12-01 02:16:05 -08:00
Lukasz Gromanowski 3b64de7441 Another part of reformatting and clean up.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-01 03:18:08 +01:00
Lukasz Gromanowski 2e5e9e0c44 Small official/unofficial style cleanup - missed that one.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-01 01:15:46 +01:00
Lukasz Gromanowski 7c2afc43f4 Small reformatting.
Broked long lines, removed unneeded hard line breaks, added defs for
common words.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-01 01:07:08 +01:00
Lukasz Gromanowski e03b8ac393 Added *.out files to gitignore.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-01 01:06:32 +01:00
Marc Zinnschlag c94f006307 Merge remote-tracking branch 'scrawl/master' 2013-11-30 15:06:09 +01:00
Marc Zinnschlag aa5369d02c Merge remote-tracking branch 'pvdk/checkboxfix' 2013-11-30 15:04:25 +01:00
Marc Zinnschlag eec9821cd8 added records for storing journals in saved game files 2013-11-30 14:41:12 +01:00
scrawl 8391891a5b Ignore case for content file extensions 2013-11-30 14:25:29 +01:00
Marc Zinnschlag 43f5f16731 removed a todo comment 2013-11-30 12:54:44 +01:00
Marc Zinnschlag 177aab536d storing topic name in MWDialogue::Topic (avoids a lookup in the GUI and also serves as preparation for better localisation support in OpenMW 1.1) 2013-11-30 12:41:18 +01:00
pvdk 1512ac11ad Fixed the content selector checkboxes appearing as partially checked 2013-11-30 12:16:57 +01:00
pvdk 46973e8e82 Fix for Bug #982: unchecking addons is now saved to profile 2013-11-30 12:08:37 +01:00
Marc Zinnschlag eed46960fe some spelling fixes 2013-11-30 12:02:56 +01:00
Marc Zinnschlag 9d64c92d33 store text in journal entries 2013-11-30 11:57:33 +01:00
Marc Zinnschlag 8b3e852ffc Merge remote-tracking branch 'scrawl/master' 2013-11-30 11:09:38 +01:00
Marc Zinnschlag aebc2791a5 fixed selecting current character based on value stored in settings 2013-11-30 11:08:41 +01:00
Marc Zinnschlag 750133c0dd one more fix to SavedGame record saving 2013-11-30 11:05:07 +01:00
scrawl 4b4025ed0f Keep the player's CharacterController when changing cells. Fixes several glitches. 2013-11-30 11:01:45 +01:00
Marc Zinnschlag 016500af98 Merge remote-tracking branch 'scrawl/master' 2013-11-30 09:45:46 +01:00
Marc Zinnschlag 04b1657d98 Merge branch 'openmw-27'
Conflicts:
	apps/opencs/CMakeLists.txt
	apps/opencs/main.cpp
2013-11-30 09:45:41 +01:00
scrawl e1e9de0f02 Don't hide tooltips on mouse click. Probably wasn't such a bright idea. 2013-11-30 09:04:52 +01:00
scrawl 6aa9e18915 Reset filter when starting a trade 2013-11-30 08:33:18 +01:00
scrawl bb4bd999ba PlaceAt: Copy the rotation when placing a non-actor. Don't modify placement position by bounding box for non-actors. Fixes placement in Graphic Herbalism mod. 2013-11-30 08:29:22 +01:00
scrawl 0e267b79ec Don't heal dead actors when resting 2013-11-29 20:21:57 +01:00
scrawl bcf61331ab Bring back the option to not grab mouse. Useful if running in a mouse-controlled GUI debugger. 2013-11-29 20:06:54 +01:00
scrawl ce2d521b8f Always apply queued movement, even when there's no duration. Fixes crash with --start="bal isra".
When a script disables a reference that still has movement queued, trying to apply that movement will then fail due to the reference not being in the scene. Therefore, we should make sure that movement is always applied in the frame that it's queued in.
2013-11-29 20:03:50 +01:00
scrawl ffc885853a Fix bolt for magic effects that don't have one specified 2013-11-29 10:39:37 +01:00
scrawl b82ee4b44f Fix some problems with the previous commit 2013-11-28 21:49:15 +01:00
scrawl 076cc9230b First try at handling target magic 2013-11-28 17:31:17 +01:00
scrawl e7ad503e30 Merge branch 'particles' into projectiles 2013-11-28 17:16:59 +01:00
Marc Zinnschlag e432ab5e8a fixed static problem in Land recrod save function 2013-11-28 11:51:21 +01:00
scrawl 20ccfe2324 Play sound when enchanting 2013-11-28 11:37:30 +01:00
Marc Zinnschlag 5aea6ef80f some clean up for the cleanup code 2013-11-28 11:22:34 +01:00
Marc Zinnschlag 35e8e23037 keep track of total play time per character 2013-11-28 09:33:50 +01:00
Marc Zinnschlag 7e2819c62e store year in saved game profile 2013-11-28 09:27:10 +01:00
Marc Zinnschlag b0eb5938bf removed some redundant code 2013-11-28 09:13:54 +01:00
Marc Zinnschlag 71436b1160 changed interface for global variable access 2013-11-28 09:10:38 +01:00
scrawlandMarc Zinnschlag 4a0a16be36 Fix a build error 2013-11-27 20:03:11 +01:00
scrawl 97fadb24ca Update the Ptr in mObjects in Objects::updateObjectCell 2013-11-27 18:49:04 +01:00
scrawl 03c4b680ca Fix changePointer 2013-11-27 18:49:04 +01:00
scrawl a8c838b53a Don't list deleted refs in CellStore::foreach 2013-11-27 18:49:04 +01:00
Marek Kochanowicz 400831faf8 Added short overiview of resources avaible. Thanks for assistance and insight on this, serpentine, lgro and scrawl. 2013-11-26 15:51:59 +01:00
scrawl 49ea1aae67 Use GMST for sun damage reduction 2013-11-26 15:01:22 +01:00
Marc Zinnschlag 99ea63dc4a factored out code for generating month names 2013-11-26 12:47:30 +01:00
Marc Zinnschlag e6dc927f11 removed duplicates of the cell name function 2013-11-26 11:49:07 +01:00
Marc Zinnschlag bc6fe682c9 replaced getCurrentCellName function with a more general getCellName function 2013-11-26 11:39:58 +01:00
Marc Zinnschlag eea433f141 restore last played character selection across sessions 2013-11-26 10:37:58 +01:00
Marc Zinnschlag b40c0f2a07 one more fix to SavedGame record saving 2013-11-26 09:56:08 +01:00
scrawl bda28e2ed0 Increase size of item selection dialog 2013-11-26 06:42:37 +01:00
scrawl eba068149d Fix AIWander crash 2013-11-25 15:38:18 +01:00
Marc Zinnschlag ad143e0524 case fix (content file names) 2013-11-25 14:56:05 +01:00
scrawl 9f5ff033d7 Handle the "GetLOS" alias for GetLineOfSight 2013-11-25 14:06:59 +01:00
scrawl 58dce88c7d Handle the "tai" alias for ToggleAI 2013-11-25 14:03:51 +01:00
scrawl 6b81fd78f1 Particle improvements: Handle LocalSpace flag. Attach particle systems to the base node, since they need to be relative to that when LocalSpace is enabled. Get the bone in emitters/affectors so that resulting particle positions are the same. TODO: Fix Controllers to affect particle systems. 2013-11-25 13:50:33 +01:00
Marc Zinnschlag 616e3aa32f store content file list in saved games and reject saved games not matching the current game 2013-11-25 13:00:05 +01:00
Marc Zinnschlag 1ecadccb28 fixed save function of SavedGame record 2013-11-25 12:59:40 +01:00
Marc Zinnschlag 55544e931c reject newer formats when scanning saved games 2013-11-25 10:21:49 +01:00
Marc Zinnschlag e3670cff8a improved character selection logic 2013-11-24 16:58:41 +01:00
Marc Zinnschlag 67cd0887e6 added description field to saved game record; make use of description in GUI 2013-11-24 15:19:56 +01:00
Marc Zinnschlag 7efac4c9a5 fixed handling of characters without a valid slot 2013-11-24 15:05:00 +01:00
Marc Zinnschlag 18a3b38fb4 when scanning saved game directory, reject characters without a valid saved game 2013-11-24 14:42:58 +01:00
scrawl 14c9a4e1d3 Cap enchantment casting cost to 1 as displayed in enchanting window. Display current enchantment charge in spell window. 2013-11-23 23:12:54 +01:00
scrawl 07408a4652 Don't allow selling gold (again - when did this get broken?) 2013-11-23 22:52:20 +01:00
scrawl 4aa9f3bcef Don't set the enchanted item in HUD for "WhenStrikes" enchantments 2013-11-23 22:48:56 +01:00
scrawl f3e89e9168 Fix arrow down in console 2013-11-23 22:48:39 +01:00
scrawl d2ed77f3f2 Fix shields being visible during spellcasting 2013-11-23 20:24:52 +01:00
Marc Zinnschlag d8c40562ae Merge remote-tracking branch 'scrawl/light' 2013-11-23 12:44:42 +01:00
Marc Zinnschlag 59f8979090 Merge remote-tracking branch 'scrawl/master' 2013-11-23 12:44:01 +01:00
scrawl a1fe07181c Fix rotation offset of some lights (bug 955) 2013-11-23 05:55:03 +01:00
scrawl 0e254aa7c7 Fix startNewGame assigning an already freed CellStore to the player Ptr supplied to WindowManager. Fixes a crash when equipping lights after starting a new game (bug 967). Side note: The inventory preview's Ptr being assigned a cell at all doesn't make sense, as that is used to determine the light setting which should be the same no matter which cell you're in. 2013-11-23 03:25:55 +01:00
Marek Kochanowicz c5acfbf133 Started introduction to the resources files. 2013-11-22 14:44:39 +01:00
Marc Zinnschlag e078d55159 Merge remote-tracking branch 'scrawl/master' 2013-11-22 10:02:39 +01:00
Marek Kochanowicz 05245c15af Nothing interesting. Just keeping sync. 2013-11-22 09:44:32 +01:00
scrawl 39de0510a0 Fix another case of container scripts not getting re-added 2013-11-22 02:12:37 +01:00
scrawl 829512ded4 Fix container scripts not getting re-added when the player changes cells 2013-11-22 01:02:12 +01:00
scrawl 2e87cbc231 Add basic functionality to SaveGameDialog 2013-11-21 20:34:34 +01:00
Marek Kochanowicz 45203c160f rearranging, correcting, small changes -- nothing interesting. 2013-11-21 20:07:37 +01:00
Marc Zinnschlag 3ef5fcb04d Merge remote-tracking branch 'scrawl/master' 2013-11-21 19:18:04 +01:00
scrawl cf79a83d4f Avoid recreating widgets in MainMenu::updateMenu. Fix crash when pressing new game due to the button being destroyed from within it's own delegate. 2013-11-21 19:07:54 +01:00
scrawl b490e56ba1 Remove redundant setLocals (already done by ContainerStore::add) 2013-11-21 17:19:41 +01:00
scrawl 61ab6e1739 Use fWortChanceValue for making ingredient/potion effects visible 2013-11-21 17:19:41 +01:00
scrawl 320ba98097 Correct getDerivedDisposition according to wiki (check if player expelled) 2013-11-21 17:19:41 +01:00
scrawl 6451b687d9 Adjust value for several item types as according to wiki 2013-11-21 17:19:41 +01:00
scrawl b6c22ad5d9 Add starting gold for NPCs and creatures. Refactor gold removal in some gui windows (use containerstore method instead of a dependency on TradeWindow). Use real gold amount in trade window, not refill amount. 2013-11-21 17:19:30 +01:00
scrawl bab657fe2b Add a utility function to add items to a ContainerStore by RefID 2013-11-21 17:14:30 +01:00
scrawl 6641fd4635 Fix bug when enchanting: only the mBase pointer was updated, not the CellRef mRefID, which is used for container stacking. The new (enchanted) item was stacking with the old item when it was added, so the enchantment completely disappears. 2013-11-21 17:14:30 +01:00
scrawl 800a2845b0 Add Bound & Summon effects (will need some adjustments later) 2013-11-21 17:14:23 +01:00
Marek Kochanowicz b52b6a8e7e Small correction, added tiny comment. 2013-11-21 13:50:23 +01:00
Marek Kochanowicz 1875dea243 Making progress on corrections. 2013-11-21 13:47:01 +01:00
Marc Zinnschlag 2702d10911 more comments 2013-11-21 12:31:04 +01:00
Marc Zinnschlag b5f99522c7 added a few comments 2013-11-21 12:29:24 +01:00
Marc Zinnschlag c165894869 load saved game record 2013-11-21 12:24:24 +01:00
Marc Zinnschlag 5ba56a5ea5 character signatures 2013-11-21 11:18:56 +01:00
Marc Zinnschlag cbbdf390ad added function for inspection of saved characters and character slots 2013-11-21 11:10:18 +01:00
Marc Zinnschlag fc1501a510 store character profile information in saved game file 2013-11-21 10:53:42 +01:00
Marc Zinnschlag e938c5a0ee changed character creation logic (create on save instead of on new game) 2013-11-21 10:20:50 +01:00
Marc Zinnschlag d6e2701dd6 changed played time data type from float to double 2013-11-21 10:10:41 +01:00
Marc Zinnschlag 26361b35f2 Merge remote-tracking branch 'scrawl/master' 2013-11-21 08:27:53 +01:00
scrawl bf153e1c8e Fix bug applying instant effects 2013-11-21 00:41:52 +01:00
scrawl 4ed4c1e319 Add Vampirism and Sun Damage effects. Some fixes. 2013-11-21 00:41:31 +01:00
Marek Kochanowicz 3f1eb42d91 I hate this chapter. 2013-11-20 20:54:35 +01:00
Marek Kochanowicz 000606efc0 working, working… it takes ages. 2013-11-20 20:05:22 +01:00
scrawl 7f735c2c4c Release and show the cursor when focus lost 2013-11-20 16:07:14 +01:00
Bret Curtis 995c01d7ba added uuid-dev which is now required during building 2013-11-20 10:29:22 +01:00
Bret Curtis ac38274165 typo in travis 2013-11-20 10:23:23 +01:00
Bret Curtis 729ca1bfdd remove debug code 2013-11-20 10:18:49 +01:00
Bret Curtis 862f2f0883 added keywords for debian and switch to dyn libs in travis 2013-11-20 10:16:51 +01:00
scrawl 5a4bd9b202 Remove software cursor option, hw cursors seem to be working well enough 2013-11-20 06:20:16 +01:00
scrawl fa63924884 Simplify message box manager, should fix a random bug with boxes not disappearing 2013-11-20 05:49:05 +01:00
scrawl 3452bd2e0b Add glow effect for enchanted items 2013-11-20 00:13:12 +01:00
Marek Kochanowicz 240a44f932 Files chapter will actually require resarch to be done :/ 2013-11-19 20:43:29 +01:00
Marek Kochanowicz 9bf3837218 minor edit 2013-11-19 20:38:22 +01:00
Marek Kochanowicz 9b34e4a523 Creating new files. 2013-11-19 20:35:57 +01:00
scrawl 0b9676aaa3 Fix an issue with the AI code 2013-11-19 18:43:32 +01:00
scrawl 38a82c4b0b Add a todo comment 2013-11-19 18:43:21 +01:00
scrawl 8b095982e9 Don't auto equip for dead actors 2013-11-19 18:42:43 +01:00
scrawl f3ff2e4260 Handle Unreflectable flag 2013-11-19 17:33:02 +01:00
scrawl c03c82c78a Apply disease resistance manually as according to wiki 2013-11-19 17:15:17 +01:00
Marc Zinnschlag 8190fdb16c Merge remote-tracking branch 'scrawl/master' 2013-11-19 16:56:18 +01:00
scrawl 654b7d9ba5 Apply disease resistance manually as according to wiki 2013-11-19 16:52:26 +01:00
scrawl e8dcd74741 Recharge enchanted items in player's inventory over time 2013-11-19 16:42:24 +01:00
Marc Zinnschlag 9487bd33c3 removed broken save function from ESMWriter 2013-11-19 16:07:36 +01:00
Marc Zinnschlag 5e64888227 added basic save slot management and connected main menu save to save function (bypassing the save GUI for now) 2013-11-19 15:38:26 +01:00
Marc Zinnschlag 4c61deca8d fixed save code for SavedGame record 2013-11-19 15:31:39 +01:00
Marc Zinnschlag 35bf98a940 modified esm reader/writer to use UTF8 when no encoder is given 2013-11-19 13:46:24 +01:00
Marc Zinnschlag 903e867c24 change to TES3 record (moved format field to the top) 2013-11-19 13:44:18 +01:00
Marc Zinnschlag dc75627d53 added secondary saved game header record 2013-11-19 10:51:30 +01:00
Marc Zinnschlag 11e254aac8 Merge remote-tracking branch 'gus/AICombat'
Conflicts:
	apps/openmw/CMakeLists.txt
	apps/openmw/mwbase/mechanicsmanager.hpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
2013-11-19 09:10:48 +01:00
scrawl 74e42a2d02 Add missing skill increases for Enchant skill 2013-11-19 07:39:07 +01:00
scrawl cab535dd69 Implement magic item recharging via soulgem use 2013-11-19 06:48:47 +01:00
scrawl 16e5477c60 Fix an uninitalized member 2013-11-19 02:17:44 +01:00
gus dff3cf162d ToggleAI script instruction 2013-11-18 23:03:44 +01:00
Marc Zinnschlag 1c7a4d4b3a adjust availability of main menu items based on game state 2013-11-18 15:52:25 +01:00
Marc Zinnschlag f45cff8aff flag game as ended when player dies 2013-11-18 15:38:08 +01:00
Marc Zinnschlag 82c8495338 removed boolean running flag with state enum 2013-11-18 15:15:47 +01:00
Marc Zinnschlag e55691096c Merge remote-tracking branch 'ace/win-fixes' 2013-11-18 13:46:28 +01:00
Alexander "Ace" Olofsson 4baaf9463e Remove crashcatcher.cpp from windows builds, it can't be built or used there. 2013-11-18 12:34:25 +01:00
gus 4559e932ae AI packages have priority and combat is triggered in actor.cpp using the Hostile setting in CreaturesState 2013-11-18 12:33:09 +01:00
scrawl 6902569d03 Implement Absorb effects (AbsorbHealth, etc) 2013-11-18 05:01:36 +01:00
scrawl a420698237 Don't try to absorb or reflect for self casted spells 2013-11-17 23:41:24 +01:00
scrawl 0dc2e829dd Lots of cleanup. Implemented Absorb and Resist. Implemented several instant effects. Added hand VFX. 2013-11-17 23:31:08 +01:00
scrawl 7fd5f1df83 Change setKeepParticlesInLocalSpace to false. Not correct for all particles, but the opposite isn't either. Plus it breaks pretty much all magic VFX. 2013-11-17 23:31:08 +01:00
scrawl fc268bf302 Initialize mFallHeight 2013-11-17 23:31:08 +01:00
scrawl 47fc3f81f5 Don't update actors while paused 2013-11-17 23:31:08 +01:00
scrawl 2a11618ee7 Make sure the equipped weapon HUD icon is updated properly 2013-11-17 23:31:07 +01:00
scrawl b8c358df63 Fix a bug with equipping using the quick keys: when item is already equipped, equipping it again would cause the slot to get unequipped first, possibly restacking and destroying the Ptr that was supposed to be equipped in the first place 2013-11-17 23:31:07 +01:00
Marc Zinnschlag d32fcb99b5 Merge remote-tracking branch 'scrawl/master' 2013-11-17 13:39:04 +01:00
Marc Zinnschlag 21927af4d8 Merge remote-tracking branch 'lazaroth/german_fixes' 2013-11-17 09:47:04 +01:00
scrawl e7993ced69 Fix invalid casts 2013-11-17 04:33:04 +01:00
scrawl 07251f0fa4 Don't apply spells to dead actors 2013-11-17 04:32:56 +01:00
scrawl b8f5cd6cb7 Forgot to apply the same fix to companion window 2013-11-16 23:55:54 +01:00
Lars Söderberg 35434dc053 German fixes
Fixes for German language.
2013-11-16 23:15:51 +01:00
Sebastian Wick 4a816b6c17 fix context menu 2013-11-16 23:08:03 +01:00
scrawl eb46de54e4 Merge branch 'master' of https://github.com/zinnschlag/openmw 2013-11-16 22:48:59 +01:00
scrawl 7eb1dcb682 Fix trade windows crashing after a new game 2013-11-16 22:29:40 +01:00
scrawl e32c73725c Merge branch 'crashcatcher' 2013-11-16 20:56:07 +01:00
scrawl f990ba09f0 gdb detection doesn't seem to work for the forked process 2013-11-16 20:55:41 +01:00
Marc Zinnschlag a19242b4ec fixed expression in if statement 2013-11-16 19:31:35 +01:00
vorenon b2d2a3dd17 Closing message boxes with numpad enter 2013-11-16 19:15:47 +00:00
Marc Zinnschlag 985ce7c552 Merge remote-tracking branch 'scrawl/crashcatcher' 2013-11-16 18:34:08 +01:00
scrawl 20d806b40c Change is_debugger_attached to a different hack 2013-11-16 18:15:54 +01:00
Marc Zinnschlag c5f81e3508 don't run udpates if no game is running 2013-11-16 17:46:48 +01:00
scrawl 883140babf Add missing include for signals to make travis happy 2013-11-16 17:00:26 +01:00
Marc Zinnschlag 3f25036630 Merge remote-tracking branch 'scrawl/master' 2013-11-16 16:51:56 +01:00
scrawl b9899696e3 Add a crash catcher for unix. When encountering a fatal signal, attach gdb and log backtrace. 2013-11-16 15:56:15 +01:00
scrawl aa84ce3f0d Copy paste mistake (oops) 2013-11-16 14:44:31 +01:00
Marc Zinnschlag ec5b2e9a7e added running flag; moved new game code to MWState 2013-11-16 12:22:28 +01:00
Marc Zinnschlag 31ec973c9c removed default value for --start 2013-11-16 12:08:00 +01:00
Marc Zinnschlag b3a7c8c098 removed --new-game switch 2013-11-16 11:36:32 +01:00
Marc Zinnschlag 7a4b604376 added --skip-menu switch 2013-11-16 11:33:20 +01:00
Marc Zinnschlag f19973450f moved exit game flag from Environment to StateManager 2013-11-16 11:07:23 +01:00
Marc Zinnschlag 79b7fa258b added new mwstate subsystem 2013-11-16 10:31:46 +01:00
scrawl 7474e87edc Implement RestoreHealth/Magicka/Fatigue 2013-11-16 05:06:54 +01:00
scrawl bb43ec9b35 Implement damage tick effects 2013-11-16 03:16:21 +01:00
scrawl b1a29eb27e Implement Resist & Weakness effects 2013-11-16 02:34:43 +01:00
scrawl d49b6f19ff Don't advance acrobatics skill for NPCs 2013-11-16 02:11:11 +01:00
scrawl aa4b2d9504 Fix uninitialized mSkill/mAttribute for spellmaker spells 2013-11-16 01:19:39 +01:00
scrawl c73217627e Move code for listing effect sources to the spell management classes 2013-11-15 20:29:47 +01:00
scrawl c5f1bbcc5f Add functions to get the effect affecting resistance and weakness for another effect 2013-11-15 19:43:25 +01:00
eroen d4b8ac5b49 don't dpkg on windows and macos
No need to clutter windows and macos configuration with dpkg options, as it is
unlikely to ever be useful.
2013-11-15 16:53:05 +01:00
eroen 67284e2f9d Introduce -DBUILD_WITH_DPKG to toggle dpkg based install
The current system automagically chooses between the dpkg-based install method
(for debian-derived distributions) and a "traditional" install and sets
install paths based on whether cmake can find a 'dpkg' executable.

This is not ideal, since dpkg is occasionally installed on linux distributions
unrelated to debian for purposes other than package management. In particular,
Arch and Gentoo carry it in their repositories.
2013-11-15 15:59:38 +01:00
Marc Zinnschlag eddd6bf48d enabled load and save items in main menu 2013-11-15 10:29:53 +01:00
scrawl d619d0fa25 Don't grab the cursor while the console is opened 2013-11-15 03:39:25 +01:00
scrawl 065f14579f Fix a container window regression (oops) 2013-11-15 02:57:21 +01:00
scrawl f7befa3e54 Remove a no longer required method 2013-11-15 02:20:04 +01:00
scrawl 00af6b5617 Use an inventory store listener for animation parts and VFX update instead of updating them directly. Slightly more flexible, reduces InventoryStore dependencies and solves a crash during character creation due to the preview doll's animation not being registered in World. 2013-11-15 02:08:36 +01:00
scrawl 427de69b79 Allow stacking enchanted items when charge is full 2013-11-14 21:02:37 +01:00
scrawl 49125fa26e Fix restacking unequipped items 2013-11-14 19:54:00 +01:00
scrawl da85f3e575 Use the formula from the wiki for spell success. 2013-11-14 19:19:32 +01:00
scrawl 4083c55848 Make sure NpcAnimation base exists before runAnimation. Not sure yet why this is needed. 2013-11-14 19:18:27 +01:00
scrawl 5458207325 Reduce fatigue when casting. Has no effect in the vanilla game due to the GMSTs being 0. 2013-11-14 18:41:34 +01:00
scrawl 9c5847e2f4 Fix VFX not getting removed when an actor dies 2013-11-14 14:52:30 +01:00
scrawl e26cc31e3b Disable projectiles for now 2013-11-14 14:45:08 +01:00
scrawl 992a8e9c36 Refactor NpcAnimation: get rid of delayed update (no longer required), make sure that the Animation is set up *before* the inventory store is accessed anywhere (which now triggers auto equip and animation update). Allows better tracking of magic VFX for permanent enchantments in InventoryStore. 2013-11-14 14:41:10 +01:00
scrawl 956d8adb99 Merge branch 'master' of https://github.com/zinnschlag/openmw into magic
Conflicts:
	apps/openmw/mwgui/inventoryitemmodel.cpp
2013-11-14 14:25:22 +01:00
scrawl 0b5f5351b5 Fix continuous FX getting removed instantly 2013-11-14 13:30:48 +01:00
Marc Zinnschlag 1c020b74c8 hid ID column in info tables (not relevant for the user) 2013-11-14 13:14:37 +01:00
Marek Kochanowicz dcfff7d457 Correcting some epic fail. 2013-11-14 12:32:58 +01:00
Marc Zinnschlag 9f0dac00ec silenced a warning 2013-11-14 12:22:24 +01:00
Marc Zinnschlag 2af7f60488 flag reordered records as modified 2013-11-14 12:21:10 +01:00
Marc Zinnschlag a44fad4c59 disabled revert for info tables (no easy way to make this work) 2013-11-14 11:55:02 +01:00
Marc Zinnschlag d49b8e7443 Merge branch 'dialogue' 2013-11-14 11:40:50 +01:00
Marc Zinnschlag 780ea3a41f added support for record reordering to model (only implemented in info collection) 2013-11-14 11:39:14 +01:00
Marek Kochanowicz 99f72d4b61 Filters: typos. Windows: widgets→name panels. I have no idea why we are inventin our own terms here. 2013-11-14 08:35:03 +01:00
Marek Kochanowicz 17d41ff032 Corrected according to the zini suggestions. 2013-11-14 08:22:52 +01:00
Marek Kochanowicz 28a98df3aa Some corrections. 2013-11-13 21:49:29 +01:00
Marek Kochanowicz 6197ebd35f Actually builds now. 2013-11-13 21:37:27 +01:00
Marek Kochanowicz 078745c5d3 Added some shiny PR to the windows, honestly. It is just at the begining of the manual, so maybe it will raise morale of the user ;-) 2013-11-13 21:28:09 +01:00
Marek Kochanowicz 1eaca1e26b Added regular expressions tutorial. Because serpentine failed me :( 2013-11-13 21:01:48 +01:00
scrawl da5c59c8af addEffect should check effectId, not model. 2013-11-13 19:07:44 +01:00
scrawl ff7e4174f9 Fix some leftover code that still calculated random magnitude per spell rather than per effect. Major cleanup of InventoryStore: Magic effects are now updated when needed, rather than cached. Also allows to get rid of 'mutable' hacks and non-const method that should be const. Play sounds and particles when equipping a permanent enchantment item. 2013-11-13 18:51:28 +01:00
scrawl a6e2f43b75 Stop continuous VFX when the effect is no longer active. 2013-11-13 15:44:43 +01:00
Marc Zinnschlag 68598f9b63 fixed handling of user directory defaultfilters file; some cleanup 2013-11-13 14:56:04 +01:00
scrawl 9b0e82a37f Projectile models are now spawned (no movement or impact yet). Refactored trap activation to apply range types properly. Handle ContinuousVFX for magic effects (note they aren't stopped yet when the effect ends) 2013-11-13 14:02:15 +01:00
Marc Zinnschlag a8274e5c86 Merge remote-tracking branch 'potatoesmaster/inventory-fix' 2013-11-13 13:55:24 +01:00
Marek Kochanowicz 821d0c5c2d Corrected filter template loading. 2013-11-13 11:38:29 +01:00
sirherrbatka 08f8c93a71 Merge pull request #3 from zinnschlag/openmw-27
Openmw 27
2013-11-13 00:17:51 -08:00
scrawl 0627e23d3c Fix wrong skill level for spell success formula. 2013-11-13 01:26:25 +01:00
Emanuel Guevel baf13483c0 Update actor model only when in the current cell 2013-11-13 00:04:04 +01:00
scrawl 60bec03987 Rename variables called 'slots' to work around wrong code parsing in QT Creator. 2013-11-12 23:23:19 +01:00
scrawl 027f4152e4 Missing flagAsModified() 2013-11-12 23:17:03 +01:00
scrawl 3c6a391507 Rename arguments again 2013-11-12 23:12:56 +01:00
scrawl 700d06764c Order of arguments for ContainerStore::stacks shouldn't matter. Supplying them in the correct order is error prone, and also caused a bug where equipped items would incorrectly stack. 2013-11-12 22:58:56 +01:00
scrawl 0dab7031c0 Make sure effects are destroyed with the animation 2013-11-12 02:22:44 +01:00
scrawl eccb8f38ba Apply "cast when strikes" enchantments when hitting with a weapon 2013-11-12 02:07:51 +01:00
scrawl 5f209b120b Use the new ContainerStore::remove method. 2013-11-12 01:26:16 +01:00
scrawl ffdb91bb21 Add particles for Cast + Hit. Not looking quite right yet. 2013-11-11 23:43:28 +01:00
Marc Zinnschlag 2fff7fc843 save info records 2013-11-11 12:21:26 +01:00
scrawl 6f3d737498 Missing const, thanks to jeaye 2013-11-10 23:27:11 +01:00
scrawl afafaf73e8 Fix a build error 2013-11-10 22:40:46 +01:00
scrawl 1773c70455 Merge branch 'master' of https://github.com/zinnschlag/openmw into magic 2013-11-10 22:03:17 +01:00
Marc Zinnschlag ef8360f346 silenced a warning 2013-11-10 21:45:27 +01:00
Marc Zinnschlag cfbf444628 Merge remote-tracking branch 'potatoesmaster/inventory-remove' 2013-11-10 21:30:19 +01:00
Nikolay Kasyanov 05e19b37e3 Removed obsolete comment 2013-11-10 22:25:29 +04:00
Nikolay Kasyanov dafe80874a Added empty line 2013-11-10 22:24:31 +04:00
Nikolay Kasyanov 96714fc2c1 OpenCS: proper working dir & library path on OS X 2013-11-10 22:19:32 +04:00
Nikolay Kasyanov fa13818360 OS X: OpenCS packaging 2013-11-10 22:04:13 +04:00
Nikolay Kasyanov dfa900e4e3 OS X: Fixed “macro redefined” warning 2013-11-10 20:59:10 +04:00
Nikolay Kasyanov 0494fa543f OpenCS: set current directory to bundle location on OS X, like in OpenMW binary 2013-11-10 20:39:35 +04:00
Nikolay Kasyanov df5b52b45b OpenCS.app icon & bundle properties 2013-11-10 20:11:53 +04:00
Nikolay Kasyanov 04edd25add OpenCS as a separate app bundle 2013-11-10 19:09:05 +04:00
scrawl 6cd373c5c6 Only allow using powers once every 24 h. Apply on touch effects. 2013-11-10 15:40:31 +01:00
scrawl 71828351e6 Code cleanup: use enum instead of integer 2013-11-10 15:28:26 +01:00
Marc Zinnschlag 8c4303399f Merge branch 'master' into dialogue
Conflicts:
	apps/opencs/model/world/columns.cpp
	apps/opencs/model/world/columns.hpp
	apps/opencs/model/world/data.cpp
	components/esm/loadinfo.hpp
2013-11-10 13:21:39 +01:00
Marc Zinnschlag 583f1ae9c2 fixed info record ordering and performance problems by determining topic ranges in the record collection instead of in the index collection 2013-11-10 13:00:46 +01:00
Marc Zinnschlag ec6018928c some fixes to info record sorting (doesn't address the main problem) 2013-11-10 12:09:49 +01:00
Marc Zinnschlag b7bb7d6902 Merge remote-tracking branch 'scrawl/master'
Conflicts:
	apps/opencs/editor.cpp
2013-11-10 11:49:48 +01:00
Emanuel Guevel bbfd7f4c9d Disable equipped item re-stacking when the item is removed from inventory
The item was not removed if it was re-stacked.
2013-11-10 02:45:17 +01:00
Emanuel Guevel d2dcf0b203 Add a warning comment to RefData::setCount() 2013-11-10 02:45:17 +01:00
Emanuel Guevel 467bd91651 Update actor model on inventory change 2013-11-10 02:45:17 +01:00
Emanuel Guevel f428921b93 Always update the source container view on drag&drop
This fix the indicator not being displayed for items auto-equipped
after an other item is removed.
2013-11-10 02:45:17 +01:00
Emanuel Guevel 4fcf427e1f InventoryWindow: call InventoryStore::unequipItem() when an equipped item is dragged
The unequipped item is also re-stacked if needed.
2013-11-10 02:45:17 +01:00
Emanuel Guevel 37e91a278e Add InventoryStore::unequipItem() 2013-11-10 02:45:17 +01:00
Emanuel Guevel 12dbbde1e3 InvStore::unequipSlot: return an iterator to the unequipped item 2013-11-10 02:45:17 +01:00
Emanuel Guevel 59c963b6cc Auto-equip items when a clothe or an armor is removed from inventory
This fix auto-equip on corpses.
2013-11-10 02:45:16 +01:00
Emanuel Guevel 750f1fd760 Edit ContainerStore::stacks for clarifications and correctness
Rename arguments and fix some potential errors (add checks).
2013-11-10 02:45:16 +01:00
Emanuel Guevel 26e4ccb8c2 Cosmetic changes
Rename ContainerStore::addImpl to addNewStack (it was confusing, since
ContainerStore had methods named 'addImp' and 'addImpl').
2013-11-10 02:45:16 +01:00
Emanuel Guevel aefa54d72d Pass item count to ManualRef constructor
This remove the need to call setCount in multiple places.
2013-11-10 02:45:16 +01:00
Emanuel Guevel 0691978603 Add item count to ManualRef constructor as optional argument 2013-11-10 02:45:16 +01:00
Emanuel Guevel f4f2586e8c Remove duplicate code for PlaceAtMe/PlaceAtPC using a template 2013-11-10 02:45:16 +01:00
Emanuel Guevel 8ff747fbef Move some deleteObject logic from OpDelete to MWWorld::deleteObject 2013-11-10 02:45:16 +01:00
Emanuel Guevel 2786530430 Edit InventoryStore::equip() to call the new unequipSlot function…
…to unequip previously equipped item.
2013-11-10 02:45:16 +01:00
Emanuel Guevel 52cef19982 Update weapon/magic icons when items are removed from player inventory 2013-11-10 02:45:16 +01:00
Emanuel Guevel d05baa8c22 Add method InventoryStore::unequipSlot()
This will permit to do run a treatment when an item is unequipped.
2013-11-10 02:45:16 +01:00
Emanuel Guevel 10abb9d297 Call ContainerStore::remove() to remove items from inventory
Make placeObject() and dropObjectOnGround() in MWWorld to copy objects
(and indicate it clearly).

Enchanting an item now unequips it.
2013-11-10 02:45:16 +01:00
Emanuel Guevel 23b8206bdc Add remove methods to MWWorld::ContainerStore 2013-11-10 02:45:16 +01:00
Marc Zinnschlag a198751f21 Merge remote-tracking branch 'scrawl/magic' 2013-11-09 17:00:27 +01:00
Marc Zinnschlag 935d9241d8 first attempt at proper info record loading: partially incorrect and way too slow 2013-11-09 11:42:19 +01:00
scrawl 5c148a3d41 Fix effect source display 2013-11-09 11:09:44 +01:00
Marc Zinnschlag 8be3ffc2a0 Merge remote-tracking branch 'scrawl/magic'
Conflicts:
	apps/openmw/mwworld/worldimp.cpp
2013-11-09 10:54:51 +01:00
scrawl 3e58655a90 Implemented Fortify/Drain skill magic effects. Scroll of icarian flight works! 2013-11-09 10:49:00 +01:00
scrawl 3ea7d58ca8 Advance skill on successfull spell cast 2013-11-09 10:34:46 +01:00
scrawl 976344f0a3 Handle CastOnce enchantments 2013-11-09 08:07:40 +01:00
scrawl 1051611ffa Added spell failure sound 2013-11-09 07:59:17 +01:00
scrawl cbe96a2170 Refactor ActiveSpells to track range type. Added basic self range magic. 2013-11-09 07:51:46 +01:00
Marc Zinnschlag 3d8da2b9e0 proper sorting for newly created records and some case smashing fixes 2013-11-08 12:16:41 +01:00
Marc Zinnschlag a06aa881cb make sure case handling in info IDs is consistent 2013-11-08 12:03:03 +01:00
Marc Zinnschlag 982024a328 Topic range access in InfoCollection 2013-11-08 11:52:30 +01:00
Marc Zinnschlag 0745a86039 added InfoCreator 2013-11-08 11:51:59 +01:00
Marc Zinnschlag ef401a774b Merge remote-tracking branch 'eroen/install-fix' 2013-11-08 09:10:44 +01:00
Marc Zinnschlag 224aa5d38c Merge remote-tracking branch 'eroen/install-fix-17' into openmw-27 2013-11-08 09:10:26 +01:00
Bret CurtisandMarc Zinnschlag 5a071b0f81 necessary dpkg rules to get opencs building and packaged on dpkg systems 2013-11-08 09:08:56 +01:00
eroen e885c502a1 Stop installing "Daedric Font License.txt"
It was removed in 3a827d9c12
2013-11-08 04:37:55 +01:00
eroen 6b931f566d Stop installing "Daedric Font License.txt"
It was removed in 3a827d9c12
2013-11-08 04:30:15 +01:00
Bret Curtis 36efe9605f necessary dpkg rules to get opencs building and packaged on dpkg systems 2013-11-07 23:05:45 +01:00
Marc Zinnschlag fb417f9880 Merge remote-tracking branch 'scrawl/openmw-27' into openmw-27 2013-11-07 09:19:55 +01:00
Jordan Ayers 3fbf918751 Chargen Review Dialog: Init fix.
Load the starting Health/Magicka/Fatigue from the player stats when
creating the Review Dialog, and remove the extra copy of these stats.
In some cases, the old stat values were never updated from 0/0.
2013-11-06 23:19:53 -06:00
Jordan Ayers d48cc27a89 Chargen fix: Back sequence control.
Related to bug #894.
Eliminate double windows when using 'Back' from the review screen.
Force consistent back behavior (handling was changing after
a individual change button had been used).
2013-11-06 23:19:53 -06:00
Jordan Ayers e94da61ff0 Chargen cleanup.
Move common gui state pop out of if checks.
Move health update before gui state push (used as input for some windows).
2013-11-06 23:19:53 -06:00
Marek Kochanowicz 470616ce92 Added windows.tex. Does not contain a lot at this point. 2013-11-06 22:01:37 +01:00
Marek Kochanowicz 2f5ad4c16f Small changes. 2013-11-06 21:10:00 +01:00
Marc Zinnschlag d85360e7fd Merge remote-tracking branch 'scrawl/ui' 2013-11-06 10:21:41 +01:00
Marc Zinnschlag 418ccf705d Merge branch 'openmw-27'
Conflicts:
	apps/launcher/graphicspage.hpp
	components/CMakeLists.txt
2013-11-06 10:21:25 +01:00
scrawl 9e2b1942fc Fix journal for not installed tribunal (Options button should become Topics). Don't log an error when optional journal buttons (Tribunal) are not found. 2013-11-05 22:50:53 +01:00
scrawl bf5529819d Added combo box widget and use it in options menu. Fixes to VBox / HBox. Added savegame dialog. 2013-11-05 19:50:24 +01:00
Marc Zinnschlag c545b3682a compose info record IDs from actual record ID and parent topic ID (to make sure IDs are unique) 2013-11-05 12:57:55 +01:00
Marc Zinnschlag 2d4a6c0edf cleaned up ID handling in INFO record (including a ESMTool bug fix) 2013-11-05 12:56:20 +01:00
Marc Zinnschlag 9d7695ea88 added missing columns to topic info table 2013-11-05 11:41:48 +01:00
Marc Zinnschlag 245d7b0ae4 Merge remote-tracking branch 'scrawl/windowclosefix' 2013-11-05 08:19:53 +01:00
Marc Zinnschlag f4e6f31658 Merge remote-tracking branch 'scrawl/openmw-27' 2013-11-05 08:19:29 +01:00
scrawl c3d9bc31bb Fix exiting OpenMW via the window close button (regression) 2013-11-05 03:02:28 +01:00
scrawl 3a827d9c12 Deleted Obliviontt.zip 2013-11-05 00:32:06 +01:00
Marc Zinnschlag 8bacdc8ab8 updated changelog 2013-11-04 14:19:58 +01:00
Alexander "Ace" Olofsson 468e8e3635 Missing iostream include 2013-11-04 10:36:22 +01:00
Marc Zinnschlag 8e439c290d updated changelog 2013-11-04 09:22:23 +01:00
Marc Zinnschlag dec1483fa4 Merge branch 'saving' into openmw-27 2013-11-04 08:57:32 +01:00
graffy76 6d439d032f Merge branch 'saving' of https://github.com/zinnschlag/openmw into esxSelector 2013-11-03 21:38:10 -06:00
graffy76 ed913936f8 Eliminated game & addon keys from profile configuration 2013-11-03 21:36:41 -06:00
graffy76 dace904490 changed game/addon to content for writing to openmw.cfg from launcher 2013-11-03 16:45:18 -06:00
Marc Zinnschlag 3ac58b387b fixed wording of an error message 2013-11-03 22:08:38 +01:00
graffy76 1d4b5a2425 Fix broken launcher content file display / selection scheme
Disable selection of content files with missing dependencies (grayed
out)
2013-11-03 14:02:41 -06:00
graffy76 12c06a5615 Fixed broken dependency check 2013-11-03 06:21:28 -06:00
Marc Zinnschlag 4724df7e9b added topic/journal column to info tables 2013-11-03 10:48:50 +01:00
graffy76 973803eb2f Fixed pathing issues in launcher 2013-11-03 00:02:46 -05:00
Lukasz GromanowskiandMarc Zinnschlag afce10cf37 Fixes #597: Assertion `dialogue->mId == id' failed in esmstore.cpp
It seems that assertion was unnecessary, after removing it, dialogs
related to moon-and-star in "Path of the Incarnate" quest were
correctly loaded (dumped DialInfo records were correct).

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-11-02 16:39:05 +01:00
graffy76 8d12e2b99d fixed merge conflicts
Merge branch 'saving' of https://github.com/zinnschlag/openmw into esxSelector

Conflicts:
	apps/launcher/datafilespage.cpp
	apps/launcher/settings/gamesettings.hpp
	components/contentselector/model/contentmodel.cpp
2013-11-02 09:31:23 -05:00
graffy76 cddece4f9e Another stab at fixing the pathing problem... 2013-11-01 21:47:26 -05:00
scrawl e6960d915a Add simple Ogre widget 2013-11-02 02:51:38 +01:00
Marc Zinnschlag 15b7d3263c subclass ESM::DialInfo to keep track of parent topic 2013-11-01 17:43:45 +01:00
Marek Kochanowicz 8302924464 corrected typo 2013-11-01 13:54:34 +01:00
Marek Kochanowicz 8ae38eaa1f Corrected few things and added short description for creating and saving filter, as well as replacing the default filters set. 2013-11-01 13:52:24 +01:00
graffy76 0cb591e4f6 Fixed path problem with adjuster widget and local data path. 2013-10-31 18:12:13 -05:00
Nikolay Kasyanov a85dffe644 Delete README_Mac.md
Use updated manual from wiki: https://wiki.openmw.org/index.php?title=Development_Environment_Setup#Mac_OS_X
2013-10-31 20:28:01 +03:00
Marc Zinnschlag ea0e8be0d3 disallow sorting (via column headers) in info tables 2013-10-31 13:40:14 +01:00
Marc Zinnschlag 90aa8f9db6 fixed dialogue record loading with multiple content files 2013-10-31 13:11:15 +01:00
Marc Zinnschlag 767cb54e7c added missing columns to journal info table 2013-10-31 12:54:55 +01:00
Marc Zinnschlag 69f28ee4be split info records between journal and topic info tables 2013-10-31 12:16:45 +01:00
gus 683b8d77dd build fix (thanks travis) 2013-10-31 11:02:26 +01:00
Marek Kochanowicz 0141526c55 Corrected tables.tex so it will compile. 2013-10-31 10:21:10 +01:00
sirherrbatka 6182d444a7 Merge pull request #1 from TomKoenderink/csmanual
I will take a look at it.
2013-10-31 02:10:40 -07:00
gus d587f3c946 Merge branch 'master' of https://github.com/zinnschlag/openmw.git into AICombat
Conflicts:
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwscript/docs/vmformat.txt
2013-10-31 09:51:17 +01:00
gus 02ded18fc5 Linux backslash fix 2013-10-31 09:43:12 +01:00
TomKoenderink cb8d111d36 Started tables.tex; import library for images 2013-10-30 21:51:37 +01:00
gus 2a927f65d3 perfomances optimisations (pathfinding is computed less often, max 4 times per sec) 2013-10-30 20:52:23 +01:00
gus 650a112e2e better timer 2013-10-30 20:42:50 +01:00
scrawl 636d399c7f Refactored Ogre initialisation into a component 2013-10-30 14:04:33 +01:00
scrawl 4f35fd8184 Removed a workaround from Renderer, some cleanup 2013-10-30 13:05:28 +01:00
Marek Kochanowicz 056833e21e Still filters. A little less draft-ish quality. 2013-10-30 12:57:01 +01:00
Marek Kochanowicz 382ca00dcb Still draft. I need to carefully read the text, and point out that this is all about record filters. 2013-10-29 20:46:53 +01:00
Marc Zinnschlag b20943b123 Merge remote-tracking branch 'ace/win-package' into openmw-27 2013-10-29 14:18:13 +01:00
Alexander "Ace" Olofsson 632a53ead4 Support packing the OpenCS into windows builds 2013-10-29 13:28:43 +01:00
Marc Zinnschlag ba88c94d58 first attempt at an info record collection 2013-10-29 13:18:22 +01:00
Marc Zinnschlag 45f5a66bcc use result of getAppendIndex instead of always appending at the end 2013-10-29 09:27:23 +01:00
gus a6e7c6c104 disable AI combat for creatures 2013-10-28 23:04:46 +01:00
gus 5b20cce849 CMake fix 2013-10-28 18:36:09 +01:00
gus 0e86209224 linux fix :p 2013-10-28 18:33:10 +01:00
gus b7a9243173 fighting should stop when the target is dead 2013-10-28 18:22:36 +01:00
gus 12d8b4e0f8 bugfix 2013-10-28 18:13:07 +01:00
gus 2d84f7d33d NPC run 2013-10-28 18:10:00 +01:00
gus d7584f9df7 getLineOfSight, no script instruction yet 2013-10-28 18:01:40 +01:00
Marc Zinnschlag 29fce6d11f increased version number 2013-10-28 08:45:56 +01:00
Marc Zinnschlag f5fbe7361f Merge remote-tracking branch 'lgro/saving' into saving 2013-10-28 08:35:51 +01:00
graffy76 b51bef0d98 fixed missing adjuster widget in file dialog open view 2013-10-27 20:21:19 -05:00
Lukasz Gromanowski d51c9b64dd Issue #913: Merge --master and --plugin switches
Launcher part of master/plugin switches merge.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-10-27 20:03:12 +01:00
Lukasz Gromanowski 489475a32f Corrected compilation error (g++ 4.8.2) triggered by not found declaration
in argument-dependent lookup at the point of instantiation.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-10-27 19:57:05 +01:00
Marc Zinnschlag c2bbbef637 Merge remote-tracking branch 'rainChu/drowning-gauge' 2013-10-27 16:10:11 +01:00
gus 2515a1239e improved combat conditions 2013-10-27 14:22:51 +01:00
Marc Zinnschlag 9a80e11182 reimplemented add and appendBlankRecord via insertRecord 2013-10-27 14:13:10 +01:00
gus 968968502e NPC always face you when fighting 2013-10-27 14:03:58 +01:00
Marc Zinnschlag 525d6fadec added Collection insert function for arbitrary position and reimplemented appendRecord in via this function 2013-10-27 14:00:25 +01:00
gus a0edb55f60 only NPC with fight over 80 will attack you now 2013-10-27 13:50:29 +01:00
gus 882b136b35 bugfix of bugfix ^^ 2013-10-27 13:21:16 +01:00
Alex "rainChu" Haddad 23eaf90846 Breath meter flashes when drowning 2013-10-27 04:05:01 -04:00
graffy76 ea7a8eb2a4 last commit 2013-10-26 23:04:39 -05:00
graffy76 5e123d3f52 Hide adjusterwidget for open files view 2013-10-26 22:57:22 -05:00
graffy76 9b483c3ae3 Fix for file path issues 2013-10-26 22:55:44 -05:00
graffy76 ba365ff49e Fixed merge conflicts with saving branch 2013-10-25 19:23:03 -05:00
scrawl 8c9a5de26f Fix an irritating error message 2013-10-25 23:47:53 +02:00
graffy76 9ce4a04a2d merge from saving
Merge branch 'saving' of https://github.com/zinnschlag/openmw into esxSelector

Conflicts:
	apps/launcher/datafilespage.cpp
	apps/opencs/editor.cpp
	apps/opencs/view/doc/filedialog.cpp
	apps/opencs/view/doc/filedialog.hpp
2013-10-25 14:44:22 -05:00
graffy76 1a23cccce3 Implemented Launcher namespace 2013-10-25 11:17:26 -05:00
graffy76 16d87ea1d1 Merge branch 'master' into esxSelector 2013-10-25 08:11:24 -05:00
graffy76 2ca7f24731 Fixed filedialog new / edit content path issue 2013-10-24 17:33:28 -05:00
Marek Kochanowicz cef3b30b25 Added tables.tex. It is almost empty at the moment. 2013-10-24 19:24:37 +02:00
Marek Kochanowicz e89f1dd40a Corrected, according to Zini. Not completly, though. 2013-10-24 18:33:35 +02:00
graffy76 b48f066f33 Reimplemented content selector for filedialog and datafilespage classes 2013-10-23 17:39:17 -05:00
Marek Kochanowicz 11779c27d3 Writting that manual… 2013-10-23 21:34:59 +02:00
Marek Kochanowicz e34cbe857c Added a little more to the filters. 2013-10-23 12:37:28 +02:00
graffy76 ba3589bc76 Revert "Implemented ContentSelector as a singleton "charm" modifier for"
This reverts commit 24b167b755.

Conflicts:
	apps/launcher/datafilespage.cpp
	apps/opencs/editor.cpp
	apps/opencs/view/doc/filedialog.cpp
	apps/opencs/view/doc/filedialog.hpp
	components/contentselector/view/contentselector.cpp
	components/contentselector/view/contentselector.hpp
2013-10-22 22:20:21 -05:00
graffy76 f9591ddda6 Reimplemented constentselector view class 2013-10-22 21:52:35 -05:00
Marek Kochanowicz 930aef7ae5 Added *.pdf to the gitignore. 2013-10-22 21:25:13 +02:00
Marek Kochanowicz ca700c4cfd Creating the new branch for filters. 2013-10-22 17:20:15 +02:00
Marc Zinnschlag 67bc0a0c70 additional modification to the IDValidator (restricting relaxed mode slightly more) 2013-10-22 11:32:10 +02:00
Marc Zinnschlag dc473221e7 added ID-argument to CollectionBase::getAppendIndex (required for info record collection) 2013-10-22 11:21:12 +02:00
Marc Zinnschlag aa61948801 relaxed rules for new IDs when ID is also a user visible text 2013-10-22 11:08:37 +02:00
Marc Zinnschlag 3146af34d6 some fixes for the merged filter branch 2013-10-21 19:28:57 +02:00
Marc Zinnschlag fdba029566 Merge remote-tracking branch 'sirherrbatka/filters' into saving 2013-10-21 18:59:12 +02:00
Marek Kochanowicz ce2c558257 Missed a file. 2013-10-21 18:40:20 +02:00
Marek Kochanowicz 70602c2c36 Removed changes in the unimplemented copy ctor. 2013-10-21 18:24:16 +02:00
Marek Kochanowicz 5e1bdd605b Corrected formatting in document.hpp 2013-10-21 18:15:26 +02:00
Marc Zinnschlag 88e09159c4 splitting off characters menu from mechanics menu (was getting too big) 2013-10-21 18:04:40 +02:00
Marc Zinnschlag 743c6ea5b1 save dialogue records 2013-10-21 16:47:32 +02:00
Marc Zinnschlag c995533e07 Merge branch 'dialogue' into saving
Conflicts:
	apps/opencs/model/world/columnimp.hpp
	apps/opencs/model/world/columns.cpp
	apps/opencs/model/world/columns.hpp
	apps/opencs/model/world/data.cpp
	components/esm/loaddial.hpp
2013-10-21 16:45:43 +02:00
Marek Kochanowicz b23df42817 Removed old comment. Changed to set resources path correctly. 2013-10-21 16:06:16 +02:00
Marc Zinnschlag 3b85d97087 handle deleted dialogue records 2013-10-21 15:38:13 +02:00
Marc Zinnschlag dc12648a3e add fixed dialogue records when creating a new omwgame file 2013-10-21 14:26:54 +02:00
Marc Zinnschlag c0e5501431 disallow the deletion of non-topic, non-journal dialogue records 2013-10-21 13:58:47 +02:00
Marc Zinnschlag 0be157efea set dialogue type for newly created dialogue records 2013-10-21 13:39:13 +02:00
Marc Zinnschlag 75c5316ad7 added dialogue type column to topics table 2013-10-20 17:26:09 +02:00
Marek Kochanowicz b138533bf3 renamed defaultfilter.omwaddon.project to defaultfilters. 2013-10-20 17:21:09 +02:00
Marc Zinnschlag adf3a41a83 added topic and journal tables 2013-10-20 17:15:32 +02:00
Marc Zinnschlag ebf7732912 some cleanup 2013-10-20 15:48:39 +02:00
Marek Kochanowicz 96b6787255 Getting rid of extension. Correcting tiny mistake in filters file. 2013-10-20 10:56:27 +02:00
Marek Kochanowicz 6b293961b4 This appears to work. 2013-10-20 10:02:33 +02:00
Marek Kochanowicz 155662860c Added configrue file in cmake. Hopefully it will copy defaultfilters file. 2013-10-20 09:50:16 +02:00
Marek Kochanowicz cafea438bd Added missing light filter. 2013-10-20 09:44:10 +02:00
Marek Kochanowicz 762cbf6278 Changed gauntlets filter. It showes now both gauntlets and bracers. 2013-10-19 18:51:36 +02:00
Marek Kochanowicz 184456892b Added check to load custom filters set when present. 2013-10-19 18:43:47 +02:00
Marek Kochanowicz 4e26a61db3 Removed command line handling. Maybe zini will let me to implement it later. Implemented switch to handle resources directory. TODO: check for defaultfilters on data path. 2013-10-18 22:11:14 +02:00
Marek Kochanowicz a7002e8a09 Implements switch (--help and --resources), and copying defaultfilters.omwaddon.project. Seems to work. 2013-10-17 18:21:41 +02:00
scrawl 3a3f2a37c8 Add cut, copy & paste of text 2013-10-17 12:47:49 +02:00
Marc Zinnschlag 74f7071b82 Merge remote-tracking branch 'jeaye/gitignore' 2013-10-17 10:25:41 +02:00
jeaye 04735a6734 Extend .gitignore
Organize .gitignore to make it easier to add to

Ignore only binaries, not directories

Removed some invalid ignores (.cfg, .desktop, etc)

Better globbing
2013-10-16 14:44:18 -07:00
Marc Zinnschlag 8c139783b7 silenced a warning 2013-10-16 21:33:11 +02:00
Marc Zinnschlag 19bd0f90b9 Merge remote-tracking branch 'rainChu/torches' 2013-10-16 21:24:45 +02:00
Alex "rainChu" Haddad 65818155d8 Fixed punctuation consistency 2013-10-16 15:14:35 -04:00
Alex "rainChu" Haddad e11da5c0a3 Added a constructor to Light CustomData 2013-10-16 15:13:36 -04:00
Marc Zinnschlag 8995cd8543 reverted gitignore changes 2013-10-16 20:35:39 +02:00
Marek Kochanowicz 3000386443 failed attempt on switch adding. 2013-10-16 13:07:26 +02:00
jeaye 5f4e2d2cf2 Organize .gitignore to make it easier to add to 2013-10-15 22:29:51 -07:00
jeaye 8d8ba0257e Added common untracked files to .gitignore 2013-10-15 22:17:50 -07:00
Alex "rainChu" Haddad 2643214ca6 Lights extinguish underwater 2013-10-15 21:50:32 -04:00
Alex "rainChu" Haddad 30ee3c5cf6 Equipped torches and lights run out of fuel 2013-10-15 21:50:14 -04:00
Nikolay Kasyanov 3993c34739 Merge remote-tracking branch 'upstream/master' into osx-ogre-19 2013-10-14 20:37:55 +04:00
Emanuel Guevel ba4b8a37e2 Remember pressed message box button longer
Remember which button was pressed until a new interactive message box is
displayed or until the pressed button number is read.

Before that, it was not possible to get the pressed button after the
message box was hidden/destroyed.
2013-10-14 12:55:06 +02:00
Marc Zinnschlag db7ea30483 allow float values in cell for value tests 2013-10-14 11:15:36 +02:00
Marc Zinnschlag 679754b305 corrected an error message 2013-10-14 11:06:59 +02:00
Marc Zinnschlag 9b0766b678 minor fix in ValueNode::toString 2013-10-14 10:58:11 +02:00
Marc Zinnschlag 4905f1c8ab make testing empty cells against an empty string yield true 2013-10-13 21:54:36 +02:00
Marc Zinnschlag ce8694c84e Merge remote-tracking branch 'scrawl/master' 2013-10-13 18:55:49 +02:00
scrawl 683ad40e21 No need for this ifdef since there is a default argument. 2013-10-13 18:28:22 +02:00
scrawl 2fb059e2fa Don't destroy the SDL window twice 2013-10-13 18:20:55 +02:00
scrawl fa264935ff We can apply vsync at runtime now that the Ogre bug is fixed. 2013-10-13 17:56:26 +02:00
scrawl f504ab42fe Turn off vsync while in the loading screen 2013-10-13 17:52:14 +02:00
Marc Zinnschlag b8ae195a46 Merge branch 'scene' 2013-10-13 15:42:27 +02:00
Marc Zinnschlag 4624bed899 changed handling of scene toolbar button icons 2013-10-13 15:41:48 +02:00
Marc Zinnschlag c8d0fb8c4e updated credits file 2013-10-13 14:43:59 +02:00
Marc Zinnschlag fc5afe430b Merge remote-tracking branch 'potatoesmaster/fatigue-restoration' 2013-10-13 14:40:48 +02:00
Emanuel Guevel dcfff79460 Regenerate fatigue over time 2013-10-13 00:40:27 +02:00
Marc Zinnschlag 708cde2688 Merge remote-tracking branch 'jordan-ayers/topic/COC-Exterior-Cell-Selection' 2013-10-12 23:18:19 +02:00
Jordan Ayers 141382b8c0 COC Command: Exterior cell selection fix.
Return the northernmost cell of the easternmost matching column for Ext. cells.
2013-10-12 14:48:37 -05:00
Marc Zinnschlag 608d154ad7 Merge remote-tracking branch 'rainChu/master' 2013-10-12 20:31:33 +02:00
Alex "rainChu" Haddad cfc3093320 Reverted conditional compiling 2013-10-12 10:46:44 -04:00
Marc Zinnschlag b5d620a8dc fixed string filter on enum column when column is empty 2013-10-12 16:35:59 +02:00
Marc Zinnschlag a29b8667ef fixed string filter on boolean columns when testing against the value false 2013-10-12 16:29:36 +02:00
Marc Zinnschlag a77044cda4 fixed column numbering 2013-10-12 16:15:47 +02:00
Marc Zinnschlag 2606feec3a Merge remote-tracking branch 'lgro/cfg_without_data_path' 2013-10-12 13:52:38 +02:00
Marc Zinnschlag 3c580fbc59 Merge remote-tracking branch 'jordan-ayers/topic/MagicEffectDisplayFormat' 2013-10-12 13:40:29 +02:00
Marc Zinnschlag 458c752425 Merge remote-tracking branch 'mckibbenta/tgm' 2013-10-12 13:38:10 +02:00
Marc Zinnschlag 87cd5d4267 Merge remote-tracking branch 'potatoesmaster/DisableLevitation' 2013-10-12 13:31:06 +02:00
Marc Zinnschlag 9c4d88cd76 Merge remote-tracking branch 'potatoesmaster/acrobatics' 2013-10-12 13:20:12 +02:00
Marc Zinnschlag c8dc6a70b7 Merge remote-tracking branch 'greye/master' 2013-10-12 13:14:47 +02:00
Marc Zinnschlag c8695db66f Merge remote-tracking branch 'wheybags/unshield_fixes' 2013-10-12 13:03:38 +02:00
Lukasz Gromanowski 5ce1f50fab Cleanup in MWGui::WindowManager constructor initialzation list.
Corrected order of initialization list, and added missing
member field initializations - without this openmw crashes when
installer is interrupted and there are no valid data path
in openmw.cfg, as reported by BrotherBrick in:

https://forum.openmw.org/viewtopic.php?f=20&p=19501#p19499

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-10-10 23:06:37 +02:00
Jordan Ayers 6e4978643c Magic Effect descriptions: support feet / level modes.
Show proper suffixes for all magnitudes.
Drop extra 'times' symbol in 'timesInt format (not consistent
with other magnitude displays).
2013-10-09 00:08:11 -05:00
Jordan Ayers 296b2ab870 Magic Effect: Recognize other display types.
Fill out the list of effects which use percentage formatting.
Add in types which use Feet and level labels.
2013-10-08 23:55:14 -05:00
Jordan Ayers 6ab7002908 MagicEffect: Put magnitude type into ESM::MagicEffect helper. 2013-10-07 22:28:55 -05:00
Jordan Ayers 065f435225 Format fix: remove extra spaces from ranged TimesINT formatting. 2013-10-07 20:02:20 -05:00
gus 94069e3a7e bugfix 2013-10-07 20:30:12 +02:00
graffy76 17950210fa Merge branch 'master' into esxSelector 2013-10-07 06:52:20 -05:00
Marc Zinnschlag 74cee66273 consolidated magic numbers for button size 2013-10-07 11:24:53 +02:00
gus 1ac3d99c78 pathfinding now works in AICombat. 2013-10-07 10:20:02 +02:00
Marc Zinnschlag 4d6c3cdf09 removed more garbage 2013-10-07 08:55:04 +02:00
graffy76 4c72a9ffdf Fixed non-loading files 2013-10-06 22:10:38 -05:00
graffy76 217a4d75b4 Implemented profile function in launcher datafiles page
Implemented dependency sorting to ensure dependent files appear latest
in the list.
2013-10-06 21:13:47 -05:00
Jordan Ayers 6303e56ce4 Magic Effect Display cleanup: Don't put spaces in percentages. 2013-10-06 20:35:59 -05:00
Jordan Ayers 707f45aa8e Magic Effect Display improvement.
Related to Bug #794.
Always show one decimal point precision for Fortify Max. Magicka effect.
2013-10-06 20:26:39 -05:00
Jordan Ayers 6983a55a16 Magic effect display improvement.
Related to Bug #794.
Show the "x INT" notation for Fortify Max. Magicka.
Show "%" notation for weakness / resistance effects.
2013-10-06 19:32:40 -05:00
Marc Zinnschlag 75991fedfd removed some garbage 2013-10-04 12:33:55 +02:00
Emanuel Guevel 2abe5c1c9a Acrobatics: do not apply fall damages when slowfalling spell effect is active
If spell effect ends up in mid-air, calculate fall height from then.
2013-10-02 23:34:25 +02:00
Emanuel Guevel 4265dddc40 Add MWWorld::isSlowFalling(Ptr) 2013-10-02 23:34:25 +02:00
Emanuel Guevel 6e09a5fb4a Acrobatics: reinit fall height at current height rather than zero
To prevent problems.
2013-10-02 23:34:25 +02:00
Emanuel Guevel 2b992ef3b5 Acrobatics: use calculated fatigueTerm 2013-10-02 23:34:24 +02:00
Emanuel Guevel 4c151e59a2 Acrobatics: do not touch modified stats 2013-10-02 23:34:24 +02:00
Emanuel Guevel 4860514865 Acrobatics: cosmetic changes 2013-10-02 23:34:24 +02:00
mckibbenta 857deb3723 Merge branch 'master' into tgm 2013-10-02 13:54:03 -04:00
mckibbenta 073f64c8bb stop weapon condition degredation (for the player) with tgm on 2013-10-02 13:46:33 -04:00
Emanuel Guevel 496f786c2a Implement Disable/EnableLevitation script functions
Totally copied on Disable/EnableTeleporting implementation.
Thanks KittyCat!
2013-10-02 15:33:20 +02:00
Alex "rainChu" Haddad f1b4c2e400 Fixed first person offset to use world transform
It slipped my mind that some necks might not be perfectly vertical.
2013-10-02 07:03:39 -04:00
Alex "rainChu" Haddad ed0c31b485 Refactored, moved logic out of NpcAnimation
The logic is now handled by RenderingManager, and Camera sets its
animation's first person offset height. Due to how NpcAnimation seems to
be updated, it has to be the one to actually set its own nodes, in the
case of the hands. Otherwise, the hands would not move without a messier
hack.
2013-10-02 05:16:52 -04:00
graffy76 a5a0f61533 Fixed missing profiles combobox 2013-10-01 22:36:49 -05:00
graffy76 00c78a4aa1 Implementing ContentSelector class in DataFilesPage
Moved AdjusterWidget / FileWidget to ContentSelectorView
2013-10-01 21:29:45 -05:00
Emanuel Guevel b8c60dabb3 Reintroduce Acrobatics changes made by Glorf
Advance Acrobatics skill on jump and on landing,
apply fall damage on landing.
2013-10-01 23:35:34 +02:00
Alex "rainChu" Haddad 0ddb5097fc Revert "Bug #840, First Person Sneaking Camera Height"
This reverts commit 296abfd48f.
2013-10-01 11:44:45 -04:00
Alex "rainChu" Haddad 296abfd48f Bug #840, First Person Sneaking Camera Height
Also, added comments to existing code in the area.
2013-10-01 10:48:34 -04:00
Alex "rainChu" Haddad 4496244b14 Tabs to spaces
My own code uses only tabs - I forgot to change the setting on my IDE,
sorry!
2013-10-01 05:36:13 -04:00
Alex "rainChu" Haddad eae02ea00d Cleaned up my hackish code for WinMain 2013-09-30 03:33:31 -04:00
Alex "rainChu" Haddad 00a776a1a8 Fixed compilation failure on my machine
Fixed shared records not being populated before the player record is
moved.
2013-09-30 02:54:20 -04:00
greye 4cdb57e388 workaround segfault on --new-game switch 2013-09-30 10:30:40 +04:00
Alex "rainChu" Haddad bffbfff41c My own fix to make it hackily compile 2013-09-30 00:32:06 -04:00
graffy76 24b167b755 Implemented ContentSelector as a singleton "charm" modifier for
FileDialog...
2013-09-29 12:19:07 -05:00
Tom Mason dd0a416249 cleaned up bloodmoon_fix_ini 2013-09-29 16:59:52 +01:00
Tom Mason fd169c2399 fixed issue with cds where subfolders of Data Files were contained outside the Data Files folder 2013-09-29 15:49:47 +01:00
Lukasz Gromanowski ef617d408b Issue #913: Merge --master and --plugin switches
Merged master/plugin switches in launcher.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-09-29 09:14:40 +02:00
Lukasz Gromanowski 9c2145eda1 Issue #913: Merge --master and --plugin switches
Merged master/plugin switches into content in openmw
and mwiniimporter.

Extension in content files is now required.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-09-29 09:11:57 +02:00
gus 83a375b55d AI now continue to hit you.
TODO: change the way time is handled
2013-09-28 21:17:06 +02:00
Marc Zinnschlag 7be1f1afc2 implemented SceneToolMode as a horizontal panel with radiobutton-type buttons 2013-09-28 13:10:42 +02:00
gus 2537384c50 bug fix 2013-09-28 12:25:37 +02:00
Marc Zinnschlag 0c5f07a65a added SceneToolMode class 2013-09-28 11:27:24 +02:00
Marc Zinnschlag 84cadc10f4 added scene toolbar buttons (still not doing anything) 2013-09-28 11:06:56 +02:00
Marc Zinnschlag 9ea092927f added basic scene subview (no functionality yet) 2013-09-28 09:25:54 +02:00
Marc Zinnschlag 6143ec33e0 giving Documents direct access to ConfigurationManager 2013-09-27 15:24:58 +02:00
Marc Zinnschlag e7c48cbe58 load project files 2013-09-27 15:04:30 +02:00
Marc Zinnschlag 62148b3247 moved implementation of searchColumnIndex and findColumnIndex functions from IdTable to CollectionBase 2013-09-27 15:04:09 +02:00
Marc Zinnschlag baae548106 added project scope filter saving 2013-09-27 13:56:40 +02:00
Marc Zinnschlag 6ac4dedfbe added missing column enum 2013-09-27 13:56:23 +02:00
Marc Zinnschlag 31346dde58 fixed uninitialise scope value for filters 2013-09-27 13:55:28 +02:00
Marc Zinnschlag 6f2c418a5c (slightly) improved error reporting during save operations 2013-09-27 13:54:51 +02:00
Marc Zinnschlag 23095ec3ec added missing scope column to filter table 2013-09-27 13:54:21 +02:00
Marc Zinnschlag 4ea5191d7d fixed write function for ESM variant type 2013-09-27 13:17:04 +02:00
Marc Zinnschlag 5779f799ab create project file when saving content file 2013-09-27 11:36:06 +02:00
Marc Zinnschlag 1363e86828 made verifier ignore deleted records 2013-09-27 10:08:09 +02:00
gus 9353f4d14f WIP AI combat 2013-09-25 18:01:36 +02:00
Marc Zinnschlag 96fd1c35bf preserve author/descriptin meta data 2013-09-24 17:17:01 +02:00
Marc Zinnschlag 830530bd06 set record count in TES3 header 2013-09-24 17:08:24 +02:00
Marc Zinnschlag e4fdebc85b added saving for referenceable records 2013-09-24 13:53:19 +02:00
Marc Zinnschlag c42e74dadf make 4 byte record type accessable from record struct 2013-09-24 13:17:28 +02:00
Marc Zinnschlag 7a05180d00 updated credits file 2013-09-24 09:40:35 +02:00
graffy76 3b40192e90 Merge branch 'master' into esxSelector 2013-09-23 22:03:42 -05:00
graffy76 9d358dd44c Further implemented auto-checking / unchecking of dependencies 2013-09-23 22:01:44 -05:00
Marek Kochanowicz ae5e8b95ff Solving Issue912 2013-09-23 20:12:04 +02:00
sirherrbatka ea637a24b9 Issue 912, making branch 2013-09-23 19:48:18 +02:00
sirherrbatka 0aebbcfdf5 Merge pull request #2 from zinnschlag/master
Updating fork
2013-09-23 10:47:06 -07:00
Marc Zinnschlag 0f1c4cb00e cleanup 2013-09-23 15:34:52 +02:00
Berulacks 91d7291c0c Switched to using proper enums as opposed to ints. 2013-09-23 08:31:36 -04:00
graffy76 d7cff6361e Fixed filter issue (all addons for a gamefile are enabled for checking).
Note:  Other dependencies are not yet automatically selected when an
addon is checked.
2013-09-23 06:51:49 -05:00
Berulacks 0c518fb047 Replaced tabs with spaces. 2013-09-23 07:36:50 -04:00
Berulacks c423479f20 Fixed bug #887 2013-09-23 07:31:14 -04:00
Marc Zinnschlag 6d9ff39390 set dependencies when saving (requires further refinements) 2013-09-23 12:16:56 +02:00
Marc Zinnschlag 74d683b530 fixed save path for newly created addons 2013-09-23 11:58:11 +02:00
Marc Zinnschlag 63e0cf5154 fixed missing initialisation of adjuster widget in file dialogue 2013-09-23 11:26:29 +02:00
Marc Zinnschlag d4b2a6b9f1 Merge remote-tracking branch 'graffy76/esxSelector' into saving 2013-09-23 10:09:43 +02:00
graffy76 513f0c4b3e Implemented file/adjuster widgets into new addon creation dialog 2013-09-22 23:52:53 -05:00
Marc Zinnschlag a6ea670255 use IdTypeDelegate in report table 2013-09-22 13:54:01 +02:00
Marc Zinnschlag 1c4a4b4f26 generalised RefIdTypeDelegate into IdTypeDelegate 2013-09-22 13:39:44 +02:00
Marc Zinnschlag 5aa8c03461 Merge remote-tracking branch 'xethik/master' 2013-09-22 11:26:37 +02:00
Xethik 9f533dbbe4 Fixed "most vexing parse" issue. 2013-09-22 04:57:01 -04:00
Marc Zinnschlag f2875e234c added missing position columns to reference table 2013-09-22 10:43:09 +02:00
graffy76 70ac14b8ba Merge branch 'master' into esxSelector 2013-09-21 23:07:53 -05:00
graffy76 cfdc19c427 Renamed esxSelector to contentSelector
Fixed datafilespage model implementation in launcher
Filtered addons in table view by selected game file
2013-09-21 23:06:29 -05:00
Marc Zinnschlag 4e5e3bd694 updated credits file 2013-09-21 10:04:31 +02:00
Marc Zinnschlag 94bb97e766 replacing tabs with spaces 2013-09-21 08:40:00 +02:00
Marc Zinnschlag 96b181bb54 Merge remote-tracking branch 'xethik/master' 2013-09-21 08:07:00 +02:00
Xethik 094e4d93b7 Generally speaking, you should never compare iterators from two different compilers
http://stackoverflow.com/questions/4657513/comparing-iterators-from-different-containers
It seems like this was just an overlook that happened to work on most systems. I was not able to thoroughly test this change, but it fixed an issue I was having in VC10.
It's possible the prev.end() was a copy paste error that was meant to be new.end() anyways.
2013-09-20 21:38:10 -04:00
Xethik 58bb0b8773 Bug #907
Added a check to make sure playerview is allowed when attempting to scroll, locking out zooming before character creation.
2013-09-20 21:26:12 -04:00
graffy76 7b7dfa122d Merge branch 'master' into esxSelector 2013-09-19 16:24:28 -05:00
Marc Zinnschlag 99fe6e68c7 Merge remote-tracking branch 'mckibbenta/tgm' 2013-09-19 15:14:35 +02:00
Marc Zinnschlag 8d4f4e395f update syntax highlighting when ID list changes 2013-09-19 14:26:09 +02:00
graffy76 244e581952 Finished implementing drag / drop
refactored datafilesmodel (now contentmodel)
refactored esmfil
2013-09-19 06:53:09 -05:00
Marc Zinnschlag ba5e2a0330 changed ID listing to include deleted records by default 2013-09-19 13:42:19 +02:00
Marc Zinnschlag 9c751ae370 separate highlight colour for IDs 2013-09-19 12:30:42 +02:00
Marc Zinnschlag 3d2281fe80 added signals and functions to Data for handling ID list changes 2013-09-19 12:11:27 +02:00
Marc Zinnschlag 78f7f80fc3 configured script highlighting with extensions 2013-09-19 08:58:27 +02:00
graffy76 0eb06ada39 Implemneting drag and drop 2013-09-18 02:36:23 -05:00
scrawl d5ef843f56 Fix a missing model update 2013-09-16 19:22:08 +02:00
Marc Zinnschlag acfd78c62a implemented saving for all supported record types except cells, referencables and references 2013-09-16 14:17:04 +02:00
Marc Zinnschlag 03054c8160 forgot to write record ID 2013-09-16 14:10:05 +02:00
Marc Zinnschlag bf0fba68af added save stage for globals 2013-09-16 12:51:57 +02:00
Marc Zinnschlag 874ce26bef added missing consts to record save functions 2013-09-16 12:32:35 +02:00
mckibbenta 6bb6ba6372 added god mode comment 2013-09-15 16:12:59 -04:00
mckibbenta 3035675a26 Merge branch 'master' of https://github.com/zinnschlag/openmw 2013-09-15 15:49:18 -04:00
mckibbenta 644f081c60 minor changes 2013-09-15 15:48:32 -04:00
Nikolay Kasyanov a18e3c9cc1 Fixed packaging when building against Ogre 1.9 2013-09-15 23:10:21 +04:00
Nikolay Kasyanov 36fb89c6cd Cleanup 2013-09-15 23:03:07 +04:00
Nikolay Kasyanov 25cd9ebf45 Plugins are frameworks in Ogre 1.9. Version hack removed. 2013-09-15 21:56:47 +04:00
Marc Zinnschlag db70095148 write TES3 header 2013-09-15 15:31:44 +02:00
Marc Zinnschlag 1ee228a566 fix for the ESMWriter fix 2013-09-15 15:30:17 +02:00
Marc Zinnschlag 231419028d minor fix 2013-09-15 15:03:17 +02:00
Marc Zinnschlag fa25a068a8 basic saving (no data is written to file yet) 2013-09-15 15:00:41 +02:00
Marc Zinnschlag bcd36bd378 various ESMWriter fixes 2013-09-15 15:00:15 +02:00
Marc Zinnschlag 8326ac9b6f replaced dummy save implementation with a threaded dummy save implementation 2013-09-15 12:53:59 +02:00
Marc Zinnschlag d71d282952 more Operation enhancements in preparation for save operation 2013-09-15 12:03:36 +02:00
Marc Zinnschlag 414e6abb95 more signal cleanup 2013-09-15 11:35:12 +02:00
Marc Zinnschlag a5aebfb760 minor cleanup 2013-09-15 09:32:20 +02:00
mckibbenta c9f1bd8735 Merge branch 'master' of https://github.com/zinnschlag/openmw 2013-09-14 16:38:46 -04:00
Marc Zinnschlag b7bffc8a79 removed Verifier class (using Operation class without subclassing now) 2013-09-14 15:16:31 +02:00
Marc Zinnschlag f4c03c6a29 added ordered-flag to Operation (currently ignored) 2013-09-14 15:12:24 +02:00
Marc Zinnschlag 077a157841 moved Operation and Stage from model/tools to model/doc 2013-09-14 14:56:23 +02:00
Marc Zinnschlag c961abce96 added warning message to startup window 2013-09-14 14:00:07 +02:00
Marc Zinnschlag 9637e1641b fix for building with system tinyxml 2013-09-14 13:33:49 +02:00
Marc Zinnschlag 6f64b1b9db cmake option to use system tinyxml instead of embedded one 2013-09-13 15:11:17 +02:00
Marc Zinnschlag 07ff0a8de9 possible build fix for Windows 2013-09-12 20:52:05 +02:00
Marc Zinnschlag bf8a25c2c6 Merge remote-tracking branch 'mckibbenta/tgm' 2013-09-12 19:07:35 +02:00
mckibbenta 89b7d6121d Initial toggleGodMod/tgm instruction. Currently only affects player health. 2013-09-12 08:30:00 -04:00
mckibbenta 85b8af6262 Merge branch 'master' of https://github.com/zinnschlag/openmw into tgm 2013-09-12 08:08:07 -04:00
scrawl 09e692f1f6 Fixed polish font 2013-09-10 22:11:57 +02:00
Marc Zinnschlag 554c44892a Merge branch 'newgame' 2013-09-10 16:45:09 +02:00
Marc Zinnschlag e9f14449eb added AdjusterWidget 2013-09-10 16:45:01 +02:00
gus f9bfbc8764 Merge branch 'master' of https://github.com/zinnschlag/openmw.git into AICombat 2013-09-10 16:18:39 +02:00
gus 46a734852b adding script instruction getLOS + some test about AI 2013-09-10 16:16:13 +02:00
Marc Zinnschlag aadc3edab5 Merge branch 'openmw-26' 2013-09-09 17:05:38 +02:00
Marc Zinnschlag 2dc3c0ae4f integrated startup icons 2013-09-09 09:41:43 +02:00
sirherrbatka 7ecf020fcb Merge pull request #1 from zinnschlag/master
Icons for startup window.
2013-09-08 11:14:41 -07:00
Marc Zinnschlag 25b7cd33ea added FileWidget; fixed OpenCS configuration 2013-09-08 14:31:20 +02:00
Marek Kochanowicz 294bf6c194 Icons for startup window (check raster/startup). 2013-09-08 12:09:36 +02:00
Marc Zinnschlag ecedb60169 splitting new game and new addon functions (new game currently not working) 2013-09-08 12:06:28 +02:00
Marc Zinnschlag f7940d7d1a focus load document button by default in startup window 2013-09-08 11:24:06 +02:00
Marc Zinnschlag 2d9e9fe3e1 Merge branch 'startup' 2013-09-08 09:34:41 +02:00
Marc Zinnschlag cae5eb424d cleaned up opening the settings dialogue from a view 2013-09-08 09:33:45 +02:00
Marc Zinnschlag efdf2961f0 open user settings dialogue centered 2013-09-08 09:28:43 +02:00
Marc Zinnschlag 0e81fb32dd hooked up edit config signal from startup window 2013-09-08 09:26:43 +02:00
Marc Zinnschlag 17bf7e59a4 added proper startup dialogue (still missing icons) 2013-09-08 09:15:26 +02:00
graffy76 a6e7cf9a8c Implementing drag and drop 2013-09-07 15:57:40 -05:00
Tom Mason 7b9c5c75e7 silenced unshield 2013-09-07 16:16:09 +01:00
Tom Mason 2b50e34566 Fixed issue with copy_file
from: https://forum.openmw.org/viewtopic.php?f=20&t=1718&hilit=0.26&start=50#p18705
2013-09-07 15:41:51 +01:00
Marc Zinnschlag 5a792b10b9 fixed local openmw.cfg file 2013-09-07 09:30:40 +02:00
Marc Zinnschlag 9b7cd5958f Merge remote-tracking branch 'scrawl/master' 2013-09-07 08:23:25 +02:00
scrawl 10c21579bc Item stacking case sensitivity fix 2013-09-07 01:00:38 +02:00
Marc Zinnschlag 3d66f7521e Merge remote-tracking branch 'marcrbouvier/master' 2013-09-06 08:44:59 +02:00
Marc Bouvier 784cba21f2 [Feature #881] Change Tabs to Spaces
Some of the tabs were not made of spaces, so Git defaults tabs to the
length of 8 spaces. OpenMW uses 4 spaces per tab.
2013-09-05 23:02:51 -05:00
Marc Zinnschlag dc345dd43d Merge branch 'filter' 2013-09-05 15:47:52 +02:00
Marc Zinnschlag 8f0ab29a9f allow the use of keywords for strings without quotation marks 2013-09-05 15:47:38 +02:00
Marc Zinnschlag 645b50ef36 added support for half-sided intervals to filter parser 2013-09-05 15:38:28 +02:00
Marc Zinnschlag f3ce9c22a1 rewrote value node to support half-sided intervals (meaning infinity or -infinity for the missing half) 2013-09-05 15:22:14 +02:00
Marc Zinnschlag 9332684335 allow the use of value types in string filters 2013-09-05 15:05:49 +02:00
Marc Zinnschlag f2e86e860e allow the use of record types in string filters 2013-09-05 14:39:56 +02:00
Marc Zinnschlag 8bebe7179c some UniversalId fixes 2013-09-05 13:58:36 +02:00
Alexander "Ace" Olofsson 5e42c73356 Better fix for unshield, comments on changes, no more commented out code. 2013-09-05 10:39:17 +02:00
mckibbenta ae02499eff Merge branch 'master' of https://github.com/zinnschlag/openmw into tgm 2013-09-04 21:15:44 -04:00
Alexander "Ace" Olofsson 22a5f7198f A few fixes to build on Windows 2013-09-04 23:25:47 +02:00
Marc Zinnschlag 842a616909 more cleanup 2013-09-03 14:18:34 +02:00
Marc Zinnschlag 80f8024da7 allow specifying record modification status column enum via strings 2013-09-03 13:03:02 +02:00
Marc Zinnschlag f80373a849 removed two unused files 2013-09-03 12:53:45 +02:00
Marc Zinnschlag 1744a64f77 in filters allow specifiying boolean columns as strings 2013-09-03 12:32:06 +02:00
mckibbenta e545f49807 Merge branch 'master' of https://github.com/zinnschlag/openmw into tgm 2013-09-02 18:40:37 -04:00
Marc Zinnschlag 9cb121bd04 allow specifying enums as text in filters 2013-09-02 12:23:19 +02:00
Marc Zinnschlag 649ef6f120 moved list of enum literals from ViewManager to Columns (which makes them available to the rest of model now) 2013-09-02 11:58:05 +02:00
mckibbenta f65172bdca Merge branch 'master' of https://github.com/zinnschlag/openmw into tgm 2013-08-29 20:26:36 -04:00
mckibbenta eef9df504a fiddlings 2013-08-29 20:25:36 -04:00
Marek Kochanowicz 3e174df856 Adding nomadic1 icons. Wooho! 2013-08-27 14:49:29 +02:00
Marek Kochanowicz 8cd2d89e4e Merge branch 'icons-svg' of https://github.com/sirherrbatka/openmw into icons-svg 2013-08-26 10:14:35 +02:00
Marek Kochanowicz 44b4c642b7 Added alternative book icon in scalable folder. No raster just yet. I'm not sure if it will replace old icon. 2013-08-26 10:12:43 +02:00
mckibbenta 60fa69139e minor changes 2013-08-25 19:20:14 -04:00
mckibbenta 06701467ab Merge branch 'master' into tgm 2013-08-24 21:28:26 -04:00
mckibbenta 8998b90e8b initial do-nothing implementation; registered opcode 2013-08-24 21:19:12 -04:00
graffy76 e6fdc7e7fd ... 2013-08-20 12:34:39 -05:00
graffy76 6898321676 Reenabling features
Profile functions enabled
New/load file functions partially enabled
Layout reorganized
2013-08-20 08:16:56 -05:00
graffy76 24e38846da Fixed broken profile actions 2013-08-20 03:53:23 -05:00
graffy76 b52645bf2a Fixes to accommodate master/plugin loading 2013-08-20 03:23:32 -05:00
graffy76 e614ec3353 Fixing profile code in progress... 2013-08-18 17:11:23 -05:00
graffy76 f6217f9c6a Moved esx selector classes out of global namespace 2013-08-18 15:11:29 -05:00
graffy76 a14e0b32d8 Restructured esxselector directory
Added ./view
Removed ./utils and ./model/esm
Relocated code accordingly.
2013-08-18 09:48:13 -05:00
graffy76 d0363b037c Renamed components/fileorderlist to components/esxselector 2013-08-18 09:41:02 -05:00
graffy76 45277c0082 Minor changes
Stretched table columns to fit widget width
Reduced width of opencs file dialog
Hid the file size column for launcher
Added alternating row colors in table view
2013-08-18 09:34:33 -05:00
graffy76 66e50343ad Fixed row-selection/check feature 2013-08-18 08:54:51 -05:00
graffy76 a9db983233 Fixing row-click selection 2013-08-18 07:29:48 -05:00
graffy76 2878f51cd3 Reimplemented dependency selection feature
Moved more code to ContentSelector
Added support for omwgame and omwaddon files
2013-08-17 19:40:28 -05:00
graffy76 b24dd5c6ac Continued migration of code to ContentSelector 2013-08-17 05:55:43 -05:00
graffy76 0087b0d67c Removed checkboxes from master list
Moved checkbox code from datafilesmodel to pluginsproxymodel
2013-08-17 05:37:23 -05:00
graffy76 61602789e1 Began migrating code to ContentSelector base 2013-08-16 22:23:21 -05:00
graffy76 4c8c6d6971 Moved init code to master / plugin proxy classes 2013-08-16 21:20:48 -05:00
graffy76 7389507eb5 Created masterproxylist class 2013-08-16 21:12:30 -05:00
graffy76 2bc56d0b5c Fixed missing item list in launcher combobox 2013-08-16 20:59:58 -05:00
graffy76 b850fe0289 Removed vertical headers from plugin view 2013-08-16 18:59:01 -05:00
graffy76 49c4e1bf9e Removed master table widget 2013-08-16 18:23:02 -05:00
graffy76 84e5c2610a Implemented combobox for game file selection 2013-08-16 18:00:23 -05:00
graffy76 bfb71f23c9 Changed filter mechanism for game / addons
Filters by number of master references, regardless of extension
2013-08-16 17:26:23 -05:00
1399 changed files with 77032 additions and 35801 deletions
+43 -11
View File
@@ -1,24 +1,56 @@
build
*~
Doxygen
prebuilt
apps/openmw/config.hpp
Docs/mainpage.hpp
## make
CMakeFiles
*/CMakeFiles
CMakeCache.txt
moc_*.cxx
cmake_install.cmake
*.[ao]
Makefile
makefile
data
build
prebuilt
## doxygen
Doxygen
## ides/editors
*~
*.kdev4
CMakeLists.txt.user
*.swp
*.swo
*.kate-swp
.cproject
.project
.settings/
.settings
.directory
## qt-creator
CMakeLists.txt.user*
## resources
data
resources
/*.cfg
/*.desktop
/*.install
## binaries
/esmtool
/mwiniimport
/omwlauncher
/openmw
/opencs
/niftest
## generated objects
apps/openmw/config.hpp
components/version/version.hpp
docs/mainpage.hpp
moc_*.cxx
*.cxx_parameters
*qrc_launcher.cxx
*qrc_resources.cxx
*__*
*ui_datafilespage.h
*ui_graphicspage.h
*ui_mainwindow.h
*ui_playpage.h
*.[ao]
*.so
+139
View File
@@ -0,0 +1,139 @@
Adam Hogan <comrade@comrade-desktop.(none)>
Aleksandar Jovanov <ajovanov93@yahoo.com>
Alexander Olofsson <ace@haxalot.com>
Alex McKibben <mckibbenta@gmail.com>
Alex "rainChu" Haddad <alx1213@gmail.com>
Ardekantur <greystone@ardekantur.com>
Armin Preiml <b.nutzer@gmail.com>
Artem Kotsynyak <greye@carceri>
Arthur Moore <arthur@Behemoth>
Arthur Moore <Arthur.Moore.git@cd-net.net>
athile <athile@athile.net>
athile <athile.g@gmail.com>
Stefan Galowicz <bogglez@the.mind>
Bret Curtis <psi29a@gmail.com>
Britt Mathis <britt.mathis@gmail.com>
Sandy Carter <bwrsandman@gmail.com>
Sandy Carter <mr.sandy.carter@gmail.com>
Carl Maxwell <carl.maxwell@gmail.com>
cc9cii <cc9c@iinet.net.au>
Cory F. Cohen <cfcohen@verizon.net>
Chris Robinson <chris.kcat@gmail.com>
Cris Mihalache <mirceam94@hotmail.com>
darkf <lw9k123@gmail.com>
Diggory Hardy <diggory.hardy@gmail.com>
Thomas Luppi <ThomasLuppi@gmail.com>
Thomas Luppi <tluppi@thomas-GE60.(none)>
Dmitriy 'Endorph' Shkurskiy <end0rph@hotmail.com>
Dmitry Marakasov <amdmi3@amdmi3.ru>
Douglas Diniz <dgdiniz@gmail.com>
Douglas Mencken <dougmencken@gmail.com>
Edmondo Tommasina <edmondo.tommasina@gmail.com>
Eduard Cot <eduard@eduard-iMac.(none)>
Eli2 <fabian@fabian-desktop.(none)>
Emanuel Guével <guevel.emanuel@gmail.com>
Leon Saunders <LeonDavidSaunders@gmail.com>
Fil Krynicki <filipkrynicki@gmail.com>
John Blomberg <johnblo@kth.se>
Gašper Sedej <gsedej@gmail.com>
Michał Bień <michal1.bien@gmail.com>
Joel Graff <monograff76@gmail.com>
Paul McElroy <pcm1123@gmail.com>
Artem Kotsynyak <greye@carceri>
Artem Kotsynyak <greye@null.net>
gugus <gus_512@hotmail.com>
guidoj <guido@thuisbasis.net>
gus <gus_512@hotmail.com>
Hallfaer Tuilinn <gijsbertth@gmail.com>
Julian Ospald <julian.ospald@googlemail.com>
Jacob Essex <jacob@jacobessex.com>
Jan Borsodi <jborsodi@gmail.com>
Jan-Peter Nilsson <peppe@pappkartong.se>
Jason Hooks <Hooks@.(none)>
Jason Hooks <jason@Jason-ThinkPad-R61.(none)>
Jason Hooks <jhooks1@mix.wvu.edu>
Jeffrey Haines <jeffhaines@me.com>
Jeffrey Haines <jib-y@users.noreply.github.com>
Jordan Ayers <jordan.ayers@gmail.com>
Jordan Milne <jordan.milne@saynotolinux.com>
Josua Grawitter <josh@greyage.org>
Julien Voisin <pouicpouicpouic@gmail.com>
Karl-Felix Glatzer <karl.glatzer@gmx.de>
Chris Robinson <chris.kcat@gmail.com>
Kevin Poitra <pupkev@yahoo.com>
Roman Proskuryakov <humbug@deeptown.org>
Lars Söderberg <lazze_1983@hotmail.com>
lazydev <lazydev@homecomp>
lazydev <lazydev@nomail>
Lukasz Gromanowski <lgromanowski@gmail.com>
Marc Bouvier <marcrbouvier@gmail.com>
Marcin Hulist <Gohan1989@gmail.com>
Marc Zinnschlag <marc@zpages.de>
Marek Kochanowicz <herr@mikrus.pl>
Marek Kochanowicz <marek@localhost.localdomain>
Marek Kochanowicz <sirherrbatka@gmail.com>
Mark Siewert <mark.siewert@t-online.de>
Mark Siewert <ms@cerebra.localdomain>
megaton <9megaton6@gmail.com>
Michael Mc Donnell <michael@mcdonnell.dk>
Michael Papageorgiou <werdanith@yahoo.gr>
Michal Sciubidlo <michal.sciubidlo@gmail.com>
Michał Ściubidło <michal.sciubidlo@gmail.com>
Nathan Jeffords <blunted2night@gmail.com>
Nicolay Korslund <korslund@gmail.com>
Nicolay Korslund <nicolayk@met.no>
Nikolay Kasyanov <corrmage@gmail.com>
pchan3 <chantlerpeter@gmail.com>
Pieter van der Kloet <pvdkloet@gmail.com>
Mateusz Kołaczek <mateusz.kolaczek@gmail.com>
Bret Curtis <psi29a@gmail.com>
Pieter van der Kloet <pvdkloet@gmail.com>
Rohit Nirmal <rohitnirmal9@gmail.com>
Roman Melnik <kromgart@gmail.com>
Radu-Marius Popovici <rpopovici@github.com>
Sandy Carter <bwrsandman@gmail.com>
Scott Howard <showard314@gmail.com>
Jannik Heller <scrawl@baseoftrash.de>
Jannik Heller <scrawl@scrawl-laptop.(none)>
Sebastian Wick <sebastian@sebastianwick.net>
Sebastian Wick <wick.sebastian@gmail.com>
Sergey Shambir <sergey.shambir.auto@gmail.com>
sergoz <parapvr@yandex.ru>
Chris Boyce <slothlife@users.noreply.github.com>
Star-Demon <starsickle@yahoo.com>
Sylvain Thesnieres <garvek@gmail.com>
Thomas Luppi <digrules@gmail.com>
Thomas Luppi <tluppi@thomas-GE60.(none)>
Thoronador <thoronador@users.sourceforge.net>
TomKoenderink <tom_koenderink-github@omniadicta.net>
Tom Mason <wheybags@wheybags.com>
Torben Carrington <torbenlcarrington@Gmail.com>
Vincent Heuken <vincent@vincentheuken.com>
Manuel Edelmann <edelmann.manuel@gmail.com>
Manuel Edelmann <vorenon@hotmail.com>
Alexander Nadeau <wareya@gmail.com>
Michael Hogan <mr.michaelhogan@gmail.com>
Jacob Essex <github@JacobEssex.com>
Yuri Krupenin <yuri.krupenin@gmail.com>
Bret Curtis <noone@your.box>
sirherrbatka <herr@localhost.localdomain>
sirherrbatka <sirherrbatka@myopera.com>
sergei <sergei@ubuntu.(none)>
riothamus <digimars@gmail.com>
nobrakal <nobrakal@gmail.com>
nkorslund <nkorslund@ea6a568a-9f4f-0410-981a-c910a81bb256>
mrcheko <cheko@sevas.ua>
Miroslav Puda <pakanek@gmail.com>
MiroslavR <miroslavr256@gmail.com>
mckibbenta <mckibbenta@gmail.com>
jeaye <jeaye@arrownext.com>
eroen <eroen@falcon.eroen.eu>
eroen <eroen@occam.eroen.eu>
dreamer-dead <dreamer.dead@gmail.com>
crysthala <crystalsoulslayer@gmail.com>
Berulacks <beru@eml.cc>
Axujen <axujen@gmail.com>
root <root@debian>
unknown <Hooks@.(none)>
+14 -9
View File
@@ -4,18 +4,17 @@ compiler:
branches:
only:
- master
- next
- /openmw-.*$/
before_install:
- pwd
- git submodule update --init --recursive
- echo "yes" | sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
- echo "yes" | sudo apt-add-repository ppa:openmw/deps
- echo "yes" | sudo apt-add-repository ppa:openmw/openmw
- sudo apt-get update -qq
- sudo apt-get install -qq libboost-all-dev libgtest-dev google-mock libzzip-dev
- sudo apt-get install -qq libqt4-dev libxaw7-dev libxrandr-dev libfreeimage-dev libpng-dev
- sudo apt-get install -qq libopenal-dev libmpg123-dev libsndfile1-dev
- sudo apt-get install -qq libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev
- sudo apt-get install -qq libbullet-dev libogre-static-dev libmygui-static-dev libsdl2-static-dev libunshield-dev
- sudo apt-get install -qq libboost-all-dev libgtest-dev google-mock
- sudo apt-get install -qq libqt4-dev
- sudo apt-get install -qq libopenal-dev
- sudo apt-get install -qq libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
- sudo apt-get install -qq libbullet-dev libogre-1.9-dev libmygui-dev libsdl2-dev libunshield-dev
- sudo mkdir /usr/src/gtest/build
- cd /usr/src/gtest/build
- sudo cmake .. -DBUILD_SHARED_LIBS=1
@@ -26,7 +25,7 @@ before_script:
- cd -
- mkdir build
- cd build
- cmake .. -DOGRE_STATIC=1 -DMYGUI_STATIC=1 -DBOOST_STATIC=1 -DSDL2_STATIC=1 -DBUILD_WITH_CODE_COVERAGE=1 -DBUILD_UNITTESTS=1
- cmake .. -DBUILD_WITH_CODE_COVERAGE=1 -DBUILD_UNITTESTS=1 -DBUILD_WITH_DPKG=1
script:
- make -j4
after_script:
@@ -37,3 +36,9 @@ notifications:
email:
on_success: change
on_failure: always
irc:
channels:
- "chat.freenode.net#openmw"
on_success: change
on_failure: always
use_notice: true
+274 -211
View File
@@ -4,35 +4,71 @@ if (APPLE)
set(APP_BUNDLE_NAME "${CMAKE_PROJECT_NAME}.app")
set(APP_BUNDLE_DIR "${OpenMW_BINARY_DIR}/${APP_BUNDLE_NAME}")
set(CMAKE_EXE_LINKER_FLAGS "-F /Library/Frameworks")
set(CMAKE_SHARED_LINKER_FLAGS "-F /Library/Frameworks")
set(CMAKE_MODULE_LINKER_FLAGS "-F /Library/Frameworks")
endif (APPLE)
# Macros
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
include (OpenMWMacros)
# Version
message(STATUS "Configuring OpenMW...")
set (OPENMW_VERSION_MAJOR 0)
set (OPENMW_VERSION_MINOR 26)
set (OPENMW_VERSION_RELEASE 0)
set(OPENMW_VERSION_MAJOR 0)
set(OPENMW_VERSION_MINOR 32)
set(OPENMW_VERSION_RELEASE 0)
set (OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VERSION_RELEASE}")
set(OPENMW_VERSION_COMMITHASH "")
set(OPENMW_VERSION_TAGHASH "")
set(OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VERSION_RELEASE}")
if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
find_package(Git)
if(GIT_FOUND)
include(GetGitRevisionDescription)
get_git_tag_revision(TAGHASH --tags --max-count=1)
get_git_head_revision(REFSPEC COMMITHASH)
git_describe(VERSION --tags ${TAGHASH})
string(REGEX MATCH "^openmw-[^0-9]*[0-9]+\\.[0-9]+\\.[0-9]+.*" MATCH "${VERSION}")
if(MATCH)
string(REGEX REPLACE "^openmw-([0-9]+)\\..*" "\\1" GIT_VERSION_MAJOR "${VERSION}")
string(REGEX REPLACE "^openmw-[0-9]+\\.([0-9]+).*" "\\1" GIT_VERSION_MINOR "${VERSION}")
string(REGEX REPLACE "^openmw-[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" GIT_VERSION_RELEASE "${VERSION}")
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
set(OPENMW_VERSION_TAGHASH "${TAGHASH}")
message(STATUS "OpenMW version ${OPENMW_VERSION}")
else(MATCH)
message(WARNING "Failed to get valid version information from Git")
endif(MATCH)
else(GIT_FOUND)
message(WARNING "Git executable not found")
endif(GIT_FOUND)
else(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
message(STATUS "Shallow Git clone detected, not attempting to retrieve version info")
endif(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
# Macros
include(OpenMWMacros)
if (ANDROID)
set(CMAKE_FIND_ROOT_PATH ${OPENMW_DEPENDENCIES_DIR} "${CMAKE_FIND_ROOT_PATH}")
endif (ANDROID)
# doxygen main page
configure_file ("${OpenMW_SOURCE_DIR}/Docs/mainpage.hpp.cmake" "${OpenMW_SOURCE_DIR}/Docs/mainpage.hpp")
configure_file ("${OpenMW_SOURCE_DIR}/docs/mainpage.hpp.cmake" "${OpenMW_SOURCE_DIR}/docs/mainpage.hpp")
option(MYGUI_STATIC "Link static build of Mygui into the binaries" FALSE)
option(OGRE_STATIC "Link static build of Ogre and Ogre Plugins into the binaries" FALSE)
option(BOOST_STATIC "Link static build of Boost into the binaries" FALSE)
option(SDL2_STATIC "Link static build of SDL into the binaries" FALSE)
option(OPENMW_UNITY_BUILD "Use fewer compilation units to speed up compile time" FALSE)
# Apps and tools
option(BUILD_BSATOOL "build BSA extractor" OFF)
option(BUILD_ESMTOOL "build ESM inspector" ON)
@@ -41,27 +77,21 @@ option(BUILD_MWINIIMPORTER "build MWiniImporter" ON)
option(BUILD_OPENCS "build OpenMW Construction Set" ON)
option(BUILD_WITH_CODE_COVERAGE "Enable code coverage with gconv" OFF)
option(BUILD_UNITTESTS "Enable Unittests with Google C++ Unittest ang GMock frameworks" OFF)
# Sound source selection
option(USE_FFMPEG "use ffmpeg for sound" ON)
option(USE_AUDIERE "use audiere for sound" ON)
option(USE_MPG123 "use mpg123 + libsndfile for sound" ON)
option(BUILD_NIFTEST "build nif file tester" OFF)
# OS X deployment
option(OPENMW_OSX_DEPLOYMENT OFF)
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
# Location of morrowind data files
if (APPLE)
set(MORROWIND_DATA_FILES "./data" CACHE PATH "location of Morrowind data files")
set(MORROWIND_RESOURCE_FILES "./resources" CACHE PATH "location of OpenMW resources files")
set(OPENMW_RESOURCE_FILES "./resources" CACHE PATH "location of OpenMW resources files")
elseif(UNIX)
set(MORROWIND_DATA_FILES "/usr/share/games/openmw/data/" CACHE PATH "location of Morrowind data files")
set(MORROWIND_RESOURCE_FILES "/usr/share/games/openmw/resources/" CACHE PATH "location of OpenMW resources files")
set(MORROWIND_DATA_FILES "${CMAKE_INSTALL_PREFIX}/share/games/openmw/data/" CACHE PATH "location of Morrowind data files")
set(OPENMW_RESOURCE_FILES "${CMAKE_INSTALL_PREFIX}/share/games/openmw/resources/" CACHE PATH "location of OpenMW resources files")
else()
set(MORROWIND_DATA_FILES "data" CACHE PATH "location of Morrowind data files")
set(MORROWIND_RESOURCE_FILES "resources" CACHE PATH "location of OpenMW resources files")
set(OPENMW_RESOURCE_FILES "resources" CACHE PATH "location of OpenMW resources files")
endif(APPLE)
if (WIN32)
@@ -77,26 +107,22 @@ set(LIBDIR ${CMAKE_SOURCE_DIR}/libs)
set(OENGINE_OGRE
${LIBDIR}/openengine/ogre/renderer.cpp
${LIBDIR}/openengine/ogre/fader.cpp
${LIBDIR}/openengine/ogre/lights.cpp
${LIBDIR}/openengine/ogre/particles.cpp
${LIBDIR}/openengine/ogre/selectionbuffer.cpp
${LIBDIR}/openengine/ogre/imagerotate.cpp
)
set(OENGINE_GUI
${LIBDIR}/openengine/gui/loglistener.cpp
${LIBDIR}/openengine/gui/manager.cpp
${LIBDIR}/openengine/gui/layout.hpp
)
set(OENGINE_BULLET
${LIBDIR}/openengine/bullet/btKinematicCharacterController.cpp
${LIBDIR}/openengine/bullet/btKinematicCharacterController.h
${LIBDIR}/openengine/bullet/BtOgre.cpp
${LIBDIR}/openengine/bullet/BtOgreExtras.h
${LIBDIR}/openengine/bullet/BtOgreGP.h
${LIBDIR}/openengine/bullet/BtOgrePG.h
${LIBDIR}/openengine/bullet/CMotionState.cpp
${LIBDIR}/openengine/bullet/CMotionState.h
${LIBDIR}/openengine/bullet/physic.cpp
${LIBDIR}/openengine/bullet/physic.hpp
${LIBDIR}/openengine/bullet/BulletShapeLoader.cpp
@@ -113,73 +139,41 @@ set(OPENMW_LIBS ${OENGINE_ALL})
set(OPENMW_LIBS_HEADER)
# Sound setup
set(GOT_SOUND_INPUT 0)
set(SOUND_INPUT_INCLUDES "")
set(SOUND_INPUT_LIBRARY "")
set(SOUND_DEFINE "")
if (USE_FFMPEG)
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE)
find_package(FFmpeg)
if (FFMPEG_FOUND)
set(SOUND_INPUT_INCLUDES ${SOUND_INPUT_INCLUDES} ${FFMPEG_INCLUDE_DIRS})
set(SOUND_INPUT_LIBRARY ${SOUND_INPUT_LIBRARY} ${FFMPEG_LIBRARIES} ${SWSCALE_LIBRARIES})
set(SOUND_DEFINE ${SOUND_DEFINE} -DOPENMW_USE_FFMPEG)
set(GOT_SOUND_INPUT 1)
endif (FFMPEG_FOUND)
endif (USE_FFMPEG)
if (USE_AUDIERE AND NOT GOT_SOUND_INPUT)
find_package(Audiere)
if (AUDIERE_FOUND)
set(SOUND_INPUT_INCLUDES ${SOUND_INPUT_INCLUDES} ${AUDIERE_INCLUDE_DIR})
set(SOUND_INPUT_LIBRARY ${SOUND_INPUT_LIBRARY} ${AUDIERE_LIBRARY})
set(SOUND_DEFINE ${SOUND_DEFINE} -DOPENMW_USE_AUDIERE)
set(GOT_SOUND_INPUT 1)
endif (AUDIERE_FOUND)
endif (USE_AUDIERE AND NOT GOT_SOUND_INPUT)
if (USE_MPG123 AND NOT GOT_SOUND_INPUT)
find_package(MPG123 REQUIRED)
find_package(SNDFILE REQUIRED)
if (MPG123_FOUND AND SNDFILE_FOUND)
set(SOUND_INPUT_INCLUDES ${SOUND_INPUT_INCLUDES} ${MPG123_INCLUDE_DIR} ${SNDFILE_INCLUDE_DIR})
set(SOUND_INPUT_LIBRARY ${SOUND_INPUT_LIBRARY} ${MPG123_LIBRARY} ${SNDFILE_LIBRARY})
set(SOUND_DEFINE ${SOUND_DEFINE} -DOPENMW_USE_MPG123)
set(GOT_SOUND_INPUT 1)
endif (MPG123_FOUND AND SNDFILE_FOUND)
endif (USE_MPG123 AND NOT GOT_SOUND_INPUT)
if (NOT GOT_SOUND_INPUT)
message(WARNING "--------------------")
message(WARNING "Failed to find any sound input packages")
message(WARNING "--------------------")
endif (NOT GOT_SOUND_INPUT)
if (NOT FFMPEG_FOUND)
message(WARNING "--------------------")
message(WARNING "FFmpeg not found, video playback will be disabled")
message(WARNING "--------------------")
endif (NOT FFMPEG_FOUND)
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE)
find_package(FFmpeg REQUIRED)
set(SOUND_INPUT_INCLUDES ${FFMPEG_INCLUDE_DIRS})
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${SWSCALE_LIBRARIES})
# TinyXML
option(USE_SYSTEM_TINYXML "Use system TinyXML library instead of internal." OFF)
if(USE_SYSTEM_TINYXML)
find_library(TINYXML_LIBRARIES tinyxml)
find_path(TINYXML_INCLUDE_DIR tinyxml.h)
message(STATUS "Found TinyXML: ${TINYXML_LIBRARIES} ${TINYXML_INCLUDE_DIR}")
add_definitions (-DTIXML_USE_STL)
if(TINYXML_LIBRARIES AND TINYXML_INCLUDE_DIR)
include_directories(${TINYXML_INCLUDE_DIR})
message(STATUS "Using system TinyXML library.")
else()
message(FATAL_ERROR "Detection of system TinyXML incomplete.")
endif()
endif()
# Platform specific
if (WIN32)
set(Boost_USE_STATIC_LIBS ON)
set(PLATFORM_INCLUDE_DIR "platform")
add_definitions(-DBOOST_ALL_NO_LIB)
# Suppress WinMain(), provided by SDL
add_definitions(-DSDL_MAIN_HANDLED)
else (WIN32)
set(PLATFORM_INCLUDE_DIR "")
find_path (UUID_INCLUDE_DIR uuid/uuid.h)
include_directories(${UUID_INCLUDE_DIR})
endif (WIN32)
if (MSVC10)
set(PLATFORM_INCLUDE_DIR "")
endif()
if (APPLE)
set(Boost_USE_STATIC_LIBS ON)
endif (APPLE)
# Dependencies
# Fix for not visible pthreads functions for linker with glibc 2.15
@@ -187,6 +181,14 @@ if (UNIX AND NOT APPLE)
find_package (Threads)
endif()
# Look for stdint.h
include(CheckIncludeFile)
check_include_file(stdint.h HAVE_STDINT_H)
if(NOT HAVE_STDINT_H)
unset(HAVE_STDINT_H CACHE)
message(FATAL_ERROR "stdint.h was not found" )
endif()
include (CheckIncludeFileCXX)
check_include_file_cxx(unordered_map HAVE_UNORDERED_MAP)
if (HAVE_UNORDERED_MAP)
@@ -194,47 +196,92 @@ if (HAVE_UNORDERED_MAP)
endif ()
set(BOOST_COMPONENTS system filesystem program_options thread date_time wave)
set(BOOST_COMPONENTS system filesystem program_options)
if(WIN32)
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} locale)
endif(WIN32)
IF(BOOST_STATIC)
set(Boost_USE_STATIC_LIBS ON)
endif()
find_package(OGRE REQUIRED)
find_package(MyGUI REQUIRED)
if (${MYGUI_VERSION} VERSION_LESS "3.2.1")
message(FATAL_ERROR "OpenMW requires MyGUI 3.2.1 or later, please install the latest version from http://mygui.info")
endif()
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
find_package(SDL2 REQUIRED)
find_package(OpenAL REQUIRED)
find_package(Bullet REQUIRED)
IF(OGRE_STATIC)
find_package(Cg)
IF(WIN32)
set(OGRE_PLUGIN_INCLUDE_DIRS ${OGRE_Plugin_CgProgramManager_INCLUDE_DIRS} ${OGRE_Plugin_OctreeSceneManager_INCLUDE_DIRS} ${OGRE_Plugin_ParticleFX_INCLUDE_DIRS} ${OGRE_RenderSystem_Direct3D9_INCLUDE_DIRS} ${OGRE_RenderSystem_GL_INCLUDE_DIRS})
ELSE(WIN32)
set(OGRE_PLUGIN_INCLUDE_DIRS ${OGRE_Plugin_CgProgramManager_INCLUDE_DIRS} ${OGRE_Plugin_OctreeSceneManager_INCLUDE_DIRS} ${OGRE_Plugin_ParticleFX_INCLUDE_DIRS} ${OGRE_RenderSystem_GL_INCLUDE_DIRS})
ENDIF(WIN32)
ENDIF(OGRE_STATIC)
set(OGRE_PLUGIN_INCLUDE_DIRS "")
set(OGRE_STATIC_PLUGINS "")
macro(add_static_ogre_plugin PLUGIN)
if(OGRE_${PLUGIN}_FOUND)
# strip RenderSystem_ or Plugin_ prefix from plugin name
string(REPLACE "RenderSystem_" "" PLUGIN_TEMP ${PLUGIN})
string(REPLACE "Plugin_" "" PLUGIN_NAME ${PLUGIN_TEMP})
add_definitions(-DENABLE_PLUGIN_${PLUGIN_NAME})
list(APPEND OGRE_PLUGIN_INCLUDE_DIRS ${OGRE_${PLUGIN}_INCLUDE_DIRS})
list(APPEND OGRE_STATIC_PLUGINS ${OGRE_${PLUGIN}_LIBRARIES})
endif(OGRE_${PLUGIN}_FOUND)
endmacro(add_static_ogre_plugin)
if(OGRE_STATIC)
# set up OGRE_PLUGIN_INCLUDE_DIRS and OGRE_STATIC_PLUGINS
add_static_ogre_plugin(Plugin_OctreeSceneManager)
add_static_ogre_plugin(Plugin_ParticleFX)
find_package(Cg)
if(Cg_FOUND)
add_static_ogre_plugin(Plugin_CgProgramManager)
list(APPEND OGRE_STATIC_PLUGINS ${Cg_LIBRARIES})
endif(Cg_FOUND)
if (ANDROID)
add_static_ogre_plugin(RenderSystem_GLES2)
else ()
add_static_ogre_plugin(RenderSystem_GL)
endif ()
if(WIN32)
add_static_ogre_plugin(RenderSystem_Direct3D9)
endif(WIN32)
endif(OGRE_STATIC)
include_directories("."
${OGRE_INCLUDE_DIR} ${OGRE_INCLUDE_DIR}/Ogre ${OGRE_INCLUDE_DIR}/OGRE ${OGRE_PLUGIN_INCLUDE_DIRS}
${OGRE_INCLUDE_DIR} ${OGRE_INCLUDE_DIR}/Ogre ${OGRE_INCLUDE_DIR}/OGRE ${OGRE_INCLUDE_DIRS} ${OGRE_PLUGIN_INCLUDE_DIRS}
${SDL2_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
${PLATFORM_INCLUDE_DIR}
${MYGUI_INCLUDE_DIRS}
${MYGUI_PLATFORM_INCLUDE_DIRS}
${OPENAL_INCLUDE_DIR}
${UUID_INCLUDE_DIR}
${LIBDIR}
)
link_directories(${SDL2_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS} ${OGRE_LIB_DIR} ${MYGUI_LIB_DIR})
if(MYGUI_STATIC)
add_definitions(-DMYGUI_STATIC)
endif (MYGUI_STATIC)
if (APPLE)
# List used Ogre plugins
SET(USED_OGRE_PLUGINS ${OGRE_RenderSystem_GL_LIBRARY_REL}
${OGRE_Plugin_OctreeSceneManager_LIBRARY_REL}
${OGRE_Plugin_CgProgramManager_LIBRARY_REL}
${OGRE_Plugin_ParticleFX_LIBRARY_REL})
# Actually we must use OGRE_Plugin_CgProgramManager_FOUND but it's
# not reliable and equals TRUE even if there's no Ogre Cg plugin
if (Cg_FOUND)
set(USED_OGRE_PLUGINS ${USED_OGRE_PLUGINS}
${OGRE_Plugin_CgProgramManager_LIBRARY_REL})
endif ()
if (${OGRE_PLUGIN_DIR_REL}})
set(OGRE_PLUGINS_REL_FOUND TRUE)
endif ()
@@ -249,8 +296,6 @@ if (APPLE)
set(OGRE_PLUGIN_DIR ${OGRE_PLUGIN_DIR_DBG})
endif ()
#set(OGRE_PLUGIN_DIR "${OGRE_PLUGIN_DIR}/")
configure_file(${OpenMW_SOURCE_DIR}/files/mac/Info.plist
"${APP_BUNDLE_DIR}/Contents/Info.plist")
@@ -269,11 +314,14 @@ else ()
add_definitions(-DOGRE_PLUGIN_DEBUG_SUFFIX="_d")
endif()
add_definitions(-DOGRE_PLUGIN_DIR_REL="${OGRE_PLUGIN_DIR_REL}")
add_definitions(-DOGRE_PLUGIN_DIR_DBG="${OGRE_PLUGIN_DIR_DBG}")
if (APPLE AND OPENMW_OSX_DEPLOYMENT)
add_definitions(-DOGRE_PLUGIN_DIR="${APP_BUNDLE_NAME}/Contents/Plugins")
# make it empty so plugin loading code can check this and try to find plugins inside app bundle
add_definitions(-DOGRE_PLUGIN_DIR="")
else()
if (NOT DEFINED ${OGRE_PLUGIN_DIR})
set(OGRE_PLUGIN_DIR ${OGRE_PLUGIN_DIR_REL})
endif()
add_definitions(-DOGRE_PLUGIN_DIR="${OGRE_PLUGIN_DIR}")
endif()
@@ -303,8 +351,11 @@ configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
"${OpenMW_BINARY_DIR}/openmw.cfg.install")
configure_file(${OpenMW_SOURCE_DIR}/files/opencs.cfg
"${OpenMW_BINARY_DIR}/opencs.cfg")
configure_file(${OpenMW_SOURCE_DIR}/files/opencs.ini
"${OpenMW_BINARY_DIR}/opencs.ini")
configure_file(${OpenMW_SOURCE_DIR}/files/opencs/defaultfilters
"${OpenMW_BINARY_DIR}/resources/defaultfilters" COPYONLY)
if (NOT WIN32 AND NOT APPLE)
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.desktop
@@ -317,9 +368,6 @@ endif()
if (CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-reorder -std=c++98 -pedantic -Wno-long-long ${CMAKE_CXX_FLAGS}")
# Silence warnings in OGRE headers. Remove once OGRE got fixed!
SET(CMAKE_CXX_FLAGS "-Wno-ignored-qualifiers ${CMAKE_CXX_FLAGS}")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if ("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6)
@@ -328,48 +376,39 @@ if (CMAKE_COMPILER_IS_GNUCC)
endif (CMAKE_COMPILER_IS_GNUCC)
IF(NOT WIN32 AND NOT APPLE)
## Debian and non debian Linux building
# Linux building
# Paths
IF (DPKG_PROGRAM)
## Debian specific
SET(CMAKE_INSTALL_PREFIX "/usr")
SET(DATAROOTDIR "share" CACHE PATH "Sets the root of data directories to a non-default location")
SET(DATADIR "share/games/openmw" CACHE PATH "Sets the openmw data directories to a non-default location")
SET(ICONDIR "share/pixmaps" CACHE PATH "Set icon dir")
SET(SYSCONFDIR "../etc/openmw" CACHE PATH "Set config dir")
ELSE ()
## Non debian specific
SET(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Where to install binaries")
SET(DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "Sets the root of data directories to a non-default location")
SET(DATADIR "${DATAROOTDIR}/games/openmw" CACHE PATH "Sets the openmw data directories to a non-default location")
SET(ICONDIR "${DATAROOTDIR}/pixmaps" CACHE PATH "Set icon dir")
SET(LICDIR "${DATAROOTDIR}/licenses/openmw" CACHE PATH "Sets the openmw license directory to a non-default location.")
SET(SYSCONFDIR "/etc/openmw" CACHE PATH "Set config dir")
SET(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Where to install binaries")
SET(DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "Sets the root of data directories to a non-default location")
SET(DATADIR "${DATAROOTDIR}/games/openmw" CACHE PATH "Sets the openmw data directories to a non-default location")
SET(ICONDIR "${DATAROOTDIR}/pixmaps" CACHE PATH "Set icon dir")
SET(LICDIR "${DATAROOTDIR}/licenses/openmw" CACHE PATH "Sets the openmw license directory to a non-default location.")
SET(SYSCONFDIR "/etc/openmw" CACHE PATH "Set config dir")
# Install binaries
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw" DESTINATION "${BINDIR}" )
IF(BUILD_LAUNCHER)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/omwlauncher" DESTINATION "${BINDIR}" )
ENDIF(BUILD_LAUNCHER)
IF(BUILD_BSATOOL)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/bsatool" DESTINATION "${BINDIR}" )
ENDIF(BUILD_BSATOOL)
IF(BUILD_ESMTOOL)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/esmtool" DESTINATION "${BINDIR}" )
ENDIF(BUILD_ESMTOOL)
IF(BUILD_MWINIIMPORTER)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/mwiniimport" DESTINATION "${BINDIR}" )
ENDIF(BUILD_MWINIIMPORTER)
IF(BUILD_OPENCS)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/opencs" DESTINATION "${BINDIR}" )
ENDIF(BUILD_OPENCS)
# Install binaries
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw" DESTINATION "${BINDIR}" )
IF(BUILD_LAUNCHER)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/omwlauncher" DESTINATION "${BINDIR}" )
ENDIF(BUILD_LAUNCHER)
IF(BUILD_BSATOOL)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/bsatool" DESTINATION "${BINDIR}" )
ENDIF(BUILD_BSATOOL)
IF(BUILD_ESMTOOL)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/esmtool" DESTINATION "${BINDIR}" )
ENDIF(BUILD_ESMTOOL)
IF(BUILD_MWINIIMPORTER)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/mwiniimport" DESTINATION "${BINDIR}" )
ENDIF(BUILD_MWINIIMPORTER)
IF(BUILD_OPENCS)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/opencs" DESTINATION "${BINDIR}" )
ENDIF(BUILD_OPENCS)
IF(BUILD_NIFTEST)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/niftest" DESTINATION "${BINDIR}" )
ENDIF(BUILD_NIFTEST)
# Install licenses
INSTALL(FILES "DejaVu Font License.txt" DESTINATION "${LICDIR}" )
INSTALL(FILES "Daedric Font License.txt" DESTINATION "${LICDIR}" )
INSTALL(FILES "OFL.txt" DESTINATION "${LICDIR}" )
INSTALL(FILES "extern/shiny/License.txt" DESTINATION "${LICDIR}" RENAME "Shiny License.txt" )
ENDIF (DPKG_PROGRAM)
# Install licenses
INSTALL(FILES "docs/license/DejaVu Font License.txt" DESTINATION "${LICDIR}" )
INSTALL(FILES "extern/shiny/License.txt" DESTINATION "${LICDIR}" RENAME "Shiny License.txt" )
# Install icon and desktop file
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.desktop" DESTINATION "${DATAROOTDIR}/applications" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
@@ -384,52 +423,12 @@ IF(NOT WIN32 AND NOT APPLE)
INSTALL(FILES "${OpenMW_BINARY_DIR}/transparency-overrides.cfg" DESTINATION "${SYSCONFDIR}" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "${SYSCONFDIR}" RENAME "openmw.cfg" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
IF(BUILD_OPENCS)
INSTALL(FILES "${OpenMW_BINARY_DIR}/opencs.cfg" DESTINATION "${SYSCONFDIR}" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "opencs")
INSTALL(FILES "${OpenMW_BINARY_DIR}/opencs.ini" DESTINATION "${SYSCONFDIR}" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "opencs")
ENDIF(BUILD_OPENCS)
# Install resources
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION "${DATADIR}" FILE_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT "Resources")
INSTALL(DIRECTORY DESTINATION "${DATADIR}/data" COMPONENT "Resources")
IF (DPKG_PROGRAM)
## Debian Specific
IF(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git")
EXEC_PROGRAM("git" ${CMAKE_CURRENT_SOURCE_DIR} ARGS "describe" OUTPUT_VARIABLE GIT_VERSION )
STRING(REGEX REPLACE "openmw-" "" VERSION_STRING "${GIT_VERSION}")
EXEC_PROGRAM("git" ARGS "config --get user.name" OUTPUT_VARIABLE GIT_NAME )
EXEC_PROGRAM("git" ARGS "config --get user.email" OUTPUT_VARIABLE GIT_EMAIL)
SET(PACKAGE_MAINTAINER "${GIT_NAME} <${GIT_EMAIL}>")
ELSE()
SET(VERSION_STRING "${OPENMW_VERSION}")
SET(PACKAGE_MAINTAINER "unknown")
ENDIF()
SET(CPACK_GENERATOR "DEB")
SET(CPACK_PACKAGE_NAME "openmw")
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://openmw.org")
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${PACKAGE_MAINTAINER}")
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "A reimplementation of The Elder Scrolls III: Morrowind
OpenMW is a reimplementation of the Bethesda Game Studios game The Elder Scrolls III: Morrowind.
Data files from the original game is required to run it.")
SET(CPACK_DEBIAN_PACKAGE_NAME "openmw")
SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION_STRING}")
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW bsatool;Bsatool esmtool;Esmtool omwlauncher;OMWLauncher mwiniimporter;MWiniImporter")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.11.2), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libmpg123-0 (>= 1.12.1), libopenal1 (>= 1:1.12.854), libsndfile1 (>= 1.0.23), libstdc++6 (>= 4.4.5), libuuid1 (>= 2.17.2), libqtgui4 (>= 4.7.0)")
SET(CPACK_DEBIAN_PACKAGE_SECTION "Games")
STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE)
EXECUTE_PROCESS(
COMMAND ${DPKG_PROGRAM} --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}_${CPACK_DEBIAN_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
INCLUDE(CPack)
ENDIF(DPKG_PROGRAM)
ENDIF(NOT WIN32 AND NOT APPLE)
if(WIN32)
@@ -438,16 +437,24 @@ if(WIN32)
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg")
INSTALL(FILES
"${OpenMW_SOURCE_DIR}/readme.txt"
"${OpenMW_SOURCE_DIR}/GPL3.txt"
"${OpenMW_SOURCE_DIR}/OFL.txt"
"${OpenMW_SOURCE_DIR}/DejaVu Font License.txt"
"${OpenMW_SOURCE_DIR}/Daedric Font License.txt"
"${OpenMW_SOURCE_DIR}/Docs/license/GPL3.txt"
"${OpenMW_SOURCE_DIR}/Docs/license/DejaVu Font License.txt"
"${OpenMW_BINARY_DIR}/settings-default.cfg"
"${OpenMW_BINARY_DIR}/transparency-overrides.cfg"
"${OpenMW_BINARY_DIR}/Release/mwiniimport.exe"
"${OpenMW_BINARY_DIR}/Release/omwlauncher.exe"
"${OpenMW_BINARY_DIR}/Release/openmw.exe"
DESTINATION ".")
IF(BUILD_LAUNCHER)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/Release/omwlauncher.exe" DESTINATION ".")
ENDIF(BUILD_LAUNCHER)
IF(BUILD_MWINIIMPORTER)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/Release/mwiniimport.exe" DESTINATION ".")
ENDIF(BUILD_MWINIIMPORTER)
IF(BUILD_OPENCS)
INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/Release/opencs.exe" DESTINATION ".")
INSTALL(FILES "${OpenMW_BINARY_DIR}/opencs.ini" DESTINATION ".")
ENDIF(BUILD_OPENCS)
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".")
SET(CPACK_GENERATOR "NSIS")
@@ -457,7 +464,13 @@ if(WIN32)
SET(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW;omwlauncher;OpenMW Launcher")
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW")
IF(BUILD_LAUNCHER)
SET(CPACK_PACKAGE_EXECUTABLES "${CPACK_PACKAGE_EXECUTABLES};omwlauncher;OpenMW Launcher")
ENDIF(BUILD_LAUNCHER)
IF(BUILD_OPENCS)
SET(CPACK_PACKAGE_EXECUTABLES "${CPACK_PACKAGE_EXECUTABLES};opencs;OpenMW Construction Set")
ENDIF(BUILD_OPENCS)
SET(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Readme.lnk' '\$INSTDIR\\\\readme.txt'")
SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
@@ -508,6 +521,11 @@ add_subdirectory (extern/sdl4ogre)
# Components
add_subdirectory (components)
#Testing
if (BUILD_NIFTEST)
add_subdirectory(components/nif/tests/)
endif(BUILD_NIFTEST)
# Apps and tools
add_subdirectory( apps/openmw )
@@ -577,6 +595,7 @@ if (WIN32)
4706 # Assignment in conditional expression
4738 # Storing 32-bit float result in memory, possible loss of performance
4986 # Undocumented warning that occurs in the crtdbg.h file
4987 # nonstandard extension used (triggered by setjmp.h)
4996 # Function was declared deprecated
# cause by ogre extensivly
@@ -590,10 +609,14 @@ if (WIN32)
4127 # Conditional expression is constant
4242 # Storing value in a variable of a smaller type, possible loss of data
4244 # Storing value of one type in variable of another (size_t in int, for example)
4267 # Conversion from 'size_t' to 'int', possible loss of data
4305 # Truncating value (double to float, for example)
4309 # Variable overflow, trying to store 128 in a signed char for example
4351 # New behavior: elements of array 'array' will be default initialized (desired behavior)
4355 # Using 'this' in member initialization list
4505 # Unreferenced local function has been removed
4701 # Potentially uninitialized local variable used
4702 # Unreachable code
4800 # Boolean optimization warning, e.g. myBool = (myInt != 0) instead of myBool = myInt
)
@@ -601,19 +624,33 @@ if (WIN32)
set(WARNINGS "${WARNINGS} /wd${d}")
endforeach(d)
set_target_properties(shiny PROPERTIES COMPILE_FLAGS ${WARNINGS})
set_target_properties(shiny.OgrePlatform PROPERTIES COMPILE_FLAGS ${WARNINGS})
# boost::wave has a few issues with signed / unsigned conversions, so we suppress those here
set(SHINY_WARNINGS "${WARNINGS} /wd4245")
set_target_properties(shiny PROPERTIES COMPILE_FLAGS ${SHINY_WARNINGS})
# there's an unreferenced local variable in the ogre platform, suppress it
set(SHINY_OGRE_WARNINGS "${WARNINGS} /wd4101")
set_target_properties(shiny.OgrePlatform PROPERTIES COMPILE_FLAGS ${SHINY_OGRE_WARNINGS})
set_target_properties(sdl4ogre PROPERTIES COMPILE_FLAGS ${WARNINGS})
# oics uses tinyxml, which has an initialized but unused variable
set(OICS_WARNINGS "${WARNINGS} /wd4189")
set_target_properties(oics PROPERTIES COMPILE_FLAGS ${OICS_WARNINGS})
set_target_properties(components PROPERTIES COMPILE_FLAGS ${WARNINGS})
if (BUILD_LAUNCHER)
set_target_properties(omwlauncher PROPERTIES COMPILE_FLAGS ${WARNINGS})
endif (BUILD_LAUNCHER)
set_target_properties(openmw PROPERTIES COMPILE_FLAGS ${WARNINGS})
if (BUILD_BSATOOL)
if (BUILD_BSATOOL)
set_target_properties(bsatool PROPERTIES COMPILE_FLAGS ${WARNINGS})
endif (BUILD_BSATOOL)
endif (BUILD_BSATOOL)
if (BUILD_ESMTOOL)
set_target_properties(esmtool PROPERTIES COMPILE_FLAGS ${WARNINGS})
endif (BUILD_ESMTOOL)
if (BUILD_OPENCS)
set_target_properties(opencs PROPERTIES COMPILE_FLAGS ${WARNINGS})
endif (BUILD_OPENCS)
if (BUILD_MWINIIMPORTER)
set_target_properties(mwiniimport PROPERTIES COMPILE_FLAGS ${WARNINGS})
endif (BUILD_MWINIIMPORTER)
endif(MSVC)
# Same for MinGW
@@ -646,16 +683,19 @@ if (APPLE)
install(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" RENAME "openmw.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
install(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
install(FILES "${OpenMW_BINARY_DIR}/transparency-overrides.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
install(FILES "${OpenMW_BINARY_DIR}/opencs.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
install(FILES "${OpenMW_BINARY_DIR}/opencs.ini" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
set(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINO})
set(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
set(APPS "\${CMAKE_INSTALL_PREFIX}/${INSTALL_SUBDIR}/${APP_BUNDLE_NAME}")
set(PLUGINS "")
set(OPENMW_APP "\${CMAKE_INSTALL_PREFIX}/${INSTALL_SUBDIR}/${APP_BUNDLE_NAME}")
set(OPENCS_BUNDLE_NAME "OpenCS.app")
set(OPENCS_APP "\${CMAKE_INSTALL_PREFIX}/${INSTALL_SUBDIR}/${OPENCS_BUNDLE_NAME}")
set(ABSOLUTE_PLUGINS "")
foreach (PLUGIN ${USED_OGRE_PLUGINS})
@@ -663,12 +703,36 @@ if (APPLE)
set(ABSOLUTE_PLUGINS ${PLUGIN_ABS} ${ABSOLUTE_PLUGINS})
endforeach ()
set(PLUGIN_INSTALL_BASE "\${CMAKE_INSTALL_PREFIX}/${INSTALL_SUBDIR}/${APP_BUNDLE_NAME}/Contents/Plugins")
install(FILES ${ABSOLUTE_PLUGINS} DESTINATION "${INSTALL_SUBDIR}/${APP_BUNDLE_NAME}/Contents/Plugins" COMPONENT Runtime)
foreach (PLUGIN ${ABSOLUTE_PLUGINS})
get_filename_component(PLUGIN_RELATIVE ${PLUGIN} NAME)
set(PLUGINS ${PLUGINS} "${PLUGIN_INSTALL_BASE}/${PLUGIN_RELATIVE}")
endforeach ()
install(CODE "
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(BundleUtilities)
" COMPONENT Runtime)
# installs used plugins in bundle at given path (bundle_path must be relative to ${CMAKE_INSTALL_PREFIX})
# and returns list of install paths for all installed plugins
function (install_plugins_for_bundle bundle_path plugins_var)
set(RELATIVE_PLUGIN_INSTALL_BASE "${bundle_path}/Contents/Frameworks")
set(PLUGINS "")
set(PLUGIN_INSTALL_BASE "\${CMAKE_INSTALL_PREFIX}/${RELATIVE_PLUGIN_INSTALL_BASE}")
foreach (PLUGIN ${ABSOLUTE_PLUGINS})
get_filename_component(PLUGIN_RELATIVE ${PLUGIN} NAME)
get_filename_component(PLUGIN_RELATIVE_WE ${PLUGIN} NAME_WE)
set(PLUGIN_DYLIB_IN_BUNDLE "${PLUGIN_INSTALL_BASE}/${PLUGIN_RELATIVE}/${PLUGIN_RELATIVE_WE}")
set(PLUGINS ${PLUGINS} "${PLUGIN_DYLIB_IN_BUNDLE}")
install(CODE "
copy_resolved_framework_into_bundle(\"${PLUGIN}/${PLUGIN_RELATIVE_WE}\" \"${PLUGIN_DYLIB_IN_BUNDLE}\")
" COMPONENT Runtime)
endforeach ()
set(${plugins_var} ${PLUGINS} PARENT_SCOPE)
endfunction (install_plugins_for_bundle)
install_plugins_for_bundle("${INSTALL_SUBDIR}/${APP_BUNDLE_NAME}" PLUGINS)
install_plugins_for_bundle("${INSTALL_SUBDIR}/${OPENCS_BUNDLE_NAME}" OPENCS_PLUGINS)
#For now, search unresolved dependencies only in default system paths, so if you put unresolveable (i.e. with @executable_path in id name) lib or framework somewhere else, it would fail
set(DIRS "")
@@ -681,6 +745,7 @@ if (APPLE)
# Current limitations:
# 1. Handles only frameworks, not simple libs
INSTALL(CODE "
cmake_policy(SET CMP0009 OLD)
set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_SYSTEM_FRAMEWORK_PATH ${CMAKE_SYSTEM_FRAMEWORK_PATH})
@@ -712,10 +777,8 @@ if (APPLE)
endif()
endfunction(gp_resolve_item_override)
cmake_policy(SET CMP0009 OLD)
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(BundleUtilities)
fixup_bundle(\"${APPS}\" \"${PLUGINS}\" \"${DIRS}\")
fixup_bundle(\"${OPENMW_APP}\" \"${PLUGINS}\" \"${DIRS}\")
fixup_bundle(\"${OPENCS_APP}\" \"${OPENCS_PLUGINS}\" \"${DIRS}\")
" COMPONENT Runtime)
include(CPack)
endif (APPLE)
-10
View File
@@ -1,10 +0,0 @@
Dongle's Oblivion Daedric font set
http://www.uesp.net/wiki/Lore:Daedric_Alphabet#Daedric_Font
---------------------------------------------------
This was done entirely as a personal project. Bethesda Softworks graciously granted me the permission for it. I am not connected with them in any way.
You may freely use these fonts to create anything you'd like. You may re-distribute the fonts freely, over the Internet, or by any other means. Always keep the .zip file intact, and this read me included.
Please do not modify and redistribute the fonts without my permission.
You may NOT sell any of these fonts under any circumstances. This includes putting them on compilation font CDs for sale, putting them in a "members only" pay-area of a website, or any other means of financial gain connected in ANY way with the redistribution of any of these fonts.
You have my permission to create and sell any artwork made with these fonts, however you may need to contact Bethesda Softworks before doing so.
-1543
View File
File diff suppressed because it is too large Load Diff
-93
View File
@@ -1,93 +0,0 @@
Copyright (c) 2010, 2011 Georg Duffner (http://www.georgduffner.at)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
-160
View File
@@ -1,160 +0,0 @@
#Getting OpenMW Working on OS X
## Initial setup
First of all, clone OpenMW repo.
$ git clone github.com/zinnschlag/openmw
Or use your github url if you forked.
About dependencies: I prefer not to install them globally (i. e. in /usr/local/), so I'm installing them in directory in my home directory. If OpenMW sources is in $HOME/path/openmw, I'm using $HOME/path/libs/root as prefix for boost and other libs.
It's useful to create env var for lib install prefix:
$ export OMW_LIB_PREFIX=$HOME/path/libs/root`
Most of libs can be installed from [Homebrew][homebrew]. Only mpg123 needs to be installed from source (due to lack of universal compilation support). I think that some of libs can be installed from MacPorts or Fink too.
As OpenMW currently only supports i386 architecture on OS X, denendencies also should support it. Set some env vars in current terminal:
$ export CFLAGS="-arch i386"
$ export CXXFLAGS="-arch i386"
$ export LDFLAGS="-arch i386"
If you close your terminal, you should set env vars again before pcoceeding to next steps!
## Boost
Download [boost][boost] and install it with the following command:
$ cd /path/to/boost/source
$ ./bootstrap.sh --prefix=$OMW_LIB_PREFIX
$ ./bjam --build-dir=build --layout=versioned \
--toolset=darwin architecture=x86 address-model=32 \
--link-shared,static --prefix=$OMW_LIB_PREFIX install
Alternatively you can install boost with homebrew:
$ brew install boost --universal
I think MacPorts also should support universal build for boost.
## Ogre
Download [Ogre][] SDK (tested with 1.7.3), unpack it somewhere and move
`lib/Release/Ogre.framework` into `/Library/Frameworks`.
## OIS
Download patched [OIS][] and use the XCode project provided. Be sure to set your build architecture to
`i386`. Once it built, locate built OIS.framework with Xcode and move it to `/Library/Frameworks`.
## mpg123
Download [MPG 123][mpg123] and build it:
$ cd /path/to/mpg123/source
$ ./configure --prefix=$OMW_LIB_PREFIX --disable-debug \
--disable-dependency-tracking \
--with-optimization=4 \
--with-audio=dummy \
--with-default-audio=dummy \
--with-cpu=sse_alone \
$ make install
## libsndfile
Download [libsndfile][] and build it:
$ cd /path/to/libsndfile/source
$ ./configure --prefix=$OMW_LIB_PREFIX \
--disable-dependency-tracking
$ make install
or install with homebrew:
$ brew install libsndfile --universal
## Bullet
Download [Bullet][] and build it:
$ cd /path/to/bullet/source
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$OMW_LIB_PREFIX \
-DBUILD_EXTRAS=OFF \
-DBUILD_DEMOS=OFF \
-DCMAKE_OSX_ARCHITECTURES=i386 \
-DCMAKE_INSTALL_NAME_DIR=$OMW_LIB_RPEFIX/lib \
-G"Unix Makefiles" ../
$ make install
or install with homebrew:
$ brew install bullet --HEAD --universal
I prefer head because 2.79 has some issue which causes OpenMW to lag. Also you can edit formula and install 2.77, which is stable and haven't mentioned issue.
## Qt
Install [Qt][qt]. Qt SDK distributed by Nokia is not an option because it's 64 bit only, and OpenMW currently doesn't build for 64 bit on OS X. I'm installing it from Homebrew:
$ brew install qt --universal
## Run CMake
Generate the Makefile for OpenMW as follows and build OpenMW:
$ mkdir /path/to/openmw/build/dir
$ cd /path/to/open/build/dir
$ cmake \
-D CMAKE_OSX_ARCHITECTURES=i386 \
-D OGRE_SDK=/path/to/ogre/sdk \
-D BOOST_INCLUDEDIR=$OMW_LIB_PREFIX/include/boost-1_45 \
-D BOOST_LIBRARYDIR=$OMW_LIB_PREFIX/lib \
-D SNDFILE_INCLUDE_DIR=$OMW_LIB_PREFIX/include \
-D SNDFILE_LIBRARY=$OMW_LIB_PREFIX/lib/libsndfile.a \
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \
-D BULLET_DYNAMICS_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletDynamics.a \
-D BULLET_COLLISION_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletCollision.a \
-D BULLET_MATH_LIBRARY=$OMW_LIB_PREFIX/lib/libLinearMath.a \
-D BULLET_SOFTBODY_LIBRARY=$OMW_LIB_PREFIX/lib/libBulletSoftBody.a \
-D BULLET_INCLUDE_DIR=$OMW_LIB_PREFIX/include/bullet/ \
-G "Unix Makefiles" /path/to/openmw/source/dir
$ make
You can use `-G"Xcode"` if you prefer Xcode, or -G"Eclipse CDT4 - Unix Makefiles"
if you prefer Eclipse. You also can specify `-D CMAKE_BUILD_TYPE=Debug` for debug
build. As for CMake 2.8.7 and Xcode 4.3, Xcode generator is broken. Sadly Eclipse CDT also cannot import generated project at least on my machine.
If all libs installed via homebrew (excluding mpg123), then command would be even simplier:
$ cmake \
-D CMAKE_OSX_ARCHITECTURES="i386" \
-D OGRE_SDK=/path/to/ogre/sdk \
-D MPG123_LIBRARY=$OMW_LIB_PREFIX/lib/libmpg123.a \
-D MPG123_INCLUDE_DIR=$OMW_LIB_PREFIX/include \
-G "Unix Makefiles" /path/to/openmw/source/dir
$ make
Note for users with recent Xcode versions: you must explicitly specify what set of compilers do you use! If not, gcc will be used for C and Clang for C++. Just add this two -D's to command: `-D CMAKE_C_COMPILER=/usr/bin/clang` and `-D CMAKE_CXX_COMPILER=/usr/bin/clang`
Note for Xcode 4.3 users: you should specify full path to used SDK, because current CMake (2.8.7) couldn't find SDKs inside Xcode app bundle:
-D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
# Run
From your build directory run:
$ OpenMW.app/Contents/MacOS/openmw
or:
$ open OpenMW.app
Enjoy!
[homebrew]: https://github.com/mxcl/homebrew
[boost]: http://www.boost.org
[Ogre]: http://www.ogre3d.org
[Bullet]: http://bulletphysics.org
[OIS]: https://github.com/corristo/ois-fork
[mpg123]: http://www.mpg123.de
[libsndfile]: http://www.mega-nerd.com/libsndfile
[official website]: http://openmw.com
[Will Thimbleby's Ogre Framework]: http://www.thimbleby.net/ogre/
[qt]: http://qt.nokia.com/
+1 -1
View File
@@ -184,7 +184,7 @@ int list(Bsa::BSAFile& bsa, Arguments& info)
{
// List all files
const Bsa::BSAFile::FileList &files = bsa.getList();
for(int i=0; i<files.size(); i++)
for(unsigned int i=0; i<files.size(); i++)
{
if(info.longformat)
{
+13 -5
View File
@@ -236,7 +236,9 @@ void loadCell(ESM::Cell &cell, ESM::ESMReader &esm, Arguments& info)
// Loop through all the references
ESM::CellRef ref;
if(!quiet) std::cout << " References:\n";
while(cell.getNextRef(esm, ref))
bool deleted = false;
while(cell.getNextRef(esm, ref, deleted))
{
if (save) {
info.data.mCellRefs[&cell].push_back(ref);
@@ -244,13 +246,17 @@ void loadCell(ESM::Cell &cell, ESM::ESMReader &esm, Arguments& info)
if(quiet) continue;
std::cout << " Refnum: " << ref.mRefnum << std::endl;
std::cout << " Refnum: " << ref.mRefNum.mIndex << std::endl;
std::cout << " ID: '" << ref.mRefID << "'\n";
std::cout << " Owner: '" << ref.mOwner << "'\n";
std::cout << " Global: '" << ref.mGlobalVariable << "'" << std::endl;
std::cout << " Faction: '" << ref.mFaction << "'" << std::endl;
std::cout << " Faction rank: '" << ref.mFactionRank << "'" << std::endl;
std::cout << " Enchantment charge: '" << ref.mEnchantmentCharge << "'\n";
std::cout << " Uses/health: '" << ref.mCharge << "'\n";
std::cout << " Gold value: '" << ref.mGoldValue << "'\n";
std::cout << " Blocked: '" << static_cast<int>(ref.mReferenceBlocked) << "'" << std::endl;
std::cout << " Deleted: " << deleted << std::endl;
}
}
@@ -305,14 +311,14 @@ int load(Arguments& info)
info.data.author = esm.getAuthor();
info.data.description = esm.getDesc();
info.data.masters = esm.getMasters();
info.data.masters = esm.getGameFiles();
if (!quiet)
{
std::cout << "Author: " << esm.getAuthor() << std::endl
<< "Description: " << esm.getDesc() << std::endl
<< "File format version: " << esm.getFVer() << std::endl;
std::vector<ESM::Header::MasterData> m = esm.getMasters();
std::vector<ESM::Header::MasterData> m = esm.getGameFiles();
if (!m.empty())
{
std::cout << "Masters:" << std::endl;
@@ -330,7 +336,7 @@ int load(Arguments& info)
// Is the user interested in this record type?
bool interested = true;
if (info.types.size() > 0)
if (!info.types.empty())
{
std::vector<std::string>::iterator match;
match = std::find(info.types.begin(), info.types.end(),
@@ -339,6 +345,8 @@ int load(Arguments& info)
}
std::string id = esm.getHNOString("NAME");
if (id.empty())
id = esm.getHNOString("INAM");
if(!quiet && interested)
std::cout << "\nRecord: " << n.toString()
+33 -38
View File
@@ -387,7 +387,7 @@ std::string magicEffectLabel(int idx)
"sEffectSummonCreature04",
"sEffectSummonCreature05"
};
if (idx >= 0 && idx <= 143)
if (idx >= 0 && idx <= 142)
return magicEffectLabels[idx];
else
return "Invalid";
@@ -471,7 +471,7 @@ std::string skillLabel(int idx)
"Speechcraft",
"Hand-to-hand"
};
if (idx >= 0 && idx <= 27)
if (idx >= 0 && idx <= 26)
return skillLabels[idx];
else
return "Invalid";
@@ -498,7 +498,7 @@ std::string rangeTypeLabel(int idx)
"Touch",
"Target"
};
if (idx >= 0 && idx <= 3)
if (idx >= 0 && idx <= 2)
return rangeTypeLabels[idx];
else
return "Invalid";
@@ -680,7 +680,7 @@ std::string creatureFlags(int flags)
if (flags & ESM::Creature::Walks) properties += "Walks ";
if (flags & ESM::Creature::Swims) properties += "Swims ";
if (flags & ESM::Creature::Flies) properties += "Flies ";
if (flags & ESM::Creature::Biped) properties += "Biped ";
if (flags & ESM::Creature::Bipedal) properties += "Bipedal ";
if (flags & ESM::Creature::Respawn) properties += "Respawn ";
if (flags & ESM::Creature::Weapon) properties += "Weapon ";
if (flags & ESM::Creature::Skeleton) properties += "Skeleton ";
@@ -691,7 +691,7 @@ std::string creatureFlags(int flags)
ESM::Creature::Walks|
ESM::Creature::Swims|
ESM::Creature::Flies|
ESM::Creature::Biped|
ESM::Creature::Bipedal|
ESM::Creature::Respawn|
ESM::Creature::Weapon|
ESM::Creature::Skeleton|
@@ -717,16 +717,26 @@ std::string landFlags(int flags)
return properties;
}
std::string leveledListFlags(int flags)
std::string itemListFlags(int flags)
{
std::string properties = "";
if (flags == 0) properties += "[None] ";
if (flags & ESM::LeveledListBase::AllLevels) properties += "AllLevels ";
// This flag apparently not present on creature lists...
if (flags & ESM::LeveledListBase::Each) properties += "Each ";
if (flags & ESM::ItemLevList::AllLevels) properties += "AllLevels ";
if (flags & ESM::ItemLevList::Each) properties += "Each ";
int unused = (0xFFFFFFFF ^
(ESM::LeveledListBase::AllLevels|
ESM::LeveledListBase::Each));
(ESM::ItemLevList::AllLevels|
ESM::ItemLevList::Each));
if (flags & unused) properties += "Invalid ";
properties += str(boost::format("(0x%08X)") % flags);
return properties;
}
std::string creatureListFlags(int flags)
{
std::string properties = "";
if (flags == 0) properties += "[None] ";
if (flags & ESM::CreatureLevList::AllLevels) properties += "AllLevels ";
int unused = (0xFFFFFFFF ^ ESM::CreatureLevList::AllLevels);
if (flags & unused) properties += "Invalid ";
properties += str(boost::format("(0x%08X)") % flags);
return properties;
@@ -764,34 +774,19 @@ std::string magicEffectFlags(int flags)
{
std::string properties = "";
if (flags == 0) properties += "[None] ";
// Enchanting & SpellMaking occur on the same list of effects.
// "EXTRA SPELL" appears in the construction set under both the
// spell making and enchanting tabs as an allowed effect. Since
// most of the effects without this flags are defective in various
// ways, it's still very unclear what these flag bits are.
if (flags & ESM::MagicEffect::SpellMaking) properties += "SpellMaking ";
if (flags & ESM::MagicEffect::Enchanting) properties += "Enchanting ";
if (flags & 0x00000040) properties += "RangeNoSelf ";
if (flags & 0x00000080) properties += "RangeTouch ";
if (flags & 0x00000100) properties += "RangeTarget ";
if (flags & 0x00001000) properties += "Unknown2 ";
if (flags & 0x00000001) properties += "AffectSkill ";
if (flags & 0x00000002) properties += "AffectAttribute ";
if (flags & ESM::MagicEffect::TargetAttribute) properties += "TargetAttribute ";
if (flags & ESM::MagicEffect::TargetSkill) properties += "TargetSkill ";
if (flags & ESM::MagicEffect::NoDuration) properties += "NoDuration ";
if (flags & 0x00000008) properties += "NoMagnitude ";
if (flags & 0x00000010) properties += "Negative ";
if (flags & 0x00000020) properties += "Unknown1 ";
// ESM componet says 0x800 is negative, but none of the magic
// effects have this flags set.
if (flags & ESM::MagicEffect::Negative) properties += "Unused ";
// Since only Chameleon has this flag it could be anything
// that uniquely distinguishes Chameleon.
if (flags & 0x00002000) properties += "Chameleon ";
if (flags & 0x00004000) properties += "Bound ";
if (flags & 0x00008000) properties += "Summon ";
// Calm, Demoralize, Frenzy, Lock, Open, Rally, Soultrap, Turn Unded
if (flags & 0x00010000) properties += "Unknown3 ";
if (flags & 0x00020000) properties += "Absorb ";
if (flags & ESM::MagicEffect::NoMagnitude) properties += "NoMagnitude ";
if (flags & ESM::MagicEffect::Harmful) properties += "Harmful ";
if (flags & ESM::MagicEffect::ContinuousVfx) properties += "ContinuousVFX ";
if (flags & ESM::MagicEffect::CastSelf) properties += "CastSelf ";
if (flags & ESM::MagicEffect::CastTouch) properties += "CastTouch ";
if (flags & ESM::MagicEffect::CastTarget) properties += "CastTarget ";
if (flags & ESM::MagicEffect::UncappedDamage) properties += "UncappedDamage ";
if (flags & ESM::MagicEffect::NonRecastable) properties += "NonRecastable ";
if (flags & ESM::MagicEffect::Unreflectable) properties += "Unreflectable ";
if (flags & ESM::MagicEffect::CasterLinked) properties += "CasterLinked ";
if (flags & 0xFFFC0000) properties += "Invalid ";
properties += str(boost::format("(0x%08X)") % flags);
return properties;
+2 -1
View File
@@ -50,7 +50,8 @@ std::string cellFlags(int flags);
std::string containerFlags(int flags);
std::string creatureFlags(int flags);
std::string landFlags(int flags);
std::string leveledListFlags(int flags);
std::string creatureListFlags(int flags);
std::string itemListFlags(int flags);
std::string lightFlags(int flags);
std::string magicEffectFlags(int flags);
std::string npcFlags(int flags);
+18 -21
View File
@@ -13,8 +13,8 @@ void printAIPackage(ESM::AIPackage p)
std::cout << " Distance: " << p.mWander.mDistance << std::endl;
std::cout << " Duration: " << p.mWander.mDuration << std::endl;
std::cout << " Time of Day: " << (int)p.mWander.mTimeOfDay << std::endl;
if (p.mWander.mUnk != 1)
std::cout << " Unknown: " << (int)p.mWander.mUnk << std::endl;
if (p.mWander.mShouldRepeat != 1)
std::cout << " Should repeat: " << (bool)p.mWander.mShouldRepeat << std::endl;
std::cout << " Idle: ";
for (int i = 0; i != 8; i++)
@@ -124,7 +124,7 @@ void printEffectList(ESM::EffectList effects)
{
int i = 0;
std::vector<ESM::ENAMstruct>::iterator eit;
for (eit = effects.mList.begin(); eit != effects.mList.end(); eit++)
for (eit = effects.mList.begin(); eit != effects.mList.end(); ++eit)
{
std::cout << " Effect[" << i << "]: " << magicEffectLabel(eit->mEffectID)
<< " (" << eit->mEffectID << ")" << std::endl;
@@ -513,7 +513,7 @@ void Record<ESM::Cell>::print()
else
std::cout << " Map Color: " << boost::format("0x%08X") % mData.mMapColor << std::endl;
std::cout << " Water Level Int: " << mData.mWaterInt << std::endl;
std::cout << " NAM0: " << mData.mNAM0 << std::endl;
std::cout << " RefId counter: " << mData.mRefNumCounter << std::endl;
}
@@ -651,7 +651,7 @@ void Record<ESM::Dialogue>::print()
// Sadly, there are no DialInfos, because the loader dumps as it
// loads, rather than loading and then dumping. :-( Anyone mind if
// I change this?
std::vector<ESM::DialInfo>::iterator iit;
ESM::Dialogue::InfoContainer::iterator iit;
for (iit = mData.mInfo.begin(); iit != mData.mInfo.end(); iit++)
std::cout << "INFO!" << iit->mId << std::endl;
}
@@ -682,13 +682,11 @@ void Record<ESM::Faction>::print()
{
std::cout << " Name: " << mData.mName << std::endl;
std::cout << " Hidden: " << mData.mData.mIsHidden << std::endl;
if (mData.mData.mUnknown != -1)
std::cout << " Unknown: " << mData.mData.mUnknown << std::endl;
std::cout << " Attribute1: " << attributeLabel(mData.mData.mAttribute[0])
<< " (" << mData.mData.mAttribute[0] << ")" << std::endl;
std::cout << " Attribute2: " << attributeLabel(mData.mData.mAttribute[1])
<< " (" << mData.mData.mAttribute[1] << ")" << std::endl;
for (int i = 0; i != 6; i++)
for (int i = 0; i < 7; i++)
if (mData.mData.mSkills[i] != -1)
std::cout << " Skill: " << skillLabel(mData.mData.mSkills[i])
<< " (" << mData.mData.mSkills[i] << ")" << std::endl;
@@ -707,9 +705,9 @@ void Record<ESM::Faction>::print()
std::cout << " Faction Reaction: "
<< mData.mData.mRankData[i].mFactReaction << std::endl;
}
std::vector<ESM::Faction::Reaction>::iterator rit;
std::map<std::string, int>::iterator rit;
for (rit = mData.mReactions.begin(); rit != mData.mReactions.end(); rit++)
std::cout << " Reaction: " << rit->mReaction << " = " << rit->mFaction << std::endl;
std::cout << " Reaction: " << rit->second << " = " << rit->first << std::endl;
}
template<>
@@ -740,8 +738,8 @@ void Record<ESM::DialInfo>::print()
if (mData.mClass != "")
std::cout << " Class: " << mData.mClass << std::endl;
std::cout << " Factionless: " << mData.mFactionLess << std::endl;
if (mData.mNpcFaction != "")
std::cout << " NPC Faction: " << mData.mNpcFaction << std::endl;
if (mData.mFaction != "")
std::cout << " NPC Faction: " << mData.mFaction << std::endl;
if (mData.mData.mRank != -1)
std::cout << " NPC Rank: " << (int)mData.mData.mRank << std::endl;
if (mData.mPcFaction != "")
@@ -834,7 +832,7 @@ template<>
void Record<ESM::CreatureLevList>::print()
{
std::cout << " Chance for None: " << (int)mData.mChanceNone << std::endl;
std::cout << " Flags: " << leveledListFlags(mData.mFlags) << std::endl;
std::cout << " Flags: " << creatureListFlags(mData.mFlags) << std::endl;
std::cout << " Number of items: " << mData.mList.size() << std::endl;
std::vector<ESM::LeveledListBase::LevelItem>::iterator iit;
for (iit = mData.mList.begin(); iit != mData.mList.end(); iit++)
@@ -846,11 +844,11 @@ template<>
void Record<ESM::ItemLevList>::print()
{
std::cout << " Chance for None: " << (int)mData.mChanceNone << std::endl;
std::cout << " Flags: " << leveledListFlags(mData.mFlags) << std::endl;
std::cout << " Flags: " << itemListFlags(mData.mFlags) << std::endl;
std::cout << " Number of items: " << mData.mList.size() << std::endl;
std::vector<ESM::LeveledListBase::LevelItem>::iterator iit;
for (iit = mData.mList.begin(); iit != mData.mList.end(); iit++)
std::cout << " Inventory: Count: " << iit->mLevel
std::cout << " Inventory: Level: " << iit->mLevel
<< " Item: " << iit->mId << std::endl;
}
@@ -952,13 +950,13 @@ void Record<ESM::MagicEffect>::print()
std::cout << " School: " << schoolLabel(mData.mData.mSchool)
<< " (" << mData.mData.mSchool << ")" << std::endl;
std::cout << " Base Cost: " << mData.mData.mBaseCost << std::endl;
std::cout << " Unknown 1: " << mData.mData.mUnknown1 << std::endl;
std::cout << " Speed: " << mData.mData.mSpeed << std::endl;
std::cout << " Size: " << mData.mData.mSize << std::endl;
std::cout << " Size Cap: " << mData.mData.mSizeCap << std::endl;
std::cout << " Unknown 2: " << mData.mData.mUnknown2 << std::endl;
std::cout << " RGB Color: " << "("
<< mData.mData.mRed << ","
<< mData.mData.mGreen << ","
<< mData.mData.mGreen << ")" << std::endl;
<< mData.mData.mBlue << ")" << std::endl;
}
template<>
@@ -989,8 +987,7 @@ void Record<ESM::NPC>::print()
std::cout << " Faction: " << mData.mFaction << std::endl;
std::cout << " Flags: " << npcFlags(mData.mFlags) << std::endl;
// Seriously?
if (mData.mNpdt52.mGold == -10)
if (mData.mNpdtType == ESM::NPC::NPC_WITH_AUTOCALCULATED_STATS)
{
std::cout << " Level: " << mData.mNpdt12.mLevel << std::endl;
std::cout << " Reputation: " << (int)mData.mNpdt12.mReputation << std::endl;
@@ -1022,7 +1019,7 @@ void Record<ESM::NPC>::print()
std::cout << " Luck: " << (int)mData.mNpdt52.mLuck << std::endl;
std::cout << " Skills:" << std::endl;
for (int i = 0; i != 27; i++)
for (int i = 0; i != ESM::Skill::Length; i++)
std::cout << " " << skillLabel(i) << ": "
<< (int)((unsigned char)mData.mNpdt52.mSkills[i]) << std::endl;
+6 -1
View File
@@ -24,7 +24,12 @@ namespace EsmTool
bool mPrintPlain;
public:
RecordBase () { mPrintPlain = false; }
RecordBase ()
: mFlags(0)
, mPrintPlain(false)
{
}
virtual ~RecordBase() {}
const std::string &getId() const {
+10 -23
View File
@@ -11,7 +11,9 @@ set(LAUNCHER
settings/launchersettings.cpp
utils/checkablemessagebox.cpp
utils/profilescombobox.cpp
utils/textinputdialog.cpp
utils/lineedit.cpp
${CMAKE_SOURCE_DIR}/files/launcher/launcher.rc
)
@@ -24,7 +26,6 @@ set(LAUNCHER_HEADER
graphicspage.hpp
maindialog.hpp
playpage.hpp
unshieldthread.hpp
textslotmsgbox.hpp
settings/gamesettings.hpp
@@ -33,8 +34,9 @@ set(LAUNCHER_HEADER
settings/settingsbase.hpp
utils/checkablemessagebox.hpp
utils/profilescombobox.hpp
utils/textinputdialog.hpp
utils/lineedit.hpp
)
if(NOT WIN32)
LIST(APPEND LAUNCHER_HEADER unshieldthread.hpp)
@@ -47,11 +49,13 @@ set(LAUNCHER_HEADER_MOC
graphicspage.hpp
maindialog.hpp
playpage.hpp
unshieldthread.hpp
textslotmsgbox.hpp
utils/checkablemessagebox.hpp
utils/textinputdialog.hpp
utils/checkablemessagebox.hpp
utils/profilescombobox.hpp
utils/lineedit.hpp
)
if(NOT WIN32)
@@ -64,6 +68,7 @@ set(LAUNCHER_UI
${CMAKE_SOURCE_DIR}/files/ui/graphicspage.ui
${CMAKE_SOURCE_DIR}/files/ui/mainwindow.ui
${CMAKE_SOURCE_DIR}/files/ui/playpage.ui
${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
)
source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER})
@@ -89,15 +94,6 @@ if(NOT WIN32)
endif(NOT WIN32)
# Main executable
IF(OGRE_STATIC)
IF(WIN32)
ADD_DEFINITIONS(-DENABLE_PLUGIN_Direct3D9 -DENABLE_PLUGIN_GL)
set(OGRE_STATIC_PLUGINS ${OGRE_RenderSystem_Direct3D9_LIBRARIES} ${OGRE_RenderSystem_GL_LIBRARIES})
ELSE(WIN32)
ADD_DEFINITIONS(-DENABLE_PLUGIN_GL)
set(OGRE_STATIC_PLUGINS ${OGRE_RenderSystem_GL_LIBRARIES})
ENDIF(WIN32)
ENDIF(OGRE_STATIC)
add_executable(omwlauncher
${GUI_TYPE}
${LAUNCHER}
@@ -111,7 +107,7 @@ target_link_libraries(omwlauncher
${Boost_LIBRARIES}
${OGRE_LIBRARIES}
${OGRE_STATIC_PLUGINS}
${SDL2_LIBRARY}
${SDL2_LIBRARY_ONLY}
${QT_LIBRARIES}
components
)
@@ -123,17 +119,8 @@ endif(NOT WIN32)
if(DPKG_PROGRAM)
INSTALL(TARGETS omwlauncher RUNTIME DESTINATION games COMPONENT omwlauncher)
endif()
if (BUILD_WITH_CODE_COVERAGE)
add_definitions (--coverage)
target_link_libraries(omwlauncher gcov)
endif()
# Workaround for binutil => 2.23 problem when linking, should be fixed eventually upstream
if (UNIX AND NOT APPLE)
target_link_libraries(omwlauncher dl Xt)
endif()
+214 -462
View File
@@ -4,548 +4,300 @@
#include <QMessageBox>
#include <QCheckBox>
#include <QMenu>
#include <QSortFilterProxyModel>
#include <components/files/configurationmanager.hpp>
#include <components/fileorderlist/model/datafilesmodel.hpp>
#include <components/fileorderlist/model/pluginsproxymodel.hpp>
#include <components/fileorderlist/model/esm/esmfile.hpp>
#include <components/contentselector/model/esmfile.hpp>
#include <components/fileorderlist/utils/lineedit.hpp>
#include <components/fileorderlist/utils/naturalsort.hpp>
#include <components/fileorderlist/utils/profilescombobox.hpp>
#include <components/contentselector/model/naturalsort.hpp>
#include "utils/textinputdialog.hpp"
#include "utils/profilescombobox.hpp"
#include "settings/gamesettings.hpp"
#include "settings/launchersettings.hpp"
#include "utils/textinputdialog.hpp"
#include "components/contentselector/view/contentselector.hpp"
DataFilesPage::DataFilesPage(Files::ConfigurationManager &cfg, GameSettings &gameSettings, LauncherSettings &launcherSettings, QWidget *parent)
Launcher::DataFilesPage::DataFilesPage(Files::ConfigurationManager &cfg, GameSettings &gameSettings, LauncherSettings &launcherSettings, QWidget *parent)
: mCfgMgr(cfg)
, mGameSettings(gameSettings)
, mLauncherSettings(launcherSettings)
, QWidget(parent)
{
setupUi(this);
ui.setupUi (this);
setObjectName ("DataFilesPage");
mSelector = new ContentSelectorView::ContentSelector (ui.contentSelectorWidget);
// Models
mDataFilesModel = new DataFilesModel(this);
mMastersProxyModel = new QSortFilterProxyModel();
mMastersProxyModel->setFilterRegExp(QString("^.*\\.esm"));
mMastersProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
mMastersProxyModel->setSourceModel(mDataFilesModel);
mPluginsProxyModel = new PluginsProxyModel();
mPluginsProxyModel->setFilterRegExp(QString("^.*\\.esp"));
mPluginsProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
mPluginsProxyModel->setSourceModel(mDataFilesModel);
mFilterProxyModel = new QSortFilterProxyModel();
mFilterProxyModel->setDynamicSortFilter(true);
mFilterProxyModel->setSourceModel(mPluginsProxyModel);
QCheckBox checkBox;
unsigned int height = checkBox.sizeHint().height() + 4;
mastersTable->setModel(mMastersProxyModel);
mastersTable->setObjectName("MastersTable");
mastersTable->setContextMenuPolicy(Qt::CustomContextMenu);
mastersTable->setSortingEnabled(false);
mastersTable->setSelectionBehavior(QAbstractItemView::SelectRows);
mastersTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
mastersTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
mastersTable->setAlternatingRowColors(true);
mastersTable->horizontalHeader()->setStretchLastSection(true);
mastersTable->horizontalHeader()->hide();
// Set the row height to the size of the checkboxes
mastersTable->verticalHeader()->setDefaultSectionSize(height);
mastersTable->verticalHeader()->setResizeMode(QHeaderView::Fixed);
mastersTable->verticalHeader()->hide();
pluginsTable->setModel(mFilterProxyModel);
pluginsTable->setObjectName("PluginsTable");
pluginsTable->setContextMenuPolicy(Qt::CustomContextMenu);
pluginsTable->setSortingEnabled(false);
pluginsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
pluginsTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
pluginsTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
pluginsTable->setAlternatingRowColors(true);
pluginsTable->setVerticalScrollMode(QAbstractItemView::ScrollPerItem);
pluginsTable->horizontalHeader()->setStretchLastSection(true);
pluginsTable->horizontalHeader()->hide();
pluginsTable->verticalHeader()->setDefaultSectionSize(height);
pluginsTable->verticalHeader()->setResizeMode(QHeaderView::Fixed);
// Adjust the tableview widths inside the splitter
QList<int> sizeList;
sizeList << mLauncherSettings.value(QString("General/MastersTable/width"), QString("200")).toInt();
sizeList << mLauncherSettings.value(QString("General/PluginTable/width"), QString("340")).toInt();
splitter->setSizes(sizeList);
// Create a dialog for the new profile name input
mNewProfileDialog = new TextInputDialog(tr("New Profile"), tr("Profile name:"), this);
connect(profilesComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotCurrentIndexChanged(int)));
connect(mNewProfileDialog->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(updateOkButton(QString)));
connect(pluginsTable, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(setCheckState(QModelIndex)));
connect(mastersTable, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(setCheckState(QModelIndex)));
connect(pluginsTable, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
connect(mastersTable, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
connect(mDataFilesModel, SIGNAL(layoutChanged()), this, SLOT(updateViews()));
connect(filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
connect(splitter, SIGNAL(splitterMoved(int,int)), this, SLOT(updateSplitter()));
createActions();
buildView();
setupDataFiles();
}
void DataFilesPage::createActions()
void Launcher::DataFilesPage::loadSettings()
{
QStringList paths = mGameSettings.getDataDirs();
paths.insert (0, mDataLocal);
PathIterator pathIterator (paths);
// Add the actions to the toolbuttons
newProfileButton->setDefaultAction(newProfileAction);
deleteProfileButton->setDefaultAction(deleteProfileAction);
QString profileName = ui.profilesComboBox->currentText();
// Context menu actions
mContextMenu = new QMenu(this);
mContextMenu->addAction(checkAction);
mContextMenu->addAction(uncheckAction);
QStringList files = mLauncherSettings.values(QString("Profiles/") + profileName, Qt::MatchExactly);
QStringList filepaths;
foreach (const QString &file, files)
{
QString filepath = pathIterator.findFirstPath (file);
if (!filepath.isEmpty())
filepaths << filepath;
}
mSelector->setProfileContent (filepaths);
}
void DataFilesPage::setupDataFiles()
void Launcher::DataFilesPage::saveSettings(const QString &profile)
{
// Set the encoding to the one found in openmw.cfg or the default
mDataFilesModel->setEncoding(mGameSettings.value(QString("encoding"), QString("win1252")));
QString profileName = profile;
QStringList paths = mGameSettings.getDataDirs();
if (profileName.isEmpty())
profileName = ui.profilesComboBox->currentText();
foreach (const QString &path, paths) {
mDataFilesModel->addFiles(path);
//retrieve the files selected for the profile
ContentSelectorModel::ContentFileList items = mSelector->selectedFiles();
removeProfile (profileName);
mGameSettings.remove(QString("content"));
//set the value of the current profile (not necessarily the profile being saved!)
mLauncherSettings.setValue(QString("Profiles/currentprofile"), ui.profilesComboBox->currentText());
foreach(const ContentSelectorModel::EsmFile *item, items) {
mLauncherSettings.setMultiValue(QString("Profiles/") + profileName, item->fileName());
mGameSettings.setMultiValue(QString("content"), item->fileName());
}
QString dataLocal = mGameSettings.getDataLocal();
if (!dataLocal.isEmpty())
mDataFilesModel->addFiles(dataLocal);
}
// Sort by date accessed for now
mDataFilesModel->sort(3);
void Launcher::DataFilesPage::buildView()
{
ui.verticalLayout->insertWidget (0, mSelector->uiWidget());
QStringList profiles = mLauncherSettings.subKeys(QString("Profiles/"));
QString profile = mLauncherSettings.value(QString("Profiles/currentprofile"));
//tool buttons
ui.newProfileButton->setToolTip ("Create a new profile");
ui.deleteProfileButton->setToolTip ("Delete an existing profile");
if (!profiles.isEmpty())
profilesComboBox->addItems(profiles);
//combo box
ui.profilesComboBox->addItem ("Default");
ui.profilesComboBox->setPlaceholderText (QString("Select a profile..."));
// Add the current profile if empty
if (profilesComboBox->findText(profile) == -1 && !profile.isEmpty())
profilesComboBox->addItem(profile);
// Add the actions to the toolbuttons
ui.newProfileButton->setDefaultAction (ui.newProfileAction);
ui.deleteProfileButton->setDefaultAction (ui.deleteProfileAction);
if (profilesComboBox->findText(QString("Default")) == -1)
profilesComboBox->addItem(QString("Default"));
//establish connections
connect (ui.profilesComboBox, SIGNAL (currentIndexChanged(int)),
this, SLOT (slotProfileChanged(int)));
if (profile.isEmpty() || profile == QLatin1String("Default")) {
deleteProfileAction->setEnabled(false);
profilesComboBox->setEditEnabled(false);
profilesComboBox->setCurrentIndex(profilesComboBox->findText(QString("Default")));
} else {
profilesComboBox->setEditEnabled(true);
profilesComboBox->setCurrentIndex(profilesComboBox->findText(profile));
connect (ui.profilesComboBox, SIGNAL (profileRenamed(QString, QString)),
this, SLOT (slotProfileRenamed(QString, QString)));
connect (ui.profilesComboBox, SIGNAL (signalProfileChanged(QString, QString)),
this, SLOT (slotProfileChangedByUser(QString, QString)));
}
void Launcher::DataFilesPage::removeProfile(const QString &profile)
{
mLauncherSettings.remove(QString("Profiles/") + profile);
}
QAbstractItemModel *Launcher::DataFilesPage::profilesModel() const
{
return ui.profilesComboBox->model();
}
int Launcher::DataFilesPage::profilesIndex() const
{
return ui.profilesComboBox->currentIndex();
}
void Launcher::DataFilesPage::setProfile(int index, bool savePrevious)
{
if (index >= -1 && index < ui.profilesComboBox->count())
{
QString previous = ui.profilesComboBox->itemText(ui.profilesComboBox->currentIndex());
QString current = ui.profilesComboBox->itemText(index);
setProfile (previous, current, savePrevious);
}
}
// We do this here to prevent deletion of profiles when initializing the combobox
connect(profilesComboBox, SIGNAL(profileRenamed(QString,QString)), this, SLOT(profileRenamed(QString,QString)));
connect(profilesComboBox, SIGNAL(profileChanged(QString,QString)), this, SLOT(profileChanged(QString,QString)));
void Launcher::DataFilesPage::setProfile (const QString &previous, const QString &current, bool savePrevious)
{
//abort if no change (poss. duplicate signal)
if (previous == current)
return;
if (!previous.isEmpty() && savePrevious)
saveSettings (previous);
ui.profilesComboBox->setCurrentProfile (ui.profilesComboBox->findText (current));
loadSettings();
checkForDefaultProfile();
}
void DataFilesPage::loadSettings()
void Launcher::DataFilesPage::slotProfileDeleted (const QString &item)
{
QString profile = mLauncherSettings.value(QString("Profiles/currentprofile"));
if (profile.isEmpty())
return;
mDataFilesModel->uncheckAll();
QStringList masters = mLauncherSettings.values(QString("Profiles/") + profile + QString("/master"), Qt::MatchExactly);
QStringList plugins = mLauncherSettings.values(QString("Profiles/") + profile + QString("/plugin"), Qt::MatchExactly);
foreach (const QString &master, masters) {
QModelIndex index = mDataFilesModel->indexFromItem(mDataFilesModel->findItem(master));
if (index.isValid())
mDataFilesModel->setCheckState(index, Qt::Checked);
}
foreach (const QString &plugin, plugins) {
QModelIndex index = mDataFilesModel->indexFromItem(mDataFilesModel->findItem(plugin));
if (index.isValid())
mDataFilesModel->setCheckState(index, Qt::Checked);
}
removeProfile (item);
}
void DataFilesPage::saveSettings()
void Launcher::DataFilesPage::slotProfileChangedByUser(const QString &previous, const QString &current)
{
if (mDataFilesModel->rowCount() < 1)
setProfile(previous, current, true);
emit signalProfileChanged (ui.profilesComboBox->findText(current));
}
void Launcher::DataFilesPage::slotProfileRenamed(const QString &previous, const QString &current)
{
if (previous.isEmpty())
return;
QString profile = mLauncherSettings.value(QString("Profiles/currentprofile"));
// Save the new profile name
saveSettings();
if (profile.isEmpty()) {
profile = profilesComboBox->currentText();
mLauncherSettings.setValue(QString("Profiles/currentprofile"), profile);
}
// Remove the old one
removeProfile (previous);
mLauncherSettings.remove(QString("Profiles/") + profile + QString("/master"));
mLauncherSettings.remove(QString("Profiles/") + profile + QString("/plugin"));
loadSettings();
}
mGameSettings.remove(QString("master"));
mGameSettings.remove(QString("plugin"));
void Launcher::DataFilesPage::slotProfileChanged(int index)
{
setProfile (index, true);
}
QStringList items = mDataFilesModel->checkedItems();
void Launcher::DataFilesPage::setupDataFiles()
{
QStringList paths = mGameSettings.getDataDirs();
foreach(const QString &item, items) {
foreach (const QString &path, paths)
mSelector->addFiles(path);
if (item.endsWith(QString(".esm"), Qt::CaseInsensitive)) {
mLauncherSettings.setMultiValue(QString("Profiles/") + profile + QString("/master"), item);
mGameSettings.setMultiValue(QString("master"), item);
mDataLocal = mGameSettings.getDataLocal();
} else if (item.endsWith(QString(".esp"), Qt::CaseInsensitive)) {
mLauncherSettings.setMultiValue(QString("Profiles/") + profile + QString("/plugin"), item);
mGameSettings.setMultiValue(QString("plugin"), item);
if (!mDataLocal.isEmpty())
mSelector->addFiles(mDataLocal);
QStringList profiles;
QString currentProfile = mLauncherSettings.getSettings().value("Profiles/currentprofile");
foreach (QString key, mLauncherSettings.getSettings().keys())
{
if (key.contains("Profiles/"))
{
QString profile = key.mid (9);
if (profile != "currentprofile")
{
if (!profiles.contains(profile))
profiles << profile;
}
}
}
foreach (const QString &item, profiles)
addProfile (item, false);
setProfile (ui.profilesComboBox->findText(currentProfile), false);
loadSettings();
}
void DataFilesPage::updateOkButton(const QString &text)
void Launcher::DataFilesPage::on_newProfileAction_triggered()
{
// We do this here because we need the profiles combobox text
if (text.isEmpty()) {
mNewProfileDialog->setOkButtonEnabled(false);
return;
}
TextInputDialog newDialog (tr("New Profile"), tr("Profile name:"), this);
(profilesComboBox->findText(text) == -1)
? mNewProfileDialog->setOkButtonEnabled(true)
: mNewProfileDialog->setOkButtonEnabled(false);
if (newDialog.exec() != QDialog::Accepted)
return;
QString profile = newDialog.getText();
if (profile.isEmpty())
return;
saveSettings();
mSelector->clearCheckStates();
addProfile(profile, true);
mSelector->setGameFile();
saveSettings();
emit signalProfileChanged (ui.profilesComboBox->findText(profile));
}
void DataFilesPage::updateSplitter()
void Launcher::DataFilesPage::addProfile (const QString &profile, bool setAsCurrent)
{
// Sigh, update the saved splitter size in settings only when moved
// Since getting mSplitter->sizes() if page is hidden returns invalid values
QList<int> sizes = splitter->sizes();
if (profile.isEmpty())
return;
mLauncherSettings.setValue(QString("General/MastersTable/width"), QString::number(sizes.at(0)));
mLauncherSettings.setValue(QString("General/PluginsTable/width"), QString::number(sizes.at(1)));
if (ui.profilesComboBox->findText (profile) != -1)
return;
ui.profilesComboBox->addItem (profile);
if (setAsCurrent)
setProfile (ui.profilesComboBox->findText (profile), false);
}
void DataFilesPage::updateViews()
void Launcher::DataFilesPage::on_deleteProfileAction_triggered()
{
// Ensure the columns are hidden because sort() re-enables them
mastersTable->setColumnHidden(1, true);
mastersTable->setColumnHidden(2, true);
mastersTable->setColumnHidden(3, true);
mastersTable->setColumnHidden(4, true);
mastersTable->setColumnHidden(5, true);
mastersTable->setColumnHidden(6, true);
mastersTable->setColumnHidden(7, true);
mastersTable->setColumnHidden(8, true);
pluginsTable->setColumnHidden(1, true);
pluginsTable->setColumnHidden(2, true);
pluginsTable->setColumnHidden(3, true);
pluginsTable->setColumnHidden(4, true);
pluginsTable->setColumnHidden(5, true);
pluginsTable->setColumnHidden(6, true);
pluginsTable->setColumnHidden(7, true);
pluginsTable->setColumnHidden(8, true);
}
void DataFilesPage::setProfilesComboBoxIndex(int index)
{
profilesComboBox->setCurrentIndex(index);
}
void DataFilesPage::slotCurrentIndexChanged(int index)
{
emit profileChanged(index);
}
QAbstractItemModel* DataFilesPage::profilesComboBoxModel()
{
return profilesComboBox->model();
}
int DataFilesPage::profilesComboBoxIndex()
{
return profilesComboBox->currentIndex();
}
void DataFilesPage::on_newProfileAction_triggered()
{
if (mNewProfileDialog->exec() == QDialog::Accepted) {
QString profile = mNewProfileDialog->lineEdit()->text();
profilesComboBox->addItem(profile);
profilesComboBox->setCurrentIndex(profilesComboBox->findText(profile));
}
}
void DataFilesPage::on_deleteProfileAction_triggered()
{
QString profile = profilesComboBox->currentText();
QString profile = ui.profilesComboBox->currentText();
if (profile.isEmpty())
return;
if (!showDeleteMessageBox (profile))
return;
// Remove the profile from the combobox
ui.profilesComboBox->removeItem (ui.profilesComboBox->findText (profile));
removeProfile(profile);
saveSettings();
loadSettings();
checkForDefaultProfile();
}
void Launcher::DataFilesPage::checkForDefaultProfile()
{
//don't allow deleting "Default" profile
bool success = (ui.profilesComboBox->currentText() != "Default");
ui.deleteProfileAction->setEnabled (success);
ui.profilesComboBox->setEditEnabled (success);
}
bool Launcher::DataFilesPage::showDeleteMessageBox (const QString &text)
{
QMessageBox msgBox(this);
msgBox.setWindowTitle(tr("Delete Profile"));
msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Cancel);
msgBox.setText(tr("Are you sure you want to delete <b>%0</b>?").arg(profile));
msgBox.setText(tr("Are you sure you want to delete <b>%0</b>?").arg(text));
QAbstractButton *deleteButton =
msgBox.addButton(tr("Delete"), QMessageBox::ActionRole);
msgBox.exec();
if (msgBox.clickedButton() == deleteButton) {
mLauncherSettings.remove(QString("Profiles/") + profile + QString("/master"));
mLauncherSettings.remove(QString("Profiles/") + profile + QString("/plugin"));
// Remove the profile from the combobox
profilesComboBox->removeItem(profilesComboBox->findText(profile));
}
}
void DataFilesPage::on_checkAction_triggered()
{
if (pluginsTable->hasFocus())
setPluginsCheckstates(Qt::Checked);
if (mastersTable->hasFocus())
setMastersCheckstates(Qt::Checked);
}
void DataFilesPage::on_uncheckAction_triggered()
{
if (pluginsTable->hasFocus())
setPluginsCheckstates(Qt::Unchecked);
if (mastersTable->hasFocus())
setMastersCheckstates(Qt::Unchecked);
}
void DataFilesPage::setMastersCheckstates(Qt::CheckState state)
{
if (!mastersTable->selectionModel()->hasSelection()) {
return;
}
QModelIndexList indexes = mastersTable->selectionModel()->selectedIndexes();
foreach (const QModelIndex &index, indexes)
{
if (!index.isValid())
return;
QModelIndex sourceIndex = mMastersProxyModel->mapToSource(index);
if (!sourceIndex.isValid())
return;
mDataFilesModel->setCheckState(sourceIndex, state);
}
}
void DataFilesPage::setPluginsCheckstates(Qt::CheckState state)
{
if (!pluginsTable->selectionModel()->hasSelection()) {
return;
}
QModelIndexList indexes = pluginsTable->selectionModel()->selectedIndexes();
foreach (const QModelIndex &index, indexes)
{
if (!index.isValid())
return;
QModelIndex sourceIndex = mPluginsProxyModel->mapToSource(
mFilterProxyModel->mapToSource(index));
if (!sourceIndex.isValid())
return;
mDataFilesModel->setCheckState(sourceIndex, state);
}
}
void DataFilesPage::setCheckState(QModelIndex index)
{
if (!index.isValid())
return;
QObject *object = QObject::sender();
// Not a signal-slot call
if (!object)
return;
if (object->objectName() == QLatin1String("PluginsTable")) {
QModelIndex sourceIndex = mPluginsProxyModel->mapToSource(
mFilterProxyModel->mapToSource(index));
if (sourceIndex.isValid()) {
(mDataFilesModel->checkState(sourceIndex) == Qt::Checked)
? mDataFilesModel->setCheckState(sourceIndex, Qt::Unchecked)
: mDataFilesModel->setCheckState(sourceIndex, Qt::Checked);
}
}
if (object->objectName() == QLatin1String("MastersTable")) {
QModelIndex sourceIndex = mMastersProxyModel->mapToSource(index);
if (sourceIndex.isValid()) {
(mDataFilesModel->checkState(sourceIndex) == Qt::Checked)
? mDataFilesModel->setCheckState(sourceIndex, Qt::Unchecked)
: mDataFilesModel->setCheckState(sourceIndex, Qt::Checked);
}
}
return;
}
void DataFilesPage::filterChanged(const QString filter)
{
QRegExp regExp(filter, Qt::CaseInsensitive, QRegExp::FixedString);
mFilterProxyModel->setFilterRegExp(regExp);
}
void DataFilesPage::profileChanged(const QString &previous, const QString &current)
{
// Prevent the deletion of the default profile
if (current == QLatin1String("Default")) {
deleteProfileAction->setEnabled(false);
profilesComboBox->setEditEnabled(false);
} else {
deleteProfileAction->setEnabled(true);
profilesComboBox->setEditEnabled(true);
}
if (previous.isEmpty())
return;
if (profilesComboBox->findText(previous) == -1)
return; // Profile was deleted
// Store the previous profile
mLauncherSettings.setValue(QString("Profiles/currentprofile"), previous);
saveSettings();
mLauncherSettings.setValue(QString("Profiles/currentprofile"), current);
loadSettings();
}
void DataFilesPage::profileRenamed(const QString &previous, const QString &current)
{
if (previous.isEmpty())
return;
// Save the new profile name
mLauncherSettings.setValue(QString("Profiles/currentprofile"), current);
saveSettings();
// Remove the old one
mLauncherSettings.remove(QString("Profiles/") + previous + QString("/master"));
mLauncherSettings.remove(QString("Profiles/") + previous + QString("/plugin"));
// Remove the profile from the combobox
profilesComboBox->removeItem(profilesComboBox->findText(previous));
loadSettings();
}
void DataFilesPage::showContextMenu(const QPoint &point)
{
QObject *object = QObject::sender();
// Not a signal-slot call
if (!object)
return;
if (object->objectName() == QLatin1String("PluginsTable")) {
if (!pluginsTable->selectionModel()->hasSelection())
return;
QPoint globalPos = pluginsTable->mapToGlobal(point);
QModelIndexList indexes = pluginsTable->selectionModel()->selectedIndexes();
// Show the check/uncheck actions depending on the state of the selected items
uncheckAction->setEnabled(false);
checkAction->setEnabled(false);
foreach (const QModelIndex &index, indexes)
{
if (!index.isValid())
return;
QModelIndex sourceIndex = mPluginsProxyModel->mapToSource(
mFilterProxyModel->mapToSource(index));
if (!sourceIndex.isValid())
return;
(mDataFilesModel->checkState(sourceIndex) == Qt::Checked)
? uncheckAction->setEnabled(true)
: checkAction->setEnabled(true);
}
// Show menu
mContextMenu->exec(globalPos);
}
if (object->objectName() == QLatin1String("MastersTable")) {
if (!mastersTable->selectionModel()->hasSelection())
return;
QPoint globalPos = mastersTable->mapToGlobal(point);
QModelIndexList indexes = mastersTable->selectionModel()->selectedIndexes();
// Show the check/uncheck actions depending on the state of the selected items
uncheckAction->setEnabled(false);
checkAction->setEnabled(false);
foreach (const QModelIndex &index, indexes)
{
if (!index.isValid())
return;
QModelIndex sourceIndex = mMastersProxyModel->mapToSource(index);
if (!sourceIndex.isValid())
return;
(mDataFilesModel->checkState(sourceIndex) == Qt::Checked)
? uncheckAction->setEnabled(true)
: checkAction->setEnabled(true);
}
mContextMenu->exec(globalPos);
}
return (msgBox.clickedButton() == deleteButton);
}
+103 -55
View File
@@ -1,88 +1,136 @@
#ifndef DATAFILESPAGE_H
#define DATAFILESPAGE_H
#include <QWidget>
#include <QModelIndex>
#include "ui_datafilespage.h"
#include <QWidget>
#include <QDir>
#include <QFile>
class QSortFilterProxyModel;
class QAbstractItemModel;
class QAction;
class QMenu;
class DataFilesModel;
class TextInputDialog;
class GameSettings;
class LauncherSettings;
class PluginsProxyModel;
namespace Files { struct ConfigurationManager; }
namespace ContentSelectorView { class ContentSelector; }
class DataFilesPage : public QWidget, private Ui::DataFilesPage
namespace Launcher
{
Q_OBJECT
class TextInputDialog;
class GameSettings;
class LauncherSettings;
class ProfilesComboBox;
public:
DataFilesPage(Files::ConfigurationManager &cfg, GameSettings &gameSettings, LauncherSettings &launcherSettings, QWidget *parent = 0);
class DataFilesPage : public QWidget
{
Q_OBJECT
QAbstractItemModel* profilesComboBoxModel();
int profilesComboBoxIndex();
ContentSelectorView::ContentSelector *mSelector;
Ui::DataFilesPage ui;
void writeConfig(QString profile = QString());
void saveSettings();
public:
explicit DataFilesPage (Files::ConfigurationManager &cfg, GameSettings &gameSettings,
LauncherSettings &launcherSettings, QWidget *parent = 0);
signals:
void profileChanged(int index);
QAbstractItemModel* profilesModel() const;
public slots:
void setCheckState(QModelIndex index);
void setProfilesComboBoxIndex(int index);
int profilesIndex() const;
void filterChanged(const QString filter);
void showContextMenu(const QPoint &point);
void profileChanged(const QString &previous, const QString &current);
void profileRenamed(const QString &previous, const QString &current);
void updateOkButton(const QString &text);
void updateSplitter();
void updateViews();
//void writeConfig(QString profile = QString());
void saveSettings(const QString &profile = "");
void loadSettings();
// Action slots
void on_newProfileAction_triggered();
void on_deleteProfileAction_triggered();
void on_checkAction_triggered();
void on_uncheckAction_triggered();
signals:
void signalProfileChanged (int index);
private slots:
void slotCurrentIndexChanged(int index);
public slots:
void slotProfileChanged (int index);
private:
DataFilesModel *mDataFilesModel;
private slots:
PluginsProxyModel *mPluginsProxyModel;
QSortFilterProxyModel *mMastersProxyModel;
void slotProfileChangedByUser(const QString &previous, const QString &current);
void slotProfileRenamed(const QString &previous, const QString &current);
void slotProfileDeleted(const QString &item);
QSortFilterProxyModel *mFilterProxyModel;
void on_newProfileAction_triggered();
void on_deleteProfileAction_triggered();
QMenu *mContextMenu;
private:
Files::ConfigurationManager &mCfgMgr;
QMenu *mContextMenu;
GameSettings &mGameSettings;
LauncherSettings &mLauncherSettings;
Files::ConfigurationManager &mCfgMgr;
TextInputDialog *mNewProfileDialog;
GameSettings &mGameSettings;
LauncherSettings &mLauncherSettings;
void setMastersCheckstates(Qt::CheckState state);
void setPluginsCheckstates(Qt::CheckState state);
QString mDataLocal;
void createActions();
void setupDataFiles();
void setupConfig();
void readConfig();
void setPluginsCheckstates(Qt::CheckState state);
void loadSettings();
void buildView();
void setupDataFiles();
void setupConfig();
void readConfig();
void setProfile (int index, bool savePrevious);
void setProfile (const QString &previous, const QString &current, bool savePrevious);
void removeProfile (const QString &profile);
bool showDeleteMessageBox (const QString &text);
void addProfile (const QString &profile, bool setAsCurrent);
void checkForDefaultProfile();
};
class PathIterator
{
QStringList::ConstIterator mCitEnd;
QStringList::ConstIterator mCitCurrent;
QStringList::ConstIterator mCitBegin;
QString mFile;
QString mFilePath;
public:
PathIterator (const QStringList &list)
{
mCitBegin = list.constBegin();
mCitCurrent = mCitBegin;
mCitEnd = list.constEnd();
}
QString findFirstPath (const QString &file)
{
mCitCurrent = mCitBegin;
mFile = file;
return path();
}
QString findNextPath () { return path(); }
private:
QString path ()
{
bool success = false;
QDir dir;
QFileInfo file;
while (!success)
{
if (mCitCurrent == mCitEnd)
break;
dir.setPath (*(mCitCurrent++));
file.setFile (dir.absoluteFilePath (mFile));
success = file.exists();
}
if (success)
return file.absoluteFilePath();
return "";
}
};
};
}
#endif
+22 -60
View File
@@ -4,20 +4,19 @@
#include <QMessageBox>
#include <QDir>
#ifdef __APPLE__
#ifdef MAC_OS_X_VERSION_MIN_REQUIRED
#undef MAC_OS_X_VERSION_MIN_REQUIRED
// We need to do this because of Qt: https://bugreports.qt-project.org/browse/QTBUG-22154
#define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
#endif
#include <SDL.h>
#endif // MAC_OS_X_VERSION_MIN_REQUIRED
#include <cstdlib>
#include <SDL.h>
#include <boost/math/common_factor.hpp>
#include <components/files/configurationmanager.hpp>
#include <components/files/ogreplugin.hpp>
#include <components/fileorderlist/utils/naturalsort.hpp>
#include <components/contentselector/model/naturalsort.hpp>
#include "settings/graphicssettings.hpp"
@@ -33,11 +32,12 @@ QString getAspect(int x, int y)
return QString(QString::number(xaspect) + ":" + QString::number(yaspect));
}
GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSetting, QWidget *parent)
Launcher::GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSetting, QWidget *parent)
: mCfgMgr(cfg)
, mGraphicsSettings(graphicsSetting)
, QWidget(parent)
{
setObjectName ("GraphicsPage");
setupUi(this);
// Set the maximum res we can set in windowed mode
@@ -52,15 +52,11 @@ GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &g
}
bool GraphicsPage::setupOgre()
bool Launcher::GraphicsPage::setupOgre()
{
// Create a log manager so we can surpress debug text to stdout/stderr
Ogre::LogManager* logMgr = OGRE_NEW Ogre::LogManager;
logMgr->createLog((mCfgMgr.getLogPath().string() + "/launcherOgre.log"), true, false, false);
try
{
mOgre = new Ogre::Root("", "", "./launcherOgre.log");
mOgre = mOgreInit.init(mCfgMgr.getLogPath().string() + "/launcherOgre.log");
}
catch(Ogre::Exception &ex)
{
@@ -78,40 +74,6 @@ bool GraphicsPage::setupOgre()
return false;
}
std::string pluginDir;
const char* pluginEnv = getenv("OPENMW_OGRE_PLUGIN_DIR");
if (pluginEnv)
pluginDir = pluginEnv;
else
{
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
pluginDir = ".\\";
#endif
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
pluginDir = OGRE_PLUGIN_DIR;
#endif
#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
pluginDir = OGRE_PLUGIN_DIR_REL;
#endif
}
QDir dir(QString::fromStdString(pluginDir));
pluginDir = dir.absolutePath().toStdString();
Files::loadOgrePlugin(pluginDir, "RenderSystem_GL", *mOgre);
Files::loadOgrePlugin(pluginDir, "RenderSystem_GL3Plus", *mOgre);
Files::loadOgrePlugin(pluginDir, "RenderSystem_Direct3D9", *mOgre);
#ifdef ENABLE_PLUGIN_GL
mGLPlugin = new Ogre::GLPlugin();
mOgre->installPlugin(mGLPlugin);
#endif
#ifdef ENABLE_PLUGIN_Direct3D9
mD3D9Plugin = new Ogre::D3D9Plugin();
mOgre->installPlugin(mD3D9Plugin);
#endif
// Get the available renderers and put them in the combobox
const Ogre::RenderSystemList &renderers = mOgre->getAvailableRenderers();
@@ -133,7 +95,7 @@ bool GraphicsPage::setupOgre()
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(tr("<br><b>Could not select a valid render system</b><br><br> \
Please make sure the plugins.cfg file exists and contains a valid rendering plugin.<br>"));
Please make sure Ogre plugins were installed correctly.<br>"));
msgBox.exec();
return false;
}
@@ -156,7 +118,7 @@ bool GraphicsPage::setupOgre()
return true;
}
bool GraphicsPage::setupSDL()
bool Launcher::GraphicsPage::setupSDL()
{
int displays = SDL_GetNumVideoDisplays();
@@ -179,7 +141,7 @@ bool GraphicsPage::setupSDL()
return true;
}
bool GraphicsPage::loadSettings()
bool Launcher::GraphicsPage::loadSettings()
{
if (!setupSDL())
return false;
@@ -218,7 +180,7 @@ bool GraphicsPage::loadSettings()
return true;
}
void GraphicsPage::saveSettings()
void Launcher::GraphicsPage::saveSettings()
{
vSyncCheckBox->checkState() ? mGraphicsSettings.setValue(QString("Video/vsync"), QString("true"))
: mGraphicsSettings.setValue(QString("Video/vsync"), QString("false"));
@@ -245,20 +207,20 @@ void GraphicsPage::saveSettings()
mGraphicsSettings.setValue(QString("Video/screen"), QString::number(screenComboBox->currentIndex()));
}
QStringList GraphicsPage::getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer)
QStringList Launcher::GraphicsPage::getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer)
{
QStringList result;
uint row = 0;
Ogre::ConfigOptionMap options = renderer->getConfigOptions();
for (Ogre::ConfigOptionMap::iterator i = options.begin (); i != options.end (); i++, row++)
for (Ogre::ConfigOptionMap::iterator i = options.begin (); i != options.end (); ++i, ++row)
{
Ogre::StringVector::iterator opt_it;
uint idx = 0;
for (opt_it = i->second.possibleValues.begin();
opt_it != i->second.possibleValues.end(); opt_it++, idx++)
opt_it != i->second.possibleValues.end(); ++opt_it, ++idx)
{
if (strcmp (key.toStdString().c_str(), i->first.c_str()) == 0) {
result << ((key == "FSAA") ? QString("MSAA ") : QString("")) + QString::fromStdString((*opt_it).c_str()).simplified();
@@ -278,7 +240,7 @@ QStringList GraphicsPage::getAvailableOptions(const QString &key, Ogre::RenderSy
return result;
}
QStringList GraphicsPage::getAvailableResolutions(int screen)
QStringList Launcher::GraphicsPage::getAvailableResolutions(int screen)
{
QStringList result;
SDL_DisplayMode mode;
@@ -325,7 +287,7 @@ QStringList GraphicsPage::getAvailableResolutions(int screen)
return result;
}
QRect GraphicsPage::getMaximumResolution()
QRect Launcher::GraphicsPage::getMaximumResolution()
{
QRect max;
int screens = QApplication::desktop()->screenCount();
@@ -340,7 +302,7 @@ QRect GraphicsPage::getMaximumResolution()
return max;
}
void GraphicsPage::rendererChanged(const QString &renderer)
void Launcher::GraphicsPage::rendererChanged(const QString &renderer)
{
mSelectedRenderSystem = mOgre->getRenderSystemByName(renderer.toStdString());
@@ -349,7 +311,7 @@ void GraphicsPage::rendererChanged(const QString &renderer)
antiAliasingComboBox->addItems(getAvailableOptions(QString("FSAA"), mSelectedRenderSystem));
}
void GraphicsPage::screenChanged(int screen)
void Launcher::GraphicsPage::screenChanged(int screen)
{
if (screen >= 0) {
resolutionComboBox->clear();
@@ -357,7 +319,7 @@ void GraphicsPage::screenChanged(int screen)
}
}
void GraphicsPage::slotFullScreenChanged(int state)
void Launcher::GraphicsPage::slotFullScreenChanged(int state)
{
if (state == Qt::Checked) {
standardRadioButton->toggle();
@@ -371,7 +333,7 @@ void GraphicsPage::slotFullScreenChanged(int state)
}
}
void GraphicsPage::slotStandardToggled(bool checked)
void Launcher::GraphicsPage::slotStandardToggled(bool checked)
{
if (checked) {
resolutionComboBox->setEnabled(true);
+32 -41
View File
@@ -5,62 +5,53 @@
#include <OgreRoot.h>
#include <OgreRenderSystem.h>
//#include <OgreConfigFile.h>
//#include <OgreConfigDialog.h>
// Static plugin headers
#ifdef ENABLE_PLUGIN_GL
# include "OgreGLPlugin.h"
#endif
#ifdef ENABLE_PLUGIN_Direct3D9
# include "OgreD3D9Plugin.h"
#endif
#include <components/ogreinit/ogreinit.hpp>
#include "ui_graphicspage.h"
class GraphicsSettings;
namespace Files { struct ConfigurationManager; }
class GraphicsPage : public QWidget, private Ui::GraphicsPage
namespace Launcher
{
Q_OBJECT
class GraphicsSettings;
public:
GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSettings, QWidget *parent = 0);
class GraphicsPage : public QWidget, private Ui::GraphicsPage
{
Q_OBJECT
void saveSettings();
bool loadSettings();
public:
GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSettings, QWidget *parent = 0);
public slots:
void rendererChanged(const QString &renderer);
void screenChanged(int screen);
void saveSettings();
bool loadSettings();
private slots:
void slotFullScreenChanged(int state);
void slotStandardToggled(bool checked);
public slots:
void rendererChanged(const QString &renderer);
void screenChanged(int screen);
private:
Ogre::Root *mOgre;
Ogre::RenderSystem *mSelectedRenderSystem;
Ogre::RenderSystem *mOpenGLRenderSystem;
Ogre::RenderSystem *mDirect3DRenderSystem;
#ifdef ENABLE_PLUGIN_GL
Ogre::GLPlugin* mGLPlugin;
#endif
#ifdef ENABLE_PLUGIN_Direct3D9
Ogre::D3D9Plugin* mD3D9Plugin;
#endif
private slots:
void slotFullScreenChanged(int state);
void slotStandardToggled(bool checked);
Files::ConfigurationManager &mCfgMgr;
GraphicsSettings &mGraphicsSettings;
private:
OgreInit::OgreInit mOgreInit;
Ogre::Root *mOgre;
Ogre::RenderSystem *mSelectedRenderSystem;
Ogre::RenderSystem *mOpenGLRenderSystem;
Ogre::RenderSystem *mDirect3DRenderSystem;
QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer);
QStringList getAvailableResolutions(int screen);
QRect getMaximumResolution();
Files::ConfigurationManager &mCfgMgr;
GraphicsSettings &mGraphicsSettings;
bool setupOgre();
bool setupSDL();
};
QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer);
QStringList getAvailableResolutions(int screen);
QRect getMaximumResolution();
bool setupOgre();
bool setupSDL();
};
}
#endif
+6 -6
View File
@@ -3,19 +3,20 @@
#include <QDir>
#include <QDebug>
#ifdef __APPLE__
#ifdef MAC_OS_X_VERSION_MIN_REQUIRED
#undef MAC_OS_X_VERSION_MIN_REQUIRED
// We need to do this because of Qt: https://bugreports.qt-project.org/browse/QTBUG-22154
#define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
#endif
#endif // MAC_OS_X_VERSION_MIN_REQUIRED
#include <SDL.h>
#include "maindialog.hpp"
// SDL workaround
#include "graphicspage.hpp"
int main(int argc, char *argv[])
{
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software");
SDL_SetMainReady();
if (SDL_Init(SDL_INIT_VIDEO) != 0)
{
qDebug() << "SDL_Init failed: " << QString::fromStdString(SDL_GetError());
@@ -49,7 +50,7 @@ int main(int argc, char *argv[])
// Support non-latin characters
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
MainDialog mainWin;
Launcher::MainDialog mainWin;
if (mainWin.setup()) {
mainWin.show();
@@ -61,4 +62,3 @@ int main(int argc, char *argv[])
SDL_Quit();
return returnValue;
}
+120 -59
View File
@@ -1,5 +1,11 @@
#include "maindialog.hpp"
#include <components/version/version.hpp>
#include <QLabel>
#include <QDate>
#include <QTime>
#include <QPushButton>
#include <QFontDatabase>
#include <QInputDialog>
#include <QFileDialog>
@@ -23,8 +29,8 @@
#include "graphicspage.hpp"
#include "datafilespage.hpp"
MainDialog::MainDialog()
: mGameSettings(mCfgMgr)
Launcher::MainDialog::MainDialog(QWidget *parent)
: mGameSettings(mCfgMgr), QMainWindow (parent)
{
// Install the stylesheet font
QFile file;
@@ -35,11 +41,11 @@ MainDialog::MainDialog()
// Check if the font is installed
if (!fonts.contains("EB Garamond")) {
QString font = QString::fromStdString(mCfgMgr.getGlobalDataPath().string()) + QString("resources/mygui/EBGaramond-Regular.ttf");
QString font = QString::fromUtf8(mCfgMgr.getGlobalDataPath().string().c_str()) + QString("resources/mygui/EBGaramond-Regular.ttf");
file.setFileName(font);
if (!file.exists()) {
font = QString::fromStdString(mCfgMgr.getLocalPath().string()) + QString("resources/mygui/EBGaramond-Regular.ttf");
font = QString::fromUtf8(mCfgMgr.getLocalPath().string().c_str()) + QString("resources/mygui/EBGaramond-Regular.ttf");
}
fontDatabase.addApplicationFont(font);
@@ -66,10 +72,29 @@ MainDialog::MainDialog()
// Remove what's this? button
setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
// Add version information to bottom of the window
QString revision(OPENMW_VERSION_COMMITHASH);
QString tag(OPENMW_VERSION_TAGHASH);
if (!revision.isEmpty() && !tag.isEmpty())
{
if (revision == tag) {
versionLabel->setText(tr("OpenMW %0 release").arg(OPENMW_VERSION));
} else {
versionLabel->setText(tr("OpenMW development (%0)").arg(revision.left(10)));
}
// Add the compile date and time
versionLabel->setToolTip(tr("Compiled on %0 %1").arg(QLocale(QLocale::C).toDate(QString(__DATE__).simplified(),
QLatin1String("MMM d yyyy")).toString(Qt::SystemLocaleLongDate),
QLocale(QLocale::C).toTime(QString(__TIME__).simplified(),
QLatin1String("hh:mm:ss")).toString(Qt::SystemLocaleShortDate)));
}
createIcons();
}
void MainDialog::createIcons()
void Launcher::MainDialog::createIcons()
{
if (!QIcon::hasThemeIcon("document-new"))
QIcon::setThemeName("tango");
@@ -101,15 +126,15 @@ void MainDialog::createIcons()
}
void MainDialog::createPages()
void Launcher::MainDialog::createPages()
{
mPlayPage = new PlayPage(this);
mGraphicsPage = new GraphicsPage(mCfgMgr, mGraphicsSettings, this);
mDataFilesPage = new DataFilesPage(mCfgMgr, mGameSettings, mLauncherSettings, this);
// Set the combobox of the play page to imitate the combobox on the datafilespage
mPlayPage->setProfilesComboBoxModel(mDataFilesPage->profilesComboBoxModel());
mPlayPage->setProfilesComboBoxIndex(mDataFilesPage->profilesComboBoxIndex());
mPlayPage->setProfilesModel(mDataFilesPage->profilesModel());
mPlayPage->setProfilesIndex(mDataFilesPage->profilesIndex());
// Add the pages to the stacked widget
pagesWidget->addWidget(mPlayPage);
@@ -121,12 +146,12 @@ void MainDialog::createPages()
connect(mPlayPage, SIGNAL(playButtonClicked()), this, SLOT(play()));
connect(mPlayPage, SIGNAL(profileChanged(int)), mDataFilesPage, SLOT(setProfilesComboBoxIndex(int)));
connect(mDataFilesPage, SIGNAL(profileChanged(int)), mPlayPage, SLOT(setProfilesComboBoxIndex(int)));
connect(mPlayPage, SIGNAL(signalProfileChanged(int)), mDataFilesPage, SLOT(slotProfileChanged(int)));
connect(mDataFilesPage, SIGNAL(signalProfileChanged(int)), mPlayPage, SLOT(setProfilesIndex(int)));
}
bool MainDialog::showFirstRunDialog()
bool Launcher::MainDialog::showFirstRunDialog()
{
QStringList iniPaths;
@@ -218,7 +243,7 @@ bool MainDialog::showFirstRunDialog()
}
// Create the file if it doesn't already exist, else the importer will fail
QString path = QString::fromStdString(mCfgMgr.getUserPath().string()) + QString("openmw.cfg");
QString path = QString::fromUtf8(mCfgMgr.getUserConfigPath().string().c_str()) + QString("openmw.cfg");
QFile file(path);
if (!file.exists()) {
@@ -261,19 +286,11 @@ bool MainDialog::showFirstRunDialog()
// Add a new profile
if (msgBox.isChecked()) {
mLauncherSettings.setValue(QString("Profiles/currentprofile"), QString("Imported"));
mLauncherSettings.remove(QString("Profiles/Imported/content"));
mLauncherSettings.remove(QString("Profiles/Imported/master"));
mLauncherSettings.remove(QString("Profiles/Imported/plugin"));
QStringList masters = mGameSettings.values(QString("master"));
QStringList plugins = mGameSettings.values(QString("plugin"));
foreach (const QString &master, masters) {
mLauncherSettings.setMultiValue(QString("Profiles/Imported/master"), master);
}
foreach (const QString &plugin, plugins) {
mLauncherSettings.setMultiValue(QString("Profiles/Imported/plugin"), plugin);
QStringList contents = mGameSettings.values(QString("content"));
foreach (const QString &content, contents) {
mLauncherSettings.setMultiValue(QString("Profiles/Imported/content"), content);
}
}
@@ -282,7 +299,7 @@ bool MainDialog::showFirstRunDialog()
return true;
}
bool MainDialog::setup()
bool Launcher::MainDialog::setup()
{
if (!setupLauncherSettings())
return false;
@@ -311,19 +328,37 @@ bool MainDialog::setup()
return true;
}
void MainDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous)
void Launcher::MainDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous)
{
if (!current)
current = previous;
pagesWidget->setCurrentIndex(iconWidget->row(current));
int currentIndex = iconWidget->row(current);
int previousIndex = iconWidget->row(previous);
pagesWidget->setCurrentIndex(currentIndex);
DataFilesPage *previousPage = dynamic_cast<DataFilesPage *>(pagesWidget->widget(previousIndex));
DataFilesPage *currentPage = dynamic_cast<DataFilesPage *>(pagesWidget->widget(currentIndex));
//special call to update/save data files page list view when it's displayed/hidden.
if (previousPage)
{
if (previousPage->objectName() == "DataFilesPage")
previousPage->saveSettings();
}
else if (currentPage)
{
if (currentPage->objectName() == "DataFilesPage")
currentPage->loadSettings();
}
}
bool MainDialog::setupLauncherSettings()
bool Launcher::MainDialog::setupLauncherSettings()
{
mLauncherSettings.setMultiValueEnabled(true);
QString userPath = QString::fromStdString(mCfgMgr.getUserPath().string());
QString userPath = QString::fromUtf8(mCfgMgr.getUserConfigPath().string().c_str());
QStringList paths;
paths.append(QString("launcher.cfg"));
@@ -356,7 +391,7 @@ bool MainDialog::setupLauncherSettings()
}
#ifndef WIN32
bool expansions(UnshieldThread& cd)
bool Launcher::expansions(Launcher::UnshieldThread& cd)
{
if(cd.BloodmoonDone())
{
@@ -367,7 +402,7 @@ bool expansions(UnshieldThread& cd)
QMessageBox expansionsBox;
expansionsBox.setText(QObject::tr("<br>Would you like to install expansions now ? (make sure you have the disc)<br> \
If you want to install both Bloodmoon and Tribunal, you have to install Tribunal first.<br>"));
QAbstractButton* tribunalButton = NULL;
if(!cd.TribunalDone())
tribunalButton = expansionsBox.addButton(QObject::tr("&Tribunal"), QMessageBox::ActionRole);
@@ -386,7 +421,7 @@ bool expansions(UnshieldThread& cd)
{
TextSlotMsgBox cdbox;
cdbox.setStandardButtons(QMessageBox::Cancel);
cdbox.setStandardButtons(QMessageBox::Cancel);
QObject::connect(&cd,SIGNAL(signalGUI(const QString&)), &cdbox, SLOT(setTextSlot(const QString&)));
QObject::connect(&cd,SIGNAL(close()), &cdbox, SLOT(reject()));
@@ -405,7 +440,7 @@ bool expansions(UnshieldThread& cd)
{
TextSlotMsgBox cdbox;
cdbox.setStandardButtons(QMessageBox::Cancel);
cdbox.setStandardButtons(QMessageBox::Cancel);
QObject::connect(&cd,SIGNAL(signalGUI(const QString&)), &cdbox, SLOT(setTextSlot(const QString&)));
QObject::connect(&cd,SIGNAL(close()), &cdbox, SLOT(reject()));
@@ -427,11 +462,37 @@ bool expansions(UnshieldThread& cd)
}
#endif // WIN32
bool MainDialog::setupGameSettings()
bool Launcher::MainDialog::setupGameSettings()
{
QString userPath = QString::fromStdString(mCfgMgr.getUserPath().string());
QString globalPath = QString::fromStdString(mCfgMgr.getGlobalPath().string());
QString userPath = QString::fromUtf8(mCfgMgr.getUserConfigPath().string().c_str());
QString globalPath = QString::fromUtf8(mCfgMgr.getGlobalPath().string().c_str());
// Load the user config file first, separately
// So we can write it properly, uncontaminated
QString path = userPath + QLatin1String("openmw.cfg");
QFile file(path);
qDebug() << "Loading config file:" << qPrintable(path);
if (file.exists()) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox msgBox;
msgBox.setWindowTitle(tr("Error opening OpenMW configuration file"));
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(QObject::tr("<br><b>Could not open %0 for reading</b><br><br> \
Please make sure you have the right permissions \
and try again.<br>").arg(file.fileName()));
msgBox.exec();
return false;
}
QTextStream stream(&file);
stream.setCodec(QTextCodec::codecForName("UTF-8"));
mGameSettings.readUserFile(stream);
}
// Now the rest
QStringList paths;
paths.append(userPath + QString("openmw.cfg"));
paths.append(QString("openmw.cfg"));
@@ -467,7 +528,7 @@ bool MainDialog::setupGameSettings()
foreach (const QString path, mGameSettings.getDataDirs()) {
QDir dir(path);
QStringList filters;
filters << "*.esp" << "*.esm";
filters << "*.esp" << "*.esm" << "*.omwgame" << "*.omwaddon";
if (!dir.entryList(filters).isEmpty())
dataDirs.append(path);
@@ -485,12 +546,12 @@ bool MainDialog::setupGameSettings()
QAbstractButton *dirSelectButton =
msgBox.addButton(QObject::tr("Browse to &Install..."), QMessageBox::ActionRole);
#ifndef WIN32
QAbstractButton *cdSelectButton =
QAbstractButton *cdSelectButton =
msgBox.addButton(QObject::tr("Browse to &CD..."), QMessageBox::ActionRole);
#endif
msgBox.exec();
@@ -505,14 +566,14 @@ bool MainDialog::setupGameSettings()
#ifndef WIN32
else if(msgBox.clickedButton() == cdSelectButton) {
UnshieldThread cd;
{
TextSlotMsgBox cdbox;
cdbox.setStandardButtons(QMessageBox::Cancel);
cdbox.setStandardButtons(QMessageBox::Cancel);
QObject::connect(&cd,SIGNAL(signalGUI(const QString&)), &cdbox, SLOT(setTextSlot(const QString&)));
QObject::connect(&cd,SIGNAL(close()), &cdbox, SLOT(reject()));
cd.SetMorrowindPath(
QFileDialog::getOpenFileName(
NULL,
@@ -526,14 +587,14 @@ bool MainDialog::setupGameSettings()
QObject::tr("Select where to extract files to"),
QDir::currentPath(),
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks).toUtf8().constData());
cd.start();
cdbox.exec();
}
while(expansions(cd));
selectedFile = QString::fromStdString(cd.GetMWEsmPath());
selectedFile = QString::fromUtf8(cd.GetMWEsmPath().c_str());
}
#endif // WIN32
@@ -550,12 +611,12 @@ bool MainDialog::setupGameSettings()
return true;
}
bool MainDialog::setupGraphicsSettings()
bool Launcher::MainDialog::setupGraphicsSettings()
{
mGraphicsSettings.setMultiValueEnabled(false);
QString userPath = QString::fromStdString(mCfgMgr.getUserPath().string());
QString globalPath = QString::fromStdString(mCfgMgr.getGlobalPath().string());
QString userPath = QString::fromUtf8(mCfgMgr.getUserConfigPath().string().c_str());
QString globalPath = QString::fromUtf8(mCfgMgr.getGlobalPath().string().c_str());
QFile localDefault(QString("settings-default.cfg"));
QFile globalDefault(globalPath + QString("settings-default.cfg"));
@@ -604,7 +665,7 @@ bool MainDialog::setupGraphicsSettings()
return true;
}
void MainDialog::loadSettings()
void Launcher::MainDialog::loadSettings()
{
int width = mLauncherSettings.value(QString("General/MainWindow/width")).toInt();
int height = mLauncherSettings.value(QString("General/MainWindow/height")).toInt();
@@ -616,7 +677,7 @@ void MainDialog::loadSettings()
move(posX, posY);
}
void MainDialog::saveSettings()
void Launcher::MainDialog::saveSettings()
{
QString width = QString::number(this->width());
QString height = QString::number(this->height());
@@ -634,14 +695,14 @@ void MainDialog::saveSettings()
}
bool MainDialog::writeSettings()
bool Launcher::MainDialog::writeSettings()
{
// Now write all config files
saveSettings();
mGraphicsPage->saveSettings();
mDataFilesPage->saveSettings();
QString userPath = QString::fromStdString(mCfgMgr.getUserPath().string());
QString userPath = QString::fromUtf8(mCfgMgr.getUserConfigPath().string().c_str());
QDir dir(userPath);
if (!dir.exists()) {
@@ -727,13 +788,13 @@ bool MainDialog::writeSettings()
return true;
}
void MainDialog::closeEvent(QCloseEvent *event)
void Launcher::MainDialog::closeEvent(QCloseEvent *event)
{
writeSettings();
event->accept();
}
void MainDialog::play()
void Launcher::MainDialog::play()
{
if (!writeSettings()) {
qApp->quit();
@@ -742,11 +803,11 @@ void MainDialog::play()
if(!mGameSettings.hasMaster()) {
QMessageBox msgBox;
msgBox.setWindowTitle(tr("No master file selected"));
msgBox.setWindowTitle(tr("No game file selected"));
msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(tr("<br><b>You do not have any master files selected.</b><br><br> \
OpenMW will not start without a master file selected.<br>"));
msgBox.setText(tr("<br><b>You do not have a game file selected.</b><br><br> \
OpenMW will not start without a game file selected.<br>"));
msgBox.exec();
return;
}
@@ -756,7 +817,7 @@ void MainDialog::play()
qApp->quit();
}
bool MainDialog::startProgram(const QString &name, const QStringList &arguments, bool detached)
bool Launcher::MainDialog::startProgram(const QString &name, const QStringList &arguments, bool detached)
{
QString path = name;
#ifdef Q_OS_WIN
+51 -49
View File
@@ -11,57 +11,59 @@
#include "ui_mainwindow.h"
class QListWidget;
class QListWidgetItem;
class QStackedWidget;
class QStringList;
class QStringListModel;
class QString;
class PlayPage;
class GraphicsPage;
class DataFilesPage;
class MainDialog : public QMainWindow, private Ui::MainWindow
namespace Launcher
{
Q_OBJECT
public:
MainDialog();
bool setup();
bool showFirstRunDialog();
public slots:
void changePage(QListWidgetItem *current, QListWidgetItem *previous);
void play();
private:
void createIcons();
void createPages();
bool setupLauncherSettings();
bool setupGameSettings();
bool setupGraphicsSettings();
void loadSettings();
void saveSettings();
bool writeSettings();
inline bool startProgram(const QString &name, bool detached = false) { return startProgram(name, QStringList(), detached); }
bool startProgram(const QString &name, const QStringList &arguments, bool detached = false);
void closeEvent(QCloseEvent *event);
PlayPage *mPlayPage;
GraphicsPage *mGraphicsPage;
DataFilesPage *mDataFilesPage;
Files::ConfigurationManager mCfgMgr;
GameSettings mGameSettings;
GraphicsSettings mGraphicsSettings;
LauncherSettings mLauncherSettings;
};
class PlayPage;
class GraphicsPage;
class DataFilesPage;
class UnshieldThread;
#ifndef WIN32
bool expansions(Launcher::UnshieldThread& cd);
#endif
class MainDialog : public QMainWindow, private Ui::MainWindow
{
Q_OBJECT
public:
explicit MainDialog(QWidget *parent = 0);
bool setup();
bool showFirstRunDialog();
public slots:
void changePage(QListWidgetItem *current, QListWidgetItem *previous);
void play();
private:
void createIcons();
void createPages();
bool setupLauncherSettings();
bool setupGameSettings();
bool setupGraphicsSettings();
void loadSettings();
void saveSettings();
bool writeSettings();
inline bool startProgram(const QString &name, bool detached = false) { return startProgram(name, QStringList(), detached); }
bool startProgram(const QString &name, const QStringList &arguments, bool detached = false);
void closeEvent(QCloseEvent *event);
PlayPage *mPlayPage;
GraphicsPage *mGraphicsPage;
DataFilesPage *mDataFilesPage;
Files::ConfigurationManager mCfgMgr;
GameSettings mGameSettings;
GraphicsSettings mGraphicsSettings;
LauncherSettings mLauncherSettings;
};
}
#endif
+6 -10
View File
@@ -6,8 +6,9 @@
#include <QPlastiqueStyle>
#endif
PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
Launcher::PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
{
setObjectName ("PlayPage");
setupUi(this);
// Hacks to get the stylesheet look properly
@@ -17,27 +18,22 @@ PlayPage::PlayPage(QWidget *parent) : QWidget(parent)
#endif
profilesComboBox->setView(new QListView());
connect(profilesComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotCurrentIndexChanged(int)));
connect(profilesComboBox, SIGNAL(activated(int)), this, SIGNAL (signalProfileChanged(int)));
connect(playButton, SIGNAL(clicked()), this, SLOT(slotPlayClicked()));
}
void PlayPage::setProfilesComboBoxModel(QAbstractItemModel *model)
void Launcher::PlayPage::setProfilesModel(QAbstractItemModel *model)
{
profilesComboBox->setModel(model);
}
void PlayPage::setProfilesComboBoxIndex(int index)
void Launcher::PlayPage::setProfilesIndex(int index)
{
profilesComboBox->setCurrentIndex(index);
}
void PlayPage::slotCurrentIndexChanged(int index)
{
emit profileChanged(index);
}
void PlayPage::slotPlayClicked()
void Launcher::PlayPage::slotPlayClicked()
{
emit playButtonClicked();
}
+16 -15
View File
@@ -9,27 +9,28 @@ class QComboBox;
class QPushButton;
class QAbstractItemModel;
class PlayPage : public QWidget, private Ui::PlayPage
namespace Launcher
{
Q_OBJECT
class PlayPage : public QWidget, private Ui::PlayPage
{
Q_OBJECT
public:
PlayPage(QWidget *parent = 0);
void setProfilesComboBoxModel(QAbstractItemModel *model);
public:
PlayPage(QWidget *parent = 0);
void setProfilesModel(QAbstractItemModel *model);
signals:
void profileChanged(int index);
void playButtonClicked();
signals:
void signalProfileChanged(int index);
void playButtonClicked();
public slots:
void setProfilesComboBoxIndex(int index);
public slots:
void setProfilesIndex(int index);
private slots:
void slotCurrentIndexChanged(int index);
void slotPlayClicked();
private slots:
void slotPlayClicked();
};
};
}
#endif
+50 -27
View File
@@ -9,6 +9,7 @@
#include <components/files/configurationmanager.hpp>
#include <boost/version.hpp>
/**
* Workaround for problems with whitespaces in paths in older versions of Boost library
*/
@@ -26,16 +27,16 @@ namespace boost
#endif /* (BOOST_VERSION <= 104600) */
GameSettings::GameSettings(Files::ConfigurationManager &cfg)
Launcher::GameSettings::GameSettings(Files::ConfigurationManager &cfg)
: mCfgMgr(cfg)
{
}
GameSettings::~GameSettings()
Launcher::GameSettings::~GameSettings()
{
}
void GameSettings::validatePaths()
void Launcher::GameSettings::validatePaths()
{
if (mSettings.isEmpty() || !mDataDirs.isEmpty())
return; // Don't re-validate paths if they are already parsed
@@ -44,7 +45,8 @@ void GameSettings::validatePaths()
Files::PathContainer dataDirs;
foreach (const QString &path, paths) {
dataDirs.push_back(Files::PathContainer::value_type(path.toStdString()));
QByteArray bytes = path.toUtf8();
dataDirs.push_back(Files::PathContainer::value_type(std::string(bytes.constData(), bytes.length())));
}
// Parse the data dirs to convert the tokenized paths
@@ -52,7 +54,7 @@ void GameSettings::validatePaths()
mDataDirs.clear();
for (Files::PathContainer::iterator it = dataDirs.begin(); it != dataDirs.end(); ++it) {
QString path = QString::fromStdString(it->string());
QString path = QString::fromUtf8(it->string().c_str());
path.remove(QChar('\"'));
QDir dir(path);
@@ -67,12 +69,13 @@ void GameSettings::validatePaths()
return;
dataDirs.clear();
dataDirs.push_back(Files::PathContainer::value_type(local.toStdString()));
QByteArray bytes = local.toUtf8();
dataDirs.push_back(Files::PathContainer::value_type(std::string(bytes.constData(), bytes.length())));
mCfgMgr.processPaths(dataDirs);
if (!dataDirs.empty()) {
QString path = QString::fromStdString(dataDirs.front().string());
QString path = QString::fromUtf8(dataDirs.front().string().c_str());
path.remove(QChar('\"'));
QDir dir(path);
@@ -81,14 +84,24 @@ void GameSettings::validatePaths()
}
}
QStringList GameSettings::values(const QString &key, const QStringList &defaultValues)
QStringList Launcher::GameSettings::values(const QString &key, const QStringList &defaultValues)
{
if (!mSettings.values(key).isEmpty())
return mSettings.values(key);
return defaultValues;
}
bool GameSettings::readFile(QTextStream &stream)
bool Launcher::GameSettings::readFile(QTextStream &stream)
{
return readFile(stream, mSettings);
}
bool Launcher::GameSettings::readUserFile(QTextStream &stream)
{
return readFile(stream, mUserSettings);
}
bool Launcher::GameSettings::readFile(QTextStream &stream, QMap<QString, QString> &settings)
{
QMap<QString, QString> cache;
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
@@ -106,10 +119,10 @@ bool GameSettings::readFile(QTextStream &stream)
// Don't remove existing data entries
if (key != QLatin1String("data"))
mSettings.remove(key);
settings.remove(key);
QStringList values = cache.values(key);
values.append(mSettings.values(key));
values.append(settings.values(key));
if (!values.contains(value)) {
cache.insertMulti(key, value);
@@ -117,35 +130,36 @@ bool GameSettings::readFile(QTextStream &stream)
}
}
if (mSettings.isEmpty()) {
mSettings = cache; // This is the first time we read a file
if (settings.isEmpty()) {
settings = cache; // This is the first time we read a file
validatePaths();
return true;
}
// Merge the changed keys with those which didn't
mSettings.unite(cache);
settings.unite(cache);
validatePaths();
return true;
}
bool GameSettings::writeFile(QTextStream &stream)
bool Launcher::GameSettings::writeFile(QTextStream &stream)
{
// Iterate in reverse order to preserve insertion order
QMapIterator<QString, QString> i(mSettings);
QMapIterator<QString, QString> i(mUserSettings);
i.toBack();
while (i.hasPrevious()) {
i.previous();
if (i.key() == QLatin1String("master") || i.key() == QLatin1String("plugin"))
if (i.key() == QLatin1String("content"))
continue;
// Quote paths with spaces
if (i.key() == QLatin1String("data")
|| i.key() == QLatin1String("data-local")
|| i.key() == QLatin1String("resources"))
|| i.key() == QLatin1String("data-local")
|| i.key() == QLatin1String("resources"))
{
if (i.value().contains(QChar(' ')))
{
@@ -161,15 +175,24 @@ bool GameSettings::writeFile(QTextStream &stream)
}
QStringList masters = mSettings.values(QString("master"));
for (int i = masters.count(); i--;) {
stream << "master=" << masters.at(i) << "\n";
}
QStringList plugins = mSettings.values(QString("plugin"));
for (int i = plugins.count(); i--;) {
stream << "plugin=" << plugins.at(i) << "\n";
QStringList content = mUserSettings.values(QString("content"));
for (int i = content.count(); i--;) {
stream << "content=" << content.at(i) << "\n";
}
return true;
}
bool Launcher::GameSettings::hasMaster()
{
bool result = false;
QStringList content = mSettings.values(QString("content"));
for (int i = 0; i < content.count(); ++i) {
if (content.at(i).contains(".omwgame") || content.at(i).contains(".esm")) {
result = true;
break;
}
}
return result;
}
+55 -38
View File
@@ -8,55 +8,72 @@
#include <boost/filesystem/path.hpp>
namespace Files { typedef std::vector<boost::filesystem::path> PathContainer;
struct ConfigurationManager;}
class GameSettings
namespace Files
{
public:
GameSettings(Files::ConfigurationManager &cfg);
~GameSettings();
typedef std::vector<boost::filesystem::path> PathContainer;
struct ConfigurationManager;
}
inline QString value(const QString &key, const QString &defaultValue = QString())
namespace Launcher
{
class GameSettings
{
return mSettings.value(key).isEmpty() ? defaultValue : mSettings.value(key);
}
public:
GameSettings(Files::ConfigurationManager &cfg);
~GameSettings();
inline QString value(const QString &key, const QString &defaultValue = QString())
{
return mSettings.value(key).isEmpty() ? defaultValue : mSettings.value(key);
}
inline void setValue(const QString &key, const QString &value)
{
mSettings.insert(key, value);
}
inline void setValue(const QString &key, const QString &value)
{
mSettings.insert(key, value);
mUserSettings.insert(key, value);
}
inline void setMultiValue(const QString &key, const QString &value)
{
QStringList values = mSettings.values(key);
if (!values.contains(value))
mSettings.insertMulti(key, value);
}
inline void setMultiValue(const QString &key, const QString &value)
{
QStringList values = mSettings.values(key);
if (!values.contains(value))
mSettings.insertMulti(key, value);
inline void remove(const QString &key)
{
mSettings.remove(key);
}
values = mUserSettings.values(key);
if (!values.contains(value))
mUserSettings.insertMulti(key, value);
}
inline QStringList getDataDirs() { return mDataDirs; }
inline void addDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.append(dir); }
inline QString getDataLocal() {return mDataLocal; }
inline bool hasMaster() { return mSettings.count(QString("master")) > 0; }
inline void remove(const QString &key)
{
mSettings.remove(key);
mUserSettings.remove(key);
}
QStringList values(const QString &key, const QStringList &defaultValues = QStringList());
bool readFile(QTextStream &stream);
bool writeFile(QTextStream &stream);
inline QStringList getDataDirs() { return mDataDirs; }
inline void addDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.append(dir); }
inline QString getDataLocal() {return mDataLocal; }
private:
Files::ConfigurationManager &mCfgMgr;
bool hasMaster();
void validatePaths();
QMap<QString, QString> mSettings;
QStringList values(const QString &key, const QStringList &defaultValues = QStringList());
QStringList mDataDirs;
QString mDataLocal;
};
bool readFile(QTextStream &stream);
bool readFile(QTextStream &stream, QMap<QString, QString> &settings);
bool readUserFile(QTextStream &stream);
bool writeFile(QTextStream &stream);
private:
Files::ConfigurationManager &mCfgMgr;
void validatePaths();
QMap<QString, QString> mSettings;
QMap<QString, QString> mUserSettings;
QStringList mDataDirs;
QString mDataLocal;
};
}
#endif // GAMESETTINGS_HPP
+3 -3
View File
@@ -5,15 +5,15 @@
#include <QRegExp>
#include <QMap>
GraphicsSettings::GraphicsSettings()
Launcher::GraphicsSettings::GraphicsSettings()
{
}
GraphicsSettings::~GraphicsSettings()
Launcher::GraphicsSettings::~GraphicsSettings()
{
}
bool GraphicsSettings::writeFile(QTextStream &stream)
bool Launcher::GraphicsSettings::writeFile(QTextStream &stream)
{
QString sectionPrefix;
QRegExp sectionRe("([^/]+)/(.+)$");
+9 -7
View File
@@ -3,14 +3,16 @@
#include "settingsbase.hpp"
class GraphicsSettings : public SettingsBase<QMap<QString, QString> >
namespace Launcher
{
public:
GraphicsSettings();
~GraphicsSettings();
class GraphicsSettings : public SettingsBase<QMap<QString, QString> >
{
public:
GraphicsSettings();
~GraphicsSettings();
bool writeFile(QTextStream &stream);
};
bool writeFile(QTextStream &stream);
};
}
#endif // GRAPHICSSETTINGS_HPP
+7 -8
View File
@@ -5,15 +5,17 @@
#include <QRegExp>
#include <QMap>
LauncherSettings::LauncherSettings()
#include <QDebug>
Launcher::LauncherSettings::LauncherSettings()
{
}
LauncherSettings::~LauncherSettings()
Launcher::LauncherSettings::~LauncherSettings()
{
}
QStringList LauncherSettings::values(const QString &key, Qt::MatchFlags flags)
QStringList Launcher::LauncherSettings::values(const QString &key, Qt::MatchFlags flags)
{
QMap<QString, QString> settings = SettingsBase::getSettings();
@@ -34,7 +36,7 @@ QStringList LauncherSettings::values(const QString &key, Qt::MatchFlags flags)
return result;
}
QStringList LauncherSettings::subKeys(const QString &key)
QStringList Launcher::LauncherSettings::subKeys(const QString &key)
{
QMap<QString, QString> settings = SettingsBase::getSettings();
QStringList keys = settings.uniqueKeys();
@@ -44,12 +46,9 @@ QStringList LauncherSettings::subKeys(const QString &key)
QStringList result;
foreach (const QString &currentKey, keys) {
if (keyRe.indexIn(currentKey) != -1) {
QString prefixedKey = keyRe.cap(1);
if(prefixedKey.startsWith(key)) {
QString subKey = prefixedKey.remove(key);
if (!subKey.isEmpty())
result.append(subKey);
@@ -61,7 +60,7 @@ QStringList LauncherSettings::subKeys(const QString &key)
return result;
}
bool LauncherSettings::writeFile(QTextStream &stream)
bool Launcher::LauncherSettings::writeFile(QTextStream &stream)
{
QString sectionPrefix;
QRegExp sectionRe("([^/]+)/(.+)$");
+11 -9
View File
@@ -3,17 +3,19 @@
#include "settingsbase.hpp"
class LauncherSettings : public SettingsBase<QMap<QString, QString> >
namespace Launcher
{
public:
LauncherSettings();
~LauncherSettings();
class LauncherSettings : public SettingsBase<QMap<QString, QString> >
{
public:
LauncherSettings();
~LauncherSettings();
QStringList subKeys(const QString &key);
QStringList values(const QString &key, Qt::MatchFlags flags = Qt::MatchExactly);
QStringList subKeys(const QString &key);
QStringList values(const QString &key, Qt::MatchFlags flags = Qt::MatchExactly);
bool writeFile(QTextStream &stream);
};
bool writeFile(QTextStream &stream);
};
}
#endif // LAUNCHERSETTINGS_HPP
+74 -72
View File
@@ -7,103 +7,105 @@
#include <QRegExp>
#include <QMap>
template <class Map>
class SettingsBase
namespace Launcher
{
public:
SettingsBase() { mMultiValue = false; }
~SettingsBase() {}
inline QString value(const QString &key, const QString &defaultValue = QString())
template <class Map>
class SettingsBase
{
return mSettings.value(key).isEmpty() ? defaultValue : mSettings.value(key);
}
inline void setValue(const QString &key, const QString &value)
{
QStringList values = mSettings.values(key);
if (!values.contains(value))
mSettings.insert(key, value);
}
public:
SettingsBase() { mMultiValue = false; }
~SettingsBase() {}
inline void setMultiValue(const QString &key, const QString &value)
{
QStringList values = mSettings.values(key);
if (!values.contains(value))
mSettings.insertMulti(key, value);
}
inline QString value(const QString &key, const QString &defaultValue = QString())
{
return mSettings.value(key).isEmpty() ? defaultValue : mSettings.value(key);
}
inline void setMultiValueEnabled(bool enable)
{
mMultiValue = enable;
}
inline void setValue(const QString &key, const QString &value)
{
QStringList values = mSettings.values(key);
if (!values.contains(value))
mSettings.insert(key, value);
}
inline void remove(const QString &key)
{
mSettings.remove(key);
}
inline void setMultiValue(const QString &key, const QString &value)
{
QStringList values = mSettings.values(key);
if (!values.contains(value))
mSettings.insertMulti(key, value);
}
Map getSettings() {return mSettings;}
inline void setMultiValueEnabled(bool enable)
{
mMultiValue = enable;
}
bool readFile(QTextStream &stream)
{
mCache.clear();
inline void remove(const QString &key)
{
mSettings.remove(key);
}
QString sectionPrefix;
Map getSettings() {return mSettings;}
QRegExp sectionRe("^\\[([^]]+)\\]");
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
bool readFile(QTextStream &stream)
{
mCache.clear();
while (!stream.atEnd()) {
QString line = stream.readLine();
QString sectionPrefix;
if (line.isEmpty() || line.startsWith("#"))
continue;
QRegExp sectionRe("^\\[([^]]+)\\]");
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
if (sectionRe.exactMatch(line)) {
sectionPrefix = sectionRe.cap(1);
sectionPrefix.append("/");
continue;
}
while (!stream.atEnd()) {
QString line = stream.readLine();
if (keyRe.indexIn(line) != -1) {
if (line.isEmpty() || line.startsWith("#"))
continue;
QString key = keyRe.cap(1).trimmed();
QString value = keyRe.cap(2).trimmed();
if (sectionRe.exactMatch(line)) {
sectionPrefix = sectionRe.cap(1);
sectionPrefix.append("/");
continue;
}
if (!sectionPrefix.isEmpty())
key.prepend(sectionPrefix);
if (keyRe.indexIn(line) != -1) {
mSettings.remove(key);
QString key = keyRe.cap(1).trimmed();
QString value = keyRe.cap(2).trimmed();
QStringList values = mCache.values(key);
if (!sectionPrefix.isEmpty())
key.prepend(sectionPrefix);
if (!values.contains(value)) {
if (mMultiValue) {
mCache.insertMulti(key, value);
} else {
mCache.insert(key, value);
mSettings.remove(key);
QStringList values = mCache.values(key);
if (!values.contains(value)) {
if (mMultiValue) {
mCache.insertMulti(key, value);
} else {
mCache.insert(key, value);
}
}
}
}
}
if (mSettings.isEmpty()) {
mSettings = mCache; // This is the first time we read a file
if (mSettings.isEmpty()) {
mSettings = mCache; // This is the first time we read a file
return true;
}
// Merge the changed keys with those which didn't
mSettings.unite(mCache);
return true;
}
// Merge the changed keys with those which didn't
mSettings.unite(mCache);
return true;
}
private:
Map mSettings;
Map mCache;
bool mMultiValue;
};
private:
Map mSettings;
Map mCache;
bool mMultiValue;
};
}
#endif // SETTINGSBASE_HPP
+1 -1
View File
@@ -1,6 +1,6 @@
#include "textslotmsgbox.hpp"
void TextSlotMsgBox::setTextSlot(const QString& string)
void Launcher::TextSlotMsgBox::setTextSlot(const QString& string)
{
setText(string);
}
+8 -6
View File
@@ -3,11 +3,13 @@
#include <QMessageBox>
class TextSlotMsgBox : public QMessageBox
namespace Launcher
{
Q_OBJECT
public slots:
void setTextSlot(const QString& string);
};
class TextSlotMsgBox : public QMessageBox
{
Q_OBJECT
public slots:
void setTextSlot(const QString& string);
};
}
#endif
+125 -91
View File
@@ -1,6 +1,6 @@
#include "unshieldthread.hpp"
#include <fstream>
#include <boost/filesystem/fstream.hpp>
#include <components/misc/stringops.hpp>
namespace bfs = boost::filesystem;
@@ -49,7 +49,7 @@ namespace
std::string read_to_string(const bfs::path& path)
{
std::ifstream strstream(path.c_str(), std::ios::in | std::ios::binary);
bfs::ifstream strstream(path, std::ios::in | std::ios::binary);
std::string str;
strstream.seekg(0, std::ios::end);
@@ -77,6 +77,8 @@ namespace
ini.insert(loc, setting + "=" + val + "\r\n");
}
#define FIX(setting) add_setting(category, setting, get_setting(category, setting, inx), ini)
void bloodmoon_fix_ini(std::string& ini, const bfs::path inxPath)
{
std::string inx = read_to_string(inxPath);
@@ -88,95 +90,94 @@ namespace
ini.erase(start, end-start);
std::string category;
std::string setting;
category = "General";
{
setting = "Werewolf FOV"; add_setting(category, setting, get_setting(category, setting, inx), ini);
FIX("Werewolf FOV");
}
category = "Moons";
{
setting = "Script Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
FIX("Script Color");
}
category = "Weather";
{
setting = "Snow Ripples"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Ripple Radius"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Ripples Per Flake"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Ripple Scale"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Ripple Speed"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Gravity Scale"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow High Kill"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Low Kill"; add_setting(category, setting, get_setting(category, setting, inx), ini);
FIX("Snow Ripples");
FIX("Snow Ripple Radius");
FIX("Snow Ripples Per Flake");
FIX("Snow Ripple Scale");
FIX("Snow Ripple Speed");
FIX("Snow Gravity Scale");
FIX("Snow High Kill");
FIX("Snow Low Kill");
}
category = "Weather Blight";
{
setting = "Ambient Loop Sound ID"; add_setting(category, setting, get_setting(category, setting, inx), ini);
FIX("Ambient Loop Sound ID");
}
category = "Weather Snow";
{
setting = "Sky Sunrise Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sky Day Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sky Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sky Night Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Fog Sunrise Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Fog Day Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Fog Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Fog Night Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Sunrise Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Day Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Night Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Sunrise Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Day Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Night Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Disc Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Transition Delta"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Land Fog Day Depth"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Land Fog Night Depth"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Clouds Maximum Percent"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Wind Speed"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Cloud Speed"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Glare View"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Cloud Texture"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Loop Sound ID"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Threshold"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Diameter"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Height Min"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Height Max"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Snow Entrance Speed"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Max Snowflakes"; add_setting(category, setting, get_setting(category, setting, inx), ini);
FIX("Sky Sunrise Color");
FIX("Sky Day Color");
FIX("Sky Sunset Color");
FIX("Sky Night Color");
FIX("Fog Sunrise Color");
FIX("Fog Day Color");
FIX("Fog Sunset Color");
FIX("Fog Night Color");
FIX("Ambient Sunrise Color");
FIX("Ambient Day Color");
FIX("Ambient Sunset Color");
FIX("Ambient Night Color");
FIX("Sun Sunrise Color");
FIX("Sun Day Color");
FIX("Sun Sunset Color");
FIX("Sun Night Color");
FIX("Sun Disc Sunset Color");
FIX("Transition Delta");
FIX("Land Fog Day Depth");
FIX("Land Fog Night Depth");
FIX("Clouds Maximum Percent");
FIX("Wind Speed");
FIX("Cloud Speed");
FIX("Glare View");
FIX("Cloud Texture");
FIX("Ambient Loop Sound ID");
FIX("Snow Threshold");
FIX("Snow Diameter");
FIX("Snow Height Min");
FIX("Snow Height Max");
FIX("Snow Entrance Speed");
FIX("Max Snowflakes");
}
category = "Weather Blizzard";
{
setting = "Sky Sunrise Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sky Day Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sky Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sky Night Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Fog Sunrise Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Fog Day Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Fog Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Fog Night Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Sunrise Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Day Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Night Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Sunrise Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Day Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Night Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Sun Disc Sunset Color"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Transition Delta"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Land Fog Day Depth"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Land Fog Night Depth"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Clouds Maximum Percent"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Wind Speed"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Cloud Speed"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Glare View"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Cloud Texture"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Ambient Loop Sound ID"; add_setting(category, setting, get_setting(category, setting, inx), ini);
setting = "Storm Threshold"; add_setting(category, setting, get_setting(category, setting, inx), ini);
FIX("Sky Sunrise Color");
FIX("Sky Day Color");
FIX("Sky Sunset Color");
FIX("Sky Night Color");
FIX("Fog Sunrise Color");
FIX("Fog Day Color");
FIX("Fog Sunset Color");
FIX("Fog Night Color");
FIX("Ambient Sunrise Color");
FIX("Ambient Day Color");
FIX("Ambient Sunset Color");
FIX("Ambient Night Color");
FIX("Sun Sunrise Color");
FIX("Sun Day Color");
FIX("Sun Sunset Color");
FIX("Sun Night Color");
FIX("Sun Disc Sunset Color");
FIX("Transition Delta");
FIX("Land Fog Day Depth");
FIX("Land Fog Night Depth");
FIX("Clouds Maximum Percent");
FIX("Wind Speed");
FIX("Cloud Speed");
FIX("Glare View");
FIX("Cloud Texture");
FIX("Ambient Loop Sound ID");
FIX("Storm Threshold");
}
}
@@ -200,7 +201,7 @@ namespace
add_setting("Archives", "Archive 1", "Bloodmoon.bsa", ini);
}
std::ofstream inistream(ini_path.c_str());
bfs::ofstream inistream((ini_path));
inistream << ini;
inistream.close();
}
@@ -216,7 +217,12 @@ namespace
else
{
if(copy)
bfs::copy_file(dir->path(), to / dir->path().filename());
{
bfs::path dest = to / dir->path().filename();
if(bfs::exists(dest))
bfs::remove_all(dest);
bfs::copy_file(dir->path(), dest);
}
else
bfs::rename(dir->path(), to / dir->path().filename());
}
@@ -229,7 +235,7 @@ namespace
{
for ( bfs::recursive_directory_iterator end, dir(in); dir != end; ++dir )
{
if(Misc::StringUtils::lowerCase(dir->path().filename().string()) == filename)
if(Misc::StringUtils::ciEqual(dir->path().filename().string(), filename))
return dir->path();
}
}
@@ -237,7 +243,7 @@ namespace
{
for ( bfs::directory_iterator end, dir(in); dir != end; ++dir )
{
if(Misc::StringUtils::lowerCase(dir->path().filename().string()) == filename)
if(Misc::StringUtils::ciEqual(dir->path().filename().string(), filename))
return dir->path();
}
}
@@ -249,7 +255,7 @@ namespace
{
for(bfs::directory_iterator end, dir(in); dir != end; ++dir)
{
if(Misc::StringUtils::lowerCase(dir->path().filename().string()) == filename)
if(Misc::StringUtils::ciEqual(dir->path().filename().string(), filename))
return true;
}
@@ -263,32 +269,53 @@ namespace
strptime(time, "%d %B %Y", &tms);
return mktime(&tms);
}
// Some cds have cab files which have the Data Files subfolders outside the Data Files folder
void install_dfiles_outside(const bfs::path& from, const bfs::path& dFiles)
{
bfs::path fonts = findFile(from, "fonts", false);
if(fonts.string() != "")
installToPath(fonts, dFiles / "Fonts");
bfs::path music = findFile(from, "music", false);
if(music.string() != "")
installToPath(music, dFiles / "Music");
bfs::path sound = findFile(from, "sound", false);
if(sound.string() != "")
installToPath(sound, dFiles / "Sound");
bfs::path splash = findFile(from, "splash", false);
if(splash.string() != "")
installToPath(splash, dFiles / "Splash");
}
}
bool UnshieldThread::SetMorrowindPath(const std::string& path)
bool Launcher::UnshieldThread::SetMorrowindPath(const std::string& path)
{
mMorrowindPath = path;
return true;
}
bool UnshieldThread::SetTribunalPath(const std::string& path)
bool Launcher::UnshieldThread::SetTribunalPath(const std::string& path)
{
mTribunalPath = path;
return true;
}
bool UnshieldThread::SetBloodmoonPath(const std::string& path)
bool Launcher::UnshieldThread::SetBloodmoonPath(const std::string& path)
{
mBloodmoonPath = path;
return true;
}
void UnshieldThread::SetOutputPath(const std::string& path)
void Launcher::UnshieldThread::SetOutputPath(const std::string& path)
{
mOutputPath = path;
}
bool UnshieldThread::extract_file(Unshield* unshield, bfs::path output_dir, const char* prefix, int index)
bool Launcher::UnshieldThread::extract_file(Unshield* unshield, bfs::path output_dir, const char* prefix, int index)
{
bool success;
bfs::path dirname;
@@ -322,7 +349,7 @@ bool UnshieldThread::extract_file(Unshield* unshield, bfs::path output_dir, cons
return success;
}
void UnshieldThread::extract_cab(const bfs::path& cab, const bfs::path& output_dir, bool extract_ini)
void Launcher::UnshieldThread::extract_cab(const bfs::path& cab, const bfs::path& output_dir, bool extract_ini)
{
Unshield * unshield;
unshield = unshield_open(cab.c_str());
@@ -342,7 +369,7 @@ void UnshieldThread::extract_cab(const bfs::path& cab, const bfs::path& output_d
}
bool UnshieldThread::extract()
bool Launcher::UnshieldThread::extract()
{
bfs::path outputDataFilesDir = mOutputPath;
outputDataFilesDir /= "Data Files";
@@ -360,6 +387,8 @@ bool UnshieldThread::extract()
installToPath(dFilesDir, outputDataFilesDir);
install_dfiles_outside(mwExtractPath, outputDataFilesDir);
// Videos are often kept uncompressed on the cd
bfs::path videosPath = findFile(mMorrowindPath.parent_path(), "video", false);
if(videosPath.string() != "")
@@ -394,6 +423,8 @@ bool UnshieldThread::extract()
installToPath(dFilesDir, outputDataFilesDir);
install_dfiles_outside(tbExtractPath, outputDataFilesDir);
// Mt GOTY CD has Sounds in a seperate folder from the rest of the data files
bfs::path soundsPath = findFile(tbExtractPath, "sounds", false);
if(soundsPath.string() != "")
@@ -421,6 +452,8 @@ bool UnshieldThread::extract()
bfs::path dFilesDir = findFile(bmExtractPath, "bloodmoon.esm").parent_path();
installToPath(dFilesDir, outputDataFilesDir);
install_dfiles_outside(bmExtractPath, outputDataFilesDir);
// My GOTY CD contains a folder within cab files called Tribunal patch,
// which contains Tribunal.esm
@@ -442,7 +475,7 @@ bool UnshieldThread::extract()
return true;
}
void UnshieldThread::Done()
void Launcher::UnshieldThread::Done()
{
// Get rid of unnecessary files
bfs::remove_all(mOutputPath / "extract-temp");
@@ -458,29 +491,30 @@ void UnshieldThread::Done()
bfs::last_write_time(findFile(mOutputPath, "bloodmoon.esm"), getTime("3 June 2003"));
}
std::string UnshieldThread::GetMWEsmPath()
std::string Launcher::UnshieldThread::GetMWEsmPath()
{
return findFile(mOutputPath / "Data Files", "morrowind.esm").string();
}
bool UnshieldThread::TribunalDone()
bool Launcher::UnshieldThread::TribunalDone()
{
return mTribunalDone;
}
bool UnshieldThread::BloodmoonDone()
bool Launcher::UnshieldThread::BloodmoonDone()
{
return mBloodmoonDone;
}
void UnshieldThread::run()
void Launcher::UnshieldThread::run()
{
extract();
emit close();
}
UnshieldThread::UnshieldThread()
Launcher::UnshieldThread::UnshieldThread()
{
unshield_set_log_level(0);
mMorrowindDone = false;
mTribunalDone = false;
mBloodmoonDone = false;
+34 -33
View File
@@ -7,51 +7,52 @@
#include <libunshield.h>
class UnshieldThread : public QThread
namespace Launcher
{
Q_OBJECT
class UnshieldThread : public QThread
{
Q_OBJECT
public:
bool SetMorrowindPath(const std::string& path);
bool SetTribunalPath(const std::string& path);
bool SetBloodmoonPath(const std::string& path);
public:
bool SetMorrowindPath(const std::string& path);
bool SetTribunalPath(const std::string& path);
bool SetBloodmoonPath(const std::string& path);
void SetOutputPath(const std::string& path);
bool extract();
void SetOutputPath(const std::string& path);
bool TribunalDone();
bool BloodmoonDone();
bool extract();
void Done();
bool TribunalDone();
bool BloodmoonDone();
std::string GetMWEsmPath();
void Done();
UnshieldThread();
std::string GetMWEsmPath();
private:
UnshieldThread();
void extract_cab(const boost::filesystem::path& cab, const boost::filesystem::path& output_dir, bool extract_ini = false);
bool extract_file(Unshield* unshield, boost::filesystem::path output_dir, const char* prefix, int index);
boost::filesystem::path mMorrowindPath;
boost::filesystem::path mTribunalPath;
boost::filesystem::path mBloodmoonPath;
private:
bool mMorrowindDone;
bool mTribunalDone;
bool mBloodmoonDone;
void extract_cab(const boost::filesystem::path& cab, const boost::filesystem::path& output_dir, bool extract_ini = false);
bool extract_file(Unshield* unshield, boost::filesystem::path output_dir, const char* prefix, int index);
boost::filesystem::path mOutputPath;
boost::filesystem::path mMorrowindPath;
boost::filesystem::path mTribunalPath;
boost::filesystem::path mBloodmoonPath;
bool mMorrowindDone;
bool mTribunalDone;
bool mBloodmoonDone;
boost::filesystem::path mOutputPath;
protected:
virtual void run();
signals:
void signalGUI(QString);
void close();
};
protected:
virtual void run();
signals:
void signalGUI(QString);
void close();
};
}
#endif
+64 -75
View File
@@ -54,72 +54,61 @@
Emulates the QMessageBox API with
static conveniences. The message label can open external URLs.
*/
class CheckableMessageBoxPrivate
{
public:
CheckableMessageBoxPrivate(QDialog *q)
Launcher::CheckableMessageBoxPrivate::CheckableMessageBoxPrivate(QDialog *q)
: clickedButton(0)
{
QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
{
QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
pixmapLabel = new QLabel(q);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(pixmapLabel->sizePolicy().hasHeightForWidth());
pixmapLabel->setSizePolicy(sizePolicy);
pixmapLabel->setVisible(false);
pixmapLabel = new QLabel(q);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(pixmapLabel->sizePolicy().hasHeightForWidth());
pixmapLabel->setSizePolicy(sizePolicy);
pixmapLabel->setVisible(false);
QSpacerItem *pixmapSpacer =
new QSpacerItem(0, 5, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
QSpacerItem *pixmapSpacer =
new QSpacerItem(0, 5, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
messageLabel = new QLabel(q);
messageLabel->setMinimumSize(QSize(300, 0));
messageLabel->setWordWrap(true);
messageLabel->setOpenExternalLinks(true);
messageLabel->setTextInteractionFlags(Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse);
messageLabel = new QLabel(q);
messageLabel->setMinimumSize(QSize(300, 0));
messageLabel->setWordWrap(true);
messageLabel->setOpenExternalLinks(true);
messageLabel->setTextInteractionFlags(Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse);
QSpacerItem *checkBoxRightSpacer =
new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum);
QSpacerItem *buttonSpacer =
new QSpacerItem(0, 1, QSizePolicy::Minimum, QSizePolicy::Minimum);
QSpacerItem *checkBoxRightSpacer =
new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum);
QSpacerItem *buttonSpacer =
new QSpacerItem(0, 1, QSizePolicy::Minimum, QSizePolicy::Minimum);
checkBox = new QCheckBox(q);
checkBox->setText(CheckableMessageBox::tr("Do not ask again"));
checkBox = new QCheckBox(q);
checkBox->setText(Launcher::CheckableMessageBox::tr("Do not ask again"));
buttonBox = new QDialogButtonBox(q);
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
buttonBox = new QDialogButtonBox(q);
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
QVBoxLayout *verticalLayout = new QVBoxLayout();
verticalLayout->addWidget(pixmapLabel);
verticalLayout->addItem(pixmapSpacer);
QVBoxLayout *verticalLayout = new QVBoxLayout();
verticalLayout->addWidget(pixmapLabel);
verticalLayout->addItem(pixmapSpacer);
QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
horizontalLayout_2->addLayout(verticalLayout);
horizontalLayout_2->addWidget(messageLabel);
QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
horizontalLayout_2->addLayout(verticalLayout);
horizontalLayout_2->addWidget(messageLabel);
QHBoxLayout *horizontalLayout = new QHBoxLayout();
horizontalLayout->addWidget(checkBox);
horizontalLayout->addItem(checkBoxRightSpacer);
QHBoxLayout *horizontalLayout = new QHBoxLayout();
horizontalLayout->addWidget(checkBox);
horizontalLayout->addItem(checkBoxRightSpacer);
QVBoxLayout *verticalLayout_2 = new QVBoxLayout(q);
verticalLayout_2->addLayout(horizontalLayout_2);
verticalLayout_2->addLayout(horizontalLayout);
verticalLayout_2->addItem(buttonSpacer);
verticalLayout_2->addWidget(buttonBox);
}
QVBoxLayout *verticalLayout_2 = new QVBoxLayout(q);
verticalLayout_2->addLayout(horizontalLayout_2);
verticalLayout_2->addLayout(horizontalLayout);
verticalLayout_2->addItem(buttonSpacer);
verticalLayout_2->addWidget(buttonBox);
}
QLabel *pixmapLabel;
QLabel *messageLabel;
QCheckBox *checkBox;
QDialogButtonBox *buttonBox;
QAbstractButton *clickedButton;
};
CheckableMessageBox::CheckableMessageBox(QWidget *parent) :
Launcher::CheckableMessageBox::CheckableMessageBox(QWidget *parent) :
QDialog(parent),
d(new CheckableMessageBoxPrivate(this))
d(new Launcher::CheckableMessageBoxPrivate(this))
{
setModal(true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
@@ -129,102 +118,102 @@ CheckableMessageBox::CheckableMessageBox(QWidget *parent) :
SLOT(slotClicked(QAbstractButton*)));
}
CheckableMessageBox::~CheckableMessageBox()
Launcher::CheckableMessageBox::~CheckableMessageBox()
{
delete d;
}
void CheckableMessageBox::slotClicked(QAbstractButton *b)
void Launcher::CheckableMessageBox::slotClicked(QAbstractButton *b)
{
d->clickedButton = b;
}
QAbstractButton *CheckableMessageBox::clickedButton() const
QAbstractButton *Launcher::CheckableMessageBox::clickedButton() const
{
return d->clickedButton;
}
QDialogButtonBox::StandardButton CheckableMessageBox::clickedStandardButton() const
QDialogButtonBox::StandardButton Launcher::CheckableMessageBox::clickedStandardButton() const
{
if (d->clickedButton)
return d->buttonBox->standardButton(d->clickedButton);
return QDialogButtonBox::NoButton;
}
QString CheckableMessageBox::text() const
QString Launcher::CheckableMessageBox::text() const
{
return d->messageLabel->text();
}
void CheckableMessageBox::setText(const QString &t)
void Launcher::CheckableMessageBox::setText(const QString &t)
{
d->messageLabel->setText(t);
}
QPixmap CheckableMessageBox::iconPixmap() const
QPixmap Launcher::CheckableMessageBox::iconPixmap() const
{
if (const QPixmap *p = d->pixmapLabel->pixmap())
return QPixmap(*p);
return QPixmap();
}
void CheckableMessageBox::setIconPixmap(const QPixmap &p)
void Launcher::CheckableMessageBox::setIconPixmap(const QPixmap &p)
{
d->pixmapLabel->setPixmap(p);
d->pixmapLabel->setVisible(!p.isNull());
}
bool CheckableMessageBox::isChecked() const
bool Launcher::CheckableMessageBox::isChecked() const
{
return d->checkBox->isChecked();
}
void CheckableMessageBox::setChecked(bool s)
void Launcher::CheckableMessageBox::setChecked(bool s)
{
d->checkBox->setChecked(s);
}
QString CheckableMessageBox::checkBoxText() const
QString Launcher::CheckableMessageBox::checkBoxText() const
{
return d->checkBox->text();
}
void CheckableMessageBox::setCheckBoxText(const QString &t)
void Launcher::CheckableMessageBox::setCheckBoxText(const QString &t)
{
d->checkBox->setText(t);
}
bool CheckableMessageBox::isCheckBoxVisible() const
bool Launcher::CheckableMessageBox::isCheckBoxVisible() const
{
return d->checkBox->isVisible();
}
void CheckableMessageBox::setCheckBoxVisible(bool v)
void Launcher::CheckableMessageBox::setCheckBoxVisible(bool v)
{
d->checkBox->setVisible(v);
}
QDialogButtonBox::StandardButtons CheckableMessageBox::standardButtons() const
QDialogButtonBox::StandardButtons Launcher::CheckableMessageBox::standardButtons() const
{
return d->buttonBox->standardButtons();
}
void CheckableMessageBox::setStandardButtons(QDialogButtonBox::StandardButtons s)
void Launcher::CheckableMessageBox::setStandardButtons(QDialogButtonBox::StandardButtons s)
{
d->buttonBox->setStandardButtons(s);
}
QPushButton *CheckableMessageBox::button(QDialogButtonBox::StandardButton b) const
QPushButton *Launcher::CheckableMessageBox::button(QDialogButtonBox::StandardButton b) const
{
return d->buttonBox->button(b);
}
QPushButton *CheckableMessageBox::addButton(const QString &text, QDialogButtonBox::ButtonRole role)
QPushButton *Launcher::CheckableMessageBox::addButton(const QString &text, QDialogButtonBox::ButtonRole role)
{
return d->buttonBox->addButton(text, role);
}
QDialogButtonBox::StandardButton CheckableMessageBox::defaultButton() const
QDialogButtonBox::StandardButton Launcher::CheckableMessageBox::defaultButton() const
{
foreach (QAbstractButton *b, d->buttonBox->buttons())
if (QPushButton *pb = qobject_cast<QPushButton *>(b))
@@ -233,7 +222,7 @@ QDialogButtonBox::StandardButton CheckableMessageBox::defaultButton() const
return QDialogButtonBox::NoButton;
}
void CheckableMessageBox::setDefaultButton(QDialogButtonBox::StandardButton s)
void Launcher::CheckableMessageBox::setDefaultButton(QDialogButtonBox::StandardButton s)
{
if (QPushButton *b = d->buttonBox->button(s)) {
b->setDefault(true);
@@ -242,7 +231,7 @@ void CheckableMessageBox::setDefaultButton(QDialogButtonBox::StandardButton s)
}
QDialogButtonBox::StandardButton
CheckableMessageBox::question(QWidget *parent,
Launcher::CheckableMessageBox::question(QWidget *parent,
const QString &title,
const QString &question,
const QString &checkBoxText,
@@ -263,7 +252,7 @@ CheckableMessageBox::question(QWidget *parent,
return mb.clickedStandardButton();
}
QMessageBox::StandardButton CheckableMessageBox::dialogButtonBoxToMessageBoxButton(QDialogButtonBox::StandardButton db)
QMessageBox::StandardButton Launcher::CheckableMessageBox::dialogButtonBoxToMessageBoxButton(QDialogButtonBox::StandardButton db)
{
return static_cast<QMessageBox::StandardButton>(int(db));
}
+63 -47
View File
@@ -34,67 +34,83 @@
#include <QMessageBox>
#include <QDialog>
class CheckableMessageBoxPrivate;
class QCheckBox;
class CheckableMessageBox : public QDialog
namespace Launcher
{
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText)
Q_PROPERTY(QPixmap iconPixmap READ iconPixmap WRITE setIconPixmap)
Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked)
Q_PROPERTY(QString checkBoxText READ checkBoxText WRITE setCheckBoxText)
Q_PROPERTY(QDialogButtonBox::StandardButtons buttons READ standardButtons WRITE setStandardButtons)
Q_PROPERTY(QDialogButtonBox::StandardButton defaultButton READ defaultButton WRITE setDefaultButton)
class CheckableMessageBoxPrivate
{
public:
public:
explicit CheckableMessageBox(QWidget *parent);
virtual ~CheckableMessageBox();
QLabel *pixmapLabel;
QLabel *messageLabel;
QCheckBox *checkBox;
QDialogButtonBox *buttonBox;
QAbstractButton *clickedButton;
static QDialogButtonBox::StandardButton
question(QWidget *parent,
const QString &title,
const QString &question,
const QString &checkBoxText,
bool *checkBoxSetting,
QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Yes|QDialogButtonBox::No,
QDialogButtonBox::StandardButton defaultButton = QDialogButtonBox::No);
public:
CheckableMessageBoxPrivate(QDialog *q);
};
QString text() const;
void setText(const QString &);
class CheckableMessageBox : public QDialog
{
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText)
Q_PROPERTY(QPixmap iconPixmap READ iconPixmap WRITE setIconPixmap)
Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked)
Q_PROPERTY(QString checkBoxText READ checkBoxText WRITE setCheckBoxText)
Q_PROPERTY(QDialogButtonBox::StandardButtons buttons READ standardButtons WRITE setStandardButtons)
Q_PROPERTY(QDialogButtonBox::StandardButton defaultButton READ defaultButton WRITE setDefaultButton)
bool isChecked() const;
void setChecked(bool s);
public:
explicit CheckableMessageBox(QWidget *parent);
virtual ~CheckableMessageBox();
QString checkBoxText() const;
void setCheckBoxText(const QString &);
static QDialogButtonBox::StandardButton
question(QWidget *parent,
const QString &title,
const QString &question,
const QString &checkBoxText,
bool *checkBoxSetting,
QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Yes|QDialogButtonBox::No,
QDialogButtonBox::StandardButton defaultButton = QDialogButtonBox::No);
bool isCheckBoxVisible() const;
void setCheckBoxVisible(bool);
QString text() const;
void setText(const QString &);
QDialogButtonBox::StandardButtons standardButtons() const;
void setStandardButtons(QDialogButtonBox::StandardButtons s);
QPushButton *button(QDialogButtonBox::StandardButton b) const;
QPushButton *addButton(const QString &text, QDialogButtonBox::ButtonRole role);
bool isChecked() const;
void setChecked(bool s);
QDialogButtonBox::StandardButton defaultButton() const;
void setDefaultButton(QDialogButtonBox::StandardButton s);
QString checkBoxText() const;
void setCheckBoxText(const QString &);
// See static QMessageBox::standardPixmap()
QPixmap iconPixmap() const;
void setIconPixmap (const QPixmap &p);
bool isCheckBoxVisible() const;
void setCheckBoxVisible(bool);
// Query the result
QAbstractButton *clickedButton() const;
QDialogButtonBox::StandardButton clickedStandardButton() const;
QDialogButtonBox::StandardButtons standardButtons() const;
void setStandardButtons(QDialogButtonBox::StandardButtons s);
QPushButton *button(QDialogButtonBox::StandardButton b) const;
QPushButton *addButton(const QString &text, QDialogButtonBox::ButtonRole role);
// Conversion convenience
static QMessageBox::StandardButton dialogButtonBoxToMessageBoxButton(QDialogButtonBox::StandardButton);
QDialogButtonBox::StandardButton defaultButton() const;
void setDefaultButton(QDialogButtonBox::StandardButton s);
private slots:
void slotClicked(QAbstractButton *b);
// See static QMessageBox::standardPixmap()
QPixmap iconPixmap() const;
void setIconPixmap (const QPixmap &p);
private:
CheckableMessageBoxPrivate *d;
};
// Query the result
QAbstractButton *clickedButton() const;
QDialogButtonBox::StandardButton clickedStandardButton() const;
// Conversion convenience
static QMessageBox::StandardButton dialogButtonBoxToMessageBoxButton(QDialogButtonBox::StandardButton);
private slots:
void slotClicked(QAbstractButton *b);
private:
CheckableMessageBoxPrivate *d;
};
}
#endif // CHECKABLEMESSAGEBOX_HPP
@@ -1,10 +1,12 @@
#include <QToolButton>
#include <QStyle>
#include "lineedit.hpp"
LineEdit::LineEdit(QWidget *parent)
: QLineEdit(parent)
{
setupClearButton();
}
void LineEdit::setupClearButton()
{
mClearButton = new QToolButton(this);
QPixmap pixmap(":images/clear.png");
@@ -15,13 +17,6 @@ LineEdit::LineEdit(QWidget *parent)
mClearButton->hide();
connect(mClearButton, SIGNAL(clicked()), this, SLOT(clear()));
connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(updateClearButton(const QString&)));
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
setObjectName(QString("LineEdit"));
setStyleSheet(QString("LineEdit { padding-right: %1px; } ").arg(mClearButton->sizeHint().width() + frameWidth + 1));
QSize msz = minimumSizeHint();
setMinimumSize(qMax(msz.width(), mClearButton->sizeHint().height() + frameWidth * 2 + 2),
qMax(msz.height(), mClearButton->sizeHint().height() + frameWidth * 2 + 2));
}
void LineEdit::resizeEvent(QResizeEvent *)
@@ -11,6 +11,9 @@
#define LINEEDIT_H
#include <QLineEdit>
#include <QStyle>
#include <QStylePainter>
#include <QToolButton>
class QToolButton;
@@ -18,6 +21,8 @@ class LineEdit : public QLineEdit
{
Q_OBJECT
QString mPlaceholderText;
public:
LineEdit(QWidget *parent = 0);
@@ -27,8 +32,10 @@ protected:
private slots:
void updateClearButton(const QString &text);
private:
protected:
QToolButton *mClearButton;
void setupClearButton();
};
#endif // LIENEDIT_H
@@ -5,18 +5,12 @@
#include <QKeyEvent>
#include "profilescombobox.hpp"
#include "comboboxlineedit.hpp"
ProfilesComboBox::ProfilesComboBox(QWidget *parent) :
QComboBox(parent)
ContentSelectorView::ComboBox(parent)
{
mValidator = new QRegExpValidator(QRegExp("^[a-zA-Z0-9_]*$"), this); // Alpha-numeric + underscore
setEditEnabled(true);
setValidator(mValidator);
setCompleter(0);
connect(this, SIGNAL(currentIndexChanged(int)), this,
SLOT(slotIndexChanged(int)));
connect(this, SIGNAL(activated(int)), this,
SLOT(slotIndexChangedByUser(int)));
setInsertPolicy(QComboBox::NoInsert);
}
@@ -37,6 +31,7 @@ void ProfilesComboBox::setEditEnabled(bool editable)
setValidator(mValidator);
ComboBoxLineEdit *edit = new ComboBoxLineEdit(this);
setLineEdit(edit);
setCompleter(0);
@@ -45,6 +40,9 @@ void ProfilesComboBox::setEditEnabled(bool editable)
connect(lineEdit(), SIGNAL(textChanged(QString)), this,
SLOT(slotTextChanged(QString)));
connect (lineEdit(), SIGNAL(textChanged(QString)), this,
SIGNAL (signalProfileTextChanged (QString)));
}
void ProfilesComboBox::slotTextChanged(const QString &text)
@@ -82,11 +80,20 @@ void ProfilesComboBox::slotEditingFinished()
emit(profileRenamed(previous, current));
}
void ProfilesComboBox::slotIndexChanged(int index)
void ProfilesComboBox::slotIndexChangedByUser(int index)
{
if (index == -1)
return;
emit(profileChanged(mOldProfile, currentText()));
mOldProfile = itemText(index);
emit (signalProfileChanged(mOldProfile, currentText()));
mOldProfile = currentText();
}
ProfilesComboBox::ComboBoxLineEdit::ComboBoxLineEdit (QWidget *parent)
: LineEdit (parent)
{
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
setObjectName(QString("ComboBoxLineEdit"));
setStyleSheet(QString("ComboBoxLineEdit { background-color: transparent; padding-right: %1px; } ").arg(mClearButton->sizeHint().width() + frameWidth + 1));
}
+47
View File
@@ -0,0 +1,47 @@
#ifndef PROFILESCOMBOBOX_HPP
#define PROFILESCOMBOBOX_HPP
#include "components/contentselector/view/combobox.hpp"
#include "lineedit.hpp"
#include <QDebug>
class QString;
class ProfilesComboBox : public ContentSelectorView::ComboBox
{
Q_OBJECT
public:
class ComboBoxLineEdit : public LineEdit
{
public:
explicit ComboBoxLineEdit (QWidget *parent = 0);
};
public:
explicit ProfilesComboBox(QWidget *parent = 0);
void setEditEnabled(bool editable);
void setCurrentProfile(int index)
{
ComboBox::setCurrentIndex(index);
mOldProfile = currentText();
}
signals:
void signalProfileTextChanged(const QString &item);
void signalProfileChanged(const QString &previous, const QString &current);
void signalProfileChanged(int index);
void profileRenamed(const QString &oldName, const QString &newName);
private slots:
void slotEditingFinished();
void slotIndexChangedByUser(int index);
void slotTextChanged(const QString &text);
private:
QString mOldProfile;
};
#endif // PROFILESCOMBOBOX_HPP
+29 -13
View File
@@ -7,19 +7,18 @@
#include <QValidator>
#include <QLabel>
#include <components/fileorderlist/utils/lineedit.hpp>
TextInputDialog::TextInputDialog(const QString& title, const QString &text, QWidget *parent) :
Launcher::TextInputDialog::TextInputDialog(const QString& title, const QString &text, QWidget *parent) :
QDialog(parent)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
mButtonBox = new QDialogButtonBox(this);
mButtonBox->addButton(QDialogButtonBox::Ok);
mButtonBox->addButton(QDialogButtonBox::Cancel);
mButtonBox->button(QDialogButtonBox::Ok)->setEnabled (false);
// Line edit
QValidator *validator = new QRegExpValidator(QRegExp("^[a-zA-Z0-9_]*$"), this); // Alpha-numeric + underscore
mLineEdit = new LineEdit(this);
mLineEdit = new DialogLineEdit(this);
mLineEdit->setValidator(validator);
mLineEdit->setCompleter(0);
@@ -38,34 +37,51 @@ TextInputDialog::TextInputDialog(const QString& title, const QString &text, QWid
Q_UNUSED(title);
#endif
setOkButtonEnabled(false);
setModal(true);
connect(mButtonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(mButtonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(mLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotUpdateOkButton(QString)));
}
int TextInputDialog::exec()
int Launcher::TextInputDialog::exec()
{
mLineEdit->clear();
mLineEdit->setFocus();
return QDialog::exec();
}
void TextInputDialog::setOkButtonEnabled(bool enabled)
QString Launcher::TextInputDialog::getText() const
{
QPushButton *okButton = mButtonBox->button(QDialogButtonBox::Ok);
okButton->setEnabled(enabled);
return mLineEdit->text();
}
QPalette *palette = new QPalette();
palette->setColor(QPalette::Text,Qt::red);
void Launcher::TextInputDialog::slotUpdateOkButton(QString text)
{
bool enabled = !(text.isEmpty());
mButtonBox->button(QDialogButtonBox::Ok)->setEnabled(enabled);
if (enabled) {
if (enabled)
mLineEdit->setPalette(QApplication::palette());
} else {
else
{
// Existing profile name, make the text red
QPalette *palette = new QPalette();
palette->setColor(QPalette::Text,Qt::red);
mLineEdit->setPalette(*palette);
}
}
Launcher::TextInputDialog::DialogLineEdit::DialogLineEdit (QWidget *parent) :
LineEdit (parent)
{
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
setObjectName(QString("LineEdit"));
setStyleSheet(QString("LineEdit { padding-right: %1px; } ").arg(mClearButton->sizeHint().width() + frameWidth + 1));
QSize msz = minimumSizeHint();
setMinimumSize(qMax(msz.width(), mClearButton->sizeHint().height() + frameWidth * 2 + 2),
qMax(msz.height(), mClearButton->sizeHint().height() + frameWidth * 2 + 2));
}
+26 -14
View File
@@ -2,27 +2,39 @@
#define TEXTINPUTDIALOG_HPP
#include <QDialog>
//#include "lineedit.hpp"
#include "lineedit.hpp"
class QDialogButtonBox;
class LineEdit;
class TextInputDialog : public QDialog
namespace Launcher
{
Q_OBJECT
public:
explicit TextInputDialog(const QString& title, const QString &text, QWidget *parent = 0);
inline LineEdit *lineEdit() { return mLineEdit; }
void setOkButtonEnabled(bool enabled);
class TextInputDialog : public QDialog
{
Q_OBJECT
LineEdit *mLineEdit;
class DialogLineEdit : public LineEdit
{
public:
explicit DialogLineEdit (QWidget *parent = 0);
};
int exec();
DialogLineEdit *mLineEdit;
QDialogButtonBox *mButtonBox;
private:
QDialogButtonBox *mButtonBox;
public:
};
explicit TextInputDialog(const QString& title, const QString &text, QWidget *parent = 0);
~TextInputDialog () {}
QString getText() const;
int exec();
private slots:
void slotUpdateOkButton(QString text);
};
}
#endif // TEXTINPUTDIALOG_HPP
-5
View File
@@ -22,8 +22,3 @@ if (BUILD_WITH_CODE_COVERAGE)
add_definitions (--coverage)
target_link_libraries(mwiniimport gcov)
endif()
if(DPKG_PROGRAM)
INSTALL(TARGETS mwiniimport RUNTIME DESTINATION games COMPONENT mwiniimport)
endif()
+31 -28
View File
@@ -1,6 +1,5 @@
#include "importer.hpp"
#include <boost/iostreams/device/file.hpp>
#include <boost/iostreams/stream.hpp>
#include <iostream>
#include <string>
#include <map>
@@ -9,6 +8,10 @@
#include <sstream>
#include <components/misc/stringops.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp>
namespace bfs = boost::filesystem;
MwIniImporter::MwIniImporter()
: mVerbose(false)
@@ -16,7 +19,7 @@ MwIniImporter::MwIniImporter()
const char *map[][2] =
{
{ "fps", "General:Show FPS" },
{ "nosound", "General:Disable Audio" },
{ "no-sound", "General:Disable Audio" },
{ 0, 0 }
};
const char *fallback[] = {
@@ -623,6 +626,17 @@ MwIniImporter::MwIniImporter()
"Moons:Masser Fade Out Finish",
"Moons:Script Color",
// blood
"Blood:Model 0",
"Blood:Model 1",
"Blood:Model 2",
"Blood:Texture 0",
"Blood:Texture 1",
"Blood:Texture 2",
"Blood:Texture Name 0",
"Blood:Texture Name 1",
"Blood:Texture Name 2",
0
};
@@ -650,7 +664,7 @@ MwIniImporter::multistrmap MwIniImporter::loadIniFile(const std::string& filenam
std::string section("");
MwIniImporter::multistrmap map;
boost::iostreams::stream<boost::iostreams::file_source>file(filename.c_str());
bfs::ifstream file((bfs::path(filename)));
ToUTF8::Utf8Encoder encoder(mEncoding);
std::string line;
@@ -663,6 +677,10 @@ MwIniImporter::multistrmap MwIniImporter::loadIniFile(const std::string& filenam
line = line.substr(0, line.length()-1);
}
if(line.empty()) {
continue;
}
if(line[0] == '[') {
int pos = line.find(']');
if(pos < 2) {
@@ -679,10 +697,6 @@ MwIniImporter::multistrmap MwIniImporter::loadIniFile(const std::string& filenam
line = line.substr(0,comment_pos);
}
if(line.empty()) {
continue;
}
int pos = line.find("=");
if(pos < 1) {
continue;
@@ -709,7 +723,7 @@ MwIniImporter::multistrmap MwIniImporter::loadCfgFile(const std::string& filenam
std::cout << "load cfg file: " << filename << std::endl;
MwIniImporter::multistrmap map;
boost::iostreams::stream<boost::iostreams::file_source>file(filename.c_str());
bfs::ifstream file((bfs::path(filename)));
std::string line;
while (std::getline(file, line)) {
@@ -813,8 +827,7 @@ void MwIniImporter::importArchives(multistrmap &cfg, const multistrmap &ini) con
}
void MwIniImporter::importGameFiles(multistrmap &cfg, const multistrmap &ini) const {
std::vector<std::string> esmFiles;
std::vector<std::string> espFiles;
std::vector<std::string> contentFiles;
std::string baseGameFile("Game Files:GameFile");
std::string gameFile("");
@@ -832,33 +845,23 @@ void MwIniImporter::importGameFiles(multistrmap &cfg, const multistrmap &ini) co
std::string filetype(entry->substr(entry->length()-3));
Misc::StringUtils::toLower(filetype);
if(filetype.compare("esm") == 0) {
esmFiles.push_back(*entry);
}
else if(filetype.compare("esp") == 0) {
espFiles.push_back(*entry);
if(filetype.compare("esm") == 0 || filetype.compare("esp") == 0) {
contentFiles.push_back(*entry);
}
}
gameFile = "";
}
cfg.erase("master");
cfg.insert( std::make_pair<std::string, std::vector<std::string> > ("master", std::vector<std::string>() ) );
cfg.erase("content");
cfg.insert( std::make_pair("content", std::vector<std::string>() ) );
for(std::vector<std::string>::const_iterator it=esmFiles.begin(); it!=esmFiles.end(); ++it) {
cfg["master"].push_back(*it);
}
cfg.erase("plugin");
cfg.insert( std::make_pair<std::string, std::vector<std::string> > ("plugin", std::vector<std::string>() ) );
for(std::vector<std::string>::const_iterator it=espFiles.begin(); it!=espFiles.end(); ++it) {
cfg["plugin"].push_back(*it);
for(std::vector<std::string>::const_iterator it=contentFiles.begin(); it!=contentFiles.end(); ++it) {
cfg["content"].push_back(*it);
}
}
void MwIniImporter::writeToFile(boost::iostreams::stream<boost::iostreams::file_sink> &out, const multistrmap &cfg) {
void MwIniImporter::writeToFile(std::ostream &out, const multistrmap &cfg) {
for(multistrmap::const_iterator it=cfg.begin(); it != cfg.end(); ++it) {
for(std::vector<std::string>::const_iterator entry=it->second.begin(); entry != it->second.end(); ++entry) {
+2 -3
View File
@@ -1,12 +1,11 @@
#ifndef MWINIIMPORTER_IMPORTER
#define MWINIIMPORTER_IMPORTER 1
#include <boost/iostreams/device/file.hpp>
#include <boost/iostreams/stream.hpp>
#include <string>
#include <map>
#include <vector>
#include <exception>
#include <iosfwd>
#include <components/to_utf8/to_utf8.hpp>
@@ -24,7 +23,7 @@ class MwIniImporter {
void mergeFallback(multistrmap &cfg, const multistrmap &ini) const;
void importGameFiles(multistrmap &cfg, const multistrmap &ini) const;
void importArchives(multistrmap &cfg, const multistrmap &ini) const;
static void writeToFile(boost::iostreams::stream<boost::iostreams::file_sink> &out, const multistrmap &cfg);
static void writeToFile(std::ostream &out, const multistrmap &cfg);
private:
static void insertMultistrmap(multistrmap &cfg, const std::string& key, const std::string& value);
+47 -2
View File
@@ -1,14 +1,59 @@
#include "importer.hpp"
#include <iostream>
#include <string>
#include <iostream>
#include <boost/program_options.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp>
namespace bpo = boost::program_options;
namespace bfs = boost::filesystem;
#ifndef _WIN32
int main(int argc, char *argv[]) {
#else
// Include on Windows only
#include <boost/locale.hpp>
class utf8argv
{
public:
utf8argv(int argc, wchar_t *wargv[])
{
args.reserve(argc);
argv = new const char *[argc];
for (int i = 0; i < argc; ++i) {
args.push_back(boost::locale::conv::utf_to_utf<char>(wargv[i]));
argv[i] = args.back().c_str();
}
}
~utf8argv() { delete[] argv; }
char **get() const { return const_cast<char **>(argv); }
private:
const char **argv;
std::vector<std::string> args;
};
/* The only way to pass Unicode on Winodws with CLI is to use wide
characters interface which presents UTF-16 encoding. The rest of
OpenMW application stack assumes UTF-8 encoding, therefore this
conversion.
For boost::filesystem::path::imbue see components/files/windowspath.cpp
*/
int wmain(int argc, wchar_t *wargv[]) {
utf8argv converter(argc, wargv);
char **argv = converter.get();
boost::filesystem::path::imbue(boost::locale::generator().generate(""));
#endif
bpo::options_description desc("Syntax: mwiniimporter <options> inifile configfile\nAllowed options");
bpo::positional_options_description p_desc;
desc.add_options()
@@ -94,7 +139,7 @@ int main(int argc, char *argv[]) {
}
std::cout << "write to: " << outputFile << std::endl;
boost::iostreams::stream<boost::iostreams::file_sink> file(outputFile);
bfs::ofstream file((bfs::path(outputFile)));
importer.writeToFile(file, cfg);
return 0;
+90 -36
View File
@@ -5,11 +5,11 @@ opencs_units (. editor)
set (CMAKE_BUILD_TYPE DEBUG)
opencs_units (model/doc
document
document operation saving documentmanager loader
)
opencs_units_noqt (model/doc
documentmanager
stage savingstate savingstages blacklist
)
opencs_hdrs_noqt (model/doc
@@ -18,32 +18,33 @@ opencs_hdrs_noqt (model/doc
opencs_units (model/world
idtable idtableproxymodel regionmap
idtable idtableproxymodel regionmap data commanddispatcher idtablebase resourcetable
)
opencs_units_noqt (model/world
universalid data record commands columnbase scriptcontext cell refidcollection
refidadapter refiddata refidadapterimp ref collectionbase refcollection columns
universalid record commands columnbase scriptcontext cell refidcollection
refidadapter refiddata refidadapterimp ref collectionbase refcollection columns infocollection tablemimedata cellcoordinates cellselection resources resourcesmanager
)
opencs_hdrs_noqt (model/world
columnimp idcollection collection
columnimp idcollection collection info
)
opencs_units (model/tools
tools operation reportmodel
tools reportmodel
)
opencs_units_noqt (model/tools
stage verifier mandatoryid skillcheck classcheck factioncheck racecheck soundcheck regioncheck
birthsigncheck spellcheck
mandatoryid skillcheck classcheck factioncheck racecheck soundcheck regioncheck
birthsigncheck spellcheck referenceablecheck scriptcheck bodypartcheck
)
opencs_units (view/doc
viewmanager view operations operation subview startup filedialog
viewmanager view operations operation subview startup filedialog newgame
filewidget adjusterwidget loader
)
@@ -58,13 +59,31 @@ opencs_hdrs_noqt (view/doc
opencs_units (view/world
table tablesubview scriptsubview util regionmapsubview tablebottombox creator genericcreator
cellcreator referenceablecreator referencecreator
cellcreator referenceablecreator referencecreator scenesubview
infocreator scriptedit dialoguesubview previewsubview regionmap dragrecordtable
)
opencs_units_noqt (view/world
dialoguesubview subviews
enumdelegate vartypedelegate recordstatusdelegate refidtypedelegate datadisplaydelegate
scripthighlighter idvalidator
subviews enumdelegate vartypedelegate recordstatusdelegate idtypedelegate datadisplaydelegate
scripthighlighter idvalidator dialoguecreator
)
opencs_units (view/widget
scenetoolbar scenetool scenetoolmode pushbutton scenetooltoggle
)
opencs_units (view/render
scenewidget worldspacewidget pagedworldspacewidget unpagedworldspacewidget
previewwidget
)
opencs_units_noqt (view/render
navigation navigation1st navigationfree navigationorbit lighting lightingday lightingnight
lightingbright object cell
)
opencs_hdrs_noqt (view/render
elements
)
@@ -77,34 +96,30 @@ opencs_units_noqt (view/tools
)
opencs_units (view/settings
abstractblock
proxyblock
abstractwidget
usersettingsdialog
datadisplayformatpage
windowpage
settingwindow
dialog
page
view
booleanview
textview
listview
rangeview
resizeablestackedwidget
spinbox
)
opencs_units_noqt (view/settings
abstractpage
blankpage
groupblock
customblock
groupbox
itemblock
settingwidget
toggleblock
support
frame
)
opencs_units (model/settings
usersettings
settingcontainer
setting
connector
)
opencs_units_noqt (model/settings
opencs_hdrs_noqt (model/settings
support
settingsitem
)
opencs_units_noqt (model/filter
@@ -122,11 +137,13 @@ opencs_units (view/filter
set (OPENCS_US
)
set (OPENCS_RES ../../files/opencs/resources.qrc
../../files/launcher/launcher.qrc
set (OPENCS_RES ${CMAKE_SOURCE_DIR}/files/opencs/resources.qrc
${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc
)
set (OPENCS_UI ../../files/ui/datafilespage.ui
set (OPENCS_UI
${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
${CMAKE_SOURCE_DIR}/files/ui/filedialog.ui
)
source_group (opencs FILES ${OPENCS_SRC} ${OPENCS_HDR})
@@ -135,7 +152,14 @@ if(WIN32)
set(QT_USE_QTMAIN TRUE)
endif(WIN32)
find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork QtXml QtXmlPatterns REQUIRED)
set(BOOST_COMPONENTS system filesystem program_options thread wave)
if(WIN32)
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} locale)
endif(WIN32)
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED)
include(${QT_USE_FILE})
qt4_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI})
@@ -144,15 +168,45 @@ qt4_add_resources(OPENCS_RES_SRC ${OPENCS_RES})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(APPLE)
set (OPENCS_MAC_ICON ${CMAKE_SOURCE_DIR}/files/mac/opencs.icns)
else()
set (OPENCS_MAC_ICON "")
endif(APPLE)
add_executable(opencs
MACOSX_BUNDLE
${OPENCS_SRC}
${OPENCS_UI_HDR}
${OPENCS_MOC_SRC}
${OPENCS_RES_SRC}
${OPENCS_MAC_ICON}
)
if(APPLE)
set_target_properties(opencs PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${OpenMW_BINARY_DIR}"
OUTPUT_NAME "OpenCS"
MACOSX_BUNDLE_ICON_FILE "opencs.icns"
MACOSX_BUNDLE_BUNDLE_NAME "OpenCS"
MACOSX_BUNDLE_GUI_IDENTIFIER "org.openmw.opencs"
MACOSX_BUNDLE_SHORT_VERSION_STRING ${OPENMW_VERSION}
MACOSX_BUNDLE_BUNDLE_VERSION ${OPENMW_VERSION}
)
set_source_files_properties(${OPENCS_MAC_ICON} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
endif(APPLE)
target_link_libraries(opencs
${OGRE_LIBRARIES}
${OGRE_STATIC_PLUGINS}
${SHINY_LIBRARIES}
${Boost_LIBRARIES}
${QT_LIBRARIES}
components
)
if(APPLE)
INSTALL(TARGETS opencs BUNDLE DESTINATION OpenMW COMPONENT BUNDLE)
endif()
+223 -59
View File
@@ -4,154 +4,318 @@
#include <QApplication>
#include <QLocalServer>
#include <QLocalSocket>
#include <QMessageBox>
#include <OgreRoot.h>
#include <OgreRenderWindow.h>
#include <extern/shiny/Main/Factory.hpp>
#include <extern/shiny/Platforms/Ogre/OgrePlatform.hpp>
#include <components/ogreinit/ogreinit.hpp>
#include <components/bsa/resources.hpp>
#include "model/doc/document.hpp"
#include "model/world/data.hpp"
CS::Editor::Editor() : mViewManager (mDocumentManager)
CS::Editor::Editor (OgreInit::OgreInit& ogreInit)
: mUserSettings (mCfgMgr), mDocumentManager (mCfgMgr), mViewManager (mDocumentManager),
mIpcServerName ("org.openmw.OpenCS")
{
mIpcServerName = "org.openmw.OpenCS";
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig();
connect (&mViewManager, SIGNAL (newDocumentRequest ()), this, SLOT (createDocument ()));
setupDataFiles (config.first);
CSMSettings::UserSettings::instance().loadSettings ("opencs.ini");
mSettings.setModel (CSMSettings::UserSettings::instance());
ogreInit.init ((mCfgMgr.getUserConfigPath() / "opencsOgre.log").string());
Bsa::registerResources (Files::Collections (config.first, !mFsStrict), config.second, true,
mFsStrict);
mDocumentManager.listResources();
mNewGame.setLocalData (mLocal);
mFileDialog.setLocalData (mLocal);
connect (&mDocumentManager, SIGNAL (documentAdded (CSMDoc::Document *)),
this, SLOT (documentAdded (CSMDoc::Document *)));
connect (&mDocumentManager, SIGNAL (lastDocumentDeleted()),
this, SLOT (lastDocumentDeleted()));
connect (&mViewManager, SIGNAL (newGameRequest ()), this, SLOT (createGame ()));
connect (&mViewManager, SIGNAL (newAddonRequest ()), this, SLOT (createAddon ()));
connect (&mViewManager, SIGNAL (loadDocumentRequest ()), this, SLOT (loadDocument ()));
connect (&mViewManager, SIGNAL (editSettingsRequest()), this, SLOT (showSettings ()));
connect (&mStartup, SIGNAL (createDocument()), this, SLOT (createDocument ()));
connect (&mStartup, SIGNAL (createGame()), this, SLOT (createGame ()));
connect (&mStartup, SIGNAL (createAddon()), this, SLOT (createAddon ()));
connect (&mStartup, SIGNAL (loadDocument()), this, SLOT (loadDocument ()));
connect (&mStartup, SIGNAL (editConfig()), this, SLOT (showSettings ()));
connect (&mFileDialog, SIGNAL(openFiles()), this, SLOT(openFiles()));
connect (&mFileDialog, SIGNAL(createNewFile()), this, SLOT(createNewFile()));
connect (&mFileDialog, SIGNAL(signalOpenFiles (const boost::filesystem::path&)),
this, SLOT(openFiles (const boost::filesystem::path&)));
setupDataFiles();
connect (&mFileDialog, SIGNAL(signalCreateNewFile (const boost::filesystem::path&)),
this, SLOT(createNewFile (const boost::filesystem::path&)));
connect (&mNewGame, SIGNAL (createRequest (const boost::filesystem::path&)),
this, SLOT (createNewGame (const boost::filesystem::path&)));
}
void CS::Editor::setupDataFiles()
void CS::Editor::setupDataFiles (const Files::PathContainer& dataDirs)
{
for (Files::PathContainer::const_iterator iter = dataDirs.begin(); iter != dataDirs.end(); ++iter)
{
QString path = QString::fromUtf8 (iter->string().c_str());
mFileDialog.addFiles(path);
}
}
std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfig()
{
boost::program_options::variables_map variables;
boost::program_options::options_description desc;
boost::program_options::options_description desc("Syntax: opencs <options>\nAllowed options");
desc.add_options()
("data", boost::program_options::value<Files::PathContainer>()->default_value(Files::PathContainer(), "data")->multitoken())
("data-local", boost::program_options::value<std::string>()->default_value(""))
("fs-strict", boost::program_options::value<bool>()->implicit_value(true)->default_value(false))
("encoding", boost::program_options::value<std::string>()->default_value("win1252"));
("encoding", boost::program_options::value<std::string>()->default_value("win1252"))
("resources", boost::program_options::value<std::string>()->default_value("resources"))
("fallback-archive", boost::program_options::value<std::vector<std::string> >()->
default_value(std::vector<std::string>(), "fallback-archive")->multitoken())
("script-blacklist", boost::program_options::value<std::vector<std::string> >()->default_value(std::vector<std::string>(), "")
->multitoken(), "exclude specified script from the verifier (if the use of the blacklist is enabled)")
("script-blacklist-use", boost::program_options::value<bool>()->implicit_value(true)
->default_value(true), "enable script blacklisting");
boost::program_options::notify(variables);
mCfgMgr.readConfiguration(variables, desc);
Files::PathContainer mDataDirs, mDataLocal;
mDocumentManager.setEncoding (
ToUTF8::calculateEncoding (variables["encoding"].as<std::string>()));
mDocumentManager.setResourceDir (mResources = variables["resources"].as<std::string>());
if (variables["script-blacklist-use"].as<bool>())
mDocumentManager.setBlacklistedScripts (
variables["script-blacklist"].as<std::vector<std::string> >());
mFsStrict = variables["fs-strict"].as<bool>();
Files::PathContainer dataDirs, dataLocal;
if (!variables["data"].empty()) {
mDataDirs = Files::PathContainer(variables["data"].as<Files::PathContainer>());
dataDirs = Files::PathContainer(variables["data"].as<Files::PathContainer>());
}
std::string local = variables["data-local"].as<std::string>();
if (!local.empty()) {
mDataLocal.push_back(Files::PathContainer::value_type(local));
dataLocal.push_back(Files::PathContainer::value_type(local));
}
mCfgMgr.processPaths(mDataDirs);
mCfgMgr.processPaths(mDataLocal);
mCfgMgr.processPaths (dataDirs);
mCfgMgr.processPaths (dataLocal, true);
// Set the charset for reading the esm/esp files
QString encoding = QString::fromStdString(variables["encoding"].as<std::string>());
mFileDialog.setEncoding(encoding);
if (!dataLocal.empty())
mLocal = dataLocal[0];
else
{
QMessageBox messageBox;
messageBox.setWindowTitle (tr ("No local data path available"));
messageBox.setIcon (QMessageBox::Critical);
messageBox.setStandardButtons (QMessageBox::Ok);
messageBox.setText(tr("<br><b>OpenCS is unable to access the local data directory. This may indicate a faulty configuration or a broken install.</b>"));
messageBox.exec();
Files::PathContainer dataDirs;
dataDirs.insert(dataDirs.end(), mDataDirs.begin(), mDataDirs.end());
dataDirs.insert(dataDirs.end(), mDataLocal.begin(), mDataLocal.end());
QApplication::exit (1);
}
dataDirs.insert (dataDirs.end(), dataLocal.begin(), dataLocal.end());
//iterate the data directories and add them to the file dialog for loading
for (Files::PathContainer::const_iterator iter = dataDirs.begin(); iter != dataDirs.end(); ++iter)
{
QString path = QString::fromStdString(iter->string());
QString path = QString::fromUtf8 (iter->string().c_str());
mFileDialog.addFiles(path);
}
//load the settings into the userSettings instance.
const QString settingFileName = "opencs.cfg";
CSMSettings::UserSettings::instance().loadSettings(settingFileName);
return std::make_pair (dataDirs, variables["fallback-archive"].as<std::vector<std::string> >());
}
void CS::Editor::createDocument()
void CS::Editor::createGame()
{
mStartup.hide();
mFileDialog.newFile();
if (mNewGame.isHidden())
mNewGame.show();
mNewGame.raise();
mNewGame.activateWindow();
}
void CS::Editor::createAddon()
{
mStartup.hide();
mFileDialog.showDialog (CSVDoc::ContentAction_New);
}
void CS::Editor::loadDocument()
{
mStartup.hide();
mFileDialog.openFile();
mFileDialog.showDialog (CSVDoc::ContentAction_Edit);
}
void CS::Editor::openFiles()
void CS::Editor::openFiles (const boost::filesystem::path &savePath)
{
std::vector<boost::filesystem::path> files;
QStringList paths = mFileDialog.checkedItemsPaths();
foreach (const QString &path, paths) {
files.push_back(path.toStdString());
}
foreach (const QString &path, mFileDialog.selectedFilePaths())
files.push_back(path.toUtf8().constData());
CSMDoc::Document *document = mDocumentManager.addDocument(files, false);
mDocumentManager.addDocument (files, savePath, false);
mViewManager.addView (document);
mFileDialog.hide();
}
void CS::Editor::createNewFile()
void CS::Editor::createNewFile (const boost::filesystem::path &savePath)
{
std::vector<boost::filesystem::path> files;
QStringList paths = mFileDialog.checkedItemsPaths();
foreach (const QString &path, paths) {
files.push_back(path.toStdString());
foreach (const QString &path, mFileDialog.selectedFilePaths()) {
files.push_back(path.toUtf8().constData());
}
files.push_back(mFileDialog.fileName().toStdString());
files.push_back(mFileDialog.filename().toUtf8().constData());
CSMDoc::Document *document = mDocumentManager.addDocument (files, true);
mDocumentManager.addDocument (files, savePath, true);
mViewManager.addView (document);
mFileDialog.hide();
}
void CS::Editor::createNewGame (const boost::filesystem::path& file)
{
std::vector<boost::filesystem::path> files;
files.push_back (file);
mDocumentManager.addDocument (files, file, true);
mNewGame.hide();
}
void CS::Editor::showStartup()
{
if(mStartup.isHidden())
mStartup.show();
mStartup.raise();
mStartup.activateWindow();
if(mStartup.isHidden())
mStartup.show();
mStartup.raise();
mStartup.activateWindow();
}
void CS::Editor::showSettings()
{
if (mSettings.isHidden())
mSettings.show();
mSettings.raise();
mSettings.activateWindow();
}
bool CS::Editor::makeIPCServer()
{
mServer = new QLocalServer(this);
mServer = new QLocalServer(this);
if(mServer->listen(mIpcServerName))
{
connect(mServer, SIGNAL(newConnection()), this, SLOT(showStartup()));
return true;
}
if(mServer->listen(mIpcServerName))
{
connect(mServer, SIGNAL(newConnection()), this, SLOT(showStartup()));
return true;
}
mServer->close();
return false;
mServer->close();
return false;
}
void CS::Editor::connectToIPCServer()
{
mClientSocket = new QLocalSocket(this);
mClientSocket->connectToServer(mIpcServerName);
mClientSocket->close();
mClientSocket = new QLocalSocket(this);
mClientSocket->connectToServer(mIpcServerName);
mClientSocket->close();
}
int CS::Editor::run()
{
if (mLocal.empty())
return 1;
mStartup.show();
QApplication::setQuitOnLastWindowClosed (true);
return QApplication::exec();
}
std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
{
// TODO: setting
Ogre::Root::getSingleton().setRenderSystem(Ogre::Root::getSingleton().getRenderSystemByName("OpenGL Rendering Subsystem"));
Ogre::Root::getSingleton().initialise(false);
// Create a hidden background window to keep resources
Ogre::NameValuePairList params;
params.insert(std::make_pair("title", ""));
params.insert(std::make_pair("FSAA", "0"));
params.insert(std::make_pair("vsync", "false"));
params.insert(std::make_pair("hidden", "true"));
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
params.insert(std::make_pair("macAPI", "cocoa"));
#endif
Ogre::RenderWindow* hiddenWindow = Ogre::Root::getSingleton().createRenderWindow("InactiveHidden", 1, 1, false, &params);
hiddenWindow->setActive(false);
sh::OgrePlatform* platform =
new sh::OgrePlatform ("General", (mResources / "materials").string());
if (!boost::filesystem::exists (mCfgMgr.getCachePath()))
boost::filesystem::create_directories (mCfgMgr.getCachePath());
platform->setCacheFolder (mCfgMgr.getCachePath().string());
std::auto_ptr<sh::Factory> factory (new sh::Factory (platform));
factory->setCurrentLanguage (sh::Language_GLSL); /// \todo make this configurable
factory->setWriteSourceCache (true);
factory->setReadSourceCache (true);
factory->setReadMicrocodeCache (true);
factory->setWriteMicrocodeCache (true);
factory->loadAllFiles();
sh::Factory::getInstance().setGlobalSetting ("fog", "true");
sh::Factory::getInstance().setGlobalSetting ("shadows", "false");
sh::Factory::getInstance().setGlobalSetting ("shadows_pssm", "false");
sh::Factory::getInstance ().setGlobalSetting ("render_refraction", "false");
sh::Factory::getInstance ().setGlobalSetting ("viewproj_fix", "false");
sh::Factory::getInstance ().setGlobalSetting ("num_lights", "8");
/// \todo add more configurable shiny settings
return factory;
}
void CS::Editor::documentAdded (CSMDoc::Document *document)
{
mViewManager.addView (document);
}
void CS::Editor::lastDocumentDeleted()
{
exit (0);
}
+45 -8
View File
@@ -1,20 +1,37 @@
#ifndef CS_EDITOR_H
#define CS_EDITOR_H
#include <memory>
#include <QObject>
#include <QString>
#include <QLocalServer>
#include <QLocalSocket>
#include <extern/shiny/Main/Factory.hpp>
#ifndef Q_MOC_RUN
#include <components/files/configurationmanager.hpp>
#endif
#include <components/files/multidircollection.hpp>
#include <components/nifcache/nifcache.hpp>
#include "model/settings/usersettings.hpp"
#include "model/doc/documentmanager.hpp"
#include "view/doc/viewmanager.hpp"
#include "view/doc/startup.hpp"
#include "view/doc/filedialog.hpp"
#include "model/settings/usersettings.hpp"
#include "view/doc/newgame.hpp"
#include "view/settings/dialog.hpp"
namespace OgreInit
{
class OgreInit;
}
namespace CS
{
@@ -22,14 +39,23 @@ namespace CS
{
Q_OBJECT
Nif::Cache mNifCache;
Files::ConfigurationManager mCfgMgr;
CSMSettings::UserSettings mUserSettings;
CSMDoc::DocumentManager mDocumentManager;
CSVDoc::ViewManager mViewManager;
CSVDoc::StartupDialogue mStartup;
FileDialog mFileDialog;
CSVDoc::NewGameDialogue mNewGame;
CSVSettings::Dialog mSettings;
CSVDoc::FileDialog mFileDialog;
boost::filesystem::path mLocal;
boost::filesystem::path mResources;
bool mFsStrict;
Files::ConfigurationManager mCfgMgr;
void setupDataFiles();
void setupDataFiles (const Files::PathContainer& dataDirs);
std::pair<Files::PathContainer, std::vector<std::string> > readConfig();
///< \return data paths
// not implemented
Editor (const Editor&);
@@ -37,7 +63,7 @@ namespace CS
public:
Editor();
Editor (OgreInit::OgreInit& ogreInit);
bool makeIPCServer();
void connectToIPCServer();
@@ -45,16 +71,27 @@ namespace CS
int run();
///< \return error status
std::auto_ptr<sh::Factory> setupGraphics();
///< The returned factory must persist at least as long as *this.
private slots:
void createDocument();
void createGame();
void createAddon();
void loadDocument();
void openFiles();
void createNewFile();
void openFiles (const boost::filesystem::path &path);
void createNewFile (const boost::filesystem::path& path);
void createNewGame (const boost::filesystem::path& file);
void showStartup();
void showSettings();
void documentAdded (CSMDoc::Document *document);
void lastDocumentDeleted();
private:
QString mIpcServerName;
+48 -5
View File
@@ -3,9 +3,23 @@
#include <exception>
#include <iostream>
#include <string>
#include <QApplication>
#include <QIcon>
#include <QMetaType>
#include <extern/shiny/Main/Factory.hpp>
#include <components/ogreinit/ogreinit.hpp>
#include "model/world/universalid.hpp"
#ifdef Q_OS_MAC
#include <QDir>
#endif
Q_DECLARE_METATYPE (std::string)
class Application : public QApplication
{
@@ -33,17 +47,46 @@ class Application : public QApplication
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE (resources);
Application mApplication (argc, argv);
mApplication.setWindowIcon (QIcon (":./opencs.png"));
qRegisterMetaType<std::string> ("std::string");
qRegisterMetaType<CSMWorld::UniversalId> ("CSMWorld::UniversalId");
CS::Editor editor;
OgreInit::OgreInit ogreInit;
std::auto_ptr<sh::Factory> shinyFactory;
Application application (argc, argv);
#ifdef Q_OS_MAC
QDir dir(QCoreApplication::applicationDirPath());
if (dir.dirName() == "MacOS") {
dir.cdUp();
dir.cdUp();
dir.cdUp();
}
QDir::setCurrent(dir.absolutePath());
// force Qt to load only LOCAL plugins, don't touch system Qt installation
QDir pluginsPath(QCoreApplication::applicationDirPath());
pluginsPath.cdUp();
pluginsPath.cd("Plugins");
QStringList libraryPaths;
libraryPaths << pluginsPath.path() << QCoreApplication::applicationDirPath();
application.setLibraryPaths(libraryPaths);
#endif
application.setWindowIcon (QIcon (":./opencs.png"));
CS::Editor editor (ogreInit);
if(!editor.makeIPCServer())
{
editor.connectToIPCServer();
return 0;
editor.connectToIPCServer();
// return 0;
}
shinyFactory = editor.setupGraphics();
return editor.run();
}
+31
View File
@@ -0,0 +1,31 @@
#include "blacklist.hpp"
#include <algorithm>
#include <components/misc/stringops.hpp>
bool CSMDoc::Blacklist::isBlacklisted (const CSMWorld::UniversalId& id) const
{
std::map<CSMWorld::UniversalId::Type, std::vector<std::string> >::const_iterator iter =
mIds.find (id.getType());
if (iter==mIds.end())
return false;
return std::binary_search (iter->second.begin(), iter->second.end(),
Misc::StringUtils::lowerCase (id.getId()));
}
void CSMDoc::Blacklist::add (CSMWorld::UniversalId::Type type,
const std::vector<std::string>& ids)
{
std::vector<std::string>& list = mIds[type];
int size = list.size();
list.resize (size+ids.size());
std::transform (ids.begin(), ids.end(), list.begin()+size, Misc::StringUtils::lowerCase);
std::sort (list.begin(), list.end());
}
+25
View File
@@ -0,0 +1,25 @@
#ifndef CSM_DOC_BLACKLIST_H
#define CSM_DOC_BLACKLIST_H
#include <map>
#include <vector>
#include <string>
#include "../world/universalid.hpp"
namespace CSMDoc
{
/// \brief ID blacklist sorted by UniversalId type
class Blacklist
{
std::map<CSMWorld::UniversalId::Type, std::vector<std::string> > mIds;
public:
bool isBlacklisted (const CSMWorld::UniversalId& id) const;
void add (CSMWorld::UniversalId::Type type, const std::vector<std::string>& ids);
};
}
#endif
+162 -69
View File
@@ -1,22 +1,13 @@
#include "document.hpp"
#include <cassert>
#include <fstream>
void CSMDoc::Document::load (const std::vector<boost::filesystem::path>::const_iterator& begin,
const std::vector<boost::filesystem::path>::const_iterator& end, bool lastAsModified)
{
assert (begin!=end);
#include <boost/filesystem.hpp>
std::vector<boost::filesystem::path>::const_iterator end2 (end);
if (lastAsModified)
--end2;
for (std::vector<boost::filesystem::path>::const_iterator iter (begin); iter!=end2; ++iter)
getData().loadFile (*iter, true);
if (lastAsModified)
getData().loadFile (*end2, false);
}
#ifndef Q_MOC_RUN
#include <components/files/configurationmanager.hpp>
#endif
void CSMDoc::Document::addGmsts()
{
@@ -2058,9 +2049,9 @@ void CSMDoc::Document::addOptionalGlobals()
{
static const char *sGlobals[] =
{
"dayspassed",
"pcwerewolf",
"pcyear",
"DaysPassed",
"PCWerewolf",
"PCYear",
0
};
@@ -2137,32 +2128,123 @@ void CSMDoc::Document::createBase()
getData().getSkills().add (record);
}
static const char *sVoice[] =
{
"Intruder",
"Attack",
"Hello",
"Thief",
"Alarm",
"Idle",
"Flee",
"Hit",
0
};
for (int i=0; sVoice[i]; ++i)
{
ESM::Dialogue record;
record.mId = sVoice[i];
record.mType = ESM::Dialogue::Voice;
record.blank();
getData().getTopics().add (record);
}
static const char *sGreetings[] =
{
"Greeting 0",
"Greeting 1",
"Greeting 2",
"Greeting 3",
"Greeting 4",
"Greeting 5",
"Greeting 6",
"Greeting 7",
"Greeting 8",
"Greeting 9",
0
};
for (int i=0; sGreetings[i]; ++i)
{
ESM::Dialogue record;
record.mId = sGreetings[i];
record.mType = ESM::Dialogue::Greeting;
record.blank();
getData().getTopics().add (record);
}
static const char *sPersuasion[] =
{
"Intimidate Success",
"Intimidate Fail",
"Service Refusal",
"Admire Success",
"Taunt Success",
"Bribe Success",
"Info Refusal",
"Admire Fail",
"Taunt Fail",
"Bribe Fail",
0
};
for (int i=0; sPersuasion[i]; ++i)
{
ESM::Dialogue record;
record.mId = sPersuasion[i];
record.mType = ESM::Dialogue::Persuasion;
record.blank();
getData().getTopics().add (record);
}
}
CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files, bool new_)
: mTools (mData)
CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
const std::vector< boost::filesystem::path >& files, bool new_,
const boost::filesystem::path& savePath, const boost::filesystem::path& resDir,
ToUTF8::FromType encoding, const CSMWorld::ResourcesManager& resourcesManager,
const std::vector<std::string>& blacklistedScripts)
: mSavePath (savePath), mContentFiles (files), mNew (new_), mData (encoding, resourcesManager),
mTools (*this), mResDir(resDir),
mProjectPath ((configuration.getUserDataPath() / "projects") /
(savePath.filename().string() + ".project")),
mSaving (*this, mProjectPath, encoding)
{
if (files.empty())
if (mContentFiles.empty())
throw std::runtime_error ("Empty content file sequence");
/// \todo adjust last file name:
/// \li make sure it is located in the data-local directory (adjust path if necessary)
/// \li make sure the extension matches the new scheme (change it if necesarry)
mName = files.back().filename().string();
if (new_ && files.size()==1)
createBase();
else
if (!boost::filesystem::exists (mProjectPath))
{
std::vector<boost::filesystem::path>::const_iterator end = files.end();
boost::filesystem::path customFiltersPath (configuration.getUserDataPath());
customFiltersPath /= "defaultfilters";
if (new_)
--end;
std::ofstream destination (mProjectPath.string().c_str(), std::ios::binary);
load (files.begin(), end, !new_);
if (boost::filesystem::exists (customFiltersPath))
{
destination << std::ifstream(customFiltersPath.c_str(), std::ios::binary).rdbuf();
}
else
{
destination << std::ifstream(std::string(mResDir.string() + "/defaultfilters").c_str(), std::ios::binary).rdbuf();
}
}
if (mNew)
{
mData.setDescription ("");
mData.setAuthor ("");
if (mContentFiles.size()==1)
createBase();
}
mBlacklist.add (CSMWorld::UniversalId::Type_Script, blacklistedScripts);
addOptionalGmsts();
addOptionalGlobals();
@@ -2171,9 +2253,12 @@ CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files, b
connect (&mTools, SIGNAL (progress (int, int, int)), this, SLOT (progress (int, int, int)));
connect (&mTools, SIGNAL (done (int)), this, SLOT (operationDone (int)));
// dummy implementation -> remove when proper save is implemented.
mSaveCount = 0;
connect (&mSaveTimer, SIGNAL(timeout()), this, SLOT (saving()));
connect (&mSaving, SIGNAL (progress (int, int, int)), this, SLOT (progress (int, int, int)));
connect (&mSaving, SIGNAL (done (int)), this, SLOT (operationDone (int)));
connect (
&mSaving, SIGNAL (reportMessage (const CSMWorld::UniversalId&, const std::string&, int)),
this, SLOT (reportMessage (const CSMWorld::UniversalId&, const std::string&, int)));
}
CSMDoc::Document::~Document()
@@ -2192,7 +2277,7 @@ int CSMDoc::Document::getState() const
if (!mUndoStack.isClean())
state |= State_Modified;
if (mSaveCount)
if (mSaving.isRunning())
state |= State_Locked | State_Saving | State_Operation;
if (int operations = mTools.getRunningOperations())
@@ -2201,17 +2286,35 @@ int CSMDoc::Document::getState() const
return state;
}
const std::string& CSMDoc::Document::getName() const
const boost::filesystem::path& CSMDoc::Document::getSavePath() const
{
return mName;
return mSavePath;
}
const boost::filesystem::path& CSMDoc::Document::getProjectPath() const
{
return mProjectPath;
}
const std::vector<boost::filesystem::path>& CSMDoc::Document::getContentFiles() const
{
return mContentFiles;
}
bool CSMDoc::Document::isNew() const
{
return mNew;
}
void CSMDoc::Document::save()
{
mSaveCount = 1;
mSaveTimer.start (500);
if (mSaving.isRunning())
throw std::logic_error (
"Failed to initiate save, because a save operation is already running.");
mSaving.start();
emit stateChanged (getState(), this);
emit progress (1, 16, State_Saving, 1, this);
}
CSMWorld::UniversalId CSMDoc::Document::verify()
@@ -2223,46 +2326,29 @@ CSMWorld::UniversalId CSMDoc::Document::verify()
void CSMDoc::Document::abortOperation (int type)
{
mTools.abortOperation (type);
if (type==State_Saving)
{
mSaveCount=0;
mSaveTimer.stop();
emit stateChanged (getState(), this);
}
mSaving.abort();
else
mTools.abortOperation (type);
}
void CSMDoc::Document::modificationStateChanged (bool clean)
{
emit stateChanged (getState(), this);
}
void CSMDoc::Document::reportMessage (const CSMWorld::UniversalId& id, const std::string& message,
int type)
{
/// \todo find a better way to get these messages to the user.
std::cout << message << std::endl;
}
void CSMDoc::Document::operationDone (int type)
{
emit stateChanged (getState(), this);
}
void CSMDoc::Document::saving()
{
++mSaveCount;
emit progress (mSaveCount, 16, State_Saving, 1, this);
if (mSaveCount>15)
{
//clear the stack before resetting the save state
//to avoid emitting incorrect states
mUndoStack.setClean();
mSaveCount = 0;
mSaveTimer.stop();
emit stateChanged (getState(), this);
}
}
const CSMWorld::Data& CSMDoc::Document::getData() const
{
return mData;
@@ -2278,6 +2364,13 @@ CSMTools::ReportModel *CSMDoc::Document::getReport (const CSMWorld::UniversalId&
return mTools.getReport (id);
}
bool CSMDoc::Document::isBlacklisted (const CSMWorld::UniversalId& id)
const
{
return mBlacklist.isBlacklisted (id);
}
void CSMDoc::Document::progress (int current, int max, int type)
{
emit progress (current, max, type, 1, this);
+43 -14
View File
@@ -9,11 +9,15 @@
#include <QObject>
#include <QTimer>
#include <components/to_utf8/to_utf8.hpp>
#include "../world/data.hpp"
#include "../tools/tools.hpp"
#include "state.hpp"
#include "saving.hpp"
#include "blacklist.hpp"
class QAbstractItemModel;
@@ -23,6 +27,16 @@ namespace ESM
struct Global;
}
namespace Files
{
class ConfigurationManager;
}
namespace CSMWorld
{
class ResourcesManager;
}
namespace CSMDoc
{
class Document : public QObject
@@ -31,25 +45,24 @@ namespace CSMDoc
private:
std::string mName; ///< \todo replace name with ESX list
boost::filesystem::path mSavePath;
std::vector<boost::filesystem::path> mContentFiles;
bool mNew;
CSMWorld::Data mData;
CSMTools::Tools mTools;
boost::filesystem::path mProjectPath;
Saving mSaving;
boost::filesystem::path mResDir;
Blacklist mBlacklist;
// It is important that the undo stack is declared last, because on desctruction it fires a signal, that is connected to a slot, that is
// using other member variables. Unfortunately this connection is cut only in the QObject destructor, which is way too late.
QUndoStack mUndoStack;
int mSaveCount; ///< dummy implementation -> remove when proper save is implemented.
QTimer mSaveTimer; ///< dummy implementation -> remove when proper save is implemented.
// not implemented
Document (const Document&);
Document& operator= (const Document&);
void load (const std::vector<boost::filesystem::path>::const_iterator& begin,
const std::vector<boost::filesystem::path>::const_iterator& end, bool lastAsModified);
///< \param lastAsModified Store the last file in Modified instead of merging it into Base.
void createBase();
void addGmsts();
@@ -64,15 +77,28 @@ namespace CSMDoc
public:
Document (const std::vector<boost::filesystem::path>& files, bool new_);
Document (const Files::ConfigurationManager& configuration,
const std::vector< boost::filesystem::path >& files, bool new_,
const boost::filesystem::path& savePath, const boost::filesystem::path& resDir,
ToUTF8::FromType encoding, const CSMWorld::ResourcesManager& resourcesManager,
const std::vector<std::string>& blacklistedScripts);
~Document();
QUndoStack& getUndoStack();
int getState() const;
const std::string& getName() const;
///< \todo replace with ESX list
const boost::filesystem::path& getSavePath() const;
const boost::filesystem::path& getProjectPath() const;
const std::vector<boost::filesystem::path>& getContentFiles() const;
///< \attention The last element in this collection is the file that is being edited,
/// but with its original path instead of the save path.
bool isNew() const;
///< Is this a newly created content file?
void save();
@@ -87,6 +113,8 @@ namespace CSMDoc
CSMTools::ReportModel *getReport (const CSMWorld::UniversalId& id);
///< The ownership of the returned report is not transferred.
bool isBlacklisted (const CSMWorld::UniversalId& id) const;
signals:
void stateChanged (int state, CSMDoc::Document *document);
@@ -97,10 +125,10 @@ namespace CSMDoc
void modificationStateChanged (bool clean);
void operationDone (int type);
void reportMessage (const CSMWorld::UniversalId& id, const std::string& message,
int type);
void saving();
///< dummy implementation -> remove when proper save is implemented.
void operationDone (int type);
public slots:
@@ -109,3 +137,4 @@ namespace CSMDoc
}
#endif
+79 -7
View File
@@ -4,35 +4,107 @@
#include <algorithm>
#include <stdexcept>
#include <boost/filesystem.hpp>
#ifndef Q_MOC_RUN
#include <components/files/configurationmanager.hpp>
#endif
#include "document.hpp"
CSMDoc::DocumentManager::DocumentManager() {}
CSMDoc::DocumentManager::DocumentManager (const Files::ConfigurationManager& configuration)
: mConfiguration (configuration), mEncoding (ToUTF8::WINDOWS_1252)
{
boost::filesystem::path projectPath = configuration.getUserDataPath() / "projects";
if (!boost::filesystem::is_directory (projectPath))
boost::filesystem::create_directories (projectPath);
mLoader.moveToThread (&mLoaderThread);
mLoaderThread.start();
connect (&mLoader, SIGNAL (documentLoaded (Document *)),
this, SLOT (documentLoaded (Document *)));
connect (&mLoader, SIGNAL (documentNotLoaded (Document *, const std::string&)),
this, SLOT (documentNotLoaded (Document *, const std::string&)));
connect (this, SIGNAL (loadRequest (CSMDoc::Document *)),
&mLoader, SLOT (loadDocument (CSMDoc::Document *)));
connect (&mLoader, SIGNAL (nextStage (CSMDoc::Document *, const std::string&, int)),
this, SIGNAL (nextStage (CSMDoc::Document *, const std::string&, int)));
connect (&mLoader, SIGNAL (nextRecord (CSMDoc::Document *, int)),
this, SIGNAL (nextRecord (CSMDoc::Document *, int)));
connect (this, SIGNAL (cancelLoading (CSMDoc::Document *)),
&mLoader, SLOT (abortLoading (CSMDoc::Document *)));
connect (&mLoader, SIGNAL (loadMessage (CSMDoc::Document *, const std::string&)),
this, SIGNAL (loadMessage (CSMDoc::Document *, const std::string&)));
}
CSMDoc::DocumentManager::~DocumentManager()
{
mLoaderThread.quit();
mLoader.hasThingsToDo().wakeAll();
mLoaderThread.wait();
for (std::vector<Document *>::iterator iter (mDocuments.begin()); iter!=mDocuments.end(); ++iter)
delete *iter;
}
CSMDoc::Document *CSMDoc::DocumentManager::addDocument (const std::vector<boost::filesystem::path>& files,
void CSMDoc::DocumentManager::addDocument (const std::vector<boost::filesystem::path>& files, const boost::filesystem::path& savePath,
bool new_)
{
Document *document = new Document (files, new_);
Document *document = new Document (mConfiguration, files, new_, savePath, mResDir, mEncoding, mResourcesManager, mBlacklistedScripts);
mDocuments.push_back (document);
return document;
emit loadRequest (document);
mLoader.hasThingsToDo().wakeAll();
}
bool CSMDoc::DocumentManager::removeDocument (Document *document)
void CSMDoc::DocumentManager::removeDocument (CSMDoc::Document *document)
{
std::vector<Document *>::iterator iter = std::find (mDocuments.begin(), mDocuments.end(), document);
if (iter==mDocuments.end())
throw std::runtime_error ("removing invalid document");
throw std::runtime_error ("removing invalid document");
mDocuments.erase (iter);
delete document;
return mDocuments.empty();
if (mDocuments.empty())
emit lastDocumentDeleted();
}
void CSMDoc::DocumentManager::setResourceDir (const boost::filesystem::path& parResDir)
{
mResDir = boost::filesystem::system_complete(parResDir);
}
void CSMDoc::DocumentManager::setEncoding (ToUTF8::FromType encoding)
{
mEncoding = encoding;
}
void CSMDoc::DocumentManager::setBlacklistedScripts (const std::vector<std::string>& scriptIds)
{
mBlacklistedScripts = scriptIds;
}
void CSMDoc::DocumentManager::listResources()
{
mResourcesManager.listResources();
}
void CSMDoc::DocumentManager::documentLoaded (Document *document)
{
emit documentAdded (document);
emit loadingStopped (document, true, "");
}
void CSMDoc::DocumentManager::documentNotLoaded (Document *document, const std::string& error)
{
emit loadingStopped (document, false, error);
if (error.empty()) // do not remove the document yet, if we have an error
removeDocument (document);
}
+73 -8
View File
@@ -6,31 +6,96 @@
#include <boost/filesystem/path.hpp>
#include <QObject>
#include <QThread>
#include <components/to_utf8/to_utf8.hpp>
#include "../world/resourcesmanager.hpp"
#include "loader.hpp"
namespace Files
{
class ConfigurationManager;
}
namespace CSMDoc
{
class Document;
class DocumentManager
class DocumentManager : public QObject
{
Q_OBJECT
std::vector<Document *> mDocuments;
const Files::ConfigurationManager& mConfiguration;
QThread mLoaderThread;
Loader mLoader;
ToUTF8::FromType mEncoding;
CSMWorld::ResourcesManager mResourcesManager;
std::vector<std::string> mBlacklistedScripts;
DocumentManager (const DocumentManager&);
DocumentManager& operator= (const DocumentManager&);
public:
DocumentManager();
DocumentManager (const Files::ConfigurationManager& configuration);
~DocumentManager();
Document *addDocument (const std::vector<boost::filesystem::path>& files, bool new_);
///< The ownership of the returned document is not transferred to the caller.
///
/// \param new_ Do not load the last content file in \a files and instead create in an
void addDocument (const std::vector< boost::filesystem::path >& files,
const boost::filesystem::path& savePath, bool new_);
///< \param new_ Do not load the last content file in \a files and instead create in an
/// appropriate way.
bool removeDocument (Document *document);
///< \return last document removed?
void setResourceDir (const boost::filesystem::path& parResDir);
void setEncoding (ToUTF8::FromType encoding);
void setBlacklistedScripts (const std::vector<std::string>& scriptIds);
/// Ask OGRE for a list of available resources.
void listResources();
private:
boost::filesystem::path mResDir;
private slots:
void documentLoaded (Document *document);
///< The ownership of \a document is not transferred.
void documentNotLoaded (Document *document, const std::string& error);
///< Document load has been interrupted either because of a call to abortLoading
/// or a problem during loading). In the former case error will be an empty string.
public slots:
void removeDocument (CSMDoc::Document *document);
///< Emits the lastDocumentDeleted signal, if applicable.
signals:
void documentAdded (CSMDoc::Document *document);
void loadRequest (CSMDoc::Document *document);
void lastDocumentDeleted();
void loadingStopped (CSMDoc::Document *document, bool completed,
const std::string& error);
void nextStage (CSMDoc::Document *document, const std::string& name,
int totalRecords);
void nextRecord (CSMDoc::Document *document, int records);
void cancelLoading (CSMDoc::Document *document);
void loadMessage (CSMDoc::Document *document, const std::string& message);
};
}
+137
View File
@@ -0,0 +1,137 @@
#include "loader.hpp"
#include <QTimer>
#include "../tools/reportmodel.hpp"
#include "document.hpp"
#include "state.hpp"
CSMDoc::Loader::Stage::Stage() : mFile (0), mRecordsLoaded (0), mRecordsLeft (false) {}
CSMDoc::Loader::Loader()
{
QTimer *timer = new QTimer (this);
connect (timer, SIGNAL (timeout()), this, SLOT (load()));
timer->start();
}
QWaitCondition& CSMDoc::Loader::hasThingsToDo()
{
return mThingsToDo;
}
void CSMDoc::Loader::load()
{
if (mDocuments.empty())
{
mMutex.lock();
mThingsToDo.wait (&mMutex);
mMutex.unlock();
return;
}
std::vector<std::pair<Document *, Stage> >::iterator iter = mDocuments.begin();
Document *document = iter->first;
int size = static_cast<int> (document->getContentFiles().size());
int editedIndex = size-1; // index of the file to be edited/created
if (document->isNew())
--size;
bool done = false;
const int batchingSize = 50;
try
{
if (iter->second.mRecordsLeft)
{
CSMDoc::Stage::Messages messages;
for (int i=0; i<batchingSize; ++i) // do not flood the system with update signals
if (document->getData().continueLoading (messages))
{
iter->second.mRecordsLeft = false;
break;
}
else
++(iter->second.mRecordsLoaded);
CSMWorld::UniversalId log (CSMWorld::UniversalId::Type_LoadErrorLog, 0);
{ // silence a g++ warning
for (CSMDoc::Stage::Messages::const_iterator iter (messages.begin());
iter!=messages.end(); ++iter)
{
document->getReport (log)->add (iter->first, iter->second);
emit loadMessage (document, iter->second);
}
}
emit nextRecord (document, iter->second.mRecordsLoaded);
return;
}
if (iter->second.mFile<size)
{
boost::filesystem::path path = document->getContentFiles()[iter->second.mFile];
int steps = document->getData().startLoading (path, iter->second.mFile!=editedIndex, false);
iter->second.mRecordsLeft = true;
iter->second.mRecordsLoaded = 0;
emit nextStage (document, path.filename().string(), steps);
}
else if (iter->second.mFile==size)
{
int steps = document->getData().startLoading (document->getProjectPath(), false, true);
iter->second.mRecordsLeft = true;
iter->second.mRecordsLoaded = 0;
emit nextStage (document, "Project File", steps);
}
else
{
done = true;
}
++(iter->second.mFile);
}
catch (const std::exception& e)
{
mDocuments.erase (iter);
emit documentNotLoaded (document, e.what());
return;
}
if (done)
{
mDocuments.erase (iter);
emit documentLoaded (document);
}
}
void CSMDoc::Loader::loadDocument (CSMDoc::Document *document)
{
mDocuments.push_back (std::make_pair (document, Stage()));
}
void CSMDoc::Loader::abortLoading (CSMDoc::Document *document)
{
for (std::vector<std::pair<Document *, Stage> >::iterator iter = mDocuments.begin();
iter!=mDocuments.end(); ++iter)
{
if (iter->first==document)
{
mDocuments.erase (iter);
emit documentNotLoaded (document, "");
break;
}
}
}
+73
View File
@@ -0,0 +1,73 @@
#ifndef CSM_DOC_LOADER_H
#define CSM_DOC_LOADER_H
#include <vector>
#include <QObject>
#include <QMutex>
#include <QWaitCondition>
namespace CSMDoc
{
class Document;
class Loader : public QObject
{
Q_OBJECT
struct Stage
{
int mFile;
int mRecordsLoaded;
bool mRecordsLeft;
Stage();
};
QMutex mMutex;
QWaitCondition mThingsToDo;
std::vector<std::pair<Document *, Stage> > mDocuments;
public:
Loader();
QWaitCondition& hasThingsToDo();
private slots:
void load();
public slots:
void loadDocument (CSMDoc::Document *document);
///< The ownership of \a document is not transferred.
void abortLoading (CSMDoc::Document *document);
///< Abort loading \a docuemnt (ignored if \a document has already finished being
/// loaded). Will result in a documentNotLoaded signal, once the Loader has finished
/// cleaning up.
signals:
void documentLoaded (Document *document);
///< The ownership of \a document is not transferred.
void documentNotLoaded (Document *document, const std::string& error);
///< Document load has been interrupted either because of a call to abortLoading
/// or a problem during loading). In the former case error will be an empty string.
void nextStage (CSMDoc::Document *document, const std::string& name,
int totalRecords);
void nextRecord (CSMDoc::Document *document, int records);
///< \note This signal is only given once per group of records. The group size is
/// approximately the total number of records divided by the steps value of the
/// previous nextStage signal.
void loadMessage (CSMDoc::Document *document, const std::string& message);
///< Non-critical load error or warning
};
}
#endif
+123
View File
@@ -0,0 +1,123 @@
#include "operation.hpp"
#include <string>
#include <vector>
#include <QTimer>
#include "../world/universalid.hpp"
#include "state.hpp"
#include "stage.hpp"
void CSMDoc::Operation::prepareStages()
{
mCurrentStage = mStages.begin();
mCurrentStep = 0;
mCurrentStepTotal = 0;
mTotalSteps = 0;
mError = false;
for (std::vector<std::pair<Stage *, int> >::iterator iter (mStages.begin()); iter!=mStages.end(); ++iter)
{
iter->second = iter->first->setup();
mTotalSteps += iter->second;
}
}
CSMDoc::Operation::Operation (int type, bool ordered, bool finalAlways)
: mType (type), mOrdered (ordered), mFinalAlways (finalAlways)
{
connect (this, SIGNAL (finished()), this, SLOT (operationDone()));
}
CSMDoc::Operation::~Operation()
{
for (std::vector<std::pair<Stage *, int> >::iterator iter (mStages.begin()); iter!=mStages.end(); ++iter)
delete iter->first;
}
void CSMDoc::Operation::run()
{
prepareStages();
QTimer timer;
timer.connect (&timer, SIGNAL (timeout()), this, SLOT (executeStage()));
timer.start (0);
exec();
}
void CSMDoc::Operation::appendStage (Stage *stage)
{
mStages.push_back (std::make_pair (stage, 0));
}
bool CSMDoc::Operation::hasError() const
{
return mError;
}
void CSMDoc::Operation::abort()
{
if (!isRunning())
return;
mError = true;
if (mFinalAlways)
{
if (mStages.begin()!=mStages.end() && mCurrentStage!=--mStages.end())
{
mCurrentStep = 0;
mCurrentStage = --mStages.end();
}
}
else
mCurrentStage = mStages.end();
}
void CSMDoc::Operation::executeStage()
{
Stage::Messages messages;
while (mCurrentStage!=mStages.end())
{
if (mCurrentStep>=mCurrentStage->second)
{
mCurrentStep = 0;
++mCurrentStage;
}
else
{
try
{
mCurrentStage->first->perform (mCurrentStep++, messages);
}
catch (const std::exception& e)
{
emit reportMessage (CSMWorld::UniversalId(), e.what(), mType);
abort();
}
++mCurrentStepTotal;
break;
}
}
emit progress (mCurrentStepTotal, mTotalSteps ? mTotalSteps : 1, mType);
for (Stage::Messages::const_iterator iter (messages.begin()); iter!=messages.end(); ++iter)
emit reportMessage (iter->first, iter->second, mType);
if (mCurrentStage==mStages.end())
exit();
}
void CSMDoc::Operation::operationDone()
{
emit done (mType);
}
@@ -1,11 +1,16 @@
#ifndef CSM_TOOLS_OPERATION_H
#define CSM_TOOLS_OPERATION_H
#ifndef CSM_DOC_OPERATION_H
#define CSM_DOC_OPERATION_H
#include <vector>
#include <QThread>
namespace CSMTools
namespace CSMWorld
{
class UniversalId;
}
namespace CSMDoc
{
class Stage;
@@ -19,12 +24,17 @@ namespace CSMTools
int mCurrentStep;
int mCurrentStepTotal;
int mTotalSteps;
int mOrdered;
bool mFinalAlways;
bool mError;
void prepareStages();
public:
Operation (int type);
Operation (int type, bool ordered, bool finalAlways = false);
///< \param ordered Stages must be executed in the given order.
/// \param finalAlways Execute last stage even if an error occurred during earlier stages.
virtual ~Operation();
@@ -35,11 +45,16 @@ namespace CSMTools
///
/// \attention Do no call this function while this Operation is running.
bool hasError() const;
signals:
void progress (int current, int max, int type);
void reportMessage (const QString& message, int type);
void reportMessage (const CSMWorld::UniversalId& id, const std::string& message,
int type);
void done (int type);
public slots:
@@ -47,7 +62,9 @@ namespace CSMTools
private slots:
void verify();
void executeStage();
void operationDone();
};
}
+82
View File
@@ -0,0 +1,82 @@
#include "saving.hpp"
#include "../world/data.hpp"
#include "../world/idcollection.hpp"
#include "state.hpp"
#include "savingstages.hpp"
#include "document.hpp"
CSMDoc::Saving::Saving (Document& document, const boost::filesystem::path& projectPath,
ToUTF8::FromType encoding)
: Operation (State_Saving, true, true), mDocument (document), mState (*this, projectPath, encoding)
{
// save project file
appendStage (new OpenSaveStage (mDocument, mState, true));
appendStage (new WriteHeaderStage (mDocument, mState, true));
appendStage (new WriteFilterStage (mDocument, mState, CSMFilter::Filter::Scope_Project));
appendStage (new CloseSaveStage (mState));
// save content file
appendStage (new OpenSaveStage (mDocument, mState, false));
appendStage (new WriteHeaderStage (mDocument, mState, false));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Global> >
(mDocument.getData().getGlobals(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::GameSetting> >
(mDocument.getData().getGmsts(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Skill> >
(mDocument.getData().getSkills(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Class> >
(mDocument.getData().getClasses(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Faction> >
(mDocument.getData().getFactions(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Race> >
(mDocument.getData().getRaces(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Sound> >
(mDocument.getData().getSounds(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Script> >
(mDocument.getData().getScripts(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Region> >
(mDocument.getData().getRegions(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::BirthSign> >
(mDocument.getData().getBirthsigns(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Spell> >
(mDocument.getData().getSpells(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Enchantment> >
(mDocument.getData().getEnchantments(), mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::BodyPart> >
(mDocument.getData().getBodyParts(), mState));
appendStage (new WriteDialogueCollectionStage (mDocument, mState, false));
appendStage (new WriteDialogueCollectionStage (mDocument, mState, true));
appendStage (new WriteRefIdCollectionStage (mDocument, mState));
appendStage (new CollectionReferencesStage (mDocument, mState));
appendStage (new WriteCellCollectionStage (mDocument, mState));
// close file and clean up
appendStage (new CloseSaveStage (mState));
appendStage (new FinalSavingStage (mDocument, mState));
}
+30
View File
@@ -0,0 +1,30 @@
#ifndef CSM_DOC_SAVING_H
#define CSM_DOC_SAVING_H
#include <boost/filesystem/path.hpp>
#include <components/to_utf8/to_utf8.hpp>
#include "operation.hpp"
#include "savingstate.hpp"
namespace CSMDoc
{
class Document;
class Saving : public Operation
{
Q_OBJECT
Document& mDocument;
SavingState mState;
public:
Saving (Document& document, const boost::filesystem::path& projectPath,
ToUTF8::FromType encoding);
};
}
#endif
+404
View File
@@ -0,0 +1,404 @@
#include "savingstages.hpp"
#include <fstream>
#include <boost/filesystem.hpp>
#include <QUndoStack>
#include <components/esm/loaddial.hpp>
#include <components/misc/stringops.hpp>
#include "../world/infocollection.hpp"
#include "document.hpp"
#include "savingstate.hpp"
CSMDoc::OpenSaveStage::OpenSaveStage (Document& document, SavingState& state, bool projectFile)
: mDocument (document), mState (state), mProjectFile (projectFile)
{}
int CSMDoc::OpenSaveStage::setup()
{
return 1;
}
void CSMDoc::OpenSaveStage::perform (int stage, Messages& messages)
{
mState.start (mDocument, mProjectFile);
mState.getStream().open (
mProjectFile ? mState.getPath() : mState.getTmpPath(),
std::ios::binary);
if (!mState.getStream().is_open())
throw std::runtime_error ("failed to open stream for saving");
}
CSMDoc::WriteHeaderStage::WriteHeaderStage (Document& document, SavingState& state, bool simple)
: mDocument (document), mState (state), mSimple (simple)
{}
int CSMDoc::WriteHeaderStage::setup()
{
return 1;
}
void CSMDoc::WriteHeaderStage::perform (int stage, Messages& messages)
{
mState.getWriter().setVersion();
mState.getWriter().clearMaster();
mState.getWriter().setFormat (0);
if (mSimple)
{
mState.getWriter().setAuthor ("");
mState.getWriter().setDescription ("");
mState.getWriter().setRecordCount (0);
}
else
{
mState.getWriter().setAuthor (mDocument.getData().getAuthor());
mState.getWriter().setDescription (mDocument.getData().getDescription());
mState.getWriter().setRecordCount (
mDocument.getData().count (CSMWorld::RecordBase::State_Modified) +
mDocument.getData().count (CSMWorld::RecordBase::State_ModifiedOnly) +
mDocument.getData().count (CSMWorld::RecordBase::State_Deleted));
/// \todo refine dependency list (at least remove redundant dependencies)
std::vector<boost::filesystem::path> dependencies = mDocument.getContentFiles();
std::vector<boost::filesystem::path>::const_iterator end (--dependencies.end());
for (std::vector<boost::filesystem::path>::const_iterator iter (dependencies.begin());
iter!=end; ++iter)
{
std::string name = iter->filename().string();
uint64_t size = boost::filesystem::file_size (*iter);
mState.getWriter().addMaster (name, size);
}
}
mState.getWriter().save (mState.getStream());
}
CSMDoc::WriteDialogueCollectionStage::WriteDialogueCollectionStage (Document& document,
SavingState& state, bool journal)
: mDocument (document), mState (state),
mTopics (journal ? document.getData().getJournals() : document.getData().getTopics()),
mInfos (journal ? document.getData().getJournalInfos() : document.getData().getTopicInfos())
{}
int CSMDoc::WriteDialogueCollectionStage::setup()
{
return mTopics.getSize();
}
void CSMDoc::WriteDialogueCollectionStage::perform (int stage, Messages& messages)
{
const CSMWorld::Record<ESM::Dialogue>& topic = mTopics.getRecord (stage);
CSMWorld::RecordBase::State state = topic.mState;
if (state==CSMWorld::RecordBase::State_Deleted)
{
// if the topic is deleted, we do not need to bother with INFO records.
/// \todo wrote record with delete flag
return;
}
// Test, if we need to save anything associated info records.
bool infoModified = false;
CSMWorld::InfoCollection::Range range = mInfos.getTopicRange (topic.get().mId);
for (CSMWorld::InfoCollection::RecordConstIterator iter (range.first); iter!=range.second; ++iter)
{
CSMWorld::RecordBase::State state = iter->mState;
if (state==CSMWorld::RecordBase::State_Modified ||
state==CSMWorld::RecordBase::State_ModifiedOnly ||
state==CSMWorld::RecordBase::State_Deleted)
{
infoModified = true;
break;
}
}
if (state==CSMWorld::RecordBase::State_Modified ||
state==CSMWorld::RecordBase::State_ModifiedOnly ||
infoModified)
{
mState.getWriter().startRecord (topic.mModified.sRecordId);
mState.getWriter().writeHNCString ("NAME", topic.mModified.mId);
topic.mModified.save (mState.getWriter());
mState.getWriter().endRecord (topic.mModified.sRecordId);
// write modified selected info records
for (CSMWorld::InfoCollection::RecordConstIterator iter (range.first); iter!=range.second;
++iter)
{
CSMWorld::RecordBase::State state = iter->mState;
if (state==CSMWorld::RecordBase::State_Deleted)
{
/// \todo wrote record with delete flag
}
else if (state==CSMWorld::RecordBase::State_Modified ||
state==CSMWorld::RecordBase::State_ModifiedOnly)
{
ESM::DialInfo info = iter->get();
info.mId = info.mId.substr (info.mId.find_last_of ('#')+1);
if (iter!=range.first)
{
CSMWorld::InfoCollection::RecordConstIterator prev = iter;
--prev;
info.mPrev =
prev->mModified.mId.substr (prev->mModified.mId.find_last_of ('#')+1);
}
CSMWorld::InfoCollection::RecordConstIterator next = iter;
++next;
if (next!=range.second)
{
info.mNext =
next->mModified.mId.substr (next->mModified.mId.find_last_of ('#')+1);
}
mState.getWriter().startRecord (info.sRecordId);
mState.getWriter().writeHNCString ("INAM", info.mId);
info.save (mState.getWriter());
mState.getWriter().endRecord (info.sRecordId);
}
}
}
}
CSMDoc::WriteRefIdCollectionStage::WriteRefIdCollectionStage (Document& document, SavingState& state)
: mDocument (document), mState (state)
{}
int CSMDoc::WriteRefIdCollectionStage::setup()
{
return mDocument.getData().getReferenceables().getSize();
}
void CSMDoc::WriteRefIdCollectionStage::perform (int stage, Messages& messages)
{
mDocument.getData().getReferenceables().save (stage, mState.getWriter());
}
CSMDoc::WriteFilterStage::WriteFilterStage (Document& document, SavingState& state,
CSMFilter::Filter::Scope scope)
: WriteCollectionStage<CSMWorld::IdCollection<CSMFilter::Filter> > (document.getData().getFilters(),
state),
mDocument (document), mScope (scope)
{}
void CSMDoc::WriteFilterStage::perform (int stage, Messages& messages)
{
const CSMWorld::Record<CSMFilter::Filter>& record =
mDocument.getData().getFilters().getRecord (stage);
if (record.get().mScope==mScope)
WriteCollectionStage<CSMWorld::IdCollection<CSMFilter::Filter> >::perform (stage, messages);
}
CSMDoc::CollectionReferencesStage::CollectionReferencesStage (Document& document,
SavingState& state)
: mDocument (document), mState (state)
{}
int CSMDoc::CollectionReferencesStage::setup()
{
mState.getSubRecords().clear();
int size = mDocument.getData().getReferences().getSize();
int steps = size/100;
if (size%100) ++steps;
return steps;
}
void CSMDoc::CollectionReferencesStage::perform (int stage, Messages& messages)
{
int size = mDocument.getData().getReferences().getSize();
for (int i=stage*100; i<stage*100+100 && i<size; ++i)
{
const CSMWorld::Record<CSMWorld::CellRef>& record =
mDocument.getData().getReferences().getRecord (i);
if (record.mState==CSMWorld::RecordBase::State_Deleted ||
record.mState==CSMWorld::RecordBase::State_Modified ||
record.mState==CSMWorld::RecordBase::State_ModifiedOnly)
{
mState.getSubRecords()[Misc::StringUtils::lowerCase (record.get().mCell)]
.push_back (i);
}
}
}
CSMDoc::WriteCellCollectionStage::WriteCellCollectionStage (Document& document,
SavingState& state)
: mDocument (document), mState (state)
{}
int CSMDoc::WriteCellCollectionStage::setup()
{
return mDocument.getData().getCells().getSize();
}
void CSMDoc::WriteCellCollectionStage::perform (int stage, Messages& messages)
{
const CSMWorld::Record<CSMWorld::Cell>& cell =
mDocument.getData().getCells().getRecord (stage);
std::map<std::string, std::vector<int> >::const_iterator references =
mState.getSubRecords().find (Misc::StringUtils::lowerCase (cell.get().mId));
if (cell.mState==CSMWorld::RecordBase::State_Modified ||
cell.mState==CSMWorld::RecordBase::State_ModifiedOnly ||
references!=mState.getSubRecords().end())
{
bool interior = cell.get().mId.substr (0, 1)!="#";
// write cell data
mState.getWriter().startRecord (cell.mModified.sRecordId);
mState.getWriter().writeHNOCString ("NAME", cell.get().mName);
ESM::Cell cell2 = cell.get();
if (interior)
cell2.mData.mFlags |= ESM::Cell::Interior;
else
{
cell2.mData.mFlags &= ~ESM::Cell::Interior;
std::istringstream stream (cell.get().mId.c_str());
char ignore;
stream >> ignore >> cell2.mData.mX >> cell2.mData.mY;
}
cell2.save (mState.getWriter());
// write references
if (references!=mState.getSubRecords().end())
{
// first pass: find highest RefNum
int lastRefNum = -1;
for (std::vector<int>::const_iterator iter (references->second.begin());
iter!=references->second.end(); ++iter)
{
const CSMWorld::Record<CSMWorld::CellRef>& ref =
mDocument.getData().getReferences().getRecord (*iter);
if (ref.get().mRefNum.mContentFile==0 && ref.get().mRefNum.mIndex>lastRefNum)
lastRefNum = ref.get().mRefNum.mIndex;
}
// second pass: write
for (std::vector<int>::const_iterator iter (references->second.begin());
iter!=references->second.end(); ++iter)
{
const CSMWorld::Record<CSMWorld::CellRef>& ref =
mDocument.getData().getReferences().getRecord (*iter);
if (ref.mState==CSMWorld::RecordBase::State_Modified ||
ref.mState==CSMWorld::RecordBase::State_ModifiedOnly)
{
if (ref.get().mRefNum.mContentFile==-2)
{
if (lastRefNum>=0xffffff)
throw std::runtime_error (
"RefNums exhausted in cell: " + cell.get().mId);
ESM::CellRef ref2 = ref.get();
ref2.mRefNum.mContentFile = 0;
ref2.mRefNum.mIndex = ++lastRefNum;
ref2.save (mState.getWriter());
}
else
ref.get().save (mState.getWriter());
}
else if (ref.mState==CSMWorld::RecordBase::State_Deleted)
{
/// \todo write record with delete flag
}
}
}
mState.getWriter().endRecord (cell.mModified.sRecordId);
}
else if (cell.mState==CSMWorld::RecordBase::State_Deleted)
{
/// \todo write record with delete flag
}
}
CSMDoc::CloseSaveStage::CloseSaveStage (SavingState& state)
: mState (state)
{}
int CSMDoc::CloseSaveStage::setup()
{
return 1;
}
void CSMDoc::CloseSaveStage::perform (int stage, Messages& messages)
{
mState.getStream().close();
if (!mState.getStream())
throw std::runtime_error ("saving failed");
}
CSMDoc::FinalSavingStage::FinalSavingStage (Document& document, SavingState& state)
: mDocument (document), mState (state)
{}
int CSMDoc::FinalSavingStage::setup()
{
return 1;
}
void CSMDoc::FinalSavingStage::perform (int stage, Messages& messages)
{
if (mState.hasError())
{
mState.getWriter().close();
mState.getStream().close();
if (boost::filesystem::exists (mState.getTmpPath()))
boost::filesystem::remove (mState.getTmpPath());
}
else if (!mState.isProjectFile())
{
if (boost::filesystem::exists (mState.getPath()))
boost::filesystem::remove (mState.getPath());
boost::filesystem::rename (mState.getTmpPath(), mState.getPath());
mDocument.getUndoStack().setClean();
}
}
+233
View File
@@ -0,0 +1,233 @@
#ifndef CSM_DOC_SAVINGSTAGES_H
#define CSM_DOC_SAVINGSTAGES_H
#include "stage.hpp"
#include "../world/record.hpp"
#include "../world/idcollection.hpp"
#include "../filter/filter.hpp"
#include "savingstate.hpp"
namespace ESM
{
struct Dialogue;
}
namespace CSMWorld
{
class InfoCollection;
}
namespace CSMDoc
{
class Document;
class SavingState;
class OpenSaveStage : public Stage
{
Document& mDocument;
SavingState& mState;
bool mProjectFile;
public:
OpenSaveStage (Document& document, SavingState& state, bool projectFile);
///< \param projectFile Saving the project file instead of the content file.
virtual int setup();
///< \return number of steps
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
class WriteHeaderStage : public Stage
{
Document& mDocument;
SavingState& mState;
bool mSimple;
public:
WriteHeaderStage (Document& document, SavingState& state, bool simple);
///< \param simple Simplified header (used for project files).
virtual int setup();
///< \return number of steps
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
template<class CollectionT>
class WriteCollectionStage : public Stage
{
const CollectionT& mCollection;
SavingState& mState;
public:
WriteCollectionStage (const CollectionT& collection, SavingState& state);
virtual int setup();
///< \return number of steps
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
template<class CollectionT>
WriteCollectionStage<CollectionT>::WriteCollectionStage (const CollectionT& collection,
SavingState& state)
: mCollection (collection), mState (state)
{}
template<class CollectionT>
int WriteCollectionStage<CollectionT>::setup()
{
return mCollection.getSize();
}
template<class CollectionT>
void WriteCollectionStage<CollectionT>::perform (int stage, Messages& messages)
{
CSMWorld::RecordBase::State state = mCollection.getRecord (stage).mState;
if (state==CSMWorld::RecordBase::State_Modified ||
state==CSMWorld::RecordBase::State_ModifiedOnly)
{
std::string type;
for (int i=0; i<4; ++i)
/// \todo make endianess agnostic (change ESMWriter interface?)
type += reinterpret_cast<const char *> (&mCollection.getRecord (stage).mModified.sRecordId)[i];
mState.getWriter().startRecord (mCollection.getRecord (stage).mModified.sRecordId);
mState.getWriter().writeHNCString ("NAME", mCollection.getId (stage));
mCollection.getRecord (stage).mModified.save (mState.getWriter());
mState.getWriter().endRecord (mCollection.getRecord (stage).mModified.sRecordId);
}
else if (state==CSMWorld::RecordBase::State_Deleted)
{
/// \todo write record with delete flag
}
}
class WriteDialogueCollectionStage : public Stage
{
Document& mDocument;
SavingState& mState;
const CSMWorld::IdCollection<ESM::Dialogue>& mTopics;
CSMWorld::InfoCollection& mInfos;
public:
WriteDialogueCollectionStage (Document& document, SavingState& state, bool journal);
virtual int setup();
///< \return number of steps
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
class WriteRefIdCollectionStage : public Stage
{
Document& mDocument;
SavingState& mState;
public:
WriteRefIdCollectionStage (Document& document, SavingState& state);
virtual int setup();
///< \return number of steps
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
class WriteFilterStage : public WriteCollectionStage<CSMWorld::IdCollection<CSMFilter::Filter> >
{
Document& mDocument;
CSMFilter::Filter::Scope mScope;
public:
WriteFilterStage (Document& document, SavingState& state, CSMFilter::Filter::Scope scope);
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
class CollectionReferencesStage : public Stage
{
Document& mDocument;
SavingState& mState;
public:
CollectionReferencesStage (Document& document, SavingState& state);
virtual int setup();
///< \return number of steps
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
class WriteCellCollectionStage : public Stage
{
Document& mDocument;
SavingState& mState;
public:
WriteCellCollectionStage (Document& document, SavingState& state);
virtual int setup();
///< \return number of steps
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
class CloseSaveStage : public Stage
{
SavingState& mState;
public:
CloseSaveStage (SavingState& state);
virtual int setup();
///< \return number of steps
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
class FinalSavingStage : public Stage
{
Document& mDocument;
SavingState& mState;
public:
FinalSavingStage (Document& document, SavingState& state);
virtual int setup();
///< \return number of steps
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this stage will be appended to \a messages.
};
}
#endif
+70
View File
@@ -0,0 +1,70 @@
#include "savingstate.hpp"
#include "operation.hpp"
#include "document.hpp"
CSMDoc::SavingState::SavingState (Operation& operation, const boost::filesystem::path& projectPath,
ToUTF8::FromType encoding)
: mOperation (operation), mEncoder (encoding), mProjectPath (projectPath), mProjectFile (false)
{
mWriter.setEncoder (&mEncoder);
}
bool CSMDoc::SavingState::hasError() const
{
return mOperation.hasError();
}
void CSMDoc::SavingState::start (Document& document, bool project)
{
mProjectFile = project;
if (mStream.is_open())
mStream.close();
mStream.clear();
mSubRecords.clear();
if (project)
mPath = mProjectPath;
else
mPath = document.getSavePath();
boost::filesystem::path file (mPath.filename().string() + ".tmp");
mTmpPath = mPath.parent_path();
mTmpPath /= file;
}
const boost::filesystem::path& CSMDoc::SavingState::getPath() const
{
return mPath;
}
const boost::filesystem::path& CSMDoc::SavingState::getTmpPath() const
{
return mTmpPath;
}
boost::filesystem::ofstream& CSMDoc::SavingState::getStream()
{
return mStream;
}
ESM::ESMWriter& CSMDoc::SavingState::getWriter()
{
return mWriter;
}
bool CSMDoc::SavingState::isProjectFile() const
{
return mProjectFile;
}
std::map<std::string, std::vector<int> >& CSMDoc::SavingState::getSubRecords()
{
return mSubRecords;
}
+58
View File
@@ -0,0 +1,58 @@
#ifndef CSM_DOC_SAVINGSTATE_H
#define CSM_DOC_SAVINGSTATE_H
#include <fstream>
#include <map>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp>
#include <components/esm/esmwriter.hpp>
#include <components/to_utf8/to_utf8.hpp>
namespace CSMDoc
{
class Operation;
class Document;
class SavingState
{
Operation& mOperation;
boost::filesystem::path mPath;
boost::filesystem::path mTmpPath;
ToUTF8::Utf8Encoder mEncoder;
boost::filesystem::ofstream mStream;
ESM::ESMWriter mWriter;
boost::filesystem::path mProjectPath;
bool mProjectFile;
std::map<std::string, std::vector<int> > mSubRecords; // record ID, list of subrecords
public:
SavingState (Operation& operation, const boost::filesystem::path& projectPath,
ToUTF8::FromType encoding);
bool hasError() const;
void start (Document& document, bool project);
///< \param project Save project file instead of content file.
const boost::filesystem::path& getPath() const;
const boost::filesystem::path& getTmpPath() const;
boost::filesystem::ofstream& getStream();
ESM::ESMWriter& getWriter();
bool isProjectFile() const;
///< Currently saving project file? (instead of content file)
std::map<std::string, std::vector<int> >& getSubRecords();
};
}
#endif
+4
View File
@@ -0,0 +1,4 @@
#include "stage.hpp"
CSMDoc::Stage::~Stage() {}
+28
View File
@@ -0,0 +1,28 @@
#ifndef CSM_DOC_STAGE_H
#define CSM_DOC_STAGE_H
#include <vector>
#include <string>
#include "../world/universalid.hpp"
namespace CSMDoc
{
class Stage
{
public:
typedef std::vector<std::pair<CSMWorld::UniversalId, std::string> > Messages;
virtual ~Stage();
virtual int setup() = 0;
///< \return number of steps
virtual void perform (int stage, Messages& messages) = 0;
///< Messages resulting from this stage will be appended to \a messages.
};
}
#endif
+11 -10
View File
@@ -3,17 +3,18 @@
namespace CSMDoc
{
enum State
{
State_Modified = 1,
State_Locked = 2,
State_Operation = 4,
enum State
{
State_Modified = 1,
State_Locked = 2,
State_Operation = 4,
State_Saving = 8,
State_Verifying = 16,
State_Compiling = 32, // not implemented yet
State_Searching = 64 // not implemented yet
};
State_Saving = 8,
State_Verifying = 16,
State_Compiling = 32, // not implemented yet
State_Searching = 64, // not implemented yet
State_Loading = 128 // pseudo-state; can not be encountered in a loaded document
};
}
#endif
+1 -1
View File
@@ -7,7 +7,7 @@ CSMFilter::AndNode::AndNode (const std::vector<boost::shared_ptr<Node> >& nodes)
: NAryNode (nodes, "and")
{}
bool CSMFilter::AndNode::test (const CSMWorld::IdTable& table, int row,
bool CSMFilter::AndNode::test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const
{
int size = getSize();
+1 -3
View File
@@ -7,13 +7,11 @@ namespace CSMFilter
{
class AndNode : public NAryNode
{
bool mAnd;
public:
AndNode (const std::vector<boost::shared_ptr<Node> >& nodes);
virtual bool test (const CSMWorld::IdTable& table, int row,
virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const;
///< \return Can the specified table row pass through to filter?
/// \param columns column ID to column index mapping
+1 -1
View File
@@ -3,7 +3,7 @@
CSMFilter::BooleanNode::BooleanNode (bool true_) : mTrue (true_) {}
bool CSMFilter::BooleanNode::test (const CSMWorld::IdTable& table, int row,
bool CSMFilter::BooleanNode::test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const
{
return mTrue;
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CSMFilter
BooleanNode (bool true_);
virtual bool test (const CSMWorld::IdTable& table, int row,
virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const;
///< \return Can the specified table row pass through to filter?
/// \param columns column ID to column index mapping
+2 -2
View File
@@ -11,7 +11,7 @@
namespace CSMWorld
{
class IdTable;
class IdTableBase;
}
namespace CSMFilter
@@ -32,7 +32,7 @@ namespace CSMFilter
virtual ~Node();
virtual bool test (const CSMWorld::IdTable& table, int row,
virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const = 0;
///< \return Can the specified table row pass through to filter?
/// \param columns column ID to column index mapping
+1 -1
View File
@@ -3,7 +3,7 @@
CSMFilter::NotNode::NotNode (boost::shared_ptr<Node> child) : UnaryNode (child, "not") {}
bool CSMFilter::NotNode::test (const CSMWorld::IdTable& table, int row,
bool CSMFilter::NotNode::test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const
{
return !getChild().test (table, row, columns);
+1 -1
View File
@@ -11,7 +11,7 @@ namespace CSMFilter
NotNode (boost::shared_ptr<Node> child);
virtual bool test (const CSMWorld::IdTable& table, int row,
virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const;
///< \return Can the specified table row pass through to filter?
/// \param columns column ID to column index mapping
+1 -1
View File
@@ -7,7 +7,7 @@ CSMFilter::OrNode::OrNode (const std::vector<boost::shared_ptr<Node> >& nodes)
: NAryNode (nodes, "or")
{}
bool CSMFilter::OrNode::test (const CSMWorld::IdTable& table, int row,
bool CSMFilter::OrNode::test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const
{
int size = getSize();
+1 -3
View File
@@ -7,13 +7,11 @@ namespace CSMFilter
{
class OrNode : public NAryNode
{
bool mAnd;
public:
OrNode (const std::vector<boost::shared_ptr<Node> >& nodes);
virtual bool test (const CSMWorld::IdTable& table, int row,
virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const;
///< \return Can the specified table row pass through to filter?
/// \param columns column ID to column index mapping
+58 -31
View File
@@ -49,19 +49,31 @@ namespace CSMFilter
Token (Type type = Type_None);
Token (Type type, const std::string& string);
///< Non-string type that can also be interpreted as a string.
Token (const std::string& string);
Token (double number);
operator bool() const;
bool isString() const;
};
Token::Token (Type type) : mType (type) {}
Token::Token (Type type) : mType (type), mNumber(0.0) {}
Token::Token (const std::string& string) : mType (Type_String), mString (string) {}
Token::Token (Type type, const std::string& string) : mType (type), mString (string), mNumber(0.0) {}
Token::Token (const std::string& string) : mType (Type_String), mString (string), mNumber(0.0) {}
Token::Token (double number) : mType (Type_Number), mNumber (number) {}
bool Token::isString() const
{
return mType==Type_String || mType>=Type_Keyword_True;
}
Token::operator bool() const
{
return mType!=Type_None;
@@ -120,7 +132,7 @@ CSMFilter::Token CSMFilter::Parser::getStringToken()
}
if (string[0]=='"')
string = string.substr (1, string.size()-2);
return string.substr (1, string.size()-2);
}
return checkKeywords (string);
@@ -182,7 +194,7 @@ CSMFilter::Token CSMFilter::Parser::checkKeywords (const Token& token)
for (int i=0; sKeywords[i]; ++i)
if (sKeywords[i]==string || (string.size()==1 && sKeywords[i][0]==string[0]))
return Token (static_cast<Token::Type> (i+Token::Type_Keyword_True));
return Token (static_cast<Token::Type> (i+Token::Type_Keyword_True), token.mString);
return token;
}
@@ -351,7 +363,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
if (static_cast<int> (token.mNumber)==token.mNumber)
columnId = static_cast<int> (token.mNumber);
}
else if (token.mType==Token::Type_String)
else if (token.isString())
{
columnId = CSMWorld::Columns::getId (token.mString);
}
@@ -373,7 +385,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
// parse text pattern
token = getNextToken();
if (token.mType!=Token::Type_String)
if (!token.isString())
{
error();
return boost::shared_ptr<Node>();
@@ -415,7 +427,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
if (static_cast<int> (token.mNumber)==token.mNumber)
columnId = static_cast<int> (token.mNumber);
}
else if (token.mType==Token::Type_String)
else if (token.isString())
{
columnId = CSMWorld::Columns::getId (token.mString);
}
@@ -437,22 +449,22 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
// parse value
double lower = 0;
double upper = 0;
bool min = false;
bool max = false;
ValueNode::Type lowerType = ValueNode::Type_Open;
ValueNode::Type upperType = ValueNode::Type_Open;
token = getNextToken();
if (token.mType==Token::Type_Number)
{
// single value
min = max = true;
lower = upper = token.mNumber;
lowerType = upperType = ValueNode::Type_Closed;
}
else
{
// interval
if (token.mType==Token::Type_OpenSquare)
min = true;
lowerType = ValueNode::Type_Closed;
else if (token.mType!=Token::Type_CloseSquare && token.mType!=Token::Type_Open)
{
error();
@@ -461,17 +473,23 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
token = getNextToken();
if (token.mType!=Token::Type_Number)
if (token.mType==Token::Type_Number)
{
error();
return boost::shared_ptr<Node>();
lower = token.mNumber;
token = getNextToken();
if (token.mType!=Token::Type_Comma)
{
error();
return boost::shared_ptr<Node>();
}
}
lower = token.mNumber;
token = getNextToken();
if (token.mType!=Token::Type_Comma)
else if (token.mType==Token::Type_Comma)
{
lowerType = ValueNode::Type_Infinite;
}
else
{
error();
return boost::shared_ptr<Node>();
@@ -479,18 +497,20 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
token = getNextToken();
if (token.mType!=Token::Type_Number)
if (token.mType==Token::Type_Number)
{
error();
return boost::shared_ptr<Node>();
upper = token.mNumber;
token = getNextToken();
}
upper = token.mNumber;
token = getNextToken();
else
upperType = ValueNode::Type_Infinite;
if (token.mType==Token::Type_CloseSquare)
max = true;
{
if (upperType!=ValueNode::Type_Infinite)
upperType = ValueNode::Type_Closed;
}
else if (token.mType!=Token::Type_OpenSquare && token.mType!=Token::Type_Close)
{
error();
@@ -506,7 +526,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
return boost::shared_ptr<Node>();
}
return boost::shared_ptr<Node> (new ValueNode (columnId, lower, upper, min, max));
return boost::shared_ptr<Node> (new ValueNode (columnId, lowerType, upperType, lower, upper));
}
void CSMFilter::Parser::error()
@@ -530,7 +550,12 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined)
if (allowPredefined)
token = getNextToken();
if (!allowPredefined || token==Token (Token::Type_OneShot))
if (allowPredefined && token==Token (Token::Type_EOS))
{
mFilter.reset();
return true;
}
else if (!allowPredefined || token==Token (Token::Type_OneShot))
{
boost::shared_ptr<Node> node = parseImp (true, token!=Token (Token::Type_OneShot));
@@ -553,6 +578,8 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined)
return true;
}
// We do not use isString() here, because there could be a pre-defined filter with an ID that is
// equal a filter keyword.
else if (token.mType==Token::Type_String && allowPredefined)
{
if (getNextToken()!=Token (Token::Type_EOS))
@@ -592,4 +619,4 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::getFilter() const
throw std::logic_error ("No filter available");
return mFilter;
}
}
+27 -4
View File
@@ -7,13 +7,13 @@
#include <QRegExp>
#include "../world/columns.hpp"
#include "../world/idtable.hpp"
#include "../world/idtablebase.hpp"
CSMFilter::TextNode::TextNode (int columnId, const std::string& text)
: mColumnId (columnId), mText (text)
{}
bool CSMFilter::TextNode::test (const CSMWorld::IdTable& table, int row,
bool CSMFilter::TextNode::test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const
{
const std::map<int, int>::const_iterator iter = columns.find (mColumnId);
@@ -28,13 +28,36 @@ bool CSMFilter::TextNode::test (const CSMWorld::IdTable& table, int row,
QVariant data = table.data (index);
if (data.type()!=QVariant::String)
QString string;
if (data.type()==QVariant::String)
{
string = data.toString();
}
else if ((data.type()==QVariant::Int || data.type()==QVariant::UInt) &&
CSMWorld::Columns::hasEnums (static_cast<CSMWorld::Columns::ColumnId> (mColumnId)))
{
int value = data.toInt();
std::vector<std::string> enums =
CSMWorld::Columns::getEnums (static_cast<CSMWorld::Columns::ColumnId> (mColumnId));
if (value>=0 && value<static_cast<int> (enums.size()))
string = QString::fromUtf8 (enums[value].c_str());
}
else if (data.type()==QVariant::Bool)
{
string = data.toBool() ? "true" : "false";
}
else if (mText.empty() && !data.isValid())
return true;
else
return false;
/// \todo make pattern syntax configurable
QRegExp regExp (QString::fromUtf8 (mText.c_str()), Qt::CaseInsensitive);
return regExp.exactMatch (data.toString());
return regExp.exactMatch (string);
}
std::vector<int> CSMFilter::TextNode::getReferencedColumns() const
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CSMFilter
TextNode (int columnId, const std::string& text);
virtual bool test (const CSMWorld::IdTable& table, int row,
virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const;
///< \return Can the specified table row pass through to filter?
/// \param columns column ID to column index mapping
+40 -14
View File
@@ -5,20 +5,19 @@
#include <stdexcept>
#include "../world/columns.hpp"
#include "../world/idtable.hpp"
#include "../world/idtablebase.hpp"
CSMFilter::ValueNode::ValueNode (int columnId,
double lower, double upper, bool min, bool max)
: mColumnId (columnId), mLower (lower), mUpper (upper), mMin (min), mMax (max)
{}
CSMFilter::ValueNode::ValueNode (int columnId, Type lowerType, Type upperType,
double lower, double upper)
: mColumnId (columnId), mLowerType (lowerType), mUpperType (upperType), mLower (lower), mUpper (upper){}
bool CSMFilter::ValueNode::test (const CSMWorld::IdTable& table, int row,
bool CSMFilter::ValueNode::test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const
{
const std::map<int, int>::const_iterator iter = columns.find (mColumnId);
if (iter==columns.end())
throw std::logic_error ("invalid column in test value test");
throw std::logic_error ("invalid column in value node test");
if (iter->second==-1)
return true;
@@ -28,15 +27,26 @@ bool CSMFilter::ValueNode::test (const CSMWorld::IdTable& table, int row,
QVariant data = table.data (index);
if (data.type()!=QVariant::Double && data.type()!=QVariant::Bool && data.type()!=QVariant::Int &&
data.type()!=QVariant::UInt)
data.type()!=QVariant::UInt && data.type()!=static_cast<QVariant::Type> (QMetaType::Float))
return false;
double value = data.toDouble();
if (mLower==mUpper && mMin && mMax)
return value==mLower;
switch (mLowerType)
{
case Type_Closed: if (value<mLower) return false; break;
case Type_Open: if (value<=mLower) return false; break;
case Type_Infinite: break;
}
return (mMin ? value>=mLower : value>mLower) && (mMax ? value<=mUpper : value<mUpper);
switch (mUpperType)
{
case Type_Closed: if (value>mUpper) return false; break;
case Type_Open: if (value>=mUpper) return false; break;
case Type_Infinite: break;
}
return true;
}
std::vector<int> CSMFilter::ValueNode::getReferencedColumns() const
@@ -58,12 +68,28 @@ std::string CSMFilter::ValueNode::toString (bool numericColumns) const
<< CSMWorld::Columns::getName (static_cast<CSMWorld::Columns::ColumnId> (mColumnId))
<< "\"";
stream << ", \"";
stream << ", ";
if (mLower==mUpper && mMin && mMax)
if (mLower==mUpper && mLowerType!=Type_Infinite && mUpperType!=Type_Infinite)
stream << mLower;
else
stream << (mMin ? "[" : "(") << mLower << ", " << mUpper << (mMax ? "]" : ")");
{
switch (mLowerType)
{
case Type_Closed: stream << "[" << mLower; break;
case Type_Open: stream << "(" << mLower; break;
case Type_Infinite: stream << "("; break;
}
stream << ", ";
switch (mUpperType)
{
case Type_Closed: stream << mUpper << "]"; break;
case Type_Open: stream << mUpper << ")"; break;
case Type_Infinite: stream << ")"; break;
}
}
stream << ")";
+13 -4
View File
@@ -7,18 +7,27 @@ namespace CSMFilter
{
class ValueNode : public LeafNode
{
public:
enum Type
{
Type_Closed, Type_Open, Type_Infinite
};
private:
int mColumnId;
std::string mText;
double mLower;
double mUpper;
bool mMin;
bool mMax;
Type mLowerType;
Type mUpperType;
public:
ValueNode (int columnId, double lower, double upper, bool min, bool max);
ValueNode (int columnId, Type lowerType, Type upperType, double lower, double upper);
virtual bool test (const CSMWorld::IdTable& table, int row,
virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const;
///< \return Can the specified table row pass through to filter?
/// \param columns column ID to column index mapping
+128
View File
@@ -0,0 +1,128 @@
#include "connector.hpp"
#include "../../view/settings/view.hpp"
#include "../../view/settings/page.hpp"
CSMSettings::Connector::Connector(CSVSettings::View *master,
QObject *parent)
: mMasterView (master), QObject(parent)
{}
void CSMSettings::Connector::addSlaveView (CSVSettings::View *view,
QList <QStringList> &masterProxyValues)
{
mSlaveViews.append (view);
mProxyListMap[view->viewKey()].append (masterProxyValues);
}
QList <QStringList> CSMSettings::Connector::getSlaveViewValues() const
{
QList <QStringList> list;
foreach (const CSVSettings::View *view, mSlaveViews)
list.append (view->selectedValues());
return list;
}
bool CSMSettings::Connector::proxyListsMatch (
const QList <QStringList> &list1,
const QList <QStringList> &list2) const
{
bool success = true;
for (int i = 0; i < list1.size(); i++)
{
success = stringListsMatch (list1.at(i), list2.at(i));
if (!success)
break;
}
return success;
}
void CSMSettings::Connector::slotUpdateMaster() const
{
//list of the current values for each slave.
QList <QStringList> slaveValueList = getSlaveViewValues();
int masterColumn = -1;
/*
* A row in the master view is one of the values in the
* master view's data model. This corresponds directly to the number of
* values in a proxy list contained in the ProxyListMap member.
* Thus, we iterate each "column" in the master proxy list
* (one for each vlaue in the master. Each column represents
* one master value's corresponding list of slave values. We examine
* each master value's list, comparing it to the current slave value list,
* stopping when we find a match using proxyListsMatch().
*
* If no match is found, clear the master view's value
*/
for (int i = 0; i < mMasterView->rowCount(); i++)
{
QList <QStringList> proxyValueList;
foreach (const QString &settingKey, mProxyListMap.keys())
{
// append the proxy value list stored in the i'th column
// for each setting key. A setting key is the id of the setting
// in page.name format.
proxyValueList.append (mProxyListMap.value(settingKey).at(i));
}
if (proxyListsMatch (slaveValueList, proxyValueList))
{
masterColumn = i;
break;
}
}
QString masterValue = mMasterView->value (masterColumn);
mMasterView->setSelectedValue (masterValue);
}
void CSMSettings::Connector::slotUpdateSlaves() const
{
int row = mMasterView->currentIndex();
if (row == -1)
return;
//iterate the proxy lists for the chosen master index
//and pass the list to each slave for updating
for (int i = 0; i < mSlaveViews.size(); i++)
{
QList <QStringList> proxyList =
mProxyListMap.value(mSlaveViews.at(i)->viewKey());
mSlaveViews.at(i)->setSelectedValues (proxyList.at(row));
}
}
bool CSMSettings::Connector::stringListsMatch (
const QStringList &list1,
const QStringList &list2) const
{
//returns a "sloppy" match, verifying that each list contains all the same
//items, though not necessarily in the same order.
if (list1.size() != list2.size())
return false;
QStringList tempList(list2);
//iterate each value in the list, removing one occurrence of the value in
//the other list. If no corresponding value is found, test fails
foreach (const QString &value, list1)
{
if (!tempList.contains(value))
return false;
tempList.removeOne(value);
}
return true;
}
+67
View File
@@ -0,0 +1,67 @@
#ifndef CSMSETTINGS_CONNECTOR_HPP
#define CSMSETTINGS_CONNECTOR_HPP
#include <QObject>
#include <QList>
#include <QMap>
#include <QStringList>
#include "support.hpp"
namespace CSVSettings {
class View;
}
namespace CSMSettings {
class Connector : public QObject
{
Q_OBJECT
CSVSettings::View *mMasterView;
///map using the view pointer as a key to it's index value
QList <CSVSettings::View *> mSlaveViews;
///list of proxy values for each master value.
///value list order is indexed to the master value index.
QMap < QString, QList <QStringList> > mProxyListMap;
public:
explicit Connector(CSVSettings::View *master,
QObject *parent = 0);
///Set the view which acts as a proxy for other setting views
void setMasterView (CSVSettings::View *view);
///Add a view to be updated / update to the master
void addSlaveView (CSVSettings::View *view,
QList <QStringList> &masterProxyValues);
private:
///loosely matches lists of proxy values across registered slaves
///against a proxy value list for a given master value
bool proxyListsMatch (const QList <QStringList> &list1,
const QList <QStringList> &list2) const;
///loosely matches two string lists
bool stringListsMatch (const QStringList &list1,
const QStringList &list2) const;
///retrieves current values of registered slave views
QList <QStringList> getSlaveViewValues() const;
public slots:
///updates slave views with proxy values associated with current
///master value
void slotUpdateSlaves() const;
///updates master value associated with the currently selected
///slave values, if applicable.
void slotUpdateMaster() const;
};
}
#endif // CSMSETTINGS_CONNECTOR_HPP
+391
View File
@@ -0,0 +1,391 @@
#include "setting.hpp"
#include "support.hpp"
CSMSettings::Setting::Setting(SettingType typ, const QString &settingName,
const QString &pageName)
: mIsEditorSetting (false)
{
buildDefaultSetting();
int settingType = static_cast <int> (typ);
//even-numbered setting types are multi-valued
if ((settingType % 2) == 0)
setProperty (Property_IsMultiValue, QVariant(true).toString());
//view type is related to setting type by an order of magnitude
setProperty (Property_SettingType, QVariant (settingType).toString());
setProperty (Property_Page, pageName);
setProperty (Property_Name, settingName);
}
void CSMSettings::Setting::buildDefaultSetting()
{
int arrLen = sizeof(sPropertyDefaults) / sizeof (*sPropertyDefaults);
for (int i = 0; i < arrLen; i++)
{
QStringList propertyList;
if (i <Property_DefaultValues)
propertyList.append (sPropertyDefaults[i]);
mProperties.append (propertyList);
}
}
void CSMSettings::Setting::addProxy (const Setting *setting,
const QStringList &vals)
{
if (serializable())
setSerializable (false);
QList <QStringList> list;
foreach (const QString &val, vals)
list << (QStringList() << val);
mProxies [setting->page() + '/' + setting->name()] = list;
}
void CSMSettings::Setting::addProxy (const Setting *setting,
const QList <QStringList> &list)
{
if (serializable())
setProperty (Property_Serializable, false);
mProxies [setting->page() + '/' + setting->name()] = list;
}
void CSMSettings::Setting::setColumnSpan (int value)
{
setProperty (Property_ColumnSpan, value);
}
int CSMSettings::Setting::columnSpan() const
{
return property (Property_ColumnSpan).at(0).toInt();
}
void CSMSettings::Setting::setDeclaredValues (QStringList list)
{
setProperty (Property_DeclaredValues, list);
}
QStringList CSMSettings::Setting::declaredValues() const
{
return property (Property_DeclaredValues);
}
QStringList CSMSettings::Setting::property (SettingProperty prop) const
{
if (prop >= mProperties.size())
return QStringList();
return mProperties.at(prop);
}
void CSMSettings::Setting::setDefaultValue (int value)
{
setDefaultValues (QStringList() << QVariant (value).toString());
}
void CSMSettings::Setting::setDefaultValue (double value)
{
setDefaultValues (QStringList() << QVariant (value).toString());
}
void CSMSettings::Setting::setDefaultValue (const QString &value)
{
setDefaultValues (QStringList() << value);
}
void CSMSettings::Setting::setDefaultValues (const QStringList &values)
{
setProperty (Property_DefaultValues, values);
}
QStringList CSMSettings::Setting::defaultValues() const
{
return property (Property_DefaultValues);
}
void CSMSettings::Setting::setDelimiter (const QString &value)
{
setProperty (Property_Delimiter, value);
}
QString CSMSettings::Setting::delimiter() const
{
return property (Property_Delimiter).at(0);
}
void CSMSettings::Setting::setEditorSetting(bool state)
{
mIsEditorSetting = true;
}
bool CSMSettings::Setting::isEditorSetting() const
{
return mIsEditorSetting;
}
void CSMSettings::Setting::setIsMultiLine (bool state)
{
setProperty (Property_IsMultiLine, state);
}
bool CSMSettings::Setting::isMultiLine() const
{
return (property (Property_IsMultiLine).at(0) == "true");
}
void CSMSettings::Setting::setIsMultiValue (bool state)
{
setProperty (Property_IsMultiValue, state);
}
bool CSMSettings::Setting::isMultiValue() const
{
return (property (Property_IsMultiValue).at(0) == "true");
}
const CSMSettings::ProxyValueMap &CSMSettings::Setting::proxyLists() const
{
return mProxies;
}
void CSMSettings::Setting::setSerializable (bool state)
{
setProperty (Property_Serializable, state);
}
bool CSMSettings::Setting::serializable() const
{
return (property (Property_Serializable).at(0) == "true");
}
void CSMSettings::Setting::setSpecialValueText(const QString &text)
{
setProperty (Property_SpecialValueText, text);
}
QString CSMSettings::Setting::specialValueText() const
{
return property (Property_SpecialValueText).at(0);
}
void CSMSettings::Setting::setName (const QString &value)
{
setProperty (Property_Name, value);
}
QString CSMSettings::Setting::name() const
{
return property (Property_Name).at(0);
}
void CSMSettings::Setting::setPage (const QString &value)
{
setProperty (Property_Page, value);
}
QString CSMSettings::Setting::page() const
{
return property (Property_Page).at(0);
}
void CSMSettings::Setting::setPrefix (const QString &value)
{
setProperty (Property_Prefix, value);
}
QString CSMSettings::Setting::prefix() const
{
return property (Property_Prefix).at(0);
}
void CSMSettings::Setting::setRowSpan (const int value)
{
setProperty (Property_RowSpan, value);
}
int CSMSettings::Setting::rowSpan () const
{
return property (Property_RowSpan).at(0).toInt();
}
void CSMSettings::Setting::setSingleStep (int value)
{
setProperty (Property_SingleStep, value);
}
void CSMSettings::Setting::setSingleStep (double value)
{
setProperty (Property_SingleStep, value);
}
QString CSMSettings::Setting::singleStep() const
{
return property (Property_SingleStep).at(0);
}
void CSMSettings::Setting::setSuffix (const QString &value)
{
setProperty (Property_Suffix, value);
}
QString CSMSettings::Setting::suffix() const
{
return property (Property_Suffix).at(0);
}
void CSMSettings::Setting::setTickInterval (int value)
{
setProperty (Property_TickInterval, value);
}
int CSMSettings::Setting::tickInterval () const
{
return property (Property_TickInterval).at(0).toInt();
}
void CSMSettings::Setting::setTicksAbove (bool state)
{
setProperty (Property_TicksAbove, state);
}
bool CSMSettings::Setting::ticksAbove() const
{
return (property (Property_TicksAbove).at(0) == "true");
}
void CSMSettings::Setting::setTicksBelow (bool state)
{
setProperty (Property_TicksBelow, state);
}
bool CSMSettings::Setting::ticksBelow() const
{
return (property (Property_TicksBelow).at(0) == "true");
}
void CSMSettings::Setting::setType (int settingType)
{
setProperty (Property_SettingType, settingType);
}
CSMSettings::SettingType CSMSettings::Setting::type() const
{
return static_cast <CSMSettings::SettingType> ( property (
Property_SettingType).at(0).toInt());
}
void CSMSettings::Setting::setMaximum (int value)
{
setProperty (Property_Maximum, value);
}
void CSMSettings::Setting::setMaximum (double value)
{
setProperty (Property_Maximum, value);
}
QString CSMSettings::Setting::maximum() const
{
return property (Property_Maximum).at(0);
}
void CSMSettings::Setting::setMinimum (int value)
{
setProperty (Property_Minimum, value);
}
void CSMSettings::Setting::setMinimum (double value)
{
setProperty (Property_Minimum, value);
}
QString CSMSettings::Setting::minimum() const
{
return property (Property_Minimum).at(0);
}
CSVSettings::ViewType CSMSettings::Setting::viewType() const
{
return static_cast <CSVSettings::ViewType> ( property (
Property_SettingType).at(0).toInt() / 10);
}
void CSMSettings::Setting::setViewColumn (int value)
{
setProperty (Property_ViewColumn, value);
}
int CSMSettings::Setting::viewColumn() const
{
return property (Property_ViewColumn).at(0).toInt();
}
void CSMSettings::Setting::setViewLocation (int row, int column)
{
setViewRow (row);
setViewColumn (column);
}
void CSMSettings::Setting::setViewRow (int value)
{
setProperty (Property_ViewRow, value);
}
int CSMSettings::Setting::viewRow() const
{
return property (Property_ViewRow).at(0).toInt();
}
void CSMSettings::Setting::setWidgetWidth (int value)
{
setProperty (Property_WidgetWidth, value);
}
int CSMSettings::Setting::widgetWidth() const
{
return property (Property_WidgetWidth).at(0).toInt();
}
void CSMSettings::Setting::setWrapping (bool state)
{
setProperty (Property_Wrapping, state);
}
bool CSMSettings::Setting::wrapping() const
{
return (property (Property_Wrapping).at(0) == "true");
}
void CSMSettings::Setting::setProperty (SettingProperty prop, bool value)
{
setProperty (prop, QStringList() << QVariant (value).toString());
}
void CSMSettings::Setting::setProperty (SettingProperty prop, int value)
{
setProperty (prop, QStringList() << QVariant (value).toString());
}
void CSMSettings::Setting::setProperty (SettingProperty prop, double value)
{
setProperty (prop, QStringList() << QVariant (value).toString());
}
void CSMSettings::Setting::setProperty (SettingProperty prop,
const QString &value)
{
setProperty (prop, QStringList() << value);
}
void CSMSettings::Setting::setProperty (SettingProperty prop,
const QStringList &value)
{
if (prop < mProperties.size())
mProperties.replace (prop, value);
}
+150
View File
@@ -0,0 +1,150 @@
#ifndef CSMSETTINGS_SETTING_HPP
#define CSMSETTINGS_SETTING_HPP
#include <QStringList>
#include <QMap>
#include "support.hpp"
namespace CSMSettings
{
//QString is the setting id in the form of "page/name"
//QList is a list of stringlists of proxy values.
//Order is important! Proxy stringlists are matched against
//master values by their position in the QList.
typedef QMap <QString, QList <QStringList> > ProxyValueMap;
///Setting class is the interface for the User Settings. It contains
///a great deal of boiler plate to provide the core API functions, as
///well as the property() functions which use enumeration to be iterable.
///This makes the Setting class capable of being manipulated by script.
///See CSMSettings::support.hpp for enumerations / string values.
class Setting
{
QList <QStringList> mProperties;
QStringList mDefaults;
bool mIsEditorSetting;
ProxyValueMap mProxies;
public:
explicit Setting(SettingType typ, const QString &settingName,
const QString &pageName);
void addProxy (const Setting *setting, const QStringList &vals);
void addProxy (const Setting *setting, const QList <QStringList> &list);
const QList <QStringList> &properties() const { return mProperties; }
const ProxyValueMap &proxies() const { return mProxies; }
void setColumnSpan (int value);
int columnSpan() const;
void setDeclaredValues (QStringList list);
QStringList declaredValues() const;
void setDefaultValue (int value);
void setDefaultValue (double value);
void setDefaultValue (const QString &value);
void setDefaultValues (const QStringList &values);
QStringList defaultValues() const;
void setDelimiter (const QString &value);
QString delimiter() const;
void setEditorSetting (bool state);
bool isEditorSetting() const;
void setIsMultiLine (bool state);
bool isMultiLine() const;
void setIsMultiValue (bool state);
bool isMultiValue() const;
void setMask (const QString &value);
QString mask() const;
void setMaximum (int value);
void setMaximum (double value);
QString maximum() const;
void setMinimum (int value);
void setMinimum (double value);
QString minimum() const;
void setName (const QString &value);
QString name() const;
void setPage (const QString &value);
QString page() const;
void setPrefix (const QString &value);
QString prefix() const;
void setRowSpan (const int value);
int rowSpan() const;
const ProxyValueMap &proxyLists() const;
void setSerializable (bool state);
bool serializable() const;
void setSpecialValueText (const QString &text);
QString specialValueText() const;
void setSingleStep (int value);
void setSingleStep (double value);
QString singleStep() const;
void setSuffix (const QString &value);
QString suffix() const;
void setTickInterval (int value);
int tickInterval() const;
void setTicksAbove (bool state);
bool ticksAbove() const;
void setTicksBelow (bool state);
bool ticksBelow() const;
void setViewColumn (int value);
int viewColumn() const;
void setViewLocation (int row = -1, int column = -1);
void setViewRow (int value);
int viewRow() const;
void setType (int settingType);
CSMSettings::SettingType type() const;
CSVSettings::ViewType viewType() const;
void setWrapping (bool state);
bool wrapping() const;
void setWidgetWidth (int value);
int widgetWidth() const;
///returns the specified property value
QStringList property (SettingProperty prop) const;
///boilerplate code to convert setting values of common types
void setProperty (SettingProperty prop, bool value);
void setProperty (SettingProperty prop, int value);
void setProperty (SettingProperty prop, double value);
void setProperty (SettingProperty prop, const QString &value);
void setProperty (SettingProperty prop, const QStringList &value);
void addProxy (Setting* setting,
QMap <QString, QStringList> &proxyMap);
protected:
void buildDefaultSetting();
};
}
#endif // CSMSETTINGS_SETTING_HPP
@@ -1,82 +0,0 @@
#include "settingcontainer.hpp"
#include <QStringList>
CSMSettings::SettingContainer::SettingContainer(QObject *parent) :
QObject(parent), mValue (0), mValues (0)
{
}
CSMSettings::SettingContainer::SettingContainer(const QString &value, QObject *parent) :
QObject(parent), mValue (new QString (value)), mValues (0)
{
}
void CSMSettings::SettingContainer::insert (const QString &value)
{
if (mValue)
{
mValues = new QStringList;
mValues->push_back (*mValue);
mValues->push_back (value);
delete mValue;
mValue = 0;
}
else
{
delete mValue;
mValue = new QString (value);
}
}
void CSMSettings::SettingContainer::update (const QString &value, int index)
{
if (isEmpty())
mValue = new QString(value);
else if (mValue)
*mValue = value;
else if (mValues)
mValues->replace(index, value);
}
QString CSMSettings::SettingContainer::getValue (int index) const
{
QString retVal("");
//if mValue is valid, it's a single-value property.
//ignore the index and return the value
if (mValue)
retVal = *mValue;
//otherwise, if it's a multivalued property
//return the appropriate value at the index
else if (mValues)
{
if (index == -1)
retVal = mValues->at(0);
else if (index < mValues->size())
retVal = mValues->at(index);
}
return retVal;
}
int CSMSettings::SettingContainer::count () const
{
int retVal = 0;
if (!isEmpty())
{
if (mValues)
retVal = mValues->size();
else
retVal = 1;
}
return retVal;
}
@@ -1,47 +0,0 @@
#ifndef SETTINGCONTAINER_HPP
#define SETTINGCONTAINER_HPP
#include <QObject>
class QStringList;
namespace CSMSettings
{
class SettingContainer : public QObject
{
Q_OBJECT
QString *mValue;
QStringList *mValues;
public:
explicit SettingContainer (QObject *parent = 0);
explicit SettingContainer (const QString &value, QObject *parent = 0);
/// add a value to the container
/// multiple values supported
void insert (const QString &value);
/// update an existing value
/// index specifies multiple values
void update (const QString &value, int index = 0);
/// return value at specified index
QString getValue (int index = -1) const;
/// retrieve list of all values
inline QStringList *getValues() const { return mValues; }
/// return size of list
int count() const;
/// test for empty container
/// useful for default-constructed containers returned by QMap when invalid key is passed
inline bool isEmpty() const { return (!mValue && !mValues); }
inline bool isMultiValue() const { return (mValues); }
};
}
#endif // SETTINGCONTAINER_HPP
-104
View File
@@ -1,104 +0,0 @@
#include "settingsitem.hpp"
#include <QStringList>
bool CSMSettings::SettingsItem::updateItem (const QStringList *values)
{
QStringList::ConstIterator it = values->begin();
//if the item is not multivalued,
//save the last value passed in the container
if (!mIsMultiValue)
{
it = values->end();
it--;
}
bool isValid = true;
QString value ("");
for (; it != values->end(); ++it)
{
value = *it;
isValid = validate(value);
//skip only the invalid values
if (!isValid)
continue;
insert(value);
}
return isValid;
}
bool CSMSettings::SettingsItem::updateItem (const QString &value)
{
//takes a value or a SettingsContainer and updates itself accordingly
//after validating the data against it's own definition
QString newValue = value;
if (!validate (newValue))
newValue = mDefaultValue;
bool success = (getValue() != newValue);
if (success)
{
if (mIsMultiValue)
insert (newValue);
else
update (newValue);
}
return success;
}
bool CSMSettings::SettingsItem::updateItem(int valueListIndex)
{
bool success = false;
if (mValueList)
{
if (mValueList->size() > valueListIndex)
success = updateItem (mValueList->at(valueListIndex));
}
return success;
}
bool CSMSettings::SettingsItem::validate (const QString &value)
{
//if there is no value list or value pair, there is no validation to do
bool isValid = !(!mValueList->isEmpty() || mValuePair);
if (!isValid && !mValueList->isEmpty())
{
for (QStringList::Iterator it = mValueList->begin(); it != mValueList->end(); ++it)
// foreach (QString listItem, *mValueList)
{
isValid = (value == *it);
if (isValid)
break;
}
}
else if (!isValid && mValuePair)
{
int numVal = value.toInt();
isValid = (numVal > mValuePair->left.toInt() && numVal < mValuePair->right.toInt());
}
return isValid;
}
void CSMSettings::SettingsItem::setDefaultValue (const QString &value)
{
mDefaultValue = value;
update (value);
}
QString CSMSettings::SettingsItem::getDefaultValue() const
{
return mDefaultValue;
}
@@ -1,63 +0,0 @@
#ifndef SETTINGSITEM_HPP
#define SETTINGSITEM_HPP
#include <QObject>
#include "support.hpp"
#include "settingcontainer.hpp"
namespace CSMSettings
{
/// Represents a setting including metadata
/// (valid values, ranges, defaults, and multivalue status
class SettingsItem : public SettingContainer
{
QStringPair *mValuePair;
QStringList *mValueList;
bool mIsMultiValue;
QString mDefaultValue;
public:
explicit SettingsItem(QString name, bool isMultiValue,
const QString& defaultValue, QObject *parent = 0)
: SettingContainer(defaultValue, parent),
mIsMultiValue (isMultiValue), mValueList (0),
mValuePair (0), mDefaultValue (defaultValue)
{
QObject::setObjectName(name);
}
/// updateItem overloads for updating setting value
/// provided a list of values (multi-valued),
/// a specific value
/// or an index value corresponding to the mValueList
bool updateItem (const QStringList *values);
bool updateItem (const QString &value);
bool updateItem (int valueListIndex);
/// retrieve list of valid values for setting
inline QStringList *getValueList() { return mValueList; }
/// write list of valid values for setting
inline void setValueList (QStringList *valueList) { mValueList = valueList; }
/// valuePair used for spin boxes (max / min)
inline QStringPair *getValuePair() { return mValuePair; }
/// set value range (spinbox / integer use)
inline void setValuePair (QStringPair valuePair) { mValuePair = new QStringPair(valuePair); }
inline bool isMultivalue () { return mIsMultiValue; }
void setDefaultValue (const QString &value);
QString getDefaultValue () const;
private:
/// Verifies that the supplied value is one of the following:
/// 1. Within the limits of the value pair (min / max)
/// 2. One of the values indicated in the value list
bool validate (const QString &value);
};
}
#endif // SETTINGSITEM_HPP
-1
View File
@@ -1 +0,0 @@
#include "support.hpp"
+134 -28
View File
@@ -1,39 +1,145 @@
#ifndef MODEL_SUPPORT_HPP
#define MODEL_SUPPORT_HPP
#ifndef SETTING_SUPPORT_HPP
#define SETTING_SUPPORT_HPP
#include <QObject>
#include <Qt>
#include <QPair>
#include <QList>
#include <QVariant>
#include <QStringList>
class QLayout;
class QWidget;
class QListWidgetItem;
//Enums
namespace CSMSettings
{
///Enumerated properties for scripting
enum SettingProperty
{
Property_Name = 0,
Property_Page = 1,
Property_SettingType = 2,
Property_IsMultiValue = 3,
Property_IsMultiLine = 4,
Property_WidgetWidth = 5,
Property_ViewRow = 6,
Property_ViewColumn = 7,
Property_Delimiter = 8,
Property_Serializable = 9,
Property_ColumnSpan = 10,
Property_RowSpan = 11,
Property_Minimum = 12,
Property_Maximum = 13,
Property_SpecialValueText = 14,
Property_Prefix = 15,
Property_Suffix = 16,
Property_SingleStep = 17,
Property_Wrapping = 18,
Property_TickInterval = 19,
Property_TicksAbove = 20,
Property_TicksBelow = 21,
//Stringlists should always be the last items
Property_DefaultValues = 22,
Property_DeclaredValues = 23,
Property_DefinedValues = 24,
Property_Proxies = 25
};
///Basic setting widget types.
enum SettingType
{
/*
* 0 - 9 - Boolean widgets
* 10-19 - List widgets
* 21-29 - Range widgets
* 31-39 - Text widgets
*
* Each range corresponds to a View_Type enum by a factor of 10.
*
* Even-numbered values are single-value widgets
* Odd-numbered values are multi-valued widgets
*/
Type_CheckBox = 0,
Type_RadioButton = 1,
Type_ListView = 10,
Type_ComboBox = 11,
Type_SpinBox = 21,
Type_DoubleSpinBox = 23,
Type_Slider = 25,
Type_Dial = 27,
Type_TextArea = 30,
Type_LineEdit = 31,
Type_Undefined = 40
};
}
namespace CSVSettings
{
///Categorical view types which encompass the setting widget types
enum ViewType
{
ViewType_Boolean = 0,
ViewType_List = 1,
ViewType_Range = 2,
ViewType_Text = 3,
ViewType_Undefined = 4
};
}
namespace CSMSettings
{
class SettingContainer;
typedef QList<SettingContainer *> SettingList;
typedef QMap<QString, SettingContainer *> SettingMap;
typedef QMap<QString, SettingMap *> SectionMap;
struct QStringPair
///used to construct default settings in the Setting class
struct PropertyDefaultValues
{
QStringPair(): left (""), right ("")
{}
int id;
QString name;
QVariant value;
};
QStringPair (const QString &leftValue, const QString &rightValue)
: left (leftValue), right(rightValue)
{}
///strings which correspond to setting values. These strings represent
///the script language keywords which would be used to declare setting
///views for 3rd party addons
const QString sPropertyNames[] =
{
"name", "page", "setting_type", "is_multi_value",
"is_multi_line", "widget_width", "view_row", "view_column", "delimiter",
"is_serializable","column_span", "row_span", "minimum", "maximum",
"special_value_text", "prefix", "suffix", "single_step", "wrapping",
"tick_interval", "ticks_above", "ticks_below",
"defaults", "declarations", "definitions", "proxies"
};
QStringPair (const QStringPair &pair)
: left (pair.left), right (pair.right)
{}
QString left;
QString right;
bool isEmpty() const
{ return (left.isEmpty() && right.isEmpty()); }
///Default values for a setting. Used in setting creation.
const QString sPropertyDefaults[] =
{
"", //name
"", //page
"40", //setting type
"false", //multivalue
"false", //multiline
"7", //widget width
"-1", //view row
"-1", //view column
",", //delimiter
"true", //serialized
"1", //column span
"1", //row span
"0", //value range
"0", //value minimum
"0", //value maximum
"", //special text
"", //prefix
"", //suffix
"false", //wrapping
"1", //tick interval
"false", //ticks above
"true", //ticks below
"", //default values
"", //declared values
"", //defined values
"" //proxy values
};
}
#endif // MODEL_SUPPORT_HPP
#endif // VIEW_SUPPORT_HPP
+346 -274
View File
@@ -1,19 +1,15 @@
#include "usersettings.hpp"
#include <QTextStream>
#include <QDir>
#include <QString>
#include <QRegExp>
#include <QMap>
#include <QMessageBox>
#include <QTextCodec>
#include <QSettings>
#include <QFile>
#include <components/files/configurationmanager.hpp>
#include "settingcontainer.hpp"
#include <boost/version.hpp>
#include "setting.hpp"
#include "support.hpp"
#include <QDebug>
/**
* Workaround for problems with whitespaces in paths in older versions of Boost library
*/
@@ -32,43 +28,250 @@ namespace boost
CSMSettings::UserSettings *CSMSettings::UserSettings::mUserSettingsInstance = 0;
CSMSettings::UserSettings::UserSettings()
CSMSettings::UserSettings::UserSettings (const Files::ConfigurationManager& configurationManager)
: mCfgMgr (configurationManager)
{
assert(!mUserSettingsInstance);
mUserSettingsInstance = this;
mReadWriteMessage = QObject::tr("<br><b>Could not open or create file for writing</b><br><br> \
Please make sure you have the right permissions and try again.<br>");
mSettingDefinitions = 0;
mReadOnlyMessage = QObject::tr("<br><b>Could not open file for reading</b><br><br> \
Please make sure you have the right permissions and try again.<br>");
buildEditorSettingDefaults();
buildSettingModelDefaults();
}
void CSMSettings::UserSettings::buildEditorSettingDefaults()
void CSMSettings::UserSettings::buildSettingModelDefaults()
{
SettingContainer *windowHeight = new SettingContainer("768", this);
SettingContainer *windowWidth = new SettingContainer("1024", this);
SettingContainer *rsDelegate = new SettingContainer("Icon and Text", this);
SettingContainer *refIdTypeDelegate = new SettingContainer("Icon and Text", this);
QString section = "Window Size";
{
Setting *width = createSetting (Type_LineEdit, section, "Width");
Setting *height = createSetting (Type_LineEdit, section, "Height");
windowHeight->setObjectName ("Height");
windowWidth->setObjectName ("Width");
rsDelegate->setObjectName ("Record Status Display");
refIdTypeDelegate->setObjectName ("Referenceable ID Type Display");
width->setWidgetWidth (5);
height->setWidgetWidth (8);
SettingMap *displayFormatMap = new SettingMap;
SettingMap *windowSizeMap = new SettingMap;
width->setDefaultValues (QStringList() << "1024");
height->setDefaultValues (QStringList() << "768");
displayFormatMap->insert (rsDelegate->objectName(), rsDelegate );
displayFormatMap->insert (refIdTypeDelegate->objectName(), refIdTypeDelegate);
width->setEditorSetting (true);
height->setEditorSetting (true);
windowSizeMap->insert (windowWidth->objectName(), windowWidth );
windowSizeMap->insert (windowHeight->objectName(), windowHeight );
height->setViewLocation (2,2);
width->setViewLocation (2,1);
mEditorSettingDefaults.insert ("Display Format", displayFormatMap);
mEditorSettingDefaults.insert ("Window Size", windowSizeMap);
/*
*Create the proxy setting for predefined values
*/
Setting *preDefined = createSetting (Type_ComboBox, section,
"Pre-Defined");
preDefined->setDeclaredValues (QStringList() << "640 x 480"
<< "800 x 600" << "1024 x 768" << "1440 x 900");
preDefined->setViewLocation (1, 1);
preDefined->setWidgetWidth (10);
preDefined->setColumnSpan (2);
preDefined->addProxy (width,
QStringList() << "640" << "800" << "1024" << "1440"
);
preDefined->addProxy (height,
QStringList() << "480" << "600" << "768" << "900"
);
}
section = "Display Format";
{
QString defaultValue = "Icon and Text";
QStringList values = QStringList()
<< defaultValue << "Icon Only" << "Text Only";
Setting *rsd = createSetting (Type_RadioButton,
section, "Record Status Display");
Setting *ritd = createSetting (Type_RadioButton,
section, "Referenceable ID Type Display");
rsd->setDeclaredValues (values);
ritd->setDeclaredValues (values);
rsd->setEditorSetting (true);
ritd->setEditorSetting (true);
}
section = "Proxy Selection Test";
{
/******************************************************************
* There are three types of values:
*
* Declared values
*
* Pre-determined values, typically for
* combobox drop downs and boolean (radiobutton / checkbox) labels.
* These values represent the total possible list of values that
* may define a setting. No other values are allowed.
*
* Defined values
*
* Values which represent the actual, current value of
* a setting. For settings with declared values, this must be one
* or several declared values, as appropriate.
*
* Proxy values
* Values the proxy master updates the proxy slave when
* it's own definition is set / changed. These are definitions for
* proxy slave settings, but must match any declared values the
* proxy slave has, if any.
*******************************************************************/
/*
//create setting objects, specifying the basic widget type,
//the page name, and the view name
Setting *masterBoolean = createSetting (Type_RadioButton, section,
"Master Proxy");
Setting *slaveBoolean = createSetting (Type_CheckBox, section,
"Proxy Checkboxes");
Setting *slaveSingleText = createSetting (Type_LineEdit, section,
"Proxy TextBox 1");
Setting *slaveMultiText = createSetting (Type_LineEdit, section,
"ProxyTextBox 2");
Setting *slaveAlphaSpinbox = createSetting (Type_SpinBox, section,
"Alpha Spinbox");
Setting *slaveIntegerSpinbox = createSetting (Type_SpinBox, section,
"Int Spinbox");
Setting *slaveDoubleSpinbox = createSetting (Type_DoubleSpinBox,
section, "Double Spinbox");
Setting *slaveSlider = createSetting (Type_Slider, section, "Slider");
Setting *slaveDial = createSetting (Type_Dial, section, "Dial");
//set declared values for selected views
masterBoolean->setDeclaredValues (QStringList()
<< "Profile One" << "Profile Two"
<< "Profile Three" << "Profile Four");
slaveBoolean->setDeclaredValues (QStringList()
<< "One" << "Two" << "Three" << "Four" << "Five");
slaveAlphaSpinbox->setDeclaredValues (QStringList()
<< "One" << "Two" << "Three" << "Four");
masterBoolean->addProxy (slaveBoolean, QList <QStringList>()
<< (QStringList() << "One" << "Three")
<< (QStringList() << "One" << "Three")
<< (QStringList() << "One" << "Three" << "Five")
<< (QStringList() << "Two" << "Four")
);
masterBoolean->addProxy (slaveSingleText, QList <QStringList>()
<< (QStringList() << "Text A")
<< (QStringList() << "Text B")
<< (QStringList() << "Text A")
<< (QStringList() << "Text C")
);
masterBoolean->addProxy (slaveMultiText, QList <QStringList>()
<< (QStringList() << "One" << "Three")
<< (QStringList() << "One" << "Three")
<< (QStringList() << "One" << "Three" << "Five")
<< (QStringList() << "Two" << "Four")
);
masterBoolean->addProxy (slaveAlphaSpinbox, QList <QStringList>()
<< (QStringList() << "Four")
<< (QStringList() << "Three")
<< (QStringList() << "Two")
<< (QStringList() << "One"));
masterBoolean->addProxy (slaveIntegerSpinbox, QList <QStringList> ()
<< (QStringList() << "0")
<< (QStringList() << "7")
<< (QStringList() << "14")
<< (QStringList() << "21"));
masterBoolean->addProxy (slaveDoubleSpinbox, QList <QStringList> ()
<< (QStringList() << "0.17")
<< (QStringList() << "0.34")
<< (QStringList() << "0.51")
<< (QStringList() << "0.68"));
masterBoolean->addProxy (slaveSlider, QList <QStringList> ()
<< (QStringList() << "25")
<< (QStringList() << "50")
<< (QStringList() << "75")
<< (QStringList() << "100")
);
masterBoolean->addProxy (slaveDial, QList <QStringList> ()
<< (QStringList() << "25")
<< (QStringList() << "50")
<< (QStringList() << "75")
<< (QStringList() << "100")
);
//settings with proxies are not serialized by default
//other settings non-serialized for demo purposes
slaveBoolean->setSerializable (false);
slaveSingleText->setSerializable (false);
slaveMultiText->setSerializable (false);
slaveAlphaSpinbox->setSerializable (false);
slaveIntegerSpinbox->setSerializable (false);
slaveDoubleSpinbox->setSerializable (false);
slaveSlider->setSerializable (false);
slaveDial->setSerializable (false);
slaveBoolean->setDefaultValues (QStringList()
<< "One" << "Three" << "Five");
slaveSingleText->setDefaultValue ("Text A");
slaveMultiText->setDefaultValues (QStringList()
<< "One" << "Three" << "Five");
slaveSingleText->setWidgetWidth (24);
slaveMultiText->setWidgetWidth (24);
slaveAlphaSpinbox->setDefaultValue ("Two");
slaveAlphaSpinbox->setWidgetWidth (20);
//slaveAlphaSpinbox->setPrefix ("No. ");
//slaveAlphaSpinbox->setSuffix ("!");
slaveAlphaSpinbox->setWrapping (true);
slaveIntegerSpinbox->setDefaultValue (14);
slaveIntegerSpinbox->setMinimum (0);
slaveIntegerSpinbox->setMaximum (58);
slaveIntegerSpinbox->setPrefix ("$");
slaveIntegerSpinbox->setSuffix (".00");
slaveIntegerSpinbox->setWidgetWidth (10);
slaveIntegerSpinbox->setSpecialValueText ("Nothing!");
slaveDoubleSpinbox->setDefaultValue (0.51);
slaveDoubleSpinbox->setSingleStep(0.17);
slaveDoubleSpinbox->setMaximum(4.0);
slaveSlider->setMinimum (0);
slaveSlider->setMaximum (100);
slaveSlider->setDefaultValue (75);
slaveSlider->setWidgetWidth (100);
slaveSlider->setTicksAbove (true);
slaveSlider->setTickInterval (25);
slaveDial->setMinimum (0);
slaveDial->setMaximum (100);
slaveDial->setSingleStep (5);
slaveDial->setDefaultValue (75);
slaveDial->setTickInterval (25);
*/
}
}
CSMSettings::UserSettings::~UserSettings()
@@ -76,230 +279,62 @@ CSMSettings::UserSettings::~UserSettings()
mUserSettingsInstance = 0;
}
QTextStream *CSMSettings::UserSettings::openFileStream (const QString &filePath, bool isReadOnly) const
{
QIODevice::OpenMode openFlags = QIODevice::Text;
if (isReadOnly)
openFlags = QIODevice::ReadOnly | openFlags;
else
openFlags = QIODevice::ReadWrite | QIODevice::Truncate | openFlags;
QFile *file = new QFile(filePath);
QTextStream *stream = 0;
if (file->open(openFlags))
{
stream = new QTextStream(file);
stream->setCodec(QTextCodec::codecForName("UTF-8"));
}
return stream;
}
bool CSMSettings::UserSettings::writeSettings(QMap<QString, CSMSettings::SettingList *> &settings)
{
QTextStream *stream = openFileStream(mUserFilePath);
bool success = (stream);
if (success)
{
QList<QString> keyList = settings.keys();
foreach (QString key, keyList)
{
SettingList *sectionSettings = settings[key];
*stream << "[" << key << "]" << '\n';
foreach (SettingContainer *item, *sectionSettings)
*stream << item->objectName() << " = " << item->getValue() << '\n';
}
stream->device()->close();
delete stream;
stream = 0;
}
else
{
displayFileErrorMessage(mReadWriteMessage, false);
}
return (success);
}
const CSMSettings::SectionMap &CSMSettings::UserSettings::getSectionMap() const
{
return mSectionSettings;
}
const CSMSettings::SettingMap *CSMSettings::UserSettings::getSettings(const QString &sectionName) const
{
return getValidSettings(sectionName);
}
bool CSMSettings::UserSettings::loadFromFile(const QString &filePath)
{
if (filePath.isEmpty())
return false;
SectionMap loadedSettings;
QTextStream *stream = openFileStream (filePath, true);
bool success = (stream);
if (success)
{
//looks for a square bracket, "'\\["
//that has one or more "not nothing" in it, "([^]]+)"
//and is closed with a square bracket, "\\]"
QRegExp sectionRe("^\\[([^]]+)\\]");
//Find any character(s) that is/are not equal sign(s), "[^=]+"
//followed by an optional whitespace, an equal sign, and another optional whitespace, "\\s*=\\s*"
//and one or more periods, "(.+)"
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
CSMSettings::SettingMap *settings = 0;
QString section = "none";
while (!stream->atEnd())
{
QString line = stream->readLine().simplified();
if (line.isEmpty() || line.startsWith("#"))
continue;
//if a section is found, push it onto a new QStringList
//and push the QStringList onto
if (sectionRe.exactMatch(line))
{
//add the previous section's settings to the member map
if (settings)
loadedSettings.insert(section, settings);
//save new section and create a new list
section = sectionRe.cap(1);
settings = new SettingMap;
continue;
}
if (keyRe.indexIn(line) != -1)
{
SettingContainer *sc = new SettingContainer (keyRe.cap(2).simplified());
sc->setObjectName(keyRe.cap(1).simplified());
(*settings)[keyRe.cap(1).simplified()] = sc;
}
}
loadedSettings.insert(section, settings);
stream->device()->close();
delete stream;
stream = 0;
}
mergeMap (loadedSettings);
return success;
}
void CSMSettings::UserSettings::mergeMap (const CSMSettings::SectionMap &sectionSettings)
{
foreach (QString key, sectionSettings.uniqueKeys())
{
// insert entire section if it does not already exist in the loaded files
if (mSectionSettings.find(key) == mSectionSettings.end())
mSectionSettings.insert(key, sectionSettings.value(key));
else
{
SettingMap *passedSettings = sectionSettings.value(key);
SettingMap *settings = mSectionSettings.value(key);
foreach (QString key2, passedSettings->uniqueKeys())
{
//insert section settings individially if they do not already exist
if (settings->find(key2) == settings->end())
settings->insert(key2, passedSettings->value(key2));
else
{
settings->value(key2)->update(passedSettings->value(key2)->getValue());
}
}
}
}
}
void CSMSettings::UserSettings::loadSettings (const QString &fileName)
{
mSectionSettings.clear();
QString userFilePath = QString::fromUtf8
(mCfgMgr.getUserConfigPath().string().c_str());
//global
QString globalFilePath = QString::fromStdString(mCfgMgr.getGlobalPath().string()) + fileName;
bool globalOk = loadFromFile(globalFilePath);
QString globalFilePath = QString::fromUtf8
(mCfgMgr.getGlobalPath().string().c_str());
QString otherFilePath = globalFilePath;
//local
QString localFilePath = QString::fromStdString(mCfgMgr.getLocalPath().string()) + fileName;
bool localOk = loadFromFile(localFilePath);
//user
mUserFilePath = QString::fromStdString(mCfgMgr.getUserPath().string()) + fileName;
loadFromFile(mUserFilePath);
if (!(localOk || globalOk))
//test for local only if global fails (uninstalled copy)
if (!QFile (globalFilePath + fileName).exists())
{
QString message = QObject::tr("<br><b>Could not open user settings files for reading</b><br><br> \
Global and local settings files could not be read.\
You may have incorrect file permissions or the OpenCS installation may be corrupted.<br>");
message += QObject::tr("<br>Global filepath: ") + globalFilePath;
message += QObject::tr("<br>Local filepath: ") + localFilePath;
displayFileErrorMessage ( message, true);
//if global is invalid, use the local path
otherFilePath = QString::fromUtf8
(mCfgMgr.getLocalPath().string().c_str());
}
QSettings::setPath
(QSettings::IniFormat, QSettings::UserScope, userFilePath);
QSettings::setPath
(QSettings::IniFormat, QSettings::SystemScope, otherFilePath);
mSettingDefinitions = new QSettings
(QSettings::IniFormat, QSettings::UserScope, "opencs", QString(), this);
}
void CSMSettings::UserSettings::updateSettings (const QString &sectionName, const QString &settingName)
bool CSMSettings::UserSettings::hasSettingDefinitions
(const QString &viewKey) const
{
SettingMap *settings = getValidSettings(sectionName);
if (!settings)
return;
if (settingName.isEmpty())
{
foreach (const SettingContainer *setting, *settings)
emit signalUpdateEditorSetting (setting->objectName(), setting->getValue());
}
else
{
if (settings->find(settingName) != settings->end())
{
const SettingContainer *setting = settings->value(settingName);
emit signalUpdateEditorSetting (setting->objectName(), setting->getValue());
}
}
return (mSettingDefinitions->contains (viewKey));
}
QString CSMSettings::UserSettings::getSetting (const QString &section, const QString &setting) const
void CSMSettings::UserSettings::setDefinitions
(const QString &key, const QStringList &list)
{
SettingMap *settings = getValidSettings(section);
mSettingDefinitions->setValue (key, list);
}
QString retVal = "";
void CSMSettings::UserSettings::saveDefinitions() const
{
mSettingDefinitions->sync();
}
if (settings->find(setting) != settings->end())
retVal = settings->value(setting)->getValue();
QString CSMSettings::UserSettings::settingValue (const QString &settingKey)
{
if (!mSettingDefinitions->contains (settingKey))
return QString();
return retVal;
QStringList defs = mSettingDefinitions->value (settingKey).toStringList();
if (defs.isEmpty())
return QString();
return defs.at(0);
}
CSMSettings::UserSettings& CSMSettings::UserSettings::instance()
@@ -308,48 +343,85 @@ CSMSettings::UserSettings& CSMSettings::UserSettings::instance()
return *mUserSettingsInstance;
}
void CSMSettings::UserSettings::displayFileErrorMessage(const QString &message, bool isReadOnly)
void CSMSettings::UserSettings::updateUserSetting(const QString &settingKey,
const QStringList &list)
{
// File cannot be opened or created
QMessageBox msgBox;
msgBox.setWindowTitle(QObject::tr("OpenCS configuration file I/O error"));
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
mSettingDefinitions->setValue (settingKey ,list);
if (!isReadOnly)
msgBox.setText (mReadWriteMessage + message);
else
msgBox.setText (message);
msgBox.exec();
emit userSettingUpdated (settingKey, list);
}
CSMSettings::SettingMap *
CSMSettings::UserSettings::getValidSettings (const QString &sectionName) const
CSMSettings::Setting *CSMSettings::UserSettings::findSetting
(const QString &pageName, const QString &settingName)
{
SettingMap *settings = 0;
//copy the default values for the entire section if it's not found
if (mSectionSettings.find(sectionName) == mSectionSettings.end())
foreach (Setting *setting, mSettings)
{
if (mEditorSettingDefaults.find(sectionName) != mEditorSettingDefaults.end())
settings = mEditorSettingDefaults.value (sectionName);
}
//otherwise, iterate the section's settings, looking for missing values and replacing them with defaults.
else
{
SettingMap *loadedSettings = mSectionSettings[sectionName];
SettingMap *defaultSettings = mEditorSettingDefaults[sectionName];
foreach (QString key, defaultSettings->uniqueKeys())
if (setting->name() == settingName)
{
//write the default value to the loaded settings
if (loadedSettings->find((key))==loadedSettings->end())
loadedSettings->insert(key, defaultSettings->value(key));
if (setting->page() == pageName)
return setting;
}
}
return 0;
}
settings = mSectionSettings.value (sectionName);
void CSMSettings::UserSettings::removeSetting
(const QString &pageName, const QString &settingName)
{
if (mSettings.isEmpty())
return;
QList <Setting *>::iterator removeIterator = mSettings.begin();
while (removeIterator != mSettings.end())
{
if ((*removeIterator)->name() == settingName)
{
if ((*removeIterator)->page() == pageName)
{
mSettings.erase (removeIterator);
break;
}
}
removeIterator++;
}
}
CSMSettings::SettingPageMap CSMSettings::UserSettings::settingPageMap() const
{
SettingPageMap pageMap;
foreach (Setting *setting, mSettings)
pageMap[setting->page()].append (setting);
return pageMap;
}
CSMSettings::Setting *CSMSettings::UserSettings::createSetting
(CSMSettings::SettingType typ, const QString &page, const QString &name)
{
//get list of all settings for the current setting name
if (findSetting (page, name))
{
qWarning() << "Duplicate declaration encountered: "
<< (name + '/' + page);
return 0;
}
return settings;
Setting *setting = new Setting (typ, name, page);
//add declaration to the model
mSettings.append (setting);
return setting;
}
QStringList CSMSettings::UserSettings::definitions (const QString &viewKey) const
{
if (mSettingDefinitions->contains (viewKey))
return mSettingDefinitions->value (viewKey).toStringList();
return QStringList();
}
+44 -43
View File
@@ -1,13 +1,12 @@
#ifndef USERSETTINGS_HPP
#define USERSETTINGS_HPP
#include <QTextStream>
#include <QList>
#include <QStringList>
#include <QString>
#include <QMap>
#include <boost/filesystem/path.hpp>
#include "support.hpp"
#ifndef Q_MOC_RUN
@@ -18,77 +17,79 @@ namespace Files { typedef std::vector<boost::filesystem::path> PathContainer;
struct ConfigurationManager;}
class QFile;
class QSettings;
namespace CSMSettings {
struct UserSettings: public QObject
class Setting;
typedef QMap <QString, QList <Setting *> > SettingPageMap;
class UserSettings: public QObject
{
Q_OBJECT
SectionMap mSectionSettings;
SectionMap mEditorSettingDefaults;
static UserSettings *mUserSettingsInstance;
QString mUserFilePath;
Files::ConfigurationManager mCfgMgr;
QString mReadOnlyMessage;
QString mReadWriteMessage;
const Files::ConfigurationManager& mCfgMgr;
QSettings *mSettingDefinitions;
QList <Setting *> mSettings;
public:
/// Singleton implementation
static UserSettings& instance();
UserSettings();
UserSettings (const Files::ConfigurationManager& configurationManager);
~UserSettings();
UserSettings (UserSettings const &); //not implemented
void operator= (UserSettings const &); //not implemented
/// Writes settings to the last loaded settings file
bool writeSettings(QMap<QString, SettingList *> &sections);
/// Called from editor to trigger signal to update the specified setting.
/// If no setting name is specified, all settings found in the specified section are updated.
void updateSettings (const QString &sectionName, const QString &settingName = "");
UserSettings (UserSettings const &); //not implemented
UserSettings& operator= (UserSettings const &); //not implemented
/// Retrieves the settings file at all three levels (global, local and user).
/// \todo Multi-valued settings are not fully implemented. Setting values
/// \todo loaded in later files will always overwrite previously loaded values.
void loadSettings (const QString &fileName);
/// Returns the entire map of settings across all sections
const SectionMap &getSectionMap () const;
/// Updates QSettings and syncs with the ini file
void setDefinitions (const QString &key, const QStringList &defs);
const SettingMap *getSettings (const QString &sectionName) const;
QString settingValue (const QString &settingKey);
/// Retrieves the value as a QString of the specified setting in the specified section
QString getSetting(const QString &section, const QString &setting) const;
///retrieve a setting object from a given page and setting name
Setting *findSetting
(const QString &pageName, const QString &settingName = QString());
///remove a setting from the list
void removeSetting
(const QString &pageName, const QString &settingName);
///Retreive a map of the settings, keyed by page name
SettingPageMap settingPageMap() const;
///Returns a string list of defined vlaues for the specified setting
///in "page/name" format.
QStringList definitions (const QString &viewKey) const;
///Test to indicate whether or not a setting has any definitions
bool hasSettingDefinitions (const QString &viewKey) const;
///Save any unsaved changes in the QSettings object
void saveDefinitions() const;
private:
void buildSettingModelDefaults();
/// Opens a QTextStream from the provided path as read-only or read-write.
QTextStream *openFileStream (const QString &filePath, bool isReadOnly = false) const;
/// Parses a setting file specified in filePath from the provided text stream.
bool loadFromFile (const QString &filePath = "");
/// merge the passed map into mSectionSettings
void mergeMap (const SectionMap &);
void displayFileErrorMessage(const QString &message, bool isReadOnly);
void buildEditorSettingDefaults();
SettingMap *getValidSettings (const QString &sectionName) const;
///add a new setting to the model and return it
Setting *createSetting (CSMSettings::SettingType typ,
const QString &page, const QString &name);
signals:
void signalUpdateEditorSetting (const QString &settingName, const QString &settingValue);
void userSettingUpdated (const QString &, const QStringList &);
public slots:
void updateUserSetting (const QString &, const QStringList &);
};
}
#endif // USERSETTINGS_HPP
+10 -5
View File
@@ -17,21 +17,26 @@ int CSMTools::BirthsignCheckStage::setup()
return mBirthsigns.getSize();
}
void CSMTools::BirthsignCheckStage::perform (int stage, std::vector<std::string>& messages)
void CSMTools::BirthsignCheckStage::perform (int stage, Messages& messages)
{
const ESM::BirthSign& birthsign = mBirthsigns.getRecord (stage).get();
const CSMWorld::Record<ESM::BirthSign>& record = mBirthsigns.getRecord (stage);
if (record.isDeleted())
return;
const ESM::BirthSign& birthsign = record.get();
CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Birthsign, birthsign.mId);
// test for empty name, description and texture
if (birthsign.mName.empty())
messages.push_back (id.toString() + "|" + birthsign.mId + " has an empty name");
messages.push_back (std::make_pair (id, birthsign.mId + " has an empty name"));
if (birthsign.mDescription.empty())
messages.push_back (id.toString() + "|" + birthsign.mId + " has an empty description");
messages.push_back (std::make_pair (id, birthsign.mId + " has an empty description"));
if (birthsign.mTexture.empty())
messages.push_back (id.toString() + "|" + birthsign.mId + " is missing a texture");
messages.push_back (std::make_pair (id, birthsign.mId + " is missing a texture"));
/// \todo test if the texture exists
+3 -3
View File
@@ -5,12 +5,12 @@
#include "../world/idcollection.hpp"
#include "stage.hpp"
#include "../doc/stage.hpp"
namespace CSMTools
{
/// \brief VerifyStage: make sure that birthsign records are internally consistent
class BirthsignCheckStage : public Stage
class BirthsignCheckStage : public CSMDoc::Stage
{
const CSMWorld::IdCollection<ESM::BirthSign>& mBirthsigns;
@@ -21,7 +21,7 @@ namespace CSMTools
virtual int setup();
///< \return number of steps
virtual void perform (int stage, std::vector<std::string>& messages);
virtual void perform (int stage, Messages& messages);
///< Messages resulting from this tage will be appended to \a messages.
};
}
+55
View File
@@ -0,0 +1,55 @@
#include "bodypartcheck.hpp"
CSMTools::BodyPartCheckStage::BodyPartCheckStage(
const CSMWorld::IdCollection<ESM::BodyPart> &bodyParts,
const CSMWorld::Resources &meshes,
const CSMWorld::IdCollection<ESM::Race> &races ) :
mBodyParts(bodyParts),
mMeshes(meshes),
mRaces(races)
{ }
int CSMTools::BodyPartCheckStage::setup()
{
return mBodyParts.getSize();
}
void CSMTools::BodyPartCheckStage::perform ( int stage, Messages &messages )
{
const CSMWorld::Record<ESM::BodyPart> &record = mBodyParts.getRecord(stage);
if ( record.isDeleted() )
return;
const ESM::BodyPart &bodyPart = record.get();
CSMWorld::UniversalId id( CSMWorld::UniversalId::Type_BodyPart, bodyPart.mId );
// Check BYDT
if ( bodyPart.mData.mPart < 0 || bodyPart.mData.mPart > 14 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has out of range part value." ));
if ( bodyPart.mData.mVampire < 0 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has negative vampire flag." ));
if ( bodyPart.mData.mFlags < 0 || bodyPart.mData.mFlags > 2 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has out of range flags value." ));
if ( bodyPart.mData.mType < 0 || bodyPart.mData.mType > 2 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has out of range type value." ));
// Check MODL
if ( bodyPart.mModel.empty() )
messages.push_back(std::make_pair( id, bodyPart.mId + " has no model." ));
else if ( mMeshes.searchId( bodyPart.mModel ) == -1 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has invalid model." ));
// Check FNAM
if ( bodyPart.mRace.empty() )
messages.push_back(std::make_pair( id, bodyPart.mId + " has no race." ));
else if ( mRaces.searchId( bodyPart.mRace ) == -1 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has invalid race." ));
}
+35
View File
@@ -0,0 +1,35 @@
#ifndef CSM_TOOLS_BODYPARTCHECK_H
#define CSM_TOOLS_BODYPARTCHECK_H
#include <components/esm/loadbody.hpp>
#include <components/esm/loadrace.hpp>
#include "../world/resources.hpp"
#include "../world/idcollection.hpp"
#include "../doc/stage.hpp"
namespace CSMTools
{
/// \brief VerifyStage: make sure that body part records are internally consistent
class BodyPartCheckStage : public CSMDoc::Stage
{
const CSMWorld::IdCollection<ESM::BodyPart> &mBodyParts;
const CSMWorld::Resources &mMeshes;
const CSMWorld::IdCollection<ESM::Race> &mRaces;
public:
BodyPartCheckStage(
const CSMWorld::IdCollection<ESM::BodyPart> &bodyParts,
const CSMWorld::Resources &meshes,
const CSMWorld::IdCollection<ESM::Race> &races );
virtual int setup();
///< \return number of steps
virtual void perform( int stage, Messages &messages );
///< Messages resulting from this tage will be appended to \a messages.
};
}
#endif

Some files were not shown because too many files have changed in this diff Show More