Skip to content

Commit

Permalink
remove BUFFS define
Browse files Browse the repository at this point in the history
  • Loading branch information
superfloh committed Dec 5, 2008
1 parent 3f2a02b commit 5250822
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 38 deletions.
3 changes: 1 addition & 2 deletions Makefile.linux
Expand Up @@ -21,15 +21,14 @@ ENCYCLOPEDIA_COBJ = books/fontdef.o books/parser.o books/symbol.o books/typesett
MEMORY_DEBUG_COBJ = elmemory.o
TEXT_ALIASES_COBJ = text_aliases.o
SKY_FPV_COBJ = sky.o
BUFFS_COBJ = buffs.o
USE_SHADER_COBJ = shader/noise.o shader/shader.o
PAWN_COBJ = pawn/amx.o pawn/amxaux.o pawn/amxcons.o pawn/amxel.o \
pawn/amxfloat.o pawn/amxstring.o pawn/elpawn.o
NEW_SELECTION_CXXOBJ = select.o
CONTEXT_MENUS_CXXOBJ = context_menu.o
COBJS=2d_objects.o 3d_objects.o \
actor_scripts.o actors.o alphamap.o asc.o astrology.o \
bbox_tree.o books.o buddy.o bags.o \
bbox_tree.o books.o buddy.o buffs.o bags.o \
cache.o cal.o calc.o chat.o cluster.o colors.o console.o consolewin.o \
counters.o cursors.o dialogues.o draw_scene.o eye_candy_debugwin.o \
elconfig.o elwindows.o encyclopedia.o errors.o events.o \
Expand Down
3 changes: 1 addition & 2 deletions Makefile.win
Expand Up @@ -23,7 +23,6 @@ STATICLIBS=libs/libSDL_net.a libs/libSDL.a libs/libSDL_image.a libs/libopenal.a
ENCYCLOPEDIA_COBJ = books/fontdef.o books/parser.o books/symbol.o books/typesetter.o sort.o symbol_table.o
MEMORY_DEBUG_COBJ = elmemory.o
TEXT_ALIASES_COBJ = text_aliases.o
BUFFS_COBJ = buffs.o
SKY_FPV_COBJ = sky.o
USE_SHADER_COBJ = shader/noise.o shader/shader.o
PAWN_COBJ = pawn/amx.o pawn/amxaux.o pawn/amxcons.o pawn/amxel.o \
Expand All @@ -32,7 +31,7 @@ NEW_SELECTION_CXXOBJ = select.o
CONTEXT_MENUS_CXXOBJ = context_menu.o
COBJS=2d_objects.o 3d_objects.o \
actor_scripts.o actors.o alphamap.o asc.o astrology.o \
bbox_tree.o books.o buddy.o bags.o \
bbox_tree.o books.o buddy.o buffs.o bags.o \
cache.o cal.o calc.o chat.o cluster.o colors.o console.o consolewin.o \
counters.o cursors.o dialogues.o draw_scene.o eye_candy_debugwin.o \
elconfig.o elwindows.o encyclopedia.o errors.o events.o \
Expand Down
14 changes: 5 additions & 9 deletions actors.c
Expand Up @@ -6,9 +6,7 @@
#include "actor_scripts.h"
#include "asc.h"
#include "bbox_tree.h"
#ifdef BUFFS
#include "buffs.h"
#endif // BUFFS
#include "cal.h"
#include "cursors.h"
#include "draw_scene.h"
Expand Down Expand Up @@ -177,12 +175,10 @@ int add_actor (int actor_type, char * skin_name, float x_pos, float y_pos, float
our_actor->attachment_shift[0] = our_actor->attachment_shift[1] = our_actor->attachment_shift[2] = 0.0;
#endif // ATTACHED_ACTORS

#ifdef BUFFS
for (i = 0; i < NUM_BUFFS; i++)
{
our_actor->ec_buff_reference[i] = NULL;
}
#endif // BUFFS

#ifdef CLUSTER_INSIDES
x = (int) (our_actor->x_pos / 0.5f);
Expand Down Expand Up @@ -464,12 +460,10 @@ void draw_actor_banner(actor * actor_id, float offset_z)
banner_width = ((float)get_string_width((unsigned char*)actor_id->actor_name)*(font_size_x*name_zoom))/2.0;
draw_ortho_ingame_string(hx-banner_width, hy+healthbar_y_len/2.0f, hz, temp, 1, font_size_x, font_size_y);
}
#ifdef BUFFS
if (view_buffs)
{
draw_buffs(actor_id->actor_id, hx, hy + buff_icon_size, hz);
}
#endif // BUFFS
if((view_hp || view_health_bar) && actor_id->cur_health > 0 && actor_id->max_health > 0 && (!actor_id->dead) && (actor_id->kind_of_actor != NPC)){
unsigned char hp[200];

Expand Down Expand Up @@ -1464,10 +1458,12 @@ void add_actor_from_server (const char *in_data, int len)
/* actors_list[i]->cur_anim_sound_cookie=0; */
/* actors_list[i]->IsOnIdle=0; */
}
} else actors_list[i]->calmodel=NULL;
#ifdef BUFFS
}
else
{
actors_list[i]->calmodel=NULL;
}
update_actor_buffs(actor_id, buffs);
#endif // BUFFS
UNLOCK_ACTORS_LISTS(); //unlock it
#ifdef EXTRA_DEBUG
ERR();
Expand Down
5 changes: 0 additions & 5 deletions actors.h
Expand Up @@ -17,10 +17,8 @@
#include "client_serv.h"
#include "platform.h"
#include "tiles.h"
#ifdef BUFFS
#include "buffs.h"
#include "eye_candy_types.h"
#endif // BUFFS

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -641,10 +639,7 @@ typedef struct
#ifdef CLUSTER_INSIDES
short cluster;
#endif

#ifdef BUFFS
ec_reference ec_buff_reference[NUM_BUFFS];
#endif
}actor;

#define DEFAULT_RENDER_PASS 0
Expand Down
5 changes: 1 addition & 4 deletions buffs.c
Expand Up @@ -5,7 +5,6 @@
* Author: superfloh
*/

#ifdef BUFFS
#include "buffs.h"

#include "client_serv.h"
Expand All @@ -17,7 +16,7 @@
#include "textures.h"

int view_buffs = 1;
int buff_icon_size = 32;
int buff_icon_size = 25;

void update_actor_buffs(int actor_id, Uint32 in_buffs)
{
Expand Down Expand Up @@ -244,5 +243,3 @@ void draw_buffs(int actor_id, float x, float y,float z)
#endif //OPENGL_TRACE
}
}

#endif // BUFFS
4 changes: 0 additions & 4 deletions buffs.h
Expand Up @@ -8,8 +8,6 @@
#ifndef BUFFS_H_
#define BUFFS_H_

#ifdef BUFFS

#include "platform.h"

// keep in sync with client_serv.h !!!
Expand All @@ -33,6 +31,4 @@ void draw_buffs(int, float x, float y,float z);

void update_buff_eye_candy(int actor_id);

#endif // BUFFS

#endif /* BUFFS_H_ */
7 changes: 1 addition & 6 deletions multiplayer.c
Expand Up @@ -8,6 +8,7 @@
#include "actor_scripts.h"
#include "books.h"
#include "buddy.h"
#include "buffs.h"
#include "chat.h"
#include "console.h"
#include "dialogues.h"
Expand Down Expand Up @@ -49,10 +50,6 @@
#include "popup.h"
#include "missiles.h"

#ifdef BUFFS
#include "buffs.h"
#endif // BUFFS

/* NOTE: This file contains implementations of the following, currently unused, and commented functions:
* Look at the end of the file.
*
Expand Down Expand Up @@ -1731,9 +1728,7 @@ void process_message_from_server (const Uint8 *in_data, int data_length)
#ifdef BUFF_DEBUG
printf("SEND_BUFFS received\n");
#endif // BUFF_DEBUG
#ifdef BUFFS
update_actor_buffs(SDL_SwapLE16(*((short *)(in_data+3))), SDL_SwapLE32(*((Uint32 *)(in_data+5))));
#endif // BUFFS
break;

case SEND_SPECIAL_EFFECT:
Expand Down
7 changes: 1 addition & 6 deletions new_actors.c
Expand Up @@ -6,6 +6,7 @@
#include "actor_scripts.h"
#include "asc.h"
#include "bbox_tree.h"
#include "buffs.h"
#include "cal.h"
#include "console.h"
#include "dialogues.h"
Expand All @@ -28,9 +29,6 @@
#endif
#include "io/elfilewrapper.h"
#include "actor_init.h"
#ifdef BUFFS
#include "buffs.h"
#endif // BUFFS

float sitting=1.0f;
glow_color glow_colors[10];
Expand Down Expand Up @@ -1086,10 +1084,7 @@ void add_enhanced_actor_from_server (const char *in_data, int len)
if (actor_id == yourself) {
reset_camera_at_next_update = 1;
}
#ifdef BUFFS
update_actor_buffs(actor_id, buffs);
#endif // BUFFS

UNLOCK_ACTORS_LISTS(); //unlock it
#ifdef EXTRA_DEBUG
ERR();
Expand Down

0 comments on commit 5250822

Please sign in to comment.