summaryrefslogtreecommitdiff
path: root/createcalls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'createcalls.cpp')
-rw-r--r--createcalls.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/createcalls.cpp b/createcalls.cpp
index b5be361..5467f18 100644
--- a/createcalls.cpp
+++ b/createcalls.cpp
@@ -7,13 +7,22 @@ IncrementFrame(project_data *File, int16 Amount) {
}
}
+static void
+PostMsg(project_state *State, char *msg)
+{
+ State->MsgTime = 120;
+ State->Msg = msg;
+}
+
static bool32
-Source_Generate(project_data *File, memory *Memory, void *Path)
+Source_Generate(project_data *File, project_state *State, memory *Memory, void *TempString)
{
Assert(File->NumberOfSources < MAX_SOURCES);
source *Source = &File->Source[File->NumberOfSources];
bool32 IsVideo = 0;
+ void *Path = String_GenerateFromChar(Memory, (char *)TempString);
+
if (AV_IsFileSupported((char *)Path, &IsVideo)) {
if (IsVideo)
Source->SourceType = source_type_video;
@@ -26,7 +35,8 @@ Source_Generate(project_data *File, memory *Memory, void *Path)
History_Entry_End(Memory);
return 1;
} else {
- // PostMsg(State, "File open fail...");
+ void *Address = Memory_Rewind(Memory, STRING_SIZE, F_Strings);
+ PostMsg(State, "File open fail...");
}
return 0;
@@ -53,13 +63,6 @@ CreateKeyframeBlock(property_channel *Property, memory *Memory)
Property->KeyframeBlock[a] = (keyframe_block *)AllocateMemory(Memory, sizeof(keyframe_block), F_Keyframes);
}
-static void
-PostMsg(project_state *State, char *msg)
-{
- State->MsgTime = 120;
- State->Msg = msg;
-}
-
// Note we use total bytes here so we can use this memory for both packed and unpacked bitmaps.
void * Layer_AllocateBitmap(memory *Memory, uint16 Width, uint16 Height, uint16 BytesPerPixel)
{
@@ -280,15 +283,15 @@ static void
LoadTestFootage(project_data *File, project_state *State, memory *Memory)
{
void *SourceString = String_GenerateFromChar(Memory, "../asset/a.jpg");
- Source_Generate(File, Memory, SourceString);
+ Source_Generate(File, State, Memory, SourceString);
SourceString = String_GenerateFromChar(Memory, "../asset/24.mp4");
- Source_Generate(File, Memory, SourceString);
+ Source_Generate(File, State, Memory, SourceString);
SourceString = String_GenerateFromChar(Memory, "../asset/b.jpg");
- Source_Generate(File, Memory, SourceString);
+ Source_Generate(File, State, Memory, SourceString);
SourceString = String_GenerateFromChar(Memory, "../asset/c.jpg");
- Source_Generate(File, Memory, SourceString);
+ Source_Generate(File, State, Memory, SourceString);
SourceString = String_GenerateFromChar(Memory, "../asset/p.mp4");
- Source_Generate(File, Memory, SourceString);
+ Source_Generate(File, State, Memory, SourceString);
Layer_CreateFromSource(File, State, Memory, &File->Source[0]);
SelectLayer(File->Layer[0], State, 0);
@@ -337,7 +340,9 @@ LoadTestFootage(project_data *File, project_state *State, memory *Memory)
Mask->NumberOfPoints = 5;
Mask->IsClosed = true;
+ */
+ /*
Mask_DeletePoint(Memory, Mask, 1);
History_Undo(Memory);