Search:

Type: Posts; User: Sephmk

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    783

    This is what lookAlongNS comes from: ...

    This is what lookAlongNS comes from:



    for(k=randomX;k<mapX;k++){ //First try everything right of the Y co-ordinate
    if(mapChar[k][j] == WALL){ //If the algorithm finds a wall
    ...
  2. Replies
    5
    Views
    783

    The whole program is around 2000 lines and is...

    The whole program is around 2000 lines and is quite messy =(
  3. Replies
    5
    Views
    783

    The overall algorithm is to draw corridors on a...

    The overall algorithm is to draw corridors on a map in a roguelike game, I had written this in the main method but wanted to move it to a funciton. The first function retraces a corridor that has...
  4. Replies
    5
    Views
    783

    Using a function in a function

    Hello,

    I am havinf some trouble using a function in a function. The original function I am using I know works as it has been tested and is shown here:




    void drawCorridorNS(int aPos, int...
  5. Replies
    7
    Views
    1,088

    I've done a bit more work and have a bit more to...

    I've done a bit more work and have a bit more to show.

    First I have redeclared the array:




    int **mapSight = (int **)malloc(mapX * sizeof(int *));

    for (int i = 0; i < mapX;...
  6. Replies
    7
    Views
    1,088

    This is what I have done so far: void...

    This is what I have done so far:



    void zeroSight(int **sight, unsigned int rows, unsigned int columns){

    for(int i=0; i<columns; i++){ //initialise for loop to set seen to 0. This line go...
  7. Replies
    7
    Views
    1,088

    But if I do this and feed in the array will it...

    But if I do this and feed in the array will it change the array I feed in, or do I have to return it and set the out of function array to equal the array returned by the function.
  8. Replies
    7
    Views
    1,088

    Feeding a 2d array into a function

    Hello,

    I am trying to get a function to perform a task on a 2d array, the array itself is already created outside of the function and merely needs to be passed to it so that it can perfom an...
  9. Replies
    5
    Views
    925

    I want to be able to create the window the...

    I want to be able to create the window the correct size based on variables I input so that it could be a different size each time. I have two values currently which I would want to use and these...
  10. Replies
    5
    Views
    925

    Windows 7, Dev-C++

    Windows 7, Dev-C++
  11. Replies
    5
    Views
    925

    Making a larger window with curses

    Hello,

    I am working on a program at the moment in curses in c and I want to use a bigger window to work with, at the moment I am using the standard size which I believe is 80,25



    ...
  12. I'm running it at the moment and its 20x20 and...

    I'm running it at the moment and its 20x20 and sometimes it does not complete, however this may be an error in other parts of the code. I am looking through as I type this and shall update this...
  13. Although this is working better, I'm not sure it...

    Although this is working better, I'm not sure it has fixed the skipping numbers problem.

    I.e certain co-ordinate combinations may never be generated
  14. Wow, not only does it work it is also a lot...

    Wow, not only does it work it is also a lot faster!

    How exactly does it work better this way?
  15. Random number generation problem to generate co-ordinates in a range

    Hello,

    I am woking on a program which requires the generation of two random numbers to be used as X and Y co-ordinates within a certain range. I have found a random number generator for this:

    ...
  16. What do you mean?

    What do you mean?
  17. Creating a function to return 2d arrays help please

    Hello,

    I am trying to create a function outside of the main method which creates a 2d array based on two numbers given to it. I want to be able to run this function multiple times to create a...
  18. Program works now thanks

    Program works now thanks
  19. I've done some coding before and I have a project...

    I've done some coding before and I have a project which is similar to a roguelike. And I wanted to learn C since it is so widely used.

    There are a few tutorials for roguelikes but the ones I found...
  20. Thanks, I changed that but it still crashes =( ...

    Thanks, I changed that but it still crashes =(

    edit: does work now lol thanks a lot

    On a releated note I oringinally tried to create the array as a function outside of the main, if I post my...
  21. Creating and printing and array crash (using curses)

    Hello,

    I am trying to create a 2d array, fill it with characters and then print it out in a console window but the console window crashes without any compiler errors from dev-c++



    #include...
Results 1 to 21 of 21