Eliminado source de las dlls

This commit is contained in:
Víctor Román Archidona 2002-12-18 10:45:33 +00:00
parent 0e7e401007
commit d168deeda2
65 changed files with 0 additions and 7681 deletions

View file

@ -1,55 +0,0 @@
#include <export.h>
//#include "../../shared/varindex.h"
#include "dinmem.h"
/* POR HACER:
* eDIV debe controlar todas las peticiones de memoria dinámica
* es decir, si hacemos un free() donde no debemos, debe producirse un fp->Runtime_Error
*/
int ExportaFuncs(EXPORTAFUNCS_PARAMS)
{
FUNCTION("malloc",1,eDiv_Malloc) ;
FUNCTION("free",1,eDiv_Free) ;
return TRUE ;
}
int eDiv_Malloc(FUNCTION_PARAMS)
{
int longitud ;
int *puntero ;
longitud = getparm() ;
puntero = calloc(longitud,4) ;
if ( puntero == NULL ) {
fp->Runtime_Error(100); /* no hay memoria suficiente */
return 0 ;
}
else
return ( puntero - fp->mem ) ;
}
int eDiv_Free(FUNCTION_PARAMS)
{
int offset ;
int *puntero ;
offset = getparm() ;
puntero = &fp->mem[offset] ;
free( puntero ) ;
return 1 ;
}
//============== Entrypoints =====================================================

View file

@ -1,3 +0,0 @@
LIBRARY dinmem
EXPORTS
ExportaFuncs

View file

@ -1,3 +0,0 @@
int eDiv_Malloc(FUNCTION_PARAMS) ;
int eDiv_Free(FUNCTION_PARAMS) ;

View file

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dinmem", "dinmem.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Binary file not shown.

View file

@ -1,165 +0,0 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="dinmem"
ProjectGUID="{6994F9CD-63ED-425D-879C-678D1706F4AE}"
SccProjectName=""
SccAuxPath=""
SccLocalPath=""
SccProvider="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/edivstd.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\..\..\bin\dll\dinmem.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\dinmem.def"
ProgramDatabaseFile=".\Release/edivstd.pdb"
ImportLibrary=".\Release/edivstd.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/edivstd.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/dinmem.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="sdlmain.lib sdl.lib"
OutputFile="..\..\..\bin\dll\dinmem.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\dinmem.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/dinmem.pdb"
ImportLibrary=".\Debug/dinmem.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/dinmem.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="dinmem.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="dinmem.def">
</File>
<File
RelativePath="dinmem.h">
</File>
<File
RelativePath="..\export.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -1,8 +0,0 @@
LDFLAGS = -ggdb
CFLAGS = -Wall
CC = gcc
TARGET = ../../../bin/so/edivstd.so
$(TARGET): edivstd.c
$(CC) $(LDFLAGS) $(CFLAGS) -I../ -shared -Wl,-soname,edivstd.so -o $@ $<

View file

@ -1,357 +0,0 @@
/*
* eDiv Compiler
* Copyleft (C) 2000-2002 Sion Entertainment
* http://www.sion-e.com
*
* 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 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
*/
/* EDIVSTD.DLL
* Esta librería contiene los datos más básicos que puede requerir un programa
* DIV, tal como las opciones de compilación, estructura reserved, etc.
*/
#ifdef _WIN32
# include <time.h>
# include <sys/timeb.h>
unsigned int tiempo;
unsigned int ultimo_tiempo;
#else
# error ¡adapta las rutinas de timer a Linux!
#endif
#include <stdio.h>
#include "export.h"
//#include "../../shared/varindex.h"
#include "main.h"
int last_type ;
int last_proc ;
int ExportaFuncs(EXPORTAFUNCS_PARAMS)
{
// CONSTANTES PREDEFINIDAS
// Opciones de compilación
CONST("_max_process",0);
CONST("_extended_conditions",1);
CONST("_simple_conditions",2);
CONST("_case_sensitive",3);
CONST("_ignore_errors",4);
CONST("_free_sintax",5);
CONST("_no_check",6);
CONST("_no_strfix",7);
CONST("_no_optimization",8);
CONST("_no_range_check",9);
CONST("_no_id_check",10);
CONST("_no_null_check",11);
// Indicadores de ventanas (cnumber)
CONST("c_0",1);
CONST("c_1",2);
CONST("c_2",4);
CONST("c_3",8);
CONST("c_4",16);
CONST("c_5",32);
CONST("c_6",64);
CONST("c_7",128);
CONST("c_8",256);
CONST("c_9",512);
// True y false
CONST("true",1);
CONST("false",0);
// Rango de INT
CONST("max_int",2147483647);
CONST("min_int",-2147483648);
// Señales entre procesos
CONST("s_kill",0);
CONST("s_wakeup",1);
CONST("s_sleep",2);
CONST("s_freeze",3);
CONST("s_kill_tree",100);
CONST("s_wakeup_tree",101);
CONST("s_sleep_tree",102);
CONST("s_freeze_tree",103);
// DATOS GLOBALES PREDEFINIDOS
// Contadores de tiempo
GLOBAL_ARRAY("timer",9);
// Tiempo máximo de ejecución para un proceso
GLOBAL("max_process_time",500);
// Argumentos de línea de comando
GLOBAL("argc",0);
GLOBAL_ARRAY("argv",9);
// DATOS LOCALES PREDEFINIDOS
// Estructura reserved - POR HACER: ¿preservar compatibilidad con DIV? -> si
/* pero ¿Qué hacer con distance_1 y distance_2 (sinónimos de m8_object y old_ctype,
* respectivamente)? ya nos toparemos con ellas cuando hagamos el modo7. */
LOCAL_STRUCT("reserved",0);
_INT("process_id",0);
_INT("id_scan",0);
_INT("process_type",0); // usado por VisualDIV ;)
_INT("type_scan",0);
_INT("status",2);
_INT("parameters",0);
_INT("param_offset",0);
_INT("program_index",0);
_INT("stack_pointer",0);
_INT("is_executed",0);
_INT("is_painted",0);
_INT("m8_object",-1); // usado por VPE en DIV2
_INT("old_ctype",0);
_INT("frame_percent",0);
_INT("box_x0",0);
_INT("box_y0",0);
_INT("box_x1",0);
_INT("box_y1",0);
_INT("f_count",0);
_INT("caller_id",0);
END_STRUCT;
// Jerarquía de procesos
LOCAL("father",0);
LOCAL("son",0);
LOCAL("smallbro",0);
LOCAL("bigbro",0);
// Variables locales varias
LOCAL("priority",0);
LOCAL("ctype",0);
LOCAL("x",0);
LOCAL("y",0);
LOCAL("z",0);
LOCAL("graph",0);
LOCAL("size",0);
LOCAL("angle",0);
LOCAL("region",0);
LOCAL("file",0);
LOCAL("xgraph",0);
LOCAL("height",1);
LOCAL("cnumber",0);
LOCAL("resolution",0);
LOCAL("flags",0);
LOCAL("transparency",128) ;
FUNCTION("exit",2,eDIV_Exit);
FUNCTION("get_id",1,eDiv_GetId) ;
FUNCTION("define_region",5,eDiv_DefineRegion) ;
FUNCTION("signal",2,eDIV_Signal);
FUNCTION("let_me_alone",0,eDIV_Let_Me_Alone);
ENTRYPOINT( first_load ) ;
ENTRYPOINT(frame);
/* POR HACER: funciones signal, system, ignore_error... */
return TRUE;
}
int eDIV_Exit(FUNCTION_PARAMS)
{
int codigo=getparm();
char* mensaje=getstrparm();
/* FIXME: ¿Qué hacemos con el mensaje? ¿Lo mostramos en un msgbox si no es ""? */
if(*mensaje) {
#ifdef _WIN32
MessageBox(0,mensaje,fp->nombre_program,0);
#else
printf("%s\n",mensaje);
#endif
}
#ifdef _DEBUG
printf("dbg:\texit(): código de retorno: %d\n",codigo);
#endif
fp->Stub_Quit(codigo);
/* Por si acaso :P */
return codigo;
}
int eDiv_GetId(FUNCTION_PARAMS)
{
int i ,id1 ;
int a = getparm() ;
int* last_type=&reserved("type_scan",fp->procs_s[fp->proc_orden[*fp->proceso_actual]].id);
int* last_proc=&reserved("id_scan",fp->procs_s[fp->proc_orden[*fp->proceso_actual]].id);
if ( *last_type == a )
i = *last_proc+1 ;
else {
i = 0 ;
*last_type = a ;
}
for ( ; i < *fp->num_procs ; i++ )
{
*last_proc = i ;
id1 = fp->procs_s[ fp->proc_orden[ i ] ].id ;
/* Si el proceso se corresponde con el type */
if ( reserved("process_type",id1) == a )
{
return ( fp->procs_s[ fp->proc_orden[ i ] ].id ) ;
}
}
*last_type = 0 ;
return 0 ;
}
int eDiv_DefineRegion(FUNCTION_PARAMS)
{
int n , x , y , w , h ;
h = getparm() ;
w = getparm() ;
y = getparm() ;
x = getparm() ;
n = getparm() ;
if ( n > 31 || n < 1 ) {
fp->Runtime_Error(108); /* nº de región inválido */
return 0;
}
regions[n].x = x ;
regions[n].y = y ;
regions[n].w = w ;
regions[n].h = h ;
return 1 ;
}
void signal_tree(int proc, int signal, FUNCTION_PARAMS)
{
int id2;
if(id2=local("son",proc)) {
signal_tree(id2,signal,fp);
reserved("status",id2)=signal;
}
while(local("bigbro",id2)) {
proc=local("bigbro",id2);
reserved("status",id2)=signal;
}
/*while(local("smallbro",proc)) {
proc=local("smallbro",proc);
reserved("status",proc)=signal;
}*/
}
int eDIV_Signal(FUNCTION_PARAMS)
{
int signal=getparm();
int proc=getparm();
char tree=FALSE;
if(signal>=100) {
signal-=100;
tree=TRUE;
}
signal++;
/* Si se le pasa un ID */
if(proc<fp->imem_max)
{
reserved("status",proc)=signal;
if(tree && (proc=reserved("son",proc)))
signal_tree(proc,signal,fp);
}
/* Si se le pasa un type */
else {
int i,p;
for(i=0;i<*fp->num_procs;i++) {
if(fp->procs_s[fp->proc_orden[i]].tipo==proc) {
reserved("status",fp->procs_s[fp->proc_orden[i]].id)=signal;
if(tree && (p=reserved("son",fp->procs_s[fp->proc_orden[i]].id)))
signal_tree(fp->procs_s[fp->proc_orden[i]].id,signal,fp);
}
}
}
return 0;
}
int eDIV_Let_Me_Alone(FUNCTION_PARAMS)
{
int i;
int _status=reservedptr("status");
for(i=0;i<*fp->num_procs;i++) {
if(i!=*fp->proceso_actual) {
fp->mem[fp->procs_s[fp->proc_orden[i]].id+_status]=1; /* s_kill */
}
}
return 0;
}
//---------------------------- ENTRYPOINTS -----------------------------------------------
void first_load(FUNCTION_PARAMS)
{
int i ;
#ifdef _WIN32
struct timeb tiempob;
ftime(&tiempob);
ultimo_tiempo=tiempob.time*100+tiempob.millitm/10;
#endif
for ( i = 0 ; i < 32 ; i++ )
{
regions[i].x = 0 ;
regions[i].y = 0 ;
regions[i].w = 0 ;
regions[i].h = 0 ;
}
fp->regions = regions ;
fp->existe.regions = 1 ;
}
void frame(FUNCTION_PARAMS)
{
int i;
int timer;
#ifdef _WIN32
struct timeb tiempob;
ftime(&tiempob);
tiempo=tiempob.time*100+tiempob.millitm/10;
timer=globalptr("timer");
for(i=0;i<10;i++)
fp->mem[timer+i]+=tiempo-ultimo_tiempo;
ultimo_tiempo=tiempo;
#endif
}

View file

@ -1,3 +0,0 @@
LIBRARY edivstd
EXPORTS
ExportaFuncs

View file

@ -1,115 +0,0 @@
# Microsoft Developer Studio Project File - Name="edivstd" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=edivstd - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "edivstd.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "edivstd.mak" CFG="edivstd - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "edivstd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "edivstd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "edivstd - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc0a /d "NDEBUG"
# ADD RSC /l 0xc0a /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\dll\edivstd.dll"
!ELSEIF "$(CFG)" == "edivstd - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc0a /d "_DEBUG"
# ADD RSC /l 0xc0a /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\bin\dll\edivstd.dll" /pdbtype:sept
!ENDIF
# Begin Target
# Name "edivstd - Win32 Release"
# Name "edivstd - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\edivstd.c
# End Source File
# Begin Source File
SOURCE=.\edivstd.def
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\export.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View file

@ -1,29 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "edivstd"=.\edivstd.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View file

@ -1,33 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: edivstd - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP1C9.tmp" with contents
[
/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /Fp"Debug/edivstd.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"D:\ediv\src\dlls\edivstd\edivstd.c"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP1C9.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP1CA.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/edivstd.pdb" /debug /machine:I386 /def:".\edivstd.def" /out:"..\..\..\bin\dll\edivstd.dll" /implib:"Debug/edivstd.lib" /pdbtype:sept
.\Debug\edivstd.obj
]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP1CA.tmp"
<h3>Output Window</h3>
Compiling...
edivstd.c
d:\ediv\src\dlls\edivstd\edivstd.c(73) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
Linking...
<h3>Results</h3>
edivstd.dll - 0 error(s), 1 warning(s)
</pre>
</body>
</html>

View file

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "edivstd", "edivstd.vcproj", "{241E8C84-4593-4290-9D89-06BC64F00E38}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{241E8C84-4593-4290-9D89-06BC64F00E38}.Debug.ActiveCfg = Debug|Win32
{241E8C84-4593-4290-9D89-06BC64F00E38}.Debug.Build.0 = Debug|Win32
{241E8C84-4593-4290-9D89-06BC64F00E38}.Release.ActiveCfg = Release|Win32
{241E8C84-4593-4290-9D89-06BC64F00E38}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Binary file not shown.

View file

@ -1,159 +0,0 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="edivstd"
ProjectGUID="{7205B875-5EFC-4C86-8C38-2F6A66DCEBF2}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/edivstd.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\..\..\bin\dll\edivstd.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\edivstd.def"
ProgramDatabaseFile=".\Release/edivstd.pdb"
ImportLibrary=".\Release/edivstd.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/edivstd.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/edivstd.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\..\..\bin\dll\edivstd.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\edivstd.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/edivstd.pdb"
ImportLibrary=".\Debug/edivstd.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/edivstd.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath=".\edivstd.c">
</File>
<File
RelativePath=".\edivstd.def">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\export.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -1,10 +0,0 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = "relative:dlls\\edivstd"
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
}

View file

@ -1,11 +0,0 @@
struct _regions regions[32] ;
// Prototipos
int eDIV_Exit(FUNCTION_PARAMS);
int eDiv_GetId(FUNCTION_PARAMS) ;
int eDiv_DefineRegion(FUNCTION_PARAMS) ;
int eDIV_Signal(FUNCTION_PARAMS);
int eDIV_Let_Me_Alone(FUNCTION_PARAMS);

View file

@ -1,180 +0,0 @@
#include <stdio.h>
#include <export.h>
#include <errno.h>
//#include "../../shared/varindex.h"
#include "file.h"
int ExportaFuncs(EXPORTAFUNCS_PARAMS)
{
CONST("seek_cur",SEEK_CUR) ;
CONST("seek_set",SEEK_SET) ;
CONST("seek_end",SEEK_END) ;
GLOBAL("unit_size",4);
FUNCTION("fopen",2,eDiv_Fopen) ;
FUNCTION("fwrite",3,eDiv_Fwrite) ;
FUNCTION("fread",3,eDiv_Fread) ;
FUNCTION("ftell",1,eDiv_Ftell) ;
FUNCTION("fseek",3,eDiv_Fseek) ;
FUNCTION("flush",0,eDiv_Flush) ;
FUNCTION("fclose",1,eDiv_Fclose) ;
return TRUE ;
}
FILE *fichero[0xFF] ;
int existe[0xFF] ;
/* POR HACER:
* Los handles deben ser IMPARES
*/
int eDiv_Fopen(FUNCTION_PARAMS)
{
int i ;
char *filename ;
char modo[128];
strcpy(modo,getstrparm());
filename = getstrparm() ;
for (i=0;i<strlen(modo);i++)
if (modo[i]!='r' && modo[i]!='w' && modo[i]!='a' && modo[i]!='+') break;
if (i<strlen(modo)) {
fp->Runtime_Error(166); /* modo de acceso al archivo no válido */
return 0;
}
strcat(modo,"b");
for ( i = 1 ; i < 0xFF ; i++ )
if ( existe[i] == 0 )
break ;
if ( i == 0xFF ) {
fp->Runtime_Error(169); /* demasiados archivos abiertos */
return 0 ;
}
fichero[i] = fopen( filename, modo ) ;
if ( fichero[i] == NULL ) {
if(errno==EMFILE)
fp->Runtime_Error(169); /* demasiados archivos abiertos */
return 0 ;
}
existe[i] = 1 ;
return i;
}
int eDiv_Fwrite(FUNCTION_PARAMS)
{
int offset , longitud , handle ;
int escrito ;
handle = getparm() ;
longitud = getparm() ;
offset = getparm() ;
if ( !existe[handle] ) {
fp->Runtime_Error(170); /* handle no válido */
return 0;
}
escrito = fwrite( &fp->mem[ offset ] , global("unit_size") , longitud , fichero[handle] ) ;
if ( escrito == longitud )
return 1 ;
else
return 0 ;
}
int eDiv_Fread(FUNCTION_PARAMS)
{
int offset, longitud , handle ;
int leido ;
handle = getparm() ;
longitud = getparm() ;
offset = getparm() ;
if ( !existe[handle] )
return 0 ;
leido = fread( &fp->mem[ offset ] , global("unit_size") , longitud , fichero[handle] ) ;
if ( leido == longitud )
return 1 ;
else
return 0 ;
}
int eDiv_Ftell(FUNCTION_PARAMS)
{
int handle=getparm();
if ( !existe[handle] ) {
fp->Runtime_Error(170); /* handle no válido */
return -1 ; /* En caso de error, DIV2 devuelve handle, pero no me parece muy correcto... */
}
return (int)ftell( fichero[handle] ) ;
}
int eDiv_Fseek(FUNCTION_PARAMS)
{
int handle , posicion, modo ;
modo = getparm() ;
posicion = getparm()*global("unit_size") ;
handle = getparm() ;
if ( !existe[handle] ) {
fp->Runtime_Error(170); /* handle no válido */
return -1 ; /* ocurre lo mismo que con ftell... */
}
if ( fseek( fichero[handle] , posicion , modo ) == 0 )
return 0 ;
else
return -1 ;
}
int eDiv_Flush(FUNCTION_PARAMS)
{
return flushall() ; /* flushall()-numfiles */
}
int eDiv_Fclose(FUNCTION_PARAMS)
{
int handle=getparm(), num ;
if ( handle == 0 )
if ( ( num = fcloseall() ) == EOF )
return 0 ;
else
return num ;
else
if ( !existe[handle] ) {
fp->Runtime_Error(170);
return 0 ;
}
else
if ( ( num = fclose( fichero[handle] ) ) == EOF )
return 0 ;
else
return num ;
}
//============== Entrypoints =====================================================

View file

@ -1,3 +0,0 @@
LIBRARY file
EXPORTS
ExportaFuncs

View file

@ -1,8 +0,0 @@
int eDiv_Fopen(FUNCTION_PARAMS) ;
int eDiv_Fwrite(FUNCTION_PARAMS) ;
int eDiv_Fread(FUNCTION_PARAMS) ;
int eDiv_Ftell(FUNCTION_PARAMS) ;
int eDiv_Fseek(FUNCTION_PARAMS) ;
int eDiv_Flush(FUNCTION_PARAMS) ;
int eDiv_Fclose(FUNCTION_PARAMS) ;

View file

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text", "file.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Binary file not shown.

View file

@ -1,164 +0,0 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="file"
ProjectGUID="{6994F9CD-63ED-425D-879C-678D1706F4AE}"
SccProjectName=""
SccAuxPath=""
SccLocalPath=""
SccProvider="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/edivstd.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\..\..\bin\dll\file.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\file.def"
ProgramDatabaseFile=".\Release/edivstd.pdb"
ImportLibrary=".\Release/edivstd.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/edivstd.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/file.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="sdlmain.lib sdl.lib"
OutputFile="..\..\..\bin\dll\file.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\file.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/file.pdb"
ImportLibrary=".\Debug/file.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/file.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="file.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\export.h">
</File>
<File
RelativePath="file.def">
</File>
<File
RelativePath="file.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -1,901 +0,0 @@
/*
SDL_rotozoom.c
Copyright (C) A. Schiffler, July 2001
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef WIN32
#include <windows.h>
#endif
#include <stdlib.h>
#include <string.h>
#include "SDL_rotozoom.h"
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
/*
32bit Zoomer with optional anti-aliasing by bilinear interpolation.
Zoomes 32bit RGBA/ABGR 'src' surface to 'dst' surface.
*/
int
zoomSurfaceRGBA (SDL_Surface * src, SDL_Surface * dst, int smooth)
{
int x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy, ex, ey, t1, t2, sstep;
tColorRGBA *c00, *c01, *c10, *c11;
tColorRGBA *sp, *csp, *dp;
int sgap, dgap, orderRGBA;
/* Variable setup */
if (smooth)
{
/* For interpolation: assume source dimension is one pixel */
/* smaller to avoid overflow on right and bottom edge. */
sx = (int) (65536.0 * (float) (src->w - 1) / (float) dst->w);
sy = (int) (65536.0 * (float) (src->h - 1) / (float) dst->h);
}
else
{
sx = (int) (65536.0 * (float) src->w / (float) dst->w);
sy = (int) (65536.0 * (float) src->h / (float) dst->h);
}
/* Allocate memory for row increments */
if ((sax = (int *) malloc ((dst->w + 1) * sizeof (Uint32))) == NULL)
{
return (-1);
}
if ((say = (int *) malloc ((dst->h + 1) * sizeof (Uint32))) == NULL)
{
free (sax);
return (-1);
}
/* Precalculate row increments */
csx = 0;
csax = sax;
for (x = 0; x <= dst->w; x++)
{
*csax = csx;
csax++;
csx &= 0xffff;
csx += sx;
}
csy = 0;
csay = say;
for (y = 0; y <= dst->h; y++)
{
*csay = csy;
csay++;
csy &= 0xffff;
csy += sy;
}
/* Pointer setup */
sp = csp = (tColorRGBA *) src->pixels;
dp = (tColorRGBA *) dst->pixels;
sgap = src->pitch - src->w * 4;
dgap = dst->pitch - dst->w * 4;
orderRGBA = (src->format->Rmask == 0x000000ff);
/* Switch between interpolating and non-interpolating code */
if (smooth)
{
/* Interpolating Zoom */
/* Scan destination */
csay = say;
for (y = 0; y < dst->h; y++)
{
/* Setup color source pointers */
c00 = csp;
c01 = csp;
c01++;
c10 = (tColorRGBA *) ((Uint8 *) csp + src->pitch);
c11 = c10;
c11++;
csax = sax;
for (x = 0; x < dst->w; x++)
{
/* ABGR ordering */
/* Interpolate colors */
ex = (*csax & 0xffff);
ey = (*csay & 0xffff);
t1 = ((((c01->r - c00->r) * ex) >> 16) + c00->r) & 0xff;
t2 = ((((c11->r - c10->r) * ex) >> 16) + c10->r) & 0xff;
dp->r = (((t2 - t1) * ey) >> 16) + t1;
t1 = ((((c01->g - c00->g) * ex) >> 16) + c00->g) & 0xff;
t2 = ((((c11->g - c10->g) * ex) >> 16) + c10->g) & 0xff;
dp->g = (((t2 - t1) * ey) >> 16) + t1;
t1 = ((((c01->b - c00->b) * ex) >> 16) + c00->b) & 0xff;
t2 = ((((c11->b - c10->b) * ex) >> 16) + c10->b) & 0xff;
dp->b = (((t2 - t1) * ey) >> 16) + t1;
t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff;
t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff;
dp->a = (((t2 - t1) * ey) >> 16) + t1;
/* Advance source pointers */
csax++;
sstep = (*csax >> 16);
c00 += sstep;
c01 += sstep;
c10 += sstep;
c11 += sstep;
/* Advance destination pointer */
dp++;
}
/* Advance source pointer */
csay++;
csp = (tColorRGBA *) ((Uint8 *) csp + (*csay >> 16) * src->pitch);
/* Advance destination pointers */
dp = (tColorRGBA *) ((Uint8 *) dp + dgap);
}
}
else
{
/* Non-Interpolating Zoom */
csay = say;
for (y = 0; y < dst->h; y++)
{
sp = csp;
csax = sax;
for (x = 0; x < dst->w; x++)
{
/* Draw */
*dp = *sp;
/* Advance source pointers */
csax++;
sp += (*csax >> 16);
/* Advance destination pointer */
dp++;
}
/* Advance source pointer */
csay++;
csp = (tColorRGBA *) ((Uint8 *) csp + (*csay >> 16) * src->pitch);
/* Advance destination pointers */
dp = (tColorRGBA *) ((Uint8 *) dp + dgap);
}
}
/* Remove temp arrays */
free (sax);
free (say);
return (0);
}
/*
8bit Zoomer without smoothing.
Zoomes 8bit palette/Y 'src' surface to 'dst' surface.
*/
int
zoomSurfaceY (SDL_Surface * src, SDL_Surface * dst)
{
Uint32 x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy;
Uint8 *sp, *dp, *csp;
int dgap;
/* Variable setup */
sx = (Uint32) (65536.0 * (float) src->w / (float) dst->w);
sy = (Uint32) (65536.0 * (float) src->h / (float) dst->h);
/* Allocate memory for row increments */
if ((sax = (Uint32 *) malloc (dst->w * sizeof (Uint32))) == NULL)
{
return (-1);
}
if ((say = (Uint32 *) malloc (dst->h * sizeof (Uint32))) == NULL)
{
if (sax != NULL)
{
free (sax);
}
return (-1);
}
/* Precalculate row increments */
csx = 0;
csax = sax;
for (x = 0; x < dst->w; x++)
{
csx += sx;
*csax = (csx >> 16);
csx &= 0xffff;
csax++;
}
csy = 0;
csay = say;
for (y = 0; y < dst->h; y++)
{
csy += sy;
*csay = (csy >> 16);
csy &= 0xffff;
csay++;
}
csx = 0;
csax = sax;
for (x = 0; x < dst->w; x++)
{
csx += (*csax);
csax++;
}
csy = 0;
csay = say;
for (y = 0; y < dst->h; y++)
{
csy += (*csay);
csay++;
}
/* Pointer setup */
sp = csp = (Uint8 *) src->pixels;
dp = (Uint8 *) dst->pixels;
dgap = dst->pitch - dst->w;
/* Draw */
csay = say;
for (y = 0; y < dst->h; y++)
{
csax = sax;
sp = csp;
for (x = 0; x < dst->w; x++)
{
/* Draw */
*dp = *sp;
/* Advance source pointers */
sp += (*csax);
csax++;
/* Advance destination pointer */
dp++;
}
/* Advance source pointer (for row) */
csp += ((*csay) * src->pitch);
csay++;
/* Advance destination pointers */
dp += dgap;
}
/* Remove temp arrays */
free (sax);
free (say);
return (0);
}
/*
32bit Rotozoomer with optional anti-aliasing by bilinear interpolation.
Rotates and zoomes 32bit RGBA/ABGR 'src' surface to 'dst' surface.
*/
void
transformSurfaceRGBA (SDL_Surface * src, SDL_Surface * dst, int cx, int cy,
int isin, int icos, int smooth)
{
int x, y, t1, t2, dx, dy, xd, yd, sdx, sdy, ax, ay, ex, ey, sw, sh;
tColorRGBA c00, c01, c10, c11;
tColorRGBA *pc, *sp;
int gap, orderRGBA;
xd = ((src->w - dst->w) << 15);
yd = ((src->h - dst->h) << 15);
ax = (cx << 16) - (icos * cx);
ay = (cy << 16) - (isin * cx);
sw = src->w - 1;
sh = src->h - 1;
pc = dst->pixels;
gap = dst->pitch - dst->w * 4;
orderRGBA = (src->format->Rmask == 0x000000ff);
if (smooth)
{
for (y = 0; y < dst->h; y++)
{
dy = cy - y;
sdx = (ax + (isin * dy)) + xd;
sdy = (ay - (icos * dy)) + yd;
for (x = 0; x < dst->w; x++)
{
dx = (sdx >> 16);
dy = (sdy >> 16);
if ((dx >= -1) && (dy >= -1) && (dx < src->w) && (dy < src->h))
{
if ((dx >= 0) && (dy >= 0) && (dx < sw) && (dy < sh))
{
sp =
(tColorRGBA *) ((Uint8 *) src->pixels +
src->pitch * dy);
sp += dx;
c00 = *sp;
sp += 1;
c01 = *sp;
sp = (tColorRGBA *) ((Uint8 *) sp + src->pitch);
sp -= 1;
c10 = *sp;
sp += 1;
c11 = *sp;
}
else if ((dx == sw) && (dy == sh))
{
sp =
(tColorRGBA *) ((Uint8 *) src->pixels +
src->pitch * dy);
sp += dx;
c00 = *sp;
c01 = *pc;
c10 = *pc;
c11 = *pc;
}
else if ((dx == -1) && (dy == -1))
{
sp = (tColorRGBA *) (src->pixels);
c00 = *pc;
c01 = *pc;
c10 = *pc;
c11 = *sp;
}
else if ((dx == -1) && (dy == sh))
{
sp = (tColorRGBA *) (src->pixels);
sp =
(tColorRGBA *) ((Uint8 *) src->pixels +
src->pitch * dy);
c00 = *pc;
c01 = *sp;
c10 = *pc;
c11 = *pc;
}
else if ((dx == sw) && (dy == -1))
{
sp = (tColorRGBA *) (src->pixels);
sp += dx;
c00 = *pc;
c01 = *pc;
c10 = *sp;
c11 = *pc;
}
else if (dx == -1)
{
sp =
(tColorRGBA *) ((Uint8 *) src->pixels +
src->pitch * dy);
c00 = *pc;
c01 = *sp;
c10 = *pc;
sp = (tColorRGBA *) ((Uint8 *) sp + src->pitch);
c11 = *sp;
}
else if (dy == -1)
{
sp = (tColorRGBA *) (src->pixels);
sp += dx;
c00 = *pc;
c01 = *pc;
c10 = *sp;
sp += 1;
c11 = *sp;
}
else if (dx == sw)
{
sp =
(tColorRGBA *) ((Uint8 *) src->pixels +
src->pitch * dy);
sp += dx;
c00 = *sp;
c01 = *pc;
sp = (tColorRGBA *) ((Uint8 *) sp + src->pitch);
c10 = *sp;
c11 = *pc;
}
else if (dy == sh)
{
sp =
(tColorRGBA *) ((Uint8 *) src->pixels +
src->pitch * dy);
sp += dx;
c00 = *sp;
sp += 1;
c01 = *sp;
c10 = *pc;
c11 = *pc;
}
ex = (sdx & 0xffff);
ey = (sdy & 0xffff);
t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff;
t2 = ((((c11.r - c10.r) * ex) >> 16) + c10.r) & 0xff;
pc->r = (((t2 - t1) * ey) >> 16) + t1;
t1 = ((((c01.g - c00.g) * ex) >> 16) + c00.g) & 0xff;
t2 = ((((c11.g - c10.g) * ex) >> 16) + c10.g) & 0xff;
pc->g = (((t2 - t1) * ey) >> 16) + t1;
t1 = ((((c01.b - c00.b) * ex) >> 16) + c00.b) & 0xff;
t2 = ((((c11.b - c10.b) * ex) >> 16) + c10.b) & 0xff;
pc->b = (((t2 - t1) * ey) >> 16) + t1;
t1 = ((((c01.a - c00.a) * ex) >> 16) + c00.a) & 0xff;
t2 = ((((c11.a - c10.a) * ex) >> 16) + c10.a) & 0xff;
pc->a = (((t2 - t1) * ey) >> 16) + t1;
}
sdx += icos;
sdy += isin;
pc++;
}
pc = (tColorRGBA *) ((Uint8 *) pc + gap);
}
}
else
{
for (y = 0; y < dst->h; y++)
{
dy = cy - y;
sdx = (ax + (isin * dy)) + xd;
sdy = (ay - (icos * dy)) + yd;
for (x = 0; x < dst->w; x++)
{
dx = (short) (sdx >> 16);
dy = (short) (sdy >> 16);
if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h))
{
sp =
(tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy);
sp += dx;
*pc = *sp;
}
sdx += icos;
sdy += isin;
pc++;
}
pc = (tColorRGBA *) ((Uint8 *) pc + gap);
}
}
}
/*
8bit Rotozoomer without smoothing
Rotates and zoomes 8bit palette/Y 'src' surface to 'dst' surface.
*/
void
transformSurfaceY (SDL_Surface * src, SDL_Surface * dst, int cx, int cy,
int isin, int icos)
{
int x, y, dx, dy, xd, yd, sdx, sdy, ax, ay, sw, sh;
tColorY *pc, *sp;
int gap;
/* Variable setup */
xd = ((src->w - dst->w) << 15);
yd = ((src->h - dst->h) << 15);
ax = (cx << 16) - (icos * cx);
ay = (cy << 16) - (isin * cx);
sw = src->w - 1;
sh = src->h - 1;
pc = dst->pixels;
gap = dst->pitch - dst->w;
/* Clear surface to colorkey */
memset (pc, (unsigned char) (src->format->colorkey & 0xff),
dst->pitch * dst->h);
/* Iterate through destination surface */
for (y = 0; y < dst->h; y++)
{
dy = cy - y;
sdx = (ax + (isin * dy)) + xd;
sdy = (ay - (icos * dy)) + yd;
for (x = 0; x < dst->w; x++)
{
dx = (short) (sdx >> 16);
dy = (short) (sdy >> 16);
if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h))
{
sp = (tColorY *) (src->pixels);
sp += (src->pitch * dy + dx);
*pc = *sp;
}
sdx += icos;
sdy += isin;
pc++;
}
pc += gap;
}
}
/*
rotozoomSurface()
Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface.
'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is 1
then the destination 32bit surface is anti-aliased. If the surface is not 8bit
or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
*/
/*XPUT/* Sanity check */
/* Determine if source surface is 32bit or 8bit */
/* New source surface is 32bit with a defined RGBA ordering */
/* Sanity check zoom factor */
/* Check if we have a rotozoom or just a zoom */
/* Angle!=0: full rotozoom *
//* ----------------------- */
/* Calculate target factors from sin/cos and zoom
*/
/* Determine destination width and height by rotating a centered source box */
/* Alloc space to completely contain the rotated surface */
/* Target surface is 32bit with source RGBA/ABGR ordering */
/* Lock source surface */
/* Check which kind of surface we have */
/* Call the 32bit transformation routine to do the rotation (using alpha) */
#define VALUE_LIMIT 0.001
SDL_Surface *
rotozoomSurface (SDL_Surface * src, double angle, double zoom, int smooth)
{
SDL_Surface *rz_src;
SDL_Surface *rz_dst;
double zoominv;
double radangle, sanglezoom, canglezoom, sanglezoominv, canglezoominv;
int dstwidthhalf, dstwidth, dstheighthalf, dstheight;
double x, y, cx, cy, sx, sy;
int is32bit;
int i, src_converted;
if (src == NULL)
return (NULL);
is32bit = (src->format->BitsPerPixel == 32);
if ((is32bit) || (src->format->BitsPerPixel == 8))
{
rz_src = src;
src_converted = 0;
}
else
{
rz_src =
SDL_CreateRGBSurface (SDL_SWSURFACE, src->w, src->h, 32, 0x000000ff,
0x0000ff00, 0x00ff0000, 0xff000000);
SDL_BlitSurface (src, NULL, rz_src, NULL);
src_converted = 1;
is32bit = 1;
}
if (zoom < VALUE_LIMIT)
{
zoom = VALUE_LIMIT;
}
zoominv = 65536.0 / zoom;
if (fabs (angle) > VALUE_LIMIT)
{
radangle = angle * (M_PI / 180.0);
sanglezoom = sanglezoominv = sin (radangle);
canglezoom = canglezoominv = cos (radangle);
sanglezoom *= zoom;
canglezoom *= zoom;
sanglezoominv *= zoominv;
canglezoominv *= zoominv;
x = rz_src->w / 2;
y = rz_src->h / 2;
cx = canglezoom * x;
cy = canglezoom * y;
sx = sanglezoom * x;
sy = sanglezoom * y;
dstwidthhalf = src->w;
dstheighthalf = src->h;
/*dstwidthhalf =MAX ((int)
ceil (MAX
(MAX
(MAX (fabs (cx + sy), fabs (cx - sy)), fabs (-cx + sy)),
fabs (-cx - sy))), 1);
dstheighthalf = MAX ((int) ceil (MAX (MAX (MAX (fabs (sx + cy), fabs (sx - cy)), fabs (-sx + cy)),fabs (-sx - cy))), 1);
*/
dstwidth = 2 * dstwidthhalf;
dstheight = 2 * dstheighthalf;
rz_dst = NULL;
if (is32bit)
{
rz_dst =
SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 32,
rz_src->format->Rmask,
rz_src->format->Gmask,
rz_src->format->Bmask,
rz_src->format->Amask);
}
else
{
rz_dst =
SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 8, 0, 0,
0, 0);
}
SDL_LockSurface (rz_src);
if (is32bit)
{
transformSurfaceRGBA (rz_src, rz_dst, dstwidthhalf, dstheighthalf,
(int) (sanglezoominv),
(int) (canglezoominv), smooth);
SDL_SetAlpha (rz_dst, SDL_SRCALPHA, 255);
}
else
{
for (i = 0; i < rz_src->format->palette->ncolors; i++)
{
rz_dst->format->palette->colors[i] =
rz_src->format->palette->colors[i];
}
rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors;
transformSurfaceY (rz_src, rz_dst, dstwidthhalf, dstheighthalf,
(int) (sanglezoominv), (int) (canglezoominv));
SDL_SetColorKey (rz_dst, SDL_SRCCOLORKEY | SDL_RLEACCEL,
rz_src->format->colorkey);
}
SDL_UnlockSurface (rz_src);
}
else
{
dstwidth = (int) ((double) rz_src->w * zoom);
dstheight = (int) ((double) rz_src->h * zoom);
if (dstwidth < 1)
{
dstwidth = 1;
}
if (dstheight < 1)
{
dstheight = 1;
}
rz_dst = NULL;
if (is32bit)
{
rz_dst =
SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 32,
rz_src->format->Rmask,
rz_src->format->Gmask,
rz_src->format->Bmask,
rz_src->format->Amask);
}
else
{
rz_dst =
SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 8, 0, 0,
0, 0);
}
SDL_LockSurface (rz_src);
if (is32bit)
{
zoomSurfaceRGBA (rz_src, rz_dst, smooth);
SDL_SetAlpha (rz_dst, SDL_SRCALPHA, 255);
}
else
{
for (i = 0; i < rz_src->format->palette->ncolors; i++)
{
rz_dst->format->palette->colors[i] =
rz_src->format->palette->colors[i];
}
rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors;
zoomSurfaceY (rz_src, rz_dst);
SDL_SetColorKey (rz_dst, SDL_SRCCOLORKEY | SDL_RLEACCEL,
rz_src->format->colorkey);
}
SDL_UnlockSurface (rz_src);
}
if (src_converted)
{
SDL_FreeSurface (rz_src);
}
return (rz_dst);
}
/*
zoomSurface()
Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface.
'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1
then the destination 32bit surface is anti-aliased. If the surface is not 8bit
or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
*/
#define VALUE_LIMIT 0.001
SDL_Surface *
zoomSurface (SDL_Surface * src, double zoomx, double zoomy, int smooth)
{
SDL_Surface *rz_src;
SDL_Surface *rz_dst;
int dstwidth, dstheight;
int is32bit;
int i, src_converted;
if (src == NULL)
return (NULL);
is32bit = (src->format->BitsPerPixel == 32);
if ((is32bit) || (src->format->BitsPerPixel == 8))
{
rz_src = src;
src_converted = 0;
}
else
{
rz_src =
SDL_CreateRGBSurface (SDL_SWSURFACE, src->w, src->h, 32, 0x000000ff,
0x0000ff00, 0x00ff0000, 0xff000000);
SDL_BlitSurface (src, NULL, rz_src, NULL);
src_converted = 1;
is32bit = 1;
}
if (zoomx < VALUE_LIMIT)
{
zoomx = VALUE_LIMIT;
}
if (zoomy < VALUE_LIMIT)
{
zoomy = VALUE_LIMIT;
}
dstwidth = (int) ((double) rz_src->w * zoomx);
dstheight = (int) ((double) rz_src->h * zoomy);
if (dstwidth < 1)
{
dstwidth = 1;
}
if (dstheight < 1)
{
dstheight = 1;
}
rz_dst = NULL;
if (is32bit)
{
rz_dst =
SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 32,
rz_src->format->Rmask, rz_src->format->Gmask,
rz_src->format->Bmask, rz_src->format->Amask);
}
else
{
rz_dst =
SDL_CreateRGBSurface (SDL_SWSURFACE, dstwidth, dstheight, 8, 0, 0, 0,
0);
}
SDL_LockSurface (rz_src);
if (is32bit)
{
zoomSurfaceRGBA (rz_src, rz_dst, smooth);
SDL_SetAlpha (rz_dst, SDL_SRCALPHA, 255);
}
else
{
for (i = 0; i < rz_src->format->palette->ncolors; i++)
{
rz_dst->format->palette->colors[i] =
rz_src->format->palette->colors[i];
}
rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors;
zoomSurfaceY (rz_src, rz_dst);
SDL_SetColorKey (rz_dst, SDL_SRCCOLORKEY | SDL_RLEACCEL,
rz_src->format->colorkey);
}
SDL_UnlockSurface (rz_src);
if (src_converted)
{
SDL_FreeSurface (rz_src);
}
return (rz_dst);
}
#ifdef NORL_WIN32
/* For DLL building under VC6 */
BOOL APIENTRY
DllMain (HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif

View file

@ -1,77 +0,0 @@
#ifndef _SDL_rotozoom_h
#define _SDL_rotozoom_h
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C"
{
#endif
#include <math.h>
#ifndef M_PI
#define M_PI 3.141592654
#endif
#include "SDL.h"
/* ---- Defines */
#define SMOOTHING_OFF 0
#define SMOOTHING_ON 1
/* ---- Structures */
typedef struct tColorRGBA
{
Uint8 r;
Uint8 g;
Uint8 b;
Uint8 a;
}
tColorRGBA;
typedef struct tColorY
{
Uint8 y;
}
tColorY;
/* ---- Prototypes */
/*
rotozoomSurface()
Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface.
'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is 1
then the destination 32bit surface is anti-aliased. If the surface is not 8bit
or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
*/
SDL_Surface *rotozoomSurface (SDL_Surface * src, double angle, double zoom,
int smooth);
/*
zoomSurface()
Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface.
'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1
then the destination 32bit surface is anti-aliased. If the surface is not 8bit
or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
*/
SDL_Surface *zoomSurface (SDL_Surface * src, double zoomx, double zoomy,
int smooth);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
};
#endif
#endif /* _SDL_rotozoom_h */

View file

@ -1,10 +0,0 @@
*******************
*eDIV GRAPHICS.DLL*
*******************
15-1-02
- Este es el primer CHANGE.LOG que ago pa esta dll.
- Estan todas las funciones menos la MAP_BLOCK_COPY
- El frame ya rula, y tb esta definido como un ENTRYPOINT
- Carga MAP y PCX, FPGS y sus respectivas paletas y los respectivos puntos de control de cada mapa :D

View file

@ -1,332 +0,0 @@
# Microsoft Developer Studio Project File - Name="DLL" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=DLL - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "DLL.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "DLL.mak" CFG="DLL - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "DLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "DLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "DLL - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc0a /d "NDEBUG"
# ADD RSC /l 0xc0a /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"C:\ROOT\CVS\ediv\bin\dll\video.dll"
!ELSEIF "$(CFG)" == "DLL - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc0a /d "_DEBUG"
# ADD RSC /l 0xc0a /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"C:\ROOT\CVS\ediv\bin\dll\video.dll" /pdbtype:sept
# SUBTRACT LINK32 /debug
!ENDIF
# Begin Target
# Name "DLL - Win32 Release"
# Name "DLL - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\files.c
# End Source File
# Begin Source File
SOURCE=.\g_blit.c
# End Source File
# Begin Source File
SOURCE=.\g_draw.c
# End Source File
# Begin Source File
SOURCE=.\g_flic.c
# End Source File
# Begin Source File
SOURCE=.\g_main.c
# End Source File
# Begin Source File
SOURCE=.\g_maps.c
# End Source File
# Begin Source File
SOURCE=.\g_pal.c
# End Source File
# Begin Source File
SOURCE=.\graphics.def
# End Source File
# Begin Source File
SOURCE=.\img_pcx.c
# End Source File
# Begin Source File
SOURCE=.\img_png.c
# End Source File
# Begin Source File
SOURCE=.\main.c
# End Source File
# Begin Source File
SOURCE=.\xctype.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\export.h
# End Source File
# Begin Source File
SOURCE=.\files.h
# End Source File
# Begin Source File
SOURCE=.\flic.h
# End Source File
# Begin Source File
SOURCE=.\fmath.h
# End Source File
# Begin Source File
SOURCE=.\fxi.h
# End Source File
# Begin Source File
SOURCE=.\graphics.h
# End Source File
# Begin Source File
SOURCE=.\grlib.h
# End Source File
# Begin Source File
SOURCE=.\offsets.h
# End Source File
# Begin Source File
SOURCE=.\xctype.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# Begin Group "zlib"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zlib\adler32.c
# End Source File
# Begin Source File
SOURCE=.\zlib\compress.c
# End Source File
# Begin Source File
SOURCE=.\zlib\crc32.c
# End Source File
# Begin Source File
SOURCE=.\zlib\deflate.c
# End Source File
# Begin Source File
SOURCE=.\zlib\gzio.c
# End Source File
# Begin Source File
SOURCE=.\zlib\infblock.c
# End Source File
# Begin Source File
SOURCE=.\zlib\infcodes.c
# End Source File
# Begin Source File
SOURCE=.\zlib\inffast.c
# End Source File
# Begin Source File
SOURCE=.\zlib\inflate.c
# End Source File
# Begin Source File
SOURCE=.\zlib\inftrees.c
# End Source File
# Begin Source File
SOURCE=.\zlib\infutil.c
# End Source File
# Begin Source File
SOURCE=.\zlib\trees.c
# End Source File
# Begin Source File
SOURCE=.\zlib\uncompr.c
# End Source File
# Begin Source File
SOURCE=.\zlib\zutil.c
# End Source File
# End Group
# Begin Group "libpng"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\libpng\png.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngerror.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pnggccrd.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngget.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngmem.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngpread.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngread.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngrio.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngrtran.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngrutil.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngset.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngtrans.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngvcrd.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngwio.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngwrite.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngwtran.c
# End Source File
# Begin Source File
SOURCE=.\libpng\pngwutil.c
# End Source File
# End Group
# Begin Group "sdl"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\sdl\lib\SDL.lib
# End Source File
# Begin Source File
SOURCE=.\sdl\lib\SDLmain.lib
# End Source File
# End Group
# End Target
# End Project

View file

@ -1,100 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: DLL - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\RooT\CONFIG~1\Temp\RSP8D.tmp" with contents
[
/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /Fp"Release/DLL.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
"C:\ROOT\SION\GDLL\DLL\g_blit.c"
"C:\ROOT\SION\GDLL\DLL\g_main.c"
"C:\ROOT\SION\GDLL\DLL\main.c"
]
Creating command line "cl.exe @C:\DOCUME~1\RooT\CONFIG~1\Temp\RSP8D.tmp"
Creating temporary file "C:\DOCUME~1\RooT\CONFIG~1\Temp\RSP8E.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/video.pdb" /machine:I386 /def:".\graphics.def" /out:"C:\ROOT\CVS\ediv\bin\dll\video.dll" /implib:"Release/video.lib"
.\Release\files.obj
.\Release\g_blit.obj
.\Release\g_draw.obj
.\Release\g_flic.obj
.\Release\g_main.obj
.\Release\g_maps.obj
.\Release\g_pal.obj
.\Release\img_pcx.obj
.\Release\img_png.obj
.\Release\main.obj
.\Release\xctype.obj
.\Release\adler32.obj
.\Release\compress.obj
.\Release\crc32.obj
.\Release\deflate.obj
.\Release\gzio.obj
.\Release\infblock.obj
.\Release\infcodes.obj
.\Release\inffast.obj
.\Release\inflate.obj
.\Release\inftrees.obj
.\Release\infutil.obj
.\Release\trees.obj
.\Release\uncompr.obj
.\Release\zutil.obj
.\Release\png.obj
.\Release\pngerror.obj
.\Release\pnggccrd.obj
.\Release\pngget.obj
.\Release\pngmem.obj
.\Release\pngpread.obj
.\Release\pngread.obj
.\Release\pngrio.obj
.\Release\pngrtran.obj
.\Release\pngrutil.obj
.\Release\pngset.obj
.\Release\pngtrans.obj
.\Release\pngvcrd.obj
.\Release\pngwio.obj
.\Release\pngwrite.obj
.\Release\pngwtran.obj
.\Release\pngwutil.obj
.\sdl\lib\SDL.lib
.\sdl\lib\SDLmain.lib
]
Creating command line "link.exe @C:\DOCUME~1\RooT\CONFIG~1\Temp\RSP8E.tmp"
<h3>Output Window</h3>
Compiling...
g_blit.c
C:\ROOT\SION\GDLL\DLL\g_blit.c(463) : warning C4244: '=' : conversion from 'double ' to 'float ', possible loss of data
C:\ROOT\SION\GDLL\DLL\g_blit.c(485) : warning C4101: 'orig16' : unreferenced local variable
C:\ROOT\SION\GDLL\DLL\g_blit.c(485) : warning C4101: 'ptr16' : unreferenced local variable
C:\ROOT\SION\GDLL\DLL\g_blit.c(485) : warning C4101: 'base16' : unreferenced local variable
C:\ROOT\SION\GDLL\DLL\g_blit.c(474) : warning C4101: 'cx' : unreferenced local variable
C:\ROOT\SION\GDLL\DLL\g_blit.c(485) : warning C4101: 'c16' : unreferenced local variable
g_main.c
C:\ROOT\SION\GDLL\DLL\g_blit.c(681) : warning C4700: local variable 'orig' used without having been initialized
C:\ROOT\SION\GDLL\DLL\g_main.c(72) : warning C4101: 'lptr' : unreferenced local variable
C:\ROOT\SION\GDLL\DLL\g_main.c(71) : warning C4101: 'n' : unreferenced local variable
C:\ROOT\SION\GDLL\DLL\g_main.c(155) : warning C4013: 'free' undefined; assuming extern returning int
C:\ROOT\SION\GDLL\DLL\g_main.c(336) : warning C4098: 'gr_init' : 'void' function returning a value
main.c
C:\ROOT\SION\GDLL\DLL\offsets.h(96) : warning C4005: 'PRIORITY' : macro redefinition
C:\ROOT\SION\GDLL\DLL\export.h(190) : see previous definition of 'PRIORITY'
C:\ROOT\SION\GDLL\DLL\main.c(129) : warning C4013: 'gr_blit' undefined; assuming extern returning int
C:\ROOT\SION\GDLL\DLL\main.c(280) : warning C4013: 'gr_rotated_blit' undefined; assuming extern returning int
C:\ROOT\SION\GDLL\DLL\main.c(393) : warning C4047: 'initializing' : 'const char *' differs in levels of indirection from 'const int '
C:\ROOT\SION\GDLL\DLL\main.c(406) : warning C4047: 'function' : 'struct _grlib *' differs in levels of indirection from 'const int '
C:\ROOT\SION\GDLL\DLL\main.c(406) : warning C4024: 'grlib_unload_map' : different types for formal and actual parameter 1
C:\ROOT\SION\GDLL\DLL\main.c(79) : warning C4716: 'eDIV_PRINTF' : must return a value
Linking...
Creating library Release/video.lib and object Release/video.exp
video.exp : warning LNK4070: /OUT:graphics.dll directive in .EXP differs from output filename "C:\ROOT\CVS\ediv\bin\dll\video.dll"; ignoring directive
<h3>Results</h3>
VIDEO.DLL - 0 error(s), 19 warning(s)
</pre>
</body>
</html>

View file

@ -1,3 +0,0 @@
LIBRARY graphics
EXPORTS
ExportaFuncs

View file

@ -1,120 +0,0 @@
# Microsoft Developer Studio Project File - Name="graphics" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=graphics - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "graphics.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "graphics.mak" CFG="graphics - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "graphics - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "graphics - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "graphics - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc0a /d "NDEBUG"
# ADD RSC /l 0xc0a /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\dll\graphics.dll"
!ELSEIF "$(CFG)" == "graphics - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc0a /d "_DEBUG"
# ADD RSC /l 0xc0a /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 zlib.lib libpng.lib sdlmain.lib sdl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libc.lib /nologo /dll /machine:I386 /nodefaultlib:"LIBCMTD.lib" /nodefaultlib /out:"..\..\..\bin\dll\graphics.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "graphics - Win32 Release"
# Name "graphics - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\graphics\graphics.def
# End Source File
# Begin Source File
SOURCE=..\graphics\main.c
# End Source File
# Begin Source File
SOURCE=..\graphics\SDL_rotozoom.c
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# Begin Source File
SOURCE=..\graphics\graphics.h
# End Source File
# Begin Source File
SOURCE=..\graphics\SDL_rotozoom.h
# End Source File
# End Target
# End Project

View file

@ -1,57 +0,0 @@
// GRAPHICS.H
#include <SDL/SDL.h>
#define PIOVER180 0.017453292519943295769236907684886
SDL_Surface *screen;
SDL_Surface *prueba;
/*
int eDIV_XPUT(FUNCTION_PARAMS);
int eDIV_MAP_PUT(FUNCTION_PARAMS);
int eDIV_SETPOS(FUNCTION_PARAMS);
int eDIV_fade(FUNCTION_PARAMS);
int eDIV_LOAD_MAP(FUNCTION_PARAMS);
int eDIV_SET_MODE(FUNCTION_PARAMS);
int eDIV_LOAD_FPG(FUNCTION_PARAMS);
int eDIV_UNLOAD_FPG(FUNCTION_PARAMS);
int eDIV_UNLOAD_MAP(FUNCTION_PARAMS);
*/
int eDIV_LOAD_BMP(FUNCTION_PARAMS);
int eDIV_COLLISION(FUNCTION_PARAMS);
int eDIV_SET_TRANSPARENT_COLOR(FUNCTION_PARAMS);
int eDIV_GET_TRANSPARENT_COLOR(FUNCTION_PARAMS);
int eDIV_RGB(FUNCTION_PARAMS);
int eDIV_GET_RGB(FUNCTION_PARAMS);
int eDIV_ADVANCE(FUNCTION_PARAMS);
int eDIV_XADVANCE(FUNCTION_PARAMS) ;
int eDIV_MAP_BLOCK_COPY(FUNCION_PARMAS) ;
int eDIV_MAP_GET_PIXEL(FUNCION_PARMAS) ;
int eDIV_MAP_PUT(FUNCION_PARMAS) ;
int eDIV_MAP_PUT_PIXEL(FUNCTION_PARAMS);
int eDIV_PUT(FUNCTION_PARAMS);
int eDIV_PUT_PIXEL(FUNCTION_PARAMS);
int eDIV_PUT_SCREEN(FUNCION_PARAMS);
int eDIV_CLEAR_SCREEN(FUNCTION_PARAMS);
int eDIV_GET_PIXEL(FUNCTION_PARAMS);
int eDIV_NEW_MAP(FUNCTION_PARAMS) ;
int eDIV_SCREEN_COPY(FUNCTION_PARAMS) ;
int eDIV_OUT_REGION(FUNCTION_PARAMS) ;
int eDIV_DRAW(FUNCTION_PARAMS) ;
int eDIV_MOVE_DRAW(FUNCTION_PARAMS) ;
int eDIV_DELETE_DRAW(FUNCTION_PARAMS) ;
int eDIV_LOAD_FPG(FUNCTION_PARAMS) ;
int eDIV_GET_POINT(FUNCTION_PARAMS) ;
int eDIV_GET_REAL_POINT(FUNCTION_PARAMS) ;
int eDIV_GRAPHIC_INFO(FUNCTION_PARAMS) ;
int eDIV_FADE(FUNCTION_PARAMS) ;
int eDIV_XPUT(FUNCTION_PARAMS);
int Dibuja(SDL_Surface *src , SDL_Rect srcrect , SDL_Rect dstrect , int z , int trans,int size,int angle);
SDL_Surface *xput(SDL_Surface *src,double size,double angle);

View file

@ -1,46 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: graphics - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "G:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP174.tmp" with contents
[
/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /FR"Debug/" /Fp"Debug/graphics.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\SION\ediv\src\dlls\graphics\main.c"
"C:\SION\ediv\src\dlls\graphics\SDL_rotozoom.c"
]
Creating command line "cl.exe @G:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP174.tmp"
Creating temporary file "G:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP175.tmp" with contents
[
zlib.lib libpng.lib sdlmain.lib sdl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libc.lib /nologo /dll /incremental:yes /pdb:"Debug/graphics.pdb" /machine:I386 /nodefaultlib:"LIBCMTD.lib" /nodefaultlib /def:".\graphics.def" /out:"..\..\..\bin\dll\graphics.dll" /implib:"Debug/graphics.lib" /pdbtype:sept
.\Debug\main.obj
.\Debug\SDL_rotozoom.obj
]
Creating command line "link.exe @G:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP175.tmp"
<h3>Output Window</h3>
Compiling...
main.c
c:\sion\ediv\src\dlls\graphics\main.c(1338) : warning C4101: 'temp' : unreferenced local variable
SDL_rotozoom.c
c:\sion\ediv\src\dlls\graphics\main.c(1026) : warning C4761: integral size mismatch in argument; conversion supplied
c:\sion\ediv\src\dlls\graphics\main.c(1074) : warning C4761: integral size mismatch in argument; conversion supplied
c:\sion\ediv\src\dlls\graphics\main.c(1471) : warning C4761: integral size mismatch in argument; conversion supplied
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(228) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(237) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(247) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(254) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(267) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(271) : warning C4018: '<' : signed/unsigned mismatch
Linking...
Creating library Debug/graphics.lib and object Debug/graphics.exp
<h3>Results</h3>
graphics.dll - 0 error(s), 10 warning(s)
</pre>
</body>
</html>

View file

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "graphics.vcproj", "{595A2626-DD40-44EC-A2B8-FB513D15D8C9}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Debug.ActiveCfg = Debug|Win32
{595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Debug.Build.0 = Debug|Win32
{595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Release.ActiveCfg = Release|Win32
{595A2626-DD40-44EC-A2B8-FB513D15D8C9}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Binary file not shown.

View file

@ -1,168 +0,0 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="graphics"
ProjectGUID="{595A2626-DD40-44EC-A2B8-FB513D15D8C9}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../../shared; ../../dlls"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Release/graphics.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName="$(IntDir)/vc70.pdb"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="sdl.lib sdlmain.lib"
OutputFile="..\..\..\bin\dll\graphics.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\graphics.def"
ProgramDatabaseFile=".\Release/graphics.pdb"
ImportLibrary=".\Release/graphics.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/graphics.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\..\..\bin\dll\"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..;..\..\shared"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/graphics.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="zlib.lib libpng.lib sdlmain.lib sdl.lib odbc32.lib odbccp32.lib"
OutputFile="..\..\..\bin\dll\graphics.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
IgnoreDefaultLibraryNames="LIBCMTD.lib"
ModuleDefinitionFile=".\graphics.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/graphics.pdb"
ImportLibrary=".\Debug/graphics.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/graphics.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="SDL_rotozoom.c">
</File>
<File
RelativePath=".\graphics.def">
</File>
<File
RelativePath=".\main.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="SDL_rotozoom.h">
</File>
<File
RelativePath="..\export.h">
</File>
<File
RelativePath="graphics.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -1,10 +0,0 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = "relative:dlls\\graphics"
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
}

File diff suppressed because it is too large Load diff

View file

@ -1,444 +0,0 @@
/*
SDL_rotozoom - test program
Copyright (C) A. Schiffler, July 2001
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef WIN32
#include <windows.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "SDL.h"
#include "SDL_rotozoom.h"
void
HandleEvent ()
{
SDL_Event event;
/* Check for events */
while (SDL_PollEvent (&event))
{
switch (event.type)
{
case SDL_KEYDOWN:
case SDL_QUIT:
exit (0);
break;
}
}
}
void
ClearScreen (SDL_Surface * screen)
{
int i;
/* Set the screen to black */
if (SDL_LockSurface (screen) == 0)
{
Uint32 black;
Uint8 *pixels;
black = SDL_MapRGB (screen->format, 0, 0, 0);
pixels = (Uint8 *) screen->pixels;
for (i = 0; i < screen->h; ++i)
{
memset (pixels, black, screen->w * screen->format->BytesPerPixel);
pixels += screen->pitch;
}
SDL_UnlockSurface (screen);
}
}
void
RotatePicture (SDL_Surface * screen, SDL_Surface * picture, int rotate,
int smooth)
{
SDL_Surface *rotozoom_picture;
SDL_Rect dest;
int framecount, framemax, frameinc;
float zoomf;
/* Rotate and display the picture */
framemax = 4 * 360;
frameinc = 1;
for (framecount = 360; framecount < framemax; framecount += frameinc)
{
if ((framecount % 360) == 0)
frameinc++;
HandleEvent ();
ClearScreen (screen);
zoomf = (float) framecount / (float) framemax;
zoomf = 1.5 * zoomf * zoomf;
if ((rotozoom_picture =
rotozoomSurface (picture, framecount * rotate, zoomf,
smooth)) != NULL)
{
dest.x = (screen->w - rotozoom_picture->w) / 2;;
dest.y = (screen->h - rotozoom_picture->h) / 2;
dest.w = rotozoom_picture->w;
dest.h = rotozoom_picture->h;
if (SDL_BlitSurface (rotozoom_picture, NULL, screen, &dest) < 0)
{
fprintf (stderr, "Blit failed: %s\n", SDL_GetError ());
break;
}
SDL_FreeSurface (rotozoom_picture);
}
/* Display by flipping screens */
SDL_UpdateRect (screen, 0, 0, 0, 0);
}
if (rotate)
{
/* Final display with angle=0 */
HandleEvent ();
ClearScreen (screen);
if ((rotozoom_picture =
rotozoomSurface (picture, 0.01, zoomf, smooth)) != NULL)
{
dest.x = (screen->w - rotozoom_picture->w) / 2;;
dest.y = (screen->h - rotozoom_picture->h) / 2;
dest.w = rotozoom_picture->w;
dest.h = rotozoom_picture->h;
if (SDL_BlitSurface (rotozoom_picture, NULL, screen, &dest) < 0)
{
fprintf (stderr, "Blit failed: %s\n", SDL_GetError ());
return;
}
SDL_FreeSurface (rotozoom_picture);
}
/* Display by flipping screens */
SDL_UpdateRect (screen, 0, 0, 0, 0);
}
/* Pause for a sec */
SDL_Delay (1000);
}
void
ZoomPicture (SDL_Surface * screen, SDL_Surface * picture, int smooth)
{
SDL_Surface *rotozoom_picture;
SDL_Rect dest;
int framecount, framemax, frameinc;
float zoomxf, zoomyf;
/* Zoom and display the picture */
framemax = 4 * 360;
frameinc = 1;
for (framecount = 360; framecount < framemax; framecount += frameinc)
{
if ((framecount % 360) == 0)
frameinc++;
HandleEvent ();
ClearScreen (screen);
zoomxf = (float) framecount / (float) framemax;
zoomxf = 1.5 * zoomxf * zoomxf;
zoomyf = 0.5 + fabs (1.0 * sin ((double) framecount / 80.0));
if ((rotozoom_picture =
zoomSurface (picture, zoomxf, zoomyf, smooth)) != NULL)
{
dest.x = (screen->w - rotozoom_picture->w) / 2;;
dest.y = (screen->h - rotozoom_picture->h) / 2;
dest.w = rotozoom_picture->w;
dest.h = rotozoom_picture->h;
if (SDL_BlitSurface (rotozoom_picture, NULL, screen, &dest) < 0)
{
fprintf (stderr, "Blit failed: %s\n", SDL_GetError ());
break;
}
SDL_FreeSurface (rotozoom_picture);
}
/* Display by flipping screens */
SDL_UpdateRect (screen, 0, 0, 0, 0);
}
/* Pause for a sec */
SDL_Delay (1000);
}
void
Draw (SDL_Surface * screen)
{
SDL_Surface *picture, *picture_again;
char *bmpfile;
/* --------- 8 bit test -------- */
/* Message */
fprintf (stderr, "Loading 8bit image\n");
/* Load the image into a surface */
/*
bmpfile = "sample8.bmp";
fprintf (stderr, "Loading picture: %s\n", bmpfile);
picture = SDL_LoadBMP (bmpfile);
if (picture == NULL)
{
fprintf (stderr, "Couldn't load %s: %s\n", bmpfile, SDL_GetError ());
return;
}
fprintf (stderr, "rotozoom: Rotating and zooming\n");
RotatePicture (screen, picture, 1, SMOOTHING_OFF);
fprintf (stderr, "rotozoom: Just zooming (angle=0)\n");
RotatePicture (screen, picture, 0, SMOOTHING_OFF);
fprintf (stderr, "zoom: Just zooming\n");
ZoomPicture (screen, picture, SMOOTHING_OFF);
fprintf (stderr,
"rotozoom: Rotating and zooming, interpolation on but unused\n");
RotatePicture (screen, picture, 1, SMOOTHING_ON);
fprintf (stderr,
"rotozoom: Just zooming (angle=0), interpolation on but unused\n");
RotatePicture (screen, picture, 0, SMOOTHING_ON);
fprintf (stderr, "zoom: Just zooming, interpolation on but unused\n");
ZoomPicture (screen, picture, SMOOTHING_ON);
SDL_FreeSurface (picture);
*/
/* -------- 24 bit test --------- */
/* Message */
fprintf (stderr, "Loading 24bit image\n");
/* Load the image into a surface */
bmpfile = "sample24.bmp";
fprintf (stderr, "Loading picture: %s\n", bmpfile);
picture = SDL_LoadBMP (bmpfile);
if (picture == NULL)
{
fprintf (stderr, "Couldn't load %s: %s\n", bmpfile, SDL_GetError ());
return;
}
RotatePicture (screen, picture, 1, SMOOTHING_OFF);
/*
fprintf (stderr, "rotozoom: Rotating and zooming, no interpolation\n");
RotatePicture (screen, picture, 1, SMOOTHING_OFF);
fprintf (stderr, "rotozoom: Just zooming (angle=0), no interpolation\n");
RotatePicture (screen, picture, 0, SMOOTHING_OFF);
fprintf (stderr, "zoom: Just zooming, no interpolation\n");
ZoomPicture (screen, picture, SMOOTHING_OFF);
fprintf (stderr, "rotozoom: Rotating and zooming, with interpolation\n");
RotatePicture (screen, picture, 1, SMOOTHING_ON);
fprintf (stderr, "rotozoom: Just zooming (angle=0), with interpolation\n");
RotatePicture (screen, picture, 0, SMOOTHING_ON);
fprintf (stderr, "zoom: Just zooming, with interpolation\n");
ZoomPicture (screen, picture, SMOOTHING_ON);
fprintf (stderr, "Converting 24bit image into 32bit RGBA surface ...\n");
picture_again =
SDL_CreateRGBSurface (SDL_SWSURFACE, picture->w, picture->h, 32,
0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000);
SDL_BlitSurface (picture, NULL, picture_again, NULL);
fprintf (stderr, "Rotating and zooming, with interpolation\n");
RotatePicture (screen, picture_again, 1, SMOOTHING_ON);
fprintf (stderr, "Just zooming (angle=0), with interpolation\n");
RotatePicture (screen, picture_again, 0, SMOOTHING_ON);
SDL_FreeSurface (picture_again);
fprintf (stderr, "Converting 24bit image into 32bit ABGR surface ...\n");
picture_again =
SDL_CreateRGBSurface (SDL_SWSURFACE, picture->w, picture->h, 32,
0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000);
SDL_BlitSurface (picture, NULL, picture_again, NULL);
fprintf (stderr, "Rotating and zooming, with interpolation\n");
RotatePicture (screen, picture_again, 1, SMOOTHING_ON);
fprintf (stderr, "Just zooming (angle=0), with interpolation\n");
RotatePicture (screen, picture_again, 0, SMOOTHING_ON);
SDL_FreeSurface (picture_again);
/* Free the picture */
//SDL_FreeSurface (picture);
return;
}
#ifdef WIN32
extern char **__argv;
extern int __argc;
int APIENTRY
WinMain (HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
#else // non WIN32
int
main (int argc, char *argv[])
#endif
{
SDL_Surface *screen;
int w, h;
int desired_bpp;
Uint32 video_flags;
#ifdef WIN32
int argc;
char **argv;
argv = __argv;
argc = __argc;
#endif
/* Title */
fprintf (stderr, "SDL_rotozoom test\n");
/* Set default options and check command-line */
w = 640;
h = 480;
desired_bpp = 0;
video_flags = 0;
while (argc > 1)
{
if (strcmp (argv[1], "-width") == 0)
{
if (argv[2] && ((w = atoi (argv[2])) > 0))
{
argv += 2;
argc -= 2;
}
else
{
fprintf (stderr, "The -width option requires an argument\n");
exit (1);
}
}
else if (strcmp (argv[1], "-height") == 0)
{
if (argv[2] && ((h = atoi (argv[2])) > 0))
{
argv += 2;
argc -= 2;
}
else
{
fprintf (stderr, "The -height option requires an argument\n");
exit (1);
}
}
else if (strcmp (argv[1], "-bpp") == 0)
{
if (argv[2])
{
desired_bpp = atoi (argv[2]);
argv += 2;
argc -= 2;
}
else
{
fprintf (stderr, "The -bpp option requires an argument\n");
exit (1);
}
}
else if (strcmp (argv[1], "-warp") == 0)
{
video_flags |= SDL_HWPALETTE;
argv += 1;
argc -= 1;
}
else if (strcmp (argv[1], "-hw") == 0)
{
video_flags |= SDL_HWSURFACE;
argv += 1;
argc -= 1;
}
else if (strcmp (argv[1], "-fullscreen") == 0)
{
video_flags |= SDL_FULLSCREEN;
argv += 1;
argc -= 1;
}
else
break;
}
/* Force double buffering */
video_flags |= SDL_DOUBLEBUF;
/* Initialize SDL */
if (SDL_Init (SDL_INIT_VIDEO) < 0)
{
fprintf (stderr, "Couldn't initialize SDL: %s\n", SDL_GetError ());
exit (1);
}
atexit (SDL_Quit); /* Clean up on exit */
/* Initialize the display */
screen = SDL_SetVideoMode (w, h, desired_bpp, video_flags);
if (screen == NULL)
{
fprintf (stderr, "Couldn't set %dx%dx%d video mode: %s\n",
w, h, desired_bpp, SDL_GetError ());
exit (1);
}
/* Show some info */
printf ("Set %dx%dx%d mode\n",
screen->w, screen->h, screen->format->BitsPerPixel);
printf ("Video surface located in %s memory.\n",
(screen->flags & SDL_HWSURFACE) ? "video" : "system");
/* Check for double buffering */
if (screen->flags & SDL_DOUBLEBUF)
{
printf ("Double-buffering enabled - good!\n");
}
/* Set the window manager title bar */
SDL_WM_SetCaption ("SDL_rotozoom test", "rotozoom");
/* Do all the drawing work */
Draw (screen);
return (0);
}

View file

@ -1,9 +0,0 @@
Graphics.Dll
============
POR HACER:
- La instruccion MAP_BLOCK_COPY() que no tngo ni zorra idea xDD
- Reacer todo el FRAME ya q es un poco cutre con todo los contadores y timers esos x'D
- Cojer las variables de los procesos del STUB. ya que ahora las variables se cambian mediente lainstruccion SETPOS():

View file

@ -1,619 +0,0 @@
/*
* eDiv Compiler
* Copyleft (C) 2000-2002 Sion Entertainment
* http://www.sion-e.com
*
* 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 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
*/
/* EDIVSTD.DLL
* Esta librería contiene los datos más básicos que puede requerir un programa
* DIV, tal como las opciones de compilación, estructura reserved, etc.
*/
#include <stdio.h>
#include <export.h>
#include <SDL/SDL.h>
#include "main.h"
//#define _KEY2(a) CONST("a",a)
#define _KEY(a) CONST(#a,a)
#define _esc 1
#define _f1 59
#define _f2 60
#define _f3 61
#define _f4 62
#define _f5 63
#define _f6 64
#define _f7 65
#define _f8 66
#define _f9 67
#define _f10 68
#define _f11 87
#define _f12 88
#define _prn_scr 55 //Impr Pant
#define _scroll_lock 70 //Bloq Despl
#define _wave 41 // "º"
#define _1 2
#define _2 3
#define _3 4
#define _4 5
#define _5 6
#define _6 7
#define _7 8
#define _8 9
#define _9 10
#define _0 11
#define _minus 12 //?
#define _plus 13 //¿
#define _backspace 14
#define _tab 15
#define _q 16
#define _w 17
#define _e 18
#define _r 19
#define _t 20
#define _y 21
#define _u 22
#define _i 23
#define _o 24
#define _p 25
#define _l_brachet 26 //"`" "^"
#define _r_brachet 27 //"+" "*"
#define _enter 28
#define _caps_lock 58
#define _a 30
#define _s 31
#define _d 32
#define _f 33
#define _g 34
#define _h 35
#define _j 36
#define _k 37
#define _l 38
#define _semicolon 39 //Ñ
#define _apostrophe 40 //{
#define _backslash 43 //}
#define _l_shift 42
#define _z 44
#define _x 45
#define _c 46
#define _v 47
#define _b 48
#define _n 49
#define _m 50
#define _comma 51
#define _point 52
#define _slash 53 //"-" "_"
#define _r_shift 54
#define _control 29
#define _alt 56
#define _space 57
#define _ins 82
#define _home 71
#define _pgup 73
#define _del 83
#define _end 79
#define _pgdn 81
#define _up 72
#define _down 80
#define _left 75
#define _right 77
#define _num_lock 69
#define _c_backslash 90
#define _c_asterisk 91
#define _c_minus 92
#define _c_home 93
#define _c_up 94
#define _c_pgup 95
#define _c_left 96
#define _c_center 97
#define _c_right 98
#define _c_end 99
#define _c_down 100
#define _c_pgdn 101
#define _c_ins 102
#define _c_del 103
#define _c_plus 104
#define _c_enter 105
Uint8 *keys ;
Uint8 mbuttons;
int SDLtoDIV[1024] ;
int ExportaFuncs(EXPORTAFUNCS_PARAMS)
{
/*
CONST("_esc",_esc) ;
CONST("_f1",_f1) ;
CONST("_f2",_f1) ;
CONST("_f3",_f1) ;
CONST("_f4",_f1) ;
CONST("_f5",_f1) ;
CONST("_f6",_f1) ;
CONST("_f7",_f1) ;
CONST("_f8",_f1) ;
CONST("_f9",_f1) ;
CONST("_f10",_f1) ;
CONST("_f11"_f1) ;
CONST("_f12",_f12) ;
*/
_KEY(_esc) ;
_KEY(_f1) ;
_KEY(_f2) ;
_KEY(_f3) ;
_KEY(_f4) ;
_KEY(_f5) ;
_KEY(_f6) ;
_KEY(_f7) ;
_KEY(_f8) ;
_KEY(_f9) ;
_KEY(_f10) ;
_KEY(_f11) ;
_KEY(_f12) ;
_KEY(_prn_scr ) ;
_KEY(_scroll_lock ) ;
_KEY(_wave) ;
_KEY(_1) ;
_KEY(_2) ;
_KEY(_3) ;
_KEY(_4) ;
_KEY(_5) ;
_KEY(_6) ;
_KEY(_7) ;
_KEY(_8) ;
_KEY(_9) ;
_KEY(_0) ;
_KEY(_minus) ;
_KEY(_plus) ;
_KEY(_backspace) ;
_KEY(_tab) ;
_KEY(_q) ;
_KEY(_w) ;
_KEY(_e) ;
_KEY(_r) ;
_KEY(_t) ;
_KEY(_y) ;
_KEY(_u) ;
_KEY(_i) ;
_KEY(_o) ;
_KEY(_p) ;
_KEY(_l_brachet) ;
_KEY(_r_brachet) ;
_KEY(_enter) ;
_KEY(_caps_lock ) ;
_KEY(_a) ;
_KEY(_s) ;
_KEY(_d) ;
_KEY(_f) ;
_KEY(_g) ;
_KEY(_h) ;
_KEY(_j) ;
_KEY(_k) ;
_KEY(_l) ;
_KEY(_semicolon) ;
_KEY(_apostrophe) ;
_KEY(_backslash) ;
_KEY(_l_shift) ;
_KEY(_z) ;
_KEY(_x) ;
_KEY(_c) ;
_KEY(_v) ;
_KEY(_b) ;
_KEY(_n) ;
_KEY(_m) ;
_KEY(_comma) ;
_KEY(_point) ;
_KEY(_slash) ;
_KEY(_r_shift) ;
_KEY(_control) ;
_KEY(_alt) ;
_KEY(_space) ;
_KEY(_ins) ;
_KEY(_home) ;
_KEY(_pgup) ;
_KEY(_del) ;
_KEY(_end) ;
_KEY(_pgdn) ;
_KEY(_up) ;
_KEY(_down) ;
_KEY(_left) ;
_KEY(_right) ;
_KEY(_num_lock) ;
_KEY(_c_backslash) ;
_KEY(_c_asterisk) ;
_KEY(_c_minus) ;
_KEY(_c_plus) ;
_KEY(_c_enter) ;
_KEY(_c_home) ;
_KEY(_c_pgup) ;
_KEY(_c_end) ;
_KEY(_c_pgdn) ;
_KEY(_c_up) ;
_KEY(_c_down) ;
_KEY(_c_left) ;
_KEY(_c_right) ;
_KEY(_c_center) ;
_KEY(_c_ins) ;
_KEY(_c_del) ;
FUNCTION("key",1,eDiv_Key) ;
GLOBAL_STRUCT("mouse",0);
_INT("x",0); /* Coordenada x */
_INT("y",0); /* Coordenada y */
_INT("graph",0); /* Gráfico */
_INT("file",0); /* FPG */
_INT("z",-512); /* Profundidad (TODO) */
_INT("angle",0); /* Ángulo (TODO) */
_INT("size",100); /* Tamaño (TODO) */
_INT("flags",0); /* Banderas (TODO) */
_INT("region",0); /* Región (TODO) */
_INT("left",0); /* Botón izquierdo */
_INT("middle",0); /* Botón central o de ruedecilla */
_INT("right",0); /* Botón derecho */
_INT("wheelup",0); /* Ruedecilla arriba (NUEVO) */
_INT("wheeldown",0); /* Ruedecilla abajo (NUEVO) */
_INT("cursor",0); /* Emulación con teclas de cursor (TODO) */
_INT("speed",0); /* Velocidad del ratón (TODO) */
_INT("transparency",0); /* Transparencia (NUEVO) (TODO) */
END_STRUCT;
ENTRYPOINT(first_load) ;
ENTRYPOINT(frame) ;
return TRUE;
}
int eDiv_Key(FUNCTION_PARAMS)
{
//FILE *fichero ;
int a ;
//fichero = fopen("input.txt" , "a+" ) ;
a = getparm() ;
//fprintf( fichero , "key: %i , keys[30]: %i \n" , a , keys[30] ) ;
//fclose( fichero ) ;
if ( a == _control )
if ( keys[ SDLK_RCTRL ] )
return 1 ;
if ( a == _alt )
if ( keys[ SDLK_RALT ] )
return 1 ;
return keys[ SDLtoDIV[a] ] ;
}
//*************************** ENTRYPOINTS **********************************************
void first_load(FUNCTION_PARAMS)
{
int i ;
SDL_Init( SDL_INIT_EVENTTHREAD ) ;
for ( i = 0 ; i < 1024 ; i++ )
{
SDLtoDIV[ i ] = 0 ;
}
/*
SDLtoDIV[ SDLK_ESCAPE ] = _esc ;
SDLtoDIV[ SDLK_1 ] = _1 ;
SDLtoDIV[ SDLK_2 ] = _2 ;
SDLtoDIV[ SDLK_3 ] = _3 ;
SDLtoDIV[ SDLK_4 ] = _4 ;
SDLtoDIV[ SDLK_5 ] = _5 ;
SDLtoDIV[ SDLK_6 ] = _6 ;
SDLtoDIV[ SDLK_7 ] = _7 ;
SDLtoDIV[ SDLK_8 ] = _8 ;
SDLtoDIV[ SDLK_9 ] = _9 ;
SDLtoDIV[ SDLK_0 ] = _0 ;
SDLtoDIV[ SDLK_MINUS ] = _minus ;
SDLtoDIV[ SDLK_EQUALS ] = _plus ;
SDLtoDIV[ SDLK_BACKSPACE ] = _backspace ;
SDLtoDIV[ SDLK_TAB ] = _tab ;
SDLtoDIV[ SDLK_p ] = _p ;
SDLtoDIV[ SDLK_w ] = _w ;
SDLtoDIV[ SDLK_e ] = _e ;
SDLtoDIV[ SDLK_r ] = _r ;
SDLtoDIV[ SDLK_t ] = _t ;
SDLtoDIV[ SDLK_y ] = _y ;
SDLtoDIV[ SDLK_u ] = _u ;
SDLtoDIV[ SDLK_i ] = _i ;
SDLtoDIV[ SDLK_o ] = _o ;
SDLtoDIV[ SDLK_p ] = _p ;
SDLtoDIV[ SDLK_LEFTBRACKET ] = _l_brachet ;
SDLtoDIV[ SDLK_RIGHTBRACKET ] = _r_brachet ;
SDLtoDIV[ SDLK_RETURN ] = _enter ;
SDLtoDIV[ SDLK_LCTRL ] = _control ;
SDLtoDIV[ SDLK_RCTRL ] = _control ;
SDLtoDIV[ SDLK_a ] = _a ;
SDLtoDIV[ SDLK_s ] = _s ;
SDLtoDIV[ SDLK_d ] = _d ;
SDLtoDIV[ SDLK_f ] = _f ;
SDLtoDIV[ SDLK_g ] = _g ;
SDLtoDIV[ SDLK_h ] = _h ;
SDLtoDIV[ SDLK_j ] = _j ;
SDLtoDIV[ SDLK_k ] = _k ;
SDLtoDIV[ SDLK_l ] = _l ;
SDLtoDIV[ SDLK_SEMICOLON ] = _semicolon ;
SDLtoDIV[ SDLK_QUOTE ] = _apostrophe ;
SDLtoDIV[ SDLK_BACKQUOTE ] = _wave ;
SDLtoDIV[ SDLK_LSHIFT ] = _l_shift ;
SDLtoDIV[ SDLK_BACKSLASH ] = _backslash ;
SDLtoDIV[ SDLK_z ] = _z ;
SDLtoDIV[ SDLK_x ] = _x ;
SDLtoDIV[ SDLK_c ] = _c ;
SDLtoDIV[ SDLK_v ] = _v ;
SDLtoDIV[ SDLK_b ] = _b ;
SDLtoDIV[ SDLK_n ] = _n ;
SDLtoDIV[ SDLK_m ] = _m ;
SDLtoDIV[ SDLK_COMMA ] = _comma ;
SDLtoDIV[ SDLK_PERIOD ] = _point ;
SDLtoDIV[ SDLK_SLASH ] = _slash ;
SDLtoDIV[ SDLK_RSHIFT ] = _r_shift ;
SDLtoDIV[ SDLK_SYSREQ ] = _prn_scr ;
SDLtoDIV[ SDLK_LALT ] = _alt ;
SDLtoDIV[ SDLK_RALT ] = _alt ;
SDLtoDIV[ SDLK_SPACE ] = _space ;
SDLtoDIV[ SDLK_CAPSLOCK ] = _caps_lock ;
SDLtoDIV[ SDLK_F1 ] = _f1 ;
SDLtoDIV[ SDLK_F2 ] = _f2 ;
SDLtoDIV[ SDLK_F3 ] = _f3 ;
SDLtoDIV[ SDLK_F4 ] = _f4 ;
SDLtoDIV[ SDLK_F5 ] = _f5 ;
SDLtoDIV[ SDLK_F6 ] = _f6 ;
SDLtoDIV[ SDLK_F7 ] = _f7 ;
SDLtoDIV[ SDLK_F8 ] = _f8 ;
SDLtoDIV[ SDLK_F9 ] = _f9 ;
SDLtoDIV[ SDLK_F10 ] = _f10 ;
SDLtoDIV[ SDLK_F11 ] = _f11 ;
SDLtoDIV[ SDLK_F12 ] = _f12 ;
SDLtoDIV[ SDLK_NUMLOCK ] = _num_lock ;
SDLtoDIV[ SDLK_SCROLLOCK ] = _scroll_lock ;
SDLtoDIV[ SDLK_HOME ] = _home ;
SDLtoDIV[ SDLK_UP ] = _up ;
SDLtoDIV[ SDLK_PAGEUP ] = _pgup ;
SDLtoDIV[ SDLK_END ] = _end ;
SDLtoDIV[ SDLK_DOWN ] = _down ;
SDLtoDIV[ SDLK_PAGEDOWN ] = _pgdn ;
SDLtoDIV[ SDLK_INSERT ] = _ins ;
SDLtoDIV[ SDLK_KP_PERIOD ] = _c_del ;
SDLtoDIV[ SDLK_KP_DIVIDE ] = _c_backslash ;
SDLtoDIV[ SDLK_KP_MULTIPLY ] = _c_asterisk ;
SDLtoDIV[ SDLK_KP_MINUS ] = _c_minus ;
SDLtoDIV[ SDLK_KP_PLUS ] = _c_plus ;
SDLtoDIV[ SDLK_KP_ENTER ] = _c_enter ;
SDLtoDIV[ SDLK_KP0 ] = _c_ins ;
SDLtoDIV[ SDLK_KP1 ] = _c_end ;
SDLtoDIV[ SDLK_KP2 ] = _c_down ;
SDLtoDIV[ SDLK_KP3 ] = _c_pgdn ;
SDLtoDIV[ SDLK_KP4 ] = _c_left ;
SDLtoDIV[ SDLK_KP5 ] = _c_center ;
SDLtoDIV[ SDLK_KP6 ] = _c_right ;
SDLtoDIV[ SDLK_KP7 ] = _c_home ;
SDLtoDIV[ SDLK_KP8 ] = _c_up ;
SDLtoDIV[ SDLK_KP9 ] = _c_pgup ;
*/
SDLtoDIV[ _esc ] = SDLK_ESCAPE ;
SDLtoDIV[ _1 ] = SDLK_1 ;
SDLtoDIV[ _2 ] = SDLK_2 ;
SDLtoDIV[ _3 ] = SDLK_3 ;
SDLtoDIV[ _4 ] = SDLK_4 ;
SDLtoDIV[ _5 ] = SDLK_5 ;
SDLtoDIV[ _6 ] = SDLK_6 ;
SDLtoDIV[ _7 ] = SDLK_7 ;
SDLtoDIV[ _8 ] = SDLK_8 ;
SDLtoDIV[ _9 ] = SDLK_9 ;
SDLtoDIV[ _0 ] = SDLK_0 ;
SDLtoDIV[ _minus ] = SDLK_MINUS ;
SDLtoDIV[ _plus ] =SDLK_EQUALS ;
SDLtoDIV[ _backspace ] =SDLK_BACKSPACE ;
SDLtoDIV[ _tab ] =SDLK_TAB ;
SDLtoDIV[ _p ] =SDLK_p ;
SDLtoDIV[ _w ] =SDLK_w ;
SDLtoDIV[ _e ] =SDLK_e ;
SDLtoDIV[ _r ] =SDLK_r ;
SDLtoDIV[ _t ] =SDLK_t ;
SDLtoDIV[ _y ] =SDLK_y ;
SDLtoDIV[ _u ] =SDLK_u ;
SDLtoDIV[ _i ] =SDLK_i ;
SDLtoDIV[ _o ] =SDLK_o ;
SDLtoDIV[ _p ] =SDLK_p ;
SDLtoDIV[ _l_brachet ] =SDLK_LEFTBRACKET ;
SDLtoDIV[ _r_brachet ] =SDLK_RIGHTBRACKET ;
SDLtoDIV[ _enter ] =SDLK_RETURN ;
SDLtoDIV[ _control ] =SDLK_LCTRL ;
//SDLtoDIV[ _control ] =SDLK_RCTRL ;
SDLtoDIV[ _a ] =SDLK_a ;
SDLtoDIV[ _s ] =SDLK_s ;
SDLtoDIV[ _d ] =SDLK_d ;
SDLtoDIV[ _f ] =SDLK_f ;
SDLtoDIV[ _g ] =SDLK_g ;
SDLtoDIV[ _h ] =SDLK_h ;
SDLtoDIV[ _j ] =SDLK_j ;
SDLtoDIV[ _k ] =SDLK_k ;
SDLtoDIV[ _l ] =SDLK_l ;
SDLtoDIV[ _semicolon ] =SDLK_SEMICOLON ;
SDLtoDIV[ _apostrophe ] =SDLK_QUOTE ;
SDLtoDIV[ _wave ] =SDLK_BACKQUOTE ;
SDLtoDIV[ _l_shift ] =SDLK_LSHIFT ;
SDLtoDIV[ _backslash ] =SDLK_BACKSLASH ;
SDLtoDIV[ _z ] =SDLK_z ;
SDLtoDIV[ _x ] =SDLK_x ;
SDLtoDIV[ _c ] =SDLK_c ;
SDLtoDIV[ _v ] =SDLK_v ;
SDLtoDIV[ _b ] =SDLK_b ;
SDLtoDIV[ _n ] =SDLK_n ;
SDLtoDIV[ _m ] =SDLK_m ;
SDLtoDIV[ _comma ] =SDLK_COMMA ;
SDLtoDIV[ _point ] =SDLK_PERIOD ;
SDLtoDIV[ _slash ] =SDLK_SLASH ;
SDLtoDIV[ _r_shift ] =SDLK_RSHIFT ;
SDLtoDIV[ _prn_scr ] =SDLK_SYSREQ ;
SDLtoDIV[ _alt ] =SDLK_LALT ;
//SDLtoDIV[ _alt ] =SDLK_RALT ;
SDLtoDIV[ _space ] =SDLK_SPACE ;
SDLtoDIV[ _caps_lock ] =SDLK_CAPSLOCK ;
SDLtoDIV[ _f1 ] =SDLK_F1 ;
SDLtoDIV[ _f2 ] =SDLK_F2 ;
SDLtoDIV[ _f3 ] =SDLK_F3 ;
SDLtoDIV[ _f4 ] =SDLK_F4 ;
SDLtoDIV[ _f5 ] =SDLK_F5 ;
SDLtoDIV[ _f6 ] =SDLK_F6 ;
SDLtoDIV[ _f7 ] =SDLK_F7 ;
SDLtoDIV[ _f8 ] =SDLK_F8 ;
SDLtoDIV[ _f9 ] =SDLK_F9 ;
SDLtoDIV[ _f10 ] =SDLK_F10 ;
SDLtoDIV[ _f11 ] =SDLK_F11 ;
SDLtoDIV[ _f12 ] =SDLK_F12 ;
SDLtoDIV[ _num_lock ] =SDLK_NUMLOCK ;
SDLtoDIV[ _scroll_lock ] =SDLK_SCROLLOCK ;
SDLtoDIV[ _home ] =SDLK_HOME ;
SDLtoDIV[ _up ] =SDLK_UP ;
SDLtoDIV[ _pgup ] =SDLK_PAGEUP ;
SDLtoDIV[ _end ] =SDLK_END ;
SDLtoDIV[ _down ] =SDLK_DOWN ;
SDLtoDIV[ _left ] =SDLK_LEFT ;
SDLtoDIV[ _right ] =SDLK_RIGHT ;
SDLtoDIV[ _pgdn ] =SDLK_PAGEDOWN ;
SDLtoDIV[ _ins ] =SDLK_INSERT ;
SDLtoDIV[ _c_del ] =SDLK_KP_PERIOD ;
SDLtoDIV[ _c_backslash ] =SDLK_KP_DIVIDE ;
SDLtoDIV[ _c_asterisk ] =SDLK_KP_MULTIPLY ;
SDLtoDIV[ _c_minus ] =SDLK_KP_MINUS ;
SDLtoDIV[ _c_plus ] =SDLK_KP_PLUS ;
SDLtoDIV[ _c_enter ] =SDLK_KP_ENTER ;
SDLtoDIV[ _c_ins ] =SDLK_KP0 ;
SDLtoDIV[ _c_end ] =SDLK_KP1 ;
SDLtoDIV[ _c_down ] =SDLK_KP2 ;
SDLtoDIV[ _c_pgdn ] =SDLK_KP3 ;
SDLtoDIV[ _c_left ] =SDLK_KP4 ;
SDLtoDIV[ _c_center ] =SDLK_KP5 ;
SDLtoDIV[ _c_right ] =SDLK_KP6 ;
SDLtoDIV[ _c_home ] =SDLK_KP7 ;
SDLtoDIV[ _c_up ] =SDLK_KP8 ;
SDLtoDIV[ _c_pgup ] =SDLK_KP9 ;
}
void frame(FUNCTION_PARAMS)
{
int numkeys ;
int _mouse=globalptr("mouse");
SDL_Rect srcrect,dstrect;
SDL_Surface* mapamouse;
SDL_PumpEvents();
keys = SDL_GetKeyState(&numkeys ) ;
/* MOUSE */
mbuttons = SDL_GetMouseState(&fp->mem[_mouse],&fp->mem[_mouse+1]);
/* Ponemos los 5 botones a 0 */
memset(&fp->mem[_mouse+9],0,5*4);
if(mbuttons&SDL_BUTTON(1))
fp->mem[_mouse+9]=1;
if(mbuttons&SDL_BUTTON(2))
fp->mem[_mouse+10]=1;
if(mbuttons&SDL_BUTTON(3))
fp->mem[_mouse+11]=1;
if(mbuttons&SDL_BUTTON(4)) /* podria no funcionar ¿necesario sdl_event? */
fp->mem[_mouse+12]=1;
if(mbuttons&SDL_BUTTON(5)) /* podria no funcionar ¿necesario sdl_event? */
fp->mem[_mouse+13]=1;
/* si mouse.graph!=0 */
if(fp->mem[_mouse+2]!=0) {
mapamouse=fp->files[fp->mem[_mouse+3]].mapa[fp->mem[_mouse+2]].Surface;
srcrect.x=0;
srcrect.y=0;
srcrect.w=mapamouse->w;
srcrect.h=mapamouse->h;
dstrect.x=fp->mem[_mouse]-fp->files[fp->mem[_mouse+3]].mapa[fp->mem[_mouse+2]].cpoint[0].x;
dstrect.y=fp->mem[_mouse+1]-fp->files[fp->mem[_mouse+3]].mapa[fp->mem[_mouse+2]].cpoint[0].y;
dstrect.w=mapamouse->w;
dstrect.h=mapamouse->h;
// TODO: añadir chequeo de error si no existe file o mapa
fp->Dibuja(mapamouse,srcrect,dstrect,fp->mem[_mouse+4],255,0,0);
}
/* FIN DE MOUSE */
//FILE* fichero ;
//fichero = fopen( "input.txt" , "w+" ) ;
//for ( i = 0 ; i < 256 ; i++ )
// keys[i] = 0 ;
/*
for ( i = 0 ; i < 256 ; i++ )
{
if ( event[i].type == SDL_KEYDOWN )
{
keys[ SDLtoDIV[ event[i].key.keysym.sym ] ] = 1 ;
}
if ( event[i].type == SDL_KEYUP )
{
keys[ SDLtoDIV[ event[i].key.keysym.sym ] ] = 0 ;
}
}*/
/*
while(SDL_PollEvent(&tecla))
{
if(tecla.type == SDL_KEYDOWN)
{
if (
keys[tecla.key.keysym.sym] = 1 ;
//i=(int)tecla.key.keysym.sym;
}
}
*/
/* for ( i = 0 ; i < 256 ; i++ )
{
fprintf( fichero , "%i " , keys[i] ) ;
}
fprintf( fichero , "\n" ) ;
*/
//fclose( fichero ) ;
}
//**************************** FUNCIONES INTERNAS DE LA DLL ***************************

View file

@ -1,3 +0,0 @@
LIBRARY edivstd
EXPORTS
ExportaFuncs

View file

@ -1,29 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "math", "input.vcproj", "{6994F9CD-63ED-425D-879C-678D1706F4AE}"
EndProject
Global
GlobalSection(SourceCodeControl) = preSolution
SccNumberOfProjects = 1
SccProjectUniqueName0 = input.vcproj
SccProjectName0 = \u0022$/dlls\u0022,\u0020YCAAAAAA
SccLocalPath0 = ..\\..
SccProvider0 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
SccProjectFilePathRelativizedFromConnection0 = dlls\\input\\
EndGlobalSection
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.ActiveCfg = Debug|Win32
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Debug.Build.0 = Debug|Win32
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.ActiveCfg = Release|Win32
{6994F9CD-63ED-425D-879C-678D1706F4AE}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Binary file not shown.

View file

@ -1,164 +0,0 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="input"
ProjectGUID="{6994F9CD-63ED-425D-879C-678D1706F4AE}"
SccProjectName=""
SccAuxPath=""
SccLocalPath=""
SccProvider="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/edivstd.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="sdlmain.lib sdl.lib"
OutputFile="..\..\..\bin\dll\input.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\input.def"
ProgramDatabaseFile=".\Release/edivstd.pdb"
ImportLibrary=".\Release/edivstd.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/edivstd.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/input.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="sdlmain.lib sdl.lib"
OutputFile="..\..\..\bin\dll\input.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\input.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/input.pdb"
ImportLibrary=".\Debug/input.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/edivstd.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="input.c">
</File>
<File
RelativePath="input.def">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\export.h">
</File>
<File
RelativePath="main.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -1,6 +0,0 @@
int eDiv_Key(FUNCTION_PARAMS) ;

View file

@ -1,115 +0,0 @@
#include <SDL/SDL.h>
#include <export.h>
//#include "../../shared/varindex.h"
#include "scroll.h"
struct
{
int existe ;
int file, graph ;
int x0 , y0 , x1 , y1 ;
int z ;
int camera ;
int ratio ;
int speed ;
int region1 , region2 ;
}scrolls[10] ;
int ExportaFuncs(EXPORTAFUNCS_PARAMS)
{
GLOBAL_STRUCT("scroll",9);
_INT("x0",0);
_INT("y0",0);
_INT("x1",0);
_INT("y1",0);
_INT("z",0);
_INT("camera",0);
_INT("ratio",0);
_INT("speed",0);
_INT("region1",0);
_INT("region2",0);
END_STRUCT;
FUNCTION("start_scroll",6,eDiv_StartScroll) ;
ENTRYPOINT( frame ) ;
return TRUE ;
}
FILE * fichero ;
int eDiv_StartScroll(FUNCTION_PARAMS)
{
int num , f , g1 , g2 , r , b ;
b = getparm() ;
r = getparm() ;
g2 = getparm() ;
g1 = getparm() ;
f = getparm() ;
num = getparm() ;
if ( scrolls[num].existe )
return -1 ;
scrolls[num].existe = 1 ;
/*
fichero = fopen("scroll.txt" , "w+" ) ;
fprintf(fichero , "glo_scroll: %d" , varindex[_glo_scroll] ) ;
fclose(fichero) ;*/
/*
fp->mem[ varindex[_glo_scroll] + 0 ] = 0 ;
fp->mem[ varindex[_glo_scroll] + 1 ] = 0 ;
fp->mem[ varindex[_glo_scroll] + 2 ] = 0 ;
fp->mem[ varindex[_glo_scroll] + 3 ] = 0 ;
fp->mem[ varindex[_glo_scroll] + 4 ] = 512 ;
fp->mem[ varindex[_glo_scroll] + 0 ] = 0 ;
fp->mem[ varindex[_glo_scroll] + 0 ] = b ;
fp->mem[ varindex[_glo_scroll] + 0 ] = 0 ;
fp->mem[ varindex[_glo_scroll] + 0 ] = r ;
fp->mem[ varindex[_glo_scroll] + 0 ] = r ;
*/
return 1 ;
}
//============== Entrypoints =====================================================
void frame(FUNCTION_PARAMS)
{
/*
* de momento solo hay esta demostracion de que fp->Dibuja funciona xDD
* falta hacer los scrolls :P
*/
/*
SDL_Rect srcrect, dstrect ;
if ( fp->existe.dibuja )
{
if ( fp->files[0].existe )
{
if ( fp->files[0].mapa[1000].existe )
{
srcrect.x = 0 ;
srcrect.y = 0 ;
srcrect.w = fp->files[0].mapa[1000].Surface->w ;
srcrect.h = fp->files[0].mapa[1000].Surface->h ;
fp->Dibuja( fp->files[0].mapa[1000].Surface , srcrect , srcrect , 0 , 128 ) ;
}
}
}
*/
}

View file

@ -1,3 +0,0 @@
LIBRARY scroll
EXPORTS
ExportaFuncs

View file

@ -1,3 +0,0 @@
int eDiv_StartScroll(FUNCTION_PARAMS) ;

View file

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scroll", "scroll.vcproj", "{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.ActiveCfg = Debug|Win32
{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.Build.0 = Debug|Win32
{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.ActiveCfg = Release|Win32
{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Binary file not shown.

View file

@ -1,134 +0,0 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="scroll"
ProjectGUID="{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SCROLL_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="..\..\..\bin\dll\scroll.dll"
LinkIncremental="2"
ModuleDefinitionFile="./scroll.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/scroll.pdb"
SubSystem="2"
ImportLibrary="$(OutDir)/scroll.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OmitFramePointers="TRUE"
AdditionalIncludeDirectories="..;..\..\shared"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SCROLL_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="..\..\..\bin\dll\scroll.dll"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/scroll.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
<File
RelativePath="scroll.c">
</File>
<File
RelativePath="scroll.def">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc">
<File
RelativePath="..\export.h">
</File>
<File
RelativePath="scroll.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -1,95 +0,0 @@
#include <memory.h>
#include "conv.h"
/* Tabla de conversión de caracteres MS-DOS a Windows */
int dos_chars=0;
byte dos_to_win[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197,
201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163, 216, 215, 131,
225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187,
166, 166, 166, 166, 166, 193, 194, 192, 169, 166, 166, 43, 43, 162, 165, 43,
43, 45, 45, 43, 45, 43, 227, 195, 43, 43, 45, 45, 166, 45, 43, 164,
240, 208, 202, 203, 200, 105, 205, 206, 207, 43, 43, 166, 95, 166, 204, 175,
211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180,
173, 177, 61, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 166, 160
};
/* Tabla de conversión de caracteres Windows a MS-DOS */
byte win_to_dos[256] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
128, 129, 130, 159, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
255, 173, 189, 156, 207, 190, 254, 245, 249, 184, 166, 174, 170, 240, 169, 238,
248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168,
183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216,
209, 165, 227, 224, 226, 229, 153, 158, 157, 235, 233, 234, 154, 237, 232, 225,
133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139,
208, 164, 149, 162, 147, 228, 148, 246, 155, 151, 163, 150, 129, 236, 231, 152
};
byte lower[256];
byte upper[256];
byte c_convert (byte c)
{
return dos_chars ? c : win_to_dos[c];
}
void set_c_lower (const byte * from, const byte * to)
{
if (dos_chars)
while (*from) lower[win_to_dos[*from++]] = win_to_dos[*to++] ;
else
while (*from) lower[*from++] = *to++ ;
}
void set_c_upper (const byte * from, const byte * to)
{
if (dos_chars)
while (*from) upper[win_to_dos[*from++]] = win_to_dos[*to++] ;
else
while (*from) upper[*from++] = *to++ ;
}
void inicializa_lower()
{
memset (lower, 0, 256); // es necesario
set_c_lower ("ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz");
set_c_lower ("abcdefghijklmnopqrstuvwxyz","abcdefghijklmnopqrstuvwxyz");
set_c_lower ("ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ","áéíóúñçàèìòùäëïöüýâêîôûæãåõ");
set_c_lower("áéíóúñçàèìòùäëïöüýâêîôûæãåõ","áéíóúñçàèìòùäëïöüýâêîôûæãåõ");
set_c_lower("1234567890#$_ºª","1234567890#$_ºª");
}
void inicializa_upper()
{
memset (upper, 0, 256); // es necesario
set_c_upper ("abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ");
set_c_upper ("ABCDEFGHIJKLMNOPQRSTUVWXYZ","ABCDEFGHIJKLMNOPQRSTUVWXYZ");
set_c_upper ("áéíóúñçàèìòùäëïöüýâêîôûæãåõ","ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ");
set_c_upper("ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ","ÁÉÍÓÚÑÇÀÈÌÒÙÄËÏÖÜÝÂÊÎÔÛÆÃÅÕ");
set_c_upper("1234567890#$_ºª","1234567890#$_ºª");
}

View file

@ -1,15 +0,0 @@
#define byte unsigned char
byte dos_to_win[256];
byte win_to_dos[256];
byte lower[256];
byte upper[256];
byte c_convert(byte c);
void set_c_lower (const byte *from, const byte *to);
void inicializa_lower();
void set_c_upper (const byte *from, const byte *to);
void inicializa_upper();

View file

@ -1,3 +0,0 @@
LIBRARY strings
EXPORTS
ExportaFuncs

View file

@ -1,243 +0,0 @@
#include <stdio.h>
#include <ctype.h>
#include <export.h> // eDiv ToolKit ;)
#include "conv.h" // Conversiones
/************************/
/* char() * */
/* lower() * HECHA */
/* strcat() * HECHA */
/* strchr() * HECHA */
/* strcmp() * HECHA */
/* strcpy() * HECHA */
/* strdel() * */
/* strlen() * HECHA */
/* strset() * HECHA */
/* strstr() * HECHA */
/* upper() * HECHA */
/* calculate() * HECHA */
/* fcalculate() * HECHA */
/* itoa() * */
/* asc() * */ // [<CicTec> text=ASC(65); // test="A";] (Una peticion suya :).
/* ftoa() * */ // Para los nuevos FLOAT :)
/************************/
// Rutinas eDiv! :)
char *DIV_strcpy(FUNCTION_PARAMS);
size_t DIV_strlen(FUNCTION_PARAMS);
int DIV_strcmp(FUNCTION_PARAMS);
char *DIV_strchr(FUNCTION_PARAMS);
char *DIV_strcat(FUNCTION_PARAMS);
char *DIV_strstr(FUNCTION_PARAMS);
int DIV_atoi(FUNCTION_PARAMS);
float DIV_atof(FUNCTION_PARAMS);
char *DIV_lower(FUNCTION_PARAMS);
char *DIV_upper(FUNCTION_PARAMS);
char *DIV_strset(FUNCTION_PARAMS);
char *DIV_itoa(FUNCTION_PARAMS);
// Rutinas internas
static int hexval(char c);
// Variables
byte i_lower=0; // lower ya esta inicializado?
byte i_upper=0; // upper ya esta inicializado?
int ExportaFuncs(EXPORTAFUNCS_PARAMS)
{
FUNCTION("strcpy",2,DIV_strcpy);
FUNCTION("strlen",1,DIV_strlen);
FUNCTION("strcmp",2,DIV_strcmp);
FUNCTION("strchr",2,DIV_strchr);
FUNCTION("strcat",2,DIV_strcat);
FUNCTION("strstr",2,DIV_strstr);
FUNCTION("strset",2,DIV_strset);
// Estas dos son iguales, lo sengundo es por una standarizacion :)
FUNCTION("calculate",1,DIV_atoi);
FUNCTION("atoi",1,DIV_atoi);
// Idem a lo anterior, pero para los datos float :)
FUNCTION("fcalculate",1,DIV_atof);
FUNCTION("atof",1,DIV_atof);
FUNCTION("lower",1,DIV_lower);
FUNCTION("upper",1,DIV_upper);
return TRUE;
}
char *DIV_strcpy(FUNCTION_PARAMS)
{
char *src=(char *)getparm();
char *dest=(char *)getparm();
char *tmp = dest;
while ((*dest++ = *src++) != '\0');
return tmp;
}
size_t DIV_strlen(FUNCTION_PARAMS)
{
char *s = (char *)getparm();
const char *sc;
for(sc = s; *sc != '\0'; ++sc);
return sc - s;
}
char *DIV_strset(FUNCTION_PARAMS)
{
int valor=getparm();
char *cadena=(char *)getparm();
char *inicio=cadena;
while (*cadena)
*cadena++ = (char)valor;
return inicio;
}
int DIV_strcmp(FUNCTION_PARAMS)
{
const char *ct = (const char *)getparm();
const char *cs = (const char *)getparm();
signed char __res;
while (1) {
if ((__res = *cs - *ct++) != 0 || !*cs++)
break;
}
return __res;
}
char *DIV_strchr(FUNCTION_PARAMS)
{
int c = getparm();
const char *s = (const char *)getparm();
for(; *s != (char) c; ++s)
if (*s == '\0')
return NULL;
return (char *) s;
}
char *DIV_strcat(FUNCTION_PARAMS)
{
const char *src = (const char *)getparm();
char *dest = (char *)getparm();
char *tmp = dest;
while(*dest)
dest++;
while((*dest++ = *src++) != '\0')
;
return tmp;
}
char *DIV_strstr(FUNCTION_PARAMS)
{
const char *s2 = (const char*)getparm();
const char *s1 = (const char*)getparm();
int l1, l2;
l2 = strlen(s2);
if (!l2)
return (char *)s1;
l1 = strlen(s1);
while(l1 >= l2) {
l1--;
if (!memcmp(s1,s2,l2))
return (char *)s1;
s1++;
}
return NULL;
}
int DIV_atoi(FUNCTION_PARAMS)
{
const char *num = (const char*)getparm();
int value = 0;
if (num[0] == '0' && num[1] == 'x') {
// hexadecimal
num += 2;
while (*num && isxdigit(*num))
value = value * 16 + hexval(*num++);
} else {
// decimal
while (*num && isdigit(*num))
value = value * 10 + *num++ - '0';
}
return value;
}
float DIV_atof(FUNCTION_PARAMS)
{
const char *num = (const char*)getparm();
float value = 0;
if (num[0] == '0' && num[1] == 'x') {
// hexadecimal
num += 2;
while (*num && isxdigit(*num))
value = value * 16 + hexval(*num++);
} else {
// decimal
while (*num && isdigit(*num))
value = value * 10 + *num++ - '0';
}
return value;
}
char *DIV_lower(FUNCTION_PARAMS)
{
int i;
char *str=(char*)getparm();
if (!i_lower)
inicializa_lower();
for (i=0;str[i]!=0;i++) {
if (lower[str[i]]!=0) str[i]=lower[str[i]];
}
return str;
}
char *DIV_upper(FUNCTION_PARAMS)
{
int i;
char *str=(char*)getparm();
if (!i_upper)
inicializa_upper();
for (i=0;str[i]!=0;i++) {
if (upper[str[i]]!=0) str[i]=upper[str[i]];
}
return str;
}
// Rutinas internas
static int hexval(char c)
{
if (c >= '0' && c <= '9')
return c - '0';
else if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
else if (c >= 'A' && c <= 'F')
return c - 'A' + 10;
return 0;
}

View file

@ -1,119 +0,0 @@
# Microsoft Developer Studio Project File - Name="strings" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=strings - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "strings.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "strings.mak" CFG="strings - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "strings - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "strings - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "strings - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc0a /d "NDEBUG"
# ADD RSC /l 0xc0a /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\..\bin\dll\strings.dll"
!ELSEIF "$(CFG)" == "strings - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc0a /d "_DEBUG"
# ADD RSC /l 0xc0a /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\bin\dll\strings.dll" /pdbtype:sept
!ENDIF
# Begin Target
# Name "strings - Win32 Release"
# Name "strings - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\conv.c
# End Source File
# Begin Source File
SOURCE=.\stings.def
# End Source File
# Begin Source File
SOURCE=.\strings.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\conv.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View file

@ -1,89 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: edivstd - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP49.tmp" with contents
[
/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EDIVSTD_EXPORTS" /Fp"Debug/edivstd.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"D:\ediv\src\dlls\edivstd\edivstd.c"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP49.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4A.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/edivstd.pdb" /debug /machine:I386 /def:".\edivstd.def" /out:"..\..\..\bin\dll\edivstd.dll" /implib:"Debug/edivstd.lib" /pdbtype:sept
.\Debug\edivstd.obj
]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4A.tmp"
<h3>Output Window</h3>
Compiling...
edivstd.c
d:\ediv\src\dlls\edivstd\edivstd.c(73) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
Linking...
Creating library Debug/edivstd.lib and object Debug/edivstd.exp
<h3>Results</h3>
edivstd.dll - 0 error(s), 1 warning(s)
<h3>
--------------------Configuration: sample - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4E.tmp" with contents
[
/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SAMPLE_EXPORTS" /Fp"Debug/sample.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"D:\ediv\src\dlls\sample\sample.c"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4E.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4F.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/sample.pdb" /debug /machine:I386 /def:".\sample.def" /out:"..\..\..\bin\dll\sample.dll" /implib:"Debug/sample.lib" /pdbtype:sept
.\Debug\sample.obj
]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP4F.tmp"
<h3>Output Window</h3>
Compiling...
sample.c
Linking...
Creating library Debug/sample.lib and object Debug/sample.exp
<h3>Results</h3>
sample.dll - 0 error(s), 0 warning(s)
<h3>
--------------------Configuration: strings - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP53.tmp" with contents
[
/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "STRINGS_EXPORTS" /Fp"Debug/strings.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"D:\ediv\src\dlls\strings\conv.c"
"D:\ediv\src\dlls\strings\strings.c"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP53.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP54.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/strings.pdb" /debug /machine:I386 /def:".\stings.def" /out:"..\..\..\bin\dll\strings.dll" /implib:"Debug/strings.lib" /pdbtype:sept
.\Debug\conv.obj
.\Debug\strings.obj
]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP54.tmp"
<h3>Output Window</h3>
Compiling...
conv.c
strings.c
Linking...
Creating library Debug/strings.lib and object Debug/strings.exp
<h3>Results</h3>
strings.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View file

@ -1,162 +0,0 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="strings"
ProjectGUID="{F83A4960-9687-42C4-B722-14A028A9C393}"
SccProjectName="SAK"
SccAuxPath="SAK"
SccLocalPath="SAK"
SccProvider="SAK">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STRINGS_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/strings.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile="..\..\..\bin\dll\strings.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\stings.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/strings.pdb"
ImportLibrary=".\Debug/strings.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/strings.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..;..\..\shared"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STRINGS_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/strings.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
OutputFile="..\..\..\bin\dll\strings.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\stings.def"
ProgramDatabaseFile=".\Release/strings.pdb"
ImportLibrary=".\Release/strings.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/strings.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath=".\conv.c">
</File>
<File
RelativePath=".\stings.def">
</File>
<File
RelativePath=".\strings.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath=".\conv.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -1,10 +0,0 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = "relative:dlls\\strings"
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

View file

@ -1,428 +0,0 @@
#include <SDL/SDL.h>
#include <export.h>
//#include "../../shared/varindex.h"
#include "../../shared/edivfont.h"
#include "text.h"
#define MAX_FONTS 0xFF
#define MAX_WRITES 0xFFF
struct _fuente_control_s fuente_control_s[MAX_FONTS];
int existe[MAX_FONTS] ;
struct
{
int existe ;
int numerica ; // 0: texto , 1: numerica (write_int)
int offset_var ; // solo para numerica = 1
int centrado ; // solo para numerica = 1
int fuente ; // solo para numerica = 1
int x , y ;
int cx , cy ;
SDL_Surface *imagen ;
}textos[MAX_WRITES] ;
int ExportaFuncs(EXPORTAFUNCS_PARAMS)
{
CONST("all_text",0);
FUNCTION("load_fnt",1,eDiv_LoadFnt) ;
FUNCTION("write",5,eDiv_Write) ;
FUNCTION("write_int",5,eDiv_WriteInt) ;
FUNCTION("move_text",3,eDiv_MoveText) ;
FUNCTION("delete_text",1,eDiv_DeleteText) ;
ENTRYPOINT( frame ) ;
ENTRYPOINT(first_load) ;
return TRUE ;
}
FILE *fichero ;
int eDiv_LoadFnt(FUNCTION_PARAMS)
{
FILE *fuente ;
char *pool ;
int i ;
fpos_t pos ;
const char *filename=getstrparm(); // Fichero a cargar
for ( i = 1 ; i <= MAX_FONTS ; i++ )
{
if ( existe[i] == 0 )
break ;
}
if ( i == MAX_FONTS ) {
fp->Runtime_Error(113); // demasiadas fuentes
return -1 ;
}
fichero = fopen("text.txt" , "w+" ) ;
if((fuente = fopen(filename, "rb" ))==NULL) {
fclose(fichero);
fp->Runtime_Error(114); /* archivo de fuente no encontrado */
return 0;
}
fprintf( fichero , "Leidos %d bytes\n" , (int)fread( &fuente_control_s[i] , 1 , sizeof(fuente_control_s[i]) , fuente ) ) ;
if (!(pool = malloc(fuente_control_s[i].size_imagen + 1 ) ) ) {
//fprintf(fichero , "Error: Memoria insuficiente" ) ;
fp->Runtime_Error(100); /* memoria insuficiente */
return 0;
}
pos = fuente_control_s[i].offset_imagen ;
fsetpos(fuente , &pos ) ;
fprintf(fichero , "Size of image: %d bytes\n" , fuente_control_s[i].size_imagen ) ;
fprintf(fichero , "Leidos %d bytes\n" , (int)fread( pool , 1 , fuente_control_s[i].size_imagen , fuente ) ) ;
fuente_control_s[i].imagen = SDL_CreateRGBSurfaceFrom( pool , fuente_control_s[i].w , fuente_control_s[i].h , fuente_control_s[i].bytespp * 8 , fuente_control_s[i].w * fuente_control_s[i].bytespp , 0 , 0 , 0, 0 ) ;
fclose(fuente) ;
fclose(fichero) ;
existe[i] = 1 ;
return i ;
}
int eDiv_Write(FUNCTION_PARAMS)
{
int i , j ;
int ax ;
SDL_Rect dstrect ;
int fuente , x , y , centrado ;
int w , h ;
char *texto ;
texto = getstrparm() ;
centrado = getparm() ;
y = getparm() ;
x = getparm() ;
fuente = getparm() ;
if(fuente<0 || fuente>MAX_FONTS || !existe[fuente]) {
fp->Runtime_Error(116); // id de fuente no válido
return -1;
}
for ( i = 1 ; i < MAX_WRITES ; i++ )
{
if ( textos[i].existe == 0 )
break ;
}
if ( i == MAX_WRITES ) {
fp->Runtime_Error(118); // demasiados textos
return -1 ;
}
textos[i].x = x ;
textos[i].y = y ;
textos[i].numerica = 0 ;
textos[i].offset_var = 0 ;
textos[i].centrado = 0 ;
textos[i].fuente = 0 ;
// Calculamos el ancho del fichero
w = 0 ;
for ( j = 0 ; j < strlen(texto) ; j++ )
w += fuente_control_s[fuente].rect[ texto[j] ].w +1;
h = fuente_control_s[fuente].imagen->h ;
textos[i].imagen = SDL_CreateRGBSurface(SDL_HWSURFACE, w , h , fuente_control_s[fuente].bytespp * 8 , 0 , 0 , 0 , 0 ) ;
SDL_SetColorKey( textos[i].imagen , SDL_SRCCOLORKEY | SDL_RLEACCEL , 0 ) ;
// Escribimos
ax = 0 ; // Valor de x acumulativo mientras se va escribiendo
for ( j = 0 ; j < strlen(texto) ; j++ )
{
dstrect.x = ax ;
dstrect.y = fuente_control_s[fuente].rect[ texto[j] ].y ;
dstrect.w = fuente_control_s[fuente].rect[ texto[j] ].w ;
dstrect.h = fuente_control_s[fuente].rect[ texto[j] ].h ;
SDL_BlitSurface( fuente_control_s[fuente].imagen , &fuente_control_s[fuente].rect[ texto[j] ] , textos[i].imagen , &dstrect ) ;
ax += fuente_control_s[fuente].rect[ texto[j] ].w +1 ;
}
// Centrado
if ( centrado == 0 || centrado == 3 || centrado == 6 )
textos[i].cx = 0 ;
if ( centrado == 1 || centrado == 4 || centrado == 7 )
textos[i].cx = (int) textos[i].imagen->w / 2 ;
if ( centrado == 2 || centrado == 5 || centrado == 8 )
textos[i].cx = textos[i].imagen->w -1 ;
if ( centrado > -1 && centrado < 3 )
textos[i].cy = 0 ;
if ( centrado > 2 && centrado < 6 )
textos[i].cy = (int) textos[i].imagen->h / 2 ;
if ( centrado > 5 && centrado < 9 )
textos[i].cy = textos[i].imagen->h -1 ;
textos[i].existe = 1 ;
return i ;
}
int eDiv_WriteInt(FUNCTION_PARAMS)
{
int i , j ;
int w , h , ax ;
SDL_Rect dstrect ;
int fuente , x , y , centrado , offset_var ;
char *texto ;
char texto2[30] ;
offset_var = getparm() ;
centrado = getparm() ;
y = getparm() ;
x = getparm() ;
fuente = getparm() ;
if(fuente<0 || fuente>MAX_FONTS || !existe[fuente]) {
fp->Runtime_Error(116); // id de fuente no válido
return -1;
}
for ( i = 1 ; i < MAX_WRITES ; i++ )
{
if ( textos[i].existe == 0 )
break ;
}
if ( i == MAX_WRITES ) {
fp->Runtime_Error(118); // demasiados textos
return -1 ;
}
textos[i].x = x ;
textos[i].y = y ;
textos[i].numerica = 1 ;
textos[i].offset_var = offset_var ;
textos[i].centrado = centrado ;
textos[i].fuente = fuente ;
fichero = fopen("wrin.txt" , "w+") ;
fprintf( fichero , "valor: %i\n" , global("fps") ) ;
fclose(fichero) ;
_itoa( fp->mem[ textos[i].offset_var ] , texto2 , 10 ) ;
/*
temp = fp->mem[ textos[i].offset_var ] ;
texp = texto ;
while( temp > 0 )
{
*texp = temp % 10 ;
texp++ ;
*/
texto = texto2 ;
// Calculamos el ancho del fichero
w = 0 ;
for ( j = 0 ; j < strlen(texto) ; j++ )
w += fuente_control_s[fuente].rect[ texto[j] ].w +1;
h = fuente_control_s[fuente].imagen->h ;
textos[i].imagen = SDL_CreateRGBSurface(SDL_HWSURFACE, w , h , fuente_control_s[fuente].bytespp * 8 , 0 , 0 , 0 , 0 ) ;
SDL_SetColorKey( textos[i].imagen , SDL_SRCCOLORKEY | SDL_RLEACCEL , 0 ) ;
// Escribimos
ax = 0 ; // Valor de x acumulativo mientras se va escribiendo
for ( j = 0 ; j < strlen(texto) ; j++ )
{
dstrect.x = ax ;
dstrect.y = fuente_control_s[fuente].rect[ texto[j] ].y ;
dstrect.w = fuente_control_s[fuente].rect[ texto[j] ].w ;
dstrect.h = fuente_control_s[fuente].rect[ texto[j] ].h ;
SDL_BlitSurface( fuente_control_s[fuente].imagen , &fuente_control_s[fuente].rect[ texto[j] ] , textos[i].imagen , &dstrect ) ;
ax += fuente_control_s[fuente].rect[ texto[j] ].w +1 ;
}
// Centrado
if ( centrado == 0 || centrado == 3 || centrado == 6 )
textos[i].cx = 0 ;
if ( centrado == 1 || centrado == 4 || centrado == 7 )
textos[i].cx = (int) textos[i].imagen->w / 2 ;
if ( centrado == 2 || centrado == 5 || centrado == 8 )
textos[i].cx = textos[i].imagen->w -1 ;
if ( centrado > -1 && centrado < 3 )
textos[i].cy = 0 ;
if ( centrado > 2 && centrado < 6 )
textos[i].cy = (int) textos[i].imagen->h / 2 ;
if ( centrado > 5 && centrado < 9 )
textos[i].cy = textos[i].imagen->h -1 ;
textos[i].existe = 1 ;
return i ;
}
int eDiv_MoveText(FUNCTION_PARAMS)
{
int i , x , y ;
y = getparm() ;
x = getparm() ;
i = getparm() ;
textos[i].x = x ;
textos[i].y = y ;
return 1 ;
}
int eDiv_DeleteText(FUNCTION_PARAMS)
{
int i,j ;
i = getparm() ;
if(i==0) {
for(i=1;i<MAX_WRITES;i++) {
if(textos[i].existe) {
//SDL_FreeSurface(textos[i].imagen) ; // <--- por ke esta comentado??
textos[i].existe=0;
}
}
return 1;
}
else if ( i<1 || i>MAX_WRITES) {
fp->Runtime_Error(119); // id de texto no válido
return -1 ;
}
//if(textos[i].existe) {
// SDL_FreeSurface(textos[i].imagen) ; // <--- por ke esta comentado??
textos[i].existe = 0 ;
//}
return 1 ;
}
//============== Entrypoints =====================================================
void frame(FUNCTION_PARAMS)
{
SDL_Rect srcrect, dstrect ;
char *texto ;
char texto2[30] ;
int i , j ;
int w , h , ax ;
for ( i = 0 ; i < 0xFFF ; i++ )
if ( textos[i].existe )
{
if ( textos[i].numerica )
{
SDL_FreeSurface( textos[i].imagen ) ;
itoa( fp->mem[ textos[i].offset_var ] , texto2 , 10 ) ;
texto = texto2 ;
// Calculamos el ancho del fichero
w = 0 ;
for ( j = 0 ; j < strlen(texto) ; j++ )
w += fuente_control_s[textos[i].fuente].rect[ texto[j] ].w +1;
h = fuente_control_s[textos[i].fuente].imagen->h ;
textos[i].imagen = SDL_CreateRGBSurface(SDL_HWSURFACE, w , h , fuente_control_s[textos[i].fuente].bytespp * 8 , 0 , 0 , 0 , 0 ) ;
SDL_SetColorKey( textos[i].imagen , SDL_SRCCOLORKEY | SDL_RLEACCEL , 0 ) ;
// Escribimos
ax = 0 ; // Valor de x acumulativo mientras se va escribiendo
for ( j = 0 ; j < strlen(texto) ; j++ )
{
dstrect.x = ax ;
dstrect.y = fuente_control_s[textos[i].fuente].rect[ texto[j] ].y ;
dstrect.w = fuente_control_s[textos[i].fuente].rect[ texto[j] ].w ;
dstrect.h = fuente_control_s[textos[i].fuente].rect[ texto[j] ].h ;
SDL_BlitSurface( fuente_control_s[textos[i].fuente].imagen , &fuente_control_s[textos[i].fuente].rect[ texto[j] ] , textos[i].imagen , &dstrect ) ;
ax += fuente_control_s[textos[i].fuente].rect[ texto[j] ].w +1 ;
}
// Centrado
if ( textos[i].centrado == 0 || textos[i].centrado == 3 || textos[i].centrado == 6 )
textos[i].cx = 0 ;
if ( textos[i].centrado == 1 || textos[i].centrado == 4 || textos[i].centrado == 7 )
textos[i].cx = (int) textos[i].imagen->w / 2 ;
if ( textos[i].centrado == 2 || textos[i].centrado == 5 || textos[i].centrado == 8 )
textos[i].cx = textos[i].imagen->w -1 ;
if ( textos[i].centrado > -1 && textos[i].centrado < 3 )
textos[i].cy = 0 ;
if ( textos[i].centrado > 2 && textos[i].centrado < 6 )
textos[i].cy = (int) textos[i].imagen->h / 2 ;
if ( textos[i].centrado > 5 && textos[i].centrado < 9 )
textos[i].cy = textos[i].imagen->h -1 ;
}
srcrect.x = 0 ;
srcrect.y = 0 ;
srcrect.w = textos[i].imagen->w ;
srcrect.h = textos[i].imagen->h ;
dstrect.x = textos[i].x - textos[i].cx ;
dstrect.y = textos[i].y - textos[i].cy ;
dstrect.w = srcrect.w ;
dstrect.h = srcrect.h ;
fp->Dibuja( textos[i].imagen , srcrect, dstrect , 0 , 255 , 0 , 0 ) ;
}
/*
if ( existe[1] )
{
if ( fp->existe.dibuja )
{
srcrect.x = 0 ;
srcrect.y = 0 ;
srcrect.w = fuente_control_s[1].w ;
srcrect.h = fuente_control_s[1].h ;
fp->Dibuja( fuente_control_s[1].imagen , srcrect , srcrect , 0 , 255 ) ;
}
}*/
/*
// de momento solo hay esta demostracion de que fp->Dibuja funciona xDD
// falta hacer los scrolls :P
if ( fp->existe.dibuja )
{
if ( fp->files[0].existe )
{
if ( fp->files[0].mapa[1000].existe )
{
srcrect.x = 0 ;
srcrect.y = 0 ;
srcrect.w = fp->files[0].mapa[1000].Surface->w ;
srcrect.h = fp->files[0].mapa[1000].Surface->h ;
fp->Dibuja( fp->files[0].mapa[1000].Surface , srcrect , srcrect , 0 , 128 ) ;
}
}
}
*/
}
void first_load(FUNCTION_PARAMS)
{
int i ;
for ( i = 0 ; i < 256 ; i++ )
existe[i] = 0 ;
for ( i = 0 ; i < 1024 ; i++ )
textos[i].existe = 0 ;
}

View file

@ -1,3 +0,0 @@
LIBRARY text
EXPORTS
ExportaFuncs

View file

@ -1,7 +0,0 @@
int eDiv_LoadFnt(FUNCTION_PARMAS);
int eDiv_Write(FUNCTION_PARAMS);
int eDiv_WriteInt(FUNCTION_PARAMS);
int eDiv_MoveText(FUNCTION_PARAMS);
int eDiv_DeleteText(FUNCTION_PARAMS);

View file

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 7.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text", "text.vcproj", "{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.ActiveCfg = Debug|Win32
{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Debug.Build.0 = Debug|Win32
{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.ActiveCfg = Release|Win32
{11D7DB5D-4EC9-4181-A9F0-B03EAAE4A070}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Binary file not shown.

View file

@ -1,167 +0,0 @@
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.00"
Name="text"
ProjectGUID="{6994F9CD-63ED-425D-879C-678D1706F4AE}"
SccProjectName=""
SccAuxPath=""
SccLocalPath=""
SccProvider="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/edivstd.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="sdlmain.lib sdl.lib"
OutputFile="..\..\..\bin\dll\text.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\text.def"
ProgramDatabaseFile=".\Release/edivstd.pdb"
ImportLibrary=".\Release/edivstd.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/edivstd.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".."
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EDIVSTD_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/text.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="TRUE"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="sdlmain.lib sdl.lib"
OutputFile="..\..\..\bin\dll\text.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile=".\text.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/text.pdb"
ImportLibrary=".\Debug/text.lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/text.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="3082"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
</Configuration>
</Configurations>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="text.c">
</File>
<File
RelativePath="text.def">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\..\shared\edivfont.h">
</File>
<File
RelativePath="..\export.h">
</File>
<File
RelativePath="text.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>