Exemple #1
0
int main(int argc, char const *argv[]) {
  window = S2D_CreateWindow("hello", 800, 600, 60, true, update, on_key, key_down);
  
  img_jpg = S2D_CreateImage(window, "media/tile.jpg");
  img_png = S2D_CreateImage(window, "media/tile.png");
  
  S2D_Show(window);
  return 0;
}
Exemple #2
0
int main() {

  S2D_Diagnostics(true);

  S2D_AddControllerMappingsFromFile("media/controllerdb.txt");

  window = S2D_CreateWindow(
    "Simple 2D — Controller", 600, 425, NULL, render, 0
  );

  window->on_key        = on_key;
  window->on_controller = on_controller;

  controller = S2D_CreateImage("media/controller.png");

  S2D_Show(window);
  S2D_FreeWindow(window);
  return 0;
}