Commit Graph

27 Commits (2a533b20d58f180b346a78f2a3c23f737e489f02)

Author SHA1 Message Date
Andrew Tribick 2a533b20d5 Remove getNameValue from tokenizer (duplicate functionality of getStringValue) 2021-12-29 13:08:54 +01:00
Hleb Valoshka 14af83a391 Implement Logger to replace raw cerr/cout and DPRINTF usage 2021-12-20 17:54:50 +03:00
Andrew Tribick 30dda19ef9 Fix warnings in celmodel
- Remove unused variables in createLinePrimitiveGroup
- Ensure result is always set in default case in BinaryModelWrite::writeVertices
2021-12-05 20:32:44 +01:00
Andrew Tribick 7c5c903f47 Remove pointers from mesh and model vectors
- Hold models in unique_ptr
2021-12-04 09:49:52 +01:00
Andrew Tribick 8684543580 Store vertex data as array of 4-byte words 2021-12-04 09:49:52 +01:00
Andrew Tribick 019411dc21 Remove pointers from VertexDescription and PrimitiveGroup indices 2021-12-04 09:49:52 +01:00
Andrew Tribick b79959979a Extract inner types from Material and Mesh
- Remove using namspace cmod
- Convert enums to enum classes
2021-12-04 09:49:52 +01:00
Andrew Tribick 79234cda24 Remove inheritance from Material maps, Model destructor
- Reference texture maps by ResourceHandles in cmod Materials
- Add basic path manager for integration tests and tools
- Remove virtual destructor on Model class as nothing inherits from it
2021-11-25 19:11:06 +01:00
Andrew Tribick e78b51ad07 Fix ASCII material loading 2021-11-16 21:33:56 +01:00
Andrew Tribick d82043f914 Fix for fmt 4.0 (as used by Ubuntu 18.04 LTS) 2021-11-16 18:56:43 +01:00
Andrew Tribick 0f1ed583ae Move internal cmod parsing code to unnamed namespace 2021-11-15 18:28:06 +01:00
Andrew Tribick 0d636696eb Add error checking in cmod read/write 2021-11-15 18:28:06 +01:00
Andrew Tribick f79b21e7d3 Use existing tokenizer to parse ASCII cmod files 2021-11-15 18:28:06 +01:00
Andrew Tribick ec232b7fad Fix for debug builds
- Include fmt/ostream.h in debug.h to allow formatting filesystem paths
- Avoid including headers via debug.h on non-debug builds
2021-10-26 10:17:48 +03:00
Hleb Valoshka cb8c1e8f03 [utils] add generic util::ResolveWildcard() method 2021-04-25 14:22:59 +03:00
Li Linfeng 9c371c891c define macros for print levels and avoid direct use of fmt::printf 2019-08-31 13:32:44 +08:00
Hleb Valoshka 1fda8e35f0 Fix warnings found by PVS
- 1 copy-paste error
  - 1 nullptr dereference
  - fixed self-assignment in Mesh::VertexDescription::operator=
  - a few missing delete
  - all other are checks for nullptr after new
2018-10-28 22:00:27 +03:00
Hleb Valoshka 8685b114a3 Cleanup warnings found by clang++ 2018-10-18 21:50:41 +03:00
Hleb Valoshka 363abc40f3 Use libfmt instead of C-style & iostream workflow
TODO: check StarDatabase::getStarName
2018-10-17 22:19:03 +03:00
Hleb Valoshka 73638c116d Remove basictypes.h and use standard c++11 types 2018-09-22 23:42:03 +03:00
Hleb Valoshka b082d5f47f Automatically convert to c++11 using clan-tidy
+ manual cleanups
2018-09-22 23:42:02 +03:00
Hleb Valoshka 5a5b06481f Fix the most serious fixes found by coverity
… resource leaks, null pointers dereference
2018-09-22 23:41:58 +03:00
Hleb Valoshka 882e4ecf28 fix whitespaces and indents
trailing spaces are removed
tabs are replaced with 4 spaces

# Conflicts:
#	src/celengine/cmdparser.cpp
#	src/celengine/command.cpp
#	src/celestia/celestiacore.cpp
#	src/celestia/celestiacore.h
#	src/celestia/qt/qtappwin.cpp
#	src/celestia/qt/qtglwidget.cpp
#	src/celestia/win32/winmain.cpp
2018-09-22 23:41:57 +03:00
Chris Laurel d00fb03d6a Change ASCII cmod writing code to output null material index as -1 instead
of max unsigned int, which prevents read/write incompatibilities on 64-bit
systems. Moved some Doxygen comments from header to source file.
2010-07-05 22:53:06 +00:00
Chris Laurel c007352e69 Fixed texture loading for ASCII cmod files. 2010-02-17 16:51:30 +00:00
Chris Laurel f9260386b2 celmodel fixes:
- Removed unused code in #if 0/#endif blocks
- Added non-const accessor for Mesh::PrimitiveGroup
- Return more information in pick result: mesh, primitive group, and primitive
index instead of just the distance to first intersection.
2010-02-10 20:52:43 +00:00
Chris Laurel ef146f24aa Added celmodel module. 2010-02-05 20:10:32 +00:00