Seite 328 von 340 ErsteErste ... 228 278 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 ... LetzteLetzte
Zeige Ergebnis 9.811 bis 9.840 von 10174

C/C++ Programming Help Thread

This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; void pspDebugScreenInit (void) void pspDebugScreenInitEx (void *vram_base, int mode, int setup) void pspDebugScreenPrintf (const char *fmt,...) __attribute__((format(pri ntf Do a ...

  
  1. #9811
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Standard

    void pspDebugScreenInit (void)
    void pspDebugScreenInitEx (void *vram_base, int mode, int setup)
    void pspDebugScreenPrintf (const char *fmt,...) __attribute__((format(pri ntf
    Do a printf to the debug screen.
    void void pspDebugScreenKprintf (const char *format,...) __attribute__((format(pri ntf
    Do a printf to the debug screen.
    void void void pspDebugScreenEnableBackC olor (int enable)
    Enable or disable background colour writing (defaults to enabled).
    void pspDebugScreenSetBackColo r (u32 color)
    Set the background color for the text.
    void pspDebugScreenSetTextColo r (u32 color)
    Set the text color.
    void pspDebugScreenSetColorMod e (int mode)
    Set the color mode (you must have switched the frame buffer appropriately).
    void pspDebugScreenPutChar (int x, int y, u32 color, u8 ch)
    Draw a single character to the screen.
    void pspDebugScreenSetXY (int x, int y)
    Set the current X and Y co-ordinate for the screen (in character units).
    void pspDebugScreenSetOffset (int offset)
    Set the video ram offset used for the screen.
    void pspDebugScreenSetBase (u32 *base)
    Set the video ram base used for the screen.
    int pspDebugScreenGetX (void)
    Get the current X co-ordinate (in character units).
    int pspDebugScreenGetY (void)
    Get the current Y co-ordinate (in character units).
    void pspDebugScreenClear (void)
    Clear the debug screen.
    -=Double Post Merge =-
    Any Zip Libraries that support passwords that i could use?

    --SLasher


    Geändert von slasher101 (03-21-2009 um 01:24 AM Uhr) Grund: Automerged Doublepost

  2. #9812
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von fiorello Beitrag anzeigen
    it will depends on level (1lvl = 750hp what means about 4sec to kill, and it's per frame.
    Code:
    for(i = 0; i < DefNr; i++) //main loop, 0 to towers amount
    {
    	if(wieza[i] != NULL && !wieza[i]->isAttack) // if tower exist
    	{
    		for(b = 0; b < MobNr; b++)//loop from 0 to mob amount
    		{	
    			
    			if(potfur[b] != NULL && potfur[b]->hp > 0) //if tower isnt attacking yet, the mob is not dead, and if it exist...
    			{	
    				oslDrawLine(
    					wieza[i]->wiezaspr->x + wieza[i]->wiezaspr->sizeX/2,wieza[i]->wiezaspr->y + wieza[i]->wiezaspr->sizeY/2,
    					potfur[b]->potforek->x + potfur[b]->potforek->sizeX/2,
    					potfur[b]->potforek->y + potfur[b]->potforek->sizeY/2,
    					RGBA(0,0,255,200)); // draws "beam"
    					
    				potfur[b]->hp -= 5; // hits it...
    				wieza[i]->isAttack = true; // and make boolean isAttack true, so it shoudnt attack any other monster till this is death
    						
    				break;	
    			}
    		}
    	}
    }
    I have only tided up the code a bit by removing redundant code and fixing the buffer overrun but logically, the code is sound. Your problem is more then likely to be else where.

  3. #9813
    QJ Gamer Silver
    Points: 8.930, Level: 63
    Level completed: 60%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Switzerland
    Beiträge
    142
    Points
    8.930
    Level
    63
    My Mood
    Amused
    Downloads
    0
    Uploads
    0

    Standard

    [Delete Post]
    Geändert von Total_Noob (03-23-2009 um 07:27 AM Uhr)

  4. #9814
    Points: 2.908, Level: 33
    Level completed: 6%, Points required for next Level: 142
    Overall activity: 0%

    Registriert seit
    Nov 2007
    Beiträge
    21
    Points
    2.908
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von yaustar Beitrag anzeigen
    Code:
    for(i = 0; i < DefNr; i++) //main loop, 0 to towers amount
    {
    	if(wieza[i] != NULL && !wieza[i]->isAttack) // if tower exist
    	{
    		for(b = 0; b < MobNr; b++)//loop from 0 to mob amount
    		{	
    			
    			if(potfur[b] != NULL && potfur[b]->hp > 0) //if tower isnt attacking yet, the mob is not dead, and if it exist...
    			{	
    				oslDrawLine(
    					wieza[i]->wiezaspr->x + wieza[i]->wiezaspr->sizeX/2,wieza[i]->wiezaspr->y + wieza[i]->wiezaspr->sizeY/2,
    					potfur[b]->potforek->x + potfur[b]->potforek->sizeX/2,
    					potfur[b]->potforek->y + potfur[b]->potforek->sizeY/2,
    					RGBA(0,0,255,200)); // draws "beam"
    					
    				potfur[b]->hp -= 5; // hits it...
    				wieza[i]->isAttack = true; // and make boolean isAttack true, so it shoudnt attack any other monster till this is death
    						
    				break;	
    			}
    		}
    	}
    }
    I have only tided up the code a bit by removing redundant code and fixing the buffer overrun but logically, the code is sound. Your problem is more then likely to be else where.
    Im nearly sure it can be done only with with this loop, problem is i dont know how...

  5. #9815
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    No, what I am saying is that your problem is probably not in the code that you have posted but somewhere else.

    Upload all the code to the project and I take another quick look at it.

  6. #9816
    Points: 2.908, Level: 33
    Level completed: 6%, Points required for next Level: 142
    Overall activity: 0%

    Registriert seit
    Nov 2007
    Beiträge
    21
    Points
    2.908
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    main.c
    Code:
    #include "header.h"
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Main:
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    int main(){
        int skip = 0;
    	
        initOSLib();
        oslIntraFontInit(INTRAFONT_CACHE_MED);
    
    	//IMAGES ////////////////
    
    
    	theroute	=		oslLoadImageFilePNG("route.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
    	chmenu	=			oslLoadImageFilePNG("chmenu.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
    	chan	=			oslLoadImageFilePNG("chan.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
    	cursor =			oslLoadImageFilePNG("cursor.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
    	tower[1] = oslLoadImageFilePNG("wieza.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
    	tower[2] = oslLoadImageFilePNG("wieza.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
    	tower[3] = oslLoadImageFilePNG("wieza.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
    	OSL_MEMSTATUS ram = oslGetRamStatus();
    
    
    
    	
    	//FONT ////////////////
    		pgfFont =	oslLoadFontFile("flash0:/font/ltn0.pgf");
    
    		oslIntraFontSetStyle(pgfFont, 1.0, RGBA(255,255,255,255), RGBA(0,0,0,0), INTRAFONT_ALIGN_LEFT);
    		oslSetFont(pgfFont);
    
    
    	//////////////////////////////////////////
    
    		chmenu->x = 420;
    		chmenu->y = 0;
    		chan->centerX = chan->sizeX / 2;
    		chan->centerY = chan->sizeY / 2;
    		chan->x = 440;
    		chan->y = 40;
    
    		while (1)
    				
    	{	
    		if(osl_keys->released.cross) break;
    		oslStartDrawing();
    		oslDrawGradientRect(0,0,480,272,RGB(255,204,170), RGB(255,204,170), RGB(255,255,238), RGB(255,255,238));
    		oslReadKeys();
    		oslDrawString(0,230,"Press teh XXX buton to continue zomg...");
    				
    		//Migaj(0,230,"Press X To Continue");
    
    		oslEndDrawing();
     		oslSyncFrame();		
    	}
    
    
    
    		while(!osl_quit){
            if (!skip){
            oslStartDrawing();
    		Controls();
    		oslDrawGradientRect(0,0,480,272,RGB(255,204,170), RGB(255,204,170), RGB(255,255,238), RGB(255,255,238));
    		oslDrawImage(theroute);
    		
    		
    		
    		for(i = 0; i <= MobNr; i++)
    		{
    		if(potfur[i] != NULL && potfur[i]->hp > 0)
    		{
    			oslDrawImage(potfur[i]->potforek);
    			sprintf(buffer, "Life: %d", potfur[i]->hp);
    			oslDrawString((potfur[i]->potforek->x - 20), (potfur[i]->potforek->y - 10), buffer);
    			potfur[i]->potforek->x++;
    			if(potfur[i]->potforek->x >= 480) potfur[i]->potforek->x = 0;
    		}
    		}
    	
    	
    		for(i = 0; i <= DefNr; i++)
    		{
    			if(wieza[i] != NULL){
    			oslDrawImage(wieza[i]->wiezaspr);
    		}
    		
    		}
    
    
    
    		for(i = 0; i < DefNr; i++) //main loop, 0 to towers amount
    		{
    			if(wieza[i] != NULL && !wieza[i]->isAttack) // if tower exist
    			{
    				for(b = 0; b < MobNr; b++)//loop from 0 to mob amount
    				{	
    					
    					if(potfur[b] != NULL && potfur[b]->hp > 0) //if tower isnt attacking yet, the mob is not dead, and if it exist...
    					{	
    						oslDrawLine(
    							wieza[i]->wiezaspr->x + wieza[i]->wiezaspr->sizeX/2,wieza[i]->wiezaspr->y + wieza[i]->wiezaspr->sizeY/2,
    							potfur[b]->potforek->x + potfur[b]->potforek->sizeX/2,
    							potfur[b]->potforek->y + potfur[b]->potforek->sizeY/2,
    							RGBA(0,0,255,200)); // draws "beam"
    							
    						potfur[b]->hp -= 5; // hits it...
    						wieza[i]->isAttack = true; // and make boolean isAttack true, so it shoudnt attack any other monster till this is death
    								
    						break;	
    					}
    				}
    			}
    		}
    		
    
    		//chmenutowers();
    		chan->angle++;
    		oslDrawImage(chan);
    		//if(chmenuon) chmenutowers();
    
    		
    		movecursor();
    		LightRect();
    		if(osl_keys->pressed.select) oslDebug("%i bytes available", ram.maxAvailable);
    		oslDrawImage(cursor);
    		oslEndDrawing();
            }
            oslEndFrame();
            skip = oslSyncFrame();
    
            oslReadKeys();
    		}
        //Quit OSL:
        oslEndGfx();
    
        sceKernelExitGame();
        return 0;
    
    }
    header.h
    Code:
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <pspkernel.h>
    #include <oslib/oslib.h>
    
    PSP_MODULE_INFO("Hello World", 0, 1, 0);
    PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
    PSP_HEAP_SIZE_KB(12*1024);
    
    
    //DEFINICJE///////////////////
    #define MAX_OBJECTS 50
    #define true 1
    #define false 0
    
    OSL_IMAGE
    *cursor,
    *theroute,
    *chmenu,
    *chan,
    *tower[2];
    
    OSL_FONT
    *pgfFont;
    
    
    bool defs[29][16];
    
    
    
    clock_t time_passed_clock;
    bool time_passed_start;
    clock_t time_passed_time;
    
    
    
    
    typedef struct{
    int hp;
    OSL_IMAGE *potforek;
    }MOB;
    MOB * potfur[20];
    
    
    
    
    typedef struct{
    bool isAttack;
    OSL_IMAGE *wiezaspr;
    }DEF;
    DEF * wieza[20];
    
    
    
    int y00,y10,x00,x10;
    int MobNr, DefNr;
    int i,b;
    int timer, MigNr;
    bool chmenuon = false;
    bool isDefSlotFree = true;
    char buffer[80];
    int MobChosen = 0;
    
    
    void LightRect(){
    x00 = cursor->x - (cursor->x%16);
    x10 = cursor->x - (cursor->x%16)+16;
    y00 = cursor->y - (cursor->y%16);
    y10 = cursor->y - (cursor->y%16)+16;
    
    oslDrawFillRect(x00, y00, x10, y10, RGBA(255,0,0,128));
    }
    
    
    bool time_passed(int ile) {
    if (!time_passed_start) {
    time_passed_time=sceKernelLibcClock();
    time_passed_start=1;
    }
    
    time_passed_clock=sceKernelLibcClock();
    if (time_passed_clock - time_passed_time > ile) {
    time_passed_clock=0;
    time_passed_time=0;
    time_passed_start=0;
    return 1;
    }
    else {
    return 0;
    }
    }
    
    
    void movecursor()
    {
    		for (i=32;i<=120;i+=48)
    		{
    			//x axis
    			if (osl_keys->analogX > i && cursor->x+cursor->sizeX < 480) cursor->x += 2;	
    			if (osl_keys->analogX < -i && cursor->x > 0)	cursor->x -= 2;		
     			
    			//y axis
    			if (osl_keys->analogY > i && cursor->y+cursor->sizeY < 272)	cursor->y += 2;
    			if (osl_keys->analogY < -i&& cursor->y > 0)	cursor->y -= 2;	
    		}
    }
    
    
    
    void DodajMob()
    {
    	if(MobNr <= 21){
    if(MobChosen > 2) MobChosen = 0;
    sprintf(buffer, "mob%d.png", MobChosen);
    potfur[MobNr]= malloc(sizeof(MOB));
    potfur[MobNr]->potforek = oslLoadImageFilePNG(buffer, OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
    potfur[MobNr]->potforek->y = 30;
    potfur[MobNr]->hp = 1100;
    MobChosen++;
    MobNr++;
    }
    }
    
    void DodajDef()
    {
    int curX = cursor->x - cursor->x%16;
    int curY = cursor->y - cursor->y%16;
    if(defs[(cursor->x - cursor->x%16)/16][(cursor->y - cursor->y%16)/16] == false){
    	wieza[DefNr]= malloc(sizeof(DEF));
    	wieza[DefNr]->wiezaspr = oslLoadImageFilePNG("wieza.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_8888);
    	wieza[DefNr]->wiezaspr->y = curY;
    	wieza[DefNr]->wiezaspr->x = curX;
    	wieza[DefNr]->isAttack = false;
    	DefNr++;
    	defs[(cursor->x - cursor->x%16)/16][(cursor->y - cursor->y%16)/16] = true;
    }
    			
    
    }
    
    void Controls()
    {
    	if(osl_keys->pressed.cross) DodajMob();
    	if(osl_keys->pressed.triangle) DodajDef();
    	if(osl_keys->pressed.square)
    	{		
    		if(chmenuon == true)chmenuon = false;
    		else chmenuon = true;
    		
    	}
    
    
    
    }
    
    void chmenutowers()
    {
    	oslDrawImage(chmenu);
    	oslDrawImageXY(tower[1], 420, 50);
    	oslDrawImageXY(tower[2], 450, 50);
    	oslDrawImageXY(tower[3], 420, 100);
    
    
    		if(cursor->x > tower[i]->x && cursor->x < tower[i]->x + tower[i]->sizeX &&
    			cursor->y > tower[i]->y && cursor->y < tower[i]->y + tower[i]->sizeY)
    		{
    		
    		tower[i]->stretchX = 35;
    		tower[i]->stretchY = 35;
    
    		}
    		
    	
    	
    }
    void Migaj(int x,int y, char *migajka)
    {
    	oslDrawString(x,y,migajka);
    
    	if(timer == 0)
    {
    MigNr++;
    if(MigNr == 51)
    		timer++;
    oslIntraFontSetStyle(pgfFont, 1.0, RGBA(255,255,255,(5*MigNr)), RGBA(0,0,0,0), INTRAFONT_ALIGN_LEFT);
    
    
    }
    else if(timer == 1)
    {
    
    MigNr--;
    	if(MigNr == 0)
    		timer--;
    oslIntraFontSetStyle(pgfFont, 1.0, RGBA(255,255,255,(5*MigNr)), RGBA(0,0,0,0), INTRAFONT_ALIGN_LEFT);
    
    
    }
    
    
    
    }
    int odleglosc(OSL_IMAGE *image1, OSL_IMAGE *image2)
    {
    
    return true;
    }
    /*
    char *getconfig(const char *location, const char searchstr[]) {
            FILE *file;
            char *w[100], string[100], line[100], c;
            int z[100], x[100], i=0, v;
            file = fopen (location, "r");
            if (file == NULL) return NULL;
            else {
                    while(fgets(string , 100 , file) != NULL) {
                            x[i] = strlen(string)-1;
                            if(string[0] == '#') continue;
                            w[i] = strchr(string,'=')-1;
                            *w[i] = 0;
                            if(!strcmp(searchstr, string)) {
                                    char *crlf = strpbrk(w[i]+3, "\r\n");
                                    if(crlf)
                                            *crlf = 0;
                                    return w[i]+3;
                            }
                            i++;
                    }
                    fclose(file);
                    return NULL;
            }
    }
    */
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Init OSLib:
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    int initOSLib(){
        oslInit(0);
        oslInitGfx(OSL_PF_8888, 1);
        oslInitAudio();
        oslSetQuitOnLoadFailure(1);
        oslSetKeyAutorepeatInit(40);
        oslSetKeyAutorepeatInterval(10);
    
    	///////////////////
    	
    MobNr = 0;
    DefNr = 0;
    chmenuon = 0;
    	
    	//////////////////
    
        return 0;
    }

  7. #9817
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    The only real issue I see at the moment is that you are overrunning your buffers.
    Code:
    for (i = 0; i <= MobNr; i++)
    should be
    Code:
    for (i = 0; i < MobNr; i++)
    Same with your other loop.

    Edit: Another buffer overrun
    Code:
    if (MobNr <= 21)
    And another
    Code:
    if (defs[(cursor->x - cursor->x%16)/16][(cursor->y - cursor->y%16)/16] == false)
    Geändert von yaustar (03-24-2009 um 03:35 AM Uhr)

  8. #9818
    Points: 2.908, Level: 33
    Level completed: 6%, Points required for next Level: 142
    Overall activity: 0%

    Registriert seit
    Nov 2007
    Beiträge
    21
    Points
    2.908
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    But any idea how to one tower can attack one mob till it's dead ? Now it attacks it once (-5hp) and nothing else.

  9. #9819
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von fiorello Beitrag anzeigen
    But any idea how to one tower can attack one mob till it's dead ? Now it attacks it once (-5hp) and nothing else.
    I misread/misunderstood your original problem. This is the 'real' answer.

    You need to reset the isAttack flag at some point back to false. Bear in mind that you may want to have a 'reload' time (a period of time between shoots) so it doesn't constantly attack the mob every frame. If you do want it to attack every frame, then just chnage the code so it doesn't use the isAttack flag.

    Code:
    		for(i = 0; i < DefNr; i++) //main loop, 0 to towers amount
    		{
    			if(wieza[i] != NULL) // if tower exist
    			{
    				for(b = 0; b < MobNr; b++)//loop from 0 to mob amount
    				{	
    					
    					if(potfur[b] != NULL && potfur[b]->hp > 0) //if tower isnt attacking yet, the mob is not dead, and if it exist...
    					{	
    						oslDrawLine(
    							wieza[i]->wiezaspr->x + wieza[i]->wiezaspr->sizeX/2,wieza[i]->wiezaspr->y + wieza[i]->wiezaspr->sizeY/2,
    							potfur[b]->potforek->x + potfur[b]->potforek->sizeX/2,
    							potfur[b]->potforek->y + potfur[b]->potforek->sizeY/2,
    							RGBA(0,0,255,200)); // draws "beam"
    							
    						potfur[b]->hp -= 5; // hits it...								
    						break;	
    					}
    				}
    			}
    		}

  10. #9820
    Points: 2.908, Level: 33
    Level completed: 6%, Points required for next Level: 142
    Overall activity: 0%

    Registriert seit
    Nov 2007
    Beiträge
    21
    Points
    2.908
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    WOW man it works, couldnt resolve this problem - thanks :Jump:

  11. #9821
    QJ Gamer Blue
    Points: 5.672, Level: 48
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 32,0%

    Registriert seit
    Dec 2007
    Ort
    Netherlands
    Beiträge
    148
    Points
    5.672
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Hi,

    When I want to start a .vbs script I get no VBScript-Engine was found.
    I tried re-installing the Engine (microsoft.com) but it didn't work.
    I need this also for Visual C++ because it needs it to create a new project.
    Many thanks for the one who can help me.
    I'm thinking of re-installing windows because I think my whole installation is f*cked up at the moment.
    By the way, I tried copying the vbscript.dll files from the windows CD but the I got "CDBOOT: NTLDR Not found". But that's some other question.

    Thanks:humped:
    [SIZE="1"][color=#D1D1FF]______________________________________________________________[/color]
    [i]Last edited by basfreak; 01-01-1990 at [color=#666686]12:00 PM[/color][/i].[/SIZE]

  12. #9822
    QJ Gamer Blue
    Points: 1.824, Level: 25
    Level completed: 24%, Points required for next Level: 76
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    Jun 2009
    Ort
    A place
    Beiträge
    2
    Points
    1.824
    Level
    25
    Downloads
    0
    Uploads
    0

    Standard Help Plz!

    I'm modding my own version of nitePR rev J. I want to know if there is anyway to get the comments that are made with ; to show while your scrolling through your code and also that you can't select the comment (so it only highlights the actual codes)?

    If there is a way can someone tell me or hint me as to how to go about finding and making it possible to show the comments?

    Thanks.

  13. #9823
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    There is probably a section of code that ignores the comments when scrolling printing the text to screen or strips them out completely when copying to memory.

    Do a search in all files for either:
    Code:
    ";
    Or
    Code:
    ';'
    And you may get lucky.
    -=Double Post Merge =-
    I found it already, it's in crt0_prx.c, line 5387:
    Code:
         	else if(buffer[0]==';'){commentMode=1;if(nameMode){cheatTotal++; nameMode=0;}} //Skip comments till next line
    You will find some knockons that you have to fix if you are going to display comments since it looks like you have to store them in memory and display them yourself from the looks of the code.
    Geändert von yaustar (06-05-2009 um 01:39 AM Uhr) Grund: Automerged Doublepost

  14. #9824
    Developer
    Points: 8.092, Level: 60
    Level completed: 72%, Points required for next Level: 58
    Overall activity: 0%

    Registriert seit
    Jul 2008
    Ort
    Grand Rapids! MI
    Beiträge
    125
    Points
    8.092
    Level
    60
    Downloads
    5
    Uploads
    2

    Standard

    Zitat Zitat von yaustar Beitrag anzeigen
    There is probably a section of code that ignores the comments when scrolling printing the text to screen or strips them out completely when copying to memory.

    Do a search in all files for either:
    Code:
    ";
    Or
    Code:
    ';'
    And you may get lucky.
    -=Double Post Merge =-
    I found it already, it's in crt0_prx.c, line 5387:
    Code:
         	else if(buffer[0]==';'){commentMode=1;if(nameMode){cheatTotal++; nameMode=0;}} //Skip comments till next line
    You will find some knockons that you have to fix if you are going to display comments since it looks like you have to store them in memory and display them yourself from the looks of the code.
    Yes i seen that part of code and there is more code dealing with the comments farther up in the file. but that one was mainly dealing with writing it to the new gamedir file

  15. #9825
    Points: 2.752, Level: 32
    Level completed: 2%, Points required for next Level: 148
    Overall activity: 0%

    Registriert seit
    Feb 2008
    Beiträge
    16
    Points
    2.752
    Level
    32
    Downloads
    0
    Uploads
    0

    Standard

    I want to detect the PSP shutdown with plugin(prx).
    Would you tell me the method if you know it?

    I am sorry for my bad English.

  16. #9826
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Standard

    Hook it.
    I hate those monkeys ZOMG!
    -~Slasher~-
    http://i18.tinypic.com/4m848p5.gif

  17. #9827
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    I was wondering what is the latest version of OSLib?

  18. #9828
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369 Beitrag anzeigen
    I was wondering what is the latest version of OSLib?
    http://oslib.playeradvance.org/dl/OSLib_210.rar
    I hate those monkeys ZOMG!
    -~Slasher~-
    http://i18.tinypic.com/4m848p5.gif

  19. #9829
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Thanks slasher :)

  20. #9830
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    What are the pixel arguments in oslLoadImageFile? I know there's OSL_PF_8888 & OSL_PF_5551 but are there anymore?

  21. #9831
    QJ Gamer Bronze
    Points: 6.359, Level: 52
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    france
    Beiträge
    170
    Points
    6.359
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369 Beitrag anzeigen
    What are the pixel arguments in oslLoadImageFile? I know there's OSL_PF_8888 & OSL_PF_5551 but are there anymore?
    If I remember correctly: OSL_PF_4444 and OSL_PF_5650. It's in oslib's documentation.
    Try my latest game (iOS):


  22. #9832
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von daaa57150 Beitrag anzeigen
    If I remember correctly: OSL_PF_4444 and OSL_PF_5650. It's in oslib's documentation.
    Ah thanks, i understand it perfectly now each number represents the number of bits per channel; red, green, blue, alpha.
    Thanks daaa.

  23. #9833
    Points: 1.752, Level: 24
    Level completed: 52%, Points required for next Level: 48
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    May 2009
    Beiträge
    3
    Points
    1.752
    Level
    24
    Downloads
    0
    Uploads
    0

    Standard

    Hello,

    I'm new here, and i want to try learning C++.
    But does anyone know where i can find a tut about C++ in Visual Studio C++ 2008 and not in that stupid Cygwin!!?

    Thank you:ROFL:

  24. #9834
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4
    That epic dude.

  25. #9835
    Points: 1.752, Level: 24
    Level completed: 52%, Points required for next Level: 48
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    May 2009
    Beiträge
    3
    Points
    1.752
    Level
    24
    Downloads
    0
    Uploads
    0

    Standard

    Thanks mootjeuh, guy who i recognise xD :lol:

  26. #9836
    Points: 1.752, Level: 24
    Level completed: 52%, Points required for next Level: 48
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    May 2009
    Beiträge
    3
    Points
    1.752
    Level
    24
    Downloads
    0
    Uploads
    0

    Standard

    Does someone als knows how i get a text in the center of the screen?
    What for piece of code i need for that?

  27. #9837
    Points: 2.247, Level: 28
    Level completed: 65%, Points required for next Level: 53
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    Dec 2008
    Beiträge
    22
    Points
    2.247
    Level
    28
    Downloads
    0
    Uploads
    0

    Standard

    How would you write a delay/wait function for the psp? or/also how would you make a menu like in iR Shell were you can pick from icon and so on.
    Geändert von InSaN3_GoDLiK3 (06-15-2009 um 05:28 PM Uhr)

  28. #9838
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Standard

    Q1. sceKernelDelayThread(int waittime); arg is in microseconds
    Q2. With a lot of work
    I hate those monkeys ZOMG!
    -~Slasher~-
    http://i18.tinypic.com/4m848p5.gif

  29. #9839
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    actually the second one isn't too hard, it's as simple as an array and going through that array, of course i haven't used IRShell, so maybe i misunderstand
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  30. #9840
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Standard

    WooooooooooooooooooW you havn't used IRSHELL
    I hate those monkeys ZOMG!
    -~Slasher~-
    http://i18.tinypic.com/4m848p5.gif


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:27 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .