Skip to content

Commit 597e314

Browse files
committed
GCC, sound_stop
1 parent ef8f81f commit 597e314

File tree

3 files changed

+126
-61
lines changed

3 files changed

+126
-61
lines changed

build.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if "%compiler%"=="cl" (
6767
rem MT for statically linked CRT, MD for dynamically linked CRT
6868
set win_runtime_lib=MD
6969
set common_c=..\!target_c! /Fe!target!.exe -nologo -D_WIN32_WINNT=0x0501 -D!runtime!=1 -D!platform!=1 -D!target_flag!=1 -TC -FC -EHa- -I..\ -I..\lib
70-
set common_l=/OPT:REF notelemetry.obj user32.lib gdi32.lib winmm.lib !target!.res
70+
set common_l=/OPT:REF user32.lib gdi32.lib winmm.lib !target!.res
7171

7272
if "%target%"=="lunity/lunity" (
7373
if "%luajit%"=="1" (
@@ -120,8 +120,8 @@ if "%compiler%"=="cl" (
120120

121121
) else if "%compiler%"=="gcc" (
122122

123-
set common_c=!target_c! -std=gnu99 -o ./bin/!target!.exe ./bin/!target_rc!.o -D!runtime!=1 -D!platform!=1 -D!target_flag!=1 -D_WIN32_WINNT=0x0501 -I./lib -I./lib/mingw -I.
124-
set common_l=-luser32 -lgdi32 -lwinmm
123+
set common_c=!target_c! -std=gnu99 -mssse3 -o ./bin/!target!.exe ./bin/!target_rc!.o -D!runtime!=1 -D!platform!=1 -D!target_flag!=1 -D_WIN32_WINNT=0x0501 -I./lib -I./lib/mingw -I.
124+
set common_l=-luser32 -lgdi32 -lwinmm -lopengl32
125125
if "%target%"=="lunity/lunity" (
126126
if "%luajit%"=="1" (
127127
set common_c=./lib/stb_vorbis.c ./lib/luajit/src/luajit.o !common_c! -I./lib/luajit/src

example-platformer.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
#define PUNITY_IMPLEMENTATION
99
#include "punity.h"
1010

11+
#define TILED_IMPLEMENTATION
12+
#include "punity-tiled.h"
13+
1114
typedef struct
1215
{
1316
SceneEntity *E;
@@ -46,6 +49,7 @@ player_init(Player *P, int x, int y)
4649
{
4750
P->E = scene_entity_add(&GAME->scene,
4851
rect_make_size(x, y, 8, 8),
52+
SceneLayer_Player,
4953
SceneLayer_Player | SceneLayer_Ground);
5054
P->jump = 0;
5155
P->fall = 1;
@@ -164,13 +168,15 @@ init()
164168
break;
165169

166170
default:
167-
tile->flags = Edge_Top;
171+
tile->edges = Edge_Top;
168172
tile->layer = SceneLayer_Ground;
169173
break;
170174
}
171175
}
172176
}
173177

178+
179+
174180
return 1;
175181
}
176182

0 commit comments

Comments
 (0)