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
6517338dab
Delete RefCountedObject
's copy constructor
2019-07-20 14:18:48 +09:00
yvt
e6227b3361
Update IRenderer
for null safety and safe memory management
2019-07-20 13:48:49 +09:00
yvt
464b88a23b
Fix optional::operator=
2019-07-20 13:42:34 +09:00
yvt
9e770cc040
Update the rules for RefCountedObject
2019-07-20 13:25:35 +09:00
yvt
a44a900c62
Fix Handle::Handle(T&)
2019-07-20 12:36:11 +09:00
yvt
8cdb086bb1
Add implicit casts between Handle<T>
and stmp::optional<T &>
2019-07-20 12:26:44 +09:00
yvt
9038c7e135
Update the rules for RefCountedObject
2019-07-20 12:25:58 +09:00
yvt
fae85af23d
Make stmp::optional::operator=
behave more like std::optional
...
This means the inner type's `operator=` is used whenever possible,
instead of using `T::T(const T&)` or `T::T(T&&)` all the time.
2019-07-18 16:12:44 +09:00
yvt
5f7dde6a96
Update and clarify the rules for RefCountedObject
2019-07-18 15:54:40 +09:00
yvt
7b3d6bf28d
Change the return type of HotTrackedPlayer
2019-07-17 11:11:52 +09:00
yvt
9735d5855e
Change the return type of GetLocalClientPlayer
2019-07-17 11:05:21 +09:00
yvt
980b484c32
Instantly wrap Corpse
with std::unique_ptr
after construction
...
Note: IIRC `make_unique` isn't supported by some of the targeted
compilers.
2019-07-17 10:49:33 +09:00
yvt
f742420187
Replace raw pointers in CorpseUpdateDispatch
with references
2019-07-17 10:46:32 +09:00
yvt
3916a39713
Replace raw pointers in Corpse::Corpse
with references
2019-07-17 10:43:25 +09:00
YVT
989fc1e211
Remove out-dated comment
2019-07-17 10:30:36 +09:00
yvt
5db97f7f10
clang-format
2019-07-17 00:31:22 +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
3c90eedfb8
Add Handle::operator==
2019-07-16 01:18:26 +09:00
yvt
07cdbf9d1d
Add some functions related to stmp::optional
2019-07-16 01:18:09 +09:00
yvt
8aa52a40fb
Add const
to GameMap
's methods
2019-07-16 01:17:47 +09:00
YVT
ed5875181a
Merge pull request #842 from yvt/feature-system-console
...
Add internal console window
2019-07-16 00:31:36 +09:00
YVT
dc5225d4a1
Merge branch 'master' into feature-system-console
2019-07-16 00:08:03 +09:00
yvt
5eab672881
Clear TextViewer
's selection when Text
is changed
2019-07-15 23:49:31 +09:00
yvt
64438390fa
Fix crash on clicking empty TextViewer
...
Closes #843 .
2019-07-15 23:48:16 +09:00
yvt
eb086b2165
Update a doc comment
2019-07-15 23:45:59 +09:00
yvt
18911042e7
Merge remote-tracking branch 'origin/master' into feature-system-console
2019-07-15 09:08:09 +09:00
yvt
797dbd755f
Do not initialize 3D before displaying "NOW LOADING"
...
Fixes the regression introduced by `ConsoleScreen`.
2019-07-15 00:22:30 +09:00
yvt
781056ef70
Fix small peculiarities with the system console's input field
...
- Hide the candidates after hitting Enter
- Fix the weird hard-to-describe behavior when navigating through the
input history
2019-07-15 00:19:17 +09:00
yvt
abcf65d536
Add clearsfxcache
console command
2019-07-15 00:08:02 +09:00
yvt
2a1c28d7d1
Add cleargfxcache
console command
2019-07-14 23:58:46 +09:00
yvt
ed508fadd5
Add IRenderer::ClearCache
2019-07-14 23:53:10 +09:00
yvt
37982aa020
Replace std::map
with std::unordered_map
...
Because we do not support MSVC 2010 anymore.
2019-07-14 23:48:06 +09:00
YVT
33b6aa370c
Remove unnecessary code
2019-07-14 23:45:13 +09:00
yvt
bb4675ca00
Add help
console command
2019-07-14 23:34:40 +09:00
yvt
008c687e83
Raise the buffer size limit of BoundedLogBuffer
2019-07-14 23:22:20 +09:00
yvt
3960f47cc8
Deprecate cvar editing via chat window
2019-07-14 23:07:55 +09:00
yvt
a9561991c3
Add savemap
console command
2019-07-14 22:29:15 +09:00
yvt
d0dfb188f0
Remove unnecessary code
2019-07-14 22:06:58 +09:00
yvt
8f12984882
Hide unrecognized config variables from autocompletion
2019-07-14 21:31:26 +09:00
yvt
4c041ea8e1
Implement the UI for the command name autocompletion
2019-07-14 20:37:50 +09:00
yvt
8616b5b509
Get the config variable autocompletion working
2019-07-14 20:36:56 +09:00
yvt
dd071637d6
Fix MergeConsoleCommandCandidates
2019-07-14 20:36:27 +09:00
yvt
5794acbc18
Register the assignment behavior of ConsoleCommandCandidate
2019-07-14 20:36:12 +09:00
yvt
1634c61512
Expose the command name autocompletion to the script
2019-07-14 19:51:30 +09:00
yvt
e4efc8b5fc
Autocomplete config variables
2019-07-14 19:15:30 +09:00
yvt
bfe746abca
Remove C++20 constructs
2019-07-14 18:41:13 +09:00
yvt
e57e9655dd
Implement console-related methods on MainScreen
2019-07-14 18:32:42 +09:00