Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
itdan3344
stb
提交
6cb8c1b6
S
stb
项目概览
itdan3344
/
stb
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
stb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6cb8c1b6
编写于
4月 15, 2015
作者:
S
Sean Barrett
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make compile as C
上级
0d076c08
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
7 deletion
+8
-7
stb_tilemap_editor.h
stb_tilemap_editor.h
+8
-7
未找到文件。
stb_tilemap_editor.h
浏览文件 @
6cb8c1b6
// stb_tilemap_editor.h - v0.3
1
- Sean Barrett - http://nothings.org/stb
// stb_tilemap_editor.h - v0.3
5
- Sean Barrett - http://nothings.org/stb
// placed in the public domain - not copyrighted - first released 2014-09
// placed in the public domain - not copyrighted - first released 2014-09
//
//
// Embeddable tilemap editor for C/C++
// Embeddable tilemap editor for C/C++
...
@@ -275,7 +275,7 @@
...
@@ -275,7 +275,7 @@
// either approach allows cut&pasting between levels.)
// either approach allows cut&pasting between levels.)
//
//
// REVISION HISTORY
// REVISION HISTORY
// 0.3
1
layername button changes
// 0.3
5
layername button changes
// - layername buttons grow with the layer panel
// - layername buttons grow with the layer panel
// - fix stbte_create_map being declared as stbte_create
// - fix stbte_create_map being declared as stbte_create
// - fix declaration of stbte_create_map
// - fix declaration of stbte_create_map
...
@@ -1100,9 +1100,10 @@ void stbte_set_layername(stbte_tilemap *tm, int layer, const char *layername)
...
@@ -1100,9 +1100,10 @@ void stbte_set_layername(stbte_tilemap *tm, int layer, const char *layername)
{
{
STBTE_ASSERT
(
layer
>=
0
&&
layer
<
tm
->
num_layers
);
STBTE_ASSERT
(
layer
>=
0
&&
layer
<
tm
->
num_layers
);
if
(
layer
>=
0
&&
layer
<
tm
->
num_layers
)
{
if
(
layer
>=
0
&&
layer
<
tm
->
num_layers
)
{
int
width
;
tm
->
layerinfo
[
layer
].
name
=
layername
;
tm
->
layerinfo
[
layer
].
name
=
layername
;
tm
->
has_layer_names
=
1
;
tm
->
has_layer_names
=
1
;
int
width
=
stbte__text_width
(
layername
);
width
=
stbte__text_width
(
layername
);
tm
->
layername_width
=
(
width
>
tm
->
layername_width
?
width
:
tm
->
layername_width
);
tm
->
layername_width
=
(
width
>
tm
->
layername_width
?
width
:
tm
->
layername_width
);
}
}
}
}
...
@@ -3392,6 +3393,10 @@ static void stbte__info(stbte_tilemap *tm, int x0, int y0, int w, int h)
...
@@ -3392,6 +3393,10 @@ static void stbte__info(stbte_tilemap *tm, int x0, int y0, int w, int h)
static
void
stbte__layers
(
stbte_tilemap
*
tm
,
int
x0
,
int
y0
,
int
w
,
int
h
)
static
void
stbte__layers
(
stbte_tilemap
*
tm
,
int
x0
,
int
y0
,
int
w
,
int
h
)
{
{
static
char
*
propmodes
[
3
]
=
{
"default"
,
"always"
,
"never"
};
int
num_rows
;
int
i
,
y
,
n
;
int
i
,
y
,
n
;
int
x1
=
x0
+
w
;
int
x1
=
x0
+
w
;
int
y1
=
y0
+
h
;
int
y1
=
y0
+
h
;
...
@@ -3403,10 +3408,6 @@ static void stbte__layers(stbte_tilemap *tm, int x0, int y0, int w, int h)
...
@@ -3403,10 +3408,6 @@ static void stbte__layers(stbte_tilemap *tm, int x0, int y0, int w, int h)
xoff
=
(
xoff
<
tm
->
layername_width
+
10
?
xoff
:
tm
->
layername_width
+
10
);
xoff
=
(
xoff
<
tm
->
layername_width
+
10
?
xoff
:
tm
->
layername_width
+
10
);
}
}
static
char
*
propmodes
[
3
]
=
{
"default"
,
"always"
,
"never"
};
int
num_rows
;
x0
+=
2
;
x0
+=
2
;
y0
+=
5
;
y0
+=
5
;
if
(
!
tm
->
has_layer_names
)
{
if
(
!
tm
->
has_layer_names
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录