lsnes/videodumper2.hpp
Ilari Liusvaara f170c7bab2 Major reorganization of command handling
Make commands objects instead of functions calling each other.

Now there is '?' command that can display command list and help about
individual command. Also the command handling is more distributed into
places where it belongs.
2011-09-14 20:06:36 +03:00

65 lines
1.8 KiB
C++

#ifndef _videodumper2__hpp__included__
#define _videodumper2__hpp__included__
#include <cstdint>
#include <iostream>
#include <fstream>
#include <vector>
#include <list>
#include <stdexcept>
#include "window.hpp"
#include "videodumper.hpp"
/**
* \brief End dumping.
*
* Forcibly ends dumping. Mainly useful for quitting.
*
* \throws std::bad_alloc Not enough memory.
* \throws std::runtime_error Failed to end dump.
*/
void end_vid_dump() throw(std::bad_alloc, std::runtime_error);
/**
* \brief Dump a frame.
*
* Dumps a frame. Does nothing if dumping is not in progress.
*
* \param ls Screen to dump.
* \param rq Render queue to run.
* \param left Left border.
* \param right Right border.
* \param top Top border.
* \param bottom Bottom border.
* \param region True if PAL, false if NTSC.
* \param win Graphics system handle.
* \throws std::bad_alloc Not enough memory.
* \throws std::runtime_error Failed to dump frame.
*/
void dump_frame(lcscreen& ls, render_queue* rq, uint32_t left, uint32_t right, uint32_t top, uint32_t bottom,
bool region, window* win) throw(std::bad_alloc, std::runtime_error);
/**
* \brief Dump sample of audio.
*
* Dumps one sample of audio. Does nothing if dumping is not in progress.
*
* \param l_sample Left channel sample (-32768-32767)
* \param r_sample Right channel sample (-32768-32767)
* \param win Graphics System handle.
* \throws std::bad_alloc Not enough memory.
* \throws std::runtime_error Failed to dump sample.
*/
void dump_audio_sample(int16_t l_sample, int16_t r_sample, window* win) throw(std::bad_alloc, std::runtime_error);
/**
* \brief Is the dump in progress?
*/
bool dump_in_progress() throw();
/**
* \brief Fill rendering shifts.
*/
void video_fill_shifts(uint32_t& r, uint32_t& g, uint32_t& b);
#endif