FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SDL_Cursor and bud release mode problems

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
Nrgyzer



Joined: 12 Dec 2009
Posts: 31

PostPosted: Sun Sep 12, 2010 4:32 am    Post subject: SDL_Cursor and bud release mode problems Reply with quote

Hey guys,

I'm using bud to compile my exe file. When I'm using
Code:
bud myApp.d
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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed Sep 15, 2010 5:34 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
ponce



Joined: 12 Nov 2009
Posts: 55

PostPosted: Thu Sep 16, 2010 12:44 pm    Post subject: Reply with quote

I wonder how sscanf behave with D strings.
_________________
@p0unce | gamesfrommars
Back to top
View user's profile Send private message
Nrgyzer



Joined: 12 Dec 2009
Posts: 31

PostPosted: Fri Sep 17, 2010 10:44 am    Post subject: Reply with quote

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 Very Happy)

My current code is the following: http://pastebin.com/0g6NvkCj
Back to top
View user's profile Send private message
ponce



Joined: 12 Nov 2009
Posts: 55

PostPosted: Fri Sep 17, 2010 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Nrgyzer



Joined: 12 Dec 2009
Posts: 31

PostPosted: Fri Sep 17, 2010 11:05 am    Post subject: Reply with quote

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 Sad
Back to top
View user's profile Send private message
Nrgyzer



Joined: 12 Dec 2009
Posts: 31

PostPosted: Tue Sep 28, 2010 10:47 am    Post subject: Reply with quote

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 Sad.
Back to top
View user's profile Send private message
mutable



Joined: 22 Jun 2010
Posts: 87

PostPosted: Tue Sep 28, 2010 2:32 pm    Post subject: Reply with quote

If you can tell me, what "arrow" exactly is, maybe i can help you.
Back to top
View user's profile Send private message
Nrgyzer



Joined: 12 Dec 2009
Posts: 31

PostPosted: Wed Sep 29, 2010 11:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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