| Author |
Message |
benny7440

Joined: 20 Apr 2009 Posts: 305
|
Posted: Sat 25 Aug 2012, 16:50 Post subject:
Need to manage cursor position & other things fron c program Subject description: Was overviewing my threads for SDL but didn't find it... |
|
... someone somewhere gave me the advise to d/l SDL for having those capabilities as to include some special characters anywhere in the screen with an arbitrary orientation: I started many months ago a game that needs the whole screen, putting there at some spots a graphic in one of the possible orientations & changing the background color without loosing any characters or graphics already there.
The problem I had then was caused by myself for deleting everything that included "glade" in its name (blindly). So, I stopped for about 2 months my c program until I managed my mess. Finally I did d/l a newer version of Puppy Linux (528.005) but didn't continued my c program. Now I want to finish it before I completely forget all/most of what I've learned.
I asked more or less the same thing many months ago but failed to receive any replies to it, that post is at: http://www.murga-linux.com/puppy/viewtopic.php?t=77874
Where I can go to learn what other/new commands Iĺl have with SDL? Do I need something extra apart from SDL?
Thanks to all!
_________________ Sony VAIO VGN AR250G Notebook + 512MB RAM.
Need color of cables of 2 connectors at top & down side of Dell monitor 1704FPTt (look through vents at right side at the back)
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 26 Aug 2012, 23:33 Post subject:
|
|
What exactly are you wanting to do? Get cursor position, warp it to a specific location,...? And what other stuff.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Mon 27 Aug 2012, 01:18 Post subject:
|
|
The SDL man-pages holds loads of info: | Code: | SDL_WarpMouse(3) SDL API Reference SDL_WarpMouse(3)
NAME
SDL_WarpMouse - Set the position of the mouse cursor.
SYNOPSIS
#include "SDL.h"
void SDL_WarpMouse(Uint16 x, Uint16 y);
DESCRIPTION
Set the position of the mouse cursor (generates a mouse motion event).
SEE ALSO
SDL_MouseMotionEvent
SDL Tue 11 Sep 2001, 23:01 SDL_WarpMouse(3) |
Depending on you project you might need other SDL-libs (SDL_mixer/SDL_net/SDL_GUI/SDL_image)...
|
|
Back to top
|
|
 |
benny7440

Joined: 20 Apr 2009 Posts: 305
|
Posted: Mon 27 Aug 2012, 15:12 Post subject:
|
|
Thanks, technosaurus & goingnuts, for replying!
My program is for playing dominoes against the "machine' & for that I need an array of graphics to show at the screen; it would not hurt if I could include some sound files there, too.
About the SDL links to visit, that will have to wait until a thunderstorm near my home goes away; probably tonight might be a good moment, sorry... I'll post anything regarding this last thing after reading about it.
_________________ Sony VAIO VGN AR250G Notebook + 512MB RAM.
Need color of cables of 2 connectors at top & down side of Dell monitor 1704FPTt (look through vents at right side at the back)
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Mon 27 Aug 2012, 22:06 Post subject:
|
|
I wrote a really stupid simple game framework in gtk (It compiles to ~2kb) that just draws images, lines, shapes, text ... (anything supported by svg) and returns all locations of mouse clicks and key presses.
http://www.murga-linux.com/puppy/viewtopic.php?t=80352
I designed it for use with scripting languages like bash, lua, tcl, perl, python etc... but it will work with anything that can read streams (like stdin) and can write files (for instance game.svg) ... should work great for dominoes. If you aren't dead set on SDL, feel free to use it as is or adapt it -- released to public domain or any OSI approved license with no warranty.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
|