summaryrefslogtreecommitdiff
path: root/src/scene02.c
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2019-09-01 21:54:50 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2019-09-01 21:54:50 +0200
commit235cbc46a64ac63fd53df8a39a8681a8fcea2848 (patch)
tree3d792f5e4a1bb7f8054948b74b389be1a128b342 /src/scene02.c
downloaddemoscene-eo-235cbc46a64ac63fd53df8a39a8681a8fcea2848.tar.gz
demoscene-eo-235cbc46a64ac63fd53df8a39a8681a8fcea2848.tar.bz2
demoscene-eo-235cbc46a64ac63fd53df8a39a8681a8fcea2848.zip
Initial import. First working main loop.
Switching from scene to scene is done. Loading image to SDL, download SDL texture from VRAM to RAM is done. caca background from SDL texture is "done". GL drawing is not yet tried. Considering OpenGL3 + shaders.
Diffstat (limited to 'src/scene02.c')
-rw-r--r--src/scene02.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/scene02.c b/src/scene02.c
new file mode 100644
index 0000000..1989bf0
--- /dev/null
+++ b/src/scene02.c
@@ -0,0 +1,42 @@
+/*
+ * demoscene-eo, an ASCII art demoscene written as a gift for Emmanuel Otton retirement
+ * Copyright (C) 2019 XXXXXX XXXXXXX <xxxxxx@xxxxxx.fr>
+ *
+ * This file is part of demoscene-eo.
+ *
+ * demoscene-eo is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * demoscene-eo is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with demoscene-eo. If not, see <http://www.gnu.org/licenses/>
+ */
+#include "scene02.h"
+
+int scene02_init(graphical_env_t *ge, scene02_env_t *se) {
+ return 0;
+}
+
+void scene02_free(graphical_env_t *ge, scene02_env_t *se) {
+}
+
+int scene02_next(graphical_env_t *ge, scene02_env_t *se) {
+ // Shorthands
+ caca_canvas_t *cv = ge->cv;
+ //int w = ge->w, h = ge->h;
+ Uint32 frame = ge->sc_framecount;
+
+ caca_clear_canvas(cv);
+
+ if ( frame >= 100 ) {
+ return 1;
+ }
+ return 0;
+}
+