Another checkpoint. Compiling/building/running - Python API tests from in-engine REPL are not passing, though

This commit is contained in:
John McCardle 2023-03-01 21:37:42 -05:00
commit f23dfbe4ba
12 changed files with 127 additions and 22 deletions

16
src/IndexSprite.cpp Normal file
View file

@ -0,0 +1,16 @@
#include "IndexSprite.h"
#include "GameEngine.h"
//int texture_index, sprite_index, x, y;
GameEngine* IndexSprite::game;
sf::Sprite IndexSprite::drawable()
{
sf::Sprite s;
auto& tex = IndexSprite::game->textures[texture_index];
s.setTexture(tex.texture);
s.setPosition(sf::Vector2f(x, y));
s.setTextureRect(tex.spriteCoordinates(sprite_index));
return s;
}