Huh... I copied the .ini file from a graphic example, changed the info inside it and set the palette before sprite functions. It still does it... Not sure if I need to change this line to something:

Code:
#Palette  : xlibc
Unicorn wrote:
Huh... I copied the .ini file from a graphic example, changed the info inside it and set the palette before sprite functions. It still does it... Not sure if I need to change this line to something:

Code:
#Palette  :xlibc

That sets the palette to xlibc. Just delete that line Smile

Some updates that will help you with everything:

1) The user-end libraries had a few small bugs that have been fixed and updated. No one would have noticed them yet anyway.
2) The SDK now consists of a single folder. No need to download the libraries and move folders around; libraries are now integrated into the toolchain along with the demos
3) graphc now generates a warning when you try to compile with it. "nice" deprecation, I guess Razz

Relevant Links:
https://github.com/CE-Programming/toolchain/releases/latest
https://github.com/CE-Programming/libraries/releases/latest
Minor makefile update that fixes outputting of icons correctly:

https://github.com/CE-Programming/toolchain/releases/latest
Minor update to the makefile to fix some spelling errors and make time issues that occasionally happened. Should work better on Linux too, @Unicorn Smile

https://github.com/CE-Programming/toolchain/releases/latest
Minor makefile update that properly fixes a race condition if your computer is fast... Haha Razz

https://github.com/CE-Programming/toolchain/releases/latest
A few neat new things with the toolchain that should help you debug your programs a little easier. You can now set up memory watchpoints in your code to look at the what the value of certain variables are in your program as it executes, in addition to being able to set execution breakpoints, for example on functions, and then see what all the variables you are debugging values' are. This is super helpful I should think, along with the ability to print directly to the console, so I hope you all enjoy it Smile It needs the latest build of CEmu to work.

demo_4 of the toolchain provides a working example of how to set your own variable watchpoints, how to clean up, and more.

In CEdev/include/c/debug.h, you will find all the prototypes in the commented sections which will aid you further in the debugging process. Please note the layout is intended; you can control if any of the debugging functions and calls get compiled into your program simply be changing DEBUG ?= NDEBUG to DEBUG ?= DEBUG in the makefile. There's no need to delete the functions in your code, as this just takes lots of time to sort out.

Enjoy Smile

Toolchain:
https://github.com/CE-Programming/toolchain/releases/latest

CEmu:
http://pimathbrainiac.me/CEmu/
So I went to install this, and it currently is really confusing. KermM helped me out by telling me that all the libraries are now BAKED into the tool chain download. But not the repository. This is really irking me. Why is this stuff not segmented anymore? or rather why is the tool chain readme not specifying this so that us end user's do not have to scratch our heads in confusion why the readme's make no sense. It is nice to have it all in one place, do not get me wrong. It also just makes it kinda hard to stay on bleeding edge. I have to trust the repo maintainer to update things for me right now, which honestly also irks me I should have the ablity as a developer to just pull updates and face repercussions instead of getting a curated release for everything.

It is late. I've had a long couple week. You are doing amazing work not here to complain about that. But yeah.


Ignore this I'm dumb....it has been a long few weeks over here.
Is there anything that explains the use of each function in the library headers? For example, in the graphx.h header, there is a function:

/**
* Initializes the graphics setup
* Set LCD to 8bpp mode and loads the default palette
*/
int gfx_Begin(gfx_mode_t mode);

Right before it, the Header does this:

typedef enum gfx_mode {
gfx_8bpp = 0x27
} gfx_mode_t;

So that explains the parameters for the gfx_Begin(), but every time I use it in my program and put the program in CEmu, it RAM clears. Help.
Can't help you since you haven't been following along the many, many demos that illustrate each function of all the libraries, along with comments. Also, none of your code is provided. Please try to be more concrete next time, thanks Smile
i.e., take a look at all the graphx examples here, it should help quite a bit.
Adriweb wrote:
i.e., take a look at all the graphx examples here, it should help quite a bit.


So, I took a look at the demo's, and I noticed I was missing a lot of the header's so I added them in. Then I decided to just have the program open up the graphics, wait till a key was pressed, then close. CEmu still RAM cleared. Here's my code. What am I doing wrong?


Code:

/* Keep these headers */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>

/* Standard headers - it's recommended to leave them included */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* Shared libraries */
#include <lib\ce\graphx.h>

int main()
{
    gfx_Begin(gfx_8bpp);
    while( !os_GetCSC() );
    gfx_End();
    prgm_Cleanup();
    return 0;
}
You might want to change int main() to void main(void), like the template suggests, but make sure you have the graphx library selected in the makefile:


Code:

#Add shared library names to the L varible, for instance:
# L := graphx fileioc keypadc
L := graphx fileioc keypadc    <----- Here


The marked spot may be blank, according to where you grabbed your makekfile.
It worked but I had to take out prgm_Cleanup(), I don't know why, but the linker just wouldn't take it. Also, I used convPNG for a map that I'm using, yet it kept giving me this error code:

WARNING (731) - - > File "obj\map.obj" is not found.

The map.c and map.h were in a file folder called Map, inside the src file folder. I think it might be the fact that the map is too big. It's 826 x 511. Is there a way to size that down, and what would the max pixels be?

Edit:
Figured it out. You don't change the #GroupC: in the convpng.ini file. Funny.
Also, this may or may not have been the problem, but you have to specify the folder that you use for graphics in the makefile.
The problem is you are incorrectly using prgm_CleanUp(). It's case sensitive. Wink Which you would have noticed from the demos.
MateoConLechuga wrote:
The problem is you are incorrectly using prgm_CleanUp(). It's case sensitive. Wink Which you would have noticed from the demos.

That makes sense now. Thank you
Is it possible that there will be a way to erase sprites using a function, in the future?
What do you mean by "erase sprites" precisely ? Erase sprite data, or more probably, reset the pixels from a sprite from a screen buffer to some color (equivalent of the B/W or grayscale XOR mode) ?
Lionel Debroux wrote:
What do you mean by "erase sprites" precisely ? Erase sprite data, or more probably, reset the pixels from a sprite from a screen buffer to some color (equivalent of the B/W or grayscale XOR mode) ?

Reset the pixels. By what you said, it seams there is a way to do that.
seanlego23 wrote:
Lionel Debroux wrote:
What do you mean by "erase sprites" precisely ? Erase sprite data, or more probably, reset the pixels from a sprite from a screen buffer to some color (equivalent of the B/W or grayscale XOR mode) ?

Reset the pixels. By what you said, it seams there is a way to do that.

Um, just redraw the screen using double buffering or erase the sprite using a rectangle or something. Double buffering prevents bad graphical artifacts. Experiment; honestly there is more power in these libs than most early game systems.
  
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 Previous  1, 2, 3 ... 6, 7, 8 ... 15, 16, 17  Next
» View previous topic :: View next topic  
Page 7 of 17
» All times are UTC - 5 Hours
 
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

 

Advertisement