Jonas Kulla
fe557bca1d
Implement "show_cursor" attribute in Graphics module
...
If false (the default), the system cursor is hidden
inside the game window.
2013-09-24 22:56:25 +02:00
Jonas Kulla
a9454fdf9c
Fix nullpointer deref
2013-09-24 22:42:10 +02:00
Jonas Kulla
4f08382c69
Replace 'tiles.bufferCount' with function
2013-09-24 20:11:55 +02:00
Jonas Kulla
41e1187063
Just realized the word 'Row' makes no sense whatsoever
2013-09-24 20:06:11 +02:00
Jonas Kulla
a327d4c324
Fix valgrind warning (value might be uninitialized)
2013-09-24 19:56:36 +02:00
Jonas Kulla
10ec55e39b
Implement a new tileset atlas layout to allow for bigger tilesets
...
The atlas packing algorithm has been reworked to pack autotiles
and tileset very efficiently into a texture, splitting the tileset
in multiple ways and eliminating the previous duplication of image
data in the atlas across "frames". Animation, which these frames
were designed for, is now done via duplicated buffer frames,
ie. each animation frame has its own VBO and IBO data. This was
not done to save on VRAM (hardly less memory is used), but to
make place for the new atlas layout.
Thanks to this new layout, even with a max texture size of 2048,
one can use tilesets with up to 15000 height. Of course, such
a tileset couldn't be stored in a regular Bitmap to begin with,
which is why I also introduced a hack called "mega surfaces":
software surfaces stored in RAM and wrapped inside a Bitmap,
whose sole purpose is to be passed to a Tilemap as tilesets.
Various other minor changes and fixes are included.
2013-09-24 19:35:38 +02:00
Jonas Kulla
6b2c892280
Simplify shader
2013-09-23 14:12:11 +02:00
Jonas Kulla
b85988d194
Fix typo
2013-09-23 11:18:20 +02:00
Jonas Kulla
da4e0fbed0
Implement smooth scaling
2013-09-23 11:00:50 +02:00
Jonas Kulla
7f604e25ad
Lower minimum OpenGL requirement
2013-09-23 10:42:23 +02:00
Jonas Kulla
f00136c489
Implement fixed aspect ratio
2013-09-23 10:39:16 +02:00
Jonas Kulla
7a6c05bba0
Implement animated flash tiles in Tilemap
...
Flash tiles start with an alpha of 60, which ramps up to 120
in 16 frames and 4 steps, then ramps down again over the same period.
2013-09-23 08:27:28 +02:00
Jonas Kulla
9e63fb6b64
Remove the remaining bits of deprecated GL usage
...
The drawing is now completely shader based, which makes away
with all usage of the depracted matrix stack. This also allows
us to do things like simple translations and texture coordinate
translation directly instead of doing everything indirectly
through matrices.
Fixed vertex attributes ('vertexPointer()' etc) are also
replaced with user defined attribute arrays.
2013-09-23 07:50:22 +02:00
Jonas Kulla
88c1489554
Include vertex shader xxd's
2013-09-23 07:14:53 +02:00
Jonas Kulla
22050f7217
Add new shaders. Also output xxd'ed files to top dir.
2013-09-23 00:17:51 +02:00
Jonas Kulla
abce6c94b0
Properly emit valueChanged in Rect setters
2013-09-23 00:03:43 +02:00
Jonas Kulla
660cb9e05a
Always set rqTermAck to true after binding returns
2013-09-23 00:02:28 +02:00
Jonas Kulla
f4f0748d68
Cosmetic changes
2013-09-21 14:45:27 +02:00
Jonas Kulla
4aed9ef1a7
Add Vec2 conversion method to 'Vec2i'
2013-09-10 04:25:58 +02:00
Jonas Kulla
e42e6398cb
Add FIXME
2013-09-10 04:21:57 +02:00
Jonas Kulla
23c5be6fbe
Catch errors that could happen when reading Scripts.rxdata
2013-09-10 04:21:41 +02:00
Jonas Kulla
d1bfc1e50c
Properly free RWops associated with Font objects
2013-09-10 04:19:45 +02:00
Jonas Kulla
80d0b33dda
Add 'Makefile' / xxd+ binary to gitignore
2013-09-10 04:17:23 +02:00
Jonas Kulla
6f711184ac
Spacing
2013-09-09 21:32:34 +02:00
Jonas Kulla
39233a036b
Rename constant
2013-09-09 21:23:56 +02:00
Jonas Kulla
a66b15bd08
Pack REQUEST event codes into enum
2013-09-09 21:22:31 +02:00
Jonas Kulla
4620901002
Forgot some EXT functions
2013-09-07 02:42:56 +02:00
Jonas Kulla
f87f231129
Fix Plane not accepting nil for '#bitmap='
2013-09-06 15:54:30 +02:00
Jonas Kulla
051c939f8d
Free SDL surface if 'TexPool::request' throws
2013-09-06 15:52:45 +02:00
Jonas Kulla
ef2ed2fb32
Fix wording
2013-09-06 15:29:00 +02:00
Jonas Kulla
6c7d751dbd
Remove 'Default' FBO binding (only allow 'Read' and 'Draw')
...
Also make code more verbose by removing default mode
parameter value to 'FBO::bind'
2013-09-06 14:56:30 +02:00
Jonas Kulla
abc927c91d
Use EXT version of gl functions
2013-09-06 14:37:28 +02:00
Jonas Kulla
ef6bacf201
Only require EXT framebuffer extensions
2013-09-06 14:21:35 +02:00
Jonas Kulla
a9f400e64a
Undef utility macro in header
2013-09-06 13:14:34 +02:00
Jonas Kulla
3bd9df1191
Move draw order sorting into SceneElement
2013-09-06 13:10:41 +02:00
Jonas Kulla
5ca513fcec
Document gl-util types
2013-09-06 12:33:33 +02:00
Jonas Kulla
b151a22f6e
Rename 'Tex' to 'TEX' for consistency
2013-09-06 12:26:41 +02:00
Jonas Kulla
ba3b904f34
Thanks to the ID abstraction, we can use proper overloading now!
2013-09-06 12:22:55 +02:00
Jonas Kulla
55596e9da9
Rename 'RB'(renderbuffer) to 'RBO'(renderbuffer object)
2013-09-06 12:16:24 +02:00
Jonas Kulla
a21423ca1c
Move GL state initialization into GLState
2013-09-04 21:05:47 +02:00
Jonas Kulla
f89cd2d207
Provide general purpose Quad in GlobalState
2013-09-04 19:07:28 +02:00
Jonas Kulla
e8a9873125
Document nonstandard RGSS extensions
2013-09-04 18:43:40 +02:00
Jonas Kulla
efa55ce6c2
Raise exception on invalid bitmap sizes
...
A difference to RMXP is that negative height values
will result in exceptions too.
Also change Bitmap constructors to not allocate Private
struct before potential exceptions.
2013-09-04 18:14:29 +02:00
Jonas Kulla
6a85699e11
Properly destroy fade thread
2013-09-04 17:53:12 +02:00
Jonas Kulla
abd59be30d
Properly delete[] arrays
2013-09-04 17:52:03 +02:00
Jonas Kulla
689a31580c
Beautify constant
2013-09-04 17:03:00 +02:00
Jonas Kulla
1401578f92
Add bounds check to setter
2013-09-04 17:01:51 +02:00
Jonas Kulla
4a945f8d6c
Null PhysFS handle after closing
2013-09-04 13:32:11 +02:00
Jonas Kulla
0253b6ed2b
Use C99 integer types instead of Qt's
2013-09-04 13:30:14 +02:00
Jonas Kulla
a75dea3ffe
Rename 'resetInput' to 'resetInputStates'
2013-09-04 13:28:05 +02:00