diff --git a/build/build_app_msvc_win32_debug.bat b/build/build_app_msvc_win32_debug.bat index 0819a48..d69d5db 100644 --- a/build/build_app_msvc_win32_debug.bat +++ b/build/build_app_msvc_win32_debug.bat @@ -2,6 +2,7 @@ SET MyPath=%~dp0 SET MyPath=%MyPath:~0,-1% + call %MyPath%\_prebuild_win32.bat app debug msvc call %MyPath%\setup_cl.bat diff --git a/build/setup_cl.bat b/build/setup_cl.bat index faf7fe6..bae8867 100644 --- a/build/setup_cl.bat +++ b/build/setup_cl.bat @@ -1,5 +1,7 @@ @echo off +ECHO SETUP CL + SET "LIB=" SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0 @@ -35,3 +37,4 @@ IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcv SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" x64)) +ECHO SETUP CL COMPLETE \ No newline at end of file diff --git a/src/app/engine/animation/foldhaus_animation.h b/src/app/engine/animation/foldhaus_animation.h index 9309c0b..d93f3f1 100644 --- a/src/app/engine/animation/foldhaus_animation.h +++ b/src/app/engine/animation/foldhaus_animation.h @@ -484,6 +484,24 @@ ClampFrameToRange(s32 Frame, frame_range Range) // System +struct animation_system_desc +{ + gs_memory_arena* Storage; + u32 AnimArrayCount; + r32 SecondsPerFrame; +}; + +internal animation_system +AnimationSystem_Init(animation_system_desc Desc) +{ + animation_system Result = {}; + Result.Storage = Desc.Storage; + Result.Animations = AnimationArray_Create(Result.Storage, Desc.AnimArrayCount); + Result.SecondsPerFrame = Desc.SecondsPerFrame; + + return Result; +} + internal animation* AnimationSystem_GetActiveAnimation(animation_system* System) { diff --git a/src/app/foldhaus_app.cpp b/src/app/foldhaus_app.cpp index ade4707..f879b98 100644 --- a/src/app/foldhaus_app.cpp +++ b/src/app/foldhaus_app.cpp @@ -91,11 +91,11 @@ INITIALIZE_APPLICATION(InitializeApplication) #endif { // Animation PLAYGROUND - State->AnimationSystem = {}; - State->AnimationSystem.Storage = &State->Permanent; - State->AnimationSystem.Animations = AnimationArray_Create(State->AnimationSystem.Storage, 32); - - State->AnimationSystem.SecondsPerFrame = 1.f / 24.f; + animation_system_desc AnimSysDesc = {}; + AnimSysDesc.Storage = &State->Permanent; + AnimSysDesc.AnimArrayCount = 32; + AnimSysDesc.SecondsPerFrame = 1.0f / 24.0f; + State->AnimationSystem = AnimationSystem_Init(AnimSysDesc); animation Anim = {0}; Anim.Name = PushStringF(&State->Permanent, 256, "test_anim_one"); @@ -103,6 +103,7 @@ INITIALIZE_APPLICATION(InitializeApplication) Anim.Blocks_ = AnimBlockArray_Create(State->AnimationSystem.Storage, 8); Anim.PlayableRange.Min = 0; Anim.PlayableRange.Max = SecondsToFrames(15, State->AnimationSystem); + Animation_AddLayer(&Anim, MakeString("Base Layer"), BlendMode_Overwrite, &State->AnimationSystem); Animation_AddLayer(&Anim, MakeString("Color Layer"), BlendMode_Multiply, &State->AnimationSystem); Animation_AddLayer(&Anim, MakeString("Sparkles"), BlendMode_Add, &State->AnimationSystem);