diff --git a/src/main/java/com/github/halotroop/litecraft/screens/ExitGameScreen.java b/src/main/java/com/github/halotroop/litecraft/screens/ExitGameScreen.java index 3b51f10..4e12e6f 100644 --- a/src/main/java/com/github/halotroop/litecraft/screens/ExitGameScreen.java +++ b/src/main/java/com/github/halotroop/litecraft/screens/ExitGameScreen.java @@ -1,11 +1,11 @@ package com.github.halotroop.litecraft.screens; -import org.joml.*; +import org.joml.Vector2f; import com.github.hydos.ginger.engine.common.font.GUIText; import com.github.hydos.ginger.engine.common.io.Window; import com.github.hydos.ginger.engine.common.screen.Screen; -import com.github.hydos.ginger.engine.opengl.api.*; +import com.github.hydos.ginger.engine.opengl.api.GingerGL; public class ExitGameScreen extends Screen { diff --git a/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java b/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java index 19aa89b..c09c86e 100644 --- a/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java +++ b/src/main/java/com/github/halotroop/litecraft/screens/IngameHUD.java @@ -6,7 +6,7 @@ import com.github.halotroop.litecraft.Litecraft; import com.github.hydos.ginger.engine.common.api.GingerRegister; import com.github.hydos.ginger.engine.common.font.GUIText; import com.github.hydos.ginger.engine.common.screen.Screen; -import com.github.hydos.ginger.engine.opengl.api.*; +import com.github.hydos.ginger.engine.opengl.api.GingerGL; public class IngameHUD extends Screen { diff --git a/src/main/java/com/github/halotroop/litecraft/world/World.java b/src/main/java/com/github/halotroop/litecraft/world/World.java index 66be8b3..1a4d2cd 100644 --- a/src/main/java/com/github/halotroop/litecraft/world/World.java +++ b/src/main/java/com/github/halotroop/litecraft/world/World.java @@ -1,10 +1,7 @@ package com.github.halotroop.litecraft.world; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ForkJoinPool; +import java.util.*; +import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.LongConsumer; diff --git a/src/main/java/com/github/halotroop/litecraft/world/dimension/Dimension.java b/src/main/java/com/github/halotroop/litecraft/world/dimension/Dimension.java index 9739796..23c0cea 100644 --- a/src/main/java/com/github/halotroop/litecraft/world/dimension/Dimension.java +++ b/src/main/java/com/github/halotroop/litecraft/world/dimension/Dimension.java @@ -2,7 +2,7 @@ package com.github.halotroop.litecraft.world.dimension; import java.util.*; -import com.github.halotroop.litecraft.world.gen.*; +import com.github.halotroop.litecraft.world.gen.ChunkGenerator; import com.github.halotroop.litecraft.world.gen.modifier.WorldModifier; import it.unimi.dsi.fastutil.ints.*; diff --git a/src/main/java/com/github/halotroop/litecraft/world/dimension/Dimensions.java b/src/main/java/com/github/halotroop/litecraft/world/dimension/Dimensions.java index 87c9939..2876d01 100644 --- a/src/main/java/com/github/halotroop/litecraft/world/dimension/Dimensions.java +++ b/src/main/java/com/github/halotroop/litecraft/world/dimension/Dimensions.java @@ -1,6 +1,6 @@ package com.github.halotroop.litecraft.world.dimension; -import com.github.halotroop.litecraft.world.gen.*; +import com.github.halotroop.litecraft.world.gen.EarthChunkGenerator; import com.github.halotroop.litecraft.world.gen.modifier.CavesModifier; public final class Dimensions diff --git a/src/main/java/com/github/halotroop/litecraft/world/gen/ChunkGenerator.java b/src/main/java/com/github/halotroop/litecraft/world/gen/ChunkGenerator.java index 3903540..fbd76ff 100644 --- a/src/main/java/com/github/halotroop/litecraft/world/gen/ChunkGenerator.java +++ b/src/main/java/com/github/halotroop/litecraft/world/gen/ChunkGenerator.java @@ -1,7 +1,6 @@ package com.github.halotroop.litecraft.world.gen; -import com.github.halotroop.litecraft.world.Chunk; -import com.github.halotroop.litecraft.world.World; +import com.github.halotroop.litecraft.world.*; public interface ChunkGenerator { diff --git a/src/main/java/com/github/halotroop/litecraft/world/gen/EarthChunkGenerator.java b/src/main/java/com/github/halotroop/litecraft/world/gen/EarthChunkGenerator.java index 4e1d04a..1c4d0e6 100644 --- a/src/main/java/com/github/halotroop/litecraft/world/gen/EarthChunkGenerator.java +++ b/src/main/java/com/github/halotroop/litecraft/world/gen/EarthChunkGenerator.java @@ -4,8 +4,7 @@ import java.util.Random; import com.github.halotroop.litecraft.types.block.*; import com.github.halotroop.litecraft.util.noise.OctaveSimplexNoise; -import com.github.halotroop.litecraft.world.Chunk; -import com.github.halotroop.litecraft.world.World; +import com.github.halotroop.litecraft.world.*; public class EarthChunkGenerator implements ChunkGenerator, WorldGenConstants { diff --git a/src/main/java/com/github/halotroop/litecraft/world/gen/modifier/CavesModifier.java b/src/main/java/com/github/halotroop/litecraft/world/gen/modifier/CavesModifier.java index 4bacc16..83f71d4 100644 --- a/src/main/java/com/github/halotroop/litecraft/world/gen/modifier/CavesModifier.java +++ b/src/main/java/com/github/halotroop/litecraft/world/gen/modifier/CavesModifier.java @@ -2,7 +2,7 @@ package com.github.halotroop.litecraft.world.gen.modifier; import java.util.Random; -import com.github.halotroop.litecraft.types.block.*; +import com.github.halotroop.litecraft.types.block.Blocks; import com.github.halotroop.litecraft.util.noise.OctaveSimplexNoise; import com.github.halotroop.litecraft.world.BlockAccess; import com.github.halotroop.litecraft.world.gen.WorldGenConstants; diff --git a/src/main/java/com/github/hydos/ginger/VulkanStarter.java b/src/main/java/com/github/hydos/ginger/VulkanStarter.java index f6406a6..9fe23cc 100644 --- a/src/main/java/com/github/hydos/ginger/VulkanStarter.java +++ b/src/main/java/com/github/hydos/ginger/VulkanStarter.java @@ -1,192 +1,27 @@ package com.github.hydos.ginger; -import static org.lwjgl.glfw.GLFW.GLFW_KEY_ESCAPE; -import static org.lwjgl.glfw.GLFW.GLFW_RELEASE; -import static org.lwjgl.glfw.GLFW.glfwDestroyWindow; -import static org.lwjgl.glfw.GLFW.glfwPollEvents; -import static org.lwjgl.glfw.GLFW.glfwSetFramebufferSizeCallback; -import static org.lwjgl.glfw.GLFW.glfwSetKeyCallback; -import static org.lwjgl.glfw.GLFW.glfwSetWindowShouldClose; -import static org.lwjgl.glfw.GLFW.glfwShowWindow; -import static org.lwjgl.glfw.GLFW.glfwTerminate; -import static org.lwjgl.glfw.GLFW.glfwWindowShouldClose; -import static org.lwjgl.glfw.GLFWVulkan.glfwCreateWindowSurface; -import static org.lwjgl.glfw.GLFWVulkan.glfwGetRequiredInstanceExtensions; -import static org.lwjgl.system.MemoryUtil.NULL; -import static org.lwjgl.system.MemoryUtil.memAddress; -import static org.lwjgl.system.MemoryUtil.memAlloc; -import static org.lwjgl.system.MemoryUtil.memAllocInt; -import static org.lwjgl.system.MemoryUtil.memAllocLong; -import static org.lwjgl.system.MemoryUtil.memAllocPointer; -import static org.lwjgl.system.MemoryUtil.memByteBuffer; -import static org.lwjgl.system.MemoryUtil.memCopy; -import static org.lwjgl.system.MemoryUtil.memFree; -import static org.lwjgl.vulkan.EXTDebugReport.VK_DEBUG_REPORT_ERROR_BIT_EXT; -import static org.lwjgl.vulkan.EXTDebugReport.VK_DEBUG_REPORT_WARNING_BIT_EXT; -import static org.lwjgl.vulkan.EXTDebugReport.vkDestroyDebugReportCallbackEXT; -import static org.lwjgl.vulkan.KHRSurface.VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; -import static org.lwjgl.vulkan.KHRSurface.VK_PRESENT_MODE_FIFO_KHR; -import static org.lwjgl.vulkan.KHRSurface.VK_PRESENT_MODE_IMMEDIATE_KHR; -import static org.lwjgl.vulkan.KHRSurface.VK_PRESENT_MODE_MAILBOX_KHR; -import static org.lwjgl.vulkan.KHRSurface.VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; -import static org.lwjgl.vulkan.KHRSurface.vkGetPhysicalDeviceSurfaceCapabilitiesKHR; -import static org.lwjgl.vulkan.KHRSurface.vkGetPhysicalDeviceSurfaceFormatsKHR; -import static org.lwjgl.vulkan.KHRSurface.vkGetPhysicalDeviceSurfacePresentModesKHR; -import static org.lwjgl.vulkan.KHRSurface.vkGetPhysicalDeviceSurfaceSupportKHR; -import static org.lwjgl.vulkan.KHRSwapchain.VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; -import static org.lwjgl.vulkan.KHRSwapchain.VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; -import static org.lwjgl.vulkan.KHRSwapchain.VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; -import static org.lwjgl.vulkan.KHRSwapchain.vkAcquireNextImageKHR; -import static org.lwjgl.vulkan.KHRSwapchain.vkCreateSwapchainKHR; -import static org.lwjgl.vulkan.KHRSwapchain.vkDestroySwapchainKHR; -import static org.lwjgl.vulkan.KHRSwapchain.vkGetSwapchainImagesKHR; -import static org.lwjgl.vulkan.KHRSwapchain.vkQueuePresentKHR; -import static org.lwjgl.vulkan.VK10.VK_ATTACHMENT_LOAD_OP_CLEAR; -import static org.lwjgl.vulkan.VK10.VK_ATTACHMENT_LOAD_OP_DONT_CARE; -import static org.lwjgl.vulkan.VK10.VK_ATTACHMENT_STORE_OP_DONT_CARE; -import static org.lwjgl.vulkan.VK10.VK_ATTACHMENT_STORE_OP_STORE; -import static org.lwjgl.vulkan.VK10.VK_BUFFER_USAGE_VERTEX_BUFFER_BIT; -import static org.lwjgl.vulkan.VK10.VK_COMMAND_BUFFER_LEVEL_PRIMARY; -import static org.lwjgl.vulkan.VK10.VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; -import static org.lwjgl.vulkan.VK10.VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; -import static org.lwjgl.vulkan.VK10.VK_FORMAT_B8G8R8A8_UNORM; -import static org.lwjgl.vulkan.VK10.VK_FORMAT_D16_UNORM; -import static org.lwjgl.vulkan.VK10.VK_FORMAT_D16_UNORM_S8_UINT; -import static org.lwjgl.vulkan.VK10.VK_FORMAT_D24_UNORM_S8_UINT; -import static org.lwjgl.vulkan.VK10.VK_FORMAT_D32_SFLOAT; -import static org.lwjgl.vulkan.VK10.VK_FORMAT_D32_SFLOAT_S8_UINT; -import static org.lwjgl.vulkan.VK10.VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT; -import static org.lwjgl.vulkan.VK10.VK_FORMAT_R32G32B32_SFLOAT; -import static org.lwjgl.vulkan.VK10.VK_FORMAT_UNDEFINED; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_ASPECT_COLOR_BIT; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_ASPECT_DEPTH_BIT; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_ASPECT_STENCIL_BIT; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_LAYOUT_UNDEFINED; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_TILING_OPTIMAL; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_TYPE_2D; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_USAGE_TRANSFER_SRC_BIT; -import static org.lwjgl.vulkan.VK10.VK_IMAGE_VIEW_TYPE_2D; -import static org.lwjgl.vulkan.VK10.VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; -import static org.lwjgl.vulkan.VK10.VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; -import static org.lwjgl.vulkan.VK10.VK_NULL_HANDLE; -import static org.lwjgl.vulkan.VK10.VK_PIPELINE_BIND_POINT_GRAPHICS; -import static org.lwjgl.vulkan.VK10.VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; -import static org.lwjgl.vulkan.VK10.VK_QUEUE_GRAPHICS_BIT; -import static org.lwjgl.vulkan.VK10.VK_SAMPLE_COUNT_1_BIT; -import static org.lwjgl.vulkan.VK10.VK_SHADER_STAGE_VERTEX_BIT; -import static org.lwjgl.vulkan.VK10.VK_SHARING_MODE_EXCLUSIVE; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_SUBMIT_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; -import static org.lwjgl.vulkan.VK10.VK_SUCCESS; -import static org.lwjgl.vulkan.VK10.VK_TRUE; -import static org.lwjgl.vulkan.VK10.VK_VERTEX_INPUT_RATE_VERTEX; -import static org.lwjgl.vulkan.VK10.vkAllocateCommandBuffers; -import static org.lwjgl.vulkan.VK10.vkAllocateDescriptorSets; -import static org.lwjgl.vulkan.VK10.vkAllocateMemory; -import static org.lwjgl.vulkan.VK10.vkBeginCommandBuffer; -import static org.lwjgl.vulkan.VK10.vkBindBufferMemory; -import static org.lwjgl.vulkan.VK10.vkBindImageMemory; -import static org.lwjgl.vulkan.VK10.vkCreateBuffer; -import static org.lwjgl.vulkan.VK10.vkCreateCommandPool; -import static org.lwjgl.vulkan.VK10.vkCreateDescriptorPool; -import static org.lwjgl.vulkan.VK10.vkCreateDescriptorSetLayout; -import static org.lwjgl.vulkan.VK10.vkCreateFramebuffer; -import static org.lwjgl.vulkan.VK10.vkCreateImage; -import static org.lwjgl.vulkan.VK10.vkCreateImageView; -import static org.lwjgl.vulkan.VK10.vkCreateRenderPass; -import static org.lwjgl.vulkan.VK10.vkCreateSemaphore; -import static org.lwjgl.vulkan.VK10.vkDestroyFramebuffer; -import static org.lwjgl.vulkan.VK10.vkDestroySemaphore; -import static org.lwjgl.vulkan.VK10.vkEndCommandBuffer; -import static org.lwjgl.vulkan.VK10.vkGetBufferMemoryRequirements; -import static org.lwjgl.vulkan.VK10.vkGetDeviceQueue; -import static org.lwjgl.vulkan.VK10.vkGetImageMemoryRequirements; -import static org.lwjgl.vulkan.VK10.vkGetPhysicalDeviceFormatProperties; -import static org.lwjgl.vulkan.VK10.vkGetPhysicalDeviceQueueFamilyProperties; -import static org.lwjgl.vulkan.VK10.vkMapMemory; -import static org.lwjgl.vulkan.VK10.vkQueueSubmit; -import static org.lwjgl.vulkan.VK10.vkQueueWaitIdle; -import static org.lwjgl.vulkan.VK10.vkResetCommandPool; -import static org.lwjgl.vulkan.VK10.vkUnmapMemory; -import static org.lwjgl.vulkan.VK10.vkUpdateDescriptorSets; +import static org.lwjgl.glfw.GLFW.*; +import static org.lwjgl.glfw.GLFWVulkan.*; +import static org.lwjgl.system.MemoryUtil.*; +import static org.lwjgl.vulkan.EXTDebugReport.*; +import static org.lwjgl.vulkan.KHRSurface.*; +import static org.lwjgl.vulkan.KHRSwapchain.*; +import static org.lwjgl.vulkan.VK10.*; import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.LongBuffer; +import java.nio.*; -import org.joml.Matrix4f; import org.lwjgl.PointerBuffer; -import org.lwjgl.glfw.GLFWFramebufferSizeCallback; -import org.lwjgl.glfw.GLFWKeyCallback; -import org.lwjgl.vulkan.VkAttachmentDescription; -import org.lwjgl.vulkan.VkAttachmentReference; -import org.lwjgl.vulkan.VkBufferCreateInfo; -import org.lwjgl.vulkan.VkCommandBuffer; -import org.lwjgl.vulkan.VkCommandBufferAllocateInfo; -import org.lwjgl.vulkan.VkCommandBufferBeginInfo; -import org.lwjgl.vulkan.VkCommandPoolCreateInfo; -import org.lwjgl.vulkan.VkDescriptorBufferInfo; -import org.lwjgl.vulkan.VkDescriptorPoolCreateInfo; -import org.lwjgl.vulkan.VkDescriptorPoolSize; -import org.lwjgl.vulkan.VkDescriptorSetAllocateInfo; -import org.lwjgl.vulkan.VkDescriptorSetLayoutBinding; -import org.lwjgl.vulkan.VkDescriptorSetLayoutCreateInfo; -import org.lwjgl.vulkan.VkDevice; -import org.lwjgl.vulkan.VkExtent2D; -import org.lwjgl.vulkan.VkFormatProperties; -import org.lwjgl.vulkan.VkFramebufferCreateInfo; -import org.lwjgl.vulkan.VkImageCreateInfo; -import org.lwjgl.vulkan.VkImageViewCreateInfo; -import org.lwjgl.vulkan.VkInstance; -import org.lwjgl.vulkan.VkMemoryAllocateInfo; -import org.lwjgl.vulkan.VkMemoryRequirements; -import org.lwjgl.vulkan.VkPhysicalDevice; -import org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties; -import org.lwjgl.vulkan.VkPipelineVertexInputStateCreateInfo; -import org.lwjgl.vulkan.VkPresentInfoKHR; -import org.lwjgl.vulkan.VkQueue; -import org.lwjgl.vulkan.VkQueueFamilyProperties; -import org.lwjgl.vulkan.VkRenderPassCreateInfo; -import org.lwjgl.vulkan.VkSemaphoreCreateInfo; -import org.lwjgl.vulkan.VkSubmitInfo; -import org.lwjgl.vulkan.VkSubpassDescription; -import org.lwjgl.vulkan.VkSurfaceCapabilitiesKHR; -import org.lwjgl.vulkan.VkSurfaceFormatKHR; -import org.lwjgl.vulkan.VkSwapchainCreateInfoKHR; -import org.lwjgl.vulkan.VkVertexInputAttributeDescription; -import org.lwjgl.vulkan.VkVertexInputBindingDescription; -import org.lwjgl.vulkan.VkWriteDescriptorSet; +import org.lwjgl.glfw.*; +import org.lwjgl.vulkan.*; import com.github.hydos.ginger.engine.common.info.RenderAPI; import com.github.hydos.ginger.engine.common.io.Window; import com.github.hydos.ginger.engine.vulkan.VKConstants; import com.github.hydos.ginger.engine.vulkan.memory.VKMemory; -import com.github.hydos.ginger.engine.vulkan.render.ubo.Ubo; -import com.github.hydos.ginger.engine.vulkan.render.ubo.UboDescriptor; +import com.github.hydos.ginger.engine.vulkan.render.ubo.*; import com.github.hydos.ginger.engine.vulkan.shaders.Pipeline; -import com.github.hydos.ginger.engine.vulkan.utils.VKDeviceProperties; -import com.github.hydos.ginger.engine.vulkan.utils.VKLoader; -import com.github.hydos.ginger.engine.vulkan.utils.VKUtils; +import com.github.hydos.ginger.engine.vulkan.utils.*; /** * * @author hydos06 diff --git a/src/main/java/com/github/hydos/ginger/engine/opengl/utils/GLLoader.java b/src/main/java/com/github/hydos/ginger/engine/opengl/utils/GlLoader.java similarity index 83% rename from src/main/java/com/github/hydos/ginger/engine/opengl/utils/GLLoader.java rename to src/main/java/com/github/hydos/ginger/engine/opengl/utils/GlLoader.java index 895cc77..c741fb7 100644 --- a/src/main/java/com/github/hydos/ginger/engine/opengl/utils/GLLoader.java +++ b/src/main/java/com/github/hydos/ginger/engine/opengl/utils/GlLoader.java @@ -6,11 +6,12 @@ import java.util.*; import org.lwjgl.BufferUtils; import org.lwjgl.opengl.*; +import com.github.halotroop.litecraft.types.block.*; import com.github.hydos.ginger.engine.common.io.Window; import com.github.hydos.ginger.engine.opengl.render.models.RawModel; -import com.github.hydos.ginger.engine.opengl.render.texture.*; +import com.github.hydos.ginger.engine.opengl.render.texture.Image; -public class GLLoader +public class GlLoader { private static List vaos = new ArrayList(); private static List vbos = new ArrayList(); @@ -101,6 +102,46 @@ public class GLLoader public static int loadTexture(String path) { return loadTextureDirectly("/textures/" + path); } + public static int createBlockAtlas() + { + int width = 16; + int height = 16; + //Prepare the atlas texture and gen it + int atlasId = GL40.glGenTextures(); + //Bind it to openGL + GL40.glBindTexture(GL40.GL_TEXTURE_2D, atlasId); + //Apply the settings for the texture + GL40.glTexParameteri(GL40.GL_TEXTURE_2D, GL40.GL_TEXTURE_MIN_FILTER, GL40.GL_NEAREST); + GL40.glTexParameteri(GL40.GL_TEXTURE_2D, GL40.GL_TEXTURE_MAG_FILTER, GL40.GL_NEAREST); + //Fill the image with blank image data + GL40.glTexImage2D(GL40.GL_TEXTURE_2D, 0, GL11.GL_RGBA, width*2, height*2, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, (ByteBuffer) null); + + long maxX = Math.round(Math.sqrt(Blocks.blocks.size())); + int currentX = 0; + int currentY = 0; + for(Block block: Blocks.blocks) { + //just in case + + if(!block.texture.equals("DONTLOAD")) { + System.out.println(block.texture); + block.updateBlockModelData(); + if(currentX > maxX) { + currentX = 0; + currentY--; + } + GL11.glTexSubImage2D(GL11.GL_TEXTURE_2D, 0, + currentX*width, currentY*height, + width, height, + GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, + block.model.getTexture().getTexture().getImage() + ); + currentX++; + } + + } + return atlasId; + } + public static int loadTextureDirectly(String path) { int textureID = GL11.glGenTextures(); diff --git a/src/main/java/com/github/hydos/ginger/engine/vulkan/render/ubo/Ubo.java b/src/main/java/com/github/hydos/ginger/engine/vulkan/render/ubo/Ubo.java index 317d1fb..fe34629 100644 --- a/src/main/java/com/github/hydos/ginger/engine/vulkan/render/ubo/Ubo.java +++ b/src/main/java/com/github/hydos/ginger/engine/vulkan/render/ubo/Ubo.java @@ -1,33 +1,13 @@ package com.github.hydos.ginger.engine.vulkan.render.ubo; -import static org.lwjgl.system.MemoryUtil.memAllocInt; -import static org.lwjgl.system.MemoryUtil.memAllocLong; -import static org.lwjgl.system.MemoryUtil.memAllocPointer; -import static org.lwjgl.system.MemoryUtil.memByteBuffer; -import static org.lwjgl.system.MemoryUtil.memFree; -import static org.lwjgl.vulkan.VK10.VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT; -import static org.lwjgl.vulkan.VK10.VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_SUCCESS; -import static org.lwjgl.vulkan.VK10.vkAllocateMemory; -import static org.lwjgl.vulkan.VK10.vkBindBufferMemory; -import static org.lwjgl.vulkan.VK10.vkCreateBuffer; -import static org.lwjgl.vulkan.VK10.vkGetBufferMemoryRequirements; -import static org.lwjgl.vulkan.VK10.vkMapMemory; -import static org.lwjgl.vulkan.VK10.vkUnmapMemory; +import static org.lwjgl.system.MemoryUtil.*; +import static org.lwjgl.vulkan.VK10.*; -import java.nio.ByteBuffer; -import java.nio.IntBuffer; -import java.nio.LongBuffer; +import java.nio.*; import org.joml.Matrix4f; import org.lwjgl.PointerBuffer; -import org.lwjgl.vulkan.VkBufferCreateInfo; -import org.lwjgl.vulkan.VkDevice; -import org.lwjgl.vulkan.VkMemoryAllocateInfo; -import org.lwjgl.vulkan.VkMemoryRequirements; -import org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties; +import org.lwjgl.vulkan.*; import com.github.hydos.ginger.engine.common.io.Window; import com.github.hydos.ginger.engine.vulkan.memory.VKMemory; diff --git a/src/main/java/com/github/hydos/ginger/engine/vulkan/shaders/Pipeline.java b/src/main/java/com/github/hydos/ginger/engine/vulkan/shaders/Pipeline.java index ee04e31..4a424d7 100644 --- a/src/main/java/com/github/hydos/ginger/engine/vulkan/shaders/Pipeline.java +++ b/src/main/java/com/github/hydos/ginger/engine/vulkan/shaders/Pipeline.java @@ -1,51 +1,12 @@ package com.github.hydos.ginger.engine.vulkan.shaders; -import static org.lwjgl.system.MemoryUtil.memAllocInt; -import static org.lwjgl.system.MemoryUtil.memAllocLong; -import static org.lwjgl.system.MemoryUtil.memFree; -import static org.lwjgl.vulkan.VK10.VK_COMPARE_OP_ALWAYS; -import static org.lwjgl.vulkan.VK10.VK_COMPARE_OP_LESS_OR_EQUAL; -import static org.lwjgl.vulkan.VK10.VK_CULL_MODE_NONE; -import static org.lwjgl.vulkan.VK10.VK_DYNAMIC_STATE_SCISSOR; -import static org.lwjgl.vulkan.VK10.VK_DYNAMIC_STATE_VIEWPORT; -import static org.lwjgl.vulkan.VK10.VK_FRONT_FACE_COUNTER_CLOCKWISE; -import static org.lwjgl.vulkan.VK10.VK_NULL_HANDLE; -import static org.lwjgl.vulkan.VK10.VK_POLYGON_MODE_FILL; -import static org.lwjgl.vulkan.VK10.VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; -import static org.lwjgl.vulkan.VK10.VK_SAMPLE_COUNT_1_BIT; -import static org.lwjgl.vulkan.VK10.VK_SHADER_STAGE_FRAGMENT_BIT; -import static org.lwjgl.vulkan.VK10.VK_SHADER_STAGE_VERTEX_BIT; -import static org.lwjgl.vulkan.VK10.VK_STENCIL_OP_KEEP; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_SUCCESS; -import static org.lwjgl.vulkan.VK10.vkCreateGraphicsPipelines; -import static org.lwjgl.vulkan.VK10.vkCreatePipelineLayout; +import static org.lwjgl.system.MemoryUtil.*; +import static org.lwjgl.vulkan.VK10.*; import java.io.IOException; -import java.nio.IntBuffer; -import java.nio.LongBuffer; +import java.nio.*; -import org.lwjgl.vulkan.VkDevice; -import org.lwjgl.vulkan.VkGraphicsPipelineCreateInfo; -import org.lwjgl.vulkan.VkPipelineColorBlendAttachmentState; -import org.lwjgl.vulkan.VkPipelineColorBlendStateCreateInfo; -import org.lwjgl.vulkan.VkPipelineDepthStencilStateCreateInfo; -import org.lwjgl.vulkan.VkPipelineDynamicStateCreateInfo; -import org.lwjgl.vulkan.VkPipelineInputAssemblyStateCreateInfo; -import org.lwjgl.vulkan.VkPipelineLayoutCreateInfo; -import org.lwjgl.vulkan.VkPipelineMultisampleStateCreateInfo; -import org.lwjgl.vulkan.VkPipelineRasterizationStateCreateInfo; -import org.lwjgl.vulkan.VkPipelineShaderStageCreateInfo; -import org.lwjgl.vulkan.VkPipelineVertexInputStateCreateInfo; -import org.lwjgl.vulkan.VkPipelineViewportStateCreateInfo; +import org.lwjgl.vulkan.*; import com.github.hydos.ginger.engine.vulkan.utils.VKUtils; diff --git a/src/main/java/com/github/hydos/ginger/engine/vulkan/shaders/VKShaderManager.java b/src/main/java/com/github/hydos/ginger/engine/vulkan/shaders/VKShaderManager.java index 51e4b63..8e6a74f 100644 --- a/src/main/java/com/github/hydos/ginger/engine/vulkan/shaders/VKShaderManager.java +++ b/src/main/java/com/github/hydos/ginger/engine/vulkan/shaders/VKShaderManager.java @@ -1,20 +1,12 @@ package com.github.hydos.ginger.engine.vulkan.shaders; -import static org.lwjgl.system.MemoryUtil.memAllocLong; -import static org.lwjgl.system.MemoryUtil.memFree; -import static org.lwjgl.system.MemoryUtil.memUTF8; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; -import static org.lwjgl.vulkan.VK10.VK_SUCCESS; -import static org.lwjgl.vulkan.VK10.vkCreateShaderModule; +import static org.lwjgl.system.MemoryUtil.*; +import static org.lwjgl.vulkan.VK10.*; import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.LongBuffer; +import java.nio.*; -import org.lwjgl.vulkan.VkDevice; -import org.lwjgl.vulkan.VkPipelineShaderStageCreateInfo; -import org.lwjgl.vulkan.VkShaderModuleCreateInfo; +import org.lwjgl.vulkan.*; import com.github.hydos.ginger.engine.vulkan.utils.VKUtils; diff --git a/src/main/java/com/github/hydos/ginger/engine/vulkan/utils/VKDeviceProperties.java b/src/main/java/com/github/hydos/ginger/engine/vulkan/utils/VKDeviceProperties.java index d9f0c16..0c50ae1 100644 --- a/src/main/java/com/github/hydos/ginger/engine/vulkan/utils/VKDeviceProperties.java +++ b/src/main/java/com/github/hydos/ginger/engine/vulkan/utils/VKDeviceProperties.java @@ -1,25 +1,12 @@ package com.github.hydos.ginger.engine.vulkan.utils; -import static org.lwjgl.system.MemoryUtil.memAllocFloat; -import static org.lwjgl.system.MemoryUtil.memAllocInt; -import static org.lwjgl.system.MemoryUtil.memAllocPointer; -import static org.lwjgl.system.MemoryUtil.memFree; -import static org.lwjgl.system.MemoryUtil.memUTF8; +import static org.lwjgl.system.MemoryUtil.*; import static org.lwjgl.vulkan.KHRSwapchain.VK_KHR_SWAPCHAIN_EXTENSION_NAME; -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; +import java.nio.*; import org.lwjgl.PointerBuffer; -import org.lwjgl.vulkan.VK12; -import org.lwjgl.vulkan.VkDevice; -import org.lwjgl.vulkan.VkDeviceCreateInfo; -import org.lwjgl.vulkan.VkDeviceQueueCreateInfo; -import org.lwjgl.vulkan.VkInstance; -import org.lwjgl.vulkan.VkPhysicalDevice; -import org.lwjgl.vulkan.VkPhysicalDeviceMemoryProperties; -import org.lwjgl.vulkan.VkQueueFamilyProperties; +import org.lwjgl.vulkan.*; import com.github.hydos.ginger.engine.vulkan.VKConstants; diff --git a/src/main/java/com/github/hydos/ginger/engine/vulkan/utils/VKUtils.java b/src/main/java/com/github/hydos/ginger/engine/vulkan/utils/VKUtils.java index f11cc66..1582261 100644 --- a/src/main/java/com/github/hydos/ginger/engine/vulkan/utils/VKUtils.java +++ b/src/main/java/com/github/hydos/ginger/engine/vulkan/utils/VKUtils.java @@ -1,59 +1,17 @@ package com.github.hydos.ginger.engine.vulkan.utils; -import static org.lwjgl.system.MemoryUtil.memAllocLong; -import static org.lwjgl.system.MemoryUtil.memAllocPointer; -import static org.lwjgl.system.MemoryUtil.memFree; -import static org.lwjgl.system.MemoryUtil.memUTF8; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_anyhit_shader; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_closesthit_shader; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_compilation_status_success; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_compile_into_spv; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_compile_options_initialize; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_compile_options_set_include_callbacks; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_compile_options_set_optimization_level; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_compiler_initialize; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_compiler_release; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_fragment_shader; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_miss_shader; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_optimization_level_performance; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_raygen_shader; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_result_get_bytes; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_result_get_compilation_status; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_result_get_error_message; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_result_get_length; -import static org.lwjgl.util.shaderc.Shaderc.shaderc_vertex_shader; -import static org.lwjgl.vulkan.EXTDebugReport.VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; -import static org.lwjgl.vulkan.EXTDebugReport.vkCreateDebugReportCallbackEXT; -import static org.lwjgl.vulkan.KHRSurface.VK_ERROR_NATIVE_WINDOW_IN_USE_KHR; -import static org.lwjgl.vulkan.KHRSurface.VK_ERROR_SURFACE_LOST_KHR; +import static org.lwjgl.system.MemoryUtil.*; +import static org.lwjgl.util.shaderc.Shaderc.*; +import static org.lwjgl.vulkan.EXTDebugReport.*; +import static org.lwjgl.vulkan.KHRSurface.*; import java.io.IOException; -import java.nio.ByteBuffer; -import java.nio.LongBuffer; +import java.nio.*; -import org.lwjgl.BufferUtils; -import org.lwjgl.PointerBuffer; +import org.lwjgl.*; import org.lwjgl.system.MemoryStack; -import org.lwjgl.util.shaderc.ShadercIncludeResolve; -import org.lwjgl.util.shaderc.ShadercIncludeResult; -import org.lwjgl.util.shaderc.ShadercIncludeResultRelease; -import org.lwjgl.vulkan.EXTDebugReport; -import org.lwjgl.vulkan.KHRDisplaySwapchain; -import org.lwjgl.vulkan.KHRSwapchain; -import org.lwjgl.vulkan.NVRayTracing; -import org.lwjgl.vulkan.VK10; -import org.lwjgl.vulkan.VK12; -import org.lwjgl.vulkan.VkClearValue; -import org.lwjgl.vulkan.VkCommandBuffer; -import org.lwjgl.vulkan.VkCommandBufferAllocateInfo; -import org.lwjgl.vulkan.VkCommandBufferBeginInfo; -import org.lwjgl.vulkan.VkDebugReportCallbackCreateInfoEXT; -import org.lwjgl.vulkan.VkDebugReportCallbackEXT; -import org.lwjgl.vulkan.VkDevice; -import org.lwjgl.vulkan.VkInstance; -import org.lwjgl.vulkan.VkRect2D; -import org.lwjgl.vulkan.VkRenderPassBeginInfo; -import org.lwjgl.vulkan.VkViewport; +import org.lwjgl.util.shaderc.*; +import org.lwjgl.vulkan.*; import com.github.hydos.ginger.engine.common.tools.IOUtil; import com.github.hydos.ginger.engine.vulkan.VKConstants; diff --git a/src/main/java/tk/valoeghese/sod/BinaryData.java b/src/main/java/tk/valoeghese/sod/BinaryData.java index 9c7ef29..a391cff 100644 --- a/src/main/java/tk/valoeghese/sod/BinaryData.java +++ b/src/main/java/tk/valoeghese/sod/BinaryData.java @@ -1,14 +1,7 @@ package tk.valoeghese.sod; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; +import java.io.*; +import java.util.*; import tk.valoeghese.sod.exception.SODParseException; diff --git a/src/main/java/tk/valoeghese/sod/ByteArrayDataSection.java b/src/main/java/tk/valoeghese/sod/ByteArrayDataSection.java index 3fcbc22..5ac7ecd 100644 --- a/src/main/java/tk/valoeghese/sod/ByteArrayDataSection.java +++ b/src/main/java/tk/valoeghese/sod/ByteArrayDataSection.java @@ -2,8 +2,7 @@ package tk.valoeghese.sod; import java.util.Iterator; -import it.unimi.dsi.fastutil.bytes.ByteArrayList; -import it.unimi.dsi.fastutil.bytes.ByteList; +import it.unimi.dsi.fastutil.bytes.*; public class ByteArrayDataSection implements BaseDataSection { public ByteArrayDataSection() { diff --git a/src/main/java/tk/valoeghese/sod/DataSection.java b/src/main/java/tk/valoeghese/sod/DataSection.java index 34c1084..55a1336 100644 --- a/src/main/java/tk/valoeghese/sod/DataSection.java +++ b/src/main/java/tk/valoeghese/sod/DataSection.java @@ -1,8 +1,6 @@ package tk.valoeghese.sod; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; +import java.util.*; /** * Represents a section of SOD data. diff --git a/src/main/java/tk/valoeghese/sod/DoubleArrayDataSection.java b/src/main/java/tk/valoeghese/sod/DoubleArrayDataSection.java index 9fca1ad..dda91f6 100644 --- a/src/main/java/tk/valoeghese/sod/DoubleArrayDataSection.java +++ b/src/main/java/tk/valoeghese/sod/DoubleArrayDataSection.java @@ -2,8 +2,7 @@ package tk.valoeghese.sod; import java.util.Iterator; -import it.unimi.dsi.fastutil.doubles.DoubleArrayList; -import it.unimi.dsi.fastutil.doubles.DoubleList; +import it.unimi.dsi.fastutil.doubles.*; public class DoubleArrayDataSection implements BaseDataSection { public DoubleArrayDataSection() { diff --git a/src/main/java/tk/valoeghese/sod/FloatArrayDataSection.java b/src/main/java/tk/valoeghese/sod/FloatArrayDataSection.java index 2afe075..ebc4497 100644 --- a/src/main/java/tk/valoeghese/sod/FloatArrayDataSection.java +++ b/src/main/java/tk/valoeghese/sod/FloatArrayDataSection.java @@ -2,8 +2,7 @@ package tk.valoeghese.sod; import java.util.Iterator; -import it.unimi.dsi.fastutil.floats.FloatArrayList; -import it.unimi.dsi.fastutil.floats.FloatList; +import it.unimi.dsi.fastutil.floats.*; public class FloatArrayDataSection implements BaseDataSection { public FloatArrayDataSection() { diff --git a/src/main/java/tk/valoeghese/sod/IntArrayDataSection.java b/src/main/java/tk/valoeghese/sod/IntArrayDataSection.java index 77a2be6..8072118 100644 --- a/src/main/java/tk/valoeghese/sod/IntArrayDataSection.java +++ b/src/main/java/tk/valoeghese/sod/IntArrayDataSection.java @@ -2,8 +2,7 @@ package tk.valoeghese.sod; import java.util.Iterator; -import it.unimi.dsi.fastutil.ints.IntArrayList; -import it.unimi.dsi.fastutil.ints.IntList; +import it.unimi.dsi.fastutil.ints.*; public class IntArrayDataSection implements BaseDataSection { public IntArrayDataSection() { diff --git a/src/main/java/tk/valoeghese/sod/LongArrayDataSection.java b/src/main/java/tk/valoeghese/sod/LongArrayDataSection.java index 346d37d..c4044dc 100644 --- a/src/main/java/tk/valoeghese/sod/LongArrayDataSection.java +++ b/src/main/java/tk/valoeghese/sod/LongArrayDataSection.java @@ -2,8 +2,7 @@ package tk.valoeghese.sod; import java.util.Iterator; -import it.unimi.dsi.fastutil.longs.LongArrayList; -import it.unimi.dsi.fastutil.longs.LongList; +import it.unimi.dsi.fastutil.longs.*; public class LongArrayDataSection implements BaseDataSection { public LongArrayDataSection() { diff --git a/src/main/java/tk/valoeghese/sod/Parser.java b/src/main/java/tk/valoeghese/sod/Parser.java index 327b005..46f9b81 100644 --- a/src/main/java/tk/valoeghese/sod/Parser.java +++ b/src/main/java/tk/valoeghese/sod/Parser.java @@ -1,10 +1,7 @@ package tk.valoeghese.sod; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.Iterator; -import java.util.Map; +import java.io.*; +import java.util.*; import tk.valoeghese.sod.exception.SODParseException; diff --git a/src/main/java/tk/valoeghese/sod/ShortArrayDataSection.java b/src/main/java/tk/valoeghese/sod/ShortArrayDataSection.java index 1e4b2fa..6cc99c4 100644 --- a/src/main/java/tk/valoeghese/sod/ShortArrayDataSection.java +++ b/src/main/java/tk/valoeghese/sod/ShortArrayDataSection.java @@ -2,8 +2,7 @@ package tk.valoeghese.sod; import java.util.Iterator; -import it.unimi.dsi.fastutil.shorts.ShortArrayList; -import it.unimi.dsi.fastutil.shorts.ShortList; +import it.unimi.dsi.fastutil.shorts.*; public class ShortArrayDataSection implements BaseDataSection { public ShortArrayDataSection() { diff --git a/src/main/java/tk/valoeghese/sod/StringArrayDataSection.java b/src/main/java/tk/valoeghese/sod/StringArrayDataSection.java index b27c684..d360d4a 100644 --- a/src/main/java/tk/valoeghese/sod/StringArrayDataSection.java +++ b/src/main/java/tk/valoeghese/sod/StringArrayDataSection.java @@ -1,8 +1,6 @@ package tk.valoeghese.sod; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; +import java.util.*; public class StringArrayDataSection implements BaseDataSection { public StringArrayDataSection() { diff --git a/src/main/java/tk/valoeghese/sod/TestMain.java b/src/main/java/tk/valoeghese/sod/TestMain.java index 6bb296a..c9940d6 100644 --- a/src/main/java/tk/valoeghese/sod/TestMain.java +++ b/src/main/java/tk/valoeghese/sod/TestMain.java @@ -1,7 +1,6 @@ package tk.valoeghese.sod; -import java.io.File; -import java.io.IOException; +import java.io.*; class TestMain {