mirror of
https://github.com/TheOnlyZac/sly1.git
synced 2024-12-02 18:56:21 +00:00
Project: Added cmake build process, also fixed mixups
This commit is contained in:
parent
920347f828
commit
d3ec227451
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,6 @@
|
||||
build*/
|
||||
*build/
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
@ -337,4 +340,4 @@ ASALocalRun/
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
healthchecksdb
|
||||
|
11
CMakeLists.txt
Normal file
11
CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
project(sly1-decomp)
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
add_subdirectory(Sly1Decomp)
|
||||
|
||||
|
||||
|
||||
|
3
Sly1Decomp/CMakeLists.txt
Normal file
3
Sly1Decomp/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(src)
|
@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
char chetkido_ciphertext[];;
|
||||
char s_the_password_is[];
|
||||
|
||||
void activate_code_chetkido();
|
0
Sly1Decomp/include/.keep
Normal file
0
Sly1Decomp/include/.keep
Normal file
0
Sly1Decomp/lib/.keep
Normal file
0
Sly1Decomp/lib/.keep
Normal file
0
Sly1Decomp/lib/CMakeLists.txt
Normal file
0
Sly1Decomp/lib/CMakeLists.txt
Normal file
0
Sly1Decomp/resource/.keep
Normal file
0
Sly1Decomp/resource/.keep
Normal file
16
Sly1Decomp/src/CMakeLists.txt
Normal file
16
Sly1Decomp/src/CMakeLists.txt
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
set (FILES
|
||||
Cheats/cheats.cpp
|
||||
|
||||
Savegame/savegame.cpp
|
||||
|
||||
# ...
|
||||
)
|
||||
|
||||
add_library(DECOMP ${FILES})
|
||||
target_include_directories(DECOMP PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_executable(test main.cpp)
|
||||
|
||||
target_link_libraries(test PUBLIC DECOMP)
|
@ -1,7 +1,9 @@
|
||||
#include "cheats.h"
|
||||
#include "savegame.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Savegame/savegame.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
|
||||
char chetkido_ciphertext[] = "@KFWHJGL";
|
||||
@ -24,7 +26,7 @@ void activate_code_chetkido()
|
||||
) || i_am_a_hacker) // Hacker override
|
||||
{
|
||||
// Copy encrypted string into sipher
|
||||
strcpy_s(cipher_slice, chetkido_ciphertext);
|
||||
std::strncpy(cipher_slice, chetkido_ciphertext, 16);
|
||||
next_xor_char = cipher_slice;
|
||||
|
||||
if (cipher_slice[0] != 0)
|
||||
@ -44,4 +46,4 @@ void activate_code_chetkido()
|
||||
std::cout << "Conditions not met" << "\n";
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
6
Sly1Decomp/src/Cheats/cheats.h
Normal file
6
Sly1Decomp/src/Cheats/cheats.h
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
extern char chetkido_ciphertext[];
|
||||
extern char s_the_password_is[];
|
||||
|
||||
void activate_code_chetkido();
|
@ -1,5 +1,6 @@
|
||||
#include "savegame.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
GameSave* g_pgsCur = new GameSave;
|
||||
@ -130,4 +131,4 @@ int calculate_percent_completion(GameSave* pgs)
|
||||
}
|
||||
}
|
||||
return finalPercent;
|
||||
}
|
||||
}
|
@ -122,8 +122,8 @@ struct PchzLevel
|
||||
extern GameSave* g_pgsCur;
|
||||
extern WorldSave* g_pwsCur;
|
||||
extern LevelSave* g_plsCur;
|
||||
PchzLevel pchzLevelTable[];
|
||||
extern PchzLevel pchzLevelTable[];
|
||||
|
||||
void populatePchzLevelTable();
|
||||
int check_game_completion();
|
||||
int calculate_percent_completion(GameSave* pgs);
|
||||
int calculate_percent_completion(GameSave* pgs);
|
@ -1,5 +1,6 @@
|
||||
#include "savegame.h"
|
||||
#include "cheats.h"
|
||||
#include <Savegame/savegame.h>
|
||||
#include <Cheats/cheats.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
|
||||
@ -13,4 +14,4 @@ int main(int argc, char* argv[])
|
||||
|
||||
getchar();
|
||||
return 1;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user