11 Commits

Author SHA1 Message Date
Dmitry Marakasov
24482d85f6 Follow SDL2 include path conventions
Though these are broken and error prone, as they ignore the possibility
of conflicts between SDL, SDL2 and wrappers thereof discarding useful
include path prefix (SDL2/), since SDL and satellite libraries follow
these it's too hard to stay away.

So don't use prefixes for SDL include paths any longer.
2017-02-08 13:19:04 +03:00
Dmitry Marakasov
689f57b864 Exception rework
Now it explicitely stores name of SDL function which caused an error
and generates complete user-readable error message which contains both
function name and SDL error message. Users can now handle SDL2pp
exceptions along with all others in `catch (std::exception&)' and
get complete error info.

While here, fixed incorrect function names in some throw's
2015-01-19 01:41:37 +03:00
Dmitry Marakasov
92b225c928 Merge branch 'use_optional'
Conflicts:
	.travis.yml
2014-12-26 16:19:05 +03:00
Dmitry Marakasov
7fd9137239 Fix uninitialized member vars 2014-12-26 01:46:08 +03:00
Dmitry Marakasov
6d0213810b Switch to Optional
Remove "valid" flag from Rect and Point, derive them directly from
SDL_Rect and SDL_Point structures, simplify logic. Now x/y/w/h member
variables are directly accessible and Rect/Point may be passed as
SDL_Rect/SDL_Point via pointer or reference.

Change all cases where Null Rects and Points were used to Optional.

invalid state related functions like Null(), IsNull() and Get() are
now deprecated but are not removed yet for compatibility sake.
2014-12-25 19:10:41 +03:00
Dmitry Marakasov
7e61a4aa7d Merge branch 'texture-lock' 2014-12-18 17:28:08 +03:00
Dmitry Marakasov
46591a9cbf Update project comment 2014-12-18 02:52:08 +03:00
Dmitry Marakasov
0124e2703a Update copyright years 2014-12-18 02:51:49 +03:00
Dmitry Marakasov
1118a9b166 Implement empty constructor for Texture::LockHandle
Useful if lock must be initialized after it was created
While here, deinitialize all fields of an object which was moved-from
2014-12-17 03:50:02 +03:00
Dmitry Marakasov
93a77542d8 Fix move assignments
- Add self-assignment checks
- Free resources of object which is going to be replaced to avoid
  resource leaks
2014-11-30 01:22:22 +03:00
Dmitry Marakasov
f5fa211cfe Implement texture locking 2014-11-24 19:27:56 +03:00