Skip to content

Commit

Permalink
fix door highlight bug with map scroll. curch should be unsigned.
Browse files Browse the repository at this point in the history
update v1.1 disasm.
  • Loading branch information
mikeyk730 committed Nov 19, 2016
1 parent 8533d8c commit 059623e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
Binary file modified src/ROGUE_V11.idb
Binary file not shown.
6 changes: 3 additions & 3 deletions src/RogueVersions/Rogue_PC_1_48/curses_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ struct PdCursesOutput : public OutputInterface
virtual void raise_curtain();

virtual void move(short y, short x);
virtual char curch();
virtual unsigned char curch();

virtual int lines() const;
virtual int columns() const;
Expand Down Expand Up @@ -580,9 +580,9 @@ void PdCursesOutput::move(short y, short x)
Render();
}

char PdCursesOutput::curch()
unsigned char PdCursesOutput::curch()
{
return (char)::inch();
return ::inch() & 0xff;
}

int PdCursesOutput::add_text(unsigned char c)
Expand Down
3 changes: 2 additions & 1 deletion src/RogueVersions/Rogue_PC_Core/level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ void Level::show_map(bool reveal_interior)
if (!reveal_interior && ch == DOOR)
{
game->screen().move(y, x);
if (game->screen().curch() != DOOR)
auto church = game->screen().curch();
if (church != DOOR)
game->screen().standout();
}
if (ch != ' ')
Expand Down
2 changes: 1 addition & 1 deletion src/RogueVersions/Rogue_PC_Core/output_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct OutputInterface
virtual void raise_curtain() = 0;

virtual void move(short y, short x) = 0;
virtual char curch() = 0;
virtual unsigned char curch() = 0;

virtual int lines() const = 0;
virtual int columns() const = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/RogueVersions/Rogue_PC_Core/output_shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct OutputShim

void move(short y, short x);

char curch();
unsigned char curch();

int lines() const;
int columns() const;
Expand Down
6 changes: 3 additions & 3 deletions src/RogueVersions/Rogue_PC_Core/screen_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ struct ScreenOutput : public OutputInterface
virtual void raise_curtain();

virtual void move(short y, short x);
virtual char curch();
virtual unsigned char curch();

virtual int lines() const;
virtual int columns() const;
Expand Down Expand Up @@ -567,7 +567,7 @@ void ScreenOutput::move(short y, short x)
ApplyMove();
}

char ScreenOutput::curch()
unsigned char ScreenOutput::curch()
{
return m_data.buffer[m_row*COLS+m_col] && 0xff;
}
Expand Down Expand Up @@ -761,7 +761,7 @@ void OutputShim::move(short y, short x)
m_output_interface->move(y, x);
}

char OutputShim::curch()
unsigned char OutputShim::curch()
{
return m_output_interface->curch();
}
Expand Down

0 comments on commit 059623e

Please sign in to comment.