Commit Graph

78 Commits

Author SHA1 Message Date
Nathan Mills
5e9b3d2c4e Limit sscanf %s fields to prevent possible crash. (#4006)
The crash could happen if the input replay files are corrupted.
2019-07-16 11:46:11 +02:00
Benau
ea8896bc17 Add unicode filepath support to replay class 2019-06-28 20:59:44 +08:00
Benau
a56343b7e3 Clean up headers
Remove special RTL handling as it will be done when texting shaping
2019-06-15 13:52:28 +08:00
Alayan
e7a9219f1f Add replay file name next to replay error messages 2019-04-16 16:42:24 +02:00
hiker
17ab076858 Fixed various compiler warnings for 64-bit windows compilation. 2018-10-11 23:27:08 +11:00
Alayan
7471d215db Check and remember if a challenge's supertux requirement (esp. time) have been met at a lower difficulty 2018-10-10 22:50:27 +02:00
Alayan-stk-2
e711f20edb Fix #3234 (#3367) 2018-08-04 21:17:38 -04:00
Alayan-stk-2
3b3990a196 Use a stable sort for replay list sorting (#3364)
* Use a stable sort for replay list sorting

* Add default multi-criteria sorting for ghost replays list
2018-08-04 20:37:29 -04:00
Benau
60bfc1840b Port rewinders to use shared_ptr 2018-07-24 14:22:20 +08:00
hiker
b0da0f640a Merge remote-tracking branch 'origin/master' into network-items,
fixed conflicts.
2018-06-08 10:55:14 +10:00
hiker
eebd5f2534 Removed unnecessary #include. 2018-06-01 09:42:36 +10:00
Alayan-stk-2
7f84dd39a6 Numerous improvements related to ghost replays (#3244)
* Update GUI files for replay improvements

* Updated replay capabilities

* Improve timer formatting possibilities

Mainly, the ability to choose to display or not minutes, and to choose how many digits are shown after seconds (from 0 : second as smallest timestep - to 3 : ms as smallest timestep)

Also displays "mm:ss.ms" rather than "mm:ss:ms".

* Some new list widget possibilities

Like the ability to update the header while the list is displayed (useful to add or remove columns)

* Update ghost kart for the new replay data

* Also update the ghost controller

* Live differences with ghost replays in linear worlds

* Replay-related UI changes

Big changes to the replay selection screen, and small change to the race UI (add the live timer in ghost races) and the race result UI (add the option to directly race against a newly saved ghost).

* Improves the replay action modal dialog

* Fix time-to-ticks regression

* Several requested improvements

* Improved ghost icon

Also updates the license

* GUI changes and improvements to accomodate multi-mode support

* Additional recorded data

* More functions to get the current race state

* Update replay variables to match what is used

* Updated replay-related config values

* Add ghost kart support to easter egg hunt mode

* Transparent attachments for ghost karts

* Use new stored data (color, item type)

Also :
- Interpolate speed for smoother display in watch-only mode
- Coding style improvements

* Fix coding style issues and add UI support for modes

* Fix coding style issues & support for easter egg mode

* Remove leftover prints

* Use getDifficultyName to remove hardcoded values

* Fix attach_ticks and coding style fixes

* Make the position of the timers fully relative

Otherwise, they would tend to touch each other in some resolutions

Also add a comment about the 59.9995f

* Make the list filling code clearer

Also use getDifficultyName

Most of the line changes shown by git correspond to moving around some bits or adjusting indentation.

* Remove a TODO as requested

* Fix dialog being dismissed too soon

* Remove a fixme

* Small clean up

* Fix logging

* Partial #3249 fix
2018-05-13 20:51:52 -04:00
hiker
c456edd9f2 Convert more time handling to handling ticks. 2018-03-20 09:25:39 +11:00
hiker
f3d56b37df Merge branch 'master' into win-64bit 2017-08-16 17:29:57 +10:00
Geoffrey Mon
a73af6eb0d Save and use usernames in replay files (#2754) (#2893)
* Save and use usernames in replay files

Fixes #2754.

* Store usernames of each racer in recorded replay files
* Display those usernames in a column of the replay selection UI
  and in race result dialogs
* RaceResultGUI::getKartDisplayName functionality moved into
  Controller::getName

* Move Controller::getName definition to avoid unnecessary #include

* Backwards compatibility: use kart name if username is not in replay

* Fix code style issues
2017-08-03 19:51:42 -04:00
hiker
668fdd3b49 Fixed some 64-bit related compiler warnings. 2017-04-07 23:25:52 +10:00
Benau
131dc4bfad Fix #2786 2017-02-18 14:30:35 +08:00
hiker
cd149ab5d7 Moved m_track out of World into a static m_track in Track. Makes
world smaller and removes a few dependencies on World.
2016-12-13 07:53:33 +11:00
Benau
f6ce065cee Allow a few replays coming with the game 2016-04-22 09:49:46 +08:00
hiker
ef1e5da4bc Fixed compiler warning. 2016-04-13 17:11:43 +10:00
Benau
692539690d No combined uint32
Sorry people, you will need to re-record replay
2016-03-27 08:31:31 +08:00
Benau
151cc72e22 Save skidding info in replay 2016-03-25 15:37:53 +08:00
Benau
11b119066c Add support for using ghost kart in challenge
Real challenge file added later.
2016-03-23 14:26:48 +08:00
Benau
07afd444a8 Allow racing against the replay on equal footing
It make record while replay possible too.

We show the ghost only when start racing, fixing the overlapping issue.
2016-03-19 14:57:22 +08:00
hiker
a462d4a81e Fixed compiler warnings. 2016-03-07 09:12:21 +11:00
Benau
dafde30077 Fix crash when press save replay key when it's not initialized. 2016-02-21 15:13:32 +08:00
Benau
c65b0aaae0 Save jumping event in replay file 2016-02-17 14:02:33 +08:00
Benau
a6412d7a07 Add ghost icon, use it in race setup screen 2016-02-15 09:28:36 +08:00
Benau
bd1380a240 Do not crash if used addon track not found in local STK 2016-02-15 01:19:53 +08:00
Benau
05093852bc Add sorting support in ghost replay selection screen 2016-02-15 01:12:13 +08:00
Benau
c46bccc6e3 Finished GUI 2016-02-13 11:55:42 +08:00
Benau
8a121ed32b Add Ghost replay GUI 2016-02-13 01:34:00 +08:00
Benau
5cd27f8f99 Seperate directory for replay files
It allows replay GUI to load them easier
2016-02-12 10:01:54 +08:00
Benau
ece95cbb81 Use MessageQueue to show whether the replay file is saved successfully 2016-02-11 13:42:25 +08:00
Benau
1278394740 More clean 2016-02-11 10:09:31 +08:00
Benau
80152d2989 Clean up 2016-02-11 10:05:40 +08:00
Benau
bb88a0f0ec Allow auto-save replay when specified in time trial mode.
It will disable AI when recording, also it will only save if the
race is completed, ie no one gave up or all events fit in max frame recorded.
2016-02-11 00:42:33 +08:00
Benau
5a9fdd7a8d Allow replay reverse track 2016-02-10 12:43:45 +08:00
Benau
0181ba0bc9 Add Ghost Controller 2016-02-10 10:27:13 +08:00
Benau
b6b644ecb5 Clean up 2016-02-07 10:20:37 +08:00
Benau
c3f589561c Initial work on supporting real race with ghost karts
To test, you need to pass --ghost to supertuxkart with choosing a
track that has replay recorded, you can record one with artist
debug mode.

TODO: correct position handling
2016-02-06 14:52:50 +08:00
Benau
647f42e984 Update comment 2016-02-05 09:40:34 +08:00
Benau
0091c1555a Save nitro and zipper GFX in replay 2016-02-05 09:30:40 +08:00
Benau
4cbb31b8e5 Ghost kart replay fixes:
1. Allow saving steering, speed, suspension length

2. No more crashes when trying to replay
2016-02-04 08:17:02 +08:00
hiker
8d07d26c25 Updated (c) year to include 2015. 2015-03-30 11:42:50 +11:00
hiker
006a7f95c9 Cherrypicked pull request #1743 (cppcheck performance fixes). 2014-12-01 15:14:27 +11:00
hiker
63250237a4 Fixed linux compilation. 2014-11-27 23:27:27 +11:00
hiker
020c129691 Specify the replay buffer size as time value (i.e. how many seconds),
not how many frames.
2014-11-27 16:15:53 +11:00
Tobias Markus
22c22b864a Fix further issues 2014-11-20 23:15:05 +01:00
Tobias Markus
61ccfaac77 Fix errors in src/ that cppcheck yielded with the default configuration 2014-11-20 22:01:46 +01:00