sdljava-users Mailing List for Java Binding for SDL (Page 12)
Status: Beta
Brought to you by:
ivan_ganza
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(43) |
Feb
(50) |
Mar
(44) |
Apr
(14) |
May
(18) |
Jun
(7) |
Jul
(26) |
Aug
(29) |
Sep
(28) |
Oct
(10) |
Nov
(5) |
Dec
(7) |
2006 |
Jan
(2) |
Feb
(9) |
Mar
(16) |
Apr
(1) |
May
(11) |
Jun
(8) |
Jul
(8) |
Aug
(5) |
Sep
(15) |
Oct
|
Nov
|
Dec
(2) |
2007 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(2) |
Jun
(4) |
Jul
(1) |
Aug
(14) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
(1) |
2009 |
Jan
(1) |
Feb
(5) |
Mar
|
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
2016 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Timothy M. <ma...@po...> - 2005-04-19 05:08:03
|
Hey everyone, This is a method that I wrote to open an image as a mouse cursor. /** Set the image the mouse cursor uses. If imageName is null then the cursor is invisible. */ public void setCursorImage(String imageName, Window win){ Cursor cursor = Toolkit.getDefaultToolkit().createCustomCursor(Toolkit.getDefaultToolkit().getImage(imageName), new Point(0, 0), "CURSOR"); window.setCursor(cursor); } I hope that this helps! Have fun. -Tim |
From: Ivan Z. G. <iva...@ya...> - 2005-04-19 01:48:51
|
The method from SDL hasn't been implemented yet in sdljava. It seems though that most people just hide the cursor and render it own there own. -Ivan/ Jean Fortin wrote: > Hi, is there a method to change the mouse cursor with sdljava? > > Thanks in advance, > Jean Fortin > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Ivan Z. G. <iva...@ya...> - 2005-04-19 01:38:54
|
Thanks for the patch Robert I've applied it. -Ivan/ Robert Schuster wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >Hi, >please apply this patch to fix a problem in BufferUtils.readInputStream(). > >The big buffer holding all the data of the smaller ones was not >correctly set into the state where the data could be read afterwards. > >This caused a buffer overflow. Well, just flipping the buffer state >fixes this. > >Along with this small fix I changed the minimum buffer size to 8192 (was >1024) which will cause the creation of fewer intermediate buffer for big >files. > >cu >Robert >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.4.1 (GNU/Linux) >Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > >iD8DBQFCZDCdG9cfwmwwEtoRArIJAJ47sko+U8pihBUvM322WQ/TNsPc6QCgkCrX >fyYHS7d/TKSO3flF2/hbMds= >=eHuJ >-----END PGP SIGNATURE----- > > >------------------------------------------------------------------------ > >Index: src/sdljava/util/BufferUtil.java >=================================================================== >RCS file: /cvsroot/sdljava/sdljava/src/sdljava/util/BufferUtil.java,v >retrieving revision 1.7 >diff -u -r1.7 BufferUtil.java >--- src/sdljava/util/BufferUtil.java 13 Mar 2005 19:44:59 -0000 1.7 >+++ src/sdljava/util/BufferUtil.java 18 Apr 2005 22:02:50 -0000 >@@ -38,7 +38,7 @@ > // float 32 bits > // double 64 bits > >- private static final int BUFFER_SIZE = 1024; >+ private static final int BUFFER_SIZE = 8192; > > /** > * Tries to open the given URL, get its input stream, returns the data in a <I><B>direct</I></B> ByteBuffer >@@ -107,6 +107,9 @@ > } > > list.clear(); >+ >+ // Makes buffer ready for reading later >+ bb.flip(); > > return bb; > } >@@ -168,4 +171,4 @@ > public static CharBuffer createCharBuffer(char[] values) { > return createCharBuffer(values.length).put(values); > } >-} >\ No newline at end of file >+} > > |
From: Chris D. <Des...@nt...> - 2005-04-18 23:36:12
|
I've applied the patch to my own private source tree. Thank you, Chris Robert Schuster wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >Hi, >please apply this patch to fix a problem in BufferUtils.readInputStream(). > >The big buffer holding all the data of the smaller ones was not >correctly set into the state where the data could be read afterwards. > >This caused a buffer overflow. Well, just flipping the buffer state >fixes this. > >Along with this small fix I changed the minimum buffer size to 8192 (was >1024) which will cause the creation of fewer intermediate buffer for big >files. > >cu >Robert > > -- |> Dessimat0r (Chris Dennett) /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ___.--'~---''--~.__ __.------'''~`-'-, -~--' ~--.__..--~' `~----.__ |
From: Robert S. <the...@gm...> - 2005-04-18 22:10:03
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, please apply this patch to fix a problem in BufferUtils.readInputStream(). The big buffer holding all the data of the smaller ones was not correctly set into the state where the data could be read afterwards. This caused a buffer overflow. Well, just flipping the buffer state fixes this. Along with this small fix I changed the minimum buffer size to 8192 (was 1024) which will cause the creation of fewer intermediate buffer for big files. cu Robert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCZDCdG9cfwmwwEtoRArIJAJ47sko+U8pihBUvM322WQ/TNsPc6QCgkCrX fyYHS7d/TKSO3flF2/hbMds= =eHuJ -----END PGP SIGNATURE----- |
From: Chris D. <Des...@nt...> - 2005-04-18 20:17:26
|
Jean Fortin wrote: > Hi, is there a method to change the mouse cursor with sdljava? > > Thanks in advance, > Jean Fortin > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users > I don't believe so (this could make it platform specific). The best idea is probably to hide the cursor in the window and show your own. -- |> Dessimat0r (Chris Dennett) /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ___.--'~---''--~.__ __.------'''~`-'-, -~--' ~--.__..--~' `~----.__ |
From: Jean F. <jea...@en...> - 2005-04-18 20:05:06
|
Hi, is there a method to change the mouse cursor with sdljava? Thanks in advance, Jean Fortin |
From: Ivan Z. G. <iva...@ya...> - 2005-04-09 13:47:07
|
FYI! |
From: Ivan Z. G. <iva...@ya...> - 2005-03-30 02:56:52
|
It is mostly JNI. Most methods directly call an underlying C function which is part of SDL or OpenGL... -Ivan/ Timothy Mann wrote: >Hey Everbody, > I just wanted to know whether sdljava is more of a JNI project or if a >lot of the code is being reimplemented in Java. I am assuming that most >of the code is ported using JNI because of performance reasons. >--Tim > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >sdljava-users mailing list >sdl...@li... >https://lists.sourceforge.net/lists/listinfo/sdljava-users > > |
From: Timothy M. <ma...@po...> - 2005-03-30 00:34:09
|
Hey Everbody, I just wanted to know whether sdljava is more of a JNI project or if a lot of the code is being reimplemented in Java. I am assuming that most of the code is ported using JNI because of performance reasons. --Tim |
From: Ivan Z. G. <iva...@ya...> - 2005-03-29 02:47:35
|
Chris, I've integrated this patch. Thanks. -Ivan/ Chris Dennett wrote: > Hi everybody ;) > > The attached patch fixes a minor bug in SDLRect regarding the use of > SDLPoint, introduces scaling and descaling methods in SDLRect. Also > cleans up a lot of Javadoc comments which took me a while to do, > including spelling mistakes and anomalies. > > The scaling and descaling stuff is especially useful for me, since I > have a grid, with grid objects on that grid, and the grid rect is > stored in a field within each grid object. When a grid object is > created, I have to generate the grid rect by scaling the surface > height and width down using the grid point size. This might make > things easier for me and other people to do such things later on. > > There are also the getRect() methods in SDLSurface which have proven > their use time and time again in pygame. This allows you to create a > new SDLRect which has the height and width of the surface, and x = 0, > y = 0, or the same but with a user-defined x and y, or the same but > using an SDLPoint to specify the topleft point. > > Anyway, I hope you find these changes useful ;) > > Regards, > Chris > >------------------------------------------------------------------------ > >Index: .cvsignore >=================================================================== >RCS file: /cvsroot/sdljava/sdljava/.cvsignore,v >retrieving revision 1.3 >diff -u -r1.3 .cvsignore >--- .cvsignore 23 Dec 2004 04:43:23 -0000 1.3 >+++ .cvsignore 18 Mar 2005 22:52:17 -0000 >@@ -1 +1,3 @@ > classes >+.classpath >+.project >Index: src/sdljava/video/SDLPoint.java >=================================================================== >RCS file: /cvsroot/sdljava/sdljava/src/sdljava/video/SDLPoint.java,v >retrieving revision 1.1 >diff -u -r1.1 SDLPoint.java >--- src/sdljava/video/SDLPoint.java 13 Mar 2005 16:16:50 -0000 1.1 >+++ src/sdljava/video/SDLPoint.java 18 Mar 2005 22:52:17 -0000 >@@ -29,118 +29,117 @@ > * @version 0.2 > */ > public class SDLPoint implements Cloneable { >- /** The x coordinate of the point. */ >- public int x; >+ /** The x coordinate of the point. */ >+ public int x; > >- /** The y coordiate of the point. */ >- public int y; >+ /** The y coordiate of the point. */ >+ public int y; > >- /** >- * Creates a new SDLPoint object. >- * @param x The x coordiante of the point. >- * @param y The y coordinate of the point. >- */ >- public SDLPoint(int x, int y) { >- this.x = x; >- this.y = y; >- } >- >- /** >- * Gets the x coordiante of the point. >- * @return Returns the x coordiante. >- */ >- public int getX() { >- return x; >- } >- >- /** >- * Sets the x coordiante of the point. >- * @param x The x coordinate. >- */ >- public void setX(int x) { >- this.x = x; >- } >- >- /** >- * Gets the y coordiante of the point. >- * @return Returns the y coordinate. >- */ >- public int getY() { >- return y; >- } >- >- /** >- * Sets the x coordiante of the point. >- * @param y The y coordiante. >- */ >- public void setY(int y) { >- this.y = y; >- } >- >- /** >- * Sets the location of the point. >- * @param x The x coordinate. >- * @param y The y coordiate. >- */ >- public void setLocation(int x, int y) { >- this.x = x; >- this.y = y; >- } >- >- /** >- * Returns the string represenation of this point. >- * >- * @return The string represenation of this point. >- */ >- public String toString() { >- StringBuffer buf = new StringBuffer(); >- >- buf.append("SDLPoint["). >- append("x=").append(getX()). >- append(", y=").append(getY()). >- append("]"); >+ /** >+ * Creates a new SDLPoint object. >+ * @param x The x coordiante of the point. >+ * @param y The y coordinate of the point. >+ */ >+ public SDLPoint(int x, int y) { >+ this.x = x; >+ this.y = y; >+ } >+ >+ /** >+ * Gets the x coordiante of the point. >+ * @return Returns the x coordiante. >+ */ >+ public int getX() { >+ return x; >+ } >+ >+ /** >+ * Sets the x coordiante of the point. >+ * @param x The x coordinate. >+ */ >+ public void setX(int x) { >+ this.x = x; >+ } >+ >+ /** >+ * Gets the y coordiante of the point. >+ * @return Returns the y coordinate. >+ */ >+ public int getY() { >+ return y; >+ } >+ >+ /** >+ * Sets the x coordiante of the point. >+ * @param y The y coordiante. >+ */ >+ public void setY(int y) { >+ this.y = y; >+ } >+ >+ /** >+ * Sets the location of the point. >+ * @param x The x coordinate. >+ * @param y The y coordiate. >+ */ >+ public void setLocation(int x, int y) { >+ this.x = x; >+ this.y = y; >+ } >+ >+ /** >+ * Returns the string represenation of this point. >+ * >+ * @return The string represenation of this point. >+ */ >+ public String toString() { >+ StringBuffer buf = new StringBuffer(); > >- return buf.toString(); >- } >+ buf.append("SDLPoint["). >+ append("x=").append(getX()). >+ append(", y=").append(getY()). >+ append("]"); >+ >+ return buf.toString(); >+ } > >- /** >- * Checks whether this point lies within the specified rect. >- * @param rect The rect to test. >- * @return True if the point lies within the rect, false if it dosen't. >- * >- * @see SDLPoint >- */ >- public boolean liesWithin(SDLRect rect) { >- SDLPoint rectTopLeft = rect.getLocation(); >- SDLPoint rectBottomRight = rect.getBottomRight(); >+ /** >+ * Checks whether this point lies within the specified rect. >+ * @param rect The rect to test. >+ * @return True if the point lies within the rect, false if it doesn't. >+ * >+ * @see SDLPoint >+ */ >+ public boolean liesWithin(SDLRect rect) { >+ SDLPoint rectBottomRight = rect.getBottomRight(); > >- int rectTL_X = rectTopLeft.getX(); >- int rectTL_Y = rectTopLeft.getY(); >- int rectBR_X = rectBottomRight.getX(); >- int rectBR_Y = rectBottomRight.getY(); >+ int rectTL_X = rect.getX(); >+ int rectTL_Y = rect.getY(); >+ int rectBR_X = rectBottomRight.getX(); >+ int rectBR_Y = rectBottomRight.getY(); > >- return ( >- ( >- (x >= rectTL_X) && (x <= rectBR_X) >- ) && ( >- (y >= rectTL_Y) && (y <= rectBR_Y) >- ) >+ return ( >+ ( >+ (x >= rectTL_X) && (x <= rectBR_X) >+ ) && ( >+ (y >= rectTL_Y) && (y <= rectBR_Y) >+ ) > ); >- } >+ } > >- /** >- * Creates a clone of the SDLPoint. >- * >- * @return A clone of this SDLPoint instance. >- * @see java.lang.Object#clone() >- * @author Chris Dennett (Des...@nt...) >- */ >- public Object clone() { >- Object o = null; >- try { >- o = super.clone(); >- // Clone should always be supported. >- } catch (CloneNotSupportedException e) {} >- return o; >- } >+ /** >+ * Creates a clone of the SDLPoint. >+ * >+ * @return A clone of this SDLPoint instance. >+ * @see java.lang.Object#clone() >+ * @author Chris Dennett (Des...@nt...) >+ */ >+ public Object clone() { >+ Object o = null; >+ try { >+ o = super.clone(); >+ // Clone should always be supported. >+ } catch (CloneNotSupportedException e) {} >+ return o; >+ } > } >Index: src/sdljava/video/SDLRect.java >=================================================================== >RCS file: /cvsroot/sdljava/sdljava/src/sdljava/video/SDLRect.java,v >retrieving revision 1.5 >diff -u -r1.5 SDLRect.java >--- src/sdljava/video/SDLRect.java 13 Mar 2005 16:16:51 -0000 1.5 >+++ src/sdljava/video/SDLRect.java 18 Mar 2005 22:52:18 -0000 >@@ -29,250 +29,332 @@ > * @version $Id: SDLRect.java,v 1.5 2005/03/13 16:16:51 ivan_ganza Exp $ > */ > public class SDLRect { >- >- public int x, y, width, height; >- >- public SDLRect() { >- } >- >- public SDLRect(int x, int y) { >- this.x = x; >- this.y = y; >- } >- >- public SDLRect(int x, int y, int width, int height) { >- this(x,y); >- this.width = width; >- this.height = height; >- } >- >- /** >- * Creates an SDLRect with the specified topleft point, height and width. >- * >- * @param pos The topleft position of the rectangle. >- * @param width The width of the rectangle. >- * @param height The height of the rectangle. >- */ >- public SDLRect(SDLPoint pos, int width, int height) { >- this.x = pos.getX(); >- this.y = pos.getY(); >- } >- >- /** >- * Gets the value of x >- * >- * @return the value of x >- */ >- public int getX() { >- return this.x; >- } >- >- /** >- * Sets the value of x >- * >- * @param argX Value to assign to this.x >- */ >- public void setX(int argX) { >- this.x = argX; >- } >- >- /** >- * Gets the value of y >- * >- * @return the value of y >- */ >- public int getY() { >- return this.y; >- } >- >- /** >- * Sets the value of y >- * >- * @param argY Value to assign to this.y >- */ >- public void setY(int argY) { >- this.y = argY; >- } >- >- /** >- * Gets the value of width >- * >- * @return the value of width >- */ >- public int getWidth() { >- return this.width; >- } >- >- /** >- * Sets the value of width >- * >- * @param argWidth Value to assign to this.width >- */ >- public void setWidth(int argWidth) { >- this.width = argWidth; >- } >- >- /** >- * Gets the value of height >- * >- * @return the value of height >- */ >- public int getHeight() { >- return this.height; >- } >- >- /** >- * Sets the value of height >- * >- * @param argHeight Value to assign to this.height >- */ >- public void setHeight(int argHeight) { >- this.height = argHeight; >- } >- >- public void setLocation(int x, int y) { >- this.x = x; >- this.y = y; >- } >- >- public void setSize(int width, int height) { >- this.width = width; >- this.height = height; >- } >- >- /** >- * Sets the topleft point of the rectangle. >- * >- * @param pos The new topleft point of the rectangle. >- * >- * @see SDLPoint >- */ >- public void setLocation(SDLPoint pos) { >- x = pos.getX(); >- y = pos.getY(); >- } >- >- /** >- * Gets the point at the top left of the rectangle. >- * >- * @return An SDLPoint object containing the top left point of the >- * rectangle. >- * >- * @see SDLPoint >- */ >- public SDLPoint getLocation() { >- return new SDLPoint(x, y); >- } >- >- /** >- * Gets the point at the top right of the rectangle. >- * >- * @return An SDLPoint object containing the top right point of the >- * rectangle. >- * >- * @see SDLPoint >- */ >- public SDLPoint getTopRight() { >- return new SDLPoint(x + width, y); >- } >- >- /** >- * Gets the point at the center of the rectangle. The point is rounded to >- * the nearest point. >- * >- * @return An SDLPoint object containing the point in the center of the >- * rectangle. >- * >- * @see SDLPoint >- */ >- public SDLPoint getCenter() { >- int cX = x + (Math.round(width / 2)); >- int cY = y + (Math.round(height / 2)); >- >- return new SDLPoint(cX, cY); >- } >- >- /** >- * Sets the center point of the rectangle using integer X and Y coordinates. >- * >- * @param x The new center x coordiante of the rectangle. >- * @param y The new center y coordiante of the rectangle. >- * >- * @see SDLPoint >- */ >- public void setCenter(int x, int y) { >- SDLPoint center = getCenter(); >- this.x = x - center.getX(); >- this.y = y - center.getY(); >- } >- >- /** >- * Sets the center point of the rectangle using an SDLPoint. >- * >- * @param pos The new center point of the rectangle. >- * >- * @see SDLPoint >- */ >- public void setCenter(SDLPoint pos) { >- setCenter(pos.getX(), pos.getY()); >- } >- >- /** >- * Gets the point at the bottom right of the rectangle. >- * >- * @return An SDLPoint object containing the bottom right point of the >- * rectangle. >- * >- * @see SDLPoint >- */ >- public SDLPoint getBottomRight() { >- return new SDLPoint(x + width, y + height); >- } >- >- /** >- * Gets the point at the bottom left of the rectangle. >- * >- * @return An SDLPoint object containing the bottom left point of the >- * rectangle. >- * >- * @see SDLPoint >- */ >- public SDLPoint getBottomLeft() { >- return new SDLPoint(x, y + height); >- } >- >- /** >- * Creates a clone of the SDLRect. >- * >- * @return A clone of this SDLRect instance. >- * @see java.lang.Object#clone() >- */ >- public Object clone() { >- // If this class ever uses SDLPoint for X and Y, or any immutables, >- // then they must be cloned also, or the clone will be shallow. >- Object o = null; >- try { >- o = super.clone(); >- // Clone should always be supported. >- } catch (CloneNotSupportedException e) {} >- return o; >- } >- >- /** >- * Return a string represenation of this object >- * >- * @return a String represenation of this object >- */ >- public String toString() { >- StringBuffer buf = new StringBuffer(); >- >- buf.append("SDLRect["). >- append("x=").append(getX()). >- append(", y=").append(getY()). >- append(", width=").append(getWidth()). >- append(", height=").append(getHeight()). >- append("]"); > >- return buf.toString(); >- } >+ /** The topleft x coordinate of the rectangle. */ >+ public int x; >+ >+ /** The topleft y coordinate of the rectangle. */ >+ public int y; >+ >+ /** The width of the rectangle. */ >+ public int width; >+ >+ /** The height of the rectangle. */ >+ public int height; >+ >+ /** >+ * Creates an SDLRect with the specified topleft x and y coordinates, >+ * width and height. >+ * >+ * @param x The topleft x coordinate of the SDLRect. >+ * @param y The topleft y coordinate of the SDLRect. >+ * @param width The width of the SDLRect. >+ * @param height The height of the SDLRect. >+ */ >+ public SDLRect(int x, int y, int width, int height) { >+ this.x = x; >+ this.y = y; >+ this.width = width; >+ this.height = height; >+ } >+ >+ /** >+ * Creates an SDLRect with the specified topleft point, height and width. >+ * >+ * @param pos The topleft position of the rectangle. >+ * @param width The width of the rectangle. >+ * @param height The height of the rectangle. >+ * >+ * @see SDLPoint >+ */ >+ public SDLRect(SDLPoint pos, int width, int height) { >+ this(pos.getX(), pos.getY(), width, height); >+ } >+ >+ /** >+ * Gets the topleft x coordiante of the SDLRect. >+ * >+ * @return The topleft x coordinate. >+ */ >+ public int getX() { >+ return this.x; >+ } >+ >+ /** >+ * Sets the topleft x coordiante of the SDLRect. >+ * >+ * @param x The new topleft x coordinate. >+ */ >+ public void setX(int x) { >+ this.x = x; >+ } >+ >+ /** >+ * Gets the topleft y coordiante of the SDLRect. >+ * >+ * @return The topleft y coordinate. >+ */ >+ public int getY() { >+ return this.y; >+ } >+ >+ /** >+ * Sets the topleft y coordinate of the SDLRect. >+ * >+ * @param y The new topleft y coordinate. >+ */ >+ public void setY(int y) { >+ this.y = y; >+ } >+ >+ /** >+ * Gets the width of the SDLRect. >+ * >+ * @return The width of the SDLRect. >+ */ >+ public int getWidth() { >+ return this.width; >+ } >+ >+ /** >+ * Sets the width of the SDLRect. >+ * >+ * @param width The new width of the SDLRect. >+ */ >+ public void setWidth(int width) { >+ this.width = width; >+ } >+ >+ /** >+ * Gets the height of the SDLRect. >+ * >+ * @return The height of the SDLRect. >+ */ >+ public int getHeight() { >+ return this.height; >+ } >+ >+ /** >+ * Sets the height of the SDLRect. >+ * >+ * @param height The new height of the SDLRect. >+ */ >+ public void setHeight(int height) { >+ this.height = height; >+ } >+ >+ /** >+ * Sets the topleft position of the SDLRect, using the topleft x and y >+ * coordiantes. >+ * >+ * @param x The topleft x coordinate. >+ * @param y The topleft y coordinate. >+ */ >+ public void setLocation(int x, int y) { >+ this.x = x; >+ this.y = y; >+ } >+ >+ /** >+ * Sets the size of the SDLRect, using width and height values. >+ * >+ * @param width The new width of the SDLRect. >+ * @param height The new height of the SDLRect. >+ */ >+ public void setSize(int width, int height) { >+ this.width = width; >+ this.height = height; >+ } >+ >+ /** >+ * Sets the topleft point of the rectangle. >+ * >+ * @param pos The new topleft point of the rectangle. >+ * >+ * @see SDLPoint >+ */ >+ public void setLocation(SDLPoint pos) { >+ x = pos.getX(); >+ y = pos.getY(); >+ } >+ >+ /** >+ * Gets the point at the top left of the rectangle. >+ * >+ * @return An SDLPoint object containing the top left point of the >+ * rectangle. >+ * >+ * @see SDLPoint >+ */ >+ public SDLPoint getLocation() { >+ return new SDLPoint(x, y); >+ } >+ >+ /** >+ * Gets the point at the top right of the rectangle. >+ * >+ * @return An SDLPoint object containing the top right point of the >+ * rectangle. >+ * >+ * @see SDLPoint >+ */ >+ public SDLPoint getTopRight() { >+ return new SDLPoint(x + width, y); >+ } >+ >+ /** >+ * Gets the point at the center of the rectangle. The point is rounded to >+ * the nearest point. >+ * >+ * @return An SDLPoint object containing the point in the center of the >+ * rectangle. >+ * >+ * @see SDLPoint >+ */ >+ public SDLPoint getCenter() { >+ int cX = x + (Math.round(width / 2)); >+ int cY = y + (Math.round(height / 2)); >+ >+ return new SDLPoint(cX, cY); >+ } >+ >+ /** >+ * Sets the center point of the rectangle using integer X and Y coordinates. >+ * >+ * @param x The new center x coordiante of the rectangle. >+ * @param y The new center y coordiante of the rectangle. >+ * >+ * @see SDLPoint >+ */ >+ public void setCenter(int x, int y) { >+ SDLPoint center = getCenter(); >+ this.x = x - center.getX(); >+ this.y = y - center.getY(); >+ } >+ >+ /** >+ * Sets the center point of the rectangle using an SDLPoint. >+ * >+ * @param pos The new center point of the rectangle. >+ * >+ * @see SDLPoint >+ */ >+ public void setCenter(SDLPoint pos) { >+ setCenter(pos.getX(), pos.getY()); >+ } >+ >+ /** >+ * Gets the point at the bottom right of the rectangle. >+ * >+ * @return An SDLPoint object containing the bottom right point of the >+ * rectangle. >+ * >+ * @see SDLPoint >+ */ >+ public SDLPoint getBottomRight() { >+ return new SDLPoint(x + width, y + height); >+ } >+ >+ /** >+ * Gets the point at the bottom left of the rectangle. >+ * >+ * @return An SDLPoint object containing the bottom left point of the >+ * rectangle. >+ * >+ * @see SDLPoint >+ */ >+ public SDLPoint getBottomLeft() { >+ return new SDLPoint(x, y + height); >+ } >+ >+ /** >+ * Creates a clone of the SDLRect. >+ * >+ * @return A clone of this SDLRect instance. >+ * @see java.lang.Object#clone() >+ */ >+ public Object clone() { >+ // If this class ever uses SDLPoint for X and Y, or any immutables, >+ // then they must be cloned also, or the clone will be shallow. >+ Object o = null; >+ try { >+ o = super.clone(); >+ // Clone should always be supported. >+ } catch (CloneNotSupportedException e) {} >+ return o; >+ } >+ >+ /** >+ * Returns a string represenation of this object. >+ * >+ * @return A string represenation of this object. >+ */ >+ public String toString() { >+ StringBuffer buf = new StringBuffer(); >+ >+ buf.append("SDLRect["). >+ append("x=").append(getX()). >+ append(", y=").append(getY()). >+ append(", width=").append(getWidth()). >+ append(", height=").append(getHeight()). >+ append("]"); >+ >+ return buf.toString(); >+ } >+ >+ /** >+ * Scales this rect by the given x and y factors. This affects the x, y, >+ * width and height of the rect. >+ * (i.e. x:2, y:6, w:10, h:16 becomes x:1, y:3, w:5, h:8 with factor 2) >+ * >+ * @param xFactor The x factor to scale this rect by. >+ * @param yFactor The y factor to scale this rect by. >+ */ >+ public void scaleAll(int xFactor, int yFactor) { >+ x = Math.round(x / xFactor); >+ y = Math.round(y / yFactor); >+ width = Math.round(width / xFactor); >+ height = Math.round(height / yFactor); >+ } >+ >+ /** >+ * Descales (small to big) this rect by the given x and y factors. This >+ * affects the x, y, width and height of the rect. >+ * (i.e. x:2, y:6, w:10, h:16 becomes x:4, y:12, w:20, h:32 with factor 2) >+ * >+ * @param xFactor The x factor to scale this rect by. >+ * @param yFactor The y factor to scale this rect by. >+ */ >+ public void descaleAll(int xFactor, int yFactor) { >+ x *= xFactor; >+ y *= yFactor; >+ width *= xFactor; >+ height *= yFactor; >+ } >+ >+ /** >+ * Scales (big to small) this rect by the given x and y factors. This >+ * affects the width and height of the rect only. >+ * (i.e. x:2, y:6, w:10, h:16 becomes x:2, y:6, w:5, h:8 with factor 2) >+ * >+ * @param xFactor The x factor to scale this rect by. >+ * @param yFactor The y factor to scale this rect by. >+ */ >+ public void scale(int xFactor, int yFactor) { >+ width = Math.round(width / xFactor); >+ height = Math.round(height / yFactor); >+ } >+ >+ /** >+ * Descales (small to big) this rect by the given x and y factors. This >+ * affects the width and height of the rect only. >+ * (i.e. x:2, y:6, w:10, h:16 becomes x:2, y:6, w:20, h:32 with factor 2) >+ * >+ * @param xFactor The x factor to scale this rect by. >+ * @param yFactor The y factor to scale this rect by. >+ */ >+ public void descale(int xFactor, int yFactor) { >+ width *= xFactor; >+ height *= yFactor; >+ } > } >\ No newline at end of file >Index: src/sdljava/video/SDLSurface.java >=================================================================== >RCS file: /cvsroot/sdljava/sdljava/src/sdljava/video/SDLSurface.java,v >retrieving revision 1.31 >diff -u -r1.31 SDLSurface.java >--- src/sdljava/video/SDLSurface.java 26 Jan 2005 02:52:52 -0000 1.31 >+++ src/sdljava/video/SDLSurface.java 18 Mar 2005 22:52:21 -0000 >@@ -68,7 +68,7 @@ > * > */ > GL gl; >- >+ > /** > * Creates a new <code>SDLSurface</code> instance. > * >@@ -1008,6 +1008,46 @@ > e.printStackTrace(); > } > } >+ >+ /** >+ * Returns an SDLRect which has the same size as this surface, but has >+ * topleft x and y at the given coordinates. >+ * >+ * @param x The x coordiante of the created SDLRect. >+ * @param y The y coordiante of the created SDLRect. >+ * >+ * @return An SDLRect which has the given x and y, but the width and height >+ * of the surface. >+ */ >+ public SDLRect getRect(int x, int y) { >+ return new SDLRect(x, y, getWidth(), getHeight()); >+ } >+ >+ /** >+ * Returns an SDLRect which has the same size as this surface, but has >+ * topleft x and y at 0. >+ * >+ * @return An SDLRect which has the x and y at 0, and the width and height >+ * of the surface. >+ */ >+ public SDLRect getRect() { >+ return getRect(0, 0); >+ } >+ >+ /** >+ * Returns an SDLRect which has the same size as this surface, but has >+ * topleft x and y at the position defined by the given SDLPoint instance. >+ * >+ * @param pos An SDLPoint which defines the topleft position of the new >+ * SDLRect. >+ * >+ * @return An SDLRect that has the topleft position defined in the SDLPoint. >+ * >+ * @see SDLPoint >+ */ >+ public SDLRect getRect(SDLPoint pos) { >+ return getRect(pos.getX(), pos.getY()); >+ } > > /** > * Return a string represenation of this object >Index: .settings/org.eclipse.jdt.ui.prefs >=================================================================== >RCS file: .settings/org.eclipse.jdt.ui.prefs >diff -N .settings/org.eclipse.jdt.ui.prefs >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .settings/org.eclipse.jdt.ui.prefs 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,3 @@ >+#Wed Mar 09 04:38:37 GMT 2005 >+eclipse.preferences.version=1 >+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/> > > |
From: Ivan Z. G. <iva...@ya...> - 2005-03-28 17:40:38
|
Glad you got it working ;=) Jean Fortin wrote: > I found the problem, I hadn't compiled sdljava with the correct > version of libsdl-ttf. > Now it works well :-) > > > Jean Fortin wrote: > >> Hi, >> >> When i try to run my program or the test program testttf, i have an >> error : >> >> Native code library failed to load. >> java.lang.UnsatisfiedLinkError: >> /home/jean/javasdlsrc/sdljava-0.9.1/lib/libsdljava_ttf.so: >> /home/jean/javasdlsrc/sdljava-0.9.1/lib/libsdljava_ttf.so: undefined >> symbol: TTF_OpenFontIndex >> >> I don't understand why there is this error... >> Does someone have an idea? >> >> Thanks in advance >> Jean Fortin >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> sdljava-users mailing list >> sdl...@li... >> https://lists.sourceforge.net/lists/listinfo/sdljava-users > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Jean F. <jea...@en...> - 2005-03-28 17:19:19
|
I found the problem, I hadn't compiled sdljava with the correct version of libsdl-ttf. Now it works well :-) Jean Fortin wrote: > Hi, > > When i try to run my program or the test program testttf, i have an > error : > > Native code library failed to load. > java.lang.UnsatisfiedLinkError: > /home/jean/javasdlsrc/sdljava-0.9.1/lib/libsdljava_ttf.so: > /home/jean/javasdlsrc/sdljava-0.9.1/lib/libsdljava_ttf.so: undefined > symbol: TTF_OpenFontIndex > > I don't understand why there is this error... > Does someone have an idea? > > Thanks in advance > Jean Fortin > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Jean F. <jea...@en...> - 2005-03-28 15:49:43
|
Hi, When i try to run my program or the test program testttf, i have an error : Native code library failed to load. java.lang.UnsatisfiedLinkError: /home/jean/javasdlsrc/sdljava-0.9.1/lib/libsdljava_ttf.so: /home/jean/javasdlsrc/sdljava-0.9.1/lib/libsdljava_ttf.so: undefined symbol: TTF_OpenFontIndex I don't understand why there is this error... Does someone have an idea? Thanks in advance Jean Fortin |
From: Ivan Z. G. <iva...@ya...> - 2005-03-25 15:35:22
|
Yes I would be interested to see what you've done. We really need to get some GUI support into sdljava. Lets talk when your back...Enjoy the vacation. -Ivan/ Rainer Koschnick wrote: > Ivan Z. Ganza wrote: > >> Thanks Rainer. >> >> I've renamed GLUquadratic to GLUquadric. >> >> Also I've removed the callback method from the .i (since they are not >> implemented yet anyway) and now the references to _GLUfunptr are not >> present in the file so I hope it will compile on Windows. >> >> Strange that I was able to compile here...hrmm. >> >> Please let me know if it works now. >> >> Thanks, >> -Ivan/ > > > I'm on vacation now, so I hope someone else can veify that it is > working now. When I get back in 3 weeks we may also be able to add my > guichan Java port to SDLJava if you like :) > > Cheers, > Rainer > > >> Rainer Koschnick wrote: >> >>> Ivan Z. Ganza wrote: >>> >>>> I've happy to announce that GLU support has been added to the >>>> opengl binding. Its is fully implemented _except_ for functions >>>> which involve a callback. - gluNurbsCallback - gluNurbsCallbackData >>>> - gluNurbsCallbackDataEXT - gluQuadricCallback >>>> - gluTessCallback >>>> >>>> The rest of the functions are all available. If you have a chance >>>> please give this a shot. Let me know if any problems are found. >>>> >>>> Just rebuild your libgljava.so/gljava.dll -- no other changes >>>> should be required. >>>> >>>> Thanks, >>>> -Ivan/ >>> >>> >>> >>> >>> Java class should be GLUquadric, not GLUquadratic :) >>> >>> Then I cannot build the native bindings on Windows since _GLUfuncptr >>> is never defined: >>> >>> glew_wrap.c >>> glew_wrap.c(6729) : error C2065: '_GLUfuncptr' : undeclared identifier >>> glew_wrap.c(6729) : error C2146: syntax error : missing ';' before >>> identifier 'a >>> rg3' >>> glew_wrap.c(6729) : error C2144: syntax error : '<Unknown>' should >>> be preceded b >>> y '<Unknown>' >>> glew_wrap.c(6729) : error C2144: syntax error : '<Unknown>' should >>> be preceded b >>> y '<Unknown>' >>> glew_wrap.c(6729) : error C2143: syntax error : missing ';' before >>> 'identifier' >>> glew_wrap.c(6729) : error C2065: 'arg3' : undeclared identifier >>> glew_wrap.c(6730) : error C2065: 'argp3' : undeclared identifier >>> glew_wrap.c(6730) : warning C4552: '*' : operator has no effect; >>> expected operat >>> or with side-effect >>> glew_wrap.c(6736) : error C2059: syntax error : ')' >>> glew_wrap.c(6741) : error C2100: illegal indirection >>> glew_wrap.c(6742) : warning C4047: 'function' : 'void (__stdcall >>> *)()' differs i >>> n levels of indirection from 'int' >>> glew_wrap.c(7106) : error C2146: syntax error : missing ';' before >>> identifier 'a >>> rg3' >>> glew_wrap.c(7106) : error C2144: syntax error : '<Unknown>' should >>> be preceded b >>> y '<Unknown>' >>> glew_wrap.c(7106) : error C2144: syntax error : '<Unknown>' should >>> be preceded b >>> y '<Unknown>' >>> glew_wrap.c(7106) : error C2143: syntax error : missing ';' before >>> 'identifier' >>> glew_wrap.c(7107) : warning C4552: '*' : operator has no effect; >>> expected operat >>> or with side-effect >>> glew_wrap.c(7113) : error C2059: syntax error : ')' >>> glew_wrap.c(7118) : error C2100: illegal indirection >>> glew_wrap.c(7119) : warning C4047: 'function' : 'void (__stdcall >>> *)()' differs i >>> n levels of indirection from 'int' >>> glew_wrap.c(7278) : error C2146: syntax error : missing ';' before >>> identifier 'a >>> rg3' >>> glew_wrap.c(7278) : error C2144: syntax error : '<Unknown>' should >>> be preceded b >>> y '<Unknown>' >>> glew_wrap.c(7278) : error C2144: syntax error : '<Unknown>' should >>> be preceded b >>> y '<Unknown>' >>> glew_wrap.c(7278) : error C2143: syntax error : missing ';' before >>> 'identifier' >>> glew_wrap.c(7279) : warning C4552: '*' : operator has no effect; >>> expected operat >>> or with side-effect >>> glew_wrap.c(7285) : error C2059: syntax error : ')' >>> glew_wrap.c(7290) : error C2100: illegal indirection >>> glew_wrap.c(7291) : warning C4047: 'function' : 'void (__stdcall >>> *)()' differs i >>> n levels of indirection from 'int' >>> NMAKE : fatal error U1077: 'D:\PROGRA~1\MICROS~1.NET\VC7\bin\cl.exe' >>> : return co >>> de '0x2' >>> Stop. >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon >>> 2005 >>> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows >>> Embedded(r) & Windows Mobile(tm) platforms, applications & content. >>> Register >>> by 3/29 & save $300 >>> http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click >>> _______________________________________________ >>> sdljava-users mailing list >>> sdl...@li... >>> https://lists.sourceforge.net/lists/listinfo/sdljava-users >> >> >> >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> sdljava-users mailing list >> sdl...@li... >> https://lists.sourceforge.net/lists/listinfo/sdljava-users >> >> > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Rainer K. <ar...@gm...> - 2005-03-25 12:23:06
|
Ivan Z. Ganza wrote: > Thanks Rainer. > > I've renamed GLUquadratic to GLUquadric. > > Also I've removed the callback method from the .i (since they are not > implemented yet anyway) and now the references to _GLUfunptr are not > present in the file so I hope it will compile on Windows. > > Strange that I was able to compile here...hrmm. > > Please let me know if it works now. > > Thanks, > -Ivan/ I'm on vacation now, so I hope someone else can veify that it is working now. When I get back in 3 weeks we may also be able to add my guichan Java port to SDLJava if you like :) Cheers, Rainer > Rainer Koschnick wrote: > >> Ivan Z. Ganza wrote: >> >>> I've happy to announce that GLU support has been added to the opengl >>> binding. Its is fully implemented _except_ for functions which >>> involve a callback. - gluNurbsCallback - gluNurbsCallbackData - >>> gluNurbsCallbackDataEXT - gluQuadricCallback >>> - gluTessCallback >>> >>> The rest of the functions are all available. If you have a chance >>> please give this a shot. Let me know if any problems are found. >>> >>> Just rebuild your libgljava.so/gljava.dll -- no other changes should >>> be required. >>> >>> Thanks, >>> -Ivan/ >> >> >> >> Java class should be GLUquadric, not GLUquadratic :) >> >> Then I cannot build the native bindings on Windows since _GLUfuncptr >> is never defined: >> >> glew_wrap.c >> glew_wrap.c(6729) : error C2065: '_GLUfuncptr' : undeclared identifier >> glew_wrap.c(6729) : error C2146: syntax error : missing ';' before >> identifier 'a >> rg3' >> glew_wrap.c(6729) : error C2144: syntax error : '<Unknown>' should be >> preceded b >> y '<Unknown>' >> glew_wrap.c(6729) : error C2144: syntax error : '<Unknown>' should be >> preceded b >> y '<Unknown>' >> glew_wrap.c(6729) : error C2143: syntax error : missing ';' before >> 'identifier' >> glew_wrap.c(6729) : error C2065: 'arg3' : undeclared identifier >> glew_wrap.c(6730) : error C2065: 'argp3' : undeclared identifier >> glew_wrap.c(6730) : warning C4552: '*' : operator has no effect; >> expected operat >> or with side-effect >> glew_wrap.c(6736) : error C2059: syntax error : ')' >> glew_wrap.c(6741) : error C2100: illegal indirection >> glew_wrap.c(6742) : warning C4047: 'function' : 'void (__stdcall *)()' >> differs i >> n levels of indirection from 'int' >> glew_wrap.c(7106) : error C2146: syntax error : missing ';' before >> identifier 'a >> rg3' >> glew_wrap.c(7106) : error C2144: syntax error : '<Unknown>' should be >> preceded b >> y '<Unknown>' >> glew_wrap.c(7106) : error C2144: syntax error : '<Unknown>' should be >> preceded b >> y '<Unknown>' >> glew_wrap.c(7106) : error C2143: syntax error : missing ';' before >> 'identifier' >> glew_wrap.c(7107) : warning C4552: '*' : operator has no effect; >> expected operat >> or with side-effect >> glew_wrap.c(7113) : error C2059: syntax error : ')' >> glew_wrap.c(7118) : error C2100: illegal indirection >> glew_wrap.c(7119) : warning C4047: 'function' : 'void (__stdcall *)()' >> differs i >> n levels of indirection from 'int' >> glew_wrap.c(7278) : error C2146: syntax error : missing ';' before >> identifier 'a >> rg3' >> glew_wrap.c(7278) : error C2144: syntax error : '<Unknown>' should be >> preceded b >> y '<Unknown>' >> glew_wrap.c(7278) : error C2144: syntax error : '<Unknown>' should be >> preceded b >> y '<Unknown>' >> glew_wrap.c(7278) : error C2143: syntax error : missing ';' before >> 'identifier' >> glew_wrap.c(7279) : warning C4552: '*' : operator has no effect; >> expected operat >> or with side-effect >> glew_wrap.c(7285) : error C2059: syntax error : ')' >> glew_wrap.c(7290) : error C2100: illegal indirection >> glew_wrap.c(7291) : warning C4047: 'function' : 'void (__stdcall *)()' >> differs i >> n levels of indirection from 'int' >> NMAKE : fatal error U1077: 'D:\PROGRA~1\MICROS~1.NET\VC7\bin\cl.exe' : >> return co >> de '0x2' >> Stop. >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 >> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows >> Embedded(r) & Windows Mobile(tm) platforms, applications & content. >> Register >> by 3/29 & save $300 >> http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click >> _______________________________________________ >> sdljava-users mailing list >> sdl...@li... >> https://lists.sourceforge.net/lists/listinfo/sdljava-users > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users > > |
From: Ivan Z. G. <iva...@ya...> - 2005-03-25 01:52:26
|
Thanks Rainer. I've renamed GLUquadratic to GLUquadric. Also I've removed the callback method from the .i (since they are not implemented yet anyway) and now the references to _GLUfunptr are not present in the file so I hope it will compile on Windows. Strange that I was able to compile here...hrmm. Please let me know if it works now. Thanks, -Ivan/ Rainer Koschnick wrote: > Ivan Z. Ganza wrote: > >> I've happy to announce that GLU support has been added to the opengl >> binding. Its is fully implemented _except_ for functions which >> involve a callback. - gluNurbsCallback - gluNurbsCallbackData - >> gluNurbsCallbackDataEXT - gluQuadricCallback >> - gluTessCallback >> >> The rest of the functions are all available. If you have a chance >> please give this a shot. Let me know if any problems are found. >> >> Just rebuild your libgljava.so/gljava.dll -- no other changes should >> be required. >> >> Thanks, >> -Ivan/ > > > Java class should be GLUquadric, not GLUquadratic :) > > Then I cannot build the native bindings on Windows since _GLUfuncptr > is never defined: > > glew_wrap.c > glew_wrap.c(6729) : error C2065: '_GLUfuncptr' : undeclared identifier > glew_wrap.c(6729) : error C2146: syntax error : missing ';' before > identifier 'a > rg3' > glew_wrap.c(6729) : error C2144: syntax error : '<Unknown>' should be > preceded b > y '<Unknown>' > glew_wrap.c(6729) : error C2144: syntax error : '<Unknown>' should be > preceded b > y '<Unknown>' > glew_wrap.c(6729) : error C2143: syntax error : missing ';' before > 'identifier' > glew_wrap.c(6729) : error C2065: 'arg3' : undeclared identifier > glew_wrap.c(6730) : error C2065: 'argp3' : undeclared identifier > glew_wrap.c(6730) : warning C4552: '*' : operator has no effect; > expected operat > or with side-effect > glew_wrap.c(6736) : error C2059: syntax error : ')' > glew_wrap.c(6741) : error C2100: illegal indirection > glew_wrap.c(6742) : warning C4047: 'function' : 'void (__stdcall *)()' > differs i > n levels of indirection from 'int' > glew_wrap.c(7106) : error C2146: syntax error : missing ';' before > identifier 'a > rg3' > glew_wrap.c(7106) : error C2144: syntax error : '<Unknown>' should be > preceded b > y '<Unknown>' > glew_wrap.c(7106) : error C2144: syntax error : '<Unknown>' should be > preceded b > y '<Unknown>' > glew_wrap.c(7106) : error C2143: syntax error : missing ';' before > 'identifier' > glew_wrap.c(7107) : warning C4552: '*' : operator has no effect; > expected operat > or with side-effect > glew_wrap.c(7113) : error C2059: syntax error : ')' > glew_wrap.c(7118) : error C2100: illegal indirection > glew_wrap.c(7119) : warning C4047: 'function' : 'void (__stdcall *)()' > differs i > n levels of indirection from 'int' > glew_wrap.c(7278) : error C2146: syntax error : missing ';' before > identifier 'a > rg3' > glew_wrap.c(7278) : error C2144: syntax error : '<Unknown>' should be > preceded b > y '<Unknown>' > glew_wrap.c(7278) : error C2144: syntax error : '<Unknown>' should be > preceded b > y '<Unknown>' > glew_wrap.c(7278) : error C2143: syntax error : missing ';' before > 'identifier' > glew_wrap.c(7279) : warning C4552: '*' : operator has no effect; > expected operat > or with side-effect > glew_wrap.c(7285) : error C2059: syntax error : ')' > glew_wrap.c(7290) : error C2100: illegal indirection > glew_wrap.c(7291) : warning C4047: 'function' : 'void (__stdcall *)()' > differs i > n levels of indirection from 'int' > NMAKE : fatal error U1077: 'D:\PROGRA~1\MICROS~1.NET\VC7\bin\cl.exe' : > return co > de '0x2' > Stop. > > > > ------------------------------------------------------- > This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 > Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows > Embedded(r) & Windows Mobile(tm) platforms, applications & content. > Register > by 3/29 & save $300 > http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Rainer K. <ar...@gm...> - 2005-03-24 13:49:17
|
Ivan Z. Ganza wrote: > I've happy to announce that GLU support has been added to the opengl > binding. Its is fully implemented _except_ for functions which involve a > callback. - gluNurbsCallback - gluNurbsCallbackData - > gluNurbsCallbackDataEXT - gluQuadricCallback > - gluTessCallback > > The rest of the functions are all available. If you have a chance > please give this a shot. Let me know if any problems are found. > > Just rebuild your libgljava.so/gljava.dll -- no other changes should be > required. > > Thanks, > -Ivan/ Java class should be GLUquadric, not GLUquadratic :) Then I cannot build the native bindings on Windows since _GLUfuncptr is never defined: glew_wrap.c glew_wrap.c(6729) : error C2065: '_GLUfuncptr' : undeclared identifier glew_wrap.c(6729) : error C2146: syntax error : missing ';' before identifier 'a rg3' glew_wrap.c(6729) : error C2144: syntax error : '<Unknown>' should be preceded b y '<Unknown>' glew_wrap.c(6729) : error C2144: syntax error : '<Unknown>' should be preceded b y '<Unknown>' glew_wrap.c(6729) : error C2143: syntax error : missing ';' before 'identifier' glew_wrap.c(6729) : error C2065: 'arg3' : undeclared identifier glew_wrap.c(6730) : error C2065: 'argp3' : undeclared identifier glew_wrap.c(6730) : warning C4552: '*' : operator has no effect; expected operat or with side-effect glew_wrap.c(6736) : error C2059: syntax error : ')' glew_wrap.c(6741) : error C2100: illegal indirection glew_wrap.c(6742) : warning C4047: 'function' : 'void (__stdcall *)()' differs i n levels of indirection from 'int' glew_wrap.c(7106) : error C2146: syntax error : missing ';' before identifier 'a rg3' glew_wrap.c(7106) : error C2144: syntax error : '<Unknown>' should be preceded b y '<Unknown>' glew_wrap.c(7106) : error C2144: syntax error : '<Unknown>' should be preceded b y '<Unknown>' glew_wrap.c(7106) : error C2143: syntax error : missing ';' before 'identifier' glew_wrap.c(7107) : warning C4552: '*' : operator has no effect; expected operat or with side-effect glew_wrap.c(7113) : error C2059: syntax error : ')' glew_wrap.c(7118) : error C2100: illegal indirection glew_wrap.c(7119) : warning C4047: 'function' : 'void (__stdcall *)()' differs i n levels of indirection from 'int' glew_wrap.c(7278) : error C2146: syntax error : missing ';' before identifier 'a rg3' glew_wrap.c(7278) : error C2144: syntax error : '<Unknown>' should be preceded b y '<Unknown>' glew_wrap.c(7278) : error C2144: syntax error : '<Unknown>' should be preceded b y '<Unknown>' glew_wrap.c(7278) : error C2143: syntax error : missing ';' before 'identifier' glew_wrap.c(7279) : warning C4552: '*' : operator has no effect; expected operat or with side-effect glew_wrap.c(7285) : error C2059: syntax error : ')' glew_wrap.c(7290) : error C2100: illegal indirection glew_wrap.c(7291) : warning C4047: 'function' : 'void (__stdcall *)()' differs i n levels of indirection from 'int' NMAKE : fatal error U1077: 'D:\PROGRA~1\MICROS~1.NET\VC7\bin\cl.exe' : return co de '0x2' Stop. |
From: Ivan Z. G. <iva...@ya...> - 2005-03-24 01:36:36
|
I've happy to announce that GLU support has been added to the opengl binding. Its is fully implemented _except_ for functions which involve a callback. - gluNurbsCallback - gluNurbsCallbackData - gluNurbsCallbackDataEXT - gluQuadricCallback - gluTessCallback The rest of the functions are all available. If you have a chance please give this a shot. Let me know if any problems are found. Just rebuild your libgljava.so/gljava.dll -- no other changes should be required. Thanks, -Ivan/ |
From: gian p. c. <gp....@su...> - 2005-03-22 09:15:14
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rainer Koschnick wrote: |>Hello all, |>I've tweaked the Makefile (it's in attach) to build JNI libraries under |>OSX, (I started building SDL from sources, with binary frameworks it's |>something similar) but when I try the video test I take ... | I made the necessary changes only to run into further problems. The test | applications would start and then throw a SDL parachute exploded message | after a few seconds so I guess that it needs more tweaking than that :) | | Anyway, if you want to play with this, here is what I changed: ... Thanks Rainer for your feedback, I've applied your changes and take the very same error. To escape this situation I've seen, for example, that pygame has an elaborate manner to load Sdl on OSX, perhaps it could be a reference to borrow from (I don't know if the Perl Sdl interface works under OSX, and how). Regards /gp - -- sèmm tücc padreterni, sèmm tücc ciulandari. (De Sfroos). gian paolo ciceri via g.marconi 5 - 22036 erba CO Italy mobile : ++39 340 7218101 eMail : gp....@ac..., gp....@su... webSite: http://www.suddenthinks.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCP+IW5CXmEF0gaHgRAtL8AKCXeYCDi4m+Z85eF/upsk3XFMV4HgCfUhpP tf7kQ9Fdi/7Q8KLafInlSfw= =5hOD -----END PGP SIGNATURE----- |
From: Chris D. <Des...@nt...> - 2005-03-22 03:23:27
|
Ivan Z. Ganza wrote: > The fix has been checked into cvs. Again sorry about this. > > -Ivan/ > I posted a CVS patch to the mailing list as well, which fixed a few bugs -- did you get it? -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |
From: Ivan Z. G. <iva...@ya...> - 2005-03-22 02:59:03
|
The fix has been checked into cvs. Again sorry about this. -Ivan/ Rainer Koschnick wrote: > Chris Dennett wrote: > >> Rainer Koschnick wrote: >> >>> I've been checking my code over and over again for a bug (or rather >>> undocumented feature?) which is actually in the native binding :/ >>> This costed me hours and hours. >>> >>> Why isn't this documented? SDLBlitSurface doesn't behave as it should >>> due to those changes below. >>> >>> int SWIG_SDL_BlitSurface_FAST(SDL_Surface * src, int sX, int sY, int >>> sWidth, int sHeight, SDL_Surface *dst, int dX, int dY, int dWidth, int >>> dHeight) { >>> srcBlitRect.x = (sX > -1 ? sX : 0); >>> srcBlitRect.y = (sY > -1 ? sY : 0); >>> srcBlitRect.w = (sWidth > -1 ? sWidth : 0); >>> srcBlitRect.h = (sHeight > -1 ? sHeight : 0); >>> >>> dstBlitRect.x = (dX > -1 ? dX : 0); >>> dstBlitRect.y = (dY > -1 ? dY : 0); >>> dstBlitRect.w = (dWidth > -1 ? dWidth : 0); >>> dstBlitRect.h = (dHeight > -1 ? dHeight: 0); >>> >>> return SDL_BlitSurface(src, &srcBlitRect, dst, &dstBlitRect); >>> } >>> >>> Positions _CAN_ be negative. Otherwise how are you supposed to move a >>> sprite or image outside of the screen if it is nailed to position 0? >>> >>> srcBlitRect.x = sX; >>> srcBlitRect.y = sY; >>> srcBlitRect.w = (sWidth > -1 ? sWidth : 0); >>> srcBlitRect.h = (sHeight > -1 ? sHeight : 0); >>> >>> dstBlitRect.x = dX; >>> dstBlitRect.y = dY; >>> dstBlitRect.w = (dWidth > -1 ? dWidth : 0); >>> dstBlitRect.h = (dHeight > -1 ? dHeight: 0); >>> >>> Rainer >> >> >> >> Erk, that might be a bit of a problem. See if you can make a patch >> based on the CVS source, and then submit it to this mailing list. >> > > Yes, indeed. Never used diff, but let's see how Turtoise can handle > this :) > > RCS file: /cvsroot/sdljava/sdljava/src/sdljava/native/SDLVideo.i,v > retrieving revision 1.28 > diff -u -r1.28 SDLVideo.i > --- native/SDLVideo.i 18 Feb 2005 04:21:27 -0000 1.28 > +++ native/SDLVideo.i 21 Mar 2005 06:10:19 -0000 > @@ -32,14 +32,13 @@ > // also note that we use pre-allocated SDL_Rects so no new memory > needs to be allocated > // during the blit! This means only one thread should be doing the > blits! > int SWIG_SDL_BlitSurface_FAST(SDL_Surface * src, int sX, int sY, > int sWidth, int sHeight, SDL_Surface *dst, int dX, int dY, int dWidth, > int dHeight) { > - > - srcBlitRect.x = (sX > -1 ? sX : 0); > - srcBlitRect.y = (sY > -1 ? sY : 0); > + srcBlitRect.x = sX; > + srcBlitRect.y = sY; > srcBlitRect.w = (sWidth > -1 ? sWidth : 0); > srcBlitRect.h = (sHeight > -1 ? sHeight : 0); > > - dstBlitRect.x = (dX > -1 ? dX : 0); > - dstBlitRect.y = (dY > -1 ? dY : 0); > + dstBlitRect.x = dX; > + dstBlitRect.y = dY; > dstBlitRect.w = (dWidth > -1 ? dWidth : 0); > dstBlitRect.h = (dHeight > -1 ? dHeight: 0); > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Ivan Z. G. <iva...@ya...> - 2005-03-22 02:22:19
|
Rainer, Sorry that you ran into this. I will apply the fix. -Ivan/ Rainer Koschnick wrote: > Chris Dennett wrote: > >> Rainer Koschnick wrote: >> >>> I've been checking my code over and over again for a bug (or rather >>> undocumented feature?) which is actually in the native binding :/ >>> This costed me hours and hours. >>> >>> Why isn't this documented? SDLBlitSurface doesn't behave as it should >>> due to those changes below. >>> >>> int SWIG_SDL_BlitSurface_FAST(SDL_Surface * src, int sX, int sY, int >>> sWidth, int sHeight, SDL_Surface *dst, int dX, int dY, int dWidth, int >>> dHeight) { >>> srcBlitRect.x = (sX > -1 ? sX : 0); >>> srcBlitRect.y = (sY > -1 ? sY : 0); >>> srcBlitRect.w = (sWidth > -1 ? sWidth : 0); >>> srcBlitRect.h = (sHeight > -1 ? sHeight : 0); >>> >>> dstBlitRect.x = (dX > -1 ? dX : 0); >>> dstBlitRect.y = (dY > -1 ? dY : 0); >>> dstBlitRect.w = (dWidth > -1 ? dWidth : 0); >>> dstBlitRect.h = (dHeight > -1 ? dHeight: 0); >>> >>> return SDL_BlitSurface(src, &srcBlitRect, dst, &dstBlitRect); >>> } >>> >>> Positions _CAN_ be negative. Otherwise how are you supposed to move a >>> sprite or image outside of the screen if it is nailed to position 0? >>> >>> srcBlitRect.x = sX; >>> srcBlitRect.y = sY; >>> srcBlitRect.w = (sWidth > -1 ? sWidth : 0); >>> srcBlitRect.h = (sHeight > -1 ? sHeight : 0); >>> >>> dstBlitRect.x = dX; >>> dstBlitRect.y = dY; >>> dstBlitRect.w = (dWidth > -1 ? dWidth : 0); >>> dstBlitRect.h = (dHeight > -1 ? dHeight: 0); >>> >>> Rainer >> >> >> >> Erk, that might be a bit of a problem. See if you can make a patch >> based on the CVS source, and then submit it to this mailing list. >> > > Yes, indeed. Never used diff, but let's see how Turtoise can handle > this :) > > RCS file: /cvsroot/sdljava/sdljava/src/sdljava/native/SDLVideo.i,v > retrieving revision 1.28 > diff -u -r1.28 SDLVideo.i > --- native/SDLVideo.i 18 Feb 2005 04:21:27 -0000 1.28 > +++ native/SDLVideo.i 21 Mar 2005 06:10:19 -0000 > @@ -32,14 +32,13 @@ > // also note that we use pre-allocated SDL_Rects so no new memory > needs to be allocated > // during the blit! This means only one thread should be doing the > blits! > int SWIG_SDL_BlitSurface_FAST(SDL_Surface * src, int sX, int sY, > int sWidth, int sHeight, SDL_Surface *dst, int dX, int dY, int dWidth, > int dHeight) { > - > - srcBlitRect.x = (sX > -1 ? sX : 0); > - srcBlitRect.y = (sY > -1 ? sY : 0); > + srcBlitRect.x = sX; > + srcBlitRect.y = sY; > srcBlitRect.w = (sWidth > -1 ? sWidth : 0); > srcBlitRect.h = (sHeight > -1 ? sHeight : 0); > > - dstBlitRect.x = (dX > -1 ? dX : 0); > - dstBlitRect.y = (dY > -1 ? dY : 0); > + dstBlitRect.x = dX; > + dstBlitRect.y = dY; > dstBlitRect.w = (dWidth > -1 ? dWidth : 0); > dstBlitRect.h = (dHeight > -1 ? dHeight: 0); > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Rainer K. <ar...@gm...> - 2005-03-21 06:12:02
|
Chris Dennett wrote: > Rainer Koschnick wrote: > >> I've been checking my code over and over again for a bug (or rather >> undocumented feature?) which is actually in the native binding :/ >> This costed me hours and hours. >> >> Why isn't this documented? SDLBlitSurface doesn't behave as it should >> due to those changes below. >> >> int SWIG_SDL_BlitSurface_FAST(SDL_Surface * src, int sX, int sY, int >> sWidth, int sHeight, SDL_Surface *dst, int dX, int dY, int dWidth, int >> dHeight) { >> srcBlitRect.x = (sX > -1 ? sX : 0); >> srcBlitRect.y = (sY > -1 ? sY : 0); >> srcBlitRect.w = (sWidth > -1 ? sWidth : 0); >> srcBlitRect.h = (sHeight > -1 ? sHeight : 0); >> >> dstBlitRect.x = (dX > -1 ? dX : 0); >> dstBlitRect.y = (dY > -1 ? dY : 0); >> dstBlitRect.w = (dWidth > -1 ? dWidth : 0); >> dstBlitRect.h = (dHeight > -1 ? dHeight: 0); >> >> return SDL_BlitSurface(src, &srcBlitRect, dst, &dstBlitRect); >> } >> >> Positions _CAN_ be negative. Otherwise how are you supposed to move a >> sprite or image outside of the screen if it is nailed to position 0? >> >> srcBlitRect.x = sX; >> srcBlitRect.y = sY; >> srcBlitRect.w = (sWidth > -1 ? sWidth : 0); >> srcBlitRect.h = (sHeight > -1 ? sHeight : 0); >> >> dstBlitRect.x = dX; >> dstBlitRect.y = dY; >> dstBlitRect.w = (dWidth > -1 ? dWidth : 0); >> dstBlitRect.h = (dHeight > -1 ? dHeight: 0); >> >> Rainer > > > Erk, that might be a bit of a problem. See if you can make a patch based > on the CVS source, and then submit it to this mailing list. > Yes, indeed. Never used diff, but let's see how Turtoise can handle this :) RCS file: /cvsroot/sdljava/sdljava/src/sdljava/native/SDLVideo.i,v retrieving revision 1.28 diff -u -r1.28 SDLVideo.i --- native/SDLVideo.i 18 Feb 2005 04:21:27 -0000 1.28 +++ native/SDLVideo.i 21 Mar 2005 06:10:19 -0000 @@ -32,14 +32,13 @@ // also note that we use pre-allocated SDL_Rects so no new memory needs to be allocated // during the blit! This means only one thread should be doing the blits! int SWIG_SDL_BlitSurface_FAST(SDL_Surface * src, int sX, int sY, int sWidth, int sHeight, SDL_Surface *dst, int dX, int dY, int dWidth, int dHeight) { - - srcBlitRect.x = (sX > -1 ? sX : 0); - srcBlitRect.y = (sY > -1 ? sY : 0); + srcBlitRect.x = sX; + srcBlitRect.y = sY; srcBlitRect.w = (sWidth > -1 ? sWidth : 0); srcBlitRect.h = (sHeight > -1 ? sHeight : 0); - dstBlitRect.x = (dX > -1 ? dX : 0); - dstBlitRect.y = (dY > -1 ? dY : 0); + dstBlitRect.x = dX; + dstBlitRect.y = dY; dstBlitRect.w = (dWidth > -1 ? dWidth : 0); dstBlitRect.h = (dHeight > -1 ? dHeight: 0); |
From: Chris D. <Des...@nt...> - 2005-03-21 06:03:45
|
Rainer Koschnick wrote: > I've been checking my code over and over again for a bug (or rather > undocumented feature?) which is actually in the native binding :/ > This costed me hours and hours. > > Why isn't this documented? SDLBlitSurface doesn't behave as it should > due to those changes below. > > int SWIG_SDL_BlitSurface_FAST(SDL_Surface * src, int sX, int sY, int > sWidth, int sHeight, SDL_Surface *dst, int dX, int dY, int dWidth, int > dHeight) { > srcBlitRect.x = (sX > -1 ? sX : 0); > srcBlitRect.y = (sY > -1 ? sY : 0); > srcBlitRect.w = (sWidth > -1 ? sWidth : 0); > srcBlitRect.h = (sHeight > -1 ? sHeight : 0); > > dstBlitRect.x = (dX > -1 ? dX : 0); > dstBlitRect.y = (dY > -1 ? dY : 0); > dstBlitRect.w = (dWidth > -1 ? dWidth : 0); > dstBlitRect.h = (dHeight > -1 ? dHeight: 0); > > return SDL_BlitSurface(src, &srcBlitRect, dst, &dstBlitRect); > } > > Positions _CAN_ be negative. Otherwise how are you supposed to move a > sprite or image outside of the screen if it is nailed to position 0? > > srcBlitRect.x = sX; > srcBlitRect.y = sY; > srcBlitRect.w = (sWidth > -1 ? sWidth : 0); > srcBlitRect.h = (sHeight > -1 ? sHeight : 0); > > dstBlitRect.x = dX; > dstBlitRect.y = dY; > dstBlitRect.w = (dWidth > -1 ? dWidth : 0); > dstBlitRect.h = (dHeight > -1 ? dHeight: 0); > > Rainer Erk, that might be a bit of a problem. See if you can make a patch based on the CVS source, and then submit it to this mailing list. -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |