Search:

Type: Posts; User: HelpfulPerson

Search: Search took 0.02 seconds.

  1. Thanks, you were the first person to actually...

    Thanks, you were the first person to actually answer my question.
  2. #include #include ...

    #include <stdio.h>
    #include <stdlib.h>


    #include <SDL/SDL.h>


    #include <windows.h>
    #include <fcntl.h>
    #include <io.h>
  3. Well a big black image on my screen is kind of...

    Well a big black image on my screen is kind of scary, but yes I know that works. What I'm trying to do is make it appear on the console I attached to. I guess if nothing else I could play a large...
  4. It still says "Could not get the console screen",...

    It still says "Could not get the console screen", which means it is failing at the point when it tries to get the video surface, even after adding the check of SDL_init
  5. #include #include ...

    #include <stdio.h>
    #include <stdlib.h>


    #include <SDL/SDL.h>


    #include <windows.h>
    #include <tlhelp32.h>
    #include <tchar.h>
  6. Sorry, I didn't realize that about perror. Didn't...

    Sorry, I didn't realize that about perror. Didn't realize that about the return ( should've used !). Also, no it isn't attached to a console. SDL doesn't make a window by default, so it shouldn't be...
  7. Update : I got the code working finally, but it...

    Update : I got the code working finally, but it still doesn't display the image. I get the runtime error of 'Bad file descriptor' when it gets to AttachConsole and the perror function. I got it...
  8. Mainly ease of use. Even though it seems...

    Mainly ease of use. Even though it seems pointless that I'm creating SDL applications to run in other applications, it would be a lot easier later if I wanted to load an image and all I had to do was...
  9. That's still what I did in Code::Blocks. Not sure...

    That's still what I did in Code::Blocks. Not sure how I could do it any different. If you have a solution for the big problem that would be nice though
  10. That fixed the implicit declaration error, but it...

    That fixed the implicit declaration error, but it is still telling me about a undefined reference to the function even with linking the kernel32.dll by adding this ( in Code::Blocks minGW32 )

    ...
  11. I tried this and got 'Undefined reference to...

    I tried this and got 'Undefined reference to AttachConsole' and 'Implicit declaration to AttachConsole function', which is weird, since I included windows.h.


    #include <stdio.h>
    #include...
  12. Yes, I know that SDL_SetVideoMode creates a new...

    Yes, I know that SDL_SetVideoMode creates a new window, I just put it there as a placeholder until I can get the real console window that it is ran in.
  13. Can you display a bitmap image on the current console screen in SDL.

    I'm trying to get a bitmap image to display on command prompt by using the following code.


    #include <stdio.h>
    #include <stdlib.h>


    #include <SDL/SDL.h>
Results 1 to 13 of 13