Skip to content

Commit

Permalink
SpriteHandler.h:
Browse files Browse the repository at this point in the history
* Renaming functions fill*_r() and fill*_c() to fill*_vert() and fill*_horiz() respectively because the former naming scheme is a bit ambiguous (e.g. by fill*_r(), do we mean the range is by rows or are we filling along the rows?).
  • Loading branch information
razterizer committed Nov 16, 2024
1 parent 5a3da85 commit 2cfc5a1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions SpriteHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ class BitmapSprite : public Sprite
texture->characters.assign(area, ch);
}

void fill_sprite_chars_r(int anim_frame, int r0, int r1, int c, char ch)
void fill_sprite_chars_vert(int anim_frame, int r0, int r1, int c, char ch)
{
auto* texture = fetch_frame(anim_frame);
if (texture != nullptr)
for (int r = r0; r <= r1; ++r)
texture->set_textel_char(r, c, ch);
}

void fill_sprite_chars_c(int anim_frame, int r, int c0, int c1, char ch)
void fill_sprite_chars_horiz(int anim_frame, int r, int c0, int c1, char ch)
{
auto* texture = fetch_frame(anim_frame);
if (texture != nullptr)
Expand Down Expand Up @@ -281,15 +281,15 @@ class BitmapSprite : public Sprite
texture->fg_colors.assign(area, fg_color);
}

void fill_sprite_fg_colors_r(int anim_frame, int r0, int r1, int c, Color fg_color)
void fill_sprite_fg_colors_vert(int anim_frame, int r0, int r1, int c, Color fg_color)
{
auto* texture = fetch_frame(anim_frame);
if (texture != nullptr)
for (int r = r0; r <= r1; ++r)
texture->set_textel_fg_color(r, c, fg_color);
}

void fill_sprite_fg_colors_c(int anim_frame, int r, int c0, int c1, Color fg_color)
void fill_sprite_fg_colors_horiz(int anim_frame, int r, int c0, int c1, Color fg_color)
{
auto* texture = fetch_frame(anim_frame);
if (texture != nullptr)
Expand Down Expand Up @@ -324,15 +324,15 @@ class BitmapSprite : public Sprite
texture->bg_colors.assign(area, bg_color);
}

void fill_sprite_bg_colors_r(int anim_frame, int r0, int r1, int c, Color bg_color)
void fill_sprite_bg_colors_vert(int anim_frame, int r0, int r1, int c, Color bg_color)
{
auto* texture = fetch_frame(anim_frame);
if (texture != nullptr)
for (int r = r0; r <= r1; ++r)
texture->set_textel_bg_color(r, c, bg_color);
}

void fill_sprite_bg_colors_c(int anim_frame, int r, int c0, int c1, Color bg_color)
void fill_sprite_bg_colors_horiz(int anim_frame, int r, int c0, int c1, Color bg_color)
{
auto* texture = fetch_frame(anim_frame);
if (texture != nullptr)
Expand Down Expand Up @@ -367,15 +367,15 @@ class BitmapSprite : public Sprite
texture->materials.assign(area, mat);
}

void fill_sprite_materials_r(int anim_frame, int r0, int r1, int c, int mat)
void fill_sprite_materials_vert(int anim_frame, int r0, int r1, int c, int mat)
{
auto* texture = fetch_frame(anim_frame);
if (texture != nullptr)
for (int r = r0; r <= r1; ++r)
texture->set_textel_material(r, c, mat);
}

void fill_sprite_materials_c(int anim_frame, int r, int c0, int c1, int mat)
void fill_sprite_materials_horiz(int anim_frame, int r, int c0, int c1, int mat)
{
auto* texture = fetch_frame(anim_frame);
if (texture != nullptr)
Expand Down

0 comments on commit 2cfc5a1

Please sign in to comment.