1274 Commits

Author SHA1 Message Date
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
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
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
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
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
yvt
93cccdecf9
Add View::AutocompleteCommandName 2019-07-14 18:29:50 +09:00
yvt
0ade4b6356
Add console commands for accessing config variables 2019-07-14 17:43:04 +09:00
yvt
f4f9dce529
Add #pragma once 2019-07-14 17:26:19 +09:00
yvt
6b415aa7d4
Redirect SPLog to the console window 2019-07-14 16:02:07 +09:00
yvt
cacec5b470
Invoke View::ExecCommand from the console window 2019-07-14 14:59:58 +09:00
yvt
bb7c84b2c2
Add View::ExecCommand 2019-07-14 14:31:51 +09:00
yvt
1f10dc82ca
Add SPADES_MARK_FUNCTION() 2019-07-14 14:14:04 +09:00
yvt
070707c892
Implement the script side of the console window 2019-07-14 14:13:34 +09:00
yvt
3ca9948d50 Fix CScriptArray::RemoveRange
- The count parameters of `memmove` was incorrectly calculated.
- The use of `memmove` would be UB here because of region overlap.
2019-07-14 13:20:33 +09:00
yvt
d6f5370581
Add the console window (WIP) 2019-07-14 01:38:28 +09:00
yvt
b02ad53109 Add View::RunFrameLate
`IRenderer::{FrameDone, Flip}` are now called in `RunFrameLate` instead.
This makes it possible to create a `View` wrapping another `View` to
insert a new 2D drawing pass, which is necessary to render the system
console.
2019-07-14 00:29:36 +09:00
yvt
cb89824f32
clang-format 2019-06-09 13:44:05 +09:00
YVT
c2677c0465
Merge pull request #832 from otzade/fix-minimap
Fix minimap
2019-06-09 13:43:05 +09:00
YVT
1c1b883fe6
Merge pull request #833 from otzade/block
Use model for block cursor instead of debug lines
2019-05-27 11:28:42 +09:00
David Carlier
6ef18bd0cd Little code changes proposal.
Modern C++ stricter with member initialisation order.
Destructor possibly throwing exception through assertions.
In debug mode, pretty important memory leak with zip archives.
2019-05-26 07:18:39 +01:00
otzade
ab83d7639b Merge remote-tracking branch 'upstream/master' into block 2019-05-26 00:53:38 +03:00
yvt
431ad6efdd
GL: Fix point lights being discarded
(Hopefully) fixes #834.
2019-05-26 06:08:48 +09:00
otzade
fabb3bd0ba Draw cursor inside block differently 2019-05-25 20:12:16 +03:00
yvt
4e9370e8b4
Fix forgetting to unlock a recursive_mutex before deleting 2019-05-26 00:55:54 +09:00
otzade
aeeca9331e Some more changes..
Cursor made emissive, unshaded
Yellow cursor is back, but less opaque
2019-05-25 17:11:55 +03:00
otzade
a1def7e762 Merge branch 'master' into block 2019-05-25 13:19:59 +03:00
yvt
31a153e711 Add "ghost" rendering
This commit adds new model rendering options
`ModelRenderParam::{ghost, opacity}`.

> Specifies that the model is not an actual object in the virtual world, 
> thus does not affect the shading of other objects and does not appear
> in a mirror.
> ...
> In exchange, it allows the use of an opacity value other than `1`.
2019-05-25 18:56:41 +09:00
yvt
51af48e98b
GL: Support emissive material 2019-05-25 16:24:46 +09:00
yvt
f75f55f33d
FallingBlock: Use the default material ID for generated VoxelModels 2019-05-25 15:42:51 +09:00
yvt
7147e735b7
SW: Support emissive material 2019-05-25 15:39:49 +09:00
yvt
25e9ad0143
Remove a possible debugging assertion that falsely aborts the program 2019-05-25 15:24:01 +09:00