summary refs log tree commit diff stats
path: root/src/systems/mapping.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-02-16 16:04:32 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-02-16 16:04:32 -0500
commited08b673c50b076042d8f0c49501372168142764 (patch)
tree18ecda99942ef11ce4023c3ad4437976f96b75da /src/systems/mapping.cpp
parent224645d1071c14b4829dbb3ae35870868fcff85a (diff)
downloadtherapy-ed08b673c50b076042d8f0c49501372168142764.tar.gz
therapy-ed08b673c50b076042d8f0c49501372168142764.tar.bz2
therapy-ed08b673c50b076042d8f0c49501372168142764.zip
Refactored renderer
Renderer is basically now more C++'y, as it makes more use of classes (a lot of GL types have been wrapped), and the renderer itself is now a class. The monitor mesh is also now indexed.

Tweaked the NTSC artifacting after inadvertently fixing a bug with the way the image was loaded.
Diffstat (limited to 'src/systems/mapping.cpp')
-rw-r--r--src/systems/mapping.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/systems/mapping.cpp b/src/systems/mapping.cpp index 5b63ded..120a27a 100644 --- a/src/systems/mapping.cpp +++ b/src/systems/mapping.cpp
@@ -48,7 +48,11 @@ void MappingSystem::render(Texture& texture)
48 TILE_WIDTH, 48 TILE_WIDTH,
49 TILE_HEIGHT}; 49 TILE_HEIGHT};
50 50
51 texture.blit(mappable.getTileset(), std::move(src), std::move(dst)); 51 game_.getRenderer().blit(
52 mappable.getTileset(),
53 texture,
54 std::move(src),
55 std::move(dst));
52 } 56 }
53 } 57 }
54 58
@@ -67,7 +71,11 @@ void MappingSystem::render(Texture& texture)
67 TILE_WIDTH, 71 TILE_WIDTH,
68 TILE_HEIGHT}; 72 TILE_HEIGHT};
69 73
70 texture.blit(mappable.getFont(), std::move(src), std::move(dst)); 74 game_.getRenderer().blit(
75 mappable.getFont(),
76 texture,
77 std::move(src),
78 std::move(dst));
71 } 79 }
72 } 80 }
73} 81}