#include <mygba.h>
#include <hel.h>
#include <iostream.h>
#include "drawtextbox.h"

extern u16 delay;
extern u8 sprites[127];
extern TCustomTextInfo g_TextInfo;
u8 displayedwin = 1;

//add laid down death sprite upon revision

void myWin()
{
    hel_PadReadState();
    //main border
    //drawTextBox(g_TextInfo,0,0,29,19);
    if(displayedwin)
    {
        ham_DeleteObj(sprites[120]);
        ham_DeleteObj(sprites[121]);
        ham_DeleteObj(sprites[122]);
        ham_DeleteObj(sprites[123]);

        drawTextBox(g_TextInfo,0,0,29,19);
        for (int x = 1; x < 19; x++)
        {
            hel_CustomTextPrint(&g_TextInfo, 1, x, "                            ");
        }

        hel_CustomTextPrint(&g_TextInfo, 7, 5, "CONGRATULATIONS!!");
        hel_CustomTextPrint(&g_TextInfo, 5, 6, "You saved Gnovia from");
        hel_CustomTextPrint(&g_TextInfo, 7, 7, "the Blue Dragon.");
        hel_CustomTextPrint(&g_TextInfo, 10, 15, "Written by");
        hel_CustomTextPrint(&g_TextInfo, 9, 16, "Jesse Harris");
        displayedwin = 0;
    }
    return;

}

/* END OF FILE */
