sync fwk
parent
5aa83a524a
commit
7dcfbdf103
4
MAKE.bat
4
MAKE.bat
|
@ -804,9 +804,7 @@ if "!v4k!"=="yes" (
|
||||||
rem editor
|
rem editor
|
||||||
if "!editor!"=="yes" (
|
if "!editor!"=="yes" (
|
||||||
set edit=-DCOOK_ON_DEMAND
|
set edit=-DCOOK_ON_DEMAND
|
||||||
!echo! editor3 && !cc! !o! editor3.exe tools\editor\editor3.c !edit! -Iengine/joint !args! || set rc=1
|
!echo! editor && !cc! !o! editor.exe tools\editor\editor.c !edit! -Iengine/joint !args! || set rc=1
|
||||||
set edit=-DUI_LESSER_SPACING -DUI_ICONS_SMALL !edit!
|
|
||||||
!echo! editor && !cc! !o! editor.exe tools\editor\editor.c !edit! !import! !args! || set rc=1
|
|
||||||
|
|
||||||
rem if "!cc!"=="cl" (
|
rem if "!cc!"=="cl" (
|
||||||
rem set plug_export=/LD
|
rem set plug_export=/LD
|
||||||
|
|
|
@ -136,7 +136,7 @@ int main() {
|
||||||
}
|
}
|
||||||
if( ui_panel("Tiled", 0)) {
|
if( ui_panel("Tiled", 0)) {
|
||||||
ui_float("Zoom in", &cam.position.z);
|
ui_float("Zoom in", &cam.position.z);
|
||||||
tiled_ui(&tmx);
|
ui_tiled(&tmx);
|
||||||
ui_panel_end();
|
ui_panel_end();
|
||||||
}
|
}
|
||||||
/*if( ui_panel("Spine", 0)) {
|
/*if( ui_panel("Spine", 0)) {
|
||||||
|
|
|
@ -81,9 +81,7 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
ui_separator();
|
ui_separator();
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
vec3 remap = scale3(add3(sky.cubemap.sh[i], vec3(1,1,1)), 127.5f); // -1..+1 -> 0..255
|
ui_color3f(va("SH Coefficient [%d]", i), &sky.cubemap.sh[i].x);
|
||||||
ui_color3(va("SH Coefficient [%d]", i), &remap.x);
|
|
||||||
sky.cubemap.sh[i] = sub3(scale3(remap, 1/127.5f), vec3(1,1,1));
|
|
||||||
}
|
}
|
||||||
ui_panel_end();
|
ui_panel_end();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
#include "v4k.h"
|
#include "v4k.h"
|
||||||
#define spine spine2
|
#define spine spine2
|
||||||
#define spine_render spine_render2
|
#define spine_render spine_render2
|
||||||
#define spine_ui spine_ui2
|
|
||||||
#define spine_animate spine_animate2
|
#define spine_animate spine_animate2
|
||||||
#define spine_skin spine_skin2
|
#define spine_skin spine_skin2
|
||||||
|
#define ui_spine ui_spine2
|
||||||
|
|
||||||
enum { _64 = 64 }; // max bones
|
enum { _64 = 64 }; // max bones
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ void spine_render(spine_t *p, vec3 offset, unsigned flags) {
|
||||||
float deg_rect = self->rect_id ? p->skins[p->skin].rects[self->rect_id].deg : 0;
|
float deg_rect = self->rect_id ? p->skins[p->skin].rects[self->rect_id].deg : 0;
|
||||||
float tilt = p->atlas[self->atlas_id].deg + self->deg2 - deg_rect; // + self->deg2 + deg_rect + p->atlas[self->atlas_id].deg
|
float tilt = p->atlas[self->atlas_id].deg + self->deg2 - deg_rect; // + self->deg2 + deg_rect + p->atlas[self->atlas_id].deg
|
||||||
unsigned tint = ~0u;
|
unsigned tint = ~0u;
|
||||||
sprite_rect(p->texture, rect, zindex, add3(vec3(target.x,target.y,1),vec3(offsx,offsy,0)), tilt, tint);
|
sprite_rect(p->texture, rect, zindex, add4(vec4(target.x,target.y,1,1),vec4(offsx,offsy,0,0)), tilt, tint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ void spine_animate(spine_t *p, float *time, float *maxtime, float delta) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void spine_ui(spine_t *p) {
|
void ui_spine(spine_t *p) {
|
||||||
|
|
||||||
if( ui_collapse(va("Anims: %d", array_count(p->anims)), va("%p-a", p))) {
|
if( ui_collapse(va("Anims: %d", array_count(p->anims)), va("%p-a", p))) {
|
||||||
for each_array_ptr(p->anims, spine_anim_t, q) {
|
for each_array_ptr(p->anims, spine_anim_t, q) {
|
||||||
|
@ -514,7 +514,7 @@ void spine_ui(spine_t *p) {
|
||||||
sprite_rect(p->texture,
|
sprite_rect(p->texture,
|
||||||
// rect: vec4(r->x*1.0/p->texture.w,r->y*1.0/p->texture.h,(r->x+r->w)*1.0/p->texture.w,(r->y+r->h)*1.0/p->texture.h),
|
// rect: vec4(r->x*1.0/p->texture.w,r->y*1.0/p->texture.h,(r->x+r->w)*1.0/p->texture.w,(r->y+r->h)*1.0/p->texture.h),
|
||||||
ptr4(&r->x), // atlas
|
ptr4(&r->x), // atlas
|
||||||
0, vec3(0,0,0), r->deg + tilt, tint);
|
0, vec4(0,0,1,1), r->deg + tilt, tint);
|
||||||
sprite_flush();
|
sprite_flush();
|
||||||
camera_get_active()->position = vec3(+window_width()/3,window_height()/2.25,2);
|
camera_get_active()->position = vec3(+window_width()/3,window_height()/2.25,2);
|
||||||
}
|
}
|
||||||
|
@ -559,7 +559,7 @@ int main() {
|
||||||
if(ui_button("Load")) {
|
if(ui_button("Load")) {
|
||||||
s = spine("goblins.json", "goblins.atlas", 0);
|
s = spine("goblins.json", "goblins.atlas", 0);
|
||||||
}
|
}
|
||||||
spine_ui(&s);
|
ui_spine(&s);
|
||||||
if(ui_bool("Draw Skin", &do_skin));
|
if(ui_bool("Draw Skin", &do_skin));
|
||||||
if(ui_bool("Draw Skeleton", &do_skel));
|
if(ui_bool("Draw Skeleton", &do_skel));
|
||||||
ui_panel_end();
|
ui_panel_end();
|
||||||
|
|
Loading…
Reference in New Issue