File indexing completed on 2024-04-28 04:01:57
0001 /*************************************************************************** 0002 * KBlocks, a falling blocks game by KDE * 0003 * SPDX-FileCopyrightText: 2010 University Freiburg <squall.leonhart.cai@gmail.com> * 0004 * * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 ***************************************************************************/ 0007 #ifndef KBLOCKSAILOG_H 0008 #define KBLOCKSAILOG_H 0009 0010 #include "KBlocksAITypeDefine.h" 0011 0012 #include <stdlib.h> 0013 #include <stdio.h> 0014 #include <iostream> 0015 0016 #include "../KBlocksPiece.h" 0017 #include "../KBlocksField.h" 0018 0019 enum Log_Mode { 0020 LOG_MODE_PRINTSCREEN, 0021 LOG_MODE_PRINTFILE, 0022 LOG_MODE_PRINTBOTH 0023 }; 0024 0025 /***************************************************************** 0026 ** screen setting ********************************************** 0027 *****************************************************************/ 0028 #ifndef KSIRTET 0029 void gotoXY(int x, int y); 0030 #endif 0031 0032 /***************************************************************** 0033 ** channel setting ********************************************* 0034 *****************************************************************/ 0035 void set_channel(int ch); 0036 void set_screen_channel(); 0037 void set_screen_file_channel(int ch); 0038 void open_file(const char *fn); 0039 void open_file(int ch, const char *fn); 0040 void close_file(); 0041 void close_file(int ch); 0042 0043 /***************************************************************** 0044 ** print element *********************************************** 0045 *****************************************************************/ 0046 void println(); 0047 void print(const char *s); 0048 void println(const char *s); 0049 void print(int i); 0050 void println(int i); 0051 void print(int i); 0052 void println(int i); 0053 void print(double d); 0054 void println(double d); 0055 0056 /***************************************************************** 0057 ** print object ************************************************ 0058 *****************************************************************/ 0059 void println(KBlocksPiece *); 0060 void println(KBlocksPiece *, bool full); 0061 void println(KBlocksPiece *, int x, int y, bool full = false); 0062 0063 void println(KBlocksField *); 0064 void println(KBlocksField *, int x, int y); 0065 0066 #endif