]> _ Git - aichan-platformer.git/commitdiff
Done for today. i think the game is basically done except: i need to reset some testi...
authorparking_turkeys <roya1060wien@gmail.com>
Mon, 27 Jul 2026 02:03:40 +0000 (22:03 -0400)
committerparking_turkeys <roya1060wien@gmail.com>
Mon, 27 Jul 2026 02:03:40 +0000 (22:03 -0400)
bossfight.c

index 5f1c62d..07b0c2f 100644 (file)
@@ -77,7 +77,7 @@ static struct sp_attack skills[SKILLCOUNT] = {
 };
 
 static struct enemy_attack enemy_skills[ENEMYSKILLCOUNT] = {
-       { "img/context_fight/attack.png", "attack!", 512, 0, 0.2, 1, 0.1}
+       { "img/context_fight/normal.png", "attack!", 512, 0, 0.2, 1, 0.1}
 };
 
 
@@ -150,6 +150,12 @@ int update_boss_screen(float delta)
                                frozen = 3;
                        };
                        break;
+               case 1:
+                       //just going to check for the brick here LMAO
+                       if (objects_interacted[1] == 1) {
+                               skills[1].enabled = 1; //you have to have interacted with Senti to get the divine key: brick
+                       };
+                       break;
                default:
                        //nothing?
                        break;
@@ -353,20 +359,22 @@ static int draw_attacks(struct sp_attack **a)
        };
 };
 
+Texture2D textr;
+
 static int draw_sp_attack(struct sp_attack *a, Vector2 p)
 {
        //get the image, resize, and draw (too lazy to not get the new image each time
        //uhhh later when cleaning up this code maybe grab the texture before starting to draw??
        //some sort of error is happening here lmaooooo
        //it is somehow... drawing the animation?? i think. uh. it's probably a weird memory thing haha
-       char *imgfilename = a->filename;
-       printf(imgfilename);
-       Image imgy = LoadImage(imgfilename);
+       //char *imgfilename = a->filename;
+       //printf(imgfilename);
+       Image imgy = LoadImage(a->filename);
        ImageResize(&imgy, ATKDISPLAYWIDTH,ATKDISPLAYWIDTH);
-       Texture2D txtr = LoadTextureFromImage(imgy);
+       textr = LoadTextureFromImage(imgy);
+       DrawTexture(textr,p.x,p.y,WHITE);
        UnloadImage(imgy);
-       DrawTexture(txtr,p.x,p.y,WHITE);
-       UnloadTexture(txtr);
+       //UnloadTexture(textr); THIS BROKE IT?????
        
        //draw the border
        Rectangle rect = {p.x,p.y,ATKDISPLAYWIDTH,ATKDISPLAYWIDTH};
@@ -438,6 +446,7 @@ static int draw_enemy_img(void)
 int fight_cleanup(void)
 {
        //UnloadTexture(txtr);
+       UnloadTexture(textr);
        UnloadTexture(enemy_img_txtr);
        UnloadTexture(player_img_txtr);
        return 1;