Commit Graph

48 Commits (0.7.0)

Author SHA1 Message Date
Andrei Kortunov 12144de8ed Initialize missing variables 6 years ago
Andrei Kortunov 359e748c28 Initialize some missing fields in constructors 6 years ago
wareya 94f695cffc Fix #4452 and remove dead code 6 years ago
wareya 7344323b9e remove indentation from blank lines 6 years ago
wareya 8f45b0d53a remove unnecessary conditions 6 years ago
wareya 6277f5511c fix #3876 and #3993 6 years ago
tri4ng1e d4d1703bcf
Some PVS-Studio and cppcheck fixes
cppcheck:
[apps/esmtool/record.cpp:697]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/esmtool/record.cpp:1126]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/esmtool/record.cpp:1138]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/niftest/niftest.cpp:36]: (performance) Function parameter 'filename' should be passed by reference.
[apps/niftest/niftest.cpp:41]: (performance) Function parameter 'filename' should be passed by reference.
[apps/opencs/model/prefs/boolsetting.cpp:25]: (warning) Possible leak in public function. The pointer 'mWidget' is not deallocated before it is allocated.
[apps/opencs/model/prefs/shortcuteventhandler.cpp:52]: (warning) Return value of std::remove() ignored. Elements remain in container.
[apps/openmw/mwstate/quicksavemanager.cpp:5]: (performance) Variable 'mSaveName' is assigned in constructor body. Consider performing initialization in initialization list.

PVS-Studio:
apps/opencs/model/filter/parser.cpp  582  warn  V560 A part of conditional expression is always true: allowPredefined.
apps/opencs/view/world/referencecreator.cpp  67  warn  V547 Expression '!errors.empty()' is always false.
apps/opencs/view/world/referencecreator.cpp  74  warn  V547 Expression '!errors.empty()' is always false.
apps/opencs/view/doc/loader.cpp  170  warn  V560 A part of conditional expression is always true: !completed.
apps/opencs/view/doc/loader.cpp  170  warn  V560 A part of conditional expression is always true: !error.empty().
apps/opencs/model/tools/pathgridcheck.cpp  32  err  V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 32, 34.
apps/opencs/model/world/refidadapterimp.cpp  1376  err  V547 Expression 'subColIndex < 3' is always true.

apps/openmw/mwgui/widgets.hpp  318  warn  V703 It is odd that the 'mEnableRepeat' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:318, MyGUI_ScrollBar.h:179.
apps/openmw/mwgui/widgets.hpp  319  warn  V703 It is odd that the 'mRepeatTriggerTime' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:319, MyGUI_ScrollBar.h:180.
apps/openmw/mwgui/widgets.hpp  320  warn  V703 It is odd that the 'mRepeatStepTime' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:320, MyGUI_ScrollBar.h:181
apps/openmw/mwmechanics/actors.cpp  1425  warn  V547 Expression '!detected' is always true.
apps/openmw/mwmechanics/character.cpp  2155  err  V547 Expression 'mode == 0' is always true.
apps/openmw/mwmechanics/character.cpp  1192  warn  V592 The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present.
apps/openmw/mwmechanics/character.cpp  521  warn  V560 A part of conditional expression is always true: (idle == mIdleState).
apps/openmw/mwmechanics/pathfinding.cpp  317  err  V547 Expression 'mPath.size() >= 2' is always true.
apps/openmw/mwscript/interpretercontext.cpp  409  warn  V560 A part of conditional expression is always false: rank > 9.
apps/openmw/mwgui/windowbase.cpp  28  warn  V560 A part of conditional expression is always true: !visible.
apps/openmw/mwgui/journalwindow.cpp  561  warn  V547 Expression '!mAllQuests' is always false.
apps/openmw/mwgui/referenceinterface.cpp  18  warn  V571 Recurring check. The '!mPtr.isEmpty()' condition was already verified in line 16.
apps/openmw/mwworld/scene.cpp  463  warn  V547 Expression 'adjustPlayerPos' is always true.
apps/openmw/mwworld/worldimp.cpp  409  err  V766 An item with the same key '"sCompanionShare"' has already been added.
apps/openmw/mwworld/cellstore.cpp  691  warn  V519 The 'state.mWaterLevel' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 689, 691.
apps/openmw/mwworld/weather.cpp  1125  warn  V519 The 'mResult.mParticleEffect' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1123, 1125.
apps/openmw/mwworld/weather.cpp  1137  warn  V519 The 'mResult.mParticleEffect' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1135, 1137.

apps/wizard/unshield/unshieldworker.cpp  475  warn  V728 An excessive check can be simplified. The '(A && B) || (!A && !B)' expression is equivalent to the 'bool(A) == bool(B)' expression.
apps/wizard/installationpage.cpp  163  warn  V735 Possibly an incorrect HTML. The "</p" closing tag was encountered, while the "</span" tag was expected.

components/fontloader/fontloader.cpp  427  err  V547 Expression 'i == 1' is always true.
components/nifosg/nifloader.cpp  282  warn  V519 The 'created' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 278, 282.
components/esm/loadregn.cpp  119  err  V586 The 'clear' function is called twice for deallocation of the same resource. Check lines: 112, 119.
components/esm/cellref.cpp  178  warn  V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 175, 178.
components/esmterrain/storage.cpp  235  warn  V560 A part of conditional expression is always true: colStart == 0.
components/esmterrain/storage.cpp  237  warn  V560 A part of conditional expression is always true: rowStart == 0.
6 years ago
Allofich 3780d94214 Cast LAND_SIZE to integer to avoid linking error 7 years ago
scrawl fd215caa02 Add local LandCache to cut down on store searches 7 years ago
scrawl 0756fc4ae6 Optimize getBlendmaps for the general case that most points are within the given cell 7 years ago
scrawl 81c9853fe9 Fix handling in getBlendmaps when the chunk is >1 ESM::Cell 7 years ago
scrawl b384087e28 Fix handling in fillVertexBuffers when the chunk is >1 ESM::Cell 7 years ago
scrawl 819860081f Remove custom bounding box 7 years ago
scrawl b1d4bb5708 Add CompositeMapRenderer
Temporarily render all terrain using composite maps for testing purposes
7 years ago
scrawl 0fc465da59 Store the min/max height in LandData 7 years ago
scrawl 80a0398f9d Load LandData into the LandObject to avoid threading conflicts when the same data is being loaded by two threads 7 years ago
scrawl 35d53acc65 Factor out terrain chunk loading/caching into a new resource manager 7 years ago
scrawl 9a3a64f0c4 Add resource manager for ESM::Land to allow data to be unloaded when no longer required 7 years ago
scrawl 29556a1802 More consistent wording of errors/warnings
A Warning indicates a potential problem in the content file(s) that the user told OpenMW to load. E.g. this might cause an object to not display at all or as intended, however the rest of the game will run fine.

An Error, however, is more likely to be a bug with the engine itself - it means that basic assumptions have been violated and the engine might not run correctly anymore.

The above mostly applies to errors/warnings during game-play; startup issues are handled differently: when a file is completely invalid/corrupted to the point that the engine can not start, that might cause messages that are worded as Error due to the severity of the issue but are not necessarily the engine's fault.

Hopefully, being a little more consistent here will alleviate confusion among users as to when a log message should be reported and to whom.
7 years ago
Allofich 0f20312012 Fix MSVC warnings 7 years ago
scrawl 157c11398d Add terrain parallax mapping 8 years ago
scrawl 27577ce765 Add ESM::Land::DEFAULT_HEIGHT 8 years ago
scrawl 0db7163363 Add specular mapping for terrain 8 years ago
scrawl 5cf2441b10 ShaderVisitor: support automatic recognition of normal maps based on file pattern
Introduce new settings 'auto use object normal maps', 'auto use terrain normal maps', 'normal map pattern'
8 years ago
scrawl 98848c752a Make getLayerInfo thread safe 8 years ago
scrawl fbd4ad9b0c Flip terrain textures 8 years ago
scrawl 62fe47b144 Load default terrain if there is none defined 8 years ago
scrawl 30cc633f2c Missing include fix 9 years ago
scrawl 35fa1f5865 Not found Land Textures are no longer a fatal error (Bug #3037)
Log warning message and show the default texture when encountering invalid ESM::LandTexture references.
9 years ago
scrawl 7ca8e45d5d Terrain: remove debug code 9 years ago
scrawl ef18f4217f Terrain: create 4x4 terrain chunks per ESM::Cell to improve performance
Improves performance because the number of splatting layers per chunk is reduced, and finer grained frustum culling can be done.
9 years ago
Marc Zinnschlag 69b9eadb52 refactored loading of land data 9 years ago
Marc Zinnschlag febf611c82 made return type of ESMTerrain::Storage::getLand const 9 years ago
scrawl b3f5ac5dbb Include cleanup 9 years ago
scrawl 0afc03b6b7 Build fix 9 years ago
scrawl cdd0623009 Terrain rendering 9 years ago
scrawl 236d628884 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/opencs/model/doc/document.cpp
	apps/opencs/model/doc/documentmanager.cpp
	components/CMakeLists.txt
	components/bsa/resources.cpp
	components/nif/data.hpp
	components/nif/node.cpp
	components/nifogre/mesh.hpp
	components/nifogre/ogrenifloader.cpp
	components/nifogre/particles.cpp
9 years ago
scrawl 79c2138e53 Port ResourceHelpers to new VFS 9 years ago
dteviot e197f5318b fixing MSVC 2013 warning C4244: & C4305
conversion from 'const float' to 'int', possible loss of data
conversion from 'double' to 'int', possible loss of data
conversion from 'float' to 'int', possible loss of data
9 years ago
scrawl 17e3069896 Minor efficiency fix 9 years ago
scrawl f6509fe53e Another crash fix for land record without data 9 years ago
scrawl e712b0353b Terrain refactoring, reduce game startup time and memory usage 9 years ago
scrawl f7e32a24c9 Fix terrain assertion 9 years ago
scrawl 7b4665c623 Terrain: documentation update 9 years ago
Thoronador 4d62541b62 fix usage of numeric_limits static functions min() and max()
Functions min() and max() of std::numeric_limits<T> are static
and can therefore be accessed via class name and :: operator.
10 years ago
scrawl e9ed0211c9 Attempt to fix Clang warnings 10 years ago
scrawl e2ee3b2497 Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwrender/terrainstorage.cpp
10 years ago
scrawl 982453d4f6 Move ESM terrain data handler to esmterrain component so it can be used by the editor (Feature #1597) 10 years ago