Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JeZ-l-Lee

Pages: 1 ... 4 5 [6]
76
General / Question about DLLs on Windows Platform...
« on: February 03, 2009, 11:21:04 pm »
Hi,

Are
"sfml-graphics.dll"
&
"sfml-graphics-d.dll"
both needed in the EXE binaries folder on Windows platform ?

What is difference between two above DLLs ?

Thanks, great library so far!!!


JeZ+Lee
SLNTHERO@aol.com
Silent Hero Productions(R)
Video Game Design Studio
http://www.SilentHeroProductions.com

77
Graphics / How do I set transparent color of a sprite image ? [Solved]
« on: February 03, 2009, 03:49:36 am »
Quote from: "Core Xii"
Please note that JPEG is a lossy compression. There may indeed not be a single (0, 255, 0) pixel in that entire image. Use PNG instead. Also, the alpha component is zero... as far as I know JPG doesn't support alpha, so such an invisible color doesn't exist. It should probably be (0, 255, 0, 255)


GOT IT WORKING, thanks!

This is my previous work using SDL(R)...
TetriCrisis 100%[TM] Version 5.9 Remix
For P.C. Windows(R) computer systems
http://www.silentheroproductions.com/TetriCrisis100PercenT.htm



Making something alittle more graphically advanced now!


JeZ+Lee
SLNTHERO@aol.com
Silent Hero Productions(R)
Video Game Design Studio
www.SilentHeroProductions.com[/url]

78
Graphics / How do I set transparent color of a sprite image ? [Solved]
« on: February 02, 2009, 10:48:41 pm »
Hi, I tried CreateMaskFromColor, but it is not working for me...
Please help!

Code: [Select]

// Load a sprite to display
sf::Image Image;

if (!Image.LoadFromFile("cute_image.jpg"))
return EXIT_FAILURE;

//-----------------------------------------------------------------
// Transparent color of JPG image file "Image" (green)
Image.CreateMaskFromColor(sf::Color(0, 255, 0, 0), 0);
// NOT WORKING ?????
//-----------------------------------------------------------------

sf::Sprite Sprite(Image);

79
Graphics / How do I set transparent color of a sprite image ? [Solved]
« on: February 02, 2009, 09:46:46 pm »
Hi,

I am new to S.F.M.L.

I made a small demo that creates a window and displays a sprite image.
How do I set the transparent color of a sprite ?
I am loading a JPG image file into the Sprite.

Please look at this screenshot:

Any help would be appreciated!

JeZ+Lee
SLNTHERO@aol.com
Silent Hero Productions(R)
Video Game Design Studio
http://www.SilentHeroProductions.com

80
General / 1st Demo Using SFML - Only Get Console Window - HELP
« on: January 19, 2009, 02:11:00 pm »
1st Demo Using SFML - Only Get Console Window - HELP

Hi,

I am new to SFML.
I am using Microsoft Vista OS and my C++ IDE is Code::Blocks.
I followed the instructions properly to set up SFML with Code::Blocks.
I entered this simple demo from SFML web site:

Code: [Select]
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>

 int main()
 {
     // Create the main window
     sf::RenderWindow App(sf::VideoMode(640, 640), "SFML window");

     // Load a sprite to display
     sf::Image Image;
     if (!Image.LoadFromFile("cute_image.jpg"))
         return EXIT_FAILURE;
     sf::Sprite Sprite(Image);

     // Create a graphical string to display
     sf::Font Arial;
     if (!Arial.LoadFromFile("arial.ttf"))
         return EXIT_FAILURE;
     sf::String Text("Hello SFML", Arial, 50);

     // Load a music to play
     sf::Music Music;
     if (!Music.OpenFromFile("nice_music.ogg"))
         return EXIT_FAILURE;

     // Play the music
     Music.Play();

     // Start the game loop
     while (App.IsOpened())
     {
         // Process events
         sf::Event Event;
         while (App.GetEvent(Event))
         {
             // Close window : exit
             if (Event.Type == sf::Event::Closed)
                 App.Close();
         }

         // Clear screen
         App.Clear();

         // Draw the sprite
         App.Draw(Sprite);

         // Draw the string
         App.Draw(Text);

         // Update the window
         App.Display();
     }

     return EXIT_SUCCESS;
 }


It builds OK, but when I run it, I only get one console window with no 640x640 window. Also I see no test sprite, text, and OGG music playing? (I do have the test sprite JPG, font, and OGG in the directory of the executable.)

When I build above source in Code::Blocks under Windows Vista, I get the follow output:
Code: [Select]
-------------- Build: Debug in SFML_Beginning ---------------

Compiling: main.cpp
Linking console executable: bin\Debug\SFML_Beginning.exe
Info: resolving sf::Font::ourDefaultCharset      by linking to __imp___ZN2sf4Font17ourDefaultCharsetE (auto-import)
Info: resolving vtable for sf::Spriteby linking to __imp___ZTVN2sf6SpriteE (auto-import)
Info: resolving vtable for sf::Stringby linking to __imp___ZTVN2sf6StringE (auto-import)
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
Output size is 67.00 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 1 warnings


Again I am new to SFML.
If you can help me make this work I would appreciate it greatly.


JeZ+Lee
SLNTHERO@aol.com
Silent Hero Productions(R)
Video Game Design Studio
http://www.SilentHeroProductions.com

Pages: 1 ... 4 5 [6]