Quote from: Misj' on Wed 16/04/2025 20:28:24@Creamy: My entry is moving along. But I already know I'm probably going to need an extra week to finish it. I'll try to hit the deadline, but might require an extension.
float angle;
function repeatedly_execute_always {
angle += 0.03;
if (angle > Maths.PI * 2.0) angle -= Maths.PI * 2.0;
oHoverboard.Y = 120 + FloatToInt(Maths.Sin(angle) * 10.0, eRoundNearest);
}
Quote from: gabriel19681_1 on Mon 21/04/2025 15:20:01Hello, I have a game that is very difficult to find, Abstract, Or at least I think so, since I can't run it. I'll leave it to you to see if anyone can tell me how to run it. Thanks.This one is also here: https://lost-ags-games.itch.io/abstract
https://mega.nz/file/wFojRaKB#jedO-ZMbHGdhDYB0_LiUAdFKD_nR6dqq6q6WiV_Av6A
QuoteAnother missing game no more lost. Thanks for your efforts in preserving them. Downloaded and tested on DosBox: nicely working
Quote from: Crimson Wizard on Mon 21/04/2025 11:07:50I also understand that it's not correct to blame without evidence, so won't.
/// A Json node/token, with parent/child/sibling links forming a Json tree
managed struct Json
{
/// ID of this Json token (for internal/debugging use)
import readonly attribute int Id;
/// ID of this Json tree (for internal/debugging use)
import readonly attribute int TreeId;
/// Type of this Json node
import readonly attribute JsonType Type;
/// String representation of the Json Type
import readonly attribute String TypeAsString;
/// Key for this Json node (null if none, implies this node is the root)
import readonly attribute String Key;
/// Value of this Json node, as a string (i.e. all its contents; if node is not a leaf, its full subtree)
import readonly attribute String Value;
/// Value as int
import readonly attribute bool AsInt;
/// Value as float
import readonly attribute bool AsFloat;
/// Value as bool
import readonly attribute bool AsBool;
/// Path from the root to this Json node
import readonly attribute String Path;
/// The root of the Json tree this node belongs to (if node is root, returns itself)
import readonly attribute Json* Root;
/// The parent of this Json node (null if none, i.e. this node is root)
import readonly attribute Json* Parent;
/// The direct children of this Json node
import readonly attribute Json* Child[];
/// The number of direct children of this Json node (size of .Child[])
import readonly attribute int ChildCount;
/// The next sibling of this Json node (so if this node is this.Parent.Child[i], returns this.Parent.Child[i+1]; null if none)
import readonly attribute Json* NextSibling;
/// Whether this Json node is a leaf node
import readonly attribute bool IsLeaf;
/// Whether this Json node is the root of the Json tree
import readonly attribute bool IsRoot;
/// Select a node in this node's subtree (using the subpath to navigate)
import Json* Select(String path);
/// Convert this Json node to a flat dictionary (making each leaf in its subtree a key/value pair)
import Dictionary* ToDictionary(Dictionary* dictionary=0);
/// Parse a String into a Json tree, returning the root node (null if error, see Json.ParserState)
import static Json* Parse(String jsonString);
/// Parse a text file into a Json tree, returning the root node (null if error, see Json.ParserState)
import static Json* ParseFile(String fileName);
/// Status of parser after parsing (if successful >0, count of tokens parsed; if error, JsonError value)
import static readonly attribute int ParserResult;
/// Number of Json trees parsed and stored
import static readonly attribute int TreeCount;
/// Retrieve a Json node directly (for internal/debugging use)
import static Json* GetNode(int id);
/// Retrieve a Json tree
import static Json* GetTree(int treeId);
};
Json* jsonData = Json.Parse("{ "ags-games": [ {"title": "Rosewater", "author": "Grundislav", "released": true} , {"title": "The Flayed Man", "author": "Snoring Dog Games", "released": true}, {"title": "Old Skies", "author": "Wadjet Eye Games", "released": false}] }");
// Or to read from a file: Json* jsonData = Json.ParseFile("$INSTALLDIR$/ags-games.json");
if(jsonData)
{
Json* agsGames = jsonData.Select("ags-games");
for(int i=0; i<agsGames.ChildCount; i++) // Loop through "ags-games" array
{
Json* agsGame = agsGames.Child[i];
AgsGameData* gd = AgsGameData.Create(); // Assume we have this managed struct defined
// Set fields
Json* title = agsGame.Select("title");
if(title) gd.Title = title.Value;
Json* author = agsGame.Select("author");
if(author) gd.Author = author.Value;
Json* released = agsGame.Select("released");
if(released) gd.IsReleased = released.AsBool;
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.028 seconds with 15 queries.