Post some C samples
This is a discussion on Post some C samples within the Developer's Dungeon forums, part of the PSP Development Forum category; Here is an elipse drawing routine I flogged from a LUA thread in this area and converted it to C, ...
-
08-04-2006, 08:41 AM #1Bush Programmer

- Registriert seit
- Nov 2005
- Beiträge
- 3.658
- Points
- 60.149
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Post some C samples
Here is an elipse drawing routine I flogged from a LUA thread in this
area and converted it to C, and fixed that rouge pixel that hangs out
the right hand side of smaller circles/elipses. I also modified so you define
the center instead of top left corner.
Cheers,Code:void draw_elipse() { int exx = centerx - mma; int eyy = centery - mma; int x0 = exx+(mma); int y0 = eyy+(mma); int stretch = mma + mma; int theta; for(theta=0; theta<60; theta++) { xo = (cos(theta)*stretch)+x0; yo = (sin(theta)*mma)+y0; DRAW PIXEL HERE xo,yo } xo = tballx + stretch; yo = tbally; DRAW BLANK (coverup) PIXEL HERE xo,yo }
Art.
Geändert von dbrums13 (04-12-2013 um 02:06 PM Uhr)
-
08-22-2006, 05:29 AM #2Developer

- Registriert seit
- Jun 2005
- Ort
- New Zealand
- Beiträge
- 171
- Points
- 5.478
- Level
- 47
- Downloads
- 0
- Uploads
- 0
Here is a class to wrap it up in (for any O.O. nuts like me :P)
Then you should be able to do this:Code:#ifndef CELLIPSE_H #define CELLIPSE_H class CEllipse { public: CEllipse(); CEllipse(CEllipse* Ellipse); CEllipse(int X, int Y, int Radius); void Draw(); void MoveTo(int X, int Y); void Resize(int Radius); float Circumference(); float Area(); private: int mRadius; int mX, mY; }; CEllipse() { this->mRadius = 0; this->mX = 0; this->mY = 0; } CEllipse(CEllipse* Ellipse) { this->mRadius = Ellipse->mRadius; this->mX = Ellipse->mX; this->mY = Ellipse->mY; } CEllipse(int X, int Y, int Radius) { this->mRadius = Radius; this->mX = X; this->mY = Y; } CEllipse::Draw() { // Drawing code... } CEllipse::MoveTo(int X, int Y) { this->mX = X; this->mY = Y; } CEllipse::Resize(int Radius) { this->mRadius = Radius; } float CEllipse::Circumference() { return this->mRadius * 6.28; } float CEllipse::Area() { return this->mRadius * this->mRadius * 3.14; } #endif
Sorry for any errors, it's early in the morningCode:#include "CEllipse.h" int main() { CEllipse* firstEllipse = new CEllipse(50, 65, 20); CEllipse* secondEllipse = new CEllipse(firstEllipse); firstEllipse->MoveTo(60,50); secondEllipse->Resize(25); firstEllipse->Draw(); secondEllipse->Draw(); delete firstEllipse; delete secondEllipse; return 0; }
-
08-22-2006, 07:03 AM #3Party at Las Noches!

- Registriert seit
- Jun 2005
- Ort
- Florida
- Beiträge
- 1.648
- Points
- 14.973
- Level
- 79
- Downloads
- 0
- Uploads
- 0
Come on a thread for C Samples and no one decided to put Hello World lol :ROFL:Code:#include <pspkernel.h> #include <pspdebug.h> #include <pspctrl.h> #define printf pspDebugScreenPrintf PSP_MODULE_INFO("Hello World", 0, 1, 1); int exit_callback(int arg1, int arg2, void *common); int CallbackThread(SceSize args, void *argp); int SetupCallbacks(void); int main() { SetupCallbacks(); pspDebugScreenInit(); SceCtrlData pad; int exit = 0; printf("Hello World\n\n"); printf("Press X to continue...\n"); while(exit == 0){ sceCtrlReadBufferPositive(&pad, 1); if (pad.Buttons & PSP_CTRL_CROSS) { exit = 1; } } sceKernelExitGame(); return 0; } int exit_callback(int arg1, int arg2, void *common) { sceKernelExitGame(); return 0; } int CallbackThread(SceSize args, void *argp) { int cbid; cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL); sceKernelRegisterExitCallback(cbid); sceKernelSleepThreadCB(); return 0; } int SetupCallbacks(void) { int thid = 0; thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0); if(thid >= 0) { sceKernelStartThread(thid, 0, 0); } return thid; }Geändert von IchigoKurosaki (08-23-2006 um 04:02 PM Uhr)
-
08-23-2006, 11:06 AM #4Developer

- Registriert seit
- Sep 2005
- Ort
- Sweden
- Beiträge
- 941
- Points
- 10.075
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Ichigo, you know that you have done some basic faults in your code?
- You don't need stdlib.h and string.h for a program like this
- You have forgot to declare what the pad is (use SceCtrlData pad; )
- You have forgot pspDebugScreenInit(); so if you were to compile it you wouldn't see any text...
I don't know why you have all your functions after the main one but I guess that is just your way of programming.
And I think it would be easier if you would just use sceKernelExitGame(); directly after the if (pad.Buttons & PSP_CTRL_CROSS) so you don't need to use any integers. But that is just me. =P
/SodRGeändert von SodR (08-23-2006 um 11:29 AM Uhr) Grund: Automerged Doublepost
-
08-23-2006, 11:21 AM #5is not posting very often

- Registriert seit
- Feb 2006
- Ort
- omnipresent
- Beiträge
- 5.162
- Points
- 33.152
- Level
- 100
- Downloads
- 0
- Uploads
- 0
i put the exit callbacks as the first functions
What did we think the world would look like in 2015?
http://forums.qj.net/501501-post26.html
Zitat von Abe
-
08-23-2006, 01:04 PM #6Developer

- Registriert seit
- Jun 2005
- Ort
- At my house...
- Beiträge
- 886
- Points
- 8.360
- Level
- 61
- Downloads
- 0
- Uploads
- 0
One of the first thread made here: http://forums.qj.net/f-developers-du...ets-15462.html
Had only 3 exaples tho :P
F.A.L.O?
-
08-26-2006, 11:51 AM #7sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
SG57's collision function:
edit- Another collision by me (mainly)Code:// Based of Ravines extern int CollisionDetection(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2) { int Collide = 0; if ((y2 >= y1 && y1 + h1 >= y2) || (y2 + h2 >= y1 && y1 + h1 >= y2 + h2) || (y1 >= y2 && y2 + h2 >= y1) || (y1 + h1 >= y2 && y2 + h2 >= y1 + h1)) { if (x2 >= x1 && x1 + w1 >= x2) { Collide = 1; } if (x2 + w2 >= x1 && x1 + w1 >= x2 + w2) { Collide = 1; } if (x1 >= x2 && x2 + w2 >= x1) { Collide = 1; } if (x1 + w1 >= x2 && x2 + w2 >= x1 + w1) { Collide = 1; } } return Collide; }Arguments:Code://basis from code by canadarox int function hitTest(int ob1x,int ob1y,int ob1width,int ob1height,int ob2x,int ob2y,int ob2width,int ob2height) { int hit = 0; if ((ob1x >= ob2x && ob1x <= (ob2x+ob2width)) && (ob1y >= ob2y & ob1y <= (ob2y+ob2height))) { hit = 1; } if (((ob1x+ob1width) >= ob2x && (ob1x+ob1width) <= (ob2x+ob2width)) && (ob1y >= ob2y & ob1y <= (ob2y+ob2height))) { hit = 1; } if ((ob1x >= ob2x && ob1x <= (ob2x+ob2width)) && ((ob1y+ob1height) >= ob2y && (ob1y+ob1height) <= (ob2y+ob2height))) { hit = 1; } if (((ob1x+ob1width) >= ob2x && (ob1x+ob1width) <= (ob2x+ob2width)) & ((ob1y+ob1height) >= ob2y && (ob1y+ob1height) <= (ob2y+ob2height))) { hit = 1; } return hit; }
ob1x = first object's x position
ob1y = first object's y position
ob1width = first object's width
ob1height = first object's height
ob2x = second object's x position
ob2y = second object's y position
ob2width = second object's width
ob2height = second objects height
-= Double Post =-
a simple bare bones menu. Sorry if there are any errors.
Code:#define BGR(r,g,b) ((r) | ((g) << 8) | ((b) << 16)); #define red BGR(255,0,0); #define black BGR(0,0,0); #define white BGR(255,255,255); #define blue BGR(0,0,255); int menustatus = 1; pspDebugScreenClear(); sceCtrlReadBufferPositive(&pad, 1); if(pad.Buttons & PSP_CTRL_UP) { menustatus = menustatus--; sceDisplayWaitVblankStart(); } if{Pad.Buttons & PSP_CTRL_DOWN) { menustatus = menustatus++; sceDisplayWaitVblankStart(); } pspDebugScreenSetTextColor(white); printTextScreen(50, 50, "Play"); pspDebugScreenSetTextColor(blue); printTextScreen(50,60,"Options"); pspDebugScreenSetTextColor(red); printTextScreen(50,70,"Exit"); if( menustatus == 1 ) { if (pad.Buttons & PSP_CTRL_CROSS) { //insert game code here } } if( menustatus == 2 ) { if (pad.Buttons & PSP_CTRL_CROSS) { //insert game code here } } if( menustatus == 1 ) { if (pad.Buttons & PSP_CTRL_CROSS) { break; } } if (menustatus <= 0) { menustatus = 3; } if (menustatus => 4) { menustatus = 1; }Geändert von Bronx (08-26-2006 um 02:22 PM Uhr) Grund: Automerged Doublepost
-
08-26-2006, 01:03 PM #8
This is a nice thread, I will have a look and see what code I can add to it.
-= Double Post =-
This is taken from the XArt Graphics library
This code will draw a circle and with a few little tweeks can be made into a Ellipse drawing function
you will need to create a xsGfxDrawPixel function to draw pixels on the screen
handy tip, do not use sin & cos functions for graphics, only use sin & cos for creating fix point math integer lookup tables for dealing with sin & cosCode:void xsGfxDrawCircle(int x, int y, int r, UInt32 color) { int i=0; int j=r; int p=3 - 2 * r; while(i <= j) { xsGfxDrawPixel(x+i,y+j,color); xsGfxDrawPixel(x-i,y+j,color); xsGfxDrawPixel(x+i,y-j,color); xsGfxDrawPixel(x-i,y-j,color); xsGfxDrawPixel(x+j,y+i,color); xsGfxDrawPixel(x-j,y+i,color); xsGfxDrawPixel(x+j,y-i,color); xsGfxDrawPixel(x-j,y-i,color); if(p < 0) { p += 4 * i++ + 6; } else { p += 4 * (i++ - j--) + 10; } } }
Next post will be a thread for having a mouse pointer with X used for mouse down,mouse up etc events in your own appsGeändert von Hardrive (04-11-2007 um 01:53 PM Uhr) Grund: Automerged Doublepost
-
09-02-2006, 03:47 PM #9
Playstation Portable SDK for Xcode with SDL
At the moment I have just about completed the graphics part.
when completed this will allow you to develope user mode homebrew on your Mac and run it on a Mac and then run it on a actual PSP when ready.
it will be open source
-
09-03-2006, 10:04 AM #10
I am working on mirroring the sce file functions to work on the Mac, so sce function calls for file io stuff will work like it was on a PSP
including the ms0:/
when you have ms0:/ in your path names it will be handled as ./ on Mac OS X
-
09-06-2006, 02:42 PM #11
the SDL has just some basic ObjectiveC code in it to make things like mouse events etc work, all other stuff is in C or C++ and I will be sorting it out soon on the server to be downloaded so others can help out if they like
xsFile is what I am at, also be working on xsImage
these librarys were written for the PSP in user mode.
not yet desided what I will replace xs with as it will be open source so not all will be done by me at the end.
maybe "os" for open source
or "x" for cross platform
or could just take away xs and rename functions like xsGfxInit to gfxInit etc...
xsImgLoad to imgLoad.......
-
09-06-2006, 02:44 PM #12sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
ok, great :)
What server though?
-
09-06-2006, 02:55 PM #13
http://www.xart.co.uk/downloads/PSP.zip
feel free to have a look.
-
09-06-2006, 03:16 PM #14OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
for anyone who has the standard graphics.c, and is looking to load images directly from memory, rather than from a file -
Maybe someone can find this useful?Code:typedef struct { const unsigned char *buffer; png_uint_32 bufsize; png_uint_32 current_pos; } MEMORY_READER_STATE; static void read_data_memory(png_structp png_ptr, png_bytep data, png_uint_32 length) { MEMORY_READER_STATE *f = (MEMORY_READER_STATE *)png_get_io_ptr(png_ptr); if (length > (f->bufsize - f->current_pos)) png_error(png_ptr, "read error in read_data_memory (loadpng)"); memcpy(data, f->buffer + f->current_pos, length); f->current_pos += length; } Image* loadImageMemory(const void *buffer, int bufsize) { png_structp png_ptr; png_infop info_ptr; MEMORY_READER_STATE memory_reader_state; unsigned int sig_read = 0; png_uint_32 width, height; int bit_depth, color_type, interlace_type, x, y; u32* line; if (!buffer || (bufsize <= 0)) return NULL; Image* image = (Image*) malloc(sizeof(Image)); if (!image) return NULL; png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (png_ptr == NULL) { free(image); return NULL;; } png_set_error_fn(png_ptr, (png_voidp) NULL, (png_error_ptr) NULL, user_warning_fn); info_ptr = png_create_info_struct(png_ptr); if (info_ptr == NULL) { free(image); png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); return NULL; } memory_reader_state.buffer = (unsigned char *)buffer; memory_reader_state.bufsize = bufsize; memory_reader_state.current_pos = 0; png_set_read_fn(png_ptr, &memory_reader_state, (png_rw_ptr)read_data_memory); png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL); image->imageWidth = width; image->imageHeight = height; image->textureWidth = getNextPower2(width); image->textureHeight = getNextPower2(height); png_set_sig_bytes(png_ptr, sig_read); png_set_strip_16(png_ptr); png_set_packing(png_ptr); if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png_ptr); if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) png_set_gray_1_2_4_to_8(png_ptr); if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); image->data = (Color*) memalign(16, image->textureWidth * image->textureHeight * sizeof(Color)); if (!image->data) { free(image); png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); return NULL; } line = (u32*) malloc(width * 4); if (!line) { free(image->data); free(image); png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); return NULL; } for (y = 0; y < height; y++) { png_read_row(png_ptr, (u8*) line, png_bytep_NULL); for (x = 0; x < width; x++) { u32 color = line[x]; image->data[x + y * image->textureWidth] = color; } } free(line); png_read_end(png_ptr, info_ptr); png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); return image; }
-
09-07-2006, 12:28 AM #15Bush Programmer

- Registriert seit
- Nov 2005
- Beiträge
- 3.658
- Points
- 60.149
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Definately.for anyone who has the standard graphics.c, and is looking to load images directly from memory, rather than from a file -
Maybe someone can find this useful?
If you've got something to do it for Mikmod pls share as well,
because it would be nice to be able to alter the sound file in RAM.
-
09-07-2006, 02:52 AM #16
If you change #define PSP=0 to #define PSP=1 then type make at the terminal it will compile it for the PSP, at the moment have not added the xsImage for loading in a mouse cursor so PSP not quite ready, but graphics should work fine
Zitat von Bronx
as you may see it is still very early in development
the psp.cpp is were you code stuff for the PSP and there is three lines you need in any loop when you compile it for Mac to prevent it from giving you the beachball
-= Double Post =-
I may use it to add png support to the xsGraphics libary
Zitat von Alexisonfire
Geändert von xart (09-07-2006 um 02:52 AM Uhr) Grund: Automerged Doublepost
-
09-16-2006, 06:53 PM #17Bush Programmer

- Registriert seit
- Nov 2005
- Beiträge
- 3.658
- Points
- 60.149
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Then once your png is in RAM, how do you associate the buffer that has yourfor anyone who has the standard graphics.c, and is looking to load images directly from memory, rather than from a file -
png in it with this function?
-
09-17-2006, 03:51 AM #18OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
I've just been using this function to read in the section data of an eboot that contains the icon0.png, etc, then using this function to load them directly.
Zitat von Art
I would imagine it's something similar to this,
Code:int total_size; FILE *infile; Image* theImage; infile = fopen("ms0:/whatever.png", "rb"); fseek(infile, 0, SEEK_END); total_size = ftell(infile); fseek(infile, 0, SEEK_SET); void *buffer; int size; size = total_size; buffer = malloc(size); fread(buffer, size, 1, infile); theImage = loadImageMemory(buffer, size); fclose(infile);Geändert von Alexisonfire (09-17-2006 um 04:03 AM Uhr)
-
09-17-2006, 03:58 AM #19QJ Gamer Platinum

- Registriert seit
- Sep 2005
- Ort
- Edinburgh, UK
- Beiträge
- 2.388
- Points
- 25.089
- Level
- 95
- Downloads
- 0
- Uploads
- 0
Just call loadImageMemory...
Zitat von Art
Using firmware v2.00-v3.50? Open up a whole world of homebrew here
The PSP Homebrew Database needs YOU!
Your ISP may be illegally wiretapping all your web activity. Stop Phorm Now!
Visiting the Edinburgh Festivals? Get practical advice from experts.
-
09-23-2006, 04:10 AM #20OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
Here's USB Mode.
Headers:
Functions:Code:#include <pspkernel.h> #include <pspdisplay.h> #include <pspusb.h> #include <pspusbstor.h> #include <string.h>
Call this just inside of your int main:Code:// Defines #define printf pspDebugScreenPrintf // Functions int LoadStartModule(char *path) { u32 loadResult; u32 startResult; int status; loadResult = sceKernelLoadModule(path, 0, NULL); if (loadResult & 0x80000000) return -1; else startResult = sceKernelStartModule(loadResult, 0, NULL, &status, NULL); if (loadResult != startResult) return -2; return 0; } void initUSB() { u32 retVal; LoadStartModule("flash0:/kd/semawm.prx"); LoadStartModule("flash0:/kd/usbstor.prx"); LoadStartModule("flash0:/kd/usbstormgr.prx"); LoadStartModule("flash0:/kd/usbstorms.prx"); LoadStartModule("flash0:/kd/usbstorboot.prx"); retVal = sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0); if (retVal != 0) { printf("Error starting USB Bus driver (0x%08X)\n", retVal); sceKernelSleepThread(); } retVal = sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0); if (retVal != 0) { printf("Error starting USB Mass Storage driver (0x%08X)\n", retVal); sceKernelSleepThread(); } retVal = sceUsbstorBootSetCapacity(0x800000); if (retVal != 0) { printf("Error setting capacity with USB Mass Storage driver (0x%08X)\n", retVal); sceKernelSleepThread(); } retVal = 0; } void usbMode(const char* what) { u32 retVal; if (stricmp(what, "on")==0) { retVal = sceUsbActivate(0x1c8); } else if (stricmp(what, "off")==0) { retVal = sceUsbDeactivate(0); } }
Example:Code:initUSB();
Put this in your 'Makefile':Code:usbMode("on"); or usbMode("off");
Code:In LIBS= -lpspusb -lpspusbstor
-
11-18-2006, 01:03 PM #21Bush Programmer

- Registriert seit
- Nov 2005
- Beiträge
- 3.658
- Points
- 60.149
- Level
- 100
- Downloads
- 0
- Uploads
- 0
I'd love to use it, but get errors for just having included it in my source
Zitat von Slasher

the first of which is that user_warning_fn is being used uninitialised.
Then If I define the variable, there are other errors.Geändert von Art (11-18-2006 um 10:37 PM Uhr)
-
11-19-2006, 06:51 PM #22OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
whoops
Code:void user_warning_fn(png_structp png_ptr, png_const_charp warning_msg) { }
-
11-19-2006, 09:00 PM #23The Unique Developer

- Registriert seit
- Oct 2006
- Ort
- Canada
- Beiträge
- 1.059
- Points
- 7.101
- Level
- 55
- Downloads
- 0
- Uploads
- 0
I use my own usb.c and usb.h made it myself
.....
usb.c
Spoiler for usb.c:Code:Spoiler for USB.h:
-= Double Post =-
Zitat von Twenty 2
there is an SDK sample for this:Code:#include <psputility.h> char nick[256]; sceUtilityGetSystemParamString(1, nick, 256); //nick will be your nick name
Spoiler for SDK SAMPLE:Geändert von the unique warrior (11-19-2006 um 09:04 PM Uhr) Grund: Automerged Doublepost
Malloc.Us Network Administrator
Decryption of the Encrypted
You are the unseen, the unstoppable and in power of your code. The God of your software.
-
11-20-2006, 08:05 PM #24Bush Programmer

- Registriert seit
- Nov 2005
- Beiträge
- 3.658
- Points
- 60.149
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Still no luck
Zitat von Slasher
The first of a few errors I get when I include it now is
implicit declaration of the function getNextPower2 (there isn't one),
and something about "memalign"... is there anything else left out?
Have you used this yourself, nad know it to work?
-
11-21-2006, 05:00 AM #25QJ Gamer Platinum

- Registriert seit
- Sep 2005
- Ort
- Edinburgh, UK
- Beiträge
- 2.388
- Points
- 25.089
- Level
- 95
- Downloads
- 0
- Uploads
- 0
For these USB samples, you ought to graciously ignore errors starting USB, if you want full compatibility with firmwares 2.0+.
On 2.8, for instance, we currently can't do USB, so with your code, you would just hang the program on 2.8. Better to just return an error code to the calling function, and let it decide what to do about the lack of USB, rather than sleeping the thread.Using firmware v2.00-v3.50? Open up a whole world of homebrew here
The PSP Homebrew Database needs YOU!
Your ISP may be illegally wiretapping all your web activity. Stop Phorm Now!
Visiting the Edinburgh Festivals? Get practical advice from experts.
-
11-21-2006, 01:59 PM #26OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
Whoops, there's a few other things I left out. My fault.
Zitat von Art
Hah, here's a working gfx.c/h.
http://slasher.team-duck.com/development/gfx.c
http://slasher.team-duck.com/development/gfx.h
Sorry for the trouble
-
11-21-2006, 06:58 PM #27Bush Programmer

- Registriert seit
- Nov 2005
- Beiträge
- 3.658
- Points
- 60.149
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Are you sopposed to replace graphics.c and graphics.h with those files,
and then use as normal?
-
11-25-2006, 04:49 PM #28Bush Programmer

- Registriert seit
- Nov 2005
- Beiträge
- 3.658
- Points
- 60.149
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Damn.. he's banned!
Still stuck with this
Replacing Graphics.c & Graphics.h with the above files breaks a working
program straight away. This might be the only way I can get a graphic font
into any program since I'm having trouble with fontlib as well...
Pls post if you have a game source with the pngs biult into the source files.
-
11-26-2006, 03:32 AM #29Developer

- Registriert seit
- Oct 2005
- Ort
- Dubuque
- Beiträge
- 423
- Points
- 12.154
- Level
- 72
- My Mood
-
- Downloads
- 1
- Uploads
- 0
If you want to use OSlib, you can do it with a minor modification to the OSlib source, recompile the library, and off you go. ;)
-
12-09-2006, 11:27 PM #30Bush Programmer

- Registriert seit
- Nov 2005
- Beiträge
- 3.658
- Points
- 60.149
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Here's a sample given to me by will1234.
It's easy in hind sight


LinkBack URL
About LinkBacks
Mit Zitat antworten

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum