Skip to content

federicocalab/simulazione-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use this repository

This repository has two main code folders:

  • viz contains the visualization logic for the simulation and exposes 3 APIs that can be used to handle the screen:

    • void sim_init(VizState *state) is used to initialize the simulation state
    • void sim_update(VizState *state) is the main simulation function that handles the actual update of the state at every step
    • void sim_cleanup(VizState *state) is used to correctly clear the simulation when it ends
  • sim contains the actual simulation logic, every file that ends with .c gets compiled so you can create a new simulation by just creating the file and changing the name of an old sim to something like .c.bck

The structure is very flexible and can handle every simulation, as long as it calls the viz apis so feel free to create new things as you like

N.B. the visualization logic is made using epoxy so make sure that it is correctly installed in you device (installatela da solo Tommà figlio di puttana)

To compile the simulation just write make on the terminal To run the simulation write ./build/sim_tool

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors