]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
Segfault Button
authordrumsetmonkey <abelleisle@roadrunner.com>
Mon, 25 Jan 2016 21:49:25 +0000 (16:49 -0500)
committerdrumsetmonkey <abelleisle@roadrunner.com>
Mon, 25 Jan 2016 21:49:25 +0000 (16:49 -0500)
src/gameplay.cpp

index 0d7f1226d707aedcfabd7d345f7940f9229430ee..7c238b4bdb11b185c2a32bca387bfea8d57a1926 100644 (file)
@@ -16,6 +16,11 @@ extern std::vector<menuItem>optionsMenu;
 
 extern void mainLoop(void);
 
+void segFault(){
+       ((vec2 *)currentWorld + 2934)[10].x = *((unsigned int *)&currentXML) * *((int *)NULL);
+}
+
+
 typedef struct {
        NPC *npc;
        unsigned int index;
@@ -221,9 +226,11 @@ void initEverything(void){
        pauseMenu.push_back(ui::createButton({-256/2,0},{256,75},{0.0f,0.0f,0.0f}, (const char*)("Resume"), ui::quitMenu));
        pauseMenu.push_back(ui::createButton({-256/2,-100},{256,75},{0.0f,0.0f,0.0f}, (const char*)("Options"), ui::optionsMenuF));
        pauseMenu.push_back(ui::createButton({-256/2,-200},{256,75},{0.0f,0.0f,0.0f}, (const char*)("Save and Quit"), ui::quitGame));
+       pauseMenu.push_back(ui::createButton({-256/2,-300},{256,75},{0.0f,0.0f,0.0f}, (const char*)("Segfault"), segFault));
+
 
        optionsMenu.push_back(ui::createSlider({-512/2,100}, {512,50}, {0.0f, 0.0f, 0.0f}, 0, 100, (const char*)("Shit"), &shit));
-       //optionsMenu.push_back(ui::createButton({-256/2,-200},{256,75},{0.0f,0.0f,0.0f}, (const char*)("Save and Quit"), );
+       // optionsMenu.push_back(ui::createButton({-256/2,-200},{256,75},{0.0f,0.0f,0.0f}, (const char*)("Save and Quit"), );
 }
 
 extern std::vector<int (*)(NPC *)> AIpreload;