From 3dfed354ed8e73ca40868cc46aa153a0cfcb646b Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Tue, 14 Jun 2016 11:12:44 -0400 Subject: things Change-Id: I07e78d46d1d9bcb77a33c066949e76342fde6882 --- apps/plugins/wikiviewer/wikiviewer.c | 8 ++++---- apps/plugins/xworld/engine.c | 2 +- apps/plugins/xworld/sys.c | 4 ++-- apps/plugins/xworld/vm.c | 4 +++- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/wikiviewer/wikiviewer.c b/apps/plugins/wikiviewer/wikiviewer.c index a17c1a4..4587e70 100644 --- a/apps/plugins/wikiviewer/wikiviewer.c +++ b/apps/plugins/wikiviewer/wikiviewer.c @@ -308,8 +308,8 @@ static int record_linebreak=0; /*flag for line break in recorded line*/ static void viewer_exit(void *parameter); static struct linestate render(struct linestate cur, int norender, int linktonote); -static void readlink(struct linestate cur, int link, char * namebuf, - int buflen); +static void readlink_wiki(struct linestate cur, int link, char * namebuf, + int buflen); static void viewer_exit(void *parameter) { @@ -984,7 +984,7 @@ static struct linestate render(struct linestate cur, int norender, return ((nextline.renderoff==-1) ? cur : nextline); } -static void readlink(struct linestate cur, int link, char * namebuf, int buflen) +static void readlink_wiki(struct linestate cur, int link, char * namebuf, int buflen) { int linkcount=0; @@ -1640,7 +1640,7 @@ loadnewarticle: case MODE_LINK: /* load a new article */ advance_history(1); - readlink(curlinestate,linkno,hist[curhist].name,ARTICLENAMEBUF_LENGTH); + readlink_wiki(curlinestate,linkno,hist[curhist].name,ARTICLENAMEBUF_LENGTH); if ((target=rb->strrchr(hist[curhist].name,'#'))) { /* cut the target name off the end of the string */ diff --git a/apps/plugins/xworld/engine.c b/apps/plugins/xworld/engine.c index 0d1c1bf..441ab4a 100644 --- a/apps/plugins/xworld/engine.c +++ b/apps/plugins/xworld/engine.c @@ -263,7 +263,7 @@ void engine_init(struct Engine* e) { /* Try to cheat here. You can jump anywhere but the VM crashes afterward. */ /* Starting somewhere is probably not enough, the variables and calls return are probably missing. */ - /* vm_initForPart(&e->vm, GAME_PART2); Skip protection screen and go directly to intro */ + vm_initForPart(&e->vm, GAME_PART2); /* Skip protection screen and go directly to intro */ /* vm_initForPart(&e->vm, GAME_PART3); CRASH */ /* vm_initForPart(&e->vm, GAME_PART4); Start directly in jail but then crash */ /* vm->initForPart(&e->vm, GAME_PART5); CRASH */ diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c index 91f4b67..a19868a 100644 --- a/apps/plugins/xworld/sys.c +++ b/apps/plugins/xworld/sys.c @@ -314,7 +314,7 @@ void sys_menu(struct System* sys) case 1: /* reset vm */ vm_init(&sys->e->vm); - vm_initForPart(&sys->e->vm, GAME_PART_FIRST); // This game part is the protection screen + vm_initForPart(&sys->e->vm, GAME_PART2); // This game part is the protection screen quit = true; break; case 2: @@ -624,7 +624,7 @@ static void do_pause_menu(struct System* sys) quit = true; break; case 1: - vm_initForPart(&sys->e->vm, GAME_PART_FIRST); + vm_initForPart(&sys->e->vm, GAME_PART2); quit = true; break; case 2: diff --git a/apps/plugins/xworld/vm.c b/apps/plugins/xworld/vm.c index 76b2383..1b070fc 100644 --- a/apps/plugins/xworld/vm.c +++ b/apps/plugins/xworld/vm.c @@ -153,7 +153,7 @@ void vm_op_jnz(struct VirtualMachine* m) { #define BYPASS_PROTECTION void vm_op_condJmp(struct VirtualMachine* m) { - //printf("Jump : %X \n",m->_scriptPtr.pc-m->res->segBytecode); + //debug(DBG_VM, "Jump : %X \n",m->_scriptPtr.pc-m->res->segBytecode); //FCS Whoever wrote this is patching the bytecode on the fly. This is ballzy !! #ifdef BYPASS_PROTECTION @@ -169,6 +169,8 @@ void vm_op_condJmp(struct VirtualMachine* m) { debug(DBG_VM, "vm_op_condJmp() bypassing protection"); debug(DBG_VM, "bytecode has been patched"); + warning("bypassing protection"); + //vm_bypassProtection(m); } -- cgit v1.1