Commit Graph

1067 Commits

Author SHA1 Message Date
Tobia Tesan
9787fc5768 WINTERMUTE: Fix formatting in video_subtitler.h 2014-11-05 19:45:39 +01:00
Tobia Tesan
998da18c05 WINTERMUTE: Move var declarations inside loop in loadSubtitles 2014-11-05 19:42:17 +01:00
Tobia Tesan
2f082f6e43 WINTERMUTE: Remove redundant explicit call to Common::String constructor 2014-11-05 19:31:10 +01:00
Tobia Tesan
215ac157e6 WINTERMUTE: Declare vars inside appropriate block in loadSubtitles 2014-11-05 19:28:42 +01:00
Tobia Tesan
0a2c1a809f WINTERMUTE: Keep _[show|current]Subtitle private in video_subtitler.h 2014-11-05 19:07:03 +01:00
Tobia Tesan
e12f30ed03 WINTERMUTE: Add a bunch of comments in loadSubtitles 2014-10-15 21:36:47 +02:00
Tobia Tesan
a4b9bc5877 WINTERMUTE: Rename a bunch of variabiles in loadSubtitles 2014-10-15 21:36:47 +02:00
Tobia Tesan
e9b722278e WINTERMUTE: Declare and init size in one place in VideoSubtitler 2014-10-15 21:36:47 +02:00
Tobia Tesan
3cef639f91 WINTERMUTE: new char[str.size()+1] in BaseStringTable::expand
This makes room for the EOS char.
2014-10-15 21:36:47 +02:00
Tobia Tesan
d5ed8c29f1 WINTERMUTE: Turn _subtitles into Common::Array<SubtitleCard> in VideoSubtitler
This necessarily loses const in SubtitleCard's attributes
2014-10-15 21:36:47 +02:00
Tobia Tesan
2fc69d770c WINTERMUTE: Initialize tokenSomething vars in VideoSubtitler
MSVC complains otherwise.
2014-10-15 21:36:47 +02:00
Tobia Tesan
c6930d9a64 WINTERMUTE: Use int32 for _lastSample in VideoSubtitler
We are thus making room for the sentinel == -1
2014-10-15 21:36:47 +02:00
Tobia Tesan
ebb48a1704 WINTERMUTE: s/delete array/delete[] array/ 2014-10-15 21:36:47 +02:00
Tobia Tesan
f525514da5 WINTERMUTE: Use BaseGame->expandStringByStringTable(&Common::String) in SubtitleCard 2014-10-15 21:36:46 +02:00
Tobia Tesan
578edde66f WINTERMUTE: Const'fy members of class SubtitleCard 2014-10-15 21:36:46 +02:00
Tobia Tesan
856e281bf1 WINTERMUTE: Remove useless constructor from SubtitleCard. 2014-10-15 21:36:46 +02:00
Tobia Tesan
5f25cf1bd7 WINTERMUTE: Don't bother inheriting BaseGame in SubtitleCard 2014-10-15 21:36:46 +02:00
Tobia Tesan
f1ae8e6e8d WINTERMUTE: Introduce BaseGame->expandStringByStringTable(&Common::String) 2014-10-15 21:36:46 +02:00
Tobia Tesan
599390a5ad WINTERMUTE: Lose unnecessary if() in VideoTheoraPlayer 2014-10-15 21:36:46 +02:00
Tobia Tesan
4742acf939 WINTERMUTE: Rename VideoTheoraPlayer->_subtitles to _foundSubtitles for clarity 2014-10-15 21:36:46 +02:00
Tobia Tesan
1a571d9611 WINTERMUTE: Avoid doing check before delete (deleting 0-pointer is safe) 2014-10-15 21:36:46 +02:00
Tobia Tesan
388fbdb6eb WINTERMUTE: Rename VideoSubtitle to SubtitleCard 2014-10-15 21:36:46 +02:00
Tobia Tesan
dd820a7a1e WINTERMUTE: Turn a bunch of uint into uint32 in VideoSubtitle 2014-10-15 21:36:46 +02:00
Tobia Tesan
7b4084b7e0 WINTERMUTE: s/uint32 _lastSample/long _lastSample/ 2014-10-15 21:36:45 +02:00
Tobia Tesan
a4d5d14581 WINTERMUTE: Turn display() and update() into void functions.
No idea why they were bools in the first place.
2014-10-15 21:36:45 +02:00
Tobia Tesan
2acb2f558c WINTERMUTE: Add clarification comment in loadSubtitles 2014-10-15 21:36:45 +02:00
Tobia Tesan
40c5b01aad WINTERMUTE: Preserve const when handing chars over to drawText 2014-10-15 21:36:45 +02:00
Tobia Tesan
7c6f9772d3 WINTERMUTE: Save frames as uint rather than long
It's just as good: at 30 FPS, this allows for
2 ^ 32 / 30 / 60 = 2386093 mins, which is, I guess, a reasonable limit.
2014-10-15 21:36:45 +02:00
Tobia Tesan
afb3ae3034 WINTERMUTE: Treat edge case - prevents crash if SRT file is blank. 2014-10-15 21:36:45 +02:00
Tobia Tesan
581aff7f8f WINTERMUTE: Keep a bunch of attrs private in VideoSubtitler 2014-10-15 21:36:45 +02:00
Tobia Tesan
a78a4d40dd WINTERMUTE: Use Common::String in place of char *text in loadSubtitles 2014-10-15 21:36:45 +02:00
Tobia Tesan
8decf3d742 WINTERMUTE: Remove ////-style separators from imported subtitle code 2014-10-15 21:36:45 +02:00
Tobia Tesan
2eee488e36 WINTERMUTE: Do some refactoring over a bunch of attrs in VideoSubtitle
Conflicts:
	engines/wintermute/video/video_subtitler.cpp
2014-10-15 21:36:45 +02:00
Tobia Tesan
f2441da3da WINTERMUTE: Make sure subtitle files could be found before anything else 2014-10-15 21:36:44 +02:00
Tobia Tesan
6d16fdbf4a WINTERMUTE: Expand subtitles by string table 2014-10-15 21:36:44 +02:00
Tobia Tesan
647b721744 WINTERMUTE: Refactor/Reformat VideoSubtitler::update 2014-10-15 21:36:44 +02:00
Tobia Tesan
113e837d55 WINTERMUTE: Correctly delete _subtitler (which is not an array) 2014-10-15 21:36:44 +02:00
Tobia Tesan
0475fd1a5c WINTERMUTE: Declare counters as uint to match Array::size() 2014-10-15 21:36:44 +02:00
Tobia Tesan
621a068c00 WINTERMUTE: Mass ScummVM-style renaming in subtitles code 2014-10-15 21:36:38 +02:00
Tobia Tesan
ad5fde9db3 WINTERMUTE: Reinstate CVidSubtitle destructor 2014-10-15 20:17:04 +02:00
Tobia Tesan
389e06bdfc WINTERMUTE: Port actual subtitle display code. 2014-10-15 20:16:07 +02:00
Tobia Tesan
472d3e3231 WINTERMUTE: Add getter for _videoFont 2014-10-15 20:11:17 +02:00
Tobia Tesan
d8b432fe51 WINTERMUTE: Use native C types instead of macros 2014-10-15 20:11:16 +02:00
Tobia Tesan
1715196325 WINTERMUTE: Re-enable and use PathUtils for auto SRT detection 2014-10-15 20:09:31 +02:00
Tobia Tesan
6f6e49f4cf WINTERMUTE: Display subtitles in console 2014-10-15 20:08:21 +02:00
Tobia Tesan
532217bcee WINTERMUTE: Reinstate subtitle loading 2014-10-15 19:50:50 +02:00
Tobia Tesan
d9d80db869 WINTERMUTE: Take const char in loadSubtitles 2014-10-15 19:50:48 +02:00
Tobia Tesan
ba1862ecb8 WINTERMUTE: Use BaseFileManager to load SUB file
Conflicts:
	engines/wintermute/video/video_subtitler.cpp
2014-10-15 19:43:26 +02:00
Tobia Tesan
ec3b8fdde2 WINTERMUTE: Use long-style braces around blocks in imported subtitle code 2014-10-15 19:40:48 +02:00
Tobia Tesan
5ee11d6c21 WINTERMUTE: Astyle imported WME subtitle code 2014-10-15 19:29:12 +02:00