Skip to content

Commit

Permalink
KYRA: Make pointers to VQAHeader const
Browse files Browse the repository at this point in the history
This is just to enforce the idea that VQADecoder owns the VQAHeader
and that the audio/video tracks are only allowed to look at it, not
change it.
  • Loading branch information
Torbjörn Andersson authored and Johannes Schickel committed Jan 18, 2014
1 parent 16d3622 commit 18ef3ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions engines/kyra/vqa.cpp
Expand Up @@ -282,7 +282,7 @@ void VQADecoder::readNextPacket() {

// -----------------------------------------------------------------------

VQADecoder::VQAAudioTrack::VQAAudioTrack(VQAHeader *header) {
VQADecoder::VQAAudioTrack::VQAAudioTrack(const VQAHeader *header) {
_audioStream = Audio::makeQueuingAudioStream(header->freq, false);
}

Expand Down Expand Up @@ -395,7 +395,7 @@ void VQADecoder::VQAAudioTrack::handleSND2(Common::SeekableReadStream *stream) {

// -----------------------------------------------------------------------

VQADecoder::VQAVideoTrack::VQAVideoTrack(VQAHeader *header) {
VQADecoder::VQAVideoTrack::VQAVideoTrack(const VQAHeader *header) {
memset(_palette, 0, sizeof(_palette));
_dirtyPalette = false;

Expand Down
4 changes: 2 additions & 2 deletions engines/kyra/vqa.h
Expand Up @@ -80,7 +80,7 @@ class VQADecoder : public Video::VideoDecoder {

class VQAAudioTrack : public AudioTrack {
public:
VQAAudioTrack(VQAHeader *header);
VQAAudioTrack(const VQAHeader *header);
~VQAAudioTrack();

void handleSND0(Common::SeekableReadStream *stream);
Expand All @@ -96,7 +96,7 @@ class VQADecoder : public Video::VideoDecoder {

class VQAVideoTrack : public FixedRateVideoTrack {
public:
VQAVideoTrack(VQAHeader *header);
VQAVideoTrack(const VQAHeader *header);
~VQAVideoTrack();

uint16 getWidth() const;
Expand Down

0 comments on commit 18ef3ed

Please sign in to comment.