All the Changes for 1.2.1
Sorry forgot to commit once again. Just look in the changelog of the release
This commit is contained in:
parent
9a8c8bc714
commit
73775f875a
9 changed files with 27 additions and 12 deletions
|
@ -385,6 +385,7 @@ bool ItemVsEntity(Item* item, Entity* e, int dir){
|
|||
return true;
|
||||
|
||||
case ENTITY_MAGIC_PILLAR:
|
||||
playSound(snd_monsterHurt);
|
||||
removeEntityFromList(e, e->level, &eManager);
|
||||
return true;
|
||||
} break;
|
||||
|
@ -402,6 +403,7 @@ bool ItemVsEntity(Item* item, Entity* e, int dir){
|
|||
return true;
|
||||
|
||||
case ENTITY_MAGIC_PILLAR:
|
||||
playSound(snd_monsterHurt);
|
||||
removeEntityFromList(e, e->level, &eManager);
|
||||
return true;
|
||||
} break;
|
||||
|
@ -418,6 +420,7 @@ bool ItemVsEntity(Item* item, Entity* e, int dir){
|
|||
return true;
|
||||
|
||||
case ENTITY_MAGIC_PILLAR:
|
||||
playSound(snd_monsterHurt);
|
||||
removeEntityFromList(e, e->level, &eManager);
|
||||
return true;
|
||||
} break;
|
||||
|
@ -1277,7 +1280,7 @@ void tickEntity(Entity* e){
|
|||
if (e->hurtTime > 0) e->hurtTime--;
|
||||
|
||||
e->dragon.animTimer++;
|
||||
if(e->dragon.animTimer>=20) {
|
||||
if(e->dragon.animTimer>=4*4) {
|
||||
e->dragon.animTimer = 0;
|
||||
}
|
||||
|
||||
|
@ -1285,8 +1288,8 @@ void tickEntity(Entity* e){
|
|||
if (e->dragon.attackDelay > 0) {
|
||||
e->dragon.attackDelay--;
|
||||
if (e->dragon.attackDelay <= 0) {
|
||||
e->wizard.attackType = rand()%2;
|
||||
e->wizard.attackTime = 121;
|
||||
e->dragon.attackType = rand()%2;
|
||||
e->dragon.attackTime = 121;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
#define ITEM_BONE 68
|
||||
#define ITEM_DUNGEON_KEY 69
|
||||
#define ITEM_WIZARD_SUMMON 70
|
||||
//TODO - implement icon
|
||||
#define ITEM_DRAGON_EGG 71
|
||||
#define ITEM_DRAGON_SCALE 72
|
||||
|
||||
|
|
|
@ -1133,19 +1133,18 @@ void renderEntity(Entity* e, int x, int y) {
|
|||
renderr(x, y, 200, 152, 0, e->spark.age * 0.0349);
|
||||
break;
|
||||
case ENTITY_DRAGON:
|
||||
//TODO - render dragon(maybe with flying animation)
|
||||
switch (e->dragon.dir) {
|
||||
case 0: // down
|
||||
render32(x - 16, y - 16, 0+(e->dragon.animTimer<10 ? 0 : 64), 256, 2);
|
||||
render32(x - 16, y - 16, 0+(e->dragon.animTimer/4 * 32), 256, 2);
|
||||
break;
|
||||
case 1: // up
|
||||
render32(x - 16, y - 16, 0+(e->dragon.animTimer<10 ? 0 : 64), 256, 0);
|
||||
render32(x - 16, y - 16, 0+(e->dragon.animTimer/4 * 32), 256, 0);
|
||||
break;
|
||||
case 2: // left
|
||||
render32(x - 16, y - 16, 0+(e->dragon.animTimer<10 ? 0 : 64), 288, 1);
|
||||
render32(x - 16, y - 16, 0+(e->dragon.animTimer/4 * 32), 288, 1);
|
||||
break;
|
||||
case 3: // right
|
||||
render32(x - 16, y - 16, 0+(e->dragon.animTimer<10 ? 0 : 64), 288, 0);
|
||||
render32(x - 16, y - 16, 0+(e->dragon.animTimer/4 * 32), 288, 0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -1486,6 +1485,12 @@ void renderItemIcon(int itemID, int countLevel, int x, int y) {
|
|||
case ITEM_WIZARD_SUMMON:
|
||||
render(x, y, 152, 160, 0);
|
||||
break;
|
||||
case ITEM_DRAGON_EGG:
|
||||
render(x, y, 160, 160, 0);
|
||||
break;
|
||||
case ITEM_DRAGON_SCALE:
|
||||
render(x, y, 168, 160, 0);
|
||||
break;
|
||||
case TOOL_BUCKET:
|
||||
render(x, y, 200 + countLevel * 8, 144, 0);
|
||||
break;
|
||||
|
|
|
@ -20,6 +20,11 @@ void playMusic(Sound snd){
|
|||
csndPlaySound(10, SOUND_FORMAT_16BIT | SOUND_REPEAT, 44100, 1, 0, snd.buffer, snd.buffer, snd.size);
|
||||
}
|
||||
|
||||
void stopMusic() {
|
||||
CSND_SetPlayState(8, 0);
|
||||
CSND_SetPlayState(10, 0);
|
||||
}
|
||||
|
||||
void updateMusic(int lvl, int time) {
|
||||
switch(lvl) {
|
||||
case 0:
|
||||
|
|
|
@ -15,6 +15,7 @@ void playSound(Sound snd);
|
|||
|
||||
void playMusic(Sound snd);
|
||||
void updateMusic(int lvl, int time);
|
||||
void stopMusic();
|
||||
|
||||
void loadSounds();
|
||||
void freeSounds();
|
||||
|
|
|
@ -296,6 +296,8 @@ int main() {
|
|||
|
||||
sf2d_swapbuffers();
|
||||
}
|
||||
|
||||
stopMusic();
|
||||
|
||||
freeRecipes();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue