This file contains 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
<?php | |
class View | |
{ | |
private $data = []; | |
public function __construct($renderer, $template) | |
{ | |
$this->renderer = $renderer; | |
$this->template = $template; | |
} |
This file contains 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
<?php | |
namespace Component | |
{ | |
/** | |
* Class Middleware | |
* @package Component | |
*/ | |
class Middleware | |
{ |
This file contains 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
import windows, typeinfo, os | |
var wc : Widechar = 32515; | |
var h : HINST | |
var nid : NOTIFYICONDATA = NOTIFYICONDATA() | |
var szip : array[0..63, char] | |
var info : array[0..255, char] | |
var infoTitle : array[0..63, char] | |
var title = "My Title" | |
for x in 0..title.len: |
This file contains 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
import sdl2, sdl2.mixer, sdl2.audio | |
### ------------------ ### | |
### enjoy2d ### | |
### ------------------ ### | |
### SDL2_Mixer Wrapper ### | |
### ------------------ ### | |
type Sound* = ref object of RootObj | |
play : bool |
This file contains 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
#test audio | |
var sound : Mix_ChunkPtr | |
var channel : cint | |
var audio_rate : cint | |
var audio_format : uint16 | |
var audio_buffers : cint = 4096 | |
var audio_channels : cint = 2 | |
if Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) != 0: |
This file contains 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
include lib | |
# new image object | |
var img : Image | |
# font object (UTF8 support) | |
var myfont = initFont( | |
"UTF8 Test ǽ Ǽ ǻ Ǿ", # Default Text (which can be changed) | |
20, # Font Size | |
"OpenSans.ttf", # Font |
This file contains 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
include lib | |
var app = initApp("Example", 800, 600) | |
var img = Image() | |
#img.close() | |
var myfont = initFont( | |
"UTF8 Test ǽ Ǽ ǻ Ǿ", | |
20, |
This file contains 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
import sdl2, sdl2.ttf, sdl2.gfx | |
type | |
EAppMain* = ref object of RootObj | |
fps: int | |
width: int | |
height: int | |
title: string | |
running: bool | |
window*: WindowPtr |
This file contains 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
import sdl2, sdl2.image as img | |
import helpers | |
import typetraits | |
type Image* = ref object | |
rw*: RWopsPtr | |
format: string | |
loaded: bool | |
surface: SurfacePtr |
This file contains 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
import sdl2, sdl2.image as img | |
import helpers | |
import typetraits | |
type Image* = ref object | |
rw*: RWopsPtr | |
format: string | |
loaded: bool | |
surface: SurfacePtr |
NewerOlder