debian/0000755000000000000000000000000011747202060007165 5ustar debian/rules0000755000000000000000000000014111612144040010233 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_clean: $(MAKE) clean override_dh_auto_install: debian/control0000644000000000000000000000221111747125056010575 0ustar Source: jigzo Section: games Priority: optional Maintainer: Elías Alejandro Año Mendoza Build-Depends: debhelper (>= 8.0.0), libjpeg-dev, libpng-dev, libsdl1.2-dev, libsdl-mixer1.2-dev Standards-Version: 3.9.3 Homepage: http://www.resorama.com/jigzo/ Package: jigzo Architecture: any Depends: jigzo-data (=${source:Version}), ${shlibs:Depends}, ${misc:Depends} Provides: glpuzzle Replaces: glpuzzle Conflicts: glpuzzle Description: Photo puzzle game for children jigzo (formerly glpuzzle) is a jigsaw puzzle game. Choose from 12 puzzles of increasing difficult. The difficulty ranges from 4 to 25 puzzle pieces. This game requires a OpenGl hardware acceleration. Package: jigzo-data Architecture: all Depends: ${misc:Depends}, ${shlibs:Depends} Conflicts: jigzo (<= 0.6.1-2) Replaces: jigzo (<= 0.6.1-2) Description: data of Photo puzzle game for children jigzo (formerly glpuzzle) is a jigsaw puzzle game. Choose from 12 puzzles of increasing difficult. The difficulty ranges from 4 to 25 puzzle pieces. This game requires a OpenGl hardware acceleration. . This package includes the data of the game: images, sound, icon, font. debian/source/0000755000000000000000000000000011612113770010465 5ustar debian/source/format0000644000000000000000000000001411612113770011673 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000642711747062367011066 0ustar jigzo (0.6.1-6) unstable; urgency=low * Bump Standards-Version to 3.9.3. * Fix FTBFS with GCC-4.7 : add patch 05_gcc_4_7.patch +Thanks to Paul Tagliamonte . (Closes: #667216) * Fix FTBFS with libpng 1.5 :add patch 06_libpng_1_5.patch +Thanks to Nobuhiro Iwamatsu . (Closes: #649839) * Change Build-Depends from libpng12-dev to libpng-dev. +Thanks to Nobuhiro Iwamatsu . (Closes: #662382) * debian/copyright update format as in Debian Policy 3.9.3. -- Elías Alejandro Año Mendoza Sat, 28 Apr 2012 13:14:44 -0500 jigzo (0.6.1-5) unstable; urgency=low * Bump Standards-Version to 3.9.2. * Switch to dpkg-source 3.0 (quilt) format. * Bump debhelper build-dep and compat to 8. * jigzo-data now Replaces: jigzo (<= 0.6.1-2). (Closes: #558190) * Updated Build-Depends on libjpeg-dev instead of libjpeg62-dev. (Closes: #634034) * debian/copyright under DEP-5 format. * debian/patches under DEP-3 format. * debian/jigzo.6 fixed spelling error in manpage. -- Elías Alejandro Año Mendoza Thu, 21 Jul 2011 16:32:49 -0500 jigzo (0.6.1-4) unstable; urgency=low * Fixed Fails to start with cannot open /usr/share/games/jigzo/font/charmap.png +Thanks to Dmitry Semyonov (Closes: #549515). * Updated Standards-Version to 3.8.3. * Corrected some lintian warnings: +Added README.source pointing to quilt's README.source.gz. +Added a description to the 01_paths, 03_gcc_4_3 and 04_any_resolution patchs. +Removed deprecated "Encoding" field from jigzo.desktop. +Added a extended-description (debian/control). -- Elías Alejandro Año Mendoza Wed, 07 Oct 2009 17:36:40 -0500 jigzo (0.6.1-3.1) unstable; urgency=low * Non-maintainer upload. * Fix previous incomplete upload. -- Maximiliano Curia Sun, 26 Jul 2009 15:09:06 -0300 jigzo (0.6.1-3) unstable; urgency=low * debian/watch: Updated. * Rewrote the build system with debhelper and quilt. * Menu icon updated. * Use the quilt system patch. * Made two packages: jigzo and jigzo-data. * debian/control: Updated Standards-Version to 3.8.2. * debian/jigzo.6: Updated. -- Elías Alejandro Año Mendoza Wed, 24 Jun 2009 19:48:13 -0500 jigzo (0.6.1-2) unstable; urgency=low * New maintainer. Closes: #497241. * debian/install, debian/patches/01_paths.diff: Updated. Moving from usr/share/jigzo/ to usr/share/games/jigzo/. * debian/jigzo.6, debian/jigzo.manpages: Added. * debian/patches/03_gcc_4_3.diff: Updated. * debian/patches/04_any_resolution.diff: Added. Patch by Miriam Ruiz , thanks. * debian/watch: Updated. -- Elías Alejandro Año Mendoza Mon, 09 Feb 2009 22:27:31 -0500 jigzo (0.6.1-1) unstable; urgency=low * New upstream release, renamed. * debian/copyright: Updated. -- Bart Martens Sun, 28 Dec 2008 16:42:03 +0100 glpuzzle (0.2-2) unstable; urgency=low * debian/patches/03_gcc_4_3.diff: Added. Closes: #420882. -- Bart Martens Fri, 27 Apr 2007 00:27:13 +0200 glpuzzle (0.2-1) unstable; urgency=low * Initial release. Closes: #409499. -- Bart Martens Sun, 11 Mar 2007 14:41:35 +0100 debian/jigzo.xpm0000644000000000000000000001005711611377422011045 0ustar /* XPM */ static char *icon____y_pirui__w_nad_cdyok_spulq_______out[] = { /* columns rows colors chars-per-pixel */ "32 32 114 2", " c #070707", ". c #080707", "X c #0C0C0C", "o c #110707", "O c #120D0D", "+ c #1B0D0D", "@ c #0F100F", "# c #12110E", "$ c #18130B", "% c #1E1A0F", "& c #0F1010", "* c #131413", "= c #1A1313", "- c #161817", "; c #1B1A15", ": c #161919", "> c #1B1C1B", ", c #221313", "< c #231D10", "1 c #1E201F", "2 c #2A230D", "3 c #37270E", "4 c #342D0D", "5 c #2D2513", "6 c #20231F", "7 c #1F2121", "8 c #202322", "9 c #30312D", "0 c #3D382E", "q c #313330", "w c #393B36", "e c #393C3A", "r c #4C3D0B", "t c #5C480A", "y c #694C04", "u c #694F08", "i c #735A06", "p c #7B5F0A", "a c #605310", "s c #484134", "d c #46473C", "f c #49473B", "g c #4A493C", "h c #4C4C43", "j c #524F40", "k c #535243", "l c #595547", "z c #5E5847", "x c #54574C", "c c #595D4F", "v c #615C4B", "b c #5F614F", "n c #66644F", "m c #636553", "M c #6A6552", "N c #666954", "B c #6A6A56", "V c #676758", "C c #68665C", "Z c #6F6C5F", "A c #706E57", "S c #726E59", "D c #767255", "F c #76715B", "G c #7A755E", "H c #787565", "J c #7E7A61", "K c #8B6C05", "L c #876908", "P c #906F03", "I c #8D7509", "U c #937307", "Y c #9C7506", "T c #9D7D06", "R c #907108", "E c #877019", "W c #A17A05", "Q c #A87E05", "! c #827D63", "~ c #9F830A", "^ c #A98306", "/ c #B38E05", "( c #BA9304", ") c #B7990D", "_ c #BB9C0A", "` c #848067", "' c #8B8964", "] c #868268", "[ c #8A856B", "{ c #8E896F", "} c #9D986F", "| c #8F8C77", " . c #928C73", ".. c #969175", "X. c #9D9376", "o. c #9A9579", "O. c #9F997D", "+. c #A39C7E", "@. c #A89B7F", "#. c #A6A077", "$. c #AAA27D", "%. c #B7A17D", "&. c #B3AC7E", "*. c #A7A082", "=. c #ABA484", "-. c #B1A584", ";. c #B4AA8A", ":. c #C2BB85", ">. c #CBBD93", ",. c #D0C39E", "<. c #E0D59F", "1. c #D9D0A6", "2. c #E1D7A5", "3. c None", /* pixels */ "3.3.3.0 f f f f f g g g g g j k z v n M M B S F G G G G F 3.3.3.", "3.3.3.l B B N B B B B B B B F G ! [ ...X.O.+.=.;.;.;.;.@.3.3.3.", "3.3.3.m B N N N N B B B N B S F J ! [ ...o.+.*.=.;.;.;.3.3.3.3.", "3.3.s N N N m N N B B N N N B F G ! ] { ..o.O.+.=.;.;.;.3.3.3.3.", "3.3.k m m m m m m N N m N N M A F J ` [ .o.O.+.=.=.;.-.3.3.3.3.", "3.3.b m m m m m m m m m m m n B V m V V H | O.*.=.=.=.+.3.3.3.3.", "3.s m m m m m m m m c h d w 9 8 > > 1 > 1 8 e C .*.$.X.3.3.3.3.", "3.k m m m m m x w 6 : : : : > > 1 1 8 8 8 8 8 8 8 w Z 3.3.3.3.3.", "3.m V m m c q - - - - - : > > > > > 7 7 7 8 8 8 8 8 7 3.3.3.3.3.", "3.3.3.3.h > - * - - - - : > > > > > > > > 1 7 8 8 7 > 3.3.3.3.3.", "3.3.3.3.3.* * * - - : : > > > > > > 7 > > > > > > - * X * O 3.3.", "3.3.3.3.3.3.* - - - - - : > > > > > 1 > > > > : * * * X * * * 3.", "3.3.3.3.3.3.O * - - : - > > > > > > > > - - * * * X X X * * * = ", "3.3.3.3.3.3.+ * * - - - : > > > > > > - * * * X X X . X * * - = ", "3.3.3.3.3.3.O - * - - - : ; ; ; - - * * * X X . . . . X X * - ; ", "3.3.3.3.3.3.* * - - : ; ; - * * - * X X X X . . X * * - , ", "3.3.3.3.3.O * - : > > ; - - * # O X X X X . . X * * + 3.", "3.3.3.3.3 * * - : > > - * * # # X . . . . X . . X 3.3.3.3.3.", "E ) / ^ R % * - ; ; ; * * # X X O - * * * * # # X X X 3.3.3.3.3.", "3._ ( Q Y 2 * - - - - - * # X X X X X * * * * * - * X 3.3.3.3.3.", "3.~ / W U 2 * - * * * * * # O O X X X # * - - - * * * 3.3.3.3.3.", "3.L ^ Y R < * * * * # # X X X * * * * * * * X X X X & O 3.3.3.3.", "3.u T P i $ * X O X X X X X * * * * * X X X X X X X X O 3.3.3.3.", "3.3.I K t * * X X X X * * * * * * * X X X X X X X X X X 3.3.3.3.", "3.3.p K r * * * * * - * * * * * * * * X X X X X X X X X 3.3.3.3.", "3.3.y U 4 * * * * - * * * * * = 3.3.3.O & & & * @ X X X 3.3.3.3.", "3.3.3.I ; * * * * * * - * O 3.3.3.3.3.3.$ * * * * * * X o 3.3.3.", "3.3.3.a - * * * * * - - - 3.3.3.3.3.3.3.3.O * * * * X X o 3.3.3.", "3.3.3.5 - - - ; ; ; ; ; ; 3.3.3.3.3.3.3.3.3.X X X X X X X 3.3.3.", "3.3.3.3.; s D ' } #.&.:.3.3.3.3.3.3.3.3.3.3.X X . . . o 3.3.3.3.", "3.3.3.3.3.3.3.3.,.1.2.<.3.3.3.3.3.3.3.3.3.3.$ X o 3.3.3.3.3.3.3.", "3.3.3.3.3.3.3.3.3.3.3.>.%.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3.3." }; debian/compat0000644000000000000000000000000211611401717010363 0ustar 8 debian/jigzo.60000644000000000000000000000365211612146621010405 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH JIGZO 6 "June 23, 2009" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME jigzo \- an OpenGL jigsaw game .SH SYNOPSIS .B jigzo .RI [ options ] .br .SH DESCRIPTION This manual page documents briefly the .B jigzo command, for the jigzo game. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBjigzo\fP is a jigsaw puzzle game. Choose from 12 puzzle of increasing difficult, or create your own puzzle, jigzo uses OpenGL for smooth movement and display. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. .TP .B \-h Show this usage info. .TP .B \-w Window mode (default). .TP .B \-f Full screen mode. .TP .B \-s x screen size (default: 800 x 600). .PP The downloads include 12 puzzles of increasing difficulties. You can create your own additional puzzles by .br uploading images at http://www.resorama.com/jigzomaker/ .br .SH AUTHOR jigzo was written by Maarten de Boer Copyright © 2005-2008. .PP This manual page was written by Elías Alejandro Año Mendoza , for the Debian project (but may be used by others). debian/jigzo-data.dirs0000644000000000000000000000002611611377422012104 0ustar usr/share/games/jigzo debian/jigzo.desktop0000644000000000000000000000030411611377422011704 0ustar [Desktop Entry] Version=1.0 Type=Application Name=jigzo Comment=Photo puzzle game for children TryExec=/usr/games/jigzo Exec=/usr/games/jigzo Categories=Application;Game;LogicGame; Icon=jigzo.xpm debian/jigzo-data.install0000644000000000000000000000005711611377422012615 0ustar font image sound puzzles usr/share/games/jigzo debian/jigzo.manpages0000644000000000000000000000001711611377422012027 0ustar debian/jigzo.6 debian/patches/0000755000000000000000000000000011747062511010621 5ustar debian/patches/02_layout.diffDISABLED0000644000000000000000000000072211611377422014362 0ustar --- ../orig/glpuzzle-0.2/main.cxx 2006-02-05 02:41:46.000000000 +0100 +++ main.cxx 2007-02-03 17:14:00.000000000 +0100 @@ -874,7 +874,7 @@ glColor3f(1, 0.8, 0.2); //DrawString(1024 / 2, 150, str, 256); - DrawString(1024 / 2, 150, "glpuzzle", 256); + DrawString(1024 / 2, 170, "glpuzzle", 256); DrawString(1024 / 2, 200, "v" VERSIONSTR, 96); glColor3f(0.9, 1, 1); DrawString(1024 / 2, 270, "programming & design:", 96); debian/patches/01_paths.patch0000644000000000000000000000465111612061142013255 0ustar Description: find data files into appropriate directory This allows find jigzo's data files on /usr/share/game/jigzo Author: Elías Alejandro Año Mendoza =================================================================== --- jigzo-0.6.1.orig/src/main.cxx 2009-06-24 20:05:40.000000000 -0500 +++ jigzo-0.6.1/src/main.cxx 2009-06-24 20:10:43.000000000 -0500 @@ -116,8 +116,8 @@ printf("Unable to open audio... continuing without.\n"); soundFailed = true; }else{ - mixChunkConnect= Mix_LoadWAV("sound/connect.wav"); - mixChunkFinish= Mix_LoadWAV("sound/finish.wav"); + mixChunkConnect= Mix_LoadWAV("/usr/share/games/jigzo/sound/connect.wav"); + mixChunkFinish= Mix_LoadWAV("/usr/share/games/jigzo/sound/finish.wav"); } } else @@ -546,7 +546,7 @@ { PngLoader pngLoader; RGBA arrowRGBA; - pngLoader.Load("image/arrow.png",arrowRGBA); + pngLoader.Load("/usr/share/games/jigzo/image/arrow.png",arrowRGBA); rgba.Paste(arrowRGBA,rgba.Width()-arrowRGBA.Width(), rgba.Height()-arrowRGBA.Height()); arrow = new Sprite; @@ -562,7 +562,7 @@ { PngLoader pngLoader; RGBA leaveRGBA; - pngLoader.Load("image/leave.png",leaveRGBA); + pngLoader.Load("/usr/share/games/jigzo/image/leave.png",leaveRGBA); rgba.Paste(leaveRGBA,rgba.Width()-offsetX-leaveRGBA.Width(), rgba.Height()-offsetY-leaveRGBA.Height()); leave = new Sprite; @@ -579,7 +579,7 @@ { PngLoader pngLoader; RGBA folderRGBA; - pngLoader.Load("image/folder.png",folderRGBA); + pngLoader.Load("/usr/share/games/jigzo/image/folder.png",folderRGBA); rgba.Paste(folderRGBA,rgba.Width()-offsetX-folderRGBA.Width(), rgba.Height()-offsetY-folderRGBA.Height()); for (int i = 0;i =================================================================== --- jigzo-0.6.1.orig/src/Loader.cxx 2009-06-24 20:16:37.000000000 -0500 +++ jigzo-0.6.1/src/Loader.cxx 2009-06-24 20:17:45.000000000 -0500 @@ -24,6 +24,7 @@ { #include #include +#include } void JpgLoader::Load(const std::string& filename,RGB& target,int x,int y) Index: jigzo-0.6.1/src/main.cxx =================================================================== --- jigzo-0.6.1.orig/src/main.cxx 2009-06-24 20:18:18.000000000 -0500 +++ jigzo-0.6.1/src/main.cxx 2009-06-24 20:19:50.000000000 -0500 @@ -47,6 +47,7 @@ #include #include #include +#include #ifdef WIN32 #include @@ -928,9 +929,9 @@ Assign(*texture,rgba,INTERPOLATION); } -Rect DrawString(float x, float y, char *str, float scale) +Rect DrawString(float x, float y, const char *str, float scale) { - char *ptr = str; + const char *ptr = str; float tw = 0; while (*ptr) { Sprite *s = chars[int (*ptr++)]; debian/patches/05_gcc_4_7.patch0000644000000000000000000000075411747033715013365 0ustar Description: add missing include This allows fix FTBFS with gcc 4.7 Author: Paul Tagliamonte Bugs-Debian: http://bugs.debian.org/667216 =================================================================== --- jigzo-0.6.1.orig/src/main.cxx 2012-04-28 13:14:36.000000000 -0500 +++ jigzo-0.6.1/src/main.cxx 2012-04-28 13:18:37.000000000 -0500 @@ -60,6 +60,7 @@ #include #include #include +#include #include #ifdef WIN32 debian/patches/series0000644000000000000000000000013511747032325012035 0ustar 01_paths.patch 03_gcc_4_3.patch 04_any_resolution.patch 05_gcc_4_7.patch 06_libpng_1_5.patch debian/patches/04_any_resolution.patch0000644000000000000000000001663011612062464015223 0ustar Description: allow jigzo work with any resolution This allows jigzo work with any resolution and any screen ratio Author: Miriam Ruiz =================================================================== --- jigzo-0.6.1.orig/src/main.cxx 2009-07-04 01:27:54.000000000 -0500 +++ jigzo-0.6.1/src/main.cxx 2009-07-04 01:46:06.000000000 -0500 @@ -33,6 +33,19 @@ float BG_G = float(0x00)/255.; float BG_B = float(0x00)/255.; +#ifndef SCREEN_WIDTH +#define SCREEN_WIDTH 800 +#endif + +#ifndef SCREEN_HEIGHT +#define SCREEN_HEIGHT 600 +#endif + +int screen_width = SCREEN_WIDTH; +int screen_height = SCREEN_HEIGHT; +int glw = 0; +int glh = 0; + bool rotateEnabled = false; bool soundEnabled = false; bool soundFailed = false; @@ -162,7 +175,7 @@ Sprite *chars[128]; -int mouseX = 0,mouseY = 0; +int mouseX = 0, mouseY = 0; class PuzzlePieceSprite **grid = 0; int ncolumns = 0; @@ -573,7 +586,7 @@ rgba.Height()-offsetY-leaveRGBA.Height(), leaveRGBA.Width(), leaveRGBA.Height())); - leave->Move(Point(1024-4-leave->GetRect().w,768-leave->GetRect().h)); + leave->Move(Point(glw-4-leave->GetRect().w,glh-leave->GetRect().h)); offsetX += leaveRGBA.Width(); } if (nFolders) @@ -719,10 +732,10 @@ jpgLoader.Load(puzzlefile.ThumbJpg(),rgba,x,y); preview->CreateTextureMap(texture, Rect(x,y,jpgLoader.width,jpgLoader.height)); preview->pos = Point( - x+(256-preview->GetRect().w)/2, - y+(240-preview->GetRect().h)/2); + x + (256-preview->GetRect().w)/2 + glw/2 - 512, + y + (240-preview->GetRect().h)/2 + glh/2 - 384); x += 256; - if (x==1024) + if (x>=1024) { x = 0; y += 240; @@ -970,14 +983,24 @@ nextGroup = 0; for (int i = 0; i < n; i++) v[i] = i; + float cx = 0.f; + float cy = 0.f; + int cn = 0; for (it = puzzlePieces.begin(); it != puzzlePieces.end(); it++) { int r = rand() % n; int i = v[r]; v[r] = v[--n]; - (*it)->pos = Point(4 + grid[i]->tx + grid[i]->tx / 5, + (*it)->pos = Point(4 + grid[i]->tx + grid[i]->tx / 5 , 4 + grid[i]->ty + grid[i]->ty / 5); (*it)->group = NextGroup(); - } + Rect cr = (*it)->GetRect(); + cx += cr.x + cr.w / 2; + cy += cr.y + cr.h / 2; + cn ++; + } + for (it = puzzlePieces.begin(); it != puzzlePieces.end(); it++) { + (*it)->pos += Point( glw/2 - cx/cn, glh/2 - cy/cn ); + } drawFoto = 0; } @@ -1005,7 +1028,7 @@ } glDisable(GL_TEXTURE_2D); glColor4f(BG_R,BG_G,BG_B,fade); - glRectf(0,0,1024,768); + glRectf(0,0,glw,glh); } void Display2(void) @@ -1094,7 +1117,7 @@ ff = ff*ff; glColor4f(1,1,1,ff); PuzzlePieceSprite *pp = *it; - pp->Move(Point(1024 / 2 + pp->tx - INTROIMGW/3, + pp->Move(Point(glw / 2 + pp->tx - INTROIMGW/3, 80 + pp->ty )); (*it)->Draw(); @@ -1119,17 +1142,17 @@ } glColor3f(0.9, 1, 1); - DrawString(1024 / 2, 360, "Version 0.6.1", 80.f/256.f); + DrawString(glw / 2, 360, "Version 0.6.1", 80.f/256.f); glColor3f(1, 0.8, 0.2); - DrawString(1024 / 2, 398, "http://www.resorama.com/jigzo/", 80.f/256.f); + DrawString(glw / 2, 398, "http://www.resorama.com/jigzo/", 80.f/256.f); glColor3f(0.9, 1, 1); - DrawString(1024 / 2, 450, "Options:", 92.f/256.f); + DrawString(glw / 2, 450, "Options:", 92.f/256.f); char tmp[256]; glColor3f(0.5, 0.5, 1); sprintf(tmp,"Rotating pieces: %s",rotateEnabled ? " ON" : "OFF"); - rotateOptionRect = DrawString(1024 / 2, 489, tmp, 80.f/256.f); + rotateOptionRect = DrawString(glw / 2, 489, tmp, 80.f/256.f); glColor3f(0.7, 0.7, 0.8); - DrawString(1024 / 2, 528, "(Hold Ctrl to rotate)", 80.f/256.f); + DrawString(glw / 2, 528, "(Hold Ctrl to rotate)", 80.f/256.f); glColor3f(0.5, 0.5, 1); #ifdef ENABLE_SOUND if (soundFailed) @@ -1141,16 +1164,16 @@ #else sprintf(tmp,"Sound support not available"); #endif - soundOptionRect = DrawString(1024 / 2, 570, tmp, 80.f/256.f); + soundOptionRect = DrawString(glw / 2, 570, tmp, 80.f/256.f); sprintf(tmp,"Connection tolerance: %s", toleranceString[tolerance]); - toleranceOptionRect = DrawString(1024 / 2, 613, tmp, 80.f/256.f); + toleranceOptionRect = DrawString(glw / 2, 613, tmp, 80.f/256.f); glColor3f(1, 0.8, 0.2); - DrawString(1024 / 2, 680, "Press 'Esc' to quit", 92.f/256.f); + DrawString(glw / 2, 680, "Press 'Esc' to quit", 92.f/256.f); glColor3f(0.9, 1, 1); - DrawString(1024 / 2, 720, "SPACE brings bottom-piece to front",80.f/256.f); + DrawString(glw / 2, 720, "SPACE brings bottom-piece to front",80.f/256.f); glColor3f(1, 0.8, 0.2); - DrawString(1024 / 2, 770, "Click or press key to continue", 92.f/256.f); + DrawString(glw / 2, 770, "Click or press key to continue", 92.f/256.f); glColor3f(1, 1, 1); leave->Draw(); arrow->Draw(); @@ -1232,8 +1255,8 @@ void MouseMove(int x, int y, bool modifier) { - mouseX = x; - mouseY = y; + mouseX = x * glw / screen_width; + mouseY = y * glh / screen_height; if (arrow) arrow->Move(Point(mouseX, mouseY)); if (mode == intro) { @@ -1464,12 +1487,15 @@ printf("http://www.resorama.com/jigzo/\n\n"); printf ("Copyright (C) 2005-2008 Maarten de Boer \n\n"); - printf("Usage: jigzo [-h | -w]\n\n"); - printf(" -h show this usage info\n"); - printf(" -w window mode (default is fullscreen)\n"); + printf("Usage: jigzo [options]\n\n"); + printf("Usage: jigzo [options]\n\n"); + printf(" -h show this usage info\n"); + printf(" -f fullscreen mode\n"); + printf(" -w window mode (default)\n"); + printf(" -s x screen size (default: %i x %i)\n",SCREEN_WIDTH,SCREEN_HEIGHT); printf("\n"); printf - ("jigzo requires a OpenGL hardware accelaration and runs at 1024x768 only\n\n"); + ("jigzo requires a OpenGL hardware accelaration\n\n"); #ifndef ENABLE_SOUND printf("Sound support disabled at compilation\n\n"); #endif @@ -1483,7 +1509,7 @@ time(&t); srand(t); try { - bool fullscreen = true; + bool fullscreen = false; mode = start_intro; string argv0(argv[0]); @@ -1502,23 +1528,49 @@ if (argc > 1) { - if (argc > 2) - usage(); - if (string(argv[1]) == "-h") - usage(); - if (string(argv[1]) == "-w") - fullscreen = false; + for (int i = 1; i < argc ; i++) { + if (string(argv[i]) == "-h") { + usage(); + } + if (string(argv[i]) == "-f") { + fullscreen = true; + continue; + } + if (string(argv[i]) == "-w") { + fullscreen = false; + continue; + } + if (string(argv[i]) == "-s") { + i++; + if (i >= argc) + usage(); + if (sscanf(argv[i], "%dx%d", &screen_width, &screen_height) != 2) + usage(); + if (screen_width < 100 || screen_height < 80) + usage(); + continue; + } + } } - + int gl_width = 1024; + int gl_height = 768; // todo: for non 4/3 resolution, the contents should be // repositioned - int w = 1024; - int h = 768; + int w = screen_width; + int h = screen_height; float ar = float(w)/float(h); - float glhf = sqrt(1024.f*768.f/ar); + float glhf = sqrt(float(gl_width)*float(gl_height)/ar); float glwf = glhf*ar; - int glw = int(glwf+0.5f); - int glh = int(glhf+0.5f); + if (float(gl_width) > float(gl_height)/ar) + { + glhf = float(gl_height); + glwf = glhf*ar; + } else { + glwf = float(gl_width); + glhf = glhf/ar; + } + glw = int(glwf+0.5f); + glh = int(glhf+0.5f); INTERPOLATION = GL_LINEAR; //if (w==glw && h==glh) INTERPOLATION = GL_NEAREST; //else INTERPOLATION = GL_LINEAR; debian/patches/06_libpng_1_5.patch0000644000000000000000000000144511747057522014100 0ustar Description: Fix FTBFS with libpng 1.5. This allows build properly with library libpng 1.5 Author: Nobuhiro Iwamatsu Bugs-Debian: http://bugs.debian.org/649839 =================================================================== --- jigzo-0.6.1.orig/src/Loader.cxx 2012-04-28 13:19:18.000000000 -0500 +++ jigzo-0.6.1/src/Loader.cxx 2012-04-28 13:23:05.000000000 -0500 @@ -195,7 +195,11 @@ int bit_depth, color_type, interlace_type; png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, + #if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 + &color_type, &interlace_type, NULL, NULL); + #else &color_type, &interlace_type, int_p_NULL, int_p_NULL); + #endif int row_bytes = png_get_rowbytes(png_ptr, info_ptr); debian/copyright0000644000000000000000000000543111747033564011136 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: jigzo Upstream-Contact: Maarten de Boer Source: http://www.resorama.com/jigzo Files: * Copyright: 2005-2008 Maarten de Boer License: GPL-2+ Files: puzzles/00_default/heli-4x3.pzl Copyright: Joana Clotet License: GPL-2 Files: puzzles/00_default/penguin-3x2.pzl Copyright: Jon Sullivan License: You may use this image for any purpose, including commercial. As the owner I have explicitly placed it in the public domain. If you do use it, please consider linking back to pdphoto.org. Use it for whatever you want. Use it all. Sell it. Mangle it. Whatever you want. Please. But it would be polite to let me know so I can at least enjoy whatever creative use you're putting it to. This doesn't mean that you can take the material and then copyright it yourself. It's in the public domain and that's where I want it to stay. Comment: Image downloaded from: http://pdphoto.org/ Files: debian/* Copyright: 2007-2009 Bart Martens 2009-2012 Elías Alejandro Año Mendoza License: GPL-2+ License: GPL-2 This program 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; version 2 of the License. . This program 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 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. License: GPL-2+ This program 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 (at your option) any later version. . This program 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 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/jigzo.menu0000644000000000000000000000024211611377422011200 0ustar ?package(jigzo):needs="X11" section="Games/Puzzles"\ longtitle="Photo puzzle game for children"\ icon="jigzo.xpm"\ title="jigzo" command="/usr/games/jigzo" debian/jigzo.install0000644000000000000000000000013711611377422011705 0ustar jigzo usr/games debian/jigzo.xpm usr/share/pixmaps debian/jigzo.desktop usr/share/applications debian/watch0000644000000000000000000000007111611402736010216 0ustar version=3 http://www.resorama.net/jigzo/jigzo-(.*)\.tgz debian/jigzo.dirs0000644000000000000000000000006311611377422011176 0ustar usr/games usr/share/pixmaps usr/share/applications