| 270 | } |
| 271 | |
| 272 | void DoomGamePython::updateBuffersShapes(){ |
| 273 | int channels = this->getScreenChannels(); |
| 274 | int width = this->getScreenWidth(); |
| 275 | int height = this->getScreenHeight(); |
| 276 | |
| 277 | switch(this->getScreenFormat()){ |
| 278 | case CRCGCB: |
| 279 | case CBCGCR: |
| 280 | this->colorShape.resize(3); |
| 281 | this->colorShape[0] = channels; |
| 282 | this->colorShape[1] = height; |
| 283 | this->colorShape[2] = width; |
| 284 | break; |
| 285 | |
| 286 | case GRAY8: |
| 287 | case DOOM_256_COLORS8: |
| 288 | this->colorShape.resize(2); |
| 289 | this->colorShape[0] = height; |
| 290 | this->colorShape[1] = width; |
| 291 | break; |
| 292 | |
| 293 | default: |
| 294 | this->colorShape.resize(3); |
| 295 | this->colorShape[0] = height; |
| 296 | this->colorShape[1] = width; |
| 297 | this->colorShape[2] = channels; |
| 298 | } |
| 299 | |
| 300 | this->grayShape[0] = height; |
| 301 | this->grayShape[1] = width; |
| 302 | |
| 303 | this->audioShape[0] = this->getAudioSamplesPerTic() * this->getAudioBufferSize(); |
| 304 | this->audioShape[1] = 2; |
| 305 | } |
| 306 | |
| 307 | |
| 308 | template<class T> pyb::list DoomGamePython::vectorToPyList(const std::vector<T>& vector){ |
no test coverage detected