Difference between revisions of "Talk:Angeldust"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
m (obi wanderer)
(SDL2 program: new section)
Line 65: Line 65:
  
 
[[File:firstobiwanderer20200418.png]]
 
[[File:firstobiwanderer20200418.png]]
 +
 +
== SDL2 program ==
 +
 +
SDL as a dynamically linked library. A dynamically linked library has 3 parts:
 +
 +
    The header files (Library.h)
 +
    The library files (Library.lib for windows or libLibrary.a for *nix)
 +
    The binary files (Library.dll for windows or Library.so for *nix)

Revision as of 18:14, 11 May 2020

smart blocks

smart block logic

Smartblockfail01.png

Temporary Links

Search for a Creature in all Biome flat text data files

#!/bin/bash
#December 2019 Coltswalker
#assign path variables
#The path to your biome data files and your operating system temp directory
#In the current version, the data files must be in a directory called "biomes"
strBiomeDataFiles="/home/username/Documents/Angeldust/biomes"
strOSTmpDir="/tmp"

echo "whereis: Biome database search tool v0.10"
declare -i intBiome=0

if [ -z $1 ] ; then
   echo "whereis: too few arguments"
   echo "whereis creature name"
   echo " "
   echo "One or two argunments accepted, such as \"whereis Ocelot \" or  \"whereis Cave Bear \"."
   echo " "
   echo "arguments are not case sensitive. "
   exit 0

else
  if [ -z $3 ] ; then 
    if [ -z $2 ] ; then 
      grep -i $1 ${strBiomeDataFiles}/* > ${strOSTmpDir}/angeldust.biomes.tmp
    else
      grep -i "$1 $2" ${strBiomeDataFiles}/* > ${strOSTmpDir}/angeldust.biomes.tmp
    fi
    intBiome=`wc -l <${strOSTmpDir}/angeldust.biomes.tmp`
    if [ $intBiome -gt 0 ] ; then
      printf "total matching biomes: " 
      echo $intBiome
      awk -i inplace 'BEGIN { FS="biomes/"; } {print $2}' ${strOSTmpDir}/angeldust.biomes.tmp
      echo "----------------------------------------"
      awk 'BEGIN { FS=".txt:"; } {print $2 " is found in " $1}' ${strOSTmpDir}/angeldust.biomes.tmp
    else
      echo "----------------------------------------"
      echo "No match! Try again."
    fi
    echo "----------------------------------------"
  else
    echo "whereis: too many arguments, aborting."
    exit 127;
  fi
fi

rm ${strOSTmpDir}/angeldust.biomes.tmp

exit 0;

obi wanderer

Firstobiwanderer20200418.png

SDL2 program

SDL as a dynamically linked library. A dynamically linked library has 3 parts:

   The header files (Library.h)
   The library files (Library.lib for windows or libLibrary.a for *nix)
   The binary files (Library.dll for windows or Library.so for *nix)