~ubuntu-branches/debian/squeeze/stella/squeeze

« back to all changes in this revision

Viewing changes to src/emucore/MediaSrc.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-07-12 23:49:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100712234936-juawrr3etzhr2qpv
Tags: 3.1.2-1
* New maintainer (closes: #532039).
* New upstream version (closes: #461121):
  - includes launcher (closes: #396058).
* Fix the reference to the X Window System in the description (closes:
  #411815).
* Move to main, DFSG-free ROMs are available (see README.Debian).
* Enhance the package description.
* Drop the libslang2-dev dependency (closes: #560274).
* Remove the Encoding entry from stella.desktop.
* Avoid ignoring errors when cleaning.
* Add ${misc:Depends} to the package dependencies.
* Provide a doc-base file to install the documentation using doc-base.
* Switch to debhelper 7 with a simplified rules file.
* Use autotools-dev to provide updated configuration files.
* Update to Standards-Version 3.9.0:
  - Move to menu section Applications/Emulators.
  - Move the homepage declaration.
* Re-write the manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//============================================================================
2
 
//
3
 
//   SSSS    tt          lll  lll       
4
 
//  SS  SS   tt           ll   ll        
5
 
//  SS     tttttt  eeee   ll   ll   aaaa 
6
 
//   SSSS    tt   ee  ee  ll   ll      aa
7
 
//      SS   tt   eeeeee  ll   ll   aaaaa  --  "An Atari 2600 VCS Emulator"
8
 
//  SS  SS   tt   ee      ll   ll  aa  aa
9
 
//   SSSS     ttt  eeeee llll llll  aaaaa
10
 
//
11
 
// Copyright (c) 1995-2008 by Bradford W. Mott and the Stella team
12
 
//
13
 
// See the file "license" for information on usage and redistribution of
14
 
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
15
 
//
16
 
// $Id: MediaSrc.hxx,v 1.19 2008/05/21 14:01:30 stephena Exp $
17
 
//============================================================================
18
 
 
19
 
#ifndef MEDIASOURCE_HXX
20
 
#define MEDIASOURCE_HXX
21
 
 
22
 
#include <string>
23
 
 
24
 
class MediaSource;
25
 
class Sound;
26
 
 
27
 
#include "bspf.hxx"
28
 
 
29
 
/**
30
 
  This class provides an interface for accessing graphics and audio data.
31
 
 
32
 
  @author  Bradford W. Mott
33
 
  @version $Id: MediaSrc.hxx,v 1.19 2008/05/21 14:01:30 stephena Exp $
34
 
*/
35
 
class MediaSource
36
 
{
37
 
  public:
38
 
    /**
39
 
      Create a new media source
40
 
    */
41
 
    MediaSource();
42
 
 
43
 
    /**
44
 
      Destructor
45
 
    */
46
 
    virtual ~MediaSource();
47
 
 
48
 
  public:
49
 
    /**
50
 
      This method should be called at an interval corresponding to the 
51
 
      desired frame rate to update the media source.  Invoking this method
52
 
      will update the graphics buffer and generate the corresponding audio
53
 
      samples.
54
 
    */
55
 
    virtual void update() = 0;
56
 
 
57
 
    /**
58
 
      Answers the current frame buffer
59
 
 
60
 
      @return Pointer to the current frame buffer
61
 
    */
62
 
    virtual uInt8* currentFrameBuffer() const = 0;
63
 
 
64
 
    /**
65
 
      Answers the previous frame buffer
66
 
 
67
 
      @return Pointer to the previous frame buffer
68
 
    */
69
 
    virtual uInt8* previousFrameBuffer() const = 0;
70
 
 
71
 
#ifdef DEBUGGER_SUPPORT
72
 
    /**
73
 
      This method should be called whenever a new scanline is to be drawn.
74
 
      Invoking this method will update the graphics buffer and generate
75
 
      the corresponding audio samples.
76
 
    */
77
 
    virtual void updateScanline() = 0;
78
 
 
79
 
    /**
80
 
      This method should be called whenever a new partial scanline is to be
81
 
      drawn by stepping one CPU instruction. Invoking this method will update the
82
 
      graphics buffer and generate the corresponding audio samples.
83
 
    */
84
 
    virtual void updateScanlineByStep() = 0;
85
 
 
86
 
    /**
87
 
      This method should be called whenever a new partial scanline is to be
88
 
      drawn by tracing to target address. Invoking this method will update the
89
 
      graphics buffer and generate the corresponding audio samples.
90
 
    */
91
 
    virtual void updateScanlineByTrace(int target) = 0;
92
 
#endif
93
 
 
94
 
  public:
95
 
    /**
96
 
      Answers the height of the frame buffer
97
 
 
98
 
      @return The frame's height
99
 
    */
100
 
    virtual uInt32 height() const = 0;
101
 
 
102
 
    /**
103
 
      Answers the width of the frame buffer
104
 
 
105
 
      @return The frame's width
106
 
    */
107
 
    virtual uInt32 width() const = 0;
108
 
 
109
 
  public:
110
 
    /**
111
 
      Enables/disables auto-frame calculation.  If enabled, the
112
 
      MediaSource should re-adjust the framerate at regular intervals.
113
 
 
114
 
      @param mode  Whether to enable or disable all auto-frame calculation
115
 
    */
116
 
    virtual void enableAutoFrame(bool mode) = 0;
117
 
 
118
 
    /**
119
 
      Answers the total number of scanlines the media source generated
120
 
      in producing the current frame buffer.
121
 
 
122
 
      @return The total number of scanlines generated
123
 
    */
124
 
    virtual uInt32 scanlines() const = 0;
125
 
 
126
 
    /**
127
 
      Sets the sound device for the TIA.
128
 
    */
129
 
    virtual void setSound(Sound& sound) = 0;
130
 
 
131
 
  private:
132
 
    // Copy constructor isn't supported by this class so make it private
133
 
    MediaSource(const MediaSource&);
134
 
 
135
 
    // Assignment operator isn't supported by this class so make it private
136
 
    MediaSource& operator = (const MediaSource&);
137
 
};
138
 
 
139
 
#endif