00001 #ifndef GLOBAL_ADD_H
00002 #define GLOBAL_ADD_H
00003
00004 #include "allegro.h"
00005 #include "loader.h"
00006
00007 #define MAX_OF_PLAYERS 6
00008 #define ITEM_NUMBER 11
00009
00013 int SENSEI_DEBUG_ON;
00014
00026 typedef struct input{
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 int state[11];
00037
00038 int keys[11];
00039 int joybuton[7];
00040 int use_joystick;
00041
00042 int key_waited;
00043 int buton_waited;
00044 int wait_input;
00045 }input;
00046
00049 typedef struct music_struct{
00050 int type;
00051 int loaded;
00052 int loop;
00053 char * path;
00054 }music_struct;
00055
00059 typedef struct config{
00060 int Difficulty;
00061 int Life;
00062 int Time;
00063 int Game_speed;
00064
00065 int Debug_on;
00066 int Allow_debug;
00067
00068 int Width;
00069 int Height;
00070 int Depth;
00071
00072 int Buffer_w;
00073 int Buffer_h;
00074 int Fullscreen;
00075 int Doubleres;
00076 int Stretch;
00077
00078 int Sound;
00079 int Midi_driver;
00080 int Digi_driver;
00081 int WavVolume;
00082 int MidiVolume;
00083 }config;
00084
00088 typedef struct background_elt_struct{
00089 char * elt_name;
00090 int elt_type;
00091 int actionno;
00092 int spritenog;
00093 int spritenoi;
00094 int layerno;
00095 int startx;
00096 int starty;
00097 int deltax;
00098 int deltay;
00099 int trans;
00100 int mask;
00101 int tilex;
00102 int tiley;
00103 int tilespacex;
00104 int tilespacey;
00105 int windowx;
00106 int windowy;
00107 int windoww;
00108 int windowh;
00109 int xposition;
00110 int yposition;
00111 int adj_xposition;
00112 int adj_yposition;
00113 int tilew;
00114 int tileh;
00115 int velocityx;
00116 int velocityy;
00117 }background_elt_struct;
00118
00122 typedef struct scene_struct{
00123 char * name;
00124 int starttime;
00125 int currenttime;
00126 int endtime;
00127 char * bgm_path;
00128 int fadeintime;
00129 int fadeouttime;
00130 int layerallx;
00131 int layerally;
00132 background_elt_struct bg_array[10];
00133 }scene_struct;
00134
00138 typedef struct animation_elt_struct{
00139 int spriteno;
00140 int groupeno;
00141 int x;
00142 int y;
00143 int time;
00144 int flipping;
00145 int trans;
00146 int current_time;
00147 }animation_elt_struct;
00148
00152 typedef struct action_struct{
00153 int number;
00154 int loop_start;
00155 int anim_time;
00156 int current_element;
00157 int nb_elt;
00158 animation_elt_struct * animation_array;
00159 }action_struct;
00160
00163 typedef struct player_cns{
00164 int scalex;
00165 int scaley;
00166 }player_cns;
00167
00172 struct Player_variables{
00173 int loaded;
00174 input Player_input;
00175 int computer_input;
00176 int reversed;
00177 int has_control;
00178 int type;
00179 char * def_path;
00180
00181 SFFEntry * player_sff;
00182 char * name;
00183 char * display_name;
00184 char * author;
00185
00186 char * cmd_path;
00187 char * cns_path;
00188 char * st_path;
00189 char * stcommon_path;
00190 char * sprite_path;
00191 char * anim_path;
00192 char * sound_path;
00193 char * pal1_path;
00194
00195 action_struct * action_array;
00196 int action_number;
00197 };
00198 typedef struct Player_variables * Player_variables;
00199
00203 typedef struct background_struct{
00204 SFFEntry * bg_sff;
00205 char * bg_path;
00206 char * bg_sff_path;
00207 int bg_sff_path_known;
00208 char * name;
00209 background_elt_struct * bg_elt_array;
00210 action_struct * action_array;
00211 int bg_elt_nb;
00212 int action_nb;
00213 int type;
00214 int type_front;
00215 BITMAP * Pcx_back;
00216 BITMAP * Pcx_front;
00217 PALETTE Pal_back;
00218 PALETTE Pal_front;
00219
00220 int startx;
00221 int starty;
00222
00223 int screenleft;
00224 int screenright;
00225
00226 int zoffset;
00227
00228 int camerax;
00229 int cameray;
00230
00231 int loaded;
00232 }background_struct;
00233
00237 typedef struct storyboard_struct{
00238 char * path;
00239 int startscene;
00240 SFFEntry * storyboard_sff;
00241 int nb_scene;
00242 int nb_actions;
00243 int current_scene;
00244 scene_struct * scene_array;
00245 action_struct * action_array;
00246 int loaded;
00247 int ended;
00248 }storyboard_struct;
00249
00253 typedef struct story_struct{
00254 char * Path;
00255 int Story_type;
00256 int StoryExist;
00257 int StoryEnded;
00258 int Running;
00259 char * Mp3Path;
00260 int Mp3Exist;
00261 music_struct story_music;
00262 storyboard_struct storyboard;
00263 }story_struct;
00264
00265
00266 typedef struct coordo_struct{
00267 int x;
00268 int y;
00269 }coordo_struct;
00270
00274 typedef struct char_ref_struct{
00275 int type;
00276 char * path;
00277 char * display_name;
00278 BITMAP * b_pic;
00279 BITMAP * s_pic;
00280 PALETTE b_pic_pal;
00281 PALETTE s_pic_pal;
00282 RGB * b_pal;
00283 RGB * s_pal;
00284 int x;
00285 int y;
00286 }char_ref_struct;
00287
00290 typedef struct bg_ref_struct{
00291 int type;
00292 char * path;
00293 char * display_name;
00294 }bg_ref_struct;
00295
00299 typedef struct select_struct{
00300 int type;
00301 int loaded;
00302 int state;
00303 SFFEntry * select_sff;
00304 char * sff_path;
00305 char_ref_struct * char_ref_array;
00306 bg_ref_struct * bg_ref_array;
00307 int * char_list;
00308
00309 int nb_char;
00310 int s_nb_char;
00311 int nb_bg;
00312 coordo_struct p1_position;
00313 coordo_struct p2_position;
00314 int p1_showed;
00315 int p2_showed;
00316 int p1_controller;
00317 int p2_controller;
00318 int rows;
00319 int columns;
00320 int wrapping;
00321 int posx;
00322 int posy;
00323 int showemptyboxes;
00324 int moveoveremptyboxes;
00325 int cellsizex;
00326 int cellsizey;
00327 int cellspacing;
00328 int cellbgspri;
00329 int cellbgsprg;
00330 int cellrandi;
00331 int cellrandg;
00332
00333 int p1startx;
00334 int p1starty;
00335 int p1activei;
00336 int p1activeg;
00337 int p1donei;
00338 int p1doneg;
00339 int p1movesndg;
00340 int p1movesndi;
00341 int p1donesndg;
00342 int p1donesndi;
00343 int p1randomsndg;
00344 int p1randomsndi;
00345
00346 int p2startx;
00347 int p2starty;
00348 int p2activei;
00349 int p2activeg;
00350 int p2donei;
00351 int p2doneg;
00352 int p2movesndg;
00353 int p2movesndi;
00354 int p2donesndg;
00355 int p2donesndi;
00356 int p2randomsndg;
00357 int p2randomsndi;
00358
00359 int stagemovesndg;
00360 int stagemovesndi;
00361 int stagedonesndg;
00362 int stagedonesndi;
00363 int cancelsndg;
00364 int cancelsndi;
00365
00366 int portraitoffsetx;
00367 int portraitoffsety;
00368 double portraitscalex;
00369 double portraitscaley;
00370
00371 int titleoffsetx;
00372 int titleoffsety;
00373 int titlefonti;
00374 int titlefontcolor;
00375 int titlefontjust;
00376
00377 int p1faceoffsetx;
00378 int p1faceoffsety;
00379 double p1facescalex;
00380 double p1facescaley;
00381 int p1facefacing;
00382 int p1nameoffsetx;
00383 int p1nameoffsety;
00384 int p1namefonti;
00385 int p1namefontcolor;
00386 int p1namefontjust;
00387
00388 int p2faceoffsetx;
00389 int p2faceoffsety;
00390 int p2facescalex;
00391 double p2facescaley;
00392 double p2facefacing;
00393 int p2nameoffsetx;
00394 int p2nameoffsety;
00395 int p2namefonti;
00396 int p2namefontcolor;
00397 int p2namefontjust;
00398
00399 int p1_max_selecter;
00400 int p1_selected[4];
00401 int p1_selecter;
00402 int p2_max_selecter;
00403 int p2_selected[4];
00404 int p2_selecter;
00405
00406 int stage_showed;
00407 int stageposx;
00408 int stageposy;
00409 int stageactivefonti;
00410 int stageactivefontcolor;
00411 int stageactivefontjust;
00412 int stageactive2fonti;
00413 int stageactive2fontcolor;
00414 int stageactive2fontjust;
00415 int stagedonefonti;
00416 int stagedonefontcolor;
00417 int stagedonefontjust;
00418 int bg_blinked;
00419 int current_bg;
00420 int bg_selected;
00421 int stage_controller;
00422 int * bg_used;
00423
00424 BITMAP * faces;
00425 }select_struct;
00426
00429 typedef struct vs_struct{
00430 int state;
00431 int time;
00432 int currenttime;
00433 int fadeintime;
00434 int fadeouttime;
00435 coordo_struct p1pos;
00436 int p1facing;
00437 double p1scalex;
00438 double p1scaley;
00439 coordo_struct p1namepos;
00440 int p1namefonti;
00441 int p1namefontcolor;
00442 int p1namefontjust;
00443 coordo_struct p2pos;
00444 int p2facing;
00445 double p2scalex;
00446 double p2scaley;
00447 coordo_struct p2namepos;
00448 int p2namefonti;
00449 int p2namefontcolor;
00450 int p2namefontjust;
00451 }vs_struct;
00452
00456 typedef struct system_struct{
00457 char ** itemname;
00458 int posx;
00459 int posy;
00460 int itemfontnumber;
00461 int itemfontcolor;
00462 int itemfontalignement;
00463 int itemactivefontnumber;
00464 int itemactivefontcolor;
00465 int itemactivefontalignement;
00466 int itemspacingx;
00467 int itemspacingy;
00468 int windowsmarginx;
00469 int windowsmarginy;
00470 int boxvisible;
00471 int visibleitems;
00472 int boxcoordsx;
00473 int boxcoordsy;
00474 int boxcoordsw;
00475 int boxcoordsh;
00476 int currentitem;
00477 int firstitem;
00478
00479 int transeffect;
00480 int transadd;
00481 int boxposition;
00482
00483
00484 int Ocurrentitem;
00485 int Ocurrentitem2;
00486 int Otranseffect;
00487 int Otransadd;
00488
00489 story_struct Intro;
00490 story_struct Open;
00491 story_struct Ending;
00492 story_struct Credits;
00493
00494
00495 FNTInfo* fontInfo0;
00496 int font0exist;
00497 FNTInfo* fontInfo1;
00498 int font1exist;
00499 FNTInfo* fontInfo2;
00500 int font2exist;
00501 FNTInfo* fontInfo3;
00502 int font3exist;
00503 FNTInfo* fontInfo4;
00504 int font4exist;
00505 FNTInfo* fontInfo5;
00506 int font5exist;
00507 FNTInfo* fontInfo6;
00508 int font6exist;
00509 FNTInfo* fontInfo7;
00510 int font7exist;
00511 FNTInfo* fontInfo8;
00512 int font8exist;
00513 FNTInfo* fontInfo9;
00514 int font9exist;
00515
00516
00517 char * select_path;
00518 char * fight_path;
00519
00520
00521 char * Sndpath;
00522 SNDCollection *Systemsnd;
00523 int Sndexist;
00524
00525
00526 int Mvcursorgrp;
00527 int Mvcursornb;
00528 int Donecursorgrp;
00529 int Donecursornb;
00530 int Cancelgrp;
00531 int Cancelnb;
00532
00533
00534 int OMvcursorgrp;
00535 int OMvcursornb;
00536 int ODonecursorgrp;
00537 int ODonecursornb;
00538 int OCancelgrp;
00539 int OCancelnb;
00540
00541
00542 music_struct title_music;
00543 music_struct select_music;
00544 music_struct vs_music;
00545
00546
00547 background_struct Title_bg;
00548
00549
00550 background_struct Option_bg;
00551
00552
00553 background_struct Select_bg;
00554
00555
00556 background_struct Vs_bg;
00557
00558
00559 select_struct Select_struct;
00560
00561
00562 vs_struct Vs_struct;
00563
00564 }system_struct;
00565
00568 typedef struct function_keys{
00569 int Esc;
00570 int F1;
00571 int F2;
00572 }function_keys;
00573
00576 struct Game_variables{
00577 int Game_state;
00578 char * Path;
00579 config Game_config;
00580 system_struct System;
00581
00582
00583 background_struct Fight_bg;
00584
00585 function_keys f_keys;
00586 int not_show;
00587 int fps;
00588
00589 };
00590 typedef struct Game_variables * Game_variables;
00591 #endif