adapated for Maemo
[shermanaquarium] / sherman-aquarium / shermans / fish.h
1 #ifndef FISH_H
2 #define FISH_H
3
4 #include "aquarium.h"
5
6 #define FISH1 0
7 #define FISH2 1
8 #define FISH3 2
9 #define FISH4 3
10 #define FISH5 4
11 #define FISH6 5
12 #define SQUID 6
13 #define SWORDFISH 7
14 #define BLOWFISH 8
15 #define ERNEST 9
16 #define HUNTER 10
17 #define LORI 11
18 #define PREY 12
19 #define SHERMAN 13
20 #define FILLMORE 14
21 #define BDWELLER 15
22 #define HAWTHORNE 16
23 #define MEGAN 17
24
25 /* Default size of fishes */
26 #define DEFAULT_SCALE 50
27
28 #define DEFAULT_SPEED 100
29
30 #define FULLSCREEN_DEFAULT_SCALE 60
31
32 /* how many fishes do you want in your aquarium? */
33 #define NRFISH 10
34 #define FULLSCREEN_NRFISH 20
35
36 /* The number of fishes you have graphic for */
37 #define NUMOFFISHTYPES 18
38
39
40     
41 #define RANDOM_FISH 0
42 #define SELECTION_FISH 1
43 #define RANDOM_POP_FISH 2
44
45
46 /* structure describing each fish */
47 typedef struct {
48
49     float tx;                   /* current x position */
50     int y;                      /* current y position */
51     int travel;                 /* how far to move beyond the screen */
52     int rev;                    /* going left or right? */
53     int frame;                  /* current animation frame */
54     float delay;                /* how quick we swap frames */
55     int updown;                 /* Was last moment up or down? - Larger chance to do it again. */
56     int type;                   /* Kind of fish */
57     int width;
58     int height;
59     SA_Image *image;
60     int *animation;
61     int num_animation;
62     float *speed;
63     float speed_mul;
64     float fast_frame_change;
65     int is_dead;                        /* Is the fish alive? I.E, eaten prey or punched blowfish? */
66 } Fish;
67
68
69 typedef struct {
70     char *file;
71     int pics;
72     int frames;
73     int *animation;
74     float *speed;
75 } Fish_animation;
76
77
78
79 typedef struct
80 {
81     int eat;
82     int explode;
83     int scale;
84     
85     /* Have a scale difference of +- 15% */
86     int scale_diff;
87
88     /* 100 = Original speed */
89     int speed;
90
91     int rebirth;
92
93     int num_fish;
94     int type;
95
96     /* Agressiveness of hunter and swordfish */
97     int swordfish_agr, hunter_agr;
98
99
100     int fish1;
101     int fish2;
102     int fish3;
103     int fish4;
104     int fish5;
105     int fish6;
106     int swordfish;
107     int blowfish;
108     int fillmore;
109     int sherman;
110     int prey;
111     int hunter;
112     int lori;
113     int ernest;
114     int squid;
115     int megan;
116     int bdweller;
117     int hawthorne;
118 } Fish_settings;
119
120 Fish *fish_get_fishes_ptr(void);
121 Fish_settings *fish_get_settings_ptr(void);
122 /*SA_Image *fish_get_blowup_data_ptr(void);
123 SA_Image *fish_get_prey_hunter_data_ptr(void);
124 Fish_animation **fish_get_fish_animation_ptr(void);*/
125
126 void fish_enter(void);
127 void fish_leave(void);
128 void fish_init(void);
129 void fish_turn(void);
130 void fish_exit(void);
131 void fish_update(void);
132
133 #endif