6 ex__fluid__config_8h
gullradriel edited this page 2026-10-09 00:55:18 +02:00

examples/ex_fluid_config.h

Functions

Name
int load_app_state(char * state_filename, int * WIDTH, int * HEIGHT, bool * fullscreen, char ** bgmusic, double * drawFPS, double * logicFPS, N_FLUID * fluid, int * threaded)
Load application state from a config file.

Functions Documentation

function load_app_state

int load_app_state(
    char * state_filename,
    int * WIDTH,
    int * HEIGHT,
    bool * fullscreen,
    char ** bgmusic,
    double * drawFPS,
    double * logicFPS,
    N_FLUID * fluid,
    int * threaded
)

Load application state from a config file.

Parameters:

  • state_filename path to the config file
  • WIDTH pointer to store display width
  • HEIGHT pointer to store display height
  • fullscreen pointer to store fullscreen flag
  • bgmusic pointer to store background music path
  • drawFPS pointer to store drawing framerate
  • logicFPS pointer to store logic framerate
  • fluid pointer to a N_FLUID to populate
  • threaded pointer to store threaded processing flag

Return: TRUE on success, FALSE on error

Source code

/*
 * Nilorea Library
 * Copyright (C) 2005-2026 Castagnier Mickael
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * permissions and limitations under the License.
 *
 * SPDX-License-Identifier: Apache-2.0
 */


#ifndef _N_FLUID_CONFIG
#define _N_FLUID_CONFIG

#ifdef __cplusplus
extern "C" {
#endif

#include "nilorea/n_fluids.h"

int load_app_state(char* state_filename, int* WIDTH, int* HEIGHT, bool* fullscreen, char** bgmusic, double* drawFPS, double* logicFPS, N_FLUID* fluid, int* threaded);

#ifdef __cplusplus
}
#endif

#endif