Created
October 10, 2016 12:08
-
-
Save floringogianu/1a5eaa0e56e6bf70079f18039ce71004 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This should work with xitari (the c++ Arcade Learning Environment fork) too. | |
# Define a type for the c struct pointer | |
type DoomGame end | |
# Load the shared object. This needs to expose c functions (see "extern C") | |
newGame = ccall( (:vizdoom_new, "libvizdoom"), Ptr{DoomGame}, ()) | |
# Load a configuration file. | |
hasLoaded = ccall( (:vizdoom_loadConfig, "libvizdoom"), Bool, (Ptr{DoomGame},Cstring), newGame, "../../examples/config/basic.cfg") | |
# Initialize the game. The GUI should pop up. | |
ccall( (:vizdoom_init, "libvizdoom"), Void, (Ptr{DoomGame},), newGame) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment