View previous topic :: View next topic |
Author |
Message |
Nrgyzer
Joined: 12 Dec 2009 Posts: 31
|
Posted: Sun Sep 12, 2010 4:32 am Post subject: SDL_Cursor and bud release mode problems |
|
|
Hey guys,
I'm using bud to compile my exe file. When I'm using the SDL_Cursor will be drawn correctly (black and white), but when I compile my app using the following command: Code: | bud myApp.d -release | the cursor is nearly transparent.
I'm using the original code, provided in the sdl documentation on http://www.libsdl.org/cgi/docwiki.cgi/SDL_CreateCursor
Thanks in advance! |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Wed Sep 15, 2010 5:34 am Post subject: |
|
|
Since no one else has responded, I'll chime in with this: we don't have enough information to deduce what the problem is. Without code, there's nothing anyone can do. Bud is horribly out of date, so it's possible that something screwy is going on with it.
I suggest you use a more up-to-date build tool, IDE, or dmd directly, and see if that solves your problem. If you are on Windows, Visual D is a fine choice. Or, fire up a debugger and see what it says. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
ponce
Joined: 12 Nov 2009 Posts: 55
|
Posted: Thu Sep 16, 2010 12:44 pm Post subject: |
|
|
I wonder how sscanf behave with D strings. _________________ @p0unce | gamesfrommars |
|
Back to top |
|
|
Nrgyzer
Joined: 12 Dec 2009 Posts: 31
|
Posted: Fri Sep 17, 2010 10:44 am Post subject: |
|
|
I compiled my game by using dmd (dmd file.d -release), but it's exactly the same problem as before.
Without "-release" flag the cursor looks like awaited. (Sorry for bad english )
My current code is the following: http://pastebin.com/0g6NvkCj |
|
Back to top |
|
|
ponce
Joined: 12 Nov 2009 Posts: 55
|
Posted: Fri Sep 17, 2010 10:54 am Post subject: |
|
|
Quote: |
cursor = SDL_CreateCursor(cast(ubyte*) data, cast(ubyte*) mask, arrow.length, arrow[0].length, hotX, hotY);
|
Maybe to convert an array to a pointer better use arrayName.ptr _________________ @p0unce | gamesfrommars |
|
Back to top |
|
|
Nrgyzer
Joined: 12 Dec 2009 Posts: 31
|
Posted: Fri Sep 17, 2010 11:05 am Post subject: |
|
|
I changed
Code: | cursor = SDL_CreateCursor(cast(ubyte*) data, cast(ubyte*) mask, arrow.length, arrow[0].length, hotX, hotY); |
to
Code: | cursor = SDL_CreateCursor(data.ptr, mask.ptr, arrow.length, arrow[0].length, hotX, hotY); |
... but the nothing changed |
|
Back to top |
|
|
Nrgyzer
Joined: 12 Dec 2009 Posts: 31
|
Posted: Tue Sep 28, 2010 10:47 am Post subject: |
|
|
Nobody can help or reconstruct this problem? I tried many different argument combinations with bud and dmd compiler, but the result is always the same . |
|
Back to top |
|
|
mutable
Joined: 22 Jun 2010 Posts: 87
|
Posted: Tue Sep 28, 2010 2:32 pm Post subject: |
|
|
If you can tell me, what "arrow" exactly is, maybe i can help you. |
|
Back to top |
|
|
Nrgyzer
Joined: 12 Dec 2009 Posts: 31
|
Posted: Wed Sep 29, 2010 11:50 am Post subject: |
|
|
Thats my cursor:
Code: | static const char[][] default_arrow = [
"111 ",
"10011 ",
"1010011 ",
"101110011 ",
" 1011110011 ",
" 101111110011 ",
" 10111111110011 ",
" 101111111110011 ",
" 10111111111110011 ",
" 1011111111111110011 ",
" 10111111111111110011 ",
" 1011111111111111110011 ",
" 101111111111111111110011 ",
" 1011111111111111111110011 ",
" 101111111111111111111110011 ",
" 1011111111111111111111111001",
" 101111111100000000000000001",
" 10111111110111111111111111 ",
" 101111111101 ",
" 1011111101 ",
" 1011111101 ",
" 1011111101 ",
" 10111101 ",
" 10111101 ",
" 10111101 ",
" 101101 ",
" 101101 ",
" 101101 ",
" 1001 ",
" 1001 ",
" 1001 ",
" 11 ",
]; |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|