13 Commits

Author SHA1 Message Date
yvt
1b67c4eff0
Turn BlockHitAction into enum class 2019-07-20 16:03:33 +09:00
yvt
0470ca3187
ParticleSpriteEntity: Receive images via Handle<IImage> 2019-07-20 16:00:07 +09:00
yvt
6513bd0075
ParticleSpriteEntity: Use Handle for reference counting 2019-07-20 15:57:56 +09:00
yvt
60fd3191c5
Remove Handle::operator T*(), discouraging conversion to raw pointers
It was replaced by `Handle::GetPointerOrNull()`. Every use of
`GetPointerOrNull` should be reviewed. Some of them were already removed.
2019-07-20 15:47:42 +09:00
yvt
7c3a39e639
Modernize
- Replaced raw pointers with references or smart pointers. Nullable
  references are represented by `stmp::optional<const T&>`. (There are
  many raw pointers still remaining. They should be replaced at some
  point.)
- Added class template specializations `stmp::optional<T &>` and
  `stmp::optional<const T&>`.
- Fixed `stmp::optional`'s various behaviors
- `World::{players, playerPersistents}` are now `std::array`.
- More uses of `stmp::optional` to clarify the semantics
- Renamed `PlayerThrownGrenade` to `PlayerThrewGrenade`
- Replaced old-style `for` loops with range based ones
- Deleted `Player`'s default constructors and `operator =`
- Deleted `TCGameMode`'s default constructor and `operator =`
- Deleted `CTFGameMode`'s default constructor and `operator =`
- Replaced `static_cast` with `dynamic_cast` for down-casting
- `RefCountedObject::operator*()` no longer requires non-constness to
  return `T &`.
- Replaced the uses of `std::vector::operator[]` with `std::vector::at`
  for bounds checking.
- Made some methods of `GameMap` `const`.
- Added some null checks.
2019-07-17 00:31:00 +09:00
yvt
88f03f01e9 Refactoring
- Mark overriding virtual functions with `override`
- Get rid of warnings
2017-01-05 03:48:11 +09:00
Tomoaki Kawada
624d291f79 Update #includes
- Reorder them so that system libraries come first
- Use C++-style headers (`<cmath>`) instead of C-style headers (`<math.h>`)
2016-12-03 19:04:58 +09:00
Tomoaki Kawada
ebd79c0099 Change #include style
All `#include`s to other subsystem now use angle brackets, e.g., `#include <Core/Math.h>`.
2016-12-03 18:49:07 +09:00
Tomoaki Kawada
2eb9e35c65 Apply clang-format to all non-external source files 2016-12-03 18:23:47 +09:00
yvt
e4b83484db Fixed #93. 2013-11-17 00:26:05 +09:00
yvt
13692657e1 Merge and some refactor (ref-counting some objects) 2013-09-14 13:28:19 +09:00
yvt
f0d34ef494 added GPLv3 header 2013-08-29 11:45:22 +09:00
yvt
931be8cf09 From pre-0.0.3 source code 2013-08-18 16:18:06 +09:00