MCPcopy Create free account
hub / github.com/Farama-Foundation/Arcade-Learning-Environment / getScreenRGB

Method getScreenRGB

src/ale/ale_interface.cpp:351–360  ·  view source on GitHub ↗

This method should receive a vector to fill it with the RGB colours. The first positions contain the red colours, followed by the green colours and then the blue colours

Source from the content-addressed store, hash-verified

349//the RGB colours. The first positions contain the red colours,
350//followed by the green colours and then the blue colours
351void ALEInterface::getScreenRGB(std::vector<unsigned char>& output_rgb_buffer) const {
352 size_t w = environment->getScreen().width();
353 size_t h = environment->getScreen().height();
354 size_t screen_size = w * h;
355
356 pixel_t* ale_screen_data = environment->getScreen().getArray();
357
358 theOSystem->colourPalette().applyPaletteRGB(output_rgb_buffer,
359 ale_screen_data, screen_size);
360}
361
362// Returns the current audio data
363const std::vector<uint8_t>& ALEInterface::getAudio() const {

Callers

nothing calls this directly

Calls 5

getScreenMethod · 0.80
getArrayMethod · 0.80
applyPaletteRGBMethod · 0.80
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected