view plugins/crazychat/face.h @ 13664:4132d997ccec

[gaim-migrate @ 16066] Fix Coverity CID 45: Check to make sure a channel 2 ICBM actually contains an IP address TLV before attempting to use it. This avoids a crash when the server sends us an abnormal channel 2 ICBM. I'm not sure if that ever happens. Fix Coverity CID 204: Don't attempt to send data over a FLAP BOS connection that doesn't exist. This should never happen because the account should get disconnected first. Fix Coverity CID 205: Don't check that a variable 'od' which we know is valid is not equal to NULL in aim_search_address() in family_userlookup.c Fix Coverity CID 206: Don't check that the variable 'od' which we know is valid is not equal to NULL in aim_chat_join() in family_oservice.c Fix Coverity CID 207: I neglected to remove a "return;" line from aim_admin_setnick() in family_admin.c which caused setting your AIM screen name formatting to not work. Fix Coverity CID 208: Remove a duplicate call to gaim_connection_get_account() in peer_connection_propose() in peer.c. Fix Coverity CID 209: Remove the unused variable "username" from incomingim_chan2() in oscar.c. Fix Coverity CID 210: Remove the unused variable "account" from peer_connection_listen_cb() in peer.c. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 20 Apr 2006 04:45:06 +0000
parents ed017b9c532d
children
line wrap: on
line source

#ifndef __FACE_H__
#define __FACE_H__

#include <GL/gl.h>
#include <GL/glu.h>
#include "glm.h"

#define NUM_PARTS 10
#define DOG_SHARK_CHANGE 5
#define CRAZY_COUNT 12
#define MAX_EYE_POP 1.3
#define EYE_TIME 120
#define MAX_FILE_LEN 64
#define ANGLE_INC 60

typedef enum {DOG, SHARK} KIND;
typedef int BOOL;
typedef enum {UP, DOWN, CONST} DIRECTION;
typedef enum {NORMAL, CRAZY1, CRAZY2, CRAZY3} OUTPUT_MODE;

struct face_struct {
	char* name;
	KIND my_kind;
	void* char_struct;
	GLint* mat_indeces;
	GLMmat_str* materials;
	OUTPUT_MODE my_mode;
	int eye_count, crazy_count;	
	void (*draw_func)(struct face_struct*, GLfloat, GLfloat, BOOL, BOOL, GLfloat, DIRECTION, OUTPUT_MODE);
	float curr_z_angle, curr_eye_pop;
};

typedef struct face_struct* FACE;
typedef enum {APPENDAGE, HEAD, LIDS, LEFT_IRIS, RIGHT_IRIS, EYES, PUPIL, EXTRA1, EXTRA2, EXTRA3} PART;

FACE init_face(KIND kind);

FACE copy_face(FACE f);

void draw_face(FACE face, GLfloat zrot, GLfloat yrot, BOOL left_eye, BOOL right_eye, GLfloat mouth_open, DIRECTION dir, OUTPUT_MODE mode);

void change_materials(FACE face, int* mats, int num_change); 

#endif