CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 113 users online: 6 members, 79 guests and 28 bots.
Members: ACagliano, DShiznit, flyingfisch, rcfreak0.
Bots: Spinn3r (3), MSN/Bing (1), Magpie Crawler (4), Googlebot (20).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
Author Message
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 21 Mar 2012 10:27:54 pm    Post subject: [Prizm] Paint

Okay, I now understand the SDK, and my last idea, Pokemon was already being implemented, I have decided to make an add-in actually worth having. Prizm Paint. I tried this in Prizm basic, but it was too slow and lacked the colors C is able to use. I also got this idea while playing around with Merth's game of life. So I will make paint. This will include:
-Clearing
-Lines
-Pixels
-Eraser tool
-Flashing Cursor?
-Nice range of Colors
-Paint bucket? (fill)
-Saved pictures?
-Stamps?
-BASIC-compatible pic files?
-Any more I think of
Ideas marked with ? means maybe. Any ideas,concerns, or comments?


Last edited by zeldaking on 25 Mar 2012 02:26:23 pm; edited 2 times in total
Back to top
Spenceboy98


Super-Expert


Joined: 06 Jan 2012
Posts: 823
Location: In the TARDIS

Posted: 21 Mar 2012 10:52:29 pm    Post subject:

Sounds cool.

Idea: Stamps. Like a smiley face or a check mark or something.
_________________
DERSH IMPERSHIBER!
Back to top
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 21 Mar 2012 10:55:26 pm    Post subject:

Ha I like that idea. Sure I'll think about it when I get to that part. Hey Spencer, since you were the first to comment would you like to be my tester? To see if you like it etc. You will be in the credits.
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55751
Location: Earth, Sol, Milky Way

Posted: 21 Mar 2012 11:19:32 pm    Post subject:

Sounds like a fun program, I hope you follow through! And I'm sure that even if Eiyeron is still working on his Prizm Pokemon game, that he'd welcome some assistance in putting it together after or while you're working on this project.
_________________


Back to top
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 21 Mar 2012 11:33:02 pm    Post subject:

On a different subject I have a question about some code. I will post the code and ask the question after.

Code:

//headers go here
int PRGM_Getkey();
define true=1;
int gKey=0;
void keymenu();
int main(void) {
while(true) {
if(PRGM_Getkey()==KEY_PRGM_MENU) {
keymenu();
}
//getkey code
}
return 0;
}
void keymenu(void);
int key=KEY_PRGM_MENU;
GetKey(&key);
}
int PRGM_Getkey() {
unsigned char buffer[12]
PRGM_GetKey_OS(buffer);
return( buffer[1] & 0×0F)*10+((buffer[2] & 0×F0) ››4);
}

Okay where it says 'getkey code' I am trying to get the getkey to see what key is pressed, and store it to 'int gKey'. Similair to the 'getkey' command in prizm basic. Would I do this?

Code:

gKey=PRGM_Getkey();
if gKey=KEY_PRGM_UP {
//do this
}

Will that work? Is 'KEY_PRGM_UP' correct?
Thanks for the help in advanced.
Back to top
Ashbad


... I think redheaded girls are kind of cool


Joined: 01 Dec 2010
Posts: 2418
Location: Stomp Stomp Stomp, The Idiot Convention

Posted: 22 Mar 2012 06:02:26 am    Post subject:

Well, first, you should really tab in your code; non-tabbed code is hard to read. As for checking for the last pressed key using PRGM_GetKey:


Code:
if(PRGM_GetKey()==KEY_PRGM_UP) {
   // do this
}


I really, really, really suggest everyone stop using PRGM_GetKey though. I honestly consider it to be almost purely obsolete, except for the fact that it's one of the fastest getkey methods that actually works on an emulator (the ones that access the keyboard register aren't emulated correctly). For better, faster on-the-fly key checking, consider checking out PierottLL's routine ( http://www.cemetech.net/forum/viewtopic.php?t=6114&postdays=0&postorder=asc&start=104 ) or my set of routines based on his routine that allow for debouncing too: ( http://prizm.cemetech.net/index.php?title=Debouncing_Multiple-Keypress_PRGM_GetKey )
_________________
-Ashbad
Back to top
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 22 Mar 2012 10:55:01 am    Post subject:

So this is better?

Code:

//headers go here 
int PRGM_Getkey(); 
define true=1; 
int gKey=0; 
void keymenu(); 
int main(void) { 
  while(true) { 
     if(PRGM_Getkey()==KEY_PRGM_MENU) { 
       keymenu(); 
     } 
    gKey=keydown();
    if gKey==27 {
      //do this
    {
  } 
return 0; 

void keymenu(void)
{
  int key=KEY_PRGM_MENU; 
  GetKey(&key); 
}
int keydown(int basic_keycode) 

   const unsigned short* keyboard_register = (unsigned short*)0xA44B0000; 
   int row, col, word, bit; 
   row = basic_keycode%10; 
   col = basic_keycode/10-1; 
   word = row>>1; 
   bit = col + 8*(row&1); 
   return (0 != (keyboard_register[word] & 1<<bit)); 
}
Back to top
Ashbad


... I think redheaded girls are kind of cool


Joined: 01 Dec 2010
Posts: 2418
Location: Stomp Stomp Stomp, The Idiot Convention

Posted: 22 Mar 2012 02:14:05 pm    Post subject:

No, you're not using keydown correctly. To check for the up key being pressed, use it like "keydown(KEY_PRGM_UP)". The return value is 0 if it's released, non-zero if it is pressed.
_________________
-Ashbad
Back to top
Spenceboy98


Super-Expert


Joined: 06 Jan 2012
Posts: 823
Location: In the TARDIS

Posted: 22 Mar 2012 02:27:24 pm    Post subject:

Sure! I'll be a tester! I like testing things. Smile
_________________
DERSH IMPERSHIBER!
Back to top
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 22 Mar 2012 07:14:35 pm    Post subject:

Spenceboy98 wrote:
Sure! I'll be a tester! I like testing things. Smile

Thanks, this might take awhile as I am new to this. So just be patient.
Back to top
Calculator


Newbie


Joined: 19 Apr 2011
Posts: 29

Posted: 25 Mar 2012 02:11:38 pm    Post subject:

It would be great if your Paint program included an easy way to draw pixel-by-pixel and to save in BASIC-compatible pic files. That would make drawing pictures for my programs a lot easier!
Back to top
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 25 Mar 2012 02:25:48 pm    Post subject:

Calculator: That is an awesome idea! Although I don't know if the memory functions in C allow to intermingle with the Pictures. I will look into that.
Back to top
Purobaz


Advanced Newbie


Joined: 26 Nov 2011
Posts: 67
Location: France

Posted: 26 Mar 2012 10:40:59 am    Post subject:

Calculator wrote:
It would be great if your Paint program included an easy way to draw pixel-by-pixel and to save in BASIC-compatible pic files. That would make drawing pictures for my programs a lot easier!

You can use this one Wink
_________________
Back to top
Spenceboy98


Super-Expert


Joined: 06 Jan 2012
Posts: 823
Location: In the TARDIS

Posted: 02 Apr 2012 10:27:33 pm    Post subject:

Is there any progress on this? Or are you too preoccupied with the tutorial?
_________________
DERSH IMPERSHIBER!
Back to top
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 02 Apr 2012 10:32:41 pm    Post subject:

Well since I do not own a computer, I use my mom's laptop. But since I have been hugely preoccupied with work, I haven't had the time to program. My mom only let's me on to program only if everything is done, so I code here and there while doing homework. After April 14, I will have time to code.
Back to top
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 10 Apr 2012 09:50:52 am    Post subject:

Update: I have had little time but I went ahead and made the icon for paint. Any suggestions, comments?
Unselected:

Selected:
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55751
Location: Earth, Sol, Milky Way

Posted: 10 Apr 2012 09:52:02 am    Post subject:

Very nice! What's with the terrible aliasing around the edges of the icon, though? Sad What's your image editor of choice?
_________________


Back to top
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 10 Apr 2012 09:57:57 am    Post subject:

Haha yeah I noticed that also, MS Paint. I will go do that right now.
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55751
Location: Earth, Sol, Milky Way

Posted: 10 Apr 2012 10:00:25 am    Post subject:

zeldaking wrote:
Haha yeah I noticed that also, MS Paint. I will go do that right now.
Your life will be much, much better if you use the GIMP. Wink I assume you're using the templates from the Icon Design Guidelines topic?
_________________


Back to top
zeldaking


Power User


Joined: 31 Jul 2011
Posts: 470
Location: Utah

Posted: 10 Apr 2012 10:01:20 am    Post subject:

GIMP? Hmm I will look into that. Yup yup, I think.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2, 3, 4  Next
» View previous topic :: View next topic  
Page 1 of 4 » All times are GMT - 5 Hours

 
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

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.033458 seconds.