Commit graph

14948 commits

Author SHA1 Message Date
sctt f3bde7cf7a
map_replace_area: fixed alphabetical order in CMakeLists.txt 2022-06-21 14:00:50 +02:00
heinrich5991 955084693d Refuse to load images of types not supported by pnglite
This allows us to think about backward compatibility while also
introducing libpng.
2022-06-21 13:37:14 +02:00
Jupeyy 65ad57a448 Change from pnglite to libpng for PNG reading
This is desirable mainly because libpng is maintained and pnglite is
not. pnglite was last updated in 2007 (15 years ago) and probably has a
lot of security vulnerabilities.

libpng is an actively maintained library also used by browsers like
Firefox or Chromium, so it's less likely to contain security
vulnerabilities, also it's more likely to be packaged by Linux
distributions.
2022-06-21 13:37:14 +02:00
heinrich5991 fad8afc083 Fix whitespace is CMakeLists.txt 2022-06-21 13:37:14 +02:00
ChillerDragon bc243952bd Increase client boot timeout for integration test 2022-06-21 01:15:06 +02:00
bors[bot] eb0d48a0eb
Merge #5439
5439: Improve some german translations r=def- a=Jupeyy

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-06-20 22:45:06 +00:00
bors[bot] 29be9a79fd
Merge #5461
5461: add penatly to the whole team r=def- a=BloodWod-513

this should fix it #5460

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: BloodWod-513 <dayn_2013@mail.ru>
2022-06-20 22:20:32 +00:00
Dennis Felsing af1f0de5fb
Merge pull request #5453 from Robyt3/Joystick-Close-Before-SDL-Quit
Fix segfault in `SDL_JoystickClose` on client quit
2022-06-20 23:47:59 +02:00
BloodWod-513 d7b5921759 refactoring pPlayer to pPrimaryPlayer 2022-06-20 22:01:10 +05:00
BloodWod-513 d58c5dfc9d add penatly to the whole team 2022-06-20 22:01:10 +05:00
bors[bot] 1bb9641b96
Merge #5450
5450: Further organize includes and use forward declarations where appropriate r=heinrich5991 a=Robyt3

Remove includes and replace them with forward declarations or other includes according to include-what-you-use's recommendations.

CC #5297.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-06-20 16:56:40 +00:00
term 46b500efef map_replace_area: handled layergroups parameters (offset/clip/parallax) with adaptation between source and dest map 2022-06-20 11:55:55 +02:00
sctt e207fa5c9f
Merge branch 'ddnet:master' into sctt-map_replace_area 2022-06-20 11:38:53 +02:00
Robert Müller 3f1f94c9d8 Fix segfault in SDL_JoystickClose on client quit
Instead of closing the joysticks manually, use `SDL_QuitSubSystem(SDL_INIT_JOYSTICK)` to quit the entire subsystem, which will also close all joysticks correctly.

The engine input destructor is replaced with a `Shutdown` method so we can control when it is called, i.e. before calling `SDL_Quit`, which forcefully quits all subsystems.

`CJoystick::Close` is removed as we don't need to close joysticks manually anymore.
2022-06-18 11:57:57 +02:00
bors[bot] cd8706a84a
Merge #5447
5447: Update Korean translations by CHaBek r=def- a=cwh7435

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: CHaBek <44938972+cwh7435@users.noreply.github.com>
2022-06-17 22:34:41 +00:00
ChillerDragon afd4504f96 Fix integration argument parsing 2022-06-17 23:14:13 +02:00
Robert Müller 352734de56 Organize game-server includes 2022-06-17 20:32:56 +02:00
Robert Müller 2add5d5c3c Organize game-client and editor includes 2022-06-17 20:32:56 +02:00
Robert Müller a1851ed4e4 Organize engine-server includes 2022-06-17 20:32:56 +02:00
Robert Müller 23cce5415e Organize engine-client includes 2022-06-17 17:46:43 +02:00
Robert Müller 32707f6354 Remove unused CVideo constructor argument, organize includes 2022-06-17 17:39:26 +02:00
Robert Müller 2c9696cefd Use existing typedef instead of duplicating arguments 2022-06-17 17:39:26 +02:00
Robert Müller 4949645663 Organize game-shared includes 2022-06-17 17:39:25 +02:00
Robert Müller 0813fbb537 Move android log include to correct file 2022-06-17 17:39:25 +02:00
Robert Müller 557ee84001 Organize base includes 2022-06-17 17:39:25 +02:00
Robert Müller 4048bbbf5c Organize engine-shared includes 2022-06-17 17:39:24 +02:00
Robert Müller 0a4b1b9a7b Organize generated protocol includes 2022-06-17 17:39:24 +02:00
Robert Müller da5ec5a0d2 Include <iterator> instead of <array> for std::size
As `std::size` nominally resides in `<iterator>`.
2022-06-17 17:39:24 +02:00
Jupeyy 4a32a95a9c Improve some german translations 2022-06-17 15:57:08 +02:00
CHaBek 690408f9d7
Update Korean translations by CHaBek 2022-06-17 14:16:21 +09:00
bors[bot] d4f0e5cf5e
Merge #5445
5445: Fix editor value scrollers not working and panning being slow r=heinrich5991 a=Robyt3

Accumulate the mouse deltas and reset them at the end of the frame to fix editor panning being slowed down and value scrollers (layer width etc.) not working anymore.

Closes #5441.

And minor cleanup.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-06-17 03:01:14 +00:00
bors[bot] d44b11d0a8
Merge #5446
5446: Gender-neutral language r=def- a=kaitlynia

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: effyn <effyn@tutanota.com>
2022-06-16 22:44:07 +00:00
effyn 6691d71da7 Gender-neutral language 2022-06-16 15:12:25 -07:00
Robert Müller c318dca703 Remove accidentally added double type 2022-06-16 21:01:51 +02:00
Robert Müller d9f4e1475e Update comment 2022-06-16 21:01:23 +02:00
Robert Müller 405ae97203 Fix editor value scrollers not working and panning being slow 2022-06-16 20:47:59 +02:00
bors[bot] 29e8ec4815
Merge #5444
5444: Fix shader code vector size not being updated after copy r=def- a=Robyt3

Oops, I tried to be smart with `reserve` instead of `resize` but of course that wouldn't set the actual size of the vector after I copy in the data. 

Closes #5442.

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-06-16 18:01:06 +00:00
Robert Müller 82e8ab5236 Fix shader code vector size not being updated after copy 2022-06-16 19:54:27 +02:00
Chairn 4e20de1bc8 Updated french translation 2022-06-16 19:03:16 +02:00
bors[bot] 79de5409a5
Merge #5424
5424: no-goalshud r=heinrich5991 a=luk51

<s>do it using getgameinfo from gameclient introducting a new flag for ddrace</s>
use the same conditions as in the goalshudrender function, so don't render when empty

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Lukas Kitsche <lukaskitsche@posteo>
2022-06-16 14:33:56 +00:00
Lukas Kitsche 379d93ae7b no goals hud when empty 2022-06-16 16:28:50 +02:00
bors[bot] 2dac4921f6
Merge #5432
5432: Added new translations + fixed current one r=heinrich5991 a=crqch

Completed the translation of polish langauge (for now), fixed one translation, which wasn't correct (missing verb)

Co-authored-by: crqch <48185508+crqch@users.noreply.github.com>
2022-06-16 14:10:40 +00:00
bors[bot] 992723d71e
Merge #5430
5430: Add `io_read_all` and `io_read_all_str` to system, add `IStorage::ReadFile` and `ReadFileStr` r=heinrich5991 a=Robyt3

- `io_read_all` reads all bytes from a file handle into a new buffer. It should only need one allocation per file in cases where the actual file size matches the expected file size. Otherwise it falls back to doubling the buffer size if the actual file size is larger than expected to avoid TOCTOU problems.
- `io_read_all_str` reads all bytes from a file handle into a new buffer and also ensures that the buffer is null-terminated and contains no other null-characters.
- `mem_has_null` is a utility used by `io_read_all_str` to ensure that no null-characters exist in the bytes read from the file.
- `IStorage::ReadFile` and `ReadFileStr` are storage wrappers around `io_read_all` and `io_read_all_str`

The system functions are the same as on upstream (https://github.com/teeworlds/teeworlds/pull/3141) when `@heinrich5991` last reviewed them, with an additional check for the result of `io_length` added, as this can return -1 on error (0af8f7796c (diff-d169179e18778d751b412fb173b338885f6db0c4d268c54ddf0e8488a2f7049cR271-R277)).

- Remove duplicate `Kernel()->RequestInterface<IEngineTextRender>()` in client.
- Fix potential memory leak of font data when default font already exists.
- Fix memory leak in editor when loading opus file fails.
- No need for `IOFLAG_SKIP_BOM` on json files because the json parser already does it: b8a82f71aa/src/engine/external/json-parser/json.c (L228-L236)

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-06-16 13:44:49 +00:00
crqch e53107bb32
Fix Leak IP not visible 2022-06-16 12:38:16 +02:00
bors[bot] edab7c0e8c
Merge #5412
5412: Add translations for 16.2 r=Jupeyy a=def-

Translated German while at it
![Screenshot 2022-06-14 at 20 31 27](https://user-images.githubusercontent.com/2335377/173663119-60c6c63b-2131-40fa-adc8-bb955199455a.png)
![Screenshot 2022-06-14 at 20 31 08](https://user-images.githubusercontent.com/2335377/173663124-d2d18be2-95ba-4e02-97f7-27ad3aead77b.png)


## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-06-16 09:19:01 +00:00
Dennis Felsing 1ec691265f Add translations for 16.2 2022-06-16 11:02:14 +02:00
bors[bot] 36a624cca5
Merge #5436
5436: Update simplified_chinese.txt r=def- a=Cheeser0613

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Cheeser0613 <54943099+Cheeser0613@users.noreply.github.com>
2022-06-16 08:39:21 +00:00
Dennis Felsing 4de36ca763 Update Brazilian Portuguese translation (supersedes #5304) 2022-06-16 10:26:49 +02:00
Robert Müller dc52377fc5 Use ReadFile to read shader 2022-06-16 10:19:38 +02:00
Robert Müller de2744cb2a Use ReadFile to read opus sounds in editor 2022-06-16 10:19:37 +02:00