summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--The Mana World.dev70
-rw-r--r--docs/FAQ.txt29
-rw-r--r--src/gui/gui.cpp9
-rw-r--r--src/gui/setup.cpp8
-rw-r--r--src/gui/updatewindow.cpp10
-rw-r--r--src/gui/updatewindow.h10
-rw-r--r--src/main.cpp89
7 files changed, 141 insertions, 84 deletions
diff --git a/The Mana World.dev b/The Mana World.dev
index 942051e4..6deb34ac 100644
--- a/The Mana World.dev
+++ b/The Mana World.dev
@@ -1,7 +1,7 @@
[Project]
FileName=The Mana World.dev
Name=tmw
-UnitCount=141
+UnitCount=147
Type=0
Ver=1
ObjFiles=
@@ -12,7 +12,7 @@ ResourceIncludes=
MakeIncludes=
Compiler=-Dmain=SDL_main_@@_
CppCompiler=-funroll-loops_@@_-ffast-math_@@_-fomit-frame-pointer_@@_-pipe_@@_-DUSE_OPENGL_@@_
-Linker=-lguichan_@@_-lguichan_sdl_@@_-lguichan_opengl_@@_-lwsock32_@@_-lSDL_image_@@_-lSDL_mixer_@@_-lmingw32_@@_-lSDLmain_@@_-lSDL_@@_-llibxml2_@@_-lopengl32_@@_-lz_@@_-lphysfs_@@_
+Linker=-lguichan_@@_-lguichan_sdl_@@_-lguichan_opengl_@@_-lwsock32_@@_-lSDL_image_@@_-lSDL_mixer_@@_-lmingw32_@@_-lSDLmain_@@_-lSDL_@@_-llibxml2_@@_-lopengl32_@@_-lz_@@_-lphysfs_@@_-lcurldll_@@_
IsCpp=1
Icon=The Mana World.ico
ExeOutput=
@@ -32,19 +32,19 @@ CompilerSettings=0010001001001001001101
[VersionInfo]
Major=0
Minor=0
-Release=12
+Release=14
Build=0
LanguageID=1033
CharsetID=1252
CompanyName=The Mana World Development Team
-FileVersion=0.0.12
+FileVersion=0.0.14
FileDescription=The Mana World
InternalName=tmw.exe
LegalCopyright=2004-2005 (C)
LegalTrademarks=
OriginalFilename=tmw.exe
ProductName=The Mana World MMORPG
-ProductVersion=0.0.12
+ProductVersion=0.0.14
AutoIncBuildNr=0
[Unit8]
@@ -1467,3 +1467,63 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
+[Unit142]
+FileName=src\gui\updatewindow.h
+CompileCpp=1
+Folder=gui
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit143]
+FileName=src\gui\updatewindow.cpp
+CompileCpp=1
+Folder=gui
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit144]
+FileName=src\gui\vbox.cpp
+CompileCpp=1
+Folder=gui
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit145]
+FileName=src\gui\vbox.h
+CompileCpp=1
+Folder=gui
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit146]
+FileName=src\gui\box.cpp
+CompileCpp=1
+Folder=gui
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit147]
+FileName=src\gui\box.h
+CompileCpp=1
+Folder=gui
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
diff --git a/docs/FAQ.txt b/docs/FAQ.txt
index 5389b322..2457d364 100644
--- a/docs/FAQ.txt
+++ b/docs/FAQ.txt
@@ -15,18 +15,7 @@ A: The fastest way is to come on our IRC channel. There you can find a lot of
it will help to get more players. Ok you think forums are evil? Don't worry,
send me an e-mail at umperio@users.sourceforge.net and you're done. That's
not enough? No, I won't give you my phone number! ;P
-
-
-CVS
-
-Q: What's CVS?
-
-A: It's a system where is stored the latest development version. It's not
- assured that it's stable, but surely it has the latest updates. (CVS version
- is updated quite frequently). If you want to check it out, read this guide
- http://themanaworld.sourceforge.net/cvs-tutorial.txt
-
-
+
GAME
Q: I always get "Unregistered ID" error message, why?
@@ -64,14 +53,22 @@ A: Check your inventory, if you've got lots of stuff probably you're
overweight, try to give away some of them.
+CVS
+
+Q: What's CVS?
+
+A: It's a system where is stored the latest development version. It's not
+ assured that it's stable, but surely it has the latest updates. (CVS version
+ is updated quite frequently). If you want to check it out, read this guide
+ http://themanaworld.sourceforge.net/cvs-tutorial.txt
+
+
DEVELOPMENT
Q: When will the next version be released?
-A: Really don't know. Usually a newer version comes out in a month, but that's
- not for sure. You can try asking the devs on IRC for further infos, you can
- try the latest CVS version or the latest CVS daily snaphost. These are no
- stable releases but are updated freuqently or even on a daily basis.
+A: We have scheduled releases. Usually a new release is available every month.
+ Check http://wiki.themanaworld.org/index.php/Roadmap for further infos.
Q: How can I contribute?
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index a6f9ad4b..8569f2cb 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -82,17 +82,10 @@ Gui::Gui(Graphics *graphics)
// Set global font
try {
guiFont = new gcn::ImageFont(
- TMW_DATADIR "data/graphics/gui/fixedfont.png",
+ "data/graphics/gui/fixedfont.png",
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567"
"89:@!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`ψε"
);
- /*
- guiFont = new gcn::ImageFont(
- TMW_DATADIR "data/graphics/gui/rpgfont.png",
- " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567"
- "89_,!?-+/():;%&`'*#=[]\""
- );
- */
}
catch (gcn::Exception e)
{
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index a01e804f..b839c459 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -215,12 +215,12 @@ void Setup::action(const std::string &eventId)
displayFlags &= ~SDL_FULLSCREEN;
changed = true;
}
-
+
if(changed) {
displayFlags |= SDL_DOUBLEBUF;
if (useOpenGL) {
- displayFlags |= SDL_OPENGL;
- SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+ //displayFlags |= SDL_OPENGL;
+ //SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
}
screen = SDL_SetVideoMode(screenW, screenH, bitDepth, displayFlags);
@@ -228,7 +228,7 @@ void Setup::action(const std::string &eventId)
std::cerr << "Couldn't set " << screenW << "x" <<
screenH << "x" << bitDepth << " video mode: " <<
SDL_GetError() << std::endl;
- exit(1);
+ exit(1);
}
}
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index 813e6254..b037103b 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -24,7 +24,7 @@
#include "updatewindow.h"
#include <sstream>
-UpdateWindow::UpdateWindow()
+UpdaterWindow::UpdaterWindow()
: Window("Updating")
{
setContentSize(320, 96);
@@ -42,24 +42,24 @@ UpdateWindow::UpdateWindow()
add(vbox);
}
-UpdateWindow::~UpdateWindow()
+UpdaterWindow::~UpdaterWindow()
{
delete label;
delete progressBar;
delete vbox;
}
-void UpdateWindow::setProgress(double p)
+void UpdaterWindow::setProgress(double p)
{
progress = p;
}
-void UpdateWindow::setLabel(const std::string &str)
+void UpdaterWindow::setLabel(const std::string &str)
{
labelText = str;
}
-void UpdateWindow::draw(gcn::Graphics *graphics)
+void UpdaterWindow::draw(gcn::Graphics *graphics)
{
std::stringstream ss;
ss << labelText << " (" << progress * 100 << "%)";
diff --git a/src/gui/updatewindow.h b/src/gui/updatewindow.h
index 94b1ca8f..8432b65e 100644
--- a/src/gui/updatewindow.h
+++ b/src/gui/updatewindow.h
@@ -21,8 +21,8 @@
* $Id$
*/
-#ifndef _UPDATEWINDOW_H
-#define _UPDATEWINDOW_H
+#ifndef _UPDATERWINDOW_H
+#define _UPDATERWINDOW_H
#include "gui.h"
#include "window.h"
@@ -34,7 +34,7 @@
*
* \ingroup GUI
*/
-class UpdateWindow : public Window
+class UpdaterWindow : public Window
{
protected:
std::string labelText; /**< Text for caption label */
@@ -48,12 +48,12 @@ class UpdateWindow : public Window
/**
* Constructor
*/
- UpdateWindow();
+ UpdaterWindow();
/**
* Destructor
*/
- ~UpdateWindow();
+ ~UpdaterWindow();
/**
* Set's progress bar status
diff --git a/src/main.cpp b/src/main.cpp
index aa7e6b19..1704b409 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -24,7 +24,6 @@
#include "main.h"
#include "gui/char_server.h"
#include "gui/char_select.h"
-#include "gui/inventory.h"
#include "gui/ok_dialog.h"
#include "gui/updatewindow.h"
#include "sound.h"
@@ -82,7 +81,7 @@ Configuration config; /**< Xml file configuration reader */
Logger *logger; /**< Log object */
ItemManager *itemDb; /**< Item database object */
-UpdateWindow *updateWindow; /**< Update window */
+UpdaterWindow *updaterWindow; /**< Update window */
/**
* Allows the next frame to be drawn (part of framerate limiting)
@@ -343,7 +342,7 @@ progressCallback(void *clientp, double dltotal, double dlnow,
double utotal, double ulnow)
{
// update progress bar..
- updateWindow->setProgress(dlnow / dltotal);
+ updaterWindow->setProgress(dlnow / dltotal);
// draw
gui->logic();
@@ -386,32 +385,36 @@ int download(const char *location)
return false;
}
- std::cout << "Downloading '" << location << "'";
+ std::cout << "Downloading '" << location << "'" << std::endl;
// init curl
curl_global_init(CURL_GLOBAL_ALL);
-
// download file
CURL *curl = curl_easy_init();
+
curl_easy_setopt(curl, CURLOPT_URL, location);
- curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false);
- curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progressCallback);
- curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL);
- curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
- int ret = curl_easy_perform(curl);
+ //curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false);
+ //curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progressCallback);
+ //curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL);
+
+ //curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
+
+ //int ret = curl_easy_perform(curl);
+
curl_easy_cleanup(curl);
+
// cleanup curl
curl_global_cleanup();
fclose(fp);
- if (ret != 0) {
- std::cout << " failed";
- }
- std::cout << " (" << ret << ")" << std::endl;
+ //if (ret != 0)
+ std::cout << "Failed!" << std::endl;
+ //std::cout << " (" << ret << ")" << std::endl;
- return (ret == CURLE_OK) ? true : false;
+ //return (ret == CURLE_OK) ? true : false;
+ return true;
}
/** Check to see if a file exists */
@@ -419,9 +422,11 @@ int exists(const std::string &file)
{
FILE *fp = NULL;
fp = fopen(file.c_str(), "r");
- if (!fp) {
+ if (!fp)
+ {
return false;
- } else {
+ }
+ else {
fclose(fp);
return true;
}
@@ -430,7 +435,7 @@ int exists(const std::string &file)
/** Update the game data */
void update()
{
- updateWindow = new UpdateWindow();
+ updaterWindow = new UpdaterWindow();
std::string host =
config.getValue("updatehost", "http://themanaworld.org/");
@@ -445,32 +450,36 @@ void update()
fullLocation += "resources.txt";
std::string fullName = homeDir;
- fullName += "/";
+ //fullName += "/";
fullName += "resources.txt";
- updateWindow->setLabel(fullLocation);
+ updaterWindow->setLabel(fullLocation);
- // get resources file
- if (!download(fullLocation.c_str())) {
- std::cout << "Error downloading" << std::endl;
- delete updateWindow;
+ // Get resources file
+ if (!download(fullLocation.c_str()))
+ {
+ std::cout << "Error downloading resources.txt" << std::endl;
+ delete updaterWindow;
return;
}
std::cout << "Opening " << fullName << std::endl;
-
- std::ifstream in(fullName.c_str());
- if (!in.is_open()) {
+
+ std::ifstream *in;
+
+ in = new std::ifstream(fullName.c_str());
+ if (in!=NULL && !in->is_open())
+ {
std::cout << "Error opening" << std::endl;
- delete updateWindow;
+ delete updaterWindow;
return;
}
std::string line;
- while (!in.eof())
+ while (!in->eof())
{
- getline(in, line);
+ getline(*in, line);
// check for XML tag (if it is XML tag it is error)
if (line[0] == '<') {
@@ -481,26 +490,24 @@ void update()
fullName = homeDir;
fullName += "/";
fullName += line;
-
+
fullLocation = host;
- fullLocation += line;
-
- updateWindow->setLabel(fullLocation);
-
+ fullLocation += line;
+
+ updaterWindow->setLabel(fullLocation);
+
if (!exists(fullName)) {
if (!download(fullLocation.c_str())) {
std::cout << "Failed to download " << line << std::endl;
}
}
- if (exists(fullName)) {
+ else {
PHYSFS_addToSearchPath(fullName.c_str(), 1);
}
}
-
- in.close();
-
- guiTop->remove(updateWindow);
- delete updateWindow;
+ in->close();
+ guiTop->remove(updaterWindow);
+ delete updaterWindow;
}
/** Main */