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 - wvtrammell

Pages: 1 [2] 3 4 5
16
Graphics / Re: Mouse movement
« on: June 21, 2013, 12:32:35 am »
Mr Nexus
I am sorry but everyone is not as smart as you.  I have no idea what [code = cpp] tags even are much less how to create them.  As for the tutorials & documentation I have studied them till I am blue in the face and know no more than when I started.  If I was an experienced programmer I might understand it but it is just a hobby with me and I am doing the best I can.
Thanks for your words of encouragement.
Warren Trammell
P. S. If you read all my posts you surely know I will be 90 years young in October and all my brain cells may not be firing all the time.

17
Graphics / Re: Mouse movement
« on: June 20, 2013, 09:44:56 pm »
My goal is to draw a circle on the screen, pick it up with the mouse and move it to a new location. in the process I was attempting to learn something about mouse movements.
Thanks
Warren

18
Graphics / Mouse movement
« on: June 20, 2013, 07:05:43 pm »
When I run the following, the buffer0 prints out the movement of the mouse in the Y direction and the buffer1 prints a constant.  When I stop mouse movement and press it's button, buffer0 prints the current X location and buffer1 prints the current Y location.  Can someone please tell me what I am doing incorrectly?  Thanks a million.
Warren Trammell

#include <iostream>
#include <SFML/Graphics.hpp>

int main()
{
    char buffer0[25],buffer1[25];

    sf::RenderWindow window(sf::VideoMode(2300, 1300), "SFML window");
   
    sf::Font font;
    if (!font.loadFromFile("/users/warren/programming/projects/impact.ttf"))        return EXIT_FAILURE;
   
    sf::Text text;
    text.setFont(font);
    text.setCharacterSize(50);
    text.setColor(sf::Color::Red);
   
    window.clear(sf::Color(128,128,128));
       
    window.display();

    // Start the game loop
    while (window.isOpen())
    {
        // Process events
        sf::Event event;
        while (window.pollEvent(event))
        {
           switch (event.type)
            {
                case sf::Event::Closed:
                    window.close();
                    break;
            }
                 
 
        }
       
        window.clear(sf::Color(128,128,128));
       
        sprintf(buffer0,"%i",event.mouseWheel.x);
        sprintf(buffer1,"%i",event.mouseWheel.y);
       
        text.setString(buffer0);
        text.setPosition(500,600);
        window.draw(text);
       
        text.setString(buffer1);
        text.setPosition(1000,600);
        window.draw(text);
       
        window.display();
       }
      return EXIT_SUCCESS;
}

19
Graphics / Re: SFML 2.0 0n MAC
« on: May 26, 2013, 09:41:28 pm »
Code: [Select]
Mr. zsbzsb
Sorry but I have no idea what [code = cpp]
tag are.
Mr. G
I think you have found my problem.
I am trying to isolate and store the actual x's and y's being used for sorting later in the program.
Thanks
Warren

20
Graphics / SFML 2.0 0n MAC
« on: May 26, 2013, 12:04:54 am »
I just installed the latest version.  My old program user 2-dim arrays Array[200][200].  The new version will not accept this so I discovered on line how to use vectors  to define it.
std::vector< std::vector<int> > Array(200, std::vector<int>(200));
However, my source looks like this
ncx = 0; ncy = 0;
for (x = 0; x < 1000; x = x + 100)
    {
    for y = 0; y < 1000; y = y+100))
        {
        Array[ncx][ncy] = variable;
         ncy++;
        }
    ncx++;
    }
It compiles  but gives a run time error.   Bad index
Any suggestions?
Thanks
Warren

21
General / Re: SFML 2.0 0n MAC
« on: May 18, 2013, 04:50:35 am »
CornStock
 I am running Xcode 4.6.2 and that must be the problem. Comparing my results to your image you posted.
It looks the same except for the blocks in the middle.  I have the block "Summary Info  Build Settings Build Rules"
But under that block the first block is labeled OS X S Application Target
The second block is labeled Linked Frameworks & Libraries
The next block is labeled Entitlements

I clicked on the target as you show in your image  and this is what I get.
My left and right panels are in perfect agreement with your image.

22
General / Re: SFML 2.0 0n MAC
« on: May 17, 2013, 01:31:09 am »
As I read that link. it has many options as you proceed thru the installation.  I believe I have tried nearly every possible combination of those options, but if you found a combination that worked I guess I missed it.
Glad to know someone was successful.
Thanks for the info. I will keep looking at possible combinations.
Warren

23
General / Re: SFML 2.0 0n MAC
« on: May 16, 2013, 04:55:17 pm »
If I knew how to solve the problem I would not be begging for help.

If you or someone you know has successfully installed SFML 2.0
on a machine using OSX 10.8.3 and Xcode 4.6.2 please explain
how it was done either here or e-mail me at wvtrammell@me.com..
I will be eternally grateful, well at least for 10 years as I will be 90 this October.
Warren Trammell


24
General / Re: SFML 2.0 0n MAC
« on: May 15, 2013, 10:15:15 pm »
Please explain how to set the linker options right.
Thanks
Warren

25
General / Re: SFML 2.0 0n MAC
« on: May 15, 2013, 01:48:28 am »
I followed the tutorial except for the compiler option. I chose C++11 with clang and libc++.
With this I get all your red letter data but these errors when I compile the downloaded source file
Sorry it said my error file was too large to attach.

26
General / Re: SFML 2.0 0n MAC
« on: May 14, 2013, 05:23:33 pm »
Marco
Files under Project agree with your image.
Box Q is blank on mine
Apple LLVM compiler 4.2:
on mine reads Apple LLVM GCC 4.2
Thanks
Warren

27
General / Re: SFML 2.0 0n MAC
« on: May 14, 2013, 12:24:55 am »
My bad I meant 10.8.
I agree with your linking comment but I am just following the tutorial for installation. How do I link properly?
It doesn't seem to matter what I have in the main I still get the same general linking error messages.
I am new to Xcode so I do  not know how to any of that info to post it.
Warren

28
General / Installing SFML 2.0 help?
« on: May 13, 2013, 05:42:58 pm »
Hi
I  down loaded file SFML 2.0 Clang (OS X 10.8+)
on a machine using OSX 10.8.3 and Xcode 4.6.2.
I downloaded the 2.0 tutorial SFML & Xcode (Mac  OS X.)
I followed the instructions in paragraph "Installing SFML" :
copy contents of Frameworks to /Library/Frameworks.
copy sndfile.framework & freetype.framework from extlib
to /Library/ Frameworks
copy sfml from templates to /Library/Developer/Xcode/templates.
In Xcode I chose the options shown in the tutorial for a new project.
C++98  ith GCC and libstdc++ and target 10.5
Universal
Frameworks
Use window, graphic,audio, & network module.
The project navigator displays all the files shown in tutorial.
After compile:

25 Errors read:
Apple Mach -O Linker (ld) Error etc etc etc.

If I use C++11 with clang and libc++ instead of the suggested compiler
I get only 2 linker errors

Any one else having this problem with this configuration?

Thanks
Warren Trammell

29
General / Re: SFML 2.0 0n MAC
« on: May 11, 2013, 12:32:59 am »
Link /User/warren/Library/Developer/Xcode/DerivedData/MyFirstSFMLApp -fyashrrxljkkmrdhkkvobmiqotey/Build/intermediates/MyFirstSFMLApp.Build/Debug/MyFirstSFMLApp/Objects-normal/x86_64/MyFirstSFMLApp

"sf::RenderWindow::RenderWindow(sf::VideoMode,std::allocator<char>> const&, unsigned int, sf::ContentSettings, const&)" Referenced from: -main in main.o

"sf::Font::LoadFromFile( etc
"sf::Image::LoafFronFile( etc
"sf::Music::OpenFromFile( etc

Get the picture?
Thanks
Warren

30
General / SFML 2.0 0n MAC
« on: May 10, 2013, 05:47:46 pm »
Hi
I  down loaded file SFML 2.0 Clang (OS X 10.5+)
on a machine using OSX 10.8.3 and Xcode 4.6.2.
I followed the instructions in paragraph "Installing SFML" from the tutorial.
In Xcode I chose the options shown in the tutorial for a new project.
The project navigator displays all the files shown in tutorial.
After compile:
Messages shown read:
/Users/Warren/Library/Developer/Xcode/DerivedData/MyFirstSF MLApp etc etc etc.
This directory doesn't exist on my machine.

25 Errors read:
Apple Mach -O Linker (ld) Error etc etc etc.
Any one else having this problem with this configuration?

Thanks
Warren Trammell

Pages: 1 [2] 3 4 5