From 9c9f87fa14fa72e9398b87048829092fa475cb45 Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Fri, 14 Dec 2018 14:52:24 -0800 Subject: [PATCH] working on fleshing out the spellbook -- starting setup for phase-shift/time-travel spells --- Engine.c | 25 +++++++++++++++++-- Kaos.c | 47 ++++++++++++++++++++++++++++++++++++ Kaos.h | 12 ++++++++- assets/img/fx/gate.png | Bin 0 -> 8458 bytes assets/img/fx/mactivate.png | Bin 0 -> 1132 bytes assets/img/fx/timegate.png | Bin 0 -> 8491 bytes extern.h | 1 + main.c | 1 + 8 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 assets/img/fx/gate.png create mode 100644 assets/img/fx/mactivate.png create mode 100644 assets/img/fx/timegate.png diff --git a/Engine.c b/Engine.c index b696c04..0229fa8 100644 --- a/Engine.c +++ b/Engine.c @@ -119,6 +119,16 @@ void interact() case B_BUTTON: spellbutton = 1; break; + case L_BUTTON: + bookMark--; + if (bookMark == -1) + bookMark = 1; + break; + case R_BUTTON: + bookMark++; + if (bookMark == 2) + bookMark = 0; + break; case PAUSE_BUTTON: pausemenu(); break; @@ -172,8 +182,8 @@ void kListen(int* whichKaos) { if (spellbutton) { - spellFlag = 0; - run(spellBook[0]); + spellFlag = bookMark; + run(spellBook[spellFlag]); synergize(); spellFlag = -1; } @@ -269,12 +279,23 @@ void writeSpellBook() spellBook = malloc(4*sizeof(HyperKaos**)); spellBook[0] = testSpell; + + testSpell = newHyperKaos(1,0,0,0,0,0); + Kaos* stopPlayer2 = newManip(hero, 0,0); + Kaos* flash = newSpell_Flash(); + addKaos(testSpell, stopPlayer2); + addKaos(testSpell, flash); + + spellBook[1] = testSpell; + } void burnSpellBook() { cleanHyperKaos(spellBook[0]); deleteHyperKaos(spellBook[0]); + cleanHyperKaos(spellBook[1]); + deleteHyperKaos(spellBook[1]); free(spellBook); } diff --git a/Kaos.c b/Kaos.c index 7ab3551..e18a0de 100644 --- a/Kaos.c +++ b/Kaos.c @@ -517,6 +517,53 @@ void deleteSpell_Beam(Kaos* target) { Spell_Beam* kSelf = target->kType; + SDL_FreeSurface(kSelf->aura); + free(kSelf); + free(target); +} + +Kaos* newSpell_Flash() +{ + Kaos* core = rawKaos(); + Spell_Beam* self = malloc(sizeof(Spell_Flash)); + + self->core = core; + core->kType = self; + + self->aura = loadImage("assets/img/fx/mactivate.png"); + SDL_SetAlpha(self->aura, SDL_SRCALPHA|SDL_RLEACCEL, 124); + core->run = &runSpell_Flash; + core->destroy = &deleteSpell_Flash; + + return core; +} + +void runSpell_Flash(Kaos* self) +{ + Spell_Flash* kSelf = self->kType; + int i; + SDL_Rect offset, clip; + offset.x = hero->point.x - 20; + offset.y = hero->point.y - 56; + clip.x = 0; + clip.y = 0; + clip.w = 41; + clip.h = 72; + for (i = 0; i < 8; i++) + { + clip.x = 41*i; + timeStart(fps); + renderBackground(); + renderForeground(); + applySurface(offset.x, offset.y, kSelf->aura, screen, &clip); + SDL_Flip(screen); + timeDilation(); + } +} + +void deleteSpell_Flash(Kaos* target) +{ + Spell_Flash* kSelf = target->kType; SDL_FreeSurface(kSelf->aura); free(kSelf); free(target); diff --git a/Kaos.h b/Kaos.h index d150ca9..a9c3d95 100644 --- a/Kaos.h +++ b/Kaos.h @@ -83,6 +83,12 @@ typedef struct kaos_Spell_Beam SDL_Surface* aura; } Spell_Beam; +typedef struct kaos_Spell_Flash +{ + Kaos* core; + SDL_Surface* aura; +} Spell_Flash; + Kaos* rawKaos(); Kaos* newConversation(int i); @@ -125,4 +131,8 @@ void deleteWait(Kaos* target); Kaos* newSpell_Beam(); void runSpell_Beam(Kaos* self); -void deleteSpell_Beam(Kaos* target); \ No newline at end of file +void deleteSpell_Beam(Kaos* target); + +Kaos* newSpell_Flash(); +void runSpell_Flash(Kaos* self); +void deleteSpell_Flash(Kaos* target); \ No newline at end of file diff --git a/assets/img/fx/gate.png b/assets/img/fx/gate.png new file mode 100644 index 0000000000000000000000000000000000000000..e04a008031cc5967038fdaaea05dd62b119c52b2 GI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VRx+fVsUPC2(z1v!<+FIkijCoP=QT;WVdl#AXCjT1>jN#yfI`*0D_bZhW(HqCfcX z!NHuc*{?%OOggT%)(}U|kWvVzaSc7o9)vh)2L3sduK5`F?wA-)F|~f))RAh{xW;rT zpXLR|;z5@+^F2ercuP2OTZ}ctmm|fX2t@(TN%h9cxu&IB(SqGL7)_ZM3)4{#gCC2+ zgix(~jIJOmXG1;H-IXbHM~Q2u6TdCy!*i`9VxS0!oY=z{isZB~*ois8EL3M)jG|Oq z`dY-+vxKWW)_IiymO16xmBtjrG_9H45YLpD@lNWrayDjZt`la&tk-KJht-K*uJzE& z3-N&spvi9`$IuQA!DM-*i`Bz`IWo_@&`B@_G^$MvFoP+C_=E<}LKFtW2u4xzyPe@s z3}j2>H1J|;-&)jkmnx7Jn?sw^9mUz ztc_V}%<3E_vzS>YCeJyDd4g@)JILYCn=Z`S#3c+Y25k(!oTG`vtk-fo2uTpLztu0O ztpFE8YM`kA)B>0tnM%~)C=3VB-lQ0m^9Zi-4$RVGRvj2UG;-Ie2gk#t6aMC49{E1~ z0wyDvSr-PfyerSZwI|5&Rm`2l?7A_pkmb>0-XO>QH((|iVz>#!%=X`eSz0x#@4;}M z$*IPa0Opu+-ggP?F^_}643nMbwM2Jx;xb6{ZIT? Z`~?%m4nq_SfCB&k002ovPDHLkV1nfj7v=x} literal 0 HcmV?d00001 diff --git a/extern.h b/extern.h index 17bbe94..91b2d8e 100644 --- a/extern.h +++ b/extern.h @@ -19,6 +19,7 @@ extern int spellFlag; extern long long int savestate; extern int spellKnowledge; +extern int bookMark; extern Room* menuBG; extern SDL_Surface* saveMenu; diff --git a/main.c b/main.c index 896f1a5..1cb3c24 100644 --- a/main.c +++ b/main.c @@ -51,6 +51,7 @@ Mix_Music* menuBGM = NULL; long long int savestate = 2; int spellKnowledge = 2; +int bookMark = 0; Room** mapData = NULL; Room** mapBuffer = NULL;