File main.c

FileList > engine > src > main.c

Go to the source code of this file

  • #include "main.h"
  • #include <glad/glad.h>
  • #include <GLFW/glfw3.h>
  • #include <stdio.h>
  • #include "DynArray.h"
  • #include "GameFramework.h"
  • #include "XMLUIGameLayer.h"
  • #include "ImageFileRegstry.h"
  • #include "Atlas.h"
  • #include "Widget.h"
  • #include "Scripting.h"
  • #include <string.h>
  • #include "PlatformDefs.h"
  • #include <libxml/parser.h>
  • #include "Log.h"
  • #include "Network.h"
  • #include "AssertLib.h"
  • #include "Audio.h"
  • #include "cwalk.h"

Public Types

Type Name
typedef void(* GameInitFn

Public Attributes

Type Name
struct CommandLineArgs gCmdArgs
DrawContext gDrawContext
InputContext gInputContext

Public Functions

Type Name
int EngineStart (int argc, char ** argv, GameInitFn init, ArgHandlerFn argHandler)
void Engine_ParseCmdArgs (int argc, char ** argv, ArgHandlerFn handlerFn)
void FramebufferSizeCallback (GLFWwindow * window, int width, int height)
void GameInit (InputContext * pIC, DrawContext * pDC)
DrawContext * GetDrawContext ()
InputContext * GetInputContext ()
int Mn_GetScreenHeight ()
int Mn_GetScreenWidth ()
void MouseBtnCallback (GLFWwindow * window, int button, int action, int mods)
void MouseCallback (GLFWwindow * window, double xposIn, double yposIn)
void ScrollCallback (GLFWwindow * window, double xoffset, double yoffset)
void joystick_callback (int jid, int event)
void key_callback (GLFWwindow * window, int key, int scancode, int action, int mods)

Public Static Functions

Type Name
void DoNetworkQueues ()
void GLAPIENTRY MessageCallback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * message, const void * userParam)

Macros

Type Name
define SCR_HEIGHT 480
define SCR_WIDTH 640
define TARGET_FPS 60

Public Types Documentation

typedef GameInitFn

typedef void(* GameInitFn) (InputContext *, DrawContext *);

Public Attributes Documentation

variable gCmdArgs

struct CommandLineArgs gCmdArgs;

variable gDrawContext

DrawContext gDrawContext;

variable gInputContext

InputContext gInputContext;

Public Functions Documentation

function EngineStart

int EngineStart (
    int argc,
    char ** argv,
    GameInitFn init,
    ArgHandlerFn argHandler
) 

function Engine_ParseCmdArgs

void Engine_ParseCmdArgs (
    int argc,
    char ** argv,
    ArgHandlerFn handlerFn
) 

function FramebufferSizeCallback

void FramebufferSizeCallback (
    GLFWwindow * window,
    int width,
    int height
) 

function GameInit

void GameInit (
    InputContext * pIC,
    DrawContext * pDC
) 

function GetDrawContext

DrawContext * GetDrawContext () 

function GetInputContext

InputContext * GetInputContext () 

function Mn_GetScreenHeight

int Mn_GetScreenHeight () 

function Mn_GetScreenWidth

int Mn_GetScreenWidth () 

function MouseBtnCallback

void MouseBtnCallback (
    GLFWwindow * window,
    int button,
    int action,
    int mods
) 

function MouseCallback

void MouseCallback (
    GLFWwindow * window,
    double xposIn,
    double yposIn
) 

function ScrollCallback

void ScrollCallback (
    GLFWwindow * window,
    double xoffset,
    double yoffset
) 

function joystick_callback

void joystick_callback (
    int jid,
    int event
) 

function key_callback

void key_callback (
    GLFWwindow * window,
    int key,
    int scancode,
    int action,
    int mods
) 

Public Static Functions Documentation

function DoNetworkQueues

static void DoNetworkQueues () 

function MessageCallback

static void GLAPIENTRY MessageCallback (
    GLenum source,
    GLenum type,
    GLuint id,
    GLenum severity,
    GLsizei length,
    const GLchar * message,
    const void * userParam
) 

Macro Definition Documentation

define SCR_HEIGHT

#define SCR_HEIGHT `480`

define SCR_WIDTH

#define SCR_WIDTH `640`

define TARGET_FPS

#define TARGET_FPS `60`


The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/engine/src/main.c