/* Copyright (C) 1998 BJ Eirich (aka vecna) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Lic See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "verge.h" // ================================= Data ==================================== byte cpu_watch, cpubyte=0; // ================================= Code ==================================== void ListMounts() { int i; Con_NextLine(); sprintf(strbuf,"There are %d~ files mounted.",filesmounted); Con_Printf(strbuf); for (i=0; is) { sprintf(strbuf,"File is in %s~, index %d~",pack[f->v].mountname, f->i); Con_Printf(strbuf); sprintf(strbuf,"Packofs: %d~ current ofs: %d~",pack[f->v].files[f->i].packofs,pack[f->v].files[f->i].curofs); Con_Printf(strbuf); if (pack[f->v].files[f->i].extractable) Con_Printf("File is extractable."); else Con_Printf("File is not extractable."); if (pack[f->v].files[f->i].override) Con_Printf("Override allowed."); else Con_Printf("Override not allowed."); } else Con_Printf("File is external."); sprintf(strbuf,"File is %d~ bytes.",filesize(f)); Con_Printf(strbuf); vclose(f); } void vid_mode() { int xres,yres; xres=atoi((char *)args[1]); yres=atoi((char *)args[2]); Con_NextLine(); ShutdownVideo(0); if (InitVideo(xres, yres)) { Con_Printf("{||||||||||||}"); Con_Printf("Loading new video driver..."); Con_Printf(DriverDesc); Con_Printf("{||||||||||||}"); } else Con_Printf("Unsupported/unknown video mode."); set_intensity(63); } void CPU_Usage() { if (numargs==1) { sprintf(strbuf,"cpu_usage is %d~", cpu_watch); Con_Printf(strbuf); } else cpu_watch=atoi((char *) args[1]); } void Mount() { MountVFile((char *) args[1]); sprintf(strbuf,"%s mounted.",args[1]); Con_Printf(strbuf); } void ZeroConWarp(char **args) { player->x=atoi(args[1])*16; player->y=atoi(args[2])*16; player->tx=atoi(args[1]); player->ty=atoi(args[2]); } void ZeroConBrowseTiles(void) { int x,y,n,k=0,a=0; while(last_pressed!=SCAN_Q) { ClearScreen(); UpdateControls(); CheckMessages(); if(last_pressed==SCAN_A) { if(a) a=0; else a=1; last_pressed=0; } if(last_pressed==SCAN_DOWN&&(k+(ty-3)*(tx-3)-tx+4)0) { k-=tx-4; last_pressed=0; } for(y=1; yx, player->y); Con_Printf(strbuf); sprintf(strbuf,"xtc: %d~ ytc: %d~", player->x>>4, player->y>>4); Con_Printf(strbuf); } void PlayerSpeed() { if (!player) { Con_Printf("No player."); return; } if (numargs==1) { Con_NextLine(); sprintf(strbuf,"speed is is %d~", player->speed); Con_Printf(strbuf); } else { player->speed=atoi((char *) args[1]); player->speedct=0; } } void Player() { int i; i=atoi((char *) args[1]); if (i