~ubuntu-branches/ubuntu/trusty/rlvm/trusty

« back to all changes in this revision

Viewing changes to src/Systems/SDL/SDLGraphicsSystem.hpp

  • Committer: Package Import Robot
  • Author(s): Ying-Chun Liu (PaulLiu)
  • Date: 2013-11-02 02:57:13 UTC
  • mfrom: (10.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20131102025713-yzg31grxr8i7xerh
Tags: 0.13-1
* New upstream release
  - rlvm will now warn on startup when it detects Japanese save data, but
    English patched game files, and offer to reset the save data.
  - Much better support for Little Busters. Most graphical glitches during
    the Little Busters Refrain have been fixed.
  - TCC tone curve effects have been reverse-engineered and implemented
    (thanks to lurkmoar)
  - Sepia scenes (and other graphical filters) should look much better.
  - Simple shake commands implemented (fancy per-layer shaking still
    unimplemented).
  - Make animations smooth: data should be uploaded to the graphics card
    before an animation loop starts, not while the animation loop is
    running.
  - Fixes finding system fonts on Linux
  - Thanks to Elliot Glaysher <glaysher@umich.edu>
* Remove upstreamed patches:
  - debian/patches/002_675426ad62bccf1de10b0ae31dd46331ec47aacb.patch
  - debian/patches/003_5dafabf5448635c4d4526d6e35ea7ec664a27261.patch
  - debian/patches/004_boost-drop-mt.patch
  - debian/patches/005_missing-include.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include <string>
33
33
 
34
34
#include <boost/shared_ptr.hpp>
 
35
#include "base/notification_observer.h"
 
36
#include "base/notification_registrar.h"
35
37
#include "Systems/Base/GraphicsSystem.hpp"
36
38
 
37
 
#include "lru_cache.hpp"
38
 
 
39
39
#include <SDL/SDL_opengl.h>
40
40
 
41
41
struct SDL_Surface;
54
54
 *
55
55
 * @todo This public interface really needs to be rethought out.
56
56
 */
57
 
class SDLGraphicsSystem : public GraphicsSystem {
 
57
class SDLGraphicsSystem : public GraphicsSystem,
 
58
                          public NotificationObserver {
58
59
 public:
59
60
  // SDL should be initialized before you create an SDLGraphicsSystem.
60
61
  SDLGraphicsSystem(System& system, Gameexe& gameexe);
85
86
  virtual void setMinimumSizeForDC(int dc, Size size);
86
87
  virtual void freeDC(int dc);
87
88
 
88
 
  virtual boost::shared_ptr<Surface> loadNonCGSurfaceFromFile(
 
89
  virtual boost::shared_ptr<const Surface> loadSurfaceFromFile(
89
90
      const std::string& short_filename);
90
91
 
91
92
  virtual boost::shared_ptr<Surface> getHaikei();
92
93
  virtual boost::shared_ptr<Surface> getDC(int dc);
93
94
  virtual boost::shared_ptr<Surface> buildSurface(const Size& size);
94
 
  virtual void fillScreenArea(const Rect& rect, const RGBAColour& colour);
 
95
 
 
96
  virtual ColourFilter* BuildColourFiller();
95
97
 
96
98
  // -----------------------------------------------------------------------
97
99
 
137
139
 
138
140
  void setWindowTitle();
139
141
 
 
142
  // NotificationObserver:
 
143
  virtual void Observe(NotificationType type,
 
144
                       const NotificationSource& source,
 
145
                       const NotificationDetails& details);
 
146
 
140
147
  // ---------------------------------------------------------------------
141
148
 
142
149
  SDL_Surface* screen_;
164
171
  /// utf8 encoded subtitle
165
172
  std::string subtitle_;
166
173
 
 
174
  // The value we've set the window title to. We do this to work around a
 
175
  // memory leak in PulseAudio.
 
176
  std::string currently_set_title_;
 
177
 
167
178
  /// Window icon
168
179
  SDL_Surface* icon_;
169
180
 
183
194
  int screen_tex_width_;
184
195
  int screen_tex_height_;
185
196
 
186
 
  /**
187
 
   * LRU cache filled with the last fifteen accessed images.
188
 
   *
189
 
   * This cache's contents are assumed to be immutable.
190
 
   *
191
 
   * @todo Think about enforcing the immutability by adding 'const' to
192
 
   *       half the program.
193
 
   */
194
 
  LRUCache<std::string, boost::shared_ptr<Surface> > image_cache_;
 
197
  NotificationRegistrar registrar_;
195
198
};
196
199
 
197
200