Initial import
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1101 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
d773b106be
commit
3a81c0cfab
14 changed files with 850 additions and 0 deletions
Binary file not shown.
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
FilesToMacroExpand = (
|
||||
"Info.plist",
|
||||
);
|
||||
Description = "This project builds a SFML application linked against the System, Window and Graphics packages, and written in C.";
|
||||
}
|
|
@ -0,0 +1,235 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
A0072ADE0F1D0EC500B4A594 /* csfml-system.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */; };
|
||||
A0072ADF0F1D0EC500B4A594 /* csfml-window.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */; };
|
||||
A0072AE00F1D0EC500B4A594 /* csfml-graphics.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CA0F07CFF2000AAC7B /* csfml-graphics.framework */; };
|
||||
A01FB6C90F07CFCE000AAC7B /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = A01FB6C80F07CFCE000AAC7B /* main.c */; };
|
||||
A01FB6CE0F07CFF2000AAC7B /* csfml-graphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CA0F07CFF2000AAC7B /* csfml-graphics.framework */; };
|
||||
A01FB6CF0F07CFF2000AAC7B /* csfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */; };
|
||||
A01FB6D00F07CFF2000AAC7B /* csfml-window.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
A0072AF00F1D0EDD00B4A594 /* Copy Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
A0072ADE0F1D0EC500B4A594 /* csfml-system.framework in Copy Frameworks */,
|
||||
A0072ADF0F1D0EC500B4A594 /* csfml-window.framework in Copy Frameworks */,
|
||||
A0072AE00F1D0EC500B4A594 /* csfml-graphics.framework in Copy Frameworks */,
|
||||
);
|
||||
name = "Copy Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
A01FB6A90F07CF6E000AAC7B /* «PROJECTNAME».app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "«PROJECTNAME».app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A01FB6AC0F07CF6E000AAC7B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
A01FB6C80F07CFCE000AAC7B /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
|
||||
A01FB6CA0F07CFF2000AAC7B /* csfml-graphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "csfml-graphics.framework"; path = "/Library/Frameworks/csfml-graphics.framework"; sourceTree = "<absolute>"; };
|
||||
A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "csfml-system.framework"; path = "/Library/Frameworks/csfml-system.framework"; sourceTree = "<absolute>"; };
|
||||
A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "csfml-window.framework"; path = "/Library/Frameworks/csfml-window.framework"; sourceTree = "<absolute>"; };
|
||||
A01FB6CD0F07CFF2000AAC7B /* SFML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SFML.framework; path = /Library/Frameworks/SFML.framework; sourceTree = "<absolute>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
A01FB6A70F07CF6E000AAC7B /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A01FB6CE0F07CFF2000AAC7B /* csfml-graphics.framework in Frameworks */,
|
||||
A01FB6CF0F07CFF2000AAC7B /* csfml-system.framework in Frameworks */,
|
||||
A01FB6D00F07CFF2000AAC7B /* csfml-window.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
A01FB69A0F07CF63000AAC7B = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A01FB6B20F07CF80000AAC7B /* Sources */,
|
||||
A01FB6B10F07CF7C000AAC7B /* Resources */,
|
||||
A01FB6B00F07CF75000AAC7B /* Frameworks */,
|
||||
A01FB6AA0F07CF6E000AAC7B /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A01FB6AA0F07CF6E000AAC7B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A01FB6A90F07CF6E000AAC7B /* «PROJECTNAME».app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A01FB6B00F07CF75000AAC7B /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A01FB6CD0F07CFF2000AAC7B /* SFML.framework */,
|
||||
A01FB6CB0F07CFF2000AAC7B /* csfml-system.framework */,
|
||||
A01FB6CC0F07CFF2000AAC7B /* csfml-window.framework */,
|
||||
A01FB6CA0F07CFF2000AAC7B /* csfml-graphics.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A01FB6B10F07CF7C000AAC7B /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A01FB6AC0F07CF6E000AAC7B /* Info.plist */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A01FB6B20F07CF80000AAC7B /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A01FB6C80F07CFCE000AAC7B /* main.c */,
|
||||
);
|
||||
name = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
A01FB6A80F07CF6E000AAC7B /* «PROJECTNAME» */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = A01FB6AF0F07CF6F000AAC7B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */;
|
||||
buildPhases = (
|
||||
A01FB6A50F07CF6E000AAC7B /* Resources */,
|
||||
A01FB6A60F07CF6E000AAC7B /* Sources */,
|
||||
A01FB6A70F07CF6E000AAC7B /* Frameworks */,
|
||||
A0072AF00F1D0EDD00B4A594 /* Copy Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "«PROJECTNAME»";
|
||||
productName = "«PROJECTNAME»";
|
||||
productReference = A01FB6A90F07CF6E000AAC7B /* «PROJECTNAME».app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
A01FB69C0F07CF63000AAC7B /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = A01FB69F0F07CF63000AAC7B /* Build configuration list for PBXProject "«PROJECTNAME»" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
hasScannedForEncodings = 0;
|
||||
mainGroup = A01FB69A0F07CF63000AAC7B;
|
||||
productRefGroup = A01FB6AA0F07CF6E000AAC7B /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
A01FB6A80F07CF6E000AAC7B /* «PROJECTNAME» */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
A01FB6A50F07CF6E000AAC7B /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
A01FB6A60F07CF6E000AAC7B /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A01FB6C90F07CFCE000AAC7B /* main.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
A01FB69D0F07CF63000AAC7B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
A01FB69E0F07CF63000AAC7B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
A01FB6AD0F07CF6F000AAC7B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = "«PROJECTNAME»";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
A01FB6AE0F07CF6F000AAC7B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = "«PROJECTNAME»";
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
A01FB69F0F07CF63000AAC7B /* Build configuration list for PBXProject "«PROJECTNAME»" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
A01FB69D0F07CF63000AAC7B /* Debug */,
|
||||
A01FB69E0F07CF63000AAC7B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
A01FB6AF0F07CF6F000AAC7B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
A01FB6AD0F07CF6F000AAC7B /* Debug */,
|
||||
A01FB6AE0F07CF6F000AAC7B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = A01FB69C0F07CF63000AAC7B /* Project object */;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,49 @@
|
|||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Graphics.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Entry point of application
|
||||
///
|
||||
/// \return Application exit code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
int main()
|
||||
{
|
||||
// Create main window
|
||||
sfVideoMode mode = {640, 480, 32};
|
||||
sfWindowSettings settings = {24, 8, 0};
|
||||
sfRenderWindow *App = sfRenderWindow_Create (mode, "CSFML Graphics", sfClose, settings);
|
||||
sfShape *Shape = sfShape_CreateCircle(200, 200, 100, sfYellow,10.f, sfBlue);
|
||||
|
||||
// Start game loop
|
||||
while (sfRenderWindow_IsOpened(App))
|
||||
{
|
||||
// Process events
|
||||
sfEvent Event;
|
||||
while (sfRenderWindow_GetEvent(App, &Event))
|
||||
{
|
||||
// Close window : exit
|
||||
if (Event.Type == sfEvtClosed)
|
||||
sfRenderWindow_Close(App);
|
||||
}
|
||||
|
||||
// Clear screen
|
||||
sfRenderWindow_Clear(App, sfBlack);
|
||||
|
||||
// Draw shape
|
||||
sfRenderWindow_DrawShape(App, Shape);
|
||||
|
||||
// Finally, display the rendered frame on screen
|
||||
sfRenderWindow_Display(App);
|
||||
}
|
||||
|
||||
// Destroy our objects
|
||||
sfShape_Destroy(Shape);
|
||||
sfRenderWindow_Destroy(App);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue