aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2009-05-31Document that debug level 11 turns on all special debug level messages ↵Filippos Karapetis
(refer to rev. #28858) svn-id: r41076
2009-05-29Changed SaveFileManager methods to take Common::String params (instead of ↵Max Horn
char pointers) svn-id: r41000
2009-05-26Renamed Common::Serializer::syncMagic to matchBytes, and added version ↵Max Horn
paarms to it (we migh want to add corresponding matchUint32LE etc. functions if needed) svn-id: r40909
2009-05-26Fixed a bug in Common::Array (including a unit test for it), and changed the ↵Max Horn
way the internal storage growth over time. The bug could result in incorrect results when using push_back (or insert_at) to insert data from an array into itself if this insertions would cause the internal array storage to grow. Also added a unit test for this bug. Furthermore, if the internal storage needs to grow, it will now be resized to the next power of two, instead of being increased by 32. svn-id: r40907
2009-05-24Strip trailing whitespaces in the whole code base.Johannes Schickel
svn-id: r40867
2009-05-19COMMON: Removed Stream::ioFailed() and clearIOFailed(), as they are ↵Max Horn
deprecated; however, retained ioFailed in SeekableReadStream and File for now (so for now this mainly affects WriteStream subclasses) svn-id: r40725
2009-05-19Improved Common::Serializer in several ways:Max Horn
* Added support versioned serialization * Added a convenience API for handling 'magic IDs' transparently * Exposed the err()/clearErr() methods of the underlying streams * Added a basic unit test for versioned loading (more should be added, in particular for saving) * Removed the syncString(char *, uint16) alias for syncBytes(byte *buf, uint32 size) svn-id: r40723
2009-05-18Typo.Johannes Schickel
svn-id: r40693
2009-05-12Allow creation of KeyState with zero ascii value.Eugene Sandulenko
svn-id: r40501
2009-05-12Add more detailed error message for "Chunk overread" case.Johannes Schickel
svn-id: r40493
2009-05-12Typo.Johannes Schickel
svn-id: r40487
2009-05-12Added a startOffset parameter to hexdump() (used by SCI's own hexdump method)Filippos Karapetis
svn-id: r40470
2009-05-10Keymapper:Eugene Sandulenko
- Introduced new OSystem method getHardwareKeySet() with default implementation - Moved global keymap creation to base/main.cpp - Moved GUI keymap creation to gui/GuiManager.cpp - Added various safeguard checks to various keymapper methods Now it is really possible to add keymapper to all backends. svn-id: r40439
2009-05-10Changed Common::Array::resize() to default init new array elementsMax Horn
svn-id: r40430
2009-05-10Store global keymaps into a separate sectionEugene Sandulenko
svn-id: r40427
2009-05-08Clarified docstring for String::insertCharMax Horn
svn-id: r40382
2009-05-05COMMON: Changed Array destructor to reset _storage and _size to 0 -- this ↵Max Horn
helps to find 'Array used after being disposed' bugs svn-id: r40326
2009-05-04Fix valgrind warningEugene Sandulenko
svn-id: r40309
2009-05-04COMMON: Made Array::resize() init/zero the memory it allocatesMax Horn
svn-id: r40304
2009-05-04Fixed new[] / delete mismatch in Common::StringMax Horn
svn-id: r40302
2009-05-03COMMON: Optimized MemoryPool::freeUnusedPages (if many pages are phased out ↵Max Horn
at once, don't copy everything multiple times around) svn-id: r40292
2009-05-03COMMON: Check for failed memory allocations; changed Common::String to use ↵Max Horn
new/delete instead of malloc/free svn-id: r40291
2009-05-03COMMON: Simplified Common::Stack methods using the recent Common::Array ↵Max Horn
improvements svn-id: r40267
2009-05-03COMMON: Changed Array::resize to not shrink the internal storage if we ↵Max Horn
shrink the array svn-id: r40262
2009-04-28COMMON: Made Common::List::clear more efficientMax Horn
svn-id: r40172
2009-04-28fixed a typoMax Horn
svn-id: r40171
2009-04-27COMMON: Improved efficiency of some Common::List methods; added more unit ↵Max Horn
tests and some doxygen comments for Common::List and Common::Array svn-id: r40164
2009-04-27COMMON: Made sure Common::List and Common::array each have all ↵Max Horn
front/back/push_back/push_front, as have their STL counterparts svn-id: r40163
2009-04-27COMMON: Added Functor2Fun; fixed some typosMax Horn
svn-id: r40160
2009-04-27COMMON: Added Common::List::front() and back() method (similar to std::list)Max Horn
svn-id: r40154
2009-04-24Fixed typo.Torbjörn Andersson
svn-id: r40121
2009-04-22COMMON: changed class StringList to a simple typedef; enhanced the ↵Max Horn
Common::Array constructor which converts regular arrays to Array objects to be more flexible in its type (allows e.g. to assign an array of char* to a StringList svn-id: r40077
2009-04-21COMMON: Removed copy constructors / assignment operators in cases where they ↵Max Horn
are identical to the automatically generated ones. Also removed a pointless 'explicit' svn-id: r40049
2009-04-20COMMON & TESTS: Added new constructor to Array<T>, namely Array(const T* ↵Max Horn
data, int n), which makes it possible to clone a regular array into a Common::Array; added a unit test for that and slightly extended existing Common::Array unit tests svn-id: r40027
2009-04-11COMMON: Added unit test for Common::List::size(); made List::size() slightly ↵Max Horn
more efficient; same for remove() and operator= svn-id: r39921
2009-04-09Rewrote Common::Rect::contains(Rect) to do what the name suggests (check ↵Max Horn
whether one rect contains the other). Previously, foo.contains(foo) would return false. Added/enabled unit tets for this svn-id: r39911
2009-04-01Formatting.Johannes Schickel
svn-id: r39789
2009-03-25Allow building of psp backend via configure (Part 1 - Still need to add the ↵Joost Peters
fixup + EBOOT packing steps). Thanks dhewg and fingolfin for assistance. :) svn-id: r39693
2009-03-24cleanupMax Horn
svn-id: r39658
2009-03-20Removed #include nds/jtypes.h from common/scummsys.h -- it already gets ↵Max Horn
loaded by portdefs.h svn-id: r39562
2009-03-19COMMON: Added a new IS_ALIGNED macro (for now using size_t, we can change it ↵Max Horn
if this turns out to be not portable enough. Also added a doxygen comment to the ARRAYSIZE macro svn-id: r39542
2009-03-16Added a syncString variation needed for the Cruise enginePaul Gilbert
svn-id: r39442
2009-03-15Moved Tinsel::Serializer to Common::Serializer, so that I can use it in the ↵Max Horn
SCI engine svn-id: r39428
2009-03-10Fixed warning in list codeMax Horn
svn-id: r39287
2009-03-09Rewrote Common::List iterator code to ensure const correctness is preserved.Max Horn
We tried to implement the list iterators in a clever way, to reduce code duplication. But this is essentially impossible to do properly, sadly -- this is one of the places where the ugly drawbacks of C++ really show. As a consequence, our implementation had a bug which allowed one to convert any const_iterator to an iterator, thus allowing modifying elements of const lists. This rewrite reintroduces code duplication but at least ensures that no const list is written to accidentally. Also fix some places which incorrectly used iterator instead of const_iterator or (in the kyra code) accidentally wrote into a const list. svn-id: r39279
2009-03-07Modified HashMap ctr to skip _defaultVal() on PS2 to avoid gcc 3.2.2 ICEMax Lingua
svn-id: r39174
2009-03-05Fix for bug #2664460: Various SeekableReadStream::seek() implementations (as ↵Max Horn
well as our unit tests, ouch) handled SEEK_END incorrectly (using -offset instead of offset), contrary to what the docs said and what fseek does. Hopefully I found and fixed all affected parts, but still watch out for regressions svn-id: r39135
2009-03-01Fix documentation, debug(C/N) prints to stdout not stderr.Johannes Schickel
svn-id: r39058
2009-03-01COMMON: added a debugC variant which only takes a debug channel maskMax Horn
svn-id: r39054
2009-02-28Patch #2638336: Broken Sword PSX SupportEugene Sandulenko
svn-id: r38956