? autom4te.cache ? Documentation/Examples/AlphaTest/Intermediate ? Documentation/Examples/AlphaTest/alphatest ? Documentation/Examples/Font/Intermediate ? Documentation/Examples/Font/font ? Documentation/Examples/GUIEditor/Intermediate ? Documentation/Examples/JPEG/jpegtest ? Documentation/Examples/Minimum/Intermediate ? Documentation/Examples/Minimum/minimum ? Documentation/Examples/Mouse/Intermediate ? Documentation/Examples/Mouse/core.3109 ? Documentation/Examples/Mouse/mouse ? Documentation/Examples/Mouse/mousesignal Index: configure.in =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/configure.in,v retrieving revision 1.117 diff -u -r1.117 configure.in --- configure.in 5 Aug 2002 18:00:03 -0000 1.117 +++ configure.in 1 Jul 2003 19:23:41 -0000 @@ -578,7 +578,7 @@ comp_mode="-DDEBUG=1 -g3 -ggdb3 -O0" AC_MSG_RESULT([enabled]) else - comp_mode="-O2" + comp_mode="" AC_MSG_RESULT([*********** <-- DISABLED --> ***********]) fi ], Index: Documentation/Examples/Mouse/mouse.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Documentation/Examples/Mouse/mouse.cpp,v retrieving revision 1.13 diff -u -r1.13 mouse.cpp --- Documentation/Examples/Mouse/mouse.cpp 28 Feb 2002 13:38:52 -0000 1.13 +++ Documentation/Examples/Mouse/mouse.cpp 1 Jul 2003 19:23:42 -0000 @@ -46,6 +46,9 @@ // Flip front and backbuffer - this makes the changes visible CL_Display::flip_display(); + + if (CL_Keyboard::get_keycode (CL_KEY_SPACE)) + CL_Mouse::set_position (-160, 100); CL_System::sleep(10); Index: Sources/API/Core/Math/cl_vector.h =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/API/Core/Math/cl_vector.h,v retrieving revision 1.10 diff -u -r1.10 cl_vector.h --- Sources/API/Core/Math/cl_vector.h 8 Jun 2002 20:50:33 -0000 1.10 +++ Sources/API/Core/Math/cl_vector.h 1 Jul 2003 19:23:44 -0000 @@ -127,9 +127,9 @@ float& operator [] (int n); //: cout's the x,y,z ordinates (meant for debugging) - friend std::ostream& operator << (std::ostream&, const CL_Vector& v); + friend std::ostream& operator << (std::ostream&, CL_Vector& v); }; -std::ostream& operator << (std::ostream& os, const CL_Vector& v); +std::ostream& operator << (std::ostream& os, CL_Vector& v); #endif Index: Sources/API/Display/Input/key.h =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/API/Display/Input/key.h,v retrieving revision 1.11 diff -u -r1.11 key.h --- Sources/API/Display/Input/key.h 18 Oct 2001 09:23:04 -0000 1.11 +++ Sources/API/Display/Input/key.h 1 Jul 2003 19:23:44 -0000 @@ -40,7 +40,7 @@ CL_KEY_INSERT, CL_KEY_DELETE, CL_KEY_HOME, CL_KEY_END, CL_KEY_PAGEUP, CL_KEY_PAGEDOWN, CL_KEY_CAPSLOCK, CL_KEY_NUMLOCK, CL_KEY_SCRLOCK, CL_KEY_PRINT, CL_KEY_PAUSE, CL_KEY_KP_DIV, CL_KEY_KP_MULT, - CL_KEY_KP_MINUS, CL_KEY_KP_PLUS, CL_KEY_KP_ENTER, + CL_KEY_KP_MINUS, CL_KEY_KP_PLUS, CL_KEY_KP_ENTER, CL_KEY_GRAVE, CL_KEY_KP_DECIMAL, CL_KEY_KP_0, CL_KEY_KP_1, CL_KEY_KP_2, CL_KEY_KP_3, CL_KEY_KP_4, Index: Sources/API/Display/SurfaceProviders/canvas.h =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/API/Display/SurfaceProviders/canvas.h,v retrieving revision 1.9 diff -u -r1.9 canvas.h --- Sources/API/Display/SurfaceProviders/canvas.h 13 Jun 2002 15:01:55 -0000 1.9 +++ Sources/API/Display/SurfaceProviders/canvas.h 1 Jul 2003 19:23:45 -0000 @@ -64,10 +64,17 @@ int width, int height, int no_sprs = 1, +#ifdef USE_BIG_ENDIAN + int red_mask = 0x000000ff, + int green_mask = 0x0000ff00, + int blue_mask = 0x00ff0000, + int alpha_mask = 0xff000000, +#else int red_mask = 0xff000000, int green_mask = 0x00ff0000, int blue_mask = 0x0000ff00, int alpha_mask = 0x000000ff, +#endif bool use_transcol = false, unsigned int transcol = 0) { @@ -99,10 +106,17 @@ int width, int height, int no_sprs = 1, +#ifdef USE_BIG_ENDIAN + int red_mask = 0x000000ff, + int green_mask = 0x0000ff00, + int blue_mask = 0x00ff0000, + int alpha_mask = 0xff000000, +#else int red_mask = 0xff000000, int green_mask = 0x00ff0000, int blue_mask = 0x0000ff00, int alpha_mask = 0x000000ff, +#endif bool use_transcol = false, unsigned int transcol = 0) { Index: Sources/Core/Math/cl_vector.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/Core/Math/cl_vector.cpp,v retrieving revision 1.14 diff -u -r1.14 cl_vector.cpp --- Sources/Core/Math/cl_vector.cpp 8 Jun 2002 20:50:33 -0000 1.14 +++ Sources/Core/Math/cl_vector.cpp 1 Jul 2003 19:23:46 -0000 @@ -207,7 +207,7 @@ return x; // dummy } -std::ostream& operator << (std::ostream& os, const CL_Vector& v) +std::ostream& operator << (std::ostream& os, CL_Vector& v) { os << v.x << " " << v.y << " " << v.z; return os; Index: Sources/Display/Input/X11/keyboard_x11.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/Display/Input/X11/keyboard_x11.cpp,v retrieving revision 1.18 diff -u -r1.18 keyboard_x11.cpp --- Sources/Display/Input/X11/keyboard_x11.cpp 2 Mar 2002 16:43:48 -0000 1.18 +++ Sources/Display/Input/X11/keyboard_x11.cpp 1 Jul 2003 19:23:47 -0000 @@ -197,6 +197,7 @@ // case XK_Clear: return CL_KEY_CLEAR; case XK_Return: return CL_KEY_ENTER; case XK_Pause: return CL_KEY_PAUSE; + case XK_grave: return CL_KEY_GRAVE; // case XK_Scroll_Lock: return CL_KEY_SCROLL; case XK_Escape: return CL_KEY_ESCAPE; case XK_Delete: return CL_KEY_DELETE; @@ -376,6 +377,7 @@ case CL_KEY_SCRLOCK: return 78; case CL_KEY_PRINT: return 111; case CL_KEY_PAUSE: return 110; + case CL_KEY_GRAVE: return XK_grave; case CL_KEY_KP_DIV: return 112; case CL_KEY_KP_MULT: return 63; case CL_KEY_KP_MINUS: return 82; Index: Sources/Display/Input/X11/mouse_x11.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/Display/Input/X11/mouse_x11.cpp,v retrieving revision 1.11 diff -u -r1.11 mouse_x11.cpp --- Sources/Display/Input/X11/mouse_x11.cpp 17 May 2002 08:47:58 -0000 1.11 +++ Sources/Display/Input/X11/mouse_x11.cpp 1 Jul 2003 19:23:48 -0000 @@ -54,6 +54,8 @@ for (int i=0; ix, cursor->y)); + else if (event.xbutton.button == 5) + CL_Mouse::sig_button_press()(CL_Key(CL_MOUSE_WHEELDOWN, CL_Key::Pressed, -1, cursor->x, cursor->y)); + } + break; + case ButtonRelease: + if (event.xbutton.button == 4) + CL_Mouse::sig_button_release()(CL_Key(CL_MOUSE_WHEELUP, CL_Key::Released, -1, cursor->x, cursor->y)); + else if (event.xbutton.button == 5) + CL_Mouse::sig_button_release()(CL_Key(CL_MOUSE_WHEELDOWN, CL_Key::Released, -1, cursor->x, cursor->y)); + break; + } } CL_InputDevice::InputDeviceType CL_Mouse_XWin::get_type() const Index: Sources/Display/Input/X11/mouse_x11.h =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/Display/Input/X11/mouse_x11.h,v retrieving revision 1.3 diff -u -r1.3 mouse_x11.h --- Sources/Display/Input/X11/mouse_x11.h 17 May 2002 08:47:59 -0000 1.3 +++ Sources/Display/Input/X11/mouse_x11.h 1 Jul 2003 19:23:48 -0000 @@ -78,6 +78,7 @@ CL_InputButton_Mouse_XWin **buttons; CL_InputCursor_Mouse_XWin *cursor; CL_InputAxis_Mouse_XWin *axes; + CL_Slot on_xevent_slot; public: CL_Mouse_XWin(CL_XWindow_CompatibleCard *card); @@ -100,6 +101,8 @@ virtual CL_InputCursor *get_cursor(int cursor_num); virtual void keep_alive(); + + void on_xevent(XEvent&); }; #endif /* USE_X11 */ Index: Sources/GUI/window_default.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/GUI/window_default.cpp,v retrieving revision 1.31 diff -u -r1.31 window_default.cpp --- Sources/GUI/window_default.cpp 16 Jan 2002 19:50:41 -0000 1.31 +++ Sources/GUI/window_default.cpp 1 Jul 2003 19:23:49 -0000 @@ -42,15 +42,15 @@ */ // Create a close button on the titlebar CL_Rect rect(window->get_width() - 19, 3, window->get_width() - 3, 19); - button_close = new CL_Button(rect, "X", window, style); + // button_close = new CL_Button(rect, "X", window, style); - slot_close = button_close->sig_clicked().connect(this, &CL_Window_Default::on_close); + //slot_close = button_close->sig_clicked().connect(this, &CL_Window_Default::on_close); slot_paint = window->sig_paint().connect(this, &CL_Window_Default::on_paint); slot_resize = window->sig_resize().connect(this, &CL_Window_Default::on_resize); // Move close button on window resize - layout.add_resize_position(button_close, CL_LayoutManager::x1, window, CL_LayoutManager::x2); - layout.add_resize_position(button_close, CL_LayoutManager::x2, window, CL_LayoutManager::x2); + // layout.add_resize_position(button_close, CL_LayoutManager::x1, window, CL_LayoutManager::x2); + // layout.add_resize_position(button_close, CL_LayoutManager::x2, window, CL_LayoutManager::x2); // Resize client area on window resize CL_Component *client_area = window->get_client_area(); @@ -65,7 +65,7 @@ delete font_disabled; // delete resize_handler; delete move_handler; - delete button_close; + // delete button_close; } void CL_Window_Default::on_paint() Index: Sources/GUI/window_default.h =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/GUI/window_default.h,v retrieving revision 1.14 diff -u -r1.14 window_default.h --- Sources/GUI/window_default.h 28 Dec 2001 22:41:50 -0000 1.14 +++ Sources/GUI/window_default.h 1 Jul 2003 19:23:49 -0000 @@ -40,7 +40,7 @@ void on_resize(int old_width, int old_height); CL_Window *window; - CL_Button *button_close; + // CL_Button *button_close; CL_ComponentMoveHandler *move_handler; CL_ComponentResizeHandler *resize_handler; Index: Sources/JPEG/provider_jpeg.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/JPEG/provider_jpeg.cpp,v retrieving revision 1.10 diff -u -r1.10 provider_jpeg.cpp --- Sources/JPEG/provider_jpeg.cpp 22 Jan 2002 10:29:33 -0000 1.10 +++ Sources/JPEG/provider_jpeg.cpp 1 Jul 2003 19:23:49 -0000 @@ -17,6 +17,7 @@ #include "API/JPEG/provider_jpeg.h" #include "provider_jpeg_generic.h" #include "API/Display/Display/surface.h" +#include "API/Core/IOData/cl_endian.h" #include "API/Display/Display/res_surface.h" CL_Surface *CL_JPEGProvider::create( Index: Sources/JPEG/provider_jpeg_generic.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/JPEG/provider_jpeg_generic.cpp,v retrieving revision 1.6 diff -u -r1.6 provider_jpeg_generic.cpp --- Sources/JPEG/provider_jpeg_generic.cpp 1 Nov 2001 13:56:51 -0000 1.6 +++ Sources/JPEG/provider_jpeg_generic.cpp 1 Jul 2003 19:23:50 -0000 @@ -120,12 +120,24 @@ { jpeg_read_scanlines(&cinfo, buffer, 1); - for(unsigned int i=0; i < get_pitch(); i += 3) - { - image[pitch * (cinfo.output_scanline - 1) + i + 0] = buffer[0][i + 2]; - image[pitch * (cinfo.output_scanline - 1) + i + 1] = buffer[0][i + 1]; - image[pitch * (cinfo.output_scanline - 1) + i + 2] = buffer[0][i + 0]; - } + if (CL_Endian::is_system_big()) + { + for(unsigned int i=0; i < get_pitch(); i += 3) + { + image[pitch * (cinfo.output_scanline - 1) + i + 2] = buffer[0][i + 2]; + image[pitch * (cinfo.output_scanline - 1) + i + 1] = buffer[0][i + 1]; + image[pitch * (cinfo.output_scanline - 1) + i + 0] = buffer[0][i + 0]; + } + } + else + { + for(unsigned int i=0; i < get_pitch(); i += 3) + { + image[pitch * (cinfo.output_scanline - 1) + i + 0] = buffer[0][i + 2]; + image[pitch * (cinfo.output_scanline - 1) + i + 1] = buffer[0][i + 1]; + image[pitch * (cinfo.output_scanline - 1) + i + 2] = buffer[0][i + 0]; + } + } } } // Greyscale Image @@ -135,12 +147,24 @@ { jpeg_read_scanlines(&cinfo, buffer, 1); - for(int i=0; i < width; i += 1) - { - image[pitch * (cinfo.output_scanline - 1) + 3*i + 0] = buffer[0][i]; - image[pitch * (cinfo.output_scanline - 1) + 3*i + 1] = buffer[0][i]; - image[pitch * (cinfo.output_scanline - 1) + 3*i + 2] = buffer[0][i]; - } + if (CL_Endian::is_system_big()) + { + for(int i=0; i < width; i += 1) + { + image[pitch * (cinfo.output_scanline - 1) + 3*i + 2] = buffer[0][i]; + image[pitch * (cinfo.output_scanline - 1) + 3*i + 1] = buffer[0][i]; + image[pitch * (cinfo.output_scanline - 1) + 3*i + 0] = buffer[0][i]; + } + } + else + { + for(int i=0; i < width; i += 1) + { + image[pitch * (cinfo.output_scanline - 1) + 3*i + 0] = buffer[0][i]; + image[pitch * (cinfo.output_scanline - 1) + 3*i + 1] = buffer[0][i]; + image[pitch * (cinfo.output_scanline - 1) + 3*i + 2] = buffer[0][i]; + } + } } } else Index: Sources/PNG/provider_png.cpp =================================================================== RCS file: /var/lib/cvs/Libs/ClanLib-0.6/Sources/PNG/provider_png.cpp,v retrieving revision 1.29 diff -u -r1.29 provider_png.cpp --- Sources/PNG/provider_png.cpp 23 Mar 2002 07:09:26 -0000 1.29 +++ Sources/PNG/provider_png.cpp 1 Jul 2003 19:23:51 -0000 @@ -26,6 +26,7 @@ #include "API/Display/Display/res_surface.h" #include "API/Core/Resources/resourceoptions.h" #include "API/Core/System/error.h" +#include "API/Core/IOData/cl_endian.h" #include "API/PNG/provider_png.h" // Workaround for a VC bug @@ -220,23 +221,49 @@ if (!ignore_alphachannel) { - for (int i = 0; i < pitch * height; i += 4) - { - image[i + 0] = tmp_image[i + 3]; - image[i + 1] = tmp_image[i + 2]; - image[i + 2] = tmp_image[i + 1]; - image[i + 3] = tmp_image[i + 0]; - } + if (CL_Endian::is_system_big()) + { + for (int i = 0; i < pitch * height; i += 4) + { + image[i + 3] = tmp_image[i + 3]; + image[i + 2] = tmp_image[i + 2]; + image[i + 1] = tmp_image[i + 1]; + image[i + 0] = tmp_image[i + 0]; + } + } + else + { + for (int i = 0; i < pitch * height; i += 4) + { + image[i + 0] = tmp_image[i + 3]; + image[i + 1] = tmp_image[i + 2]; + image[i + 2] = tmp_image[i + 1]; + image[i + 3] = tmp_image[i + 0]; + } + } } else { - for (int i = 0; i < pitch * height; i += 4) - { - image[i + 0] = 255; - image[i + 1] = tmp_image[i + 2]; - image[i + 2] = tmp_image[i + 1]; - image[i + 3] = tmp_image[i + 0]; - } + if (CL_Endian::is_system_big()) + { + for (int i = 0; i < pitch * height; i += 4) + { + image[i + 3] = 255; + image[i + 2] = tmp_image[i + 2]; + image[i + 1] = tmp_image[i + 1]; + image[i + 0] = tmp_image[i + 0]; + } + } + else + { + for (int i = 0; i < pitch * height; i += 4) + { + image[i + 0] = 255; + image[i + 1] = tmp_image[i + 2]; + image[i + 2] = tmp_image[i + 1]; + image[i + 3] = tmp_image[i + 0]; + } + } } delete[] tmp_image; @@ -265,13 +292,26 @@ delete[] row_pointers; image = new unsigned char[height * pitch]; - // Coverting the data in the tmp buffer to our final data - for (int i = 0; i < rowbytes * height; i++) - { - image[3*i + 0] = tmp_image[i]; - image[3*i + 1] = tmp_image[i]; - image[3*i + 2] = tmp_image[i]; - } + + if (CL_Endian::is_system_big()) + { + // Coverting the data in the tmp buffer to our final data + for (int i = 0; i < rowbytes * height; i++) + { + image[3*i + 2] = tmp_image[i]; + image[3*i + 1] = tmp_image[i]; + image[3*i + 0] = tmp_image[i]; + } + } + else + { + for (int i = 0; i < rowbytes * height; i++) + { + image[3*i + 0] = tmp_image[i]; + image[3*i + 1] = tmp_image[i]; + image[3*i + 2] = tmp_image[i]; + } + } delete[] tmp_image; } @@ -298,25 +338,52 @@ // Creating the final image out of tmp_image image = new unsigned char[width * pitch]; + if (!ignore_alphachannel) { - for (int i = 0; i < rowbytes * height; i += 2) - { - image[2*i + 0] = tmp_image[i + 1]; - image[2*i + 1] = tmp_image[i + 0]; - image[2*i + 2] = tmp_image[i + 0]; - image[2*i + 3] = tmp_image[i + 0]; - } + if (CL_Endian::is_system_big()) + { + for (int i = 0; i < rowbytes * height; i += 2) + { + image[2*i + 3] = tmp_image[i + 1]; + image[2*i + 2] = tmp_image[i + 0]; + image[2*i + 1] = tmp_image[i + 0]; + image[2*i + 0] = tmp_image[i + 0]; + } + } + else + { + for (int i = 0; i < rowbytes * height; i += 2) + { + image[2*i + 0] = tmp_image[i + 1]; + image[2*i + 1] = tmp_image[i + 0]; + image[2*i + 2] = tmp_image[i + 0]; + image[2*i + 3] = tmp_image[i + 0]; + } + } } else { - for (int i = 0; i < rowbytes * height; i += 2) - { - image[2*i + 0] = 255; - image[2*i + 1] = tmp_image[i + 0]; - image[2*i + 2] = tmp_image[i + 0]; - image[2*i + 3] = tmp_image[i + 0]; - } + if (CL_Endian::is_system_big()) + { + for (int i = 0; i < rowbytes * height; i += 2) + { + image[2*i + 3] = 255; + image[2*i + 2] = tmp_image[i + 0]; + image[2*i + 1] = tmp_image[i + 0]; + image[2*i + 0] = tmp_image[i + 0]; + } + } + else + { + for (int i = 0; i < rowbytes * height; i += 2) + { + image[2*i + 0] = 255; + image[2*i + 1] = tmp_image[i + 0]; + image[2*i + 2] = tmp_image[i + 0]; + image[2*i + 3] = tmp_image[i + 0]; + } + } } delete[] tmp_image;