Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Game Created by: Leandro Soares & Tiago Queiros
- // School: INETE; TGPSI10/01
- #include "sources.h"
- #include "RPGMenu_Geral.h"
- #include "items.h"
- #include "shop.h"
- #define GameName "GAME"
- #define MaxItems 200
- void ShowGameName(void);
- int main() {
- char name[MaxName];
- char option;
- int total_items, first_time=0;
- struct tagItem *items[MaxItems];
- struct tagMobs *player;
- HANDLE hConsole;
- hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
- total_items = 0;
- option = name[0] = '\0';
- CreateAllItems(items, &total_items);
- while(TRUE) {
- system("cls");
- SetConsoleTextAttribute(hConsole, FOREGROUND_GREEN);
- ShowGameName();
- SystemPause();
- option = Menu_Geral(name);
- if(first_time == 0) {
- player = NewMob(name);
- first_time++;
- PrintShop_Armour(items, player, total_items);
- }
- if( option == 'q') {
- Menu_Shop(items, player, total_items);
- }
- else if( option == 'w' ) {
- //TODO: Create Inn
- }
- else if( option == 'e' ) {
- //TODO: Create Action
- }
- else if( option == 'r' ) {
- //TODO: Create Level Up
- }
- else if( option == 't' ) {
- //TODO: Create Exit
- }
- else {
- printf("Bug nas opcoes do menu geral!\n\n");
- SystemPause();
- }
- }
- }
- void ShowGameName(void) {
- CenterText("Welcome to the text based game named *Change This* !!!\n\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement