Seite 292 von 340 ErsteErste ... 192 242 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 ... LetzteLetzte
Zeige Ergebnis 8.731 bis 8.760 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; hello, i am having problems getting the cygwin thing set up. i type in "make" in the shell and it ...

  
  1. #8731
    Points: 5.711, Level: 48
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    39
    Points
    5.711
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    hello, i am having problems getting the cygwin thing set up. i type in "make" in the shell and it says "nothing can be done for all."
    nothing to be done for all means that you have already compiled on eboot.pbp,in the current folder, or you've forgotten to add a makefile.



  2. #8732
    Developer
    Points: 6.074, Level: 50
    Level completed: 62%, Points required for next Level: 76
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Beiträge
    270
    Points
    6.074
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    well the makefile is definitely there, so I have to delete the eboot every time I have a new build?

  3. #8733
    Points: 2.658, Level: 31
    Level completed: 39%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    47
    Points
    2.658
    Level
    31
    Downloads
    0
    Uploads
    0

    Standard

    Uh... I can make when there's an EBOOT present.

    Anyway, I noticed that time(NULL) is returning seconds since midnight GMT. Shouldn't it be returning seconds since epoch? Is there another func I can call or should I write one?

  4. #8734
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  5. #8735
    Developer
    Points: 6.074, Level: 50
    Level completed: 62%, Points required for next Level: 76
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Beiträge
    270
    Points
    6.074
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    yeah i figured out the problem. It was in the target of the makefile. I was pointing it to the wrong file i guess.

  6. #8736
    Points: 2.658, Level: 31
    Level completed: 39%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    47
    Points
    2.658
    Level
    31
    Downloads
    0
    Uploads
    0

    Standard

    Am I looking at 'sceRtcGetCurrentTick'? It doesn't say what the tick is in reference to.

    Thanks for the link, btw. That documentation kicks a** and will likely help me figure some things out more easily. Up till now I've been using the comments in the lib itself.

  7. #8737
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Ticks are the fundamental unit of time on most system. They have a different resolution per system, but can usually be converted easily.

    http://psp.jim.sh/pspsdk-doc/psprtc_...f205e1b78cf221
    http://psp.jim.sh/pspsdk-doc/psprtc_...948f13da395e13
    One of these functions should should be what you're looking for.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  8. #8738
    Developer
    Points: 6.074, Level: 50
    Level completed: 62%, Points required for next Level: 76
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Beiträge
    270
    Points
    6.074
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    i want to use oslib mod but have no clue where to put the files. it comes with the include and header files. i have cygwin set up and have compiled several eboots using oslib already.

  9. #8739
    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

    navigate to:
    cygwin/usr/local/pspdev/psp/sdk/include/oslib/files go here
    if you don't have the oslib folder in their...than make it the files you have all go their except the file with .a as an extension that one goes here:
    cygwin/usr/local/pspdev/psp/sdk/libs/.a file goes here

    after that it's set up ro0kie42=-)
    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

  10. #8740
    Points: 2.658, Level: 31
    Level completed: 39%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    47
    Points
    2.658
    Level
    31
    Downloads
    0
    Uploads
    0

    Standard

    Thanks again, Archaemic. Unfortunately sceRtcGetCurrentClockLoca lTime provides a struct pointer (I'm already using that function for my displayed clock). The tick resolution one ought to be a constant if the resolution can't be changed, shouldn't it? At any rate, what I was looking for was something to use for a sort of complex time-out mechanism. I have a function "np_freeTimedOutNetPlayer s(int oldest_allowed)" that checks the last_update property of all existing netplayer structs and if their last_update is less than oldest_allowed then it calls another function that removes them from the struct and frees their malloc'd memory. Currently I'm using the Vcount as a timing mechanism, but since it starts at 0... Wait... There's no reason oldest_allowed couldn't be negative, is there....

    Never mind. I got it covered. Thanks again. XD

    By the way, sceRtcGetCurrentTick points to a definite date of origin, but it sure as hell ain't epoch. It's some random date in 1906! What's that all about? (Right now my test app is telling me "102 years, 50 days, 6 hours, 50 minutes and 5 seconds ago...")

  11. #8741
    Points: 2.658, Level: 31
    Level completed: 39%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    47
    Points
    2.658
    Level
    31
    Downloads
    0
    Uploads
    0

    Standard

    Is the socket stream buffer really only 1024 bytes? I get read errors if I try to go any larger.

    Secondly, (sorry) I'm using the return from sceNetApctlGetInfo(8, NULL) to determine whether or not the wifi is connected. Is there a better way to detect AP connection loss?
    Geändert von Khatharr (07-05-2008 um 08:26 PM Uhr)

  12. #8742
    QJ Gamer Blue
    Points: 3.768, Level: 38
    Level completed: 79%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Beiträge
    70
    Points
    3.768
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard how to post online higscores?

    hi there i have been searching for a while how to post online hiscores but i have no luck, so i deside to ask..
    can some body help me or give hints on how to manage this i need to have online higscores for my hombrew POLYGUNWARS.
    thanks..

  13. #8743
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    hey can anyone help me on this thread?
    import fixup problems
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  14. #8744
    Developer
    Points: 6.074, Level: 50
    Level completed: 62%, Points required for next Level: 76
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Beiträge
    270
    Points
    6.074
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    I need help with the Virtual File system of OSlib. I have
    Code:
    VIRTUAL_FILE *test;
    test = VirtualFileOpen("test.txt", 0, VF_MEMORY, VF_O_READWRITE);
    But I get an error:
    [QUOTE]
    main.cpp:38 error: expected constructor, destructor, or type conversion before '=' token.
    [QUOTE]
    Line 38 is the second line you see there. If I just have the first line, it compiles fine.

  15. #8745
    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

    Sometimes that error happens if it find the definitions of the datatype, function name or variable name. Have you got the right headers included?

  16. #8746
    Developer
    Points: 6.074, Level: 50
    Level completed: 62%, Points required for next Level: 76
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Beiträge
    270
    Points
    6.074
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    All I need is OSlib right? I'm not sure what else I'd need.

  17. #8747
    Points: 2.658, Level: 31
    Level completed: 39%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    47
    Points
    2.658
    Level
    31
    Downloads
    0
    Uploads
    0

    Standard

    Ahrimanes - You'll need to be a little more specific about what you're stuck on. Know in advance that you'll need some sort of online service to store the information. Are you wanting to make a web page that will show high scores or just have something that will store the information for use by the game itself? It's not too complicated to do either. I can walk you through it.

  18. #8748
    QJ Gamer Green
    Points: 8.459, Level: 62
    Level completed: 3%, Points required for next Level: 291
    Overall activity: 32,0%

    Registriert seit
    Apr 2007
    Beiträge
    886
    Points
    8.459
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    is there any way to bring up the psp password dialogue. the one that comes up if the parental settings are enabled

  19. #8749
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    It's a custom dialog with no interface to it, so basically, no.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  20. #8750
    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

    @ahrimanes:

    u may want to check this out:
    http://juliusparishy.com/jpblog/?p=11

    hopefully your still looking for the info
    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

  21. #8751
    OMFG
    Points: 19.453, Level: 88
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Toronto
    Beiträge
    2.814
    Points
    19.453
    Level
    88
    Downloads
    0
    Uploads
    0

    Standard

    Why is it that when I declare three floats (I've even tried with just one. I've also tried ints as well) in a class, my program ends up freezing? I'm modifying the Jello Physics library to add a few more things as well as to be more compatable with the psp's GU.

    Is it a memory overflow? I have no idea why my program would freeze once declaring something, even if I choose to do nothing with the variables.

    Here's the class. You should see the commented out line where I put "// Crash?"
    Code:
    class SpringBody : public Body
    {
    public:
    
    	std::vector<InternalSpring*> mSprings;
    
        // shape-matching spring constants.
        bool mShapeMatchingOn;
        float mEdgeSpringK;
        float mEdgeSpringDamp;
        float mShapeSpringK;
        float mShapeSpringDamp;
    	int dragPoint;
    
    	//some addon
    	std::vector<int> mIndexList;
    	int *mIndices;
    	int mIndicesCount;
    
    	//float rC, gC, bC;		// Crash?
    	
    
    	Vector2 dragForce;
    
    	/**
    	* Create a Springbody with shape matching set to OFF.
    	*\param shape ClosedShape shape for this body
        *\param massPerPoint mass per PointMass.
        *\param edgeSpringK spring constant for edges.
        *\param edgeSpringDamp spring damping for edges
        *\param pos global position of the body
        *\param angleinRadians global angle of the body
        *\param scale scale
        *\param kinematic kinematic control boolean
    	*/
    	SpringBody(ClosedShape *shape, float massPerPoint, float edgeSpringK, float edgeSpringDamp, Vector2 pos, float angleinRadians, Vector2 scale, bool kinematic);
    	/**
    	* Create a SpringBody with shape matching turned ON.
    	*\param shape ClosedShape shape for this body
        *\param massPerPoint mass per PointMass.
    	*\param shapeSpringK shape-matching spring constant
    	*\param shapeSpringDamp shape-matching spring damping
        *\param edgeSpringK spring constant for edges.
        *\param edgeSpringDamp spring damping for edges
        *\param pos global position of the body
        *\param angleinRadians global angle of the body
        *\param scale scale
        *\param kinematic kinematic control boolean
    	*/
    	SpringBody(ClosedShape *shape, float massPerPoint, float shapeSpringK, float shapeSpringDamp, float edgeSpringK, float edgeSpringDamp, Vector2 pos, float angleinRadians, Vector2 scale, bool kinematic);
    	/**
    	* Default deconstructor
    	*/
    	virtual ~SpringBody();
    
    	/**
    	* Add an internal spring to this body.
    	*\param pointA point mass on 1st end of the spring
    	*\param pointB point mass on 2nd end of the spring
    	*\param springK spring constant
    	*\param damping spring damping
    	*/
    	void addInternalSpring(int pointA, int pointB, float springK, float damping);
    	/**
    	* build default springs
    	*/
    	void _buildDefaultSprings();
    	/**
    	* Clear all springs from the body.
    	*/
    	void clearAllSprings();
    
    	/**
    	* Set shape-matching on/off.
    	*\param onoff on/off
    	*/
    	void setShapeMatching(bool onoff);
    	/**
    	* Set shape-matching spring constants.
    	*\param springK spring constant
    	*\param damping spring damping
    	*/
    	void setShapeMatchingConstants(float springK, float damping);
    
    	/**
    	* Change the spring constants for the springs around the shape itself (edge springs)
    	*\param edgeSpringK spring constant
    	*\param edgeSpringDamp spring damping
    	*/
    	void setEdgeSpringConstants(float edgeSpringK, float edgeSpringDamp);
    	/**
    	* Adjusting spring values
    	*\param springID spring index
    	*\param springK spring constant
    	*\param springDamp spring damping
    	*/
    	void setSpringConstants(int springID, float springK, float springDamp);
    
    	/**
    	* Get spring constant
    	*\param springID spring index
    	*\return spring constant
    	*/
    	float getSpringK(int springID);
    	/**
    	* Get spring damping
    	*\param springID spring index
    	*\return spring damping
    	*/
    	float getSpringDamping(int springID);
    
    	/**
    	* Acumulating internal spring forces
    	*/
    	virtual void accumulateInternalForces();
    	/**
    	* Acumulating external forces
    	*/
    	virtual void accumulateExternalForces();
    
    	/**
    	* helper function for visualization - add an indexed triangle to this primitive.
    	*\param A 
    	*\param B
    	*\param C
    	*/
    	void addTriangle(int A, int B, int C);
    	/**
    	* finalize triangles
    	*/
    	void finalizeTriangles();
    
    	/**
    	* set colour of triangles within a body
    	*/
    	void setColour(float R, float G, float B);
    
    	/**
    	* helper function for dragging body
    	*\param force force for drag
    	*\param pm index of PointMass that you want to drag
    	*/
    	void setDragForce(Vector2 force, int pm);
    
    	/**
    	* Debug render
    	*/
    	virtual void DrawMe();
    
    };
    Any suggestions or reasons as to why this is happening would be appreciated, thanks!

  22. #8752
    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

    All I can think is that another part of the library or code is expecting the class size to a be a certain size. Adding any variables will increase the class size and possible cause a memory overflow.

    You might get lucky and rearranging the variables might help so that they match the memory alignment better:
    Code:
        float rC, gC, bC;		// Crash?
        float mEdgeSpringK;
        // 16 bytes
    
        float mEdgeSpringDamp;
        float mShapeSpringK;
        float mShapeSpringDamp;
        int dragPoint;
        // 16 bytes
    
        //some addon
        int *mIndices;
    
        // This is a really bad hack, I don't really recommend doing this
        int mIndicesCount : 31;	
        bool mShapeMatchingOn : 1;
    	
        Vector2 dragForce;
        // Assuming Vector 2 is 2 floats, 16 bytes
    
        std::vector<int> mIndexList;
        std::vector<InternalSpring*> mSprings;
        // Not sure how big vector information is, I assume they are general aligned regardless.
    (The PSP is 16 byte aligned isn't it?)

  23. #8753
    Points: 5.711, Level: 48
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    39
    Points
    5.711
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Hey, how do I debug with psplink (is there a tutorial or guide somewhere?)? Everytime there is a problem all I see is hex (with some text).

  24. #8754
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von bnc9 Beitrag anzeigen
    Hey, how do I debug with psplink (is there a tutorial or guide somewhere?)? Everytime there is a problem all I see is hex (with some text).
    IN Makefile:
    Under cflags add: -g

    Then when ever your app crashes, in cygwin or commandline:

    Code:
    psp-addr2line -f -e appname.elf 0x(the address given for EPC)
    -f gives you the function

    If that doesn't work: it says: "??"

    In PSPLINK try: calc $epc-$mod
    and
    Code:
    psp-addr2line -f -e appname.elf 0x(the address calculated by psplink)

  25. #8755
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    How can I Rotate image at a fixed point? Rotating makes the object move out of the point. This might have something to do with sin, cos stuff but I have no idea. Any one got me?

  26. #8756
    NetGameOrb Maker
    Points: 6.138, Level: 50
    Level completed: 94%, Points required for next Level: 12
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    New York
    Beiträge
    683
    Points
    6.138
    Level
    50
    My Mood
    Cheerful
    Downloads
    2
    Uploads
    0

    Standard

    Zitat Zitat von Mr305 Beitrag anzeigen
    How can I Rotate image at a fixed point? Rotating makes the object move out of the point. This might have something to do with sin, cos stuff but I have no idea. Any one got me?
    oslib can do what you ask, maybe check the code and you get a adiea but i thing you can figure the angle by dividin width and height by 2 and then rotate the cordinate by that angle
    if you can waite until tommorow i can give u the rule for it
    GameLive name changed to NetGameOrb, Project is now online in Beta stage. Everyone encourage to register so they get news about the project and ability to play the games with NetGameOrb Support online. More info on site.

    Stats Blog:http://netgameorb.blogspot.com/
    Website:http://www.netgameorb.com/

  27. #8757
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von mr305 Beitrag anzeigen
    how Can I Rotate Image At A Fixed Point? Rotating Makes The Object Move Out Of The Point. This Might Have Something To Do With Sin, Cos Stuff But I Have No Idea. Any One Got Me?
    Nvm :)

  28. #8758
    NetGameOrb Maker
    Points: 6.138, Level: 50
    Level completed: 94%, Points required for next Level: 12
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    New York
    Beiträge
    683
    Points
    6.138
    Level
    50
    My Mood
    Cheerful
    Downloads
    2
    Uploads
    0

    Standard

    Zitat Zitat von Mr305 Beitrag anzeigen
    Nvm :)
    sorry but i give you it tommorow because i didnt find my notebook so i will try to code a funtion for u tommorow,ok
    GameLive name changed to NetGameOrb, Project is now online in Beta stage. Everyone encourage to register so they get news about the project and ability to play the games with NetGameOrb Support online. More info on site.

    Stats Blog:http://netgameorb.blogspot.com/
    Website:http://www.netgameorb.com/

  29. #8759
    QJ Gamer Bronze
    Points: 6.517, Level: 52
    Level completed: 84%, Points required for next Level: 33
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Ort
    Ireland
    Beiträge
    978
    Points
    6.517
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Ok guys so im working on a project for the qj homebrew contest.

    The game is a penalty shoot-out game.


    The main points im looking for the game is:

    Analog Support
    2 player mode
    menu
    gfx of course

    Problem:

    How would i make the goal keeper go after the ball and not make him save all of the shoots.

    The Other problems have been resolved!
    Geändert von MiKeY188 (07-30-2008 um 06:57 AM Uhr)

  30. #8760
    QJ Gamer Bronze
    Points: 6.517, Level: 52
    Level completed: 84%, Points required for next Level: 33
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Ort
    Ireland
    Beiträge
    978
    Points
    6.517
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Ive been trying all day and ain't gotten anywhere please if someone can help in anyway!


 

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:14 PM Uhr.

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