Jacksonmj: Move console functions into seperate file

This commit is contained in:
jacksonmj
2011-04-23 13:41:08 +01:00
committed by Simon Robertshaw
parent aef09292ee
commit 7b82eae82e
6 changed files with 1461 additions and 1441 deletions

27
includes/console.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef CONSOLE_H
#define CONSOLE_H
#include <defines.h>
#ifdef PYCONSOLE
#include "Python.h"
//#include "pystdlib.h"
#include <marshal.h>
#endif
extern char pyready, pygood, console_more;
extern char console_error[];
extern int file_script;
#ifdef PYCONSOLE
extern PyMethodDef EmbMethods[];
#endif
int console_parse_coords(char *txt, int *x, int *y, char *err);
int console_parse_type(char *txt, int *element, char *err);
int console_parse_partref(char *txt, int *which, char *err);
#ifdef PYCONSOLE
int process_command(pixel *vid_buf, char *console, char *console_error, PyObject *pfunc);
#endif
int process_command_old(pixel *vid_buf, char *console, char *console_error);
#endif

View File

@@ -16,8 +16,6 @@
#define THUMB_CACHE_SIZE 256
//#define pyconsole
#ifndef M_PI
#define M_PI 3.14159265f
#endif
@@ -173,8 +171,6 @@ int player2spawn;
int death2;
int ISSPAWN1;
int ISSPAWN2;
extern char pyready;
extern char pygood;
extern sign signs[MAXSIGNS];
extern stamp stamps[STAMP_MAX];
extern int stamp_count;
@@ -183,8 +179,10 @@ extern char itc_msg[64];
extern int do_open;
extern int sys_pause;
extern int sys_shortcuts;
extern int legacy_enable; //Used to disable new features such as heat, will be set by commandline or save.
extern int death, death2, framerender;
extern pixel *vid_buf;
extern unsigned char last_major, last_minor, update_flag;
@@ -200,5 +198,5 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
void clear_sim(void);
void del_stamp(int d);
void sdl_seticon(void);
//int process_command(pixel *vid_buf, char *console, char *console_error, PyObject *pfunc);
void play_sound(char *file);
#endif

View File

@@ -240,9 +240,6 @@ void open_link(char *uri);
int report_ui(pixel *vid_buf, char *save_id);
char *console_ui(pixel *vid_buf, char error[255],char console_more);
int console_parse_coords(char *txt, int *x, int *y, char *err);
int console_parse_type(char *txt, int *element, char *err);
int console_parse_partref(char *txt, int *which, char *err);
void decorations_ui(pixel *vid_buf,pixel *decorations,int *bsx,int *bsy);
#endif