mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
Work on CBabygoth
This commit is contained in:
@@ -5,7 +5,7 @@ add_library(NESEmulator CNESEmulator.hpp CNESEmulator.cpp CNESShader.hpp CNESSha
|
||||
fixNES/mapper.c fixNES/mapperList.c fixNES/fm2play.c fixNES/vrc_irq.c ${MAPPER_SRCS})
|
||||
target_include_directories(NESEmulator PRIVATE ${CMAKE_SOURCE_DIR}/DataSpec ${CMAKE_SOURCE_DIR}/Runtime
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_definitions(NESEmulator PRIVATE COL_32BIT=1)
|
||||
target_compile_definitions(NESEmulator PRIVATE COL_32BIT=1 COL_TEX_BSWAP=1)
|
||||
target_link_libraries(NESEmulator boo hecl-full RuntimeCommon ${HECL_APPLICATION_REPS_TARGETS_LIST})
|
||||
if (NOT MSVC)
|
||||
target_compile_options(NESEmulator PRIVATE -Wno-implicit-fallthrough -Wno-format -Wno-pointer-compare
|
||||
|
||||
@@ -264,13 +264,23 @@ void CNESEmulator::InitializeEmulator() {
|
||||
// Nearest-neighbor FTW!
|
||||
m_texture = ctx.newDynamicTexture(VISIBLE_DOTS, linesToDraw, boo::TextureFormat::RGBA8,
|
||||
boo::TextureClampMode::ClampToEdgeNearest);
|
||||
Vert verts[4] = {
|
||||
{{-1.f, -1.f, 0.f}, {0.f, 1.f}},
|
||||
{{-1.f, 1.f, 0.f}, {0.f, 0.f}},
|
||||
{{1.f, -1.f, 0.f}, {1.f, 1.f}},
|
||||
{{1.f, 1.f, 0.f}, {1.f, 0.f}},
|
||||
};
|
||||
m_vbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, verts, sizeof(Vert), 4);
|
||||
if (ctx.platform() == boo::IGraphicsDataFactory::Platform::OpenGL) {
|
||||
Vert verts[4] = {
|
||||
{{-1.f, -1.f, 0.f}, {0.f, 1.f}},
|
||||
{{-1.f, 1.f, 0.f}, {0.f, 0.f}},
|
||||
{{1.f, -1.f, 0.f}, {1.f, 1.f}},
|
||||
{{1.f, 1.f, 0.f}, {1.f, 0.f}},
|
||||
};
|
||||
m_vbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, verts, sizeof(Vert), 4);
|
||||
} else {
|
||||
Vert verts[4] = {
|
||||
{{-1.f, 1.f, 0.f}, {0.f, 1.f}},
|
||||
{{-1.f, -1.f, 0.f}, {0.f, 0.f}},
|
||||
{{1.f, 1.f, 0.f}, {1.f, 1.f}},
|
||||
{{1.f, -1.f, 0.f}, {1.f, 0.f}},
|
||||
};
|
||||
m_vbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, verts, sizeof(Vert), 4);
|
||||
}
|
||||
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
||||
m_shadBind = CNESShader::BuildShaderDataBinding(ctx, m_vbo, m_uniBuf, m_texture);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user