This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System Info: | |
CPU Vendor: GenuineIntel | |
CPU Brand: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz | |
CPU Cores: 8 | |
CPU Speed: 3.40GHz | |
System Memory: 10.17GB / 15.90GB | |
GPU: AMD Radeon R9 200 / HD 7900 Series | |
GPU Memory: 2.98GB | |
Graphics Settings: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <fstream> | |
#include <string> | |
#include <vector> | |
struct FileHeader | |
{ | |
/* 0 */char header[6]; | |
/* 6 */uint32_t serial; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project("tilemapA5") | |
cmake_minimum_required(VERSION 3.4) | |
set(EXE_NAME "tilemapA5") | |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) | |
include("D:\\a5\\builder\\AllegroDependencies.cmake") | |
add_executable(${EXE_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp") | |
LINK_ALLEGRO(${EXE_NAME}) | |
install(TARGETS ${EXE_NAME} RUNTIME DESTINATION "${CMAKE_BINARY_DIR}/build") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--------------------------------------------------------------------- | |
// Configuration variables. Define this once, use it everywhere. | |
// (Save yourself the headache of rewriting it over and over again...) | |
// | |
// Two key points here: | |
// (1) All points should be out of standard usage (e.g. ☼ § « »); | |
// (2) Anything which MAY need to be typed (ever), should be available | |
// easily via ASCII or CharMap (for user access). Anything else | |
// (list delimiting) should be done sanely but copy+paste should | |
// be more than enough. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
for (int block = 0; block < GridTerminalSystem.Blocks.Count; block++) | |
{ | |
if (GridTerminalSystem.Blocks[block] is IMyTerminalBlock) | |
{ | |
IMyTerminalBlock Block = GridTerminalSystem.Blocks[block]; | |
StringBuilder Str = new StringBuilder(); Str.Append(Block.BlockDefinition.ToString()); | |
Str.Append("[" + Block.DetailedInfo + "] "); | |
Block.SetCustomName(Str); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name Syntax: "<Friendly List Alias><Cfg_Separator><Resource(s)>" | |
// Valid resources (without quotation marks): | |
// "Energetic", "Cobalt", "Gold", "Iron", | |
// "Nickel", "Platinum", "Silver", "Uranium" | |
// | |
// Divide them using the 'Cfg_Separator_Internal' value. e.g. | |
// [1] Reactor§Uranium | |
// [2] TwigglyDeFooBarDeBopDeBoop Hrm? Yes, This is quite something§Nickel,Cobalt,Gold | |
// USE: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// OnOff code seems to be global... | |
ITerminalAction GetOnOffAction(IMyTerminalBlock block, bool enable) | |
{ | |
ITerminalAction Action; | |
if (enable) | |
{ | |
Action = block.GetActionWithName("Toggle block On"); | |
} | |
else | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// OnOff code seems to be global | |
ITerminalAction GetOnOffAction(IMyTerminalBlock block, bool enable) | |
{ | |
ITerminalAction Action; | |
if (enable) | |
{ | |
Action = block.GetActionWithName("Toggle block On"); | |
} | |
else | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
// Get blocks | |
var blocks = new List<IMyTerminalBlock>(); | |
// Get the antenna | |
GridTerminalSystem.GetBlocksOfType<IMyRadioAntenna>(blocks); | |
if(blocks.Count > 0) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> // uint8_t | |
class Scene | |
{ | |
public: | |
virtual void Run() {} | |
Scene() {} | |
~Scene() {} | |
}; |