Skip to content

Commit

Permalink
Added vrEmuTms9918WriteStringOffset()
Browse files Browse the repository at this point in the history
  • Loading branch information
visrealm committed Nov 18, 2023
1 parent a5a1596 commit 13aee68
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/vrEmuTms9918Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ inline static void vrEmuTms9918WriteString(VrEmuTms9918* tms9918, const char* st
}
}

/*
* Write a series of chars to the VRAM with offset
*/
inline static void vrEmuTms9918WriteStringOffset(VrEmuTms9918* tms9918, const char* str, uint8_t offset)
{
size_t len = strlen(str);
for (size_t i = 0; i < len; ++i)
{
vrEmuTms9918WriteData(tms9918, str[i] + offset);
}
}

/*
* Return a colur byte consisting of foreground and background colors
*/
Expand Down

0 comments on commit 13aee68

Please sign in to comment.