-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
1,493 additions
and
157 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#include "game/objects/creatures/bandit.h" | ||
|
||
#include "game/creature.h" | ||
#include "game/objects/common.h" | ||
#include "global/funcs.h" | ||
#include "global/vars.h" | ||
|
||
#include <assert.h> | ||
|
||
#define BANDIT1_HITPOINTS 45 | ||
#define BANDIT2_HITPOINTS 50 | ||
#define BANDIT_RADIUS (WALL_L / 10) // = 102 | ||
|
||
void Bandit1_Setup(void) | ||
{ | ||
OBJECT *const obj = Object_GetObject(O_BANDIT_1); | ||
if (!obj->loaded) { | ||
return; | ||
} | ||
|
||
obj->control = Bandit1_Control; | ||
obj->collision = Creature_Collision; | ||
|
||
obj->hit_points = BANDIT1_HITPOINTS; | ||
obj->radius = BANDIT_RADIUS; | ||
obj->shadow_size = UNIT_SHADOW / 2; | ||
obj->pivot_length = 0; | ||
|
||
obj->intelligent = 1; | ||
obj->save_anim = 1; | ||
obj->save_position = 1; | ||
obj->save_hitpoints = 1; | ||
obj->save_flags = 1; | ||
|
||
g_AnimBones[obj->bone_idx + 24] |= BF_ROT_Y; | ||
g_AnimBones[obj->bone_idx + 32] |= BF_ROT_Y; | ||
} | ||
|
||
void Bandit2_Setup(void) | ||
{ | ||
OBJECT *const obj = Object_GetObject(O_BANDIT_2); | ||
if (!obj->loaded) { | ||
return; | ||
} | ||
|
||
obj->control = Bandit2_Control; | ||
obj->collision = Creature_Collision; | ||
|
||
obj->hit_points = BANDIT2_HITPOINTS; | ||
obj->radius = BANDIT_RADIUS; | ||
obj->shadow_size = UNIT_SHADOW / 2; | ||
obj->pivot_length = 0; | ||
|
||
obj->intelligent = 1; | ||
obj->save_anim = 1; | ||
obj->save_position = 1; | ||
obj->save_hitpoints = 1; | ||
obj->save_flags = 1; | ||
|
||
g_AnimBones[obj->bone_idx + 24] |= BF_ROT_Y; | ||
g_AnimBones[obj->bone_idx + 32] |= BF_ROT_Y; | ||
} | ||
|
||
void Bandit2B_Setup(void) | ||
{ | ||
OBJECT *const obj = Object_GetObject(O_BANDIT_2B); | ||
if (!obj->loaded) { | ||
return; | ||
} | ||
|
||
const OBJECT *const ref_obj = Object_GetObject(O_BANDIT_2); | ||
assert(ref_obj->loaded); | ||
obj->anim_idx = ref_obj->anim_idx; | ||
obj->frame_base = ref_obj->frame_base; | ||
|
||
obj->control = Bandit2_Control; | ||
obj->collision = Creature_Collision; | ||
|
||
obj->hit_points = BANDIT2_HITPOINTS; | ||
obj->radius = BANDIT_RADIUS; | ||
obj->shadow_size = UNIT_SHADOW / 2; | ||
obj->pivot_length = 0; | ||
|
||
obj->intelligent = 1; | ||
obj->save_anim = 1; | ||
obj->save_position = 1; | ||
obj->save_hitpoints = 1; | ||
obj->save_flags = 1; | ||
|
||
g_AnimBones[obj->bone_idx + 24] |= BF_ROT_Y; | ||
g_AnimBones[obj->bone_idx + 32] |= BF_ROT_Y; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
void Bandit1_Setup(void); | ||
void Bandit2_Setup(void); | ||
void Bandit2B_Setup(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include "game/objects/creatures/barracuda.h" | ||
|
||
#include "game/creature.h" | ||
#include "game/objects/common.h" | ||
#include "global/funcs.h" | ||
#include "global/vars.h" | ||
|
||
#define BARRACUDA_HITPOINTS 12 | ||
#define BARRACUDA_RADIUS (WALL_L / 5) // = 204 | ||
|
||
void Barracuda_Setup(void) | ||
{ | ||
OBJECT *const obj = Object_GetObject(O_BARRACUDA); | ||
if (!obj->loaded) { | ||
return; | ||
} | ||
|
||
obj->control = Baracudda_Control; | ||
obj->collision = Creature_Collision; | ||
|
||
obj->hit_points = BARRACUDA_HITPOINTS; | ||
obj->radius = BARRACUDA_RADIUS; | ||
obj->shadow_size = UNIT_SHADOW / 2; | ||
obj->pivot_length = 200; | ||
|
||
obj->intelligent = 1; | ||
obj->water_creature = 1; | ||
obj->save_anim = 1; | ||
obj->save_position = 1; | ||
obj->save_hitpoints = 1; | ||
obj->save_flags = 1; | ||
|
||
g_AnimBones[obj->bone_idx + 24] |= BF_ROT_Y; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma once | ||
|
||
void Barracuda_Setup(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "game/objects/creatures/big_eel.h" | ||
|
||
#include "game/creature.h" | ||
#include "game/objects/common.h" | ||
#include "global/const.h" | ||
#include "global/funcs.h" | ||
|
||
#define BIG_EEL_HITPOINTS 20 | ||
|
||
void BigEel_Setup(void) | ||
{ | ||
OBJECT *const obj = Object_GetObject(O_BIG_EEL); | ||
if (!obj->loaded) { | ||
return; | ||
} | ||
|
||
obj->control = BigEel_Control; | ||
obj->collision = Creature_Collision; | ||
|
||
obj->hit_points = BIG_EEL_HITPOINTS; | ||
|
||
obj->water_creature = 1; | ||
obj->save_hitpoints = 1; | ||
obj->save_anim = 1; | ||
obj->save_flags = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma once | ||
|
||
void BigEel_Setup(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "game/objects/creatures/big_spider.h" | ||
|
||
#include "game/creature.h" | ||
#include "game/objects/common.h" | ||
#include "global/funcs.h" | ||
|
||
#define BIG_SPIDER_HITPOINTS 40 | ||
#define BIG_SPIDER_RADIUS (WALL_L / 3) // = 341 | ||
|
||
void BigSpider_Setup(void) | ||
{ | ||
OBJECT *const obj = Object_GetObject(O_BIG_SPIDER); | ||
if (!obj->loaded) { | ||
return; | ||
} | ||
|
||
obj->control = BigSpider_Control; | ||
obj->collision = Creature_Collision; | ||
|
||
obj->hit_points = BIG_SPIDER_HITPOINTS; | ||
obj->radius = BIG_SPIDER_RADIUS; | ||
obj->shadow_size = UNIT_SHADOW / 2; | ||
|
||
obj->intelligent = 1; | ||
obj->save_anim = 1; | ||
obj->save_position = 1; | ||
obj->save_hitpoints = 1; | ||
obj->save_flags = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma once | ||
|
||
void BigSpider_Setup(void); |
Oops, something went wrong.