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

« back to all changes in this revision

Viewing changes to src/Systems/Base/DigitsGraphicsObject.cpp

  • 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:
51
51
    : system_(system),
52
52
      value_(0),
53
53
      font_name_(font),
54
 
      font_(system.graphics().loadNonCGSurfaceFromFile(font)) {
 
54
      font_(system.graphics().getSurfaceNamed(font)) {
55
55
}
56
56
 
57
57
DigitsGraphicsObject::~DigitsGraphicsObject() {
61
61
  if (needsUpdate(rp))
62
62
    updateSurface(rp);
63
63
 
64
 
  return int((rp.width() / 100.0f) * surface_->size().width());
 
64
  return int(rp.getWidthScaleFactor() * surface_->size().width());
65
65
}
66
66
 
67
67
int DigitsGraphicsObject::pixelHeight(const GraphicsObject& rp) {
68
68
  if (needsUpdate(rp))
69
69
    updateSurface(rp);
70
70
 
71
 
  return int((rp.height() / 100.0f) * surface_->size().height());
 
71
  return int(rp.getHeightScaleFactor() * surface_->size().height());
72
72
}
73
73
 
74
74
GraphicsObjectData* DigitsGraphicsObject::clone() const {
75
75
  return new DigitsGraphicsObject(*this);
76
76
}
77
77
 
78
 
boost::shared_ptr<Surface> DigitsGraphicsObject::currentSurface(
 
78
void DigitsGraphicsObject::execute(RLMachine& machine) {
 
79
}
 
80
 
 
81
boost::shared_ptr<const Surface> DigitsGraphicsObject::currentSurface(
79
82
    const GraphicsObject& go) {
80
83
  if (needsUpdate(go))
81
84
    updateSurface(go);
158
161
 
159
162
  value_ = 0;
160
163
  surface_.reset();
161
 
  font_ = system_.graphics().loadNonCGSurfaceFromFile(font_name_);
 
164
  font_ = system_.graphics().getSurfaceNamed(font_name_);
162
165
}
163
166
 
164
167
template<class Archive>