code
stringlengths
0
56.1M
repo_name
stringlengths
3
57
path
stringlengths
2
176
language
stringclasses
672 values
license
stringclasses
8 values
size
int64
0
56.8M
#version 450 layout (location = 0) out vec3 fragColor; vec2 positions[3] = vec2[]( vec2(-1.0, 1.0), vec2( 0.0, -1.0), vec2( 1.0, 1.0) ); vec3 colors[3] = vec3[]( vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), vec3(0.0, 0.0, 1.0) ); void main() { gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0); //texCoo...
whupdup/frame
shaders/simple_tri.vert
GLSL
gpl-3.0
413
#version 450 layout (local_size_x = 256) in; layout (push_constant) uniform PushConstants { uint drawCount; } constants; struct InstanceIndices { uint objectIndex; uint meshIndex; }; struct DrawCommand { uint indexCount; uint instanceCount; uint firstIndex; int vertexOffset; uint firstInstance; }; layout (...
whupdup/frame
shaders/static_mesh_cull.comp
GLSL
gpl-3.0
882
#version 450 layout (location = 0) in vec2 texCoord; layout (location = 0) out vec4 outColor; layout (set = 0, binding = 0) uniform sampler2D tex0; void main() { outColor = texture(tex0, texCoord); }
whupdup/frame
shaders/textured_tri.frag
GLSL
gpl-3.0
206
#version 450 layout (location = 0) out vec2 texCoord; vec2 positions[3] = vec2[]( vec2(-1.0, 1.0), vec2( 0.0, -1.0), vec2( 1.0, 1.0) ); void main() { gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0); texCoord = positions[gl_VertexIndex].xy * 0.5 + vec2(0.5); }
whupdup/frame
shaders/textured_tri.vert
GLSL
gpl-3.0
279
#include <gtest/gtest.h> #include <graphics/barrier_info_collection.hpp> #include <graphics/buffer_resource_tracker.hpp> #include <graphics/command_buffer.hpp> using namespace ZN; using namespace ZN::GFX; TEST(BRTester, SingleInsertion) { BarrierInfoCollection bic{}; BufferResourceTracker res{}; CommandBuffer cmd...
whupdup/frame
src/br_tests.cpp
C++
gpl-3.0
6,666
#pragma once #include <initializer_list> namespace ZN { template <typename T> constexpr T max(std::initializer_list<T> iList) { auto largest = iList.begin(); for (auto it = largest + 1, end = iList.end(); it != end; ++it) { if (*it > *largest) { largest = it; } } return *largest; } }
whupdup/frame
src/core/algorithms.hpp
C++
gpl-3.0
303
#pragma once #include <cstdint> #include <cstddef> namespace ZN { enum class IterationDecision { CONTINUE, BREAK }; } #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(WIN64) #define OPERATING_SYSTEM_WINDOWS #elif defined(__linux__) #define OPERATING_SYSTEM_LINUX #elif d...
whupdup/frame
src/core/common.hpp
C++
gpl-3.0
1,605
#pragma once #include <cstdint> namespace ZN { class HashBuilder { public: using Hash_T = uint64_t; constexpr HashBuilder& add_uint32(uint32_t value) { m_hash = static_cast<Hash_T>(m_hash * 0x100000001B3ull) ^ static_cast<Hash_T>(value); return *this; } constexpr HashBuilder& add_int32(int32_t value...
whupdup/frame
src/core/hash_builder.hpp
C++
gpl-3.0
1,806
#pragma once #include <core/common.hpp> #include <atomic> #include <memory> #include <utility> namespace ZN::Memory { class SingleThreadCounter { public: void add_ref() { ++m_count; } bool release() { --m_count; return m_count == 0; } private: size_t m_count = 1; }; class MultiThreadCounter {...
whupdup/frame
src/core/intrusive_ptr.hpp
C++
gpl-3.0
5,673
#pragma once #include <cassert> #include <cstdint> #include <new> #include <utility> namespace ZN { template <typename T> class Local { public: Local() noexcept = default; Local(const Local&) = delete; void operator=(const Local&) = delete; Local(Local&&) = delete; void operator=(Local&&) = delete; ...
whupdup/frame
src/core/local.hpp
C++
gpl-3.0
1,110
#pragma once #include <memory> namespace ZN::Memory { using std::construct_at; using std::uninitialized_move; using std::uninitialized_move_n; using std::uninitialized_copy; using std::uninitialized_copy_n; using std::uninitialized_default_construct; using std::uninitialized_default_construct_n; using std::destroy; ...
whupdup/frame
src/core/memory.hpp
C++
gpl-3.0
524
#pragma once namespace ZN { template <typename K, typename V> struct Pair { K first; V second; }; template <typename K, typename V> Pair(K, V) -> Pair<K, V>; }
whupdup/frame
src/core/pair.hpp
C++
gpl-3.0
167
#pragma once #include <cstddef> #include <iterator> namespace ZN { template <typename T> class Span { public: using value_type = T; using size_type = size_t; using difference_type = ptrdiff_t; using reference = value_type&; using const_reference = const value_type&; using pointer = value_type*; using...
whupdup/frame
src/core/span.hpp
C++
gpl-3.0
2,296
#pragma once #include <core/algorithms.hpp> #include <core/common.hpp> #include <cassert> #include <new> #include <type_traits> #include <utility> namespace ZN { template <typename... Types> class Variant { public: static_assert(sizeof...(Types) < 255, "Cannot have more than 255 types in one variant"); using...
whupdup/frame
src/core/variant.hpp
C++
gpl-3.0
7,299
#include "barrier_info_collection.hpp" #include <core/hash_builder.hpp> #include <graphics/command_buffer.hpp> #include <cstdio> using namespace ZN; using namespace ZN::GFX; static bool image_barrier_equals(const VkImageMemoryBarrier& a, const VkImageMemoryBarrier& b); static bool image_subresource_range_equals(co...
whupdup/frame
src/graphics/barrier_info_collection.cpp
C++
gpl-3.0
6,564
#pragma once #include <vulkan.h> #include <unordered_map> #include <vector> namespace ZN::GFX { class CommandBuffer; class BarrierInfoCollection final { public: void add_pipeline_barrier(VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask); void add_image_memory_barrier(VkPipelineStageFla...
whupdup/frame
src/graphics/barrier_info_collection.hpp
C++
gpl-3.0
1,746
#include "buffer.hpp" #include <graphics/render_context.hpp> using namespace ZN; using namespace ZN::GFX; Memory::IntrusivePtr<Buffer> Buffer::create(std::string name, VkDeviceSize size, VkBufferUsageFlags usage) { VkBuffer buffer{}; VkBufferCreateInfo createInfo{ .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,...
whupdup/frame
src/graphics/buffer.cpp
C++
gpl-3.0
1,372
#pragma once #include <core/intrusive_ptr.hpp> #include <graphics/buffer_resource_tracker.hpp> #include <string> namespace ZN::GFX { class Buffer final : public Memory::IntrusivePtrEnabled<Buffer> { public: static Memory::IntrusivePtr<Buffer> create(std::string name, VkDeviceSize size, VkBufferUsageFlags us...
whupdup/frame
src/graphics/buffer.hpp
C++
gpl-3.0
1,002
#include "buffer_resource_tracker.hpp" #include "graphics/buffer_resource_tracker.hpp" #include <graphics/barrier_info_collection.hpp> #include <algorithm> #include <cstdio> using namespace ZN; using namespace ZN::GFX; static bool test_range_start(const BufferResourceTracker::ResourceInfo& a, const BufferResourc...
whupdup/frame
src/graphics/buffer_resource_tracker.cpp
C++
gpl-3.0
10,366
#pragma once #include <vulkan.h> #include <vector> namespace ZN::GFX { class BarrierInfoCollection; class BufferResourceTracker final { public: struct ResourceInfo { VkPipelineStageFlags stageFlags; VkAccessFlags accessMask; VkDeviceSize offset; VkDeviceSize size; uint32_t queueFamilyIndex; b...
whupdup/frame
src/graphics/buffer_resource_tracker.hpp
C++
gpl-3.0
2,026
#include "command_buffer.hpp" using namespace ZN; using namespace ZN::GFX; void CommandBuffer::begin_render_pass(const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents) { m_commands.emplace_back(new CmdBeginRenderPass{pRenderPassBegin->renderPass, pRenderPassBegin->framebuffer, pRenderPassBegin->rende...
whupdup/frame
src/graphics/command_buffer.cpp
C++
gpl-3.0
1,964
#pragma once #include <graphics/commands.hpp> #include <memory> namespace ZN::GFX { class CommandBuffer final { public: explicit CommandBuffer() = default; NULL_COPY_AND_ASSIGN(CommandBuffer); void begin_render_pass(const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents = VK_SUBPASS_...
whupdup/frame
src/graphics/command_buffer.hpp
C++
gpl-3.0
1,400
#include "commands.hpp" #include <type_traits> #include <cstdio> using namespace ZN; using namespace ZN::GFX; template <typename T, typename Functor> static void for_each_bit(T value, Functor&& func) { for (size_t i = 0; i < 8ull * sizeof(value); ++i) { auto v = value & (static_cast<T>(1) << i); if (!v) { ...
whupdup/frame
src/graphics/commands.cpp
C++
gpl-3.0
13,565
#pragma once #include <core/common.hpp> #include <vulkan.h> #include <vector> namespace ZN::GFX { enum class CommandType : uint8_t { DRAW, DISPATCH, PIPELINE_BARRIER, BEGIN_RENDER_PASS, END_RENDER_PASS, NEXT_SUBPASS, }; class Command { public: explicit Command() = default; NULL_COPY_AND_ASSIGN(Command...
whupdup/frame
src/graphics/commands.hpp
C++
gpl-3.0
3,394
#include "frame_graph.hpp" #include <graphics/barrier_info_collection.hpp> #include <graphics/command_buffer.hpp> #include <graphics/render_context.hpp> #include <algorithm> using namespace ZN; using namespace ZN::GFX; static bool has_incompatible_depth_attachments(const FrameGraphPass& pA, const FrameGraphPass& pB...
whupdup/frame
src/graphics/frame_graph.cpp
C++
gpl-3.0
19,415
#pragma once #include <graphics/framebuffer.hpp> #include <graphics/frame_graph_pass.hpp> #include <graphics/render_pass.hpp> #include <memory> namespace ZN::GFX { class BarrierInfoCollection; class CommandBuffer; class FrameGraph final { public: class AccessTracker; struct RenderPassData { Memory::Intrus...
whupdup/frame
src/graphics/frame_graph.hpp
C++
gpl-3.0
2,769
#include "graphics/frame_graph_pass.hpp" #include <graphics/frame_graph.hpp> using namespace ZN; using namespace ZN::GFX; // Dependencies void FrameGraphPass::TextureDependency::print(const ImageView& imageView) const { printf("\t\t[texture] (%s) %s (M%u-%u, A%u-%u)\n", ResourceAccess::to_string(access), imageV...
whupdup/frame
src/graphics/frame_graph_pass.cpp
C++
gpl-3.0
7,613
#pragma once #include <graphics/buffer.hpp> #include <graphics/image_view.hpp> #include <functional> #include <vector> #include <unordered_map> #include <unordered_set> namespace ZN::GFX { class BarrierInfoCollection; class CommandBuffer; struct ResourceAccess { enum Enum : uint8_t { READ = 0b01, WRITE = 0b10...
whupdup/frame
src/graphics/frame_graph_pass.hpp
C++
gpl-3.0
4,745
#include "framebuffer.hpp" #include <core/hash_builder.hpp> #include <graphics/render_context.hpp> #include <graphics/render_pass.hpp> #include <unordered_map> using namespace ZN; using namespace ZN::GFX; namespace ZN::GFX { struct FramebufferKey { uint64_t renderPass; uint64_t attachmentIDs[RenderPass::MAX_COL...
whupdup/frame
src/graphics/framebuffer.cpp
C++
gpl-3.0
3,915
#pragma once #include <graphics/image_view.hpp> namespace ZN::GFX { class RenderPass; class Framebuffer final : public Memory::IntrusivePtrEnabled<Framebuffer> { public: static Memory::IntrusivePtr<Framebuffer> create(RenderPass&, std::vector<Memory::IntrusivePtr<ImageView>> attachments, uint32_t width, ...
whupdup/frame
src/graphics/framebuffer.hpp
C++
gpl-3.0
815
#include "image.hpp" #include <graphics/render_context.hpp> using namespace ZN; using namespace ZN::GFX; Memory::IntrusivePtr<Image> Image::create(std::string name, uint32_t width, uint32_t height, VkFormat format, VkSampleCountFlagBits sampleCount, uint32_t mipLevels, uint32_t arrayLayers, bool swapchainImage) ...
whupdup/frame
src/graphics/image.cpp
C++
gpl-3.0
2,156
#pragma once #include <core/intrusive_ptr.hpp> #include <graphics/image_resource_tracker.hpp> #include <graphics/unique_graphics_object.hpp> #include <string> namespace ZN::GFX { class Image final : public Memory::IntrusivePtrEnabled<Image>, public UniqueGraphicsObject { public: static Memory::IntrusivePtr<Imag...
whupdup/frame
src/graphics/image.hpp
C++
gpl-3.0
1,577
#include "image_resource_tracker.hpp" #include <graphics/barrier_info_collection.hpp> #include <cstdio> using namespace ZN; using namespace ZN::GFX; static bool ranges_intersect(const VkImageSubresourceRange& a, const VkImageSubresourceRange& b); // A fully covers B static bool range_fully_covers(const VkImageSubre...
whupdup/frame
src/graphics/image_resource_tracker.cpp
C++
gpl-3.0
13,901
#pragma once #include <vulkan.h> #include <vector> namespace ZN::GFX { class BarrierInfoCollection; class ImageResourceTracker final { public: struct ResourceInfo { VkPipelineStageFlags stageFlags; VkImageLayout layout; VkAccessFlags accessMask; uint32_t queueFamilyIndex; VkImageSubresourceRange ...
whupdup/frame
src/graphics/image_resource_tracker.hpp
C++
gpl-3.0
2,176
#include "image_view.hpp" using namespace ZN; using namespace ZN::GFX; Memory::IntrusivePtr<ImageView> ImageView::create(Image& image, VkImageSubresourceRange range) { return Memory::make_intrusive<ImageView>(image, std::move(range)); } ImageView::ImageView(Image& image, VkImageSubresourceRange range) : m_image(i...
whupdup/frame
src/graphics/image_view.cpp
C++
gpl-3.0
1,091
#pragma once #include <graphics/image.hpp> #include <vulkan.h> namespace ZN::GFX { class ImageView final : public Memory::IntrusivePtrEnabled<ImageView>, public UniqueGraphicsObject { public: static Memory::IntrusivePtr<ImageView> create(Image& image, VkImageSubresourceRange range); explicit ImageView(Image...
whupdup/frame
src/graphics/image_view.hpp
C++
gpl-3.0
869
#pragma once #include <core/local.hpp> #include <graphics/image_view.hpp> namespace ZN::GFX { class RenderContext final { public: uint32_t get_graphics_queue_family() const { return 0; } VkDevice get_device() const { return nullptr; } Image& get_swapchain_image() { return *m_swapchainImage; ...
whupdup/frame
src/graphics/render_context.hpp
C++
gpl-3.0
745
#include "render_pass.hpp" #include <core/hash_builder.hpp> #include <core/memory.hpp> #include <graphics/render_context.hpp> #include <cassert> #include <vector> #include <unordered_map> using namespace ZN; using namespace ZN::GFX; namespace { struct RenderPassCreateInfoHash { size_t operator()(const RenderPas...
whupdup/frame
src/graphics/render_pass.cpp
C++
gpl-3.0
18,293
#pragma once #include <core/intrusive_ptr.hpp> #include <graphics/unique_graphics_object.hpp> #include <vulkan.h> namespace ZN::GFX { class RenderPass final : public Memory::IntrusivePtrEnabled<RenderPass>, public UniqueGraphicsObject { public: using AttachmentCount_T = uint8_t; using AttachmentBitMask_T = ...
whupdup/frame
src/graphics/render_pass.hpp
C++
gpl-3.0
2,202
#pragma once #include <core/common.hpp> #include <atomic> namespace ZN::GFX { class UniqueGraphicsObject { public: explicit UniqueGraphicsObject() : m_uniqueID(s_counter.fetch_add(1, std::memory_order_relaxed)) {} DEFAULT_COPY_AND_ASSIGN(UniqueGraphicsObject); constexpr uint64_t get_unique_id() const {...
whupdup/frame
src/graphics/unique_graphics_object.hpp
C++
gpl-3.0
443
#include <gtest/gtest.h> #include <graphics/barrier_info_collection.hpp> #include <graphics/command_buffer.hpp> #include <graphics/image_resource_tracker.hpp> #include <vulkan.h> using namespace ZN; using namespace ZN::GFX; TEST(IRTester, DepthPyramidStatePreservation) { BarrierInfoCollection bic{}; ImageResource...
whupdup/frame
src/ir_tests.cpp
C++
gpl-3.0
23,894
#include "vulkan.h" #include <cstdio> #include <graphics/barrier_info_collection.hpp> #include <graphics/command_buffer.hpp> #include <graphics/frame_graph.hpp> #include <graphics/image_resource_tracker.hpp> #include <graphics/render_context.hpp> #include <graphics/render_pass.hpp> using namespace ZN; using namespac...
whupdup/frame
src/main.cpp
C++
gpl-3.0
10,290
#include <gtest/gtest.h> #include <graphics/render_context.hpp> int main(int argc, char** argv) { ZN::GFX::g_renderContext.create(); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
whupdup/frame
src/rg_tester.cpp
C++
gpl-3.0
204
#include <gtest/gtest.h> #include <graphics/command_buffer.hpp> #include <graphics/frame_graph.hpp> #include <graphics/render_context.hpp> using namespace ZN; using namespace ZN::GFX; static void check_commands(const CommandBuffer& a, const CommandBuffer& b) { ASSERT_EQ(a.get_commands().size(), b.get_commands().siz...
whupdup/frame
src/rg_tests.cpp
C++
gpl-3.0
18,474
#include "vulkan.h" #include <cstdio> #include <atomic> static std::atomic_uint64_t g_bufferCounter = 1ull; static std::atomic_uint64_t g_framebufferCounter = 1ull; static std::atomic_uint64_t g_imageCounter = 1ull; static std::atomic_uint64_t g_renderPassCounter = 1ull; static void print_render_pass(const VkRender...
whupdup/frame
src/vulkan.cpp
C++
gpl-3.0
3,710
#pragma once #include <cstddef> #include <cstdint> #define VK_NULL_HANDLE (0) #define VK_QUEUE_FAMILY_IGNORED (~0U) #define VK_SUBPASS_EXTERNAL (~0U) #define VK_ATTACHMENT_UNUSED (~0U) #define VK_WHOLE_SIZE (~0ULL) #define VK_REMAINING_MIP_LEVELS (~0U) #define VK_REMAINING_ARRAY_LAYERS (~0U) using VkFlags = uint32_t...
whupdup/frame
src/vulkan.h
C++
gpl-3.0
17,306
#pragma once #include <vulkan.h>
whupdup/frame
src/vulkan_utils.hpp
C++
gpl-3.0
35
# Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script ...
r3d/fc
.gitignore
Git
bsd-3-clause
1,078
# Ignore everything in this directory * # Except this file !.gitignore
r3d/fc
bin/.gitignore
Git
bsd-3-clause
75
#!/bin/bash # Will add all *.tw files to StoryIncludes. rm src/config/start.tw cp src/config/start.tw.proto start.tw.tmp find src -name '*.tw' -print >>start.tw.tmp mv start.tw.tmp src/config/start.tw HASH=`git log -n1 |grep commit | sed 's/commit //'` ./devTools/tweeGo/tweego -o bin/FC_pregmod.html src/config/start...
r3d/fc
compile
none
bsd-3-clause
347
#!/bin/bash # Will add all *.tw files to StoryIncludes. rm src/config/start.tw cp src/config/start.tw.proto start.tw.tmp find src -name '*.tw' -print >>start.tw.tmp mv start.tw.tmp src/config/start.tw HASH=`git log -n1 |grep -m1 commit | sed 's/commit //'` ./devTools/tweeGo/tweego -o bin/FC_pregmod_$HASH.html src/co...
r3d/fc
compile-git
none
bsd-3-clause
409
@echo off :: Free Cities Basic Compiler - Windows x86_64 :: Will add all *.tw files to StoryIncludes. del src\config\start.tw copy src\config\start.tw.proto start.tw.tmp >nul >>start.tw.tmp (for /r "src" %%F in (*.tw) do echo %%F) move start.tw.tmp src\config\start.tw >nul CALL "%~dp0devTools\tweeGo\tweego.e...
r3d/fc
compile.bat
Batchfile
bsd-3-clause
420
@echo off :: Free Cities Basic Compiler - Windows x86_64 :: Will wait for keypress before terminating. :: Will add all *.tw files to StoryIncludes. del src\config\start.tw copy src\config\start.tw.proto start.tw.tmp >nul >>start.tw.tmp (for /r "src" %%F in (*.tw) do echo %%F) move start.tw.tmp src\config\start.tw >nul...
r3d/fc
compile_debug.bat
Batchfile
bsd-3-clause
459
:: slave generation widgets [nobr] <<widget "NationalityToRace">> <<if $fixedRace == 0>> <<if ($activeSlave.nationality is "American")>> <<set $activeSlave.race to either("black", "middle eastern", "white", "white", "white", "latina", "latina", "asian", "amerindian", "mixed race")>> <<elseif ($activeSlave.nationali...
r3d/fc
devNotes/Slave Generation Widgets.txt
Text
bsd-3-clause
36,597
######################################################################################################################## # # sugarcube-2.py # # Copyright (c) 2013-2017 Thomas Michael Edwards <tmedwards@motoslave.net>. All rights reserved. # Use of this source code is governed by a Simplified BSD License which can be fo...
r3d/fc
devTools/tweeGo/targets/sugarcube-2/sugarcube-2.py
Python
bsd-3-clause
2,163
How to mod (basic doc): 1. All sources now in the src subdir, in separate files. 1 passage = 1 file. 2. Special files and dir's: - src/config - configuration of the story is here. - src/config/start.tw - contains list of .tw passage files, regenerated automatic, by building scripts. Do not change by hands....
r3d/fc
readme.txt
Text
bsd-3-clause
2,046
:: MOD_Edit Arcology Cheat [nobr] <<set $nextButton to "Continue">> <<set $nextLink to "MOD_Edit Arcology Cheat Datatype Cleanup">> <<set $PC.actualAge to Math.clamp($PC.actualAge, 18, 80)>> ''Cheating Edit Arcology'' <<if ($economy != 1) || ($seeDicks != 25) || ($continent != "North America") || ($internationa...
r3d/fc
src/cheats/mod_EditArcologyCheat.tw
tw
bsd-3-clause
20,488
:: MOD_Edit Arcology Cheat Datatype Cleanup <<nobr>> <<set $nextButton to "Continue">> <<set $nextLink to "Manage Arcology">> <<set $ACitizens to Number($ACitizens)>> <<set $ASlaves to Number($ASlaves)>> <<set $AHelots to Number($AHelots)>> <<set $shelterAbuse to Number($shelterAbuse)>> <<set $TSS.studentsBou...
r3d/fc
src/cheats/mod_EditArcologyCheatDatatypeCleanup.tw
tw
bsd-3-clause
1,546
:: MOD_Edit FS Cheat <<nobr>> <<set $nextButton to "Continue">> <<set $nextLink to "MOD_Edit FS Cheat Datatype Cleanup">> ''Cheating Edit Future Society'' <br> <<if $arcologies[0].FSSupremacist != "unset" and $arcologies[0].FSSupremacistRace != 0>> <br>You are ''pursuing'' $arcologies[0].FSSupremacistRace Super...
r3d/fc
src/cheats/mod_EditFSCheat.tw
tw
bsd-3-clause
31,825
:: MOD_Edit FS Cheat Datatype Cleanup <<nobr>> <<set $nextButton to "Continue">> <<set $nextLink to "Main">> <<set $returnTo to "Main">> <<if $arcologies[0].FSSupremacist != "unset">> <<set $arcologies[0].FSSupremacist to Number($arcologies[0].FSSupremacist)>> <<set $arcologies[0].FSSupremacistDecoration to N...
r3d/fc
src/cheats/mod_EditFSCheatDatatypeCleanup.tw
tw
bsd-3-clause
7,993
:: MOD_Edit Slave Cheat [nobr] <<set $nextButton to "Continue">> <<set $nextLink to "MOD_Edit Slave Cheat Datatype Cleanup">> <<set $oldName to $activeSlave.slaveName>> ''Cheating Edit Slave'' <br><br> ''Birth Name:'' <<textbox "$activeSlave.birthName" $activeSlave.birthName>> <br>''Slave Name (birth name was $acti...
r3d/fc
src/cheats/mod_EditSlaveCheat.tw
tw
bsd-3-clause
40,135
:: MOD_Edit Slave Cheat Datatype Cleanup <<nobr>> <<set $nextButton to "Continue">> <<set $nextLink to "Slave Interact">> <<set $rep to Number($rep)>> <<set $cash to Number($cash)>> <<set $week to Number($week)>> <<if $familyTesting == 1>> <<set $activeSlave.mother to Number($activeSlave.mother)>> <<set $ac...
r3d/fc
src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw
tw
bsd-3-clause
3,776
:: Start [nobr] :: StoryTitle Free Cities :: StoryIncludes
r3d/fc
src/config/start.tw.proto
proto
bsd-3-clause
63
:: SugarCube configuration [script] /* Main SugarCube configuration file. */ /* Change the starting passage from the default 'start' to 'Alpha disclaimer'. */ Config.passages.start = "init"; /* Disable forward/back buttons in panel. */ Config.history.controls = false; /* Set Autosaves. */ config.saves....
r3d/fc
src/config/sugarCubeConfig.tw
tw
bsd-3-clause
583
:: Economy Intro [nobr] <<if $PC.career == "arcology owner">> <<goto "Takeover Target">> <<else>> It is the year 2037, and the past 21 years have not been kind. The world is starting to fall apart. The climate is deteriorating, resources are being exhausted, and there are more people to feed every year. Technology i...
r3d/fc
src/events/intro/economyIntro.tw
tw
bsd-3-clause
784
:: Extreme Intro The early Free Cities were wild places where the writ of law did not run. In some of the most depraved, slaves' bodies, minds and even lives were playthings of the wealthy and powerful. Though modern Free Cities are tremendously varied, a majority of the new communities made a choice about whether ext...
r3d/fc
src/events/intro/extremeIntro.tw
tw
bsd-3-clause
1,072
:: Gender Intro The Free Cities are sexually libertine places, and sexual slavery is ubiquitous. Some of the early Free Cities upheld or even strengthened traditional gender roles, expecting men to be men and women to be women. Others subscribed to an interesting refinement of those gender roles, considering any sex s...
r3d/fc
src/events/intro/genderIntro.tw
tw
bsd-3-clause
1,485
:: Intro Summary [nobr] <<set $neighboringArcologies to Math.clamp($neighboringArcologies, 0, 8)>> <<set $FSCreditCount to Math.clamp($FSCreditCount, 4, 7)>> <<set $PC.actualAge to Math.clamp($PC.actualAge, 14, 80)>> <<set $PC.birthWeek to Math.clamp($PC.birthWeek, 0, 51)>> <<silently>> FertilityAge($fertilityAge) <<...
r3d/fc
src/events/intro/introSummary.tw
tw
bsd-3-clause
29,756
:: Location Intro As the old countries crumble and technology stagnates, the gap between rich and poor increases. In order to continue living a good life without having their property taken by the mob, many of the wealthy and powerful come together to form 'Free Cities.' These are new cities on undeveloped land, in re...
r3d/fc
src/events/intro/locationIntro.tw
tw
bsd-3-clause
1,612
:: PC Body Intro [nobr] Most slaveowners in the Free Cities are male. The preexisting power structures of the old world have mostly migrated to the new, and it can often be very hard to be a free woman in the Free Cities. Some manage to make their way, but in many arcologies, men are the owners, and women are the owne...
r3d/fc
src/events/intro/pcBodyIntro.tw
tw
bsd-3-clause
4,226
:: PC Experience Intro [nobr] <<if $PC.career == "arcology owner">> <<goto "PC Rumor Intro">> <<else>> You're a relative unknown in the Free Cities, but it's clear you're already accomplished. The meek and average cannot aspire to acquire arcologies. You've got all the necessary skills to take over an arcology and s...
r3d/fc
src/events/intro/pcExperienceIntro.tw
tw
bsd-3-clause
2,797
:: PC Rumor Intro Who you are is something that you will have to define for yourself through your actions. Once you own an arcology, no one will be in a position to apply moral scorekeeping to you. In the brave new world of the Free Cities, you will be free to define yourself as the sum of your actions, rather than as...
r3d/fc
src/events/intro/pcRumorIntro.tw
tw
bsd-3-clause
1,450
:: Terrain Intro [nobr] <<unset $targetArcologies>> <<if $targetArcology.type != "New">> <<set $terrain = $targetArcology.terrain, $continent = $targetArcology.continent>> <<switch $targetArcology.type>> <<case "RomanRevivalist">><<set $language = "Latin">> <<case "EgyptianRevivalist">><<set $language = "Ancient E...
r3d/fc
src/events/intro/terrainIntro.tw
tw
bsd-3-clause
4,415
:: Trade Intro [nobr] Most of the Free Cities are run on radically libertarian or even anarcho-capitalist principles. The first Free Cities experimented with indentured servitude, and this rapidly developed into widespread slavery. By now, the Free Cities collectively are a fundamentally slaveowning society and mainta...
r3d/fc
src/events/intro/tradeIntro.tw
tw
bsd-3-clause
1,134
:: Brothel Assignment Scene <<nobr>> <<set $nextButton to "Continue">> <<set $nextLink to $returnTo>> You could direct $assistantName to relay your orders to $activeSlave.slaveName, but you've decided to avoid relying too much on machine assistance. So, she is merely directed to report to your office. The <<if $act...
r3d/fc
src/facilities/brothel/brothelAssignmentScene.tw
tw
bsd-3-clause
32,797
:: accordionStyleSheet [stylesheet] /* Accordion 000-250-006 */ button.accordion { cursor: pointer; padding: 5px; width: 100%; margin-bottom: 10px; border-bottom: 3px double; border-right: 3px double; border-left: none; border-top: none; text-align: left; outline: none; tran...
r3d/fc
src/gui/css/accordianStyleSheet.tw
tw
bsd-3-clause
768
:: Main stylesheet [stylesheet] /* clears SugarCube's default transition */ .passage { transition: none; -webkit-transition: none; } /* default is 54em */ #passages { max-width: 76em; } .imageRef { display: flex; flex-direction: column; flex-wrap: wrap; align-items: flex-...
r3d/fc
src/gui/css/mainStyleSheet.tw
tw
bsd-3-clause
763
:: Alpha disclaimer <<set $ui to "start">>\ //v. $ver// @@color:green;//Mod: expanded age ranges and other tweaks 2016-08-30//@@ @@color:darkred;+SV@@ @@color:green;//Mod: extra preg content and other crap//@@ ''This is an alpha.'' That means the game is missing content, is full of bugs, is imbalanced, and is general...
r3d/fc
src/gui/mainMenu/AlphaDisclaimer.tw
tw
bsd-3-clause
2,171
:: accordionJS.tw [script] /* Accordion 000-250-006 */ /* * We're making changes to the DOM, so we need to make them *after* everything has been generated * Sticking this all in postdisplay calls reduces the chance of there being a timing conflict * with other scripts, since anything poking the DOM here will be d...
r3d/fc
src/js/accordianJS.tw
tw
bsd-3-clause
1,478
:: StoryJS [script] /*config.history.tracking = false;*/ window.variableAsNumber = function(x, defaultValue, minValue, maxValue) { x = Number(x) if (x != x) {//NaN return defaultValue || 0;//In case the default value was not supplied. } if (x < minValue) {//Works even if minValue is undefined. return minValue...
r3d/fc
src/js/storyJS.tw
tw
bsd-3-clause
53,940
:: UtilJS [script] if(!Array.prototype.findIndex) { Array.prototype.findIndex = function(predicate) { if (this == null) { throw new TypeError('Array.prototype.find called on null or undefined'); } if (typeof predicate !== 'function') { throw new TypeError('predicate must be a function'); } var list = ...
r3d/fc
src/js/utilJS.tw
tw
bsd-3-clause
2,074
:: Abort <<set $nextButton to "Back">>\ <<set $nextLink to "Slave Interact">>\ <<nobr>> The remote surgery makes aborting a pregnancy quick and efficient. $activeSlave.slaveName is <<if $activeSlave.fetish is "pregnancy">> @@color:red;fundamentally broken.@@ Her entire concept of self and sexuality was wrapped up in ...
r3d/fc
src/npc/abort.tw
tw
bsd-3-clause
2,299
:: Acquisition [nobr] <<if $saveImported == 1>><<set _valueOwed to 5000>><<else>><<set _valueOwed to 50000>><</if>> <<if $freshPC == 1>> <<if $PC.vagina == 1>> <<set $PC.births = 0>> <<if $PC.career == "servant">> <<if $PC.actualAge >= 50 >> <<set $PC.births = 9>> <<set $PC.birthMaster = 9>> <<elseif $PC....
r3d/fc
src/npc/acquisition.tw
tw
bsd-3-clause
32,587
:: Agent Company [nobr] <<set $nextButton to "Continue">> <<set $nextLink to "AS Dump">> <<set $returnTo = "Main">> <<set $activeSlave.assignment = "live with your agent">> <<set $activeSlave.assignmentVisible = 0>> <<set $activeSlave.sentence = 0>> <<if $activeSlave.rivalry > 0>> <<for _i to 0;_i < $slaves.length;_...
r3d/fc
src/npc/agent/agentCompany.tw
tw
bsd-3-clause
4,614
:: Agent Retrieve [nobr] <<silently>> <<for $i to 0; $i < $slaves.length; $i++>> <<if $slaves[$i].ID == $activeArcology.leaderID>> <<for $j to 0; $j < $slaves.length; $j++>> <<if $slaves[$j].assignment == "live with your agent">> <<if $slaves[$j].ID == $slaves[$i].relationshipTarget>> <<set $slaves[$j].assignmen...
r3d/fc
src/npc/agent/agentRetrieve.tw
tw
bsd-3-clause
1,101
:: Agent Select <<set $nextButton to "Back">> <<set $nextLink to "Neighbor Interact">> <<set $showEncyclopedia to 1>><<set $encyclopedia to "Agents">> ''Appoint an Agent from your devoted slaves:'' <<include "Slave Summary">>
r3d/fc
src/npc/agent/agentSelect.tw
tw
bsd-3-clause
227
:: Agent Workaround [nobr] <<set $nextButton to "Continue">> <<set $nextLink to "AS Dump">> <<set $returnTo = "Neighbor Interact">> <<set $activeSlave.assignment = "be your agent">> <<set $activeSlave.assignmentVisible = 0>> <<set $activeSlave.sentence = 0>> <<if $activeSlave.reservedChildren > 0>> <<set $reservedCh...
r3d/fc
src/npc/agent/agentWorkaround.tw
tw
bsd-3-clause
4,400
:: AS Dump <<set $dumped to 0>> <<for $i to 0; $i < $slaves.length; $i++>> <<if $activeSlave.ID == $slaves[$i].ID>> <<set $slaves[$i] to $activeSlave>> <<set $dumped to 1>> <<break>> <</if>> <</for>> <<if $dumped == 0>> <<if def $activeSlave.slaveName>> <<AddSlave $activeSlave>> <<set $dumped to 1>> <</if>>...
r3d/fc
src/npc/asDump.tw
tw
bsd-3-clause
349
:: custom Slaves Database <<set _i = 1000000>>
r3d/fc
src/npc/databases/customSlavesDatabase.tw
tw
bsd-3-clause
49
:: DF Slaves Database <<set _i = 700000>> <<set _HS = clone($activeSlave)>> <<set _HS.slaveName = "Cherry", _HS.birthName = "Cherry", _HS.ID = _i++, _HS.birthWeek = random(0,51), _HS.health = 20, _HS.devotion = 75, _HS.pubicHColor = "black", _HS.skin = "white", _HS.hColor = "black", _HS.hStyle = "long", _HS.pubicHStyl...
r3d/fc
src/npc/databases/dfSlavesDatabase.tw
tw
bsd-3-clause
7,958
:: FBoobs <<nobr>> <<set $activeSlave.mammaryCount++, $mammaryTotal++>> You call her over so you can play with her <<if ($activeSlave.boobs >= 20000)>> colossal <<elseif ($activeSlave.boobs >= 10000)>> massive <<elseif ($activeSlave.boobs >= 5000)>> monster <<elseif ($activeSlave.boobs >= 1000)>> huge <<elseif ($...
r3d/fc
src/npc/descriptions/fBoobs.tw
tw
bsd-3-clause
27,179
:: FButt <<nobr>> You call her over so you can <<if ($activeSlave.vagina is -1)>> use her sole fuckhole. <<elseif ($activeSlave.vagina gt 3)>> fuck her gaping holes. <<elseif ($activeSlave.vagina gt 2)>> fuck her loose holes. <<elseif ($activeSlave.vagina is 2)>> use her whorish holes. <<elseif ($activeSlave.vagi...
r3d/fc
src/npc/descriptions/fButt.tw
tw
bsd-3-clause
18,611
:: FFuckdoll [nobr widget] <<widget "FFuckdollOral">> <<set $activeSlave.oralCount++, $oralTotal++>> You decide to use the Fuckdoll's <<if $activeSlave.lips > 95>>facepussy<<else>>face hole<</if>>. <<if $activeSlave.fuckdoll <= 10>> Since it is not well adapted to life as a living sex toy yet, it won't respond to po...
r3d/fc
src/npc/descriptions/fFuckdollWidgets.tw
tw
bsd-3-clause
10,459
:: FLips <<nobr>> <<set $activeSlave.oralCount++, $oralTotal++>> You tell $activeSlave.slaveName to <<if ($PC.dick != 0)>> blow you with her <<else>> please your pussy with her <</if>> <<if ($activeSlave.lips > 95)>> facepussy. <<elseif ($activeSlave.lips > 70)>> cartoonish lips. <<elseif ($activeSlave.lips > 20...
r3d/fc
src/npc/descriptions/fLips.tw
tw
bsd-3-clause
15,028
:: FVagina <<nobr>> You call her over so you can <<if ($activeSlave.vagina == 10)>> tickle her cavernous hole. <<elseif ($activeSlave.vagina > 3)>> use her gaping vagina. <<elseif ($activeSlave.vagina == 3)>> fuck her loose cunt. <<elseif ($activeSlave.vagina == 2)>> fuck her whorish cunt. <<elseif ($activeSlave....
r3d/fc
src/npc/descriptions/fVagina.tw
tw
bsd-3-clause
27,619
:: FAbuse <<nobr>> <<if ($activeSlave.ID is $Bodyguard.ID)>> <<if ($activeSlave.fetish is "masochist") && ($activeSlave.fetishKnown == 1) && ($activeSlave.fetishStrength > 95)>> Knowing how much your bodyguard likes being hurt, you decide to reward her in her own particular way. <<elseif ($activeSlave.muscles == 0) a...
r3d/fc
src/npc/fAbuse.tw
tw
bsd-3-clause
24,747
:: FPCImpreg <<nobr>> <<if $activeSlave.mpreg == 1>> <<set $activeSlave.analCount += 1>> <<set $analTotal += 1>> <<else>> <<set $activeSlave.vaginalCount += 1>> <<set $vaginalTotal += 1>> <</if>> You call her over so you can <<if $activeSlave.mpreg == 1>> <<if ($activeSlave.anus > 2)>> fuck her gaping, fertile ass...
r3d/fc
src/npc/fPCImpreg.tw
tw
bsd-3-clause
12,312
:: FRival <<nobr>> <<for _i to 0; _i lt $slaves.length; _i++>> <<if $slaves[_i].ID == $activeSlave.rivalryTarget>> <<set _rival to $slaves[_i]>> <<break>> <</if>> <</for>> You call $activeSlave.slaveName to your office and let her know you'll be abusing _rival.slaveName together. <<if ($activeSlave.fetish is "...
r3d/fc
src/npc/fRival.tw
tw
bsd-3-clause
12,764
:: FSlaveImpreg <<nobr>> <<set $nextButton to "Back">> <<set $nextLink to "Slave Interact">> <<set $impregnatrix to 0>> <<set $eligibility to 0>> //$activeSlave.slaveName is fertile; now you must select a slave with both a penis and potent testicles.// <</nobr>> __Select an eligible slave to serve as the semen d...
r3d/fc
src/npc/fSlaveImpreg.tw
tw
bsd-3-clause
913
:: Fucktoy Workaround <<set $activeSlave.assignment to "please you">> <<set $activeSlave.choosesOwnAssignment to 0>> <<for $i to 0; $i < $slaves.length; $i++>> <<if $activeSlave.ID == $slaves[$i].ID>> <<set $slaves[$i] to $activeSlave>> <<break>> <</if>> <</for>> <<goto "Main">>
r3d/fc
src/npc/fucktoyWorkaround.tw
tw
bsd-3-clause
287