mirror of
https://github.com/zeldaret/botw
synced 2026-05-23 06:54:18 -04:00
VideoRecorder added
This commit is contained in:
@@ -54,6 +54,8 @@ target_sources(uking PRIVATE
|
||||
Timer.h
|
||||
UIGlue.cpp
|
||||
UIGlue.h
|
||||
VideoRecorder.cpp
|
||||
VideoRecorder.h
|
||||
VFR.cpp
|
||||
VFR.h
|
||||
VFRValue.cpp
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "KingSystem/System/VideoRecorder.h"
|
||||
|
||||
namespace ksys {
|
||||
|
||||
SEAD_SINGLETON_DISPOSER_IMPL(VideoRecorder)
|
||||
|
||||
void VideoRecorder::postCalc() {
|
||||
if (!isCaptureEnabled())
|
||||
return;
|
||||
u32 framenum = mFrameNumber;
|
||||
sead::FixedSafeString<0x100> output;
|
||||
output.format("%s/%04d.tga", mFilename.cstr(), framenum);
|
||||
agl::utl::ScreenShotMgr::instance()->reserveCaptureWithDebugHeap(
|
||||
true, agl::TextureDataSerializerTGA::TGAFormat::_1, output, false);
|
||||
mFrameNumber++;
|
||||
}
|
||||
|
||||
} // namespace ksys
|
||||
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <agl/utl/aglScreenShotMgr.h>
|
||||
#include <basis/seadNew.h>
|
||||
#include <heap/seadDisposer.h>
|
||||
#include <prim/seadSafeString.h>
|
||||
#include "KingSystem/Utils/Types.h"
|
||||
|
||||
namespace ksys {
|
||||
|
||||
class VideoRecorder {
|
||||
SEAD_SINGLETON_DISPOSER(VideoRecorder)
|
||||
VideoRecorder() = default;
|
||||
virtual ~VideoRecorder();
|
||||
|
||||
public:
|
||||
void postCalc();
|
||||
bool isCaptureEnabled() const { return mCaptureEnabled; }
|
||||
u32 getFrameNumber() const { return mFrameNumber; }
|
||||
const sead::SafeString& getFileName() const { return mFilename; }
|
||||
|
||||
private:
|
||||
bool mCaptureEnabled = false;
|
||||
bool _29 = true;
|
||||
u32 mFrameNumber = 0;
|
||||
sead::FixedSafeString<0x100> mFilename;
|
||||
};
|
||||
|
||||
KSYS_CHECK_SIZE_NX150(VideoRecorder, 0x148);
|
||||
|
||||
} // namespace ksys
|
||||
Reference in New Issue
Block a user