Skip to content
Snippets Groups Projects
Commit a0013c34 authored by PoloNX's avatar PoloNX
Browse files

commit for the release

parent 6efa36ef
No related branches found
No related tags found
No related merge requests found
icon.jpg 0 → 100644
icon.jpg

5.62 KiB

......@@ -25,7 +25,7 @@ public:
void printCursor(RenderWindow render);
bool checkInputCursor(int value);
int checkInputCursor(int value);
int getPosX(){
return posX;
......
......@@ -25,7 +25,7 @@ void Cursor::moveCursorX(bool right)
}
}
bool Cursor::checkInputCursor(int value)
int Cursor::checkInputCursor(int value)
{
std::cout << "dans check input\n";
......@@ -79,7 +79,11 @@ bool Cursor::checkInputCursor(int value)
}
else if (line == 1 and column == 1){
return true;
return 1;
}
else if (line == 1 and column == 0){
return 2;
}
}
......
......@@ -24,6 +24,7 @@ int main(int argc, char *argv[])
SDL_Event event;
int inputValue = -1;
int inputcheck = 0;
bool isOpen = true;
......@@ -37,10 +38,15 @@ int main(int argc, char *argv[])
{
case SDL_JOYBUTTONDOWN:
inputValue = event.jbutton.button;
if(cursor.checkInputCursor(inputValue))
inputcheck = cursor.checkInputCursor(inputValue);
if(inputcheck == 1)
{
menu.printAbout();
}
else if(inputcheck == 2)
{
isOpen = false;
}
default:
inputValue = -1;
......@@ -56,14 +62,15 @@ int main(int argc, char *argv[])
cursor.printCursor(window);
window.display();
SDL_Delay(1000 / window.getRefreshRate());
}
SDL_Quit();
IMG_Quit();
TTF_Quit();
return 0;
}
void init()
......@@ -83,7 +90,7 @@ void init()
if (!(TTF_Init()))
{
std::cout << "HEY... IMG_Init HAS FAILED. SDL_ERROR: " << TTF_GetError() << std::endl;
std::cout << "HEY... TTF_Init HAS FAILED. SDL_ERROR: " << TTF_GetError() << std::endl;
}
std::cout << "after ttf\n";
......
......@@ -70,7 +70,7 @@ void Menu::printMenu()
vEntityCursor.push_back(Entity (Vector2f(rectTemplate.x, rectTemplate.y), tHekate, 258, 258, 0, 0));
vEntityCursor.push_back(Entity (Vector2f(rectTemplate.x + rectTemplate.w + 14, rectTemplate.y), tAMS, 258, 258, 0, 0));
vEntityCursor.push_back(Entity (Vector2f(rectTemplate.x + (rectTemplate.w + 14) * 2, rectTemplate.y), tLockpick, 258, 258, 0, 0));
vEntityCursor.push_back(Entity (Vector2f(rectTemplate.x + (rectTemplate.w + 14) * 3, rectTemplate.y), tLakka, 258, 258, 0, 0));
//vEntityCursor.push_back(Entity (Vector2f(rectTemplate.x + (rectTemplate.w + 14) * 3, rectTemplate.y), tLakka, 258, 258, 0, 0));
/*CIRCLE BEHIND SMALL ICONS*/
window.drawCircleBehindIcons();
......
......@@ -72,9 +72,8 @@ std::string whichPayload(int payload)
return "payload/lockpick.bin";
}
else if (payload == 3) //LAKKA
{
return "payload/lakka.rom";
else if (payload > 2){
return "null";
}
}
......@@ -82,6 +81,10 @@ void Reboot::rebootNow(int payload) //0 = hekate, 1 = ams, 2 = lockpick, 3 = lak
{
Result rc = splInitialize();
if (whichPayload(payload) == "null"){
return;
}
FILE *f = fopen(whichPayload(payload).c_str(), "rb");
std::cout << "test\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment