mapgen bugfixes

This commit is contained in:
KP 2024-07-28 01:12:24 -05:00
parent 38952ab0b5
commit b45a045dea
6 changed files with 354 additions and 283 deletions

View file

@ -1,245 +1,231 @@
[09:20:59 PM] Info: Starting...
[01:11:43 AM] Info: Starting...
KP3D version 2
===============================
Copyright (C) kpworld.xyz 2018-2024
Contact me! @kp_cftsz
[09:20:59 PM] Info: Initializing SDL
[09:20:59 PM] Info: Initializing OpenGL
[09:20:59 PM] Info: OpenGL version: 4.6.0 NVIDIA 536.23
[09:20:59 PM] Info: Initializing GLEW
[09:20:59 PM] Info: Initializing SDL_mixer
[09:20:59 PM] Info: Reticulating splines...
[09:20:59 PM] Info: Ready!
[09:20:59 PM] Info: Finalize mesh with 44 batches
[09:21:06 PM] Info: Finalize mesh with 48 batches
[09:21:08 PM] Info: Finalize mesh with 54 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 54 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:12 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:13 PM] Info: Finalize mesh with 55 batches
[09:21:14 PM] Info: Finalize mesh with 55 batches
[09:21:14 PM] Info: Finalize mesh with 55 batches
[09:21:14 PM] Info: Finalize mesh with 55 batches
[09:21:14 PM] Info: Finalize mesh with 55 batches
[09:21:14 PM] Info: Finalize mesh with 55 batches
[09:21:14 PM] Info: Finalize mesh with 55 batches
[09:21:14 PM] Info: Finalize mesh with 55 batches
[09:21:14 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:15 PM] Info: Finalize mesh with 55 batches
[09:21:21 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:24 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:21:26 PM] Info: Finalize mesh with 61 batches
[09:22:35 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:46 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:47 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:49 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:53 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[09:22:54 PM] Info: Finalize mesh with 65 batches
[01:11:43 AM] Info: Initializing SDL
[01:11:44 AM] Info: Initializing OpenGL
[01:11:44 AM] Info: OpenGL version: 4.6.0 NVIDIA 536.23
[01:11:44 AM] Info: Initializing GLEW
[01:11:44 AM] Info: Initializing SDL_mixer
[01:11:44 AM] Info: Reticulating splines...
[01:11:44 AM] Info: Ready!
[01:11:44 AM] Info: Finalize mesh with 45 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:48 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:49 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:51 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:52 AM] Info: Finalize mesh with 42 batches
[01:11:53 AM] Info: Finalize mesh with 42 batches
[01:11:53 AM] Info: Finalize mesh with 42 batches
[01:11:53 AM] Info: Finalize mesh with 42 batches
[01:11:59 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:07 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:08 AM] Info: Finalize mesh with 47 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:09 AM] Info: Finalize mesh with 48 batches
[01:12:10 AM] Info: Finalize mesh with 48 batches
[01:12:10 AM] Info: Finalize mesh with 48 batches
[01:12:10 AM] Info: Finalize mesh with 48 batches
[01:12:10 AM] Info: Finalize mesh with 48 batches
[01:12:10 AM] Info: Finalize mesh with 48 batches
[01:12:10 AM] Info: Finalize mesh with 49 batches
[01:12:10 AM] Info: Finalize mesh with 49 batches
[01:12:10 AM] Info: Finalize mesh with 49 batches
[01:12:10 AM] Info: Finalize mesh with 49 batches
[01:12:10 AM] Info: Finalize mesh with 49 batches
[01:12:10 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches
[01:12:11 AM] Info: Finalize mesh with 49 batches

View file

@ -120,7 +120,7 @@ void Map::BuildFlat(Sector& sector, Flat& flat, bool invert)
else
{
l.textures[TEX_FRONT] = nullptr;
l.flags = Wall::FLAG_OPENING;
l.flags = Wall::FLAG_OPENING | Wall::FLAG_SUBSECTOR_OPENING;
l.portal = &sector;
}
ss.push_back({l.start.x, l.start.y});
@ -285,13 +285,35 @@ void Map::BuildWall(Sector& sector, Wall& wall)
Vec3 b = {wall.end.x, 0.0f, wall.end.y};
BuildQuad(sector, wall, sector.floor, sector.ceiling, wall.textures[TEX_FRONT], a, b, false, false, false, wall.uv_offset[TEX_FRONT]);
if (wall.flags & Wall::FLAG_OPENING)
if ((wall.flags & Wall::FLAG_OPENING) && !(wall.flags & Wall::FLAG_JOINED))
//if (!(wall.flags & Wall::FLAG_JOINED))
{
// Build upper and lower walls for sectors connected to other sectors (or sectors within sectors)
bool flip = wall.portal->floor.base_height < sector.floor.base_height;
BuildQuad(sector, wall, sector.floor, wall.portal->floor, wall.textures[TEX_LOWER], a, b, flip, false, false, wall.uv_offset[TEX_LOWER]);
bool flip = wall.portal->floor.base_height < sector.floor.base_height, cflip = flip;
if (wall.flags & Wall::FLAG_SUBSECTOR_OPENING)
cflip = true;//cflip ^= 1;
if (cflip && !FloatCmp(wall.portal->floor.base_height, sector.floor.base_height))
BuildQuad(sector, wall, sector.floor, wall.portal->floor, wall.textures[TEX_LOWER], a, b, flip, false, false, wall.uv_offset[TEX_LOWER]);
flip = wall.portal->ceiling.base_height < sector.ceiling.base_height;
BuildQuad(sector, wall, sector.ceiling, wall.portal->ceiling, wall.textures[TEX_UPPER], a, b, !flip, false, false, wall.uv_offset[TEX_UPPER]);
cflip = flip;
if (wall.flags & Wall::FLAG_SUBSECTOR_OPENING)
cflip = false;// ^= 1;
if (!cflip && !FloatCmp(wall.portal->ceiling.base_height, sector.ceiling.base_height))
BuildQuad(sector, wall, sector.ceiling, wall.portal->ceiling, wall.textures[TEX_UPPER], a, b, !flip, false, false, wall.uv_offset[TEX_UPPER]);
wall.flags |= Wall::FLAG_JOINED;
// Find the other one this wall is joining to
#if 0
for (Wall& w: wall.portal->walls)
{
// TODO: Check if this is overlapping
//if (wall.flags & Wall::FLAG_OPENING)
if (WallOverlaps(*wall.portal, w) && !(wall.flags & Wall::FLAG_JOINED))
{
w.flags |= Wall::FLAG_JOINED;
}
}
#endif
}
}
@ -302,8 +324,8 @@ void Map::JoinSectors(Sector& sector)
for (int i = 0; i < sector.walls.size(); i++)
{
Wall& ld = sector.walls[i];
if (ld.flags & Wall::FLAG_TOUCHED)
continue;
//if (ld.flags & Wall::FLAG_TOUCHED)
// continue;
for (const auto& sp: sectors)
{
Sector& s = *sp;
@ -450,6 +472,61 @@ void Map::JoinSectors(Sector& sector)
}
}
bool Map::WallOverlaps(Sector& sector, Wall& ld)
{
bool d = false;
for (const auto& sp: sectors)
{
Sector& s = *sp;
if (s.id == sector.id)
continue;
Vec3 pos_a = { ld.start.x, sector.floor.base_height, ld.start.y };
Vec3 pos_b = { ld.end.x, sector.ceiling.base_height, ld.end.y };
float yb = s.floor.base_height;
float yt = s.ceiling.base_height;
bool not_child = s.parent_id != sector.id;
float e = 1.0f / 128.0f;
for (Wall& l: s.walls)
{
//if (l.flags & Wall::FLAG_TOUCHED)
// continue;
bool good = false;
bool start_cmp = PosCmp({ l.start.x, 0.0f, l.start.y }, { pos_a.x, 0.0f, pos_a.z }, e) ||
PosCmp({ l.start.x, 0.0f, l.start.y }, { pos_b.x, 0.0f, pos_b.z }, e);
bool end_cmp = PosCmp({ l.end.x, 0.0f, l.end.y }, { pos_b.x, 0.0f, pos_b.z }, e) ||
PosCmp({ l.end.x, 0.0f, l.end.y }, { pos_a.x, 0.0f, pos_a.z }, e);
bool same_points = start_cmp && end_cmp;
bool start_on_seg = PointInLine(l.start, { pos_a.x, pos_a.z }, { pos_b.x, pos_b.z });
bool end_on_seg = PointInLine(l.end, { pos_a.x, pos_a.z }, { pos_b.x, pos_b.z });
bool on_segment = start_on_seg && end_on_seg;
bool right_join = start_on_seg && end_cmp;
bool left_join = end_on_seg && start_cmp;
if (on_segment && not_child) {
if (same_points)
return true;
//if (left_join)
// return true;
//else if (right_join)
// return true;//d = true;
//KP3D_LOG_INFO("Wall is overlapping!");
}
//if (on_segment && not_child)
// good = true;
}
}
return d;
}
void Map::Init()
{
sectors.clear();
@ -480,7 +557,7 @@ void Map::Init()
XYf points5[] = {{11, 4}, {14, 4}, {14, 2}, {16, 2}, {16, 10}, {11, 10}};
// Platform above main sector (room over room testing)
XYf points6[] = {{1, 4}, {3, 4}, {3, 7}, {1, 7}};
auto build_sector = [&](Texture* wall, Texture* floor, Texture* ceil, float floor_height, float ceil_height, int id, XYf* points, size_t num_points, bool inverted = false)
auto build_sector = [&](Texture* wall, Texture* lower, Texture* floor, Texture* ceil, float floor_height, float ceil_height, int id, XYf* points, size_t num_points, bool inverted = false)
{
std::shared_ptr<Sector> s = std::make_unique<Sector>();
s->ceiling.texture = ceil;
@ -493,15 +570,15 @@ void Map::Init()
s->inverted = inverted;
float scl = 1.0f;
for (size_t i = 0; i < num_points; i++)
s->walls.push_back(Wall{ {wall,wall,wall}, {{0, 0}}, points[i], points[(i + 1) % num_points], Wall::NO_FLAGS, (uint)i });
s->walls.push_back(Wall{ {wall,wall,lower}, {{0, 0}}, points[i], points[(i + 1) % num_points], Wall::NO_FLAGS, (uint)i });
sectors.push_back(s);
};
build_sector(&tex3, &tex, &tex2, -1.0f, 5.0f, 1, points, std::size(points));
build_sector(&tex4, &tex2, &tex2, -1.5f, 4.0f, 2, points2, std::size(points2));
build_sector(&tex4, &tex, &tex2, -1.5f, 5.0f, 3, points3, std::size(points3), true);
build_sector(&tex4, &tex, &tex2, -1.5f, 4.0f, 4, points4, std::size(points4), true);
build_sector(&tex3, &tex, &tex2, 0.0f, 2.0f, 5, points5, std::size(points5), false);
build_sector(&tex4, &tex4, &tex4, 1.0f, 1.4f, 6, points6, std::size(points6), true);
build_sector(&tex3, &tex3, &tex, &tex2, -1.0f, 5.0f, 1, points, std::size(points));
build_sector(&tex4, &tex4, &tex2, &tex2, -1.5f, 4.0f, 2, points2, std::size(points2));
build_sector(&tex4, &tex4, &tex, &tex2, -1.5f, 5.0f, 3, points3, std::size(points3), true);
build_sector(&tex4, &tex4, &tex, &tex2, -1.5f, 4.0f, 4, points4, std::size(points4), true);
build_sector(&tex3, &tex4, &tex, &tex2, 0.0f, 2.0f, 5, points5, std::size(points5), false);
build_sector(&tex4, &tex4, &tex4, &tex4, 1.0f, 1.4f, 6, points6, std::size(points6), true);
Rebuild(GEN_NORMALS);
}
@ -540,12 +617,12 @@ void Map::Rebuild(NormalGenType gen_normals)
{
//bool touched = l.flags & Wall::FLAG_TOUCHED;
//bool no_collisions = l.flags & Wall::FLAG_NO_COLLISION;
//l.flags = Wall::NO_FLAGS;
l.flags = Wall::NO_FLAGS;
//if (touched)
// l.flags |= Wall::FLAG_TOUCHED;
//if (no_collisions)
// l.flags |= Wall::FLAG_NO_COLLISION;
//l.portal = nullptr;
l.portal = nullptr;
area += l.start.x * l.end.y;
area -= l.end.x * l.start.y;
@ -666,7 +743,7 @@ void Map::Rebuild(NormalGenType gen_normals)
[](const RenderBatch3D& a, const RenderBatch3D& b) -> bool
{
return /*a.texture->GetGLID() < b.texture->GetGLID() &&*/
std::any_cast<BatchSectorInfo>(a.userdata).type < std::any_cast<BatchSectorInfo>(b.userdata).type;
std::any_cast<BatchSectorInfo>(a.userdata).type < std::any_cast<BatchSectorInfo>(b.userdata).type;
},
[](const RenderBatch3D& a, const RenderBatch3D& b) -> bool
{
@ -674,9 +751,7 @@ void Map::Rebuild(NormalGenType gen_normals)
const auto& bu = std::any_cast<BatchSectorInfo>(b.userdata);
return a.texture->GetGLID() != b.texture->GetGLID() ||
(au.sector != bu.sector ||
au.flat != bu.flat ||
au.wall != bu.wall);
(au.sector != bu.sector || au.flat != bu.flat || au.wall != bu.wall);
}
);
KP3D_LOG_INFO("Finalize mesh with {} batches", m_mesh.GetBatchesRef().size());

View file

@ -27,7 +27,9 @@ struct Wall
FLAG_OPENING = 1 << 0,
FLAG_DELETE = 1 << 1,
FLAG_NO_COLLISION = 1 << 2,
FLAG_TOUCHED = 1 << 3
FLAG_TOUCHED = 1 << 3,
FLAG_JOINED = 1 << 4,
FLAG_SUBSECTOR_OPENING = 1 << 5
};
const Texture* textures[3];
@ -124,6 +126,7 @@ public:
void BuildQuad(Sector& sector, Wall& wall, Flat& flat_top, Flat& flat_bottom, const Texture* texture, Vec3 pos_a, Vec3 pos_b, bool flip, bool flip_u, bool flip_v, XYf uv_offset);
void BuildWall(Sector& sector, Wall& wall);
void JoinSectors(Sector& sector);
bool WallOverlaps(Sector& sector, Wall& wall);
void Init();

View file

@ -232,7 +232,7 @@ void StaticMesh::Finalize(NormalGenType gen_normals, BatchComparison sort, Batch
for (size_t j = 0; j < current.vertex_data.size(); j++)
{
auto& jv = current.vertex_data[j];
jv.normal = {0.5,0.5,0.5};
jv.normal = {0.5f, 0.5f, 0.5f};
}
// The following just generates face normals for each triangle
for (size_t j = 0; j < current.vertex_data.size(); j += 3)

View file

@ -7,6 +7,7 @@
#include "KP3D_Math.h"
#include "KP3D_Geometry.h"
#include "KP3D_Console.h"
#include "KP3D_EventBus.h"
#include "Sandbox.h"
@ -33,6 +34,9 @@ Editor::Editor()
m_stem.Load("editor/stem.png");
m_block.Load("block.png", true);
m_mode = MODE_BUILD;
kp3d::EventBus::Subscribe(this, &Editor::OnScrollWheel);
kp3d::EventBus::Subscribe(this, &Editor::OnKeyPress);
}
Editor::~Editor()
@ -94,27 +98,6 @@ void Editor::Update()
editor_hovered_batch = nullptr;
}
if (editor_hovered_batch)
{
auto info = std::any_cast<BatchSectorInfo>(editor_hovered_batch->userdata);
if (info.flat)
{
if (sandbox->IsKeyDown(KEY_PAGEUP))
{
info.flat->base_height += 0.1f;
sandbox->map.Rebuild(GEN_NORMALS);
}
if (sandbox->IsKeyDown(KEY_PAGEDOWN))
{
info.flat->base_height -= 0.1f;
sandbox->map.Rebuild(GEN_NORMALS);
}
}
}
}
void Editor::RenderMap()
@ -315,6 +298,26 @@ void Editor::RenderUIInfo()
}
}
void Editor::OnScrollWheel(const kp3d::ScrollWheelEvent* e)
{
using namespace kp3d;
if (!editor_hovered_batch)
return;
auto factor = (2.0f / 128.0f) * e->length;
auto info = std::any_cast<BatchSectorInfo>(editor_hovered_batch->userdata);
if (info.flat)
{
info.flat->base_height += factor;
sandbox->map.Rebuild(GEN_NORMALS);
}
}
void Editor::OnKeyPress(const kp3d::KeyPressEvent* e)
{
}
//
void Editor::RenderLine(kp3d::Vec3 p0, kp3d::Vec3 p1, kp3d::uint color)

View file

@ -2,6 +2,7 @@
#include "KP3D_Texture.h"
#include "KP3D_Math.h"
#include "KP3D_IOEvents.h"
enum EditMode
{
@ -29,6 +30,9 @@ public:
void RenderUI();
void RenderUIInfo();
void OnScrollWheel(const kp3d::ScrollWheelEvent* e);
void OnKeyPress(const kp3d::KeyPressEvent* e);
private:
void RenderLine(kp3d::Vec3 start, kp3d::Vec3 end, kp3d::uint color);