Added shadow, working on UI adapting

This commit is contained in:
Vladislav Khorev committed 2026-06-06 20:32:09 +03:00
1 parent f61a12f874
commit c991b5dbc1
10 files changed
+385817 -37

No files matched your search

+39 -33
View File
@@ -71,22 +71,24 @@
{
"id": "ghost_01x",
"name": "Тень",
"texturePath": "resources/w/ghost_skin002.png",
"animationIdlePath": "resources/w/default_float001.anim",
"animationWalkPath": "resources/w/default_float001.anim",
"animationActionIdlePath": "resources/w/float_attack003_cut.anim",
"animationActionAttackPath": "resources/w/float_attack003.anim",
"animationStandToActionPath": "resources/w/default_float001_cut.anim",
"animationActionToStandPath": "resources/w/default_float001_cut.anim",
"animationActionToDeathPath": "resources/w/default_float001_cut.anim",
"animationDeathIdlePath": "resources/w/default_float001_cut.anim",
"meshTextures": {
"Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png"
},
"animationIdlePath": "resources/w/shadow/shadow_idle003.txt",
"animationWalkPath": "resources/w/shadow/shadow_idle003.txt",
"animationActionIdlePath": "resources/w/shadow/shadow_idle003.txt",
"animationActionAttackPath": "resources/w/shadow/shadow_attack003.txt",
"animationStandToActionPath": "resources/w/shadow/shadow_idle003.txt",
"animationActionToStandPath": "resources/w/shadow/shadow_idle003.txt",
"animationActionToDeathPath": "resources/w/shadow/shadow_die003.txt",
"animationDeathIdlePath": "resources/w/shadow/shadow_dead003.txt",
"positionX": 0.0,
"positionY": 0.0,
"positionZ": -6.4,
"walkSpeed": 1.5,
"rotationSpeed": 8.0,
"modelScale": 0.01,
"modelCorrectionRotX": 0.0,
"modelScale": 1.0,
"modelCorrectionRotX": -90.0,
"modelCorrectionRotY": 180.0,
"modelCorrectionRotZ": 0.0,
"hp": 35,
@@ -95,22 +97,24 @@
{
"id": "ghost_02x",
"name": "Тень",
"texturePath": "resources/w/ghost_skin002.png",
"animationIdlePath": "resources/w/default_float001.anim",
"animationWalkPath": "resources/w/default_float001.anim",
"animationActionIdlePath": "resources/w/float_attack003_cut.anim",
"animationActionAttackPath": "resources/w/float_attack003.anim",
"animationStandToActionPath": "resources/w/default_float001_cut.anim",
"animationActionToStandPath": "resources/w/default_float001_cut.anim",
"animationActionToDeathPath": "resources/w/default_float001_cut.anim",
"animationDeathIdlePath": "resources/w/default_float001_cut.anim",
"meshTextures": {
"Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png"
},
"animationIdlePath": "resources/w/shadow/shadow_idle003.txt",
"animationWalkPath": "resources/w/shadow/shadow_idle003.txt",
"animationActionIdlePath": "resources/w/shadow/shadow_idle003.txt",
"animationActionAttackPath": "resources/w/shadow/shadow_attack003.txt",
"animationStandToActionPath": "resources/w/shadow/shadow_idle003.txt",
"animationActionToStandPath": "resources/w/shadow/shadow_idle003.txt",
"animationActionToDeathPath": "resources/w/shadow/shadow_die003.txt",
"animationDeathIdlePath": "resources/w/shadow/shadow_dead003.txt",
"positionX": -5.0,
"positionY": 0.0,
"positionZ": 12.0,
"walkSpeed": 1.5,
"rotationSpeed": 8.0,
"modelScale": 0.01,
"modelCorrectionRotX": 0.0,
"modelScale": 1.0,
"modelCorrectionRotX": -90.0,
"modelCorrectionRotY": 180.0,
"modelCorrectionRotZ": 0.0,
"hp": 35,
@@ -119,22 +123,24 @@
{
"id": "ghost_03x",
"name": "Тень",
"texturePath": "resources/w/ghost_skin002.png",
"animationIdlePath": "resources/w/default_float001.anim",
"animationWalkPath": "resources/w/default_float001.anim",
"animationActionIdlePath": "resources/w/float_attack003_cut.anim",
"animationActionAttackPath": "resources/w/float_attack003.anim",
"animationStandToActionPath": "resources/w/default_float001_cut.anim",
"animationActionToStandPath": "resources/w/default_float001_cut.anim",
"animationActionToDeathPath": "resources/w/default_float001_cut.anim",
"animationDeathIdlePath": "resources/w/default_float001_cut.anim",
"meshTextures": {
"Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png"
},
"animationIdlePath": "resources/w/shadow/shadow_idle003.txt",
"animationWalkPath": "resources/w/shadow/shadow_idle003.txt",
"animationActionIdlePath": "resources/w/shadow/shadow_idle003.txt",
"animationActionAttackPath": "resources/w/shadow/shadow_attack003.txt",
"animationStandToActionPath": "resources/w/shadow/shadow_idle003.txt",
"animationActionToStandPath": "resources/w/shadow/shadow_idle003.txt",
"animationActionToDeathPath": "resources/w/shadow/shadow_die003.txt",
"animationDeathIdlePath": "resources/w/shadow/shadow_dead003.txt",
"positionX": 5.0,
"positionY": 0.0,
"positionZ": 12.0,
"walkSpeed": 1.5,
"rotationSpeed": 8.0,
"modelScale": 0.01,
"modelCorrectionRotX": 0.0,
"modelScale": 1.0,
"modelCorrectionRotX": -90.0,
"modelCorrectionRotY": 180.0,
"modelCorrectionRotZ": 0.0,
"hp": 35,
Binary file not shown.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+27
View File
@@ -0,0 +1,27 @@
{
"root": {
"type": "FrameLayout",
"name": "hud_root",
"width": "match_parent",
"height": "match_parent",
"children": [
{
"type": "Button",
"name": "skipButton",
"horizontal_gravity": "right",
"vertical_gravity": "top",
"x": -23,
"y": -35,
"width": 200,
"height": 200,
"clickZoneWidth": 176,
"clickZoneHeight": 176,
"textures": {
"normal": "resources/w/ui/img/RedClose001_State=Default001.png",
"hover": "resources/w/ui/img/RedClose001_State=Selected001.png",
"pressed": "resources/w/ui/img/RedClose001_State=Tap001.png"
}
}
]
}
}
+1 -1
View File
@@ -653,7 +653,7 @@ namespace ZL
Environment::width = event.window.data1;
Environment::height = event.window.data2;
Environment::computeProjectionDimensions();
//menuManager.uiManager.updateAllLayouts();
menuManager.uiManager.updateAllLayouts();
std::cout << "Window resized: " << Environment::width << "x" << Environment::height << std::endl;
//space.clearTextRendererCache();
+14 -2
View File
@@ -2161,16 +2161,28 @@ namespace ZL {
node->name = nodeName;
node->width = bubble->computeWidth();
node->height = bubble->computeHeight();
node->localX = 430.0f;
if (incoming) {
node->localX = -node->width * 0.5+110 - (UiChatBubble::MAX_WIDTH - node->width);// +(425.f - node->width);
}
else
{
node->localX = node->width * 0.5-110 - (UiChatBubble::MAX_WIDTH - node->width);// -(425.f - node->width);
}
//430
//1280
node->localY = 0.0f;
node->visible = true;
node->chatBubble = bubble;
node->layoutSettings.hGravity = HorizontalGravity::Center;
/*
if (incoming) {
node->layoutSettings.hGravity = HorizontalGravity::Left;
} else {
node->layoutSettings.hGravity = HorizontalGravity::Right;
}
}*/
// Bottom gravity means localY is used as-is for screenRect.y (no parentH transform).
// The original static chat nodes all had "vertical_gravity": "bottom" for the same reason.
node->layoutSettings.vGravity = VerticalGravity::Bottom;
+11 -1
View File
@@ -259,7 +259,7 @@ int main(int argc, char *argv[]) {
}*/
const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_FULLSCREEN_DESKTOP;
#else
const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;
const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI;
#endif
ZL::Environment::window = SDL_CreateWindow(
@@ -272,6 +272,16 @@ int main(int argc, char *argv[]) {
SDL_GLContext ctx = SDL_GL_CreateContext(ZL::Environment::window);
SDL_GL_MakeCurrent(ZL::Environment::window, ctx);
// On HiDPI displays the drawable (physical) size is larger than the
// logical window size. Use the drawable size so the GL framebuffer
// covers every physical pixel and the image stays sharp.
{
int drawW, drawH;
SDL_GL_GetDrawableSize(ZL::Environment::window, &drawW, &drawH);
ZL::Environment::width = drawW;
ZL::Environment::height = drawH;
}
game.setup();
while (!game.shouldExit()) {