Skip to content

Commit

Permalink
Generate sources (a539b84)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robot committed Jan 11, 2017
1 parent 089da93 commit 324d94c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The API of *CrSFML* (a library for Crystal) attempts to be similar to SFML (a C+
- SFML sometimes requires that an instance must remain alive as long as it is attached to the object. For example, a textured shape will cause errors if the texture object is destroyed. *CrSFML* prevents this problem by keeping a reference to the object.
- The `Event` *union* and `EventType` *enum* are represented as a class hierarchy. Instead of `ev.type == SF::Event::Resized` use `ev.is_a?(SF::Event::Resized)`; instead of `ev.size.width` use `ev.width`.
- Instead of subclassing `Drawable`, include the `Drawable` module with an abstract `draw` method.
- Most of the [documentation](http://blaxpirit.github.io/crsfml/api/) is taken directly from SFML, so don't be surprised if it talks in C++ terms.
- Most of the [documentation](http://oprypin.github.io/crsfml/api/) is taken directly from SFML, so don't be surprised if it talks in C++ terms.


Installation
Expand Down Expand Up @@ -109,7 +109,7 @@ Prerequisites: [Git][], [CMake][], [Crystal][], a C++ compiler
#### Download latest generator source code

```bash
git clone https://github.com/blaxpirit/crsfml
git clone https://github.com/oprypin/crsfml
cd crsfml
```

Expand Down Expand Up @@ -220,11 +220,11 @@ This library uses and is based on [SFML][sfml-authors].
Thanks to [Alan Willms][alanwillms] for translating [tutorials][] to Crystal.


[tutorials]: http://blaxpirit.github.io/crsfml/tutorials/
[api documentation]: http://blaxpirit.github.io/crsfml/api/
[releases]: https://github.com/blaxpirit/crsfml/releases
[demos]: https://github.com/blaxpirit/crsfml-examples
[sources]: https://github.com/blaxpirit/crsfml/tree/sources
[tutorials]: http://oprypin.github.io/crsfml/tutorials/
[api documentation]: http://oprypin.github.io/crsfml/api/
[releases]: https://github.com/oprypin/crsfml/releases
[demos]: https://github.com/oprypin/crsfml-examples
[sources]: https://github.com/oprypin/crsfml/tree/sources

[sfml]: http://www.sfml-dev.org/ "Simple and Fast Multimedia Library"
[csfml]: http://www.sfml-dev.org/download/csfml/
Expand All @@ -240,5 +240,5 @@ Thanks to [Alan Willms][alanwillms] for translating [tutorials][] to Crystal.
[crystal]: http://crystal-lang.org/
[shards]: https://github.com/crystal-lang/shards

[blaxpirit]: https://github.com/BlaXpirit
[blaxpirit]: https://github.com/oprypin
[alanwillms]: https://github.com/alanwillms
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

More interesting examples can be found in [a different repository][examples].

[examples]: https://github.com/BlaXpirit/crsfml-examples
[examples]: https://github.com/oprypin/crsfml-examples


Examples
Expand Down
4 changes: 2 additions & 2 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: crsfml
version: 2.4.3
version: 2.4.4

authors:
- Oleh Prypin <oleh@pryp.in>
Expand All @@ -9,7 +9,7 @@ description: |
license: zlib

crystal: 0.20.1
crystal: 0.20.4

libraries:
SFML: 2.4.1
2 changes: 1 addition & 1 deletion src/common.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "./sizes"

module SF
VERSION = "2.4.3"
VERSION = "2.4.4"
SFML_VERSION = "2.4.1"

# Raised in shorthand class methods if initialization or resource loading fails
Expand Down
4 changes: 2 additions & 2 deletions src/window/obj.cr
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ module SF
# * *minor* - Minor number of the context version
# * *attributes* - Attribute flags of the context
# * *s_rgb* - sRGB capable framebuffer
def initialize(depth : Int = 0, stencil : Int = 0, antialiasing : Int = 0, major : Int = 1, minor : Int = 1, attributes : Int = Default, s_rgb : Bool = false)
def initialize(depth : Int = 0, stencil : Int = 0, antialiasing : Int = 0, major : Int = 1, minor : Int = 1, attributes : Attribute = Default, s_rgb : Bool = false)
@depth_bits = uninitialized UInt32
@stencil_bits = uninitialized UInt32
@antialiasing_level = uninitialized UInt32
@major_version = uninitialized UInt32
@minor_version = uninitialized UInt32
@attribute_flags = uninitialized UInt32
@s_rgb_capable = uninitialized Bool
VoidCSFML.contextsettings_initialize_emSemSemSemSemSemSGZq(to_unsafe, LibC::UInt.new(depth), LibC::UInt.new(stencil), LibC::UInt.new(antialiasing), LibC::UInt.new(major), LibC::UInt.new(minor), LibC::UInt.new(attributes), s_rgb)
VoidCSFML.contextsettings_initialize_emSemSemSemSemSemSGZq(to_unsafe, LibC::UInt.new(depth), LibC::UInt.new(stencil), LibC::UInt.new(antialiasing), LibC::UInt.new(major), LibC::UInt.new(minor), attributes, s_rgb)
end
@depth_bits : LibC::UInt
# Bits of the depth buffer
Expand Down
10 changes: 5 additions & 5 deletions voidcsfml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Information

*VoidCSFML* is a library that allows [SFML][] (a library written in C++) to be used with pure C. It is not meant to be human-friendly or be used directly in C code (though it's possible). *VoidCSFML* is just an intermediate step between SFML and a higher-level binding (in this case, to [Crystal][] programming language) which is used because it's much easier to interface with a C library than a C++ one.

You can browse the [latest generated source code](https://github.com/BlaXpirit/crsfml/tree/sources/voidcsfml) of *VoidCSFML*, but it comes almost entirely from a [generator program](https://github.com/BlaXpirit/crsfml/blob/master/generate.cr), so contributions are accepted only in the *master* branch.
You can browse the [latest generated source code](https://github.com/oprypin/crsfml/tree/sources/voidcsfml) of *VoidCSFML*, but it comes almost entirely from a [generator program](https://github.com/oprypin/crsfml/blob/master/generate.cr), so contributions are accepted only in the *master* branch.

Installation
------------
Expand All @@ -26,9 +26,9 @@ For building, [CMake][] and a C++ compiler are required (to the best of the auth

### Obtaining the sources

Generating the sources is an **optional** step. If you are sure you have a matching version of SFML to the [pre-generated sources](https://github.com/BlaXpirit/crsfml/tree/sources/voidcsfml) (usually latest), you can use these. In fact, you may already be looking at the generated sources, just check whether the *voidcsfml/src* folder is populated. For development it's usually best to [build whole CrSFML](#building-crsfml). But, for completeness' sake, here's how to generate the sources manually:
Generating the sources is an **optional** step. If you are sure you have a matching version of SFML to the [pre-generated sources](https://github.com/oprypin/crsfml/tree/sources/voidcsfml) (usually latest), you can use these. In fact, you may already be looking at the generated sources, just check whether the *voidcsfml/src* folder is populated. For development it's usually best to [build whole CrSFML](#building-crsfml). But, for completeness' sake, here's how to generate the sources manually:

Go to *CrSFML*'s root folder and run [generate.cr](https://github.com/BlaXpirit/crsfml/blob/master/generate.cr):
Go to *CrSFML*'s root folder and run [generate.cr](https://github.com/oprypin/crsfml/blob/master/generate.cr):

```bash
crystal run generate.cr -- /usr/include
Expand Down Expand Up @@ -167,7 +167,7 @@ Not to forget that *VoidCSFML* is made automatically, so it can be quickly updat
Credits
-------

*VoidCSFML* was made by [Oleh Prypin][blaxpirit].
*VoidCSFML* was made by [Oleh Prypin][oprypin].

*VoidCSFML* is [licensed](LICENSE) under the terms and conditions of the *zlib/libpng* license.

Expand All @@ -188,4 +188,4 @@ The CMake files are based on those of [CSFML][].
[c]: https://en.wikipedia.org/wiki/C_(programming_language)
[crystal]: http://crystal-lang.org/

[blaxpirit]: https://github.com/BlaXpirit
[oprypin]: https://github.com/oprypin

0 comments on commit 324d94c

Please sign in to comment.