34 Commits

Author SHA1 Message Date
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
admiral general salam
cf3ba37b6e
Highlight own name in scoreboard 2019-05-19 17:06:53 +03:00
YVT
399e24090d
Merge pull request #654 from NotAFile/scoreboard-show-dead-players
Show Dead players in gray on scoreboard
2018-02-21 16:18:50 +09:00
yvt
03cfbdee12 Fix the wrong reference to a config variable 2017-12-31 18:35:12 +09:00
notafile
79689848dd Show Dead players in gray on scoreboard
This is done for all cases, but that is probably a bad idea. While this
does not matter in public games, in small tournaments this could be an
advantage. Ideally, the server could disable giving players this
information
2017-09-07 20:32:24 +02:00
VelocityRa
d150d2848c Add medium-sized font to FontManager 2017-01-04 21:32:11 +02:00
VelocityRa
2369679dc1 Use GUI font if spectator string contains special chars. 2017-01-04 21:32:11 +02:00
yvt
d505bfae91 Expose “FontManager” to the scripting environment 2016-12-16 05:05:23 +09:00
YVT
2d0ae3b817 FreeType2 font renderer (#484)
* Backport ngspades’s FreeType2 font renderer

* Change system fonts

* Fix SWImage::Update

* Preliminary custom TTF/OTF font support

* Fix font rendering

* Adjust design

* Update devpak

* Fix to compile on Linux

* Update .travis.yml

* Update external libraries

* Update .travis.yml

* Attempt to fix Travis CI build

* Add missing sudo to travis.yml

* Nevermind the changes, it didn't work

* Update .travis.yml

* Update .travis.yml and CMakeLists.txt
2016-12-11 23:18:16 +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
VelocityRa
e63f3d856b Change spectatorTeamId back to 255 2016-12-02 15:05:42 +02:00
VelocityRa
ac35fcea08 Handle localization of 'Spectators' string properly 2016-12-01 00:08:20 +02:00
VelocityRa
0f5b4dab56 Display Spectators in Scoreboard 2016-11-30 22:52:28 +02:00
Tomoaki Kawada
6a7af96daf Refactor setting variables 2016-11-19 21:27:13 +09:00
Tomoaki Kawada
3f7fcee586 Reorganise resource files 2016-07-16 00:14:59 +09:00
pandaro
faac496cce synchronized colors between the minimap and the scoreboard 2015-01-27 00:35:56 +01:00
pandaro
b9f31a2012 unique palette declaration uses external 2015-01-26 21:38:33 +01:00
p
45fe408e46 fix missing func 2015-01-24 22:59:53 +01:00
p
09feeec318 fix minimap improvements color variable 2015-01-24 22:38:51 +01:00
p
64dc4a1036 Improve the minimap system ,user configurable 2015-01-24 20:59:23 +01:00
yvt
d856bcadaa Reduce compiler warnings 2014-04-06 22:42:17 +09:00
yvt
61cbb6f2e9 Update team score display of scoreboard 2014-03-31 23:19:17 +09:00
yvt
817ce53c23 Statistics (fix #202) 2014-03-31 23:09:47 +09:00
yvt
2af2826918 Show ping (fixing #146) 2014-03-16 01:23:30 +09:00
yvt
cd980b478f Draw caplimit 2014-03-16 01:18:15 +09:00
yvt
ca88537a6b Created new renderer method which works like SetColor but only accepts an alpha pre-multiplied color value, deprecating the badly-behaved SetColor method 2013-12-09 01:00:09 +09:00
learn_more
1a42e828de ModeType instead of dynamic_cast for gamemodes (dynamic_cast is slowwww) 2013-12-07 16:58:39 +01:00
learn_more
d41b91631f fix a shitton of warnings 2013-09-20 23:03:32 +02: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