Commit graph

37 commits

Author SHA1 Message Date
Aloshi 98120f9ecd Split into subprojects (external, core, es).
Removed relative paths in #includes.
Changed ViewController to a singleton, removing it from the Window class.
2014-06-20 01:40:36 -05:00
Alec Lofquist 678cd10029 Fixed white space on the left/top of background images with an origin of "0.5 0.5". Hopefully.
Added additional error output when SDL renderer fails to create window.
2014-06-10 17:36:03 +00:00
Aloshi 67e266338e Fixed assert being triggered due to divide by zero in HelpComponent::updateGrid due to SVG textures being deinitialized when closing ES with a menu open. 2014-05-26 17:52:55 -05:00
Aloshi 6cf6e62b85 Fixed ImageComponent not using mColorShift's transparency.
Fixes using transparency in <color> tag.
Updated documentation to emphasize the fact that you can control transparency with the <color> tag.
2014-05-24 10:49:59 -05:00
Aloshi b15f3aeec0 Use canonical path names for resource lookup (Font, TextureResource).
Fixes "./../art/file.png" causing duplicates when used in multiple systems, even if it refers to the same file.
Remove debug messages for SVGResource and ImageComponent.
2014-05-23 17:51:43 -05:00
Aloshi 1e7ced2c66 Two fixes with SVG rasterizing:
1. Original width/height were being returned as integers, even though they can be floats (see SVGResource::getImageSize()).  Function also renamed to be more descriptive (renamed to getSourceImageSize()).
2. Now we always round height and scale width from the rounded height when doing scaling, since SVG rasterization scale is determined from height. This seems to fix some 1px cutoff I was seeing, but I'm not sure if it still works for images with extreme aspect ratios that are taller rather than wider.
2014-05-23 16:51:56 -05:00
Aloshi 95e1d8c7d8 Changed some help prompts.
Added back button to OptionListComponent in single select mode.
2014-05-16 16:21:33 -05:00
Aloshi ac0bdb47ed Optimized the hell out of ImageComponent.
(been saving this one for a rainy day...)
Fixed sort order assert triggered by std::sort when sorting help prompts.
2014-04-11 20:48:13 -05:00
Aloshi 8d67cc1053 Fix edge case with image vertex rounding leading to texture-ImageComponent size incongruencies. 2014-03-29 18:03:38 -05:00
Aloshi 0464776e62 Fixed console spam when an ImageComponent has an invalid texture. 2014-03-24 16:29:56 -05:00
Aloshi 1d17bd9938 Design tweaks.
Fixed dpad_right.svg.
2014-03-22 16:02:25 -05:00
Aloshi a82ef25886 Added .svg vector graphics file support.
Should "just work" for any TextureResource::get("*.svg"). dynamic_cast it to an SVGResource and call rasterizeAt(w, h) if you need to re-rasterize it.
Only supports scaling that maintains aspect ratio.
2014-03-19 20:13:59 -05:00
Aloshi 07edad611f "Fixed" the long-time weird rendering artifacts that are apparently caused by vertex coordinates not being integers.
A better fix would be to move to OpenGL 3/GLES 2 and do rounding in the shader.  But I don't have time for that.
2014-03-19 15:03:23 -05:00
Aloshi 3ceeca968f Updated/added comments. 2014-01-24 16:21:10 -06:00
Aloshi 8eb9800127 Added color tag to ImageComponent (for colorshift).
Changed TextComponent's truncation from ".." to "...".
Updated documentation.
2014-01-23 15:30:32 -06:00
Aloshi 3f1fcf2400 Changed texture wrap mode to be determined as part of texture creation.
Should hopefully fix some of the weird artifacts at certain resolutions.
2014-01-19 12:23:01 -06:00
Aloshi a83ce289e0 Make new resizing algorithm actually work properly. 2014-01-10 18:05:37 -06:00
Aloshi b35d365dc8 Removed the allowUpscale option for ImageComponent::setResize.
Added ImageComponent::setMaxSize(size).
Added "maxSize" theming option for ImageComponent.
2014-01-10 17:47:34 -06:00
Aloshi 8a52866ca6 Added support for theme "extras".
Fixed a few crashes (e.g. TextListComponent::applyTheme).
2014-01-03 08:26:39 -06:00
Aloshi e6d0da998b Theme applicators have become the virtual method
GuiComponent::applyTheme(theme, view, element, properties).
Applying fonts works now.
2013-12-31 23:39:22 -06:00
Aloshi a7359a2d08 Themes mostly stable, documentation updated 2013-11-21 16:47:26 -06:00
Aloshi b510aa8cd4 Moved ResourceManager to be a singleton.
The character count of the average Font::get decreased by 310%...
2013-10-04 18:10:39 -05:00
Aloshi a3a4636fd5 Search for box hooked up.
Display thumbnails for results.
Still need to resolve boxart.
2013-09-20 18:55:05 -05:00
Aloshi 60adf05077 Use res2h-generated files for embedded resources.
You do not need res2h to build ES, only if you wish to modify resource
files.
Added a simple corner.png and bar.png for a border in the settings menu.
Added ImageComponent::setColorShift(unsigned int color) to change the
OpenGL color array.
2013-08-07 17:40:27 -05:00
Aloshi 92adc41cd6 Fixed really sneaky texture deallocation bug.
Textures allocated with no path (e.g. the transition image which uses
copyScreen()) weren't being deinitialized with the renderer.  Which meant
something else could take the old texture ID, and when the no-path texture
got destroyed, it would take a texture along with it.
2013-08-06 23:35:06 -05:00
Aloshi bd940c56b4 Added new game launch/return effect. 2013-08-06 08:15:20 -05:00
Aloshi 542d41c682 Move from homegrown Vector2 class to Eigen.
Pass a matrix (Eigen::Affine3f) in GuiComponent::render instead of doing
glTranslate behind the scenes.
2013-07-10 06:29:43 -05:00
Aloshi c8900f4099 Moved to class-individualized static gets for resources.
See issue #95 for discussion.
2013-07-09 00:44:24 -05:00
Aloshi fe8c592623 Merge branch 'master' into unstable
Conflicts:
	src/components/ImageComponent.h
2013-07-03 01:30:44 -05:00
Sir_Leon b4e554153a Moved Opacity logic to GuiComponent
Moved Opacity logic from ImageComponent to GuiComponent so any extender
of GuiComponent che implement its opacity logic.

Implemented Opacity logic for TextComponent (now text can have fade
animation)
2013-07-02 16:51:33 +02:00
Aloshi 90af5d47ab Created the ResourceManager, Resource, and TextureResource classes.
The ResourceManager provides a unified interface for accessing resource
data, embedded or from the filesystem, with
initialization/deinitialization handled automatically behind the scenes.
It also keeps from creating duplicate resources (e.g. when two
ImageComponents use the same image file).
Audio still needs to be moved over to it.
2013-06-21 11:49:29 -05:00
Aloshi 5619674c55 Work-around for no front buffer access on GLES.
Buffer swap now occurs after update but before render.
2013-06-19 19:56:45 -05:00
Aloshi da6ae9ac10 Initial screen transition when switching systems. 2013-06-16 16:23:04 -05:00
Aloshi 7faf9fca53 Added Size and getSize() to GuiComponent.
Added setClipRect and clearClipRect to Renderer.
TextListComponent finally has a marquee. :)
2013-06-02 17:33:49 -05:00
Aloshi 826624481a Refactored ImageComponent to use Vector2. 2013-06-02 16:05:29 -05:00
Aloshi 24512c0c9f Component rendering now uses OpenGL translation.
You don't need to take into account offset when rendering anymore.
2013-06-02 14:34:50 -05:00
Aloshi 424fcb0329 Basic GuiComponent refactor complete. 2013-06-02 10:08:32 -05:00
Renamed from src/components/GuiImage.cpp (Browse further)