1
0
mirror of https://github.com/weiju/amiga-stuff synced 2025-12-08 14:58:33 +00:00

hardware: clean out main modules

made the init_display() and reset_display() functions
more indepenent from their callers
This commit is contained in:
Wei-ju Wu
2016-09-21 21:19:59 -07:00
parent ffe2349c08
commit b31f5a40aa
5 changed files with 13 additions and 44 deletions

View File

@ -46,8 +46,9 @@ static void UnapplySpriteFix(void)
}
}
BOOL init_display(UWORD lib_version)
BOOL init_display(void)
{
UWORD lib_version = ((struct Library *) GfxBase)->lib_Version;
BOOL is_pal;
LoadView(NULL); // clear display, reset hardware registers
@ -67,8 +68,10 @@ BOOL init_display(UWORD lib_version)
return is_pal;
}
void reset_display(struct View *current_view, UWORD lib_version)
void reset_display(void)
{
struct View *current_view = ((struct GfxBase *) GfxBase)->ActiView;
UWORD lib_version = ((struct Library *) GfxBase)->lib_Version;
if (lib_version >= 39) UnapplySpriteFix();
LoadView(current_view);
WaitTOF();