| 1 | /* |
| 2 | * Copyright (C) 2000,2001 Onlyer ([email protected]) |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version 2 |
| 7 | * of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | */ |
| 18 | #ifndef INCLUDED_GAME_H |
| 19 | #define INCLUDED_GAME_Hcxx . . $ `src/d2cs/game.h:19:9`! |
| 20 | |
| 21 | #include "d2gs.h"cxx . . $ `<file>/src/d2cs/d2gs.h`/ |
| 22 | #include "connection.h"cxx . . $ `<file>/src/d2cs/connection.h`/ |
| 23 | #include "bit.h"cxx . . $ `<file>/src/d2cs/bit.h`/ |
| 24 | |
| 25 | namespace pvpgncxx . . $ pvpgn/ |
| 26 | { |
| 27 | |
| 28 | namespace d2cscxx . . $ pvpgn/d2cs/ |
| 29 | { |
| 30 | |
| 31 | typedef structcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_0# |
| 32 | { |
| 33 | unsigned char chclasscxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_0#chclass.; |
| 34 | unsigned char levelcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_0#level.; |
| 35 | char const * charnamecxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_0#charname.; |
| 36 | } t_game_charinfocxx . . $ pvpgn/d2cs/t_game_charinfo#; |
| 37 | |
| 38 | typedef structcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1# |
| 39 | { |
| 40 | unsigned int idcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#id.; |
| 41 | char const * namecxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#name.; |
| 42 | char const * passcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#pass.; |
| 43 | char const * desccxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#desc.; |
| 44 | int create_timecxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#create_time.; |
| 45 | int lastaccess_timecxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#lastaccess_time.; |
| 46 | unsigned int createdcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#created.; |
| 47 | unsigned int gameflagcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#gameflag.; |
| 48 | unsigned int charlevelcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#charlevel.; |
| 49 | unsigned int leveldiffcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#leveldiff.; |
| 50 | unsigned int d2gs_gameidcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#d2gs_gameid.; |
| 51 | unsigned int maxcharcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#maxchar.; |
| 52 | unsigned int currcharcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#currchar.; |
| 53 | t_listcxx . . $ pvpgn/t_list# * charlistcxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#charlist.; |
| 54 | t_d2gscxx . . $ pvpgn/d2cs/t_d2gs# * d2gscxx . . $ pvpgn/d2cs/$anonymous_type_24810558b88c8e5a_1#d2gs.; |
| 55 | } t_gamecxx . . $ pvpgn/d2cs/t_game#; |
| 56 | |
| 57 | #define D2_GAMEFLAG_BETAcxx . . $ `src/d2cs/game.h:57:9`! 0x00000001 |
| 58 | #define D2_GAMEFLAG_RELEASEcxx . . $ `src/d2cs/game.h:58:9`! 0x00000002 |
| 59 | #define D2_GAMEFLAG_TEMPLATEcxx . . $ `src/d2cs/game.h:59:9`! 0x00000008 |
| 60 | #define D2_GAMEFLAG_SINGLEcxx . . $ `src/d2cs/game.h:60:9`! 0x00000010 |
| 61 | #define D2_GAMEFLAG_HARDCOREcxx . . $ `src/d2cs/game.h:61:9`! 0x00000800 |
| 62 | #define D2_GAMEFLAG_EXPANSIONcxx . . $ `src/d2cs/game.h:62:9`! 0x00100000 |
| 63 | #define D2_GAMEFLAG_LADDERcxx . . $ `src/d2cs/game.h:63:9`! 0x00200000 |
| 64 | |
| 65 | #define gameflag_get_difficultycxx . . $ `src/d2cs/game.h:65:9`!(gameflag) ( (gameflag >> 0x0C) & 0x07 ) |
| 66 | #define gameflag_get_expansioncxx . . $ `src/d2cs/game.h:66:9`!(gameflag) BIT_TST_FLAGcxx . . $ `src/d2cs/bit.h:24:9`!(gameflag, D2_GAMEFLAG_EXPANSIONcxx . . $ `src/d2cs/game.h:62:9`!) |
| 67 | #define gameflag_get_laddercxx . . $ `src/d2cs/game.h:67:9`!(gameflag) BIT_TST_FLAGcxx . . $ `src/d2cs/bit.h:24:9`!(gameflag, D2_GAMEFLAG_LADDERcxx . . $ `src/d2cs/game.h:63:9`!) |
| 68 | #define gameflag_get_hardcorecxx . . $ `src/d2cs/game.h:68:9`!(gameflag) BIT_TST_FLAGcxx . . $ `src/d2cs/bit.h:24:9`!(gameflag, D2_GAMEFLAG_HARDCOREcxx . . $ `src/d2cs/game.h:61:9`!) |
| 69 | #define gameflag_get_betacxx . . $ `src/d2cs/game.h:69:9`!(gameflag) BIT_TST_FLAG(gameflag, D2_GAMEFLAG_BETA) /* true if the game is a beta version with limitations */ |
| 70 | #define gameflag_get_releasecxx . . $ `src/d2cs/game.h:70:9`!(gameflag) BIT_TST_FLAG(gameflag, D2_GAMEFLAG_RELEASE) /* this bit must always not be zero */ |
| 71 | #define gameflag_get_singlecxx . . $ `src/d2cs/game.h:71:9`!(gameflag) BIT_TST_FLAG(gameflag, D2_GAMEFLAG_SINGLE) /* true if the game is single mode without party */ |
| 72 | #define gameflag_get_templatecxx . . $ `src/d2cs/game.h:72:9`!(gameflag) BIT_TST_FLAG(gameflag, D2_GAMEFLAG_TEMPLATE) /* true if use template settings */ |
| 73 | |
| 74 | #define gameflag_set_difficultycxx . . $ `src/d2cs/game.h:74:9`!(gameflag,n) ( gameflag |= ((n & 0x07) << 0x0C) ) |
| 75 | #define gameflag_set_expansioncxx . . $ `src/d2cs/game.h:75:9`!(gameflag,n) BIT_SET_CLR_FLAGcxx . . $ `src/d2cs/bit.h:25:9`!(gameflag, D2_GAMEFLAG_EXPANSIONcxx . . $ `src/d2cs/game.h:62:9`!, n) |
| 76 | #define gameflag_set_laddercxx . . $ `src/d2cs/game.h:76:9`!(gameflag,n) BIT_SET_CLR_FLAGcxx . . $ `src/d2cs/bit.h:25:9`!(gameflag, D2_GAMEFLAG_LADDERcxx . . $ `src/d2cs/game.h:63:9`!, n) |
| 77 | #define gameflag_set_hardcorecxx . . $ `src/d2cs/game.h:77:9`!(gameflag,n) BIT_SET_CLR_FLAGcxx . . $ `src/d2cs/bit.h:25:9`!(gameflag, D2_GAMEFLAG_HARDCOREcxx . . $ `src/d2cs/game.h:61:9`!, n) |
| 78 | |
| 79 | #define gameflag_createcxx . . $ `src/d2cs/game.h:79:9`!(l,e,h,d) (0x04|(e?D2_GAMEFLAG_EXPANSION:0) | (h?D2_GAMEFLAG_HARDCORE:0) | ((d & 0x07) << 0x0c) | (l?D2_GAMEFLAG_LADDER:0)) |
| 80 | |
| 81 | |
| 82 | extern t_listcxx . . $ pvpgn/t_list# * d2cs_gamelistcxx . . $ pvpgn/d2cs/d2cs_gamelist(7a6cb11de248e2c9).(void); |
| 83 | extern int d2cs_gamelist_destroycxx . . $ pvpgn/d2cs/d2cs_gamelist_destroy(b126dc7c1de90089).(void); |
| 84 | extern int d2cs_gamelist_createcxx . . $ pvpgn/d2cs/d2cs_gamelist_create(b126dc7c1de90089).(void); |
| 85 | extern t_gamecxx . . $ pvpgn/d2cs/t_game# * d2cs_gamelist_find_gamecxx . . $ pvpgn/d2cs/d2cs_gamelist_find_game(6da516f6176bdca0).(char const * gamename); |
| 86 | extern t_gamecxx . . $ pvpgn/d2cs/t_game# * gamelist_find_game_by_idcxx . . $ pvpgn/d2cs/gamelist_find_game_by_id(f476a3e7e1ba51cb).(unsigned int id); |
| 87 | extern t_gamecxx . . $ pvpgn/d2cs/t_game# * gamelist_find_game_by_d2gs_and_idcxx . . $ pvpgn/d2cs/gamelist_find_game_by_d2gs_and_id(8574b6076fa391a1).(unsigned int d2gs_id, unsigned int d2gs_gameid); |
| 88 | extern void d2cs_gamelist_check_voidgamecxx . . $ pvpgn/d2cs/d2cs_gamelist_check_voidgame(49f6e7a06ebc5aa8).(void); |
| 89 | extern t_gamecxx . . $ pvpgn/d2cs/t_game# * d2cs_game_createcxx . . $ pvpgn/d2cs/d2cs_game_create(402e99608713bada).(char const * gamename, char const * gamepass, char const * gamedesc, |
| 90 | unsigned int gameflag); |
| 91 | extern int game_destroycxx . . $ pvpgn/d2cs/game_destroy(35433708d3d50b5a).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, t_elemcxx . . $ pvpgn/t_elem# ** elem); |
| 92 | extern int game_add_charactercxx . . $ pvpgn/d2cs/game_add_character(c3db1e962ac9bee0).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, char const * charname, |
| 93 | unsigned char chclass, unsigned char level); |
| 94 | extern int game_del_charactercxx . . $ pvpgn/d2cs/game_del_character(e30eb5f745b12d84).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, char const * charname); |
| 95 | |
| 96 | extern t_d2gscxx . . $ pvpgn/d2cs/t_d2gs# * game_get_d2gscxx . . $ pvpgn/d2cs/game_get_d2gs(d8ef2cc2a93b457).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 97 | extern int game_set_d2gscxx . . $ pvpgn/d2cs/game_set_d2gs(287452e9d86f7c48).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, t_d2gscxx . . $ pvpgn/d2cs/t_d2gs# * gs); |
| 98 | extern int game_set_d2gs_gameidcxx . . $ pvpgn/d2cs/game_set_d2gs_gameid(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int gameid); |
| 99 | extern unsigned int game_get_d2gs_gameidcxx . . $ pvpgn/d2cs/game_get_d2gs_gameid(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 100 | extern int game_set_idcxx . . $ pvpgn/d2cs/game_set_id(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int id); |
| 101 | extern unsigned int d2cs_game_get_idcxx . . $ pvpgn/d2cs/d2cs_game_get_id(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 102 | extern int game_set_createdcxx . . $ pvpgn/d2cs/game_set_created(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int created); |
| 103 | extern unsigned int game_get_createdcxx . . $ pvpgn/d2cs/game_get_created(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 104 | extern int game_set_leveldiffcxx . . $ pvpgn/d2cs/game_set_leveldiff(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int leveldiff); |
| 105 | extern int game_set_charlevelcxx . . $ pvpgn/d2cs/game_set_charlevel(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int charlevel); |
| 106 | extern unsigned int game_get_charlevelcxx . . $ pvpgn/d2cs/game_get_charlevel(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 107 | extern unsigned int game_get_leveldiffcxx . . $ pvpgn/d2cs/game_get_leveldiff(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 108 | extern unsigned int game_get_maxlevelcxx . . $ pvpgn/d2cs/game_get_maxlevel(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 109 | extern unsigned int game_get_minlevelcxx . . $ pvpgn/d2cs/game_get_minlevel(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 110 | extern int game_set_gameflag_laddercxx . . $ pvpgn/d2cs/game_set_gameflag_ladder(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int ladder); |
| 111 | extern int game_set_gameflag_expansioncxx . . $ pvpgn/d2cs/game_set_gameflag_expansion(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int expansion); |
| 112 | extern int game_set_gameflag_hardcorecxx . . $ pvpgn/d2cs/game_set_gameflag_hardcore(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int hardcore); |
| 113 | extern int game_set_gameflag_difficultycxx . . $ pvpgn/d2cs/game_set_gameflag_difficulty(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int difficulty); |
| 114 | extern unsigned int game_get_gameflag_laddercxx . . $ pvpgn/d2cs/game_get_gameflag_ladder(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 115 | extern unsigned int game_get_gameflag_expansioncxx . . $ pvpgn/d2cs/game_get_gameflag_expansion(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 116 | extern unsigned int game_get_gameflag_hardcorecxx . . $ pvpgn/d2cs/game_get_gameflag_hardcore(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 117 | extern unsigned int game_get_gameflag_difficultycxx . . $ pvpgn/d2cs/game_get_gameflag_difficulty(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 118 | extern int game_set_maxcharcxx . . $ pvpgn/d2cs/game_set_maxchar(b1b6f5a91b93abc1).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game, unsigned int maxchar); |
| 119 | extern unsigned int game_get_maxcharcxx . . $ pvpgn/d2cs/game_get_maxchar(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 120 | extern unsigned int game_get_currcharcxx . . $ pvpgn/d2cs/game_get_currchar(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 121 | extern char const * d2cs_game_get_namecxx . . $ pvpgn/d2cs/d2cs_game_get_name(d16e89b4cf68b40f).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 122 | extern char const * d2cs_game_get_passcxx . . $ pvpgn/d2cs/d2cs_game_get_pass(d16e89b4cf68b40f).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 123 | extern char const * game_get_desccxx . . $ pvpgn/d2cs/game_get_desc(d16e89b4cf68b40f).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 124 | extern unsigned int game_get_gameflagcxx . . $ pvpgn/d2cs/game_get_gameflag(33681cfe92f0a311).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 125 | extern int d2cs_game_get_create_timecxx . . $ pvpgn/d2cs/d2cs_game_get_create_time(b198e66ed4b75071).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 126 | extern int game_set_create_timecxx . . $ pvpgn/d2cs/game_set_create_time(dabb4cff116e68c8).(t_gamecxx . . $ pvpgn/d2cs/t_game# * game,int create_time); |
| 127 | extern t_listcxx . . $ pvpgn/t_list# * game_get_charlistcxx . . $ pvpgn/d2cs/game_get_charlist(7b8f8c506dc6cd26).(t_gamecxx . . $ pvpgn/d2cs/t_game# const * game); |
| 128 | extern t_gamecxx . . $ pvpgn/d2cs/t_game# * gamelist_find_charactercxx . . $ pvpgn/d2cs/gamelist_find_character(6da516f6176bdca0).(char const * charname); |
| 129 | extern unsigned int gamelist_get_totalgamecxx . . $ pvpgn/d2cs/gamelist_get_totalgame(db52760e79bf9054).(void); |
| 130 | extern t_elemcxx . . $ pvpgn/t_elem# const * gamelist_get_curr_elemcxx . . $ pvpgn/d2cs/gamelist_get_curr_elem(522bdc31dc152862).(void); |
| 131 | extern void gamelist_set_curr_elemcxx . . $ pvpgn/d2cs/gamelist_set_curr_elem(d3a4f890f2ebf374).(t_elemcxx . . $ pvpgn/t_elem# const * elem); |
| 132 | |
| 133 | } |
| 134 | |
| 135 | } |
| 136 | |
| 137 | #endif |