summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2006-02-02 11:01:12 +0000
committerpixel <pixel>2006-02-02 11:01:12 +0000
commitd05884755c37c131b610c6ce1aef2201d99a10f5 (patch)
treea3f87af1b0d234748b7a65530e3b7718f78ec294
parent6c6c434f6cc79aa3b9f01d8d5d7b2d538ee68942 (diff)
Fixing old Dalos, and fixing Linux compilation.
-rw-r--r--Dalos/Console.cc4
-rw-r--r--Dalos/Console.h6
-rw-r--r--Dalos/Dalos.cc6
-rw-r--r--Dalos/Hexview.cc8
-rw-r--r--Dalos/Hexview.h4
-rw-r--r--compile/linux/Makefile33
6 files changed, 31 insertions, 30 deletions
diff --git a/Dalos/Console.cc b/Dalos/Console.cc
index b15c4bf..972349f 100644
--- a/Dalos/Console.cc
+++ b/Dalos/Console.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Console.cc,v 1.6 2005-12-01 13:15:16 pixel Exp $ */
+/* $Id: Console.cc,v 1.7 2006-02-02 11:01:12 pixel Exp $ */
#include <SDL.h>
#include <SDL_thread.h>
@@ -218,7 +218,7 @@ console::console(mogltk::shape * sh, mogltk::widget * father, int y, int _nlines
SetVisible(false);
}
-console::~console() {
+console::~console() throw (GeneralException) {
SDL_DestroyMutex(protect_add_line);
}
diff --git a/Dalos/Console.h b/Dalos/Console.h
index df66e09..e818aba 100644
--- a/Dalos/Console.h
+++ b/Dalos/Console.h
@@ -17,13 +17,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Console.h,v 1.5 2005-11-05 14:36:11 pixel Exp $ */
+/* $Id: Console.h,v 1.6 2006-02-02 11:01:12 pixel Exp $ */
#ifndef __CONSOLE_H__
#define __CONSOLE_H__
#include <SDL.h>
-#include <SDL_Thread.h>
+#include <SDL_thread.h>
#include <Buffer.h>
@@ -38,7 +38,7 @@ class console : public mogltk::widget {
virtual void up(SDL_keysym k);
};
console(mogltk::shape * sh, mogltk::widget * father, int y, int _nlines);
- virtual ~console();
+ virtual ~console() throw (GeneralException);
void add_line(const String & s);
void page_reset();
void page_up();
diff --git a/Dalos/Dalos.cc b/Dalos/Dalos.cc
index df2a5a6..673e7a4 100644
--- a/Dalos/Dalos.cc
+++ b/Dalos/Dalos.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Dalos.cc,v 1.22 2006-01-31 17:02:38 pixel Exp $ */
+/* $Id: Dalos.cc,v 1.23 2006-02-02 11:01:12 pixel Exp $ */
#include <SDL.h>
#include <SDL_thread.h>
@@ -287,7 +287,7 @@ class quit : public mogltk::widgets::action {
class about : public mogltk::widgets::action {
public:
virtual void do_action(mogltk::widget * w) {
- new mogltk::widgets::MsgBox(w->Shaper(), w->Father(), "About...",
+ new mogltk::widgets::MsgBox(0, w->Shaper(), w->Father(), "About...",
"Dalos version 0.1 - OpenGL version\n"
"Copyright (C) 2004-2005 Nicolas \"Pixel\" Noble\n"
"\n"
@@ -311,7 +311,7 @@ virtual int startup() throw (GeneralException) {
}
mogltk::widgets::ContextMenu * c;
-#ifdef _DEBUG
+#if 1
mogltk::base * gl = new mogltk::glbase();
#else
mogltk::base * gl = new mogltk::glbase(800, 600, SDL_FULLSCREEN);
diff --git a/Dalos/Hexview.cc b/Dalos/Hexview.cc
index b5f43ae..bc45d9d 100644
--- a/Dalos/Hexview.cc
+++ b/Dalos/Hexview.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Hexview.cc,v 1.4 2005-11-05 14:36:11 pixel Exp $ */
+/* $Id: Hexview.cc,v 1.5 2006-02-02 11:01:12 pixel Exp $ */
#include <SDL.h>
@@ -86,7 +86,7 @@ hexview::hexview(mogltk::shape * sh, mogltk::widget * father) :
nlines = GetH() / 13; CurrentHexview = this;
}
-hexview::~hexview() {
+hexview::~hexview() throw (GeneralException) {
free(data);
CurrentHexview = 0;
}
@@ -178,7 +178,7 @@ void hexview::draw() {
mogltk::FixedFont->setcolor(WHITE);
mogltk::FixedFont->putcursor(GetAX() - shift * 6, GetAY());
- max_o = min(h->GetSize(), offset + nlines * width);
+ max_o = MIN(h->GetSize(), offset + nlines * width);
for (i = start_o = offset, j = 0, l = 0; i < max_o; i++) {
if ((j % width) == 0) {
@@ -205,4 +205,4 @@ void hexview::resize_notify() {
resize(Father()->GetW(), Father()->GetH());
}
-hexview * CurrentHexview; \ No newline at end of file
+hexview * CurrentHexview;
diff --git a/Dalos/Hexview.h b/Dalos/Hexview.h
index ea7209c..4bee1f8 100644
--- a/Dalos/Hexview.h
+++ b/Dalos/Hexview.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Hexview.h,v 1.4 2005-11-05 14:36:11 pixel Exp $ */
+/* $Id: Hexview.h,v 1.5 2006-02-02 11:01:12 pixel Exp $ */
#ifndef __HEXVIEW_H__
#define __HEXVIEW_H__
@@ -33,7 +33,7 @@ class hexview : public mogltk::widget {
virtual void up(SDL_keysym k);
};
hexview(mogltk::shape * sh, mogltk::widget * father);
- virtual ~hexview();
+ virtual ~hexview() throw (GeneralException);
void set_virtual_base(int _virtual_base);
int get_nlines();
int get_size();
diff --git a/compile/linux/Makefile b/compile/linux/Makefile
index 9aae0c7..a518356 100644
--- a/compile/linux/Makefile
+++ b/compile/linux/Makefile
@@ -17,8 +17,8 @@ INCLUDES = \
-I../../includes -I../../psxdev -I../../generic/include \
-I../../generic/lib/zlib/include \
-I../../generic/lib/lua/include -I../../generic/lib/lua/includes \
--I../../mogltk/include \
--I../..
+-I../../mogltk/include -I../../Dalos \
+-I../.. `sdl-config --cflags`
CPPFLAGS += $(INCLUDES) -O4 -DSTDC_HEADERS -DREADLINE_STATIC -DHAVE_UNISTD_H -fexceptions `sdl-config --cflags` -DWORDS_LITTLEENDIAN -fexceptions
@@ -29,18 +29,19 @@ vpath %.c ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../../
vpath %.cc ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../../psxdev:../../generic/lib/zlib/src:../../generic/lib/lua/src:../../generic/lib/lua/src/LuaLib
vpath %.cpp ../../Dalos:../../:../../mogltk/lib:../../generic/lib:../../lib:../../psxdev:../../generic/lib/zlib/src:../../generic/lib/lua/src:../../generic/lib/lua/src/LuaLib
-SOURCES = \
-cd-tool.cpp
-#Dalos.cpp
+CD_TOOL_SOURCES = cd-tool.cpp
-MOGLTK_SOURCES =
-#base.cc glwidgets.cc \
-#engine.cc mcolor.cc \
-#font.cc shape.cc \
-#glbase.cc sprite.cc \
-#glfont.cc texture.cc \
-#glshape.cc widgets.cc \
-#glsprite.cc
+DALOS_SOURCES = Dalos.cc Console.cc Hexview.cc
+
+MOGLTK_SOURCES = \
+base.cc glwidgets.cc \
+engine.cc mcolor.cc \
+font.cc shape.cc \
+glbase.cc sprite.cc \
+glfont.cc texture.cc \
+glshape.cc widgets.cc \
+glsprite.cc contextmenu.cc \
+inputtext.cc
BALTISOT_SOURCES = \
Image.cc Main.cc \
@@ -105,14 +106,14 @@ $(BALTISOT_SOURCES) $(ZLIB_SOURCES) $(REGEX_SOURCES) $(GETOPT_SOURCES) \
$(LUA_SOURCES) $(PSX_SOURCES) $(PSXDEV_SOURCES) $(READLINE_SOURCES) \
$(HASH_SOURCES)
-WHOLE_SOURCES = $(SOURCES) $(COMMON_SOURCES) $(MOGLTK_SOURCES)
+WHOLE_SOURCES = $(CD_TOOL_SOURCES) $(DALOS_SOURCES) $(COMMON_SOURCES) $(MOGLTK_SOURCES)
ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(WHOLE_SOURCES))))
ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES))))
-DALOS_OBJECTS = $(addsuffix .o, $(notdir $(basename $(COMMON_SOURCES) $(MOGLTK_SOURCES)))) Dalos.o
+DALOS_OBJECTS = $(addsuffix .o, $(notdir $(basename $(COMMON_SOURCES) $(MOGLTK_SOURCES) $(DALOS_SOURCES))))
-CD_TOOL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(COMMON_SOURCES)))) cd-tool.o
+CD_TOOL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(COMMON_SOURCES) $(CD_TOOL_SOURCES))))
all: dep cd-tool cd-tool-static