summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--The Mana World.dev220
-rw-r--r--src/game.cpp31
-rw-r--r--src/gui/skill.cpp22
-rw-r--r--src/gui/skill.h1
5 files changed, 144 insertions, 136 deletions
diff --git a/ChangeLog b/ChangeLog
index 7980ed93..b8064dca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-18 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * The Mana World.dev, src/game.cpp, src/gui/skill.h, src/gui/skill.cpp:
+ Updated reference to latest libxml, fixed a bug in updating skills, updated
+ skill names database.
+
2005-08-18 Björn Steinbrink <B.Steinbrink@gmx.de>
* src/Makefile.am, src/graphics.cpp, src/graphics.h, src/main.cpp,
diff --git a/The Mana World.dev b/The Mana World.dev
index 7cd285a6..4fa9ee10 100644
--- a/The Mana World.dev
+++ b/The Mana World.dev
@@ -1,7 +1,7 @@
[Project]
FileName=The Mana World.dev
Name=tmw
-UnitCount=159
+UnitCount=158
Type=0
Ver=1
ObjFiles=
@@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=-DUSE_OPENGL_@@_
-Linker=-lguichan_@@_-lguichan_sdl_@@_-lguichan_opengl_@@_-lwsock32_@@_-lSDL_image_@@_-lSDL_mixer_@@_-lmingw32_@@_-lSDLmain_@@_-lSDL_@@_-llibxml2_@@_-lopengl32_@@_-lz_@@_-lphysfs_@@_-lcurl_@@_
+Linker=-lguichan_@@_-lguichan_sdl_@@_-lguichan_opengl_@@_-lwsock32_@@_-lSDL_image_@@_-lSDL_mixer_@@_-lmingw32_@@_-lSDLmain_@@_-lSDL_@@_-lxml2_@@_-lopengl32_@@_-lz_@@_-lphysfs_@@_-lcurl_@@_
IsCpp=1
Icon=The Mana World.ico
ExeOutput=
@@ -27,7 +27,7 @@ CustomMakefile=
IncludeVersionInfo=1
SupportXPThemes=0
CompilerSet=0
-CompilerSettings=0010001001001000001101
+CompilerSettings=0010001001001001001001
[VersionInfo]
Major=0
@@ -627,20 +627,10 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
-[Unit105]
-FileName=src\net\win2mac.h
-CompileCpp=1
-Folder=net/header
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
[Unit106]
-FileName=src\net\network.cpp
+FileName=src\net\network.h
CompileCpp=1
-Folder=net/source
+Folder=net/header
Compile=1
Link=1
Priority=1000
@@ -648,9 +638,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit109]
-FileName=src\net\protocol.h
+FileName=src\resources\soundeffect.h
CompileCpp=1
-Folder=net/header
+Folder=resources
Compile=1
Link=1
Priority=1000
@@ -667,20 +657,10 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
-[Unit110]
-FileName=src\net\win2linux.h
-CompileCpp=1
-Folder=net/header
-Compile=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
[Unit111]
-FileName=src\net\win2mac.cpp
+FileName=src\resources\buddylist.h
CompileCpp=1
-Folder=net/source
+Folder=resources
Compile=1
Link=1
Priority=1000
@@ -688,7 +668,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit112]
-FileName=src\resources\soundeffect.h
+FileName=src\resources\image.cpp
CompileCpp=1
Folder=resources
Compile=1
@@ -698,7 +678,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit113]
-FileName=src\resources\buddylist.cpp
+FileName=src\resources\image.h
CompileCpp=1
Folder=resources
Link=1
@@ -708,7 +688,7 @@ BuildCmd=
Compile=1
[Unit114]
-FileName=src\resources\buddylist.h
+FileName=src\resources\iteminfo.cpp
CompileCpp=1
Folder=resources
Compile=1
@@ -718,7 +698,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit115]
-FileName=src\resources\image.cpp
+FileName=src\resources\iteminfo.h
CompileCpp=1
Folder=resources
Compile=1
@@ -728,7 +708,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit116]
-FileName=src\resources\image.h
+FileName=src\resources\itemmanager.cpp
CompileCpp=1
Folder=resources
Compile=1
@@ -738,7 +718,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit117]
-FileName=src\resources\iteminfo.cpp
+FileName=src\resources\itemmanager.h
CompileCpp=1
Folder=resources
Compile=1
@@ -748,7 +728,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit118]
-FileName=src\resources\iteminfo.h
+FileName=src\resources\mapreader.cpp
CompileCpp=1
Folder=resources
Compile=1
@@ -758,7 +738,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit119]
-FileName=src\resources\itemmanager.cpp
+FileName=src\resources\mapreader.h
CompileCpp=1
Folder=resources
Compile=1
@@ -768,7 +748,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit120]
-FileName=src\resources\itemmanager.h
+FileName=src\resources\music.cpp
CompileCpp=1
Folder=resources
Compile=1
@@ -778,7 +758,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit121]
-FileName=src\resources\mapreader.cpp
+FileName=src\resources\music.h
CompileCpp=1
Folder=resources
Compile=1
@@ -788,7 +768,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit122]
-FileName=src\resources\mapreader.h
+FileName=src\resources\resource.cpp
CompileCpp=1
Folder=resources
Compile=1
@@ -798,7 +778,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit124]
-FileName=src\resources\music.h
+FileName=src\resources\resourcemanager.cpp
CompileCpp=1
Folder=resources
Compile=1
@@ -808,7 +788,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit125]
-FileName=src\resources\resource.cpp
+FileName=src\resources\resourcemanager.h
CompileCpp=1
Folder=resources
Compile=1
@@ -818,7 +798,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit126]
-FileName=src\resources\resource.h
+FileName=src\resources\soundeffect.cpp
CompileCpp=1
Folder=resources
Compile=1
@@ -828,9 +808,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit127]
-FileName=src\resources\resourcemanager.cpp
+FileName=src\gui\help.h
CompileCpp=1
-Folder=resources
+Folder=gui/header
Compile=1
Link=1
Priority=1000
@@ -838,9 +818,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit128]
-FileName=src\resources\resourcemanager.h
+FileName=src\gui\help.cpp
CompileCpp=1
-Folder=resources
+Folder=gui/source
Compile=1
Link=1
Priority=1000
@@ -1298,9 +1278,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit107]
-FileName=src\net\network.h
+FileName=src\net\protocol.cpp
CompileCpp=1
-Folder=net/header
+Folder=net/source
Compile=1
Link=1
Priority=1000
@@ -1308,9 +1288,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit108]
-FileName=src\net\protocol.cpp
+FileName=src\net\protocol.h
CompileCpp=1
-Folder=net/source
+Folder=net/header
Compile=1
Link=1
Priority=1000
@@ -1318,7 +1298,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit123]
-FileName=src\resources\music.cpp
+FileName=src\resources\resource.h
CompileCpp=1
Folder=resources
Compile=1
@@ -1328,9 +1308,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit129]
-FileName=src\resources\soundeffect.cpp
+FileName=src\gui\inttextbox.cpp
CompileCpp=1
-Folder=resources
+Folder=gui/source
Compile=1
Link=1
Priority=1000
@@ -1338,7 +1318,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit130]
-FileName=src\gui\help.h
+FileName=src\gui\inttextbox.h
CompileCpp=1
Folder=gui/header
Compile=1
@@ -1348,9 +1328,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit131]
-FileName=src\gui\help.cpp
+FileName=src\gui\focushandler.h
CompileCpp=1
-Folder=gui/source
+Folder=gui/header
Compile=1
Link=1
Priority=1000
@@ -1358,7 +1338,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit132]
-FileName=src\gui\inttextbox.cpp
+FileName=src\gui\focushandler.cpp
CompileCpp=1
Folder=gui/source
Compile=1
@@ -1368,7 +1348,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit133]
-FileName=src\gui\inttextbox.h
+FileName=src\gui\popupmenu.h
CompileCpp=1
Folder=gui/header
Compile=1
@@ -1378,9 +1358,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit134]
-FileName=src\gui\focushandler.h
+FileName=src\gui\popupmenu.cpp
CompileCpp=1
-Folder=gui/header
+Folder=gui/source
Compile=1
Link=1
Priority=1000
@@ -1388,9 +1368,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit135]
-FileName=src\gui\focushandler.cpp
+FileName=src\gui\browserbox.h
CompileCpp=1
-Folder=gui/source
+Folder=gui/header
Compile=1
Link=1
Priority=1000
@@ -1398,9 +1378,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit136]
-FileName=src\gui\popupmenu.h
+FileName=src\gui\browserbox.cpp
CompileCpp=1
-Folder=gui/header
+Folder=gui/source
Compile=1
Link=1
Priority=1000
@@ -1408,9 +1388,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit137]
-FileName=src\gui\popupmenu.cpp
+FileName=src\gui\updatewindow.h
CompileCpp=1
-Folder=gui/source
+Folder=gui/header
Compile=1
Link=1
Priority=1000
@@ -1418,9 +1398,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit138]
-FileName=src\gui\browserbox.h
+FileName=src\gui\updatewindow.cpp
CompileCpp=1
-Folder=gui/header
+Folder=gui/source
Compile=1
Link=1
Priority=1000
@@ -1428,7 +1408,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit139]
-FileName=src\gui\browserbox.cpp
+FileName=src\gui\vbox.cpp
CompileCpp=1
Folder=gui/source
Compile=1
@@ -1438,7 +1418,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit140]
-FileName=src\gui\updatewindow.h
+FileName=src\gui\vbox.h
CompileCpp=1
Folder=gui/header
Compile=1
@@ -1448,7 +1428,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit141]
-FileName=src\gui\updatewindow.cpp
+FileName=src\gui\box.cpp
CompileCpp=1
Folder=gui/source
Compile=1
@@ -1458,9 +1438,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit142]
-FileName=src\gui\vbox.cpp
+FileName=src\gui\box.h
CompileCpp=1
-Folder=gui/source
+Folder=gui/header
Compile=1
Link=1
Priority=1000
@@ -1468,9 +1448,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit143]
-FileName=src\gui\vbox.h
+FileName=src\item.h
CompileCpp=1
-Folder=gui/header
+Folder=header
Compile=1
Link=1
Priority=1000
@@ -1478,9 +1458,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit144]
-FileName=src\gui\box.cpp
+FileName=src\equipment.cpp
CompileCpp=1
-Folder=gui/source
+Folder=
Compile=1
Link=1
Priority=1000
@@ -1488,9 +1468,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit145]
-FileName=src\gui\box.h
+FileName=src\equipment.h
CompileCpp=1
-Folder=gui/header
+Folder=header
Compile=1
Link=1
Priority=1000
@@ -1498,9 +1478,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit146]
-FileName=src\item.h
+FileName=src\item.cpp
CompileCpp=1
-Folder=header
+Folder=
Compile=1
Link=1
Priority=1000
@@ -1508,9 +1488,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit147]
-FileName=src\equipment.cpp
+FileName=src\gui\inventorywindow.h
CompileCpp=1
-Folder=
+Folder=gui/header
Compile=1
Link=1
Priority=1000
@@ -1518,9 +1498,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit148]
-FileName=src\equipment.h
+FileName=src\gui\inventorywindow.cpp
CompileCpp=1
-Folder=header
+Folder=gui/source
Compile=1
Link=1
Priority=1000
@@ -1528,9 +1508,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit149]
-FileName=src\item.cpp
+FileName=src\inventory.h
CompileCpp=1
-Folder=
+Folder=header
Compile=1
Link=1
Priority=1000
@@ -1548,9 +1528,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit150]
-FileName=src\gui\inventorywindow.h
+FileName=src\inventory.cpp
CompileCpp=1
-Folder=gui/header
+Folder=
Compile=1
Link=1
Priority=1000
@@ -1558,9 +1538,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit151]
-FileName=src\gui\inventorywindow.cpp
+FileName=src\configlistener.cpp
CompileCpp=1
-Folder=gui/source
+Folder=
Compile=1
Link=1
Priority=1000
@@ -1568,7 +1548,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit152]
-FileName=src\inventory.h
+FileName=src\configlistener.h
CompileCpp=1
Folder=header
Compile=1
@@ -1578,9 +1558,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit153]
-FileName=src\inventory.cpp
+FileName=src\graphic\imagerect.h
CompileCpp=1
-Folder=
+Folder=graphic/header
Compile=1
Link=1
Priority=1000
@@ -1588,9 +1568,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit154]
-FileName=src\configlistener.cpp
+FileName=src\guichanfwd.h
CompileCpp=1
-Folder=
+Folder=header
Compile=1
Link=1
Priority=1000
@@ -1598,7 +1578,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit155]
-FileName=src\configlistener.h
+FileName=src\playerinfo.h
CompileCpp=1
Folder=header
Compile=1
@@ -1608,9 +1588,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit156]
-FileName=src\graphic\imagerect.h
+FileName=src\serverinfo.h
CompileCpp=1
-Folder=graphic/header
+Folder=header
Compile=1
Link=1
Priority=1000
@@ -1618,7 +1598,7 @@ OverrideBuildCmd=0
BuildCmd=
[Unit157]
-FileName=src\guichanfwd.h
+FileName=src\openglgraphics.h
CompileCpp=1
Folder=header
Compile=1
@@ -1628,17 +1608,17 @@ OverrideBuildCmd=0
BuildCmd=
[Unit158]
-FileName=src\playerinfo.h
+FileName=src\openglgraphics.cpp
CompileCpp=1
-Folder=header
+Folder=
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
-[Unit159]
-FileName=src\serverinfo.h
+[Unit160]
+FileName=src\openglgraphics.h
CompileCpp=1
Folder=header
Compile=1
@@ -1647,3 +1627,33 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
+[Unit161]
+FileName=src\openglgraphics.cpp
+CompileCpp=1
+Folder=
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit105]
+FileName=src\net\network.cpp
+CompileCpp=1
+Folder=net/source
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit110]
+FileName=src\resources\buddylist.cpp
+CompileCpp=1
+Folder=resources
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
diff --git a/src/game.cpp b/src/game.cpp
index 4b3d78a1..c130870f 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -843,29 +843,10 @@ void do_parse()
if (in_size >= 2) {
// Check if the received packet is complete
while (in_size >= (len = get_packet_length(id = RFIFOW(0)))) {
- // Add infos to log file and dump the latest received packet
- char pkt_nfo[60];
- sprintf(pkt_nfo,"In-buffer size: %i Packet id: %x Packet length: %i", in_size, RFIFOW(0), len);
- /*
- log_hex("Packet", "Packet_ID", RFIFOW(0));
- log_int("Packet", "Packet_length", get_length(RFIFOW(0)));
- log_int("Packet", "Packet_in_size", RFIFOW(2));
- log_int("Packet", "In_size", in_size);
- FILE *file = fopen("packet.dump", "wb");
- for(int i=0;i<len;i++) {
- fprintf(file, "%x|%i|%c ", RFIFOB(i), RFIFOB(i), RFIFOB(i));
- if((i+1)%10==0)fprintf(file, "\n");
- }
- fclose(file);
- */
-#ifdef __DEBUG
- FILE *file = fopen("packet.list", "a");
- fprintf(file, "%x\n", RFIFOW(0));
- fclose(file);
-#endif
+ printf("Packet_ID: %x\n", RFIFOW(0));
+
// Parse packet based on their id
- // std::cout << "packet " << id << std::endl;
- switch (id)
+ switch (id)
{
case SMSG_LOGIN_SUCCESS:
// Connected to game server succesfully, set spawn point
@@ -1054,7 +1035,7 @@ void do_parse()
case SMSG_MOVE_PLAYER_BEING:
// A nearby player being moves
- being = findNode(RFIFOL(2));
+ /*being = findNode(RFIFOL(2));
if (being == NULL)
{
@@ -1072,7 +1053,7 @@ void do_parse()
being->setDestination(
get_dest_x(RFIFOP(50)),
- get_dest_y(RFIFOP(50)));
+ get_dest_y(RFIFOP(50)));*/
break;
// NPC dialog
@@ -1556,7 +1537,7 @@ void do_parse()
if (skillDialog->hasSkill(skillId)) {
skillDialog->setSkill(skillId,
RFIFOW(4 + k * 37 + 6),
- RFIFOW(4 + k * 37 + 36));
+ RFIFOB(4 + k * 37 + 36));
}
else {
skillDialog->addSkill(
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index ebacf761..064354cd 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -35,7 +35,7 @@
char *skill_db[] = {
// 0-99
- "", "Basic", "Sword", "", "HP regeneration", "", "", "", "", "MP regeneration",
+ "", "Basic", "Sword", "Two hand", "HP regeneration", "Bash", "Provoke", "Magnum", "Endure", "MP regeneration",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "MAX weight", "Discount", "Overcharge", "",
@@ -50,7 +50,7 @@ char *skill_db[] = {
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
- "", "", "First aid", "Play as dead", "", "", "", "", "", "",
+ "", "", "First aid", "Play as dead", "Moving recovery", "Fatal blow", "Auto berserk", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
@@ -66,26 +66,35 @@ SkillDialog::SkillDialog():
skillListBox = new ListBox(this);
skillScrollArea = new ScrollArea(skillListBox);
pointsLabel = new gcn::Label("Skill Points:");
- incButton = new Button(" Up ");
+ incButton = new Button("Up");
+ useButton = new Button("Use");
closeButton = new Button("Close");
skillListBox->setEventId("skill");
incButton->setEventId("inc");
+ useButton->setEventId("use");
closeButton->setEventId("close");
setContentSize(240, 240);
- skillScrollArea->setDimension(gcn::Rectangle(5, 5, 229, 180));
+ skillScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ skillScrollArea->setDimension(gcn::Rectangle(5, 5, 230, 180));
pointsLabel->setDimension(gcn::Rectangle(8, 190, 200, 16));
- incButton->setPosition(64, 210);
- closeButton->setPosition(160, 210);
+ incButton->setPosition(skillScrollArea->getX(), 210);
+ useButton->setPosition(incButton->getX() + incButton->getWidth() + 10,
+ 210);
+ closeButton->setPosition(
+ skillScrollArea->getX() + skillScrollArea->getWidth() - closeButton->getWidth(),
+ 210);
add(skillScrollArea);
add(pointsLabel);
add(incButton);
+ add(useButton);
add(closeButton);
skillListBox->addActionListener(this);
incButton->addActionListener(this);
+ useButton->addActionListener(this);
closeButton->addActionListener(this);
setLocationRelativeTo(getParent());
@@ -176,6 +185,7 @@ bool SkillDialog::hasSkill(int id)
void SkillDialog::addSkill(int id, int lv, int sp)
{
+ printf("%i\n", id);
SKILL *tmp = new SKILL();
tmp->id = id;
tmp->lv = lv;
diff --git a/src/gui/skill.h b/src/gui/skill.h
index e71af12a..a9111528 100644
--- a/src/gui/skill.h
+++ b/src/gui/skill.h
@@ -51,6 +51,7 @@ class SkillDialog : public Window, public gcn::ActionListener,
gcn::ScrollArea *skillScrollArea;
gcn::Label *pointsLabel;
gcn::Button *incButton;
+ gcn::Button *useButton;
gcn::Button *closeButton;
std::vector<SKILL*> skillList;