diff options
author | Alexander Baldeck <alexander@archlinux.org> | 2004-09-30 12:11:01 +0000 |
---|---|---|
committer | Alexander Baldeck <alexander@archlinux.org> | 2004-09-30 12:11:01 +0000 |
commit | 4febad8f7333103dd4bbbcb426aea3fe05000ee7 (patch) | |
tree | fd749b43351d1d2d788c34e3d474d7b7ef182b66 /src/gui | |
parent | 6ad0010e3356664c43418e5aad584cddc5498451 (diff) | |
download | mana-client-4febad8f7333103dd4bbbcb426aea3fe05000ee7.tar.gz mana-client-4febad8f7333103dd4bbbcb426aea3fe05000ee7.tar.bz2 mana-client-4febad8f7333103dd4bbbcb426aea3fe05000ee7.tar.xz mana-client-4febad8f7333103dd4bbbcb426aea3fe05000ee7.zip |
*** empty log message ***
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/char_select.cpp | 12 | ||||
-rw-r--r-- | src/gui/char_server.cpp | 14 | ||||
-rw-r--r-- | src/gui/skill.cpp | 2 | ||||
-rw-r--r-- | src/gui/stats.cpp | 30 | ||||
-rw-r--r-- | src/gui/stats.h | 42 |
5 files changed, 86 insertions, 14 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index ac35cac9..a23c4713 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -35,8 +35,8 @@ DIALOG char_select_dialog[] = { { tmw_bitmap_proc, 304, 282, 192, 70, 0, 0, 0, 0, 80, 60, playerset, NULL, NULL }, { tmw_button_proc, 398, 426, 44, 18, 0, -1, 'o', D_EXIT, -1, 0, (char*)"&Ok", NULL, NULL }, { tmw_button_proc, 446, 426, 44, 18, 0, -1, 'c', D_EXIT, -1, 0, (char*)"&Cancel", NULL, NULL }, - { tmw_button_proc, 304, 426, 44, 18, 0, 0, 0, D_EXIT, 0, 0, button_state, NULL, NULL }, -/* { gui_button_proc, 304, 356, 20, 20, 0, 0, 0, 0, 0, 0, "<", NULL, NULL }, + { tmw_button_proc, 304, 426, 44, 18, 0, 0, 0, D_EXIT, 0, 0, button_state, NULL, NULL }, +/* { gui_button_proc, 304, 356, 20, 20, 0, 0, 0, 0, 0, 0, "<", NULL, NULL }, { gui_button_proc, 328, 356, 20, 20, 0, 0, 0, 0, 0, 0, ">", NULL, NULL }, */ { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, }; @@ -97,7 +97,7 @@ void server_char_select() { log_int("Char_Select_Packet", "Packet_in_size", RFIFOW(2)); log_int("Char_Select_Packet", "In_size", in_size); - if(RFIFOW(0)==0x0071) { + if(RFIFOW(0)==0x0071) { while(in_size<28)flush(); char_ID = RFIFOL(2); memset(map_path, '\0', 480); @@ -137,7 +137,7 @@ void server_char_delete() { WFIFOSET(46); while((in_size<2)||(out_size>0))flush(); - if(RFIFOW(0)==0x006f) { + if(RFIFOW(0)==0x006f) { RFIFOSKIP(2); ok("Info", "Player deleted"); free(char_info); @@ -184,7 +184,7 @@ void server_char_delete() { while((in_size<3)||(out_size>0))flush(); if(RFIFOW(0)==0x006d) { while(in_size<108)flush(); - char_info = (CHAR_SEL_INFO *)malloc(sizeof(CHAR_SEL_INFO)); + char_info = (CHAR_INFO *)malloc(sizeof(CHAR_INFO)); char_info->id = account_ID; memset(char_info->name, '\0', 24); strcpy(char_info[0].name, RFIFOP(2+74)); @@ -203,7 +203,7 @@ void server_char_delete() { char_info->INT = RFIFOB(2+101); char_info->DEX = RFIFOB(2+102); char_info->LUK = RFIFOB(2+103); - RFIFOSKIP(108); + RFIFOSKIP(108); n_character++; } else if(RFIFOW(0)==0x006c) { switch(RFIFOB(2)) { diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp index 827e725e..4fbb2267 100644 --- a/src/gui/char_server.cpp +++ b/src/gui/char_server.cpp @@ -75,8 +75,8 @@ void server_char_server() { if(ret==SOCKET_ERROR) { ok("Error", "Unable to connect to char server"); return; - } - + } + // Send login infos WFIFOW(0) = net_w_value(0x0065); WFIFOL(2) = net_l_value(account_ID); @@ -90,11 +90,11 @@ void server_char_server() { RFIFOSKIP(4); while(in_size<3)flush(); - + if(RFIFOW(0)==0x006b) { while(in_size<RFIFOW(2))flush(); n_character = (RFIFOW(2)-24)/106; - char_info = (CHAR_SEL_INFO *)malloc(sizeof(CHAR_SEL_INFO)*n_character); + char_info = (CHAR_INFO *)malloc(sizeof(CHAR_INFO)*n_character); for(int i=0;i<n_character;i++) { char_info[i].id = RFIFOL(24+106*i); strcpy(char_info[i].name, RFIFOP(24+106*i+74)); @@ -116,12 +116,12 @@ void server_char_server() { } state = CHAR_SELECT; - log("Player", "name", char_info->name); + log("Player", "name", char_info->name); log_hex("Char_Server_Packet", "Packet_ID", RFIFOW(0)); log_int("Char_Server_Packet", "Packet_length", RFIFOW(2)); - - RFIFOSKIP(RFIFOW(2)); + + RFIFOSKIP(RFIFOW(2)); } else if(RFIFOW(0)==0x006c) { switch(RFIFOB(2)) { case 0: diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp index f1ccdcc2..35abb975 100644 --- a/src/gui/skill.cpp +++ b/src/gui/skill.cpp @@ -25,7 +25,7 @@ #include "skill.h" -extern CHAR_SEL_INFO *char_info; +extern CHAR_INFO *char_info; char str_string[8]; char agi_string[8]; diff --git a/src/gui/stats.cpp b/src/gui/stats.cpp new file mode 100644 index 00000000..9b059369 --- /dev/null +++ b/src/gui/stats.cpp @@ -0,0 +1,30 @@ +/* + + The Mana World + Copyright 2004 The Mana World Development Team + + This file is part of The Mana World. + + The Mana World is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + The Mana World is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with The Mana World; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + +#include "stats.h" + +#include <iostream> + +int charstats_display(CHAR_INFO * test) { + std::cout << "char_stats: " << endl; +} diff --git a/src/gui/stats.h b/src/gui/stats.h new file mode 100644 index 00000000..09ec8950 --- /dev/null +++ b/src/gui/stats.h @@ -0,0 +1,42 @@ +/* + + The Mana World + Copyright 2004 The Mana World Development Team + + This file is part of The Mana World. + + The Mana World is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + The Mana World is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with The Mana World; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + +#ifndef __STATS_H +#define __STATS_H + +#include <allegro.h> +#include "../main.h" +#include "gui.h" + +typedef struct CHAR_INFO { + int id; + char name[24]; + short hp, max_hp, sp, max_sp, lv; + int xp, zeny, job_xp, job_lv; + short statp, skillp; + char STR, AGI, VIT, INT, DEX, LUK; +}; + +int charstats_display(CHAR_INFO *); + +#endif |