Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
23 May, 2013, 17:59:28 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2] 3   Go Down
  Print  
Author Topic: pSDL v1.0.0 -  (Read 1486 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 06:39:48
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2382


Topic starter
Total Post Ratings: +49

View Profile
« Reply #15 on: 26 June, 2012, 06:59:42 »
0

maybe currently they are very limited though I'm working to try and fix that though there is not much i can do right now

EDIT: forgot i posted this merged later post

First real complicated program on the prizm is a basic fire demo

<a href="http://www.youtube.com/watch?v=IzmdQ2B0Y1U" target="_blank">http://www.youtube.com/watch?v=IzmdQ2B0Y1U</a>

EDIT: attatched g3a of demo it should work and exit after 2.5 seconds but I'm sorry if it doesnt and please dont hold me responsible for any damage it does to you calc as i have only tested on manager software so far

* SDLTest.g3a (157.26 KB - downloaded 10 times.)
« Last Edit: 26 June, 2012, 07:43:02 by ruler501 » Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
Spenceboy98
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Today at 06:16:31
Date Registered: 17 February, 2012, 02:46:51
Location: Gaffney, South Carolina
Posts: 390


Total Post Ratings: +47

View Profile
« Reply #16 on: 26 June, 2012, 16:51:26 »
0

Looks nice. I hope you can fix all the problems there are. Grin
Logged

DERSH IMPERSHIBER!!!

NerdTests.com says I'm a Nerd King.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!
flyingfisch
I'm 1337 now!
LV10 31337 u53r (Next: 2000)
**********
Online Online

Gender: Male
Last Login: Today at 17:39:55
Date Registered: 26 August, 2011, 21:18:14
Location: OH, USA
Posts: 1497


Total Post Ratings: +74

View Profile WWW
« Reply #17 on: 26 June, 2012, 17:12:16 »
0

Looks good! What is SDL, exactly? Is it a new language or a library?
Logged




Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0
Lionel Debroux
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 15:32:36
Date Registered: 17 December, 2009, 09:37:25
Location: France
Posts: 1854

Total Post Ratings: +208

View Profile WWW
« Reply #18 on: 26 June, 2012, 18:05:32 »
0

SDL is indeed, a library (a set of libraries); it's very portable, and thousands of SDL-based games have been made for dozens of platforms Smiley
Logged

Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 06:39:48
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2382


Topic starter
Total Post Ratings: +49

View Profile
« Reply #19 on: 26 June, 2012, 19:21:07 »
0

Though i think I'll have to port SDL_image so we can use smaller images then bmp(though I'm still not sure if bmp loading works currentlly)

EDIT: since file i/o currently doesnt work I'll find a way to implement the header based images everyone else used for SDL
« Last Edit: 26 June, 2012, 19:50:56 by ruler501 » Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 06:39:48
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2382


Topic starter
Total Post Ratings: +49

View Profile
« Reply #20 on: 30 June, 2012, 18:36:30 »
0

I need some help getting basic image loading working. I use the two arrays from sourcecoders conversion to 8 bit to create the surface. the image appears to be blue shifted on everything.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SDL_Color rgb16to24(Uint16 x)
{
SDL_Color newcolor;
newcolor.b= (x & 0x1F) * 8;
        newcolor.g = ((x >> 5) & 0x2F)* 4;
    newcolor.r = ((x >> 11) & 0x1F)* 8;
return newcolor;
}

SDL_Surface* LoadSCImage(Uint16* pallete, int paletteSize, unsigned char* image, int x, int y)
{
int i, j;
SDL_Color newColors[paletteSize];
for (i = 0; i < paletteSize; i++)
{
newColors[i] = rgb16to24(pallete[i]);
}
SDL_Surface  *tempsurf = SDL_CreateRGBSurface( SDL_SWSURFACE, x, y, 8, 0,0,0,0);
for (i = 0; i < y; i++)
{
for (j=0; j < x; j++)
{
*(Uint8 *)(tempsurf->pixels + i*tempsurf->pitch + j) = image[i*x + j];
}
}
SDL_SetColors(tempsurf, newColors, 0, paletteSize);
return tempsurf;
}
Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
hoffa
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Today at 16:11:27
Date Registered: 28 May, 2011, 20:26:32
Posts: 302


Total Post Ratings: +115

View Profile
« Reply #21 on: 30 June, 2012, 20:27:02 »
0

You could use the simple image format I'm using for nSDL. The code is very short (here) and it returns a 16-bit/8-bit surface. It should require no changes to compile, and would assure some sort of compatibility between both platforms.
Logged
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 06:39:48
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2382


Topic starter
Total Post Ratings: +49

View Profile
« Reply #22 on: 30 June, 2012, 21:33:29 »
0

I think I will implement that too.
I'll be putting these in a second library called pSDLlib so that my pSDL port remains SDL and pSDLlib is an addition for easier use
thanks hoffa.
Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 06:39:48
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2382


Topic starter
Total Post Ratings: +49

View Profile
« Reply #23 on: 01 July, 2012, 15:14:14 »
0

Image Loading Cross Post from Cemetech

I couldnt get 8 bit working but heres the function that correctly loads 16 bit

1
2
3
4
5
6
7
SDL_Surface* LoadSCImage(Uint16* image, int x, int y)
{
SDL_Surface  *rimage, *tempsurf =  SDL_CreateRGBSurfaceFrom(image, x, y, 16, 2*x, PZM_RMASK16,PZM_GMASK16,PZM_BMASK16,0);
rimage = SDL_DisplayFormat(tempsurf);
SDL_FreeSurface(tempsurf);
return rimage;
}

I'll compile this and a few things from hoffa's nSDL to a seperate library when i came back to work on this in August
Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 13:23:09
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50226


Total Post Ratings: +2615

View Profile WWW
« Reply #24 on: 02 July, 2012, 05:55:58 »
0

Good luck! ALso i watched the video and it looks pretty nice Smiley. I hope this allows more games to be easily produced for this calc in the near future. Smiley
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 06:39:48
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2382


Topic starter
Total Post Ratings: +49

View Profile
« Reply #25 on: 31 July, 2012, 00:21:19 »
0

I'm back now and now I need to decide what I need to do with this project. I think that one of the main things that will need to be done is get the events to recognize all keys. If anyone knows a way to do this please tell me. I also plan on making some demo's and trying to find more efficient ways to implement some of the internal functions.

What I need help with:
Testing what keys are down for the entire prizm keyboard
Getting file i/o for bmp loading
Getting other SDL libraries working(SDL_gfx most importantly)
If I could get these things working I think it would greatly improve this library
« Last Edit: 31 July, 2012, 00:21:30 by ruler501 » Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 13:23:09
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50226


Total Post Ratings: +2615

View Profile WWW
« Reply #26 on: 31 July, 2012, 02:12:58 »
0

Welcome back. I unfortunately cannot help but hopefully someone can answer in the PRIZM section. You might need to create a separate topic, though, so people notice your question.
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Spenceboy98
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Today at 06:16:31
Date Registered: 17 February, 2012, 02:46:51
Location: Gaffney, South Carolina
Posts: 390


Total Post Ratings: +47

View Profile
« Reply #27 on: 03 January, 2013, 23:15:55 »
0

*Necropost?*
I'm guessing that progress hasn't been very good lately?
Logged

DERSH IMPERSHIBER!!!

NerdTests.com says I'm a Nerd King.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 06:39:48
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2382


Topic starter
Total Post Ratings: +49

View Profile
« Reply #28 on: 04 January, 2013, 01:13:25 »
0

I haven't done anything with it since I got back. I haven't really done much coding overall. If there are any problems or requests I'll probably look into it but I make no promises for now
Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 13:23:09
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50226


Total Post Ratings: +2615

View Profile WWW
« Reply #29 on: 04 January, 2013, 07:30:34 »
0

Hopefully you don't stop coding completely Big frown
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.301 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.