Another checkpoint. Compiling/building/running - Python API tests from in-engine REPL are not passing, though
This commit is contained in:
parent
1e9fd77a13
commit
f23dfbe4ba
12 changed files with 127 additions and 22 deletions
16
src/IndexSprite.cpp
Normal file
16
src/IndexSprite.cpp
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue