#include once "Tilengine.bi"

#ifndef NULL
#define NULL cptr(any ptr,0)
#endif

' engine init
TLN_Init(640,480,0,0,1)

' load resources
TLN_SetLoadPath("../assets/color")
var image = TLN_LoadBitmap("beach.png")
var sequencepack = TLN_LoadSequencePack("beach.sqx")
' setup
TLN_SetBGBitmap(image)
TLN_SetPaletteAnimation(0, TLN_GetBitmapPalette(image), TLN_FindSequence(sequencepack, "beach"), true)

' main loop
dim as long frame
TLN_CreateWindow(NULL, CWF_S1)
TLN_EnableBlur(false)
while TLN_ProcessWindow()
  TLN_DrawFrame(frame)
  frame+=1
wend  

TLN_DeleteBitmap(image)
TLN_DeleteSequencePack(sequencepack)
TLN_Deinit()

