Skip to content

Commit

Permalink
renderer: Remove most of the old draw code.
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed Sep 23, 2023
1 parent 0ce4647 commit 68c855a
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 594 deletions.
10 changes: 0 additions & 10 deletions libopenage/gamestate/old/game_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,6 @@ index_t GameSpec::get_slp_graphic(index_t slp) {
return this->slp_to_graphic[slp];
}

std::shared_ptr<UnitTexture> GameSpec::get_unit_texture(index_t unit_id) const {
if (this->unit_textures.count(unit_id) == 0) {
if (unit_id > 0) {
log::log(MSG(dbg) << " -> ignoring unit_id: " << unit_id);
}
return nullptr;
}
return this->unit_textures.at(unit_id);
}

const Sound *GameSpec::get_sound(index_t sound_id) const {
if (this->available_sounds.count(sound_id) == 0) {
if (sound_id > 0) {
Expand Down
12 changes: 0 additions & 12 deletions libopenage/gamestate/old/game_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "../../gamedata/gamedata_dummy.h"
#include "../../gamedata/graphic_dummy.h"
#include "../../job/job.h"
#include "../../unit/unit_texture.h"
#include "../../util/csv.h"
#include "terrain/terrain.h"
#include "types.h"
Expand Down Expand Up @@ -90,12 +89,6 @@ class GameSpec {
*/
index_t get_slp_graphic(index_t slp);

/**
* get unit texture by graphic id -- this is an directional texture
* which also includes graphic deltas
*/
std::shared_ptr<UnitTexture> get_unit_texture(index_t graphic_id) const;

/**
* get sound by sound id
*/
Expand Down Expand Up @@ -190,11 +183,6 @@ class GameSpec {
*/
std::unordered_map<index_t, std::vector<const gamedata::unit_command *>> commands;

/**
* graphic ids -> unit texture for that id
*/
std::unordered_map<index_t, std::shared_ptr<UnitTexture>> unit_textures;

/**
* sound ids mapped to playable sounds for all available sounds.
*/
Expand Down
13 changes: 0 additions & 13 deletions libopenage/handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@ namespace openage {

class LegacyEngine;

/**
* superclass for all possible drawing operations in the game.
*/
class [[deprecated]] DrawHandler {
public:
virtual ~DrawHandler() = default;

/**
* execute the drawing action.
*/
virtual bool on_draw() = 0;
};

/**
* superclass for all possible drawing operations in the game.
*/
Expand Down
7 changes: 0 additions & 7 deletions libopenage/terrain/terrain_chunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ class TerrainChunk {
*/
chunk_neighbors neighbors;

/**
* draws the terrain chunk on screen.
*
* @param chunk_pos the chunk position where it will be drawn
*/
void draw(coord::chunk chunk_pos);

/**
* get tile data by absolute coordinates.
*/
Expand Down
1 change: 0 additions & 1 deletion libopenage/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ add_sources(libopenage
selection.cpp
unit.cpp
unit_container.cpp
unit_texture.cpp
unit_type.cpp
)
Loading

0 comments on commit 68c855a

Please sign in to comment.